{"version":3,"sources":["mod::vue/node_modules/@vue/shared/dist/shared.cjs.prod.js","mod::vue/node_modules/@vue/shared/index.js","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/https:/raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/generated/decode-data-html.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/https:/raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/generated/decode-data-xml.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/https:/raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/decode_codepoint.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/https:/raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/decode.ts","mod::vue/node_modules/@babel/parser/src/util/location.ts","mod::vue/node_modules/@babel/parser/src/parse-error/module-errors.ts","mod::vue/node_modules/@babel/parser/src/parse-error/to-node-description.ts","mod::vue/node_modules/@babel/parser/src/parse-error/standard-errors.ts","mod::vue/node_modules/@babel/parser/src/parse-error/strict-mode-errors.ts","mod::vue/node_modules/@babel/parser/src/parse-error/parse-expression-errors.ts","mod::vue/node_modules/@babel/parser/src/parse-error/pipeline-operator-errors.ts","mod::vue/node_modules/@babel/parser/src/parse-error.ts","mod::vue/node_modules/@babel/parser/src/options.ts","mod::vue/node_modules/@babel/parser/src/plugins/estree.ts","mod::vue/node_modules/@babel/parser/src/tokenizer/context.ts","mod::vue/node_modules/@babel/parser/src/tokenizer/types.ts","mod::vue/node_modules/@babel/babel-helper-validator-identifier/src/identifier.ts","mod::vue/node_modules/@babel/babel-helper-validator-identifier/src/keyword.ts","mod::vue/node_modules/@babel/parser/src/util/identifier.ts","mod::vue/node_modules/@babel/parser/src/util/scope.ts","mod::vue/node_modules/@babel/parser/src/plugins/flow/scope.ts","mod::vue/node_modules/@babel/parser/src/plugins/flow/index.ts","mod::vue/node_modules/@babel/parser/src/plugins/jsx/xhtml.ts","mod::vue/node_modules/@babel/parser/src/util/whitespace.ts","mod::vue/node_modules/@babel/parser/src/plugins/jsx/index.ts","mod::vue/node_modules/@babel/parser/src/plugins/typescript/scope.ts","mod::vue/node_modules/@babel/parser/src/util/production-parameter.ts","mod::vue/node_modules/@babel/parser/src/parser/base.ts","mod::vue/node_modules/@babel/parser/src/parser/comments.ts","mod::vue/node_modules/@babel/parser/src/tokenizer/state.ts","mod::vue/node_modules/@babel/babel-helper-string-parser/src/index.ts","mod::vue/node_modules/@babel/parser/src/tokenizer/index.ts","mod::vue/node_modules/@babel/parser/src/util/class-scope.ts","mod::vue/node_modules/@babel/parser/src/util/expression-scope.ts","mod::vue/node_modules/@babel/parser/src/parser/util.ts","mod::vue/node_modules/@babel/parser/src/parser/node.ts","mod::vue/node_modules/@babel/parser/src/parser/lval.ts","mod::vue/node_modules/@babel/parser/src/plugins/typescript/index.ts","mod::vue/node_modules/@babel/parser/src/plugins/placeholders.ts","mod::vue/node_modules/@babel/parser/src/plugins/v8intrinsic.ts","mod::vue/node_modules/@babel/parser/src/plugin-utils.ts","mod::vue/node_modules/@babel/parser/src/parser/expression.ts","mod::vue/node_modules/@babel/parser/src/parser/statement.ts","mod::vue/node_modules/@babel/parser/src/parser/index.ts","mod::vue/node_modules/@babel/parser/src/index.ts","mod::vue/node_modules/estree-walker/dist/umd/estree-walker.js","mod::vue/node_modules/source-map-js/lib/base64.js","mod::vue/node_modules/source-map-js/lib/base64-vlq.js","mod::vue/node_modules/source-map-js/lib/util.js","mod::vue/node_modules/source-map-js/lib/array-set.js","mod::vue/node_modules/source-map-js/lib/mapping-list.js","mod::vue/node_modules/source-map-js/lib/source-map-generator.js","mod::vue/node_modules/source-map-js/lib/binary-search.js","mod::vue/node_modules/source-map-js/lib/quick-sort.js","mod::vue/node_modules/source-map-js/lib/source-map-consumer.js","mod::vue/node_modules/source-map-js/lib/source-node.js","mod::vue/node_modules/source-map-js/source-map.js","mod::vue/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js","mod::vue/node_modules/@vue/compiler-core/index.js","mod::vue/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js","mod::vue/node_modules/@vue/compiler-dom/index.js","mod::vue/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js","mod::vue/node_modules/@vue/reactivity/index.js","mod::vue/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js","mod::vue/node_modules/@vue/runtime-core/index.js","mod::vue/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js","mod::vue/node_modules/@vue/runtime-dom/index.js","mod::vue/node_modules/vue/dist/vue.cjs.prod.js","mod::vue/node_modules/vue/index.js","mod::vue/node_modules/vue-router/dist/vue-router.prod.cjs","mod::vue/node_modules/vue-router/index.js","mod::vue/node_modules/reka-ui/dist/rolldown-runtime.cjs","mod::vue/node_modules/ohash/dist/shared/ohash.D__AXeF1.mjs","mod::vue/node_modules/ohash/dist/crypto/js/index.mjs","mod::vue/node_modules/ohash/dist/index.mjs","mod::vue/node_modules/reka-ui/src/shared/arrays.ts","mod::vue/node_modules/reka-ui/src/shared/browser.ts","mod::vue/node_modules/reka-ui/src/shared/clamp.ts","mod::vue/node_modules/reka-ui/src/shared/createContext.ts","mod::vue/node_modules/reka-ui/src/shared/getActiveElement.ts","mod::vue/node_modules/reka-ui/src/shared/handleAndDispatchCustomEvent.ts","mod::vue/node_modules/reka-ui/src/shared/isValidVNodeElement.ts","mod::vue/node_modules/reka-ui/src/shared/nullish.ts","mod::vue/node_modules/reka-ui/src/shared/isValueEqualOrExist.ts","mod::vue/node_modules/reka-ui/src/shared/object.ts","mod::vue/node_modules/@vueuse/shared/dist/index.js","mod::vue/node_modules/@vueuse/core/dist/index.js","mod::vue/node_modules/reka-ui/src/shared/onFocusOutside.ts","mod::vue/node_modules/reka-ui/src/shared/renderSlotFragments.ts","mod::vue/node_modules/reka-ui/src/shared/trap-focus.ts","mod::vue/node_modules/reka-ui/src/shared/useArrowNavigation.ts","mod::vue/node_modules/reka-ui/src/ConfigProvider/ConfigProvider.vue","mod::vue/node_modules/reka-ui/src/ConfigProvider/ConfigProvider.vue","mod::vue/node_modules/defu/dist/defu.cjs","mod::vue/node_modules/defu/lib/defu.cjs","mod::vue/node_modules/reka-ui/src/shared/useBodyScrollLock.ts","mod::vue/node_modules/reka-ui/src/shared/useComposing.ts","mod::vue/node_modules/@internationalized/date/dist/private/packages/@internationalized/date/src/utils.ts","mod::vue/node_modules/@internationalized/date/dist/private/calendars/packages/@internationalized/date/src/calendars/GregorianCalendar.ts","mod::vue/node_modules/@internationalized/date/dist/private/packages/@internationalized/date/src/weekStartData.ts","mod::vue/node_modules/@internationalized/date/dist/private/packages/@internationalized/date/src/queries.ts","mod::vue/node_modules/@internationalized/date/dist/private/packages/@internationalized/date/src/conversion.ts","mod::vue/node_modules/@internationalized/date/dist/private/packages/@internationalized/date/src/manipulation.ts","mod::vue/node_modules/@internationalized/date/dist/private/packages/@internationalized/date/src/string.ts","mod::vue/node_modules/@internationalized/date/dist/private/packages/@internationalized/date/src/CalendarDate.ts","mod::vue/node_modules/@internationalized/date/dist/private/calendars/packages/@internationalized/date/src/calendars/JapaneseCalendar.ts","mod::vue/node_modules/@internationalized/date/dist/private/calendars/packages/@internationalized/date/src/calendars/BuddhistCalendar.ts","mod::vue/node_modules/@internationalized/date/dist/private/calendars/packages/@internationalized/date/src/calendars/TaiwanCalendar.ts","mod::vue/node_modules/@internationalized/date/dist/private/calendars/packages/@internationalized/date/src/calendars/PersianCalendar.ts","mod::vue/node_modules/@internationalized/date/dist/private/calendars/packages/@internationalized/date/src/calendars/IndianCalendar.ts","mod::vue/node_modules/@internationalized/date/dist/private/calendars/packages/@internationalized/date/src/calendars/IslamicCalendar.ts","mod::vue/node_modules/@internationalized/date/dist/private/calendars/packages/@internationalized/date/src/calendars/HebrewCalendar.ts","mod::vue/node_modules/@internationalized/date/dist/private/calendars/packages/@internationalized/date/src/calendars/EthiopicCalendar.ts","mod::vue/node_modules/@internationalized/date/dist/private/packages/@internationalized/date/src/createCalendar.ts","mod::vue/node_modules/@internationalized/date/dist/private/packages/@internationalized/date/src/DateFormatter.ts","mod::vue/node_modules/reka-ui/src/date/comparators.ts","mod::vue/node_modules/reka-ui/src/shared/date/comparators.ts","mod::vue/node_modules/reka-ui/src/date/utils.ts","mod::vue/node_modules/reka-ui/src/shared/date/utils.ts","mod::vue/node_modules/reka-ui/src/date/calendar.ts","mod::vue/node_modules/reka-ui/dist/date/index.cjs","mod::vue/node_modules/reka-ui/src/shared/useDateFormatter.ts","mod::vue/node_modules/reka-ui/src/shared/useDirection.ts","mod::vue/node_modules/reka-ui/src/shared/useEmitAsProps.ts","mod::vue/node_modules/reka-ui/src/shared/useFilter.ts","mod::vue/node_modules/reka-ui/src/shared/useFocusGuards.ts","mod::vue/node_modules/reka-ui/src/shared/useFormControl.ts","mod::vue/node_modules/reka-ui/src/shared/useForwardExpose.ts","mod::vue/node_modules/reka-ui/src/shared/useForwardProps.ts","mod::vue/node_modules/reka-ui/src/shared/useForwardPropsEmits.ts","mod::vue/node_modules/reka-ui/src/shared/useForwardRef.ts","mod::vue/node_modules/reka-ui/src/shared/useGraceArea.ts","mod::vue/node_modules/aria-hidden/dist/es5/index.js","mod::vue/node_modules/reka-ui/src/shared/useHideOthers.ts","mod::vue/node_modules/reka-ui/src/shared/useId.ts","mod::vue/node_modules/reka-ui/src/shared/useKbd.ts","mod::vue/node_modules/reka-ui/src/shared/useLocale.ts","mod::vue/node_modules/reka-ui/src/shared/useSelectionBehavior.ts","mod::vue/node_modules/reka-ui/src/shared/useSize.ts","mod::vue/node_modules/reka-ui/src/shared/useStateMachine.ts","mod::vue/node_modules/reka-ui/src/shared/useTypeahead.ts","mod::vue/node_modules/reka-ui/src/shared/withDefault.ts","mod::vue/node_modules/reka-ui/dist/shared/index.cjs","mod::vue/node_modules/reka-ui/src/Presence/usePresence.ts","mod::vue/node_modules/reka-ui/src/Presence/Presence.ts","mod::vue/node_modules/reka-ui/src/Primitive/Slot.ts","mod::vue/node_modules/reka-ui/src/Primitive/Primitive.ts","mod::vue/node_modules/reka-ui/src/Primitive/usePrimitiveElement.ts","mod::vue/node_modules/reka-ui/src/Collapsible/CollapsibleRoot.vue","mod::vue/node_modules/reka-ui/src/Collapsible/CollapsibleRoot.vue","mod::vue/node_modules/reka-ui/src/Collapsible/CollapsibleContent.vue","mod::vue/node_modules/reka-ui/src/Collapsible/CollapsibleContent.vue","mod::vue/node_modules/reka-ui/src/Collapsible/CollapsibleTrigger.vue","mod::vue/node_modules/reka-ui/src/Collapsible/CollapsibleTrigger.vue","mod::vue/node_modules/reka-ui/src/shared/useSingleOrMultipleValue.ts","mod::vue/node_modules/reka-ui/src/Accordion/AccordionRoot.vue","mod::vue/node_modules/reka-ui/src/Accordion/AccordionRoot.vue","mod::vue/node_modules/reka-ui/src/Accordion/AccordionItem.vue","mod::vue/node_modules/reka-ui/src/Accordion/AccordionItem.vue","mod::vue/node_modules/reka-ui/src/Accordion/AccordionContent.vue","mod::vue/node_modules/reka-ui/src/Accordion/AccordionContent.vue","mod::vue/node_modules/reka-ui/src/Accordion/AccordionHeader.vue","mod::vue/node_modules/reka-ui/src/Accordion/AccordionHeader.vue","mod::vue/node_modules/reka-ui/src/Accordion/AccordionTrigger.vue","mod::vue/node_modules/reka-ui/src/Accordion/AccordionTrigger.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogRoot.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogRoot.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogClose.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogClose.vue","mod::vue/node_modules/reka-ui/src/DismissableLayer/utils.ts","mod::vue/node_modules/reka-ui/src/DismissableLayer/DismissableLayer.vue","mod::vue/node_modules/reka-ui/src/DismissableLayer/DismissableLayer.vue","mod::vue/node_modules/reka-ui/src/DismissableLayer/DismissableLayerBranch.vue","mod::vue/node_modules/reka-ui/src/DismissableLayer/DismissableLayerBranch.vue","mod::vue/node_modules/reka-ui/src/FocusScope/stack.ts","mod::vue/node_modules/reka-ui/src/FocusScope/utils.ts","mod::vue/node_modules/reka-ui/src/FocusScope/FocusScope.vue","mod::vue/node_modules/reka-ui/src/FocusScope/FocusScope.vue","mod::vue/node_modules/reka-ui/src/Menu/utils.ts","mod::vue/node_modules/reka-ui/src/Dialog/utils.ts","mod::vue/node_modules/reka-ui/src/Dialog/DialogContentImpl.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogContentImpl.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogContentModal.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogContentModal.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogContentNonModal.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogContentNonModal.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogContent.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogContent.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogDescription.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogDescription.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogOverlayImpl.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogOverlayImpl.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogOverlay.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogOverlay.vue","mod::vue/node_modules/reka-ui/src/Teleport/Teleport.vue","mod::vue/node_modules/reka-ui/src/Teleport/Teleport.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogPortal.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogPortal.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogTitle.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogTitle.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogTrigger.vue","mod::vue/node_modules/reka-ui/src/Dialog/DialogTrigger.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogAction.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogAction.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogContent.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogContent.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogCancel.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogCancel.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogDescription.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogDescription.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogOverlay.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogOverlay.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogPortal.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogPortal.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogRoot.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogRoot.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogTitle.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogTitle.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogTrigger.vue","mod::vue/node_modules/reka-ui/src/AlertDialog/AlertDialogTrigger.vue","mod::vue/node_modules/reka-ui/src/AspectRatio/AspectRatio.vue","mod::vue/node_modules/reka-ui/src/AspectRatio/AspectRatio.vue","mod::vue/node_modules/reka-ui/src/Collection/Collection.ts","mod::vue/node_modules/reka-ui/src/VisuallyHidden/VisuallyHidden.vue","mod::vue/node_modules/reka-ui/src/VisuallyHidden/VisuallyHidden.vue","mod::vue/node_modules/reka-ui/src/VisuallyHidden/VisuallyHiddenInputBubble.vue","mod::vue/node_modules/reka-ui/src/VisuallyHidden/VisuallyHiddenInputBubble.vue","mod::vue/node_modules/reka-ui/src/VisuallyHidden/VisuallyHiddenInput.vue","mod::vue/node_modules/reka-ui/src/VisuallyHidden/VisuallyHiddenInput.vue","mod::vue/node_modules/reka-ui/src/Listbox/utils.ts","mod::vue/node_modules/reka-ui/src/RovingFocus/utils.ts","mod::vue/node_modules/reka-ui/src/Listbox/ListboxRoot.vue","mod::vue/node_modules/reka-ui/src/Listbox/ListboxRoot.vue","mod::vue/node_modules/reka-ui/src/Listbox/ListboxContent.vue","mod::vue/node_modules/reka-ui/src/Listbox/ListboxContent.vue","mod::vue/node_modules/reka-ui/src/Listbox/ListboxFilter.vue","mod::vue/node_modules/reka-ui/src/Listbox/ListboxFilter.vue","mod::vue/node_modules/reka-ui/src/Listbox/ListboxGroup.vue","mod::vue/node_modules/reka-ui/src/Listbox/ListboxGroup.vue","mod::vue/node_modules/reka-ui/src/Listbox/ListboxGroupLabel.vue","mod::vue/node_modules/reka-ui/src/Listbox/ListboxGroupLabel.vue","mod::vue/node_modules/reka-ui/src/Listbox/ListboxItem.vue","mod::vue/node_modules/reka-ui/src/Listbox/ListboxItem.vue","mod::vue/node_modules/reka-ui/src/Listbox/ListboxItemIndicator.vue","mod::vue/node_modules/reka-ui/src/Listbox/ListboxItemIndicator.vue","mod::vue/node_modules/@tanstack/virtual-core/src/lazy-measurements.ts","mod::vue/node_modules/@tanstack/virtual-core/src/utils.ts","mod::vue/node_modules/@tanstack/virtual-core/src/index.ts","mod::vue/node_modules/@tanstack/vue-virtual/src/index.ts","mod::vue/node_modules/reka-ui/src/Listbox/ListboxVirtualizer.vue","mod::vue/node_modules/reka-ui/src/Listbox/ListboxVirtualizer.vue","mod::vue/node_modules/reka-ui/src/Popper/PopperRoot.vue","mod::vue/node_modules/reka-ui/src/Popper/PopperRoot.vue","mod::vue/node_modules/reka-ui/src/Popper/PopperAnchor.vue","mod::vue/node_modules/reka-ui/src/Popper/PopperAnchor.vue","mod::vue/node_modules/reka-ui/src/shared/component/Arrow.vue","mod::vue/node_modules/reka-ui/src/shared/component/Arrow.vue","mod::vue/node_modules/reka-ui/src/Popper/utils.ts","mod::vue/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","mod::vue/node_modules/@floating-ui/core/dist/floating-ui.core.mjs","mod::vue/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","mod::vue/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","mod::vue/node_modules/vue-demi/lib/index.cjs","mod::vue/node_modules/@floating-ui/vue/dist/floating-ui.vue.esm.js","mod::vue/node_modules/reka-ui/src/Popper/PopperContent.vue","mod::vue/node_modules/reka-ui/src/Popper/PopperContent.vue","mod::vue/node_modules/reka-ui/src/Popper/PopperArrow.vue","mod::vue/node_modules/reka-ui/src/Popper/PopperArrow.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxRoot.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxRoot.vue","mod::vue/node_modules/reka-ui/src/Autocomplete/AutocompleteRoot.vue","mod::vue/node_modules/reka-ui/src/Autocomplete/AutocompleteRoot.vue","mod::vue/node_modules/reka-ui/src/Autocomplete/AutocompleteInput.vue","mod::vue/node_modules/reka-ui/src/Autocomplete/AutocompleteInput.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxAnchor.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxAnchor.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxContentImpl.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxContentImpl.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxArrow.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxArrow.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxCancel.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxCancel.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxContent.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxContent.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxEmpty.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxEmpty.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxGroup.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxGroup.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxInput.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxInput.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxItem.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxItem.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxItemIndicator.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxItemIndicator.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxLabel.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxLabel.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxPortal.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxPortal.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxSeparator.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxSeparator.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxTrigger.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxTrigger.vue","mod::vue/node_modules/reka-ui/src/shared/useNonce.ts","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxViewport.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxViewport.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxVirtualizer.vue","mod::vue/node_modules/reka-ui/src/Combobox/ComboboxVirtualizer.vue","mod::vue/node_modules/reka-ui/src/Avatar/AvatarRoot.vue","mod::vue/node_modules/reka-ui/src/Avatar/AvatarRoot.vue","mod::vue/node_modules/reka-ui/src/Avatar/AvatarFallback.vue","mod::vue/node_modules/reka-ui/src/Avatar/AvatarFallback.vue","mod::vue/node_modules/reka-ui/src/Avatar/utils.ts","mod::vue/node_modules/reka-ui/src/Avatar/AvatarImage.vue","mod::vue/node_modules/reka-ui/src/Avatar/AvatarImage.vue","mod::vue/node_modules/reka-ui/src/shared/date/parts.ts","mod::vue/node_modules/reka-ui/src/shared/date/placeholders.ts","mod::vue/node_modules/reka-ui/src/shared/date/parser.ts","mod::vue/node_modules/reka-ui/src/shared/date/segment.ts","mod::vue/node_modules/reka-ui/src/shared/date/useDateField.ts","mod::vue/node_modules/reka-ui/src/Calendar/useCalendar.ts","mod::vue/node_modules/reka-ui/src/Calendar/CalendarRoot.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarRoot.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarCell.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarCell.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarCellTrigger.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarCellTrigger.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarGrid.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarGrid.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarGridBody.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarGridBody.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarGridHead.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarGridHead.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarGridRow.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarGridRow.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarHeadCell.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarHeadCell.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarHeader.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarHeader.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarHeading.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarHeading.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarNext.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarNext.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarPrev.vue","mod::vue/node_modules/reka-ui/src/Calendar/CalendarPrev.vue","mod::vue/node_modules/reka-ui/src/RovingFocus/RovingFocusGroup.vue","mod::vue/node_modules/reka-ui/src/RovingFocus/RovingFocusGroup.vue","mod::vue/node_modules/reka-ui/src/RovingFocus/RovingFocusItem.vue","mod::vue/node_modules/reka-ui/src/RovingFocus/RovingFocusItem.vue","mod::vue/node_modules/reka-ui/src/Checkbox/CheckboxGroupRoot.vue","mod::vue/node_modules/reka-ui/src/Checkbox/CheckboxGroupRoot.vue","mod::vue/node_modules/reka-ui/src/Checkbox/utils.ts","mod::vue/node_modules/reka-ui/src/Checkbox/CheckboxRoot.vue","mod::vue/node_modules/reka-ui/src/Checkbox/CheckboxRoot.vue","mod::vue/node_modules/reka-ui/src/Checkbox/CheckboxIndicator.vue","mod::vue/node_modules/reka-ui/src/Checkbox/CheckboxIndicator.vue","mod::vue/node_modules/reka-ui/src/shared/color/convert.ts","mod::vue/node_modules/reka-ui/src/shared/color/channel.ts","mod::vue/node_modules/reka-ui/src/shared/color/gradient.ts","mod::vue/node_modules/reka-ui/src/shared/color/parse.ts","mod::vue/node_modules/reka-ui/src/shared/color/utils.ts","mod::vue/node_modules/reka-ui/src/ColorArea/ColorAreaRoot.vue","mod::vue/node_modules/reka-ui/src/ColorArea/ColorAreaRoot.vue","mod::vue/node_modules/reka-ui/src/ColorArea/utils.ts","mod::vue/node_modules/reka-ui/src/ColorArea/ColorAreaArea.vue","mod::vue/node_modules/reka-ui/src/ColorArea/ColorAreaArea.vue","mod::vue/node_modules/reka-ui/src/ColorArea/ColorAreaThumb.vue","mod::vue/node_modules/reka-ui/src/ColorArea/ColorAreaThumb.vue","mod::vue/node_modules/reka-ui/src/ColorField/ColorFieldRoot.vue","mod::vue/node_modules/reka-ui/src/ColorField/ColorFieldRoot.vue","mod::vue/node_modules/reka-ui/src/ColorField/ColorFieldInput.vue","mod::vue/node_modules/reka-ui/src/ColorField/ColorFieldInput.vue","mod::vue/node_modules/reka-ui/src/Slider/utils.ts","mod::vue/node_modules/reka-ui/src/Slider/SliderHorizontal.vue","mod::vue/node_modules/reka-ui/src/Slider/SliderHorizontal.vue","mod::vue/node_modules/reka-ui/src/Slider/SliderVertical.vue","mod::vue/node_modules/reka-ui/src/Slider/SliderVertical.vue","mod::vue/node_modules/reka-ui/src/Slider/SliderRoot.vue","mod::vue/node_modules/reka-ui/src/Slider/SliderRoot.vue","mod::vue/node_modules/reka-ui/src/Slider/SliderImpl.vue","mod::vue/node_modules/reka-ui/src/Slider/SliderImpl.vue","mod::vue/node_modules/reka-ui/src/Slider/SliderRange.vue","mod::vue/node_modules/reka-ui/src/Slider/SliderRange.vue","mod::vue/node_modules/reka-ui/src/Slider/SliderThumbImpl.vue","mod::vue/node_modules/reka-ui/src/Slider/SliderThumbImpl.vue","mod::vue/node_modules/reka-ui/src/Slider/SliderThumb.vue","mod::vue/node_modules/reka-ui/src/Slider/SliderThumb.vue","mod::vue/node_modules/reka-ui/src/Slider/SliderTrack.vue","mod::vue/node_modules/reka-ui/src/Slider/SliderTrack.vue","mod::vue/node_modules/reka-ui/src/ColorSlider/ColorSliderRoot.vue","mod::vue/node_modules/reka-ui/src/ColorSlider/ColorSliderRoot.vue","mod::vue/node_modules/reka-ui/src/ColorSlider/ColorSliderThumb.vue","mod::vue/node_modules/reka-ui/src/ColorSlider/ColorSliderThumb.vue","mod::vue/node_modules/reka-ui/src/ColorSlider/ColorSliderTrack.vue","mod::vue/node_modules/reka-ui/src/ColorSlider/ColorSliderTrack.vue","mod::vue/node_modules/reka-ui/src/ColorSwatch/ColorSwatch.vue","mod::vue/node_modules/reka-ui/src/ColorSwatch/ColorSwatch.vue","mod::vue/node_modules/reka-ui/src/ColorSwatchPicker/ColorSwatchPickerItem.vue","mod::vue/node_modules/reka-ui/src/ColorSwatchPicker/ColorSwatchPickerItem.vue","mod::vue/node_modules/reka-ui/src/ColorSwatchPicker/ColorSwatchPickerItemIndicator.vue","mod::vue/node_modules/reka-ui/src/ColorSwatchPicker/ColorSwatchPickerItemIndicator.vue","mod::vue/node_modules/reka-ui/src/ColorSwatchPicker/ColorSwatchPickerItemSwatch.vue","mod::vue/node_modules/reka-ui/src/ColorSwatchPicker/ColorSwatchPickerItemSwatch.vue","mod::vue/node_modules/reka-ui/src/ColorSwatchPicker/ColorSwatchPickerRoot.vue","mod::vue/node_modules/reka-ui/src/ColorSwatchPicker/ColorSwatchPickerRoot.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuAnchor.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuAnchor.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuArrow.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuArrow.vue","mod::vue/node_modules/reka-ui/src/shared/useIsUsingKeyboard.ts","mod::vue/node_modules/reka-ui/src/Menu/MenuRoot.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuRoot.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuContentImpl.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuContentImpl.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuItemImpl.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuItemImpl.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuItem.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuItem.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuItemIndicator.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuItemIndicator.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuCheckboxItem.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuCheckboxItem.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuRootContentModal.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuRootContentModal.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuRootContentNonModal.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuRootContentNonModal.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuContent.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuContent.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuGroup.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuGroup.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuLabel.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuLabel.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuPortal.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuPortal.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuRadioGroup.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuRadioGroup.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuRadioItem.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuRadioItem.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuSeparator.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuSeparator.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuSub.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuSub.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuSubContent.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuSubContent.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuSubTrigger.vue","mod::vue/node_modules/reka-ui/src/Menu/MenuSubTrigger.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuArrow.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuArrow.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuCheckboxItem.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuCheckboxItem.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuRoot.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuRoot.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuContent.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuContent.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuGroup.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuGroup.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuItem.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuItem.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuItemIndicator.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuItemIndicator.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuLabel.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuLabel.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuPortal.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuPortal.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuRadioGroup.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuRadioGroup.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuRadioItem.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuRadioItem.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuSeparator.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuSeparator.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuSub.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuSub.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuSubContent.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuSubContent.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuSubTrigger.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuSubTrigger.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/utils.ts","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuTrigger.vue","mod::vue/node_modules/reka-ui/src/ContextMenu/ContextMenuTrigger.vue","mod::vue/node_modules/reka-ui/src/DateField/DateFieldRoot.vue","mod::vue/node_modules/reka-ui/src/DateField/DateFieldRoot.vue","mod::vue/node_modules/reka-ui/src/DateField/DateFieldInput.vue","mod::vue/node_modules/reka-ui/src/DateField/DateFieldInput.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverRoot.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverRoot.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverAnchor.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverAnchor.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerAnchor.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerAnchor.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverArrow.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverArrow.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerArrow.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerArrow.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerRoot.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerRoot.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerCalendar.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerCalendar.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerCell.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerCell.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerCellTrigger.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerCellTrigger.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverClose.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverClose.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerClose.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerClose.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverContentImpl.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverContentImpl.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverContentModal.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverContentModal.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverContentNonModal.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverContentNonModal.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverContent.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverContent.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverPortal.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverPortal.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerContent.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerContent.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerField.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerField.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerGrid.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerGrid.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerGridBody.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerGridBody.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerGridHead.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerGridHead.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerGridRow.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerGridRow.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerHeadCell.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerHeadCell.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerHeader.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerHeader.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerHeading.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerHeading.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerInput.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerInput.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerNext.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerNext.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerPrev.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerPrev.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverTrigger.vue","mod::vue/node_modules/reka-ui/src/Popover/PopoverTrigger.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerTrigger.vue","mod::vue/node_modules/reka-ui/src/DatePicker/DatePickerTrigger.vue","mod::vue/node_modules/reka-ui/src/DateRangeField/DateRangeFieldRoot.vue","mod::vue/node_modules/reka-ui/src/DateRangeField/DateRangeFieldRoot.vue","mod::vue/node_modules/reka-ui/src/DateRangeField/DateRangeFieldInput.vue","mod::vue/node_modules/reka-ui/src/DateRangeField/DateRangeFieldInput.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerAnchor.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerAnchor.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerArrow.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerArrow.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerRoot.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerRoot.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/useRangeCalendar.ts","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarRoot.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarRoot.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerCalendar.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerCalendar.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarCell.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarCell.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerCell.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerCell.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarCellTrigger.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarCellTrigger.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerCellTrigger.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerCellTrigger.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerClose.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerClose.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerContent.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerContent.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerField.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerField.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarGrid.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarGrid.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerGrid.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerGrid.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarGridBody.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarGridBody.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerGridBody.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerGridBody.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarGridHead.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarGridHead.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerGridHead.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerGridHead.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarGridRow.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarGridRow.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerGridRow.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerGridRow.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarHeadCell.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarHeadCell.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerHeadCell.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerHeadCell.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarHeader.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarHeader.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerHeader.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerHeader.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarHeading.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarHeading.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerHeading.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerHeading.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerInput.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerInput.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarNext.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarNext.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerNext.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerNext.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarPrev.vue","mod::vue/node_modules/reka-ui/src/RangeCalendar/RangeCalendarPrev.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerPrev.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerPrev.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerTrigger.vue","mod::vue/node_modules/reka-ui/src/DateRangePicker/DateRangePickerTrigger.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuArrow.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuArrow.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuCheckboxItem.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuCheckboxItem.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuRoot.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuRoot.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuContent.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuContent.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuFilter.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuFilter.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuGroup.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuGroup.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuItem.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuItem.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuItemIndicator.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuItemIndicator.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuLabel.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuLabel.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuPortal.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuPortal.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuRadioGroup.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuRadioGroup.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuRadioItem.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuRadioItem.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuSeparator.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuSeparator.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuSub.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuSub.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuSubContent.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuSubContent.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuSubTrigger.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuSubTrigger.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuTrigger.vue","mod::vue/node_modules/reka-ui/src/DropdownMenu/DropdownMenuTrigger.vue","mod::vue/node_modules/reka-ui/src/Editable/EditableRoot.vue","mod::vue/node_modules/reka-ui/src/Editable/EditableRoot.vue","mod::vue/node_modules/reka-ui/src/Editable/EditableArea.vue","mod::vue/node_modules/reka-ui/src/Editable/EditableArea.vue","mod::vue/node_modules/reka-ui/src/Editable/EditableCancelTrigger.vue","mod::vue/node_modules/reka-ui/src/Editable/EditableCancelTrigger.vue","mod::vue/node_modules/reka-ui/src/Editable/EditableEditTrigger.vue","mod::vue/node_modules/reka-ui/src/Editable/EditableEditTrigger.vue","mod::vue/node_modules/reka-ui/src/Editable/EditableInput.vue","mod::vue/node_modules/reka-ui/src/Editable/EditableInput.vue","mod::vue/node_modules/reka-ui/src/Editable/EditablePreview.vue","mod::vue/node_modules/reka-ui/src/Editable/EditablePreview.vue","mod::vue/node_modules/reka-ui/src/Editable/EditableSubmitTrigger.vue","mod::vue/node_modules/reka-ui/src/Editable/EditableSubmitTrigger.vue","mod::vue/node_modules/reka-ui/src/HoverCard/HoverCardArrow.vue","mod::vue/node_modules/reka-ui/src/HoverCard/HoverCardArrow.vue","mod::vue/node_modules/reka-ui/src/HoverCard/HoverCardRoot.vue","mod::vue/node_modules/reka-ui/src/HoverCard/HoverCardRoot.vue","mod::vue/node_modules/reka-ui/src/HoverCard/utils.ts","mod::vue/node_modules/reka-ui/src/HoverCard/HoverCardContentImpl.vue","mod::vue/node_modules/reka-ui/src/HoverCard/HoverCardContentImpl.vue","mod::vue/node_modules/reka-ui/src/HoverCard/HoverCardContent.vue","mod::vue/node_modules/reka-ui/src/HoverCard/HoverCardContent.vue","mod::vue/node_modules/reka-ui/src/HoverCard/HoverCardPortal.vue","mod::vue/node_modules/reka-ui/src/HoverCard/HoverCardPortal.vue","mod::vue/node_modules/reka-ui/src/HoverCard/HoverCardTrigger.vue","mod::vue/node_modules/reka-ui/src/HoverCard/HoverCardTrigger.vue","mod::vue/node_modules/reka-ui/src/Label/Label.vue","mod::vue/node_modules/reka-ui/src/Label/Label.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarArrow.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarArrow.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarCheckboxItem.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarCheckboxItem.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarRoot.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarRoot.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarMenu.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarMenu.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarContent.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarContent.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarGroup.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarGroup.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarItem.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarItem.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarItemIndicator.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarItemIndicator.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarLabel.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarLabel.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarPortal.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarPortal.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarRadioGroup.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarRadioGroup.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarRadioItem.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarRadioItem.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarSeparator.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarSeparator.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarSub.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarSub.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarSubContent.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarSubContent.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarSubTrigger.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarSubTrigger.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarTrigger.vue","mod::vue/node_modules/reka-ui/src/Menubar/MenubarTrigger.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/useMonthPicker.ts","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerRoot.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerRoot.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerCell.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerCell.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerCellTrigger.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerCellTrigger.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerGrid.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerGrid.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerGridBody.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerGridBody.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerGridRow.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerGridRow.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerHeader.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerHeader.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerHeading.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerHeading.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerNext.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerNext.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerPrev.vue","mod::vue/node_modules/reka-ui/src/MonthPicker/MonthPickerPrev.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/useRangeMonthPicker.ts","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerRoot.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerRoot.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerCell.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerCell.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerCellTrigger.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerCellTrigger.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerGrid.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerGrid.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerGridBody.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerGridBody.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerGridRow.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerGridRow.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerHeader.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerHeader.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerHeading.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerHeading.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerNext.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerNext.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerPrev.vue","mod::vue/node_modules/reka-ui/src/MonthRangePicker/MonthRangePickerPrev.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/utils.ts","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuRoot.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuRoot.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuItem.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuItem.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuContentImpl.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuContentImpl.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuContent.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuContent.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuIndicator.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuIndicator.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuLink.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuLink.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuList.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuList.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuSub.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuSub.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuTrigger.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuTrigger.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuViewport.vue","mod::vue/node_modules/reka-ui/src/NavigationMenu/NavigationMenuViewport.vue","mod::vue/node_modules/@internationalized/number/dist/private/packages/@internationalized/number/src/NumberFormatter.ts","mod::vue/node_modules/@internationalized/number/dist/private/packages/@internationalized/number/src/NumberParser.ts","mod::vue/node_modules/reka-ui/src/NumberField/utils.ts","mod::vue/node_modules/reka-ui/src/NumberField/NumberFieldRoot.vue","mod::vue/node_modules/reka-ui/src/NumberField/NumberFieldRoot.vue","mod::vue/node_modules/reka-ui/src/NumberField/NumberFieldDecrement.vue","mod::vue/node_modules/reka-ui/src/NumberField/NumberFieldDecrement.vue","mod::vue/node_modules/reka-ui/src/NumberField/NumberFieldIncrement.vue","mod::vue/node_modules/reka-ui/src/NumberField/NumberFieldIncrement.vue","mod::vue/node_modules/reka-ui/src/NumberField/NumberFieldInput.vue","mod::vue/node_modules/reka-ui/src/NumberField/NumberFieldInput.vue","mod::vue/node_modules/reka-ui/src/Pagination/PaginationEllipsis.vue","mod::vue/node_modules/reka-ui/src/Pagination/PaginationEllipsis.vue","mod::vue/node_modules/reka-ui/src/Pagination/PaginationRoot.vue","mod::vue/node_modules/reka-ui/src/Pagination/PaginationRoot.vue","mod::vue/node_modules/reka-ui/src/Pagination/PaginationFirst.vue","mod::vue/node_modules/reka-ui/src/Pagination/PaginationFirst.vue","mod::vue/node_modules/reka-ui/src/Pagination/PaginationLast.vue","mod::vue/node_modules/reka-ui/src/Pagination/PaginationLast.vue","mod::vue/node_modules/reka-ui/src/Pagination/utils.ts","mod::vue/node_modules/reka-ui/src/Pagination/PaginationList.vue","mod::vue/node_modules/reka-ui/src/Pagination/PaginationList.vue","mod::vue/node_modules/reka-ui/src/Pagination/PaginationListItem.vue","mod::vue/node_modules/reka-ui/src/Pagination/PaginationListItem.vue","mod::vue/node_modules/reka-ui/src/Pagination/PaginationNext.vue","mod::vue/node_modules/reka-ui/src/Pagination/PaginationNext.vue","mod::vue/node_modules/reka-ui/src/Pagination/PaginationPrev.vue","mod::vue/node_modules/reka-ui/src/Pagination/PaginationPrev.vue","mod::vue/node_modules/reka-ui/src/PinInput/PinInputRoot.vue","mod::vue/node_modules/reka-ui/src/PinInput/PinInputRoot.vue","mod::vue/node_modules/reka-ui/src/PinInput/PinInputInput.vue","mod::vue/node_modules/reka-ui/src/PinInput/PinInputInput.vue","mod::vue/node_modules/reka-ui/src/Progress/ProgressRoot.vue","mod::vue/node_modules/reka-ui/src/Progress/ProgressRoot.vue","mod::vue/node_modules/reka-ui/src/Progress/ProgressIndicator.vue","mod::vue/node_modules/reka-ui/src/Progress/ProgressIndicator.vue","mod::vue/node_modules/reka-ui/src/RadioGroup/utils.ts","mod::vue/node_modules/reka-ui/src/RadioGroup/Radio.vue","mod::vue/node_modules/reka-ui/src/RadioGroup/Radio.vue","mod::vue/node_modules/reka-ui/src/RadioGroup/RadioGroupRoot.vue","mod::vue/node_modules/reka-ui/src/RadioGroup/RadioGroupRoot.vue","mod::vue/node_modules/reka-ui/src/RadioGroup/RadioGroupItem.vue","mod::vue/node_modules/reka-ui/src/RadioGroup/RadioGroupItem.vue","mod::vue/node_modules/reka-ui/src/RadioGroup/RadioGroupIndicator.vue","mod::vue/node_modules/reka-ui/src/RadioGroup/RadioGroupIndicator.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaRoot.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaRoot.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaCornerImpl.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaCornerImpl.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaCorner.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaCorner.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/utils.ts","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbarX.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbarX.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbarY.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbarY.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbarAuto.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbarAuto.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbarGlimpse.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbarGlimpse.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbarHover.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbarHover.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbarScroll.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbarScroll.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbar.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbar.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbarVisible.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbarVisible.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbarImpl.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaScrollbarImpl.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaThumb.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaThumb.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaViewport.vue","mod::vue/node_modules/reka-ui/src/ScrollArea/ScrollAreaViewport.vue","mod::vue/node_modules/reka-ui/src/Select/utils.ts","mod::vue/node_modules/reka-ui/src/Select/SelectRoot.vue","mod::vue/node_modules/reka-ui/src/Select/SelectRoot.vue","mod::vue/node_modules/reka-ui/src/Select/BubbleSelect.vue","mod::vue/node_modules/reka-ui/src/Select/BubbleSelect.vue","mod::vue/node_modules/reka-ui/src/Select/SelectPopperPosition.vue","mod::vue/node_modules/reka-ui/src/Select/SelectPopperPosition.vue","mod::vue/node_modules/reka-ui/src/Select/SelectContentImpl.vue","mod::vue/node_modules/reka-ui/src/Select/SelectContentImpl.vue","mod::vue/node_modules/reka-ui/src/Select/SelectItemAlignedPosition.vue","mod::vue/node_modules/reka-ui/src/Select/SelectItemAlignedPosition.vue","mod::vue/node_modules/reka-ui/src/Select/SelectArrow.vue","mod::vue/node_modules/reka-ui/src/Select/SelectArrow.vue","mod::vue/node_modules/reka-ui/src/Select/SelectProvider.vue","mod::vue/node_modules/reka-ui/src/Select/SelectProvider.vue","mod::vue/node_modules/reka-ui/src/Select/SelectContent.vue","mod::vue/node_modules/reka-ui/src/Select/SelectContent.vue","mod::vue/node_modules/reka-ui/src/Select/SelectGroup.vue","mod::vue/node_modules/reka-ui/src/Select/SelectGroup.vue","mod::vue/node_modules/reka-ui/src/Select/SelectIcon.vue","mod::vue/node_modules/reka-ui/src/Select/SelectIcon.vue","mod::vue/node_modules/reka-ui/src/Select/SelectItem.vue","mod::vue/node_modules/reka-ui/src/Select/SelectItem.vue","mod::vue/node_modules/reka-ui/src/Select/SelectItemIndicator.vue","mod::vue/node_modules/reka-ui/src/Select/SelectItemIndicator.vue","mod::vue/node_modules/reka-ui/src/Select/SelectItemText.vue","mod::vue/node_modules/reka-ui/src/Select/SelectItemText.vue","mod::vue/node_modules/reka-ui/src/Select/SelectLabel.vue","mod::vue/node_modules/reka-ui/src/Select/SelectLabel.vue","mod::vue/node_modules/reka-ui/src/Select/SelectPortal.vue","mod::vue/node_modules/reka-ui/src/Select/SelectPortal.vue","mod::vue/node_modules/reka-ui/src/Select/SelectScrollButtonImpl.vue","mod::vue/node_modules/reka-ui/src/Select/SelectScrollButtonImpl.vue","mod::vue/node_modules/reka-ui/src/Select/SelectScrollDownButton.vue","mod::vue/node_modules/reka-ui/src/Select/SelectScrollDownButton.vue","mod::vue/node_modules/reka-ui/src/Select/SelectScrollUpButton.vue","mod::vue/node_modules/reka-ui/src/Select/SelectScrollUpButton.vue","mod::vue/node_modules/reka-ui/src/Select/SelectSeparator.vue","mod::vue/node_modules/reka-ui/src/Select/SelectSeparator.vue","mod::vue/node_modules/reka-ui/src/Select/SelectTrigger.vue","mod::vue/node_modules/reka-ui/src/Select/SelectTrigger.vue","mod::vue/node_modules/reka-ui/src/Select/SelectValue.vue","mod::vue/node_modules/reka-ui/src/Select/SelectValue.vue","mod::vue/node_modules/reka-ui/src/Select/SelectViewport.vue","mod::vue/node_modules/reka-ui/src/Select/SelectViewport.vue","mod::vue/node_modules/reka-ui/src/shared/component/BaseSeparator.vue","mod::vue/node_modules/reka-ui/src/shared/component/BaseSeparator.vue","mod::vue/node_modules/reka-ui/src/Separator/Separator.vue","mod::vue/node_modules/reka-ui/src/Separator/Separator.vue","mod::vue/node_modules/reka-ui/src/Splitter/utils/assert.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/dom.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/events.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/calculate.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/compare.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/callPanelCallbacks.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/debounce.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/resizePanel.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/layout.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/pivot.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/rects.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/stackingOrder.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/registry.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/style.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/units.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/validation.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/composables/useWindowSplitterPanelGroupBehavior.ts","mod::vue/node_modules/reka-ui/src/Splitter/utils/storage.ts","mod::vue/node_modules/reka-ui/src/Splitter/SplitterGroup.vue","mod::vue/node_modules/reka-ui/src/Splitter/SplitterGroup.vue","mod::vue/node_modules/reka-ui/src/Splitter/SplitterPanel.vue","mod::vue/node_modules/reka-ui/src/Splitter/SplitterPanel.vue","mod::vue/node_modules/reka-ui/src/Splitter/utils/composables/useWindowSplitterBehavior.ts","mod::vue/node_modules/reka-ui/src/Splitter/SplitterResizeHandle.vue","mod::vue/node_modules/reka-ui/src/Splitter/SplitterResizeHandle.vue","mod::vue/node_modules/reka-ui/src/Stepper/StepperRoot.vue","mod::vue/node_modules/reka-ui/src/Stepper/StepperRoot.vue","mod::vue/node_modules/reka-ui/src/Stepper/StepperItem.vue","mod::vue/node_modules/reka-ui/src/Stepper/StepperItem.vue","mod::vue/node_modules/reka-ui/src/Stepper/StepperDescription.vue","mod::vue/node_modules/reka-ui/src/Stepper/StepperDescription.vue","mod::vue/node_modules/reka-ui/src/Stepper/StepperIndicator.vue","mod::vue/node_modules/reka-ui/src/Stepper/StepperIndicator.vue","mod::vue/node_modules/reka-ui/src/Stepper/StepperSeparator.vue","mod::vue/node_modules/reka-ui/src/Stepper/StepperSeparator.vue","mod::vue/node_modules/reka-ui/src/Stepper/StepperTitle.vue","mod::vue/node_modules/reka-ui/src/Stepper/StepperTitle.vue","mod::vue/node_modules/reka-ui/src/Stepper/StepperTrigger.vue","mod::vue/node_modules/reka-ui/src/Stepper/StepperTrigger.vue","mod::vue/node_modules/reka-ui/src/Switch/SwitchRoot.vue","mod::vue/node_modules/reka-ui/src/Switch/SwitchRoot.vue","mod::vue/node_modules/reka-ui/src/Switch/SwitchThumb.vue","mod::vue/node_modules/reka-ui/src/Switch/SwitchThumb.vue","mod::vue/node_modules/reka-ui/src/Tabs/TabsRoot.vue","mod::vue/node_modules/reka-ui/src/Tabs/TabsRoot.vue","mod::vue/node_modules/reka-ui/src/Tabs/utils.ts","mod::vue/node_modules/reka-ui/src/Tabs/TabsContent.vue","mod::vue/node_modules/reka-ui/src/Tabs/TabsContent.vue","mod::vue/node_modules/reka-ui/src/Tabs/TabsIndicator.vue","mod::vue/node_modules/reka-ui/src/Tabs/TabsIndicator.vue","mod::vue/node_modules/reka-ui/src/Tabs/TabsList.vue","mod::vue/node_modules/reka-ui/src/Tabs/TabsList.vue","mod::vue/node_modules/reka-ui/src/Tabs/TabsTrigger.vue","mod::vue/node_modules/reka-ui/src/Tabs/TabsTrigger.vue","mod::vue/node_modules/reka-ui/src/TagsInput/TagsInputRoot.vue","mod::vue/node_modules/reka-ui/src/TagsInput/TagsInputRoot.vue","mod::vue/node_modules/reka-ui/src/TagsInput/TagsInputClear.vue","mod::vue/node_modules/reka-ui/src/TagsInput/TagsInputClear.vue","mod::vue/node_modules/reka-ui/src/TagsInput/TagsInputInput.vue","mod::vue/node_modules/reka-ui/src/TagsInput/TagsInputInput.vue","mod::vue/node_modules/reka-ui/src/TagsInput/TagsInputItem.vue","mod::vue/node_modules/reka-ui/src/TagsInput/TagsInputItem.vue","mod::vue/node_modules/reka-ui/src/TagsInput/TagsInputItemDelete.vue","mod::vue/node_modules/reka-ui/src/TagsInput/TagsInputItemDelete.vue","mod::vue/node_modules/reka-ui/src/TagsInput/TagsInputItemText.vue","mod::vue/node_modules/reka-ui/src/TagsInput/TagsInputItemText.vue","mod::vue/node_modules/reka-ui/src/TimeField/TimeFieldRoot.vue","mod::vue/node_modules/reka-ui/src/TimeField/TimeFieldRoot.vue","mod::vue/node_modules/reka-ui/src/TimeField/TimeFieldInput.vue","mod::vue/node_modules/reka-ui/src/TimeField/TimeFieldInput.vue","mod::vue/node_modules/reka-ui/src/TimeRangeField/TimeRangeFieldRoot.vue","mod::vue/node_modules/reka-ui/src/TimeRangeField/TimeRangeFieldRoot.vue","mod::vue/node_modules/reka-ui/src/TimeRangeField/TimeRangeFieldInput.vue","mod::vue/node_modules/reka-ui/src/TimeRangeField/TimeRangeFieldInput.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastAnnounceExclude.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastAnnounceExclude.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastProvider.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastProvider.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastAnnounce.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastAnnounce.vue","mod::vue/node_modules/reka-ui/src/Toast/utils.ts","mod::vue/node_modules/reka-ui/src/Toast/ToastRootImpl.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastRootImpl.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastClose.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastClose.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastAction.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastAction.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastDescription.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastDescription.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastPortal.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastPortal.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastRoot.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastRoot.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastTitle.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastTitle.vue","mod::vue/node_modules/reka-ui/src/Toast/FocusProxy.vue","mod::vue/node_modules/reka-ui/src/Toast/FocusProxy.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastViewport.vue","mod::vue/node_modules/reka-ui/src/Toast/ToastViewport.vue","mod::vue/node_modules/reka-ui/src/ToggleGroup/ToggleGroupRoot.vue","mod::vue/node_modules/reka-ui/src/ToggleGroup/ToggleGroupRoot.vue","mod::vue/node_modules/reka-ui/src/Toggle/Toggle.vue","mod::vue/node_modules/reka-ui/src/Toggle/Toggle.vue","mod::vue/node_modules/reka-ui/src/ToggleGroup/ToggleGroupItem.vue","mod::vue/node_modules/reka-ui/src/ToggleGroup/ToggleGroupItem.vue","mod::vue/node_modules/reka-ui/src/Toolbar/ToolbarButton.vue","mod::vue/node_modules/reka-ui/src/Toolbar/ToolbarButton.vue","mod::vue/node_modules/reka-ui/src/Toolbar/ToolbarLink.vue","mod::vue/node_modules/reka-ui/src/Toolbar/ToolbarLink.vue","mod::vue/node_modules/reka-ui/src/Toolbar/ToolbarRoot.vue","mod::vue/node_modules/reka-ui/src/Toolbar/ToolbarRoot.vue","mod::vue/node_modules/reka-ui/src/Toolbar/ToolbarSeparator.vue","mod::vue/node_modules/reka-ui/src/Toolbar/ToolbarSeparator.vue","mod::vue/node_modules/reka-ui/src/Toolbar/ToolbarToggleGroup.vue","mod::vue/node_modules/reka-ui/src/Toolbar/ToolbarToggleGroup.vue","mod::vue/node_modules/reka-ui/src/Toolbar/ToolbarToggleItem.vue","mod::vue/node_modules/reka-ui/src/Toolbar/ToolbarToggleItem.vue","mod::vue/node_modules/reka-ui/src/Tooltip/TooltipArrow.vue","mod::vue/node_modules/reka-ui/src/Tooltip/TooltipArrow.vue","mod::vue/node_modules/reka-ui/src/Tooltip/TooltipProvider.vue","mod::vue/node_modules/reka-ui/src/Tooltip/TooltipProvider.vue","mod::vue/node_modules/reka-ui/src/Tooltip/utils.ts","mod::vue/node_modules/reka-ui/src/Tooltip/TooltipRoot.vue","mod::vue/node_modules/reka-ui/src/Tooltip/TooltipRoot.vue","mod::vue/node_modules/reka-ui/src/Tooltip/TooltipContentImpl.vue","mod::vue/node_modules/reka-ui/src/Tooltip/TooltipContentImpl.vue","mod::vue/node_modules/reka-ui/src/Tooltip/TooltipContentHoverable.vue","mod::vue/node_modules/reka-ui/src/Tooltip/TooltipContentHoverable.vue","mod::vue/node_modules/reka-ui/src/Tooltip/TooltipContent.vue","mod::vue/node_modules/reka-ui/src/Tooltip/TooltipContent.vue","mod::vue/node_modules/reka-ui/src/Tooltip/TooltipPortal.vue","mod::vue/node_modules/reka-ui/src/Tooltip/TooltipPortal.vue","mod::vue/node_modules/reka-ui/src/Tooltip/TooltipTrigger.vue","mod::vue/node_modules/reka-ui/src/Tooltip/TooltipTrigger.vue","mod::vue/node_modules/reka-ui/src/Tree/utils.ts","mod::vue/node_modules/reka-ui/src/Tree/TreeRoot.vue","mod::vue/node_modules/reka-ui/src/Tree/TreeRoot.vue","mod::vue/node_modules/reka-ui/src/Tree/TreeItem.vue","mod::vue/node_modules/reka-ui/src/Tree/TreeItem.vue","mod::vue/node_modules/reka-ui/src/Tree/TreeVirtualizer.vue","mod::vue/node_modules/reka-ui/src/Tree/TreeVirtualizer.vue","mod::vue/node_modules/reka-ui/src/Viewport/Viewport.vue","mod::vue/node_modules/reka-ui/src/Viewport/Viewport.vue","mod::vue/node_modules/reka-ui/src/YearPicker/useYearPicker.ts","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerRoot.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerRoot.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerCell.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerCell.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerCellTrigger.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerCellTrigger.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerGrid.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerGrid.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerGridBody.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerGridBody.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerGridRow.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerGridRow.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerHeader.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerHeader.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerHeading.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerHeading.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerNext.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerNext.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerPrev.vue","mod::vue/node_modules/reka-ui/src/YearPicker/YearPickerPrev.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/useRangeYearPicker.ts","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerRoot.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerRoot.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerCell.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerCell.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerCellTrigger.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerCellTrigger.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerGrid.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerGrid.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerGridBody.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerGridBody.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerGridRow.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerGridRow.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerHeader.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerHeader.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerHeading.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerHeading.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerNext.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerNext.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerPrev.vue","mod::vue/node_modules/reka-ui/src/YearRangePicker/YearRangePickerPrev.vue","mod::vue/node_modules/reka-ui/dist/index2.cjs","mod::vue/node_modules/reka-ui/dist/index.cjs","mod::vue/node_modules/leaflet/src/core/Util.js","mod::vue/node_modules/leaflet/src/core/Class.js","mod::vue/node_modules/leaflet/src/core/Events.js","mod::vue/node_modules/leaflet/src/geometry/Point.js","mod::vue/node_modules/leaflet/src/geometry/Bounds.js","mod::vue/node_modules/leaflet/src/geo/LatLngBounds.js","mod::vue/node_modules/leaflet/src/geo/LatLng.js","mod::vue/node_modules/leaflet/src/geo/crs/CRS.js","mod::vue/node_modules/leaflet/src/geo/crs/CRS.Earth.js","mod::vue/node_modules/leaflet/src/geo/projection/Projection.SphericalMercator.js","mod::vue/node_modules/leaflet/src/geometry/Transformation.js","mod::vue/node_modules/leaflet/src/geo/crs/CRS.EPSG3857.js","mod::vue/node_modules/leaflet/src/layer/vector/SVG.Util.js","mod::vue/node_modules/leaflet/src/core/Browser.js","mod::vue/node_modules/leaflet/src/dom/DomEvent.Pointer.js","mod::vue/node_modules/leaflet/src/dom/DomEvent.DoubleTap.js","mod::vue/node_modules/leaflet/src/dom/DomUtil.js","mod::vue/node_modules/leaflet/src/dom/DomEvent.js","mod::vue/node_modules/leaflet/src/dom/PosAnimation.js","mod::vue/node_modules/leaflet/src/map/Map.js","mod::vue/node_modules/leaflet/src/control/Control.js","mod::vue/node_modules/leaflet/src/control/Control.Layers.js","mod::vue/node_modules/leaflet/src/control/Control.Zoom.js","mod::vue/node_modules/leaflet/src/control/Control.Scale.js","mod::vue/node_modules/leaflet/src/control/Control.Attribution.js","mod::vue/node_modules/leaflet/src/control/index.js","mod::vue/node_modules/leaflet/src/core/Handler.js","mod::vue/node_modules/leaflet/src/core/index.js","mod::vue/node_modules/leaflet/src/dom/Draggable.js","mod::vue/node_modules/leaflet/src/geometry/PolyUtil.js","mod::vue/node_modules/leaflet/src/geometry/LineUtil.js","mod::vue/node_modules/leaflet/src/geo/projection/Projection.LonLat.js","mod::vue/node_modules/leaflet/src/geo/projection/Projection.Mercator.js","mod::vue/node_modules/leaflet/src/geo/projection/index.js","mod::vue/node_modules/leaflet/src/geo/crs/CRS.EPSG3395.js","mod::vue/node_modules/leaflet/src/geo/crs/CRS.EPSG4326.js","mod::vue/node_modules/leaflet/src/geo/crs/CRS.Simple.js","mod::vue/node_modules/leaflet/src/geo/crs/index.js","mod::vue/node_modules/leaflet/src/layer/Layer.js","mod::vue/node_modules/leaflet/src/layer/LayerGroup.js","mod::vue/node_modules/leaflet/src/layer/FeatureGroup.js","mod::vue/node_modules/leaflet/src/layer/marker/Icon.js","mod::vue/node_modules/leaflet/src/layer/marker/Icon.Default.js","mod::vue/node_modules/leaflet/src/layer/marker/Marker.Drag.js","mod::vue/node_modules/leaflet/src/layer/marker/Marker.js","mod::vue/node_modules/leaflet/src/layer/vector/Path.js","mod::vue/node_modules/leaflet/src/layer/vector/CircleMarker.js","mod::vue/node_modules/leaflet/src/layer/vector/Circle.js","mod::vue/node_modules/leaflet/src/layer/vector/Polyline.js","mod::vue/node_modules/leaflet/src/layer/vector/Polygon.js","mod::vue/node_modules/leaflet/src/layer/GeoJSON.js","mod::vue/node_modules/leaflet/src/layer/ImageOverlay.js","mod::vue/node_modules/leaflet/src/layer/VideoOverlay.js","mod::vue/node_modules/leaflet/src/layer/SVGOverlay.js","mod::vue/node_modules/leaflet/src/layer/DivOverlay.js","mod::vue/node_modules/leaflet/src/layer/Popup.js","mod::vue/node_modules/leaflet/src/layer/Tooltip.js","mod::vue/node_modules/leaflet/src/layer/marker/DivIcon.js","mod::vue/node_modules/leaflet/src/layer/marker/index.js","mod::vue/node_modules/leaflet/src/layer/tile/GridLayer.js","mod::vue/node_modules/leaflet/src/layer/tile/TileLayer.js","mod::vue/node_modules/leaflet/src/layer/tile/TileLayer.WMS.js","mod::vue/node_modules/leaflet/src/layer/tile/index.js","mod::vue/node_modules/leaflet/src/layer/vector/Renderer.js","mod::vue/node_modules/leaflet/src/layer/vector/Canvas.js","mod::vue/node_modules/leaflet/src/layer/vector/SVG.VML.js","mod::vue/node_modules/leaflet/src/layer/vector/SVG.js","mod::vue/node_modules/leaflet/src/layer/vector/Renderer.getRenderer.js","mod::vue/node_modules/leaflet/src/layer/vector/Rectangle.js","mod::vue/node_modules/leaflet/src/layer/vector/index.js","mod::vue/node_modules/leaflet/src/layer/index.js","mod::vue/node_modules/leaflet/src/map/handler/Map.BoxZoom.js","mod::vue/node_modules/leaflet/src/map/handler/Map.DoubleClickZoom.js","mod::vue/node_modules/leaflet/src/map/handler/Map.Drag.js","mod::vue/node_modules/leaflet/src/map/handler/Map.Keyboard.js","mod::vue/node_modules/leaflet/src/map/handler/Map.ScrollWheelZoom.js","mod::vue/node_modules/leaflet/src/map/handler/Map.TapHold.js","mod::vue/node_modules/leaflet/src/map/handler/Map.TouchZoom.js","mod::vue/node_modules/leaflet/src/map/index.js","@webhare/env/src/envbackend.ts","@webhare/env/src/init-browser.ts","@webhare/dompack/src/tree.ts","@webhare/std/src/quacks.ts","@webhare/std/src/finmath.ts","@webhare/std/src/money.ts","@webhare/std/src/types.ts","@webhare/std/src/strings.ts","@webhare/std/src/collections.ts","@webhare/std/src/localmutex.ts","@webhare/frontend/src/init.ts","@webhare/tsrun/src/polyfills.ts","mod::publisher/js/internal/polyfills/iterator-helpers.ts","@webhare/env/src/navigation.ts","@webhare/env/src/whglobal.ts","mod::system/js/dompack/src/events.ts","@webhare/dompack/src/busy.ts","mod::system/js/dompack/src/tree.ts","mod::system/js/dompack/src/components.ts","@webhare/dompack/src/storage.ts","@webhare/dompack/src/browser.ts","mod::publisher/js/internal/polyfills/publisher-integration.ts","mod::statiegeldnl/webdesigns/admin/frontend/frontend.ts","node_modules/stacktrace-parser/dist/stack-trace-parser.esm.js","@webhare/js-api-tools/src/stacktracing.ts","@webhare/jsonrpc-client/src/jsonrpc-client.ts","@webhare/rpc/src/rpc.ts","@webhare/auth/src/shared.ts","@webhare/frontend/src/auth.ts","@webhare/frontend/src/gtm.ts","@webhare/frontend/src/frontend.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/App.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/AppShell.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/ShellHeader.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/icons/Icon.vue","mod::statiegeldnl/webdesigns/admin/frontend/components/icons/icon-data.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/icons/Icon.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/icons/Icon.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/useTheme.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/NotificationBell.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Popover.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Popover.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/Popover.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/relative-time.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/shell-signals.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/settings-sections.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/NotificationBell.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/shell/NotificationBell.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/ShellHeader.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/shell/ShellHeader.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/Sidebar.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/nav.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/icon-names.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/Sidebar.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/shell/Sidebar.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/environment.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/StatusBar.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/StatusBar.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/shell/StatusBar.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/TabStrip.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/tab-strip.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/tab-strip-store.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/shell-chrome.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/breadcrumb-trail.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/TabStrip.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/shell/TabStrip.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/use-shell-signals.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/api.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/use-bulk-runner.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/analysis-queue.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/bulk-regions.ts","mod::statiegeldnl/js/photo-status.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/run-analysis.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/AppShell.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/shell/AppShell.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LoginView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginShader.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginShader.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/login/LoginShader.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginBrand.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/login/LoginBrand.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginCodeInput.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginCodeInput.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/login/LoginCodeInput.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Dialog.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Dialog.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/Dialog.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Button.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/Button.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/login.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LoginView.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/views/LoginView.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/useWrdAuthState.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/App.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/App.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/router.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LocationsView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationFilters.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/ContentSwitcher.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/ContentSwitcher.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/ContentSwitcher.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Select.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Select.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/Select.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationFilters.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/locations/LocationFilters.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationMobileList.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/location-type.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/rating.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/StatusGlyph.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/StatusGlyph.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/StatusGlyph.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationMobileList.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/locations/LocationMobileList.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/location-pages.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/AddLocationDialog.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/add-location.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Input.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Input.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/Input.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/AddLocationDialog.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/locations/AddLocationDialog.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/use-breakpoint.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/breakpoint.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Badge.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/Badge.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/EmptyState.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/EmptyState.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/PaginationBar.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/PaginationBar.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/PaginationBar.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/ScoreBar.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/ScoreBar.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/ScoreBar.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/SortCaret.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/SortCaret.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/copy-location-ids.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/locations-sort.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LocationsView.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/views/LocationsView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LocationDetailView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationAnalysisSummary.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/analyses-format.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/analysis-detail.ts","mod::statiegeldnl/profiles/snl-inzamelpunten/scoring-markers.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/analysis-scoring.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/location-analysis-summary.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationAnalysisSummary.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/locations/LocationAnalysisSummary.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/PageBody.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/shell/PageBody.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Panel.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/Panel.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/MetaBar.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/MetaBar.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/PageTabs.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/PageTabs.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/PageTabs.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Checkbox.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Checkbox.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/Checkbox.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Textarea.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Textarea.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/Textarea.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationImageTabs.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/location-images.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationImageTabs.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/locations/LocationImageTabs.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationFeedbackList.vue","mod::statiegeldnl/js/feedback-export.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/feedback-table.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationFeedbackList.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/locations/LocationFeedbackList.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/RetrievableFeedbackPreview.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/retrieved-feedback.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/RetrievableFeedbackPreview.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/locations/RetrievableFeedbackPreview.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/RunAnalysisDialog.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/RunAnalysisDialog.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/analyses/RunAnalysisDialog.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/CadastralMap.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/location-detail.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/cadastral-map.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/CadastralMap.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/CadastralMap.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/SbiCodesDisplay.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/sbi-codes.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/sbi.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/SbiCodesDisplay.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/SbiCodesDisplay.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/use-location-detail.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/maps.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/tab-url.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LocationDetailView.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/views/LocationDetailView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/AnalysisDetailView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/AnalysisComparison.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/analyses/AnalysisComparison.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/AnalysisFinalScore.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/analyses/AnalysisFinalScore.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/AnalysisModelResults.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/ScoreBreakdown.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/ScoreBreakdown.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/analyses/ScoreBreakdown.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/ObservationSections.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Tooltip.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Tooltip.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/Tooltip.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/ObservationSections.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/analyses/ObservationSections.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/CalibrationPanel.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/analysis-panels.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/CalibrationPanel.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/analyses/CalibrationPanel.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/formula-drift.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/AnalysisModelResults.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/analyses/AnalysisModelResults.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/RetrievedFeedbackPanel.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/RetrievedFeedbackPanel.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/analyses/RetrievedFeedbackPanel.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/DebugPanel.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/DebugPanel.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/analyses/DebugPanel.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/GroundTruthEditor.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/GroundTruthEditor.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/analyses/GroundTruthEditor.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationImageGallery.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationImageGallery.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/locations/LocationImageGallery.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/use-analysis-detail.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/AnalysisDetailView.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/views/AnalysisDetailView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/ExplorerView.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/explorer-filter.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerLegend.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/explorer/ExplorerLegend.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerMap.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/explorer-labels.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerMap.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/explorer/ExplorerMap.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerResultRow.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerResultRow.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/explorer/ExplorerResultRow.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterChoice.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterChoice.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/explorer/FilterChoice.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterDropdown.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/explorer/FilterDropdown.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterSheet.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterSheet.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/explorer/FilterSheet.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/ExplorerView.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/views/ExplorerView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/AnalysesView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/PageHeader.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/PageHeader.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/shell/PageHeader.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/analyses-sort.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/AnalysesView.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/views/AnalysesView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/FeedbackView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/FeedbackView.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/views/FeedbackView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/FeedbackDetailView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/FeedbackDetailView.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/views/FeedbackDetailView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/UsageView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-script:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/StatTile.vue?type=script","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/StatTile.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/ui/StatTile.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/daily-series.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/usage-format.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/UsageView.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/views/UsageView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/ScoringView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/ScoringView.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/views/ScoringView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/HelpView.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/help-content.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/help-route.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/HelpView.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/views/HelpView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/BulkView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkRunner.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkConfiguration.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkConfiguration.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/bulk/BulkConfiguration.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkProgress.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkProgress.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/bulk/BulkProgress.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkSelectionSummary.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkSelectionSummary.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/bulk/BulkSelectionSummary.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkRunner.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/bulk/BulkRunner.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BatchMonitor.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/batch-monitor.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/batch-monitor-model.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/settings-actions.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BatchDetails.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BatchDetails.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/bulk/BatchDetails.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BatchMonitor.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/bulk/BatchMonitor.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/CommandBuilder.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/bulk-parts.ts","mod::statiegeldnl/webdesigns/admin/frontend/lib/bulk-command.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/CommandBuilder.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/bulk/CommandBuilder.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/BulkView.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/views/BulkView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/SettingsView.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsAccount.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsAccount.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/settings/SettingsAccount.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsImport.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsImport.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/settings/SettingsImport.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsAnalyses.vue","mod::statiegeldnl/webdesigns/admin/frontend/lib/settings-analyses.ts","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsAnalyses.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/components/settings/SettingsAnalyses.vue","/opt/whdata/generated/platform/ap/statiegeldnl.admin/build/sfc-template:/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/SettingsView.vue?type=template","mod::statiegeldnl/webdesigns/admin/frontend/views/SettingsView.vue","/entrypoint.js"],"sourcesContent":["/**\n* @vue/shared v3.5.18\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction makeMap(str) {\n  const map = /* @__PURE__ */ Object.create(null);\n  for (const key of str.split(\",\")) map[key] = 1;\n  return (val) => val in map;\n}\n\nconst EMPTY_OBJ = {};\nconst EMPTY_ARR = [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter\n(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n  const i = arr.indexOf(el);\n  if (i > -1) {\n    arr.splice(i, 1);\n  }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n  return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n  return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n  // the leading comma is intentional so empty string \"\" is also included\n  \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n  \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n  const cache = /* @__PURE__ */ Object.create(null);\n  return (str) => {\n    const hit = cache[str];\n    return hit || (cache[str] = fn(str));\n  };\n};\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction(\n  (str) => {\n    return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n  }\n);\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n  (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction((str) => {\n  return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = cacheStringFunction(\n  (str) => {\n    const s = str ? `on${capitalize(str)}` : ``;\n    return s;\n  }\n);\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, ...arg) => {\n  for (let i = 0; i < fns.length; i++) {\n    fns[i](...arg);\n  }\n};\nconst def = (obj, key, value, writable = false) => {\n  Object.defineProperty(obj, key, {\n    configurable: true,\n    enumerable: false,\n    writable,\n    value\n  });\n};\nconst looseToNumber = (val) => {\n  const n = parseFloat(val);\n  return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n  const n = isString(val) ? Number(val) : NaN;\n  return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n  return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n  return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\nfunction genCacheKey(source, options) {\n  return source + JSON.stringify(\n    options,\n    (_, val) => typeof val === \"function\" ? val.toString() : val\n  );\n}\n\nconst PatchFlags = {\n  \"TEXT\": 1,\n  \"1\": \"TEXT\",\n  \"CLASS\": 2,\n  \"2\": \"CLASS\",\n  \"STYLE\": 4,\n  \"4\": \"STYLE\",\n  \"PROPS\": 8,\n  \"8\": \"PROPS\",\n  \"FULL_PROPS\": 16,\n  \"16\": \"FULL_PROPS\",\n  \"NEED_HYDRATION\": 32,\n  \"32\": \"NEED_HYDRATION\",\n  \"STABLE_FRAGMENT\": 64,\n  \"64\": \"STABLE_FRAGMENT\",\n  \"KEYED_FRAGMENT\": 128,\n  \"128\": \"KEYED_FRAGMENT\",\n  \"UNKEYED_FRAGMENT\": 256,\n  \"256\": \"UNKEYED_FRAGMENT\",\n  \"NEED_PATCH\": 512,\n  \"512\": \"NEED_PATCH\",\n  \"DYNAMIC_SLOTS\": 1024,\n  \"1024\": \"DYNAMIC_SLOTS\",\n  \"DEV_ROOT_FRAGMENT\": 2048,\n  \"2048\": \"DEV_ROOT_FRAGMENT\",\n  \"CACHED\": -1,\n  \"-1\": \"CACHED\",\n  \"BAIL\": -2,\n  \"-2\": \"BAIL\"\n};\nconst PatchFlagNames = {\n  [1]: `TEXT`,\n  [2]: `CLASS`,\n  [4]: `STYLE`,\n  [8]: `PROPS`,\n  [16]: `FULL_PROPS`,\n  [32]: `NEED_HYDRATION`,\n  [64]: `STABLE_FRAGMENT`,\n  [128]: `KEYED_FRAGMENT`,\n  [256]: `UNKEYED_FRAGMENT`,\n  [512]: `NEED_PATCH`,\n  [1024]: `DYNAMIC_SLOTS`,\n  [2048]: `DEV_ROOT_FRAGMENT`,\n  [-1]: `CACHED`,\n  [-2]: `BAIL`\n};\n\nconst ShapeFlags = {\n  \"ELEMENT\": 1,\n  \"1\": \"ELEMENT\",\n  \"FUNCTIONAL_COMPONENT\": 2,\n  \"2\": \"FUNCTIONAL_COMPONENT\",\n  \"STATEFUL_COMPONENT\": 4,\n  \"4\": \"STATEFUL_COMPONENT\",\n  \"TEXT_CHILDREN\": 8,\n  \"8\": \"TEXT_CHILDREN\",\n  \"ARRAY_CHILDREN\": 16,\n  \"16\": \"ARRAY_CHILDREN\",\n  \"SLOTS_CHILDREN\": 32,\n  \"32\": \"SLOTS_CHILDREN\",\n  \"TELEPORT\": 64,\n  \"64\": \"TELEPORT\",\n  \"SUSPENSE\": 128,\n  \"128\": \"SUSPENSE\",\n  \"COMPONENT_SHOULD_KEEP_ALIVE\": 256,\n  \"256\": \"COMPONENT_SHOULD_KEEP_ALIVE\",\n  \"COMPONENT_KEPT_ALIVE\": 512,\n  \"512\": \"COMPONENT_KEPT_ALIVE\",\n  \"COMPONENT\": 6,\n  \"6\": \"COMPONENT\"\n};\n\nconst SlotFlags = {\n  \"STABLE\": 1,\n  \"1\": \"STABLE\",\n  \"DYNAMIC\": 2,\n  \"2\": \"DYNAMIC\",\n  \"FORWARDED\": 3,\n  \"3\": \"FORWARDED\"\n};\nconst slotFlagsText = {\n  [1]: \"STABLE\",\n  [2]: \"DYNAMIC\",\n  [3]: \"FORWARDED\"\n};\n\nconst GLOBALS_ALLOWED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol\";\nconst isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);\nconst isGloballyWhitelisted = isGloballyAllowed;\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n  start = Math.max(0, Math.min(start, source.length));\n  end = Math.max(0, Math.min(end, source.length));\n  if (start > end) return \"\";\n  let lines = source.split(/(\\r?\\n)/);\n  const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n  lines = lines.filter((_, idx) => idx % 2 === 0);\n  let count = 0;\n  const res = [];\n  for (let i = 0; i < lines.length; i++) {\n    count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);\n    if (count >= start) {\n      for (let j = i - range; j <= i + range || end > count; j++) {\n        if (j < 0 || j >= lines.length) continue;\n        const line = j + 1;\n        res.push(\n          `${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}|  ${lines[j]}`\n        );\n        const lineLength = lines[j].length;\n        const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;\n        if (j === i) {\n          const pad = start - (count - (lineLength + newLineSeqLength));\n          const length = Math.max(\n            1,\n            end > count ? lineLength - pad : end - start\n          );\n          res.push(`   |  ` + \" \".repeat(pad) + \"^\".repeat(length));\n        } else if (j > i) {\n          if (end > count) {\n            const length = Math.max(Math.min(end - count, lineLength), 1);\n            res.push(`   |  ` + \"^\".repeat(length));\n          }\n          count += lineLength + newLineSeqLength;\n        }\n      }\n      break;\n    }\n  }\n  return res.join(\"\\n\");\n}\n\nfunction normalizeStyle(value) {\n  if (isArray(value)) {\n    const res = {};\n    for (let i = 0; i < value.length; i++) {\n      const item = value[i];\n      const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n      if (normalized) {\n        for (const key in normalized) {\n          res[key] = normalized[key];\n        }\n      }\n    }\n    return res;\n  } else if (isString(value) || isObject(value)) {\n    return value;\n  }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\\/\\*[^]*?\\*\\//g;\nfunction parseStringStyle(cssText) {\n  const ret = {};\n  cssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\n    if (item) {\n      const tmp = item.split(propertyDelimiterRE);\n      tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n    }\n  });\n  return ret;\n}\nfunction stringifyStyle(styles) {\n  if (!styles) return \"\";\n  if (isString(styles)) return styles;\n  let ret = \"\";\n  for (const key in styles) {\n    const value = styles[key];\n    if (isString(value) || typeof value === \"number\") {\n      const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n      ret += `${normalizedKey}:${value};`;\n    }\n  }\n  return ret;\n}\nfunction normalizeClass(value) {\n  let res = \"\";\n  if (isString(value)) {\n    res = value;\n  } else if (isArray(value)) {\n    for (let i = 0; i < value.length; i++) {\n      const normalized = normalizeClass(value[i]);\n      if (normalized) {\n        res += normalized + \" \";\n      }\n    }\n  } else if (isObject(value)) {\n    for (const name in value) {\n      if (value[name]) {\n        res += name + \" \";\n      }\n    }\n  }\n  return res.trim();\n}\nfunction normalizeProps(props) {\n  if (!props) return null;\n  let { class: klass, style } = props;\n  if (klass && !isString(klass)) {\n    props.class = normalizeClass(klass);\n  }\n  if (style) {\n    props.style = normalizeStyle(style);\n  }\n  return props;\n}\n\nconst HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\nconst SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\nconst MATH_TAGS = \"annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics\";\nconst VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\nconst isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\nconst isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\nconst isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);\nconst isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\n\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nconst isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\nconst isBooleanAttr = /* @__PURE__ */ makeMap(\n  specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\n);\nfunction includeBooleanAttr(value) {\n  return !!value || value === \"\";\n}\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\nconst attrValidationCache = {};\nfunction isSSRSafeAttrName(name) {\n  if (attrValidationCache.hasOwnProperty(name)) {\n    return attrValidationCache[name];\n  }\n  const isUnsafe = unsafeAttrCharRE.test(name);\n  if (isUnsafe) {\n    console.error(`unsafe attribute name: ${name}`);\n  }\n  return attrValidationCache[name] = !isUnsafe;\n}\nconst propsToAttrMap = {\n  acceptCharset: \"accept-charset\",\n  className: \"class\",\n  htmlFor: \"for\",\n  httpEquiv: \"http-equiv\"\n};\nconst isKnownHtmlAttr = /* @__PURE__ */ makeMap(\n  `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`\n);\nconst isKnownSvgAttr = /* @__PURE__ */ makeMap(\n  `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`\n);\nconst isKnownMathMLAttr = /* @__PURE__ */ makeMap(\n  `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns`\n);\nfunction isRenderableAttrValue(value) {\n  if (value == null) {\n    return false;\n  }\n  const type = typeof value;\n  return type === \"string\" || type === \"number\" || type === \"boolean\";\n}\n\nconst escapeRE = /[\"'&<>]/;\nfunction escapeHtml(string) {\n  const str = \"\" + string;\n  const match = escapeRE.exec(str);\n  if (!match) {\n    return str;\n  }\n  let html = \"\";\n  let escaped;\n  let index;\n  let lastIndex = 0;\n  for (index = match.index; index < str.length; index++) {\n    switch (str.charCodeAt(index)) {\n      case 34:\n        escaped = \"&quot;\";\n        break;\n      case 38:\n        escaped = \"&amp;\";\n        break;\n      case 39:\n        escaped = \"&#39;\";\n        break;\n      case 60:\n        escaped = \"&lt;\";\n        break;\n      case 62:\n        escaped = \"&gt;\";\n        break;\n      default:\n        continue;\n    }\n    if (lastIndex !== index) {\n      html += str.slice(lastIndex, index);\n    }\n    lastIndex = index + 1;\n    html += escaped;\n  }\n  return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n}\nconst commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;\nfunction escapeHtmlComment(src) {\n  return src.replace(commentStripRE, \"\");\n}\nconst cssVarNameEscapeSymbolsRE = /[ !\"#$%&'()*+,./:;<=>?@[\\\\\\]^`{|}~]/g;\nfunction getEscapedCssVarName(key, doubleEscape) {\n  return key.replace(\n    cssVarNameEscapeSymbolsRE,\n    (s) => doubleEscape ? s === '\"' ? '\\\\\\\\\\\\\"' : `\\\\\\\\${s}` : `\\\\${s}`\n  );\n}\n\nfunction looseCompareArrays(a, b) {\n  if (a.length !== b.length) return false;\n  let equal = true;\n  for (let i = 0; equal && i < a.length; i++) {\n    equal = looseEqual(a[i], b[i]);\n  }\n  return equal;\n}\nfunction looseEqual(a, b) {\n  if (a === b) return true;\n  let aValidType = isDate(a);\n  let bValidType = isDate(b);\n  if (aValidType || bValidType) {\n    return aValidType && bValidType ? a.getTime() === b.getTime() : false;\n  }\n  aValidType = isSymbol(a);\n  bValidType = isSymbol(b);\n  if (aValidType || bValidType) {\n    return a === b;\n  }\n  aValidType = isArray(a);\n  bValidType = isArray(b);\n  if (aValidType || bValidType) {\n    return aValidType && bValidType ? looseCompareArrays(a, b) : false;\n  }\n  aValidType = isObject(a);\n  bValidType = isObject(b);\n  if (aValidType || bValidType) {\n    if (!aValidType || !bValidType) {\n      return false;\n    }\n    const aKeysCount = Object.keys(a).length;\n    const bKeysCount = Object.keys(b).length;\n    if (aKeysCount !== bKeysCount) {\n      return false;\n    }\n    for (const key in a) {\n      const aHasKey = a.hasOwnProperty(key);\n      const bHasKey = b.hasOwnProperty(key);\n      if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {\n        return false;\n      }\n    }\n  }\n  return String(a) === String(b);\n}\nfunction looseIndexOf(arr, val) {\n  return arr.findIndex((item) => looseEqual(item, val));\n}\n\nconst isRef = (val) => {\n  return !!(val && val[\"__v_isRef\"] === true);\n};\nconst toDisplayString = (val) => {\n  return isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);\n};\nconst replacer = (_key, val) => {\n  if (isRef(val)) {\n    return replacer(_key, val.value);\n  } else if (isMap(val)) {\n    return {\n      [`Map(${val.size})`]: [...val.entries()].reduce(\n        (entries, [key, val2], i) => {\n          entries[stringifySymbol(key, i) + \" =>\"] = val2;\n          return entries;\n        },\n        {}\n      )\n    };\n  } else if (isSet(val)) {\n    return {\n      [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))\n    };\n  } else if (isSymbol(val)) {\n    return stringifySymbol(val);\n  } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\n    return String(val);\n  }\n  return val;\n};\nconst stringifySymbol = (v, i = \"\") => {\n  var _a;\n  return (\n    // Symbol.description in es2019+ so we need to cast here to pass\n    // the lib: es2016 check\n    isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v\n  );\n};\n\nfunction normalizeCssVarValue(value) {\n  if (value == null) {\n    return \"initial\";\n  }\n  if (typeof value === \"string\") {\n    return value === \"\" ? \" \" : value;\n  }\n  return String(value);\n}\n\nexports.EMPTY_ARR = EMPTY_ARR;\nexports.EMPTY_OBJ = EMPTY_OBJ;\nexports.NO = NO;\nexports.NOOP = NOOP;\nexports.PatchFlagNames = PatchFlagNames;\nexports.PatchFlags = PatchFlags;\nexports.ShapeFlags = ShapeFlags;\nexports.SlotFlags = SlotFlags;\nexports.camelize = camelize;\nexports.capitalize = capitalize;\nexports.cssVarNameEscapeSymbolsRE = cssVarNameEscapeSymbolsRE;\nexports.def = def;\nexports.escapeHtml = escapeHtml;\nexports.escapeHtmlComment = escapeHtmlComment;\nexports.extend = extend;\nexports.genCacheKey = genCacheKey;\nexports.genPropsAccessExp = genPropsAccessExp;\nexports.generateCodeFrame = generateCodeFrame;\nexports.getEscapedCssVarName = getEscapedCssVarName;\nexports.getGlobalThis = getGlobalThis;\nexports.hasChanged = hasChanged;\nexports.hasOwn = hasOwn;\nexports.hyphenate = hyphenate;\nexports.includeBooleanAttr = includeBooleanAttr;\nexports.invokeArrayFns = invokeArrayFns;\nexports.isArray = isArray;\nexports.isBooleanAttr = isBooleanAttr;\nexports.isBuiltInDirective = isBuiltInDirective;\nexports.isDate = isDate;\nexports.isFunction = isFunction;\nexports.isGloballyAllowed = isGloballyAllowed;\nexports.isGloballyWhitelisted = isGloballyWhitelisted;\nexports.isHTMLTag = isHTMLTag;\nexports.isIntegerKey = isIntegerKey;\nexports.isKnownHtmlAttr = isKnownHtmlAttr;\nexports.isKnownMathMLAttr = isKnownMathMLAttr;\nexports.isKnownSvgAttr = isKnownSvgAttr;\nexports.isMap = isMap;\nexports.isMathMLTag = isMathMLTag;\nexports.isModelListener = isModelListener;\nexports.isObject = isObject;\nexports.isOn = isOn;\nexports.isPlainObject = isPlainObject;\nexports.isPromise = isPromise;\nexports.isRegExp = isRegExp;\nexports.isRenderableAttrValue = isRenderableAttrValue;\nexports.isReservedProp = isReservedProp;\nexports.isSSRSafeAttrName = isSSRSafeAttrName;\nexports.isSVGTag = isSVGTag;\nexports.isSet = isSet;\nexports.isSpecialBooleanAttr = isSpecialBooleanAttr;\nexports.isString = isString;\nexports.isSymbol = isSymbol;\nexports.isVoidTag = isVoidTag;\nexports.looseEqual = looseEqual;\nexports.looseIndexOf = looseIndexOf;\nexports.looseToNumber = looseToNumber;\nexports.makeMap = makeMap;\nexports.normalizeClass = normalizeClass;\nexports.normalizeCssVarValue = normalizeCssVarValue;\nexports.normalizeProps = normalizeProps;\nexports.normalizeStyle = normalizeStyle;\nexports.objectToString = objectToString;\nexports.parseStringStyle = parseStringStyle;\nexports.propsToAttrMap = propsToAttrMap;\nexports.remove = remove;\nexports.slotFlagsText = slotFlagsText;\nexports.stringifyStyle = stringifyStyle;\nexports.toDisplayString = toDisplayString;\nexports.toHandlerKey = toHandlerKey;\nexports.toNumber = toNumber;\nexports.toRawType = toRawType;\nexports.toTypeString = toTypeString;\n","'use strict'\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./dist/shared.cjs.prod.js')\n} else {\n  module.exports = require('./dist/shared.cjs.js')\n}\n",null,null,null,null,"export type Pos = {\n  start: number;\n};\n\n// These are used when `options.locations` is on, for the\n// `startLoc` and `endLoc` properties.\n\nexport class Position {\n  line: number;\n  column: number;\n  index: number;\n\n  constructor(line: number, col: number, index: number) {\n    this.line = line;\n    this.column = col;\n    this.index = index;\n  }\n}\n\nexport class SourceLocation {\n  start: Position;\n  end: Position;\n  filename: string;\n  identifierName: string | undefined | null;\n\n  constructor(start: Position, end?: Position) {\n    this.start = start;\n    // (may start as null, but initialized later)\n    this.end = end;\n  }\n}\n\n/**\n * creates a new position with a non-zero column offset from the given position.\n * This function should be only be used when we create AST node out of the token\n * boundaries, such as TemplateElement ends before tt.templateNonTail. This\n * function does not skip whitespaces.\n */\nexport function createPositionWithColumnOffset(\n  position: Position,\n  columnOffset: number,\n) {\n  const { line, column, index } = position;\n  return new Position(line, column + columnOffset, index + columnOffset);\n}\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\n\nconst code = \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\";\n\nexport default {\n  ImportMetaOutsideModule: {\n    message: `import.meta may appear only with 'sourceType: \"module\"'`,\n    code,\n  },\n  ImportOutsideModule: {\n    message: `'import' and 'export' may appear only with 'sourceType: \"module\"'`,\n    code,\n  },\n} satisfies ParseErrorTemplates;\n","const NodeDescriptions = {\n  ArrayPattern: \"array destructuring pattern\",\n  AssignmentExpression: \"assignment expression\",\n  AssignmentPattern: \"assignment expression\",\n  ArrowFunctionExpression: \"arrow function expression\",\n  ConditionalExpression: \"conditional expression\",\n  CatchClause: \"catch clause\",\n  ForOfStatement: \"for-of statement\",\n  ForInStatement: \"for-in statement\",\n  ForStatement: \"for-loop\",\n  FormalParameters: \"function parameter list\",\n  Identifier: \"identifier\",\n  ImportSpecifier: \"import specifier\",\n  ImportDefaultSpecifier: \"import default specifier\",\n  ImportNamespaceSpecifier: \"import namespace specifier\",\n  ObjectPattern: \"object destructuring pattern\",\n  ParenthesizedExpression: \"parenthesized expression\",\n  RestElement: \"rest element\",\n  UpdateExpression: {\n    true: \"prefix operation\",\n    false: \"postfix operation\",\n  },\n  VariableDeclarator: \"variable declaration\",\n  YieldExpression: \"yield expression\",\n};\n\ntype NodeTypesWithDescriptions = keyof Omit<\n  typeof NodeDescriptions,\n  \"UpdateExpression\"\n>;\n\ntype NodeWithDescription =\n  | {\n      type: \"UpdateExpression\";\n      prefix: boolean;\n    }\n  | {\n      type: NodeTypesWithDescriptions;\n    };\n\nconst toNodeDescription = (node: NodeWithDescription) =>\n  node.type === \"UpdateExpression\"\n    ? NodeDescriptions.UpdateExpression[`${node.prefix}`]\n    : NodeDescriptions[node.type];\n\nexport default toNodeDescription;\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\nimport toNodeDescription from \"./to-node-description.ts\";\n\nexport type LValAncestor =\n  | { type: \"UpdateExpression\"; prefix: boolean }\n  | {\n      type:\n        | \"ArrayPattern\"\n        | \"AssignmentExpression\"\n        | \"CatchClause\"\n        | \"ForOfStatement\"\n        | \"FormalParameters\"\n        | \"ForInStatement\"\n        | \"ForStatement\"\n        | \"ImportSpecifier\"\n        | \"ImportNamespaceSpecifier\"\n        | \"ImportDefaultSpecifier\"\n        | \"ParenthesizedExpression\"\n        | \"ObjectPattern\"\n        | \"RestElement\"\n        | \"VariableDeclarator\";\n    };\n\nexport default {\n  AccessorIsGenerator: ({ kind }: { kind: \"get\" | \"set\" }) =>\n    `A ${kind}ter cannot be a generator.`,\n  ArgumentsInClass:\n    \"'arguments' is only allowed in functions and class methods.\",\n  AsyncFunctionInSingleStatementContext:\n    \"Async functions can only be declared at the top level or inside a block.\",\n  AwaitBindingIdentifier:\n    \"Can not use 'await' as identifier inside an async function.\",\n  AwaitBindingIdentifierInStaticBlock:\n    \"Can not use 'await' as identifier inside a static block.\",\n  AwaitExpressionFormalParameter:\n    \"'await' is not allowed in async function parameters.\",\n  AwaitUsingNotInAsyncContext:\n    \"'await using' is only allowed within async functions and at the top levels of modules.\",\n  AwaitNotInAsyncContext:\n    \"'await' is only allowed within async functions and at the top levels of modules.\",\n  BadGetterArity: \"A 'get' accessor must not have any formal parameters.\",\n  BadSetterArity: \"A 'set' accessor must have exactly one formal parameter.\",\n  BadSetterRestParameter:\n    \"A 'set' accessor function argument must not be a rest parameter.\",\n  ConstructorClassField: \"Classes may not have a field named 'constructor'.\",\n  ConstructorClassPrivateField:\n    \"Classes may not have a private field named '#constructor'.\",\n  ConstructorIsAccessor: \"Class constructor may not be an accessor.\",\n  ConstructorIsAsync: \"Constructor can't be an async function.\",\n  ConstructorIsGenerator: \"Constructor can't be a generator.\",\n  DeclarationMissingInitializer: ({\n    kind,\n  }: {\n    kind: \"await using\" | \"const\" | \"destructuring\" | \"using\";\n  }) => `Missing initializer in ${kind} declaration.`,\n  DecoratorArgumentsOutsideParentheses:\n    \"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.\",\n  DecoratorBeforeExport:\n    \"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.\",\n  DecoratorsBeforeAfterExport:\n    \"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.\",\n  DecoratorConstructor:\n    \"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?\",\n  DecoratorExportClass:\n    \"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.\",\n  DecoratorSemicolon: \"Decorators must not be followed by a semicolon.\",\n  DecoratorStaticBlock: \"Decorators can't be used with a static block.\",\n  DeferImportRequiresNamespace:\n    'Only `import defer * as x from \"./module\"` is valid.',\n  DeletePrivateField: \"Deleting a private field is not allowed.\",\n  DestructureNamedImport:\n    \"ES2015 named imports do not destructure. Use another statement for destructuring after the import.\",\n  DuplicateConstructor: \"Duplicate constructor in the same class.\",\n  DuplicateDefaultExport: \"Only one default export allowed per module.\",\n  DuplicateExport: ({ exportName }: { exportName: string }) =>\n    `\\`${exportName}\\` has already been exported. Exported identifiers must be unique.`,\n  DuplicateProto: \"Redefinition of __proto__ property.\",\n  DuplicateRegExpFlags: \"Duplicate regular expression flag.\",\n  ElementAfterRest: \"Rest element must be last element.\",\n  EscapedCharNotAnIdentifier: \"Invalid Unicode escape.\",\n  ExportBindingIsString: ({\n    localName,\n    exportName,\n  }: {\n    localName: string;\n    exportName: string;\n  }) =>\n    `A string literal cannot be used as an exported binding without \\`from\\`.\\n- Did you mean \\`export { '${localName}' as '${exportName}' } from 'some-module'\\`?`,\n  ExportDefaultFromAsIdentifier:\n    \"'from' is not allowed as an identifier after 'export default'.\",\n\n  ForInOfLoopInitializer: ({\n    type,\n  }: {\n    type: \"ForInStatement\" | \"ForOfStatement\";\n  }) =>\n    `'${\n      type === \"ForInStatement\" ? \"for-in\" : \"for-of\"\n    }' loop variable declaration may not have an initializer.`,\n  ForInUsing: \"For-in loop may not start with 'using' declaration.\",\n\n  ForOfAsync: \"The left-hand side of a for-of loop may not be 'async'.\",\n  ForOfLet: \"The left-hand side of a for-of loop may not start with 'let'.\",\n  GeneratorInSingleStatementContext:\n    \"Generators can only be declared at the top level or inside a block.\",\n\n  IllegalBreakContinue: ({\n    type,\n  }: {\n    type: \"BreakStatement\" | \"ContinueStatement\";\n  }) => `Unsyntactic ${type === \"BreakStatement\" ? \"break\" : \"continue\"}.`,\n\n  IllegalLanguageModeDirective:\n    \"Illegal 'use strict' directive in function with non-simple parameter list.\",\n  IllegalReturn: \"'return' outside of function.\",\n  ImportAttributesUseAssert:\n    \"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.\",\n  ImportBindingIsString: ({ importName }: { importName: string }) =>\n    `A string literal cannot be used as an imported binding.\\n- Did you mean \\`import { \"${importName}\" as foo }\\`?`,\n  ImportCallArity: `\\`import()\\` requires exactly one or two arguments.`,\n  ImportCallNotNewExpression: \"Cannot use new with import(...).\",\n  ImportCallSpreadArgument: \"`...` is not allowed in `import()`.\",\n  ImportJSONBindingNotDefault:\n    \"A JSON module can only be imported with `default`.\",\n  ImportReflectionHasAssertion: \"`import module x` cannot have assertions.\",\n  ImportReflectionNotBinding:\n    'Only `import module x from \"./module\"` is valid.',\n  IncompatibleRegExpUVFlags:\n    \"The 'u' and 'v' regular expression flags cannot be enabled at the same time.\",\n  InvalidBigIntLiteral: \"Invalid BigIntLiteral.\",\n  InvalidCodePoint: \"Code point out of bounds.\",\n  InvalidCoverDiscardElement:\n    \"'void' must be followed by an expression when not used in a binding position.\",\n  InvalidCoverInitializedName: \"Invalid shorthand property initializer.\",\n  InvalidDecimal: \"Invalid decimal.\",\n  InvalidDigit: ({ radix }: { radix: number }) =>\n    `Expected number in radix ${radix}.`,\n  InvalidEscapeSequence: \"Bad character escape sequence.\",\n  InvalidEscapeSequenceTemplate: \"Invalid escape sequence in template.\",\n  InvalidEscapedReservedWord: ({ reservedWord }: { reservedWord: string }) =>\n    `Escape sequence in keyword ${reservedWord}.`,\n  InvalidIdentifier: ({ identifierName }: { identifierName: string }) =>\n    `Invalid identifier ${identifierName}.`,\n  InvalidLhs: ({ ancestor }: { ancestor: LValAncestor }) =>\n    `Invalid left-hand side in ${toNodeDescription(ancestor)}.`,\n  InvalidLhsBinding: ({ ancestor }: { ancestor: LValAncestor }) =>\n    `Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`,\n  InvalidLhsOptionalChaining: ({ ancestor }: { ancestor: LValAncestor }) =>\n    `Invalid optional chaining in the left-hand side of ${toNodeDescription(\n      ancestor,\n    )}.`,\n  InvalidNumber: \"Invalid number.\",\n  InvalidOrMissingExponent:\n    \"Floating-point numbers require a valid exponent after the 'e'.\",\n  InvalidOrUnexpectedToken: ({ unexpected }: { unexpected: string }) =>\n    `Unexpected character '${unexpected}'.`,\n  InvalidParenthesizedAssignment: \"Invalid parenthesized assignment pattern.\",\n  InvalidPrivateFieldResolution: ({\n    identifierName,\n  }: {\n    identifierName: string;\n  }) => `Private name #${identifierName} is not defined.`,\n  InvalidPropertyBindingPattern: \"Binding member expression.\",\n  InvalidRecordProperty:\n    \"Only properties and spread elements are allowed in record definitions.\",\n  InvalidRestAssignmentPattern: \"Invalid rest operator's argument.\",\n  LabelRedeclaration: ({ labelName }: { labelName: string }) =>\n    `Label '${labelName}' is already declared.`,\n  LetInLexicalBinding: \"'let' is disallowed as a lexically bound name.\",\n  LineTerminatorBeforeArrow: \"No line break is allowed before '=>'.\",\n  MalformedRegExpFlags: \"Invalid regular expression flag.\",\n  MissingClassName: \"A class name is required.\",\n  MissingEqInAssignment:\n    \"Only '=' operator can be used for specifying default value.\",\n  MissingSemicolon: \"Missing semicolon.\",\n  MissingPlugin: ({ missingPlugin }: { missingPlugin: [string] }) =>\n    `This experimental syntax requires enabling the parser plugin: ${missingPlugin\n      .map(name => JSON.stringify(name))\n      .join(\", \")}.`,\n  // FIXME: Would be nice to make this \"missingPlugins\" instead.\n  // Also, seems like we can drop the \"(s)\" from the message and just make it \"s\".\n  MissingOneOfPlugins: ({ missingPlugin }: { missingPlugin: string[] }) =>\n    `This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin\n      .map(name => JSON.stringify(name))\n      .join(\", \")}.`,\n  MissingUnicodeEscape: \"Expecting Unicode escape sequence \\\\uXXXX.\",\n  MixingCoalesceWithLogical:\n    \"Nullish coalescing operator(??) requires parens when mixing with logical operators.\",\n  ModuleAttributeDifferentFromType:\n    \"The only accepted module attribute is `type`.\",\n  ModuleAttributeInvalidValue:\n    \"Only string literals are allowed as module attribute values.\",\n  ModuleAttributesWithDuplicateKeys: ({ key }: { key: string }) =>\n    `Duplicate key \"${key}\" is not allowed in module attributes.`,\n  ModuleExportNameHasLoneSurrogate: ({\n    surrogateCharCode,\n  }: {\n    surrogateCharCode: number;\n  }) =>\n    `An export name cannot include a lone surrogate, found '\\\\u${surrogateCharCode.toString(\n      16,\n    )}'.`,\n  ModuleExportUndefined: ({ localName }: { localName: string }) =>\n    `Export '${localName}' is not defined.`,\n  MultipleDefaultsInSwitch: \"Multiple default clauses.\",\n  NewlineAfterThrow: \"Illegal newline after throw.\",\n  NoCatchOrFinally: \"Missing catch or finally clause.\",\n  NumberIdentifier: \"Identifier directly after number.\",\n  NumericSeparatorInEscapeSequence:\n    \"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.\",\n  ObsoleteAwaitStar:\n    \"'await*' has been removed from the async functions proposal. Use Promise.all() instead.\",\n  OptionalChainingNoNew:\n    \"Constructors in/after an Optional Chain are not allowed.\",\n  OptionalChainingNoTemplate:\n    \"Tagged Template Literals are not allowed in optionalChain.\",\n  OverrideOnConstructor:\n    \"'override' modifier cannot appear on a constructor declaration.\",\n  ParamDupe: \"Argument name clash.\",\n  PatternHasAccessor: \"Object pattern can't contain getter or setter.\",\n  PatternHasMethod: \"Object pattern can't contain methods.\",\n  PrivateInExpectedIn: ({ identifierName }: { identifierName: string }) =>\n    `Private names are only allowed in property accesses (\\`obj.#${identifierName}\\`) or in \\`in\\` expressions (\\`#${identifierName} in obj\\`).`,\n  PrivateNameRedeclaration: ({ identifierName }: { identifierName: string }) =>\n    `Duplicate private name #${identifierName}.`,\n  RecordExpressionBarIncorrectEndSyntaxType:\n    \"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n  RecordExpressionBarIncorrectStartSyntaxType:\n    \"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n  RecordExpressionHashIncorrectStartSyntaxType:\n    \"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n  RecordNoProto: \"'__proto__' is not allowed in Record expressions.\",\n  RestTrailingComma: \"Unexpected trailing comma after rest element.\",\n  SloppyFunction:\n    \"In non-strict mode code, functions can only be declared at top level or inside a block.\",\n  SloppyFunctionAnnexB:\n    \"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.\",\n  SourcePhaseImportRequiresDefault:\n    'Only `import source x from \"./module\"` is valid.',\n  StaticPrototype: \"Classes may not have static property named prototype.\",\n  SuperNotAllowed:\n    \"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?\",\n  SuperPrivateField: \"Private fields can't be accessed on super.\",\n  TrailingDecorator: \"Decorators must be attached to a class element.\",\n  TupleExpressionBarIncorrectEndSyntaxType:\n    \"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n  TupleExpressionBarIncorrectStartSyntaxType:\n    \"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n  TupleExpressionHashIncorrectStartSyntaxType:\n    \"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n  UnexpectedArgumentPlaceholder: \"Unexpected argument placeholder.\",\n  UnexpectedAwaitAfterPipelineBody:\n    'Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal.',\n  UnexpectedDigitAfterHash: \"Unexpected digit after hash token.\",\n  UnexpectedImportExport:\n    \"'import' and 'export' may only appear at the top level.\",\n  UnexpectedKeyword: ({ keyword }: { keyword: string }) =>\n    `Unexpected keyword '${keyword}'.`,\n  UnexpectedLeadingDecorator:\n    \"Leading decorators must be attached to a class declaration.\",\n  UnexpectedLexicalDeclaration:\n    \"Lexical declaration cannot appear in a single-statement context.\",\n  UnexpectedNewTarget:\n    \"`new.target` can only be used in functions or class properties.\",\n  UnexpectedNumericSeparator:\n    \"A numeric separator is only allowed between two digits.\",\n  UnexpectedPrivateField: \"Unexpected private name.\",\n  UnexpectedReservedWord: ({ reservedWord }: { reservedWord: string }) =>\n    `Unexpected reserved word '${reservedWord}'.`,\n  UnexpectedSuper: \"'super' is only allowed in object methods and classes.\",\n  UnexpectedToken: ({\n    expected,\n    unexpected,\n  }: {\n    expected?: string | null;\n    unexpected?: string | null;\n  }) =>\n    `Unexpected token${unexpected ? ` '${unexpected}'.` : \"\"}${\n      expected ? `, expected \"${expected}\"` : \"\"\n    }`,\n  UnexpectedTokenUnaryExponentiation:\n    \"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.\",\n  UnexpectedUsingDeclaration:\n    \"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.\",\n  UnexpectedVoidPattern: \"Unexpected void binding.\",\n  UnsupportedBind: \"Binding should be performed on object property.\",\n  UnsupportedDecoratorExport:\n    \"A decorated export must export a class declaration.\",\n  UnsupportedDefaultExport:\n    \"Only expressions, functions or classes are allowed as the `default` export.\",\n  UnsupportedImport:\n    \"`import` can only be used in `import()` or `import.meta`.\",\n  UnsupportedMetaProperty: ({\n    target,\n    onlyValidPropertyName,\n  }: {\n    target: string;\n    onlyValidPropertyName: string;\n  }) =>\n    `The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`,\n  UnsupportedParameterDecorator:\n    \"Decorators cannot be used to decorate parameters.\",\n  UnsupportedPropertyDecorator:\n    \"Decorators cannot be used to decorate object literal properties.\",\n  UnsupportedSuper:\n    \"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).\",\n  UnterminatedComment: \"Unterminated comment.\",\n  UnterminatedRegExp: \"Unterminated regular expression.\",\n  UnterminatedString: \"Unterminated string constant.\",\n  UnterminatedTemplate: \"Unterminated template.\",\n  UsingDeclarationExport: \"Using declaration cannot be exported.\",\n  UsingDeclarationHasBindingPattern:\n    \"Using declaration cannot have destructuring patterns.\",\n  VarRedeclaration: ({ identifierName }: { identifierName: string }) =>\n    `Identifier '${identifierName}' has already been declared.`,\n  VoidPatternCatchClauseParam:\n    \"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.\",\n  VoidPatternInitializer: \"A void binding may not have an initializer.\",\n  YieldBindingIdentifier:\n    \"Can not use 'yield' as identifier inside a generator.\",\n  YieldInParameter: \"Yield expression is not allowed in formal parameters.\",\n  YieldNotInGeneratorFunction:\n    \"'yield' is only allowed within generator functions.\",\n  ZeroDigitNumericSeparator:\n    \"Numeric separator can not be used after leading 0.\",\n} satisfies ParseErrorTemplates;\n","import type { ParseErrorTemplates } from \"../parse-error\";\n\nexport default {\n  StrictDelete: \"Deleting local variable in strict mode.\",\n\n  // `referenceName` is the StringValue[1] of an IdentifierReference[2], which\n  // is represented as just an `Identifier`[3] in the Babel AST.\n  // 1. https://tc39.es/ecma262/#sec-static-semantics-stringvalue\n  // 2. https://tc39.es/ecma262/#prod-IdentifierReference\n  // 3. https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#identifier\n  StrictEvalArguments: ({ referenceName }: { referenceName: string }) =>\n    `Assigning to '${referenceName}' in strict mode.`,\n\n  // `bindingName` is the StringValue[1] of a BindingIdentifier[2], which is\n  // represented as just an `Identifier`[3] in the Babel AST.\n  // 1. https://tc39.es/ecma262/#sec-static-semantics-stringvalue\n  // 2. https://tc39.es/ecma262/#prod-BindingIdentifier\n  // 3. https://github.com/babel/babel/blob/main/packages/babel-parser/ast/spec.md#identifier\n  StrictEvalArgumentsBinding: ({ bindingName }: { bindingName: string }) =>\n    `Binding '${bindingName}' in strict mode.`,\n\n  StrictFunction:\n    \"In strict mode code, functions can only be declared at top level or inside a block.\",\n\n  StrictNumericEscape: \"The only valid numeric escape in strict mode is '\\\\0'.\",\n\n  StrictOctalLiteral: \"Legacy octal literals are not allowed in strict mode.\",\n\n  StrictWith: \"'with' in strict mode.\",\n} satisfies ParseErrorTemplates;\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\n\nexport default {\n  ParseExpressionEmptyInput:\n    \"Unexpected parseExpression() input: The input is empty or contains only comments.\",\n  ParseExpressionExpectsEOF: ({ unexpected }: { unexpected: number }) =>\n    `Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \\`${String.fromCodePoint(unexpected)}\\`.`,\n} satisfies ParseErrorTemplates;\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\nimport toNodeDescription from \"./to-node-description.ts\";\n\nexport const UnparenthesizedPipeBodyDescriptions = new Set([\n  \"ArrowFunctionExpression\",\n  \"AssignmentExpression\",\n  \"ConditionalExpression\",\n  \"YieldExpression\",\n] as const);\n\ntype GetSetMemberType<T extends Set<any>> =\n  T extends Set<infer M> ? M : unknown;\n\nexport type UnparenthesizedPipeBodyTypes = GetSetMemberType<\n  typeof UnparenthesizedPipeBodyDescriptions\n>;\n\nexport default {\n  // This error is only used by the smart-mix proposal\n  PipeBodyIsTighter:\n    \"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.\",\n  PipeTopicRequiresHackPipes: process.env.BABEL_8_BREAKING\n    ? 'Topic references are only supported when using the `\"proposal\": \"hack\"` version of the pipeline proposal.'\n    : 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n  PipeTopicUnbound:\n    \"Topic reference is unbound; it must be inside a pipe body.\",\n  PipeTopicUnconfiguredToken: ({ token }: { token: string }) =>\n    `Invalid topic token ${token}. In order to use ${token} as a topic reference, the pipelineOperator plugin must be configured with { \"proposal\": \"hack\", \"topicToken\": \"${token}\" }.`,\n  PipeTopicUnused:\n    \"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.\",\n  PipeUnparenthesizedBody: ({ type }: { type: UnparenthesizedPipeBodyTypes }) =>\n    `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({\n      type,\n    })}; please wrap it in parentheses.`,\n\n  ...(process.env.BABEL_8_BREAKING\n    ? {}\n    : {\n        // Messages whose codes start with “Pipeline” or “PrimaryTopic”\n        // are retained for backwards compatibility\n        // with the deprecated smart-mix pipe operator proposal plugin.\n        // They are subject to removal in a future major version.\n        PipelineBodyNoArrow:\n          'Unexpected arrow \"=>\" after pipeline body; arrow function in pipeline body must be parenthesized.',\n        PipelineBodySequenceExpression:\n          \"Pipeline body may not be a comma-separated sequence expression.\",\n        PipelineHeadSequenceExpression:\n          \"Pipeline head should not be a comma-separated sequence expression.\",\n        PipelineTopicUnused:\n          \"Pipeline is in topic style but does not use topic reference.\",\n        PrimaryTopicNotAllowed:\n          \"Topic reference was used in a lexical context without topic binding.\",\n        PrimaryTopicRequiresSmartPipeline:\n          'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n      }),\n} satisfies ParseErrorTemplates;\n","import { Position } from \"./util/location.ts\";\n\ntype SyntaxPlugin =\n  | \"flow\"\n  | \"typescript\"\n  | \"jsx\"\n  | \"pipelineOperator\"\n  | \"placeholders\";\n\ntype ParseErrorCode =\n  | \"BABEL_PARSER_SYNTAX_ERROR\"\n  | \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\";\n\n// Babel uses \"normal\" SyntaxErrors for it's errors, but adds some extra\n// functionality. This functionality is defined in the\n// `ParseErrorSpecification` interface below. We may choose to change to someday\n// give our errors their own full-blown class, but until then this allow us to\n// keep all the desirable properties of SyntaxErrors (like their name in stack\n// traces, etc.), and also allows us to punt on any publicly facing\n// class-hierarchy decisions until Babel 8.\ninterface ParseErrorSpecification<ErrorDetails> {\n  // Look, these *could* be readonly, but then Flow complains when we initially\n  // set them. We could do a whole dance and make a special interface that's not\n  // readonly for when we create the error, then cast it to the readonly\n  // interface for public use, but the previous implementation didn't have them\n  // as readonly, so let's just not worry about it for now.\n  code: ParseErrorCode;\n  reasonCode: string;\n  syntaxPlugin?: SyntaxPlugin;\n  missingPlugin?: string | string[];\n  loc: Position;\n  details: ErrorDetails;\n\n  // We should consider removing this as it now just contains the same\n  // information as `loc.index`.\n  pos: number;\n}\n\nexport type ParseError<ErrorDetails> = SyntaxError &\n  ParseErrorSpecification<ErrorDetails>;\n\n// By `ParseErrorConstructor`, we mean something like the new-less style\n// `ErrorConstructor`[1], since `ParseError`'s are not themselves actually\n// separate classes from `SyntaxError`'s.\n//\n// 1. https://github.com/microsoft/TypeScript/blob/v4.5.5/lib/lib.es5.d.ts#L1027\nexport type ParseErrorConstructor<ErrorDetails> = (\n  loc: Position,\n  details: ErrorDetails,\n) => ParseError<ErrorDetails>;\n\ntype ToMessage<ErrorDetails> = (self: ErrorDetails) => string;\n\ntype ParseErrorCredentials<ErrorDetails> = {\n  code: string;\n  reasonCode: string;\n  syntaxPlugin?: SyntaxPlugin;\n  toMessage: ToMessage<ErrorDetails>;\n};\n\nfunction defineHidden(obj: object, key: string, value: unknown) {\n  Object.defineProperty(obj, key, {\n    enumerable: false,\n    configurable: true,\n    value,\n  });\n}\n\nfunction toParseErrorConstructor<ErrorDetails extends object>({\n  toMessage,\n  code,\n  reasonCode,\n  syntaxPlugin,\n}: ParseErrorCredentials<ErrorDetails>): ParseErrorConstructor<ErrorDetails> {\n  const hasMissingPlugin =\n    reasonCode === \"MissingPlugin\" || reasonCode === \"MissingOneOfPlugins\";\n\n  if (!process.env.BABEL_8_BREAKING) {\n    const oldReasonCodes: Record<string, string> = {\n      AccessorCannotDeclareThisParameter: \"AccesorCannotDeclareThisParameter\",\n      AccessorCannotHaveTypeParameters: \"AccesorCannotHaveTypeParameters\",\n      ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:\n        \"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference\",\n      SetAccessorCannotHaveOptionalParameter:\n        \"SetAccesorCannotHaveOptionalParameter\",\n      SetAccessorCannotHaveRestParameter: \"SetAccesorCannotHaveRestParameter\",\n      SetAccessorCannotHaveReturnType: \"SetAccesorCannotHaveReturnType\",\n    };\n    if (oldReasonCodes[reasonCode]) {\n      reasonCode = oldReasonCodes[reasonCode];\n    }\n  }\n\n  return function constructor(loc: Position, details: ErrorDetails) {\n    const error: ParseError<ErrorDetails> = new SyntaxError() as any;\n\n    error.code = code as ParseErrorCode;\n    error.reasonCode = reasonCode;\n    error.loc = loc;\n    error.pos = loc.index;\n\n    error.syntaxPlugin = syntaxPlugin;\n    if (hasMissingPlugin) {\n      error.missingPlugin = (details as any).missingPlugin;\n    }\n\n    type Overrides = {\n      loc?: Position;\n      details?: ErrorDetails;\n    };\n    defineHidden(error, \"clone\", function clone(overrides: Overrides = {}) {\n      const { line, column, index } = overrides.loc ?? loc;\n      return constructor(new Position(line, column, index), {\n        ...details,\n        ...overrides.details,\n      });\n    });\n\n    defineHidden(error, \"details\", details);\n\n    Object.defineProperty(error, \"message\", {\n      configurable: true,\n      get(this: ParseError<ErrorDetails>): string {\n        const message = `${toMessage(details)} (${loc.line}:${loc.column})`;\n        this.message = message;\n        return message;\n      },\n      set(value: string) {\n        Object.defineProperty(this, \"message\", { value, writable: true });\n      },\n    });\n\n    return error;\n  };\n}\n\ntype ParseErrorTemplate =\n  | string\n  | ToMessage<any>\n  | { message: string | ToMessage<any>; code?: ParseErrorCode };\n\nexport type ParseErrorTemplates = { [reasonCode: string]: ParseErrorTemplate };\n\n// This is the templated form of `ParseErrorEnum`.\n//\n// Note: We could factor out the return type calculation into something like\n// `ParseErrorConstructor<T extends ParseErrorTemplates>`, and then we could\n// reuse it in the non-templated form of `ParseErrorEnum`, but TypeScript\n// doesn't seem to drill down that far when showing you the computed type of\n// an object in an editor, so we'll leave it inlined for now.\nexport function ParseErrorEnum(a: TemplateStringsArray): <\n  T extends ParseErrorTemplates,\n>(\n  parseErrorTemplates: T,\n) => {\n  [K in keyof T]: ParseErrorConstructor<\n    T[K] extends { message: string | ToMessage<any> }\n      ? T[K][\"message\"] extends ToMessage<any>\n        ? Parameters<T[K][\"message\"]>[0]\n        : object\n      : T[K] extends ToMessage<any>\n        ? Parameters<T[K]>[0]\n        : object\n  >;\n};\n\nexport function ParseErrorEnum<T extends ParseErrorTemplates>(\n  parseErrorTemplates: T,\n  syntaxPlugin?: SyntaxPlugin,\n): {\n  [K in keyof T]: ParseErrorConstructor<\n    T[K] extends { message: string | ToMessage<any> }\n      ? T[K][\"message\"] extends ToMessage<any>\n        ? Parameters<T[K][\"message\"]>[0]\n        : object\n      : T[K] extends ToMessage<any>\n        ? Parameters<T[K]>[0]\n        : object\n  >;\n};\n\n// You call `ParseErrorEnum` with a mapping from `ReasonCode`'s to either:\n//\n// 1. a static error message,\n// 2. `toMessage` functions that define additional necessary `details` needed by\n//    the `ParseError`, or\n// 3. Objects that contain a `message` of one of the above and overridden `code`\n//    and/or `reasonCode`:\n//\n// ParseErrorEnum `optionalSyntaxPlugin` ({\n//   ErrorWithStaticMessage: \"message\",\n//   ErrorWithDynamicMessage: ({ type } : { type: string }) => `${type}`),\n//   ErrorWithOverriddenCodeAndOrReasonCode: {\n//     message: ({ type }: { type: string }) => `${type}`),\n//     code: \"AN_ERROR_CODE\",\n//     ...(BABEL_8_BREAKING ? { } : { reasonCode: \"CustomErrorReasonCode\" })\n//   }\n// });\n//\nexport function ParseErrorEnum(\n  argument: TemplateStringsArray | ParseErrorTemplates,\n  syntaxPlugin?: SyntaxPlugin,\n) {\n  // If the first parameter is an array, that means we were called with a tagged\n  // template literal. Extract the syntaxPlugin from this, and call again in\n  // the \"normalized\" form.\n  if (Array.isArray(argument)) {\n    return (parseErrorTemplates: ParseErrorTemplates) =>\n      ParseErrorEnum(parseErrorTemplates, argument[0]);\n  }\n\n  const ParseErrorConstructors = {} as Record<\n    string,\n    ParseErrorConstructor<unknown>\n  >;\n\n  for (const reasonCode of Object.keys(argument)) {\n    const template = (argument as ParseErrorTemplates)[reasonCode];\n    const { message, ...rest } =\n      typeof template === \"string\"\n        ? { message: () => template }\n        : typeof template === \"function\"\n          ? { message: template }\n          : template;\n    const toMessage = typeof message === \"string\" ? () => message : message;\n\n    ParseErrorConstructors[reasonCode] = toParseErrorConstructor({\n      code: \"BABEL_PARSER_SYNTAX_ERROR\",\n      reasonCode,\n      toMessage,\n      ...(syntaxPlugin ? { syntaxPlugin } : {}),\n      ...rest,\n    });\n  }\n\n  return ParseErrorConstructors;\n}\n\nimport ModuleErrors from \"./parse-error/module-errors.ts\";\nimport StandardErrors from \"./parse-error/standard-errors.ts\";\nimport StrictModeErrors from \"./parse-error/strict-mode-errors.ts\";\nimport ParseExpressionErrors from \"./parse-error/parse-expression-errors.ts\";\nimport PipelineOperatorErrors from \"./parse-error/pipeline-operator-errors.ts\";\n\nexport const Errors = {\n  ...ParseErrorEnum(ModuleErrors),\n  ...ParseErrorEnum(StandardErrors),\n  ...ParseErrorEnum(StrictModeErrors),\n  ...ParseErrorEnum(ParseExpressionErrors),\n  ...ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors),\n};\n\nexport type { LValAncestor } from \"./parse-error/standard-errors.ts\";\n","import type { Plugin } from \"./plugin-utils.ts\";\n\n// A second optional argument can be given to further configure\n// the parser process. These options are recognized:\n\nexport type SourceType = \"script\" | \"commonjs\" | \"module\" | \"unambiguous\";\n\nexport interface Options {\n  /**\n   * By default, import and export declarations can only appear at a program's top level.\n   * Setting this option to true allows them anywhere where a statement is allowed.\n   */\n  allowImportExportEverywhere?: boolean;\n\n  /**\n   * By default, await use is not allowed outside of an async function.\n   * Set this to true to accept such code.\n   */\n  allowAwaitOutsideFunction?: boolean;\n\n  /**\n   * By default, a return statement at the top level raises an error.\n   * Set this to true to accept such code.\n   */\n  allowReturnOutsideFunction?: boolean;\n\n  /**\n   * By default, new.target use is not allowed outside of a function or class.\n   * Set this to true to accept such code.\n   */\n  allowNewTargetOutsideFunction?: boolean;\n\n  allowSuperOutsideMethod?: boolean;\n\n  /**\n   * By default, exported identifiers must refer to a declared variable.\n   * Set this to true to allow export statements to reference undeclared variables.\n   */\n  allowUndeclaredExports?: boolean;\n\n  /**\n   * By default, yield use is not allowed outside of a generator function.\n   * Set this to true to accept such code.\n   */\n\n  allowYieldOutsideFunction?: boolean;\n\n  /**\n   * By default, Babel parser JavaScript code according to Annex B syntax.\n   * Set this to `false` to disable such behavior.\n   */\n  annexB?: boolean;\n\n  /**\n   * By default, Babel attaches comments to adjacent AST nodes.\n   * When this option is set to false, comments are not attached.\n   * It can provide up to 30% performance improvement when the input code has many comments.\n   * @babel/eslint-parser will set it for you.\n   * It is not recommended to use attachComment: false with Babel transform,\n   * as doing so removes all the comments in output code, and renders annotations such as\n   * /* istanbul ignore next *\\/ nonfunctional.\n   */\n  attachComment?: boolean;\n\n  /**\n   * By default, Babel always throws an error when it finds some invalid code.\n   * When this option is set to true, it will store the parsing error and\n   * try to continue parsing the invalid input file.\n   */\n  errorRecovery?: boolean;\n\n  /**\n   * Indicate the mode the code should be parsed in.\n   * Can be one of \"script\", \"commonjs\", \"module\", or \"unambiguous\". Defaults to \"script\".\n   * \"unambiguous\" will make @babel/parser attempt to guess, based on the presence\n   * of ES6 import or export statements.\n   * Files with ES6 imports and exports are considered \"module\" and are otherwise \"script\".\n   *\n   * Use \"commonjs\" to parse code that is intended to be run in a CommonJS environment such as Node.js.\n   */\n  sourceType?: SourceType;\n\n  /**\n   * Correlate output AST nodes with their source filename.\n   * Useful when generating code and source maps from the ASTs of multiple input files.\n   */\n  sourceFilename?: string;\n\n  /**\n   * By default, all source indexes start from 0.\n   * You can provide a start index to alternatively start with.\n   * Useful for integration with other source tools.\n   */\n  startIndex?: number;\n\n  /**\n   * By default, the first line of code parsed is treated as line 1.\n   * You can provide a line number to alternatively start with.\n   * Useful for integration with other source tools.\n   */\n  startLine?: number;\n\n  /**\n   * By default, the parsed code is treated as if it starts from line 1, column 0.\n   * You can provide a column number to alternatively start with.\n   * Useful for integration with other source tools.\n   */\n  startColumn?: number;\n\n  /**\n   * Array containing the plugins that you want to enable.\n   */\n  plugins?: Plugin[];\n\n  /**\n   * Should the parser work in strict mode.\n   * Defaults to true if sourceType === 'module'. Otherwise, false.\n   */\n  strictMode?: boolean;\n\n  /**\n   * Adds a ranges property to each node: [node.start, node.end]\n   */\n  ranges?: boolean;\n\n  /**\n   * Adds all parsed tokens to a tokens property on the File node.\n   */\n  tokens?: boolean;\n\n  /**\n   * By default, the parser adds information about parentheses by setting\n   * `extra.parenthesized` to `true` as needed.\n   * When this option is `true` the parser creates `ParenthesizedExpression`\n   * AST nodes instead of using the `extra` property.\n   */\n  createParenthesizedExpressions?: boolean;\n\n  /**\n   * The default is false in Babel 7 and true in Babel 8\n   * Set this to true to parse it as an `ImportExpression` node.\n   * Otherwise `import(foo)` is parsed as `CallExpression(Import, [Identifier(foo)])`.\n   */\n  createImportExpressions?: boolean;\n}\n\nexport const enum OptionFlags {\n  AllowAwaitOutsideFunction = 1 << 0,\n  AllowReturnOutsideFunction = 1 << 1,\n  AllowNewTargetOutsideFunction = 1 << 2,\n  AllowImportExportEverywhere = 1 << 3,\n  AllowSuperOutsideMethod = 1 << 4,\n  AllowYieldOutsideFunction = 1 << 5,\n  AllowUndeclaredExports = 1 << 6,\n  Ranges = 1 << 7,\n  Tokens = 1 << 8,\n  CreateImportExpressions = 1 << 9,\n  CreateParenthesizedExpressions = 1 << 10,\n  ErrorRecovery = 1 << 11,\n  AttachComment = 1 << 12,\n  AnnexB = 1 << 13,\n}\n\ntype OptionsWithDefaults = Required<Options>;\n\nfunction createDefaultOptions(): OptionsWithDefaults {\n  return {\n    // Source type (\"script\" or \"module\") for different semantics\n    sourceType: \"script\",\n    // Source filename.\n    sourceFilename: undefined,\n    // Index (0-based) from which to start counting source. Useful for\n    // integration with other tools.\n    startIndex: 0,\n    // Column (0-based) from which to start counting source. Useful for\n    // integration with other tools.\n    startColumn: 0,\n    // Line (1-based) from which to start counting source. Useful for\n    // integration with other tools.\n    startLine: 1,\n    // When enabled, await at the top level is not considered an\n    // error.\n    allowAwaitOutsideFunction: false,\n    // When enabled, a return at the top level is not considered an\n    // error.\n    allowReturnOutsideFunction: false,\n    // When enabled, new.target outside a function or class is not\n    // considered an error.\n    allowNewTargetOutsideFunction: false,\n    // When enabled, import/export statements are not constrained to\n    // appearing at the top of the program.\n    allowImportExportEverywhere: false,\n    // TODO\n    allowSuperOutsideMethod: false,\n    // When enabled, export statements can reference undeclared variables.\n    allowUndeclaredExports: false,\n    allowYieldOutsideFunction: false,\n    // An array of plugins to enable\n    plugins: [],\n    // TODO\n    strictMode: null,\n    // Nodes have their start and end characters offsets recorded in\n    // `start` and `end` properties (directly on the node, rather than\n    // the `loc` object, which holds line/column data. To also add a\n    // [semi-standardized][range] `range` property holding a `[start,\n    // end]` array with the same numbers, set the `ranges` option to\n    // `true`.\n    //\n    // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678\n    ranges: false,\n    // Adds all parsed tokens to a `tokens` property on the `File` node\n    tokens: false,\n    // Whether to create ImportExpression AST nodes (if false\n    // `import(foo)` will be parsed as CallExpression(Import, [Identifier(foo)])\n    createImportExpressions: process.env.BABEL_8_BREAKING ? true : false,\n    // Whether to create ParenthesizedExpression AST nodes (if false\n    // the parser sets extra.parenthesized on the expression nodes instead).\n    createParenthesizedExpressions: false,\n    // When enabled, errors are attached to the AST instead of being directly thrown.\n    // Some errors will still throw, because @babel/parser can't always recover.\n    errorRecovery: false,\n    // When enabled, comments will be attached to adjacent AST nodes as one of\n    // `leadingComments`, `trailingComments` and `innerComments`. The comment attachment\n    // is vital to preserve comments after transform. If you don't print AST back,\n    // consider set this option to `false` for performance\n    attachComment: true,\n    // When enabled, the parser will support Annex B syntax.\n    // https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers\n    annexB: true,\n  };\n}\n\n// Interpret and default an options object\n\nexport function getOptions(opts?: Options | null): OptionsWithDefaults {\n  // https://github.com/babel/babel/pull/16918\n  // `options` is accessed frequently, please make sure it is a fast object.\n  // `%ToFastProperties` can make it a fast object, but the performance is the same as the slow object.\n  const options: any = createDefaultOptions();\n\n  if (opts == null) {\n    return options;\n  }\n  if (opts.annexB != null && opts.annexB !== false) {\n    throw new Error(\"The `annexB` option can only be set to `false`.\");\n  }\n\n  for (const key of Object.keys(options) as (keyof Options)[]) {\n    if (opts[key] != null) options[key] = opts[key];\n  }\n\n  if (options.startLine === 1) {\n    if (opts.startIndex == null && options.startColumn > 0) {\n      options.startIndex = options.startColumn;\n    } else if (opts.startColumn == null && options.startIndex > 0) {\n      options.startColumn = options.startIndex;\n    }\n  } else if (opts.startColumn == null || opts.startIndex == null) {\n    if (opts.startIndex != null || process.env.BABEL_8_BREAKING) {\n      throw new Error(\n        \"With a `startLine > 1` you must also specify `startIndex` and `startColumn`.\",\n      );\n    }\n  }\n\n  if (options.sourceType === \"commonjs\") {\n    if (opts.allowAwaitOutsideFunction != null) {\n      throw new Error(\n        \"The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.\",\n      );\n    }\n    if (opts.allowReturnOutsideFunction != null) {\n      throw new Error(\n        \"`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.\",\n      );\n    }\n    if (opts.allowNewTargetOutsideFunction != null) {\n      throw new Error(\n        \"`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.\",\n      );\n    }\n  }\n\n  return options;\n}\n","import type { TokenType } from \"../tokenizer/types.ts\";\nimport type Parser from \"../parser/index.ts\";\nimport type * as N from \"../types.ts\";\nimport type { Node as NodeType, NodeBase, File } from \"../types.ts\";\nimport type { Position } from \"../util/location.ts\";\nimport { Errors } from \"../parse-error.ts\";\nimport type { Undone } from \"../parser/node.ts\";\nimport type { BindingFlag } from \"../util/scopeflags.ts\";\nimport { OptionFlags } from \"../options.ts\";\nimport type { ExpressionErrors } from \"../parser/util.ts\";\n\nconst { defineProperty } = Object;\nconst toUnenumerable = (object: any, key: string) => {\n  if (object) {\n    defineProperty(object, key, { enumerable: false, value: object[key] });\n  }\n};\n\nfunction toESTreeLocation(node: any) {\n  toUnenumerable(node.loc.start, \"index\");\n  toUnenumerable(node.loc.end, \"index\");\n\n  return node;\n}\n\nexport default (superClass: typeof Parser) =>\n  class ESTreeParserMixin extends superClass implements Parser {\n    parse(): File {\n      const file = toESTreeLocation(super.parse());\n\n      if (this.optionFlags & OptionFlags.Tokens) {\n        file.tokens = file.tokens.map(toESTreeLocation);\n      }\n\n      return file;\n    }\n\n    // @ts-expect-error ESTree plugin changes node types\n    parseRegExpLiteral({ pattern, flags }): N.EstreeRegExpLiteral {\n      let regex: RegExp | null = null;\n      try {\n        regex = new RegExp(pattern, flags);\n      } catch (_) {\n        // In environments that don't support these flags value will\n        // be null as the regex can't be represented natively.\n      }\n      const node = this.estreeParseLiteral<N.EstreeRegExpLiteral>(regex);\n      node.regex = { pattern, flags };\n\n      return node;\n    }\n\n    // @ts-expect-error ESTree plugin changes node types\n    parseBigIntLiteral(value: any): N.Node {\n      // https://github.com/estree/estree/blob/master/es2020.md#bigintliteral\n      let bigInt: bigint | null;\n      try {\n        bigInt = BigInt(value);\n      } catch {\n        bigInt = null;\n      }\n      const node = this.estreeParseLiteral<N.EstreeBigIntLiteral>(bigInt);\n      node.bigint = String(node.value || value);\n\n      return node;\n    }\n\n    // @ts-expect-error ESTree plugin changes node types\n    parseDecimalLiteral(value: any): N.Node {\n      // https://github.com/estree/estree/blob/master/experimental/decimal.md\n      // todo: use BigDecimal when node supports it.\n      const decimal: null = null;\n      const node = this.estreeParseLiteral(decimal);\n      node.decimal = String(node.value || value);\n\n      return node;\n    }\n\n    estreeParseLiteral<T extends N.EstreeLiteral>(value: any) {\n      // @ts-expect-error ESTree plugin changes node types\n      return this.parseLiteral<T>(value, \"Literal\");\n    }\n\n    // @ts-expect-error ESTree plugin changes node types\n    parseStringLiteral(value: any): N.Node {\n      return this.estreeParseLiteral(value);\n    }\n\n    parseNumericLiteral(value: any): any {\n      return this.estreeParseLiteral(value);\n    }\n\n    // @ts-expect-error ESTree plugin changes node types\n    parseNullLiteral(): N.Node {\n      return this.estreeParseLiteral(null);\n    }\n\n    parseBooleanLiteral(value: boolean): N.BooleanLiteral {\n      // @ts-expect-error ESTree plugin changes node types\n      return this.estreeParseLiteral(value);\n    }\n\n    // https://github.com/estree/estree/blob/master/es2020.md#chainexpression\n    estreeParseChainExpression(\n      node: N.Expression,\n      endLoc: Position,\n    ): N.EstreeChainExpression {\n      const chain = this.startNodeAtNode<N.EstreeChainExpression>(node);\n      chain.expression = node;\n      return this.finishNodeAt(chain, \"ChainExpression\", endLoc);\n    }\n\n    // Cast a Directive to an ExpressionStatement. Mutates the input Directive.\n    directiveToStmt(directive: N.Directive): N.ExpressionStatement {\n      const expression = directive.value as any as N.EstreeLiteral;\n      delete directive.value;\n\n      this.castNodeTo(expression, \"Literal\");\n      expression.raw = expression.extra.raw;\n      expression.value = expression.extra.expressionValue;\n\n      const stmt = this.castNodeTo(directive, \"ExpressionStatement\");\n      stmt.expression = expression;\n      stmt.directive = expression.extra.rawValue;\n\n      delete expression.extra;\n\n      return stmt;\n    }\n\n    /**\n     * The TS-ESLint always define optional AST properties, here we provide the\n     * default value for such properties immediately after `finishNode` was invoked.\n     * This hook will be implemented by the typescript plugin.\n     *\n     * Note: This hook should be manually invoked when we change the `type` of a given AST\n     * node, to ensure that the optional properties are correctly filled.\n     * @param node The AST node finished by finishNode\n     */\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    fillOptionalPropertiesForTSESLint(node: NodeType) {}\n\n    cloneEstreeStringLiteral(node: N.EstreeLiteral): N.EstreeLiteral {\n      const { start, end, loc, range, raw, value } = node;\n      const cloned = Object.create(node.constructor.prototype);\n      cloned.type = \"Literal\";\n      cloned.start = start;\n      cloned.end = end;\n      cloned.loc = loc;\n      cloned.range = range;\n      cloned.raw = raw;\n      cloned.value = value;\n      return cloned;\n    }\n\n    // ==================================\n    // Overrides\n    // ==================================\n\n    initFunction(node: N.BodilessFunctionOrMethodBase, isAsync: boolean): void {\n      super.initFunction(node, isAsync);\n      node.expression = false;\n    }\n\n    checkDeclaration(node: N.Pattern | N.ObjectProperty): void {\n      if (node != null && this.isObjectProperty(node)) {\n        // @ts-expect-error plugin typings\n        this.checkDeclaration((node as unknown as N.EstreeProperty).value);\n      } else {\n        super.checkDeclaration(node);\n      }\n    }\n\n    getObjectOrClassMethodParams(method: N.ObjectMethod | N.ClassMethod) {\n      return (method as unknown as N.EstreeMethodDefinition).value.params;\n    }\n\n    isValidDirective(stmt: N.Statement): stmt is N.ExpressionStatement {\n      return (\n        stmt.type === \"ExpressionStatement\" &&\n        stmt.expression.type === \"Literal\" &&\n        typeof stmt.expression.value === \"string\" &&\n        !stmt.expression.extra?.parenthesized\n      );\n    }\n\n    parseBlockBody(\n      node: N.BlockStatementLike,\n      allowDirectives: boolean | undefined | null,\n      topLevel: boolean,\n      end: TokenType,\n      afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n    ): void {\n      super.parseBlockBody(\n        node,\n        allowDirectives,\n        topLevel,\n        end,\n        afterBlockParse,\n      );\n\n      const directiveStatements = node.directives.map(d =>\n        this.directiveToStmt(d),\n      );\n      // @ts-expect-error estree plugin typings\n      node.body = directiveStatements.concat(node.body);\n      delete node.directives;\n    }\n\n    parsePrivateName(): any {\n      const node = super.parsePrivateName();\n      if (!process.env.BABEL_8_BREAKING) {\n        if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n          return node;\n        }\n      }\n      return this.convertPrivateNameToPrivateIdentifier(node);\n    }\n\n    convertPrivateNameToPrivateIdentifier(\n      node: N.PrivateName,\n    ): N.EstreePrivateIdentifier {\n      const name = super.getPrivateNameSV(node);\n      node = node as any;\n      delete node.id;\n      // @ts-expect-error mutate AST types\n      node.name = name;\n      return this.castNodeTo(node, \"PrivateIdentifier\");\n    }\n\n    // @ts-expect-error ESTree plugin changes node types\n    isPrivateName(node: N.Node): node is N.EstreePrivateIdentifier {\n      if (!process.env.BABEL_8_BREAKING) {\n        if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n          return super.isPrivateName(node);\n        }\n      }\n      return node.type === \"PrivateIdentifier\";\n    }\n\n    // @ts-expect-error ESTree plugin changes node types\n    getPrivateNameSV(node: N.EstreePrivateIdentifier): string {\n      if (!process.env.BABEL_8_BREAKING) {\n        if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n          return super.getPrivateNameSV(node as unknown as N.PrivateName);\n        }\n      }\n      return node.name;\n    }\n\n    // @ts-expect-error plugin may override interfaces\n    parseLiteral<T extends N.Literal>(value: any, type: T[\"type\"]): T {\n      const node = super.parseLiteral<T>(value, type);\n      // @ts-expect-error mutating AST types\n      node.raw = node.extra.raw;\n      delete node.extra;\n\n      return node;\n    }\n\n    parseFunctionBody(\n      node: N.Function,\n      allowExpression?: boolean | null,\n      isMethod: boolean = false,\n    ): void {\n      super.parseFunctionBody(node, allowExpression, isMethod);\n      node.expression = node.body.type !== \"BlockStatement\";\n    }\n\n    // @ts-expect-error plugin may override interfaces\n    parseMethod<\n      T extends N.ClassPrivateMethod | N.ObjectMethod | N.ClassMethod,\n    >(\n      node: Undone<T>,\n      isGenerator: boolean,\n      isAsync: boolean,\n      isConstructor: boolean,\n      allowDirectSuper: boolean,\n      type: T[\"type\"],\n      inClassScope: boolean = false,\n    ):\n      | N.EstreeProperty\n      | N.EstreeMethodDefinition\n      | N.EstreeTSAbstractMethodDefinition {\n      let funcNode = this.startNode<N.MethodLike>();\n      funcNode.kind = node.kind; // provide kind, so super method correctly sets state\n      funcNode = super.parseMethod(\n        funcNode,\n        isGenerator,\n        isAsync,\n        isConstructor,\n        allowDirectSuper,\n        type,\n        inClassScope,\n      );\n      delete funcNode.kind;\n      const { typeParameters } = node;\n      if (typeParameters) {\n        delete node.typeParameters;\n        funcNode.typeParameters = typeParameters;\n        this.resetStartLocationFromNode(funcNode, typeParameters);\n      }\n      const valueNode = this.castNodeTo(\n        funcNode as N.MethodLike,\n        process.env.BABEL_8_BREAKING &&\n          this.hasPlugin(\"typescript\") &&\n          !funcNode.body\n          ? \"TSEmptyBodyFunctionExpression\"\n          : \"FunctionExpression\",\n      );\n      (\n        node as unknown as Undone<\n          | N.EstreeProperty\n          | N.EstreeMethodDefinition\n          | N.EstreeTSAbstractMethodDefinition\n        >\n      ).value = valueNode;\n      if (type === \"ClassPrivateMethod\") {\n        node.computed = false;\n      }\n      if (process.env.BABEL_8_BREAKING && this.hasPlugin(\"typescript\")) {\n        // @ts-expect-error todo(flow->ts) property not defined for all types in union\n        if (node.abstract) {\n          // @ts-expect-error remove abstract from TSAbstractMethodDefinition\n          delete node.abstract;\n          return this.finishNode(\n            // @ts-expect-error cast methods to estree types\n            node as Undone<N.EstreeTSAbstractMethodDefinition>,\n            \"TSAbstractMethodDefinition\",\n          );\n        }\n      }\n      if (type === \"ObjectMethod\") {\n        if ((node as any as N.ObjectMethod).kind === \"method\") {\n          (node as any as N.EstreeProperty).kind = \"init\";\n        }\n        (node as any as N.EstreeProperty).shorthand = false;\n        return this.finishNode(\n          // @ts-expect-error cast methods to estree types\n          node as Undone<N.EstreeProperty>,\n          \"Property\",\n        );\n      } else {\n        return this.finishNode(\n          // @ts-expect-error cast methods to estree types\n          node as Undone<N.EstreeMethodDefinition>,\n          \"MethodDefinition\",\n        );\n      }\n    }\n\n    nameIsConstructor(key: N.Expression | N.PrivateName): boolean {\n      if (key.type === \"Literal\") return key.value === \"constructor\";\n      return super.nameIsConstructor(key);\n    }\n\n    parseClassProperty(...args: [N.ClassProperty]): any {\n      const propertyNode = super.parseClassProperty(...args);\n      if (!process.env.BABEL_8_BREAKING) {\n        if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n          return propertyNode as unknown as N.EstreePropertyDefinition;\n        }\n      }\n      if (\n        process.env.BABEL_8_BREAKING &&\n        propertyNode.abstract &&\n        this.hasPlugin(\"typescript\")\n      ) {\n        delete propertyNode.abstract;\n        this.castNodeTo(propertyNode, \"TSAbstractPropertyDefinition\");\n      } else {\n        this.castNodeTo(propertyNode, \"PropertyDefinition\");\n      }\n      return propertyNode;\n    }\n\n    parseClassPrivateProperty(...args: [N.ClassPrivateProperty]): any {\n      const propertyNode = super.parseClassPrivateProperty(...args);\n      if (!process.env.BABEL_8_BREAKING) {\n        if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n          return propertyNode as unknown as N.EstreePropertyDefinition;\n        }\n      }\n      if (\n        process.env.BABEL_8_BREAKING &&\n        propertyNode.abstract &&\n        this.hasPlugin(\"typescript\")\n      ) {\n        this.castNodeTo(propertyNode, \"TSAbstractPropertyDefinition\");\n      } else {\n        this.castNodeTo(propertyNode, \"PropertyDefinition\");\n      }\n      propertyNode.computed = false;\n      return propertyNode;\n    }\n\n    parseClassAccessorProperty(\n      this: Parser,\n      node: N.ClassAccessorProperty,\n    ): any {\n      const accessorPropertyNode = super.parseClassAccessorProperty(node);\n      if (!process.env.BABEL_8_BREAKING) {\n        if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n          return accessorPropertyNode;\n        }\n      }\n      if (accessorPropertyNode.abstract && this.hasPlugin(\"typescript\")) {\n        delete accessorPropertyNode.abstract;\n        this.castNodeTo(accessorPropertyNode, \"TSAbstractAccessorProperty\");\n      } else {\n        this.castNodeTo(accessorPropertyNode, \"AccessorProperty\");\n      }\n      return accessorPropertyNode;\n    }\n\n    parseObjectProperty(\n      prop: N.ObjectProperty,\n      startLoc: Position | undefined | null,\n      isPattern: boolean,\n      refExpressionErrors?: ExpressionErrors | null,\n    ): N.ObjectProperty | undefined | null {\n      const node: N.EstreeProperty = super.parseObjectProperty(\n        prop,\n        startLoc,\n        isPattern,\n        refExpressionErrors,\n      ) as any;\n\n      if (node) {\n        node.kind = \"init\";\n        this.castNodeTo(node, \"Property\");\n      }\n\n      return node as any;\n    }\n\n    finishObjectProperty(node: Undone<N.ObjectProperty>): N.ObjectProperty {\n      (node as unknown as Undone<N.EstreeProperty>).kind = \"init\";\n      return this.finishNode(\n        node as unknown as Undone<N.EstreeProperty>,\n        \"Property\",\n      ) as any;\n    }\n\n    isValidLVal(\n      type: string,\n      isUnparenthesizedInAssign: boolean,\n      binding: BindingFlag,\n    ) {\n      return type === \"Property\"\n        ? \"value\"\n        : super.isValidLVal(type, isUnparenthesizedInAssign, binding);\n    }\n\n    isAssignable(node: N.Node, isBinding?: boolean): boolean {\n      if (node != null && this.isObjectProperty(node)) {\n        return this.isAssignable(node.value, isBinding);\n      }\n      return super.isAssignable(node, isBinding);\n    }\n\n    toAssignable(node: N.Node, isLHS: boolean = false): void {\n      if (node != null && this.isObjectProperty(node)) {\n        const { key, value } = node;\n        if (this.isPrivateName(key)) {\n          this.classScope.usePrivateName(\n            this.getPrivateNameSV(key),\n            key.loc.start,\n          );\n        }\n        this.toAssignable(value, isLHS);\n      } else {\n        super.toAssignable(node, isLHS);\n      }\n    }\n\n    toAssignableObjectExpressionProp(\n      prop: N.Node,\n      isLast: boolean,\n      isLHS: boolean,\n    ) {\n      if (\n        prop.type === \"Property\" &&\n        (prop.kind === \"get\" || prop.kind === \"set\")\n      ) {\n        this.raise(Errors.PatternHasAccessor, prop.key);\n      } else if (prop.type === \"Property\" && prop.method) {\n        this.raise(Errors.PatternHasMethod, prop.key);\n      } else {\n        super.toAssignableObjectExpressionProp(prop, isLast, isLHS);\n      }\n    }\n\n    finishCallExpression<T extends N.CallExpression | N.OptionalCallExpression>(\n      unfinished: Undone<T>,\n      optional: boolean,\n    ): T {\n      const node = super.finishCallExpression(unfinished, optional);\n\n      if (node.callee.type === \"Import\") {\n        this.castNodeTo(node, \"ImportExpression\");\n        (node as N.Node as N.EstreeImportExpression).source = node\n          .arguments[0] as N.Expression;\n        (node as N.Node as N.EstreeImportExpression).options =\n          (node.arguments[1] as N.Expression) ?? null;\n        if (!process.env.BABEL_8_BREAKING) {\n          // compatibility with previous ESTree AST\n          (node as N.Node as N.EstreeImportExpression).attributes =\n            (node.arguments[1] as N.Expression) ?? null;\n        }\n        // arguments isn't optional in the type definition\n        delete node.arguments;\n        // callee isn't optional in the type definition\n        delete node.callee;\n      } else if (node.type === \"OptionalCallExpression\") {\n        this.castNodeTo(node, \"CallExpression\");\n      } else {\n        node.optional = false;\n      }\n\n      return node;\n    }\n\n    toReferencedArguments(\n      node:\n        | N.CallExpression\n        | N.OptionalCallExpression\n        | N.EstreeImportExpression,\n      /* isParenthesizedExpr?: boolean, */\n    ) {\n      // ImportExpressions do not have an arguments array.\n      if (node.type === \"ImportExpression\") {\n        return;\n      }\n\n      super.toReferencedArguments(node);\n    }\n\n    parseExport(\n      unfinished: Undone<N.AnyExport>,\n      decorators: N.Decorator[] | null,\n    ) {\n      const exportStartLoc = this.state.lastTokStartLoc;\n      const node = super.parseExport(unfinished, decorators);\n\n      switch (node.type) {\n        case \"ExportAllDeclaration\":\n          // @ts-expect-error mutating AST types\n          node.exported = null;\n          break;\n\n        case \"ExportNamedDeclaration\":\n          if (\n            node.specifiers.length === 1 &&\n            node.specifiers[0].type === \"ExportNamespaceSpecifier\"\n          ) {\n            this.castNodeTo(node, \"ExportAllDeclaration\");\n            // @ts-expect-error mutating AST types\n            node.exported = node.specifiers[0].exported;\n            delete node.specifiers;\n          }\n\n        // fallthrough\n        case \"ExportDefaultDeclaration\":\n          {\n            const { declaration } = node;\n            if (\n              declaration?.type === \"ClassDeclaration\" &&\n              declaration.decorators?.length > 0 &&\n              // decorator comes before export\n              declaration.start === node.start\n            ) {\n              this.resetStartLocation(\n                node,\n                // For compatibility with ESLint's keyword-spacing rule, which assumes that an\n                // export declaration must start with export.\n                // https://github.com/babel/babel/issues/15085\n                // Here we reset export declaration's start to be the start of the export token\n                exportStartLoc,\n              );\n            }\n          }\n\n          break;\n      }\n\n      return node;\n    }\n\n    stopParseSubscript(base: N.Expression, state: N.ParseSubscriptState) {\n      const node = super.stopParseSubscript(base, state);\n      if (state.optionalChainMember) {\n        return this.estreeParseChainExpression(node, base.loc.end);\n      }\n      return node;\n    }\n\n    parseMember(\n      base: N.Expression,\n      startLoc: Position,\n      state: N.ParseSubscriptState,\n      computed: boolean,\n      optional: boolean,\n    ) {\n      const node = super.parseMember(base, startLoc, state, computed, optional);\n      if (node.type === \"OptionalMemberExpression\") {\n        this.castNodeTo(node, \"MemberExpression\");\n      } else {\n        node.optional = false;\n      }\n      return node;\n    }\n\n    isOptionalMemberExpression(node: N.Node) {\n      if (node.type === \"ChainExpression\") {\n        return node.expression.type === \"MemberExpression\";\n      }\n      return super.isOptionalMemberExpression(node);\n    }\n\n    hasPropertyAsPrivateName(node: N.Node): boolean {\n      if (node.type === \"ChainExpression\") {\n        node = node.expression;\n      }\n      return super.hasPropertyAsPrivateName(node);\n    }\n\n    // @ts-expect-error ESTree plugin changes node types\n    isObjectProperty(node: N.Node): node is N.EstreeProperty {\n      return node.type === \"Property\" && node.kind === \"init\" && !node.method;\n    }\n\n    // @ts-expect-error ESTree plugin changes node types\n    isObjectMethod(node: N.Node): node is N.EstreeProperty {\n      return (\n        node.type === \"Property\" &&\n        (node.method || node.kind === \"get\" || node.kind === \"set\")\n      );\n    }\n\n    /* ============================================================ *\n     * parser/node.ts                                               *\n     * ============================================================ */\n\n    castNodeTo<T extends N.Node[\"type\"]>(\n      node: N.Node,\n      type: T,\n    ): Extract<N.Node, { type: T }> {\n      const result = super.castNodeTo(node, type);\n      this.fillOptionalPropertiesForTSESLint(result);\n      return result;\n    }\n\n    cloneIdentifier<T extends N.Identifier | N.Placeholder>(node: T): T {\n      const cloned = super.cloneIdentifier(node);\n      this.fillOptionalPropertiesForTSESLint(cloned);\n      return cloned;\n    }\n\n    cloneStringLiteral<\n      T extends N.EstreeLiteral | N.StringLiteral | N.Placeholder,\n    >(node: T): T {\n      if (node.type === \"Literal\") {\n        return this.cloneEstreeStringLiteral(node) as T;\n      }\n      return super.cloneStringLiteral(node);\n    }\n\n    finishNodeAt<T extends NodeType>(\n      node: Undone<T>,\n      type: T[\"type\"],\n      endLoc: Position,\n    ): T {\n      return toESTreeLocation(super.finishNodeAt(node, type, endLoc));\n    }\n\n    // Override for TS-ESLint that does not allow optional AST properties\n    finishNode<T extends NodeType>(node: Undone<T>, type: T[\"type\"]): T {\n      const result = super.finishNode(node, type);\n      this.fillOptionalPropertiesForTSESLint(result);\n      return result;\n    }\n\n    resetStartLocation(node: N.Node, startLoc: Position) {\n      super.resetStartLocation(node, startLoc);\n      toESTreeLocation(node);\n    }\n\n    resetEndLocation(\n      node: NodeBase,\n      endLoc: Position = this.state.lastTokEndLoc,\n    ): void {\n      super.resetEndLocation(node, endLoc);\n      toESTreeLocation(node);\n    }\n  };\n","// The token context is used in JSX plugin to track\n// jsx tag / jsx text / normal JavaScript expression\n\nexport class TokContext {\n  constructor(token: string, preserveSpace?: boolean) {\n    this.token = token;\n    this.preserveSpace = !!preserveSpace;\n  }\n\n  token: string;\n  preserveSpace: boolean;\n}\n\nconst types: {\n  [key: string]: TokContext;\n} = {\n  brace: new TokContext(\"{\"), // normal JavaScript expression\n  j_oTag: new TokContext(\"<tag\"), // JSX opening tag\n  j_cTag: new TokContext(\"</tag\"), // JSX closing tag\n  j_expr: new TokContext(\"<tag>...</tag>\", true), // JSX expressions\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n  types.template = new TokContext(\"`\", true);\n}\n\nexport { types };\n","import { types as tc, type TokContext } from \"./context.ts\";\n// ## Token types\n\n// The assignment of fine-grained, information-carrying type objects\n// allows the tokenizer to store the information it has about a\n// token in a way that is very cheap for the parser to look up.\n\n// All token type variables start with an underscore, to make them\n// easy to recognize.\n\n// The `beforeExpr` property is used to disambiguate between 1) binary\n// expression (<) and JSX Tag start (<name>); 2) object literal and JSX\n// texts. It is set on the `updateContext` function in the JSX plugin.\n\n// The `startsExpr` property is used to determine whether an expression\n// may be the “argument” subexpression of a `yield` expression or\n// `yield` statement. It is set on all token types that may be at the\n// start of a subexpression.\n\n// `isLoop` marks a keyword as starting a loop, which is important\n// to know when parsing a label, in order to allow or disallow\n// continue jumps to that label.\n\nconst beforeExpr = true;\nconst startsExpr = true;\nconst isLoop = true;\nconst isAssign = true;\nconst prefix = true;\nconst postfix = true;\n\ntype TokenOptions = {\n  keyword?: string;\n  beforeExpr?: boolean;\n  startsExpr?: boolean;\n  rightAssociative?: boolean;\n  isLoop?: boolean;\n  isAssign?: boolean;\n  prefix?: boolean;\n  postfix?: boolean;\n  binop?: number | null;\n};\n\n// Internally the tokenizer stores token as a number\nexport type TokenType = number;\n\n// The `ExportedTokenType` is exported via `tokTypes` and accessible\n// when `tokens: true` is enabled. Unlike internal token type, it provides\n// metadata of the tokens.\nexport class ExportedTokenType {\n  label: string;\n  keyword: string | undefined | null;\n  beforeExpr: boolean;\n  startsExpr: boolean;\n  rightAssociative: boolean;\n  isLoop: boolean;\n  isAssign: boolean;\n  prefix: boolean;\n  postfix: boolean;\n  binop: number | undefined | null;\n  // todo(Babel 8): remove updateContext from exposed token layout\n  declare updateContext:\n    | ((context: Array<TokContext>) => void)\n    | undefined\n    | null;\n\n  constructor(label: string, conf: TokenOptions = {}) {\n    this.label = label;\n    this.keyword = conf.keyword;\n    this.beforeExpr = !!conf.beforeExpr;\n    this.startsExpr = !!conf.startsExpr;\n    this.rightAssociative = !!conf.rightAssociative;\n    this.isLoop = !!conf.isLoop;\n    this.isAssign = !!conf.isAssign;\n    this.prefix = !!conf.prefix;\n    this.postfix = !!conf.postfix;\n    this.binop = conf.binop != null ? conf.binop : null;\n    if (!process.env.BABEL_8_BREAKING) {\n      this.updateContext = null;\n    }\n  }\n}\n\n// A map from keyword/keyword-like string value to the token type\nexport const keywords = new Map<string, TokenType>();\n\nfunction createKeyword(name: string, options: TokenOptions = {}): TokenType {\n  options.keyword = name;\n  const token = createToken(name, options);\n  keywords.set(name, token);\n  return token;\n}\n\nfunction createBinop(name: string, binop: number) {\n  return createToken(name, { beforeExpr, binop });\n}\n\nlet tokenTypeCounter = -1;\nexport const tokenTypes: ExportedTokenType[] = [];\nconst tokenLabels: string[] = [];\nconst tokenBinops: number[] = [];\nconst tokenBeforeExprs: boolean[] = [];\nconst tokenStartsExprs: boolean[] = [];\nconst tokenPrefixes: boolean[] = [];\n\nfunction createToken(name: string, options: TokenOptions = {}): TokenType {\n  ++tokenTypeCounter;\n  tokenLabels.push(name);\n  tokenBinops.push(options.binop ?? -1);\n  tokenBeforeExprs.push(options.beforeExpr ?? false);\n  tokenStartsExprs.push(options.startsExpr ?? false);\n  tokenPrefixes.push(options.prefix ?? false);\n  tokenTypes.push(new ExportedTokenType(name, options));\n\n  return tokenTypeCounter;\n}\n\nfunction createKeywordLike(\n  name: string,\n  options: TokenOptions = {},\n): TokenType {\n  ++tokenTypeCounter;\n  keywords.set(name, tokenTypeCounter);\n  tokenLabels.push(name);\n  tokenBinops.push(options.binop ?? -1);\n  tokenBeforeExprs.push(options.beforeExpr ?? false);\n  tokenStartsExprs.push(options.startsExpr ?? false);\n  tokenPrefixes.push(options.prefix ?? false);\n  // In the exported token type, we set the label as \"name\" for backward compatibility with Babel 7\n  tokenTypes.push(new ExportedTokenType(\"name\", options));\n\n  return tokenTypeCounter;\n}\n\n// For performance the token type helpers depend on the following declarations order.\n// When adding new token types, please also check if the token helpers need update.\n\nexport type InternalTokenTypes = typeof tt;\n\nexport const tt = {\n  // Punctuation token types.\n  bracketL: createToken(\"[\", { beforeExpr, startsExpr }),\n  // TODO: Remove this in Babel 8\n  bracketHashL: createToken(\"#[\", { beforeExpr, startsExpr }),\n  // TODO: Remove this in Babel 8\n  bracketBarL: createToken(\"[|\", { beforeExpr, startsExpr }),\n  bracketR: createToken(\"]\"),\n  // TODO: Remove this in Babel 8\n  bracketBarR: createToken(\"|]\"),\n  braceL: createToken(\"{\", { beforeExpr, startsExpr }),\n  // TODO: Remove this in Babel 8\n  braceBarL: createToken(\"{|\", { beforeExpr, startsExpr }),\n  // TODO: Remove this in Babel 8\n  braceHashL: createToken(\"#{\", { beforeExpr, startsExpr }),\n  braceR: createToken(\"}\"),\n  braceBarR: createToken(\"|}\"),\n  parenL: createToken(\"(\", { beforeExpr, startsExpr }),\n  parenR: createToken(\")\"),\n  comma: createToken(\",\", { beforeExpr }),\n  semi: createToken(\";\", { beforeExpr }),\n  colon: createToken(\":\", { beforeExpr }),\n  doubleColon: createToken(\"::\", { beforeExpr }),\n  dot: createToken(\".\"),\n  question: createToken(\"?\", { beforeExpr }),\n  questionDot: createToken(\"?.\"),\n  arrow: createToken(\"=>\", { beforeExpr }),\n  template: createToken(\"template\"),\n  ellipsis: createToken(\"...\", { beforeExpr }),\n  backQuote: createToken(\"`\", { startsExpr }),\n  dollarBraceL: createToken(\"${\", { beforeExpr, startsExpr }),\n  // start: isTemplate\n  templateTail: createToken(\"...`\", { startsExpr }),\n  templateNonTail: createToken(\"...${\", { beforeExpr, startsExpr }),\n  // end: isTemplate\n  at: createToken(\"@\"),\n  hash: createToken(\"#\", { startsExpr }),\n\n  // Special hashbang token.\n  interpreterDirective: createToken(\"#!...\"),\n\n  // Operators. These carry several kinds of properties to help the\n  // parser use them properly (the presence of these properties is\n  // what categorizes them as operators).\n  //\n  // `binop`, when present, specifies that this operator is a binary\n  // operator, and will refer to its precedence.\n  //\n  // `prefix` and `postfix` mark the operator as a prefix or postfix\n  // unary operator.\n  //\n  // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as\n  // binary operators with a very low precedence, that should result\n  // in AssignmentExpression nodes.\n\n  // start: isAssign\n  eq: createToken(\"=\", { beforeExpr, isAssign }),\n  assign: createToken(\"_=\", { beforeExpr, isAssign }),\n  slashAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n  // These are only needed to support % and ^ as a Hack-pipe topic token.\n  // When the proposal settles on a token, the others can be merged with\n  // tt.assign.\n  xorAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n  moduloAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n  // end: isAssign\n\n  incDec: createToken(\"++/--\", { prefix, postfix, startsExpr }),\n  bang: createToken(\"!\", { beforeExpr, prefix, startsExpr }),\n  tilde: createToken(\"~\", { beforeExpr, prefix, startsExpr }),\n\n  // More possible topic tokens.\n  // When the proposal settles on a token, at least one of these may be removed.\n  doubleCaret: createToken(\"^^\", { startsExpr }),\n  doubleAt: createToken(\"@@\", { startsExpr }),\n\n  // start: isBinop\n  pipeline: createBinop(\"|>\", 0),\n  nullishCoalescing: createBinop(\"??\", 1),\n  logicalOR: createBinop(\"||\", 1),\n  logicalAND: createBinop(\"&&\", 2),\n  bitwiseOR: createBinop(\"|\", 3),\n  bitwiseXOR: createBinop(\"^\", 4),\n  bitwiseAND: createBinop(\"&\", 5),\n  equality: createBinop(\"==/!=/===/!==\", 6),\n  lt: createBinop(\"</>/<=/>=\", 7),\n  gt: createBinop(\"</>/<=/>=\", 7),\n  relational: createBinop(\"</>/<=/>=\", 7),\n  bitShift: createBinop(\"<</>>/>>>\", 8),\n  bitShiftL: createBinop(\"<</>>/>>>\", 8),\n  bitShiftR: createBinop(\"<</>>/>>>\", 8),\n  plusMin: createToken(\"+/-\", { beforeExpr, binop: 9, prefix, startsExpr }),\n  // startsExpr: required by v8intrinsic plugin\n  modulo: createToken(\"%\", { binop: 10, startsExpr }),\n  // unset `beforeExpr` as it can be `function *`\n  star: createToken(\"*\", { binop: 10 }),\n  slash: createBinop(\"/\", 10),\n  exponent: createToken(\"**\", {\n    beforeExpr,\n    binop: 11,\n    rightAssociative: true,\n  }),\n\n  // Keywords\n  // Don't forget to update packages/babel-helper-validator-identifier/src/keyword.js\n  // when new keywords are added\n  // start: isLiteralPropertyName\n  // start: isKeyword\n  _in: createKeyword(\"in\", { beforeExpr, binop: 7 }),\n  _instanceof: createKeyword(\"instanceof\", { beforeExpr, binop: 7 }),\n  // end: isBinop\n  _break: createKeyword(\"break\"),\n  _case: createKeyword(\"case\", { beforeExpr }),\n  _catch: createKeyword(\"catch\"),\n  _continue: createKeyword(\"continue\"),\n  _debugger: createKeyword(\"debugger\"),\n  _default: createKeyword(\"default\", { beforeExpr }),\n  _else: createKeyword(\"else\", { beforeExpr }),\n  _finally: createKeyword(\"finally\"),\n  _function: createKeyword(\"function\", { startsExpr }),\n  _if: createKeyword(\"if\"),\n  _return: createKeyword(\"return\", { beforeExpr }),\n  _switch: createKeyword(\"switch\"),\n  _throw: createKeyword(\"throw\", { beforeExpr, prefix, startsExpr }),\n  _try: createKeyword(\"try\"),\n  _var: createKeyword(\"var\"),\n  _const: createKeyword(\"const\"),\n  _with: createKeyword(\"with\"),\n  _new: createKeyword(\"new\", { beforeExpr, startsExpr }),\n  _this: createKeyword(\"this\", { startsExpr }),\n  _super: createKeyword(\"super\", { startsExpr }),\n  _class: createKeyword(\"class\", { startsExpr }),\n  _extends: createKeyword(\"extends\", { beforeExpr }),\n  _export: createKeyword(\"export\"),\n  _import: createKeyword(\"import\", { startsExpr }),\n  _null: createKeyword(\"null\", { startsExpr }),\n  _true: createKeyword(\"true\", { startsExpr }),\n  _false: createKeyword(\"false\", { startsExpr }),\n  _typeof: createKeyword(\"typeof\", { beforeExpr, prefix, startsExpr }),\n  _void: createKeyword(\"void\", { beforeExpr, prefix, startsExpr }),\n  _delete: createKeyword(\"delete\", { beforeExpr, prefix, startsExpr }),\n  // start: isLoop\n  _do: createKeyword(\"do\", { isLoop, beforeExpr }),\n  _for: createKeyword(\"for\", { isLoop }),\n  _while: createKeyword(\"while\", { isLoop }),\n  // end: isLoop\n  // end: isKeyword\n\n  // Primary literals\n  // start: isIdentifier\n  _as: createKeywordLike(\"as\", { startsExpr }),\n  _assert: createKeywordLike(\"assert\", { startsExpr }),\n  _async: createKeywordLike(\"async\", { startsExpr }),\n  _await: createKeywordLike(\"await\", { startsExpr }),\n  _defer: createKeywordLike(\"defer\", { startsExpr }),\n  _from: createKeywordLike(\"from\", { startsExpr }),\n  _get: createKeywordLike(\"get\", { startsExpr }),\n  _let: createKeywordLike(\"let\", { startsExpr }),\n  _meta: createKeywordLike(\"meta\", { startsExpr }),\n  _of: createKeywordLike(\"of\", { startsExpr }),\n  _sent: createKeywordLike(\"sent\", { startsExpr }),\n  _set: createKeywordLike(\"set\", { startsExpr }),\n  _source: createKeywordLike(\"source\", { startsExpr }),\n  _static: createKeywordLike(\"static\", { startsExpr }),\n  _using: createKeywordLike(\"using\", { startsExpr }),\n  _yield: createKeywordLike(\"yield\", { startsExpr }),\n\n  // Flow and TypeScript Keywordlike\n  _asserts: createKeywordLike(\"asserts\", { startsExpr }),\n  _checks: createKeywordLike(\"checks\", { startsExpr }),\n  _exports: createKeywordLike(\"exports\", { startsExpr }),\n  _global: createKeywordLike(\"global\", { startsExpr }),\n  _implements: createKeywordLike(\"implements\", { startsExpr }),\n  _intrinsic: createKeywordLike(\"intrinsic\", { startsExpr }),\n  _infer: createKeywordLike(\"infer\", { startsExpr }),\n  _is: createKeywordLike(\"is\", { startsExpr }),\n  _mixins: createKeywordLike(\"mixins\", { startsExpr }),\n  _proto: createKeywordLike(\"proto\", { startsExpr }),\n  _require: createKeywordLike(\"require\", { startsExpr }),\n  _satisfies: createKeywordLike(\"satisfies\", { startsExpr }),\n  // start: isTSTypeOperator\n  _keyof: createKeywordLike(\"keyof\", { startsExpr }),\n  _readonly: createKeywordLike(\"readonly\", { startsExpr }),\n  _unique: createKeywordLike(\"unique\", { startsExpr }),\n  // end: isTSTypeOperator\n  // start: isTSDeclarationStart\n  _abstract: createKeywordLike(\"abstract\", { startsExpr }),\n  _declare: createKeywordLike(\"declare\", { startsExpr }),\n  _enum: createKeywordLike(\"enum\", { startsExpr }),\n  _module: createKeywordLike(\"module\", { startsExpr }),\n  _namespace: createKeywordLike(\"namespace\", { startsExpr }),\n  // start: isFlowInterfaceOrTypeOrOpaque\n  _interface: createKeywordLike(\"interface\", { startsExpr }),\n  _type: createKeywordLike(\"type\", { startsExpr }),\n  // end: isTSDeclarationStart\n  _opaque: createKeywordLike(\"opaque\", { startsExpr }),\n  // end: isFlowInterfaceOrTypeOrOpaque\n  name: createToken(\"name\", { startsExpr }),\n\n  // placeholder plugin\n  placeholder: createToken(\"%%\", { startsExpr }),\n  // end: isIdentifier\n\n  string: createToken(\"string\", { startsExpr }),\n  num: createToken(\"num\", { startsExpr }),\n  bigint: createToken(\"bigint\", { startsExpr }),\n  // TODO: Remove this in Babel 8\n  decimal: createToken(\"decimal\", { startsExpr }),\n  // end: isLiteralPropertyName\n  regexp: createToken(\"regexp\", { startsExpr }),\n  privateName: createToken(\"#name\", { startsExpr }),\n  eof: createToken(\"eof\"),\n\n  // jsx plugin\n  jsxName: createToken(\"jsxName\"),\n  jsxText: createToken(\"jsxText\", { beforeExpr }),\n  jsxTagStart: createToken(\"jsxTagStart\", { startsExpr }),\n  jsxTagEnd: createToken(\"jsxTagEnd\"),\n} as const;\n\nexport function tokenIsIdentifier(token: TokenType): boolean {\n  return token >= tt._as && token <= tt.placeholder;\n}\n\nexport function tokenKeywordOrIdentifierIsKeyword(token: TokenType): boolean {\n  // we can remove the token >= tt._in check when we\n  // know a token is either keyword or identifier\n  return token <= tt._while;\n}\n\nexport function tokenIsKeywordOrIdentifier(token: TokenType): boolean {\n  return token >= tt._in && token <= tt.placeholder;\n}\n\nexport function tokenIsLiteralPropertyName(token: TokenType): boolean {\n  return token >= tt._in && token <= tt.decimal;\n}\n\nexport function tokenComesBeforeExpression(token: TokenType): boolean {\n  return tokenBeforeExprs[token];\n}\n\nexport function tokenCanStartExpression(token: TokenType): boolean {\n  return tokenStartsExprs[token];\n}\n\nexport function tokenIsAssignment(token: TokenType): boolean {\n  return token >= tt.eq && token <= tt.moduloAssign;\n}\n\nexport function tokenIsFlowInterfaceOrTypeOrOpaque(token: TokenType): boolean {\n  return token >= tt._interface && token <= tt._opaque;\n}\n\nexport function tokenIsLoop(token: TokenType): boolean {\n  return token >= tt._do && token <= tt._while;\n}\n\nexport function tokenIsKeyword(token: TokenType): boolean {\n  return token >= tt._in && token <= tt._while;\n}\n\nexport function tokenIsOperator(token: TokenType): boolean {\n  return token >= tt.pipeline && token <= tt._instanceof;\n}\n\nexport function tokenIsPostfix(token: TokenType): boolean {\n  return token === tt.incDec;\n}\n\nexport function tokenIsPrefix(token: TokenType): boolean {\n  return tokenPrefixes[token];\n}\n\nexport function tokenIsTSTypeOperator(token: TokenType): boolean {\n  return token >= tt._keyof && token <= tt._unique;\n}\n\nexport function tokenIsTSDeclarationStart(token: TokenType): boolean {\n  return token >= tt._abstract && token <= tt._type;\n}\n\nexport function tokenLabelName(token: TokenType): string {\n  return tokenLabels[token];\n}\n\nexport function tokenOperatorPrecedence(token: TokenType): number {\n  return tokenBinops[token];\n}\n\nexport function tokenIsBinaryOperator(token: TokenType): boolean {\n  return tokenBinops[token] !== -1;\n}\n\nexport function tokenIsRightAssociative(token: TokenType): boolean {\n  return token === tt.exponent;\n}\n\nexport function tokenIsTemplate(token: TokenType): boolean {\n  return token >= tt.templateTail && token <= tt.templateNonTail;\n}\n\nexport function getExportedToken(token: TokenType): ExportedTokenType {\n  return tokenTypes[token];\n}\n\nexport function isTokenType(obj: any): boolean {\n  return typeof obj === \"number\";\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n  tokenTypes[tt.braceR].updateContext = context => {\n    context.pop();\n  };\n\n  tokenTypes[tt.braceL].updateContext =\n    tokenTypes[tt.braceHashL].updateContext =\n    tokenTypes[tt.dollarBraceL].updateContext =\n      context => {\n        context.push(tc.brace);\n      };\n\n  tokenTypes[tt.backQuote].updateContext = context => {\n    if (context[context.length - 1] === tc.template) {\n      context.pop();\n    } else {\n      context.push(tc.template);\n    }\n  };\n\n  tokenTypes[tt.jsxTagStart].updateContext = context => {\n    context.push(tc.j_expr, tc.j_oTag);\n  };\n}\n","// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point between 0x80 and 0xffff.\n// Generated by `scripts/generate-identifier-regex.cjs`.\n\n/* prettier-ignore */\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088e\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\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0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c8a\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7cd\\ua7d0\\ua7d1\\ua7d3\\ua7d5-\\ua7dc\\ua7f2-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\n/* prettier-ignore */\nlet nonASCIIidentifierChars = \"\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0897-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09b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0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1ace\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\u30fb\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\\uff65\";\n\nconst nonASCIIidentifierStart = new RegExp(\n  \"[\" + nonASCIIidentifierStartChars + \"]\",\n);\nconst nonASCIIidentifier = new RegExp(\n  \"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\",\n);\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\n// These are a run-length and offset-encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by `scripts/generate-identifier-regex.cjs`.\n/* prettier-ignore */\nconst astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191];\n/* prettier-ignore */\nconst astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code: number, set: readonly number[]): boolean {\n  let pos = 0x10000;\n  for (let i = 0, length = set.length; i < length; i += 2) {\n    pos += set[i];\n    if (pos > code) return false;\n\n    pos += set[i + 1];\n    if (pos >= code) return true;\n  }\n  return false;\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code: number): boolean {\n  if (code < charCodes.uppercaseA) return code === charCodes.dollarSign;\n  if (code <= charCodes.uppercaseZ) return true;\n  if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n  if (code <= charCodes.lowercaseZ) return true;\n  if (code <= 0xffff) {\n    return (\n      code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n    );\n  }\n  return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code: number): boolean {\n  if (code < charCodes.digit0) return code === charCodes.dollarSign;\n  if (code < charCodes.colon) return true;\n  if (code < charCodes.uppercaseA) return false;\n  if (code <= charCodes.uppercaseZ) return true;\n  if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n  if (code <= charCodes.lowercaseZ) return true;\n  if (code <= 0xffff) {\n    return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n  }\n  return (\n    isInAstralSet(code, astralIdentifierStartCodes) ||\n    isInAstralSet(code, astralIdentifierCodes)\n  );\n}\n\n// Test whether a given string is a valid identifier name\n\nexport function isIdentifierName(name: string): boolean {\n  let isFirst = true;\n  for (let i = 0; i < name.length; i++) {\n    // The implementation is based on\n    // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n    // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n    // since `name` is mostly ASCII, an inlined `charCodeAt` wins here\n    let cp = name.charCodeAt(i);\n    if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n      const trail = name.charCodeAt(++i);\n      if ((trail & 0xfc00) === 0xdc00) {\n        cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n      }\n    }\n    if (isFirst) {\n      isFirst = false;\n      if (!isIdentifierStart(cp)) {\n        return false;\n      }\n    } else if (!isIdentifierChar(cp)) {\n      return false;\n    }\n  }\n  return !isFirst;\n}\n","const reservedWords = {\n  keyword: [\n    \"break\",\n    \"case\",\n    \"catch\",\n    \"continue\",\n    \"debugger\",\n    \"default\",\n    \"do\",\n    \"else\",\n    \"finally\",\n    \"for\",\n    \"function\",\n    \"if\",\n    \"return\",\n    \"switch\",\n    \"throw\",\n    \"try\",\n    \"var\",\n    \"const\",\n    \"while\",\n    \"with\",\n    \"new\",\n    \"this\",\n    \"super\",\n    \"class\",\n    \"extends\",\n    \"export\",\n    \"import\",\n    \"null\",\n    \"true\",\n    \"false\",\n    \"in\",\n    \"instanceof\",\n    \"typeof\",\n    \"void\",\n    \"delete\",\n  ],\n  strict: [\n    \"implements\",\n    \"interface\",\n    \"let\",\n    \"package\",\n    \"private\",\n    \"protected\",\n    \"public\",\n    \"static\",\n    \"yield\",\n  ],\n  strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n  return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n  return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n  return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n  word: string,\n  inModule: boolean,\n): boolean {\n  return (\n    isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n  );\n}\n\nexport function isKeyword(word: string): boolean {\n  return keywords.has(word);\n}\n","import * as charCodes from \"charcodes\";\nimport { isIdentifierStart } from \"@babel/helper-validator-identifier\";\n\nexport {\n  isIdentifierStart,\n  isIdentifierChar,\n  isReservedWord,\n  isStrictBindOnlyReservedWord,\n  isStrictBindReservedWord,\n  isStrictReservedWord,\n  isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\nexport const keywordRelationalOperator = /^in(stanceof)?$/;\n\n// Test whether a current state character code and next character code is @\n\nexport function isIteratorStart(\n  current: number,\n  next: number,\n  next2: number,\n): boolean {\n  return (\n    current === charCodes.atSign &&\n    next === charCodes.atSign &&\n    isIdentifierStart(next2)\n  );\n}\n\n// This is the comprehensive set of JavaScript reserved words\n// If a word is in this set, it could be a reserved word,\n// depending on sourceType/strictMode/binding info. In other words\n// if a word is not in this set, it is not a reserved word under\n// any circumstance.\nconst reservedWordLikeSet = new Set([\n  \"break\",\n  \"case\",\n  \"catch\",\n  \"continue\",\n  \"debugger\",\n  \"default\",\n  \"do\",\n  \"else\",\n  \"finally\",\n  \"for\",\n  \"function\",\n  \"if\",\n  \"return\",\n  \"switch\",\n  \"throw\",\n  \"try\",\n  \"var\",\n  \"const\",\n  \"while\",\n  \"with\",\n  \"new\",\n  \"this\",\n  \"super\",\n  \"class\",\n  \"extends\",\n  \"export\",\n  \"import\",\n  \"null\",\n  \"true\",\n  \"false\",\n  \"in\",\n  \"instanceof\",\n  \"typeof\",\n  \"void\",\n  \"delete\",\n  // strict\n  \"implements\",\n  \"interface\",\n  \"let\",\n  \"package\",\n  \"private\",\n  \"protected\",\n  \"public\",\n  \"static\",\n  \"yield\",\n  // strictBind\n  \"eval\",\n  \"arguments\",\n  // reservedWorkLike\n  \"enum\",\n  \"await\",\n]);\n\nexport function canBeReservedWord(word: string): boolean {\n  return reservedWordLikeSet.has(word);\n}\n","import { ScopeFlag, BindingFlag } from \"./scopeflags.ts\";\nimport type { Position } from \"./location.ts\";\nimport type * as N from \"../types.ts\";\nimport { Errors } from \"../parse-error.ts\";\nimport type Tokenizer from \"../tokenizer/index.ts\";\n\nexport const enum NameType {\n  // var-declared names in the current lexical scope\n  Var = 1 << 0,\n  // lexically-declared names in the current lexical scope\n  Lexical = 1 << 1,\n  // lexically-declared FunctionDeclaration names in the current lexical scope\n  Function = 1 << 2,\n}\n\n// Start an AST node, attaching a start offset.\nexport class Scope {\n  flags: ScopeFlag = 0;\n  names: Map<string, NameType> = new Map();\n  firstLexicalName = \"\";\n\n  constructor(flags: ScopeFlag) {\n    this.flags = flags;\n  }\n}\n\n// The functions in this module keep track of declared variables in the\n// current scope in order to detect duplicate variable names.\nexport default class ScopeHandler<IScope extends Scope = Scope> {\n  parser: Tokenizer;\n  scopeStack: Array<IScope> = [];\n  inModule: boolean;\n  undefinedExports: Map<string, Position> = new Map();\n\n  constructor(parser: Tokenizer, inModule: boolean) {\n    this.parser = parser;\n    this.inModule = inModule;\n  }\n\n  get inTopLevel() {\n    return (this.currentScope().flags & ScopeFlag.PROGRAM) > 0;\n  }\n  get inFunction() {\n    return (this.currentVarScopeFlags() & ScopeFlag.FUNCTION_BASE) > 0;\n  }\n  get allowSuper() {\n    return (this.currentThisScopeFlags() & ScopeFlag.SUPER) > 0;\n  }\n  get allowDirectSuper() {\n    return (this.currentThisScopeFlags() & ScopeFlag.DIRECT_SUPER) > 0;\n  }\n  get allowNewTarget() {\n    return (this.currentThisScopeFlags() & ScopeFlag.NEW_TARGET) > 0;\n  }\n  get inClass() {\n    return (this.currentThisScopeFlags() & ScopeFlag.CLASS_BASE) > 0;\n  }\n  get inClassAndNotInNonArrowFunction() {\n    const flags = this.currentThisScopeFlags();\n    return (\n      (flags & ScopeFlag.CLASS_BASE) > 0 &&\n      (flags & ScopeFlag.FUNCTION_BASE) === 0\n    );\n  }\n  get inStaticBlock() {\n    for (let i = this.scopeStack.length - 1; ; i--) {\n      const { flags } = this.scopeStack[i];\n      if (flags & ScopeFlag.STATIC_BLOCK) {\n        return true;\n      }\n      if (flags & (ScopeFlag.VAR | ScopeFlag.CLASS_BASE)) {\n        // function body, module body, class property initializers\n        return false;\n      }\n    }\n  }\n  get inNonArrowFunction() {\n    return (this.currentThisScopeFlags() & ScopeFlag.FUNCTION_BASE) > 0;\n  }\n  get inBareCaseStatement() {\n    return (this.currentScope().flags & ScopeFlag.SWITCH) > 0;\n  }\n  get treatFunctionsAsVar() {\n    return this.treatFunctionsAsVarInScope(this.currentScope());\n  }\n\n  createScope(flags: ScopeFlag): Scope {\n    return new Scope(flags);\n  }\n\n  enter(flags: ScopeFlag) {\n    /*:: +createScope: (flags:ScopeFlag) => IScope; */\n    // @ts-expect-error This method will be overwritten by subclasses\n    this.scopeStack.push(this.createScope(flags));\n  }\n\n  exit(): ScopeFlag {\n    const scope = this.scopeStack.pop();\n    return scope.flags;\n  }\n\n  // The spec says:\n  // > At the top level of a function, or script, function declarations are\n  // > treated like var declarations rather than like lexical declarations.\n  treatFunctionsAsVarInScope(scope: IScope): boolean {\n    return !!(\n      scope.flags & (ScopeFlag.FUNCTION_BASE | ScopeFlag.STATIC_BLOCK) ||\n      (!this.parser.inModule && scope.flags & ScopeFlag.PROGRAM)\n    );\n  }\n\n  declareName(name: string, bindingType: BindingFlag, loc: Position) {\n    let scope = this.currentScope();\n    if (\n      bindingType & BindingFlag.SCOPE_LEXICAL ||\n      bindingType & BindingFlag.SCOPE_FUNCTION\n    ) {\n      this.checkRedeclarationInScope(scope, name, bindingType, loc);\n\n      let type = scope.names.get(name) || 0;\n\n      if (bindingType & BindingFlag.SCOPE_FUNCTION) {\n        type = type | NameType.Function;\n      } else {\n        if (!scope.firstLexicalName) {\n          scope.firstLexicalName = name;\n        }\n        type = type | NameType.Lexical;\n      }\n\n      scope.names.set(name, type);\n\n      if (bindingType & BindingFlag.SCOPE_LEXICAL) {\n        this.maybeExportDefined(scope, name);\n      }\n    } else if (bindingType & BindingFlag.SCOPE_VAR) {\n      for (let i = this.scopeStack.length - 1; i >= 0; --i) {\n        scope = this.scopeStack[i];\n        this.checkRedeclarationInScope(scope, name, bindingType, loc);\n        scope.names.set(name, (scope.names.get(name) || 0) | NameType.Var);\n        this.maybeExportDefined(scope, name);\n\n        if (scope.flags & ScopeFlag.VAR) break;\n      }\n    }\n    if (this.parser.inModule && scope.flags & ScopeFlag.PROGRAM) {\n      this.undefinedExports.delete(name);\n    }\n  }\n\n  maybeExportDefined(scope: IScope, name: string) {\n    if (this.parser.inModule && scope.flags & ScopeFlag.PROGRAM) {\n      this.undefinedExports.delete(name);\n    }\n  }\n\n  checkRedeclarationInScope(\n    scope: IScope,\n    name: string,\n    bindingType: BindingFlag,\n    loc: Position,\n  ) {\n    if (this.isRedeclaredInScope(scope, name, bindingType)) {\n      this.parser.raise(Errors.VarRedeclaration, loc, {\n        identifierName: name,\n      });\n    }\n  }\n\n  isRedeclaredInScope(\n    scope: IScope,\n    name: string,\n    bindingType: BindingFlag,\n  ): boolean {\n    if (!(bindingType & BindingFlag.KIND_VALUE)) return false;\n\n    if (bindingType & BindingFlag.SCOPE_LEXICAL) {\n      return scope.names.has(name);\n    }\n\n    const type = scope.names.get(name);\n\n    if (bindingType & BindingFlag.SCOPE_FUNCTION) {\n      return (\n        (type & NameType.Lexical) > 0 ||\n        (!this.treatFunctionsAsVarInScope(scope) && (type & NameType.Var) > 0)\n      );\n    }\n\n    return (\n      ((type & NameType.Lexical) > 0 &&\n        // Annex B.3.4\n        // https://tc39.es/ecma262/#sec-variablestatements-in-catch-blocks\n        !(\n          scope.flags & ScopeFlag.SIMPLE_CATCH &&\n          scope.firstLexicalName === name\n        )) ||\n      (!this.treatFunctionsAsVarInScope(scope) &&\n        (type & NameType.Function) > 0)\n    );\n  }\n\n  checkLocalExport(id: N.Identifier) {\n    const { name } = id;\n    const topLevelScope = this.scopeStack[0];\n    if (!topLevelScope.names.has(name)) {\n      this.undefinedExports.set(name, id.loc.start);\n    }\n  }\n\n  currentScope(): IScope {\n    return this.scopeStack[this.scopeStack.length - 1];\n  }\n\n  currentVarScopeFlags(): ScopeFlag {\n    for (let i = this.scopeStack.length - 1; ; i--) {\n      const { flags } = this.scopeStack[i];\n      if (flags & ScopeFlag.VAR) {\n        return flags;\n      }\n    }\n  }\n\n  // Could be useful for `arguments`, `this`, `new.target`, `super()`, `super.property`, and `super[property]`.\n  currentThisScopeFlags(): ScopeFlag {\n    for (let i = this.scopeStack.length - 1; ; i--) {\n      const { flags } = this.scopeStack[i];\n      if (\n        flags & (ScopeFlag.VAR | ScopeFlag.CLASS_BASE) &&\n        !(flags & ScopeFlag.ARROW)\n      ) {\n        return flags;\n      }\n    }\n  }\n}\n","import type { Position } from \"../../util/location.ts\";\nimport ScopeHandler, { NameType, Scope } from \"../../util/scope.ts\";\nimport { BindingFlag, type ScopeFlag } from \"../../util/scopeflags.ts\";\nimport type * as N from \"../../types.ts\";\n\n// Reference implementation: https://github.com/facebook/flow/blob/23aeb2a2ef6eb4241ce178fde5d8f17c5f747fb5/src/typing/env.ml#L536-L584\nclass FlowScope extends Scope {\n  // declare function foo(): type;\n  declareFunctions: Set<string> = new Set();\n}\n\nexport default class FlowScopeHandler extends ScopeHandler<FlowScope> {\n  createScope(flags: ScopeFlag): FlowScope {\n    return new FlowScope(flags);\n  }\n\n  declareName(name: string, bindingType: BindingFlag, loc: Position) {\n    const scope = this.currentScope();\n    if (bindingType & BindingFlag.FLAG_FLOW_DECLARE_FN) {\n      this.checkRedeclarationInScope(scope, name, bindingType, loc);\n      this.maybeExportDefined(scope, name);\n      scope.declareFunctions.add(name);\n      return;\n    }\n\n    super.declareName(name, bindingType, loc);\n  }\n\n  isRedeclaredInScope(\n    scope: FlowScope,\n    name: string,\n    bindingType: BindingFlag,\n  ): boolean {\n    if (super.isRedeclaredInScope(scope, name, bindingType)) return true;\n\n    if (\n      bindingType & BindingFlag.FLAG_FLOW_DECLARE_FN &&\n      !scope.declareFunctions.has(name)\n    ) {\n      const type = scope.names.get(name);\n      return (type & NameType.Function) > 0 || (type & NameType.Lexical) > 0;\n    }\n\n    return false;\n  }\n\n  checkLocalExport(id: N.Identifier) {\n    if (!this.scopeStack[0].declareFunctions.has(id.name)) {\n      super.checkLocalExport(id);\n    }\n  }\n}\n","/*:: declare var invariant; */\n\nimport type Parser from \"../../parser/index.ts\";\nimport {\n  tokenIsIdentifier,\n  tokenIsKeyword,\n  tokenIsKeywordOrIdentifier,\n  tokenIsLiteralPropertyName,\n  tokenLabelName,\n  tt,\n  type TokenType,\n  tokenIsFlowInterfaceOrTypeOrOpaque,\n} from \"../../tokenizer/types.ts\";\nimport type * as N from \"../../types.ts\";\nimport type { Position } from \"../../util/location.ts\";\nimport { types as tc } from \"../../tokenizer/context.ts\";\nimport * as charCodes from \"charcodes\";\nimport { isIteratorStart } from \"../../util/identifier.ts\";\nimport FlowScopeHandler from \"./scope.ts\";\nimport { BindingFlag, ScopeFlag } from \"../../util/scopeflags.ts\";\nimport type { ExpressionErrors } from \"../../parser/util.ts\";\nimport type { ParseStatementFlag } from \"../../parser/statement.ts\";\nimport { Errors, ParseErrorEnum } from \"../../parse-error.ts\";\nimport type { Undone } from \"../../parser/node.ts\";\nimport type { ClassWithMixin, IJSXParserMixin } from \"../jsx/index.ts\";\n\nconst reservedTypes = new Set([\n  \"_\",\n  \"any\",\n  \"bool\",\n  \"boolean\",\n  \"empty\",\n  \"extends\",\n  \"false\",\n  \"interface\",\n  \"mixed\",\n  \"null\",\n  \"number\",\n  \"static\",\n  \"string\",\n  \"true\",\n  \"typeof\",\n  \"void\",\n]);\n\n/* eslint sort-keys: \"error\" */\n// The Errors key follows https://github.com/facebook/flow/blob/master/src/parser/parse_error.ml unless it does not exist\nconst FlowErrors = ParseErrorEnum`flow`({\n  AmbiguousConditionalArrow:\n    \"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.\",\n  AmbiguousDeclareModuleKind:\n    \"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.\",\n  // TODO: When we get proper string enums in typescript make this ReservedType.\n  // Not really worth it to do the whole $Values dance with reservedTypes set.\n  AssignReservedType: ({ reservedType }: { reservedType: string }) =>\n    `Cannot overwrite reserved type ${reservedType}.`,\n  DeclareClassElement:\n    \"The `declare` modifier can only appear on class fields.\",\n  DeclareClassFieldInitializer:\n    \"Initializers are not allowed in fields with the `declare` modifier.\",\n  DuplicateDeclareModuleExports:\n    \"Duplicate `declare module.exports` statement.\",\n  EnumBooleanMemberNotInitialized: ({\n    memberName,\n    enumName,\n  }: {\n    memberName: string;\n    enumName: string;\n  }) =>\n    `Boolean enum members need to be initialized. Use either \\`${memberName} = true,\\` or \\`${memberName} = false,\\` in enum \\`${enumName}\\`.`,\n  EnumDuplicateMemberName: ({\n    memberName,\n    enumName,\n  }: {\n    memberName: string;\n    enumName: string;\n  }) =>\n    `Enum member names need to be unique, but the name \\`${memberName}\\` has already been used before in enum \\`${enumName}\\`.`,\n  EnumInconsistentMemberValues: ({ enumName }: { enumName: string }) =>\n    `Enum \\`${enumName}\\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,\n  EnumInvalidExplicitType: ({\n    invalidEnumType,\n    enumName,\n  }: {\n    invalidEnumType: string;\n    enumName: string;\n  }) =>\n    `Enum type \\`${invalidEnumType}\\` is not valid. Use one of \\`boolean\\`, \\`number\\`, \\`string\\`, or \\`symbol\\` in enum \\`${enumName}\\`.`,\n  EnumInvalidExplicitTypeUnknownSupplied: ({\n    enumName,\n  }: {\n    enumName: string;\n  }) =>\n    `Supplied enum type is not valid. Use one of \\`boolean\\`, \\`number\\`, \\`string\\`, or \\`symbol\\` in enum \\`${enumName}\\`.`,\n\n  // TODO: When moving to typescript, we should either have each of the\n  // following errors only accept the specific strings they want:\n  //\n  // ...PrimaryType: explicitType: \"string\" | \"number\" | \"boolean\"\n  // ...SymbolType: explicitType: \"symbol\"\n  // ...UnknownType: explicitType: null\n  //\n  // Or, alternatively, merge these three errors together into one\n  // `EnumInvalidMemberInitializer` error that can accept `EnumExplicitType`\n  // without alteration, and then just have its message change based on the\n  // explicitType.\n  EnumInvalidMemberInitializerPrimaryType: ({\n    enumName,\n    memberName,\n    explicitType,\n  }: {\n    enumName: string;\n    memberName: string;\n    explicitType: EnumExplicitType;\n  }) =>\n    `Enum \\`${enumName}\\` has type \\`${explicitType}\\`, so the initializer of \\`${memberName}\\` needs to be a ${explicitType} literal.`,\n  EnumInvalidMemberInitializerSymbolType: ({\n    enumName,\n    memberName,\n  }: {\n    enumName: string;\n    memberName: string;\n    explicitType: EnumExplicitType;\n  }) =>\n    `Symbol enum members cannot be initialized. Use \\`${memberName},\\` in enum \\`${enumName}\\`.`,\n  EnumInvalidMemberInitializerUnknownType: ({\n    enumName,\n    memberName,\n  }: {\n    enumName: string;\n    memberName: string;\n    explicitType: EnumExplicitType;\n  }) =>\n    `The enum member initializer for \\`${memberName}\\` needs to be a literal (either a boolean, number, or string) in enum \\`${enumName}\\`.`,\n  EnumInvalidMemberName: ({\n    enumName,\n    memberName,\n    suggestion,\n  }: {\n    enumName: string;\n    memberName: string;\n    suggestion: string;\n  }) =>\n    `Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \\`${memberName}\\`, consider using \\`${suggestion}\\`, in enum \\`${enumName}\\`.`,\n  EnumNumberMemberNotInitialized: ({\n    enumName,\n    memberName,\n  }: {\n    enumName: string;\n    memberName: string;\n  }) =>\n    `Number enum members need to be initialized, e.g. \\`${memberName} = 1\\` in enum \\`${enumName}\\`.`,\n  EnumStringMemberInconsistentlyInitialized: ({\n    enumName,\n  }: {\n    enumName: string;\n  }) =>\n    `String enum members need to consistently either all use initializers, or use no initializers, in enum \\`${enumName}\\`.`,\n  GetterMayNotHaveThisParam: \"A getter cannot have a `this` parameter.\",\n  ImportReflectionHasImportType:\n    \"An `import module` declaration can not use `type` or `typeof` keyword.\",\n  ImportTypeShorthandOnlyInPureImport:\n    \"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.\",\n  InexactInsideExact:\n    \"Explicit inexact syntax cannot appear inside an explicit exact object type.\",\n  InexactInsideNonObject:\n    \"Explicit inexact syntax cannot appear in class or interface definitions.\",\n  InexactVariance: \"Explicit inexact syntax cannot have variance.\",\n  InvalidNonTypeImportInDeclareModule:\n    \"Imports within a `declare module` body must always be `import type` or `import typeof`.\",\n  MissingTypeParamDefault:\n    \"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.\",\n  NestedDeclareModule:\n    \"`declare module` cannot be used inside another `declare module`.\",\n  NestedFlowComment: \"Cannot have a flow comment inside another flow comment.\",\n  PatternIsOptional: {\n    message:\n      \"A binding pattern parameter cannot be optional in an implementation signature.\",\n    // For consistency in TypeScript and Flow error codes\n    ...(!process.env.BABEL_8_BREAKING\n      ? { reasonCode: \"OptionalBindingPattern\" }\n      : {}),\n  },\n  SetterMayNotHaveThisParam: \"A setter cannot have a `this` parameter.\",\n  SpreadVariance: \"Spread properties cannot have variance.\",\n  ThisParamAnnotationRequired:\n    \"A type annotation is required for the `this` parameter.\",\n  ThisParamBannedInConstructor:\n    \"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.\",\n  ThisParamMayNotBeOptional: \"The `this` parameter cannot be optional.\",\n  ThisParamMustBeFirst:\n    \"The `this` parameter must be the first function parameter.\",\n  ThisParamNoDefault: \"The `this` parameter may not have a default value.\",\n  TypeBeforeInitializer:\n    \"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.\",\n  TypeCastInPattern:\n    \"The type cast expression is expected to be wrapped with parenthesis.\",\n  UnexpectedExplicitInexactInObject:\n    \"Explicit inexact syntax must appear at the end of an inexact object.\",\n  UnexpectedReservedType: ({ reservedType }: { reservedType: string }) =>\n    `Unexpected reserved type ${reservedType}.`,\n  UnexpectedReservedUnderscore:\n    \"`_` is only allowed as a type argument to call or new.\",\n  UnexpectedSpaceBetweenModuloChecks:\n    \"Spaces between `%` and `checks` are not allowed here.\",\n  UnexpectedSpreadType:\n    \"Spread operator cannot appear in class or interface definitions.\",\n  UnexpectedSubtractionOperand:\n    'Unexpected token, expected \"number\" or \"bigint\".',\n  UnexpectedTokenAfterTypeParameter:\n    \"Expected an arrow function after this type parameter declaration.\",\n  UnexpectedTypeParameterBeforeAsyncArrowFunction:\n    \"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.\",\n  UnsupportedDeclareExportKind: ({\n    unsupportedExportKind,\n    suggestion,\n  }: {\n    unsupportedExportKind: string;\n    suggestion: string;\n  }) =>\n    `\\`declare export ${unsupportedExportKind}\\` is not supported. Use \\`${suggestion}\\` instead.`,\n  UnsupportedStatementInDeclareModule:\n    \"Only declares and type imports are allowed inside declare module.\",\n  UnterminatedFlowComment: \"Unterminated flow-comment.\",\n});\n/* eslint-disable sort-keys */\n\nfunction isEsModuleType(bodyElement: N.Node): boolean {\n  return (\n    bodyElement.type === \"DeclareExportAllDeclaration\" ||\n    (bodyElement.type === \"DeclareExportDeclaration\" &&\n      (!bodyElement.declaration ||\n        (bodyElement.declaration.type !== \"TypeAlias\" &&\n          bodyElement.declaration.type !== \"InterfaceDeclaration\")))\n  );\n}\n\nfunction hasTypeImportKind(\n  node: Undone<N.ImportSpecifier | N.ImportDeclaration>,\n): boolean {\n  return node.importKind === \"type\" || node.importKind === \"typeof\";\n}\n\nconst exportSuggestions = {\n  const: \"declare export var\",\n  let: \"declare export var\",\n  type: \"export type\",\n  interface: \"export interface\",\n};\n\n// Like Array#filter, but returns a tuple [ acceptedElements, discardedElements ]\nfunction partition<T>(\n  list: T[],\n  test: (c: T, b: number, a: T[]) => boolean | undefined | null,\n): [T[], T[]] {\n  const list1: T[] = [];\n  const list2: T[] = [];\n  for (let i = 0; i < list.length; i++) {\n    (test(list[i], i, list) ? list1 : list2).push(list[i]);\n  }\n  return [list1, list2];\n}\n\nconst FLOW_PRAGMA_REGEX = /\\*?\\s*@((?:no)?flow)\\b/;\n\n// Flow enums types\ntype EnumExplicitType = null | \"boolean\" | \"number\" | \"string\" | \"symbol\";\n\ntype EnumContext = {\n  enumName: string;\n  explicitType: EnumExplicitType;\n  memberName: string;\n};\n\ntype EnumMemberInit =\n  | {\n      type: \"number\";\n      loc: Position;\n      value: N.Node;\n    }\n  | {\n      type: \"string\";\n      loc: Position;\n      value: N.Node;\n    }\n  | {\n      type: \"boolean\";\n      loc: Position;\n      value: N.Node;\n    }\n  | {\n      type: \"invalid\";\n      loc: Position;\n    }\n  | {\n      type: \"none\";\n      loc: Position;\n    };\n\nexport default (superClass: ClassWithMixin<typeof Parser, IJSXParserMixin>) =>\n  class FlowParserMixin extends superClass implements Parser {\n    // The value of the @flow/@noflow pragma. Initially undefined, transitions\n    // to \"@flow\" or \"@noflow\" if we see a pragma. Transitions to null if we are\n    // past the initial comment.\n    flowPragma: void | null | \"flow\" | \"noflow\" = undefined;\n\n    getScopeHandler(): new (...args: any) => FlowScopeHandler {\n      return FlowScopeHandler;\n    }\n\n    shouldParseTypes(): boolean {\n      return this.getPluginOption(\"flow\", \"all\") || this.flowPragma === \"flow\";\n    }\n\n    finishToken(type: TokenType, val: any): void {\n      if (\n        type !== tt.string &&\n        type !== tt.semi &&\n        type !== tt.interpreterDirective\n      ) {\n        if (this.flowPragma === undefined) {\n          this.flowPragma = null;\n        }\n      }\n      super.finishToken(type, val);\n    }\n\n    addComment(comment: N.Comment): void {\n      if (this.flowPragma === undefined) {\n        // Try to parse a flow pragma.\n        const matches = FLOW_PRAGMA_REGEX.exec(comment.value);\n        if (!matches) {\n          // do nothing\n        } else if (matches[1] === \"flow\") {\n          this.flowPragma = \"flow\";\n        } else if (matches[1] === \"noflow\") {\n          this.flowPragma = \"noflow\";\n        } else {\n          throw new Error(\"Unexpected flow pragma\");\n        }\n      }\n      super.addComment(comment);\n    }\n\n    flowParseTypeInitialiser(tok?: TokenType): N.FlowType {\n      const oldInType = this.state.inType;\n      this.state.inType = true;\n      this.expect(tok || tt.colon);\n\n      const type = this.flowParseType();\n      this.state.inType = oldInType;\n      return type;\n    }\n\n    flowParsePredicate(): N.FlowPredicate {\n      const node = this.startNode<N.FlowPredicate>();\n      const moduloLoc = this.state.startLoc;\n      this.next(); // eat `%`\n      this.expectContextual(tt._checks);\n      // Force '%' and 'checks' to be adjacent\n      if (this.state.lastTokStartLoc.index > moduloLoc.index + 1) {\n        this.raise(FlowErrors.UnexpectedSpaceBetweenModuloChecks, moduloLoc);\n      }\n      if (this.eat(tt.parenL)) {\n        node.value = super.parseExpression();\n        this.expect(tt.parenR);\n        return this.finishNode(node, \"DeclaredPredicate\");\n      } else {\n        return this.finishNode(node, \"InferredPredicate\");\n      }\n    }\n\n    flowParseTypeAndPredicateInitialiser(): [\n      N.FlowType | undefined | null,\n      N.FlowPredicate | undefined | null,\n    ] {\n      const oldInType = this.state.inType;\n      this.state.inType = true;\n      this.expect(tt.colon);\n      let type = null;\n      let predicate = null;\n      if (this.match(tt.modulo)) {\n        this.state.inType = oldInType;\n        predicate = this.flowParsePredicate();\n      } else {\n        type = this.flowParseType();\n        this.state.inType = oldInType;\n        if (this.match(tt.modulo)) {\n          predicate = this.flowParsePredicate();\n        }\n      }\n      return [type, predicate];\n    }\n\n    flowParseDeclareClass(\n      node: Undone<N.FlowDeclareClass>,\n    ): N.FlowDeclareClass {\n      this.next();\n      this.flowParseInterfaceish(node, /*isClass*/ true);\n      return this.finishNode(node, \"DeclareClass\");\n    }\n\n    flowParseDeclareFunction(\n      node: Undone<N.FlowDeclareFunction>,\n    ): N.FlowDeclareFunction {\n      this.next();\n\n      const id = (node.id = this.parseIdentifier());\n\n      const typeNode = this.startNode<N.FlowFunctionTypeAnnotation>();\n      const typeContainer = this.startNode<N.TypeAnnotation>();\n\n      if (this.match(tt.lt)) {\n        typeNode.typeParameters = this.flowParseTypeParameterDeclaration();\n      } else {\n        typeNode.typeParameters = null;\n      }\n\n      this.expect(tt.parenL);\n      const tmp = this.flowParseFunctionTypeParams();\n      typeNode.params = tmp.params;\n      typeNode.rest = tmp.rest;\n      typeNode.this = tmp._this;\n      this.expect(tt.parenR);\n\n      [typeNode.returnType, node.predicate] =\n        this.flowParseTypeAndPredicateInitialiser();\n\n      typeContainer.typeAnnotation = this.finishNode(\n        typeNode,\n        \"FunctionTypeAnnotation\",\n      );\n\n      id.typeAnnotation = this.finishNode(typeContainer, \"TypeAnnotation\");\n\n      this.resetEndLocation(id);\n      this.semicolon();\n\n      this.scope.declareName(\n        node.id.name,\n        BindingFlag.TYPE_FLOW_DECLARE_FN,\n        node.id.loc.start,\n      );\n\n      return this.finishNode(node, \"DeclareFunction\");\n    }\n\n    flowParseDeclare(\n      node: Undone<N.FlowDeclare>,\n      insideModule?: boolean,\n    ): N.FlowDeclare {\n      if (this.match(tt._class)) {\n        return this.flowParseDeclareClass(node);\n      } else if (this.match(tt._function)) {\n        return this.flowParseDeclareFunction(node);\n      } else if (this.match(tt._var)) {\n        return this.flowParseDeclareVariable(node);\n      } else if (this.eatContextual(tt._module)) {\n        if (this.match(tt.dot)) {\n          return this.flowParseDeclareModuleExports(node);\n        } else {\n          if (insideModule) {\n            this.raise(\n              FlowErrors.NestedDeclareModule,\n              this.state.lastTokStartLoc,\n            );\n          }\n          return this.flowParseDeclareModule(node);\n        }\n      } else if (this.isContextual(tt._type)) {\n        return this.flowParseDeclareTypeAlias(node);\n      } else if (this.isContextual(tt._opaque)) {\n        return this.flowParseDeclareOpaqueType(node);\n      } else if (this.isContextual(tt._interface)) {\n        return this.flowParseDeclareInterface(node);\n      } else if (this.match(tt._export)) {\n        return this.flowParseDeclareExportDeclaration(node, insideModule);\n      } else {\n        this.unexpected();\n      }\n    }\n\n    flowParseDeclareVariable(\n      node: Undone<N.FlowDeclareVariable>,\n    ): N.FlowDeclareVariable {\n      this.next();\n      node.id = this.flowParseTypeAnnotatableIdentifier(\n        /*allowPrimitiveOverride*/ true,\n      );\n      this.scope.declareName(\n        node.id.name,\n        BindingFlag.TYPE_VAR,\n        node.id.loc.start,\n      );\n      this.semicolon();\n      return this.finishNode(node, \"DeclareVariable\");\n    }\n\n    flowParseDeclareModule(\n      node: Undone<N.FlowDeclareModule>,\n    ): N.FlowDeclareModule {\n      this.scope.enter(ScopeFlag.OTHER);\n\n      if (this.match(tt.string)) {\n        node.id = super.parseExprAtom();\n      } else {\n        node.id = this.parseIdentifier();\n      }\n\n      const bodyNode = (node.body = this.startNode<N.BlockStatement>());\n      // @ts-expect-error refine typings\n      const body = (bodyNode.body = []);\n      this.expect(tt.braceL);\n      while (!this.match(tt.braceR)) {\n        let bodyNode = this.startNode<N.ImportDeclaration>();\n\n        if (this.match(tt._import)) {\n          this.next();\n          if (!this.isContextual(tt._type) && !this.match(tt._typeof)) {\n            this.raise(\n              FlowErrors.InvalidNonTypeImportInDeclareModule,\n              this.state.lastTokStartLoc,\n            );\n          }\n          super.parseImport(bodyNode);\n        } else {\n          this.expectContextual(\n            tt._declare,\n            FlowErrors.UnsupportedStatementInDeclareModule,\n          );\n          // @ts-expect-error refine typings\n          bodyNode = this.flowParseDeclare(bodyNode, true);\n        }\n\n        body.push(bodyNode);\n      }\n\n      this.scope.exit();\n\n      this.expect(tt.braceR);\n\n      this.finishNode(bodyNode, \"BlockStatement\");\n\n      let kind: \"CommonJS\" | \"ES\" | null = null;\n      let hasModuleExport = false;\n      body.forEach(bodyElement => {\n        if (isEsModuleType(bodyElement)) {\n          if (kind === \"CommonJS\") {\n            this.raise(FlowErrors.AmbiguousDeclareModuleKind, bodyElement);\n          }\n          kind = \"ES\";\n        } else if (bodyElement.type === \"DeclareModuleExports\") {\n          if (hasModuleExport) {\n            this.raise(FlowErrors.DuplicateDeclareModuleExports, bodyElement);\n          }\n          if (kind === \"ES\") {\n            this.raise(FlowErrors.AmbiguousDeclareModuleKind, bodyElement);\n          }\n          kind = \"CommonJS\";\n          hasModuleExport = true;\n        }\n      });\n\n      node.kind = kind || \"CommonJS\";\n      return this.finishNode(node, \"DeclareModule\");\n    }\n\n    flowParseDeclareExportDeclaration(\n      node: Undone<N.FlowDeclareExportDeclaration>,\n      insideModule?: boolean | null,\n    ): N.FlowDeclareExportDeclaration {\n      this.expect(tt._export);\n\n      if (this.eat(tt._default)) {\n        if (this.match(tt._function) || this.match(tt._class)) {\n          // declare export default class ...\n          // declare export default function ...\n          node.declaration = this.flowParseDeclare(this.startNode());\n        } else {\n          // declare export default [type];\n          node.declaration = this.flowParseType();\n          this.semicolon();\n        }\n        node.default = true;\n\n        return this.finishNode(node, \"DeclareExportDeclaration\");\n      } else {\n        if (\n          this.match(tt._const) ||\n          this.isLet() ||\n          ((this.isContextual(tt._type) || this.isContextual(tt._interface)) &&\n            !insideModule)\n        ) {\n          const label = this.state.value as\n            | \"const\"\n            | \"let\"\n            | \"type\"\n            | \"interface\";\n          throw this.raise(\n            FlowErrors.UnsupportedDeclareExportKind,\n            this.state.startLoc,\n            {\n              unsupportedExportKind: label,\n              suggestion: exportSuggestions[label],\n            },\n          );\n        }\n\n        if (\n          this.match(tt._var) || // declare export var ...\n          this.match(tt._function) || // declare export function ...\n          this.match(tt._class) || // declare export class ...\n          this.isContextual(tt._opaque) // declare export opaque ..\n        ) {\n          node.declaration = this.flowParseDeclare(this.startNode());\n          node.default = false;\n\n          return this.finishNode(node, \"DeclareExportDeclaration\");\n        } else if (\n          this.match(tt.star) || // declare export * from ''\n          this.match(tt.braceL) || // declare export {} ...\n          this.isContextual(tt._interface) || // declare export interface ...\n          this.isContextual(tt._type) || // declare export type ...\n          this.isContextual(tt._opaque) // declare export opaque type ...\n        ) {\n          node = this.parseExport(\n            node as Undone<N.ExportNamedDeclaration | N.ExportAllDeclaration>,\n            /* decorators */ null,\n          );\n          if (node.type === \"ExportNamedDeclaration\") {\n            node.default = false;\n            delete node.exportKind;\n            return this.castNodeTo(\n              node as N.ExportNamedDeclaration,\n              \"DeclareExportDeclaration\",\n            );\n          } else {\n            return this.castNodeTo(\n              node as N.ExportAllDeclaration,\n              \"DeclareExportAllDeclaration\",\n            );\n          }\n        }\n      }\n\n      this.unexpected();\n    }\n\n    flowParseDeclareModuleExports(\n      node: Undone<N.FlowDeclareModuleExports>,\n    ): N.FlowDeclareModuleExports {\n      this.next();\n      this.expectContextual(tt._exports);\n      node.typeAnnotation = this.flowParseTypeAnnotation();\n      this.semicolon();\n\n      return this.finishNode(node, \"DeclareModuleExports\");\n    }\n\n    flowParseDeclareTypeAlias(\n      node: Undone<N.FlowDeclareTypeAlias>,\n    ): N.FlowDeclareTypeAlias {\n      this.next();\n      const finished = this.flowParseTypeAlias(\n        node,\n      ) as unknown as N.FlowDeclareTypeAlias;\n      // Don't do finishNode as we don't want to process comments twice\n      this.castNodeTo(finished, \"DeclareTypeAlias\");\n      return finished;\n    }\n\n    flowParseDeclareOpaqueType(\n      node: Undone<N.FlowDeclareOpaqueType>,\n    ): N.FlowDeclareOpaqueType {\n      this.next();\n      const finished = this.flowParseOpaqueType(\n        node,\n        true,\n      ) as unknown as N.FlowDeclareOpaqueType;\n      // Don't do finishNode as we don't want to process comments twice\n      this.castNodeTo(finished, \"DeclareOpaqueType\");\n      return finished;\n    }\n\n    flowParseDeclareInterface(\n      node: Undone<N.FlowDeclareInterface>,\n    ): N.FlowDeclareInterface {\n      this.next();\n      this.flowParseInterfaceish(node, /* isClass */ false);\n      return this.finishNode(node, \"DeclareInterface\");\n    }\n\n    // Interfaces\n\n    flowParseInterfaceish(node: Undone<N.FlowDeclare>, isClass: boolean): void {\n      node.id = this.flowParseRestrictedIdentifier(\n        /* liberal */ !isClass,\n        /* declaration */ true,\n      );\n\n      this.scope.declareName(\n        node.id.name,\n        isClass ? BindingFlag.TYPE_FUNCTION : BindingFlag.TYPE_LEXICAL,\n        node.id.loc.start,\n      );\n\n      if (this.match(tt.lt)) {\n        node.typeParameters = this.flowParseTypeParameterDeclaration();\n      } else {\n        node.typeParameters = null;\n      }\n\n      node.extends = [];\n\n      if (this.eat(tt._extends)) {\n        do {\n          node.extends.push(this.flowParseInterfaceExtends());\n        } while (!isClass && this.eat(tt.comma));\n      }\n\n      if (isClass) {\n        node.implements = [];\n        node.mixins = [];\n\n        if (this.eatContextual(tt._mixins)) {\n          do {\n            node.mixins.push(this.flowParseInterfaceExtends());\n          } while (this.eat(tt.comma));\n        }\n\n        if (this.eatContextual(tt._implements)) {\n          do {\n            node.implements.push(this.flowParseInterfaceExtends());\n          } while (this.eat(tt.comma));\n        }\n      }\n\n      node.body = this.flowParseObjectType({\n        allowStatic: isClass,\n        allowExact: false,\n        allowSpread: false,\n        allowProto: isClass,\n        allowInexact: false,\n      });\n    }\n\n    flowParseInterfaceExtends(): N.FlowInterfaceExtends {\n      const node = this.startNode<N.FlowInterfaceExtends>();\n\n      node.id = this.flowParseQualifiedTypeIdentifier();\n      if (this.match(tt.lt)) {\n        node.typeParameters = this.flowParseTypeParameterInstantiation();\n      } else {\n        node.typeParameters = null;\n      }\n\n      return this.finishNode(node, \"InterfaceExtends\");\n    }\n\n    flowParseInterface(node: Undone<N.FlowInterface>): N.FlowInterface {\n      this.flowParseInterfaceish(node, /* isClass */ false);\n      return this.finishNode(node, \"InterfaceDeclaration\");\n    }\n\n    checkNotUnderscore(word: string) {\n      if (word === \"_\") {\n        this.raise(\n          FlowErrors.UnexpectedReservedUnderscore,\n          this.state.startLoc,\n        );\n      }\n    }\n\n    checkReservedType(word: string, startLoc: Position, declaration?: boolean) {\n      if (!reservedTypes.has(word)) return;\n\n      this.raise(\n        declaration\n          ? FlowErrors.AssignReservedType\n          : FlowErrors.UnexpectedReservedType,\n        startLoc,\n        {\n          reservedType: word,\n        },\n      );\n    }\n\n    flowParseRestrictedIdentifier(\n      liberal?: boolean,\n      declaration?: boolean,\n    ): N.Identifier {\n      this.checkReservedType(\n        this.state.value,\n        this.state.startLoc,\n        declaration,\n      );\n      return this.parseIdentifier(liberal);\n    }\n\n    // Type aliases\n\n    flowParseTypeAlias(node: Undone<N.FlowTypeAlias>): N.FlowTypeAlias {\n      node.id = this.flowParseRestrictedIdentifier(\n        /* liberal */ false,\n        /* declaration */ true,\n      );\n      this.scope.declareName(\n        node.id.name,\n        BindingFlag.TYPE_LEXICAL,\n        node.id.loc.start,\n      );\n\n      if (this.match(tt.lt)) {\n        node.typeParameters = this.flowParseTypeParameterDeclaration();\n      } else {\n        node.typeParameters = null;\n      }\n\n      node.right = this.flowParseTypeInitialiser(tt.eq);\n      this.semicolon();\n\n      return this.finishNode(node, \"TypeAlias\");\n    }\n\n    flowParseOpaqueType(\n      node: Undone<N.FlowOpaqueType>,\n      declare: boolean,\n    ): N.FlowOpaqueType {\n      this.expectContextual(tt._type);\n      node.id = this.flowParseRestrictedIdentifier(\n        /* liberal */ true,\n        /* declaration */ true,\n      );\n      this.scope.declareName(\n        node.id.name,\n        BindingFlag.TYPE_LEXICAL,\n        node.id.loc.start,\n      );\n\n      if (this.match(tt.lt)) {\n        node.typeParameters = this.flowParseTypeParameterDeclaration();\n      } else {\n        node.typeParameters = null;\n      }\n\n      // Parse the supertype\n      node.supertype = null;\n      if (this.match(tt.colon)) {\n        node.supertype = this.flowParseTypeInitialiser(tt.colon);\n      }\n\n      node.impltype = null;\n      if (!declare) {\n        node.impltype = this.flowParseTypeInitialiser(tt.eq);\n      }\n      this.semicolon();\n\n      return this.finishNode(node, \"OpaqueType\");\n    }\n\n    // Type annotations\n\n    flowParseTypeParameter(requireDefault: boolean = false): N.TypeParameter {\n      const nodeStartLoc = this.state.startLoc;\n\n      const node = this.startNode<N.TypeParameter>();\n\n      const variance = this.flowParseVariance();\n\n      const ident = this.flowParseTypeAnnotatableIdentifier();\n      node.name = ident.name;\n      // @ts-expect-error migrate to Babel types\n      node.variance = variance;\n      // @ts-expect-error migrate to Babel types\n      node.bound = ident.typeAnnotation;\n\n      if (this.match(tt.eq)) {\n        this.eat(tt.eq);\n        // @ts-expect-error migrate to Babel types\n        node.default = this.flowParseType();\n      } else {\n        if (requireDefault) {\n          this.raise(FlowErrors.MissingTypeParamDefault, nodeStartLoc);\n        }\n      }\n\n      return this.finishNode(node, \"TypeParameter\");\n    }\n\n    flowParseTypeParameterDeclaration(): N.TypeParameterDeclaration {\n      const oldInType = this.state.inType;\n      const node = this.startNode<N.TypeParameterDeclaration>();\n      node.params = [];\n\n      this.state.inType = true;\n\n      // istanbul ignore else: this condition is already checked at all call sites\n      if (this.match(tt.lt) || this.match(tt.jsxTagStart)) {\n        this.next();\n      } else {\n        this.unexpected();\n      }\n\n      let defaultRequired = false;\n\n      do {\n        const typeParameter = this.flowParseTypeParameter(defaultRequired);\n\n        node.params.push(typeParameter);\n\n        if (typeParameter.default) {\n          defaultRequired = true;\n        }\n\n        if (!this.match(tt.gt)) {\n          this.expect(tt.comma);\n        }\n      } while (!this.match(tt.gt));\n      this.expect(tt.gt);\n\n      this.state.inType = oldInType;\n\n      return this.finishNode(node, \"TypeParameterDeclaration\");\n    }\n\n    // Parse in top level normal context if we are in a JSX context\n    flowInTopLevelContext<T>(cb: () => T): T {\n      if (this.curContext() !== tc.brace) {\n        const oldContext = this.state.context;\n        this.state.context = [oldContext[0]];\n        try {\n          return cb();\n        } finally {\n          this.state.context = oldContext;\n        }\n      } else {\n        return cb();\n      }\n    }\n\n    // Used when parsing type arguments from ES or JSX productions, where the first token\n    // has been created without state.inType. Thus we need to re-scan the lt token.\n    flowParseTypeParameterInstantiationInExpression():\n      | N.TypeParameterInstantiation\n      | undefined {\n      if (this.reScan_lt() !== tt.lt) return;\n      return this.flowParseTypeParameterInstantiation();\n    }\n\n    flowParseTypeParameterInstantiation(): N.TypeParameterInstantiation {\n      const node = this.startNode<N.TypeParameterInstantiation>();\n      const oldInType = this.state.inType;\n\n      this.state.inType = true;\n      node.params = [];\n      this.flowInTopLevelContext(() => {\n        this.expect(tt.lt);\n        const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n        this.state.noAnonFunctionType = false;\n        while (!this.match(tt.gt)) {\n          node.params.push(this.flowParseType());\n          if (!this.match(tt.gt)) {\n            this.expect(tt.comma);\n          }\n        }\n        this.state.noAnonFunctionType = oldNoAnonFunctionType;\n      });\n\n      this.state.inType = oldInType;\n      if (!this.state.inType && this.curContext() === tc.brace) {\n        // rescan `>` when we are no longer in type context and JSX parsing context\n        // since it was tokenized when `inType` is `true`.\n        this.reScan_lt_gt();\n      }\n      this.expect(tt.gt);\n\n      return this.finishNode(node, \"TypeParameterInstantiation\");\n    }\n\n    flowParseTypeParameterInstantiationCallOrNew(): N.TypeParameterInstantiation {\n      if (this.reScan_lt() !== tt.lt) return;\n      const node = this.startNode<N.TypeParameterInstantiation>();\n      const oldInType = this.state.inType;\n      node.params = [];\n\n      this.state.inType = true;\n\n      this.expect(tt.lt);\n      while (!this.match(tt.gt)) {\n        node.params.push(this.flowParseTypeOrImplicitInstantiation());\n        if (!this.match(tt.gt)) {\n          this.expect(tt.comma);\n        }\n      }\n      this.expect(tt.gt);\n\n      this.state.inType = oldInType;\n\n      return this.finishNode(node, \"TypeParameterInstantiation\");\n    }\n\n    flowParseInterfaceType(): N.FlowInterfaceType {\n      const node = this.startNode<N.FlowInterfaceType>();\n      this.expectContextual(tt._interface);\n\n      node.extends = [];\n      if (this.eat(tt._extends)) {\n        do {\n          node.extends.push(this.flowParseInterfaceExtends());\n        } while (this.eat(tt.comma));\n      }\n\n      node.body = this.flowParseObjectType({\n        allowStatic: false,\n        allowExact: false,\n        allowSpread: false,\n        allowProto: false,\n        allowInexact: false,\n      });\n\n      return this.finishNode(node, \"InterfaceTypeAnnotation\");\n    }\n\n    flowParseObjectPropertyKey(): N.Expression {\n      return this.match(tt.num) || this.match(tt.string)\n        ? super.parseExprAtom()\n        : this.parseIdentifier(true);\n    }\n\n    flowParseObjectTypeIndexer(\n      node: Undone<N.FlowObjectTypeIndexer>,\n      isStatic: boolean,\n      variance?: N.FlowVariance | null,\n    ): N.FlowObjectTypeIndexer {\n      node.static = isStatic;\n\n      // Note: bracketL has already been consumed\n      if (this.lookahead().type === tt.colon) {\n        node.id = this.flowParseObjectPropertyKey();\n        node.key = this.flowParseTypeInitialiser();\n      } else {\n        node.id = null;\n        node.key = this.flowParseType();\n      }\n      this.expect(tt.bracketR);\n      node.value = this.flowParseTypeInitialiser();\n      node.variance = variance;\n\n      return this.finishNode(node, \"ObjectTypeIndexer\");\n    }\n\n    flowParseObjectTypeInternalSlot(\n      node: Undone<N.FlowObjectTypeInternalSlot>,\n      isStatic: boolean,\n    ): N.FlowObjectTypeInternalSlot {\n      node.static = isStatic;\n      // Note: both bracketL have already been consumed\n      node.id = this.flowParseObjectPropertyKey();\n      this.expect(tt.bracketR);\n      this.expect(tt.bracketR);\n      if (this.match(tt.lt) || this.match(tt.parenL)) {\n        node.method = true;\n        node.optional = false;\n        node.value = this.flowParseObjectTypeMethodish(\n          this.startNodeAt(node.loc.start),\n        );\n      } else {\n        node.method = false;\n        if (this.eat(tt.question)) {\n          node.optional = true;\n        }\n        node.value = this.flowParseTypeInitialiser();\n      }\n      return this.finishNode(node, \"ObjectTypeInternalSlot\");\n    }\n\n    flowParseObjectTypeMethodish(\n      node: Undone<N.FlowFunctionTypeAnnotation>,\n    ): N.FlowFunctionTypeAnnotation {\n      node.params = [];\n      node.rest = null;\n      node.typeParameters = null;\n      node.this = null;\n\n      if (this.match(tt.lt)) {\n        node.typeParameters = this.flowParseTypeParameterDeclaration();\n      }\n\n      this.expect(tt.parenL);\n      if (this.match(tt._this)) {\n        node.this = this.flowParseFunctionTypeParam(/* first */ true);\n        // match Flow parser behavior\n        node.this.name = null;\n        if (!this.match(tt.parenR)) {\n          this.expect(tt.comma);\n        }\n      }\n      while (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {\n        node.params.push(this.flowParseFunctionTypeParam(false));\n        if (!this.match(tt.parenR)) {\n          this.expect(tt.comma);\n        }\n      }\n\n      if (this.eat(tt.ellipsis)) {\n        node.rest = this.flowParseFunctionTypeParam(false);\n      }\n      this.expect(tt.parenR);\n      node.returnType = this.flowParseTypeInitialiser();\n\n      return this.finishNode(node, \"FunctionTypeAnnotation\");\n    }\n\n    flowParseObjectTypeCallProperty(\n      node: Undone<N.FlowObjectTypeCallProperty>,\n      isStatic: boolean,\n    ): N.FlowObjectTypeCallProperty {\n      const valueNode = this.startNode();\n      node.static = isStatic;\n      node.value = this.flowParseObjectTypeMethodish(valueNode);\n      return this.finishNode(node, \"ObjectTypeCallProperty\");\n    }\n\n    flowParseObjectType({\n      allowStatic,\n      allowExact,\n      allowSpread,\n      allowProto,\n      allowInexact,\n    }: {\n      allowStatic: boolean;\n      allowExact: boolean;\n      allowSpread: boolean;\n      allowProto: boolean;\n      allowInexact: boolean;\n    }): N.FlowObjectTypeAnnotation {\n      const oldInType = this.state.inType;\n      this.state.inType = true;\n\n      const nodeStart = this.startNode<N.FlowObjectTypeAnnotation>();\n\n      nodeStart.callProperties = [];\n      nodeStart.properties = [];\n      nodeStart.indexers = [];\n      nodeStart.internalSlots = [];\n\n      let endDelim;\n      let exact;\n      let inexact = false;\n      if (allowExact && this.match(tt.braceBarL)) {\n        this.expect(tt.braceBarL);\n        endDelim = tt.braceBarR;\n        exact = true;\n      } else {\n        this.expect(tt.braceL);\n        endDelim = tt.braceR;\n        exact = false;\n      }\n\n      nodeStart.exact = exact;\n\n      while (!this.match(endDelim)) {\n        let isStatic = false;\n        let protoStartLoc: Position | undefined | null = null;\n        let inexactStartLoc: Position | undefined | null = null;\n        const node = this.startNode();\n\n        if (allowProto && this.isContextual(tt._proto)) {\n          const lookahead = this.lookahead();\n\n          if (lookahead.type !== tt.colon && lookahead.type !== tt.question) {\n            this.next();\n            protoStartLoc = this.state.startLoc;\n            allowStatic = false;\n          }\n        }\n\n        if (allowStatic && this.isContextual(tt._static)) {\n          const lookahead = this.lookahead();\n\n          // static is a valid identifier name\n          if (lookahead.type !== tt.colon && lookahead.type !== tt.question) {\n            this.next();\n            isStatic = true;\n          }\n        }\n\n        const variance = this.flowParseVariance();\n\n        if (this.eat(tt.bracketL)) {\n          if (protoStartLoc != null) {\n            this.unexpected(protoStartLoc);\n          }\n          if (this.eat(tt.bracketL)) {\n            if (variance) {\n              this.unexpected(variance.loc.start);\n            }\n            nodeStart.internalSlots.push(\n              this.flowParseObjectTypeInternalSlot(node, isStatic),\n            );\n          } else {\n            nodeStart.indexers.push(\n              this.flowParseObjectTypeIndexer(node, isStatic, variance),\n            );\n          }\n        } else if (this.match(tt.parenL) || this.match(tt.lt)) {\n          if (protoStartLoc != null) {\n            this.unexpected(protoStartLoc);\n          }\n          if (variance) {\n            this.unexpected(variance.loc.start);\n          }\n          nodeStart.callProperties.push(\n            this.flowParseObjectTypeCallProperty(node, isStatic),\n          );\n        } else {\n          let kind = \"init\";\n\n          if (this.isContextual(tt._get) || this.isContextual(tt._set)) {\n            const lookahead = this.lookahead();\n            if (tokenIsLiteralPropertyName(lookahead.type)) {\n              kind = this.state.value;\n              this.next();\n            }\n          }\n\n          const propOrInexact = this.flowParseObjectTypeProperty(\n            node,\n            isStatic,\n            protoStartLoc,\n            variance,\n            kind,\n            allowSpread,\n            allowInexact ?? !exact,\n          );\n\n          if (propOrInexact === null) {\n            inexact = true;\n            inexactStartLoc = this.state.lastTokStartLoc;\n          } else {\n            nodeStart.properties.push(propOrInexact);\n          }\n        }\n\n        this.flowObjectTypeSemicolon();\n\n        if (\n          inexactStartLoc &&\n          !this.match(tt.braceR) &&\n          !this.match(tt.braceBarR)\n        ) {\n          this.raise(\n            FlowErrors.UnexpectedExplicitInexactInObject,\n            inexactStartLoc,\n          );\n        }\n      }\n\n      this.expect(endDelim);\n\n      /* The inexact flag should only be added on ObjectTypeAnnotations that\n       * are not the body of an interface, declare interface, or declare class.\n       * Since spreads are only allowed in object types, checking that is\n       * sufficient here.\n       */\n      if (allowSpread) {\n        nodeStart.inexact = inexact;\n      }\n\n      const out = this.finishNode(nodeStart, \"ObjectTypeAnnotation\");\n\n      this.state.inType = oldInType;\n\n      return out;\n    }\n\n    flowParseObjectTypeProperty(\n      node: Undone<N.FlowObjectTypeProperty | N.FlowObjectTypeSpreadProperty>,\n      isStatic: boolean,\n      protoStartLoc: Position | undefined | null,\n      variance: N.FlowVariance | undefined | null,\n      kind: string,\n      allowSpread: boolean,\n      allowInexact: boolean,\n    ): N.FlowObjectTypeProperty | N.FlowObjectTypeSpreadProperty | null {\n      if (this.eat(tt.ellipsis)) {\n        const isInexactToken =\n          this.match(tt.comma) ||\n          this.match(tt.semi) ||\n          this.match(tt.braceR) ||\n          this.match(tt.braceBarR);\n\n        if (isInexactToken) {\n          if (!allowSpread) {\n            this.raise(\n              FlowErrors.InexactInsideNonObject,\n              this.state.lastTokStartLoc,\n            );\n          } else if (!allowInexact) {\n            this.raise(\n              FlowErrors.InexactInsideExact,\n              this.state.lastTokStartLoc,\n            );\n          }\n          if (variance) {\n            this.raise(FlowErrors.InexactVariance, variance);\n          }\n\n          return null;\n        }\n\n        if (!allowSpread) {\n          this.raise(\n            FlowErrors.UnexpectedSpreadType,\n            this.state.lastTokStartLoc,\n          );\n        }\n        if (protoStartLoc != null) {\n          this.unexpected(protoStartLoc);\n        }\n        if (variance) {\n          this.raise(FlowErrors.SpreadVariance, variance);\n        }\n\n        node.argument = this.flowParseType();\n        return this.finishNode(node, \"ObjectTypeSpreadProperty\");\n      } else {\n        node.key = this.flowParseObjectPropertyKey();\n        node.static = isStatic;\n        node.proto = protoStartLoc != null;\n        node.kind = kind;\n\n        let optional = false;\n        if (this.match(tt.lt) || this.match(tt.parenL)) {\n          // This is a method property\n          node.method = true;\n\n          if (protoStartLoc != null) {\n            this.unexpected(protoStartLoc);\n          }\n          if (variance) {\n            this.unexpected(variance.loc.start);\n          }\n\n          node.value = this.flowParseObjectTypeMethodish(\n            this.startNodeAt(node.loc.start),\n          );\n          if (kind === \"get\" || kind === \"set\") {\n            this.flowCheckGetterSetterParams(node);\n          }\n          /** Declared classes/interfaces do not allow spread */\n          if (\n            !allowSpread &&\n            node.key.name === \"constructor\" &&\n            node.value.this\n          ) {\n            this.raise(\n              FlowErrors.ThisParamBannedInConstructor,\n              node.value.this,\n            );\n          }\n        } else {\n          if (kind !== \"init\") this.unexpected();\n\n          node.method = false;\n\n          if (this.eat(tt.question)) {\n            optional = true;\n          }\n          node.value = this.flowParseTypeInitialiser();\n          node.variance = variance;\n        }\n\n        node.optional = optional;\n\n        return this.finishNode(node, \"ObjectTypeProperty\");\n      }\n    }\n\n    // This is similar to checkGetterSetterParams, but as\n    // @babel/parser uses non estree properties we cannot reuse it here\n    flowCheckGetterSetterParams(\n      property: Undone<\n        N.FlowObjectTypeProperty | N.FlowObjectTypeSpreadProperty\n      >,\n    ): void {\n      const paramCount = property.kind === \"get\" ? 0 : 1;\n      const length =\n        property.value.params.length + (property.value.rest ? 1 : 0);\n\n      if (property.value.this) {\n        this.raise(\n          property.kind === \"get\"\n            ? FlowErrors.GetterMayNotHaveThisParam\n            : FlowErrors.SetterMayNotHaveThisParam,\n          property.value.this,\n        );\n      }\n\n      if (length !== paramCount) {\n        this.raise(\n          property.kind === \"get\"\n            ? Errors.BadGetterArity\n            : Errors.BadSetterArity,\n          property,\n        );\n      }\n\n      if (property.kind === \"set\" && property.value.rest) {\n        this.raise(Errors.BadSetterRestParameter, property);\n      }\n    }\n\n    flowObjectTypeSemicolon(): void {\n      if (\n        !this.eat(tt.semi) &&\n        !this.eat(tt.comma) &&\n        !this.match(tt.braceR) &&\n        !this.match(tt.braceBarR)\n      ) {\n        this.unexpected();\n      }\n    }\n\n    flowParseQualifiedTypeIdentifier(\n      startLoc?: Position,\n      id?: N.Identifier,\n    ): N.FlowQualifiedTypeIdentifier | N.Identifier {\n      startLoc ??= this.state.startLoc;\n      let node: N.Identifier | N.FlowQualifiedTypeIdentifier =\n        id || this.flowParseRestrictedIdentifier(true);\n\n      while (this.eat(tt.dot)) {\n        const node2 = this.startNodeAt<N.FlowQualifiedTypeIdentifier>(startLoc);\n        node2.qualification = node;\n        node2.id = this.flowParseRestrictedIdentifier(true);\n        node = this.finishNode(node2, \"QualifiedTypeIdentifier\");\n      }\n\n      return node;\n    }\n\n    flowParseGenericType(\n      startLoc: Position,\n      id: N.Identifier,\n    ): N.FlowGenericTypeAnnotation {\n      const node = this.startNodeAt<N.FlowGenericTypeAnnotation>(startLoc);\n\n      node.typeParameters = null;\n      node.id = this.flowParseQualifiedTypeIdentifier(startLoc, id);\n\n      if (this.match(tt.lt)) {\n        node.typeParameters = this.flowParseTypeParameterInstantiation();\n      }\n\n      return this.finishNode(node, \"GenericTypeAnnotation\");\n    }\n\n    flowParseTypeofType(): N.FlowTypeofTypeAnnotation {\n      const node = this.startNode<N.FlowTypeofTypeAnnotation>();\n      this.expect(tt._typeof);\n      node.argument = this.flowParsePrimaryType();\n      return this.finishNode(node, \"TypeofTypeAnnotation\");\n    }\n\n    flowParseTupleType(): N.FlowTupleTypeAnnotation {\n      const node = this.startNode<N.FlowTupleTypeAnnotation>();\n      node.types = [];\n      this.expect(tt.bracketL);\n      // We allow trailing commas\n      while (this.state.pos < this.length && !this.match(tt.bracketR)) {\n        node.types.push(this.flowParseType());\n        if (this.match(tt.bracketR)) break;\n        this.expect(tt.comma);\n      }\n      this.expect(tt.bracketR);\n      return this.finishNode(node, \"TupleTypeAnnotation\");\n    }\n\n    flowParseFunctionTypeParam(first: boolean): N.FlowFunctionTypeParam {\n      let name = null;\n      let optional = false;\n      let typeAnnotation = null;\n      const node = this.startNode<N.FlowFunctionTypeParam>();\n      const lh = this.lookahead();\n      const isThis = this.state.type === tt._this;\n\n      if (lh.type === tt.colon || lh.type === tt.question) {\n        if (isThis && !first) {\n          this.raise(FlowErrors.ThisParamMustBeFirst, node);\n        }\n        name = this.parseIdentifier(isThis);\n        if (this.eat(tt.question)) {\n          optional = true;\n          if (isThis) {\n            this.raise(FlowErrors.ThisParamMayNotBeOptional, node);\n          }\n        }\n        typeAnnotation = this.flowParseTypeInitialiser();\n      } else {\n        typeAnnotation = this.flowParseType();\n      }\n      node.name = name;\n      node.optional = optional;\n      node.typeAnnotation = typeAnnotation;\n      return this.finishNode(node, \"FunctionTypeParam\");\n    }\n\n    reinterpretTypeAsFunctionTypeParam(\n      type: N.FlowType,\n    ): N.FlowFunctionTypeParam {\n      const node = this.startNodeAt<N.FlowFunctionTypeParam>(type.loc.start);\n      node.name = null;\n      node.optional = false;\n      node.typeAnnotation = type;\n      return this.finishNode(node, \"FunctionTypeParam\");\n    }\n\n    flowParseFunctionTypeParams(params: N.FlowFunctionTypeParam[] = []): {\n      params: N.FlowFunctionTypeParam[];\n      rest: N.FlowFunctionTypeParam | undefined | null;\n      _this: N.FlowFunctionTypeParam | undefined | null;\n    } {\n      let rest: N.FlowFunctionTypeParam | undefined | null = null;\n      let _this: N.FlowFunctionTypeParam | undefined | null = null;\n      if (this.match(tt._this)) {\n        _this = this.flowParseFunctionTypeParam(/* first */ true);\n        // match Flow parser behavior\n        _this.name = null;\n        if (!this.match(tt.parenR)) {\n          this.expect(tt.comma);\n        }\n      }\n      while (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {\n        params.push(this.flowParseFunctionTypeParam(false));\n        if (!this.match(tt.parenR)) {\n          this.expect(tt.comma);\n        }\n      }\n      if (this.eat(tt.ellipsis)) {\n        rest = this.flowParseFunctionTypeParam(false);\n      }\n      return { params, rest, _this };\n    }\n\n    flowIdentToTypeAnnotation(\n      startLoc: Position,\n      node: Undone<N.FlowType>,\n      id: N.Identifier,\n    ): N.FlowType {\n      switch (id.name) {\n        case \"any\":\n          return this.finishNode(node, \"AnyTypeAnnotation\");\n\n        case \"bool\":\n        case \"boolean\":\n          return this.finishNode(node, \"BooleanTypeAnnotation\");\n\n        case \"mixed\":\n          return this.finishNode(node, \"MixedTypeAnnotation\");\n\n        case \"empty\":\n          return this.finishNode(node, \"EmptyTypeAnnotation\");\n\n        case \"number\":\n          return this.finishNode(node, \"NumberTypeAnnotation\");\n\n        case \"string\":\n          return this.finishNode(node, \"StringTypeAnnotation\");\n\n        case \"symbol\":\n          return this.finishNode(node, \"SymbolTypeAnnotation\");\n\n        default:\n          this.checkNotUnderscore(id.name);\n          return this.flowParseGenericType(startLoc, id);\n      }\n    }\n\n    // The parsing of types roughly parallels the parsing of expressions, and\n    // primary types are kind of like primary expressions...they're the\n    // primitives with which other types are constructed.\n    flowParsePrimaryType(): N.FlowType {\n      const startLoc = this.state.startLoc;\n      const node = this.startNode<N.FlowOtherTypeAnnotation>();\n      let tmp;\n      let type;\n      let isGroupedType = false;\n      const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n\n      switch (this.state.type) {\n        case tt.braceL:\n          return this.flowParseObjectType({\n            allowStatic: false,\n            allowExact: false,\n            allowSpread: true,\n            allowProto: false,\n            allowInexact: true,\n          });\n\n        case tt.braceBarL:\n          return this.flowParseObjectType({\n            allowStatic: false,\n            allowExact: true,\n            allowSpread: true,\n            allowProto: false,\n            allowInexact: false,\n          });\n\n        case tt.bracketL:\n          this.state.noAnonFunctionType = false;\n          type = this.flowParseTupleType();\n          this.state.noAnonFunctionType = oldNoAnonFunctionType;\n          return type;\n\n        case tt.lt: {\n          const node = this.startNode<N.FlowFunctionTypeAnnotation>();\n          node.typeParameters = this.flowParseTypeParameterDeclaration();\n          this.expect(tt.parenL);\n          tmp = this.flowParseFunctionTypeParams();\n          node.params = tmp.params;\n          node.rest = tmp.rest;\n          node.this = tmp._this;\n          this.expect(tt.parenR);\n\n          this.expect(tt.arrow);\n\n          node.returnType = this.flowParseType();\n\n          return this.finishNode(node, \"FunctionTypeAnnotation\");\n        }\n\n        case tt.parenL: {\n          const node = this.startNode<N.FlowFunctionTypeAnnotation>();\n          this.next();\n\n          // Check to see if this is actually a grouped type\n          if (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {\n            if (tokenIsIdentifier(this.state.type) || this.match(tt._this)) {\n              const token = this.lookahead().type;\n              isGroupedType = token !== tt.question && token !== tt.colon;\n            } else {\n              isGroupedType = true;\n            }\n          }\n\n          if (isGroupedType) {\n            this.state.noAnonFunctionType = false;\n            type = this.flowParseType();\n            this.state.noAnonFunctionType = oldNoAnonFunctionType;\n\n            // A `,` or a `) =>` means this is an anonymous function type\n            if (\n              this.state.noAnonFunctionType ||\n              !(\n                this.match(tt.comma) ||\n                (this.match(tt.parenR) && this.lookahead().type === tt.arrow)\n              )\n            ) {\n              this.expect(tt.parenR);\n              return type;\n            } else {\n              // Eat a comma if there is one\n              this.eat(tt.comma);\n            }\n          }\n\n          if (type) {\n            tmp = this.flowParseFunctionTypeParams([\n              this.reinterpretTypeAsFunctionTypeParam(type),\n            ]);\n          } else {\n            tmp = this.flowParseFunctionTypeParams();\n          }\n\n          node.params = tmp.params;\n          node.rest = tmp.rest;\n          node.this = tmp._this;\n\n          this.expect(tt.parenR);\n\n          this.expect(tt.arrow);\n\n          node.returnType = this.flowParseType();\n\n          node.typeParameters = null;\n\n          return this.finishNode(node, \"FunctionTypeAnnotation\");\n        }\n\n        case tt.string:\n          return this.parseLiteral<N.StringLiteralTypeAnnotation>(\n            this.state.value,\n            \"StringLiteralTypeAnnotation\",\n          );\n\n        case tt._true:\n        case tt._false:\n          node.value = this.match(tt._true);\n          this.next();\n          return this.finishNode(\n            node as Undone<N.BooleanLiteralTypeAnnotation>,\n            \"BooleanLiteralTypeAnnotation\",\n          );\n\n        case tt.plusMin:\n          if (this.state.value === \"-\") {\n            this.next();\n            if (this.match(tt.num)) {\n              return this.parseLiteralAtNode<N.NumberLiteralTypeAnnotation>(\n                -this.state.value,\n                \"NumberLiteralTypeAnnotation\",\n                node,\n              );\n            }\n\n            if (this.match(tt.bigint)) {\n              return this.parseLiteralAtNode<N.BigIntLiteralTypeAnnotation>(\n                -this.state.value,\n                \"BigIntLiteralTypeAnnotation\",\n                node,\n              );\n            }\n\n            throw this.raise(\n              FlowErrors.UnexpectedSubtractionOperand,\n              this.state.startLoc,\n            );\n          }\n          this.unexpected();\n          return;\n        case tt.num:\n          return this.parseLiteral(\n            this.state.value,\n            \"NumberLiteralTypeAnnotation\",\n          );\n\n        case tt.bigint:\n          return this.parseLiteral(\n            this.state.value,\n            \"BigIntLiteralTypeAnnotation\",\n          );\n\n        case tt._void:\n          this.next();\n          return this.finishNode(node, \"VoidTypeAnnotation\");\n\n        case tt._null:\n          this.next();\n          return this.finishNode(node, \"NullLiteralTypeAnnotation\");\n\n        case tt._this:\n          this.next();\n          return this.finishNode(node, \"ThisTypeAnnotation\");\n\n        case tt.star:\n          this.next();\n          return this.finishNode(node, \"ExistsTypeAnnotation\");\n\n        case tt._typeof:\n          return this.flowParseTypeofType();\n\n        default:\n          if (tokenIsKeyword(this.state.type)) {\n            const label = tokenLabelName(this.state.type);\n            this.next();\n            return super.createIdentifier(node as Undone<N.Identifier>, label);\n          } else if (tokenIsIdentifier(this.state.type)) {\n            if (this.isContextual(tt._interface)) {\n              return this.flowParseInterfaceType();\n            }\n\n            return this.flowIdentToTypeAnnotation(\n              startLoc,\n              node,\n              this.parseIdentifier(),\n            );\n          }\n      }\n\n      this.unexpected();\n    }\n\n    flowParsePostfixType(): N.FlowType {\n      const startLoc = this.state.startLoc;\n      let type = this.flowParsePrimaryType();\n      let seenOptionalIndexedAccess = false;\n      while (\n        (this.match(tt.bracketL) || this.match(tt.questionDot)) &&\n        !this.canInsertSemicolon()\n      ) {\n        const node = this.startNodeAt<N.FlowOtherTypeAnnotation>(startLoc);\n        const optional = this.eat(tt.questionDot);\n        seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional;\n        this.expect(tt.bracketL);\n        if (!optional && this.match(tt.bracketR)) {\n          node.elementType = type;\n          this.next(); // eat `]`\n          type = this.finishNode(node, \"ArrayTypeAnnotation\");\n        } else {\n          node.objectType = type;\n          node.indexType = this.flowParseType();\n          this.expect(tt.bracketR);\n          if (seenOptionalIndexedAccess) {\n            node.optional = optional;\n            type = this.finishNode<N.FlowOptionalIndexedAccessType>(\n              // @ts-expect-error todo(flow->ts)\n              node,\n              \"OptionalIndexedAccessType\",\n            );\n          } else {\n            type = this.finishNode<N.FlowIndexedAccessType>(\n              // @ts-expect-error todo(flow->ts)\n              node,\n              \"IndexedAccessType\",\n            );\n          }\n        }\n      }\n      return type;\n    }\n\n    flowParsePrefixType(): N.FlowType {\n      const node = this.startNode<N.FlowOtherTypeAnnotation>();\n      if (this.eat(tt.question)) {\n        node.typeAnnotation = this.flowParsePrefixType();\n        return this.finishNode(node, \"NullableTypeAnnotation\");\n      } else {\n        return this.flowParsePostfixType();\n      }\n    }\n\n    flowParseAnonFunctionWithoutParens(): N.FlowType {\n      const param = this.flowParsePrefixType();\n      if (!this.state.noAnonFunctionType && this.eat(tt.arrow)) {\n        // TODO: This should be a type error. Passing in a SourceLocation, and it expects a Position.\n        const node = this.startNodeAt<N.FlowFunctionTypeAnnotation>(\n          param.loc.start,\n        );\n        node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];\n        node.rest = null;\n        node.this = null;\n        node.returnType = this.flowParseType();\n        node.typeParameters = null;\n        return this.finishNode(node, \"FunctionTypeAnnotation\");\n      }\n      return param;\n    }\n\n    flowParseIntersectionType(): N.FlowType {\n      const node = this.startNode<N.FlowOtherTypeAnnotation>();\n      this.eat(tt.bitwiseAND);\n      const type = this.flowParseAnonFunctionWithoutParens();\n      node.types = [type];\n      while (this.eat(tt.bitwiseAND)) {\n        node.types.push(this.flowParseAnonFunctionWithoutParens());\n      }\n      return node.types.length === 1\n        ? type\n        : this.finishNode(node, \"IntersectionTypeAnnotation\");\n    }\n\n    flowParseUnionType(): N.FlowType {\n      const node = this.startNode<N.FlowOtherTypeAnnotation>();\n      this.eat(tt.bitwiseOR);\n      const type = this.flowParseIntersectionType();\n      node.types = [type];\n      while (this.eat(tt.bitwiseOR)) {\n        node.types.push(this.flowParseIntersectionType());\n      }\n      return node.types.length === 1\n        ? type\n        : this.finishNode(node, \"UnionTypeAnnotation\");\n    }\n\n    flowParseType(): N.FlowType {\n      const oldInType = this.state.inType;\n      this.state.inType = true;\n      const type = this.flowParseUnionType();\n      this.state.inType = oldInType;\n      return type;\n    }\n\n    flowParseTypeOrImplicitInstantiation(): N.FlowType {\n      if (this.state.type === tt.name && this.state.value === \"_\") {\n        const startLoc = this.state.startLoc;\n        const node = this.parseIdentifier();\n        return this.flowParseGenericType(startLoc, node);\n      } else {\n        return this.flowParseType();\n      }\n    }\n\n    flowParseTypeAnnotation(): N.TypeAnnotation {\n      const node = this.startNode<N.TypeAnnotation>();\n      node.typeAnnotation = this.flowParseTypeInitialiser();\n      return this.finishNode(node, \"TypeAnnotation\");\n    }\n\n    flowParseTypeAnnotatableIdentifier(\n      allowPrimitiveOverride?: boolean,\n    ): N.Identifier {\n      const ident = allowPrimitiveOverride\n        ? this.parseIdentifier()\n        : this.flowParseRestrictedIdentifier();\n      if (this.match(tt.colon)) {\n        ident.typeAnnotation = this.flowParseTypeAnnotation();\n        this.resetEndLocation(ident);\n      }\n      return ident;\n    }\n\n    typeCastToParameter(node: N.TypeCastExpression): N.Expression {\n      (node.expression as N.Identifier).typeAnnotation = node.typeAnnotation;\n\n      this.resetEndLocation(node.expression, node.typeAnnotation.loc.end);\n\n      return node.expression;\n    }\n\n    flowParseVariance(): N.FlowVariance | undefined | null {\n      let variance = null;\n      if (this.match(tt.plusMin)) {\n        variance = this.startNode<N.FlowVariance>();\n        if (this.state.value === \"+\") {\n          variance.kind = \"plus\";\n        } else {\n          variance.kind = \"minus\";\n        }\n        this.next();\n        return this.finishNode(variance, \"Variance\");\n      }\n      return variance;\n    }\n\n    // ==================================\n    // Overrides\n    // ==================================\n\n    parseFunctionBody(\n      node: N.Function,\n      allowExpressionBody?: boolean | null,\n      isMethod: boolean = false,\n    ): void {\n      if (allowExpressionBody) {\n        this.forwardNoArrowParamsConversionAt(node, () =>\n          super.parseFunctionBody(node, true, isMethod),\n        );\n        return;\n      }\n\n      super.parseFunctionBody(node, false, isMethod);\n    }\n\n    parseFunctionBodyAndFinish<\n      T extends\n        | N.Function\n        | N.TSDeclareMethod\n        | N.TSDeclareFunction\n        | N.ClassPrivateMethod,\n    >(node: Undone<T>, type: T[\"type\"], isMethod: boolean = false): T {\n      if (this.match(tt.colon)) {\n        const typeNode = this.startNode<N.TypeAnnotation>();\n\n        [\n          typeNode.typeAnnotation,\n          // @ts-expect-error predicate may not exist\n          node.predicate,\n        ] = this.flowParseTypeAndPredicateInitialiser();\n\n        node.returnType = typeNode.typeAnnotation\n          ? this.finishNode(typeNode, \"TypeAnnotation\")\n          : null;\n      }\n\n      return super.parseFunctionBodyAndFinish(node, type, isMethod);\n    }\n\n    // interfaces and enums\n    parseStatementLike(flags: ParseStatementFlag): N.Statement {\n      // strict mode handling of `interface` since it's a reserved word\n      if (this.state.strict && this.isContextual(tt._interface)) {\n        const lookahead = this.lookahead();\n        if (tokenIsKeywordOrIdentifier(lookahead.type)) {\n          const node = this.startNode<N.FlowInterface>();\n          this.next();\n          return this.flowParseInterface(node);\n        }\n      } else if (this.isContextual(tt._enum)) {\n        const node = this.startNode();\n        this.next();\n        return this.flowParseEnumDeclaration(node);\n      }\n      const stmt = super.parseStatementLike(flags);\n      // We will parse a flow pragma in any comment before the first statement.\n      if (this.flowPragma === undefined && !this.isValidDirective(stmt)) {\n        this.flowPragma = null;\n      }\n      return stmt;\n    }\n\n    // declares, interfaces and type aliases\n    parseExpressionStatement(\n      node: N.ExpressionStatement,\n      expr: N.Expression,\n      decorators: N.Decorator[] | null,\n    ): N.ExpressionStatement {\n      if (expr.type === \"Identifier\") {\n        if (expr.name === \"declare\") {\n          if (\n            this.match(tt._class) ||\n            tokenIsIdentifier(this.state.type) ||\n            this.match(tt._function) ||\n            this.match(tt._var) ||\n            this.match(tt._export)\n          ) {\n            // @ts-expect-error: refine typings\n            return this.flowParseDeclare(node);\n          }\n        } else if (tokenIsIdentifier(this.state.type)) {\n          if (expr.name === \"interface\") {\n            // @ts-expect-error: refine typings\n            return this.flowParseInterface(node);\n          } else if (expr.name === \"type\") {\n            // @ts-expect-error: refine typings\n            return this.flowParseTypeAlias(node);\n          } else if (expr.name === \"opaque\") {\n            // @ts-expect-error: refine typings\n            return this.flowParseOpaqueType(node, false);\n          }\n        }\n      }\n\n      return super.parseExpressionStatement(node, expr, decorators);\n    }\n\n    // export type\n    shouldParseExportDeclaration(): boolean {\n      const { type } = this.state;\n      if (type === tt._enum || tokenIsFlowInterfaceOrTypeOrOpaque(type)) {\n        return !this.state.containsEsc;\n      }\n      return super.shouldParseExportDeclaration();\n    }\n\n    isExportDefaultSpecifier(): boolean {\n      const { type } = this.state;\n      if (type === tt._enum || tokenIsFlowInterfaceOrTypeOrOpaque(type)) {\n        return this.state.containsEsc;\n      }\n\n      return super.isExportDefaultSpecifier();\n    }\n\n    parseExportDefaultExpression() {\n      if (this.isContextual(tt._enum)) {\n        const node = this.startNode();\n        this.next();\n        return this.flowParseEnumDeclaration(node);\n      }\n      return super.parseExportDefaultExpression();\n    }\n\n    parseConditional(\n      expr: N.Expression,\n\n      startLoc: Position,\n      refExpressionErrors?: ExpressionErrors | null,\n    ): N.Expression {\n      if (!this.match(tt.question)) return expr;\n\n      if (this.state.maybeInArrowParameters) {\n        const nextCh = this.lookaheadCharCode();\n        // These tokens cannot start an expression, so if one of them follows\n        // ? then we are probably in an arrow function parameters list and we\n        // don't parse the conditional expression.\n        if (\n          nextCh === charCodes.comma || // (a?, b) => c\n          nextCh === charCodes.equalsTo || // (a? = b) => c\n          nextCh === charCodes.colon || // (a?: b) => c\n          nextCh === charCodes.rightParenthesis // (a?) => c\n        ) {\n          /*:: invariant(refExpressionErrors != null) */\n          this.setOptionalParametersError(refExpressionErrors);\n          return expr;\n        }\n      }\n\n      this.expect(tt.question);\n      const state = this.state.clone();\n      const originalNoArrowAt = this.state.noArrowAt;\n      const node = this.startNodeAt<N.ConditionalExpression>(startLoc);\n      let { consequent, failed } = this.tryParseConditionalConsequent();\n      let [valid, invalid] = this.getArrowLikeExpressions(consequent);\n\n      if (failed || invalid.length > 0) {\n        const noArrowAt = [...originalNoArrowAt];\n\n        if (invalid.length > 0) {\n          this.state = state;\n          this.state.noArrowAt = noArrowAt;\n\n          for (let i = 0; i < invalid.length; i++) {\n            noArrowAt.push(invalid[i].start);\n          }\n\n          ({ consequent, failed } = this.tryParseConditionalConsequent());\n          [valid, invalid] = this.getArrowLikeExpressions(consequent);\n        }\n\n        if (failed && valid.length > 1) {\n          // if there are two or more possible correct ways of parsing, throw an\n          // error.\n          // e.g.   Source: a ? (b): c => (d): e => f\n          //      Result 1: a ? b : (c => ((d): e => f))\n          //      Result 2: a ? ((b): c => d) : (e => f)\n          this.raise(FlowErrors.AmbiguousConditionalArrow, state.startLoc);\n        }\n\n        if (failed && valid.length === 1) {\n          this.state = state;\n          noArrowAt.push(valid[0].start);\n          this.state.noArrowAt = noArrowAt;\n          ({ consequent, failed } = this.tryParseConditionalConsequent());\n        }\n      }\n\n      this.getArrowLikeExpressions(consequent, true);\n\n      this.state.noArrowAt = originalNoArrowAt;\n      this.expect(tt.colon);\n\n      node.test = expr;\n      node.consequent = consequent;\n      node.alternate = this.forwardNoArrowParamsConversionAt(node, () =>\n        this.parseMaybeAssign(undefined, undefined),\n      );\n\n      return this.finishNode(node, \"ConditionalExpression\");\n    }\n\n    tryParseConditionalConsequent(): {\n      consequent: N.Expression;\n      failed: boolean;\n    } {\n      this.state.noArrowParamsConversionAt.push(this.state.start);\n\n      const consequent = this.parseMaybeAssignAllowIn();\n      const failed = !this.match(tt.colon);\n\n      this.state.noArrowParamsConversionAt.pop();\n\n      return { consequent, failed };\n    }\n\n    // Given an expression, walks through out its arrow functions whose body is\n    // an expression and through out conditional expressions. It returns every\n    // function which has been parsed with a return type but could have been\n    // parenthesized expressions.\n    // These functions are separated into two arrays: one containing the ones\n    // whose parameters can be converted to assignable lists, one containing the\n    // others.\n    getArrowLikeExpressions(\n      node: N.Expression,\n      disallowInvalid?: boolean,\n    ): [N.ArrowFunctionExpression[], N.ArrowFunctionExpression[]] {\n      const stack = [node];\n      const arrows: N.ArrowFunctionExpression[] = [];\n\n      while (stack.length !== 0) {\n        const node = stack.pop();\n        if (\n          node.type === \"ArrowFunctionExpression\" &&\n          node.body.type !== \"BlockStatement\"\n        ) {\n          if (node.typeParameters || !node.returnType) {\n            // This is an arrow expression without ambiguity, so check its parameters\n            this.finishArrowValidation(node);\n          } else {\n            arrows.push(node);\n          }\n          stack.push(node.body);\n        } else if (node.type === \"ConditionalExpression\") {\n          stack.push(node.consequent);\n          stack.push(node.alternate);\n        }\n      }\n\n      if (disallowInvalid) {\n        arrows.forEach(node => this.finishArrowValidation(node));\n        return [arrows, []];\n      }\n\n      return partition(arrows, node =>\n        node.params.every(param => this.isAssignable(param, true)),\n      );\n    }\n\n    finishArrowValidation(node: N.ArrowFunctionExpression) {\n      this.toAssignableList(\n        // node.params is Expression[] instead of $ReadOnlyArray<Pattern> because it\n        // has not been converted yet.\n        node.params as any as N.Expression[],\n        node.extra?.trailingCommaLoc,\n        /* isLHS */ false,\n      );\n      // Enter scope, as checkParams defines bindings\n      this.scope.enter(ScopeFlag.FUNCTION | ScopeFlag.ARROW);\n      // Use super's method to force the parameters to be checked\n      super.checkParams(node, false, true);\n      this.scope.exit();\n    }\n\n    forwardNoArrowParamsConversionAt<T>(\n      node: Undone<N.Node>,\n      parse: () => T,\n    ): T {\n      let result: T;\n      if (\n        this.state.noArrowParamsConversionAt.includes(\n          this.offsetToSourcePos(node.start),\n        )\n      ) {\n        this.state.noArrowParamsConversionAt.push(this.state.start);\n        result = parse();\n        this.state.noArrowParamsConversionAt.pop();\n      } else {\n        result = parse();\n      }\n\n      return result;\n    }\n\n    parseParenItem<T extends N.Expression | N.RestElement | N.SpreadElement>(\n      node: T,\n      startLoc: Position,\n    ): T | N.TypeCastExpression | N.TsTypeCastExpression {\n      const newNode = super.parseParenItem(node, startLoc);\n      if (this.eat(tt.question)) {\n        (newNode as N.Identifier).optional = true;\n        // Include questionmark in location of node\n        // Don't use this.finishNode() as otherwise we might process comments twice and\n        // include already consumed parens\n        this.resetEndLocation(node);\n      }\n\n      if (this.match(tt.colon)) {\n        const typeCastNode = this.startNodeAt<N.TypeCastExpression>(startLoc);\n        typeCastNode.expression = newNode as N.Expression;\n        typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();\n\n        return this.finishNode(typeCastNode, \"TypeCastExpression\");\n      }\n\n      return newNode;\n    }\n\n    assertModuleNodeAllowed(node: N.Node) {\n      if (\n        (node.type === \"ImportDeclaration\" &&\n          (node.importKind === \"type\" || node.importKind === \"typeof\")) ||\n        (node.type === \"ExportNamedDeclaration\" &&\n          node.exportKind === \"type\") ||\n        (node.type === \"ExportAllDeclaration\" && node.exportKind === \"type\")\n      ) {\n        // Allow Flowtype imports and exports in all conditions because\n        // Flow itself does not care about 'sourceType'.\n        return;\n      }\n\n      super.assertModuleNodeAllowed(node);\n    }\n\n    parseExportDeclaration(\n      node: N.ExportNamedDeclaration,\n    ): N.Declaration | undefined | null {\n      if (this.isContextual(tt._type)) {\n        node.exportKind = \"type\";\n\n        const declarationNode = this.startNode();\n        this.next();\n\n        if (this.match(tt.braceL)) {\n          // export type { foo, bar };\n          node.specifiers = this.parseExportSpecifiers(\n            /* isInTypeExport */ true,\n          );\n          super.parseExportFrom(node);\n          return null;\n        } else {\n          // export type Foo = Bar;\n          // @ts-expect-error: refine typings\n          return this.flowParseTypeAlias(declarationNode);\n        }\n      } else if (this.isContextual(tt._opaque)) {\n        node.exportKind = \"type\";\n\n        const declarationNode = this.startNode();\n        this.next();\n        // export opaque type Foo = Bar;\n        // @ts-expect-error: refine typings\n        return this.flowParseOpaqueType(declarationNode, false);\n      } else if (this.isContextual(tt._interface)) {\n        node.exportKind = \"type\";\n        const declarationNode = this.startNode();\n        this.next();\n        // @ts-expect-error: refine typings\n        return this.flowParseInterface(declarationNode);\n      } else if (this.isContextual(tt._enum)) {\n        node.exportKind = \"value\";\n        const declarationNode = this.startNode();\n        this.next();\n        // @ts-expect-error: refine typings\n        return this.flowParseEnumDeclaration(declarationNode);\n      } else {\n        return super.parseExportDeclaration(node);\n      }\n    }\n\n    eatExportStar(\n      node: Undone<N.Node>,\n    ): node is Undone<N.ExportNamedDeclaration | N.ExportAllDeclaration> {\n      if (super.eatExportStar(node)) return true;\n\n      if (this.isContextual(tt._type) && this.lookahead().type === tt.star) {\n        (\n          node as Undone<N.ExportNamedDeclaration | N.ExportAllDeclaration>\n        ).exportKind = \"type\";\n        this.next();\n        this.next();\n        return true;\n      }\n\n      return false;\n    }\n\n    maybeParseExportNamespaceSpecifier(\n      node: Undone<N.ExportNamedDeclaration | N.ExportAllDeclaration>,\n    ): node is Undone<N.ExportNamedDeclaration> {\n      const { startLoc } = this.state;\n      const hasNamespace = super.maybeParseExportNamespaceSpecifier(node);\n      if (hasNamespace && node.exportKind === \"type\") {\n        this.unexpected(startLoc);\n      }\n      return hasNamespace;\n    }\n\n    parseClassId(\n      node: N.Class,\n      isStatement: boolean,\n      optionalId?: boolean | null,\n    ) {\n      super.parseClassId(node, isStatement, optionalId);\n      if (this.match(tt.lt)) {\n        node.typeParameters = this.flowParseTypeParameterDeclaration();\n      }\n    }\n\n    parseClassMember(\n      classBody: N.ClassBody,\n      member: any,\n      state: N.ParseClassMemberState,\n    ): void {\n      const { startLoc } = this.state;\n      if (this.isContextual(tt._declare)) {\n        if (super.parseClassMemberFromModifier(classBody, member)) {\n          // 'declare' is a class element name\n          return;\n        }\n\n        member.declare = true;\n      }\n\n      super.parseClassMember(classBody, member, state);\n\n      if (member.declare) {\n        if (\n          member.type !== \"ClassProperty\" &&\n          member.type !== \"ClassPrivateProperty\" &&\n          member.type !== \"PropertyDefinition\" // Used by estree plugin\n        ) {\n          this.raise(FlowErrors.DeclareClassElement, startLoc);\n        } else if (member.value) {\n          this.raise(FlowErrors.DeclareClassFieldInitializer, member.value);\n        }\n      }\n    }\n\n    isIterator(word: string): boolean {\n      return word === \"iterator\" || word === \"asyncIterator\";\n    }\n\n    readIterator(): void {\n      const word = super.readWord1();\n      const fullWord = \"@@\" + word;\n\n      // Allow @@iterator and @@asyncIterator as a identifier only inside type\n      if (!this.isIterator(word) || !this.state.inType) {\n        this.raise(Errors.InvalidIdentifier, this.state.curPosition(), {\n          identifierName: fullWord,\n        });\n      }\n\n      this.finishToken(tt.name, fullWord);\n    }\n\n    // ensure that inside flow types, we bypass the jsx parser plugin\n    getTokenFromCode(code: number): void {\n      const next = this.input.charCodeAt(this.state.pos + 1);\n      if (code === charCodes.leftCurlyBrace && next === charCodes.verticalBar) {\n        this.finishOp(tt.braceBarL, 2);\n      } else if (\n        this.state.inType &&\n        (code === charCodes.greaterThan || code === charCodes.lessThan)\n      ) {\n        this.finishOp(code === charCodes.greaterThan ? tt.gt : tt.lt, 1);\n      } else if (this.state.inType && code === charCodes.questionMark) {\n        if (next === charCodes.dot) {\n          this.finishOp(tt.questionDot, 2);\n        } else {\n          // allow double nullable types in Flow: ??string\n          this.finishOp(tt.question, 1);\n        }\n      } else if (\n        isIteratorStart(code, next, this.input.charCodeAt(this.state.pos + 2))\n      ) {\n        this.state.pos += 2; // eat \"@@\"\n        this.readIterator();\n      } else {\n        super.getTokenFromCode(code);\n      }\n    }\n\n    isAssignable(node: N.Node, isBinding?: boolean): boolean {\n      if (node.type === \"TypeCastExpression\") {\n        return this.isAssignable(node.expression, isBinding);\n      } else {\n        return super.isAssignable(node, isBinding);\n      }\n    }\n\n    toAssignable(node: N.Node, isLHS: boolean = false): void {\n      if (\n        !isLHS &&\n        node.type === \"AssignmentExpression\" &&\n        node.left.type === \"TypeCastExpression\"\n      ) {\n        node.left = this.typeCastToParameter(node.left) as N.Assignable;\n      }\n      super.toAssignable(node, isLHS);\n    }\n\n    // turn type casts that we found in function parameter head into type annotated params\n    toAssignableList(\n      exprList: N.Expression[],\n      trailingCommaLoc: Position | undefined | null,\n      isLHS: boolean,\n    ): void {\n      for (let i = 0; i < exprList.length; i++) {\n        const expr = exprList[i];\n        if (expr?.type === \"TypeCastExpression\") {\n          exprList[i] = this.typeCastToParameter(expr);\n        }\n      }\n      super.toAssignableList(exprList, trailingCommaLoc, isLHS);\n    }\n\n    // this is a list of nodes, from something like a call expression, we need to filter the\n    // type casts that we've found that are illegal in this context\n    toReferencedList(\n      exprList:\n        | ReadonlyArray<N.Expression | N.SpreadElement>\n        | ReadonlyArray<N.Expression | N.RestElement>,\n      isParenthesizedExpr?: boolean,\n    ):\n      | ReadonlyArray<N.Expression | N.SpreadElement>\n      | ReadonlyArray<N.Expression | N.RestElement> {\n      for (let i = 0; i < exprList.length; i++) {\n        const expr = exprList[i];\n        if (\n          expr &&\n          expr.type === \"TypeCastExpression\" &&\n          !expr.extra?.parenthesized &&\n          (exprList.length > 1 || !isParenthesizedExpr)\n        ) {\n          this.raise(FlowErrors.TypeCastInPattern, expr.typeAnnotation);\n        }\n      }\n\n      return exprList;\n    }\n\n    parseArrayLike(\n      close: TokenType,\n      canBePattern: boolean,\n      isTuple: boolean,\n      refExpressionErrors?: ExpressionErrors | null,\n    ): N.ArrayExpression | N.TupleExpression {\n      const node = super.parseArrayLike(\n        close,\n        canBePattern,\n        isTuple,\n        refExpressionErrors,\n      );\n\n      // This could be an array pattern:\n      //   ([a: string, b: string]) => {}\n      // In this case, we don't have to call toReferencedList. We will\n      // call it, if needed, when we are sure that it is a parenthesized\n      // expression by calling toReferencedListDeep.\n      if (canBePattern && !this.state.maybeInArrowParameters) {\n        this.toReferencedList(node.elements);\n      }\n\n      return node;\n    }\n\n    isValidLVal(type: string, isParenthesized: boolean, binding: BindingFlag) {\n      return (\n        type === \"TypeCastExpression\" ||\n        super.isValidLVal(type, isParenthesized, binding)\n      );\n    }\n\n    // parse class property type annotations\n    parseClassProperty(node: N.ClassProperty): N.ClassProperty {\n      if (this.match(tt.colon)) {\n        node.typeAnnotation = this.flowParseTypeAnnotation();\n      }\n      return super.parseClassProperty(node);\n    }\n\n    parseClassPrivateProperty(\n      node: N.ClassPrivateProperty,\n    ): N.ClassPrivateProperty {\n      if (this.match(tt.colon)) {\n        node.typeAnnotation = this.flowParseTypeAnnotation();\n      }\n      return super.parseClassPrivateProperty(node);\n    }\n\n    // determine whether or not we're currently in the position where a class method would appear\n    isClassMethod(): boolean {\n      return this.match(tt.lt) || super.isClassMethod();\n    }\n\n    // determine whether or not we're currently in the position where a class property would appear\n    isClassProperty(): boolean {\n      return this.match(tt.colon) || super.isClassProperty();\n    }\n\n    isNonstaticConstructor(method: N.ClassMethod | N.ClassProperty): boolean {\n      return !this.match(tt.colon) && super.isNonstaticConstructor(method);\n    }\n\n    // parse type parameters for class methods\n    pushClassMethod(\n      classBody: N.ClassBody,\n      method: N.ClassMethod,\n      isGenerator: boolean,\n      isAsync: boolean,\n      isConstructor: boolean,\n      allowsDirectSuper: boolean,\n    ): void {\n      if ((method as any).variance) {\n        this.unexpected((method as any).variance.loc.start);\n      }\n      delete (method as any).variance;\n      if (this.match(tt.lt)) {\n        method.typeParameters = this.flowParseTypeParameterDeclaration();\n      }\n\n      super.pushClassMethod(\n        classBody,\n        method,\n        isGenerator,\n        isAsync,\n        isConstructor,\n        allowsDirectSuper,\n      );\n\n      if (method.params && isConstructor) {\n        const params = method.params;\n        if (params.length > 0 && this.isThisParam(params[0])) {\n          this.raise(FlowErrors.ThisParamBannedInConstructor, method);\n        }\n        // estree support\n      } else if (\n        // @ts-expect-error TS does not know about the fact that estree can replace ClassMethod with MethodDefinition\n        method.type === \"MethodDefinition\" &&\n        isConstructor &&\n        // @ts-expect-error estree\n        method.value.params\n      ) {\n        // @ts-expect-error estree\n        const params = method.value.params;\n        if (params.length > 0 && this.isThisParam(params[0])) {\n          this.raise(FlowErrors.ThisParamBannedInConstructor, method);\n        }\n      }\n    }\n\n    pushClassPrivateMethod(\n      classBody: N.ClassBody,\n      method: N.ClassPrivateMethod,\n      isGenerator: boolean,\n      isAsync: boolean,\n    ): void {\n      if ((method as any).variance) {\n        this.unexpected((method as any).variance.loc.start);\n      }\n      delete (method as any).variance;\n      if (this.match(tt.lt)) {\n        method.typeParameters = this.flowParseTypeParameterDeclaration();\n      }\n\n      super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);\n    }\n\n    // parse a the super class type parameters and implements\n    parseClassSuper(node: N.Class): void {\n      super.parseClassSuper(node);\n      if (\n        node.superClass &&\n        (this.match(tt.lt) ||\n          // handles `class extends C<<T>`\n          this.match(tt.bitShiftL))\n      ) {\n        if (process.env.BABEL_8_BREAKING) {\n          node.superTypeArguments =\n            this.flowParseTypeParameterInstantiationInExpression();\n        } else {\n          node.superTypeParameters =\n            this.flowParseTypeParameterInstantiationInExpression();\n        }\n      }\n      if (this.isContextual(tt._implements)) {\n        this.next();\n        const implemented: N.FlowClassImplements[] = (node.implements = []);\n        do {\n          const node = this.startNode<N.FlowClassImplements>();\n          node.id = this.flowParseRestrictedIdentifier(/*liberal*/ true);\n          if (this.match(tt.lt)) {\n            node.typeParameters = this.flowParseTypeParameterInstantiation();\n          } else {\n            node.typeParameters = null;\n          }\n          implemented.push(this.finishNode(node, \"ClassImplements\"));\n        } while (this.eat(tt.comma));\n      }\n    }\n\n    checkGetterSetterParams(method: N.ObjectMethod | N.ClassMethod): void {\n      super.checkGetterSetterParams(method);\n      const params = this.getObjectOrClassMethodParams(method);\n      if (params.length > 0) {\n        const param = params[0];\n        if (this.isThisParam(param) && method.kind === \"get\") {\n          this.raise(FlowErrors.GetterMayNotHaveThisParam, param);\n        } else if (this.isThisParam(param)) {\n          this.raise(FlowErrors.SetterMayNotHaveThisParam, param);\n        }\n      }\n    }\n\n    parsePropertyNamePrefixOperator(\n      node: N.ObjectOrClassMember | N.ClassMember,\n    ): void {\n      node.variance = this.flowParseVariance();\n    }\n\n    // parse type parameters for object method shorthand\n    parseObjPropValue<T extends N.ObjectMember>(\n      prop: Undone<T>,\n      startLoc: Position | undefined | null,\n      isGenerator: boolean,\n      isAsync: boolean,\n      isPattern: boolean,\n      isAccessor: boolean,\n      refExpressionErrors?: ExpressionErrors | null,\n    ): T {\n      if ((prop as any).variance) {\n        this.unexpected((prop as any).variance.loc.start);\n      }\n      delete (prop as any).variance;\n\n      let typeParameters;\n\n      // method shorthand\n      if (this.match(tt.lt) && !isAccessor) {\n        typeParameters = this.flowParseTypeParameterDeclaration();\n        if (!this.match(tt.parenL)) this.unexpected();\n      }\n\n      const result = super.parseObjPropValue(\n        prop,\n        startLoc,\n        isGenerator,\n        isAsync,\n        isPattern,\n        isAccessor,\n        refExpressionErrors,\n      );\n\n      // add typeParameters if we found them\n      if (typeParameters) {\n        // @ts-expect-error: refine typings\n        (result.value || result).typeParameters = typeParameters;\n      }\n      return result;\n    }\n\n    parseFunctionParamType(param: N.Pattern): N.Pattern {\n      if (this.eat(tt.question)) {\n        if (param.type !== \"Identifier\") {\n          this.raise(FlowErrors.PatternIsOptional, param);\n        }\n        if (this.isThisParam(param)) {\n          this.raise(FlowErrors.ThisParamMayNotBeOptional, param);\n        }\n\n        (param as any as N.Identifier).optional = true;\n      }\n      if (this.match(tt.colon)) {\n        param.typeAnnotation = this.flowParseTypeAnnotation();\n      } else if (this.isThisParam(param)) {\n        this.raise(FlowErrors.ThisParamAnnotationRequired, param);\n      }\n\n      if (this.match(tt.eq) && this.isThisParam(param)) {\n        this.raise(FlowErrors.ThisParamNoDefault, param);\n      }\n\n      this.resetEndLocation(param);\n      return param;\n    }\n\n    parseMaybeDefault<P extends N.Pattern>(\n      startLoc?: Position | null,\n      left?: P | null,\n    ): P | N.AssignmentPattern {\n      const node = super.parseMaybeDefault(startLoc, left);\n\n      if (\n        node.type === \"AssignmentPattern\" &&\n        node.typeAnnotation &&\n        node.right.start < node.typeAnnotation.start\n      ) {\n        this.raise(FlowErrors.TypeBeforeInitializer, node.typeAnnotation);\n      }\n\n      return node;\n    }\n\n    checkImportReflection(node: Undone<N.ImportDeclaration>) {\n      super.checkImportReflection(node);\n      if (node.module && node.importKind !== \"value\") {\n        this.raise(\n          FlowErrors.ImportReflectionHasImportType,\n          node.specifiers[0].loc.start,\n        );\n      }\n    }\n\n    parseImportSpecifierLocal<\n      T extends\n        | N.ImportSpecifier\n        | N.ImportDefaultSpecifier\n        | N.ImportNamespaceSpecifier,\n    >(node: N.ImportDeclaration, specifier: Undone<T>, type: T[\"type\"]): void {\n      specifier.local = hasTypeImportKind(node)\n        ? this.flowParseRestrictedIdentifier(\n            /* liberal */ true,\n            /* declaration */ true,\n          )\n        : this.parseIdentifier();\n\n      node.specifiers.push(this.finishImportSpecifier(specifier, type));\n    }\n\n    isPotentialImportPhase(isExport: boolean): boolean {\n      if (super.isPotentialImportPhase(isExport)) return true;\n      if (this.isContextual(tt._type)) {\n        if (!isExport) return true;\n        const ch = this.lookaheadCharCode();\n        return ch === charCodes.leftCurlyBrace || ch === charCodes.asterisk;\n      }\n      return !isExport && this.isContextual(tt._typeof);\n    }\n\n    applyImportPhase(\n      node: Undone<N.ImportDeclaration | N.ExportNamedDeclaration>,\n      isExport: boolean,\n      phase: string | null,\n      loc?: Position,\n    ): void {\n      super.applyImportPhase(node, isExport, phase, loc);\n      if (isExport) {\n        if (!phase && this.match(tt._default)) {\n          // TODO: Align with our TS AST and always add .exportKind\n          return;\n        }\n        (node as N.ExportNamedDeclaration).exportKind =\n          phase === \"type\" ? phase : \"value\";\n      } else {\n        if (phase === \"type\" && this.match(tt.star)) this.unexpected();\n        (node as N.ImportDeclaration).importKind =\n          phase === \"type\" || phase === \"typeof\" ? phase : \"value\";\n      }\n    }\n\n    // parse import-type/typeof shorthand\n    parseImportSpecifier(\n      specifier: any,\n      importedIsString: boolean,\n      isInTypeOnlyImport: boolean,\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      isMaybeTypeOnly: boolean,\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      bindingType: BindingFlag | undefined,\n    ): N.ImportSpecifier {\n      const firstIdent = specifier.imported;\n\n      let specifierTypeKind = null;\n      if (firstIdent.type === \"Identifier\") {\n        if (firstIdent.name === \"type\") {\n          specifierTypeKind = \"type\";\n        } else if (firstIdent.name === \"typeof\") {\n          specifierTypeKind = \"typeof\";\n        }\n      }\n\n      let isBinding = false;\n      if (this.isContextual(tt._as) && !this.isLookaheadContextual(\"as\")) {\n        const as_ident = this.parseIdentifier(true);\n        if (\n          specifierTypeKind !== null &&\n          !tokenIsKeywordOrIdentifier(this.state.type)\n        ) {\n          // `import {type as ,` or `import {type as }`\n          specifier.imported = as_ident;\n          specifier.importKind = specifierTypeKind;\n          specifier.local = this.cloneIdentifier(as_ident);\n        } else {\n          // `import {type as foo`\n          specifier.imported = firstIdent;\n          specifier.importKind = null;\n          specifier.local = this.parseIdentifier();\n        }\n      } else {\n        if (\n          specifierTypeKind !== null &&\n          tokenIsKeywordOrIdentifier(this.state.type)\n        ) {\n          // `import {type foo`\n          specifier.imported = this.parseIdentifier(true);\n          specifier.importKind = specifierTypeKind;\n        } else {\n          if (importedIsString) {\n            /*:: invariant(firstIdent instanceof N.StringLiteral) */\n            throw this.raise(Errors.ImportBindingIsString, specifier, {\n              importName: firstIdent.value,\n            });\n          }\n          /*:: invariant(firstIdent instanceof N.Node) */\n          specifier.imported = firstIdent;\n          specifier.importKind = null;\n        }\n\n        if (this.eatContextual(tt._as)) {\n          specifier.local = this.parseIdentifier();\n        } else {\n          isBinding = true;\n          specifier.local = this.cloneIdentifier(specifier.imported);\n        }\n      }\n\n      const specifierIsTypeImport = hasTypeImportKind(specifier);\n\n      if (isInTypeOnlyImport && specifierIsTypeImport) {\n        this.raise(FlowErrors.ImportTypeShorthandOnlyInPureImport, specifier);\n      }\n\n      if (isInTypeOnlyImport || specifierIsTypeImport) {\n        this.checkReservedType(\n          specifier.local.name,\n          specifier.local.loc.start,\n          /* declaration */ true,\n        );\n      }\n\n      if (isBinding && !isInTypeOnlyImport && !specifierIsTypeImport) {\n        this.checkReservedWord(\n          specifier.local.name,\n          specifier.loc.start,\n          true,\n          true,\n        );\n      }\n\n      return this.finishImportSpecifier(specifier, \"ImportSpecifier\");\n    }\n\n    parseBindingAtom(): N.Pattern {\n      switch (this.state.type) {\n        case tt._this:\n          // \"this\" may be the name of a parameter, so allow it.\n          return this.parseIdentifier(/* liberal */ true);\n        default:\n          return super.parseBindingAtom();\n      }\n    }\n\n    // parse function type parameters - function foo<T>() {}\n    parseFunctionParams(\n      node: Undone<N.Function>,\n      isConstructor: boolean,\n    ): void {\n      // @ts-expect-error kind may not index node\n      const kind = node.kind;\n      if (kind !== \"get\" && kind !== \"set\" && this.match(tt.lt)) {\n        node.typeParameters = this.flowParseTypeParameterDeclaration();\n      }\n      super.parseFunctionParams(node, isConstructor);\n    }\n\n    // parse flow type annotations on variable declarator heads - let foo: string = bar\n    parseVarId(\n      decl: N.VariableDeclarator,\n      kind: \"var\" | \"let\" | \"const\" | \"using\" | \"await using\",\n    ): void {\n      super.parseVarId(decl, kind);\n      if (this.match(tt.colon)) {\n        decl.id.typeAnnotation = this.flowParseTypeAnnotation();\n        this.resetEndLocation(decl.id); // set end position to end of type\n      }\n    }\n\n    // parse the return type of an async arrow function - let foo = (async (): number => {});\n    parseAsyncArrowFromCallExpression(\n      node: N.ArrowFunctionExpression,\n      call: N.CallExpression,\n    ): N.ArrowFunctionExpression {\n      if (this.match(tt.colon)) {\n        const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n        this.state.noAnonFunctionType = true;\n        node.returnType = this.flowParseTypeAnnotation();\n        this.state.noAnonFunctionType = oldNoAnonFunctionType;\n      }\n\n      return super.parseAsyncArrowFromCallExpression(node, call);\n    }\n\n    // todo description\n    shouldParseAsyncArrow(): boolean {\n      return this.match(tt.colon) || super.shouldParseAsyncArrow();\n    }\n\n    // We need to support type parameter declarations for arrow functions. This\n    // is tricky. There are three situations we need to handle\n    //\n    // 1. This is either JSX or an arrow function. We'll try JSX first. If that\n    //    fails, we'll try an arrow function. If that fails, we'll throw the JSX\n    //    error.\n    // 2. This is an arrow function. We'll parse the type parameter declaration,\n    //    parse the rest, make sure the rest is an arrow function, and go from\n    //    there\n    // 3. This is neither. Just call the super method\n    parseMaybeAssign(\n      refExpressionErrors?: ExpressionErrors | null,\n      afterLeftParse?: Function,\n    ): N.Expression {\n      let state = null;\n\n      let jsx;\n\n      if (\n        this.hasPlugin(\"jsx\") &&\n        (this.match(tt.jsxTagStart) || this.match(tt.lt))\n      ) {\n        state = this.state.clone();\n\n        jsx = this.tryParse(\n          () => super.parseMaybeAssign(refExpressionErrors, afterLeftParse),\n          state,\n        );\n\n        /*:: invariant(!jsx.aborted) */\n        /*:: invariant(jsx.node != null) */\n        if (!jsx.error) return jsx.node;\n\n        // Remove `tc.j_expr` and `tc.j_oTag` from context added\n        // by parsing `jsxTagStart` to stop the JSX plugin from\n        // messing with the tokens\n        const { context } = this.state;\n        const currentContext = context[context.length - 1];\n        if (currentContext === tc.j_oTag || currentContext === tc.j_expr) {\n          context.pop();\n        }\n      }\n\n      if (jsx?.error || this.match(tt.lt)) {\n        state = state || this.state.clone();\n\n        let typeParameters: N.TypeParameterDeclaration;\n\n        const arrow = this.tryParse((abort: () => never) => {\n          typeParameters = this.flowParseTypeParameterDeclaration();\n\n          const arrowExpression = this.forwardNoArrowParamsConversionAt(\n            typeParameters,\n            () => {\n              const result = super.parseMaybeAssign(\n                refExpressionErrors,\n                afterLeftParse,\n              );\n\n              this.resetStartLocationFromNode(result, typeParameters);\n\n              return result;\n            },\n          );\n\n          // <T>(() => {});\n          // <T>(() => {}: any);\n          if (arrowExpression.extra?.parenthesized) abort();\n\n          // The above can return a TypeCastExpression when the arrow\n          // expression is not wrapped in parens. See also `this.parseParenItem`.\n          // (<T>() => {}: any);\n          const expr = this.maybeUnwrapTypeCastExpression(arrowExpression);\n\n          if (expr.type !== \"ArrowFunctionExpression\") abort();\n\n          expr.typeParameters = typeParameters;\n          this.resetStartLocationFromNode(expr, typeParameters);\n\n          return arrowExpression;\n        }, state);\n\n        let arrowExpression:\n          | N.ArrowFunctionExpression\n          | N.TypeCastExpression\n          | undefined\n          | null = null;\n\n        if (\n          arrow.node &&\n          this.maybeUnwrapTypeCastExpression(arrow.node).type ===\n            \"ArrowFunctionExpression\"\n        ) {\n          if (!arrow.error && !arrow.aborted) {\n            // <T> async () => {}\n            // @ts-expect-error: refine tryParse typings\n            if (arrow.node.async) {\n              /*:: invariant(typeParameters) */\n              this.raise(\n                FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction,\n                typeParameters,\n              );\n            }\n            return arrow.node;\n          }\n\n          // @ts-expect-error: refine typings\n          arrowExpression = arrow.node;\n        }\n\n        // If we are here, both JSX and Flow parsing attempts failed.\n        // Give the precedence to the JSX error, except if JSX had an\n        // unrecoverable error while Flow didn't.\n        // If the error is recoverable, we can only re-report it if there is\n        // a node we can return.\n\n        if (jsx?.node) {\n          /*:: invariant(jsx.failState) */\n          this.state = jsx.failState;\n          return jsx.node;\n        }\n\n        if (arrowExpression) {\n          /*:: invariant(arrow.failState) */\n          this.state = arrow.failState;\n          return arrowExpression;\n        }\n\n        if (jsx?.thrown) throw jsx.error;\n        if (arrow.thrown) throw arrow.error;\n\n        /*:: invariant(typeParameters) */\n        throw this.raise(\n          FlowErrors.UnexpectedTokenAfterTypeParameter,\n          typeParameters,\n        );\n      }\n\n      return super.parseMaybeAssign(refExpressionErrors, afterLeftParse);\n    }\n\n    // handle return types for arrow functions\n    parseArrow(\n      node: Undone<N.ArrowFunctionExpression>,\n    ): Undone<N.ArrowFunctionExpression> | undefined | null {\n      if (this.match(tt.colon)) {\n        // @ts-expect-error todo(flow->ts)\n        const result = this.tryParse<N.TypeAnnotation>(() => {\n          const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n          this.state.noAnonFunctionType = true;\n\n          const typeNode = this.startNode<N.TypeAnnotation>();\n\n          [\n            typeNode.typeAnnotation,\n            // @ts-expect-error (destructuring not supported yet)\n            node.predicate,\n          ] = this.flowParseTypeAndPredicateInitialiser();\n\n          this.state.noAnonFunctionType = oldNoAnonFunctionType;\n\n          if (this.canInsertSemicolon()) this.unexpected();\n          if (!this.match(tt.arrow)) this.unexpected();\n\n          return typeNode;\n        });\n\n        if (result.thrown) return null;\n        /*:: invariant(result.node) */\n\n        if (result.error) this.state = result.failState;\n\n        // assign after it is clear it is an arrow\n        // @ts-expect-error todo(flow->ts)\n        node.returnType = result.node.typeAnnotation\n          ? this.finishNode(result.node, \"TypeAnnotation\")\n          : null;\n      }\n\n      return super.parseArrow(node);\n    }\n\n    shouldParseArrow(params: Array<N.Node>): boolean {\n      return this.match(tt.colon) || super.shouldParseArrow(params);\n    }\n\n    setArrowFunctionParameters(\n      node: Undone<N.ArrowFunctionExpression>,\n      params:\n        | Array<N.Expression | N.SpreadElement>\n        | Array<N.Expression | N.RestElement>,\n    ): void {\n      if (\n        this.state.noArrowParamsConversionAt.includes(\n          this.offsetToSourcePos(node.start),\n        )\n      ) {\n        node.params = params as N.ArrowFunctionExpression[\"params\"];\n      } else {\n        super.setArrowFunctionParameters(node, params);\n      }\n    }\n\n    checkParams(\n      node: N.Function,\n      allowDuplicates: boolean,\n      isArrowFunction?: boolean | null,\n      strictModeChanged: boolean = true,\n    ): void {\n      if (\n        isArrowFunction &&\n        this.state.noArrowParamsConversionAt.includes(\n          this.offsetToSourcePos(node.start),\n        )\n      ) {\n        return;\n      }\n\n      // ensure the `this` param is first, if it exists\n      for (let i = 0; i < node.params.length; i++) {\n        if (this.isThisParam(node.params[i]) && i > 0) {\n          this.raise(FlowErrors.ThisParamMustBeFirst, node.params[i]);\n        }\n      }\n\n      super.checkParams(\n        node,\n        allowDuplicates,\n        isArrowFunction,\n        strictModeChanged,\n      );\n    }\n\n    parseParenAndDistinguishExpression(canBeArrow: boolean): N.Expression {\n      return super.parseParenAndDistinguishExpression(\n        canBeArrow &&\n          !this.state.noArrowAt.includes(\n            this.sourceToOffsetPos(this.state.start),\n          ),\n      );\n    }\n\n    parseSubscripts(\n      base: N.Expression,\n      startLoc: Position,\n      noCalls?: boolean | null,\n    ): N.Expression {\n      if (\n        base.type === \"Identifier\" &&\n        base.name === \"async\" &&\n        this.state.noArrowAt.includes(startLoc.index)\n      ) {\n        this.next();\n\n        const node = this.startNodeAt<N.CallExpression>(startLoc);\n        node.callee = base;\n        node.arguments = super.parseCallExpressionArguments();\n        base = this.finishNode(node, \"CallExpression\");\n      } else if (\n        base.type === \"Identifier\" &&\n        base.name === \"async\" &&\n        this.match(tt.lt)\n      ) {\n        const state = this.state.clone();\n        const arrow = this.tryParse(\n          abort => this.parseAsyncArrowWithTypeParameters(startLoc) || abort(),\n          state,\n        );\n\n        /*:: invariant(arrow.node != null) */\n        // @ts-expect-error: refine tryParse typings\n        if (!arrow.error && !arrow.aborted) return arrow.node;\n\n        const result = this.tryParse(\n          () => super.parseSubscripts(base, startLoc, noCalls),\n          state,\n        );\n\n        if (result.node && !result.error) return result.node;\n\n        if (arrow.node) {\n          this.state = arrow.failState;\n          // @ts-expect-error: refine tryParse typings\n          return arrow.node;\n        }\n\n        if (result.node) {\n          this.state = result.failState;\n          return result.node;\n        }\n\n        throw arrow.error || result.error;\n      }\n\n      return super.parseSubscripts(base, startLoc, noCalls);\n    }\n\n    parseSubscript(\n      base: N.Expression,\n\n      startLoc: Position,\n      noCalls: boolean | undefined | null,\n      subscriptState: N.ParseSubscriptState,\n    ): N.Expression {\n      if (this.match(tt.questionDot) && this.isLookaheadToken_lt()) {\n        subscriptState.optionalChainMember = true;\n        if (noCalls) {\n          subscriptState.stop = true;\n          return base;\n        }\n        this.next();\n        const node = this.startNodeAt<N.OptionalCallExpression>(startLoc);\n        node.callee = base;\n        node.typeArguments =\n          this.flowParseTypeParameterInstantiationInExpression();\n        this.expect(tt.parenL);\n        node.arguments = this.parseCallExpressionArguments();\n        node.optional = true;\n        return this.finishCallExpression(node, /* optional */ true);\n      } else if (\n        !noCalls &&\n        this.shouldParseTypes() &&\n        (this.match(tt.lt) ||\n          // also handles `new C<<T>`\n          this.match(tt.bitShiftL))\n      ) {\n        const node = this.startNodeAt<\n          N.OptionalCallExpression | N.CallExpression\n        >(startLoc);\n        node.callee = base;\n\n        const result = this.tryParse(() => {\n          node.typeArguments =\n            this.flowParseTypeParameterInstantiationCallOrNew();\n          this.expect(tt.parenL);\n          node.arguments = super.parseCallExpressionArguments();\n          if (subscriptState.optionalChainMember) {\n            (node as Undone<N.OptionalCallExpression>).optional = false;\n          }\n          return this.finishCallExpression(\n            node,\n            subscriptState.optionalChainMember,\n          );\n        });\n\n        if (result.node) {\n          if (result.error) this.state = result.failState;\n          return result.node;\n        }\n      }\n\n      return super.parseSubscript(\n        base,\n\n        startLoc,\n        noCalls,\n        subscriptState,\n      );\n    }\n\n    parseNewCallee(node: N.NewExpression): void {\n      super.parseNewCallee(node);\n\n      let targs = null;\n      if (this.shouldParseTypes() && this.match(tt.lt)) {\n        targs = this.tryParse(() =>\n          this.flowParseTypeParameterInstantiationCallOrNew(),\n        ).node;\n      }\n      node.typeArguments = targs;\n    }\n\n    parseAsyncArrowWithTypeParameters(\n      startLoc: Position,\n    ): N.ArrowFunctionExpression | undefined | null {\n      const node = this.startNodeAt<N.ArrowFunctionExpression>(startLoc);\n      this.parseFunctionParams(node, false);\n      if (!this.parseArrow(node)) return;\n      return super.parseArrowExpression(\n        node,\n        /* params */ undefined,\n        /* isAsync */ true,\n      );\n    }\n\n    readToken_mult_modulo(code: number): void {\n      const next = this.input.charCodeAt(this.state.pos + 1);\n      if (\n        code === charCodes.asterisk &&\n        next === charCodes.slash &&\n        this.state.hasFlowComment\n      ) {\n        this.state.hasFlowComment = false;\n        this.state.pos += 2;\n        this.nextToken();\n        return;\n      }\n\n      super.readToken_mult_modulo(code);\n    }\n\n    readToken_pipe_amp(code: number): void {\n      const next = this.input.charCodeAt(this.state.pos + 1);\n      if (\n        code === charCodes.verticalBar &&\n        next === charCodes.rightCurlyBrace\n      ) {\n        // '|}'\n        this.finishOp(tt.braceBarR, 2);\n        return;\n      }\n\n      super.readToken_pipe_amp(code);\n    }\n\n    parseTopLevel(file: N.File, program: N.Program): N.File {\n      const fileNode = super.parseTopLevel(file, program);\n      if (this.state.hasFlowComment) {\n        this.raise(\n          FlowErrors.UnterminatedFlowComment,\n          this.state.curPosition(),\n        );\n      }\n      return fileNode;\n    }\n\n    skipBlockComment(): N.CommentBlock | undefined {\n      if (this.hasPlugin(\"flowComments\") && this.skipFlowComment()) {\n        if (this.state.hasFlowComment) {\n          throw this.raise(FlowErrors.NestedFlowComment, this.state.startLoc);\n        }\n        this.hasFlowCommentCompletion();\n        const commentSkip = this.skipFlowComment();\n        if (commentSkip) {\n          this.state.pos += commentSkip;\n          this.state.hasFlowComment = true;\n        }\n        return;\n      }\n\n      return super.skipBlockComment(this.state.hasFlowComment ? \"*-/\" : \"*/\");\n    }\n\n    skipFlowComment(): number | false {\n      const { pos } = this.state;\n      let shiftToFirstNonWhiteSpace = 2;\n      while (\n        [charCodes.space, charCodes.tab].includes(\n          // @ts-expect-error testing whether a number is included\n          this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace),\n        )\n      ) {\n        shiftToFirstNonWhiteSpace++;\n      }\n\n      const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);\n      const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);\n\n      if (ch2 === charCodes.colon && ch3 === charCodes.colon) {\n        return shiftToFirstNonWhiteSpace + 2; // check for /*::\n      }\n      if (\n        this.input.slice(\n          shiftToFirstNonWhiteSpace + pos,\n          shiftToFirstNonWhiteSpace + pos + 12,\n        ) === \"flow-include\"\n      ) {\n        return shiftToFirstNonWhiteSpace + 12; // check for /*flow-include\n      }\n      if (ch2 === charCodes.colon && ch3 !== charCodes.colon) {\n        return shiftToFirstNonWhiteSpace; // check for /*:, advance up to :\n      }\n      return false;\n    }\n\n    hasFlowCommentCompletion(): void {\n      const end = this.input.indexOf(\"*/\", this.state.pos);\n      if (end === -1) {\n        throw this.raise(Errors.UnterminatedComment, this.state.curPosition());\n      }\n    }\n\n    // Flow enum parsing\n\n    flowEnumErrorBooleanMemberNotInitialized(\n      loc: Position,\n      {\n        enumName,\n        memberName,\n      }: {\n        enumName: string;\n        memberName: string;\n      },\n    ): void {\n      this.raise(FlowErrors.EnumBooleanMemberNotInitialized, loc, {\n        memberName,\n        enumName,\n      });\n    }\n\n    flowEnumErrorInvalidMemberInitializer(\n      loc: Position,\n      enumContext: EnumContext,\n    ) {\n      return this.raise(\n        !enumContext.explicitType\n          ? FlowErrors.EnumInvalidMemberInitializerUnknownType\n          : enumContext.explicitType === \"symbol\"\n            ? FlowErrors.EnumInvalidMemberInitializerSymbolType\n            : FlowErrors.EnumInvalidMemberInitializerPrimaryType,\n        loc,\n        enumContext,\n      );\n    }\n\n    flowEnumErrorNumberMemberNotInitialized(\n      loc: Position,\n      details: {\n        enumName: string;\n        memberName: string;\n      },\n    ): void {\n      this.raise(FlowErrors.EnumNumberMemberNotInitialized, loc, details);\n    }\n\n    flowEnumErrorStringMemberInconsistentlyInitialized(\n      node: N.Node,\n      details: {\n        enumName: string;\n      },\n    ): void {\n      this.raise(\n        FlowErrors.EnumStringMemberInconsistentlyInitialized,\n        node,\n        details,\n      );\n    }\n\n    flowEnumMemberInit(): EnumMemberInit {\n      const startLoc = this.state.startLoc;\n      const endOfInit = () => this.match(tt.comma) || this.match(tt.braceR);\n      switch (this.state.type) {\n        case tt.num: {\n          const literal = this.parseNumericLiteral(this.state.value);\n          if (endOfInit()) {\n            return { type: \"number\", loc: literal.loc.start, value: literal };\n          }\n          return { type: \"invalid\", loc: startLoc };\n        }\n        case tt.string: {\n          const literal = this.parseStringLiteral(this.state.value);\n          if (endOfInit()) {\n            return { type: \"string\", loc: literal.loc.start, value: literal };\n          }\n          return { type: \"invalid\", loc: startLoc };\n        }\n        case tt._true:\n        case tt._false: {\n          const literal = this.parseBooleanLiteral(this.match(tt._true));\n          if (endOfInit()) {\n            return {\n              type: \"boolean\",\n              loc: literal.loc.start,\n              value: literal,\n            };\n          }\n          return { type: \"invalid\", loc: startLoc };\n        }\n        default:\n          return { type: \"invalid\", loc: startLoc };\n      }\n    }\n\n    flowEnumMemberRaw(): {\n      id: N.Identifier;\n      init: EnumMemberInit;\n    } {\n      const loc = this.state.startLoc;\n      const id = this.parseIdentifier(true);\n      const init = this.eat(tt.eq)\n        ? this.flowEnumMemberInit()\n        : { type: \"none\" as const, loc };\n      return { id, init };\n    }\n\n    flowEnumCheckExplicitTypeMismatch(\n      loc: Position,\n      context: EnumContext,\n      expectedType: EnumExplicitType,\n    ): void {\n      const { explicitType } = context;\n      if (explicitType === null) {\n        return;\n      }\n      if (explicitType !== expectedType) {\n        this.flowEnumErrorInvalidMemberInitializer(loc, context);\n      }\n    }\n\n    flowEnumMembers({\n      enumName,\n      explicitType,\n    }: {\n      enumName: string;\n      explicitType: EnumExplicitType;\n    }): {\n      members: {\n        booleanMembers: Extract<\n          N.FlowEnumMember,\n          { type: \"EnumBooleanMember\" }\n        >[];\n        numberMembers: Extract<\n          N.FlowEnumMember,\n          { type: \"EnumNumberMember\" }\n        >[];\n        stringMembers: Extract<\n          N.FlowEnumMember,\n          { type: \"EnumStringMember\" }\n        >[];\n        defaultedMembers: Extract<\n          N.FlowEnumMember,\n          { type: \"EnumDefaultedMember\" }\n        >[];\n      };\n      hasUnknownMembers: boolean;\n    } {\n      const seenNames = new Set();\n      const members = {\n        // @ts-expect-error: migrate to Babel types\n        booleanMembers: [],\n        // @ts-expect-error: migrate to Babel types\n        numberMembers: [],\n        // @ts-expect-error: migrate to Babel types\n        stringMembers: [],\n        // @ts-expect-error: migrate to Babel types\n        defaultedMembers: [],\n      };\n      let hasUnknownMembers = false;\n      while (!this.match(tt.braceR)) {\n        if (this.eat(tt.ellipsis)) {\n          hasUnknownMembers = true;\n          break;\n        }\n        const memberNode = this.startNode<N.FlowEnumMember>();\n        const { id, init } = this.flowEnumMemberRaw();\n        const memberName = id.name;\n        if (memberName === \"\") {\n          continue;\n        }\n        if (/^[a-z]/.test(memberName)) {\n          this.raise(FlowErrors.EnumInvalidMemberName, id, {\n            memberName,\n            suggestion: memberName[0].toUpperCase() + memberName.slice(1),\n            enumName,\n          });\n        }\n        if (seenNames.has(memberName)) {\n          this.raise(FlowErrors.EnumDuplicateMemberName, id, {\n            memberName,\n            enumName,\n          });\n        }\n        seenNames.add(memberName);\n        const context = { enumName, explicitType, memberName };\n        memberNode.id = id;\n        switch (init.type) {\n          case \"boolean\": {\n            this.flowEnumCheckExplicitTypeMismatch(\n              init.loc,\n              context,\n              \"boolean\",\n            );\n            memberNode.init = init.value;\n            members.booleanMembers.push(\n              this.finishNode(memberNode, \"EnumBooleanMember\"),\n            );\n            break;\n          }\n          case \"number\": {\n            this.flowEnumCheckExplicitTypeMismatch(init.loc, context, \"number\");\n            memberNode.init = init.value;\n            members.numberMembers.push(\n              this.finishNode(memberNode, \"EnumNumberMember\"),\n            );\n            break;\n          }\n          case \"string\": {\n            this.flowEnumCheckExplicitTypeMismatch(init.loc, context, \"string\");\n            memberNode.init = init.value;\n            members.stringMembers.push(\n              this.finishNode(memberNode, \"EnumStringMember\"),\n            );\n            break;\n          }\n          case \"invalid\": {\n            throw this.flowEnumErrorInvalidMemberInitializer(init.loc, context);\n          }\n          case \"none\": {\n            switch (explicitType) {\n              case \"boolean\":\n                this.flowEnumErrorBooleanMemberNotInitialized(\n                  init.loc,\n                  context,\n                );\n                break;\n              case \"number\":\n                this.flowEnumErrorNumberMemberNotInitialized(init.loc, context);\n                break;\n              default:\n                members.defaultedMembers.push(\n                  this.finishNode(memberNode, \"EnumDefaultedMember\"),\n                );\n            }\n          }\n        }\n\n        if (!this.match(tt.braceR)) {\n          this.expect(tt.comma);\n        }\n      }\n      return { members, hasUnknownMembers };\n    }\n\n    flowEnumStringMembers(\n      initializedMembers: Array<N.Node>,\n      defaultedMembers: Array<N.Node>,\n      {\n        enumName,\n      }: {\n        enumName: string;\n      },\n    ): Array<N.Node> {\n      if (initializedMembers.length === 0) {\n        return defaultedMembers;\n      } else if (defaultedMembers.length === 0) {\n        return initializedMembers;\n      } else if (defaultedMembers.length > initializedMembers.length) {\n        for (const member of initializedMembers) {\n          this.flowEnumErrorStringMemberInconsistentlyInitialized(member, {\n            enumName,\n          });\n        }\n        return defaultedMembers;\n      } else {\n        for (const member of defaultedMembers) {\n          this.flowEnumErrorStringMemberInconsistentlyInitialized(member, {\n            enumName,\n          });\n        }\n        return initializedMembers;\n      }\n    }\n\n    flowEnumParseExplicitType({\n      enumName,\n    }: {\n      enumName: string;\n    }): EnumExplicitType {\n      if (!this.eatContextual(tt._of)) return null;\n\n      if (!tokenIsIdentifier(this.state.type)) {\n        throw this.raise(\n          FlowErrors.EnumInvalidExplicitTypeUnknownSupplied,\n          this.state.startLoc,\n          {\n            enumName,\n          },\n        );\n      }\n\n      const { value } = this.state;\n      this.next();\n\n      if (\n        value !== \"boolean\" &&\n        value !== \"number\" &&\n        value !== \"string\" &&\n        value !== \"symbol\"\n      ) {\n        this.raise(FlowErrors.EnumInvalidExplicitType, this.state.startLoc, {\n          enumName,\n          invalidEnumType: value,\n        });\n      }\n\n      return value;\n    }\n\n    flowEnumBody(node: Undone<N.FlowEnumBody>, id: N.Identifier): N.Node {\n      const enumName = id.name;\n      const nameLoc = id.loc.start;\n      const explicitType = this.flowEnumParseExplicitType({ enumName });\n      this.expect(tt.braceL);\n      const { members, hasUnknownMembers } = this.flowEnumMembers({\n        enumName,\n        explicitType,\n      });\n      node.hasUnknownMembers = hasUnknownMembers;\n\n      switch (explicitType) {\n        case \"boolean\":\n          node.explicitType = true;\n          node.members = members.booleanMembers;\n          this.expect(tt.braceR);\n          return this.finishNode(node, \"EnumBooleanBody\");\n        case \"number\":\n          node.explicitType = true;\n          node.members = members.numberMembers;\n          this.expect(tt.braceR);\n          return this.finishNode(node, \"EnumNumberBody\");\n        case \"string\":\n          node.explicitType = true;\n          node.members = this.flowEnumStringMembers(\n            members.stringMembers,\n            members.defaultedMembers,\n            { enumName },\n          );\n          this.expect(tt.braceR);\n          return this.finishNode(node, \"EnumStringBody\");\n        case \"symbol\":\n          node.members = members.defaultedMembers;\n          this.expect(tt.braceR);\n          return this.finishNode(node, \"EnumSymbolBody\");\n        default: {\n          // `explicitType` is `null`\n          const empty = () => {\n            node.members = [];\n            this.expect(tt.braceR);\n            return this.finishNode(node, \"EnumStringBody\");\n          };\n          node.explicitType = false;\n\n          const boolsLen = members.booleanMembers.length;\n          const numsLen = members.numberMembers.length;\n          const strsLen = members.stringMembers.length;\n          const defaultedLen = members.defaultedMembers.length;\n\n          if (!boolsLen && !numsLen && !strsLen && !defaultedLen) {\n            return empty();\n          } else if (!boolsLen && !numsLen) {\n            node.members = this.flowEnumStringMembers(\n              members.stringMembers,\n              members.defaultedMembers,\n              { enumName },\n            );\n            this.expect(tt.braceR);\n            return this.finishNode(node, \"EnumStringBody\");\n          } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) {\n            for (const member of members.defaultedMembers) {\n              this.flowEnumErrorBooleanMemberNotInitialized(member.loc.start, {\n                enumName,\n                memberName: member.id.name,\n              });\n            }\n            node.members = members.booleanMembers;\n            this.expect(tt.braceR);\n            return this.finishNode(node, \"EnumBooleanBody\");\n          } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) {\n            for (const member of members.defaultedMembers) {\n              this.flowEnumErrorNumberMemberNotInitialized(member.loc.start, {\n                enumName,\n                memberName: member.id.name,\n              });\n            }\n            node.members = members.numberMembers;\n            this.expect(tt.braceR);\n            return this.finishNode(node, \"EnumNumberBody\");\n          } else {\n            this.raise(FlowErrors.EnumInconsistentMemberValues, nameLoc, {\n              enumName,\n            });\n            return empty();\n          }\n        }\n      }\n    }\n\n    flowParseEnumDeclaration(\n      node: Undone<N.FlowEnumDeclaration>,\n    ): N.FlowEnumDeclaration {\n      const id = this.parseIdentifier();\n      node.id = id;\n      node.body = this.flowEnumBody(this.startNode(), id);\n      return this.finishNode(node, \"EnumDeclaration\");\n    }\n\n    jsxParseOpeningElementAfterName(\n      node: N.JSXOpeningElement,\n    ): N.JSXOpeningElement {\n      if (this.shouldParseTypes()) {\n        if (this.match(tt.lt) || this.match(tt.bitShiftL)) {\n          node.typeArguments =\n            this.flowParseTypeParameterInstantiationInExpression();\n        }\n      }\n\n      return super.jsxParseOpeningElementAfterName(node);\n    }\n\n    // check if the next token is a tt.lt\n    isLookaheadToken_lt(): boolean {\n      const next = this.nextTokenStart();\n      if (this.input.charCodeAt(next) === charCodes.lessThan) {\n        const afterNext = this.input.charCodeAt(next + 1);\n        return (\n          afterNext !== charCodes.lessThan && afterNext !== charCodes.equalsTo\n        );\n      }\n      return false;\n    }\n\n    // used after we have finished parsing types\n    reScan_lt_gt() {\n      const { type } = this.state;\n      if (type === tt.lt) {\n        this.state.pos -= 1;\n        this.readToken_lt();\n      } else if (type === tt.gt) {\n        this.state.pos -= 1;\n        this.readToken_gt();\n      }\n    }\n\n    reScan_lt() {\n      const { type } = this.state;\n      if (type === tt.bitShiftL) {\n        this.state.pos -= 2;\n        this.finishOp(tt.lt, 1);\n        return tt.lt;\n      }\n      return type;\n    }\n\n    maybeUnwrapTypeCastExpression(node: N.Node) {\n      return node.type === \"TypeCastExpression\" ? node.expression : node;\n    }\n  };\n","const entities: { [name: string]: string } = {\n  __proto__: null,\n  quot: \"\\u0022\",\n  amp: \"&\",\n  apos: \"\\u0027\",\n  lt: \"<\",\n  gt: \">\",\n  nbsp: \"\\u00A0\",\n  iexcl: \"\\u00A1\",\n  cent: \"\\u00A2\",\n  pound: \"\\u00A3\",\n  curren: \"\\u00A4\",\n  yen: \"\\u00A5\",\n  brvbar: \"\\u00A6\",\n  sect: \"\\u00A7\",\n  uml: \"\\u00A8\",\n  copy: \"\\u00A9\",\n  ordf: \"\\u00AA\",\n  laquo: \"\\u00AB\",\n  not: \"\\u00AC\",\n  shy: \"\\u00AD\",\n  reg: \"\\u00AE\",\n  macr: \"\\u00AF\",\n  deg: \"\\u00B0\",\n  plusmn: \"\\u00B1\",\n  sup2: \"\\u00B2\",\n  sup3: \"\\u00B3\",\n  acute: \"\\u00B4\",\n  micro: \"\\u00B5\",\n  para: \"\\u00B6\",\n  middot: \"\\u00B7\",\n  cedil: \"\\u00B8\",\n  sup1: \"\\u00B9\",\n  ordm: \"\\u00BA\",\n  raquo: \"\\u00BB\",\n  frac14: \"\\u00BC\",\n  frac12: \"\\u00BD\",\n  frac34: \"\\u00BE\",\n  iquest: \"\\u00BF\",\n  Agrave: \"\\u00C0\",\n  Aacute: \"\\u00C1\",\n  Acirc: \"\\u00C2\",\n  Atilde: \"\\u00C3\",\n  Auml: \"\\u00C4\",\n  Aring: \"\\u00C5\",\n  AElig: \"\\u00C6\",\n  Ccedil: \"\\u00C7\",\n  Egrave: \"\\u00C8\",\n  Eacute: \"\\u00C9\",\n  Ecirc: \"\\u00CA\",\n  Euml: \"\\u00CB\",\n  Igrave: \"\\u00CC\",\n  Iacute: \"\\u00CD\",\n  Icirc: \"\\u00CE\",\n  Iuml: \"\\u00CF\",\n  ETH: \"\\u00D0\",\n  Ntilde: \"\\u00D1\",\n  Ograve: \"\\u00D2\",\n  Oacute: \"\\u00D3\",\n  Ocirc: \"\\u00D4\",\n  Otilde: \"\\u00D5\",\n  Ouml: \"\\u00D6\",\n  times: \"\\u00D7\",\n  Oslash: \"\\u00D8\",\n  Ugrave: \"\\u00D9\",\n  Uacute: \"\\u00DA\",\n  Ucirc: \"\\u00DB\",\n  Uuml: \"\\u00DC\",\n  Yacute: \"\\u00DD\",\n  THORN: \"\\u00DE\",\n  szlig: \"\\u00DF\",\n  agrave: \"\\u00E0\",\n  aacute: \"\\u00E1\",\n  acirc: \"\\u00E2\",\n  atilde: \"\\u00E3\",\n  auml: \"\\u00E4\",\n  aring: \"\\u00E5\",\n  aelig: \"\\u00E6\",\n  ccedil: \"\\u00E7\",\n  egrave: \"\\u00E8\",\n  eacute: \"\\u00E9\",\n  ecirc: \"\\u00EA\",\n  euml: \"\\u00EB\",\n  igrave: \"\\u00EC\",\n  iacute: \"\\u00ED\",\n  icirc: \"\\u00EE\",\n  iuml: \"\\u00EF\",\n  eth: \"\\u00F0\",\n  ntilde: \"\\u00F1\",\n  ograve: \"\\u00F2\",\n  oacute: \"\\u00F3\",\n  ocirc: \"\\u00F4\",\n  otilde: \"\\u00F5\",\n  ouml: \"\\u00F6\",\n  divide: \"\\u00F7\",\n  oslash: \"\\u00F8\",\n  ugrave: \"\\u00F9\",\n  uacute: \"\\u00FA\",\n  ucirc: \"\\u00FB\",\n  uuml: \"\\u00FC\",\n  yacute: \"\\u00FD\",\n  thorn: \"\\u00FE\",\n  yuml: \"\\u00FF\",\n  OElig: \"\\u0152\",\n  oelig: \"\\u0153\",\n  Scaron: \"\\u0160\",\n  scaron: \"\\u0161\",\n  Yuml: \"\\u0178\",\n  fnof: \"\\u0192\",\n  circ: \"\\u02C6\",\n  tilde: \"\\u02DC\",\n  Alpha: \"\\u0391\",\n  Beta: \"\\u0392\",\n  Gamma: \"\\u0393\",\n  Delta: \"\\u0394\",\n  Epsilon: \"\\u0395\",\n  Zeta: \"\\u0396\",\n  Eta: \"\\u0397\",\n  Theta: \"\\u0398\",\n  Iota: \"\\u0399\",\n  Kappa: \"\\u039A\",\n  Lambda: \"\\u039B\",\n  Mu: \"\\u039C\",\n  Nu: \"\\u039D\",\n  Xi: \"\\u039E\",\n  Omicron: \"\\u039F\",\n  Pi: \"\\u03A0\",\n  Rho: \"\\u03A1\",\n  Sigma: \"\\u03A3\",\n  Tau: \"\\u03A4\",\n  Upsilon: \"\\u03A5\",\n  Phi: \"\\u03A6\",\n  Chi: \"\\u03A7\",\n  Psi: \"\\u03A8\",\n  Omega: \"\\u03A9\",\n  alpha: \"\\u03B1\",\n  beta: \"\\u03B2\",\n  gamma: \"\\u03B3\",\n  delta: \"\\u03B4\",\n  epsilon: \"\\u03B5\",\n  zeta: \"\\u03B6\",\n  eta: \"\\u03B7\",\n  theta: \"\\u03B8\",\n  iota: \"\\u03B9\",\n  kappa: \"\\u03BA\",\n  lambda: \"\\u03BB\",\n  mu: \"\\u03BC\",\n  nu: \"\\u03BD\",\n  xi: \"\\u03BE\",\n  omicron: \"\\u03BF\",\n  pi: \"\\u03C0\",\n  rho: \"\\u03C1\",\n  sigmaf: \"\\u03C2\",\n  sigma: \"\\u03C3\",\n  tau: \"\\u03C4\",\n  upsilon: \"\\u03C5\",\n  phi: \"\\u03C6\",\n  chi: \"\\u03C7\",\n  psi: \"\\u03C8\",\n  omega: \"\\u03C9\",\n  thetasym: \"\\u03D1\",\n  upsih: \"\\u03D2\",\n  piv: \"\\u03D6\",\n  ensp: \"\\u2002\",\n  emsp: \"\\u2003\",\n  thinsp: \"\\u2009\",\n  zwnj: \"\\u200C\",\n  zwj: \"\\u200D\",\n  lrm: \"\\u200E\",\n  rlm: \"\\u200F\",\n  ndash: \"\\u2013\",\n  mdash: \"\\u2014\",\n  lsquo: \"\\u2018\",\n  rsquo: \"\\u2019\",\n  sbquo: \"\\u201A\",\n  ldquo: \"\\u201C\",\n  rdquo: \"\\u201D\",\n  bdquo: \"\\u201E\",\n  dagger: \"\\u2020\",\n  Dagger: \"\\u2021\",\n  bull: \"\\u2022\",\n  hellip: \"\\u2026\",\n  permil: \"\\u2030\",\n  prime: \"\\u2032\",\n  Prime: \"\\u2033\",\n  lsaquo: \"\\u2039\",\n  rsaquo: \"\\u203A\",\n  oline: \"\\u203E\",\n  frasl: \"\\u2044\",\n  euro: \"\\u20AC\",\n  image: \"\\u2111\",\n  weierp: \"\\u2118\",\n  real: \"\\u211C\",\n  trade: \"\\u2122\",\n  alefsym: \"\\u2135\",\n  larr: \"\\u2190\",\n  uarr: \"\\u2191\",\n  rarr: \"\\u2192\",\n  darr: \"\\u2193\",\n  harr: \"\\u2194\",\n  crarr: \"\\u21B5\",\n  lArr: \"\\u21D0\",\n  uArr: \"\\u21D1\",\n  rArr: \"\\u21D2\",\n  dArr: \"\\u21D3\",\n  hArr: \"\\u21D4\",\n  forall: \"\\u2200\",\n  part: \"\\u2202\",\n  exist: \"\\u2203\",\n  empty: \"\\u2205\",\n  nabla: \"\\u2207\",\n  isin: \"\\u2208\",\n  notin: \"\\u2209\",\n  ni: \"\\u220B\",\n  prod: \"\\u220F\",\n  sum: \"\\u2211\",\n  minus: \"\\u2212\",\n  lowast: \"\\u2217\",\n  radic: \"\\u221A\",\n  prop: \"\\u221D\",\n  infin: \"\\u221E\",\n  ang: \"\\u2220\",\n  and: \"\\u2227\",\n  or: \"\\u2228\",\n  cap: \"\\u2229\",\n  cup: \"\\u222A\",\n  int: \"\\u222B\",\n  there4: \"\\u2234\",\n  sim: \"\\u223C\",\n  cong: \"\\u2245\",\n  asymp: \"\\u2248\",\n  ne: \"\\u2260\",\n  equiv: \"\\u2261\",\n  le: \"\\u2264\",\n  ge: \"\\u2265\",\n  sub: \"\\u2282\",\n  sup: \"\\u2283\",\n  nsub: \"\\u2284\",\n  sube: \"\\u2286\",\n  supe: \"\\u2287\",\n  oplus: \"\\u2295\",\n  otimes: \"\\u2297\",\n  perp: \"\\u22A5\",\n  sdot: \"\\u22C5\",\n  lceil: \"\\u2308\",\n  rceil: \"\\u2309\",\n  lfloor: \"\\u230A\",\n  rfloor: \"\\u230B\",\n  lang: \"\\u2329\",\n  rang: \"\\u232A\",\n  loz: \"\\u25CA\",\n  spades: \"\\u2660\",\n  clubs: \"\\u2663\",\n  hearts: \"\\u2665\",\n  diams: \"\\u2666\",\n} as const;\nexport default entities;\n","import * as charCodes from \"charcodes\";\n\n// Matches a whole line break (where CRLF is considered a single\n// line break). Used to count lines.\nexport const lineBreak = /\\r\\n|[\\r\\n\\u2028\\u2029]/;\nexport const lineBreakG = new RegExp(lineBreak.source, \"g\");\n\n// https://tc39.github.io/ecma262/#sec-line-terminators\nexport function isNewLine(code: number): boolean {\n  switch (code) {\n    case charCodes.lineFeed:\n    case charCodes.carriageReturn:\n    case charCodes.lineSeparator:\n    case charCodes.paragraphSeparator:\n      return true;\n\n    default:\n      return false;\n  }\n}\n\nexport function hasNewLine(input: string, start: number, end: number): boolean {\n  for (let i = start; i < end; i++) {\n    if (isNewLine(input.charCodeAt(i))) {\n      return true;\n    }\n  }\n  return false;\n}\n\nexport const skipWhiteSpace = /(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g;\n\nexport const skipWhiteSpaceInLine =\n  /(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*/g;\n\n// https://tc39.github.io/ecma262/#sec-white-space\nexport function isWhitespace(code: number): boolean {\n  switch (code) {\n    case 0x0009: // CHARACTER TABULATION\n    case 0x000b: // LINE TABULATION\n    case 0x000c: // FORM FEED\n    case charCodes.space:\n    case charCodes.nonBreakingSpace:\n    case charCodes.oghamSpaceMark:\n    case 0x2000: // EN QUAD\n    case 0x2001: // EM QUAD\n    case 0x2002: // EN SPACE\n    case 0x2003: // EM SPACE\n    case 0x2004: // THREE-PER-EM SPACE\n    case 0x2005: // FOUR-PER-EM SPACE\n    case 0x2006: // SIX-PER-EM SPACE\n    case 0x2007: // FIGURE SPACE\n    case 0x2008: // PUNCTUATION SPACE\n    case 0x2009: // THIN SPACE\n    case 0x200a: // HAIR SPACE\n    case 0x202f: // NARROW NO-BREAK SPACE\n    case 0x205f: // MEDIUM MATHEMATICAL SPACE\n    case 0x3000: // IDEOGRAPHIC SPACE\n    case 0xfeff: // ZERO WIDTH NO-BREAK SPACE\n      return true;\n\n    default:\n      return false;\n  }\n}\n","import * as charCodes from \"charcodes\";\n\nimport XHTMLEntities from \"./xhtml.ts\";\nimport type Parser from \"../../parser/index.ts\";\nimport type { ExpressionErrors } from \"../../parser/util.ts\";\nimport {\n  tokenComesBeforeExpression,\n  tokenIsKeyword,\n  tokenLabelName,\n  type TokenType,\n  tt,\n} from \"../../tokenizer/types.ts\";\nimport type { TokContext } from \"../../tokenizer/context.ts\";\nimport { types as tc } from \"../../tokenizer/context.ts\";\nimport type * as N from \"../../types.ts\";\nimport { isIdentifierChar, isIdentifierStart } from \"../../util/identifier.ts\";\nimport type { Position } from \"../../util/location.ts\";\nimport { isNewLine } from \"../../util/whitespace.ts\";\nimport { Errors, ParseErrorEnum } from \"../../parse-error.ts\";\nimport type { Undone } from \"../../parser/node.ts\";\n\n/* eslint sort-keys: \"error\" */\nconst JsxErrors = ParseErrorEnum`jsx`({\n  AttributeIsEmpty:\n    \"JSX attributes must only be assigned a non-empty expression.\",\n  MissingClosingTagElement: ({ openingTagName }: { openingTagName: string }) =>\n    `Expected corresponding JSX closing tag for <${openingTagName}>.`,\n  MissingClosingTagFragment: \"Expected corresponding JSX closing tag for <>.\",\n  UnexpectedSequenceExpression:\n    \"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?\",\n  // FIXME: Unify with Errors.UnexpectedToken\n  UnexpectedToken: ({\n    unexpected,\n    HTMLEntity,\n  }: {\n    unexpected: string;\n    HTMLEntity: string;\n  }) =>\n    `Unexpected token \\`${unexpected}\\`. Did you mean \\`${HTMLEntity}\\` or \\`{'${unexpected}'}\\`?`,\n  UnsupportedJsxValue:\n    \"JSX value should be either an expression or a quoted JSX text.\",\n  UnterminatedJsxContent: \"Unterminated JSX contents.\",\n  UnwrappedAdjacentJSXElements:\n    \"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?\",\n});\n\n/* eslint-disable sort-keys */\n\nfunction isFragment(object?: N.JSXTag | null): object is N.JSXFragmentTag {\n  return object\n    ? object.type === \"JSXOpeningFragment\" ||\n        object.type === \"JSXClosingFragment\"\n    : false;\n}\n\n// Transforms JSX element name to string.\n\nfunction getQualifiedJSXName(\n  object: N.JSXIdentifier | N.JSXNamespacedName | N.JSXMemberExpression,\n): string {\n  if (object.type === \"JSXIdentifier\") {\n    return object.name;\n  }\n\n  if (object.type === \"JSXNamespacedName\") {\n    return object.namespace.name + \":\" + object.name.name;\n  }\n\n  if (object.type === \"JSXMemberExpression\") {\n    return (\n      getQualifiedJSXName(object.object) +\n      \".\" +\n      getQualifiedJSXName(object.property)\n    );\n  }\n\n  // istanbul ignore next\n  // @ts-expect-error - object is 'never'\n  throw new Error(\"Node had unexpected type: \" + object.type);\n}\n\nexport interface IJSXParserMixin {\n  jsxParseOpeningElementAfterName(\n    node: N.JSXOpeningElement,\n  ): N.JSXOpeningElement;\n}\n\nexport type ClassWithMixin<\n  T extends new (...args: any) => any,\n  M extends object,\n> = T extends new (...args: infer P) => infer I\n  ? new (...args: P) => I & M\n  : never;\n\nexport default (superClass: typeof Parser) =>\n  class JSXParserMixin extends superClass implements Parser, IJSXParserMixin {\n    // Reads inline JSX contents token.\n\n    jsxReadToken(): void {\n      let out = \"\";\n      let chunkStart = this.state.pos;\n      for (;;) {\n        if (this.state.pos >= this.length) {\n          throw this.raise(\n            JsxErrors.UnterminatedJsxContent,\n            this.state.startLoc,\n          );\n        }\n\n        const ch = this.input.charCodeAt(this.state.pos);\n\n        switch (ch) {\n          case charCodes.lessThan:\n          case charCodes.leftCurlyBrace:\n            if (this.state.pos === this.state.start) {\n              if (ch === charCodes.lessThan && this.state.canStartJSXElement) {\n                ++this.state.pos;\n                this.finishToken(tt.jsxTagStart);\n              } else {\n                super.getTokenFromCode(ch);\n              }\n              return;\n            }\n            out += this.input.slice(chunkStart, this.state.pos);\n            this.finishToken(tt.jsxText, out);\n            return;\n\n          case charCodes.ampersand:\n            out += this.input.slice(chunkStart, this.state.pos);\n            out += this.jsxReadEntity();\n            chunkStart = this.state.pos;\n            break;\n\n          case charCodes.greaterThan:\n          case charCodes.rightCurlyBrace:\n            if (process.env.BABEL_8_BREAKING) {\n              this.raise(JsxErrors.UnexpectedToken, this.state.curPosition(), {\n                unexpected: this.input[this.state.pos],\n                HTMLEntity:\n                  ch === charCodes.rightCurlyBrace ? \"&rbrace;\" : \"&gt;\",\n              });\n            }\n          /* falls through */\n\n          default:\n            if (isNewLine(ch)) {\n              out += this.input.slice(chunkStart, this.state.pos);\n              out += this.jsxReadNewLine(true);\n              chunkStart = this.state.pos;\n            } else {\n              ++this.state.pos;\n            }\n        }\n      }\n    }\n\n    jsxReadNewLine(normalizeCRLF: boolean): string {\n      const ch = this.input.charCodeAt(this.state.pos);\n      let out;\n      ++this.state.pos;\n      if (\n        ch === charCodes.carriageReturn &&\n        this.input.charCodeAt(this.state.pos) === charCodes.lineFeed\n      ) {\n        ++this.state.pos;\n        out = normalizeCRLF ? \"\\n\" : \"\\r\\n\";\n      } else {\n        out = String.fromCharCode(ch);\n      }\n      ++this.state.curLine;\n      this.state.lineStart = this.state.pos;\n\n      return out;\n    }\n\n    jsxReadString(quote: number): void {\n      let out = \"\";\n      let chunkStart = ++this.state.pos;\n      for (;;) {\n        if (this.state.pos >= this.length) {\n          throw this.raise(Errors.UnterminatedString, this.state.startLoc);\n        }\n\n        const ch = this.input.charCodeAt(this.state.pos);\n        if (ch === quote) break;\n        if (ch === charCodes.ampersand) {\n          out += this.input.slice(chunkStart, this.state.pos);\n          out += this.jsxReadEntity();\n          chunkStart = this.state.pos;\n        } else if (isNewLine(ch)) {\n          out += this.input.slice(chunkStart, this.state.pos);\n          out += this.jsxReadNewLine(false);\n          chunkStart = this.state.pos;\n        } else {\n          ++this.state.pos;\n        }\n      }\n      out += this.input.slice(chunkStart, this.state.pos++);\n      this.finishToken(tt.string, out);\n    }\n\n    jsxReadEntity(): string {\n      const startPos = ++this.state.pos;\n      if (this.codePointAtPos(this.state.pos) === charCodes.numberSign) {\n        ++this.state.pos;\n\n        let radix = 10;\n        if (this.codePointAtPos(this.state.pos) === charCodes.lowercaseX) {\n          radix = 16;\n          ++this.state.pos;\n        }\n\n        const codePoint = this.readInt(\n          radix,\n          /* len */ undefined,\n          /* forceLen */ false,\n          /* allowNumSeparator */ \"bail\",\n        );\n        if (\n          codePoint !== null &&\n          this.codePointAtPos(this.state.pos) === charCodes.semicolon\n        ) {\n          ++this.state.pos;\n          return String.fromCodePoint(codePoint);\n        }\n      } else {\n        let count = 0;\n        let semi = false;\n        while (\n          count++ < 10 &&\n          this.state.pos < this.length &&\n          !(semi = this.codePointAtPos(this.state.pos) === charCodes.semicolon)\n        ) {\n          ++this.state.pos;\n        }\n\n        if (semi) {\n          const desc = this.input.slice(startPos, this.state.pos);\n          const entity = XHTMLEntities[desc];\n          ++this.state.pos;\n\n          if (entity) {\n            return entity;\n          }\n        }\n      }\n\n      // Not a valid entity\n      this.state.pos = startPos;\n      return \"&\";\n    }\n\n    // Read a JSX identifier (valid tag or attribute name).\n    //\n    // Optimized version since JSX identifiers can\"t contain\n    // escape characters and so can be read as single slice.\n    // Also assumes that first character was already checked\n    // by isIdentifierStart in readToken.\n\n    jsxReadWord(): void {\n      let ch;\n      const start = this.state.pos;\n      do {\n        ch = this.input.charCodeAt(++this.state.pos);\n      } while (isIdentifierChar(ch) || ch === charCodes.dash);\n      this.finishToken(tt.jsxName, this.input.slice(start, this.state.pos));\n    }\n\n    // Parse next token as JSX identifier\n\n    jsxParseIdentifier(): N.JSXIdentifier {\n      const node = this.startNode<N.JSXIdentifier>();\n      if (this.match(tt.jsxName)) {\n        node.name = this.state.value;\n      } else if (tokenIsKeyword(this.state.type)) {\n        node.name = tokenLabelName(this.state.type);\n      } else {\n        this.unexpected();\n      }\n      this.next();\n      return this.finishNode(node, \"JSXIdentifier\");\n    }\n\n    // Parse namespaced identifier.\n\n    jsxParseNamespacedName(): N.JSXNamespacedName | N.JSXIdentifier {\n      const startLoc = this.state.startLoc;\n      const name = this.jsxParseIdentifier();\n      if (!this.eat(tt.colon)) return name;\n\n      const node = this.startNodeAt<N.JSXNamespacedName>(startLoc);\n      node.namespace = name;\n      node.name = this.jsxParseIdentifier();\n      return this.finishNode(node, \"JSXNamespacedName\");\n    }\n\n    // Parses element name in any form - namespaced, member\n    // or single identifier.\n\n    jsxParseElementName():\n      | N.JSXIdentifier\n      | N.JSXNamespacedName\n      | N.JSXMemberExpression {\n      const startLoc = this.state.startLoc;\n      let node: N.JSXIdentifier | N.JSXNamespacedName | N.JSXMemberExpression =\n        this.jsxParseNamespacedName();\n      if (node.type === \"JSXNamespacedName\") {\n        return node;\n      }\n      while (this.eat(tt.dot)) {\n        const newNode = this.startNodeAt<N.JSXMemberExpression>(startLoc);\n        newNode.object = node;\n        newNode.property = this.jsxParseIdentifier();\n        node = this.finishNode(newNode, \"JSXMemberExpression\");\n      }\n      return node;\n    }\n\n    // Parses any type of JSX attribute value.\n\n    jsxParseAttributeValue():\n      | N.JSXExpressionContainer\n      | N.JSXElement\n      | N.StringLiteral {\n      let node;\n      switch (this.state.type) {\n        case tt.braceL:\n          node = this.startNode();\n          this.setContext(tc.brace);\n          this.next();\n          node = this.jsxParseExpressionContainer(node, tc.j_oTag);\n          if (node.expression.type === \"JSXEmptyExpression\") {\n            this.raise(JsxErrors.AttributeIsEmpty, node);\n          }\n          return node;\n\n        case tt.jsxTagStart:\n        case tt.string:\n          return this.parseExprAtom() as N.JSXElement | N.StringLiteral;\n\n        default:\n          throw this.raise(JsxErrors.UnsupportedJsxValue, this.state.startLoc);\n      }\n    }\n\n    // JSXEmptyExpression is unique type since it doesn't actually parse anything,\n    // and so it should start at the end of last read token (left brace) and finish\n    // at the beginning of the next one (right brace).\n\n    jsxParseEmptyExpression(): N.JSXEmptyExpression {\n      const node = this.startNodeAt(this.state.lastTokEndLoc);\n      return this.finishNodeAt(node, \"JSXEmptyExpression\", this.state.startLoc);\n    }\n\n    // Parse JSX spread child\n\n    jsxParseSpreadChild(node: Undone<N.JSXSpreadChild>): N.JSXSpreadChild {\n      this.next(); // ellipsis\n      node.expression = this.parseExpression();\n      this.setContext(tc.j_expr);\n      this.state.canStartJSXElement = true;\n      this.expect(tt.braceR);\n\n      return this.finishNode(node, \"JSXSpreadChild\");\n    }\n\n    // Parses JSX expression enclosed into curly brackets.\n\n    jsxParseExpressionContainer(\n      node: Undone<N.JSXExpressionContainer>,\n      previousContext: TokContext,\n    ): N.JSXExpressionContainer {\n      if (this.match(tt.braceR)) {\n        node.expression = this.jsxParseEmptyExpression();\n      } else {\n        const expression = this.parseExpression();\n\n        if (process.env.BABEL_8_BREAKING) {\n          if (\n            expression.type === \"SequenceExpression\" &&\n            !expression.extra?.parenthesized\n          ) {\n            this.raise(\n              JsxErrors.UnexpectedSequenceExpression,\n              expression.expressions[1],\n            );\n          }\n        }\n\n        node.expression = expression;\n      }\n      this.setContext(previousContext);\n      this.state.canStartJSXElement = true;\n      this.expect(tt.braceR);\n\n      return this.finishNode(node, \"JSXExpressionContainer\");\n    }\n\n    // Parses following JSX attribute name-value pair.\n\n    jsxParseAttribute(): N.JSXAttribute | N.JSXSpreadAttribute {\n      const node = this.startNode<N.JSXAttribute | N.JSXSpreadAttribute>();\n      if (this.match(tt.braceL)) {\n        this.setContext(tc.brace);\n        this.next();\n        this.expect(tt.ellipsis);\n        node.argument = this.parseMaybeAssignAllowIn();\n        this.setContext(tc.j_oTag);\n        this.state.canStartJSXElement = true;\n        this.expect(tt.braceR);\n        return this.finishNode(node, \"JSXSpreadAttribute\");\n      }\n      node.name = this.jsxParseNamespacedName();\n      node.value = this.eat(tt.eq) ? this.jsxParseAttributeValue() : null;\n      return this.finishNode(node, \"JSXAttribute\");\n    }\n\n    // Parses JSX opening tag starting after \"<\".\n\n    jsxParseOpeningElementAt(\n      startLoc: Position,\n    ): N.JSXOpeningElement | N.JSXOpeningFragment {\n      const node = this.startNodeAt<N.JSXOpeningElement | N.JSXOpeningFragment>(\n        startLoc,\n      );\n      if (this.eat(tt.jsxTagEnd)) {\n        return this.finishNode(node, \"JSXOpeningFragment\");\n      }\n      node.name = this.jsxParseElementName();\n      return this.jsxParseOpeningElementAfterName(\n        node as Undone<N.JSXOpeningElement>,\n      );\n    }\n\n    jsxParseOpeningElementAfterName(\n      node: Undone<N.JSXOpeningElement>,\n    ): N.JSXOpeningElement {\n      const attributes: (N.JSXAttribute | N.JSXSpreadAttribute)[] = [];\n      while (!this.match(tt.slash) && !this.match(tt.jsxTagEnd)) {\n        attributes.push(this.jsxParseAttribute());\n      }\n      node.attributes = attributes;\n      node.selfClosing = this.eat(tt.slash);\n      this.expect(tt.jsxTagEnd);\n      return this.finishNode(node, \"JSXOpeningElement\");\n    }\n\n    // Parses JSX closing tag starting after \"</\".\n\n    jsxParseClosingElementAt(\n      startLoc: Position,\n    ): N.JSXClosingElement | N.JSXClosingFragment {\n      const node = this.startNodeAt<N.JSXClosingFragment | N.JSXClosingElement>(\n        startLoc,\n      );\n      if (this.eat(tt.jsxTagEnd)) {\n        return this.finishNode(node, \"JSXClosingFragment\");\n      }\n      node.name = this.jsxParseElementName();\n      this.expect(tt.jsxTagEnd);\n      return this.finishNode(node, \"JSXClosingElement\");\n    }\n\n    // Parses entire JSX element, including it\"s opening tag\n    // (starting after \"<\"), attributes, contents and closing tag.\n\n    jsxParseElementAt(startLoc: Position): N.JSXElement | N.JSXFragment {\n      const node = this.startNodeAt<N.JSXElement | N.JSXFragment>(startLoc);\n      const children = [];\n      const openingElement = this.jsxParseOpeningElementAt(startLoc);\n      let closingElement = null;\n\n      if (!openingElement.selfClosing) {\n        contents: for (;;) {\n          switch (this.state.type) {\n            case tt.jsxTagStart:\n              startLoc = this.state.startLoc;\n              this.next();\n              if (this.eat(tt.slash)) {\n                closingElement = this.jsxParseClosingElementAt(startLoc);\n                break contents;\n              }\n              children.push(this.jsxParseElementAt(startLoc));\n              break;\n\n            case tt.jsxText:\n              children.push(this.parseLiteral(this.state.value, \"JSXText\"));\n              break;\n\n            case tt.braceL: {\n              const node = this.startNode<\n                N.JSXSpreadChild | N.JSXExpressionContainer\n              >();\n              this.setContext(tc.brace);\n              this.next();\n              if (this.match(tt.ellipsis)) {\n                children.push(this.jsxParseSpreadChild(node));\n              } else {\n                children.push(\n                  this.jsxParseExpressionContainer(node, tc.j_expr),\n                );\n              }\n\n              break;\n            }\n            // istanbul ignore next - should never happen\n            default:\n              this.unexpected();\n          }\n        }\n\n        if (\n          isFragment(openingElement) &&\n          !isFragment(closingElement) &&\n          closingElement !== null\n        ) {\n          this.raise(JsxErrors.MissingClosingTagFragment, closingElement);\n        } else if (!isFragment(openingElement) && isFragment(closingElement)) {\n          this.raise(JsxErrors.MissingClosingTagElement, closingElement, {\n            openingTagName: getQualifiedJSXName(openingElement.name),\n          });\n        } else if (!isFragment(openingElement) && !isFragment(closingElement)) {\n          if (\n            getQualifiedJSXName(closingElement.name) !==\n            getQualifiedJSXName(openingElement.name)\n          ) {\n            this.raise(JsxErrors.MissingClosingTagElement, closingElement, {\n              openingTagName: getQualifiedJSXName(openingElement.name),\n            });\n          }\n        }\n      }\n\n      if (isFragment(openingElement)) {\n        node.openingFragment = openingElement;\n        node.closingFragment = closingElement;\n      } else {\n        node.openingElement = openingElement;\n        node.closingElement = closingElement;\n      }\n      node.children = children;\n      if (this.match(tt.lt)) {\n        throw this.raise(\n          JsxErrors.UnwrappedAdjacentJSXElements,\n          this.state.startLoc,\n        );\n      }\n\n      return isFragment(openingElement)\n        ? this.finishNode(node, \"JSXFragment\")\n        : this.finishNode(node, \"JSXElement\");\n    }\n\n    // Parses entire JSX element from current position.\n\n    jsxParseElement(): N.JSXElement | N.JSXFragment {\n      const startLoc = this.state.startLoc;\n      this.next();\n      return this.jsxParseElementAt(startLoc);\n    }\n\n    setContext(newContext: TokContext) {\n      const { context } = this.state;\n      context[context.length - 1] = newContext;\n    }\n\n    // ==================================\n    // Overrides\n    // ==================================\n\n    parseExprAtom(refExpressionErrors?: ExpressionErrors | null): N.Expression {\n      if (this.match(tt.jsxTagStart)) {\n        return this.jsxParseElement();\n      } else if (\n        this.match(tt.lt) &&\n        this.input.charCodeAt(this.state.pos) !== charCodes.exclamationMark\n      ) {\n        // In case we encounter an lt token here it will always be the start of\n        // jsx as the lt sign is not allowed in places that expect an expression\n        this.replaceToken(tt.jsxTagStart);\n        return this.jsxParseElement();\n      } else {\n        return super.parseExprAtom(refExpressionErrors);\n      }\n    }\n\n    skipSpace() {\n      const curContext = this.curContext();\n      if (!curContext.preserveSpace) super.skipSpace();\n    }\n\n    getTokenFromCode(code: number): void {\n      const context = this.curContext();\n\n      if (context === tc.j_expr) {\n        this.jsxReadToken();\n        return;\n      }\n\n      if (context === tc.j_oTag || context === tc.j_cTag) {\n        if (isIdentifierStart(code)) {\n          this.jsxReadWord();\n          return;\n        }\n\n        if (code === charCodes.greaterThan) {\n          ++this.state.pos;\n          this.finishToken(tt.jsxTagEnd);\n          return;\n        }\n\n        if (\n          (code === charCodes.quotationMark || code === charCodes.apostrophe) &&\n          context === tc.j_oTag\n        ) {\n          this.jsxReadString(code);\n          return;\n        }\n      }\n\n      if (\n        code === charCodes.lessThan &&\n        this.state.canStartJSXElement &&\n        this.input.charCodeAt(this.state.pos + 1) !== charCodes.exclamationMark\n      ) {\n        ++this.state.pos;\n        this.finishToken(tt.jsxTagStart);\n        return;\n      }\n\n      super.getTokenFromCode(code);\n    }\n\n    updateContext(prevType: TokenType): void {\n      const { context, type } = this.state;\n      if (type === tt.slash && prevType === tt.jsxTagStart) {\n        // do not consider JSX expr -> JSX open tag -> ... anymore\n        // reconsider as closing tag context\n        context.splice(-2, 2, tc.j_cTag);\n        this.state.canStartJSXElement = false;\n      } else if (type === tt.jsxTagStart) {\n        // start opening tag context\n        context.push(tc.j_oTag);\n      } else if (type === tt.jsxTagEnd) {\n        const out = context[context.length - 1];\n        if ((out === tc.j_oTag && prevType === tt.slash) || out === tc.j_cTag) {\n          context.pop();\n          this.state.canStartJSXElement =\n            context[context.length - 1] === tc.j_expr;\n        } else {\n          this.setContext(tc.j_expr);\n          this.state.canStartJSXElement = true;\n        }\n      } else {\n        this.state.canStartJSXElement = tokenComesBeforeExpression(type);\n      }\n    }\n  };\n","import type { Position } from \"../../util/location.ts\";\nimport ScopeHandler, { NameType, Scope } from \"../../util/scope.ts\";\nimport { BindingFlag, ScopeFlag } from \"../../util/scopeflags.ts\";\nimport type * as N from \"../../types.ts\";\nimport { Errors } from \"../../parse-error.ts\";\n\nconst enum TsNameType {\n  Types = 1 << 0,\n  // enums (which are also in .types)\n  Enums = 1 << 1,\n  // const enums (which are also in .enums and .types)\n  ConstEnums = 1 << 2,\n  // classes (which are also in .lexical) and interface (which are also in .types)\n  Classes = 1 << 3,\n  // namespaces and ambient functions (or classes) are too difficult to track,\n  // especially without type analysis.\n  // We need to track them anyway, to avoid \"X is not defined\" errors\n  // when exporting them.\n  ExportOnlyBindings = 1 << 4,\n}\n\nclass TypeScriptScope extends Scope {\n  tsNames: Map<string, TsNameType> = new Map();\n}\n\n// See https://github.com/babel/babel/pull/9766#discussion_r268920730 for an\n// explanation of how typescript handles scope.\n\nexport default class TypeScriptScopeHandler extends ScopeHandler<TypeScriptScope> {\n  importsStack: Set<string>[] = [];\n\n  createScope(flags: ScopeFlag): TypeScriptScope {\n    this.importsStack.push(new Set()); // Always keep the top-level scope for export checks.\n\n    return new TypeScriptScope(flags);\n  }\n\n  enter(flags: ScopeFlag): void {\n    if (flags === ScopeFlag.TS_MODULE) {\n      this.importsStack.push(new Set());\n    }\n\n    super.enter(flags);\n  }\n\n  exit() {\n    const flags = super.exit();\n\n    if (flags === ScopeFlag.TS_MODULE) {\n      this.importsStack.pop();\n    }\n\n    return flags;\n  }\n\n  hasImport(name: string, allowShadow?: boolean) {\n    const len = this.importsStack.length;\n    if (this.importsStack[len - 1].has(name)) {\n      return true;\n    }\n    if (!allowShadow && len > 1) {\n      for (let i = 0; i < len - 1; i++) {\n        if (this.importsStack[i].has(name)) return true;\n      }\n    }\n    return false;\n  }\n\n  declareName(name: string, bindingType: BindingFlag, loc: Position) {\n    if (bindingType & BindingFlag.FLAG_TS_IMPORT) {\n      if (this.hasImport(name, true)) {\n        this.parser.raise(Errors.VarRedeclaration, loc, {\n          identifierName: name,\n        });\n      }\n      this.importsStack[this.importsStack.length - 1].add(name);\n      return;\n    }\n\n    const scope = this.currentScope();\n    let type = scope.tsNames.get(name) || 0;\n\n    if (bindingType & BindingFlag.FLAG_TS_EXPORT_ONLY) {\n      this.maybeExportDefined(scope, name);\n      scope.tsNames.set(name, type | TsNameType.ExportOnlyBindings);\n      return;\n    }\n\n    super.declareName(name, bindingType, loc);\n\n    if (bindingType & BindingFlag.KIND_TYPE) {\n      if (!(bindingType & BindingFlag.KIND_VALUE)) {\n        // \"Value\" bindings have already been registered by the superclass.\n        this.checkRedeclarationInScope(scope, name, bindingType, loc);\n        this.maybeExportDefined(scope, name);\n      }\n      type = type | TsNameType.Types;\n    }\n    if (bindingType & BindingFlag.FLAG_TS_ENUM) {\n      type = type | TsNameType.Enums;\n    }\n    if (bindingType & BindingFlag.FLAG_TS_CONST_ENUM) {\n      type = type | TsNameType.ConstEnums;\n    }\n    if (bindingType & BindingFlag.FLAG_CLASS) {\n      type = type | TsNameType.Classes;\n    }\n    if (type) scope.tsNames.set(name, type);\n  }\n\n  isRedeclaredInScope(\n    scope: TypeScriptScope,\n    name: string,\n    bindingType: BindingFlag,\n  ): boolean {\n    const type = scope.tsNames.get(name);\n    if ((type & TsNameType.Enums) > 0) {\n      if (bindingType & BindingFlag.FLAG_TS_ENUM) {\n        // Enums can be merged with other enums if they are both\n        //  const or both non-const.\n        const isConst = !!(bindingType & BindingFlag.FLAG_TS_CONST_ENUM);\n        const wasConst = (type & TsNameType.ConstEnums) > 0;\n        return isConst !== wasConst;\n      }\n      return true;\n    }\n    if (\n      bindingType & BindingFlag.FLAG_CLASS &&\n      (type & TsNameType.Classes) > 0\n    ) {\n      if (scope.names.get(name) & NameType.Lexical) {\n        // Classes can be merged with interfaces\n        return !!(bindingType & BindingFlag.KIND_VALUE);\n      } else {\n        // Interface can be merged with other classes or interfaces\n        return false;\n      }\n    }\n    if (bindingType & BindingFlag.KIND_TYPE && (type & TsNameType.Types) > 0) {\n      return true;\n    }\n\n    return super.isRedeclaredInScope(scope, name, bindingType);\n  }\n\n  checkLocalExport(id: N.Identifier) {\n    const { name } = id;\n\n    if (this.hasImport(name)) return;\n\n    const len = this.scopeStack.length;\n    for (let i = len - 1; i >= 0; i--) {\n      const scope = this.scopeStack[i];\n      const type = scope.tsNames.get(name);\n      if (\n        (type & TsNameType.Types) > 0 ||\n        (type & TsNameType.ExportOnlyBindings) > 0\n      ) {\n        return;\n      }\n    }\n\n    super.checkLocalExport(id);\n  }\n}\n","// ProductionParameterHandler is a stack fashioned production parameter tracker\n// https://tc39.es/ecma262/#sec-grammar-notation\n// The tracked parameters are defined above.\n//\n// Whenever [+Await]/[+Yield] appears in the right-hand sides of a production,\n// we must enter a new tracking stack. For example when parsing\n//\n// AsyncFunctionDeclaration [Yield, Await]:\n//   async [no LineTerminator here] function BindingIdentifier[?Yield, ?Await]\n//     ( FormalParameters[~Yield, +Await] ) { AsyncFunctionBody }\n//\n// we must follow such process:\n//\n// 1. parse async keyword\n// 2. parse function keyword\n// 3. parse bindingIdentifier <= inherit current parameters: [?Await]\n// 4. enter new stack with (PARAM_AWAIT)\n// 5. parse formal parameters <= must have [Await] parameter [+Await]\n// 6. parse function body\n// 7. exit current stack\n\nexport const enum ParamKind {\n  // Initial Parameter flags\n  PARAM = 0b0000,\n  // track [Yield] production parameter\n  PARAM_YIELD = 0b0001,\n  // track [Await] production parameter\n  PARAM_AWAIT = 0b0010,\n  // track [Return] production parameter\n  PARAM_RETURN = 0b0100,\n  // track [In] production parameter\n  PARAM_IN = 0b1000,\n}\n\n// todo(flow->ts) - check if more granular type can be used,\n//  type below is not good because things like PARAM_AWAIT|PARAM_YIELD are not included\n// export type ParamKind =\n//   | typeof PARAM\n//   | typeof PARAM_AWAIT\n//   | typeof PARAM_IN\n//   | typeof PARAM_RETURN\n//   | typeof PARAM_YIELD;\n\nexport default class ProductionParameterHandler {\n  stacks: Array<ParamKind> = [];\n  enter(flags: ParamKind) {\n    this.stacks.push(flags);\n  }\n\n  exit() {\n    this.stacks.pop();\n  }\n\n  currentFlags(): ParamKind {\n    return this.stacks[this.stacks.length - 1];\n  }\n\n  get hasAwait(): boolean {\n    return (this.currentFlags() & ParamKind.PARAM_AWAIT) > 0;\n  }\n\n  get hasYield(): boolean {\n    return (this.currentFlags() & ParamKind.PARAM_YIELD) > 0;\n  }\n\n  get hasReturn(): boolean {\n    return (this.currentFlags() & ParamKind.PARAM_RETURN) > 0;\n  }\n\n  get hasIn(): boolean {\n    return (this.currentFlags() & ParamKind.PARAM_IN) > 0;\n  }\n}\n\nexport function functionFlags(\n  isAsync: boolean,\n  isGenerator: boolean,\n): ParamKind {\n  return (\n    (isAsync ? ParamKind.PARAM_AWAIT : 0) |\n    (isGenerator ? ParamKind.PARAM_YIELD : 0)\n  );\n}\n","import type { OptionFlags, Options } from \"../options.ts\";\nimport type State from \"../tokenizer/state.ts\";\nimport type { PluginsMap } from \"./index.ts\";\nimport type ScopeHandler from \"../util/scope.ts\";\nimport type ExpressionScopeHandler from \"../util/expression-scope.ts\";\nimport type ClassScopeHandler from \"../util/class-scope.ts\";\nimport type ProductionParameterHandler from \"../util/production-parameter.ts\";\nimport type {\n  ParserPluginWithOptions,\n  PluginConfig,\n  PluginOptions,\n} from \"../typings.ts\";\nimport type * as N from \"../types.ts\";\n\nexport default class BaseParser {\n  // Properties set by constructor in index.js\n  declare options: Options;\n  declare optionFlags: OptionFlags;\n  declare inModule: boolean;\n  declare scope: ScopeHandler<any>;\n  declare classScope: ClassScopeHandler;\n  declare prodParam: ProductionParameterHandler;\n  declare expressionScope: ExpressionScopeHandler;\n  declare plugins: PluginsMap;\n  declare filename: string | undefined | null;\n  declare startIndex: number;\n  // Names of exports store. `default` is stored as a name for both\n  // `export default foo;` and `export { foo as default };`.\n  declare exportedIdentifiers: Set<string>;\n  sawUnambiguousESM: boolean = false;\n  ambiguousScriptDifferentAst: boolean = false;\n\n  // Initialized by Tokenizer\n  declare state: State;\n  // input and length are not in state as they are constant and we do\n  // not want to ever copy them, which happens if state gets cloned\n  declare input: string;\n  declare length: number;\n  // Comment store for Program.comments\n  declare comments: Array<N.Comment>;\n\n  sourceToOffsetPos(sourcePos: number) {\n    return sourcePos + this.startIndex;\n  }\n\n  offsetToSourcePos(offsetPos: number) {\n    return offsetPos - this.startIndex;\n  }\n\n  // This method accepts either a string (plugin name) or an array pair\n  // (plugin name and options object). If an options object is given,\n  // then each value is non-recursively checked for identity with that\n  // plugin’s actual option value.\n  hasPlugin(pluginConfig: PluginConfig): boolean {\n    if (typeof pluginConfig === \"string\") {\n      return this.plugins.has(pluginConfig);\n    } else {\n      const [pluginName, pluginOptions] = pluginConfig;\n      if (!this.hasPlugin(pluginName)) {\n        return false;\n      }\n      const actualOptions = this.plugins.get(pluginName);\n      for (const key of Object.keys(\n        pluginOptions,\n      ) as (keyof typeof pluginOptions)[]) {\n        if (actualOptions?.[key] !== pluginOptions[key]) {\n          return false;\n        }\n      }\n      return true;\n    }\n  }\n\n  getPluginOption<\n    PluginName extends ParserPluginWithOptions[0],\n    OptionName extends keyof PluginOptions<PluginName>,\n  >(plugin: PluginName, name: OptionName) {\n    return (this.plugins.get(plugin) as null | PluginOptions<PluginName>)?.[\n      name\n    ];\n  }\n}\n","/*:: declare var invariant; */\n\nimport BaseParser from \"./base.ts\";\nimport type { Comment, Node } from \"../types.ts\";\nimport * as charCodes from \"charcodes\";\nimport type { Undone } from \"./node.ts\";\n\n/**\n * A whitespace token containing comments\n */\nexport type CommentWhitespace = {\n  /**\n   * the start of the whitespace token.\n   */\n  start: number;\n  /**\n   * the end of the whitespace token.\n   */\n  end: number;\n  /**\n   * the containing comments\n   */\n  comments: Array<Comment>;\n  /**\n   * the immediately preceding AST node of the whitespace token\n   */\n  leadingNode: Node | null;\n  /**\n   * the immediately following AST node of the whitespace token\n   */\n  trailingNode: Node | null;\n  /**\n   * the innermost AST node containing the whitespace with minimal size (|end - start|)\n   */\n  containingNode: Node | null;\n};\n\n/**\n * Merge comments with node's trailingComments or assign comments to be\n * trailingComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nfunction setTrailingComments(node: Undone<Node>, comments: Array<Comment>) {\n  if (node.trailingComments === undefined) {\n    node.trailingComments = comments;\n  } else {\n    node.trailingComments.unshift(...comments);\n  }\n}\n\n/**\n * Merge comments with node's leadingComments or assign comments to be\n * leadingComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nfunction setLeadingComments(node: Undone<Node>, comments: Array<Comment>) {\n  if (node.leadingComments === undefined) {\n    node.leadingComments = comments;\n  } else {\n    node.leadingComments.unshift(...comments);\n  }\n}\n\n/**\n * Merge comments with node's innerComments or assign comments to be\n * innerComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n */\nexport function setInnerComments(\n  node: Undone<Node>,\n  comments?: Array<Comment>,\n) {\n  if (node.innerComments === undefined) {\n    node.innerComments = comments;\n  } else {\n    node.innerComments.unshift(...comments);\n  }\n}\n\n/**\n * Given node and elements array, if elements has non-null element,\n * merge comments to its trailingComments, otherwise merge comments\n * to node's innerComments\n */\nfunction adjustInnerComments(\n  node: Undone<Node>,\n  elements: Array<Node>,\n  commentWS: CommentWhitespace,\n) {\n  let lastElement = null;\n  let i = elements.length;\n  while (lastElement === null && i > 0) {\n    lastElement = elements[--i];\n  }\n  if (lastElement === null || lastElement.start > commentWS.start) {\n    setInnerComments(node, commentWS.comments);\n  } else {\n    setTrailingComments(lastElement, commentWS.comments);\n  }\n}\n\nexport default class CommentsParser extends BaseParser {\n  addComment(comment: Comment): void {\n    if (this.filename) comment.loc.filename = this.filename;\n    const { commentsLen } = this.state;\n    if (this.comments.length !== commentsLen) {\n      this.comments.length = commentsLen;\n    }\n    this.comments.push(comment);\n    this.state.commentsLen++;\n  }\n\n  /**\n   * Given a newly created AST node _n_, attach _n_ to a comment whitespace _w_ if applicable\n   * {@see {@link CommentWhitespace}}\n   */\n  processComment(node: Node): void {\n    const { commentStack } = this.state;\n    const commentStackLength = commentStack.length;\n    if (commentStackLength === 0) return;\n    let i = commentStackLength - 1;\n    const lastCommentWS = commentStack[i];\n\n    if (lastCommentWS.start === node.end) {\n      lastCommentWS.leadingNode = node;\n      i--;\n    }\n\n    const { start: nodeStart } = node;\n    // invariant: for all 0 <= j <= i, let c = commentStack[j], c must satisfy c.end < node.end\n    for (; i >= 0; i--) {\n      const commentWS = commentStack[i];\n      const commentEnd = commentWS.end;\n      if (commentEnd > nodeStart) {\n        // by definition of commentWhiteSpace, this implies commentWS.start > nodeStart\n        // so node can be a containingNode candidate. At this time we can finalize the comment\n        // whitespace, because\n        // 1) its leadingNode or trailingNode, if exists, will not change\n        // 2) its containingNode have been assigned and will not change because it is the\n        //    innermost minimal-sized AST node\n        commentWS.containingNode = node;\n        this.finalizeComment(commentWS);\n        commentStack.splice(i, 1);\n      } else {\n        if (commentEnd === nodeStart) {\n          commentWS.trailingNode = node;\n        }\n        // stop the loop when commentEnd <= nodeStart\n        break;\n      }\n    }\n  }\n\n  /**\n   * Assign the comments of comment whitespaces to related AST nodes.\n   * Also adjust innerComments following trailing comma.\n   */\n  finalizeComment(commentWS: CommentWhitespace) {\n    const { comments } = commentWS;\n    if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) {\n      if (commentWS.leadingNode !== null) {\n        setTrailingComments(commentWS.leadingNode, comments);\n      }\n      if (commentWS.trailingNode !== null) {\n        setLeadingComments(commentWS.trailingNode, comments);\n      }\n    } else {\n      /*:: invariant(commentWS.containingNode !== null) */\n      const { containingNode: node, start: commentStart } = commentWS;\n      if (\n        this.input.charCodeAt(this.offsetToSourcePos(commentStart) - 1) ===\n        charCodes.comma\n      ) {\n        // If a commentWhitespace follows a comma and the containingNode allows\n        // list structures with trailing comma, merge it to the trailingComment\n        // of the last non-null list element\n        switch (node.type) {\n          case \"ObjectExpression\":\n          case \"ObjectPattern\":\n          case \"RecordExpression\":\n            adjustInnerComments(node, node.properties, commentWS);\n            break;\n          case \"CallExpression\":\n          case \"OptionalCallExpression\":\n            adjustInnerComments(node, node.arguments, commentWS);\n            break;\n          case \"ImportExpression\":\n            adjustInnerComments(\n              node,\n              [node.source, node.options ?? null],\n              commentWS,\n            );\n            break;\n          case \"FunctionDeclaration\":\n          case \"FunctionExpression\":\n          case \"ArrowFunctionExpression\":\n          case \"ObjectMethod\":\n          case \"ClassMethod\":\n          case \"ClassPrivateMethod\":\n            adjustInnerComments(node, node.params, commentWS);\n            break;\n          case \"ArrayExpression\":\n          case \"ArrayPattern\":\n          case \"TupleExpression\":\n            adjustInnerComments(node, node.elements, commentWS);\n            break;\n          case \"ExportNamedDeclaration\":\n          case \"ImportDeclaration\":\n            adjustInnerComments(node, node.specifiers, commentWS);\n            break;\n          case \"TSEnumDeclaration\":\n            if (!process.env.BABEL_8_BREAKING) {\n              adjustInnerComments(node, node.members, commentWS);\n            } else {\n              setInnerComments(node, comments);\n            }\n            break;\n          case \"TSEnumBody\":\n            adjustInnerComments(node, node.members, commentWS);\n            break;\n          default: {\n            setInnerComments(node, comments);\n          }\n        }\n      } else {\n        setInnerComments(node, comments);\n      }\n    }\n  }\n\n  /**\n   * Drains remaining commentStack and applies finalizeComment\n   * to each comment whitespace. Used only in parseExpression\n   * where the top level AST node is _not_ Program\n   * {@see {@link CommentsParser#finalizeComment}}\n   */\n  finalizeRemainingComments() {\n    const { commentStack } = this.state;\n    for (let i = commentStack.length - 1; i >= 0; i--) {\n      this.finalizeComment(commentStack[i]);\n    }\n    this.state.commentStack = [];\n  }\n\n  /* eslint-disable no-irregular-whitespace */\n  /**\n   * Reset previous node trailing comments. Used in object / class\n   * property parsing. We parse `async`, `static`, `set` and `get`\n   * as an identifier but may reinterpret it into an async/static/accessor\n   * method later. In this case the identifier is not part of the AST and we\n   * should sync the knowledge to commentStacks\n   *\n   * For example, when parsing\n   * ```\n   * async /* 1 *​/ function f() {}\n   * ```\n   * the comment whitespace `/* 1 *​/` has leading node Identifier(async). When\n   * we see the function token, we create a Function node and mark `/* 1 *​/` as\n   * inner comments. So `/* 1 *​/` should be detached from the Identifier node.\n   *\n   * @param node the last finished AST node _before_ current token\n   */\n  /* eslint-enable no-irregular-whitespace */\n  resetPreviousNodeTrailingComments(node: Node) {\n    const { commentStack } = this.state;\n    const { length } = commentStack;\n    if (length === 0) return;\n    const commentWS = commentStack[length - 1];\n    if (commentWS.leadingNode === node) {\n      commentWS.leadingNode = null;\n    }\n  }\n\n  /**\n   * Attach a node to the comment whitespaces right before/after\n   * the given range.\n   *\n   * This is used to properly attach comments around parenthesized\n   * expressions as leading/trailing comments of the inner expression.\n   */\n  takeSurroundingComments(node: Node, start: number, end: number) {\n    const { commentStack } = this.state;\n    const commentStackLength = commentStack.length;\n    if (commentStackLength === 0) return;\n    let i = commentStackLength - 1;\n\n    for (; i >= 0; i--) {\n      const commentWS = commentStack[i];\n      const commentEnd = commentWS.end;\n      const commentStart = commentWS.start;\n\n      if (commentStart === end) {\n        commentWS.leadingNode = node;\n      } else if (commentEnd === start) {\n        commentWS.trailingNode = node;\n      } else if (commentEnd < start) {\n        break;\n      }\n    }\n  }\n}\n","import type { Options } from \"../options.ts\";\nimport type { CommentWhitespace } from \"../parser/comments\";\nimport { Position } from \"../util/location.ts\";\n\nimport { types as ct, type TokContext } from \"./context.ts\";\nimport { tt, type TokenType } from \"./types.ts\";\nimport type { Errors } from \"../parse-error.ts\";\nimport type { ParseError } from \"../parse-error.ts\";\n\nexport type DeferredStrictError =\n  | typeof Errors.StrictNumericEscape\n  | typeof Errors.StrictOctalLiteral;\n\ntype TopicContextState = {\n  // When a topic binding has been currently established,\n  // then this is 1. Otherwise, it is 0. This is forwards compatible\n  // with a future plugin for multiple lexical topics.\n  maxNumOfResolvableTopics: number;\n  // When a topic binding has been currently established, and if that binding\n  // has been used as a topic reference `#`, then this is 0. Otherwise, it is\n  // `null`. This is forwards compatible with a future plugin for multiple\n  // lexical topics.\n  maxTopicIndex: null | 0;\n};\n\nexport const enum LoopLabelKind {\n  Loop = 1,\n  Switch = 2,\n}\n\ndeclare const bit: import(\"../../../../scripts/babel-plugin-bit-decorator/types.d.ts\").BitDecorator<State>;\n\nexport default class State {\n  @bit.storage flags: number;\n\n  @bit accessor strict = false;\n\n  startIndex: number;\n  curLine: number;\n  lineStart: number;\n\n  // And, if locations are used, the {line, column} object\n  // corresponding to those offsets\n  startLoc: Position;\n  endLoc: Position;\n\n  init({\n    strictMode,\n    sourceType,\n    startIndex,\n    startLine,\n    startColumn,\n  }: Options): void {\n    this.strict =\n      strictMode === false\n        ? false\n        : strictMode === true\n          ? true\n          : sourceType === \"module\";\n\n    this.startIndex = startIndex;\n    this.curLine = startLine;\n    this.lineStart = -startColumn;\n    this.startLoc = this.endLoc = new Position(\n      startLine,\n      startColumn,\n      startIndex,\n    );\n  }\n\n  errors: ParseError<any>[] = [];\n\n  // Used to signify the start of a potential arrow function\n  potentialArrowAt: number = -1;\n\n  // Used to signify the start of an expression which looks like a\n  // typed arrow function, but it isn't\n  // e.g. a ? (b) : c => d\n  //          ^\n  noArrowAt: number[] = [];\n\n  // Used to signify the start of an expression whose params, if it looks like\n  // an arrow function, shouldn't be converted to assignable nodes.\n  // This is used to defer the validation of typed arrow functions inside\n  // conditional expressions.\n  // e.g. a ? (b) : c => d\n  //          ^\n  noArrowParamsConversionAt: number[] = [];\n\n  // Flags to track\n  @bit accessor maybeInArrowParameters = false;\n  @bit accessor inType = false;\n  @bit accessor noAnonFunctionType = false;\n  @bit accessor hasFlowComment = false;\n  @bit accessor isAmbientContext = false;\n  @bit accessor inAbstractClass = false;\n  @bit accessor inDisallowConditionalTypesContext = false;\n\n  // For the Hack-style pipelines plugin\n  topicContext: TopicContextState = {\n    maxNumOfResolvableTopics: 0,\n    maxTopicIndex: null,\n  };\n\n  // For the F#-style pipelines plugin\n  @bit accessor soloAwait = false;\n  @bit accessor inFSharpPipelineDirectBody = false;\n\n  // Labels in scope.\n  labels: Array<{\n    kind: LoopLabelKind;\n    name?: string | null;\n    statementStart?: number;\n  }> = [];\n\n  commentsLen = 0;\n  // Comment attachment store\n  commentStack: Array<CommentWhitespace> = [];\n\n  // The current position of the tokenizer in the input.\n  pos: number = 0;\n\n  // Properties of the current token:\n  // Its type\n  type: TokenType = tt.eof;\n\n  // For tokens that include more information than their type, the value\n  value: any = null;\n\n  // Its start and end offset\n  start: number = 0;\n  end: number = 0;\n\n  // Position information for the previous token\n  // this is initialized when generating the second token.\n  lastTokEndLoc: Position = null;\n  // this is initialized when generating the second token.\n  lastTokStartLoc: Position = null;\n\n  // The context stack is used to track whether the apostrophe \"`\" starts\n  // or ends a string template\n  context: Array<TokContext> = [ct.brace];\n\n  // Used to track whether a JSX element is allowed to form\n  @bit accessor canStartJSXElement = true;\n\n  // Used to signal to callers of `readWord1` whether the word\n  // contained any escape sequences. This is needed because words with\n  // escape sequences must not be interpreted as keywords.\n  @bit accessor containsEsc = false;\n\n  // Used to track invalid escape sequences in template literals,\n  // that must be reported if the template is not tagged.\n  firstInvalidTemplateEscapePos: null | Position = null;\n\n  @bit accessor hasTopLevelAwait = false;\n\n  // This property is used to track the following errors\n  // - StrictNumericEscape\n  // - StrictOctalLiteral\n  //\n  // in a literal that occurs prior to/immediately after a \"use strict\" directive.\n\n  // todo(JLHwung): set strictErrors to null and avoid recording string errors\n  // after a non-directive is parsed\n  strictErrors: Map<number, [DeferredStrictError, Position]> = new Map();\n\n  // Tokens length in token store\n  tokensLength: number = 0;\n\n  /**\n   * When we add a new property, we must manually update the `clone` method\n   * @see State#clone\n   */\n\n  curPosition(): Position {\n    return new Position(\n      this.curLine,\n      this.pos - this.lineStart,\n      this.pos + this.startIndex,\n    );\n  }\n\n  clone(): State {\n    const state = new State();\n    state.flags = this.flags;\n    state.startIndex = this.startIndex;\n    state.curLine = this.curLine;\n    state.lineStart = this.lineStart;\n    state.startLoc = this.startLoc;\n    state.endLoc = this.endLoc;\n    state.errors = this.errors.slice();\n    state.potentialArrowAt = this.potentialArrowAt;\n    state.noArrowAt = this.noArrowAt.slice();\n    state.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice();\n    state.topicContext = this.topicContext;\n    state.labels = this.labels.slice();\n    state.commentsLen = this.commentsLen;\n    state.commentStack = this.commentStack.slice();\n    state.pos = this.pos;\n    state.type = this.type;\n    state.value = this.value;\n    state.start = this.start;\n    state.end = this.end;\n    state.lastTokEndLoc = this.lastTokEndLoc;\n    state.lastTokStartLoc = this.lastTokStartLoc;\n    state.context = this.context.slice();\n    state.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos;\n    state.strictErrors = this.strictErrors;\n    state.tokensLength = this.tokensLength;\n\n    return state;\n  }\n}\n\nexport type LookaheadState = {\n  pos: number;\n  value: any;\n  type: TokenType;\n  start: number;\n  end: number;\n  context: TokContext[];\n  startLoc: Position;\n  lastTokEndLoc: Position;\n  curLine: number;\n  lineStart: number;\n  curPosition: State[\"curPosition\"];\n  /* Used only in readToken_mult_modulo */\n  inType: boolean;\n  // These boolean properties are not initialized in createLookaheadState()\n  // instead they will only be set by the tokenizer\n  containsEsc?: boolean;\n};\n","// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\n// The following character codes are forbidden from being\n// an immediate sibling of NumericLiteralSeparator _\nconst forbiddenNumericSeparatorSiblings = {\n  decBinOct: new Set<number>([\n    charCodes.dot,\n    charCodes.uppercaseB,\n    charCodes.uppercaseE,\n    charCodes.uppercaseO,\n    charCodes.underscore, // multiple separators are not allowed\n    charCodes.lowercaseB,\n    charCodes.lowercaseE,\n    charCodes.lowercaseO,\n  ]),\n  hex: new Set<number>([\n    charCodes.dot,\n    charCodes.uppercaseX,\n    charCodes.underscore, // multiple separators are not allowed\n    charCodes.lowercaseX,\n  ]),\n};\n\nconst isAllowedNumericSeparatorSibling = {\n  // 0 - 1\n  bin: (ch: number) => ch === charCodes.digit0 || ch === charCodes.digit1,\n\n  // 0 - 7\n  oct: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit7,\n\n  // 0 - 9\n  dec: (ch: number) => ch >= charCodes.digit0 && ch <= charCodes.digit9,\n\n  // 0 - 9, A - F, a - f,\n  hex: (ch: number) =>\n    (ch >= charCodes.digit0 && ch <= charCodes.digit9) ||\n    (ch >= charCodes.uppercaseA && ch <= charCodes.uppercaseF) ||\n    (ch >= charCodes.lowercaseA && ch <= charCodes.lowercaseF),\n};\n\nexport type StringContentsErrorHandlers = EscapedCharErrorHandlers & {\n  unterminated(\n    initialPos: number,\n    initialLineStart: number,\n    initialCurLine: number,\n  ): void;\n};\n\nexport function readStringContents(\n  type: \"single\" | \"double\" | \"template\",\n  input: string,\n  pos: number,\n  lineStart: number,\n  curLine: number,\n  errors: StringContentsErrorHandlers,\n) {\n  const initialPos = pos;\n  const initialLineStart = lineStart;\n  const initialCurLine = curLine;\n\n  let out = \"\";\n  let firstInvalidLoc = null;\n  let chunkStart = pos;\n  const { length } = input;\n  for (;;) {\n    if (pos >= length) {\n      errors.unterminated(initialPos, initialLineStart, initialCurLine);\n      out += input.slice(chunkStart, pos);\n      break;\n    }\n    const ch = input.charCodeAt(pos);\n    if (isStringEnd(type, ch, input, pos)) {\n      out += input.slice(chunkStart, pos);\n      break;\n    }\n    if (ch === charCodes.backslash) {\n      out += input.slice(chunkStart, pos);\n      const res = readEscapedChar(\n        input,\n        pos,\n        lineStart,\n        curLine,\n        type === \"template\",\n        errors,\n      );\n      if (res.ch === null && !firstInvalidLoc) {\n        firstInvalidLoc = { pos, lineStart, curLine };\n      } else {\n        out += res.ch;\n      }\n      ({ pos, lineStart, curLine } = res);\n      chunkStart = pos;\n    } else if (\n      ch === charCodes.lineSeparator ||\n      ch === charCodes.paragraphSeparator\n    ) {\n      ++pos;\n      ++curLine;\n      lineStart = pos;\n    } else if (ch === charCodes.lineFeed || ch === charCodes.carriageReturn) {\n      if (type === \"template\") {\n        out += input.slice(chunkStart, pos) + \"\\n\";\n        ++pos;\n        if (\n          ch === charCodes.carriageReturn &&\n          input.charCodeAt(pos) === charCodes.lineFeed\n        ) {\n          ++pos;\n        }\n        ++curLine;\n        chunkStart = lineStart = pos;\n      } else {\n        errors.unterminated(initialPos, initialLineStart, initialCurLine);\n      }\n    } else {\n      ++pos;\n    }\n  }\n  return process.env.BABEL_8_BREAKING\n    ? { pos, str: out, firstInvalidLoc, lineStart, curLine }\n    : {\n        pos,\n        str: out,\n        firstInvalidLoc,\n        lineStart,\n        curLine,\n        containsInvalid: !!firstInvalidLoc,\n      };\n}\n\nfunction isStringEnd(\n  type: \"single\" | \"double\" | \"template\",\n  ch: number,\n  input: string,\n  pos: number,\n) {\n  if (type === \"template\") {\n    return (\n      ch === charCodes.graveAccent ||\n      (ch === charCodes.dollarSign &&\n        input.charCodeAt(pos + 1) === charCodes.leftCurlyBrace)\n    );\n  }\n  return (\n    ch === (type === \"double\" ? charCodes.quotationMark : charCodes.apostrophe)\n  );\n}\n\ntype EscapedCharErrorHandlers = HexCharErrorHandlers &\n  CodePointErrorHandlers & {\n    strictNumericEscape(pos: number, lineStart: number, curLine: number): void;\n  };\n\nfunction readEscapedChar(\n  input: string,\n  pos: number,\n  lineStart: number,\n  curLine: number,\n  inTemplate: boolean,\n  errors: EscapedCharErrorHandlers,\n) {\n  const throwOnInvalid = !inTemplate;\n  pos++; // skip '\\'\n\n  const res = (ch: string | null) => ({ pos, ch, lineStart, curLine });\n\n  const ch = input.charCodeAt(pos++);\n  switch (ch) {\n    case charCodes.lowercaseN:\n      return res(\"\\n\");\n    case charCodes.lowercaseR:\n      return res(\"\\r\");\n    case charCodes.lowercaseX: {\n      let code;\n      ({ code, pos } = readHexChar(\n        input,\n        pos,\n        lineStart,\n        curLine,\n        2,\n        false,\n        throwOnInvalid,\n        errors,\n      ));\n      return res(code === null ? null : String.fromCharCode(code));\n    }\n    case charCodes.lowercaseU: {\n      let code;\n      ({ code, pos } = readCodePoint(\n        input,\n        pos,\n        lineStart,\n        curLine,\n        throwOnInvalid,\n        errors,\n      ));\n      return res(code === null ? null : String.fromCodePoint(code));\n    }\n    case charCodes.lowercaseT:\n      return res(\"\\t\");\n    case charCodes.lowercaseB:\n      return res(\"\\b\");\n    case charCodes.lowercaseV:\n      return res(\"\\u000b\");\n    case charCodes.lowercaseF:\n      return res(\"\\f\");\n    case charCodes.carriageReturn:\n      if (input.charCodeAt(pos) === charCodes.lineFeed) {\n        ++pos;\n      }\n    // fall through\n    case charCodes.lineFeed:\n      lineStart = pos;\n      ++curLine;\n    // fall through\n    case charCodes.lineSeparator:\n    case charCodes.paragraphSeparator:\n      return res(\"\");\n    case charCodes.digit8:\n    case charCodes.digit9:\n      if (inTemplate) {\n        return res(null);\n      } else {\n        errors.strictNumericEscape(pos - 1, lineStart, curLine);\n      }\n    // fall through\n    default:\n      if (ch >= charCodes.digit0 && ch <= charCodes.digit7) {\n        const startPos = pos - 1;\n        const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2));\n\n        let octalStr = match[0];\n\n        let octal = parseInt(octalStr, 8);\n        if (octal > 255) {\n          octalStr = octalStr.slice(0, -1);\n          octal = parseInt(octalStr, 8);\n        }\n        pos += octalStr.length - 1;\n        const next = input.charCodeAt(pos);\n        if (\n          octalStr !== \"0\" ||\n          next === charCodes.digit8 ||\n          next === charCodes.digit9\n        ) {\n          if (inTemplate) {\n            return res(null);\n          } else {\n            errors.strictNumericEscape(startPos, lineStart, curLine);\n          }\n        }\n\n        return res(String.fromCharCode(octal));\n      }\n\n      return res(String.fromCharCode(ch));\n  }\n}\n\ntype HexCharErrorHandlers = IntErrorHandlers & {\n  invalidEscapeSequence(pos: number, lineStart: number, curLine: number): void;\n};\n\n// Used to read character escape sequences ('\\x', '\\u').\nfunction readHexChar(\n  input: string,\n  pos: number,\n  lineStart: number,\n  curLine: number,\n  len: number,\n  forceLen: boolean,\n  throwOnInvalid: boolean,\n  errors: HexCharErrorHandlers,\n) {\n  const initialPos = pos;\n  let n;\n  ({ n, pos } = readInt(\n    input,\n    pos,\n    lineStart,\n    curLine,\n    16,\n    len,\n    forceLen,\n    false,\n    errors,\n    /* bailOnError */ !throwOnInvalid,\n  ));\n  if (n === null) {\n    if (throwOnInvalid) {\n      errors.invalidEscapeSequence(initialPos, lineStart, curLine);\n    } else {\n      pos = initialPos - 1;\n    }\n  }\n  return { code: n, pos };\n}\n\nexport type IntErrorHandlers = {\n  numericSeparatorInEscapeSequence(\n    pos: number,\n    lineStart: number,\n    curLine: number,\n  ): void;\n  unexpectedNumericSeparator(\n    pos: number,\n    lineStart: number,\n    curLine: number,\n  ): void;\n  // It can return \"true\" to indicate that the error was handled\n  // and the int parsing should continue.\n  invalidDigit(\n    pos: number,\n    lineStart: number,\n    curLine: number,\n    radix: number,\n  ): boolean;\n};\n\nexport function readInt(\n  input: string,\n  pos: number,\n  lineStart: number,\n  curLine: number,\n  radix: number,\n  len: number | undefined,\n  forceLen: boolean,\n  allowNumSeparator: boolean | \"bail\",\n  errors: IntErrorHandlers,\n  bailOnError: boolean,\n) {\n  const start = pos;\n  const forbiddenSiblings =\n    radix === 16\n      ? forbiddenNumericSeparatorSiblings.hex\n      : forbiddenNumericSeparatorSiblings.decBinOct;\n  const isAllowedSibling =\n    radix === 16\n      ? isAllowedNumericSeparatorSibling.hex\n      : radix === 10\n        ? isAllowedNumericSeparatorSibling.dec\n        : radix === 8\n          ? isAllowedNumericSeparatorSibling.oct\n          : isAllowedNumericSeparatorSibling.bin;\n\n  let invalid = false;\n  let total = 0;\n\n  for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {\n    const code = input.charCodeAt(pos);\n    let val;\n\n    if (code === charCodes.underscore && allowNumSeparator !== \"bail\") {\n      const prev = input.charCodeAt(pos - 1);\n      const next = input.charCodeAt(pos + 1);\n\n      if (!allowNumSeparator) {\n        if (bailOnError) return { n: null, pos };\n        errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);\n      } else if (\n        Number.isNaN(next) ||\n        !isAllowedSibling(next) ||\n        forbiddenSiblings.has(prev) ||\n        forbiddenSiblings.has(next)\n      ) {\n        if (bailOnError) return { n: null, pos };\n        errors.unexpectedNumericSeparator(pos, lineStart, curLine);\n      }\n\n      // Ignore this _ character\n      ++pos;\n      continue;\n    }\n\n    if (code >= charCodes.lowercaseA) {\n      val = code - charCodes.lowercaseA + charCodes.lineFeed;\n    } else if (code >= charCodes.uppercaseA) {\n      val = code - charCodes.uppercaseA + charCodes.lineFeed;\n    } else if (charCodes.isDigit(code)) {\n      val = code - charCodes.digit0; // 0-9\n    } else {\n      val = Infinity;\n    }\n    if (val >= radix) {\n      // If we found a digit which is too big, errors.invalidDigit can return true to avoid\n      // breaking the loop (this is used for error recovery).\n      if (val <= 9 && bailOnError) {\n        return { n: null, pos };\n      } else if (\n        val <= 9 &&\n        errors.invalidDigit(pos, lineStart, curLine, radix)\n      ) {\n        val = 0;\n      } else if (forceLen) {\n        val = 0;\n        invalid = true;\n      } else {\n        break;\n      }\n    }\n    ++pos;\n    total = total * radix + val;\n  }\n  if (pos === start || (len != null && pos - start !== len) || invalid) {\n    return { n: null, pos };\n  }\n\n  return { n: total, pos };\n}\n\nexport type CodePointErrorHandlers = HexCharErrorHandlers & {\n  invalidCodePoint(pos: number, lineStart: number, curLine: number): void;\n};\n\nexport function readCodePoint(\n  input: string,\n  pos: number,\n  lineStart: number,\n  curLine: number,\n  throwOnInvalid: boolean,\n  errors: CodePointErrorHandlers,\n) {\n  const ch = input.charCodeAt(pos);\n  let code;\n\n  if (ch === charCodes.leftCurlyBrace) {\n    ++pos;\n    ({ code, pos } = readHexChar(\n      input,\n      pos,\n      lineStart,\n      curLine,\n      input.indexOf(\"}\", pos) - pos,\n      true,\n      throwOnInvalid,\n      errors,\n    ));\n    ++pos;\n    if (code !== null && code > 0x10ffff) {\n      if (throwOnInvalid) {\n        errors.invalidCodePoint(pos, lineStart, curLine);\n      } else {\n        return { code: null, pos };\n      }\n    }\n  } else {\n    ({ code, pos } = readHexChar(\n      input,\n      pos,\n      lineStart,\n      curLine,\n      4,\n      false,\n      throwOnInvalid,\n      errors,\n    ));\n  }\n  return { code, pos };\n}\n","/*:: declare var invariant; */\n\nimport { OptionFlags, type Options } from \"../options.ts\";\nimport {\n  Position,\n  SourceLocation,\n  createPositionWithColumnOffset,\n} from \"../util/location.ts\";\nimport CommentsParser, { type CommentWhitespace } from \"../parser/comments.ts\";\nimport type * as N from \"../types.ts\";\nimport * as charCodes from \"charcodes\";\nimport { isIdentifierStart, isIdentifierChar } from \"../util/identifier.ts\";\nimport {\n  tokenIsKeyword,\n  tokenLabelName,\n  tt,\n  keywords as keywordTypes,\n  type TokenType,\n} from \"./types.ts\";\nimport type { TokContext } from \"./context.ts\";\nimport {\n  Errors,\n  type ParseError,\n  type ParseErrorConstructor,\n} from \"../parse-error.ts\";\nimport {\n  lineBreakG,\n  isNewLine,\n  isWhitespace,\n  skipWhiteSpace,\n  skipWhiteSpaceInLine,\n} from \"../util/whitespace.ts\";\nimport State from \"./state.ts\";\nimport type { LookaheadState, DeferredStrictError } from \"./state.ts\";\nimport type { Undone } from \"../parser/node.ts\";\nimport type { Node } from \"../types.ts\";\n\nimport {\n  readInt,\n  readCodePoint,\n  readStringContents,\n  type IntErrorHandlers,\n  type CodePointErrorHandlers,\n  type StringContentsErrorHandlers,\n} from \"@babel/helper-string-parser\";\n\nimport type { Plugin } from \"../typings.ts\";\n\nfunction buildPosition(pos: number, lineStart: number, curLine: number) {\n  return new Position(curLine, pos - lineStart, pos);\n}\n\nconst VALID_REGEX_FLAGS = new Set([\n  charCodes.lowercaseG,\n  charCodes.lowercaseM,\n  charCodes.lowercaseS,\n  charCodes.lowercaseI,\n  charCodes.lowercaseY,\n  charCodes.lowercaseU,\n  charCodes.lowercaseD,\n  charCodes.lowercaseV,\n]);\n\n// Object type used to represent tokens. Note that normally, tokens\n// simply exist as properties on the parser object. This is only\n// used for the onToken callback and the external tokenizer.\n\nexport class Token {\n  constructor(state: State) {\n    const startIndex = state.startIndex || 0;\n    this.type = state.type;\n    this.value = state.value;\n    this.start = startIndex + state.start;\n    this.end = startIndex + state.end;\n    this.loc = new SourceLocation(state.startLoc, state.endLoc);\n  }\n\n  declare type: TokenType;\n  declare value: any;\n  declare start: number;\n  declare end: number;\n  declare loc: SourceLocation;\n}\n\n// ## Tokenizer\n\nexport default abstract class Tokenizer extends CommentsParser {\n  isLookahead: boolean;\n\n  // Token store.\n  tokens: Array<Token | N.Comment> = [];\n\n  constructor(options: Options, input: string) {\n    super();\n    this.state = new State();\n    this.state.init(options);\n    this.input = input;\n    this.length = input.length;\n    this.comments = [];\n    this.isLookahead = false;\n  }\n\n  pushToken(token: Token | N.Comment) {\n    // Pop out invalid tokens trapped by try-catch parsing.\n    // Those parsing branches are mainly created by typescript and flow plugins.\n    this.tokens.length = this.state.tokensLength;\n    this.tokens.push(token);\n    ++this.state.tokensLength;\n  }\n\n  // Move to the next token\n\n  next(): void {\n    this.checkKeywordEscapes();\n    if (this.optionFlags & OptionFlags.Tokens) {\n      this.pushToken(new Token(this.state));\n    }\n\n    this.state.lastTokEndLoc = this.state.endLoc;\n    this.state.lastTokStartLoc = this.state.startLoc;\n    this.nextToken();\n  }\n\n  eat(type: TokenType): boolean {\n    if (this.match(type)) {\n      this.next();\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  /**\n   * Whether current token matches given type\n   */\n  match(type: TokenType): boolean {\n    return this.state.type === type;\n  }\n\n  /**\n   * Create a LookaheadState from current parser state\n   */\n  createLookaheadState(state: State): LookaheadState {\n    return {\n      pos: state.pos,\n      value: null,\n      type: state.type,\n      start: state.start,\n      end: state.end,\n      context: [this.curContext()],\n      inType: state.inType,\n      startLoc: state.startLoc,\n      lastTokEndLoc: state.lastTokEndLoc,\n      curLine: state.curLine,\n      lineStart: state.lineStart,\n      curPosition: state.curPosition,\n    };\n  }\n\n  /**\n   * lookahead peeks the next token, skipping changes to token context and\n   * comment stack. For performance it returns a limited LookaheadState\n   * instead of full parser state.\n   *\n   * The { column, line } Loc info is not included in lookahead since such usage\n   * is rare. Although it may return other location properties e.g. `curLine` and\n   * `lineStart`, these properties are not listed in the LookaheadState interface\n   * and thus the returned value is _NOT_ reliable.\n   *\n   * The tokenizer should make best efforts to avoid using any parser state\n   * other than those defined in LookaheadState\n   */\n  lookahead(): LookaheadState {\n    const old = this.state;\n    // @ts-expect-error For performance we use a simplified tokenizer state structure\n    this.state = this.createLookaheadState(old);\n\n    this.isLookahead = true;\n    this.nextToken();\n    this.isLookahead = false;\n\n    const curr = this.state;\n    this.state = old;\n    return curr;\n  }\n\n  nextTokenStart(): number {\n    return this.nextTokenStartSince(this.state.pos);\n  }\n\n  nextTokenStartSince(pos: number): number {\n    skipWhiteSpace.lastIndex = pos;\n    return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos;\n  }\n\n  lookaheadCharCode(): number {\n    return this.lookaheadCharCodeSince(this.state.pos);\n  }\n\n  lookaheadCharCodeSince(pos: number): number {\n    return this.input.charCodeAt(this.nextTokenStartSince(pos));\n  }\n\n  /**\n   * Similar to nextToken, but it will stop at line break when it is seen before the next token\n   *\n   * @returns {number} position of the next token start or line break, whichever is seen first.\n   * @memberof Tokenizer\n   */\n  nextTokenInLineStart(): number {\n    return this.nextTokenInLineStartSince(this.state.pos);\n  }\n\n  nextTokenInLineStartSince(pos: number): number {\n    skipWhiteSpaceInLine.lastIndex = pos;\n    return skipWhiteSpaceInLine.test(this.input)\n      ? skipWhiteSpaceInLine.lastIndex\n      : pos;\n  }\n\n  /**\n   * Similar to lookaheadCharCode, but it will return the char code of line break if it is\n   * seen before the next token\n   *\n   * @returns {number} char code of the next token start or line break, whichever is seen first.\n   * @memberof Tokenizer\n   */\n  lookaheadInLineCharCode(): number {\n    return this.input.charCodeAt(this.nextTokenInLineStart());\n  }\n\n  codePointAtPos(pos: number): number {\n    // The implementation is based on\n    // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n    // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n    // since `input` is mostly ASCII, an inlined `charCodeAt` wins here\n    let cp = this.input.charCodeAt(pos);\n    if ((cp & 0xfc00) === 0xd800 && ++pos < this.input.length) {\n      const trail = this.input.charCodeAt(pos);\n      if ((trail & 0xfc00) === 0xdc00) {\n        cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n      }\n    }\n    return cp;\n  }\n\n  // Toggle strict mode. Re-reads the next number or string to please\n  // pedantic tests (`\"use strict\"; 010;` should fail).\n\n  setStrict(strict: boolean): void {\n    this.state.strict = strict;\n    if (strict) {\n      // Throw an error for any string decimal escape found before/immediately\n      // after a \"use strict\" directive. Strict mode will be set at parse\n      // time for any literals that occur after the next node of the strict\n      // directive.\n      this.state.strictErrors.forEach(([toParseError, at]) =>\n        this.raise(toParseError, at),\n      );\n      this.state.strictErrors.clear();\n    }\n  }\n\n  curContext(): TokContext {\n    return this.state.context[this.state.context.length - 1];\n  }\n\n  // Read a single token, updating the parser object's token-related properties.\n  nextToken(): void {\n    this.skipSpace();\n    this.state.start = this.state.pos;\n    if (!this.isLookahead) this.state.startLoc = this.state.curPosition();\n    if (this.state.pos >= this.length) {\n      this.finishToken(tt.eof);\n      return;\n    }\n\n    this.getTokenFromCode(this.codePointAtPos(this.state.pos));\n  }\n\n  // Skips a block comment, whose end is marked by commentEnd.\n  // *-/ is used by the Flow plugin, when parsing block comments nested\n  // inside Flow comments.\n  skipBlockComment(commentEnd: \"*/\" | \"*-/\"): N.CommentBlock | undefined {\n    let startLoc;\n    if (!this.isLookahead) startLoc = this.state.curPosition();\n    const start = this.state.pos;\n    const end = this.input.indexOf(commentEnd, start + 2);\n    if (end === -1) {\n      // We have to call this again here because startLoc may not be set...\n      // This seems to be for performance reasons:\n      // https://github.com/babel/babel/commit/acf2a10899f696a8aaf34df78bf9725b5ea7f2da\n      throw this.raise(Errors.UnterminatedComment, this.state.curPosition());\n    }\n\n    this.state.pos = end + commentEnd.length;\n    lineBreakG.lastIndex = start + 2;\n    while (lineBreakG.test(this.input) && lineBreakG.lastIndex <= end) {\n      ++this.state.curLine;\n      this.state.lineStart = lineBreakG.lastIndex;\n    }\n\n    // If we are doing a lookahead right now we need to advance the position (above code)\n    // but we do not want to push the comment to the state.\n    if (this.isLookahead) return;\n    /*:: invariant(startLoc) */\n\n    const comment: N.CommentBlock = {\n      type: \"CommentBlock\",\n      value: this.input.slice(start + 2, end),\n      start: this.sourceToOffsetPos(start),\n      end: this.sourceToOffsetPos(end + commentEnd.length),\n      loc: new SourceLocation(startLoc, this.state.curPosition()),\n    };\n    if (this.optionFlags & OptionFlags.Tokens) this.pushToken(comment);\n    return comment;\n  }\n\n  skipLineComment(startSkip: number): N.CommentLine | undefined {\n    const start = this.state.pos;\n    let startLoc;\n    if (!this.isLookahead) startLoc = this.state.curPosition();\n    let ch = this.input.charCodeAt((this.state.pos += startSkip));\n    if (this.state.pos < this.length) {\n      while (!isNewLine(ch) && ++this.state.pos < this.length) {\n        ch = this.input.charCodeAt(this.state.pos);\n      }\n    }\n\n    // If we are doing a lookahead right now we need to advance the position (above code)\n    // but we do not want to push the comment to the state.\n    if (this.isLookahead) return;\n\n    const end = this.state.pos;\n    const value = this.input.slice(start + startSkip, end);\n\n    const comment: N.CommentLine = {\n      type: \"CommentLine\",\n      value,\n      start: this.sourceToOffsetPos(start),\n      end: this.sourceToOffsetPos(end),\n      loc: new SourceLocation(startLoc, this.state.curPosition()),\n    };\n    if (this.optionFlags & OptionFlags.Tokens) this.pushToken(comment);\n    return comment;\n  }\n\n  // Called at the start of the parse and after every token. Skips\n  // whitespace and comments, and.\n\n  skipSpace(): void {\n    const spaceStart = this.state.pos;\n    const comments: N.Comment[] =\n      this.optionFlags & OptionFlags.AttachComment ? [] : null;\n    loop: while (this.state.pos < this.length) {\n      const ch = this.input.charCodeAt(this.state.pos);\n      switch (ch) {\n        case charCodes.space:\n        case charCodes.nonBreakingSpace:\n        case charCodes.tab:\n          ++this.state.pos;\n          break;\n        case charCodes.carriageReturn:\n          if (\n            this.input.charCodeAt(this.state.pos + 1) === charCodes.lineFeed\n          ) {\n            ++this.state.pos;\n          }\n        // fall through\n        case charCodes.lineFeed:\n        case charCodes.lineSeparator:\n        case charCodes.paragraphSeparator:\n          ++this.state.pos;\n          ++this.state.curLine;\n          this.state.lineStart = this.state.pos;\n          break;\n\n        case charCodes.slash:\n          switch (this.input.charCodeAt(this.state.pos + 1)) {\n            case charCodes.asterisk: {\n              const comment = this.skipBlockComment(\"*/\");\n              if (comment !== undefined) {\n                this.addComment(comment);\n                comments?.push(comment);\n              }\n              break;\n            }\n\n            case charCodes.slash: {\n              const comment = this.skipLineComment(2);\n              if (comment !== undefined) {\n                this.addComment(comment);\n                comments?.push(comment);\n              }\n              break;\n            }\n\n            default:\n              break loop;\n          }\n          break;\n\n        default:\n          if (isWhitespace(ch)) {\n            ++this.state.pos;\n          } else if (\n            ch === charCodes.dash &&\n            !this.inModule &&\n            this.optionFlags & OptionFlags.AnnexB\n          ) {\n            const pos = this.state.pos;\n            if (\n              this.input.charCodeAt(pos + 1) === charCodes.dash &&\n              this.input.charCodeAt(pos + 2) === charCodes.greaterThan &&\n              (spaceStart === 0 || this.state.lineStart > spaceStart)\n            ) {\n              // A `-->` line comment\n              const comment = this.skipLineComment(3);\n              if (comment !== undefined) {\n                this.addComment(comment);\n                comments?.push(comment);\n              }\n            } else {\n              break loop;\n            }\n          } else if (\n            ch === charCodes.lessThan &&\n            !this.inModule &&\n            this.optionFlags & OptionFlags.AnnexB\n          ) {\n            const pos = this.state.pos;\n            if (\n              this.input.charCodeAt(pos + 1) === charCodes.exclamationMark &&\n              this.input.charCodeAt(pos + 2) === charCodes.dash &&\n              this.input.charCodeAt(pos + 3) === charCodes.dash\n            ) {\n              // `<!--`, an XML-style comment that should be interpreted as a line comment\n              const comment = this.skipLineComment(4);\n              if (comment !== undefined) {\n                this.addComment(comment);\n                comments?.push(comment);\n              }\n            } else {\n              break loop;\n            }\n          } else {\n            break loop;\n          }\n      }\n    }\n\n    if (comments?.length > 0) {\n      const end = this.state.pos;\n      const commentWhitespace: CommentWhitespace = {\n        start: this.sourceToOffsetPos(spaceStart),\n        end: this.sourceToOffsetPos(end),\n        comments,\n        leadingNode: null,\n        trailingNode: null,\n        containingNode: null,\n      };\n      this.state.commentStack.push(commentWhitespace);\n    }\n  }\n\n  // Called at the end of every token. Sets `end`, `val`, and\n  // maintains `context` and `canStartJSXElement`, and skips the space after\n  // the token, so that the next one's `start` will point at the\n  // right position.\n\n  finishToken(type: TokenType, val?: any): void {\n    this.state.end = this.state.pos;\n    this.state.endLoc = this.state.curPosition();\n    const prevType = this.state.type;\n    this.state.type = type;\n    this.state.value = val;\n\n    if (!this.isLookahead) {\n      this.updateContext(prevType);\n    }\n  }\n\n  replaceToken(type: TokenType): void {\n    this.state.type = type;\n    // @ts-expect-error the prevType of updateContext is required\n    // only when the new type is tt.slash/tt.jsxTagEnd\n    this.updateContext();\n  }\n\n  // ### Token reading\n\n  // This is the function that is called to fetch the next token. It\n  // is somewhat obscure, because it works in character codes rather\n  // than characters, and because operator parsing has been inlined\n  // into it.\n  //\n  // All in the name of speed.\n\n  // number sign is \"#\"\n  readToken_numberSign(): void {\n    if (this.state.pos === 0 && this.readToken_interpreter()) {\n      return;\n    }\n\n    const nextPos = this.state.pos + 1;\n    const next = this.codePointAtPos(nextPos);\n    if (next >= charCodes.digit0 && next <= charCodes.digit9) {\n      throw this.raise(\n        Errors.UnexpectedDigitAfterHash,\n        this.state.curPosition(),\n      );\n    }\n\n    if (\n      !process.env.BABEL_8_BREAKING &&\n      (next === charCodes.leftCurlyBrace ||\n        (next === charCodes.leftSquareBracket &&\n          this.hasPlugin(\"recordAndTuple\")))\n    ) {\n      // When we see `#{`, it is likely to be a hash record.\n      // However we don't yell at `#[` since users may intend to use \"computed private fields\",\n      // which is not allowed in the spec. Throwing expecting recordAndTuple is\n      // misleading\n      this.expectPlugin(\"recordAndTuple\");\n      if (\n        !process.env.BABEL_8_BREAKING &&\n        this.getPluginOption(\"recordAndTuple\", \"syntaxType\") === \"bar\"\n      ) {\n        throw this.raise(\n          next === charCodes.leftCurlyBrace\n            ? Errors.RecordExpressionHashIncorrectStartSyntaxType\n            : Errors.TupleExpressionHashIncorrectStartSyntaxType,\n          this.state.curPosition(),\n        );\n      }\n\n      this.state.pos += 2;\n      if (next === charCodes.leftCurlyBrace) {\n        // #{\n        this.finishToken(tt.braceHashL);\n      } else {\n        // #[\n        this.finishToken(tt.bracketHashL);\n      }\n    } else if (isIdentifierStart(next)) {\n      ++this.state.pos;\n      this.finishToken(tt.privateName, this.readWord1(next));\n    } else if (next === charCodes.backslash) {\n      ++this.state.pos;\n      this.finishToken(tt.privateName, this.readWord1());\n    } else {\n      this.finishOp(tt.hash, 1);\n    }\n  }\n\n  readToken_dot(): void {\n    const next = this.input.charCodeAt(this.state.pos + 1);\n    if (next >= charCodes.digit0 && next <= charCodes.digit9) {\n      this.readNumber(true);\n      return;\n    }\n\n    if (\n      next === charCodes.dot &&\n      this.input.charCodeAt(this.state.pos + 2) === charCodes.dot\n    ) {\n      this.state.pos += 3;\n      this.finishToken(tt.ellipsis);\n    } else {\n      ++this.state.pos;\n      this.finishToken(tt.dot);\n    }\n  }\n\n  readToken_slash(): void {\n    const next = this.input.charCodeAt(this.state.pos + 1);\n    if (next === charCodes.equalsTo) {\n      this.finishOp(tt.slashAssign, 2);\n    } else {\n      this.finishOp(tt.slash, 1);\n    }\n  }\n\n  readToken_interpreter(): boolean {\n    if (this.state.pos !== 0 || this.length < 2) return false;\n\n    let ch = this.input.charCodeAt(this.state.pos + 1);\n    if (ch !== charCodes.exclamationMark) return false;\n\n    const start = this.state.pos;\n    this.state.pos += 1;\n\n    while (!isNewLine(ch) && ++this.state.pos < this.length) {\n      ch = this.input.charCodeAt(this.state.pos);\n    }\n\n    const value = this.input.slice(start + 2, this.state.pos);\n\n    this.finishToken(tt.interpreterDirective, value);\n\n    return true;\n  }\n\n  readToken_mult_modulo(code: number): void {\n    // '%' or '*'\n    let type = code === charCodes.asterisk ? tt.star : tt.modulo;\n    let width = 1;\n    let next = this.input.charCodeAt(this.state.pos + 1);\n\n    // Exponentiation operator '**'\n    if (code === charCodes.asterisk && next === charCodes.asterisk) {\n      width++;\n      next = this.input.charCodeAt(this.state.pos + 2);\n      type = tt.exponent;\n    }\n\n    // '%=' or '*='\n    if (next === charCodes.equalsTo && !this.state.inType) {\n      width++;\n      // `tt.moduloAssign` is only needed to support % as a Hack-pipe topic token.\n      // If the proposal ends up choosing a different token,\n      // it can be merged with tt.assign.\n      type = code === charCodes.percentSign ? tt.moduloAssign : tt.assign;\n    }\n\n    this.finishOp(type, width);\n  }\n\n  readToken_pipe_amp(code: number): void {\n    // '||' '&&' '||=' '&&='\n    const next = this.input.charCodeAt(this.state.pos + 1);\n\n    if (next === code) {\n      if (this.input.charCodeAt(this.state.pos + 2) === charCodes.equalsTo) {\n        this.finishOp(tt.assign, 3);\n      } else {\n        this.finishOp(\n          code === charCodes.verticalBar ? tt.logicalOR : tt.logicalAND,\n          2,\n        );\n      }\n      return;\n    }\n\n    if (code === charCodes.verticalBar) {\n      // '|>'\n      if (next === charCodes.greaterThan) {\n        this.finishOp(tt.pipeline, 2);\n        return;\n      }\n      // '|}'\n      if (\n        !process.env.BABEL_8_BREAKING &&\n        this.hasPlugin(\"recordAndTuple\") &&\n        next === charCodes.rightCurlyBrace\n      ) {\n        if (this.getPluginOption(\"recordAndTuple\", \"syntaxType\") !== \"bar\") {\n          throw this.raise(\n            Errors.RecordExpressionBarIncorrectEndSyntaxType,\n            this.state.curPosition(),\n          );\n        }\n        this.state.pos += 2;\n        this.finishToken(tt.braceBarR);\n        return;\n      }\n\n      // '|]'\n      if (\n        !process.env.BABEL_8_BREAKING &&\n        this.hasPlugin(\"recordAndTuple\") &&\n        next === charCodes.rightSquareBracket\n      ) {\n        if (this.getPluginOption(\"recordAndTuple\", \"syntaxType\") !== \"bar\") {\n          throw this.raise(\n            Errors.TupleExpressionBarIncorrectEndSyntaxType,\n            this.state.curPosition(),\n          );\n        }\n        this.state.pos += 2;\n        this.finishToken(tt.bracketBarR);\n        return;\n      }\n    }\n\n    if (next === charCodes.equalsTo) {\n      this.finishOp(tt.assign, 2);\n      return;\n    }\n\n    this.finishOp(\n      code === charCodes.verticalBar ? tt.bitwiseOR : tt.bitwiseAND,\n      1,\n    );\n  }\n\n  readToken_caret(): void {\n    const next = this.input.charCodeAt(this.state.pos + 1);\n\n    // '^='\n    if (next === charCodes.equalsTo && !this.state.inType) {\n      // `tt.xorAssign` is only needed to support ^ as a Hack-pipe topic token.\n      // If the proposal ends up choosing a different token,\n      // it can be merged with tt.assign.\n      this.finishOp(tt.xorAssign, 2);\n    }\n    // '^^'\n    else if (\n      next === charCodes.caret &&\n      // If the ^^ token is not enabled, we don't throw but parse two single ^s\n      // because it could be a ^ hack token followed by a ^ binary operator.\n      this.hasPlugin([\n        \"pipelineOperator\",\n        { proposal: \"hack\", topicToken: \"^^\" },\n      ])\n    ) {\n      this.finishOp(tt.doubleCaret, 2);\n\n      // `^^^` is forbidden and must be separated by a space.\n      const lookaheadCh = this.input.codePointAt(this.state.pos);\n      if (lookaheadCh === charCodes.caret) {\n        this.unexpected();\n      }\n    }\n    // '^'\n    else {\n      this.finishOp(tt.bitwiseXOR, 1);\n    }\n  }\n\n  readToken_atSign(): void {\n    const next = this.input.charCodeAt(this.state.pos + 1);\n\n    // '@@'\n    if (\n      next === charCodes.atSign &&\n      this.hasPlugin([\n        \"pipelineOperator\",\n        { proposal: \"hack\", topicToken: \"@@\" },\n      ])\n    ) {\n      this.finishOp(tt.doubleAt, 2);\n    }\n    // '@'\n    else {\n      this.finishOp(tt.at, 1);\n    }\n  }\n\n  readToken_plus_min(code: number): void {\n    // '+-'\n    const next = this.input.charCodeAt(this.state.pos + 1);\n\n    if (next === code) {\n      this.finishOp(tt.incDec, 2);\n      return;\n    }\n\n    if (next === charCodes.equalsTo) {\n      this.finishOp(tt.assign, 2);\n    } else {\n      this.finishOp(tt.plusMin, 1);\n    }\n  }\n\n  readToken_lt(): void {\n    // '<'\n    const { pos } = this.state;\n    const next = this.input.charCodeAt(pos + 1);\n\n    if (next === charCodes.lessThan) {\n      if (this.input.charCodeAt(pos + 2) === charCodes.equalsTo) {\n        this.finishOp(tt.assign, 3);\n        return;\n      }\n      this.finishOp(tt.bitShiftL, 2);\n      return;\n    }\n\n    if (next === charCodes.equalsTo) {\n      // <=\n      this.finishOp(tt.relational, 2);\n      return;\n    }\n\n    this.finishOp(tt.lt, 1);\n  }\n\n  readToken_gt(): void {\n    // '>'\n    const { pos } = this.state;\n    const next = this.input.charCodeAt(pos + 1);\n\n    if (next === charCodes.greaterThan) {\n      const size =\n        this.input.charCodeAt(pos + 2) === charCodes.greaterThan ? 3 : 2;\n      if (this.input.charCodeAt(pos + size) === charCodes.equalsTo) {\n        this.finishOp(tt.assign, size + 1);\n        return;\n      }\n      this.finishOp(tt.bitShiftR, size);\n      return;\n    }\n\n    if (next === charCodes.equalsTo) {\n      // <= | >=\n      this.finishOp(tt.relational, 2);\n      return;\n    }\n\n    this.finishOp(tt.gt, 1);\n  }\n\n  readToken_eq_excl(code: number): void {\n    // '=!'\n    const next = this.input.charCodeAt(this.state.pos + 1);\n    if (next === charCodes.equalsTo) {\n      this.finishOp(\n        tt.equality,\n        this.input.charCodeAt(this.state.pos + 2) === charCodes.equalsTo\n          ? 3\n          : 2,\n      );\n      return;\n    }\n    if (code === charCodes.equalsTo && next === charCodes.greaterThan) {\n      // '=>'\n      this.state.pos += 2;\n      this.finishToken(tt.arrow);\n      return;\n    }\n    this.finishOp(code === charCodes.equalsTo ? tt.eq : tt.bang, 1);\n  }\n\n  readToken_question(): void {\n    // '?'\n    const next = this.input.charCodeAt(this.state.pos + 1);\n    const next2 = this.input.charCodeAt(this.state.pos + 2);\n    if (next === charCodes.questionMark) {\n      if (next2 === charCodes.equalsTo) {\n        // '??='\n        this.finishOp(tt.assign, 3);\n      } else {\n        // '??'\n        this.finishOp(tt.nullishCoalescing, 2);\n      }\n    } else if (\n      next === charCodes.dot &&\n      !(next2 >= charCodes.digit0 && next2 <= charCodes.digit9)\n    ) {\n      // '.' not followed by a number\n      this.state.pos += 2;\n      this.finishToken(tt.questionDot);\n    } else {\n      ++this.state.pos;\n      this.finishToken(tt.question);\n    }\n  }\n\n  getTokenFromCode(code: number): void {\n    switch (code) {\n      // The interpretation of a dot depends on whether it is followed\n      // by a digit or another two dots.\n\n      case charCodes.dot:\n        this.readToken_dot();\n        return;\n      // Punctuation tokens.\n      case charCodes.leftParenthesis:\n        ++this.state.pos;\n        this.finishToken(tt.parenL);\n        return;\n      case charCodes.rightParenthesis:\n        ++this.state.pos;\n        this.finishToken(tt.parenR);\n        return;\n      case charCodes.semicolon:\n        ++this.state.pos;\n        this.finishToken(tt.semi);\n        return;\n      case charCodes.comma:\n        ++this.state.pos;\n        this.finishToken(tt.comma);\n        return;\n      case charCodes.leftSquareBracket:\n        if (\n          !process.env.BABEL_8_BREAKING &&\n          this.hasPlugin(\"recordAndTuple\") &&\n          this.input.charCodeAt(this.state.pos + 1) === charCodes.verticalBar\n        ) {\n          if (this.getPluginOption(\"recordAndTuple\", \"syntaxType\") !== \"bar\") {\n            throw this.raise(\n              Errors.TupleExpressionBarIncorrectStartSyntaxType,\n              this.state.curPosition(),\n            );\n          }\n\n          // [|\n          this.state.pos += 2;\n          this.finishToken(tt.bracketBarL);\n        } else {\n          ++this.state.pos;\n          this.finishToken(tt.bracketL);\n        }\n        return;\n      case charCodes.rightSquareBracket:\n        ++this.state.pos;\n        this.finishToken(tt.bracketR);\n        return;\n      case charCodes.leftCurlyBrace:\n        if (\n          !process.env.BABEL_8_BREAKING &&\n          this.hasPlugin(\"recordAndTuple\") &&\n          this.input.charCodeAt(this.state.pos + 1) === charCodes.verticalBar\n        ) {\n          if (this.getPluginOption(\"recordAndTuple\", \"syntaxType\") !== \"bar\") {\n            throw this.raise(\n              Errors.RecordExpressionBarIncorrectStartSyntaxType,\n              this.state.curPosition(),\n            );\n          }\n\n          // {|\n          this.state.pos += 2;\n          this.finishToken(tt.braceBarL);\n        } else {\n          ++this.state.pos;\n          this.finishToken(tt.braceL);\n        }\n        return;\n      case charCodes.rightCurlyBrace:\n        ++this.state.pos;\n        this.finishToken(tt.braceR);\n        return;\n\n      case charCodes.colon:\n        if (\n          this.hasPlugin(\"functionBind\") &&\n          this.input.charCodeAt(this.state.pos + 1) === charCodes.colon\n        ) {\n          this.finishOp(tt.doubleColon, 2);\n        } else {\n          ++this.state.pos;\n          this.finishToken(tt.colon);\n        }\n        return;\n\n      case charCodes.questionMark:\n        this.readToken_question();\n        return;\n\n      case charCodes.graveAccent:\n        this.readTemplateToken();\n        return;\n\n      case charCodes.digit0: {\n        const next = this.input.charCodeAt(this.state.pos + 1);\n        // '0x', '0X' - hex number\n        if (next === charCodes.lowercaseX || next === charCodes.uppercaseX) {\n          this.readRadixNumber(16);\n          return;\n        }\n        // '0o', '0O' - octal number\n        if (next === charCodes.lowercaseO || next === charCodes.uppercaseO) {\n          this.readRadixNumber(8);\n          return;\n        }\n        // '0b', '0B' - binary number\n        if (next === charCodes.lowercaseB || next === charCodes.uppercaseB) {\n          this.readRadixNumber(2);\n          return;\n        }\n      }\n      // Anything else beginning with a digit is an integer, octal\n      // number, or float. (fall through)\n      case charCodes.digit1:\n      case charCodes.digit2:\n      case charCodes.digit3:\n      case charCodes.digit4:\n      case charCodes.digit5:\n      case charCodes.digit6:\n      case charCodes.digit7:\n      case charCodes.digit8:\n      case charCodes.digit9:\n        this.readNumber(false);\n        return;\n\n      // Quotes produce strings.\n      case charCodes.quotationMark:\n      case charCodes.apostrophe:\n        this.readString(code);\n        return;\n\n      // Operators are parsed inline in tiny state machines. '=' (charCodes.equalsTo) is\n      // often referred to. `finishOp` simply skips the amount of\n      // characters it is given as second argument, and returns a token\n      // of the type given by its first argument.\n\n      case charCodes.slash:\n        this.readToken_slash();\n        return;\n\n      case charCodes.percentSign:\n      case charCodes.asterisk:\n        this.readToken_mult_modulo(code);\n        return;\n\n      case charCodes.verticalBar:\n      case charCodes.ampersand:\n        this.readToken_pipe_amp(code);\n        return;\n\n      case charCodes.caret:\n        this.readToken_caret();\n        return;\n\n      case charCodes.plusSign:\n      case charCodes.dash:\n        this.readToken_plus_min(code);\n        return;\n\n      case charCodes.lessThan:\n        this.readToken_lt();\n        return;\n\n      case charCodes.greaterThan:\n        this.readToken_gt();\n        return;\n\n      case charCodes.equalsTo:\n      case charCodes.exclamationMark:\n        this.readToken_eq_excl(code);\n        return;\n\n      case charCodes.tilde:\n        this.finishOp(tt.tilde, 1);\n        return;\n\n      case charCodes.atSign:\n        this.readToken_atSign();\n        return;\n\n      case charCodes.numberSign:\n        this.readToken_numberSign();\n        return;\n\n      case charCodes.backslash:\n        this.readWord();\n        return;\n\n      default:\n        if (isIdentifierStart(code)) {\n          this.readWord(code);\n          return;\n        }\n    }\n\n    throw this.raise(\n      Errors.InvalidOrUnexpectedToken,\n      this.state.curPosition(),\n      {\n        unexpected: String.fromCodePoint(code),\n      },\n    );\n  }\n\n  finishOp(type: TokenType, size: number): void {\n    const str = this.input.slice(this.state.pos, this.state.pos + size);\n    this.state.pos += size;\n    this.finishToken(type, str);\n  }\n\n  readRegexp(): void {\n    const startLoc = this.state.startLoc;\n    const start = this.state.start + 1;\n    let escaped, inClass;\n    let { pos } = this.state;\n    for (; ; ++pos) {\n      if (pos >= this.length) {\n        // FIXME: explain\n        throw this.raise(\n          Errors.UnterminatedRegExp,\n          createPositionWithColumnOffset(startLoc, 1),\n        );\n      }\n      const ch = this.input.charCodeAt(pos);\n      if (isNewLine(ch)) {\n        throw this.raise(\n          Errors.UnterminatedRegExp,\n          createPositionWithColumnOffset(startLoc, 1),\n        );\n      }\n      if (escaped) {\n        escaped = false;\n      } else {\n        if (ch === charCodes.leftSquareBracket) {\n          inClass = true;\n        } else if (ch === charCodes.rightSquareBracket && inClass) {\n          inClass = false;\n        } else if (ch === charCodes.slash && !inClass) {\n          break;\n        }\n        escaped = ch === charCodes.backslash;\n      }\n    }\n    const content = this.input.slice(start, pos);\n    ++pos;\n\n    let mods = \"\";\n\n    const nextPos = () =>\n      // (pos + 1) + 1 - start\n      createPositionWithColumnOffset(startLoc, pos + 2 - start);\n\n    while (pos < this.length) {\n      const cp = this.codePointAtPos(pos);\n      // It doesn't matter if cp > 0xffff, the loop will either throw or break because we check on cp\n      const char = String.fromCharCode(cp);\n\n      // @ts-expect-error VALID_REGEX_FLAGS.has should accept expanded type: number\n      if (VALID_REGEX_FLAGS.has(cp)) {\n        if (cp === charCodes.lowercaseV) {\n          if (mods.includes(\"u\")) {\n            this.raise(Errors.IncompatibleRegExpUVFlags, nextPos());\n          }\n        } else if (cp === charCodes.lowercaseU) {\n          if (mods.includes(\"v\")) {\n            this.raise(Errors.IncompatibleRegExpUVFlags, nextPos());\n          }\n        }\n        if (mods.includes(char)) {\n          this.raise(Errors.DuplicateRegExpFlags, nextPos());\n        }\n      } else if (isIdentifierChar(cp) || cp === charCodes.backslash) {\n        this.raise(Errors.MalformedRegExpFlags, nextPos());\n      } else {\n        break;\n      }\n\n      ++pos;\n      mods += char;\n    }\n    this.state.pos = pos;\n\n    this.finishToken(tt.regexp, {\n      pattern: content,\n      flags: mods,\n    });\n  }\n\n  // Read an integer in the given radix. Return null if zero digits\n  // were read, the integer value otherwise. When `len` is given, this\n  // will return `null` unless the integer has exactly `len` digits.\n  // When `forceLen` is `true`, it means that we already know that in case\n  // of a malformed number we have to skip `len` characters anyway, instead\n  // of bailing out early. For example, in \"\\u{123Z}\" we want to read up to }\n  // anyway, while in \"\\u00Z\" we will stop at Z instead of consuming four\n  // characters (and thus the closing quote).\n\n  readInt(\n    radix: number,\n    len?: number,\n    forceLen: boolean = false,\n    allowNumSeparator: boolean | \"bail\" = true,\n  ): number | null {\n    const { n, pos } = readInt(\n      this.input,\n      this.state.pos,\n      this.state.lineStart,\n      this.state.curLine,\n      radix,\n      len,\n      forceLen,\n      allowNumSeparator,\n      this.errorHandlers_readInt,\n      /* bailOnError */ false,\n    );\n    this.state.pos = pos;\n    return n;\n  }\n\n  readRadixNumber(radix: number): void {\n    const start = this.state.pos;\n    const startLoc = this.state.curPosition();\n    let isBigInt = false;\n\n    this.state.pos += 2; // 0x\n    const val = this.readInt(radix);\n    if (val == null) {\n      this.raise(\n        Errors.InvalidDigit,\n        // Numeric literals can't have newlines, so this is safe to do.\n        createPositionWithColumnOffset(startLoc, 2),\n        {\n          radix,\n        },\n      );\n    }\n    const next = this.input.charCodeAt(this.state.pos);\n\n    if (next === charCodes.lowercaseN) {\n      ++this.state.pos;\n      isBigInt = true;\n    } else if (next === charCodes.lowercaseM) {\n      throw this.raise(Errors.InvalidDecimal, startLoc);\n    }\n\n    if (isIdentifierStart(this.codePointAtPos(this.state.pos))) {\n      throw this.raise(Errors.NumberIdentifier, this.state.curPosition());\n    }\n\n    if (isBigInt) {\n      const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, \"\");\n      this.finishToken(tt.bigint, str);\n      return;\n    }\n\n    this.finishToken(tt.num, val);\n  }\n\n  // Read an integer, octal integer, or floating-point number.\n\n  readNumber(startsWithDot: boolean): void {\n    const start = this.state.pos;\n    const startLoc = this.state.curPosition();\n    let isFloat = false;\n    let isBigInt = false;\n    let hasExponent = false;\n    let isOctal = false;\n\n    if (!startsWithDot && this.readInt(10) === null) {\n      this.raise(Errors.InvalidNumber, this.state.curPosition());\n    }\n    const hasLeadingZero =\n      this.state.pos - start >= 2 &&\n      this.input.charCodeAt(start) === charCodes.digit0;\n\n    if (hasLeadingZero) {\n      const integer = this.input.slice(start, this.state.pos);\n      this.recordStrictModeErrors(Errors.StrictOctalLiteral, startLoc);\n      if (!this.state.strict) {\n        // disallow numeric separators in non octal decimals and legacy octal likes\n        const underscorePos = integer.indexOf(\"_\");\n        if (underscorePos > 0) {\n          // Numeric literals can't have newlines, so this is safe to do.\n          this.raise(\n            Errors.ZeroDigitNumericSeparator,\n            createPositionWithColumnOffset(startLoc, underscorePos),\n          );\n        }\n      }\n      isOctal = hasLeadingZero && !/[89]/.test(integer);\n    }\n\n    let next = this.input.charCodeAt(this.state.pos);\n    if (next === charCodes.dot && !isOctal) {\n      ++this.state.pos;\n      this.readInt(10);\n      isFloat = true;\n      next = this.input.charCodeAt(this.state.pos);\n    }\n\n    if (\n      (next === charCodes.uppercaseE || next === charCodes.lowercaseE) &&\n      !isOctal\n    ) {\n      next = this.input.charCodeAt(++this.state.pos);\n      if (next === charCodes.plusSign || next === charCodes.dash) {\n        ++this.state.pos;\n      }\n      if (this.readInt(10) === null) {\n        this.raise(Errors.InvalidOrMissingExponent, startLoc);\n      }\n      isFloat = true;\n      hasExponent = true;\n      next = this.input.charCodeAt(this.state.pos);\n    }\n\n    if (next === charCodes.lowercaseN) {\n      // disallow floats, legacy octal syntax and non octal decimals\n      // new style octal (\"0o\") is handled in this.readRadixNumber\n      if (isFloat || hasLeadingZero) {\n        this.raise(Errors.InvalidBigIntLiteral, startLoc);\n      }\n      ++this.state.pos;\n      isBigInt = true;\n    }\n\n    if (!process.env.BABEL_8_BREAKING && next === charCodes.lowercaseM) {\n      this.expectPlugin(\"decimal\", this.state.curPosition());\n      if (hasExponent || hasLeadingZero) {\n        this.raise(Errors.InvalidDecimal, startLoc);\n      }\n      ++this.state.pos;\n      // eslint-disable-next-line no-var\n      var isDecimal = true;\n    }\n\n    if (isIdentifierStart(this.codePointAtPos(this.state.pos))) {\n      throw this.raise(Errors.NumberIdentifier, this.state.curPosition());\n    }\n\n    // remove \"_\" for numeric literal separator, and trailing `m` or `n`\n    const str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, \"\");\n\n    if (isBigInt) {\n      this.finishToken(tt.bigint, str);\n      return;\n    }\n\n    if (!process.env.BABEL_8_BREAKING && isDecimal) {\n      this.finishToken(tt.decimal, str);\n      return;\n    }\n\n    const val = isOctal ? parseInt(str, 8) : parseFloat(str);\n    this.finishToken(tt.num, val);\n  }\n\n  // Read a string value, interpreting backslash-escapes.\n\n  readCodePoint(throwOnInvalid: boolean): number | null {\n    const { code, pos } = readCodePoint(\n      this.input,\n      this.state.pos,\n      this.state.lineStart,\n      this.state.curLine,\n      throwOnInvalid,\n      this.errorHandlers_readCodePoint,\n    );\n    this.state.pos = pos;\n    return code;\n  }\n\n  readString(quote: number): void {\n    const { str, pos, curLine, lineStart } = readStringContents(\n      quote === charCodes.quotationMark ? \"double\" : \"single\",\n      this.input,\n      this.state.pos + 1, // skip the quote\n      this.state.lineStart,\n      this.state.curLine,\n      this.errorHandlers_readStringContents_string,\n    );\n    this.state.pos = pos + 1; // skip the quote\n    this.state.lineStart = lineStart;\n    this.state.curLine = curLine;\n    this.finishToken(tt.string, str);\n  }\n\n  // Reads template continuation `}...`\n  readTemplateContinuation(): void {\n    if (!this.match(tt.braceR)) {\n      this.unexpected(null, tt.braceR);\n    }\n    // rewind pos to `}`\n    this.state.pos--;\n    this.readTemplateToken();\n  }\n\n  // Reads template string tokens.\n  readTemplateToken(): void {\n    const opening = this.input[this.state.pos];\n    const { str, firstInvalidLoc, pos, curLine, lineStart } =\n      readStringContents(\n        \"template\",\n        this.input,\n        this.state.pos + 1, // skip '`' or `}`\n        this.state.lineStart,\n        this.state.curLine,\n        this.errorHandlers_readStringContents_template,\n      );\n    this.state.pos = pos + 1; // skip '`' or `$`\n    this.state.lineStart = lineStart;\n    this.state.curLine = curLine;\n\n    if (firstInvalidLoc) {\n      this.state.firstInvalidTemplateEscapePos = new Position(\n        firstInvalidLoc.curLine,\n        firstInvalidLoc.pos - firstInvalidLoc.lineStart,\n        this.sourceToOffsetPos(firstInvalidLoc.pos),\n      );\n    }\n\n    if (this.input.codePointAt(pos) === charCodes.graveAccent) {\n      this.finishToken(\n        tt.templateTail,\n        firstInvalidLoc ? null : opening + str + \"`\",\n      );\n    } else {\n      this.state.pos++; // skip '{'\n      this.finishToken(\n        tt.templateNonTail,\n        firstInvalidLoc ? null : opening + str + \"${\",\n      );\n    }\n  }\n\n  recordStrictModeErrors(toParseError: DeferredStrictError, at: Position) {\n    const index = at.index;\n\n    if (this.state.strict && !this.state.strictErrors.has(index)) {\n      this.raise(toParseError, at);\n    } else {\n      this.state.strictErrors.set(index, [toParseError, at]);\n    }\n  }\n\n  // Read an identifier, and return it as a string. Sets `this.state.containsEsc`\n  // to whether the word contained a '\\u' escape.\n  //\n  // Incrementally adds only escaped chars, adding other chunks as-is\n  // as a micro-optimization.\n  //\n  // When `firstCode` is given, it assumes it is always an identifier start and\n  // will skip reading start position again\n\n  readWord1(firstCode?: number): string {\n    this.state.containsEsc = false;\n    let word = \"\";\n    const start = this.state.pos;\n    let chunkStart = this.state.pos;\n    if (firstCode !== undefined) {\n      this.state.pos += firstCode <= 0xffff ? 1 : 2;\n    }\n\n    while (this.state.pos < this.length) {\n      const ch = this.codePointAtPos(this.state.pos);\n      if (isIdentifierChar(ch)) {\n        this.state.pos += ch <= 0xffff ? 1 : 2;\n      } else if (ch === charCodes.backslash) {\n        this.state.containsEsc = true;\n\n        word += this.input.slice(chunkStart, this.state.pos);\n        const escStart = this.state.curPosition();\n        const identifierCheck =\n          this.state.pos === start ? isIdentifierStart : isIdentifierChar;\n\n        if (this.input.charCodeAt(++this.state.pos) !== charCodes.lowercaseU) {\n          this.raise(Errors.MissingUnicodeEscape, this.state.curPosition());\n          chunkStart = this.state.pos - 1;\n          continue;\n        }\n\n        ++this.state.pos;\n        const esc = this.readCodePoint(true);\n        if (esc !== null) {\n          if (!identifierCheck(esc)) {\n            this.raise(Errors.EscapedCharNotAnIdentifier, escStart);\n          }\n\n          word += String.fromCodePoint(esc);\n        }\n        chunkStart = this.state.pos;\n      } else {\n        break;\n      }\n    }\n    return word + this.input.slice(chunkStart, this.state.pos);\n  }\n\n  // Read an identifier or keyword token. Will check for reserved\n  // words when necessary.\n\n  readWord(firstCode?: number): void {\n    const word = this.readWord1(firstCode);\n    const type = keywordTypes.get(word);\n    if (type !== undefined) {\n      // We don't use word as state.value here because word is a dynamic string\n      // while token label is a shared constant string\n      this.finishToken(type, tokenLabelName(type));\n    } else {\n      this.finishToken(tt.name, word);\n    }\n  }\n\n  checkKeywordEscapes(): void {\n    const { type } = this.state;\n    if (tokenIsKeyword(type) && this.state.containsEsc) {\n      this.raise(Errors.InvalidEscapedReservedWord, this.state.startLoc, {\n        reservedWord: tokenLabelName(type),\n      });\n    }\n  }\n\n  /**\n   * Raise a `ParseError` given the appropriate properties. If passed a\n   * `Position` for the `at` property, raises the `ParseError` at that location.\n   * Otherwise, if passed a `Node`, raises the `ParseError` at the start\n   * location of that `Node`.\n   *\n   * If `errorRecovery` is `true`, the error is pushed to the errors array and\n   * returned. If `errorRecovery` is `false`, the error is instead thrown.\n   *\n   * The return type is marked as `never` for simplicity, as error recovery\n   * will create types in an invalid AST shape.\n   */\n  raise<ErrorDetails = object>(\n    toParseError: ParseErrorConstructor<ErrorDetails>,\n    at: Position | Undone<Node>,\n    details: ErrorDetails = {} as ErrorDetails,\n  ): ParseError<ErrorDetails> {\n    const loc = at instanceof Position ? at : at.loc.start;\n    const error = toParseError(loc, details);\n\n    if (!(this.optionFlags & OptionFlags.ErrorRecovery)) throw error;\n    if (!this.isLookahead) this.state.errors.push(error);\n\n    return error;\n  }\n\n  /**\n   * If `errorRecovery` is `false`, this method behaves identically to `raise`.\n   * If `errorRecovery` is `true`, this method will first see if there is\n   * already an error stored at the same `Position`, and replaces it with the\n   * one generated here.\n   */\n  raiseOverwrite<ErrorDetails>(\n    toParseError: ParseErrorConstructor<ErrorDetails>,\n    at: Position | Undone<Node>,\n    details: ErrorDetails = {} as ErrorDetails,\n  ): ParseError<ErrorDetails> | never {\n    const loc = at instanceof Position ? at : at.loc.start;\n    const pos = loc.index;\n    const errors = this.state.errors;\n\n    for (let i = errors.length - 1; i >= 0; i--) {\n      const error = errors[i];\n      if (error.loc.index === pos) {\n        return (errors[i] = toParseError(loc, details));\n      }\n      if (error.loc.index < pos) break;\n    }\n\n    return this.raise(toParseError, at, details);\n  }\n\n  // updateContext is used by the jsx plugin\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  updateContext(prevType: TokenType): void {}\n\n  // Raise an unexpected token error. Can take the expected token type.\n  unexpected(loc?: Position | null, type?: TokenType): void {\n    throw this.raise(\n      Errors.UnexpectedToken,\n      loc != null ? loc : this.state.startLoc,\n      {\n        expected: type ? tokenLabelName(type) : null,\n      },\n    );\n  }\n\n  expectPlugin(pluginName: Plugin, loc?: Position): true {\n    if (this.hasPlugin(pluginName)) {\n      return true;\n    }\n\n    throw this.raise(\n      Errors.MissingPlugin,\n      loc != null ? loc : this.state.startLoc,\n      {\n        missingPlugin: [pluginName],\n      },\n    );\n  }\n\n  expectOnePlugin(pluginNames: Plugin[]): void {\n    if (!pluginNames.some(name => this.hasPlugin(name))) {\n      throw this.raise(Errors.MissingOneOfPlugins, this.state.startLoc, {\n        missingPlugin: pluginNames,\n      });\n    }\n  }\n\n  errorBuilder(error: ParseErrorConstructor<object>) {\n    return (pos: number, lineStart: number, curLine: number) => {\n      this.raise(error, buildPosition(pos, lineStart, curLine));\n    };\n  }\n\n  errorHandlers_readInt: IntErrorHandlers = {\n    invalidDigit: (pos, lineStart, curLine, radix) => {\n      if (!(this.optionFlags & OptionFlags.ErrorRecovery)) return false;\n\n      this.raise(Errors.InvalidDigit, buildPosition(pos, lineStart, curLine), {\n        radix,\n      });\n      // Continue parsing the number as if there was no invalid digit.\n      return true;\n    },\n    numericSeparatorInEscapeSequence: this.errorBuilder(\n      Errors.NumericSeparatorInEscapeSequence,\n    ),\n    unexpectedNumericSeparator: this.errorBuilder(\n      Errors.UnexpectedNumericSeparator,\n    ),\n  };\n\n  errorHandlers_readCodePoint: CodePointErrorHandlers = {\n    ...this.errorHandlers_readInt,\n    invalidEscapeSequence: this.errorBuilder(Errors.InvalidEscapeSequence),\n    invalidCodePoint: this.errorBuilder(Errors.InvalidCodePoint),\n  };\n\n  errorHandlers_readStringContents_string: StringContentsErrorHandlers = {\n    ...this.errorHandlers_readCodePoint,\n    strictNumericEscape: (pos, lineStart, curLine) => {\n      this.recordStrictModeErrors(\n        Errors.StrictNumericEscape,\n        buildPosition(pos, lineStart, curLine),\n      );\n    },\n    unterminated: (pos, lineStart, curLine) => {\n      throw this.raise(\n        Errors.UnterminatedString, // Report the error at the string quote\n        buildPosition(pos - 1, lineStart, curLine),\n      );\n    },\n  };\n\n  errorHandlers_readStringContents_template: StringContentsErrorHandlers = {\n    ...this.errorHandlers_readCodePoint,\n    strictNumericEscape: this.errorBuilder(Errors.StrictNumericEscape),\n    unterminated: (pos, lineStart, curLine) => {\n      throw this.raise(\n        Errors.UnterminatedTemplate,\n        buildPosition(pos, lineStart, curLine),\n      );\n    },\n  };\n}\n","import { ClassElementType } from \"./scopeflags.ts\";\nimport type { Position } from \"./location.ts\";\nimport { Errors } from \"../parse-error.ts\";\nimport type Tokenizer from \"../tokenizer/index.ts\";\n\nexport class ClassScope {\n  // A list of private named declared in the current class\n  privateNames: Set<string> = new Set();\n\n  // A list of private getters of setters without their counterpart\n  loneAccessors: Map<string, ClassElementType> = new Map();\n\n  // A list of private names used before being defined, mapping to\n  // their position.\n  undefinedPrivateNames: Map<string, Position> = new Map();\n}\n\nexport default class ClassScopeHandler {\n  parser: Tokenizer;\n  stack: Array<ClassScope> = [];\n  undefinedPrivateNames: Map<string, Position> = new Map();\n\n  constructor(parser: Tokenizer) {\n    this.parser = parser;\n  }\n\n  current(): ClassScope {\n    return this.stack[this.stack.length - 1];\n  }\n\n  enter() {\n    this.stack.push(new ClassScope());\n  }\n\n  exit() {\n    const oldClassScope = this.stack.pop();\n\n    // Migrate the usage of not yet defined private names to the outer\n    // class scope, or raise an error if we reached the top-level scope.\n\n    const current = this.current();\n\n    // Array.from is needed because this is compiled to an array-like for loop\n    for (const [name, loc] of Array.from(oldClassScope.undefinedPrivateNames)) {\n      if (current) {\n        if (!current.undefinedPrivateNames.has(name)) {\n          current.undefinedPrivateNames.set(name, loc);\n        }\n      } else {\n        this.parser.raise(Errors.InvalidPrivateFieldResolution, loc, {\n          identifierName: name,\n        });\n      }\n    }\n  }\n\n  declarePrivateName(\n    name: string,\n    elementType: ClassElementType,\n    loc: Position,\n  ) {\n    const { privateNames, loneAccessors, undefinedPrivateNames } =\n      this.current();\n    let redefined = privateNames.has(name);\n\n    if (elementType & ClassElementType.KIND_ACCESSOR) {\n      const accessor = redefined && loneAccessors.get(name);\n      if (accessor) {\n        const oldStatic = accessor & ClassElementType.FLAG_STATIC;\n        const newStatic = elementType & ClassElementType.FLAG_STATIC;\n\n        const oldKind = accessor & ClassElementType.KIND_ACCESSOR;\n        const newKind = elementType & ClassElementType.KIND_ACCESSOR;\n\n        // The private name can be duplicated only if it is used by\n        // two accessors with different kind (get and set), and if\n        // they have the same placement (static or not).\n        redefined = oldKind === newKind || oldStatic !== newStatic;\n\n        if (!redefined) loneAccessors.delete(name);\n      } else if (!redefined) {\n        loneAccessors.set(name, elementType);\n      }\n    }\n\n    if (redefined) {\n      this.parser.raise(Errors.PrivateNameRedeclaration, loc, {\n        identifierName: name,\n      });\n    }\n\n    privateNames.add(name);\n    undefinedPrivateNames.delete(name);\n  }\n\n  usePrivateName(name: string, loc: Position) {\n    let classScope;\n    for (classScope of this.stack) {\n      if (classScope.privateNames.has(name)) return;\n    }\n\n    if (classScope) {\n      classScope.undefinedPrivateNames.set(name, loc);\n    } else {\n      // top-level\n      this.parser.raise(Errors.InvalidPrivateFieldResolution, loc, {\n        identifierName: name,\n      });\n    }\n  }\n}\n","import { Errors, type ParseErrorConstructor } from \"../parse-error.ts\";\nimport type { Position } from \"./location.ts\";\nimport type { Node } from \"../types.ts\";\nimport type Tokenizer from \"../tokenizer/index.ts\";\nimport type { Undone } from \"../parser/node.ts\";\n\n/**\n * @module util/expression-scope\n\nExpressionScope is used to track declaration errors in these ambiguous patterns:\n\n- CoverParenthesizedExpressionAndArrowParameterList\n  e.g. we don't know if `({ x })` is an parenthesized expression or an\n  arrow function parameters until we see an `=>` after `)`.\n\n- CoverCallExpressionAndAsyncArrowHead\n  e.g. we don't know if `async({ x })` is a call expression or an async arrow\n  function parameters until we see an `=>` after `)`\n\nThe following declaration errors (@see parser-errors/standard) will be recorded in\nsome expression scopes and thrown later when we know what the ambiguous pattern is\n\n- AwaitBindingIdentifier\n- AwaitExpressionFormalParameter\n- YieldInParameter\n- InvalidParenthesizedAssignment when parenthesized is an identifier\n\nThere are four different expression scope\n- Expression\n  A general scope that represents program / function body / static block. No errors\n  will be recorded nor thrown in this scope.\n\n- MaybeArrowParameterDeclaration\n  A scope that represents ambiguous arrow head e.g. `(x)`. Errors will be recorded\n  alongside parent scopes and thrown when `ExpressionScopeHandler#validateAsPattern`\n  is called.\n\n- MaybeAsyncArrowParameterDeclaration\n  A scope that represents ambiguous async arrow head e.g. `async(x)`. Errors will\n  be recorded alongside parent scopes and thrown when\n  `ExpressionScopeHandler#validateAsPattern` is called.\n\n- ParameterDeclaration\n  A scope that represents unambiguous function parameters `function(x)`. Errors\n  recorded in this scope will be thrown immediately. No errors will be recorded in\n  this scope.\n\n// @see {@link https://docs.google.com/document/d/1FAvEp9EUK-G8kHfDIEo_385Hs2SUBCYbJ5H-NnLvq8M | V8 Expression Scope design docs}\n */\n\nconst enum ExpressionScopeType {\n  kExpression = 0,\n  kMaybeArrowParameterDeclaration = 1,\n  kMaybeAsyncArrowParameterDeclaration = 2,\n  kParameterDeclaration = 3,\n}\n\nclass ExpressionScope {\n  declare type: ExpressionScopeType;\n\n  constructor(type: ExpressionScopeType = ExpressionScopeType.kExpression) {\n    this.type = type;\n  }\n\n  canBeArrowParameterDeclaration(): this is ArrowHeadParsingScope {\n    return (\n      this.type === ExpressionScopeType.kMaybeAsyncArrowParameterDeclaration ||\n      this.type === ExpressionScopeType.kMaybeArrowParameterDeclaration\n    );\n  }\n\n  isCertainlyParameterDeclaration() {\n    return this.type === ExpressionScopeType.kParameterDeclaration;\n  }\n}\n\ntype ArrowHeadParsingParameterInitializerError =\n  | typeof Errors.AwaitExpressionFormalParameter\n  | typeof Errors.YieldInParameter;\ntype ArrowHeadParsingDeclarationError =\n  | ArrowHeadParsingParameterInitializerError\n  | typeof Errors.InvalidParenthesizedAssignment\n  | typeof Errors.AwaitBindingIdentifier;\n\nclass ArrowHeadParsingScope extends ExpressionScope {\n  declarationErrors: Map<number, [ParseErrorConstructor<object>, Position]> =\n    new Map();\n  constructor(\n    type:\n      | ExpressionScopeType.kMaybeArrowParameterDeclaration\n      | ExpressionScopeType.kMaybeAsyncArrowParameterDeclaration,\n  ) {\n    super(type);\n  }\n  recordDeclarationError(\n    ParsingErrorClass: ParseErrorConstructor<object>,\n    at: Position,\n  ) {\n    const index = at.index;\n\n    this.declarationErrors.set(index, [ParsingErrorClass, at]);\n  }\n  clearDeclarationError(index: number) {\n    this.declarationErrors.delete(index);\n  }\n  iterateErrors(\n    iterator: (a: [ArrowHeadParsingDeclarationError, Position]) => void,\n  ) {\n    this.declarationErrors.forEach(iterator);\n  }\n}\n\nexport default class ExpressionScopeHandler {\n  parser: Tokenizer;\n  stack: Array<ExpressionScope> = [new ExpressionScope()];\n\n  constructor(parser: Tokenizer) {\n    this.parser = parser;\n  }\n  enter(scope: ExpressionScope) {\n    this.stack.push(scope);\n  }\n\n  exit() {\n    this.stack.pop();\n  }\n\n  /**\n   * Record likely parameter initializer errors\n   *\n   * When current scope is a ParameterDeclaration, the error will be thrown immediately,\n   * otherwise it will be recorded to any ancestry MaybeArrowParameterDeclaration and\n   * MaybeAsyncArrowParameterDeclaration scope until an Expression scope is seen.\n   */\n  recordParameterInitializerError(\n    toParseError: ArrowHeadParsingParameterInitializerError,\n    node: Undone<Node>,\n  ): void {\n    const origin = node.loc.start;\n    const { stack } = this;\n    let i = stack.length - 1;\n    let scope: ExpressionScope = stack[i];\n    while (!scope.isCertainlyParameterDeclaration()) {\n      if (scope.canBeArrowParameterDeclaration()) {\n        scope.recordDeclarationError(toParseError, origin);\n      } else {\n        /*:: invariant(scope.type == ExpressionScopeType.kExpression) */\n        // Type-Expression is the boundary where initializer error can populate to\n        return;\n      }\n      scope = stack[--i];\n    }\n    this.parser.raise(toParseError, origin);\n  }\n\n  /**\n   * Record errors that must be thrown if the current pattern ends up being an arrow\n   * function parameter. This is used to record parenthesized identifiers, and to record\n   * \"a as T\" and \"<T> a\" type assertions when parsing typescript.\n   *\n   * A parenthesized identifier (or type assertion) in LHS can be ambiguous because the assignment\n   * can be transformed to an assignable later, but not vice versa:\n   * For example, in `([(a) = []] = []) => {}`, we think `(a) = []` is an LHS in `[(a) = []]`,\n   * an LHS within `[(a) = []] = []`. However the LHS chain is then transformed by toAssignable,\n   * and we should throw assignment `(a)`, which is only valid in LHS. Hence we record the\n   * location of parenthesized `(a)` to current scope if it is one of MaybeArrowParameterDeclaration\n   * and MaybeAsyncArrowParameterDeclaration\n   *\n   * Unlike `recordParameterInitializerError`, we don't record to ancestry scope because we\n   * validate arrow head parsing scope before exit, and then the LHS will be unambiguous:\n   * For example, in `( x = ( [(a) = []] = [] ) ) => {}`, we should not record `(a)` in `( x = ... ) =>`\n   * arrow scope because when we finish parsing `( [(a) = []] = [] )`, it is an unambiguous assignment\n   * expression and can not be cast to pattern\n   */\n  recordArrowParameterBindingError(\n    error: ParseErrorConstructor<object>,\n    node: Node,\n  ): void {\n    const { stack } = this;\n    const scope: ExpressionScope = stack[stack.length - 1];\n    const origin = node.loc.start;\n    if (scope.isCertainlyParameterDeclaration()) {\n      this.parser.raise(error, origin);\n    } else if (scope.canBeArrowParameterDeclaration()) {\n      scope.recordDeclarationError(error, origin);\n    } else {\n      return;\n    }\n  }\n\n  /**\n   * Record likely async arrow parameter errors\n   *\n   * Errors will be recorded to any ancestry MaybeAsyncArrowParameterDeclaration\n   * scope until an Expression scope is seen.\n   */\n  recordAsyncArrowParametersError(at: Position): void {\n    const { stack } = this;\n    let i = stack.length - 1;\n    let scope: ExpressionScope = stack[i];\n    while (scope.canBeArrowParameterDeclaration()) {\n      if (\n        scope.type === ExpressionScopeType.kMaybeAsyncArrowParameterDeclaration\n      ) {\n        scope.recordDeclarationError(Errors.AwaitBindingIdentifier, at);\n      }\n      scope = stack[--i];\n    }\n  }\n\n  validateAsPattern(): void {\n    const { stack } = this;\n    const currentScope = stack[stack.length - 1];\n    if (!currentScope.canBeArrowParameterDeclaration()) return;\n    currentScope.iterateErrors(([toParseError, loc]) => {\n      this.parser.raise(toParseError, loc);\n      // iterate from parent scope\n      let i = stack.length - 2;\n      let scope = stack[i];\n      while (scope.canBeArrowParameterDeclaration()) {\n        scope.clearDeclarationError(loc.index);\n        scope = stack[--i];\n      }\n    });\n  }\n}\n\nexport function newParameterDeclarationScope() {\n  return new ExpressionScope(ExpressionScopeType.kParameterDeclaration);\n}\n\nexport function newArrowHeadScope() {\n  return new ArrowHeadParsingScope(\n    ExpressionScopeType.kMaybeArrowParameterDeclaration,\n  );\n}\n\nexport function newAsyncArrowScope() {\n  return new ArrowHeadParsingScope(\n    ExpressionScopeType.kMaybeAsyncArrowParameterDeclaration,\n  );\n}\n\nexport function newExpressionScope() {\n  return new ExpressionScope();\n}\n","import type { Position } from \"../util/location.ts\";\nimport {\n  tokenIsLiteralPropertyName,\n  tt,\n  type TokenType,\n} from \"../tokenizer/types.ts\";\nimport Tokenizer from \"../tokenizer/index.ts\";\nimport type State from \"../tokenizer/state.ts\";\nimport type {\n  EstreePropertyDefinition,\n  Node,\n  ObjectMethod,\n  ObjectProperty,\n  PrivateName,\n} from \"../types.d.ts\";\nimport { hasNewLine } from \"../util/whitespace.ts\";\nimport { isIdentifierChar } from \"../util/identifier.ts\";\nimport ClassScopeHandler from \"../util/class-scope.ts\";\nimport ExpressionScopeHandler from \"../util/expression-scope.ts\";\nimport { ScopeFlag } from \"../util/scopeflags.ts\";\nimport ProductionParameterHandler, {\n  ParamKind,\n} from \"../util/production-parameter.ts\";\nimport {\n  Errors,\n  type ParseError,\n  type ParseErrorConstructor,\n} from \"../parse-error.ts\";\nimport type Parser from \"./index.ts\";\n\nimport type ScopeHandler from \"../util/scope.ts\";\nimport { OptionFlags } from \"../options.ts\";\n\ntype TryParse<Node, Error, Thrown, Aborted, FailState> = {\n  node: Node;\n  error: Error;\n  thrown: Thrown;\n  aborted: Aborted;\n  failState: FailState;\n};\n\n// ## Parser utilities\n\nexport default abstract class UtilParser extends Tokenizer {\n  // Forward-declaration: defined in parser/index.js\n  abstract getScopeHandler(): new (...args: any) => ScopeHandler;\n\n  addExtra(\n    node: Partial<Node>,\n    key: string,\n    value: any,\n    enumerable: boolean = true,\n  ): void {\n    if (!node) return;\n\n    let { extra } = node;\n    if (extra == null) {\n      extra = {};\n      node.extra = extra;\n    }\n\n    if (enumerable) {\n      extra[key] = value;\n    } else {\n      Object.defineProperty(extra, key, { enumerable, value });\n    }\n  }\n\n  // Tests whether parsed token is a contextual keyword.\n\n  isContextual(token: TokenType): boolean {\n    return this.state.type === token && !this.state.containsEsc;\n  }\n\n  isUnparsedContextual(nameStart: number, name: string): boolean {\n    if (this.input.startsWith(name, nameStart)) {\n      const nextCh = this.input.charCodeAt(nameStart + name.length);\n      return !(\n        isIdentifierChar(nextCh) ||\n        // check if `nextCh is between 0xd800 - 0xdbff,\n        // if `nextCh` is NaN, `NaN & 0xfc00` is 0, the function\n        // returns true\n        (nextCh & 0xfc00) === 0xd800\n      );\n    }\n    return false;\n  }\n\n  isLookaheadContextual(name: string): boolean {\n    const next = this.nextTokenStart();\n    return this.isUnparsedContextual(next, name);\n  }\n\n  // Consumes contextual keyword if possible.\n\n  eatContextual(token: TokenType): boolean {\n    if (this.isContextual(token)) {\n      this.next();\n      return true;\n    }\n    return false;\n  }\n\n  // Asserts that following token is given contextual keyword.\n\n  expectContextual(\n    token: TokenType,\n    toParseError?: ParseErrorConstructor<any>,\n  ): void {\n    if (!this.eatContextual(token)) {\n      if (toParseError != null) {\n        throw this.raise(toParseError, this.state.startLoc);\n      }\n      this.unexpected(null, token);\n    }\n  }\n\n  // Test whether a semicolon can be inserted at the current position.\n\n  canInsertSemicolon(): boolean {\n    return (\n      this.match(tt.eof) ||\n      this.match(tt.braceR) ||\n      this.hasPrecedingLineBreak()\n    );\n  }\n\n  hasPrecedingLineBreak(): boolean {\n    return hasNewLine(\n      this.input,\n      this.offsetToSourcePos(this.state.lastTokEndLoc.index),\n      this.state.start,\n    );\n  }\n\n  hasFollowingLineBreak(): boolean {\n    return hasNewLine(this.input, this.state.end, this.nextTokenStart());\n  }\n\n  isLineTerminator(): boolean {\n    return this.eat(tt.semi) || this.canInsertSemicolon();\n  }\n\n  // Consume a semicolon, or, failing that, see if we are allowed to\n  // pretend that there is a semicolon at this position.\n\n  semicolon(allowAsi: boolean = true): void {\n    if (allowAsi ? this.isLineTerminator() : this.eat(tt.semi)) return;\n    this.raise(Errors.MissingSemicolon, this.state.lastTokEndLoc);\n  }\n\n  // Expect a token of a given type. If found, consume it, otherwise,\n  // raise an unexpected token error at given pos.\n\n  expect(type: TokenType, loc?: Position | null): void {\n    if (!this.eat(type)) {\n      this.unexpected(loc, type);\n    }\n  }\n\n  // tryParse will clone parser state.\n  // It is expensive and should be used with cautions\n  tryParse<T extends Node | ReadonlyArray<Node>>(\n    fn: (abort: (node?: T) => never) => T,\n    oldState: State = this.state.clone(),\n  ):\n    | TryParse<T, null, false, false, null>\n    | TryParse<T | null, ParseError<any>, boolean, false, State>\n    | TryParse<T | null, null, false, true, State> {\n    const abortSignal: {\n      node: T | null;\n    } = { node: null };\n    try {\n      const node = fn((node = null) => {\n        abortSignal.node = node;\n        // eslint-disable-next-line @typescript-eslint/only-throw-error\n        throw abortSignal;\n      });\n      if (this.state.errors.length > oldState.errors.length) {\n        const failState = this.state;\n        this.state = oldState;\n        // tokensLength should be preserved during error recovery mode\n        // since the parser does not halt and will instead parse the\n        // remaining tokens\n        this.state.tokensLength = failState.tokensLength;\n        return {\n          node,\n          error: failState.errors[oldState.errors.length],\n          thrown: false,\n          aborted: false,\n          failState,\n        };\n      }\n\n      return {\n        node,\n        error: null,\n        thrown: false,\n        aborted: false,\n        failState: null,\n      };\n    } catch (error) {\n      const failState = this.state;\n      this.state = oldState;\n      if (error instanceof SyntaxError) {\n        // @ts-expect-error casting general syntax error to parse error\n        return { node: null, error, thrown: true, aborted: false, failState };\n      }\n      if (error === abortSignal) {\n        return {\n          node: abortSignal.node,\n          error: null,\n          thrown: false,\n          aborted: true,\n          failState,\n        };\n      }\n\n      throw error;\n    }\n  }\n\n  checkExpressionErrors(\n    refExpressionErrors: ExpressionErrors | undefined | null,\n    andThrow: boolean,\n  ) {\n    if (!refExpressionErrors) return false;\n    const {\n      shorthandAssignLoc,\n      doubleProtoLoc,\n      privateKeyLoc,\n      optionalParametersLoc,\n      voidPatternLoc,\n    } = refExpressionErrors;\n\n    const hasErrors =\n      !!shorthandAssignLoc ||\n      !!doubleProtoLoc ||\n      !!optionalParametersLoc ||\n      !!privateKeyLoc ||\n      !!voidPatternLoc;\n\n    if (!andThrow) {\n      return hasErrors;\n    }\n\n    if (shorthandAssignLoc != null) {\n      this.raise(Errors.InvalidCoverInitializedName, shorthandAssignLoc);\n    }\n\n    if (doubleProtoLoc != null) {\n      this.raise(Errors.DuplicateProto, doubleProtoLoc);\n    }\n\n    if (privateKeyLoc != null) {\n      this.raise(Errors.UnexpectedPrivateField, privateKeyLoc);\n    }\n\n    if (optionalParametersLoc != null) {\n      this.unexpected(optionalParametersLoc);\n    }\n\n    if (voidPatternLoc != null) {\n      this.raise(Errors.InvalidCoverDiscardElement, voidPatternLoc);\n    }\n  }\n\n  /**\n   * Test if current token is a literal property name\n   * https://tc39.es/ecma262/#prod-LiteralPropertyName\n   * LiteralPropertyName:\n   *   IdentifierName\n   *   StringLiteral\n   *   NumericLiteral\n   *   BigIntLiteral\n   */\n  isLiteralPropertyName(): boolean {\n    return tokenIsLiteralPropertyName(this.state.type);\n  }\n\n  /**\n   * Test if given node is a PrivateName\n   * will be overridden in ESTree plugin\n   */\n  isPrivateName(node: Node): node is PrivateName {\n    return node.type === \"PrivateName\";\n  }\n\n  /**\n   * Return the string value of a given private name\n   * WITHOUT `#`\n   * @see {@link https://tc39.es/ecma262/#sec-static-semantics-stringvalue}\n   */\n  getPrivateNameSV(node: PrivateName): string {\n    return node.id.name;\n  }\n\n  /**\n   * Return whether the given node is a member/optional chain that\n   * contains a private name as its property\n   * It is overridden in ESTree plugin\n   */\n  hasPropertyAsPrivateName(node: Node): boolean {\n    return (\n      (node.type === \"MemberExpression\" ||\n        node.type === \"OptionalMemberExpression\") &&\n      this.isPrivateName(node.property)\n    );\n  }\n\n  isObjectProperty(\n    node: Node,\n  ): node is ObjectProperty | EstreePropertyDefinition {\n    return node.type === \"ObjectProperty\";\n  }\n\n  isObjectMethod(node: Node): node is ObjectMethod {\n    return node.type === \"ObjectMethod\";\n  }\n\n  initializeScopes(\n    this: Parser,\n    inModule: boolean = this.options.sourceType === \"module\",\n  ): () => void {\n    // Initialize state\n    const oldLabels = this.state.labels;\n    this.state.labels = [];\n\n    const oldExportedIdentifiers = this.exportedIdentifiers;\n    this.exportedIdentifiers = new Set();\n\n    // initialize scopes\n    const oldInModule = this.inModule;\n    this.inModule = inModule;\n\n    const oldScope = this.scope;\n    const ScopeHandler = this.getScopeHandler();\n    this.scope = new ScopeHandler(this, inModule);\n\n    const oldProdParam = this.prodParam;\n    this.prodParam = new ProductionParameterHandler();\n\n    const oldClassScope = this.classScope;\n    this.classScope = new ClassScopeHandler(this);\n\n    const oldExpressionScope = this.expressionScope;\n    this.expressionScope = new ExpressionScopeHandler(this);\n\n    return () => {\n      // Revert state\n      this.state.labels = oldLabels;\n      this.exportedIdentifiers = oldExportedIdentifiers;\n\n      // Revert scopes\n      this.inModule = oldInModule;\n      this.scope = oldScope;\n      this.prodParam = oldProdParam;\n      this.classScope = oldClassScope;\n      this.expressionScope = oldExpressionScope;\n    };\n  }\n\n  enterInitialScopes() {\n    let paramFlags = ParamKind.PARAM;\n    if (\n      this.inModule ||\n      this.optionFlags & OptionFlags.AllowAwaitOutsideFunction\n    ) {\n      paramFlags |= ParamKind.PARAM_AWAIT;\n    }\n    if (this.optionFlags & OptionFlags.AllowYieldOutsideFunction) {\n      paramFlags |= ParamKind.PARAM_YIELD;\n    }\n    // The inModule flag ensures that the module block within a CommonJS source\n    // will be treated as an ES module.\n    const isCommonJS = !this.inModule && this.options.sourceType === \"commonjs\";\n    if (\n      isCommonJS ||\n      this.optionFlags & OptionFlags.AllowReturnOutsideFunction\n    ) {\n      paramFlags |= ParamKind.PARAM_RETURN;\n    }\n    this.prodParam.enter(paramFlags);\n    let scopeFlags = isCommonJS ? ScopeFlag.FUNCTION : ScopeFlag.PROGRAM;\n    if (this.optionFlags & OptionFlags.AllowNewTargetOutsideFunction) {\n      scopeFlags |= ScopeFlag.NEW_TARGET;\n    }\n    this.scope.enter(scopeFlags);\n  }\n\n  checkDestructuringPrivate(refExpressionErrors: ExpressionErrors) {\n    const { privateKeyLoc } = refExpressionErrors;\n    if (privateKeyLoc !== null) {\n      this.expectPlugin(\"destructuringPrivate\", privateKeyLoc);\n    }\n  }\n}\n\n/**\n * The ExpressionErrors is a context struct used to track ambiguous patterns\n * When we are sure the parsed pattern is a RHS, which means it is not a pattern,\n * we will throw on this position on invalid assign syntax, otherwise it will be reset to null\n *\n * Types of ExpressionErrors:\n *\n * - **shorthandAssignLoc**: track initializer `=` position\n * - **doubleProtoLoc**: track the duplicate `__proto__` key position\n * - **privateKeyLoc**: track private key `#p` position\n * - **optionalParametersLoc**: track the optional parameter (`?`).\n *   It's only used by typescript and flow plugins\n */\nexport class ExpressionErrors {\n  shorthandAssignLoc: Position | undefined | null = null;\n  doubleProtoLoc: Position | undefined | null = null;\n  privateKeyLoc: Position | undefined | null = null;\n  optionalParametersLoc: Position | undefined | null = null;\n  voidPatternLoc: Position | undefined | null = null;\n}\n","import UtilParser from \"./util.ts\";\nimport { SourceLocation, type Position } from \"../util/location.ts\";\nimport type {\n  Comment,\n  Node as NodeType,\n  NodeBase,\n  EstreeLiteral,\n  Identifier,\n  Placeholder,\n  StringLiteral,\n} from \"../types.ts\";\nimport { OptionFlags } from \"../options.ts\";\n\n// Start an AST node, attaching a start offset.\n\nclass Node implements NodeBase {\n  constructor(parser: UtilParser, pos: number, loc: Position) {\n    this.start = pos;\n    this.end = 0;\n    this.loc = new SourceLocation(loc);\n    if (parser?.optionFlags & OptionFlags.Ranges) this.range = [pos, 0];\n    if (parser?.filename) this.loc.filename = parser.filename;\n  }\n\n  type: string = \"\";\n  declare start: number;\n  declare end: number;\n  declare loc: SourceLocation;\n  declare range: [number, number];\n  declare leadingComments: Array<Comment>;\n  declare trailingComments: Array<Comment>;\n  declare innerComments: Array<Comment>;\n  declare extra: {\n    [key: string]: any;\n  };\n}\nconst NodePrototype = Node.prototype;\n\nif (!process.env.BABEL_8_BREAKING) {\n  // @ts-expect-error __clone is not defined in Node prototype\n  NodePrototype.__clone = function (): Node {\n    const newNode = new Node(undefined, this.start, this.loc.start);\n    const keys = Object.keys(this) as (keyof Node)[];\n    for (let i = 0, length = keys.length; i < length; i++) {\n      const key = keys[i];\n      // Do not clone comments that are already attached to the node\n      if (\n        key !== \"leadingComments\" &&\n        key !== \"trailingComments\" &&\n        key !== \"innerComments\"\n      ) {\n        // @ts-expect-error cloning this to newNode\n        newNode[key] = this[key];\n      }\n    }\n\n    return newNode;\n  };\n}\n\nexport type Undone<T extends NodeType> = Omit<T, \"type\">;\n\nexport abstract class NodeUtils extends UtilParser {\n  startNode<T extends NodeType = never>(): Undone<T> {\n    const loc = this.state.startLoc;\n    return new Node(this, loc.index, loc) as unknown as Undone<T>;\n  }\n\n  startNodeAt<T extends NodeType = never>(loc: Position): Undone<T> {\n    return new Node(this, loc.index, loc) as unknown as Undone<T>;\n  }\n\n  /** Start a new node with a previous node's location. */\n  startNodeAtNode<T extends NodeType = never>(\n    type: Undone<NodeType>,\n  ): Undone<T> {\n    return this.startNodeAt(type.loc.start);\n  }\n\n  // Finish an AST node, adding `type` and `end` properties.\n\n  finishNode<T extends NodeType>(node: Undone<T>, type: T[\"type\"]): T {\n    return this.finishNodeAt(node, type, this.state.lastTokEndLoc);\n  }\n\n  // Finish node at given position\n\n  finishNodeAt<T extends NodeType>(\n    node: Omit<T, \"type\">,\n    type: T[\"type\"],\n    endLoc: Position,\n  ): T {\n    if (process.env.NODE_ENV !== \"production\" && node.end > 0) {\n      throw new Error(\n        \"Do not call finishNode*() twice on the same node.\" +\n          \" Instead use resetEndLocation() or change type directly.\",\n      );\n    }\n    (node as T).type = type;\n    node.end = endLoc.index;\n    node.loc.end = endLoc;\n    if (this.optionFlags & OptionFlags.Ranges) node.range[1] = endLoc.index;\n    if (this.optionFlags & OptionFlags.AttachComment) {\n      this.processComment(node as T);\n    }\n    return node as T;\n  }\n\n  resetStartLocation(node: NodeBase, startLoc: Position): void {\n    node.start = startLoc.index;\n    node.loc.start = startLoc;\n    if (this.optionFlags & OptionFlags.Ranges) node.range[0] = startLoc.index;\n  }\n\n  resetEndLocation(\n    node: NodeBase,\n    endLoc: Position = this.state.lastTokEndLoc,\n  ): void {\n    node.end = endLoc.index;\n    node.loc.end = endLoc;\n    if (this.optionFlags & OptionFlags.Ranges) node.range[1] = endLoc.index;\n  }\n\n  /**\n   * Reset the start location of node to the start location of locationNode\n   */\n  resetStartLocationFromNode(node: NodeBase, locationNode: NodeBase): void {\n    this.resetStartLocation(node, locationNode.loc.start);\n  }\n\n  castNodeTo<T extends NodeType[\"type\"]>(\n    node: NodeType,\n    type: T,\n  ): Extract<NodeType, { type: T }> {\n    node.type = type;\n    return node as Extract<NodeType, { type: T }>;\n  }\n\n  cloneIdentifier<T extends Identifier | Placeholder>(node: T): T {\n    // We don't need to clone `typeAnnotations` and `optional`: because\n    // cloneIdentifier is only used in object shorthand and named import/export.\n    // Neither of them allow type annotations after the identifier or optional identifier\n    const { type, start, end, loc, range, name } = node;\n    const cloned = Object.create(NodePrototype);\n    cloned.type = type;\n    cloned.start = start;\n    cloned.end = end;\n    cloned.loc = loc;\n    cloned.range = range;\n    cloned.name = name;\n    if (node.extra) cloned.extra = node.extra;\n    return cloned;\n  }\n\n  cloneStringLiteral<T extends StringLiteral | EstreeLiteral | Placeholder>(\n    node: T,\n  ): T {\n    const { type, start, end, loc, range, extra } = node;\n    const cloned = Object.create(NodePrototype);\n    cloned.type = type;\n    cloned.start = start;\n    cloned.end = end;\n    cloned.loc = loc;\n    cloned.range = range;\n    cloned.extra = extra;\n    cloned.value = (node as StringLiteral).value;\n    return cloned;\n  }\n}\n","import * as charCodes from \"charcodes\";\nimport { tt, type TokenType } from \"../tokenizer/types.ts\";\nimport type {\n  AssignmentPattern,\n  TSParameterProperty,\n  Decorator,\n  Expression,\n  Identifier,\n  Node,\n  Pattern,\n  RestElement,\n  SpreadElement,\n  ObjectOrClassMember,\n  ClassMember,\n  ObjectMember,\n  TsNamedTypeElementBase,\n  PrivateName,\n  ObjectExpression,\n  ObjectPattern,\n  ArrayPattern,\n  AssignmentProperty,\n  Assignable,\n  VoidPattern,\n} from \"../types.ts\";\nimport type { Position } from \"../util/location.ts\";\nimport {\n  isStrictBindOnlyReservedWord,\n  isStrictBindReservedWord,\n} from \"../util/identifier.ts\";\nimport { NodeUtils, type Undone } from \"./node.ts\";\nimport { BindingFlag } from \"../util/scopeflags.ts\";\nimport type { ExpressionErrors } from \"./util.ts\";\nimport { Errors, type LValAncestor } from \"../parse-error.ts\";\nimport type Parser from \"./index.ts\";\n\nconst unwrapParenthesizedExpression = (node: Node): Node => {\n  return node.type === \"ParenthesizedExpression\"\n    ? unwrapParenthesizedExpression(node.expression)\n    : node;\n};\n\nexport const enum ParseBindingListFlags {\n  ALLOW_EMPTY = 1 << 0,\n  IS_FUNCTION_PARAMS = 1 << 1,\n  IS_CONSTRUCTOR_PARAMS = 1 << 2,\n}\n\nexport default abstract class LValParser extends NodeUtils {\n  // Forward-declaration: defined in expression.js\n  abstract parseIdentifier(liberal?: boolean): Identifier;\n  abstract parseMaybeAssign(\n    refExpressionErrors?: ExpressionErrors | null,\n    afterLeftParse?: Function,\n  ): Expression;\n\n  abstract parseMaybeAssignAllowIn(\n    refExpressionErrors?: ExpressionErrors | null,\n    afterLeftParse?: Function,\n  ): Expression;\n\n  abstract parseObjectLike<T extends ObjectPattern | ObjectExpression>(\n    close: TokenType,\n    isPattern: boolean,\n    isRecord?: boolean,\n    refExpressionErrors?: ExpressionErrors,\n  ): T;\n  abstract parseObjPropValue(\n    prop: any,\n    startLoc: Position | null,\n    isGenerator: boolean,\n    isAsync: boolean,\n    isPattern: boolean,\n    isAccessor: boolean,\n    refExpressionErrors?: ExpressionErrors | null,\n  ): void;\n  abstract parsePropertyName(\n    prop: ObjectOrClassMember | ClassMember | TsNamedTypeElementBase,\n  ): void;\n  abstract parsePrivateName(): PrivateName;\n  // Forward-declaration: defined in statement.js\n  abstract parseDecorator(): Decorator;\n\n  /**\n   * Convert existing expression atom to assignable pattern\n   * if possible. Also checks invalid destructuring targets:\n   *\n   * - Parenthesized Destructuring patterns\n   * - RestElement is not the last element\n   * - Missing `=` in assignment pattern\n   *\n   * NOTE: There is a corresponding \"isAssignable\" method.\n   * When this one is updated, please check if also that one needs to be updated.\n   *\n   * @param node The expression atom\n   * @param isLHS Whether we are parsing a LeftHandSideExpression.\n   *              If isLHS is `true`, the following cases are allowed: `[(a)] = [0]`, `[(a.b)] = [0]`\n   *              If isLHS is `false`, we are in an arrow function parameters list.\n   */\n  toAssignable(node: Node, isLHS: boolean = false): asserts node is Assignable {\n    let parenthesized = undefined;\n    if (node.type === \"ParenthesizedExpression\" || node.extra?.parenthesized) {\n      parenthesized = unwrapParenthesizedExpression(node);\n      if (isLHS) {\n        // an LHS can be reinterpreted to a binding pattern but not vice versa.\n        // therefore a parenthesized identifier is ambiguous until we are sure it is an assignment expression\n        // i.e. `([(a) = []] = []) => {}`\n        // see also `recordArrowParameterBindingError` signature in packages/babel-parser/src/util/expression-scope.js\n        if (parenthesized.type === \"Identifier\") {\n          this.expressionScope.recordArrowParameterBindingError(\n            Errors.InvalidParenthesizedAssignment,\n            node,\n          );\n        } else if (\n          parenthesized.type !== \"MemberExpression\" &&\n          !this.isOptionalMemberExpression(parenthesized)\n        ) {\n          // A parenthesized member expression can be in LHS but not in pattern.\n          // If the LHS is later interpreted as a pattern, `checkLVal` will throw for member expression binding\n          // i.e. `([(a.b) = []] = []) => {}`\n          this.raise(Errors.InvalidParenthesizedAssignment, node);\n        }\n      } else {\n        this.raise(Errors.InvalidParenthesizedAssignment, node);\n      }\n    }\n\n    switch (node.type) {\n      case \"Identifier\":\n      case \"ObjectPattern\":\n      case \"ArrayPattern\":\n      case \"AssignmentPattern\":\n      case \"RestElement\":\n      case \"VoidPattern\":\n        break;\n\n      case \"ObjectExpression\":\n        this.castNodeTo(node, \"ObjectPattern\");\n        for (\n          let i = 0, length = node.properties.length, last = length - 1;\n          i < length;\n          i++\n        ) {\n          const prop = node.properties[i];\n          const isLast = i === last;\n          this.toAssignableObjectExpressionProp(prop, isLast, isLHS);\n\n          if (\n            isLast &&\n            (prop as Node).type === \"RestElement\" &&\n            node.extra?.trailingCommaLoc\n          ) {\n            this.raise(Errors.RestTrailingComma, node.extra.trailingCommaLoc);\n          }\n        }\n        break;\n\n      case \"ObjectProperty\": {\n        const { key, value } = node;\n        if (this.isPrivateName(key)) {\n          this.classScope.usePrivateName(\n            this.getPrivateNameSV(key),\n            key.loc.start,\n          );\n        }\n        this.toAssignable(value, isLHS);\n        break;\n      }\n\n      case \"SpreadElement\": {\n        throw new Error(\n          \"Internal @babel/parser error (this is a bug, please report it).\" +\n            \" SpreadElement should be converted by .toAssignable's caller.\",\n        );\n      }\n\n      case \"ArrayExpression\":\n        this.castNodeTo(node, \"ArrayPattern\");\n        this.toAssignableList(\n          node.elements,\n          node.extra?.trailingCommaLoc,\n          isLHS,\n        );\n        break;\n\n      case \"AssignmentExpression\":\n        if (node.operator !== \"=\") {\n          this.raise(Errors.MissingEqInAssignment, node.left.loc.end);\n        }\n\n        this.castNodeTo(node, \"AssignmentPattern\");\n        delete node.operator;\n        if (node.left.type === \"VoidPattern\") {\n          this.raise(Errors.VoidPatternInitializer, node.left);\n        }\n        this.toAssignable(node.left, isLHS);\n        break;\n\n      case \"ParenthesizedExpression\":\n        /*::invariant (parenthesized !== undefined) */\n        this.toAssignable(parenthesized, isLHS);\n        break;\n\n      default:\n      // We don't know how to deal with this node. It will\n      // be reported by a later call to checkLVal\n    }\n  }\n\n  toAssignableObjectExpressionProp(\n    prop: Node,\n    isLast: boolean,\n    isLHS: boolean,\n  ) {\n    if (prop.type === \"ObjectMethod\") {\n      this.raise(\n        prop.kind === \"get\" || prop.kind === \"set\"\n          ? Errors.PatternHasAccessor\n          : Errors.PatternHasMethod,\n        prop.key,\n      );\n    } else if (prop.type === \"SpreadElement\") {\n      this.castNodeTo(prop, \"RestElement\");\n      const arg = prop.argument;\n      this.checkToRestConversion(arg, /* allowPattern */ false);\n      this.toAssignable(arg, isLHS);\n\n      if (!isLast) {\n        this.raise(Errors.RestTrailingComma, prop);\n      }\n    } else {\n      this.toAssignable(prop, isLHS);\n    }\n  }\n\n  // Convert list of expression atoms to binding list.\n\n  toAssignableList(\n    exprList: (\n      | Expression\n      | SpreadElement\n      | RestElement\n      | VoidPattern\n      | AssignmentPattern\n      | null\n    )[],\n    trailingCommaLoc: Position | undefined | null,\n    isLHS: boolean,\n  ): void {\n    const end = exprList.length - 1;\n\n    for (let i = 0; i <= end; i++) {\n      const elt = exprList[i];\n      if (!elt) continue;\n\n      this.toAssignableListItem(exprList, i, isLHS);\n\n      if (elt.type === \"RestElement\") {\n        if (i < end) {\n          this.raise(Errors.RestTrailingComma, elt);\n        } else if (trailingCommaLoc) {\n          this.raise(Errors.RestTrailingComma, trailingCommaLoc);\n        }\n      }\n    }\n  }\n\n  toAssignableListItem(\n    exprList: (\n      | Expression\n      | SpreadElement\n      | RestElement\n      | VoidPattern\n      | AssignmentPattern\n    )[],\n    index: number,\n    isLHS: boolean,\n  ): void {\n    const node = exprList[index];\n    if (node.type === \"SpreadElement\") {\n      this.castNodeTo(node, \"RestElement\");\n      const arg = node.argument;\n      this.checkToRestConversion(arg, /* allowPattern */ true);\n      this.toAssignable(arg, isLHS);\n    } else {\n      this.toAssignable(node, isLHS);\n    }\n  }\n\n  isAssignable(node: Node, isBinding?: boolean): boolean {\n    switch (node.type) {\n      case \"Identifier\":\n      case \"ObjectPattern\":\n      case \"ArrayPattern\":\n      case \"AssignmentPattern\":\n      case \"RestElement\":\n      case \"VoidPattern\":\n        return true;\n\n      case \"ObjectExpression\": {\n        const last = node.properties.length - 1;\n        return node.properties.every((prop, i) => {\n          return (\n            prop.type !== \"ObjectMethod\" &&\n            (i === last || prop.type !== \"SpreadElement\") &&\n            this.isAssignable(prop)\n          );\n        });\n      }\n\n      case \"ObjectProperty\":\n        return this.isAssignable(node.value);\n\n      case \"SpreadElement\":\n        return this.isAssignable(node.argument);\n\n      case \"ArrayExpression\":\n        return node.elements.every(\n          element => element === null || this.isAssignable(element),\n        );\n\n      case \"AssignmentExpression\":\n        return node.operator === \"=\";\n\n      case \"ParenthesizedExpression\":\n        return this.isAssignable(node.expression);\n\n      case \"MemberExpression\":\n      case \"OptionalMemberExpression\":\n        return !isBinding;\n\n      default:\n        return false;\n    }\n  }\n\n  // Convert list of expression atoms to a list of\n\n  toReferencedList(\n    exprList:\n      | ReadonlyArray<\n          Expression | SpreadElement | VoidPattern | AssignmentPattern\n        >\n      | ReadonlyArray<\n          Expression | RestElement | VoidPattern | AssignmentPattern\n        >,\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    isParenthesizedExpr?: boolean,\n  ):\n    | ReadonlyArray<\n        Expression | SpreadElement | VoidPattern | AssignmentPattern\n      >\n    | ReadonlyArray<\n        Expression | RestElement | VoidPattern | AssignmentPattern\n      > {\n    return exprList;\n  }\n\n  toReferencedListDeep(\n    exprList:\n      | ReadonlyArray<\n          Expression | SpreadElement | VoidPattern | AssignmentPattern\n        >\n      | ReadonlyArray<\n          Expression | RestElement | VoidPattern | AssignmentPattern\n        >,\n    isParenthesizedExpr?: boolean,\n  ): void {\n    this.toReferencedList(exprList, isParenthesizedExpr);\n\n    for (const expr of exprList) {\n      if (expr?.type === \"ArrayExpression\") {\n        this.toReferencedListDeep(expr.elements);\n      }\n    }\n  }\n\n  // Parses spread element.\n\n  parseSpread(\n    this: Parser,\n    refExpressionErrors?: ExpressionErrors | null,\n  ): SpreadElement {\n    const node = this.startNode<SpreadElement>();\n    this.next();\n    node.argument = this.parseMaybeAssignAllowIn(\n      refExpressionErrors,\n      undefined,\n    );\n    return this.finishNode(node, \"SpreadElement\");\n  }\n\n  // https://tc39.es/ecma262/#prod-BindingRestElement\n  parseRestBinding(this: Parser): RestElement {\n    const node = this.startNode<RestElement>();\n    this.next(); // eat `...`\n    const argument = this.parseBindingAtom();\n    if (argument.type === \"VoidPattern\") {\n      this.raise(Errors.UnexpectedVoidPattern, argument);\n    }\n    node.argument = argument;\n    return this.finishNode(node, \"RestElement\");\n  }\n\n  // Parses lvalue (assignable) atom.\n  parseBindingAtom(this: Parser): Pattern {\n    // https://tc39.es/ecma262/#prod-BindingPattern\n    switch (this.state.type) {\n      case tt.bracketL: {\n        const node = this.startNode<ArrayPattern>();\n        this.next();\n        node.elements = this.parseBindingList(\n          tt.bracketR,\n          charCodes.rightSquareBracket,\n          ParseBindingListFlags.ALLOW_EMPTY,\n        );\n        return this.finishNode(node, \"ArrayPattern\");\n      }\n\n      case tt.braceL:\n        return this.parseObjectLike(tt.braceR, true);\n\n      case tt._void:\n        return this.parseVoidPattern(null);\n    }\n\n    // https://tc39.es/ecma262/#prod-BindingIdentifier\n    return this.parseIdentifier();\n  }\n\n  // https://tc39.es/ecma262/#prod-BindingElementList\n  parseBindingList(\n    this: Parser,\n    close: TokenType,\n    closeCharCode: (typeof charCodes)[keyof typeof charCodes],\n    flags: ParseBindingListFlags.ALLOW_EMPTY,\n  ): Array<Pattern>;\n  parseBindingList(\n    this: Parser,\n    close: TokenType,\n    closeCharCode: (typeof charCodes)[keyof typeof charCodes],\n    flags: ParseBindingListFlags.IS_FUNCTION_PARAMS,\n  ): Array<Pattern | TSParameterProperty>;\n  parseBindingList(\n    this: Parser,\n    close: TokenType,\n    closeCharCode: (typeof charCodes)[keyof typeof charCodes],\n    flags: ParseBindingListFlags,\n  ): Array<Pattern | TSParameterProperty> {\n    const allowEmpty = flags & ParseBindingListFlags.ALLOW_EMPTY;\n\n    const elts: Array<Pattern | TSParameterProperty> = [];\n    let first = true;\n    while (!this.eat(close)) {\n      if (first) {\n        first = false;\n      } else {\n        this.expect(tt.comma);\n      }\n      if (allowEmpty && this.match(tt.comma)) {\n        elts.push(null);\n      } else if (this.eat(close)) {\n        break;\n      } else if (this.match(tt.ellipsis)) {\n        let rest: Pattern = this.parseRestBinding();\n        if (\n          (!process.env.BABEL_8_BREAKING && this.hasPlugin(\"flow\")) ||\n          flags & ParseBindingListFlags.IS_FUNCTION_PARAMS\n        ) {\n          rest = this.parseFunctionParamType(rest);\n        }\n        elts.push(rest);\n        if (!this.checkCommaAfterRest(closeCharCode)) {\n          this.expect(close);\n          break;\n        }\n      } else {\n        const decorators = [];\n        if (flags & ParseBindingListFlags.IS_FUNCTION_PARAMS) {\n          if (this.match(tt.at) && this.hasPlugin(\"decorators\")) {\n            this.raise(\n              Errors.UnsupportedParameterDecorator,\n              this.state.startLoc,\n            );\n          }\n          // invariant: hasPlugin(\"decorators-legacy\")\n          while (this.match(tt.at)) {\n            decorators.push(this.parseDecorator());\n          }\n        }\n        elts.push(this.parseBindingElement(flags, decorators));\n      }\n    }\n    return elts;\n  }\n\n  // https://tc39.es/ecma262/#prod-BindingRestProperty\n  parseBindingRestProperty(\n    this: Parser,\n    prop: Undone<RestElement>,\n  ): RestElement {\n    this.next(); // eat '...'\n    if (this.hasPlugin(\"discardBinding\") && this.match(tt._void)) {\n      prop.argument = this.parseVoidPattern(null);\n      this.raise(Errors.UnexpectedVoidPattern, prop.argument);\n    } else {\n      // Don't use parseRestBinding() as we only allow Identifier here.\n      prop.argument = this.parseIdentifier();\n    }\n    this.checkCommaAfterRest(charCodes.rightCurlyBrace);\n    return this.finishNode(prop, \"RestElement\");\n  }\n\n  // https://tc39.es/ecma262/#prod-BindingProperty\n  parseBindingProperty(this: Parser): AssignmentProperty | RestElement {\n    const { type, startLoc } = this.state;\n    if (type === tt.ellipsis) {\n      return this.parseBindingRestProperty(this.startNode());\n    }\n\n    const prop = this.startNode<AssignmentProperty>();\n    if (type === tt.privateName) {\n      this.expectPlugin(\"destructuringPrivate\", startLoc);\n      this.classScope.usePrivateName(this.state.value, startLoc);\n      prop.key = this.parsePrivateName();\n    } else {\n      this.parsePropertyName(prop);\n    }\n    prop.method = false;\n    return this.parseObjPropValue(\n      prop,\n      startLoc,\n      false /* isGenerator */,\n      false /* isAsync */,\n      true /* isPattern */,\n      false /* isAccessor */,\n    );\n  }\n\n  // https://tc39.es/ecma262/#prod-BindingElement\n  parseBindingElement(\n    this: Parser,\n    flags: ParseBindingListFlags,\n    decorators: Decorator[],\n  ): Pattern | TSParameterProperty {\n    const left = this.parseMaybeDefault();\n    if (\n      (!process.env.BABEL_8_BREAKING && this.hasPlugin(\"flow\")) ||\n      flags & ParseBindingListFlags.IS_FUNCTION_PARAMS\n    ) {\n      this.parseFunctionParamType(left);\n    }\n    if (decorators.length) {\n      left.decorators = decorators;\n      this.resetStartLocationFromNode(left, decorators[0]);\n    }\n    const elt = this.parseMaybeDefault(left.loc.start, left);\n    return elt;\n  }\n\n  // Used by flow/typescript plugin to add type annotations to binding elements\n  parseFunctionParamType(param: Pattern): Pattern {\n    return param;\n  }\n\n  // Parses assignment pattern around given atom if possible.\n  // https://tc39.es/ecma262/#prod-BindingElement\n  parseMaybeDefault<P extends Pattern>(\n    this: Parser,\n    startLoc?: Position | null,\n    left?: P,\n  ): P | AssignmentPattern;\n  parseMaybeDefault(\n    this: Parser,\n    startLoc?: Position | null,\n    left?: Pattern | null,\n  ): Pattern {\n    startLoc ??= this.state.startLoc;\n    left = left ?? this.parseBindingAtom();\n    if (!this.eat(tt.eq)) return left;\n\n    const node = this.startNodeAt<AssignmentPattern>(startLoc);\n    if (left.type === \"VoidPattern\") {\n      this.raise(Errors.VoidPatternInitializer, left);\n    }\n    node.left = left;\n    node.right = this.parseMaybeAssignAllowIn();\n    return this.finishNode(node, \"AssignmentPattern\");\n  }\n  /**\n   * Return information use in determining whether a Node of a given type is an LVal,\n   * possibly given certain additional context information.\n   *\n   * Subclasser notes: This method has kind of a lot of mixed, but related,\n   * responsibilities. If we can definitively determine with the information\n   * provided that this either *is* or *isn't* a valid `LVal`, then the return\n   * value is easy: just return `true` or `false`. However, if it is a valid\n   * LVal *ancestor*, and thus its descendants must be subsequently visited to\n   * continue the \"investigation\", then this method should return the relevant\n   * child key as a `string`. In some special cases, you additionally want to\n   * convey that this node should be treated as if it were parenthesized. In\n   * that case, a tuple of [key: string, parenthesized: boolean] is returned.\n   * The `string`-only return option is actually just a shorthand for:\n   * `[key: string, parenthesized: false]`.\n   *\n   * @param type A Node `type` string\n   * @param isUnparenthesizedInAssign\n   *        Whether the node in question is unparenthesized and its parent\n   *        is either an assignment pattern or an assignment expression.\n   * @param binding\n   *        The binding operation that is being considered for this potential\n   *        LVal.\n   * @returns `true` or `false` if we can immediately determine whether the node\n   *          type in question can be treated as an `LVal`.\n   *          A `string` key to traverse if we must check this child.\n   *          A `[string, boolean]` tuple if we need to check this child and\n   *          treat is as parenthesized.\n   */\n  isValidLVal(\n    type: string,\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    isUnparenthesizedInAssign: boolean,\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    binding: BindingFlag,\n  ): string | boolean | [string, boolean] {\n    switch (type) {\n      case \"AssignmentPattern\":\n        return \"left\";\n      case \"RestElement\":\n        return \"argument\";\n      case \"ObjectProperty\":\n        return \"value\";\n      case \"ParenthesizedExpression\":\n        return \"expression\";\n      case \"ArrayPattern\":\n        return \"elements\";\n      case \"ObjectPattern\":\n        return \"properties\";\n      case \"VoidPattern\":\n        return true;\n    }\n    return false;\n  }\n\n  // Overridden by the estree plugin\n  isOptionalMemberExpression(expression: Node): boolean {\n    return expression.type === \"OptionalMemberExpression\";\n  }\n\n  /**\n   * Verify that a target expression is an lval (something that can be assigned to).\n   *\n   * @param expression The expression in question to check.\n   * @param ancestor\n   *        The relevant ancestor to provide context information for the error\n   *        if the check fails.\n   * @param binding\n   *        The desired binding type. If the given expression is an identifier\n   *        and `binding` is not `BindingFlag.TYPE_NONE`, `checkLVal` will register binding\n   *        to the parser scope See also `src/util/scopeflags.js`\n   * @param checkClashes\n   *        An optional string set to check if an identifier name is included.\n   *        `checkLVal` will add checked identifier name to `checkClashes` It is\n   *        used in tracking duplicates in function parameter lists. If it is\n   *        false, `checkLVal` will skip duplicate checks\n   * @param strictModeChanged\n   *        Whether an identifier has been parsed in a sloppy context but should\n   *        be reinterpreted as strict-mode. e.g. `(arguments) => { \"use strict \"}`\n   * @param hasParenthesizedAncestor\n   *        This is only used internally during recursive calls, and you should\n   *        not have to set it yourself.\n   */\n\n  checkLVal(\n    expression:\n      | Expression\n      | ObjectMember\n      | RestElement\n      | Pattern\n      | TSParameterProperty,\n    ancestor: LValAncestor,\n    binding: BindingFlag = BindingFlag.TYPE_NONE,\n    checkClashes: Set<string> | false = false,\n    strictModeChanged: boolean = false,\n    hasParenthesizedAncestor: boolean = false,\n  ): void {\n    const type = expression.type;\n\n    // If we find here an ObjectMethod, it's because this was originally\n    // an ObjectExpression which has then been converted.\n    // toAssignable already reported this error with a nicer message.\n    if (this.isObjectMethod(expression)) return;\n\n    const isOptionalMemberExpression =\n      this.isOptionalMemberExpression(expression);\n\n    if (isOptionalMemberExpression || type === \"MemberExpression\") {\n      if (isOptionalMemberExpression) {\n        this.expectPlugin(\"optionalChainingAssign\", expression.loc.start);\n        if (ancestor.type !== \"AssignmentExpression\") {\n          this.raise(Errors.InvalidLhsOptionalChaining, expression, {\n            ancestor,\n          });\n        }\n      }\n\n      if (binding !== BindingFlag.TYPE_NONE) {\n        this.raise(Errors.InvalidPropertyBindingPattern, expression);\n      }\n      return;\n    }\n\n    if (type === \"Identifier\") {\n      this.checkIdentifier(expression, binding, strictModeChanged);\n\n      const { name } = expression;\n\n      if (checkClashes) {\n        if (checkClashes.has(name)) {\n          this.raise(Errors.ParamDupe, expression);\n        } else {\n          checkClashes.add(name);\n        }\n      }\n\n      return;\n    } else if (type === \"VoidPattern\" && ancestor.type === \"CatchClause\") {\n      this.raise(Errors.VoidPatternCatchClauseParam, expression);\n    }\n\n    const validity = this.isValidLVal(\n      type,\n      !(hasParenthesizedAncestor || expression.extra?.parenthesized) &&\n        ancestor.type === \"AssignmentExpression\",\n      binding,\n    );\n\n    if (validity === true) return;\n    if (validity === false) {\n      const ParseErrorClass =\n        binding === BindingFlag.TYPE_NONE\n          ? Errors.InvalidLhs\n          : Errors.InvalidLhsBinding;\n\n      this.raise(ParseErrorClass, expression, { ancestor });\n      return;\n    }\n\n    let key: string, isParenthesizedExpression: boolean;\n    if (typeof validity === \"string\") {\n      key = validity;\n      isParenthesizedExpression = type === \"ParenthesizedExpression\";\n    } else {\n      [key, isParenthesizedExpression] = validity;\n    }\n\n    const nextAncestor =\n      type === \"ArrayPattern\" || type === \"ObjectPattern\"\n        ? ({ type } as const)\n        : ancestor;\n\n    // @ts-expect-error key may not index expression.\n    const val = expression[key];\n    if (Array.isArray(val)) {\n      for (const child of val) {\n        if (child) {\n          this.checkLVal(\n            child,\n            nextAncestor,\n            binding,\n            checkClashes,\n            strictModeChanged,\n            isParenthesizedExpression,\n          );\n        }\n      }\n    } else if (val) {\n      this.checkLVal(\n        val,\n        nextAncestor,\n        binding,\n        checkClashes,\n        strictModeChanged,\n        isParenthesizedExpression,\n      );\n    }\n  }\n\n  checkIdentifier(\n    at: Identifier,\n    bindingType: BindingFlag,\n    strictModeChanged: boolean = false,\n  ) {\n    if (\n      this.state.strict &&\n      (strictModeChanged\n        ? isStrictBindReservedWord(at.name, this.inModule)\n        : isStrictBindOnlyReservedWord(at.name))\n    ) {\n      if (bindingType === BindingFlag.TYPE_NONE) {\n        this.raise(Errors.StrictEvalArguments, at, { referenceName: at.name });\n      } else {\n        this.raise(Errors.StrictEvalArgumentsBinding, at, {\n          bindingName: at.name,\n        });\n      }\n    }\n\n    if (bindingType & BindingFlag.FLAG_NO_LET_IN_LEXICAL && at.name === \"let\") {\n      this.raise(Errors.LetInLexicalBinding, at);\n    }\n\n    if (!(bindingType & BindingFlag.TYPE_NONE)) {\n      this.declareNameFromIdentifier(at, bindingType);\n    }\n  }\n\n  declareNameFromIdentifier(identifier: Identifier, binding: BindingFlag) {\n    this.scope.declareName(identifier.name, binding, identifier.loc.start);\n  }\n\n  checkToRestConversion(node: Node, allowPattern: boolean): void {\n    switch (node.type) {\n      case \"ParenthesizedExpression\":\n        this.checkToRestConversion(node.expression, allowPattern);\n        break;\n      case \"Identifier\":\n      case \"MemberExpression\":\n        break;\n      case \"ArrayExpression\":\n      case \"ObjectExpression\":\n        if (allowPattern) break;\n      /* falls through */\n      default:\n        this.raise(Errors.InvalidRestAssignmentPattern, node);\n    }\n  }\n\n  checkCommaAfterRest(\n    close: (typeof charCodes)[keyof typeof charCodes],\n  ): boolean {\n    if (!this.match(tt.comma)) {\n      return false;\n    }\n\n    this.raise(\n      this.lookaheadCharCode() === close\n        ? Errors.RestTrailingComma\n        : Errors.ElementAfterRest,\n      this.state.startLoc,\n    );\n\n    return true;\n  }\n}\n","import type State from \"../../tokenizer/state.ts\";\nimport {\n  tokenIsIdentifier,\n  tokenIsTSDeclarationStart,\n  tokenIsTSTypeOperator,\n  tokenOperatorPrecedence,\n  tokenIsKeywordOrIdentifier,\n  tt,\n  type TokenType,\n  tokenIsTemplate,\n  tokenCanStartExpression,\n} from \"../../tokenizer/types.ts\";\nimport { types as tc } from \"../../tokenizer/context.ts\";\nimport type * as N from \"../../types.ts\";\nimport type { Position } from \"../../util/location.ts\";\nimport { createPositionWithColumnOffset } from \"../../util/location.ts\";\nimport type Parser from \"../../parser/index.ts\";\nimport { ScopeFlag, BindingFlag } from \"../../util/scopeflags.ts\";\nimport TypeScriptScopeHandler from \"./scope.ts\";\nimport * as charCodes from \"charcodes\";\nimport type { ExpressionErrors } from \"../../parser/util.ts\";\nimport type { ParseStatementFlag } from \"../../parser/statement.ts\";\nimport { ParamKind } from \"../../util/production-parameter.ts\";\nimport { Errors, ParseErrorEnum } from \"../../parse-error.ts\";\nimport type { Undone } from \"../../parser/node.ts\";\nimport type { ClassWithMixin, IJSXParserMixin } from \"../jsx/index.ts\";\nimport { ParseBindingListFlags } from \"../../parser/lval.ts\";\nimport { OptionFlags } from \"../../options.ts\";\n\ntype TsModifier =\n  | \"readonly\"\n  | \"abstract\"\n  | \"declare\"\n  | \"static\"\n  | \"override\"\n  | \"const\"\n  | N.Accessibility\n  | N.VarianceAnnotations;\n\nfunction nonNull<T>(x?: T | null): T {\n  if (x == null) {\n    throw new Error(`Unexpected ${x} value.`);\n  }\n  return x;\n}\n\nfunction assert(x: boolean): void {\n  if (!x) {\n    throw new Error(\"Assert fail\");\n  }\n}\n\ntype ParsingContext =\n  | \"EnumMembers\"\n  | \"HeritageClauseElement\"\n  | \"TupleElementTypes\"\n  | \"TypeMembers\"\n  | \"TypeParametersOrArguments\";\n\ntype ModifierBase = {\n  accessibility?: N.Accessibility;\n} & {\n  [key in TsModifier]?: boolean | undefined | null;\n};\n\n/* eslint sort-keys: \"error\" */\nconst TSErrors = ParseErrorEnum`typescript`({\n  AbstractMethodHasImplementation: ({ methodName }: { methodName: string }) =>\n    `Method '${methodName}' cannot have an implementation because it is marked abstract.`,\n  AbstractPropertyHasInitializer: ({\n    propertyName,\n  }: {\n    propertyName: string;\n  }) =>\n    `Property '${propertyName}' cannot have an initializer because it is marked abstract.`,\n  AccessorCannotBeOptional:\n    \"An 'accessor' property cannot be declared optional.\",\n  AccessorCannotDeclareThisParameter:\n    \"'get' and 'set' accessors cannot declare 'this' parameters.\",\n  AccessorCannotHaveTypeParameters: \"An accessor cannot have type parameters.\",\n  ClassMethodHasDeclare: \"Class methods cannot have the 'declare' modifier.\",\n  ClassMethodHasReadonly: \"Class methods cannot have the 'readonly' modifier.\",\n  ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:\n    \"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.\",\n  ConstructorHasTypeParameters:\n    \"Type parameters cannot appear on a constructor declaration.\",\n  DeclareAccessor: ({ kind }: { kind: \"get\" | \"set\" }) =>\n    `'declare' is not allowed in ${kind}ters.`,\n  DeclareClassFieldHasInitializer:\n    \"Initializers are not allowed in ambient contexts.\",\n  DeclareFunctionHasImplementation:\n    \"An implementation cannot be declared in ambient contexts.\",\n  DuplicateAccessibilityModifier: ({\n    modifier,\n  }: {\n    modifier: N.Accessibility;\n  }) => `Accessibility modifier already seen: '${modifier}'.`,\n  DuplicateModifier: ({ modifier }: { modifier: TsModifier }) =>\n    `Duplicate modifier: '${modifier}'.`,\n  // `token` matches the terminology used by typescript:\n  // https://github.com/microsoft/TypeScript/blob/main/src/compiler/types.ts#L2915\n  EmptyHeritageClauseType: ({ token }: { token: \"extends\" | \"implements\" }) =>\n    `'${token}' list cannot be empty.`,\n  EmptyTypeArguments: \"Type argument list cannot be empty.\",\n  EmptyTypeParameters: \"Type parameter list cannot be empty.\",\n  ExpectedAmbientAfterExportDeclare:\n    \"'export declare' must be followed by an ambient declaration.\",\n  ImportAliasHasImportType: \"An import alias can not use 'import type'.\",\n  ImportReflectionHasImportType:\n    \"An `import module` declaration can not use `type` modifier\",\n  IncompatibleModifiers: ({\n    modifiers,\n  }: {\n    modifiers: [TsModifier, TsModifier];\n  }) =>\n    `'${modifiers[0]}' modifier cannot be used with '${modifiers[1]}' modifier.`,\n  IndexSignatureHasAbstract:\n    \"Index signatures cannot have the 'abstract' modifier.\",\n  IndexSignatureHasAccessibility: ({\n    modifier,\n  }: {\n    modifier: N.Accessibility;\n  }) =>\n    `Index signatures cannot have an accessibility modifier ('${modifier}').`,\n  IndexSignatureHasDeclare:\n    \"Index signatures cannot have the 'declare' modifier.\",\n  IndexSignatureHasOverride:\n    \"'override' modifier cannot appear on an index signature.\",\n  IndexSignatureHasStatic:\n    \"Index signatures cannot have the 'static' modifier.\",\n  InitializerNotAllowedInAmbientContext:\n    \"Initializers are not allowed in ambient contexts.\",\n  InvalidHeritageClauseType: ({ token }: { token: \"extends\" | \"implements\" }) =>\n    `'${token}' list can only include identifiers or qualified-names with optional type arguments.`,\n  InvalidModifierOnAwaitUsingDeclaration: (modifier: TsModifier) =>\n    `'${modifier}' modifier cannot appear on an await using declaration.`,\n  InvalidModifierOnTypeMember: ({ modifier }: { modifier: TsModifier }) =>\n    `'${modifier}' modifier cannot appear on a type member.`,\n  InvalidModifierOnTypeParameter: ({ modifier }: { modifier: TsModifier }) =>\n    `'${modifier}' modifier cannot appear on a type parameter.`,\n  InvalidModifierOnTypeParameterPositions: ({\n    modifier,\n  }: {\n    modifier: TsModifier;\n  }) =>\n    `'${modifier}' modifier can only appear on a type parameter of a class, interface or type alias.`,\n\n  InvalidModifierOnUsingDeclaration: (modifier: TsModifier) =>\n    `'${modifier}' modifier cannot appear on a using declaration.`,\n  InvalidModifiersOrder: ({\n    orderedModifiers,\n  }: {\n    orderedModifiers: [TsModifier, TsModifier];\n  }) =>\n    `'${orderedModifiers[0]}' modifier must precede '${orderedModifiers[1]}' modifier.`,\n  InvalidPropertyAccessAfterInstantiationExpression:\n    \"Invalid property access after an instantiation expression. \" +\n    \"You can either wrap the instantiation expression in parentheses, or delete the type arguments.\",\n  InvalidTupleMemberLabel:\n    \"Tuple members must be labeled with a simple identifier.\",\n  MissingInterfaceName:\n    \"'interface' declarations must be followed by an identifier.\",\n  NonAbstractClassHasAbstractMethod:\n    \"Abstract methods can only appear within an abstract class.\",\n  NonClassMethodPropertyHasAbstractModifier:\n    \"'abstract' modifier can only appear on a class, method, or property declaration.\",\n  OptionalTypeBeforeRequired:\n    \"A required element cannot follow an optional element.\",\n  OverrideNotInSubClass:\n    \"This member cannot have an 'override' modifier because its containing class does not extend another class.\",\n  PatternIsOptional:\n    \"A binding pattern parameter cannot be optional in an implementation signature.\",\n  PrivateElementHasAbstract:\n    \"Private elements cannot have the 'abstract' modifier.\",\n  PrivateElementHasAccessibility: ({\n    modifier,\n  }: {\n    modifier: N.Accessibility;\n  }) =>\n    `Private elements cannot have an accessibility modifier ('${modifier}').`,\n  ReadonlyForMethodSignature:\n    \"'readonly' modifier can only appear on a property declaration or index signature.\",\n  ReservedArrowTypeParam:\n    \"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.\",\n  ReservedTypeAssertion:\n    \"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.\",\n  SetAccessorCannotHaveOptionalParameter:\n    \"A 'set' accessor cannot have an optional parameter.\",\n  SetAccessorCannotHaveRestParameter:\n    \"A 'set' accessor cannot have rest parameter.\",\n  SetAccessorCannotHaveReturnType:\n    \"A 'set' accessor cannot have a return type annotation.\",\n  SingleTypeParameterWithoutTrailingComma: ({\n    typeParameterName,\n  }: {\n    typeParameterName: string;\n  }) =>\n    `Single type parameter ${typeParameterName} should have a trailing comma. Example usage: <${typeParameterName},>.`,\n  StaticBlockCannotHaveModifier:\n    \"Static class blocks cannot have any modifier.\",\n  TupleOptionalAfterType:\n    \"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).\",\n  TypeAnnotationAfterAssign:\n    \"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.\",\n  TypeImportCannotSpecifyDefaultAndNamed:\n    \"A type-only import can specify a default import or named bindings, but not both.\",\n  TypeModifierIsUsedInTypeExports:\n    \"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.\",\n  TypeModifierIsUsedInTypeImports:\n    \"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.\",\n  UnexpectedParameterModifier:\n    \"A parameter property is only allowed in a constructor implementation.\",\n  UnexpectedReadonly:\n    \"'readonly' type modifier is only permitted on array and tuple literal types.\",\n  UnexpectedTypeAnnotation: \"Did not expect a type annotation here.\",\n  UnexpectedTypeCastInParameter: \"Unexpected type cast in parameter position.\",\n  UnsupportedImportTypeArgument:\n    \"Argument in a type import must be a string literal.\",\n  UnsupportedParameterPropertyKind:\n    \"A parameter property may not be declared using a binding pattern.\",\n  UnsupportedSignatureParameterKind: ({ type }: { type: string }) =>\n    `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${type}.`,\n  UsingDeclarationInAmbientContext: (kind: \"using\" | \"await using\") =>\n    `'${kind}' declarations are not allowed in ambient contexts.`,\n});\n\n/* eslint-disable sort-keys */\n\n// Doesn't handle \"void\" or \"null\" because those are keywords, not identifiers.\n// It also doesn't handle \"intrinsic\", since usually it's not a keyword.\nfunction keywordTypeFromName(value: string): N.TsKeywordTypeType | undefined {\n  switch (value) {\n    case \"any\":\n      return \"TSAnyKeyword\";\n    case \"boolean\":\n      return \"TSBooleanKeyword\";\n    case \"bigint\":\n      return \"TSBigIntKeyword\";\n    case \"never\":\n      return \"TSNeverKeyword\";\n    case \"number\":\n      return \"TSNumberKeyword\";\n    case \"object\":\n      return \"TSObjectKeyword\";\n    case \"string\":\n      return \"TSStringKeyword\";\n    case \"symbol\":\n      return \"TSSymbolKeyword\";\n    case \"undefined\":\n      return \"TSUndefinedKeyword\";\n    case \"unknown\":\n      return \"TSUnknownKeyword\";\n    default:\n      return undefined;\n  }\n}\n\nfunction tsIsAccessModifier(modifier: string): modifier is N.Accessibility {\n  return (\n    modifier === \"private\" || modifier === \"public\" || modifier === \"protected\"\n  );\n}\n\nfunction tsIsVarianceAnnotations(\n  modifier: string,\n): modifier is N.VarianceAnnotations {\n  return modifier === \"in\" || modifier === \"out\";\n}\n\nfunction tsIsEntityName(\n  node: N.Expression,\n): node is N.MemberExpression | N.Identifier | N.TsInstantiationExpression {\n  if (node.extra?.parenthesized) {\n    return false;\n  }\n  switch (node.type) {\n    case \"Identifier\":\n      return true;\n    case \"MemberExpression\":\n      return !node.computed && tsIsEntityName(node.object);\n    case \"TSInstantiationExpression\":\n      return tsIsEntityName(node.expression);\n    default:\n      return false;\n  }\n}\n\nexport const enum tsParseEntityNameFlags {\n  NONE = 0b00,\n  ALLOW_RESERVED_WORDS = 0b01,\n  LEADING_THIS_AS_IDENTIFIER = 0b10,\n}\n\nexport default (superClass: ClassWithMixin<typeof Parser, IJSXParserMixin>) =>\n  class TypeScriptParserMixin extends superClass implements Parser {\n    getScopeHandler(): new (...args: any) => TypeScriptScopeHandler {\n      return TypeScriptScopeHandler;\n    }\n\n    tsIsIdentifier(): boolean {\n      // TODO: actually a bit more complex in TypeScript, but shouldn't matter.\n      // See https://github.com/Microsoft/TypeScript/issues/15008\n      return tokenIsIdentifier(this.state.type);\n    }\n\n    tsTokenCanFollowModifier() {\n      return (\n        this.match(tt.bracketL) ||\n        this.match(tt.braceL) ||\n        this.match(tt.star) ||\n        this.match(tt.ellipsis) ||\n        this.match(tt.privateName) ||\n        this.isLiteralPropertyName()\n      );\n    }\n\n    tsNextTokenOnSameLineAndCanFollowModifier() {\n      this.next();\n      if (this.hasPrecedingLineBreak()) {\n        return false;\n      }\n      return this.tsTokenCanFollowModifier();\n    }\n\n    tsNextTokenCanFollowModifier() {\n      // Note: TypeScript's implementation is much more complicated because\n      // more things are considered modifiers there.\n      // This implementation only handles modifiers not handled by @babel/parser itself. And \"static\".\n      if (this.match(tt._static)) {\n        this.next();\n        return this.tsTokenCanFollowModifier();\n      }\n      return this.tsNextTokenOnSameLineAndCanFollowModifier();\n    }\n\n    /** Parses a modifier matching one the given modifier names. */\n    tsParseModifier<T extends TsModifier>(\n      allowedModifiers: T[],\n      stopOnStartOfClassStaticBlock?: boolean,\n      hasSeenStaticModifier?: boolean,\n    ): T | undefined | null {\n      if (\n        !tokenIsIdentifier(this.state.type) &&\n        this.state.type !== tt._in &&\n        this.state.type !== tt._const\n      ) {\n        return undefined;\n      }\n\n      const modifier = this.state.value;\n      if (allowedModifiers.includes(modifier)) {\n        if (hasSeenStaticModifier && this.match(tt._static)) {\n          return undefined;\n        }\n        if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) {\n          return undefined;\n        }\n        if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {\n          return modifier;\n        }\n      }\n      return undefined;\n    }\n\n    /** Parses a list of modifiers, in any order.\n     *  If you need a specific order, you must call this function multiple times:\n     *    this.tsParseModifiers({ modified: node, allowedModifiers: [\"public\"] });\n     *    this.tsParseModifiers({ modified: node, allowedModifiers: [\"abstract\", \"readonly\"] });\n     */\n    tsParseModifiers<N extends ModifierBase>(\n      {\n        allowedModifiers,\n        disallowedModifiers,\n        stopOnStartOfClassStaticBlock,\n        errorTemplate = TSErrors.InvalidModifierOnTypeMember,\n      }: {\n        allowedModifiers: readonly TsModifier[];\n        disallowedModifiers?: TsModifier[];\n        stopOnStartOfClassStaticBlock?: boolean;\n        errorTemplate?: typeof TSErrors.InvalidModifierOnTypeMember;\n      },\n      modified: N,\n    ): void {\n      const enforceOrder = (\n        loc: Position,\n        modifier: TsModifier,\n        before: TsModifier,\n        after: TsModifier,\n      ) => {\n        if (modifier === before && modified[after]) {\n          this.raise(TSErrors.InvalidModifiersOrder, loc, {\n            orderedModifiers: [before, after],\n          });\n        }\n      };\n      const incompatible = (\n        loc: Position,\n        modifier: TsModifier,\n        mod1: TsModifier,\n        mod2: TsModifier,\n      ) => {\n        if (\n          (modified[mod1] && modifier === mod2) ||\n          (modified[mod2] && modifier === mod1)\n        ) {\n          this.raise(TSErrors.IncompatibleModifiers, loc, {\n            modifiers: [mod1, mod2],\n          });\n        }\n      };\n\n      for (;;) {\n        const { startLoc } = this.state;\n        const modifier: TsModifier | undefined | null = this.tsParseModifier(\n          allowedModifiers.concat(disallowedModifiers ?? []),\n          stopOnStartOfClassStaticBlock,\n          modified.static,\n        );\n\n        if (!modifier) break;\n\n        if (tsIsAccessModifier(modifier)) {\n          if (modified.accessibility) {\n            this.raise(TSErrors.DuplicateAccessibilityModifier, startLoc, {\n              modifier,\n            });\n          } else {\n            enforceOrder(startLoc, modifier, modifier, \"override\");\n            enforceOrder(startLoc, modifier, modifier, \"static\");\n            enforceOrder(startLoc, modifier, modifier, \"readonly\");\n\n            modified.accessibility = modifier;\n          }\n        } else if (tsIsVarianceAnnotations(modifier)) {\n          if (modified[modifier]) {\n            this.raise(TSErrors.DuplicateModifier, startLoc, { modifier });\n          }\n          modified[modifier] = true;\n\n          enforceOrder(startLoc, modifier, \"in\", \"out\");\n        } else {\n          if (Object.hasOwn(modified, modifier)) {\n            this.raise(TSErrors.DuplicateModifier, startLoc, { modifier });\n          } else {\n            enforceOrder(startLoc, modifier, \"static\", \"readonly\");\n            enforceOrder(startLoc, modifier, \"static\", \"override\");\n            enforceOrder(startLoc, modifier, \"override\", \"readonly\");\n            enforceOrder(startLoc, modifier, \"abstract\", \"override\");\n\n            incompatible(startLoc, modifier, \"declare\", \"override\");\n            incompatible(startLoc, modifier, \"static\", \"abstract\");\n          }\n          modified[modifier] = true;\n        }\n\n        if (disallowedModifiers?.includes(modifier)) {\n          this.raise(errorTemplate, startLoc, {\n            modifier,\n          });\n        }\n      }\n    }\n\n    tsIsListTerminator(kind: ParsingContext): boolean {\n      switch (kind) {\n        case \"EnumMembers\":\n        case \"TypeMembers\":\n          return this.match(tt.braceR);\n        case \"HeritageClauseElement\":\n          return this.match(tt.braceL);\n        case \"TupleElementTypes\":\n          return this.match(tt.bracketR);\n        case \"TypeParametersOrArguments\":\n          return this.match(tt.gt);\n      }\n    }\n\n    tsParseList<T extends N.Node>(\n      kind: ParsingContext,\n      parseElement: () => T,\n    ): T[] {\n      const result: T[] = [];\n      while (!this.tsIsListTerminator(kind)) {\n        // Skipping \"parseListElement\" from the TS source since that's just for error handling.\n        result.push(parseElement());\n      }\n      return result;\n    }\n\n    tsParseDelimitedList<T extends N.Node>(\n      kind: ParsingContext,\n      parseElement: () => T,\n      refTrailingCommaPos?: {\n        value: number;\n      },\n    ): T[] {\n      return nonNull(\n        this.tsParseDelimitedListWorker(\n          kind,\n          parseElement,\n          /* expectSuccess */ true,\n          refTrailingCommaPos,\n        ),\n      );\n    }\n\n    /**\n     * If !expectSuccess, returns undefined instead of failing to parse.\n     * If expectSuccess, parseElement should always return a defined value.\n     */\n    tsParseDelimitedListWorker<T extends N.Node>(\n      kind: ParsingContext,\n      parseElement: () => T | undefined,\n      expectSuccess: boolean,\n      refTrailingCommaPos?: {\n        value: number;\n      },\n    ): T[] | undefined {\n      const result: T[] = [];\n      let trailingCommaPos = -1;\n\n      for (;;) {\n        if (this.tsIsListTerminator(kind)) {\n          break;\n        }\n        trailingCommaPos = -1;\n\n        const element = parseElement();\n        if (element == null) {\n          return undefined;\n        }\n        result.push(element);\n\n        if (this.eat(tt.comma)) {\n          trailingCommaPos = this.state.lastTokStartLoc.index;\n          continue;\n        }\n\n        if (this.tsIsListTerminator(kind)) {\n          break;\n        }\n\n        if (expectSuccess) {\n          // This will fail with an error about a missing comma\n          this.expect(tt.comma);\n        }\n        return undefined;\n      }\n\n      if (refTrailingCommaPos) {\n        refTrailingCommaPos.value = trailingCommaPos;\n      }\n\n      return result;\n    }\n\n    tsParseBracketedList<T extends N.Node>(\n      kind: ParsingContext,\n      parseElement: () => T,\n      bracket: boolean,\n      skipFirstToken: boolean,\n      refTrailingCommaPos?: {\n        value: number;\n      },\n    ): T[] {\n      if (!skipFirstToken) {\n        if (bracket) {\n          this.expect(tt.bracketL);\n        } else {\n          this.expect(tt.lt);\n        }\n      }\n\n      const result = this.tsParseDelimitedList(\n        kind,\n        parseElement,\n        refTrailingCommaPos,\n      );\n\n      if (bracket) {\n        this.expect(tt.bracketR);\n      } else {\n        this.expect(tt.gt);\n      }\n\n      return result;\n    }\n\n    tsParseImportType(): N.TsImportType {\n      const node = this.startNode<N.TsImportType>();\n      this.expect(tt._import);\n      this.expect(tt.parenL);\n      if (!this.match(tt.string)) {\n        this.raise(TSErrors.UnsupportedImportTypeArgument, this.state.startLoc);\n        if (process.env.BABEL_8_BREAKING) {\n          // Consume as an non-conditional type so that we can recover from this error\n          node.argument = this.tsParseNonConditionalType() as any;\n        } else {\n          node.argument = super.parseExprAtom() as any;\n        }\n      } else {\n        if (process.env.BABEL_8_BREAKING) {\n          node.argument = this.tsParseLiteralTypeNode();\n        } else {\n          // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n          node.argument = this.parseStringLiteral(this.state.value);\n        }\n      }\n      if (this.eat(tt.comma)) {\n        node.options = this.tsParseImportTypeOptions();\n      } else {\n        node.options = null;\n      }\n      this.expect(tt.parenR);\n\n      if (this.eat(tt.dot)) {\n        // In this instance, the entity name will actually itself be a\n        // qualifier, so allow it to be a reserved word as well.\n        node.qualifier = this.tsParseEntityName(\n          tsParseEntityNameFlags.ALLOW_RESERVED_WORDS |\n            tsParseEntityNameFlags.LEADING_THIS_AS_IDENTIFIER,\n        );\n      }\n      if (this.match(tt.lt)) {\n        if (process.env.BABEL_8_BREAKING) {\n          node.typeArguments = this.tsParseTypeArguments();\n        } else {\n          node.typeParameters = this.tsParseTypeArguments();\n        }\n      }\n      return this.finishNode(node, \"TSImportType\");\n    }\n\n    tsParseImportTypeOptions(): N.ObjectExpression {\n      const node = this.startNode<N.ObjectExpression>();\n      this.expect(tt.braceL);\n      const withProperty = this.startNode<N.ObjectProperty>();\n      if (this.isContextual(tt._with)) {\n        withProperty.method = false;\n        withProperty.key = this.parseIdentifier(true);\n        withProperty.computed = false;\n        withProperty.shorthand = false;\n      } else {\n        this.unexpected(null, tt._with);\n      }\n      this.expect(tt.colon);\n      withProperty.value = this.tsParseImportTypeWithPropertyValue();\n      node.properties = [this.finishObjectProperty(withProperty)];\n      this.eat(tt.comma);\n      this.expect(tt.braceR);\n      return this.finishNode(node, \"ObjectExpression\");\n    }\n\n    tsParseImportTypeWithPropertyValue(): N.ObjectExpression {\n      const node = this.startNode<N.ObjectExpression>();\n      const properties = [];\n      this.expect(tt.braceL);\n      while (!this.match(tt.braceR)) {\n        const type = this.state.type;\n        if (tokenIsIdentifier(type) || type === tt.string) {\n          properties.push(super.parsePropertyDefinition(null));\n        } else {\n          this.unexpected();\n        }\n        this.eat(tt.comma);\n      }\n      node.properties = properties;\n      this.next(); // eat }\n      return this.finishNode(node, \"ObjectExpression\");\n    }\n\n    tsParseEntityName(flags: tsParseEntityNameFlags): N.TsEntityName {\n      let entity: N.TsEntityName;\n      if (\n        flags & tsParseEntityNameFlags.ALLOW_RESERVED_WORDS &&\n        this.match(tt._this)\n      ) {\n        if (flags & tsParseEntityNameFlags.LEADING_THIS_AS_IDENTIFIER) {\n          entity = this.parseIdentifier(true);\n        } else {\n          const node = this.startNode<N.ThisExpression>();\n          this.next();\n          entity = this.finishNode(node, \"ThisExpression\");\n        }\n      } else {\n        entity = this.parseIdentifier(\n          !!(flags & tsParseEntityNameFlags.ALLOW_RESERVED_WORDS),\n        );\n      }\n      while (this.eat(tt.dot)) {\n        const node: Undone<N.TsQualifiedName> =\n          this.startNodeAtNode<N.TsQualifiedName>(entity);\n        node.left = entity;\n        node.right = this.parseIdentifier(\n          !!(flags & tsParseEntityNameFlags.ALLOW_RESERVED_WORDS),\n        );\n        entity = this.finishNode(node, \"TSQualifiedName\");\n      }\n      return entity;\n    }\n\n    tsParseTypeReference(): N.TsTypeReference {\n      const node = this.startNode<N.TsTypeReference>();\n      node.typeName = this.tsParseEntityName(\n        tsParseEntityNameFlags.ALLOW_RESERVED_WORDS,\n      );\n      if (!this.hasPrecedingLineBreak() && this.match(tt.lt)) {\n        if (process.env.BABEL_8_BREAKING) {\n          node.typeArguments = this.tsParseTypeArguments();\n        } else {\n          node.typeParameters = this.tsParseTypeArguments();\n        }\n      }\n      return this.finishNode(node, \"TSTypeReference\");\n    }\n\n    tsParseThisTypePredicate(lhs: N.TsThisType): N.TsTypePredicate {\n      this.next();\n      const node = this.startNodeAtNode<N.TsTypePredicate>(lhs);\n      node.parameterName = lhs;\n      node.typeAnnotation = this.tsParseTypeAnnotation(/* eatColon */ false);\n      node.asserts = false;\n      return this.finishNode(node, \"TSTypePredicate\");\n    }\n\n    tsParseThisTypeNode(): N.TsThisType {\n      const node = this.startNode<N.TsThisType>();\n      this.next();\n      return this.finishNode(node, \"TSThisType\");\n    }\n\n    tsParseTypeQuery(): N.TsTypeQuery {\n      const node = this.startNode<N.TsTypeQuery>();\n      this.expect(tt._typeof);\n      if (this.match(tt._import)) {\n        node.exprName = this.tsParseImportType();\n      } else {\n        if (process.env.BABEL_8_BREAKING) {\n          node.exprName = this.tsParseEntityName(\n            tsParseEntityNameFlags.ALLOW_RESERVED_WORDS,\n          );\n        } else {\n          node.exprName = this.tsParseEntityName(\n            tsParseEntityNameFlags.ALLOW_RESERVED_WORDS |\n              tsParseEntityNameFlags.LEADING_THIS_AS_IDENTIFIER,\n          );\n        }\n      }\n      if (!this.hasPrecedingLineBreak() && this.match(tt.lt)) {\n        if (process.env.BABEL_8_BREAKING) {\n          node.typeArguments = this.tsParseTypeArguments();\n        } else {\n          node.typeParameters = this.tsParseTypeArguments();\n        }\n      }\n      return this.finishNode(node, \"TSTypeQuery\");\n    }\n\n    tsParseInOutModifiers = this.tsParseModifiers.bind(this, {\n      allowedModifiers: [\"in\", \"out\"],\n      disallowedModifiers: [\n        \"const\",\n        \"public\",\n        \"private\",\n        \"protected\",\n        \"readonly\",\n        \"declare\",\n        \"abstract\",\n        \"override\",\n      ],\n      errorTemplate: TSErrors.InvalidModifierOnTypeParameter,\n    });\n\n    tsParseConstModifier = this.tsParseModifiers.bind(this, {\n      allowedModifiers: [\"const\"],\n      // for better error recovery\n      disallowedModifiers: [\"in\", \"out\"],\n      errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions,\n    });\n\n    tsParseInOutConstModifiers = this.tsParseModifiers.bind(this, {\n      allowedModifiers: [\"in\", \"out\", \"const\"],\n      disallowedModifiers: [\n        \"public\",\n        \"private\",\n        \"protected\",\n        \"readonly\",\n        \"declare\",\n        \"abstract\",\n        \"override\",\n      ],\n      errorTemplate: TSErrors.InvalidModifierOnTypeParameter,\n    });\n\n    tsParseTypeParameter(\n      parseModifiers: (node: Undone<N.TsTypeParameter>) => void,\n    ): N.TsTypeParameter {\n      const node = this.startNode<N.TsTypeParameter>();\n\n      parseModifiers(node);\n\n      node.name = this.tsParseTypeParameterName();\n      node.constraint = this.tsEatThenParseType(tt._extends);\n      node.default = this.tsEatThenParseType(tt.eq);\n      return this.finishNode(node, \"TSTypeParameter\");\n    }\n\n    tsTryParseTypeParameters(\n      parseModifiers: (node: N.TsTypeParameter) => void,\n    ): N.TsTypeParameterDeclaration | undefined | null {\n      if (this.match(tt.lt)) {\n        return this.tsParseTypeParameters(parseModifiers);\n      }\n    }\n\n    tsParseTypeParameters(parseModifiers: (node: N.TsTypeParameter) => void) {\n      const node = this.startNode<N.TsTypeParameterDeclaration>();\n\n      if (this.match(tt.lt) || this.match(tt.jsxTagStart)) {\n        this.next();\n      } else {\n        this.unexpected();\n      }\n\n      const refTrailingCommaPos = { value: -1 };\n\n      node.params = this.tsParseBracketedList(\n        \"TypeParametersOrArguments\",\n        this.tsParseTypeParameter.bind(this, parseModifiers),\n        /* bracket */ false,\n        /* skipFirstToken */ true,\n        refTrailingCommaPos,\n      );\n      if (node.params.length === 0) {\n        this.raise(TSErrors.EmptyTypeParameters, node);\n      }\n      if (refTrailingCommaPos.value !== -1) {\n        this.addExtra(node, \"trailingComma\", refTrailingCommaPos.value);\n      }\n      return this.finishNode(node, \"TSTypeParameterDeclaration\");\n    }\n\n    // Note: In TypeScript implementation we must provide `yieldContext` and `awaitContext`,\n    // but here it's always false, because this is only used for types.\n    tsFillSignature(\n      returnToken: TokenType,\n      signature: Undone<N.TsSignatureDeclaration>,\n    ): void {\n      // Arrow fns *must* have return token (`=>`). Normal functions can omit it.\n      const returnTokenRequired = returnToken === tt.arrow;\n\n      // https://github.com/babel/babel/issues/9231\n      const paramsKey = process.env.BABEL_8_BREAKING ? \"params\" : \"parameters\";\n      const returnTypeKey = process.env.BABEL_8_BREAKING\n        ? \"returnType\"\n        : \"typeAnnotation\";\n\n      signature.typeParameters = this.tsTryParseTypeParameters(\n        this.tsParseConstModifier,\n      );\n      this.expect(tt.parenL);\n      signature[paramsKey] = this.tsParseBindingListForSignature();\n      if (returnTokenRequired) {\n        signature[returnTypeKey] =\n          this.tsParseTypeOrTypePredicateAnnotation(returnToken);\n      } else if (this.match(returnToken)) {\n        signature[returnTypeKey] =\n          this.tsParseTypeOrTypePredicateAnnotation(returnToken);\n      }\n    }\n\n    tsParseBindingListForSignature(): Array<\n      | N.Identifier\n      | N.RestElement\n      | N.ObjectPattern\n      | N.ArrayPattern\n      | N.VoidPattern\n    > {\n      const list = super.parseBindingList(\n        tt.parenR,\n        charCodes.rightParenthesis,\n        ParseBindingListFlags.IS_FUNCTION_PARAMS,\n      );\n      for (const pattern of list) {\n        const { type } = pattern;\n        if (type === \"AssignmentPattern\" || type === \"TSParameterProperty\") {\n          this.raise(TSErrors.UnsupportedSignatureParameterKind, pattern, {\n            type,\n          });\n        }\n      }\n      return list as Exclude<\n        (typeof list)[0],\n        N.AssignmentPattern | N.TSParameterProperty\n      >[];\n    }\n\n    tsParseTypeMemberSemicolon(): void {\n      if (!this.eat(tt.comma) && !this.isLineTerminator()) {\n        this.expect(tt.semi);\n      }\n    }\n\n    tsParseSignatureMember(\n      kind: \"TSCallSignatureDeclaration\" | \"TSConstructSignatureDeclaration\",\n      node: Undone<\n        N.TsCallSignatureDeclaration | N.TsConstructSignatureDeclaration\n      >,\n    ): N.TsCallSignatureDeclaration | N.TsConstructSignatureDeclaration {\n      this.tsFillSignature(tt.colon, node);\n      this.tsParseTypeMemberSemicolon();\n      return this.finishNode(node, kind);\n    }\n\n    tsIsUnambiguouslyIndexSignature() {\n      this.next(); // Skip '{'\n      if (tokenIsIdentifier(this.state.type)) {\n        this.next();\n        return this.match(tt.colon);\n      }\n      return false;\n    }\n\n    tsTryParseIndexSignature(\n      node: Undone<N.TsIndexSignature>,\n    ): N.TsIndexSignature | undefined {\n      if (\n        !(\n          this.match(tt.bracketL) &&\n          this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))\n        )\n      ) {\n        return;\n      }\n\n      this.expect(tt.bracketL);\n      const id = this.parseIdentifier();\n      id.typeAnnotation = this.tsParseTypeAnnotation();\n      this.resetEndLocation(id); // set end position to end of type\n\n      this.expect(tt.bracketR);\n      node.parameters = [id];\n\n      const type = this.tsTryParseTypeAnnotation();\n      if (type) node.typeAnnotation = type;\n      this.tsParseTypeMemberSemicolon();\n      return this.finishNode(node, \"TSIndexSignature\");\n    }\n\n    tsParsePropertyOrMethodSignature(\n      node: Undone<N.TsPropertySignature | N.TsMethodSignature>,\n      readonly: boolean,\n    ): N.TsPropertySignature | N.TsMethodSignature {\n      if (this.eat(tt.question)) node.optional = true;\n\n      if (this.match(tt.parenL) || this.match(tt.lt)) {\n        if (readonly) {\n          this.raise(TSErrors.ReadonlyForMethodSignature, node);\n        }\n        const method = node as Undone<N.TsMethodSignature>;\n        if (method.kind && this.match(tt.lt)) {\n          this.raise(\n            TSErrors.AccessorCannotHaveTypeParameters,\n            this.state.curPosition(),\n          );\n        }\n        this.tsFillSignature(tt.colon, method);\n        this.tsParseTypeMemberSemicolon();\n        const paramsKey = process.env.BABEL_8_BREAKING\n          ? \"params\"\n          : \"parameters\";\n        const returnTypeKey = process.env.BABEL_8_BREAKING\n          ? \"returnType\"\n          : \"typeAnnotation\";\n        if (method.kind === \"get\") {\n          if (method[paramsKey].length > 0) {\n            this.raise(Errors.BadGetterArity, this.state.curPosition());\n            if (this.isThisParam(method[paramsKey][0])) {\n              this.raise(\n                TSErrors.AccessorCannotDeclareThisParameter,\n                this.state.curPosition(),\n              );\n            }\n          }\n        } else if (method.kind === \"set\") {\n          if (method[paramsKey].length !== 1) {\n            this.raise(Errors.BadSetterArity, this.state.curPosition());\n          } else {\n            const firstParameter = method[paramsKey][0];\n            if (this.isThisParam(firstParameter)) {\n              this.raise(\n                TSErrors.AccessorCannotDeclareThisParameter,\n                this.state.curPosition(),\n              );\n            }\n            if (\n              firstParameter.type === \"Identifier\" &&\n              firstParameter.optional\n            ) {\n              this.raise(\n                TSErrors.SetAccessorCannotHaveOptionalParameter,\n                this.state.curPosition(),\n              );\n            }\n            if (firstParameter.type === \"RestElement\") {\n              this.raise(\n                TSErrors.SetAccessorCannotHaveRestParameter,\n                this.state.curPosition(),\n              );\n            }\n          }\n          if (method[returnTypeKey]) {\n            this.raise(\n              TSErrors.SetAccessorCannotHaveReturnType,\n              method[returnTypeKey],\n            );\n          }\n        } else {\n          method.kind = \"method\";\n        }\n        return this.finishNode(method, \"TSMethodSignature\");\n      } else {\n        const property = node as Undone<N.TsPropertySignature>;\n        if (readonly) property.readonly = true;\n        const type = this.tsTryParseTypeAnnotation();\n        if (type) property.typeAnnotation = type;\n        this.tsParseTypeMemberSemicolon();\n        return this.finishNode(property, \"TSPropertySignature\");\n      }\n    }\n\n    tsParseTypeMember(): N.TsTypeElement {\n      const node: any = this.startNode();\n\n      if (this.match(tt.parenL) || this.match(tt.lt)) {\n        return this.tsParseSignatureMember(\"TSCallSignatureDeclaration\", node);\n      }\n\n      if (this.match(tt._new)) {\n        const id = this.startNode<N.Identifier>();\n        this.next();\n        if (this.match(tt.parenL) || this.match(tt.lt)) {\n          return this.tsParseSignatureMember(\n            \"TSConstructSignatureDeclaration\",\n            node,\n          );\n        } else {\n          node.key = this.createIdentifier(id, \"new\");\n          return this.tsParsePropertyOrMethodSignature(node, false);\n        }\n      }\n\n      this.tsParseModifiers(\n        {\n          allowedModifiers: [\"readonly\"],\n          disallowedModifiers: [\n            \"declare\",\n            \"abstract\",\n            \"private\",\n            \"protected\",\n            \"public\",\n            \"static\",\n            \"override\",\n          ],\n        },\n        node,\n      );\n\n      const idx = this.tsTryParseIndexSignature(node);\n      if (idx) {\n        return idx;\n      }\n\n      super.parsePropertyName(node);\n      if (\n        !node.computed &&\n        node.key.type === \"Identifier\" &&\n        (node.key.name === \"get\" || node.key.name === \"set\") &&\n        this.tsTokenCanFollowModifier()\n      ) {\n        node.kind = node.key.name;\n        super.parsePropertyName(node);\n        // Allow < here so that we can recover from get key<T> later\n        if (!this.match(tt.parenL) && !this.match(tt.lt)) {\n          this.unexpected(null, tt.parenL);\n        }\n      }\n      return this.tsParsePropertyOrMethodSignature(node, !!node.readonly);\n    }\n\n    tsParseTypeLiteral(): N.TsTypeLiteral {\n      const node = this.startNode<N.TsTypeLiteral>();\n      node.members = this.tsParseObjectTypeMembers();\n      return this.finishNode(node, \"TSTypeLiteral\");\n    }\n\n    tsParseObjectTypeMembers(): Array<N.TsTypeElement> {\n      this.expect(tt.braceL);\n      const members = this.tsParseList(\n        \"TypeMembers\",\n        this.tsParseTypeMember.bind(this),\n      );\n      this.expect(tt.braceR);\n      return members;\n    }\n\n    tsIsStartOfMappedType(): boolean {\n      this.next();\n      if (this.eat(tt.plusMin)) {\n        return this.isContextual(tt._readonly);\n      }\n      if (this.isContextual(tt._readonly)) {\n        this.next();\n      }\n      if (!this.match(tt.bracketL)) {\n        return false;\n      }\n      this.next();\n      if (!this.tsIsIdentifier()) {\n        return false;\n      }\n      this.next();\n      return this.match(tt._in);\n    }\n\n    tsParseMappedType(): N.TsMappedType {\n      const node = this.startNode<N.TsMappedType>();\n\n      this.expect(tt.braceL);\n\n      if (this.match(tt.plusMin)) {\n        node.readonly = this.state.value;\n        this.next();\n        this.expectContextual(tt._readonly);\n      } else if (this.eatContextual(tt._readonly)) {\n        node.readonly = true;\n      }\n\n      this.expect(tt.bracketL);\n      if (process.env.BABEL_8_BREAKING) {\n        node.key = this.tsParseTypeParameterName() as N.Identifier;\n        node.constraint = this.tsExpectThenParseType(tt._in);\n      } else {\n        const typeParameter = this.startNode<N.TsTypeParameter>();\n        typeParameter.name = this.tsParseTypeParameterName();\n        typeParameter.constraint = this.tsExpectThenParseType(tt._in);\n        // @ts-expect-error for Babel 7\n        node.typeParameter = this.finishNode(typeParameter, \"TSTypeParameter\");\n      }\n      node.nameType = this.eatContextual(tt._as) ? this.tsParseType() : null;\n\n      this.expect(tt.bracketR);\n\n      if (this.match(tt.plusMin)) {\n        node.optional = this.state.value;\n        this.next();\n        this.expect(tt.question);\n      } else if (this.eat(tt.question)) {\n        node.optional = true;\n      }\n\n      node.typeAnnotation = this.tsTryParseType();\n      this.semicolon();\n      this.expect(tt.braceR);\n\n      return this.finishNode(node, \"TSMappedType\");\n    }\n\n    tsParseTupleType(): N.TsTupleType {\n      const node = this.startNode<N.TsTupleType>();\n      node.elementTypes = this.tsParseBracketedList(\n        \"TupleElementTypes\",\n        this.tsParseTupleElementType.bind(this),\n        /* bracket */ true,\n        /* skipFirstToken */ false,\n      );\n\n      // Validate the elementTypes to ensure that no mandatory elements\n      // follow optional elements\n      let seenOptionalElement = false;\n      node.elementTypes.forEach(elementNode => {\n        const { type } = elementNode;\n\n        if (\n          seenOptionalElement &&\n          type !== \"TSRestType\" &&\n          type !== \"TSOptionalType\" &&\n          !(type === \"TSNamedTupleMember\" && elementNode.optional)\n        ) {\n          this.raise(TSErrors.OptionalTypeBeforeRequired, elementNode);\n        }\n\n        seenOptionalElement ||=\n          (type === \"TSNamedTupleMember\" && elementNode.optional) ||\n          type === \"TSOptionalType\";\n      });\n\n      return this.finishNode(node, \"TSTupleType\");\n    }\n\n    tsParseTupleElementType(): N.TsNamedTupleMember | N.TsType {\n      // parses `...TsType[]`\n\n      const restStartLoc = this.state.startLoc;\n\n      const rest = this.eat(tt.ellipsis);\n      const { startLoc } = this.state;\n\n      let labeled: boolean;\n      let label: N.Identifier;\n      let optional: boolean;\n      let type: N.TsNamedTupleMember | N.TsType;\n\n      const isWord = tokenIsKeywordOrIdentifier(this.state.type);\n      const chAfterWord = isWord ? this.lookaheadCharCode() : null;\n      if (chAfterWord === charCodes.colon) {\n        labeled = true;\n        optional = false;\n        label = this.parseIdentifier(true);\n        this.expect(tt.colon);\n        type = this.tsParseType();\n      } else if (chAfterWord === charCodes.questionMark) {\n        optional = true;\n        const wordName = this.state.value;\n        const typeOrLabel = this.tsParseNonArrayType();\n\n        if (this.lookaheadCharCode() === charCodes.colon) {\n          labeled = true;\n          label = this.createIdentifier(\n            this.startNodeAt<N.Identifier>(startLoc),\n            wordName,\n          );\n          this.expect(tt.question);\n          this.expect(tt.colon);\n          type = this.tsParseType();\n        } else {\n          labeled = false;\n          type = typeOrLabel;\n          this.expect(tt.question);\n        }\n      } else {\n        type = this.tsParseType();\n        optional = this.eat(tt.question);\n        // In this case (labeled === true) could be only in invalid label.\n        // E.g. [x.y:type]\n        // An error is raised while processing node.\n        labeled = this.eat(tt.colon);\n      }\n\n      if (labeled) {\n        let labeledNode: Undone<N.TsNamedTupleMember>;\n        if (label) {\n          labeledNode = this.startNodeAt<N.TsNamedTupleMember>(startLoc);\n          labeledNode.optional = optional;\n          labeledNode.label = label;\n          labeledNode.elementType = type;\n\n          if (this.eat(tt.question)) {\n            labeledNode.optional = true;\n            this.raise(\n              TSErrors.TupleOptionalAfterType,\n              this.state.lastTokStartLoc,\n            );\n          }\n        } else {\n          labeledNode = this.startNodeAt<N.TsNamedTupleMember>(startLoc);\n          labeledNode.optional = optional;\n          this.raise(TSErrors.InvalidTupleMemberLabel, type);\n          // @ts-expect-error This produces an invalid AST, but at least we don't drop\n          // nodes representing the invalid source.\n          labeledNode.label = type;\n          labeledNode.elementType = this.tsParseType();\n        }\n        type = this.finishNode(labeledNode, \"TSNamedTupleMember\");\n      } else if (optional) {\n        const optionalTypeNode = this.startNodeAt<N.TsOptionalType>(startLoc);\n        optionalTypeNode.typeAnnotation = type;\n        type = this.finishNode(optionalTypeNode, \"TSOptionalType\");\n      }\n\n      if (rest) {\n        const restNode = this.startNodeAt<N.TsRestType>(restStartLoc);\n        restNode.typeAnnotation = type;\n        type = this.finishNode(restNode, \"TSRestType\");\n      }\n\n      return type;\n    }\n\n    tsParseParenthesizedType(): N.TsParenthesizedType {\n      const node = this.startNode<N.TsParenthesizedType>();\n      this.expect(tt.parenL);\n      node.typeAnnotation = this.tsParseType();\n      this.expect(tt.parenR);\n      return this.finishNode(node, \"TSParenthesizedType\");\n    }\n\n    tsParseFunctionOrConstructorType(\n      type: \"TSFunctionType\" | \"TSConstructorType\",\n      abstract?: boolean,\n    ): N.TsFunctionOrConstructorType {\n      const node = this.startNode<\n        N.TsFunctionOrConstructorType | N.TsConstructorType\n      >();\n      if (type === \"TSConstructorType\") {\n        (node as Undone<N.TsConstructorType>).abstract = !!abstract;\n        if (abstract) this.next();\n        this.next(); // eat `new`\n      }\n      this.tsInAllowConditionalTypesContext(() =>\n        this.tsFillSignature(tt.arrow, node),\n      );\n      return this.finishNode(node, type);\n    }\n\n    tsParseLiteralTypeNode(): N.TsLiteralType {\n      const node = this.startNode<N.TsLiteralType>();\n      switch (this.state.type) {\n        case tt.num:\n        case tt.bigint:\n        case tt.string:\n        case tt._true:\n        case tt._false:\n          // For compatibility to estree we cannot call parseLiteral directly here\n          // @ts-expect-error refine typings\n          node.literal = super.parseExprAtom();\n          break;\n        default:\n          this.unexpected();\n      }\n      return this.finishNode(node, \"TSLiteralType\");\n    }\n\n    tsParseTemplateLiteralType(): N.TsTemplateLiteralType | N.TsLiteralType {\n      if (process.env.BABEL_8_BREAKING) {\n        const startLoc = this.state.startLoc;\n        let curElt = this.parseTemplateElement(false);\n        const quasis = [curElt];\n        if (curElt.tail) {\n          const node = this.startNodeAt<N.TsLiteralType>(startLoc);\n          const literal = this.startNodeAt<N.TemplateLiteral>(startLoc);\n          literal.expressions = [];\n          literal.quasis = quasis;\n          node.literal = this.finishNode(literal, \"TemplateLiteral\");\n          return this.finishNode(node, \"TSLiteralType\");\n        } else {\n          const substitutions: N.TsType[] = [];\n          while (!curElt.tail) {\n            substitutions.push(this.tsParseType());\n            this.readTemplateContinuation();\n            quasis.push((curElt = this.parseTemplateElement(false)));\n          }\n          const node = this.startNodeAt<N.TsTemplateLiteralType>(startLoc);\n          node.types = substitutions;\n          node.quasis = quasis;\n          return this.finishNode(node, \"TSTemplateLiteralType\");\n        }\n      } else {\n        const node = this.startNode<N.TsLiteralType>();\n        node.literal = super.parseTemplate(false);\n        return this.finishNode(node, \"TSLiteralType\");\n      }\n    }\n\n    parseTemplateSubstitution(): N.TsType | N.Expression {\n      if (this.state.inType) return this.tsParseType();\n      return super.parseTemplateSubstitution();\n    }\n\n    tsParseThisTypeOrThisTypePredicate(): N.TsThisType | N.TsTypePredicate {\n      const thisKeyword = this.tsParseThisTypeNode();\n      if (this.isContextual(tt._is) && !this.hasPrecedingLineBreak()) {\n        return this.tsParseThisTypePredicate(thisKeyword);\n      } else {\n        return thisKeyword;\n      }\n    }\n\n    tsParseNonArrayType(): N.TsType {\n      switch (this.state.type) {\n        case tt.string:\n        case tt.num:\n        case tt.bigint:\n        case tt._true:\n        case tt._false:\n          return this.tsParseLiteralTypeNode();\n        case tt.plusMin:\n          if (this.state.value === \"-\") {\n            const node = this.startNode<N.TsLiteralType>();\n            const nextToken = this.lookahead();\n            if (nextToken.type !== tt.num && nextToken.type !== tt.bigint) {\n              this.unexpected();\n            }\n            node.literal = this.parseMaybeUnary() as N.UnaryExpression;\n            return this.finishNode(node, \"TSLiteralType\");\n          }\n          break;\n        case tt._this:\n          return this.tsParseThisTypeOrThisTypePredicate();\n        case tt._typeof:\n          return this.tsParseTypeQuery();\n        case tt._import:\n          return this.tsParseImportType();\n        case tt.braceL:\n          return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))\n            ? this.tsParseMappedType()\n            : this.tsParseTypeLiteral();\n        case tt.bracketL:\n          return this.tsParseTupleType();\n        case tt.parenL:\n          if (process.env.BABEL_8_BREAKING) {\n            if (\n              !(this.optionFlags & OptionFlags.CreateParenthesizedExpressions)\n            ) {\n              const startLoc = this.state.startLoc;\n              this.next();\n              const type = this.tsParseType();\n              this.expect(tt.parenR);\n              this.addExtra(type, \"parenthesized\", true);\n              this.addExtra(type, \"parenStart\", startLoc.index);\n              return type;\n            }\n          }\n\n          return this.tsParseParenthesizedType();\n        case tt.templateNonTail:\n        case tt.templateTail:\n          return this.tsParseTemplateLiteralType();\n        default: {\n          const { type } = this.state;\n          if (\n            tokenIsIdentifier(type) ||\n            type === tt._void ||\n            type === tt._null\n          ) {\n            const nodeType =\n              type === tt._void\n                ? \"TSVoidKeyword\"\n                : type === tt._null\n                  ? \"TSNullKeyword\"\n                  : keywordTypeFromName(this.state.value);\n            if (\n              nodeType !== undefined &&\n              this.lookaheadCharCode() !== charCodes.dot\n            ) {\n              const node = this.startNode<N.TsKeywordType>();\n              this.next();\n              return this.finishNode(node, nodeType);\n            }\n            return this.tsParseTypeReference();\n          }\n        }\n      }\n\n      this.unexpected();\n    }\n\n    tsParseArrayTypeOrHigher(): N.TsType {\n      const { startLoc } = this.state;\n      let type = this.tsParseNonArrayType();\n      while (!this.hasPrecedingLineBreak() && this.eat(tt.bracketL)) {\n        if (this.match(tt.bracketR)) {\n          const node = this.startNodeAt<N.TsArrayType>(startLoc);\n          node.elementType = type;\n          this.expect(tt.bracketR);\n          type = this.finishNode(node, \"TSArrayType\");\n        } else {\n          const node = this.startNodeAt<N.TsIndexedAccessType>(startLoc);\n          node.objectType = type;\n          node.indexType = this.tsParseType();\n          this.expect(tt.bracketR);\n          type = this.finishNode(node, \"TSIndexedAccessType\");\n        }\n      }\n      return type;\n    }\n\n    tsParseTypeOperator(): N.TsTypeOperator {\n      const node = this.startNode<N.TsTypeOperator>();\n      const operator = this.state.value;\n      this.next(); // eat operator\n      node.operator = operator;\n      node.typeAnnotation = this.tsParseTypeOperatorOrHigher();\n\n      if (operator === \"readonly\") {\n        this.tsCheckTypeAnnotationForReadOnly(node);\n      }\n\n      return this.finishNode(node, \"TSTypeOperator\");\n    }\n\n    tsCheckTypeAnnotationForReadOnly(node: Undone<N.TsTypeOperator>) {\n      switch (node.typeAnnotation.type) {\n        case \"TSTupleType\":\n        case \"TSArrayType\":\n          return;\n        default:\n          this.raise(TSErrors.UnexpectedReadonly, node);\n      }\n    }\n\n    tsParseInferType(): N.TsInferType {\n      const node = this.startNode<N.TsInferType>();\n      this.expectContextual(tt._infer);\n      const typeParameter = this.startNode<N.TsTypeParameter>();\n      typeParameter.name = this.tsParseTypeParameterName();\n      typeParameter.constraint = this.tsTryParse(() =>\n        this.tsParseConstraintForInferType(),\n      );\n      node.typeParameter = this.finishNode(typeParameter, \"TSTypeParameter\");\n      return this.finishNode(node, \"TSInferType\");\n    }\n\n    tsParseConstraintForInferType() {\n      if (this.eat(tt._extends)) {\n        const constraint = this.tsInDisallowConditionalTypesContext(() =>\n          this.tsParseType(),\n        );\n        if (\n          this.state.inDisallowConditionalTypesContext ||\n          !this.match(tt.question)\n        ) {\n          return constraint;\n        }\n      }\n    }\n\n    tsParseTypeOperatorOrHigher(): N.TsType {\n      const isTypeOperator =\n        tokenIsTSTypeOperator(this.state.type) && !this.state.containsEsc;\n      return isTypeOperator\n        ? this.tsParseTypeOperator()\n        : this.isContextual(tt._infer)\n          ? this.tsParseInferType()\n          : this.tsInAllowConditionalTypesContext(() =>\n              this.tsParseArrayTypeOrHigher(),\n            );\n    }\n\n    tsParseUnionOrIntersectionType(\n      kind: \"TSUnionType\" | \"TSIntersectionType\",\n      parseConstituentType: () => N.TsType,\n      operator: TokenType,\n    ): N.TsType {\n      const node = this.startNode<N.TsUnionType | N.TsIntersectionType>();\n      const hasLeadingOperator = this.eat(operator);\n      const types = [];\n      do {\n        types.push(parseConstituentType());\n      } while (this.eat(operator));\n      if (types.length === 1 && !hasLeadingOperator) {\n        return types[0];\n      }\n      node.types = types;\n      return this.finishNode(node, kind);\n    }\n\n    tsParseIntersectionTypeOrHigher(): N.TsType {\n      return this.tsParseUnionOrIntersectionType(\n        \"TSIntersectionType\",\n        this.tsParseTypeOperatorOrHigher.bind(this),\n        tt.bitwiseAND,\n      );\n    }\n\n    tsParseUnionTypeOrHigher() {\n      return this.tsParseUnionOrIntersectionType(\n        \"TSUnionType\",\n        this.tsParseIntersectionTypeOrHigher.bind(this),\n        tt.bitwiseOR,\n      );\n    }\n\n    tsIsStartOfFunctionType() {\n      if (this.match(tt.lt)) {\n        return true;\n      }\n      return (\n        this.match(tt.parenL) &&\n        this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))\n      );\n    }\n\n    tsSkipParameterStart(): boolean {\n      if (tokenIsIdentifier(this.state.type) || this.match(tt._this)) {\n        this.next();\n        return true;\n      }\n\n      if (this.match(tt.braceL)) {\n        // Return true if we can parse an object pattern without errors\n        const { errors } = this.state;\n        const previousErrorCount = errors.length;\n        try {\n          this.parseObjectLike(tt.braceR, true);\n          return errors.length === previousErrorCount;\n        } catch {\n          return false;\n        }\n      }\n\n      if (this.match(tt.bracketL)) {\n        this.next();\n        // Return true if we can parse an array pattern without errors\n        const { errors } = this.state;\n        const previousErrorCount = errors.length;\n        try {\n          super.parseBindingList(\n            tt.bracketR,\n            charCodes.rightSquareBracket,\n            ParseBindingListFlags.ALLOW_EMPTY,\n          );\n          return errors.length === previousErrorCount;\n        } catch {\n          return false;\n        }\n      }\n\n      return false;\n    }\n\n    tsIsUnambiguouslyStartOfFunctionType(): boolean {\n      this.next();\n      if (this.match(tt.parenR) || this.match(tt.ellipsis)) {\n        // ( )\n        // ( ...\n        return true;\n      }\n      if (this.tsSkipParameterStart()) {\n        if (\n          this.match(tt.colon) ||\n          this.match(tt.comma) ||\n          this.match(tt.question) ||\n          this.match(tt.eq)\n        ) {\n          // ( xxx :\n          // ( xxx ,\n          // ( xxx ?\n          // ( xxx =\n          return true;\n        }\n        if (this.match(tt.parenR)) {\n          this.next();\n          if (this.match(tt.arrow)) {\n            // ( xxx ) =>\n            return true;\n          }\n        }\n      }\n      return false;\n    }\n\n    tsParseTypeOrTypePredicateAnnotation(\n      returnToken: TokenType,\n    ): N.TsTypeAnnotation {\n      return this.tsInType(() => {\n        const t = this.startNode<N.TsTypeAnnotation>();\n        this.expect(returnToken);\n\n        const node = this.startNode<N.TsTypePredicate>();\n\n        const asserts = !!this.tsTryParse(\n          this.tsParseTypePredicateAsserts.bind(this),\n        );\n\n        if (asserts && this.match(tt._this)) {\n          // When asserts is false, thisKeyword is handled by tsParseNonArrayType\n          // : asserts this is type\n          let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate();\n          // if it turns out to be a `TSThisType`, wrap it with `TSTypePredicate`\n          // : asserts this\n          if (thisTypePredicate.type === \"TSThisType\") {\n            node.parameterName = thisTypePredicate;\n            node.asserts = true;\n            (node as N.TsTypePredicate).typeAnnotation = null;\n            thisTypePredicate = this.finishNode(node, \"TSTypePredicate\");\n          } else {\n            this.resetStartLocationFromNode(thisTypePredicate, node);\n            thisTypePredicate.asserts = true;\n          }\n          t.typeAnnotation = thisTypePredicate;\n          return this.finishNode(t, \"TSTypeAnnotation\");\n        }\n\n        const typePredicateVariable =\n          this.tsIsIdentifier() &&\n          this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));\n\n        if (!typePredicateVariable) {\n          if (!asserts) {\n            // : type\n            return this.tsParseTypeAnnotation(/* eatColon */ false, t);\n          }\n\n          // : asserts foo\n          node.parameterName = this.parseIdentifier();\n          node.asserts = asserts;\n          (node as N.TsTypePredicate).typeAnnotation = null;\n          t.typeAnnotation = this.finishNode(node, \"TSTypePredicate\");\n          return this.finishNode(t, \"TSTypeAnnotation\");\n        }\n\n        // : asserts foo is type\n        const type = this.tsParseTypeAnnotation(/* eatColon */ false);\n        node.parameterName = typePredicateVariable;\n        node.typeAnnotation = type;\n        node.asserts = asserts;\n        t.typeAnnotation = this.finishNode(node, \"TSTypePredicate\");\n        return this.finishNode(t, \"TSTypeAnnotation\");\n      });\n    }\n\n    tsTryParseTypeOrTypePredicateAnnotation(): N.TsTypeAnnotation | undefined {\n      if (this.match(tt.colon)) {\n        return this.tsParseTypeOrTypePredicateAnnotation(tt.colon);\n      }\n    }\n\n    tsTryParseTypeAnnotation(): N.TsTypeAnnotation | undefined {\n      if (this.match(tt.colon)) {\n        return this.tsParseTypeAnnotation();\n      }\n    }\n\n    tsTryParseType(): N.TsType | undefined {\n      return this.tsEatThenParseType(tt.colon);\n    }\n\n    tsParseTypePredicatePrefix(): N.Identifier | undefined {\n      const id = this.parseIdentifier();\n      if (this.isContextual(tt._is) && !this.hasPrecedingLineBreak()) {\n        this.next();\n        return id;\n      }\n    }\n\n    tsParseTypePredicateAsserts(): boolean {\n      if (this.state.type !== tt._asserts) {\n        return false;\n      }\n      const containsEsc = this.state.containsEsc;\n      this.next();\n      if (!tokenIsIdentifier(this.state.type) && !this.match(tt._this)) {\n        return false;\n      }\n\n      if (containsEsc) {\n        this.raise(\n          Errors.InvalidEscapedReservedWord,\n          this.state.lastTokStartLoc,\n          {\n            reservedWord: \"asserts\",\n          },\n        );\n      }\n\n      return true;\n    }\n\n    tsParseTypeAnnotation(\n      eatColon = true,\n      t: Undone<N.TsTypeAnnotation> = this.startNode<N.TsTypeAnnotation>(),\n    ): N.TsTypeAnnotation {\n      this.tsInType(() => {\n        if (eatColon) this.expect(tt.colon);\n        t.typeAnnotation = this.tsParseType();\n      });\n      return this.finishNode(t, \"TSTypeAnnotation\");\n    }\n\n    /** Be sure to be in a type context before calling this, using `tsInType`. */\n    tsParseType(): N.TsType {\n      // Need to set `state.inType` so that we don't parse JSX in a type context.\n      assert(this.state.inType);\n      const type = this.tsParseNonConditionalType();\n\n      if (\n        this.state.inDisallowConditionalTypesContext ||\n        this.hasPrecedingLineBreak() ||\n        !this.eat(tt._extends)\n      ) {\n        return type;\n      }\n      const node = this.startNodeAtNode<N.TsConditionalType>(type);\n      node.checkType = type;\n\n      node.extendsType = this.tsInDisallowConditionalTypesContext(() =>\n        this.tsParseNonConditionalType(),\n      );\n\n      this.expect(tt.question);\n      node.trueType = this.tsInAllowConditionalTypesContext(() =>\n        this.tsParseType(),\n      );\n\n      this.expect(tt.colon);\n      node.falseType = this.tsInAllowConditionalTypesContext(() =>\n        this.tsParseType(),\n      );\n\n      return this.finishNode(node, \"TSConditionalType\");\n    }\n\n    isAbstractConstructorSignature(): boolean {\n      return (\n        this.isContextual(tt._abstract) && this.isLookaheadContextual(\"new\")\n      );\n    }\n\n    tsParseNonConditionalType(): N.TsType {\n      if (this.tsIsStartOfFunctionType()) {\n        return this.tsParseFunctionOrConstructorType(\"TSFunctionType\");\n      }\n      if (this.match(tt._new)) {\n        // As in `new () => Date`\n        return this.tsParseFunctionOrConstructorType(\"TSConstructorType\");\n      } else if (this.isAbstractConstructorSignature()) {\n        // As in `abstract new () => Date`\n        return this.tsParseFunctionOrConstructorType(\n          \"TSConstructorType\",\n          /* abstract */ true,\n        );\n      }\n      return this.tsParseUnionTypeOrHigher();\n    }\n\n    tsParseTypeAssertion(): N.TsTypeAssertion {\n      if (this.getPluginOption(\"typescript\", \"disallowAmbiguousJSXLike\")) {\n        this.raise(TSErrors.ReservedTypeAssertion, this.state.startLoc);\n      }\n\n      const node = this.startNode<N.TsTypeAssertion>();\n      node.typeAnnotation = this.tsInType(() => {\n        this.next(); // \"<\"\n        return this.match(tt._const)\n          ? this.tsParseTypeReference()\n          : this.tsParseType();\n      });\n      this.expect(tt.gt);\n      node.expression = this.parseMaybeUnary();\n      return this.finishNode(node, \"TSTypeAssertion\");\n    }\n\n    tsParseHeritageClause(token: \"extends\"): Array<N.TSInterfaceHeritage>;\n    tsParseHeritageClause(token: \"implements\"): Array<N.TSClassImplements>;\n    tsParseHeritageClause(\n      token: \"extends\" | \"implements\",\n    ): Array<N.TSClassImplements> | Array<N.TSInterfaceHeritage> {\n      const originalStartLoc = this.state.startLoc;\n\n      const delimitedList = this.tsParseDelimitedList(\n        \"HeritageClauseElement\",\n        () => {\n          if (process.env.BABEL_8_BREAKING) {\n            const expression = super.parseExprSubscripts();\n            if (!tsIsEntityName(expression)) {\n              this.raise(\n                TSErrors.InvalidHeritageClauseType,\n                expression.loc.start,\n                { token },\n              );\n            }\n            const nodeType =\n              token === \"extends\" ? \"TSInterfaceHeritage\" : \"TSClassImplements\";\n            if (expression.type === \"TSInstantiationExpression\") {\n              // @ts-expect-error cast TSInstantiationExpression to TSInterfaceHeritage/TSClassImplements\n              expression.type = nodeType;\n              return expression;\n            }\n            const node = this.startNodeAtNode<\n              N.TSInterfaceHeritage | N.TSClassImplements\n            >(expression);\n            node.expression = expression;\n            // The last element can not form a TSInstantiationExpression because of the bail condition in\n            // `parseSubscript`, in this case we have to parse type arguments again\n            if (this.match(tt.lt) || this.match(tt.bitShiftL)) {\n              node.typeArguments = this.tsParseTypeArgumentsInExpression();\n            }\n            return this.finishNode(node, nodeType);\n          } else {\n            const node = this.startNode<\n              N.TSInterfaceHeritage | N.TSClassImplements\n            >();\n            // @ts-expect-error Babel 7 vs Babel 8\n            node.expression = this.tsParseEntityName(\n              tsParseEntityNameFlags.ALLOW_RESERVED_WORDS |\n                tsParseEntityNameFlags.LEADING_THIS_AS_IDENTIFIER,\n            );\n            if (this.match(tt.lt)) {\n              // @ts-expect-error Babel 7 vs Babel 8\n              node.typeParameters = this.tsParseTypeArguments();\n            }\n\n            return this.finishNode(\n              node,\n              // @ts-expect-error Babel 7 vs Babel 8\n              \"TSExpressionWithTypeArguments\",\n            );\n          }\n        },\n      );\n\n      if (!delimitedList.length) {\n        this.raise(TSErrors.EmptyHeritageClauseType, originalStartLoc, {\n          token,\n        });\n      }\n\n      return delimitedList as\n        | Array<N.TSClassImplements>\n        | Array<N.TSInterfaceHeritage>;\n    }\n\n    tsParseInterfaceDeclaration(\n      node: Undone<N.TsInterfaceDeclaration>,\n      properties: {\n        declare?: true;\n      } = {},\n    ): N.TsInterfaceDeclaration | null {\n      if (this.hasFollowingLineBreak()) return null;\n      this.expectContextual(tt._interface);\n      if (properties.declare) node.declare = true;\n      if (tokenIsIdentifier(this.state.type)) {\n        node.id = this.parseIdentifier();\n        this.checkIdentifier(node.id, BindingFlag.TYPE_TS_INTERFACE);\n      } else {\n        node.id = null;\n        this.raise(TSErrors.MissingInterfaceName, this.state.startLoc);\n      }\n\n      node.typeParameters = this.tsTryParseTypeParameters(\n        this.tsParseInOutConstModifiers,\n      );\n      if (this.eat(tt._extends)) {\n        node.extends = this.tsParseHeritageClause(\"extends\");\n      }\n      const body = this.startNode<N.TSInterfaceBody>();\n      body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));\n      node.body = this.finishNode(body, \"TSInterfaceBody\");\n      return this.finishNode(node, \"TSInterfaceDeclaration\");\n    }\n\n    tsParseTypeAliasDeclaration(\n      node: N.TsTypeAliasDeclaration,\n    ): N.TsTypeAliasDeclaration {\n      node.id = this.parseIdentifier();\n      this.checkIdentifier(node.id, BindingFlag.TYPE_TS_TYPE);\n\n      node.typeAnnotation = this.tsInType(() => {\n        node.typeParameters = this.tsTryParseTypeParameters(\n          this.tsParseInOutModifiers,\n        );\n\n        this.expect(tt.eq);\n\n        if (\n          this.isContextual(tt._intrinsic) &&\n          this.lookaheadCharCode() !== charCodes.dot\n        ) {\n          const node = this.startNode<N.TsKeywordType>();\n          this.next();\n          return this.finishNode(node, \"TSIntrinsicKeyword\");\n        }\n\n        return this.tsParseType();\n      });\n\n      this.semicolon();\n      return this.finishNode(node, \"TSTypeAliasDeclaration\");\n    }\n\n    // Parse in top level normal context if we are in a JSX context\n    tsInTopLevelContext<T>(cb: () => T): T {\n      if (this.curContext() !== tc.brace) {\n        const oldContext = this.state.context;\n        this.state.context = [oldContext[0]];\n        try {\n          return cb();\n        } finally {\n          this.state.context = oldContext;\n        }\n      } else {\n        return cb();\n      }\n    }\n\n    /**\n     * Runs `cb` in a type context.\n     * This should be called one token *before* the first type token,\n     * so that the call to `next()` is run in type context.\n     */\n    tsInType<T>(cb: () => T): T {\n      const oldInType = this.state.inType;\n      this.state.inType = true;\n      try {\n        return cb();\n      } finally {\n        this.state.inType = oldInType;\n      }\n    }\n\n    tsInDisallowConditionalTypesContext<T>(cb: () => T): T {\n      const oldInDisallowConditionalTypesContext =\n        this.state.inDisallowConditionalTypesContext;\n      this.state.inDisallowConditionalTypesContext = true;\n      try {\n        return cb();\n      } finally {\n        this.state.inDisallowConditionalTypesContext =\n          oldInDisallowConditionalTypesContext;\n      }\n    }\n\n    tsInAllowConditionalTypesContext<T>(cb: () => T): T {\n      const oldInDisallowConditionalTypesContext =\n        this.state.inDisallowConditionalTypesContext;\n      this.state.inDisallowConditionalTypesContext = false;\n      try {\n        return cb();\n      } finally {\n        this.state.inDisallowConditionalTypesContext =\n          oldInDisallowConditionalTypesContext;\n      }\n    }\n\n    tsEatThenParseType(token: TokenType): N.TsType | undefined {\n      if (this.match(token)) {\n        return this.tsNextThenParseType();\n      }\n    }\n\n    tsExpectThenParseType(token: TokenType): N.TsType {\n      return this.tsInType(() => {\n        this.expect(token);\n        return this.tsParseType();\n      });\n    }\n\n    tsNextThenParseType(): N.TsType {\n      return this.tsInType(() => {\n        this.next();\n        return this.tsParseType();\n      });\n    }\n\n    tsParseEnumMember(): N.TsEnumMember {\n      const node = this.startNode<N.TsEnumMember>();\n      // Computed property names are grammar errors in an enum, so accept just string literal or identifier.\n      node.id = this.match(tt.string)\n        ? super.parseStringLiteral(this.state.value)\n        : this.parseIdentifier(/* liberal */ true);\n      if (this.eat(tt.eq)) {\n        node.initializer = super.parseMaybeAssignAllowIn();\n      }\n      return this.finishNode(node, \"TSEnumMember\");\n    }\n\n    tsParseEnumDeclaration(\n      node: Undone<N.TsEnumDeclaration>,\n      properties: {\n        const?: true;\n        declare?: true;\n      } = {},\n    ): N.TsEnumDeclaration {\n      if (properties.const) node.const = true;\n      if (properties.declare) node.declare = true;\n      this.expectContextual(tt._enum);\n      node.id = this.parseIdentifier();\n      this.checkIdentifier(\n        node.id,\n        node.const ? BindingFlag.TYPE_TS_CONST_ENUM : BindingFlag.TYPE_TS_ENUM,\n      );\n\n      if (process.env.BABEL_8_BREAKING) {\n        node.body = this.tsParseEnumBody();\n      } else {\n        this.expect(tt.braceL);\n        node.members = this.tsParseDelimitedList(\n          \"EnumMembers\",\n          this.tsParseEnumMember.bind(this),\n        );\n        this.expect(tt.braceR);\n      }\n      return this.finishNode(node, \"TSEnumDeclaration\");\n    }\n\n    tsParseEnumBody(): N.TsEnumBody {\n      const node = this.startNode<N.TsEnumBody>();\n      this.expect(tt.braceL);\n      node.members = this.tsParseDelimitedList(\n        \"EnumMembers\",\n        this.tsParseEnumMember.bind(this),\n      );\n      this.expect(tt.braceR);\n      return this.finishNode(node, \"TSEnumBody\");\n    }\n\n    tsParseModuleBlock(): N.TsModuleBlock {\n      const node = this.startNode<N.TsModuleBlock>();\n      this.scope.enter(ScopeFlag.OTHER);\n\n      this.expect(tt.braceL);\n      // Inside of a module block is considered \"top-level\", meaning it can have imports and exports.\n      super.parseBlockOrModuleBlockBody(\n        (node.body = []),\n        /* directives */ undefined,\n        /* topLevel */ true,\n        /* end */ tt.braceR,\n      );\n      this.scope.exit();\n      return this.finishNode(node, \"TSModuleBlock\");\n    }\n\n    tsParseModuleOrNamespaceDeclaration(\n      node: Undone<N.TsModuleDeclaration>,\n      nested: boolean = false,\n    ): N.TsModuleDeclaration {\n      node.id = process.env.BABEL_8_BREAKING\n        ? this.tsParseEntityName(tsParseEntityNameFlags.ALLOW_RESERVED_WORDS)\n        : this.parseIdentifier();\n\n      if (\n        process.env.BABEL_8_BREAKING ? node.id.type === \"Identifier\" : !nested\n      ) {\n        // @ts-expect-error checked above\n        this.checkIdentifier(node.id, BindingFlag.TYPE_TS_NAMESPACE);\n      }\n\n      if (!process.env.BABEL_8_BREAKING && this.eat(tt.dot)) {\n        const inner = this.startNode<N.TsModuleDeclaration>();\n        this.tsParseModuleOrNamespaceDeclaration(inner, true);\n        // @ts-expect-error Fixme: refine typings\n        node.body = inner;\n      } else {\n        this.scope.enter(ScopeFlag.TS_MODULE);\n        this.prodParam.enter(ParamKind.PARAM);\n        node.body = this.tsParseModuleBlock();\n        this.prodParam.exit();\n        this.scope.exit();\n      }\n      return this.finishNode(node, \"TSModuleDeclaration\");\n    }\n\n    tsParseAmbientExternalModuleDeclaration(\n      node: N.TsModuleDeclaration,\n    ): N.TsModuleDeclaration {\n      if (this.isContextual(tt._global)) {\n        node.kind = \"global\";\n        if (!process.env.BABEL_8_BREAKING) {\n          node.global = true;\n        }\n        node.id = this.parseIdentifier();\n      } else if (this.match(tt.string)) {\n        node.kind = \"module\";\n        node.id = super.parseStringLiteral(this.state.value);\n      } else {\n        this.unexpected();\n      }\n      if (this.match(tt.braceL)) {\n        this.scope.enter(ScopeFlag.TS_MODULE);\n        this.prodParam.enter(ParamKind.PARAM);\n        node.body = this.tsParseModuleBlock();\n        this.prodParam.exit();\n        this.scope.exit();\n      } else {\n        this.semicolon();\n      }\n\n      return this.finishNode(node, \"TSModuleDeclaration\");\n    }\n\n    tsParseImportEqualsDeclaration(\n      node: Undone<N.TsImportEqualsDeclaration>,\n      maybeDefaultIdentifier?: N.Identifier | null,\n      isExport?: boolean,\n    ): N.TsImportEqualsDeclaration {\n      if (!process.env.BABEL_8_BREAKING) {\n        node.isExport = isExport || false;\n      }\n      node.id = maybeDefaultIdentifier || this.parseIdentifier();\n      this.checkIdentifier(node.id, BindingFlag.TYPE_TS_VALUE_IMPORT);\n      this.expect(tt.eq);\n      const moduleReference = this.tsParseModuleReference();\n      if (\n        node.importKind === \"type\" &&\n        moduleReference.type !== \"TSExternalModuleReference\"\n      ) {\n        this.raise(TSErrors.ImportAliasHasImportType, moduleReference);\n      }\n      node.moduleReference = moduleReference;\n      this.semicolon();\n      return this.finishNode(node, \"TSImportEqualsDeclaration\");\n    }\n\n    tsIsExternalModuleReference(): boolean {\n      return (\n        this.isContextual(tt._require) &&\n        this.lookaheadCharCode() === charCodes.leftParenthesis\n      );\n    }\n\n    tsParseModuleReference(): N.TsModuleReference {\n      return this.tsIsExternalModuleReference()\n        ? this.tsParseExternalModuleReference()\n        : this.tsParseEntityName(tsParseEntityNameFlags.NONE);\n    }\n\n    tsParseExternalModuleReference(): N.TsExternalModuleReference {\n      const node = this.startNode<N.TsExternalModuleReference>();\n      this.expectContextual(tt._require);\n      this.expect(tt.parenL);\n      if (!this.match(tt.string)) {\n        this.unexpected();\n      }\n      // For compatibility to estree we cannot call parseLiteral directly here\n      node.expression = super.parseExprAtom() as N.StringLiteral;\n      this.expect(tt.parenR);\n      this.sawUnambiguousESM = true;\n      return this.finishNode(node, \"TSExternalModuleReference\");\n    }\n\n    // Utilities\n\n    tsLookAhead<T>(f: () => T): T {\n      const state = this.state.clone();\n      const res = f();\n      this.state = state;\n      return res;\n    }\n\n    tsTryParseAndCatch<T extends N.NodeBase | undefined | null>(\n      f: () => T,\n    ): T | undefined | null {\n      const result = this.tryParse(\n        abort =>\n          // @ts-expect-error todo(flow->ts)\n          f() || abort(),\n      );\n\n      if (result.aborted || !result.node) return;\n      if (result.error) this.state = result.failState;\n      // @ts-expect-error refine typings\n      return result.node;\n    }\n\n    tsTryParse<T>(f: () => T | undefined | false): T | undefined {\n      const state = this.state.clone();\n      const result = f();\n      if (result !== undefined && result !== false) {\n        return result;\n      }\n      this.state = state;\n    }\n\n    tsTryParseDeclare(node: any) {\n      if (this.isLineTerminator()) {\n        return;\n      }\n      const startType = this.state.type;\n      return this.tsInAmbientContext(() => {\n        switch (startType) {\n          case tt._function:\n            node.declare = true;\n            return super.parseFunctionStatement(\n              node,\n              /* async */ false,\n              /* isHangingDeclaration */ false,\n            );\n          case tt._class:\n            // While this is also set by tsParseExpressionStatement, we need to set it\n            // before parsing the class declaration to know how to register it in the scope.\n            node.declare = true;\n            return this.parseClass(\n              node as Undone<N.ClassDeclaration>,\n              /* isStatement */ true,\n              /* optionalId */ false,\n            );\n          case tt._enum:\n            return this.tsParseEnumDeclaration(node, { declare: true });\n          case tt._global:\n            return this.tsParseAmbientExternalModuleDeclaration(node);\n          case tt._let:\n            if (this.state.containsEsc) {\n              return;\n            }\n          // fallthrough\n          case tt._const:\n          case tt._var:\n            if (!this.match(tt._const) || !this.isLookaheadContextual(\"enum\")) {\n              node.declare = true;\n              return this.parseVarStatement(node, this.state.value, true);\n            }\n\n            // `const enum = 0;` not allowed because \"enum\" is a strict mode reserved word.\n            this.expect(tt._const);\n            return this.tsParseEnumDeclaration(node, {\n              const: true,\n              declare: true,\n            });\n          case tt._using:\n            if (this.isUsing()) {\n              this.raise(\n                TSErrors.InvalidModifierOnUsingDeclaration,\n                this.state.startLoc,\n                \"declare\",\n              );\n              node.declare = true;\n              return this.parseVarStatement(node, \"using\", true);\n            }\n            break;\n          case tt._await:\n            if (this.isAwaitUsing()) {\n              this.raise(\n                TSErrors.InvalidModifierOnAwaitUsingDeclaration,\n                this.state.startLoc,\n                \"declare\",\n              );\n              node.declare = true;\n              this.next(); // eat 'await'\n              return this.parseVarStatement(node, \"await using\", true);\n            }\n            break;\n          case tt._interface: {\n            const result = this.tsParseInterfaceDeclaration(node, {\n              declare: true,\n            });\n            if (result) return result;\n          }\n          // fallthrough\n          default:\n            if (tokenIsIdentifier(startType)) {\n              return this.tsParseDeclaration(\n                node,\n                this.state.value,\n                /* next */ true,\n                /* decorators */ null,\n              );\n            }\n        }\n      });\n    }\n\n    // Note: this won't be called unless the keyword is allowed in `shouldParseExportDeclaration`.\n    tsTryParseExportDeclaration(): N.Declaration | undefined {\n      return this.tsParseDeclaration(\n        this.startNode(),\n        this.state.value,\n        /* next */ true,\n        /* decorators */ null,\n      );\n    }\n\n    tsParseExpressionStatement(\n      node: Undone<N.TsModuleDeclaration>,\n      expr: N.Identifier,\n      decorators: N.Decorator[] | null,\n    ): N.Declaration | undefined {\n      switch (expr.name) {\n        case \"declare\": {\n          const declaration = this.tsTryParseDeclare(node);\n          if (declaration) {\n            declaration.declare = true;\n          }\n          return declaration;\n        }\n        case \"global\":\n          // `global { }` (with no `declare`) may appear inside an ambient module declaration.\n          // Would like to use tsParseAmbientExternalModuleDeclaration here, but already ran past \"global\".\n          if (this.match(tt.braceL)) {\n            this.scope.enter(ScopeFlag.TS_MODULE);\n            this.prodParam.enter(ParamKind.PARAM);\n            const mod = node;\n            mod.kind = \"global\";\n            if (!process.env.BABEL_8_BREAKING) {\n              node.global = true;\n            }\n            mod.id = expr;\n            mod.body = this.tsParseModuleBlock();\n            this.scope.exit();\n            this.prodParam.exit();\n            return this.finishNode(mod, \"TSModuleDeclaration\");\n          }\n          break;\n\n        default:\n          return this.tsParseDeclaration(\n            node,\n            expr.name,\n            /* next */ false,\n            decorators,\n          );\n      }\n    }\n\n    // Common to tsTryParseDeclare, tsTryParseExportDeclaration, and tsParseExpressionStatement.\n    tsParseDeclaration(\n      node: any,\n      value: string,\n      next: boolean,\n      decorators: N.Decorator[] | null,\n    ) {\n      // no declaration apart from enum can be followed by a line break.\n      switch (value) {\n        case \"abstract\":\n          if (\n            this.tsCheckLineTerminator(next) &&\n            (this.match(tt._class) || tokenIsIdentifier(this.state.type))\n          ) {\n            return this.tsParseAbstractDeclaration(node, decorators);\n          }\n          break;\n\n        case \"module\":\n          if (this.tsCheckLineTerminator(next)) {\n            if (this.match(tt.string)) {\n              return this.tsParseAmbientExternalModuleDeclaration(node);\n            } else if (tokenIsIdentifier(this.state.type)) {\n              node.kind = \"module\";\n              return this.tsParseModuleOrNamespaceDeclaration(node);\n            }\n          }\n          break;\n\n        case \"namespace\":\n          if (\n            this.tsCheckLineTerminator(next) &&\n            tokenIsIdentifier(this.state.type)\n          ) {\n            node.kind = \"namespace\";\n            return this.tsParseModuleOrNamespaceDeclaration(node);\n          }\n          break;\n\n        case \"type\":\n          if (\n            this.tsCheckLineTerminator(next) &&\n            tokenIsIdentifier(this.state.type)\n          ) {\n            return this.tsParseTypeAliasDeclaration(node);\n          }\n          break;\n      }\n    }\n\n    tsCheckLineTerminator(next: boolean) {\n      if (next) {\n        if (this.hasFollowingLineBreak()) return false;\n        this.next();\n        return true;\n      }\n      return !this.isLineTerminator();\n    }\n\n    tsTryParseGenericAsyncArrowFunction(\n      startLoc: Position,\n    ): N.ArrowFunctionExpression | undefined {\n      if (!this.match(tt.lt)) return;\n\n      const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n      this.state.maybeInArrowParameters = true;\n\n      const res: Undone<N.ArrowFunctionExpression> | undefined =\n        this.tsTryParseAndCatch(() => {\n          const node = this.startNodeAt<N.ArrowFunctionExpression>(startLoc);\n          node.typeParameters = this.tsParseTypeParameters(\n            this.tsParseConstModifier,\n          );\n          // Don't use overloaded parseFunctionParams which would look for \"<\" again.\n          super.parseFunctionParams(node);\n          node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation();\n          this.expect(tt.arrow);\n          return node;\n        });\n\n      this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n\n      if (!res) return;\n\n      return super.parseArrowExpression(\n        res,\n        /* params are already set */ null,\n        /* async */ true,\n      );\n    }\n\n    // Used when parsing type arguments from ES or JSX productions, where the first token\n    // has been created without state.inType. Thus we need to re-scan the lt token.\n    tsParseTypeArgumentsInExpression():\n      | N.TsTypeParameterInstantiation\n      | undefined {\n      if (this.reScan_lt() !== tt.lt) return;\n      return this.tsParseTypeArguments();\n    }\n\n    tsParseTypeArguments(): N.TsTypeParameterInstantiation {\n      const node = this.startNode<N.TsTypeParameterInstantiation>();\n      node.params = this.tsInType(() =>\n        this.tsInTopLevelContext(() => {\n          this.expect(tt.lt);\n          return this.tsParseDelimitedList(\n            \"TypeParametersOrArguments\",\n            this.tsParseType.bind(this),\n          );\n        }),\n      );\n      if (node.params.length === 0) {\n        this.raise(TSErrors.EmptyTypeArguments, node);\n      } else if (!this.state.inType && this.curContext() === tc.brace) {\n        // rescan `>` when we are no longer in type context and JSX parsing context\n        // since it was tokenized when `inType` is `true`.\n        this.reScan_lt_gt();\n      }\n      this.expect(tt.gt);\n      return this.finishNode(node, \"TSTypeParameterInstantiation\");\n    }\n\n    tsIsDeclarationStart(): boolean {\n      return tokenIsTSDeclarationStart(this.state.type);\n    }\n\n    // ======================================================\n    // OVERRIDES\n    // ======================================================\n\n    isExportDefaultSpecifier(): boolean {\n      if (this.tsIsDeclarationStart()) return false;\n      return super.isExportDefaultSpecifier();\n    }\n\n    parseBindingElement(\n      flags: ParseBindingListFlags,\n      decorators: N.Decorator[],\n    ): N.Pattern | N.TSParameterProperty {\n      // Store original location to include decorators/modifiers in range\n      const startLoc = decorators.length\n        ? decorators[0].loc.start\n        : this.state.startLoc;\n\n      const modified: ModifierBase = {};\n      this.tsParseModifiers(\n        {\n          allowedModifiers: [\n            \"public\",\n            \"private\",\n            \"protected\",\n            \"override\",\n            \"readonly\",\n          ],\n        },\n        modified,\n      );\n      const accessibility = modified.accessibility;\n      const override = modified.override;\n      const readonly = modified.readonly;\n      if (\n        !(flags & ParseBindingListFlags.IS_CONSTRUCTOR_PARAMS) &&\n        (accessibility || readonly || override)\n      ) {\n        this.raise(TSErrors.UnexpectedParameterModifier, startLoc);\n      }\n\n      const left = this.parseMaybeDefault();\n      if (flags & ParseBindingListFlags.IS_FUNCTION_PARAMS) {\n        this.parseFunctionParamType(left);\n      }\n      const elt = this.parseMaybeDefault(left.loc.start, left);\n      if (accessibility || readonly || override) {\n        const pp = this.startNodeAt<N.TSParameterProperty>(startLoc);\n        if (decorators.length) {\n          pp.decorators = decorators;\n        }\n        if (accessibility) pp.accessibility = accessibility;\n        if (readonly) pp.readonly = readonly;\n        if (override) pp.override = override;\n        if (elt.type !== \"Identifier\" && elt.type !== \"AssignmentPattern\") {\n          this.raise(TSErrors.UnsupportedParameterPropertyKind, pp);\n        }\n        pp.parameter = elt as any as N.Identifier | N.AssignmentPattern;\n        return this.finishNode(pp, \"TSParameterProperty\");\n      }\n\n      if (decorators.length) {\n        left.decorators = decorators;\n      }\n\n      return elt;\n    }\n\n    isSimpleParameter(node: N.Pattern | N.TSParameterProperty): boolean {\n      return (\n        (node.type === \"TSParameterProperty\" &&\n          super.isSimpleParameter(node.parameter)) ||\n        super.isSimpleParameter(node)\n      );\n    }\n\n    tsDisallowOptionalPattern(node: Undone<N.Function>) {\n      for (const param of node.params) {\n        if (\n          param.type !== \"Identifier\" &&\n          (param as any).optional &&\n          !this.state.isAmbientContext\n        ) {\n          this.raise(TSErrors.PatternIsOptional, param);\n        }\n      }\n    }\n\n    setArrowFunctionParameters(\n      node: Undone<N.ArrowFunctionExpression>,\n      params: N.Expression[],\n      trailingCommaLoc?: Position | null,\n    ): void {\n      super.setArrowFunctionParameters(node, params, trailingCommaLoc);\n      this.tsDisallowOptionalPattern(node);\n    }\n\n    parseFunctionBodyAndFinish<\n      T extends\n        | N.Function\n        | N.TSDeclareMethod\n        | N.TSDeclareFunction\n        | N.ClassPrivateMethod,\n    >(node: Undone<T>, type: T[\"type\"], isMethod: boolean = false): T {\n      if (this.match(tt.colon)) {\n        node.returnType = this.tsParseTypeOrTypePredicateAnnotation(tt.colon);\n      }\n\n      const bodilessType =\n        type === \"FunctionDeclaration\"\n          ? \"TSDeclareFunction\"\n          : type === \"ClassMethod\" || type === \"ClassPrivateMethod\"\n            ? \"TSDeclareMethod\"\n            : undefined;\n      if (bodilessType && !this.match(tt.braceL) && this.isLineTerminator()) {\n        return this.finishNode(node, bodilessType);\n      }\n      if (bodilessType === \"TSDeclareFunction\" && this.state.isAmbientContext) {\n        this.raise(TSErrors.DeclareFunctionHasImplementation, node);\n        if ((node as Undone<N.FunctionDeclaration>).declare) {\n          return super.parseFunctionBodyAndFinish(node, bodilessType, isMethod);\n        }\n      }\n      this.tsDisallowOptionalPattern(node);\n\n      return super.parseFunctionBodyAndFinish(node, type, isMethod);\n    }\n\n    registerFunctionStatementId(node: N.Function): void {\n      if (!node.body && node.id) {\n        // Function ids are validated after parsing their body.\n        // For bodiless function, we need to do it here.\n        this.checkIdentifier(node.id, BindingFlag.TYPE_TS_AMBIENT);\n      } else {\n        super.registerFunctionStatementId(node);\n      }\n    }\n\n    tsCheckForInvalidTypeCasts(items: Array<N.Expression | N.SpreadElement>) {\n      items.forEach(node => {\n        if (node?.type === \"TSTypeCastExpression\") {\n          this.raise(TSErrors.UnexpectedTypeAnnotation, node.typeAnnotation);\n        }\n      });\n    }\n\n    toReferencedList(\n      exprList: Array<N.Expression | undefined | null>,\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      isInParens?: boolean,\n    ): Array<N.Expression | undefined | null> {\n      // Handles invalid scenarios like: `f(a:b)`, `(a:b);`, and `(a:b,c:d)`.\n      //\n      // Note that `f<T>(a:b)` goes through a different path and is handled\n      // in `parseSubscript` directly.\n      this.tsCheckForInvalidTypeCasts(exprList);\n      return exprList;\n    }\n\n    parseArrayLike(\n      close: TokenType,\n      canBePattern: boolean,\n      isTuple: boolean,\n      refExpressionErrors?: ExpressionErrors | null,\n    ): N.ArrayExpression | N.TupleExpression {\n      const node = super.parseArrayLike(\n        close,\n        canBePattern,\n        isTuple,\n        refExpressionErrors,\n      );\n\n      if (node.type === \"ArrayExpression\") {\n        this.tsCheckForInvalidTypeCasts(node.elements);\n      }\n\n      return node;\n    }\n\n    parseSubscript(\n      base: N.Expression,\n\n      startLoc: Position,\n      noCalls: boolean | undefined | null,\n      state: N.ParseSubscriptState,\n    ): N.Expression {\n      if (!this.hasPrecedingLineBreak() && this.match(tt.bang)) {\n        // When ! is consumed as a postfix operator (non-null assertion),\n        // disallow JSX tag forming after. e.g. When parsing `p! < n.p!`\n        // `<n.p` can not be a start of JSX tag\n        this.state.canStartJSXElement = false;\n        this.next();\n\n        const nonNullExpression =\n          this.startNodeAt<N.TsNonNullExpression>(startLoc);\n        nonNullExpression.expression = base;\n        return this.finishNode(nonNullExpression, \"TSNonNullExpression\");\n      }\n\n      let isOptionalCall = false;\n      if (\n        this.match(tt.questionDot) &&\n        this.lookaheadCharCode() === charCodes.lessThan\n      ) {\n        if (noCalls) {\n          state.stop = true;\n          return base;\n        }\n        state.optionalChainMember = isOptionalCall = true;\n        this.next();\n      }\n\n      // handles 'f<<T>'\n      if (this.match(tt.lt) || this.match(tt.bitShiftL)) {\n        let missingParenErrorLoc;\n        // tsTryParseAndCatch is expensive, so avoid if not necessary.\n        // There are number of things we are going to \"maybe\" parse, like type arguments on\n        // tagged template expressions. If any of them fail, walk it back and continue.\n        const result = this.tsTryParseAndCatch(() => {\n          if (!noCalls && this.atPossibleAsyncArrow(base)) {\n            // Almost certainly this is a generic async function `async <T>() => ...\n            // But it might be a call with a type argument `async<T>();`\n            const asyncArrowFn =\n              this.tsTryParseGenericAsyncArrowFunction(startLoc);\n            if (asyncArrowFn) {\n              state.stop = true;\n              return asyncArrowFn;\n            }\n          }\n\n          const typeArguments = this.tsParseTypeArgumentsInExpression();\n          if (!typeArguments) return;\n\n          if (isOptionalCall && !this.match(tt.parenL)) {\n            missingParenErrorLoc = this.state.curPosition();\n            return;\n          }\n\n          if (tokenIsTemplate(this.state.type)) {\n            const result = super.parseTaggedTemplateExpression(\n              base,\n              startLoc,\n              state,\n            );\n            if (process.env.BABEL_8_BREAKING) {\n              result.typeArguments = typeArguments;\n            } else {\n              result.typeParameters = typeArguments;\n            }\n            return result;\n          }\n\n          if (!noCalls && this.eat(tt.parenL)) {\n            const node = this.startNodeAt<\n              N.CallExpression | N.OptionalCallExpression\n            >(startLoc);\n            node.callee = base;\n            // @ts-expect-error (won't be any undefined arguments)\n            node.arguments = this.parseCallExpressionArguments();\n\n            // Handles invalid case: `f<T>(a:b)`\n            this.tsCheckForInvalidTypeCasts(node.arguments);\n\n            if (process.env.BABEL_8_BREAKING) {\n              node.typeArguments = typeArguments;\n            } else {\n              node.typeParameters = typeArguments;\n            }\n\n            if (state.optionalChainMember) {\n              (node as Undone<N.OptionalCallExpression>).optional =\n                isOptionalCall;\n            }\n\n            return this.finishCallExpression(node, state.optionalChainMember);\n          }\n\n          const tokenType = this.state.type;\n          if (\n            // a<b>>c is not (a<b>)>c, but a<(b>>c)\n            tokenType === tt.gt ||\n            // a<b>>>c is not (a<b>)>>c, but a<(b>>>c)\n            tokenType === tt.bitShiftR ||\n            // a<b>c is (a<b)>c\n            (tokenType !== tt.parenL &&\n              tokenCanStartExpression(tokenType) &&\n              !this.hasPrecedingLineBreak())\n          ) {\n            // Bail out.\n            return;\n          }\n\n          const node = this.startNodeAt<N.TsInstantiationExpression>(startLoc);\n          node.expression = base;\n          if (process.env.BABEL_8_BREAKING) {\n            node.typeArguments = typeArguments;\n          } else {\n            node.typeParameters = typeArguments;\n          }\n          return this.finishNode(node, \"TSInstantiationExpression\");\n        });\n\n        if (missingParenErrorLoc) {\n          this.unexpected(missingParenErrorLoc, tt.parenL);\n        }\n\n        if (result) {\n          if (result.type === \"TSInstantiationExpression\") {\n            if (\n              this.match(tt.dot) ||\n              (this.match(tt.questionDot) &&\n                this.lookaheadCharCode() !== charCodes.leftParenthesis)\n            ) {\n              this.raise(\n                TSErrors.InvalidPropertyAccessAfterInstantiationExpression,\n                this.state.startLoc,\n              );\n            }\n            if (!this.match(tt.dot) && !this.match(tt.questionDot)) {\n              // If TSInstantiationExpression is not followed by . / ?.,\n              // it must be the end of a subscript chain. Note that `(` already forms\n              // call expression arguments\n              result.expression = super.stopParseSubscript(base, state);\n            }\n          }\n          return result;\n        }\n      }\n\n      return super.parseSubscript(base, startLoc, noCalls, state);\n    }\n\n    parseNewCallee(node: N.NewExpression): void {\n      super.parseNewCallee(node);\n\n      const { callee } = node;\n      if (\n        callee.type === \"TSInstantiationExpression\" &&\n        !callee.extra?.parenthesized\n      ) {\n        if (process.env.BABEL_8_BREAKING) {\n          node.typeArguments = callee.typeArguments;\n        } else {\n          node.typeParameters = callee.typeParameters;\n        }\n        node.callee = callee.expression;\n      }\n    }\n\n    parseExprOp(\n      left: N.Expression,\n      leftStartLoc: Position,\n      minPrec: number,\n    ): N.Expression {\n      let isSatisfies: boolean;\n      if (\n        tokenOperatorPrecedence(tt._in) > minPrec &&\n        !this.hasPrecedingLineBreak() &&\n        (this.isContextual(tt._as) ||\n          (isSatisfies = this.isContextual(tt._satisfies)))\n      ) {\n        const node = this.startNodeAt<\n          N.TsAsExpression | N.TsSatisfiesExpression\n        >(leftStartLoc);\n        node.expression = left;\n        node.typeAnnotation = this.tsInType(() => {\n          this.next(); // \"as\" or \"satisfies\"\n          if (this.match(tt._const)) {\n            if (isSatisfies) {\n              this.raise(Errors.UnexpectedKeyword, this.state.startLoc, {\n                keyword: \"const\",\n              });\n            }\n            return this.tsParseTypeReference();\n          }\n\n          return this.tsParseType();\n        });\n        this.finishNode(\n          node,\n          isSatisfies ? \"TSSatisfiesExpression\" : \"TSAsExpression\",\n        );\n        // rescan `<`, `>` because they were scanned when this.state.inType was true\n        this.reScan_lt_gt();\n        return this.parseExprOp(\n          // @ts-expect-error todo(flow->ts)\n          node,\n          leftStartLoc,\n          minPrec,\n        );\n      }\n\n      return super.parseExprOp(left, leftStartLoc, minPrec);\n    }\n\n    checkReservedWord(\n      word: string,\n      startLoc: Position,\n      checkKeywords: boolean,\n      isBinding: boolean,\n    ): void {\n      // Strict mode words may be allowed as in `declare namespace N { const static: number; }`.\n      // And we have a type checker anyway, so don't bother having the parser do it.\n      if (!this.state.isAmbientContext) {\n        super.checkReservedWord(word, startLoc, checkKeywords, isBinding);\n      }\n    }\n\n    checkImportReflection(node: Undone<N.ImportDeclaration>) {\n      super.checkImportReflection(node);\n      if (node.module && node.importKind !== \"value\") {\n        this.raise(\n          TSErrors.ImportReflectionHasImportType,\n          node.specifiers[0].loc.start,\n        );\n      }\n    }\n\n    /*\n    Don't bother doing this check in TypeScript code because:\n    1. We may have a nested export statement with the same name:\n      export const x = 0;\n      export namespace N {\n        export const x = 1;\n      }\n    2. We have a type checker to warn us about this sort of thing.\n    */\n    checkDuplicateExports() {}\n\n    isPotentialImportPhase(isExport: boolean): boolean {\n      if (super.isPotentialImportPhase(isExport)) return true;\n      if (this.isContextual(tt._type)) {\n        const ch = this.lookaheadCharCode();\n        return isExport\n          ? ch === charCodes.leftCurlyBrace || ch === charCodes.asterisk\n          : ch !== charCodes.equalsTo;\n      }\n      return !isExport && this.isContextual(tt._typeof);\n    }\n\n    applyImportPhase(\n      node: Undone<N.ImportDeclaration | N.ExportNamedDeclaration>,\n      isExport: boolean,\n      phase: string | null,\n      loc?: Position,\n    ): void {\n      super.applyImportPhase(node, isExport, phase, loc);\n      if (isExport) {\n        (node as N.ExportNamedDeclaration).exportKind =\n          phase === \"type\" ? \"type\" : \"value\";\n      } else {\n        (node as N.ImportDeclaration).importKind =\n          phase === \"type\" || phase === \"typeof\" ? phase : \"value\";\n      }\n    }\n\n    parseImport(\n      node: Undone<N.ImportDeclaration | N.TsImportEqualsDeclaration>,\n    ): N.AnyImport {\n      if (this.match(tt.string)) {\n        node.importKind = \"value\";\n        return super.parseImport(node as Undone<N.ImportDeclaration>);\n      }\n\n      let importNode;\n      if (\n        tokenIsIdentifier(this.state.type) &&\n        this.lookaheadCharCode() === charCodes.equalsTo\n      ) {\n        node.importKind = \"value\";\n        return this.tsParseImportEqualsDeclaration(\n          node as Undone<N.TsImportEqualsDeclaration>,\n        );\n      } else if (this.isContextual(tt._type)) {\n        const maybeDefaultIdentifier = this.parseMaybeImportPhase(\n          node as Undone<N.ImportDeclaration>,\n          /* isExport */ false,\n        );\n        if (this.lookaheadCharCode() === charCodes.equalsTo) {\n          return this.tsParseImportEqualsDeclaration(\n            node as Undone<N.TsImportEqualsDeclaration>,\n            maybeDefaultIdentifier,\n          );\n        } else {\n          importNode = super.parseImportSpecifiersAndAfter(\n            node as Undone<N.ImportDeclaration>,\n            maybeDefaultIdentifier,\n          );\n        }\n      } else {\n        importNode = super.parseImport(node as Undone<N.ImportDeclaration>);\n      }\n\n      // `import type` can only be used on imports with named imports or with a\n      // default import - but not both\n      if (\n        importNode.importKind === \"type\" &&\n        // @ts-expect-error refine typings\n        importNode.specifiers.length > 1 &&\n        // @ts-expect-error refine typings\n        importNode.specifiers[0].type === \"ImportDefaultSpecifier\"\n      ) {\n        this.raise(TSErrors.TypeImportCannotSpecifyDefaultAndNamed, importNode);\n      }\n\n      return importNode;\n    }\n\n    parseExport(\n      node: Undone<\n        | N.ExportDefaultDeclaration\n        | N.ExportAllDeclaration\n        | N.ExportNamedDeclaration\n      >,\n      decorators: N.Decorator[] | null,\n    ): N.AnyExport {\n      if (this.match(tt._import)) {\n        // `export import A = B;`\n        const nodeImportEquals = process.env.BABEL_8_BREAKING\n          ? this.startNode<N.TsImportEqualsDeclaration>()\n          : (node as Undone<N.TsImportEqualsDeclaration>);\n        this.next(); // eat `tt._import`\n        let maybeDefaultIdentifier: N.Identifier | null = null;\n        if (\n          this.isContextual(tt._type) &&\n          // We pass false here, because we are parsing an `import ... =`\n          this.isPotentialImportPhase(/* isExport */ false)\n        ) {\n          maybeDefaultIdentifier = this.parseMaybeImportPhase(\n            nodeImportEquals,\n            /* isExport */ false,\n          );\n        } else {\n          nodeImportEquals.importKind = \"value\";\n        }\n        const declaration = this.tsParseImportEqualsDeclaration(\n          nodeImportEquals,\n          maybeDefaultIdentifier,\n          /* isExport */ true,\n        );\n        if (process.env.BABEL_8_BREAKING) {\n          (node as Undone<N.ExportNamedDeclaration>).attributes = [];\n          (node as Undone<N.ExportNamedDeclaration>).declaration = declaration;\n          (node as Undone<N.ExportNamedDeclaration>).exportKind = \"value\";\n          (node as Undone<N.ExportNamedDeclaration>).source = null;\n          (node as Undone<N.ExportNamedDeclaration>).specifiers = [];\n          return this.finishNode(node, \"ExportNamedDeclaration\");\n        } else {\n          return declaration;\n        }\n      } else if (this.eat(tt.eq)) {\n        // `export = x;`\n        const assign = node as Undone<N.TsExportAssignment>;\n        assign.expression = super.parseExpression();\n        this.semicolon();\n        this.sawUnambiguousESM = true;\n        return this.finishNode(assign, \"TSExportAssignment\");\n      } else if (this.eatContextual(tt._as)) {\n        // `export as namespace A;`\n        const decl = node as Undone<N.TsNamespaceExportDeclaration>;\n        // See `parseNamespaceExportDeclaration` in TypeScript's own parser\n        this.expectContextual(tt._namespace);\n        decl.id = this.parseIdentifier();\n        this.semicolon();\n        return this.finishNode(decl, \"TSNamespaceExportDeclaration\");\n      } else {\n        return super.parseExport(\n          node as Undone<N.ExportAllDeclaration | N.ExportDefaultDeclaration>,\n          decorators,\n        );\n      }\n    }\n\n    isAbstractClass(): boolean {\n      return (\n        this.isContextual(tt._abstract) && this.isLookaheadContextual(\"class\")\n      );\n    }\n\n    parseExportDefaultExpression(): N.ExportDefaultDeclaration[\"declaration\"] {\n      if (this.isAbstractClass()) {\n        const cls = this.startNode<N.Class>();\n        this.next(); // Skip \"abstract\"\n        cls.abstract = true;\n        return this.parseClass(cls, true, true);\n      }\n\n      // export default interface allowed in:\n      // https://github.com/Microsoft/TypeScript/pull/16040\n      if (this.match(tt._interface)) {\n        const result = this.tsParseInterfaceDeclaration(\n          this.startNode<N.TsInterfaceDeclaration>(),\n        );\n        if (result) return result;\n      }\n\n      return super.parseExportDefaultExpression();\n    }\n\n    parseVarStatement(\n      node: N.VariableDeclaration,\n      kind: \"var\" | \"let\" | \"const\" | \"using\" | \"await using\",\n      allowMissingInitializer: boolean = false,\n    ) {\n      const { isAmbientContext } = this.state;\n      const declaration = super.parseVarStatement(\n        node,\n        kind,\n        allowMissingInitializer || isAmbientContext,\n      );\n\n      if (!isAmbientContext) return declaration;\n\n      // If node.declare is true, the error has already been raised in tsTryParseDeclare.\n      if (!node.declare && (kind === \"using\" || kind === \"await using\")) {\n        this.raiseOverwrite(\n          TSErrors.UsingDeclarationInAmbientContext,\n          node,\n          kind,\n        );\n        return declaration;\n      }\n\n      for (const { id, init } of declaration.declarations) {\n        // Empty initializer is the easy case that we want.\n        if (!init) continue;\n\n        // var and let aren't ever allowed initializers.\n        if (kind === \"var\" || kind === \"let\" || !!id.typeAnnotation) {\n          this.raise(TSErrors.InitializerNotAllowedInAmbientContext, init);\n        } else if (\n          !isValidAmbientConstInitializer(init, this.hasPlugin(\"estree\"))\n        ) {\n          this.raise(\n            TSErrors.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,\n            init,\n          );\n        }\n      }\n\n      return declaration;\n    }\n\n    parseStatementContent(\n      flags: ParseStatementFlag,\n      decorators?: N.Decorator[] | null,\n    ): N.Statement {\n      if (this.match(tt._const) && this.isLookaheadContextual(\"enum\")) {\n        const node = this.startNode<N.TsEnumDeclaration>();\n        this.expect(tt._const); // eat 'const'\n        return this.tsParseEnumDeclaration(node, { const: true });\n      }\n\n      if (this.isContextual(tt._enum)) {\n        return this.tsParseEnumDeclaration(\n          this.startNode<N.TsEnumDeclaration>(),\n        );\n      }\n\n      if (this.isContextual(tt._interface)) {\n        const result = this.tsParseInterfaceDeclaration(this.startNode());\n        if (result) return result;\n      }\n\n      return super.parseStatementContent(flags, decorators);\n    }\n\n    parseAccessModifier(): N.Accessibility | undefined | null {\n      return this.tsParseModifier([\"public\", \"protected\", \"private\"]);\n    }\n\n    tsHasSomeModifiers(member: any, modifiers: readonly TsModifier[]): boolean {\n      return modifiers.some(modifier => {\n        if (tsIsAccessModifier(modifier)) {\n          return member.accessibility === modifier;\n        }\n        return !!member[modifier];\n      });\n    }\n\n    tsIsStartOfStaticBlocks() {\n      return (\n        this.isContextual(tt._static) &&\n        this.lookaheadCharCode() === charCodes.leftCurlyBrace\n      );\n    }\n\n    parseClassMember(\n      classBody: N.ClassBody,\n      member: any,\n      state: N.ParseClassMemberState,\n    ): void {\n      const modifiers = [\n        \"declare\",\n        \"private\",\n        \"public\",\n        \"protected\",\n        \"override\",\n        \"abstract\",\n        \"readonly\",\n        \"static\",\n      ] as const;\n      this.tsParseModifiers(\n        {\n          allowedModifiers: modifiers,\n          disallowedModifiers: [\"in\", \"out\"],\n          stopOnStartOfClassStaticBlock: true,\n          errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions,\n        },\n        member,\n      );\n\n      const callParseClassMemberWithIsStatic = () => {\n        if (this.tsIsStartOfStaticBlocks()) {\n          this.next(); // eat \"static\"\n          this.next(); // eat \"{\"\n          if (this.tsHasSomeModifiers(member, modifiers)) {\n            this.raise(\n              TSErrors.StaticBlockCannotHaveModifier,\n              this.state.curPosition(),\n            );\n          }\n          super.parseClassStaticBlock(classBody, member as N.StaticBlock);\n        } else {\n          this.parseClassMemberWithIsStatic(\n            classBody,\n            member,\n            state,\n            !!member.static,\n          );\n        }\n      };\n      if (member.declare) {\n        this.tsInAmbientContext(callParseClassMemberWithIsStatic);\n      } else {\n        callParseClassMemberWithIsStatic();\n      }\n    }\n\n    parseClassMemberWithIsStatic(\n      classBody: N.ClassBody,\n      member: Undone<N.ClassMember | N.TsIndexSignature>,\n      state: N.ParseClassMemberState,\n      isStatic: boolean,\n    ): void {\n      const idx = this.tsTryParseIndexSignature(\n        member as Undone<N.TsIndexSignature>,\n      );\n      if (idx) {\n        classBody.body.push(idx);\n\n        if ((member as any).abstract) {\n          this.raise(TSErrors.IndexSignatureHasAbstract, member);\n        }\n        if ((member as any).accessibility) {\n          this.raise(TSErrors.IndexSignatureHasAccessibility, member, {\n            modifier: (member as any).accessibility,\n          });\n        }\n        if ((member as any).declare) {\n          this.raise(TSErrors.IndexSignatureHasDeclare, member);\n        }\n        if ((member as any).override) {\n          this.raise(TSErrors.IndexSignatureHasOverride, member);\n        }\n\n        return;\n      }\n\n      if (!this.state.inAbstractClass && (member as any).abstract) {\n        this.raise(TSErrors.NonAbstractClassHasAbstractMethod, member);\n      }\n\n      if ((member as any).override) {\n        if (!state.hadSuperClass) {\n          this.raise(TSErrors.OverrideNotInSubClass, member);\n        }\n      }\n\n      /*:: invariant(member.type !== \"TSIndexSignature\") */\n\n      super.parseClassMemberWithIsStatic(\n        classBody,\n        member as Undone<N.ClassMember>,\n        state,\n        isStatic,\n      );\n    }\n\n    parsePostMemberNameModifiers(\n      methodOrProp: N.ClassMethod | N.ClassProperty | N.ClassPrivateProperty,\n    ): void {\n      const optional = this.eat(tt.question);\n      if (optional) methodOrProp.optional = true;\n\n      if ((methodOrProp as any).readonly && this.match(tt.parenL)) {\n        this.raise(TSErrors.ClassMethodHasReadonly, methodOrProp);\n      }\n\n      if ((methodOrProp as any).declare && this.match(tt.parenL)) {\n        this.raise(TSErrors.ClassMethodHasDeclare, methodOrProp);\n      }\n    }\n\n    // Note: The reason we do this in `parseExpressionStatement` and not `parseStatement`\n    // is that e.g. `type()` is valid JS, so we must try parsing that first.\n    // If it's really a type, we will parse `type` as the statement, and can correct it here\n    // by parsing the rest.\n    // @ts-expect-error plugin overrides interfaces\n    parseExpressionStatement(\n      node: Undone<N.ExpressionStatement>,\n      expr: N.Expression,\n      decorators: N.Decorator[] | null,\n    ): N.Statement {\n      const decl =\n        expr.type === \"Identifier\"\n          ? // @ts-expect-error refine typings\n            this.tsParseExpressionStatement(node, expr, decorators)\n          : undefined;\n      return decl || super.parseExpressionStatement(node, expr, decorators);\n    }\n\n    // export type\n    // Should be true for anything parsed by `tsTryParseExportDeclaration`.\n    shouldParseExportDeclaration(): boolean {\n      if (this.tsIsDeclarationStart()) return true;\n      return super.shouldParseExportDeclaration();\n    }\n\n    // An apparent conditional expression could actually be an optional parameter in an arrow function.\n    parseConditional(\n      expr: N.Expression,\n\n      startLoc: Position,\n      refExpressionErrors?: ExpressionErrors | null,\n    ): N.Expression {\n      if (!this.match(tt.question)) return expr;\n\n      if (this.state.maybeInArrowParameters) {\n        const nextCh = this.lookaheadCharCode();\n        // These tokens cannot start an expression, so if one of them follows\n        // ? then we are probably in an arrow function parameters list and we\n        // don't parse the conditional expression.\n        if (\n          nextCh === charCodes.comma || // (a?, b) => c\n          nextCh === charCodes.equalsTo || // (a? = b) => c\n          nextCh === charCodes.colon || // (a?: b) => c\n          nextCh === charCodes.rightParenthesis // (a?) => c\n        ) {\n          /*:: invariant(refExpressionErrors != null) */\n          this.setOptionalParametersError(refExpressionErrors);\n          return expr;\n        }\n      }\n\n      return super.parseConditional(expr, startLoc, refExpressionErrors);\n    }\n\n    // Note: These \"type casts\" are *not* valid TS expressions.\n    // But we parse them here and change them when completing the arrow function.\n    parseParenItem<T extends N.Expression | N.RestElement | N.SpreadElement>(\n      node: T,\n      startLoc: Position,\n    ): T | N.TsTypeCastExpression {\n      const newNode = super.parseParenItem(node, startLoc);\n      if (this.eat(tt.question)) {\n        (newNode as N.Identifier).optional = true;\n        // Include questionmark in location of node\n        // Don't use this.finishNode() as otherwise we might process comments twice and\n        // include already consumed parens\n        this.resetEndLocation(node);\n      }\n\n      if (this.match(tt.colon)) {\n        const typeCastNode = this.startNodeAt<N.TsTypeCastExpression>(startLoc);\n        typeCastNode.expression = node as N.Expression;\n        typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();\n\n        return this.finishNode(typeCastNode, \"TSTypeCastExpression\");\n      }\n\n      return node;\n    }\n\n    parseExportDeclaration(\n      node: N.ExportNamedDeclaration,\n    ): N.Declaration | undefined | null {\n      if (!this.state.isAmbientContext && this.isContextual(tt._declare)) {\n        return this.tsInAmbientContext(() => this.parseExportDeclaration(node));\n      }\n\n      // Store original location\n      const startLoc = this.state.startLoc;\n\n      const isDeclare = this.eatContextual(tt._declare);\n\n      if (\n        isDeclare &&\n        (this.isContextual(tt._declare) || !this.shouldParseExportDeclaration())\n      ) {\n        throw this.raise(\n          TSErrors.ExpectedAmbientAfterExportDeclare,\n          this.state.startLoc,\n        );\n      }\n\n      const isIdentifier = tokenIsIdentifier(this.state.type);\n      const declaration: N.Declaration | undefined | null =\n        (isIdentifier && this.tsTryParseExportDeclaration()) ||\n        super.parseExportDeclaration(node);\n\n      if (!declaration) return null;\n\n      if (\n        declaration.type === \"TSInterfaceDeclaration\" ||\n        declaration.type === \"TSTypeAliasDeclaration\" ||\n        isDeclare\n      ) {\n        node.exportKind = \"type\";\n      }\n\n      if (isDeclare && declaration.type !== \"TSImportEqualsDeclaration\") {\n        // Reset location to include `declare` in range\n        this.resetStartLocation(declaration, startLoc);\n\n        declaration.declare = true;\n      }\n\n      return declaration;\n    }\n\n    parseClassId(\n      node: N.Class,\n      isStatement: boolean,\n      optionalId?: boolean | null,\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      bindingType?: BindingFlag,\n    ): void {\n      if ((!isStatement || optionalId) && this.isContextual(tt._implements)) {\n        return;\n      }\n\n      super.parseClassId(\n        node,\n        isStatement,\n        optionalId,\n        (node as any).declare\n          ? BindingFlag.TYPE_TS_AMBIENT\n          : BindingFlag.TYPE_CLASS,\n      );\n      const typeParameters = this.tsTryParseTypeParameters(\n        this.tsParseInOutConstModifiers,\n      );\n      if (typeParameters) node.typeParameters = typeParameters;\n    }\n\n    parseClassPropertyAnnotation(\n      node: N.ClassProperty | N.ClassPrivateProperty | N.ClassAccessorProperty,\n    ): void {\n      if (!node.optional) {\n        if (this.eat(tt.bang)) {\n          node.definite = true;\n        } else if (this.eat(tt.question)) {\n          node.optional = true;\n        }\n      }\n\n      const type = this.tsTryParseTypeAnnotation();\n      if (type) node.typeAnnotation = type;\n    }\n\n    parseClassProperty(node: N.ClassProperty): N.ClassProperty {\n      this.parseClassPropertyAnnotation(node);\n\n      if (\n        this.state.isAmbientContext &&\n        !(node.readonly && !node.typeAnnotation) &&\n        this.match(tt.eq)\n      ) {\n        this.raise(\n          TSErrors.DeclareClassFieldHasInitializer,\n          this.state.startLoc,\n        );\n      }\n      if (node.abstract && this.match(tt.eq)) {\n        const { key } = node;\n        this.raise(\n          TSErrors.AbstractPropertyHasInitializer,\n          this.state.startLoc,\n          {\n            propertyName:\n              key.type === \"Identifier\" && !node.computed\n                ? key.name\n                : `[${this.input.slice(this.offsetToSourcePos(key.start), this.offsetToSourcePos(key.end))}]`,\n          },\n        );\n      }\n\n      return super.parseClassProperty(node);\n    }\n\n    parseClassPrivateProperty(\n      node: N.ClassPrivateProperty,\n    ): N.ClassPrivateProperty {\n      if (node.abstract) {\n        this.raise(TSErrors.PrivateElementHasAbstract, node);\n      }\n\n      if (node.accessibility) {\n        this.raise(TSErrors.PrivateElementHasAccessibility, node, {\n          modifier: node.accessibility,\n        });\n      }\n\n      this.parseClassPropertyAnnotation(node);\n      return super.parseClassPrivateProperty(node);\n    }\n\n    parseClassAccessorProperty(\n      node: N.ClassAccessorProperty,\n    ): N.ClassAccessorProperty {\n      this.parseClassPropertyAnnotation(node);\n      if (node.optional) {\n        this.raise(TSErrors.AccessorCannotBeOptional, node);\n      }\n      return super.parseClassAccessorProperty(node);\n    }\n\n    pushClassMethod(\n      classBody: N.ClassBody,\n      method: N.ClassMethod,\n      isGenerator: boolean,\n      isAsync: boolean,\n      isConstructor: boolean,\n      allowsDirectSuper: boolean,\n    ): void {\n      const typeParameters = this.tsTryParseTypeParameters(\n        this.tsParseConstModifier,\n      );\n      if (typeParameters && isConstructor) {\n        this.raise(TSErrors.ConstructorHasTypeParameters, typeParameters);\n      }\n\n      const { declare = false, kind } = method;\n\n      if (declare && (kind === \"get\" || kind === \"set\")) {\n        this.raise(TSErrors.DeclareAccessor, method, { kind });\n      }\n      if (typeParameters) method.typeParameters = typeParameters;\n      super.pushClassMethod(\n        classBody,\n        method,\n        isGenerator,\n        isAsync,\n        isConstructor,\n        allowsDirectSuper,\n      );\n    }\n\n    pushClassPrivateMethod(\n      classBody: N.ClassBody,\n      method: N.ClassPrivateMethod,\n      isGenerator: boolean,\n      isAsync: boolean,\n    ): void {\n      const typeParameters = this.tsTryParseTypeParameters(\n        this.tsParseConstModifier,\n      );\n      if (typeParameters) method.typeParameters = typeParameters;\n      super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);\n    }\n\n    declareClassPrivateMethodInScope(\n      node: N.ClassPrivateMethod | N.TSDeclareMethod,\n      kind: number,\n    ) {\n      if (node.type === \"TSDeclareMethod\") return;\n      // This happens when using the \"estree\" plugin.\n      if (\n        (node as N.Node).type === \"MethodDefinition\" &&\n        (node as unknown as N.EstreeMethodDefinition).value.body == null\n      ) {\n        return;\n      }\n\n      super.declareClassPrivateMethodInScope(node, kind);\n    }\n\n    parseClassSuper(node: N.Class): void {\n      super.parseClassSuper(node);\n      // handle `extends f<<T>\n      if (node.superClass && (this.match(tt.lt) || this.match(tt.bitShiftL))) {\n        if (process.env.BABEL_8_BREAKING) {\n          node.superTypeArguments = this.tsParseTypeArgumentsInExpression();\n        } else {\n          node.superTypeParameters = this.tsParseTypeArgumentsInExpression();\n        }\n      }\n      if (this.eatContextual(tt._implements)) {\n        node.implements = this.tsParseHeritageClause(\"implements\");\n      }\n    }\n\n    parseObjPropValue<T extends N.ObjectMember>(\n      prop: Undone<T>,\n      startLoc: Position | undefined | null,\n      isGenerator: boolean,\n      isAsync: boolean,\n      isPattern: boolean,\n      isAccessor: boolean,\n      refExpressionErrors?: ExpressionErrors | null,\n    ): T {\n      const typeParameters = this.tsTryParseTypeParameters(\n        this.tsParseConstModifier,\n      );\n      if (typeParameters) prop.typeParameters = typeParameters;\n\n      return super.parseObjPropValue(\n        prop,\n\n        startLoc,\n        isGenerator,\n        isAsync,\n        isPattern,\n        isAccessor,\n        refExpressionErrors,\n      );\n    }\n\n    parseFunctionParams(node: N.Function, isConstructor: boolean): void {\n      const typeParameters = this.tsTryParseTypeParameters(\n        this.tsParseConstModifier,\n      );\n      if (typeParameters) node.typeParameters = typeParameters;\n      super.parseFunctionParams(node, isConstructor);\n    }\n\n    // `let x: number;`\n    parseVarId(\n      decl: N.VariableDeclarator,\n      kind: \"var\" | \"let\" | \"const\" | \"using\" | \"await using\",\n    ): void {\n      super.parseVarId(decl, kind);\n      if (\n        decl.id.type === \"Identifier\" &&\n        !this.hasPrecedingLineBreak() &&\n        this.eat(tt.bang)\n      ) {\n        decl.definite = true;\n      }\n\n      const type = this.tsTryParseTypeAnnotation();\n      if (type) {\n        decl.id.typeAnnotation = type;\n        this.resetEndLocation(decl.id); // set end position to end of type\n      }\n    }\n\n    // parse the return type of an async arrow function - let foo = (async (): number => {});\n    parseAsyncArrowFromCallExpression(\n      node: N.ArrowFunctionExpression,\n      call: N.CallExpression,\n    ): N.ArrowFunctionExpression {\n      if (this.match(tt.colon)) {\n        node.returnType = this.tsParseTypeAnnotation();\n      }\n      return super.parseAsyncArrowFromCallExpression(node, call);\n    }\n\n    parseMaybeAssign(\n      refExpressionErrors?: ExpressionErrors | null,\n      afterLeftParse?: Function,\n    ): N.Expression {\n      // Note: When the JSX plugin is on, type assertions (`<T> x`) aren't valid syntax.\n\n      let state: State | undefined | null;\n      let jsx;\n      let typeCast;\n\n      if (\n        this.hasPlugin(\"jsx\") &&\n        (this.match(tt.jsxTagStart) || this.match(tt.lt))\n      ) {\n        // Prefer to parse JSX if possible. But may be an arrow fn.\n        state = this.state.clone();\n\n        jsx = this.tryParse(\n          () => super.parseMaybeAssign(refExpressionErrors, afterLeftParse),\n          state,\n        );\n\n        /*:: invariant(!jsx.aborted) */\n        /*:: invariant(jsx.node != null) */\n        if (!jsx.error) return jsx.node;\n\n        // Remove `tc.j_expr` or `tc.j_oTag` from context added\n        // by parsing `jsxTagStart` to stop the JSX plugin from\n        // messing with the tokens\n        const { context } = this.state;\n        const currentContext = context[context.length - 1];\n        if (currentContext === tc.j_oTag || currentContext === tc.j_expr) {\n          context.pop();\n        }\n      }\n\n      if (!jsx?.error && !this.match(tt.lt)) {\n        return super.parseMaybeAssign(refExpressionErrors, afterLeftParse);\n      }\n\n      // Either way, we're looking at a '<': tt.jsxTagStart or relational.\n\n      // If the state was cloned in the JSX parsing branch above but there\n      // have been any error in the tryParse call, this.state is set to state\n      // so we still need to clone it.\n      if (!state || state === this.state) state = this.state.clone();\n\n      let typeParameters: N.TsTypeParameterDeclaration | undefined | null;\n      // We need to explicitly annotate 'abort' for microsoft/TypeScript#58170\n      const arrow = this.tryParse((abort: () => never) => {\n        // This is similar to TypeScript's `tryParseParenthesizedArrowFunctionExpression`.\n        typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier);\n        const expr = super.parseMaybeAssign(\n          refExpressionErrors,\n          afterLeftParse,\n        );\n\n        if (\n          expr.type !== \"ArrowFunctionExpression\" ||\n          expr.extra?.parenthesized\n        ) {\n          abort();\n        }\n\n        // Correct TypeScript code should have at least 1 type parameter, but don't crash on bad code.\n        if (typeParameters?.params.length !== 0) {\n          this.resetStartLocationFromNode(expr, typeParameters);\n        }\n        expr.typeParameters = typeParameters;\n\n        if (process.env.BABEL_8_BREAKING) {\n          if (\n            this.hasPlugin(\"jsx\") &&\n            expr.typeParameters.params.length === 1 &&\n            !expr.typeParameters.extra?.trailingComma\n          ) {\n            // report error if single type parameter used without trailing comma.\n            const parameter = expr.typeParameters\n              .params[0] as N.TsTypeParameter;\n            if (!parameter.constraint) {\n              // A single type parameter must either have constraints\n              // or a trailing comma, otherwise it's ambiguous with JSX.\n              this.raise(\n                TSErrors.SingleTypeParameterWithoutTrailingComma,\n                createPositionWithColumnOffset(parameter.loc.end, 1),\n                {\n                  typeParameterName: process.env.BABEL_8_BREAKING\n                    ? (parameter.name as N.Identifier).name\n                    : (parameter.name as string),\n                },\n              );\n            }\n          }\n        }\n\n        return expr;\n      }, state);\n\n      /*:: invariant(arrow.node != null) */\n      if (!arrow.error && !arrow.aborted) {\n        // This error is reported outside of the this.tryParse call so that\n        // in case of <T>(x) => 2, we don't consider <T>(x) as a type assertion\n        // because of this error.\n        if (typeParameters) this.reportReservedArrowTypeParam(typeParameters);\n        return arrow.node;\n      }\n\n      if (!jsx) {\n        // Try parsing a type cast instead of an arrow function.\n        // This will never happen outside of JSX.\n        // (Because in JSX the '<' should be a jsxTagStart and not a relational.\n        assert(!this.hasPlugin(\"jsx\"));\n\n        // This will start with a type assertion (via parseMaybeUnary).\n        // But don't directly call `this.tsParseTypeAssertion` because we want to handle any binary after it.\n        typeCast = this.tryParse(\n          () => super.parseMaybeAssign(refExpressionErrors, afterLeftParse),\n          state,\n        );\n        /*:: invariant(!typeCast.aborted) */\n        /*:: invariant(typeCast.node != null) */\n        if (!typeCast.error) return typeCast.node;\n      }\n\n      if (jsx?.node) {\n        /*:: invariant(jsx.failState) */\n        this.state = jsx.failState;\n        return jsx.node;\n      }\n\n      if (arrow.node) {\n        /*:: invariant(arrow.failState) */\n        this.state = arrow.failState;\n        if (typeParameters) this.reportReservedArrowTypeParam(typeParameters);\n        return arrow.node;\n      }\n\n      if (typeCast?.node) {\n        /*:: invariant(typeCast.failState) */\n        this.state = typeCast.failState;\n        return typeCast.node;\n      }\n\n      throw jsx?.error || arrow.error || typeCast?.error;\n    }\n\n    reportReservedArrowTypeParam(node: any) {\n      if (\n        node.params.length === 1 &&\n        !node.params[0].constraint &&\n        !node.extra?.trailingComma &&\n        this.getPluginOption(\"typescript\", \"disallowAmbiguousJSXLike\")\n      ) {\n        this.raise(TSErrors.ReservedArrowTypeParam, node);\n      }\n    }\n\n    // Handle type assertions\n    parseMaybeUnary(\n      refExpressionErrors?: ExpressionErrors | null,\n      sawUnary?: boolean,\n    ): N.Expression {\n      if (!this.hasPlugin(\"jsx\") && this.match(tt.lt)) {\n        return this.tsParseTypeAssertion();\n      }\n      return super.parseMaybeUnary(refExpressionErrors, sawUnary);\n    }\n\n    parseArrow(\n      node: Undone<N.ArrowFunctionExpression>,\n    ): Undone<N.ArrowFunctionExpression> | undefined | null {\n      if (this.match(tt.colon)) {\n        // This is different from how the TS parser does it.\n        // TS uses lookahead. The Babel Parser parses it as a parenthesized expression and converts.\n\n        const result = this.tryParse(abort => {\n          const returnType = this.tsParseTypeOrTypePredicateAnnotation(\n            tt.colon,\n          );\n          if (this.canInsertSemicolon() || !this.match(tt.arrow)) abort();\n          return returnType;\n        });\n\n        if (result.aborted) return;\n\n        if (!result.thrown) {\n          if (result.error) this.state = result.failState;\n          // @ts-expect-error refine typings\n          node.returnType = result.node;\n        }\n      }\n\n      return super.parseArrow(node);\n    }\n\n    // Allow type annotations inside of a parameter list.\n    parseFunctionParamType(param: N.Pattern) {\n      if (this.eat(tt.question)) {\n        (param as any as N.Identifier).optional = true;\n      }\n      const type = this.tsTryParseTypeAnnotation();\n      if (type) param.typeAnnotation = type;\n      this.resetEndLocation(param);\n\n      return param;\n    }\n\n    isAssignable(node: N.Node, isBinding?: boolean): boolean {\n      switch (node.type) {\n        case \"TSTypeCastExpression\":\n          return this.isAssignable(node.expression, isBinding);\n        case \"TSParameterProperty\":\n          return true;\n        default:\n          return super.isAssignable(node, isBinding);\n      }\n    }\n\n    toAssignable(node: N.Node, isLHS: boolean = false): void {\n      switch (node.type) {\n        case \"ParenthesizedExpression\":\n          this.toAssignableParenthesizedExpression(node, isLHS);\n          break;\n        case \"TSAsExpression\":\n        case \"TSSatisfiesExpression\":\n        case \"TSNonNullExpression\":\n        case \"TSTypeAssertion\":\n          if (isLHS) {\n            this.expressionScope.recordArrowParameterBindingError(\n              TSErrors.UnexpectedTypeCastInParameter,\n              node,\n            );\n          } else {\n            this.raise(TSErrors.UnexpectedTypeCastInParameter, node);\n          }\n          this.toAssignable(node.expression, isLHS);\n          break;\n        case \"AssignmentExpression\":\n          if (!isLHS && node.left.type === \"TSTypeCastExpression\") {\n            node.left = this.typeCastToParameter(node.left) as N.Assignable;\n          }\n        /* fall through */\n        default:\n          super.toAssignable(node, isLHS);\n      }\n    }\n\n    toAssignableParenthesizedExpression(\n      node: N.ParenthesizedExpression,\n      isLHS: boolean,\n    ): void {\n      switch (node.expression.type) {\n        case \"TSAsExpression\":\n        case \"TSSatisfiesExpression\":\n        case \"TSNonNullExpression\":\n        case \"TSTypeAssertion\":\n        case \"ParenthesizedExpression\":\n          this.toAssignable(node.expression, isLHS);\n          break;\n        default:\n          super.toAssignable(node, isLHS);\n      }\n    }\n\n    checkToRestConversion(node: N.Node, allowPattern: boolean): void {\n      switch (node.type) {\n        case \"TSAsExpression\":\n        case \"TSSatisfiesExpression\":\n        case \"TSTypeAssertion\":\n        case \"TSNonNullExpression\":\n          this.checkToRestConversion(node.expression, false);\n          break;\n        default:\n          super.checkToRestConversion(node, allowPattern);\n      }\n    }\n\n    isValidLVal(\n      type:\n        | \"TSTypeCastExpression\"\n        | \"TSParameterProperty\"\n        | \"TSNonNullExpression\"\n        | \"TSInstantiationExpression\"\n        | \"TSAsExpression\"\n        | \"TSSatisfiesExpression\"\n        | \"TSTypeAssertion\",\n      isUnparenthesizedInAssign: boolean,\n      binding: BindingFlag,\n    ) {\n      switch (type) {\n        // Allow \"typecasts\" to appear on the left of assignment expressions,\n        // because it may be in an arrow function.\n        // e.g. `const f = (foo: number = 0) => foo;`\n        case \"TSTypeCastExpression\":\n          return true;\n        case \"TSParameterProperty\":\n          return \"parameter\";\n        case \"TSNonNullExpression\":\n          return \"expression\";\n        case \"TSAsExpression\":\n        case \"TSSatisfiesExpression\":\n        case \"TSTypeAssertion\":\n          return (\n            (binding !== BindingFlag.TYPE_NONE || !isUnparenthesizedInAssign) &&\n            ([\"expression\", true] as [string, boolean])\n          );\n        default:\n          return super.isValidLVal(type, isUnparenthesizedInAssign, binding);\n      }\n    }\n\n    parseBindingAtom(): N.Pattern {\n      if (this.state.type === tt._this) {\n        return this.parseIdentifier(/* liberal */ true);\n      }\n      return super.parseBindingAtom();\n    }\n\n    parseMaybeDecoratorArguments(\n      expr: N.Expression,\n      startLoc: Position,\n    ): N.Expression {\n      // handles `@f<<T>`\n      if (this.match(tt.lt) || this.match(tt.bitShiftL)) {\n        const typeArguments = this.tsParseTypeArgumentsInExpression();\n\n        if (this.match(tt.parenL)) {\n          const call = super.parseMaybeDecoratorArguments(\n            expr,\n            startLoc,\n          ) as N.CallExpression;\n          if (process.env.BABEL_8_BREAKING) {\n            call.typeArguments = typeArguments;\n          } else {\n            call.typeParameters = typeArguments;\n          }\n\n          return call;\n        }\n\n        this.unexpected(null, tt.parenL);\n      }\n\n      return super.parseMaybeDecoratorArguments(expr, startLoc);\n    }\n\n    checkCommaAfterRest(\n      close: (typeof charCodes)[keyof typeof charCodes],\n    ): boolean {\n      if (\n        this.state.isAmbientContext &&\n        this.match(tt.comma) &&\n        this.lookaheadCharCode() === close\n      ) {\n        this.next();\n        return false;\n      }\n      return super.checkCommaAfterRest(close);\n    }\n\n    // === === === === === === === === === === === === === === === ===\n    // Note: All below methods are duplicates of something in flow.js.\n    // Not sure what the best way to combine these is.\n    // === === === === === === === === === === === === === === === ===\n\n    isClassMethod(): boolean {\n      return this.match(tt.lt) || super.isClassMethod();\n    }\n\n    isClassProperty(): boolean {\n      return (\n        this.match(tt.bang) || this.match(tt.colon) || super.isClassProperty()\n      );\n    }\n\n    parseMaybeDefault<P extends N.Pattern>(\n      startLoc?: Position | null,\n      left?: P | null,\n    ): P | N.AssignmentPattern {\n      const node = super.parseMaybeDefault(startLoc, left);\n\n      if (\n        node.type === \"AssignmentPattern\" &&\n        node.typeAnnotation &&\n        node.right.start < node.typeAnnotation.start\n      ) {\n        this.raise(TSErrors.TypeAnnotationAfterAssign, node.typeAnnotation);\n      }\n\n      return node;\n    }\n\n    // ensure that inside types, we bypass the jsx parser plugin\n    getTokenFromCode(code: number): void {\n      if (this.state.inType) {\n        if (code === charCodes.greaterThan) {\n          this.finishOp(tt.gt, 1);\n          return;\n        }\n        if (code === charCodes.lessThan) {\n          this.finishOp(tt.lt, 1);\n          return;\n        }\n      }\n      super.getTokenFromCode(code);\n    }\n\n    // used after we have finished parsing types\n    reScan_lt_gt() {\n      const { type } = this.state;\n      if (type === tt.lt) {\n        this.state.pos -= 1;\n        this.readToken_lt();\n      } else if (type === tt.gt) {\n        this.state.pos -= 1;\n        this.readToken_gt();\n      }\n    }\n\n    reScan_lt() {\n      const { type } = this.state;\n      if (type === tt.bitShiftL) {\n        this.state.pos -= 2;\n        this.finishOp(tt.lt, 1);\n        return tt.lt;\n      }\n      return type;\n    }\n\n    toAssignableListItem(\n      exprList: (N.Expression | N.SpreadElement | N.RestElement)[],\n      index: number,\n      isLHS: boolean,\n    ): void {\n      const node = exprList[index];\n      if (node.type === \"TSTypeCastExpression\") {\n        exprList[index] = this.typeCastToParameter(node);\n      }\n      super.toAssignableListItem(exprList, index, isLHS);\n    }\n\n    typeCastToParameter(node: N.TsTypeCastExpression): N.Expression {\n      (node.expression as N.Identifier).typeAnnotation = node.typeAnnotation;\n\n      this.resetEndLocation(node.expression, node.typeAnnotation.loc.end);\n\n      return node.expression;\n    }\n\n    shouldParseArrow(params: Array<N.Node>) {\n      if (this.match(tt.colon)) {\n        return params.every(expr => this.isAssignable(expr, true));\n      }\n      return super.shouldParseArrow(params);\n    }\n\n    shouldParseAsyncArrow(): boolean {\n      return this.match(tt.colon) || super.shouldParseAsyncArrow();\n    }\n\n    canHaveLeadingDecorator() {\n      // Avoid unnecessary lookahead in checking for abstract class unless needed!\n      return super.canHaveLeadingDecorator() || this.isAbstractClass();\n    }\n\n    jsxParseOpeningElementAfterName(\n      node: N.JSXOpeningElement,\n    ): N.JSXOpeningElement {\n      // handles `<Component<<T>`\n      if (this.match(tt.lt) || this.match(tt.bitShiftL)) {\n        const typeArguments = this.tsTryParseAndCatch(() =>\n          this.tsParseTypeArgumentsInExpression(),\n        );\n        if (typeArguments) {\n          if (process.env.BABEL_8_BREAKING) {\n            node.typeArguments = typeArguments;\n          } else {\n            node.typeParameters = typeArguments;\n          }\n        }\n      }\n      return super.jsxParseOpeningElementAfterName(node);\n    }\n\n    getGetterSetterExpectedParamCount(\n      method: N.ObjectMethod | N.ClassMethod,\n    ): number {\n      const baseCount = super.getGetterSetterExpectedParamCount(method);\n      const params = this.getObjectOrClassMethodParams(method);\n      const firstParam = params[0];\n      const hasContextParam = firstParam && this.isThisParam(firstParam);\n\n      return hasContextParam ? baseCount + 1 : baseCount;\n    }\n\n    parseCatchClauseParam(): N.Pattern {\n      const param = super.parseCatchClauseParam();\n      const type = this.tsTryParseTypeAnnotation();\n\n      if (type) {\n        param.typeAnnotation = type;\n        this.resetEndLocation(param);\n      }\n\n      return param;\n    }\n\n    tsInAmbientContext<T>(cb: () => T): T {\n      const { isAmbientContext: oldIsAmbientContext, strict: oldStrict } =\n        this.state;\n      this.state.isAmbientContext = true;\n      this.state.strict = false;\n      try {\n        return cb();\n      } finally {\n        this.state.isAmbientContext = oldIsAmbientContext;\n        this.state.strict = oldStrict;\n      }\n    }\n\n    parseClass<T extends N.Class>(\n      node: Undone<T>,\n      isStatement: boolean,\n      optionalId?: boolean,\n    ): T {\n      const oldInAbstractClass = this.state.inAbstractClass;\n      this.state.inAbstractClass = !!(node as any).abstract;\n      try {\n        return super.parseClass(node, isStatement, optionalId);\n      } finally {\n        this.state.inAbstractClass = oldInAbstractClass;\n      }\n    }\n\n    tsParseAbstractDeclaration(\n      node: any,\n      decorators: N.Decorator[] | null,\n    ): N.ClassDeclaration | N.TsInterfaceDeclaration | undefined | null {\n      if (this.match(tt._class)) {\n        node.abstract = true;\n        return this.maybeTakeDecorators(\n          decorators,\n          this.parseClass<N.ClassDeclaration>(\n            node as N.ClassDeclaration,\n            /* isStatement */ true,\n            /* optionalId */ false,\n          ),\n        );\n      } else if (this.isContextual(tt._interface)) {\n        // for invalid abstract interface\n\n        // To avoid\n        //   abstract interface\n        //   Foo {}\n        if (!this.hasFollowingLineBreak()) {\n          node.abstract = true;\n          this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifier, node);\n          return this.tsParseInterfaceDeclaration(\n            node as N.TsInterfaceDeclaration,\n          );\n        }\n      } else {\n        this.unexpected(null, tt._class);\n      }\n    }\n\n    parseMethod<\n      T extends N.ObjectMethod | N.ClassMethod | N.ClassPrivateMethod,\n    >(\n      node: Undone<T>,\n      isGenerator: boolean,\n      isAsync: boolean,\n      isConstructor: boolean,\n      allowDirectSuper: boolean,\n      type: T[\"type\"],\n      inClassScope?: boolean,\n    ) {\n      const method = super.parseMethod<T>(\n        node,\n        isGenerator,\n        isAsync,\n        isConstructor,\n        allowDirectSuper,\n        type,\n        inClassScope,\n      );\n      // @ts-expect-error todo(flow->ts) property not defined for all types in union\n      if (method.abstract || method.type === \"TSAbstractMethodDefinition\") {\n        const hasEstreePlugin = this.hasPlugin(\"estree\");\n        const methodFn = hasEstreePlugin\n          ? // @ts-expect-error estree typings\n            method.value\n          : method;\n        if (methodFn.body) {\n          const { key } = method;\n          this.raise(TSErrors.AbstractMethodHasImplementation, method, {\n            methodName:\n              key.type === \"Identifier\" && !method.computed\n                ? key.name\n                : `[${this.input.slice(this.offsetToSourcePos(key.start), this.offsetToSourcePos(key.end))}]`,\n          });\n        }\n      }\n      return method;\n    }\n\n    tsParseTypeParameterName(): N.Identifier | string {\n      const typeName: N.Identifier = this.parseIdentifier();\n      return process.env.BABEL_8_BREAKING ? typeName : typeName.name;\n    }\n\n    shouldParseAsAmbientContext(): boolean {\n      return !!this.getPluginOption(\"typescript\", \"dts\");\n    }\n\n    parse() {\n      if (this.shouldParseAsAmbientContext()) {\n        this.state.isAmbientContext = true;\n      }\n      return super.parse();\n    }\n\n    getExpression() {\n      if (this.shouldParseAsAmbientContext()) {\n        this.state.isAmbientContext = true;\n      }\n      return super.getExpression();\n    }\n\n    parseExportSpecifier(\n      node: Undone<N.ExportSpecifier>,\n      isString: boolean,\n      isInTypeExport: boolean,\n      isMaybeTypeOnly: boolean,\n    ) {\n      if (!isString && isMaybeTypeOnly) {\n        this.parseTypeOnlyImportExportSpecifier(\n          node,\n          /* isImport */ false,\n          isInTypeExport,\n        );\n        return this.finishNode<N.ExportSpecifier>(node, \"ExportSpecifier\");\n      }\n      node.exportKind = \"value\";\n      return super.parseExportSpecifier(\n        node,\n        isString,\n        isInTypeExport,\n        isMaybeTypeOnly,\n      );\n    }\n\n    parseImportSpecifier(\n      specifier: Undone<N.ImportSpecifier>,\n      importedIsString: boolean,\n      isInTypeOnlyImport: boolean,\n      isMaybeTypeOnly: boolean,\n      // eslint-disable-next-line @typescript-eslint/no-unused-vars\n      bindingType: BindingFlag | undefined,\n    ): N.ImportSpecifier {\n      if (!importedIsString && isMaybeTypeOnly) {\n        this.parseTypeOnlyImportExportSpecifier(\n          specifier,\n          /* isImport */ true,\n          isInTypeOnlyImport,\n        );\n        return this.finishNode<N.ImportSpecifier>(specifier, \"ImportSpecifier\");\n      }\n      specifier.importKind = \"value\";\n      return super.parseImportSpecifier(\n        specifier,\n        importedIsString,\n        isInTypeOnlyImport,\n        isMaybeTypeOnly,\n        isInTypeOnlyImport\n          ? BindingFlag.TYPE_TS_TYPE_IMPORT\n          : BindingFlag.TYPE_TS_VALUE_IMPORT,\n      );\n    }\n\n    parseTypeOnlyImportExportSpecifier(\n      node: any,\n      isImport: boolean,\n      isInTypeOnlyImportExport: boolean,\n    ): void {\n      const leftOfAsKey = isImport ? \"imported\" : \"local\";\n      const rightOfAsKey = isImport ? \"local\" : \"exported\";\n\n      let leftOfAs = node[leftOfAsKey];\n      let rightOfAs;\n\n      let hasTypeSpecifier = false;\n      let canParseAsKeyword = true;\n\n      const loc = leftOfAs.loc.start;\n\n      // https://github.com/microsoft/TypeScript/blob/fc4f9d83d5939047aa6bb2a43965c6e9bbfbc35b/src/compiler/parser.ts#L7411-L7456\n      // import { type } from \"mod\";          - hasTypeSpecifier: false, leftOfAs: type\n      // import { type as } from \"mod\";       - hasTypeSpecifier: true,  leftOfAs: as\n      // import { type as as } from \"mod\";    - hasTypeSpecifier: false, leftOfAs: type, rightOfAs: as\n      // import { type as as as } from \"mod\"; - hasTypeSpecifier: true,  leftOfAs: as,   rightOfAs: as\n      if (this.isContextual(tt._as)) {\n        // { type as ...? }\n        const firstAs = this.parseIdentifier();\n        if (this.isContextual(tt._as)) {\n          // { type as as ...? }\n          const secondAs = this.parseIdentifier();\n          if (tokenIsKeywordOrIdentifier(this.state.type)) {\n            // { type as as something }\n            hasTypeSpecifier = true;\n            leftOfAs = firstAs;\n            rightOfAs = isImport\n              ? this.parseIdentifier()\n              : this.parseModuleExportName();\n            canParseAsKeyword = false;\n          } else {\n            // { type as as }\n            rightOfAs = secondAs;\n            canParseAsKeyword = false;\n          }\n        } else if (tokenIsKeywordOrIdentifier(this.state.type)) {\n          // { type as something }\n          canParseAsKeyword = false;\n          rightOfAs = isImport\n            ? this.parseIdentifier()\n            : this.parseModuleExportName();\n        } else {\n          // { type as }\n          hasTypeSpecifier = true;\n          leftOfAs = firstAs;\n        }\n      } else if (tokenIsKeywordOrIdentifier(this.state.type)) {\n        // { type something ...? }\n        hasTypeSpecifier = true;\n        if (isImport) {\n          leftOfAs = this.parseIdentifier(true);\n          if (!this.isContextual(tt._as)) {\n            this.checkReservedWord(\n              leftOfAs.name,\n              leftOfAs.loc.start,\n              true,\n              true,\n            );\n          }\n        } else {\n          leftOfAs = this.parseModuleExportName();\n        }\n      }\n      if (hasTypeSpecifier && isInTypeOnlyImportExport) {\n        this.raise(\n          isImport\n            ? TSErrors.TypeModifierIsUsedInTypeImports\n            : TSErrors.TypeModifierIsUsedInTypeExports,\n          loc,\n        );\n      }\n\n      node[leftOfAsKey] = leftOfAs;\n      node[rightOfAsKey] = rightOfAs;\n\n      const kindKey = isImport ? \"importKind\" : \"exportKind\";\n      node[kindKey] = hasTypeSpecifier ? \"type\" : \"value\";\n\n      if (canParseAsKeyword && this.eatContextual(tt._as)) {\n        node[rightOfAsKey] = isImport\n          ? this.parseIdentifier()\n          : this.parseModuleExportName();\n      }\n      if (!node[rightOfAsKey]) {\n        node[rightOfAsKey] = this.cloneIdentifier(node[leftOfAsKey]);\n      }\n      if (isImport) {\n        this.checkIdentifier(\n          node[rightOfAsKey],\n          hasTypeSpecifier\n            ? BindingFlag.TYPE_TS_TYPE_IMPORT\n            : BindingFlag.TYPE_TS_VALUE_IMPORT,\n        );\n      }\n    }\n\n    /**\n     * This hook is defined in the ESTree plugin.\n     * The TS-ESLint always define optional AST properties, here we provide the\n     * default value for such properties immediately after `finishNode` was invoked.\n     *\n     * @param node The AST node finished by finishNode\n     * @returns\n     */\n    fillOptionalPropertiesForTSESLint(node: N.Node): void {\n      switch (node.type) {\n        case \"ExpressionStatement\":\n          node.directive ??= undefined;\n          return;\n        case \"RestElement\":\n          node.value = undefined;\n        /* fallthrough */\n        case \"Identifier\":\n        case \"ArrayPattern\":\n        case \"AssignmentPattern\":\n        case \"ObjectPattern\":\n          node.decorators ??= [];\n          node.optional ??= false;\n          node.typeAnnotation ??= undefined;\n          return;\n        case \"TSParameterProperty\":\n          node.accessibility ??= undefined;\n          node.decorators ??= [];\n          node.override ??= false;\n          node.readonly ??= false;\n          node.static ??= false;\n          return;\n        case \"TSEmptyBodyFunctionExpression\":\n          node.body = null;\n        /* fallthrough */\n        case \"TSDeclareFunction\":\n        case \"FunctionDeclaration\":\n        case \"FunctionExpression\":\n        case \"ClassMethod\":\n        case \"ClassPrivateMethod\":\n          node.declare ??= false;\n          node.returnType ??= undefined;\n          node.typeParameters ??= undefined;\n          return;\n        case \"Property\":\n          node.optional ??= false;\n          return;\n        case \"TSMethodSignature\":\n        case \"TSPropertySignature\":\n          node.optional ??= false;\n        /* fallthrough */\n        case \"TSIndexSignature\":\n          node.accessibility ??= undefined;\n          node.readonly ??= false;\n          node.static ??= false;\n          return;\n        case \"TSAbstractPropertyDefinition\":\n        case \"PropertyDefinition\":\n        case \"TSAbstractAccessorProperty\":\n        case \"AccessorProperty\":\n          node.declare ??= false;\n          node.definite ??= false;\n          node.readonly ??= false;\n          node.typeAnnotation ??= undefined;\n        /* fallthrough */\n        case \"TSAbstractMethodDefinition\":\n        case \"MethodDefinition\":\n          node.accessibility ??= undefined;\n          node.decorators ??= [];\n          node.override ??= false;\n          node.optional ??= false;\n          return;\n        case \"ClassExpression\":\n          node.id ??= null;\n        /* fallthrough */\n        case \"ClassDeclaration\":\n          node.abstract ??= false;\n          node.declare ??= false;\n          node.decorators ??= [];\n          node.implements ??= [];\n          node.superTypeArguments ??= undefined;\n          node.typeParameters ??= undefined;\n          return;\n        case \"TSTypeAliasDeclaration\":\n        case \"VariableDeclaration\":\n          node.declare ??= false;\n          return;\n        case \"VariableDeclarator\":\n          node.definite ??= false;\n          return;\n        case \"TSEnumDeclaration\":\n          node.const ??= false;\n          node.declare ??= false;\n          return;\n        case \"TSEnumMember\":\n          node.computed ??= false;\n          return;\n        case \"TSImportType\":\n          node.qualifier ??= null;\n          node.options ??= null;\n          if (process.env.BABEL_8_BREAKING) {\n            node.typeArguments ??= null;\n          }\n          return;\n        case \"TSInterfaceDeclaration\":\n          node.declare ??= false;\n          node.extends ??= [];\n          return;\n        case \"TSModuleDeclaration\":\n          node.declare ??= false;\n          node.global ??= node.kind === \"global\";\n          return;\n        case \"TSTypeParameter\":\n          node.const ??= false;\n          node.in ??= false;\n          node.out ??= false;\n          return;\n      }\n    }\n  };\n\nfunction isPossiblyLiteralEnum(expression: N.Expression): boolean {\n  if (expression.type !== \"MemberExpression\") return false;\n\n  const { computed, property } = expression;\n\n  if (\n    computed &&\n    property.type !== \"StringLiteral\" &&\n    (property.type !== \"TemplateLiteral\" || property.expressions.length > 0)\n  ) {\n    return false;\n  }\n\n  return isUncomputedMemberExpressionChain(expression.object);\n}\n\n// If a const declaration has no type annotation and is initialized to\n// a string literal, numeric literal, or enum reference, then it is\n// allowed. In an ideal world, we'd check whether init was *actually* an\n// enum reference, but we allow anything that \"could be\" a literal enum\n// in `isPossiblyLiteralEnum` since we don't have all the information\n// that the typescript compiler has.\nfunction isValidAmbientConstInitializer(\n  expression: N.Expression,\n  estree: boolean,\n): boolean {\n  const { type } = expression;\n  if (expression.extra?.parenthesized) {\n    return false;\n  }\n  if (estree) {\n    if (type === \"Literal\") {\n      const { value } = expression;\n      if (typeof value === \"string\" || typeof value === \"boolean\") {\n        return true;\n      }\n    }\n  } else {\n    if (type === \"StringLiteral\" || type === \"BooleanLiteral\") {\n      return true;\n    }\n  }\n  if (isNumber(expression, estree) || isNegativeNumber(expression, estree)) {\n    return true;\n  }\n  if (type === \"TemplateLiteral\" && expression.expressions.length === 0) {\n    return true;\n  }\n  if (isPossiblyLiteralEnum(expression)) {\n    return true;\n  }\n  return false;\n}\n\nfunction isNumber(expression: N.Expression, estree: boolean): boolean {\n  if (estree) {\n    return (\n      expression.type === \"Literal\" &&\n      (typeof expression.value === \"number\" || \"bigint\" in expression)\n    );\n  }\n  return (\n    expression.type === \"NumericLiteral\" || expression.type === \"BigIntLiteral\"\n  );\n}\n\nfunction isNegativeNumber(expression: N.Expression, estree: boolean): boolean {\n  if (expression.type === \"UnaryExpression\") {\n    const { operator, argument } = expression;\n    if (operator === \"-\" && isNumber(argument, estree)) {\n      return true;\n    }\n  }\n  return false;\n}\n\nfunction isUncomputedMemberExpressionChain(expression: N.Expression): boolean {\n  if (expression.type === \"Identifier\") return true;\n  if (expression.type !== \"MemberExpression\" || expression.computed) {\n    return false;\n  }\n\n  return isUncomputedMemberExpressionChain(expression.object);\n}\n","import * as charCodes from \"charcodes\";\n\nimport { tokenLabelName, tt } from \"../tokenizer/types.ts\";\nimport type Parser from \"../parser/index.ts\";\nimport type * as N from \"../types.ts\";\nimport { ParseErrorEnum } from \"../parse-error.ts\";\nimport type { Undone } from \"../parser/node.ts\";\nimport type { ExpressionErrors } from \"../parser/util.ts\";\nimport type { BindingFlag } from \"../util/scopeflags.ts\";\nimport type { Position } from \"../util/location.ts\";\n\ntype PossiblePlaceholders = {\n  Identifier: N.Identifier;\n  StringLiteral: N.StringLiteral;\n  Expression: N.Expression;\n  Statement: N.Statement;\n  Declaration: N.Declaration;\n  BlockStatement: N.BlockStatement;\n  ClassBody: N.ClassBody;\n  Pattern: N.Pattern;\n};\nexport type PlaceholderTypes = keyof PossiblePlaceholders;\n\ntype NodeOf<T extends keyof PossiblePlaceholders> = PossiblePlaceholders[T];\n// todo: when there  is proper union type for Node\n// type NodeOf<T extends PlaceholderTypes> = Extract<N.Node, { type: T }>;\n\n// todo: Placeholder<T> breaks everything, because its type is incompatible with\n// the substituted nodes.\ntype MaybePlaceholder<T extends PlaceholderTypes> = NodeOf<T>; // | Placeholder<T>\n\n/* eslint sort-keys: \"error\" */\nconst PlaceholderErrors = ParseErrorEnum`placeholders`({\n  ClassNameIsRequired: \"A class name is required.\",\n  UnexpectedSpace: \"Unexpected space in placeholder.\",\n});\n\nexport default (superClass: typeof Parser) =>\n  class PlaceholdersParserMixin extends superClass implements Parser {\n    parsePlaceholder<T extends PlaceholderTypes>(\n      expectedNode: T,\n    ): /*?N.Placeholder<T>*/ MaybePlaceholder<T> | undefined {\n      if (this.match(tt.placeholder)) {\n        const node = this.startNode<N.Placeholder<T>>();\n        this.next();\n        this.assertNoSpace();\n\n        // We can't use this.parseIdentifier because\n        // we don't want nested placeholders.\n        node.name = super.parseIdentifier(/* liberal */ true);\n\n        this.assertNoSpace();\n        this.expect(tt.placeholder);\n        return this.finishPlaceholder(node, expectedNode);\n      }\n    }\n\n    finishPlaceholder<T extends PlaceholderTypes>(\n      node: Undone<N.Placeholder> | Undone<NodeOf<PlaceholderTypes>>,\n      expectedNode: T,\n    ): /*N.Placeholder<T>*/ MaybePlaceholder<T> {\n      let placeholder = node as unknown as N.Placeholder<T>;\n\n      if (!placeholder.expectedNode || !placeholder.type) {\n        placeholder = this.finishNode(\n          placeholder,\n          \"Placeholder\",\n        ) as unknown as N.Placeholder<T>;\n      }\n\n      placeholder.expectedNode = expectedNode;\n      return placeholder as unknown as MaybePlaceholder<T>;\n    }\n\n    /* ============================================================ *\n     * tokenizer/index.ts                                           *\n     * ============================================================ */\n\n    getTokenFromCode(code: number) {\n      if (\n        code === charCodes.percentSign &&\n        this.input.charCodeAt(this.state.pos + 1) === charCodes.percentSign\n      ) {\n        this.finishOp(tt.placeholder, 2);\n      } else {\n        super.getTokenFromCode(code);\n      }\n    }\n\n    /* ============================================================ *\n     * parser/expression.ts                                         *\n     * ============================================================ */\n\n    parseExprAtom(\n      refExpressionErrors?: ExpressionErrors | null,\n    ): MaybePlaceholder<\"Expression\"> {\n      return (\n        this.parsePlaceholder(\"Expression\") ||\n        super.parseExprAtom(refExpressionErrors)\n      );\n    }\n\n    parseIdentifier(liberal?: boolean): MaybePlaceholder<\"Identifier\"> {\n      // NOTE: This function only handles identifiers outside of\n      // expressions and binding patterns, since they are already\n      // handled by the parseExprAtom and parseBindingAtom functions.\n      // This is needed, for example, to parse \"class %%NAME%% {}\".\n      return (\n        this.parsePlaceholder(\"Identifier\") || super.parseIdentifier(liberal)\n      );\n    }\n\n    checkReservedWord(\n      word: string,\n      startLoc: Position,\n      checkKeywords: boolean,\n      isBinding: boolean,\n    ) {\n      // Sometimes we call #checkReservedWord(node.name), expecting\n      // that node is an Identifier. If it is a Placeholder, name\n      // will be undefined.\n      if (word !== undefined) {\n        super.checkReservedWord(word, startLoc, checkKeywords, isBinding);\n      }\n    }\n\n    /* ============================================================ *\n     * parser/node.ts                                               *\n     * ============================================================ */\n\n    cloneIdentifier<T extends N.Identifier | N.Placeholder>(node: T): T {\n      const cloned = super.cloneIdentifier(node);\n      if (cloned.type === \"Placeholder\") {\n        cloned.expectedNode = (node as N.Placeholder).expectedNode;\n      }\n      return cloned;\n    }\n\n    cloneStringLiteral<\n      T extends N.EstreeLiteral | N.StringLiteral | N.Placeholder,\n    >(node: T): T {\n      if (node.type === \"Placeholder\") {\n        return this.cloneIdentifier(node) as T;\n      }\n      return super.cloneStringLiteral(node);\n    }\n\n    /* ============================================================ *\n     * parser/lval.ts                                               *\n     * ============================================================ */\n\n    parseBindingAtom(): MaybePlaceholder<\"Pattern\"> {\n      return this.parsePlaceholder(\"Pattern\") || super.parseBindingAtom();\n    }\n\n    isValidLVal(type: string, isParenthesized: boolean, binding: BindingFlag) {\n      return (\n        type === \"Placeholder\" ||\n        super.isValidLVal(type, isParenthesized, binding)\n      );\n    }\n\n    toAssignable(node: N.Node, isLHS: boolean): void {\n      if (\n        node &&\n        node.type === \"Placeholder\" &&\n        node.expectedNode === \"Expression\"\n      ) {\n        node.expectedNode = \"Pattern\";\n      } else {\n        super.toAssignable(node, isLHS);\n      }\n    }\n\n    /* ============================================================ *\n     * parser/statement.ts                                          *\n     * ============================================================ */\n\n    chStartsBindingIdentifier(ch: number, pos: number): boolean {\n      if (super.chStartsBindingIdentifier(ch, pos)) {\n        return true;\n      }\n\n      // Accept \"let %%\" as the start of \"let %%placeholder%%\", as though the\n      // placeholder were an identifier.\n      const next = this.nextTokenStart();\n      if (\n        this.input.charCodeAt(next) === charCodes.percentSign &&\n        this.input.charCodeAt(next + 1) === charCodes.percentSign\n      ) {\n        return true;\n      }\n\n      return false;\n    }\n\n    verifyBreakContinue(\n      node: N.BreakStatement | N.ContinueStatement,\n      isBreak: boolean,\n    ) {\n      // @ts-expect-error: node.label could be Placeholder\n      if (node.label && node.label.type === \"Placeholder\") return;\n      super.verifyBreakContinue(node, isBreak);\n    }\n\n    // @ts-expect-error Plugin will override parser interface\n    parseExpressionStatement(\n      node: MaybePlaceholder<\"Statement\">,\n      expr: MaybePlaceholder<\"Expression\">,\n    ): MaybePlaceholder<\"Statement\"> {\n      // @ts-expect-error placeholder typings\n      if (expr.type !== \"Placeholder\" || expr.extra?.parenthesized) {\n        // @ts-expect-error placeholder typings\n        return super.parseExpressionStatement(node, expr);\n      }\n\n      if (this.match(tt.colon)) {\n        // @ts-expect-error placeholder typings\n        const stmt: N.LabeledStatement = node;\n        stmt.label = this.finishPlaceholder(expr, \"Identifier\");\n        this.next();\n        stmt.body = super.parseStatementOrSloppyAnnexBFunctionDeclaration();\n        return this.finishNode(stmt, \"LabeledStatement\");\n      }\n\n      this.semicolon();\n      const stmtPlaceholder = node as unknown as N.Placeholder<\"Statement\">;\n      stmtPlaceholder.name = (expr as N.Placeholder).name;\n      return this.finishPlaceholder(stmtPlaceholder, \"Statement\");\n    }\n\n    parseBlock(\n      allowDirectives?: boolean,\n      createNewLexicalScope?: boolean,\n      afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n    ): MaybePlaceholder<\"BlockStatement\"> {\n      return (\n        this.parsePlaceholder(\"BlockStatement\") ||\n        super.parseBlock(\n          allowDirectives,\n          createNewLexicalScope,\n          afterBlockParse,\n        )\n      );\n    }\n\n    parseFunctionId(\n      requireId?: boolean,\n    ): MaybePlaceholder<\"Identifier\"> | undefined | null {\n      return (\n        this.parsePlaceholder(\"Identifier\") || super.parseFunctionId(requireId)\n      );\n    }\n    // @ts-expect-error Plugin will override parser interface\n    parseClass<T extends N.Class>(\n      node: T,\n      isStatement: /* T === ClassDeclaration */ boolean,\n      optionalId?: boolean,\n    ): T {\n      const type = isStatement ? \"ClassDeclaration\" : \"ClassExpression\";\n\n      this.next();\n      const oldStrict = this.state.strict;\n\n      const placeholder = this.parsePlaceholder(\"Identifier\");\n      if (placeholder) {\n        if (\n          this.match(tt._extends) ||\n          this.match(tt.placeholder) ||\n          this.match(tt.braceL)\n        ) {\n          node.id = placeholder;\n        } else if (optionalId || !isStatement) {\n          node.id = null;\n          node.body = this.finishPlaceholder(placeholder, \"ClassBody\");\n          return this.finishNode(node, type);\n        } else {\n          throw this.raise(\n            PlaceholderErrors.ClassNameIsRequired,\n            this.state.startLoc,\n          );\n        }\n      } else {\n        this.parseClassId(node, isStatement, optionalId);\n      }\n\n      super.parseClassSuper(node);\n      node.body =\n        this.parsePlaceholder(\"ClassBody\") ||\n        super.parseClassBody(!!node.superClass, oldStrict);\n      return this.finishNode(node, type);\n    }\n\n    parseExport(\n      node: Undone<\n        | N.ExportDefaultDeclaration\n        | N.ExportAllDeclaration\n        | N.ExportNamedDeclaration\n      >,\n      decorators: N.Decorator[] | null,\n    ): N.AnyExport {\n      const placeholder = this.parsePlaceholder(\"Identifier\");\n      if (!placeholder) return super.parseExport(node, decorators);\n\n      const node2 = node as Undone<N.ExportNamedDeclaration>;\n\n      if (!this.isContextual(tt._from) && !this.match(tt.comma)) {\n        // export %%DECL%%;\n        node2.specifiers = [];\n        node2.source = null;\n        node2.declaration = this.finishPlaceholder(placeholder, \"Declaration\");\n        return this.finishNode(node2, \"ExportNamedDeclaration\");\n      }\n\n      // export %%NAME%% from \"foo\";\n      this.expectPlugin(\"exportDefaultFrom\");\n      const specifier = this.startNode<N.ExportDefaultSpecifier>();\n      specifier.exported = placeholder;\n      node2.specifiers = [this.finishNode(specifier, \"ExportDefaultSpecifier\")];\n\n      return super.parseExport(node2, decorators);\n    }\n\n    isExportDefaultSpecifier(): boolean {\n      if (this.match(tt._default)) {\n        const next = this.nextTokenStart();\n        if (this.isUnparsedContextual(next, \"from\")) {\n          if (\n            this.input.startsWith(\n              tokenLabelName(tt.placeholder),\n              this.nextTokenStartSince(next + 4),\n            )\n          ) {\n            return true;\n          }\n        }\n      }\n      return super.isExportDefaultSpecifier();\n    }\n\n    maybeParseExportDefaultSpecifier(\n      node: Undone<\n        | N.ExportDefaultDeclaration\n        | N.ExportAllDeclaration\n        | N.ExportNamedDeclaration\n      >,\n      maybeDefaultIdentifier: N.Identifier | null,\n    ): node is Undone<N.ExportNamedDeclaration> {\n      if ((node as N.ExportNamedDeclaration).specifiers?.length) {\n        // \"export %%NAME%%\" has already been parsed by #parseExport.\n        return true;\n      }\n      return super.maybeParseExportDefaultSpecifier(\n        node,\n        maybeDefaultIdentifier,\n      );\n    }\n\n    checkExport(node: N.ExportNamedDeclaration): void {\n      const { specifiers } = node;\n      if (specifiers?.length) {\n        node.specifiers = specifiers.filter(\n          // @ts-expect-error placeholder typings\n          node => node.exported.type === \"Placeholder\",\n        );\n      }\n      super.checkExport(node);\n      node.specifiers = specifiers;\n    }\n\n    parseImport(\n      node: Undone<N.ImportDeclaration>,\n    ): N.ImportDeclaration | N.TsImportEqualsDeclaration {\n      const placeholder = this.parsePlaceholder(\"Identifier\");\n      if (!placeholder) return super.parseImport(node);\n\n      node.specifiers = [];\n\n      if (!this.isContextual(tt._from) && !this.match(tt.comma)) {\n        // import %%STRING%%;\n        node.source = this.finishPlaceholder(placeholder, \"StringLiteral\");\n        this.semicolon();\n        return this.finishNode(node, \"ImportDeclaration\");\n      }\n\n      // import %%DEFAULT%% ...\n      const specifier =\n        this.startNodeAtNode<N.ImportDefaultSpecifier>(placeholder);\n      specifier.local = placeholder;\n      node.specifiers.push(\n        this.finishNode(specifier, \"ImportDefaultSpecifier\"),\n      );\n\n      if (this.eat(tt.comma)) {\n        // import %%DEFAULT%%, * as ...\n        const hasStarImport = this.maybeParseStarImportSpecifier(node);\n\n        // import %%DEFAULT%%, { ...\n        if (!hasStarImport) this.parseNamedImportSpecifiers(node);\n      }\n\n      this.expectContextual(tt._from);\n      node.source = this.parseImportSource();\n      this.semicolon();\n      return this.finishNode(node, \"ImportDeclaration\");\n    }\n\n    parseImportSource(): MaybePlaceholder<\"StringLiteral\"> {\n      // import ... from %%STRING%%;\n\n      return (\n        this.parsePlaceholder(\"StringLiteral\") || super.parseImportSource()\n      );\n    }\n\n    // Throws if the current token and the prev one are separated by a space.\n    assertNoSpace(): void {\n      if (\n        this.state.start >\n        this.offsetToSourcePos(this.state.lastTokEndLoc.index)\n      ) {\n        this.raise(PlaceholderErrors.UnexpectedSpace, this.state.lastTokEndLoc);\n      }\n    }\n  };\n","import type Parser from \"../parser/index.ts\";\nimport { tokenIsIdentifier, tt } from \"../tokenizer/types.ts\";\nimport type * as N from \"../types.ts\";\nimport type { ExpressionErrors } from \"../parser/util.ts\";\n\nexport default (superClass: typeof Parser) =>\n  class V8IntrinsicMixin extends superClass implements Parser {\n    parseV8Intrinsic(): N.Expression {\n      if (this.match(tt.modulo)) {\n        const v8IntrinsicStartLoc = this.state.startLoc;\n        // let the `loc` of Identifier starts from `%`\n        const node = this.startNode<N.Identifier>();\n        this.next(); // eat '%'\n        if (tokenIsIdentifier(this.state.type)) {\n          const name = this.parseIdentifierName();\n          const identifier = this.createIdentifier(node, name);\n          this.castNodeTo(identifier, \"V8IntrinsicIdentifier\");\n          if (this.match(tt.parenL)) {\n            return identifier;\n          }\n        }\n        this.unexpected(v8IntrinsicStartLoc);\n      }\n    }\n\n    /* ============================================================ *\n     * parser/expression.js                                         *\n     * ============================================================ */\n\n    parseExprAtom(refExpressionErrors?: ExpressionErrors | null): N.Expression {\n      return (\n        this.parseV8Intrinsic() || super.parseExprAtom(refExpressionErrors)\n      );\n    }\n  };\n","import type Parser from \"./parser/index.ts\";\nimport type { PluginConfig } from \"./typings.ts\";\n\nexport type Plugin = PluginConfig;\n\nexport type MixinPlugin = (\n  superClass: new (...args: any) => Parser,\n) => new (...args: any) => Parser;\n\nconst PIPELINE_PROPOSALS = process.env.BABEL_8_BREAKING\n  ? [\"fsharp\", \"hack\"]\n  : [\"minimal\", \"fsharp\", \"hack\", \"smart\"];\nconst TOPIC_TOKENS = [\"^^\", \"@@\", \"^\", \"%\", \"#\"];\n\nexport function validatePlugins(pluginsMap: Map<string, any>) {\n  if (pluginsMap.has(\"decorators\")) {\n    if (pluginsMap.has(\"decorators-legacy\")) {\n      throw new Error(\n        \"Cannot use the decorators and decorators-legacy plugin together\",\n      );\n    }\n\n    const decoratorsBeforeExport =\n      pluginsMap.get(\"decorators\").decoratorsBeforeExport;\n    if (\n      decoratorsBeforeExport != null &&\n      typeof decoratorsBeforeExport !== \"boolean\"\n    ) {\n      throw new Error(\n        \"'decoratorsBeforeExport' must be a boolean, if specified.\",\n      );\n    }\n\n    const allowCallParenthesized =\n      pluginsMap.get(\"decorators\").allowCallParenthesized;\n    if (\n      allowCallParenthesized != null &&\n      typeof allowCallParenthesized !== \"boolean\"\n    ) {\n      throw new Error(\"'allowCallParenthesized' must be a boolean.\");\n    }\n  }\n\n  if (pluginsMap.has(\"flow\") && pluginsMap.has(\"typescript\")) {\n    throw new Error(\"Cannot combine flow and typescript plugins.\");\n  }\n\n  if (pluginsMap.has(\"placeholders\") && pluginsMap.has(\"v8intrinsic\")) {\n    throw new Error(\"Cannot combine placeholders and v8intrinsic plugins.\");\n  }\n\n  if (pluginsMap.has(\"pipelineOperator\")) {\n    const proposal = pluginsMap.get(\"pipelineOperator\").proposal;\n\n    if (!PIPELINE_PROPOSALS.includes(proposal)) {\n      const proposalList = PIPELINE_PROPOSALS.map(p => `\"${p}\"`).join(\", \");\n      throw new Error(\n        `\"pipelineOperator\" requires \"proposal\" option whose value must be one of: ${proposalList}.`,\n      );\n    }\n\n    if (proposal === \"hack\") {\n      if (pluginsMap.has(\"placeholders\")) {\n        throw new Error(\n          \"Cannot combine placeholders plugin and Hack-style pipes.\",\n        );\n      }\n\n      if (pluginsMap.has(\"v8intrinsic\")) {\n        throw new Error(\n          \"Cannot combine v8intrinsic plugin and Hack-style pipes.\",\n        );\n      }\n\n      const topicToken = pluginsMap.get(\"pipelineOperator\").topicToken;\n\n      if (!TOPIC_TOKENS.includes(topicToken)) {\n        const tokenList = TOPIC_TOKENS.map(t => `\"${t}\"`).join(\", \");\n\n        throw new Error(\n          `\"pipelineOperator\" in \"proposal\": \"hack\" mode also requires a \"topicToken\" option whose value must be one of: ${tokenList}.`,\n        );\n      }\n\n      if (!process.env.BABEL_8_BREAKING) {\n        if (\n          topicToken === \"#\" &&\n          pluginsMap.get(\"recordAndTuple\")?.syntaxType === \"hash\"\n        ) {\n          throw new Error(\n            `Plugin conflict between \\`[\"pipelineOperator\", { proposal: \"hack\", topicToken: \"#\" }]\\` and \\`${JSON.stringify([\"recordAndTuple\", pluginsMap.get(\"recordAndTuple\")])}\\`.`,\n          );\n        }\n      }\n    } else if (\n      !process.env.BABEL_8_BREAKING &&\n      proposal === \"smart\" &&\n      pluginsMap.get(\"recordAndTuple\")?.syntaxType === \"hash\"\n    ) {\n      throw new Error(\n        `Plugin conflict between \\`[\"pipelineOperator\", { proposal: \"smart\" }]\\` and \\`${JSON.stringify([\"recordAndTuple\", pluginsMap.get(\"recordAndTuple\")])}\\`.`,\n      );\n    }\n  }\n\n  if (pluginsMap.has(\"moduleAttributes\")) {\n    if (process.env.BABEL_8_BREAKING) {\n      throw new Error(\n        \"`moduleAttributes` has been removed in Babel 8, please migrate to import attributes instead.\",\n      );\n    } else {\n      if (\n        pluginsMap.has(\"deprecatedImportAssert\") ||\n        pluginsMap.has(\"importAssertions\")\n      ) {\n        throw new Error(\n          \"Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.\",\n        );\n      }\n      const moduleAttributesVersionPluginOption =\n        pluginsMap.get(\"moduleAttributes\").version;\n      if (moduleAttributesVersionPluginOption !== \"may-2020\") {\n        throw new Error(\n          \"The 'moduleAttributes' plugin requires a 'version' option,\" +\n            \" representing the last proposal update. Currently, the\" +\n            \" only supported value is 'may-2020'.\",\n        );\n      }\n    }\n  }\n  if (pluginsMap.has(\"importAssertions\")) {\n    if (process.env.BABEL_8_BREAKING) {\n      throw new Error(\n        \"`importAssertions` has been removed in Babel 8, please use import attributes instead.\" +\n          \" To use the non-standard `assert` syntax you can enable the `deprecatedImportAssert` parser plugin.\",\n      );\n    } else if (pluginsMap.has(\"deprecatedImportAssert\")) {\n      throw new Error(\n        \"Cannot combine importAssertions and deprecatedImportAssert plugins.\",\n      );\n    }\n  }\n  if (\n    !pluginsMap.has(\"deprecatedImportAssert\") &&\n    pluginsMap.has(\"importAttributes\") &&\n    pluginsMap.get(\"importAttributes\").deprecatedAssertSyntax\n  ) {\n    if (process.env.BABEL_8_BREAKING) {\n      throw new Error(\n        \"The 'importAttributes' plugin has been removed in Babel 8. If you need to enable support \" +\n          \"for the deprecated `assert` syntax, you can enable the `deprecatedImportAssert` parser plugin.\",\n      );\n    } else {\n      pluginsMap.set(\"deprecatedImportAssert\", {});\n    }\n  }\n\n  if (pluginsMap.has(\"recordAndTuple\")) {\n    if (process.env.BABEL_8_BREAKING) {\n      throw new Error(\n        \"The 'recordAndTuple' plugin has been removed in Babel 8. Please remove it from your configuration.\",\n      );\n    } else {\n      const syntaxType = pluginsMap.get(\"recordAndTuple\").syntaxType;\n      if (syntaxType != null) {\n        const RECORD_AND_TUPLE_SYNTAX_TYPES = [\"hash\", \"bar\"];\n        if (!RECORD_AND_TUPLE_SYNTAX_TYPES.includes(syntaxType)) {\n          throw new Error(\n            \"The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: \" +\n              RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(\", \"),\n          );\n        }\n      }\n    }\n  }\n\n  if (\n    pluginsMap.has(\"asyncDoExpressions\") &&\n    !pluginsMap.has(\"doExpressions\")\n  ) {\n    const error = new Error(\n      \"'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.\",\n    );\n    // @ts-expect-error so @babel/core can provide better error message\n    error.missingPlugins = \"doExpressions\";\n    throw error;\n  }\n\n  if (\n    pluginsMap.has(\"optionalChainingAssign\") &&\n    pluginsMap.get(\"optionalChainingAssign\").version !== \"2023-07\"\n  ) {\n    throw new Error(\n      \"The 'optionalChainingAssign' plugin requires a 'version' option,\" +\n        \" representing the last proposal update. Currently, the\" +\n        \" only supported value is '2023-07'.\",\n    );\n  }\n\n  if (\n    pluginsMap.has(\"discardBinding\") &&\n    pluginsMap.get(\"discardBinding\").syntaxType !== \"void\"\n  ) {\n    throw new Error(\n      \"The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.\",\n    );\n  }\n\n  if (process.env.BABEL_8_BREAKING) {\n    if (pluginsMap.has(\"decimal\")) {\n      throw new Error(\n        \"The 'decimal' plugin has been removed in Babel 8. Please remove it from your configuration.\",\n      );\n    }\n    if (pluginsMap.has(\"importReflection\")) {\n      throw new Error(\n        \"The 'importReflection' plugin has been removed in Babel 8. Use 'sourcePhaseImports' instead, and \" +\n          \"replace 'import module' with 'import source' in your code.\",\n      );\n    }\n  }\n}\n\n// These plugins are defined using a mixin which extends the parser class.\n\nimport estree from \"./plugins/estree.ts\";\nimport flow from \"./plugins/flow/index.ts\";\nimport jsx from \"./plugins/jsx/index.ts\";\nimport typescript from \"./plugins/typescript/index.ts\";\nimport placeholders from \"./plugins/placeholders.ts\";\nimport v8intrinsic from \"./plugins/v8intrinsic.ts\";\n\n// NOTE: order is important. estree must come first; placeholders must come last.\nexport const mixinPlugins = {\n  estree,\n  jsx,\n  flow,\n  typescript,\n  v8intrinsic,\n  placeholders,\n};\n\nexport const mixinPluginNames = Object.keys(mixinPlugins) as ReadonlyArray<\n  \"estree\" | \"jsx\" | \"flow\" | \"typescript\" | \"v8intrinsic\" | \"placeholders\"\n>;\n","// A recursive descent parser operates by defining functions for all\n// syntactic elements, and recursively calling those, each function\n// advancing the input stream and returning an AST node. Precedence\n// of constructs (for example, the fact that `!x[1]` means `!(x[1])`\n// instead of `(!x)[1]` is handled by the fact that the parser\n// function that parses unary prefix operators is called first, and\n// in turn calls the function that parses `[]` subscripts — that\n// way, it'll receive the node for `x[1]` already parsed, and wraps\n// *that* in the unary operator node.\n//\n// Acorn uses an [operator precedence parser][opp] to handle binary\n// operator precedence, because it is much more compact than using\n// the technique outlined above, which uses different, nesting\n// functions to specify precedence, for all of the ten binary\n// precedence levels that JavaScript defines.\n//\n// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser\n\nimport {\n  tokenCanStartExpression,\n  tokenIsAssignment,\n  tokenIsIdentifier,\n  tokenIsKeywordOrIdentifier,\n  tokenIsOperator,\n  tokenIsPostfix,\n  tokenIsPrefix,\n  tokenIsRightAssociative,\n  tokenIsTemplate,\n  tokenKeywordOrIdentifierIsKeyword,\n  tokenLabelName,\n  tokenOperatorPrecedence,\n  tt,\n  type TokenType,\n} from \"../tokenizer/types.ts\";\nimport type * as N from \"../types.ts\";\nimport LValParser from \"./lval.ts\";\nimport {\n  isKeyword,\n  isReservedWord,\n  isStrictReservedWord,\n  isStrictBindReservedWord,\n  isIdentifierStart,\n  canBeReservedWord,\n} from \"../util/identifier.ts\";\nimport {\n  type Position,\n  createPositionWithColumnOffset,\n} from \"../util/location.ts\";\nimport * as charCodes from \"charcodes\";\nimport { ScopeFlag, BindingFlag } from \"../util/scopeflags.ts\";\nimport { ExpressionErrors } from \"./util.ts\";\nimport { ParamKind, functionFlags } from \"../util/production-parameter.ts\";\nimport {\n  newArrowHeadScope,\n  newAsyncArrowScope,\n  newExpressionScope,\n} from \"../util/expression-scope.ts\";\nimport { Errors } from \"../parse-error.ts\";\nimport {\n  UnparenthesizedPipeBodyDescriptions,\n  type UnparenthesizedPipeBodyTypes,\n} from \"../parse-error/pipeline-operator-errors.ts\";\nimport { setInnerComments } from \"./comments.ts\";\nimport type { Undone } from \"./node.ts\";\nimport type Parser from \"./index.ts\";\n\nimport { OptionFlags, type SourceType } from \"../options.ts\";\n\nexport default abstract class ExpressionParser extends LValParser {\n  // Forward-declaration: defined in statement.js\n  abstract parseBlock(\n    allowDirectives?: boolean,\n    createNewLexicalScope?: boolean,\n    afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n  ): N.BlockStatement;\n  abstract parseClass(\n    node: N.Class,\n    isStatement: boolean,\n    optionalId?: boolean,\n  ): N.Class;\n  abstract parseDecorators(allowExport?: boolean): void;\n  abstract parseFunction<T extends N.NormalFunction>(\n    node: T,\n    statement?: number,\n    allowExpressionBody?: boolean,\n    isAsync?: boolean,\n  ): T;\n  abstract parseFunctionParams(node: N.Function, isConstructor?: boolean): void;\n  abstract parseBlockOrModuleBlockBody(\n    body: N.Statement[],\n    directives: N.Directive[] | null | undefined,\n    topLevel: boolean,\n    end: TokenType,\n    afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n  ): void;\n  abstract parseProgram(\n    program: N.Program,\n    end: TokenType,\n    sourceType?: SourceType,\n  ): N.Program;\n\n  // For object literal, check if property __proto__ has been used more than once.\n  // If the expression is a destructuring assignment, then __proto__ may appear\n  // multiple times. Otherwise, __proto__ is a duplicated key.\n\n  // For record expression, check if property __proto__ exists\n\n  checkProto(\n    prop: N.ObjectMember | N.SpreadElement,\n    isRecord: boolean | undefined | null,\n    sawProto: boolean,\n    refExpressionErrors?: ExpressionErrors | null,\n  ): boolean {\n    if (\n      prop.type === \"SpreadElement\" ||\n      this.isObjectMethod(prop) ||\n      prop.computed ||\n      prop.shorthand\n    ) {\n      return sawProto;\n    }\n\n    const key = prop.key as\n      | N.Identifier\n      | N.StringLiteral\n      | N.NumericLiteral\n      | N.BigIntLiteral;\n    // It is either an Identifier or a String/NumericLiteral\n    const name = key.type === \"Identifier\" ? key.name : key.value;\n\n    if (name === \"__proto__\") {\n      if (isRecord) {\n        this.raise(Errors.RecordNoProto, key);\n        return true;\n      }\n      if (sawProto) {\n        if (refExpressionErrors) {\n          // Store the first redefinition's position, otherwise ignore because\n          // we are parsing ambiguous pattern\n          if (refExpressionErrors.doubleProtoLoc === null) {\n            refExpressionErrors.doubleProtoLoc = key.loc.start;\n          }\n        } else {\n          this.raise(Errors.DuplicateProto, key);\n        }\n      }\n\n      return true;\n    }\n\n    return sawProto;\n  }\n\n  shouldExitDescending(\n    expr: N.Expression | N.PrivateName,\n    potentialArrowAt: number,\n  ): expr is N.ArrowFunctionExpression {\n    return (\n      expr.type === \"ArrowFunctionExpression\" &&\n      this.offsetToSourcePos(expr.start) === potentialArrowAt\n    );\n  }\n\n  // Convenience method to parse an Expression only\n  getExpression(this: Parser): N.Expression & N.ParserOutput {\n    this.enterInitialScopes();\n    this.nextToken();\n    if (this.match(tt.eof)) {\n      throw this.raise(Errors.ParseExpressionEmptyInput, this.state.startLoc);\n    }\n    const expr = this.parseExpression() as N.Expression & N.ParserOutput;\n    if (!this.match(tt.eof)) {\n      throw this.raise(Errors.ParseExpressionExpectsEOF, this.state.startLoc, {\n        unexpected: this.input.codePointAt(this.state.start),\n      });\n    }\n    // Unlike parseTopLevel, we need to drain remaining commentStacks\n    // because the top level node is _not_ Program.\n    this.finalizeRemainingComments();\n    expr.comments = this.comments;\n    expr.errors = this.state.errors;\n    if (this.optionFlags & OptionFlags.Tokens) {\n      expr.tokens = this.tokens;\n    }\n    return expr;\n  }\n\n  // ### Expression parsing\n\n  // These nest, from the most general expression type at the top to\n  // 'atomic', nondivisible expression types at the bottom. Most of\n  // the functions will simply let the function (s) below them parse,\n  // and, *if* the syntactic construct they handle is present, wrap\n  // the AST node that the inner parser gave them in another node.\n\n  // Parse a full expression.\n  // - `disallowIn`\n  //   is used to forbid the `in` operator (in for loops initialization expressions)\n  //   When `disallowIn` is true, the production parameter [In] is not present.\n\n  // - `refExpressionErrors `\n  //   provides reference for storing '=' operator inside shorthand\n  //   property assignment in contexts where both object expression\n  //   and object pattern might appear (so it's possible to raise\n  //   delayed syntax error at correct position).\n\n  parseExpression(\n    this: Parser,\n    disallowIn?: boolean,\n    refExpressionErrors?: ExpressionErrors,\n  ): N.Expression {\n    if (disallowIn) {\n      return this.disallowInAnd(() =>\n        this.parseExpressionBase(refExpressionErrors),\n      );\n    }\n    return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors));\n  }\n\n  // https://tc39.es/ecma262/#prod-Expression\n  parseExpressionBase(\n    this: Parser,\n    refExpressionErrors?: ExpressionErrors,\n  ): N.Expression {\n    const startLoc = this.state.startLoc;\n    const expr = this.parseMaybeAssign(refExpressionErrors);\n    if (this.match(tt.comma)) {\n      const node = this.startNodeAt<N.SequenceExpression>(startLoc);\n      node.expressions = [expr];\n      while (this.eat(tt.comma)) {\n        node.expressions.push(this.parseMaybeAssign(refExpressionErrors));\n      }\n      this.toReferencedList(node.expressions);\n      return this.finishNode(node, \"SequenceExpression\");\n    }\n    return expr;\n  }\n\n  // Set [~In] parameter for assignment expression\n  parseMaybeAssignDisallowIn(\n    this: Parser,\n    refExpressionErrors?: ExpressionErrors | null,\n    afterLeftParse?: Function,\n  ) {\n    return this.disallowInAnd(() =>\n      this.parseMaybeAssign(refExpressionErrors, afterLeftParse),\n    );\n  }\n\n  // Set [+In] parameter for assignment expression\n  parseMaybeAssignAllowIn(\n    this: Parser,\n    refExpressionErrors?: ExpressionErrors | null,\n    afterLeftParse?: Function,\n  ) {\n    return this.allowInAnd(() =>\n      this.parseMaybeAssign(refExpressionErrors, afterLeftParse),\n    );\n  }\n\n  // This method is only used by\n  // the typescript and flow plugins.\n  setOptionalParametersError(refExpressionErrors: ExpressionErrors) {\n    refExpressionErrors.optionalParametersLoc = this.state.startLoc;\n  }\n\n  // Parse an assignment expression. This includes applications of\n  // operators like `+=`.\n  // https://tc39.es/ecma262/#prod-AssignmentExpression\n  parseMaybeAssign(\n    this: Parser,\n    refExpressionErrors?: ExpressionErrors | null,\n    afterLeftParse?: Function,\n  ): N.Expression {\n    const startLoc = this.state.startLoc;\n    const isYield = this.isContextual(tt._yield);\n    if (isYield) {\n      if (this.prodParam.hasYield) {\n        this.next();\n        let left = this.parseYield(startLoc);\n        if (afterLeftParse) {\n          left = afterLeftParse.call(this, left, startLoc);\n        }\n        return left;\n      }\n    }\n\n    let ownExpressionErrors;\n    if (refExpressionErrors) {\n      ownExpressionErrors = false;\n    } else {\n      refExpressionErrors = new ExpressionErrors();\n      ownExpressionErrors = true;\n    }\n    const { type } = this.state;\n\n    if (type === tt.parenL || tokenIsIdentifier(type)) {\n      this.state.potentialArrowAt = this.state.start;\n    }\n\n    let left = this.parseMaybeConditional(refExpressionErrors);\n    if (afterLeftParse) {\n      left = afterLeftParse.call(this, left, startLoc);\n    }\n    if (tokenIsAssignment(this.state.type)) {\n      const node = this.startNodeAt<N.AssignmentExpression>(startLoc);\n      const operator = this.state.value;\n      node.operator = operator;\n\n      if (this.match(tt.eq)) {\n        this.toAssignable(left, /* isLHS */ true);\n        node.left = left;\n\n        const startIndex = startLoc.index;\n        if (\n          refExpressionErrors.doubleProtoLoc != null &&\n          refExpressionErrors.doubleProtoLoc.index >= startIndex\n        ) {\n          refExpressionErrors.doubleProtoLoc = null; // reset because double __proto__ is valid in assignment expression\n        }\n        if (\n          refExpressionErrors.shorthandAssignLoc != null &&\n          refExpressionErrors.shorthandAssignLoc.index >= startIndex\n        ) {\n          refExpressionErrors.shorthandAssignLoc = null; // reset because shorthand default was used correctly\n        }\n        if (\n          refExpressionErrors.privateKeyLoc != null &&\n          refExpressionErrors.privateKeyLoc.index >= startIndex\n        ) {\n          this.checkDestructuringPrivate(refExpressionErrors);\n          refExpressionErrors.privateKeyLoc = null; // reset because `({ #x: x })` is an assignable pattern\n        }\n        if (\n          refExpressionErrors.voidPatternLoc != null &&\n          refExpressionErrors.voidPatternLoc.index >= startIndex\n        ) {\n          refExpressionErrors.voidPatternLoc = null;\n        }\n      } else {\n        node.left = left as unknown as N.Assignable; // checked a few lines further down\n      }\n\n      this.next();\n      node.right = this.parseMaybeAssign();\n      this.checkLVal(left, this.finishNode(node, \"AssignmentExpression\"));\n      // @ts-expect-error todo(flow->ts) improve node types\n      return node;\n    } else if (ownExpressionErrors) {\n      this.checkExpressionErrors(refExpressionErrors, true);\n    }\n\n    if (isYield) {\n      const { type } = this.state;\n      const startsExpr = this.hasPlugin(\"v8intrinsic\")\n        ? tokenCanStartExpression(type)\n        : tokenCanStartExpression(type) && !this.match(tt.modulo);\n      if (startsExpr && !this.isAmbiguousPrefixOrIdentifier()) {\n        this.raiseOverwrite(Errors.YieldNotInGeneratorFunction, startLoc);\n        return this.parseYield(startLoc);\n      }\n    }\n\n    return left;\n  }\n\n  // Parse a ternary conditional (`?:`) operator.\n  // https://tc39.es/ecma262/#prod-ConditionalExpression\n\n  parseMaybeConditional(\n    this: Parser,\n    refExpressionErrors: ExpressionErrors,\n  ): N.Expression {\n    const startLoc = this.state.startLoc;\n    const potentialArrowAt = this.state.potentialArrowAt;\n    const expr = this.parseExprOps(refExpressionErrors);\n\n    if (this.shouldExitDescending(expr, potentialArrowAt)) {\n      return expr;\n    }\n\n    return this.parseConditional(expr, startLoc, refExpressionErrors);\n  }\n\n  parseConditional(\n    this: Parser,\n    expr: N.Expression,\n    startLoc: Position,\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    refExpressionErrors?: ExpressionErrors | null,\n  ): N.Expression {\n    if (this.eat(tt.question)) {\n      const node = this.startNodeAt<N.ConditionalExpression>(startLoc);\n      node.test = expr;\n      node.consequent = this.parseMaybeAssignAllowIn();\n      this.expect(tt.colon);\n      node.alternate = this.parseMaybeAssign();\n      return this.finishNode(node, \"ConditionalExpression\");\n    }\n    return expr;\n  }\n\n  parseMaybeUnaryOrPrivate(\n    this: Parser,\n    refExpressionErrors?: ExpressionErrors,\n  ): N.Expression | N.PrivateName {\n    return this.match(tt.privateName)\n      ? this.parsePrivateName()\n      : this.parseMaybeUnary(refExpressionErrors);\n  }\n\n  // Start the precedence parser.\n  // https://tc39.es/ecma262/#prod-ShortCircuitExpression\n\n  parseExprOps(\n    this: Parser,\n    refExpressionErrors: ExpressionErrors,\n  ): N.Expression {\n    const startLoc = this.state.startLoc;\n    const potentialArrowAt = this.state.potentialArrowAt;\n    const expr = this.parseMaybeUnaryOrPrivate(refExpressionErrors);\n\n    if (this.shouldExitDescending(expr, potentialArrowAt)) {\n      return expr;\n    }\n\n    return this.parseExprOp(expr, startLoc, -1);\n  }\n\n  // Parse binary operators with the operator precedence parsing\n  // algorithm. `left` is the left-hand side of the operator.\n  // `minPrec` provides context that allows the function to stop and\n  // defer further parser to one of its callers when it encounters an\n  // operator that has a lower precedence than the set it is parsing.\n\n  parseExprOp(\n    this: Parser,\n    left: N.Expression | N.PrivateName,\n    leftStartLoc: Position,\n    minPrec: number,\n  ): N.Expression {\n    if (this.isPrivateName(left)) {\n      // https://tc39.es/ecma262/#prod-RelationalExpression\n      // RelationalExpression [In, Yield, Await]\n      //   [+In] PrivateIdentifier in ShiftExpression[?Yield, ?Await]\n\n      const value = this.getPrivateNameSV(left);\n\n      if (\n        minPrec >= tokenOperatorPrecedence(tt._in) ||\n        !this.prodParam.hasIn ||\n        !this.match(tt._in)\n      ) {\n        this.raise(Errors.PrivateInExpectedIn, left, {\n          identifierName: value,\n        });\n      }\n\n      this.classScope.usePrivateName(value, left.loc.start);\n    }\n\n    const op = this.state.type;\n    if (tokenIsOperator(op) && (this.prodParam.hasIn || !this.match(tt._in))) {\n      let prec = tokenOperatorPrecedence(op);\n      if (prec > minPrec) {\n        if (op === tt.pipeline) {\n          this.expectPlugin(\"pipelineOperator\");\n          if (this.state.inFSharpPipelineDirectBody) {\n            // PrivateName must be followed by `in`, but we have `|>`\n            return left as N.Expression;\n          }\n          this.checkPipelineAtInfixOperator(left as N.Expression, leftStartLoc);\n        }\n        const node = this.startNodeAt<N.LogicalExpression | N.BinaryExpression>(\n          leftStartLoc,\n        );\n        node.left = left;\n        node.operator = this.state.value;\n\n        const logical = op === tt.logicalOR || op === tt.logicalAND;\n        const coalesce = op === tt.nullishCoalescing;\n\n        if (coalesce) {\n          // Handle the precedence of `tt.coalesce` as equal to the range of logical expressions.\n          // In other words, `node.right` shouldn't contain logical expressions in order to check the mixed error.\n          prec = tokenOperatorPrecedence(tt.logicalAND);\n        }\n\n        this.next();\n\n        if (\n          !process.env.BABEL_8_BREAKING &&\n          op === tt.pipeline &&\n          // @ts-expect-error: Only in Babel 7\n          this.hasPlugin([\"pipelineOperator\", { proposal: \"minimal\" }])\n        ) {\n          if (this.state.type === tt._await && this.prodParam.hasAwait) {\n            throw this.raise(\n              Errors.UnexpectedAwaitAfterPipelineBody,\n              this.state.startLoc,\n            );\n          }\n        }\n\n        node.right = this.parseExprOpRightExpr(op, prec);\n        const finishedNode = this.finishNode(\n          node,\n          logical || coalesce ? \"LogicalExpression\" : \"BinaryExpression\",\n        );\n        /* this check is for all ?? operators\n         * a ?? b && c for this example\n         * when op is coalesce and nextOp is logical (&&), throw at the pos of nextOp that it can not be mixed.\n         * Symmetrically it also throws when op is logical and nextOp is coalesce\n         */\n        const nextOp = this.state.type;\n        if (\n          (coalesce && (nextOp === tt.logicalOR || nextOp === tt.logicalAND)) ||\n          (logical && nextOp === tt.nullishCoalescing)\n        ) {\n          throw this.raise(\n            Errors.MixingCoalesceWithLogical,\n            this.state.startLoc,\n          );\n        }\n\n        return this.parseExprOp(finishedNode, leftStartLoc, minPrec);\n      }\n    }\n    // PrivateName is followed by `in` and handled by the previous if statement\n    return left as N.Expression;\n  }\n\n  // Helper function for `parseExprOp`. Parse the right-hand side of binary-\n  // operator expressions, then apply any operator-specific functions.\n\n  parseExprOpRightExpr(\n    this: Parser,\n    op: TokenType,\n    prec: number,\n  ): N.Expression {\n    const startLoc = this.state.startLoc;\n    switch (op) {\n      case tt.pipeline:\n        switch (this.getPluginOption(\"pipelineOperator\", \"proposal\")) {\n          case \"hack\":\n            return this.withTopicBindingContext(() => {\n              return this.parseHackPipeBody();\n            });\n\n          case \"fsharp\":\n            return this.withSoloAwaitPermittingContext(() => {\n              return this.parseFSharpPipelineBody(prec);\n            });\n        }\n\n        if (\n          !process.env.BABEL_8_BREAKING &&\n          // @ts-expect-error: Babel 7 only\n          this.getPluginOption(\"pipelineOperator\", \"proposal\") === \"smart\"\n        ) {\n          return this.withTopicBindingContext(() => {\n            if (this.prodParam.hasYield && this.isContextual(tt._yield)) {\n              throw this.raise(Errors.PipeBodyIsTighter, this.state.startLoc);\n            }\n            return this.parseSmartPipelineBodyInStyle(\n              this.parseExprOpBaseRightExpr(op, prec),\n              startLoc,\n            );\n          });\n        }\n\n      // Falls through.\n      default:\n        return this.parseExprOpBaseRightExpr(op, prec);\n    }\n  }\n\n  // Helper function for `parseExprOpRightExpr`. Parse the right-hand side of\n  // binary-operator expressions without applying any operator-specific functions.\n\n  parseExprOpBaseRightExpr(\n    this: Parser,\n    op: TokenType,\n    prec: number,\n  ): N.Expression {\n    const startLoc = this.state.startLoc;\n\n    return this.parseExprOp(\n      this.parseMaybeUnaryOrPrivate(),\n      startLoc,\n      tokenIsRightAssociative(op) ? prec - 1 : prec,\n    );\n  }\n\n  parseHackPipeBody(this: Parser): N.Expression {\n    const { startLoc } = this.state;\n    const body = this.parseMaybeAssign();\n    const requiredParentheses = UnparenthesizedPipeBodyDescriptions.has(\n      // @ts-expect-error TS2345: Argument of type 'string' is not assignable to parameter of type '\"ArrowFunctionExpression\" | \"YieldExpression\" | \"AssignmentExpression\" | \"ConditionalExpression\"'.\n      body.type,\n    );\n\n    // TODO: Check how to handle type casts in Flow and TS once they are supported\n    if (requiredParentheses && !body.extra?.parenthesized) {\n      this.raise(Errors.PipeUnparenthesizedBody, startLoc, {\n        type: body.type as UnparenthesizedPipeBodyTypes,\n      });\n    }\n    if (!this.topicReferenceWasUsedInCurrentContext()) {\n      // A Hack pipe body must use the topic reference at least once.\n      this.raise(Errors.PipeTopicUnused, startLoc);\n    }\n\n    return body;\n  }\n\n  checkExponentialAfterUnary(\n    node: N.AwaitExpression | Undone<N.UnaryExpression>,\n  ) {\n    if (this.match(tt.exponent)) {\n      this.raise(Errors.UnexpectedTokenUnaryExponentiation, node.argument);\n    }\n  }\n\n  // Parse unary operators, both prefix and postfix.\n  // https://tc39.es/ecma262/#prod-UnaryExpression\n  parseMaybeUnary(\n    this: Parser,\n    refExpressionErrors?: ExpressionErrors | null,\n    sawUnary?: boolean,\n  ): N.Expression {\n    const startLoc = this.state.startLoc;\n    const isAwait = this.isContextual(tt._await);\n\n    if (isAwait && this.recordAwaitIfAllowed()) {\n      this.next();\n      const expr = this.parseAwait(startLoc);\n      if (!sawUnary) this.checkExponentialAfterUnary(expr);\n      return expr;\n    }\n    const update = this.match(tt.incDec);\n    const node = this.startNode<N.UnaryExpression | N.UpdateExpression>();\n    if (tokenIsPrefix(this.state.type)) {\n      node.operator = this.state.value;\n      node.prefix = true;\n\n      if (this.match(tt._throw)) {\n        this.expectPlugin(\"throwExpressions\");\n      }\n      const isDelete = this.match(tt._delete);\n      this.next();\n\n      node.argument = this.parseMaybeUnary(null, true);\n\n      this.checkExpressionErrors(refExpressionErrors, true);\n\n      if (this.state.strict && isDelete) {\n        const arg = node.argument;\n\n        if (arg.type === \"Identifier\") {\n          this.raise(Errors.StrictDelete, node);\n        } else if (this.hasPropertyAsPrivateName(arg)) {\n          this.raise(Errors.DeletePrivateField, node);\n        }\n      }\n\n      if (!update) {\n        if (!sawUnary) {\n          this.checkExponentialAfterUnary(node as Undone<N.UnaryExpression>);\n        }\n        return this.finishNode(node, \"UnaryExpression\");\n      }\n    }\n\n    const expr = this.parseUpdate(\n      // @ts-expect-error using \"Undone\" node as \"done\"\n      node,\n      update,\n      refExpressionErrors,\n    );\n\n    if (isAwait) {\n      const { type } = this.state;\n      const startsExpr = this.hasPlugin(\"v8intrinsic\")\n        ? tokenCanStartExpression(type)\n        : tokenCanStartExpression(type) && !this.match(tt.modulo);\n      if (startsExpr && !this.isAmbiguousPrefixOrIdentifier()) {\n        this.raiseOverwrite(Errors.AwaitNotInAsyncContext, startLoc);\n        return this.parseAwait(startLoc);\n      }\n    }\n\n    return expr;\n  }\n\n  // https://tc39.es/ecma262/#prod-UpdateExpression\n  parseUpdate(\n    this: Parser,\n    node: N.Expression,\n    update: boolean,\n    refExpressionErrors?: ExpressionErrors | null,\n  ): N.Expression {\n    if (update) {\n      const updateExpressionNode = node as Undone<N.UpdateExpression>;\n      this.checkLVal(\n        updateExpressionNode.argument,\n        this.finishNode(updateExpressionNode, \"UpdateExpression\"),\n      );\n      return node;\n    }\n\n    const startLoc = this.state.startLoc;\n    let expr = this.parseExprSubscripts(refExpressionErrors);\n    if (this.checkExpressionErrors(refExpressionErrors, false)) return expr;\n    while (tokenIsPostfix(this.state.type) && !this.canInsertSemicolon()) {\n      const node = this.startNodeAt<N.UpdateExpression>(startLoc);\n      node.operator = this.state.value;\n      node.prefix = false;\n      node.argument = expr;\n      this.next();\n      this.checkLVal(expr, (expr = this.finishNode(node, \"UpdateExpression\")));\n    }\n    return expr;\n  }\n\n  // Parse call, dot, and `[]`-subscript expressions.\n  // https://tc39.es/ecma262/#prod-LeftHandSideExpression\n  parseExprSubscripts(\n    this: Parser,\n    refExpressionErrors?: ExpressionErrors | null,\n  ): N.Expression {\n    const startLoc = this.state.startLoc;\n    const potentialArrowAt = this.state.potentialArrowAt;\n    const expr = this.parseExprAtom(refExpressionErrors);\n\n    if (this.shouldExitDescending(expr, potentialArrowAt)) {\n      return expr;\n    }\n\n    return this.parseSubscripts(expr, startLoc);\n  }\n\n  parseSubscripts(\n    this: Parser,\n    base: N.Expression,\n    startLoc: Position,\n    noCalls?: boolean | null,\n  ): N.Expression {\n    const state = {\n      optionalChainMember: false,\n      maybeAsyncArrow: this.atPossibleAsyncArrow(base),\n      stop: false,\n    };\n    do {\n      base = this.parseSubscript(base, startLoc, noCalls, state);\n\n      // After parsing a subscript, this isn't \"async\" for sure.\n      state.maybeAsyncArrow = false;\n    } while (!state.stop);\n    return base;\n  }\n\n  /**\n   * @param state Set 'state.stop = true' to indicate that we should stop parsing subscripts.\n   *   state.optionalChainMember to indicate that the member is currently in OptionalChain\n   */\n  parseSubscript(\n    this: Parser,\n    base: N.Expression,\n    startLoc: Position,\n    noCalls: boolean | undefined | null,\n    state: N.ParseSubscriptState,\n  ): N.Expression {\n    const { type } = this.state;\n    if (!noCalls && type === tt.doubleColon) {\n      return this.parseBind(base, startLoc, noCalls, state);\n    } else if (tokenIsTemplate(type)) {\n      return this.parseTaggedTemplateExpression(base, startLoc, state);\n    }\n\n    let optional = false;\n\n    if (type === tt.questionDot) {\n      if (noCalls) {\n        this.raise(Errors.OptionalChainingNoNew, this.state.startLoc);\n        if (this.lookaheadCharCode() === charCodes.leftParenthesis) {\n          // stop at `?.` when parsing `new a?.()`\n          return this.stopParseSubscript(base, state);\n        }\n      }\n      state.optionalChainMember = optional = true;\n      this.next();\n    }\n\n    if (!noCalls && this.match(tt.parenL)) {\n      return this.parseCoverCallAndAsyncArrowHead(\n        base,\n        startLoc,\n        state,\n        optional,\n      );\n    } else {\n      const computed = this.eat(tt.bracketL);\n      if (computed || optional || this.eat(tt.dot)) {\n        return this.parseMember(base, startLoc, state, computed, optional);\n      } else {\n        return this.stopParseSubscript(base, state);\n      }\n    }\n  }\n\n  stopParseSubscript(\n    this: Parser,\n    base: N.Expression,\n    state: N.ParseSubscriptState,\n  ) {\n    state.stop = true;\n    return base;\n  }\n\n  // base[?Yield, ?Await] [ Expression[+In, ?Yield, ?Await] ]\n  // base[?Yield, ?Await] . IdentifierName\n  // base[?Yield, ?Await] . PrivateIdentifier\n  //   where `base` is one of CallExpression, MemberExpression and OptionalChain\n  parseMember(\n    this: Parser,\n    base: N.Expression,\n    startLoc: Position,\n    state: N.ParseSubscriptState,\n    computed: boolean,\n    optional: boolean,\n  ): N.OptionalMemberExpression | N.MemberExpression {\n    const node = this.startNodeAt<\n      N.OptionalMemberExpression | N.MemberExpression\n    >(startLoc);\n    node.object = base;\n    node.computed = computed;\n    if (computed) {\n      node.property = this.parseExpression();\n      this.expect(tt.bracketR);\n    } else if (this.match(tt.privateName)) {\n      if (base.type === \"Super\") {\n        this.raise(Errors.SuperPrivateField, startLoc);\n      }\n      this.classScope.usePrivateName(this.state.value, this.state.startLoc);\n      node.property = this.parsePrivateName();\n    } else {\n      node.property = this.parseIdentifier(true);\n    }\n\n    if (state.optionalChainMember) {\n      (node as Undone<N.OptionalMemberExpression>).optional = optional;\n      return this.finishNode(node, \"OptionalMemberExpression\");\n    } else {\n      return this.finishNode(node, \"MemberExpression\");\n    }\n  }\n\n  // https://github.com/tc39/proposal-bind-operator#syntax\n  parseBind(\n    this: Parser,\n    base: N.Expression,\n    startLoc: Position,\n    noCalls: boolean | undefined | null,\n    state: N.ParseSubscriptState,\n  ): N.Expression {\n    const node = this.startNodeAt<N.BindExpression>(startLoc);\n    node.object = base;\n    this.next(); // eat '::'\n    node.callee = this.parseNoCallExpr();\n    state.stop = true;\n    return this.parseSubscripts(\n      this.finishNode(node, \"BindExpression\"),\n      startLoc,\n      noCalls,\n    );\n  }\n\n  // https://tc39.es/ecma262/#prod-CoverCallExpressionAndAsyncArrowHead\n  // CoverCallExpressionAndAsyncArrowHead\n  // CallExpression[?Yield, ?Await] Arguments[?Yield, ?Await]\n  // OptionalChain[?Yield, ?Await] Arguments[?Yield, ?Await]\n  parseCoverCallAndAsyncArrowHead(\n    this: Parser,\n    base: N.Expression,\n    startLoc: Position,\n    state: N.ParseSubscriptState,\n    optional: boolean,\n  ): N.Expression {\n    const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n    let refExpressionErrors: ExpressionErrors | null = null;\n\n    this.state.maybeInArrowParameters = true;\n    this.next(); // eat `(`\n\n    const node = this.startNodeAt<N.CallExpression | N.OptionalCallExpression>(\n      startLoc,\n    );\n    node.callee = base;\n    const { maybeAsyncArrow, optionalChainMember } = state;\n\n    if (maybeAsyncArrow) {\n      this.expressionScope.enter(newAsyncArrowScope());\n      refExpressionErrors = new ExpressionErrors();\n    }\n\n    if (optionalChainMember) {\n      (node as Undone<N.OptionalCallExpression>).optional = optional;\n    }\n\n    if (optional) {\n      node.arguments = this.parseCallExpressionArguments();\n    } else {\n      node.arguments = this.parseCallExpressionArguments(\n        base.type !== \"Super\",\n        node,\n        refExpressionErrors,\n      );\n    }\n    let finishedNode:\n      | N.CallExpression\n      | N.OptionalCallExpression\n      | N.ArrowFunctionExpression = this.finishCallExpression(\n      node,\n      optionalChainMember,\n    );\n\n    if (maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) {\n      /*:: invariant(refExpressionErrors != null) */\n      state.stop = true;\n      this.checkDestructuringPrivate(refExpressionErrors);\n      this.expressionScope.validateAsPattern();\n      this.expressionScope.exit();\n      finishedNode = this.parseAsyncArrowFromCallExpression(\n        this.startNodeAt<N.ArrowFunctionExpression>(startLoc),\n        finishedNode as N.CallExpression,\n      );\n    } else {\n      if (maybeAsyncArrow) {\n        this.checkExpressionErrors(refExpressionErrors, true);\n        this.expressionScope.exit();\n      }\n      this.toReferencedArguments(finishedNode);\n    }\n\n    this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n\n    return finishedNode;\n  }\n\n  toReferencedArguments(\n    node: N.CallExpression | N.OptionalCallExpression,\n    isParenthesizedExpr?: boolean,\n  ) {\n    this.toReferencedListDeep(node.arguments, isParenthesizedExpr);\n  }\n\n  // MemberExpression [?Yield, ?Await] TemplateLiteral[?Yield, ?Await, +Tagged]\n  // CallExpression [?Yield, ?Await] TemplateLiteral[?Yield, ?Await, +Tagged]\n  parseTaggedTemplateExpression(\n    this: Parser,\n    base: N.Expression,\n    startLoc: Position,\n    state: N.ParseSubscriptState,\n  ): N.TaggedTemplateExpression {\n    const node = this.startNodeAt<N.TaggedTemplateExpression>(startLoc);\n    node.tag = base;\n    node.quasi = this.parseTemplate(true);\n    if (state.optionalChainMember) {\n      this.raise(Errors.OptionalChainingNoTemplate, startLoc);\n    }\n    return this.finishNode(node, \"TaggedTemplateExpression\");\n  }\n\n  atPossibleAsyncArrow(base: N.Expression): boolean {\n    return (\n      base.type === \"Identifier\" &&\n      base.name === \"async\" &&\n      this.state.lastTokEndLoc.index === base.end &&\n      !this.canInsertSemicolon() &&\n      // check there are no escape sequences, such as \\u{61}sync\n      base.end - base.start === 5 &&\n      this.offsetToSourcePos(base.start) === this.state.potentialArrowAt\n    );\n  }\n\n  finishCallExpression<T extends N.CallExpression | N.OptionalCallExpression>(\n    node: Undone<T>,\n    optional: boolean,\n  ): T {\n    if (node.callee.type === \"Import\") {\n      if (node.arguments.length === 0 || node.arguments.length > 2) {\n        this.raise(Errors.ImportCallArity, node);\n      } else {\n        for (const arg of node.arguments) {\n          if (arg.type === \"SpreadElement\") {\n            this.raise(Errors.ImportCallSpreadArgument, arg);\n          }\n        }\n      }\n    }\n    return this.finishNode(\n      node,\n      optional ? \"OptionalCallExpression\" : \"CallExpression\",\n    );\n  }\n\n  parseCallExpressionArguments(\n    this: Parser,\n    allowPlaceholder?: boolean,\n    nodeForExtra?: Undone<N.Node> | null,\n    refExpressionErrors?: ExpressionErrors | null,\n  ): Array<N.Expression> {\n    const elts: N.Expression[] = [];\n    let first = true;\n    const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;\n    this.state.inFSharpPipelineDirectBody = false;\n\n    while (!this.eat(tt.parenR)) {\n      if (first) {\n        first = false;\n      } else {\n        this.expect(tt.comma);\n        if (this.match(tt.parenR)) {\n          if (nodeForExtra) {\n            this.addTrailingCommaExtraToNode(nodeForExtra);\n          }\n          this.next();\n          break;\n        }\n      }\n\n      elts.push(\n        this.parseExprListItem(\n          tt.parenR,\n          false,\n          refExpressionErrors,\n          allowPlaceholder,\n        ),\n      );\n    }\n\n    this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;\n\n    return elts;\n  }\n\n  shouldParseAsyncArrow(): boolean {\n    return this.match(tt.arrow) && !this.canInsertSemicolon();\n  }\n\n  parseAsyncArrowFromCallExpression(\n    this: Parser,\n    node: Undone<N.ArrowFunctionExpression>,\n    call: N.CallExpression,\n  ): N.ArrowFunctionExpression {\n    this.resetPreviousNodeTrailingComments(call);\n    this.expect(tt.arrow);\n    this.parseArrowExpression(\n      node,\n      call.arguments,\n      true,\n      call.extra?.trailingCommaLoc,\n    );\n    // mark inner comments of `async()` as inner comments of `async () =>`\n    if (call.innerComments) {\n      setInnerComments(node, call.innerComments);\n    }\n    // mark trailing comments of `async` to be inner comments\n    if (call.callee.trailingComments) {\n      setInnerComments(node, call.callee.trailingComments);\n    }\n    return node as N.ArrowFunctionExpression;\n  }\n\n  // Parse a no-call expression (like argument of `new` or `::` operators).\n  // https://tc39.es/ecma262/#prod-MemberExpression\n  parseNoCallExpr(this: Parser): N.Expression {\n    const startLoc = this.state.startLoc;\n    return this.parseSubscripts(this.parseExprAtom(), startLoc, true);\n  }\n\n  // Parse an atomic expression — either a single token that is an\n  // expression, an expression started by a keyword like `function` or\n  // `new`, or an expression wrapped in punctuation like `()`, `[]`,\n  // or `{}`.\n\n  // https://tc39.es/ecma262/#prod-PrimaryExpression\n  // https://tc39.es/ecma262/#prod-AsyncArrowFunction\n  // PrimaryExpression\n  // Super\n  // Import\n  // AsyncArrowFunction\n\n  parseExprAtom(\n    this: Parser,\n    refExpressionErrors?: ExpressionErrors | null,\n  ): N.Expression {\n    let node;\n    let decorators: N.Decorator[] | null = null;\n\n    const { type } = this.state;\n    switch (type) {\n      case tt._super:\n        return this.parseSuper();\n\n      case tt._import:\n        node = this.startNode<N.MetaProperty | N.Import | N.ImportExpression>();\n        this.next();\n\n        if (this.match(tt.dot)) {\n          return this.parseImportMetaPropertyOrPhaseCall(\n            node as Undone<N.MetaProperty | N.ImportExpression>,\n          );\n        }\n\n        if (this.match(tt.parenL)) {\n          if (this.optionFlags & OptionFlags.CreateImportExpressions) {\n            return this.parseImportCall(node as Undone<N.ImportExpression>);\n          } else {\n            return this.finishNode(node, \"Import\");\n          }\n        } else {\n          this.raise(Errors.UnsupportedImport, this.state.lastTokStartLoc);\n          return this.finishNode(node, \"Import\");\n        }\n\n      case tt._this:\n        node = this.startNode<N.ThisExpression>();\n        this.next();\n        return this.finishNode(node, \"ThisExpression\");\n\n      case tt._do: {\n        return this.parseDo(this.startNode(), false);\n      }\n\n      case tt.slash:\n      case tt.slashAssign: {\n        this.readRegexp();\n        return this.parseRegExpLiteral(this.state.value);\n      }\n\n      case tt.num:\n        return this.parseNumericLiteral(this.state.value);\n\n      case tt.bigint:\n        return this.parseBigIntLiteral(this.state.value);\n\n      case tt.string:\n        return this.parseStringLiteral(this.state.value);\n\n      case tt._null:\n        return this.parseNullLiteral();\n\n      case tt._true:\n        return this.parseBooleanLiteral(true);\n      case tt._false:\n        return this.parseBooleanLiteral(false);\n\n      case tt.parenL: {\n        const canBeArrow = this.state.potentialArrowAt === this.state.start;\n        return this.parseParenAndDistinguishExpression(canBeArrow);\n      }\n\n      case tt.bracketL: {\n        return this.parseArrayLike(\n          tt.bracketR,\n          /* canBePattern */ true,\n          /* isTuple */ false,\n          refExpressionErrors,\n        );\n      }\n      case tt.braceL: {\n        return this.parseObjectLike(\n          tt.braceR,\n          /* isPattern */ false,\n          /* isRecord */ false,\n          refExpressionErrors,\n        );\n      }\n      case tt._function:\n        return this.parseFunctionOrFunctionSent();\n\n      case tt.at:\n        decorators = this.parseDecorators();\n      // fall through\n      case tt._class:\n        return this.parseClass(\n          this.maybeTakeDecorators(\n            decorators,\n            this.startNode<N.ClassExpression>(),\n          ),\n          false,\n        );\n\n      case tt._new:\n        return this.parseNewOrNewTarget();\n\n      case tt.templateNonTail:\n      case tt.templateTail:\n        return this.parseTemplate(false);\n\n      // BindExpression[Yield]\n      //   :: MemberExpression[?Yield]\n      case tt.doubleColon: {\n        node = this.startNode<N.BindExpression>();\n        this.next();\n        node.object = null;\n        const callee = (node.callee = this.parseNoCallExpr());\n        if (callee.type === \"MemberExpression\") {\n          return this.finishNode(node, \"BindExpression\");\n        } else {\n          throw this.raise(Errors.UnsupportedBind, callee);\n        }\n      }\n\n      case tt.privateName: {\n        // Standalone private names are only allowed in \"#x in obj\"\n        // expressions, and they are directly handled by callers of\n        // parseExprOp. If we reach this, the input is always invalid.\n        // We can throw a better error message and recover, rather than\n        // just throwing \"Unexpected token\" (which is the default\n        // behavior of this big switch statement).\n        this.raise(Errors.PrivateInExpectedIn, this.state.startLoc, {\n          identifierName: this.state.value,\n        });\n        return this.parsePrivateName() as unknown as N.Expression;\n      }\n\n      case tt.moduloAssign: {\n        return this.parseTopicReferenceThenEqualsSign(tt.modulo, \"%\");\n      }\n\n      case tt.xorAssign: {\n        return this.parseTopicReferenceThenEqualsSign(tt.bitwiseXOR, \"^\");\n      }\n\n      case tt.doubleCaret:\n      case tt.doubleAt: {\n        return this.parseTopicReference(\"hack\");\n      }\n\n      case tt.bitwiseXOR:\n      case tt.modulo:\n      case tt.hash: {\n        const pipeProposal = this.getPluginOption(\n          \"pipelineOperator\",\n          \"proposal\",\n        );\n\n        if (pipeProposal) {\n          return this.parseTopicReference(pipeProposal);\n        }\n        this.unexpected();\n        break;\n      }\n\n      case tt.lt: {\n        const lookaheadCh = this.input.codePointAt(this.nextTokenStart());\n        if (\n          isIdentifierStart(lookaheadCh) || // Element/Type Parameter <foo>\n          lookaheadCh === charCodes.greaterThan // Fragment <>\n        ) {\n          this.expectOnePlugin([\"jsx\", \"flow\", \"typescript\"]);\n        } else {\n          this.unexpected();\n        }\n        break;\n      }\n\n      default:\n        if (!process.env.BABEL_8_BREAKING) {\n          if (type === tt.decimal) {\n            return this.parseDecimalLiteral(this.state.value);\n          } else if (type === tt.bracketBarL || type === tt.bracketHashL) {\n            return this.parseArrayLike(\n              this.state.type === tt.bracketBarL ? tt.bracketBarR : tt.bracketR,\n              /* canBePattern */ false,\n              /* isTuple */ true,\n            );\n          } else if (type === tt.braceBarL || type === tt.braceHashL) {\n            return this.parseObjectLike(\n              this.state.type === tt.braceBarL ? tt.braceBarR : tt.braceR,\n              /* isPattern */ false,\n              /* isRecord */ true,\n            );\n          }\n        }\n\n        if (tokenIsIdentifier(type)) {\n          if (\n            this.isContextual(tt._module) &&\n            this.lookaheadInLineCharCode() === charCodes.leftCurlyBrace\n          ) {\n            return this.parseModuleExpression();\n          }\n          const canBeArrow = this.state.potentialArrowAt === this.state.start;\n          const containsEsc = this.state.containsEsc;\n          const id = this.parseIdentifier();\n\n          if (\n            !containsEsc &&\n            id.name === \"async\" &&\n            !this.canInsertSemicolon()\n          ) {\n            const { type } = this.state;\n            if (type === tt._function) {\n              this.resetPreviousNodeTrailingComments(id);\n              this.next();\n              return this.parseAsyncFunctionExpression(\n                this.startNodeAtNode(id),\n              );\n            } else if (tokenIsIdentifier(type)) {\n              // If the next token begins with \"=\", commit to parsing an async\n              // arrow function. (Peeking ahead for \"=\" lets us avoid a more\n              // expensive full-token lookahead on this common path.)\n              if (this.lookaheadCharCode() === charCodes.equalsTo) {\n                // although `id` is not used in async arrow unary function,\n                // we don't need to reset `async`'s trailing comments because\n                // it will be attached to the upcoming async arrow binding identifier\n                return this.parseAsyncArrowUnaryFunction(\n                  this.startNodeAtNode(id),\n                );\n              } else {\n                // Otherwise, treat \"async\" as an identifier and let calling code\n                // deal with the current tt.name token.\n                return id;\n              }\n            } else if (type === tt._do) {\n              this.resetPreviousNodeTrailingComments(id);\n              return this.parseDo(this.startNodeAtNode(id), true);\n            }\n          }\n\n          if (\n            canBeArrow &&\n            this.match(tt.arrow) &&\n            !this.canInsertSemicolon()\n          ) {\n            this.next();\n            return this.parseArrowExpression(\n              this.startNodeAtNode(id),\n              [id],\n              false,\n            );\n          }\n\n          return id;\n        } else {\n          this.unexpected();\n        }\n    }\n  }\n\n  // This helper method should only be called\n  // when the parser has reached a potential Hack pipe topic token\n  // that is followed by an equals sign.\n  // See <https://github.com/js-choi/proposal-hack-pipes>.\n  // If we find ^= or %= in an expression position\n  // (i.e., the tt.moduloAssign or tt.xorAssign token types), and if the\n  // Hack-pipes proposal is active with ^ or % as its topicToken, then the ^ or\n  // % could be the topic token (e.g., in x |> ^==y or x |> ^===y), and so we\n  // reparse the current token as ^ or %.\n  // Otherwise, this throws an unexpected-token error.\n  parseTopicReferenceThenEqualsSign(\n    topicTokenType: TokenType,\n    topicTokenValue: string,\n  ): N.Expression {\n    const pipeProposal = this.getPluginOption(\"pipelineOperator\", \"proposal\");\n\n    if (pipeProposal) {\n      // Set the most-recent token to be a topic token\n      // given by the tokenType and tokenValue.\n      // Now the next readToken() call (in parseTopicReference)\n      // will consume that “topic token”.\n      this.state.type = topicTokenType;\n      this.state.value = topicTokenValue;\n      // Rewind the tokenizer to the end of the “topic token”, so that the\n      // following token starts at the equals sign after that topic token.\n      this.state.pos--;\n      this.state.end--;\n      // This is safe to do since the preceding character was either ^ or %, and\n      // thus not a newline.\n      this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1);\n      // Now actually consume the topic token.\n      return this.parseTopicReference(pipeProposal);\n    } else {\n      this.unexpected();\n    }\n  }\n\n  // This helper method should only be called\n  // when the proposal-pipeline-operator plugin is active,\n  // and when the parser has reached a potential Hack pipe topic token.\n  // Although a pipe-operator proposal is assumed to be active,\n  // its configuration might not match the current token’s type.\n  // See <https://github.com/js-choi/proposal-hack-pipes>.\n  parseTopicReference(pipeProposal: string): N.Expression {\n    const node = this.startNode<N.TopicReference>();\n    const startLoc = this.state.startLoc;\n    const tokenType = this.state.type;\n\n    // Consume the current token.\n    this.next();\n\n    // If the pipe-operator plugin’s configuration matches the current token’s type,\n    // then this will return `node`, will have been finished as a topic reference.\n    // Otherwise, this will throw a `PipeTopicUnconfiguredToken` error.\n    return this.finishTopicReference(node, startLoc, pipeProposal, tokenType);\n  }\n\n  // This helper method attempts to finish the given `node`\n  // into a topic-reference node for the given `pipeProposal`.\n  // See <https://github.com/js-choi/proposal-hack-pipes>.\n  //\n  // The method assumes that any topic token was consumed before it was called.\n  //\n  // If the `pipelineOperator` plugin is active,\n  // and if the given `tokenType` matches the plugin’s configuration,\n  // then this method will return the finished `node`.\n  //\n  // If the `pipelineOperator` plugin is active,\n  // but if the given `tokenType` does not match the plugin’s configuration,\n  // then this method will throw a `PipeTopicUnconfiguredToken` error.\n  finishTopicReference<\n    T extends N.PipelinePrimaryTopicReference | N.TopicReference,\n  >(\n    node: Undone<T>,\n    startLoc: Position,\n    pipeProposal: string,\n    tokenType: TokenType,\n  ): T {\n    if (\n      this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)\n    ) {\n      // The token matches the plugin’s configuration.\n      // The token is therefore a topic reference.\n\n      if (process.env.BABEL_8_BREAKING || pipeProposal === \"hack\") {\n        if (!this.topicReferenceIsAllowedInCurrentContext()) {\n          this.raise(Errors.PipeTopicUnbound, startLoc);\n        }\n\n        // Register the topic reference so that its pipe body knows\n        // that its topic was used at least once.\n        this.registerTopicReference();\n\n        return this.finishNode(node, \"TopicReference\");\n      } else {\n        // pipeProposal is \"smart\"\n\n        if (!this.topicReferenceIsAllowedInCurrentContext()) {\n          this.raise(Errors.PrimaryTopicNotAllowed, startLoc);\n        }\n        this.registerTopicReference();\n        return this.finishNode(node, \"PipelinePrimaryTopicReference\");\n      }\n    } else {\n      // The token does not match the plugin’s configuration.\n      throw this.raise(Errors.PipeTopicUnconfiguredToken, startLoc, {\n        token: tokenLabelName(tokenType),\n      });\n    }\n  }\n\n  // This helper method tests whether the given token type\n  // matches the pipelineOperator parser plugin’s configuration.\n  // If the active pipe proposal is Hack style,\n  // and if the given token is the same as the plugin configuration’s `topicToken`,\n  // then this is a valid topic reference.\n  // If the active pipe proposal is smart mix,\n  // then the topic token must always be `#`.\n  // If the active pipe proposal is neither (e.g., \"minimal\"(Babel 7) or \"fsharp\"),\n  // then an error is thrown.\n  testTopicReferenceConfiguration(\n    pipeProposal: string,\n    startLoc: Position,\n    tokenType: TokenType,\n  ): boolean {\n    switch (pipeProposal) {\n      case \"hack\": {\n        return this.hasPlugin([\n          \"pipelineOperator\",\n          {\n            // @ts-expect-error token must have a label\n            topicToken: tokenLabelName(tokenType),\n          },\n        ]);\n      }\n      case \"smart\":\n        return tokenType === tt.hash;\n      default:\n        throw this.raise(Errors.PipeTopicRequiresHackPipes, startLoc);\n    }\n  }\n\n  // async [no LineTerminator here] AsyncArrowBindingIdentifier[?Yield] [no LineTerminator here] => AsyncConciseBody[?In]\n  parseAsyncArrowUnaryFunction(\n    this: Parser,\n    node: Undone<N.ArrowFunctionExpression>,\n  ): N.ArrowFunctionExpression {\n    // We don't need to push a new ParameterDeclarationScope here since we are sure\n    // 1) it is an async arrow, 2) no biding pattern is allowed in params\n    this.prodParam.enter(functionFlags(true, this.prodParam.hasYield));\n    const params = [this.parseIdentifier()];\n    this.prodParam.exit();\n    if (this.hasPrecedingLineBreak()) {\n      this.raise(Errors.LineTerminatorBeforeArrow, this.state.curPosition());\n    }\n    this.expect(tt.arrow);\n    // let foo = async bar => {};\n    return this.parseArrowExpression(node, params, true);\n  }\n\n  // https://github.com/tc39/proposal-do-expressions\n  // https://github.com/tc39/proposal-async-do-expressions\n  parseDo(\n    this: Parser,\n    node: Undone<N.DoExpression>,\n    isAsync: boolean,\n  ): N.DoExpression {\n    this.expectPlugin(\"doExpressions\");\n    if (isAsync) {\n      this.expectPlugin(\"asyncDoExpressions\");\n    }\n    node.async = isAsync;\n    this.next(); // eat `do`\n    const oldLabels = this.state.labels;\n    this.state.labels = [];\n    if (isAsync) {\n      // AsyncDoExpression :\n      // async [no LineTerminator here] do Block[~Yield, +Await, ~Return]\n      this.prodParam.enter(ParamKind.PARAM_AWAIT);\n      node.body = this.parseBlock();\n      this.prodParam.exit();\n    } else {\n      node.body = this.parseBlock();\n    }\n\n    this.state.labels = oldLabels;\n    return this.finishNode(node, \"DoExpression\");\n  }\n\n  // Parse the `super` keyword\n  parseSuper(): N.Super {\n    const node = this.startNode<N.Super>();\n    this.next(); // eat `super`\n    if (\n      this.match(tt.parenL) &&\n      !this.scope.allowDirectSuper &&\n      !(this.optionFlags & OptionFlags.AllowSuperOutsideMethod)\n    ) {\n      this.raise(Errors.SuperNotAllowed, node);\n    } else if (\n      !this.scope.allowSuper &&\n      !(this.optionFlags & OptionFlags.AllowSuperOutsideMethod)\n    ) {\n      this.raise(Errors.UnexpectedSuper, node);\n    }\n\n    if (\n      !this.match(tt.parenL) &&\n      !this.match(tt.bracketL) &&\n      !this.match(tt.dot)\n    ) {\n      this.raise(Errors.UnsupportedSuper, node);\n    }\n\n    return this.finishNode(node, \"Super\");\n  }\n\n  parsePrivateName(): N.PrivateName {\n    const node = this.startNode<N.PrivateName>();\n    const id = this.startNodeAt<N.Identifier>(\n      // The position is hardcoded because we merge `#` and name into a single\n      // tt.privateName token\n      createPositionWithColumnOffset(this.state.startLoc, 1),\n    );\n    const name = this.state.value;\n    this.next(); // eat #name;\n    node.id = this.createIdentifier(id, name);\n    return this.finishNode(node, \"PrivateName\");\n  }\n\n  parseFunctionOrFunctionSent(\n    this: Parser,\n  ): N.FunctionExpression | N.MetaProperty {\n    const node = this.startNode<N.FunctionExpression | N.MetaProperty>();\n\n    // We do not do parseIdentifier here because when parseFunctionOrFunctionSent\n    // is called we already know that the current token is a \"name\" with the value \"function\"\n    // This will improve perf a tiny little bit as we do not do validation but more importantly\n    // here is that parseIdentifier will remove an item from the expression stack\n    // if \"function\" or \"class\" is parsed as identifier (in objects e.g.), which should not happen here.\n    this.next(); // eat `function`\n\n    if (this.prodParam.hasYield && this.match(tt.dot)) {\n      const meta = this.createIdentifier(\n        this.startNodeAtNode<N.Identifier>(node),\n        \"function\",\n      );\n      this.next(); // eat `.`\n      // https://github.com/tc39/proposal-function.sent#syntax-1\n      if (this.match(tt._sent)) {\n        this.expectPlugin(\"functionSent\");\n      } else if (!this.hasPlugin(\"functionSent\")) {\n        // The code wasn't `function.sent` but just `function.`, so a simple error is less confusing.\n        this.unexpected();\n      }\n      return this.parseMetaProperty(\n        node as Undone<N.MetaProperty>,\n        meta,\n        \"sent\",\n      );\n    }\n    return this.parseFunction(node as Undone<N.FunctionExpression>);\n  }\n\n  parseMetaProperty(\n    node: Undone<N.MetaProperty>,\n    meta: N.Identifier,\n    propertyName: string,\n  ): N.MetaProperty {\n    node.meta = meta;\n\n    const containsEsc = this.state.containsEsc;\n\n    node.property = this.parseIdentifier(true);\n\n    if (node.property.name !== propertyName || containsEsc) {\n      this.raise(Errors.UnsupportedMetaProperty, node.property, {\n        target: meta.name,\n        onlyValidPropertyName: propertyName,\n      });\n    }\n\n    return this.finishNode(node, \"MetaProperty\");\n  }\n\n  // https://tc39.es/ecma262/#prod-ImportMeta\n  // https://tc39.es/proposal-source-phase-imports/\n  parseImportMetaPropertyOrPhaseCall(\n    this: Parser,\n    node: Undone<N.MetaProperty | N.ImportExpression>,\n  ): N.MetaProperty | N.ImportExpression {\n    this.next(); // eat `.`\n\n    if (this.isContextual(tt._source) || this.isContextual(tt._defer)) {\n      const isSource = this.isContextual(tt._source);\n\n      this.expectPlugin(\n        isSource ? \"sourcePhaseImports\" : \"deferredImportEvaluation\",\n      );\n      this.next();\n      (node as Undone<N.ImportExpression>).phase = isSource\n        ? \"source\"\n        : \"defer\";\n      return this.parseImportCall(node as Undone<N.ImportExpression>);\n    } else {\n      const id = this.createIdentifierAt(\n        this.startNodeAtNode<N.Identifier>(node),\n        \"import\",\n        this.state.lastTokStartLoc,\n      );\n      if (this.isContextual(tt._meta)) {\n        if (!this.inModule) {\n          this.raise(Errors.ImportMetaOutsideModule, id);\n        }\n        this.sawUnambiguousESM = true;\n      }\n      return this.parseMetaProperty(node as Undone<N.MetaProperty>, id, \"meta\");\n    }\n  }\n\n  parseLiteralAtNode<T extends N.Node>(\n    value: any,\n    type: T[\"type\"],\n    node: any,\n  ): T {\n    this.addExtra(node, \"rawValue\", value);\n    this.addExtra(\n      node,\n      \"raw\",\n      this.input.slice(this.offsetToSourcePos(node.start), this.state.end),\n    );\n    node.value = value;\n    this.next();\n    return this.finishNode<T>(node, type);\n  }\n\n  parseLiteral<T extends N.Node>(value: any, type: T[\"type\"]): T {\n    const node = this.startNode();\n    return this.parseLiteralAtNode(value, type, node);\n  }\n\n  parseStringLiteral(value: any) {\n    return this.parseLiteral<N.StringLiteral>(value, \"StringLiteral\");\n  }\n\n  parseNumericLiteral(value: any) {\n    return this.parseLiteral<N.NumericLiteral>(value, \"NumericLiteral\");\n  }\n\n  parseBigIntLiteral(value: any) {\n    if (process.env.BABEL_8_BREAKING) {\n      let bigInt: bigint | null;\n      try {\n        bigInt = BigInt(value);\n      } catch {\n        // parser supports invalid bigints like `1.0n` or `1e1n` such that it\n        // can throw a recoverable error, but BigInt constructor does not\n        // support them.\n        bigInt = null;\n      }\n      const node = this.parseLiteral<N.BigIntLiteral>(bigInt, \"BigIntLiteral\");\n      return node;\n    } else {\n      return this.parseLiteral<N.BigIntLiteral>(value, \"BigIntLiteral\");\n    }\n  }\n\n  // TODO: Remove this in Babel 8\n  parseDecimalLiteral(value: any) {\n    return this.parseLiteral<N.DecimalLiteral>(value, \"DecimalLiteral\");\n  }\n\n  parseRegExpLiteral(value: {\n    value: any;\n    pattern: string;\n    flags: N.RegExpLiteral[\"flags\"];\n  }) {\n    const node = this.startNode<N.RegExpLiteral>();\n    this.addExtra(\n      node,\n      \"raw\",\n      this.input.slice(this.offsetToSourcePos(node.start), this.state.end),\n    );\n    node.pattern = value.pattern;\n    node.flags = value.flags;\n    this.next();\n    return this.finishNode(node, \"RegExpLiteral\");\n  }\n\n  parseBooleanLiteral(value: boolean) {\n    const node = this.startNode<N.BooleanLiteral>();\n    node.value = value;\n    this.next();\n    return this.finishNode(node, \"BooleanLiteral\");\n  }\n\n  parseNullLiteral() {\n    const node = this.startNode<N.NullLiteral>();\n    this.next();\n    return this.finishNode(node, \"NullLiteral\");\n  }\n\n  // https://tc39.es/ecma262/#prod-CoverParenthesizedExpressionAndArrowParameterList\n  parseParenAndDistinguishExpression(\n    this: Parser,\n    canBeArrow: boolean,\n  ): N.Expression {\n    const startLoc = this.state.startLoc;\n\n    let val;\n    this.next(); // eat `(`\n    this.expressionScope.enter(newArrowHeadScope());\n\n    const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n    const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;\n    this.state.maybeInArrowParameters = true;\n    this.state.inFSharpPipelineDirectBody = false;\n\n    const innerStartLoc = this.state.startLoc;\n    const exprList: (\n      | N.Expression\n      | N.RestElement\n      | N.VoidPattern\n      | N.AssignmentPattern\n    )[] = [];\n    const refExpressionErrors = new ExpressionErrors();\n    let first = true;\n    let spreadStartLoc;\n    let optionalCommaStartLoc;\n\n    while (!this.match(tt.parenR)) {\n      if (first) {\n        first = false;\n      } else {\n        this.expect(\n          tt.comma,\n          refExpressionErrors.optionalParametersLoc === null\n            ? null\n            : refExpressionErrors.optionalParametersLoc,\n        );\n        if (this.match(tt.parenR)) {\n          optionalCommaStartLoc = this.state.startLoc;\n          break;\n        }\n      }\n\n      if (this.match(tt.ellipsis)) {\n        const spreadNodeStartLoc = this.state.startLoc;\n        spreadStartLoc = this.state.startLoc;\n        exprList.push(\n          this.parseParenItem(this.parseRestBinding(), spreadNodeStartLoc),\n        );\n\n        if (!this.checkCommaAfterRest(charCodes.rightParenthesis)) {\n          break;\n        }\n      } else {\n        exprList.push(\n          this.parseMaybeAssignAllowInOrVoidPattern(\n            tt.parenR,\n            refExpressionErrors,\n            this.parseParenItem,\n          ),\n        );\n      }\n    }\n\n    const innerEndLoc = this.state.lastTokEndLoc;\n    this.expect(tt.parenR);\n\n    this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n    this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;\n\n    let arrowNode = this.startNodeAt<N.ArrowFunctionExpression>(startLoc);\n    if (\n      canBeArrow &&\n      this.shouldParseArrow(exprList) &&\n      (arrowNode = this.parseArrow(arrowNode))\n    ) {\n      this.checkDestructuringPrivate(refExpressionErrors);\n      this.expressionScope.validateAsPattern();\n      this.expressionScope.exit();\n      this.parseArrowExpression(arrowNode, exprList, false);\n      // @ts-expect-error todo(flow->ts) improve node types\n      return arrowNode;\n    }\n    this.expressionScope.exit();\n\n    if (!exprList.length) {\n      this.unexpected(this.state.lastTokStartLoc);\n    }\n    if (optionalCommaStartLoc) this.unexpected(optionalCommaStartLoc);\n    if (spreadStartLoc) this.unexpected(spreadStartLoc);\n    this.checkExpressionErrors(refExpressionErrors, true);\n\n    this.toReferencedListDeep(exprList, /* isParenthesizedExpr */ true);\n    if (exprList.length > 1) {\n      val = this.startNodeAt<N.SequenceExpression>(innerStartLoc);\n      val.expressions = exprList as N.Expression[];\n      // finish node at current location so it can pick up comments after `)`\n      this.finishNode(val, \"SequenceExpression\");\n      this.resetEndLocation(val, innerEndLoc);\n    } else {\n      val = exprList[0];\n    }\n\n    return this.wrapParenthesis(\n      startLoc,\n      // @ts-expect-error todo(flow->ts)\n      val,\n    );\n  }\n\n  wrapParenthesis(startLoc: Position, expression: N.Expression): N.Expression {\n    if (!(this.optionFlags & OptionFlags.CreateParenthesizedExpressions)) {\n      this.addExtra(expression, \"parenthesized\", true);\n      this.addExtra(expression, \"parenStart\", startLoc.index);\n\n      this.takeSurroundingComments(\n        expression,\n        startLoc.index,\n        this.state.lastTokEndLoc.index,\n      );\n\n      return expression;\n    }\n\n    const parenExpression =\n      this.startNodeAt<N.ParenthesizedExpression>(startLoc);\n    parenExpression.expression = expression;\n    return this.finishNode(parenExpression, \"ParenthesizedExpression\");\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars -- `params` is used in typescript plugin\n  shouldParseArrow(params: Array<N.Node>): boolean {\n    return !this.canInsertSemicolon();\n  }\n\n  parseArrow(\n    node: Undone<N.ArrowFunctionExpression>,\n  ): Undone<N.ArrowFunctionExpression> | undefined {\n    if (this.eat(tt.arrow)) {\n      return node;\n    }\n  }\n\n  parseParenItem<T extends N.Expression | N.RestElement | N.SpreadElement>(\n    node: T,\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    startLoc: Position,\n  ): T | N.TypeCastExpression | N.TsTypeCastExpression {\n    return node;\n  }\n\n  parseNewOrNewTarget(this: Parser): N.NewExpression | N.MetaProperty {\n    const node = this.startNode<N.NewExpression | N.MetaProperty>();\n    this.next();\n    if (this.match(tt.dot)) {\n      // https://tc39.es/ecma262/#prod-NewTarget\n      const meta = this.createIdentifier(\n        this.startNodeAtNode<N.Identifier>(node),\n        \"new\",\n      );\n      this.next();\n      const metaProp = this.parseMetaProperty(\n        node as Undone<N.MetaProperty>,\n        meta,\n        \"target\",\n      );\n\n      if (!this.scope.allowNewTarget) {\n        this.raise(Errors.UnexpectedNewTarget, metaProp);\n      }\n\n      return metaProp;\n    }\n\n    return this.parseNew(node as Undone<N.NewExpression>);\n  }\n\n  // New's precedence is slightly tricky. It must allow its argument to\n  // be a `[]` or dot subscript expression, but not a call — at least,\n  // not without wrapping it in parentheses. Thus, it uses the noCalls\n  // argument to parseSubscripts to prevent it from consuming the\n  // argument list.\n  // https://tc39.es/ecma262/#prod-NewExpression\n  parseNew(this: Parser, node: Undone<N.NewExpression>): N.NewExpression {\n    this.parseNewCallee(node);\n\n    if (this.eat(tt.parenL)) {\n      const args = this.parseExprList(tt.parenR);\n      this.toReferencedList(args);\n      // (parseExprList should be all non-null in this case)\n      node.arguments = args;\n    } else {\n      node.arguments = [];\n    }\n\n    return this.finishNode(node, \"NewExpression\");\n  }\n\n  parseNewCallee(this: Parser, node: Undone<N.NewExpression>): void {\n    const isImport = this.match(tt._import);\n    const callee = this.parseNoCallExpr();\n    node.callee = callee;\n    if (\n      isImport &&\n      (callee.type === \"Import\" || callee.type === \"ImportExpression\")\n    ) {\n      this.raise(Errors.ImportCallNotNewExpression, callee);\n    }\n  }\n\n  // Parse template expression.\n\n  parseTemplateElement(isTagged: boolean): N.TemplateElement {\n    const { start, startLoc, end, value } = this.state;\n    const elemStart = start + 1;\n    const elem = this.startNodeAt<N.TemplateElement>(\n      createPositionWithColumnOffset(startLoc, 1),\n    );\n    if (value === null) {\n      if (!isTagged) {\n        this.raise(\n          Errors.InvalidEscapeSequenceTemplate,\n          // FIXME: Adding 1 is probably wrong.\n          createPositionWithColumnOffset(\n            this.state.firstInvalidTemplateEscapePos,\n            1,\n          ),\n        );\n      }\n    }\n\n    const isTail = this.match(tt.templateTail);\n    const endOffset = isTail ? -1 : -2;\n    const elemEnd = end + endOffset;\n    elem.value = {\n      raw: this.input.slice(elemStart, elemEnd).replace(/\\r\\n?/g, \"\\n\"),\n      cooked: value === null ? null : value.slice(1, endOffset),\n    };\n    elem.tail = isTail;\n    this.next();\n    const finishedNode = this.finishNode(elem, \"TemplateElement\");\n    this.resetEndLocation(\n      finishedNode,\n      createPositionWithColumnOffset(this.state.lastTokEndLoc, endOffset),\n    );\n    return finishedNode;\n  }\n\n  // https://tc39.es/ecma262/#prod-TemplateLiteral\n  parseTemplate(this: Parser, isTagged: boolean): N.TemplateLiteral {\n    const node = this.startNode<N.TemplateLiteral>();\n    let curElt = this.parseTemplateElement(isTagged);\n    const quasis = [curElt];\n    const substitutions = [];\n    while (!curElt.tail) {\n      substitutions.push(this.parseTemplateSubstitution());\n      this.readTemplateContinuation();\n      quasis.push((curElt = this.parseTemplateElement(isTagged)));\n    }\n    // Type cast from (N.Expression[] | N.TsType[]). parseTemplateSubstitution\n    // returns consistent results.\n    node.expressions = substitutions as N.Expression[] | N.TsType[];\n    node.quasis = quasis;\n    return this.finishNode(node, \"TemplateLiteral\");\n  }\n\n  // This is overwritten by the TypeScript plugin to parse template types\n  parseTemplateSubstitution(this: Parser): N.Expression | N.TsType {\n    return this.parseExpression();\n  }\n\n  // Parse an object literal, binding pattern, or record.\n\n  parseObjectLike(\n    close: TokenType,\n    isPattern: true,\n    isRecord?: boolean | null,\n    refExpressionErrors?: ExpressionErrors | null,\n  ): N.ObjectPattern;\n  parseObjectLike(\n    close: TokenType,\n    isPattern: false,\n    isRecord?: false | null,\n    refExpressionErrors?: ExpressionErrors | null,\n  ): N.ObjectExpression;\n  parseObjectLike(\n    close: TokenType,\n    isPattern: false,\n    isRecord?: true,\n    refExpressionErrors?: ExpressionErrors | null,\n  ): N.RecordExpression;\n  parseObjectLike<T extends N.ObjectPattern | N.ObjectExpression>(\n    this: Parser,\n    close: TokenType,\n    isPattern: boolean,\n    isRecord?: boolean | null,\n    refExpressionErrors?: ExpressionErrors | null,\n  ): T {\n    if (isRecord) {\n      this.expectPlugin(\"recordAndTuple\");\n    }\n    const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;\n    this.state.inFSharpPipelineDirectBody = false;\n    let sawProto = false;\n    let first = true;\n    const node = this.startNode<\n      N.ObjectExpression | N.ObjectPattern | N.RecordExpression\n    >();\n\n    node.properties = [];\n    this.next();\n\n    while (!this.match(close)) {\n      if (first) {\n        first = false;\n      } else {\n        this.expect(tt.comma);\n        if (this.match(close)) {\n          this.addTrailingCommaExtraToNode(node);\n          break;\n        }\n      }\n\n      let prop;\n      if (isPattern) {\n        prop = this.parseBindingProperty();\n      } else {\n        prop = this.parsePropertyDefinition(refExpressionErrors);\n        sawProto = this.checkProto(\n          prop,\n          isRecord,\n          sawProto,\n          refExpressionErrors,\n        );\n      }\n\n      if (\n        isRecord &&\n        !this.isObjectProperty(prop) &&\n        prop.type !== \"SpreadElement\"\n      ) {\n        this.raise(Errors.InvalidRecordProperty, prop);\n      }\n\n      if (!process.env.BABEL_8_BREAKING) {\n        // @ts-expect-error shorthand may not index prop\n        if (prop.shorthand) {\n          this.addExtra(prop, \"shorthand\", true);\n        }\n      }\n\n      // @ts-expect-error Fixme: refine typings\n      node.properties.push(prop);\n    }\n\n    this.next();\n\n    this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;\n    let type = \"ObjectExpression\";\n    if (isPattern) {\n      type = \"ObjectPattern\";\n    } else if (isRecord) {\n      type = \"RecordExpression\";\n    }\n    // @ts-expect-error type is well defined\n    return this.finishNode(node, type);\n  }\n\n  addTrailingCommaExtraToNode(node: Undone<N.Node>): void {\n    this.addExtra(node, \"trailingComma\", this.state.lastTokStartLoc.index);\n    this.addExtra(node, \"trailingCommaLoc\", this.state.lastTokStartLoc, false);\n  }\n\n  // Check grammar production:\n  //   IdentifierName *_opt PropertyName\n  // It is used in `parsePropertyDefinition` to detect AsyncMethod and Accessors\n  maybeAsyncOrAccessorProp(\n    prop: Undone<N.ObjectProperty>,\n  ): prop is typeof prop & { key: N.Identifier } {\n    return (\n      !prop.computed &&\n      prop.key.type === \"Identifier\" &&\n      (this.isLiteralPropertyName() ||\n        this.match(tt.bracketL) ||\n        this.match(tt.star))\n    );\n  }\n\n  // https://tc39.es/ecma262/#prod-PropertyDefinition\n  parsePropertyDefinition(\n    this: Parser,\n    refExpressionErrors?: ExpressionErrors | null,\n  ): N.ObjectMember | N.SpreadElement {\n    let decorators = [];\n    if (this.match(tt.at)) {\n      if (this.hasPlugin(\"decorators\")) {\n        this.raise(Errors.UnsupportedPropertyDecorator, this.state.startLoc);\n      }\n\n      // we needn't check if decorators (stage 0) plugin is enabled since it's checked by\n      // the call to this.parseDecorator\n      while (this.match(tt.at)) {\n        decorators.push(this.parseDecorator());\n      }\n    }\n\n    const prop = this.startNode<N.ObjectProperty>();\n    let isAsync = false;\n    let isAccessor = false;\n    let startLoc;\n\n    if (this.match(tt.ellipsis)) {\n      if (decorators.length) this.unexpected();\n      return this.parseSpread();\n    }\n\n    if (decorators.length) {\n      prop.decorators = decorators;\n      decorators = [];\n    }\n\n    prop.method = false;\n\n    if (refExpressionErrors) {\n      startLoc = this.state.startLoc;\n    }\n\n    let isGenerator = this.eat(tt.star);\n    this.parsePropertyNamePrefixOperator(prop);\n    const containsEsc = this.state.containsEsc;\n    this.parsePropertyName(prop, refExpressionErrors);\n\n    if (!isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) {\n      const { key } = prop;\n      const keyName = key.name;\n      // https://tc39.es/ecma262/#prod-AsyncMethod\n      // https://tc39.es/ecma262/#prod-AsyncGeneratorMethod\n      if (keyName === \"async\" && !this.hasPrecedingLineBreak()) {\n        isAsync = true;\n        this.resetPreviousNodeTrailingComments(key);\n        isGenerator = this.eat(tt.star);\n        this.parsePropertyName(prop);\n      }\n      // get PropertyName[?Yield, ?Await] () { FunctionBody[~Yield, ~Await] }\n      // set PropertyName[?Yield, ?Await] ( PropertySetParameterList ) { FunctionBody[~Yield, ~Await] }\n      if (keyName === \"get\" || keyName === \"set\") {\n        isAccessor = true;\n        this.resetPreviousNodeTrailingComments(key);\n        prop.kind = keyName;\n        if (this.match(tt.star)) {\n          isGenerator = true;\n          this.raise(Errors.AccessorIsGenerator, this.state.curPosition(), {\n            kind: keyName,\n          });\n          this.next();\n        }\n        this.parsePropertyName(prop);\n      }\n    }\n\n    return this.parseObjPropValue(\n      prop,\n      startLoc,\n      isGenerator,\n      isAsync,\n      false /* isPattern */,\n      isAccessor,\n      refExpressionErrors,\n    );\n  }\n\n  getGetterSetterExpectedParamCount(\n    method: N.ObjectMethod | N.ClassMethod,\n  ): number {\n    return method.kind === \"get\" ? 0 : 1;\n  }\n\n  // This exists so we can override within the ESTree plugin\n  getObjectOrClassMethodParams(method: N.ObjectMethod | N.ClassMethod) {\n    return method.params;\n  }\n\n  // get methods aren't allowed to have any parameters\n  // set methods must have exactly 1 parameter which is not a rest parameter\n  checkGetterSetterParams(method: N.ObjectMethod | N.ClassMethod): void {\n    const paramCount = this.getGetterSetterExpectedParamCount(method);\n    const params = this.getObjectOrClassMethodParams(method);\n\n    if (params.length !== paramCount) {\n      this.raise(\n        method.kind === \"get\" ? Errors.BadGetterArity : Errors.BadSetterArity,\n        method,\n      );\n    }\n\n    if (\n      method.kind === \"set\" &&\n      params[params.length - 1]?.type === \"RestElement\"\n    ) {\n      this.raise(Errors.BadSetterRestParameter, method);\n    }\n  }\n\n  // https://tc39.es/ecma262/#prod-MethodDefinition\n  parseObjectMethod(\n    this: Parser,\n    prop: Undone<N.ObjectMethod>,\n    isGenerator: boolean,\n    isAsync: boolean,\n    isPattern: boolean,\n    isAccessor: boolean,\n  ): N.ObjectMethod | undefined | null {\n    if (isAccessor) {\n      // isAccessor implies isAsync: false, isPattern: false, isGenerator: false\n      const finishedProp = this.parseMethod(\n        prop,\n        // This _should_ be false, but with error recovery, we allow it to be\n        // set for informational purposes\n        isGenerator,\n        /* isAsync */ false,\n        /* isConstructor */ false,\n        false,\n        \"ObjectMethod\",\n      );\n      this.checkGetterSetterParams(finishedProp);\n      return finishedProp;\n    }\n\n    if (isAsync || isGenerator || this.match(tt.parenL)) {\n      if (isPattern) this.unexpected();\n      prop.kind = \"method\";\n      prop.method = true;\n      return this.parseMethod(\n        prop,\n        isGenerator,\n        isAsync,\n        /* isConstructor */ false,\n        false,\n        \"ObjectMethod\",\n      );\n    }\n  }\n\n  // if `isPattern` is true, parse https://tc39.es/ecma262/#prod-BindingProperty\n  // else https://tc39.es/ecma262/#prod-PropertyDefinition\n  parseObjectProperty(\n    this: Parser,\n    prop: Undone<N.ObjectProperty>,\n    startLoc: Position | undefined | null,\n    isPattern: boolean,\n    refExpressionErrors?: ExpressionErrors | null,\n  ): N.ObjectProperty | undefined | null {\n    prop.shorthand = false;\n\n    if (this.eat(tt.colon)) {\n      prop.value = isPattern\n        ? this.parseMaybeDefault(this.state.startLoc)\n        : this.parseMaybeAssignAllowInOrVoidPattern(\n            tt.braceR,\n            refExpressionErrors,\n          );\n\n      return this.finishObjectProperty(prop);\n    }\n\n    if (!prop.computed && prop.key.type === \"Identifier\") {\n      // PropertyDefinition:\n      //   IdentifierReference\n      //   CoverInitializedName\n      // Note: `{ eval } = {}` will be checked in `checkLVal` later.\n      this.checkReservedWord(prop.key.name, prop.key.loc.start, true, false);\n\n      if (isPattern) {\n        prop.value = this.parseMaybeDefault(\n          startLoc,\n          this.cloneIdentifier(prop.key),\n        );\n      } else if (this.match(tt.eq)) {\n        const shorthandAssignLoc = this.state.startLoc;\n        if (refExpressionErrors != null) {\n          if (refExpressionErrors.shorthandAssignLoc === null) {\n            refExpressionErrors.shorthandAssignLoc = shorthandAssignLoc;\n          }\n        } else {\n          this.raise(Errors.InvalidCoverInitializedName, shorthandAssignLoc);\n        }\n        prop.value = this.parseMaybeDefault(\n          startLoc,\n          this.cloneIdentifier(prop.key),\n        );\n      } else {\n        prop.value = this.cloneIdentifier(prop.key);\n      }\n      prop.shorthand = true;\n\n      return this.finishObjectProperty(prop);\n    }\n  }\n\n  finishObjectProperty(node: Undone<N.ObjectProperty>) {\n    return this.finishNode(node, \"ObjectProperty\");\n  }\n\n  parseObjPropValue<T extends N.ObjectMember>(\n    this: Parser,\n    prop: Undone<T>,\n    startLoc: Position | undefined | null,\n    isGenerator: boolean,\n    isAsync: boolean,\n    isPattern: boolean,\n    isAccessor: boolean,\n    refExpressionErrors?: ExpressionErrors | null,\n  ): T {\n    const node = (this.parseObjectMethod(\n      prop as Undone<N.ObjectMethod>,\n      isGenerator,\n      isAsync,\n      isPattern,\n      isAccessor,\n    ) ||\n      this.parseObjectProperty(\n        prop as Undone<N.ObjectProperty>,\n        startLoc,\n        isPattern,\n        refExpressionErrors,\n      )) as T;\n\n    if (!node) this.unexpected();\n\n    return node;\n  }\n\n  // https://tc39.es/ecma262/#prod-PropertyName\n  // when refExpressionErrors presents, it will parse private name\n  // and record the position of the first private name\n  parsePropertyName(\n    this: Parser,\n    prop:\n      | Undone<N.ObjectOrClassMember | N.ClassMember>\n      | N.TsNamedTypeElementBase,\n    refExpressionErrors?: ExpressionErrors | null,\n  ): void {\n    if (this.eat(tt.bracketL)) {\n      (prop as Undone<N.ObjectOrClassMember>).computed = true;\n      prop.key = this.parseMaybeAssignAllowIn();\n      this.expect(tt.bracketR);\n    } else {\n      // We check if it's valid for it to be a private name when we push it.\n      const { type, value } = this.state;\n      let key;\n      // most un-computed property names are identifiers\n      if (tokenIsKeywordOrIdentifier(type)) {\n        key = this.parseIdentifier(true);\n      } else {\n        switch (type) {\n          case tt.num:\n            key = this.parseNumericLiteral(value);\n            break;\n          case tt.string:\n            key = this.parseStringLiteral(value);\n            break;\n          case tt.bigint:\n            key = this.parseBigIntLiteral(value);\n            break;\n          case tt.privateName: {\n            // the class private key has been handled in parseClassElementName\n            const privateKeyLoc = this.state.startLoc;\n            if (refExpressionErrors != null) {\n              if (refExpressionErrors.privateKeyLoc === null) {\n                refExpressionErrors.privateKeyLoc = privateKeyLoc;\n              }\n            } else {\n              this.raise(Errors.UnexpectedPrivateField, privateKeyLoc);\n            }\n            key = this.parsePrivateName();\n            break;\n          }\n          default:\n            if (!process.env.BABEL_8_BREAKING && type === tt.decimal) {\n              key = this.parseDecimalLiteral(value);\n              break;\n            }\n\n            this.unexpected();\n        }\n      }\n      (prop as any).key = key;\n      if (type !== tt.privateName) {\n        // ClassPrivateProperty is never computed, so we don't assign in that case.\n        prop.computed = false;\n      }\n    }\n  }\n\n  // Initialize empty function node.\n\n  initFunction(node: N.BodilessFunctionOrMethodBase, isAsync: boolean): void {\n    node.id = null;\n    node.generator = false;\n    node.async = isAsync;\n  }\n\n  // Parse object or class method.\n\n  parseMethod<T extends N.ObjectMethod | N.ClassMethod | N.ClassPrivateMethod>(\n    this: Parser,\n    node: Undone<T>,\n    isGenerator: boolean,\n    isAsync: boolean,\n    isConstructor: boolean,\n    allowDirectSuper: boolean,\n    type: T[\"type\"],\n    inClassScope: boolean = false,\n  ): T {\n    this.initFunction(node, isAsync);\n    node.generator = isGenerator;\n    this.scope.enter(\n      ScopeFlag.FUNCTION |\n        ScopeFlag.SUPER |\n        (inClassScope ? ScopeFlag.CLASS : 0) |\n        (allowDirectSuper ? ScopeFlag.DIRECT_SUPER : 0),\n    );\n    this.prodParam.enter(functionFlags(isAsync, node.generator));\n    this.parseFunctionParams(node, isConstructor);\n    const finishedNode = this.parseFunctionBodyAndFinish(node, type, true);\n    this.prodParam.exit();\n    this.scope.exit();\n\n    return finishedNode;\n  }\n\n  // parse an array literal or tuple literal\n  // https://tc39.es/ecma262/#prod-ArrayLiteral\n  // https://tc39.es/proposal-record-tuple/#prod-TupleLiteral\n  parseArrayLike(\n    this: Parser,\n    close: TokenType,\n    canBePattern: boolean,\n    isTuple: boolean,\n    refExpressionErrors?: ExpressionErrors | null,\n  ): N.ArrayExpression | N.TupleExpression {\n    if (isTuple) {\n      this.expectPlugin(\"recordAndTuple\");\n    }\n    const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;\n    this.state.inFSharpPipelineDirectBody = false;\n    const node = this.startNode<N.ArrayExpression | N.TupleExpression>();\n    this.next();\n    node.elements = this.parseExprList(\n      close,\n      /* allowEmpty */ !isTuple,\n      refExpressionErrors,\n      // @ts-expect-error todo(flow->ts)\n      node,\n    );\n    this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;\n    return this.finishNode(\n      node,\n      isTuple ? \"TupleExpression\" : \"ArrayExpression\",\n    );\n  }\n\n  // Parse arrow function expression.\n  // If the parameters are provided, they will be converted to an\n  // assignable list.\n  parseArrowExpression(\n    this: Parser,\n    node: Undone<N.ArrowFunctionExpression>,\n    params:\n      | Array<\n          N.Expression | N.SpreadElement | N.VoidPattern | N.AssignmentPattern\n        >\n      | Array<\n          N.Expression | N.RestElement | N.VoidPattern | N.AssignmentPattern\n        >,\n    isAsync: boolean,\n    trailingCommaLoc?: Position | null,\n  ): N.ArrowFunctionExpression {\n    this.scope.enter(ScopeFlag.FUNCTION | ScopeFlag.ARROW);\n    let flags = functionFlags(isAsync, false);\n    // ConciseBody[In] :\n    //   [lookahead ≠ {] ExpressionBody[?In, ~Await]\n    //   { FunctionBody[~Yield, ~Await] }\n    if (!this.match(tt.braceL) && this.prodParam.hasIn) {\n      flags |= ParamKind.PARAM_IN;\n    }\n    this.prodParam.enter(flags);\n    this.initFunction(node, isAsync);\n    const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n\n    if (params) {\n      this.state.maybeInArrowParameters = true;\n      this.setArrowFunctionParameters(node, params, trailingCommaLoc);\n    }\n    this.state.maybeInArrowParameters = false;\n    this.parseFunctionBody(node, true);\n\n    this.prodParam.exit();\n    this.scope.exit();\n    this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n\n    return this.finishNode(node, \"ArrowFunctionExpression\");\n  }\n\n  setArrowFunctionParameters(\n    node: Undone<N.ArrowFunctionExpression>,\n    params:\n      | Array<\n          N.Expression | N.SpreadElement | N.VoidPattern | N.AssignmentPattern\n        >\n      | Array<\n          N.Expression | N.RestElement | N.VoidPattern | N.AssignmentPattern\n        >,\n    trailingCommaLoc?: Position | null,\n  ): void {\n    this.toAssignableList(params, trailingCommaLoc, false);\n    node.params = params as (N.Pattern | N.TSParameterProperty)[];\n  }\n\n  parseFunctionBodyAndFinish<\n    T extends\n      | N.Function\n      | N.TSDeclareMethod\n      | N.TSDeclareFunction\n      | N.ClassPrivateMethod,\n  >(node: Undone<T>, type: T[\"type\"], isMethod: boolean = false): T {\n    // @ts-expect-error (node is not bodiless if we get here)\n    this.parseFunctionBody(node, false, isMethod);\n    return this.finishNode(node, type);\n  }\n\n  // Parse function body and check parameters.\n  parseFunctionBody(\n    this: Parser,\n    node: Undone<N.Function>,\n    allowExpression?: boolean | null,\n    isMethod: boolean = false,\n  ): void {\n    const isExpression = allowExpression && !this.match(tt.braceL);\n    this.expressionScope.enter(newExpressionScope());\n\n    if (isExpression) {\n      // https://tc39.es/ecma262/#prod-ExpressionBody\n      (node as Undone<N.ArrowFunctionExpression>).body =\n        this.parseMaybeAssign();\n      this.checkParams(node, false, allowExpression, false);\n    } else {\n      const oldStrict = this.state.strict;\n      // Start a new scope with regard to labels\n      // flag (restore them to their old value afterwards).\n      const oldLabels = this.state.labels;\n      this.state.labels = [];\n\n      // FunctionBody[Yield, Await]:\n      //   StatementList[?Yield, ?Await, +Return] opt\n      this.prodParam.enter(\n        this.prodParam.currentFlags() | ParamKind.PARAM_RETURN,\n      );\n      node.body = this.parseBlock(\n        true,\n        false,\n        // Strict mode function checks after we parse the statements in the function body.\n        (hasStrictModeDirective: boolean) => {\n          const nonSimple = !this.isSimpleParamList(node.params);\n\n          if (hasStrictModeDirective && nonSimple) {\n            // This logic is here to align the error location with the ESTree plugin.\n            this.raise(\n              Errors.IllegalLanguageModeDirective,\n              // @ts-expect-error kind may not index node\n              (node.kind === \"method\" || node.kind === \"constructor\") &&\n                // @ts-expect-error key may not index node\n                !!node.key\n                ? // @ts-expect-error node.key has been guarded\n                  node.key.loc.end\n                : node,\n            );\n          }\n\n          const strictModeChanged = !oldStrict && this.state.strict;\n\n          // Add the params to varDeclaredNames to ensure that an error is thrown\n          // if a let/const declaration in the function clashes with one of the params.\n          this.checkParams(\n            node,\n            !this.state.strict && !allowExpression && !isMethod && !nonSimple,\n            allowExpression,\n            strictModeChanged,\n          );\n\n          // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval'\n          if (this.state.strict && node.id) {\n            this.checkIdentifier(\n              node.id,\n              BindingFlag.TYPE_OUTSIDE,\n              strictModeChanged,\n            );\n          }\n        },\n      );\n      this.prodParam.exit();\n      this.state.labels = oldLabels;\n    }\n    this.expressionScope.exit();\n  }\n\n  isSimpleParameter(node: N.Pattern | N.TSParameterProperty): boolean {\n    return node.type === \"Identifier\";\n  }\n\n  isSimpleParamList(\n    params: ReadonlyArray<N.Pattern | N.TSParameterProperty>,\n  ): boolean {\n    for (let i = 0, len = params.length; i < len; i++) {\n      if (!this.isSimpleParameter(params[i])) return false;\n    }\n    return true;\n  }\n\n  checkParams(\n    node: Undone<N.Function>,\n    allowDuplicates: boolean,\n    isArrowFunction?: boolean | null,\n    strictModeChanged: boolean = true,\n  ): void {\n    const checkClashes = !allowDuplicates && new Set<string>();\n    // We create a fake node with the \"ephemeral\" type `FormalParameters`[1]\n    // since we just store an array of parameters. Perhaps someday we can have\n    // something like class FormalParameters extends Array { ... }, which would\n    // also be helpful when traversing this node.\n    //\n    // 1. https://tc39.es/ecma262/#prod-FormalParameters\n    const formalParameters = { type: \"FormalParameters\" } as const;\n    for (const param of node.params) {\n      this.checkLVal(\n        param,\n        formalParameters,\n        BindingFlag.TYPE_VAR,\n        checkClashes,\n        strictModeChanged,\n      );\n    }\n  }\n\n  // Parses a comma-separated list of expressions, and returns them as\n  // an array. `close` is the token type that ends the list, and\n  // `allowEmpty` can be turned on to allow subsequent commas with\n  // nothing in between them to be parsed as `null` (which is needed\n  // for array literals).\n  // https://tc39.es/ecma262/#prod-ElementList\n  parseExprList(\n    this: Parser,\n    close: TokenType,\n    allowEmpty?: boolean,\n    refExpressionErrors?: ExpressionErrors | null,\n    nodeForExtra?: N.Node | null,\n  ): (N.Expression | null)[] {\n    const elts: (N.Expression | null)[] = [];\n    let first = true;\n\n    while (!this.eat(close)) {\n      if (first) {\n        first = false;\n      } else {\n        this.expect(tt.comma);\n        if (this.match(close)) {\n          if (nodeForExtra) {\n            this.addTrailingCommaExtraToNode(nodeForExtra);\n          }\n          this.next();\n          break;\n        }\n      }\n\n      elts.push(this.parseExprListItem(close, allowEmpty, refExpressionErrors));\n    }\n    return elts;\n  }\n\n  parseExprListItem(\n    this: Parser,\n    close: TokenType,\n    allowEmpty?: boolean,\n    refExpressionErrors?: ExpressionErrors | null,\n    allowPlaceholder?: boolean | null,\n  ): N.Expression | null;\n  parseExprListItem(\n    this: Parser,\n    close: TokenType,\n    allowEmpty?: false,\n    refExpressionErrors?: ExpressionErrors | null,\n    allowPlaceholder?: boolean | null,\n  ): N.Expression;\n  parseExprListItem(\n    this: Parser,\n    close: TokenType,\n    allowEmpty?: boolean | null,\n    refExpressionErrors?: ExpressionErrors | null,\n    allowPlaceholder?: boolean | null,\n  ):\n    | N.Expression\n    | N.SpreadElement\n    | N.ArgumentPlaceholder\n    | N.VoidPattern\n    | N.AssignmentPattern\n    | null {\n    let elt;\n    if (this.match(tt.comma)) {\n      if (!allowEmpty) {\n        this.raise(Errors.UnexpectedToken, this.state.curPosition(), {\n          unexpected: \",\",\n        });\n      }\n      elt = null;\n    } else if (this.match(tt.ellipsis)) {\n      const spreadNodeStartLoc = this.state.startLoc;\n\n      elt = this.parseParenItem(\n        this.parseSpread(refExpressionErrors),\n        spreadNodeStartLoc,\n      );\n    } else if (this.match(tt.question)) {\n      this.expectPlugin(\"partialApplication\");\n      if (!allowPlaceholder) {\n        this.raise(Errors.UnexpectedArgumentPlaceholder, this.state.startLoc);\n      }\n      const node = this.startNode<N.ArgumentPlaceholder>();\n      this.next();\n      elt = this.finishNode(node, \"ArgumentPlaceholder\");\n    } else {\n      elt = this.parseMaybeAssignAllowInOrVoidPattern(\n        close,\n        refExpressionErrors,\n        this.parseParenItem,\n      );\n    }\n    return elt;\n  }\n\n  // Parse the next token as an identifier. If `liberal` is true (used\n  // when parsing properties), it will also convert keywords into\n  // identifiers.\n  // This shouldn't be used to parse the keywords of meta properties, since they\n  // are not identifiers and cannot contain escape sequences.\n\n  parseIdentifier(liberal?: boolean): N.Identifier {\n    const node = this.startNode<N.Identifier>();\n    const name = this.parseIdentifierName(liberal);\n\n    return this.createIdentifier(node, name);\n  }\n\n  createIdentifier(node: Undone<N.Identifier>, name: string): N.Identifier {\n    node.name = name;\n    node.loc.identifierName = name;\n\n    return this.finishNode(node, \"Identifier\");\n  }\n\n  createIdentifierAt(\n    node: Undone<N.Identifier>,\n    name: string,\n    endLoc: Position,\n  ): N.Identifier {\n    node.name = name;\n    node.loc.identifierName = name;\n\n    return this.finishNodeAt(node, \"Identifier\", endLoc);\n  }\n\n  parseIdentifierName(liberal?: boolean): string {\n    let name: string;\n\n    const { startLoc, type } = this.state;\n\n    if (tokenIsKeywordOrIdentifier(type)) {\n      name = this.state.value;\n    } else {\n      this.unexpected();\n    }\n\n    const tokenIsKeyword = tokenKeywordOrIdentifierIsKeyword(type);\n\n    if (liberal) {\n      // If the current token is not used as a keyword, set its type to \"tt.name\".\n      // This will prevent this.next() from throwing about unexpected escapes.\n      if (tokenIsKeyword) {\n        this.replaceToken(tt.name);\n      }\n    } else {\n      this.checkReservedWord(name, startLoc, tokenIsKeyword, false);\n    }\n\n    this.next();\n\n    return name;\n  }\n\n  checkReservedWord(\n    word: string,\n    startLoc: Position,\n    checkKeywords: boolean,\n    isBinding: boolean,\n  ): void {\n    // Every JavaScript reserved word is 10 characters or less.\n    if (word.length > 10) {\n      return;\n    }\n    // Most identifiers are not reservedWord-like, they don't need special\n    // treatments afterward, which very likely ends up throwing errors\n    if (!canBeReservedWord(word)) {\n      return;\n    }\n\n    if (checkKeywords && isKeyword(word)) {\n      this.raise(Errors.UnexpectedKeyword, startLoc, {\n        keyword: word,\n      });\n      return;\n    }\n\n    const reservedTest = !this.state.strict\n      ? isReservedWord\n      : isBinding\n        ? isStrictBindReservedWord\n        : isStrictReservedWord;\n\n    if (reservedTest(word, this.inModule)) {\n      this.raise(Errors.UnexpectedReservedWord, startLoc, {\n        reservedWord: word,\n      });\n      return;\n    } else if (word === \"yield\") {\n      if (this.prodParam.hasYield) {\n        this.raise(Errors.YieldBindingIdentifier, startLoc);\n        return;\n      }\n    } else if (word === \"await\") {\n      if (this.prodParam.hasAwait) {\n        this.raise(Errors.AwaitBindingIdentifier, startLoc);\n        return;\n      }\n\n      if (this.scope.inStaticBlock) {\n        this.raise(Errors.AwaitBindingIdentifierInStaticBlock, startLoc);\n        return;\n      }\n\n      this.expressionScope.recordAsyncArrowParametersError(startLoc);\n    } else if (word === \"arguments\") {\n      if (this.scope.inClassAndNotInNonArrowFunction) {\n        this.raise(Errors.ArgumentsInClass, startLoc);\n        return;\n      }\n    }\n  }\n\n  // Returns whether `await` is allowed or not in this context, and if it is\n  // keeps track of it to determine whether a module uses top-level await.\n  recordAwaitIfAllowed(): boolean {\n    const isAwaitAllowed = this.prodParam.hasAwait;\n\n    if (isAwaitAllowed && !this.scope.inFunction) {\n      this.state.hasTopLevelAwait = true;\n    }\n\n    return isAwaitAllowed;\n  }\n\n  // Parses await expression inside async function.\n\n  parseAwait(this: Parser, startLoc: Position): N.AwaitExpression {\n    const node = this.startNodeAt<N.AwaitExpression>(startLoc);\n\n    this.expressionScope.recordParameterInitializerError(\n      Errors.AwaitExpressionFormalParameter,\n      node,\n    );\n\n    if (this.eat(tt.star)) {\n      this.raise(Errors.ObsoleteAwaitStar, node);\n    }\n\n    if (\n      !this.scope.inFunction &&\n      !(this.optionFlags & OptionFlags.AllowAwaitOutsideFunction)\n    ) {\n      if (this.isAmbiguousPrefixOrIdentifier()) {\n        this.ambiguousScriptDifferentAst = true;\n      } else {\n        this.sawUnambiguousESM = true;\n      }\n    }\n\n    if (!this.state.soloAwait) {\n      node.argument = this.parseMaybeUnary(null, true);\n    }\n\n    return this.finishNode(node, \"AwaitExpression\");\n  }\n\n  isAmbiguousPrefixOrIdentifier(): boolean {\n    if (this.hasPrecedingLineBreak()) return true;\n    const { type } = this.state;\n    return (\n      // All the following expressions are ambiguous:\n      //   await + 0, await - 0, await ( 0 ), await [ 0 ], await / 0 /u, await ``, await of []\n      type === tt.plusMin ||\n      type === tt.parenL ||\n      type === tt.bracketL ||\n      tokenIsTemplate(type) ||\n      (type === tt._of && !this.state.containsEsc) ||\n      // Sometimes the tokenizer generates tt.slash for regexps, and this is\n      // handler by parseExprAtom\n      type === tt.regexp ||\n      type === tt.slash ||\n      // This code could be parsed both as a modulo operator or as an intrinsic:\n      //   await %x(0)\n      (this.hasPlugin(\"v8intrinsic\") && type === tt.modulo)\n    );\n  }\n\n  // Parses yield expression inside generator.\n\n  parseYield(this: Parser, startLoc: Position): N.YieldExpression {\n    const node = this.startNodeAt<N.YieldExpression>(startLoc);\n\n    this.expressionScope.recordParameterInitializerError(\n      Errors.YieldInParameter,\n      node,\n    );\n\n    let delegating = false;\n    let argument: N.Expression | null = null;\n    if (!this.hasPrecedingLineBreak()) {\n      delegating = this.eat(tt.star);\n      switch (this.state.type) {\n        case tt.semi:\n        case tt.eof:\n        case tt.braceR:\n        case tt.parenR:\n        case tt.bracketR:\n        case tt.braceBarR:\n        case tt.colon:\n        case tt.comma:\n          // The above is the complete set of tokens that can\n          // follow an AssignmentExpression, and none of them\n          // can start an AssignmentExpression\n          if (!delegating) break;\n        /* fallthrough */\n        default:\n          argument = this.parseMaybeAssign();\n      }\n    }\n    node.delegate = delegating;\n    node.argument = argument;\n    return this.finishNode(node, \"YieldExpression\");\n  }\n\n  // https://tc39.es/ecma262/#prod-ImportCall\n  parseImportCall(\n    this: Parser,\n    node: Undone<N.ImportExpression>,\n  ): N.ImportExpression {\n    this.next(); // eat tt.parenL\n    node.source = this.parseMaybeAssignAllowIn();\n    node.options = null;\n    if (this.eat(tt.comma)) {\n      if (!this.match(tt.parenR)) {\n        node.options = this.parseMaybeAssignAllowIn();\n        if (this.eat(tt.comma)) {\n          this.addTrailingCommaExtraToNode(node.options);\n          if (!this.match(tt.parenR)) {\n            // keep consuming arguments, to then throw ImportCallArity\n            // instead of \"expected )\"\n            do {\n              this.parseMaybeAssignAllowIn();\n            } while (this.eat(tt.comma) && !this.match(tt.parenR));\n\n            this.raise(Errors.ImportCallArity, node);\n          }\n        }\n      } else {\n        this.addTrailingCommaExtraToNode(node.source);\n      }\n    }\n    this.expect(tt.parenR);\n    return this.finishNode(node, \"ImportExpression\");\n  }\n\n  // Validates a pipeline (for any of the pipeline Babylon plugins) at the point\n  // of the infix operator `|>`.\n\n  checkPipelineAtInfixOperator(left: N.Expression, leftStartLoc: Position) {\n    // @ts-expect-error Remove this in Babel 8\n    if (this.hasPlugin([\"pipelineOperator\", { proposal: \"smart\" }])) {\n      if (left.type === \"SequenceExpression\") {\n        // Ensure that the pipeline head is not a comma-delimited\n        // sequence expression.\n        this.raise(Errors.PipelineHeadSequenceExpression, leftStartLoc);\n      }\n    }\n  }\n\n  parseSmartPipelineBodyInStyle(childExpr: N.Expression, startLoc: Position) {\n    if (this.isSimpleReference(childExpr)) {\n      const bodyNode = this.startNodeAt<N.PipelineBareFunction>(startLoc);\n      bodyNode.callee = childExpr;\n      return this.finishNode(bodyNode, \"PipelineBareFunction\");\n    } else {\n      const bodyNode = this.startNodeAt<N.PipelineTopicExpression>(startLoc);\n      this.checkSmartPipeTopicBodyEarlyErrors(startLoc);\n      bodyNode.expression = childExpr;\n      return this.finishNode(bodyNode, \"PipelineTopicExpression\");\n    }\n  }\n\n  isSimpleReference(expression: N.Expression): boolean {\n    switch (expression.type) {\n      case \"MemberExpression\":\n        return (\n          !expression.computed && this.isSimpleReference(expression.object)\n        );\n      case \"Identifier\":\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  // This helper method is to be called immediately\n  // after a topic-style smart-mix pipe body is parsed.\n  // The `startLoc` is the starting position of the pipe body.\n\n  checkSmartPipeTopicBodyEarlyErrors(startLoc: Position): void {\n    // If the following token is invalidly `=>`, then throw a human-friendly error\n    // instead of something like 'Unexpected token, expected \";\"'.\n    // For example, `x => x |> y => #` (assuming `#` is the topic reference)\n    // groups into `x => (x |> y) => #`,\n    // and `(x |> y) => #` is an invalid arrow function.\n    // This is because smart-mix `|>` has tighter precedence than `=>`.\n    if (this.match(tt.arrow)) {\n      throw this.raise(Errors.PipelineBodyNoArrow, this.state.startLoc);\n    }\n\n    // A topic-style smart-mix pipe body must use the topic reference at least once.\n    if (!this.topicReferenceWasUsedInCurrentContext()) {\n      this.raise(Errors.PipelineTopicUnused, startLoc);\n    }\n  }\n\n  // Enable topic references from outer contexts within Hack-style pipe bodies.\n  // The function modifies the parser's topic-context state to enable or disable\n  // the use of topic references.\n  // The function then calls a callback, then resets the parser\n  // to the old topic-context state that it had before the function was called.\n\n  withTopicBindingContext<T>(callback: () => T): T {\n    const outerContextTopicState = this.state.topicContext;\n    this.state.topicContext = {\n      // Enable the use of the primary topic reference.\n      maxNumOfResolvableTopics: 1,\n      // Hide the use of any topic references from outer contexts.\n      maxTopicIndex: null,\n    };\n\n    try {\n      return callback();\n    } finally {\n      this.state.topicContext = outerContextTopicState;\n    }\n  }\n\n  // This helper method is used only with the deprecated smart-mix pipe proposal.\n  // Disables topic references from outer contexts within syntax constructs\n  // such as the bodies of iteration statements.\n  // The function modifies the parser's topic-context state to enable or disable\n  // the use of topic references with the smartPipelines plugin. They then run a\n  // callback, then they reset the parser to the old topic-context state that it\n  // had before the function was called.\n\n  withSmartMixTopicForbiddingContext<T>(callback: () => T): T {\n    // TODO(Babel 8): Remove this method\n\n    if (\n      !process.env.BABEL_8_BREAKING &&\n      // @ts-expect-error Babel 7 only\n      this.hasPlugin([\"pipelineOperator\", { proposal: \"smart\" }])\n    ) {\n      // Reset the parser’s topic context only if the smart-mix pipe proposal is active.\n      const outerContextTopicState = this.state.topicContext;\n      this.state.topicContext = {\n        // Disable the use of the primary topic reference.\n        maxNumOfResolvableTopics: 0,\n        // Hide the use of any topic references from outer contexts.\n        maxTopicIndex: null,\n      };\n\n      try {\n        return callback();\n      } finally {\n        this.state.topicContext = outerContextTopicState;\n      }\n    } else {\n      // If the pipe proposal is \"minimal\"(Babel 7), \"fsharp\", or \"hack\",\n      // or if no pipe proposal is active,\n      // then the callback result is returned\n      // without touching any extra parser state.\n      return callback();\n    }\n  }\n\n  withSoloAwaitPermittingContext<T>(callback: () => T): T {\n    const outerContextSoloAwaitState = this.state.soloAwait;\n    this.state.soloAwait = true;\n\n    try {\n      return callback();\n    } finally {\n      this.state.soloAwait = outerContextSoloAwaitState;\n    }\n  }\n\n  allowInAnd<T>(callback: () => T): T {\n    const flags = this.prodParam.currentFlags();\n    const prodParamToSet = ParamKind.PARAM_IN & ~flags;\n    if (prodParamToSet) {\n      this.prodParam.enter(flags | ParamKind.PARAM_IN);\n      try {\n        return callback();\n      } finally {\n        this.prodParam.exit();\n      }\n    }\n    return callback();\n  }\n\n  disallowInAnd<T>(callback: () => T): T {\n    const flags = this.prodParam.currentFlags();\n    const prodParamToClear = ParamKind.PARAM_IN & flags;\n    if (prodParamToClear) {\n      this.prodParam.enter(flags & ~ParamKind.PARAM_IN);\n      try {\n        return callback();\n      } finally {\n        this.prodParam.exit();\n      }\n    }\n    return callback();\n  }\n\n  // Register the use of a topic reference within the current\n  // topic-binding context.\n  registerTopicReference(): void {\n    this.state.topicContext.maxTopicIndex = 0;\n  }\n\n  topicReferenceIsAllowedInCurrentContext(): boolean {\n    return this.state.topicContext.maxNumOfResolvableTopics >= 1;\n  }\n\n  topicReferenceWasUsedInCurrentContext(): boolean {\n    return (\n      this.state.topicContext.maxTopicIndex != null &&\n      this.state.topicContext.maxTopicIndex >= 0\n    );\n  }\n\n  parseFSharpPipelineBody(this: Parser, prec: number): N.Expression {\n    const startLoc = this.state.startLoc;\n\n    this.state.potentialArrowAt = this.state.start;\n    const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;\n    this.state.inFSharpPipelineDirectBody = true;\n\n    const ret = this.parseExprOp(\n      this.parseMaybeUnaryOrPrivate(),\n      startLoc,\n      prec,\n    );\n\n    this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;\n\n    return ret;\n  }\n\n  // https://github.com/tc39/proposal-js-module-blocks\n  parseModuleExpression(this: Parser): N.ModuleExpression {\n    this.expectPlugin(\"moduleBlocks\");\n    const node = this.startNode<N.ModuleExpression>();\n    this.next(); // eat \"module\"\n    if (!this.match(tt.braceL)) {\n      this.unexpected(null, tt.braceL);\n    }\n    // start program node immediately after `{`\n    const program = this.startNodeAt<N.Program>(this.state.endLoc);\n    this.next(); // eat `{`\n\n    const revertScopes = this.initializeScopes(/** inModule */ true);\n    this.enterInitialScopes();\n\n    try {\n      node.body = this.parseProgram(program, tt.braceR, \"module\");\n    } finally {\n      revertScopes();\n    }\n    return this.finishNode<N.ModuleExpression>(node, \"ModuleExpression\");\n  }\n\n  parseVoidPattern(\n    this: Parser,\n    refExpressionErrors: ExpressionErrors | null,\n  ): N.VoidPattern {\n    this.expectPlugin(\"discardBinding\");\n    const node = this.startNode<N.VoidPattern>();\n    if (refExpressionErrors != null) {\n      refExpressionErrors.voidPatternLoc = this.state.startLoc;\n    }\n    this.next();\n    return this.finishNode(node, \"VoidPattern\");\n  }\n\n  parseMaybeAssignAllowInOrVoidPattern(\n    this: Parser,\n    close: TokenType,\n    refExpressionErrors: ExpressionErrors | null,\n    afterLeftParse?: Function,\n  ) {\n    if (refExpressionErrors != null && this.match(tt._void)) {\n      const nextCode = this.lookaheadCharCode();\n      if (\n        nextCode === charCodes.comma ||\n        nextCode ===\n          (close === tt.bracketR\n            ? charCodes.rightSquareBracket\n            : close === tt.braceR\n              ? charCodes.rightCurlyBrace\n              : charCodes.rightParenthesis) ||\n        nextCode === charCodes.equalsTo\n      ) {\n        // `void = Initializer` is not allowed, here we parse the production as an assignment pattern\n        // so that we can recover from this error\n        return this.parseMaybeDefault(\n          this.state.startLoc,\n          this.parseVoidPattern(refExpressionErrors),\n        );\n      }\n    }\n    return this.parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse);\n  }\n\n  // Used in Flow plugin\n  parsePropertyNamePrefixOperator(\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    prop: Undone<N.ObjectOrClassMember | N.ClassMember>,\n  ): void {}\n}\n","import type * as N from \"../types.ts\";\nimport {\n  tokenIsIdentifier,\n  tokenIsKeywordOrIdentifier,\n  tokenIsLoop,\n  tokenIsTemplate,\n  tt,\n  type TokenType,\n  getExportedToken,\n} from \"../tokenizer/types.ts\";\nimport ExpressionParser from \"./expression.ts\";\nimport { Errors } from \"../parse-error.ts\";\nimport { isIdentifierChar, isIdentifierStart } from \"../util/identifier.ts\";\nimport * as charCodes from \"charcodes\";\nimport {\n  ScopeFlag,\n  ClassElementType,\n  BindingFlag,\n} from \"../util/scopeflags.ts\";\nimport { ExpressionErrors } from \"./util.ts\";\nimport { ParamKind, functionFlags } from \"../util/production-parameter.ts\";\nimport {\n  newExpressionScope,\n  newParameterDeclarationScope,\n} from \"../util/expression-scope.ts\";\nimport { OptionFlags, type SourceType } from \"../options.ts\";\nimport { Token } from \"../tokenizer/index.ts\";\nimport type { Position } from \"../util/location.ts\";\nimport { createPositionWithColumnOffset } from \"../util/location.ts\";\nimport type { Undone } from \"./node.ts\";\nimport type Parser from \"./index.ts\";\nimport { ParseBindingListFlags } from \"./lval.ts\";\nimport { LoopLabelKind } from \"../tokenizer/state.ts\";\n\nconst loopLabel = { kind: LoopLabelKind.Loop } as const,\n  switchLabel = { kind: LoopLabelKind.Switch } as const;\n\nexport const enum ParseFunctionFlag {\n  Expression = 0b0000,\n  Declaration = 0b0001,\n  HangingDeclaration = 0b0010,\n  NullableId = 0b0100,\n  Async = 0b1000,\n}\n\nexport const enum ParseStatementFlag {\n  StatementOnly = 0b0000,\n  AllowImportExport = 0b0001,\n  AllowDeclaration = 0b0010,\n  AllowFunctionDeclaration = 0b0100,\n  AllowLabeledFunction = 0b1000,\n}\n\nconst loneSurrogate = /[\\uD800-\\uDFFF]/u;\n\nconst keywordRelationalOperator = /in(?:stanceof)?/y;\n\n/**\n * Convert tokens for backward Babel 7 compat.\n * tt.privateName => tt.hash + tt.name\n * tt.templateTail => tt.backquote/tt.braceR + tt.template + tt.backquote\n * tt.templateNonTail => tt.backquote/tt.braceR + tt.template + tt.dollarBraceL\n * For performance reasons this routine mutates `tokens`, it is okay\n * here since we execute `parseTopLevel` once for every file.\n */\nfunction babel7CompatTokens(\n  tokens: (Token | N.Comment)[],\n  input: string,\n  startIndex: number,\n) {\n  for (let i = 0; i < tokens.length; i++) {\n    const token = tokens[i];\n    const { type } = token;\n    if (typeof type === \"number\") {\n      if (!process.env.BABEL_8_BREAKING) {\n        if (type === tt.privateName) {\n          const { loc, start, value, end } = token;\n          const hashEndPos = start + 1;\n          const hashEndLoc = createPositionWithColumnOffset(loc.start, 1);\n          tokens.splice(\n            i,\n            1,\n            new Token({\n              // @ts-expect-error: hacky way to create token\n              type: getExportedToken(tt.hash),\n              value: \"#\",\n              start: start,\n              end: hashEndPos,\n              startLoc: loc.start,\n              endLoc: hashEndLoc,\n            }),\n            new Token({\n              // @ts-expect-error: hacky way to create token\n              type: getExportedToken(tt.name),\n              value: value,\n              start: hashEndPos,\n              end: end,\n              startLoc: hashEndLoc,\n              endLoc: loc.end,\n            }),\n          );\n          i++;\n          continue;\n        }\n\n        if (tokenIsTemplate(type)) {\n          const { loc, start, value, end } = token;\n          const backquoteEnd = start + 1;\n          const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1);\n          let startToken;\n          if (input.charCodeAt(start - startIndex) === charCodes.graveAccent) {\n            startToken = new Token({\n              // @ts-expect-error: hacky way to create token\n              type: getExportedToken(tt.backQuote),\n              value: \"`\",\n              start: start,\n              end: backquoteEnd,\n              startLoc: loc.start,\n              endLoc: backquoteEndLoc,\n            });\n          } else {\n            startToken = new Token({\n              // @ts-expect-error: hacky way to create token\n              type: getExportedToken(tt.braceR),\n              value: \"}\",\n              start: start,\n              end: backquoteEnd,\n              startLoc: loc.start,\n              endLoc: backquoteEndLoc,\n            });\n          }\n          let templateValue,\n            templateElementEnd,\n            templateElementEndLoc,\n            endToken;\n          if (type === tt.templateTail) {\n            // ends with '`'\n            templateElementEnd = end - 1;\n            templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1);\n            templateValue = value === null ? null : value.slice(1, -1);\n            endToken = new Token({\n              // @ts-expect-error: hacky way to create token\n              type: getExportedToken(tt.backQuote),\n              value: \"`\",\n              start: templateElementEnd,\n              end: end,\n              startLoc: templateElementEndLoc,\n              endLoc: loc.end,\n            });\n          } else {\n            // ends with `${`\n            templateElementEnd = end - 2;\n            templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2);\n            templateValue = value === null ? null : value.slice(1, -2);\n            endToken = new Token({\n              // @ts-expect-error: hacky way to create token\n              type: getExportedToken(tt.dollarBraceL),\n              value: \"${\",\n              start: templateElementEnd,\n              end: end,\n              startLoc: templateElementEndLoc,\n              endLoc: loc.end,\n            });\n          }\n          tokens.splice(\n            i,\n            1,\n            startToken,\n            new Token({\n              // @ts-expect-error: hacky way to create token\n              type: getExportedToken(tt.template),\n              value: templateValue,\n              start: backquoteEnd,\n              end: templateElementEnd,\n              startLoc: backquoteEndLoc,\n              endLoc: templateElementEndLoc,\n            }),\n            endToken,\n          );\n          i += 2;\n          continue;\n        }\n      }\n      // @ts-expect-error: we manipulate `token` for performance reasons\n      token.type = getExportedToken(type);\n    }\n  }\n  return tokens;\n}\nexport default abstract class StatementParser extends ExpressionParser {\n  // ### Statement parsing\n\n  // Parse a program. Initializes the parser, reads any number of\n  // statements, and wraps them in a Program node.  Optionally takes a\n  // `program` argument.  If present, the statements will be appended\n  // to its body instead of creating a new node.\n\n  parseTopLevel(\n    this: Parser,\n    file: Undone<N.File>,\n    program: Undone<N.Program>,\n  ): N.File {\n    file.program = this.parseProgram(\n      program,\n      tt.eof,\n      this.options.sourceType === \"module\" ? \"module\" : \"script\",\n    );\n    file.comments = this.comments;\n\n    if (this.optionFlags & OptionFlags.Tokens) {\n      file.tokens = babel7CompatTokens(\n        this.tokens,\n        this.input,\n        this.startIndex,\n      );\n    }\n\n    return this.finishNode(file, \"File\");\n  }\n\n  parseProgram(\n    this: Parser,\n    program: Undone<N.Program>,\n    end: TokenType,\n    sourceType: SourceType,\n  ): N.Program {\n    program.sourceType = sourceType;\n    program.interpreter = this.parseInterpreterDirective();\n    this.parseBlockBody(program, true, true, end);\n    if (this.inModule) {\n      if (\n        !(this.optionFlags & OptionFlags.AllowUndeclaredExports) &&\n        this.scope.undefinedExports.size > 0\n      ) {\n        for (const [localName, at] of Array.from(this.scope.undefinedExports)) {\n          this.raise(Errors.ModuleExportUndefined, at, { localName });\n        }\n      }\n      this.addExtra(program, \"topLevelAwait\", this.state.hasTopLevelAwait);\n    }\n    let finishedProgram: N.Program;\n    if (end === tt.eof) {\n      // finish at eof for top level program\n      finishedProgram = this.finishNode(program, \"Program\");\n    } else {\n      // finish immediately before the end token\n      finishedProgram = this.finishNodeAt(\n        program,\n        \"Program\",\n        createPositionWithColumnOffset(this.state.startLoc, -1),\n      );\n    }\n    return finishedProgram;\n  }\n\n  /**\n   * cast a Statement to a Directive. This method mutates input statement.\n   */\n  stmtToDirective(stmt: N.ExpressionStatement): N.Directive {\n    const directive = this.castNodeTo(stmt, \"Directive\");\n\n    const directiveLiteral = this.castNodeTo(\n      stmt.expression,\n      \"DirectiveLiteral\",\n    );\n    const expressionValue = directiveLiteral.value;\n    const raw = this.input.slice(\n      this.offsetToSourcePos(directiveLiteral.start),\n      this.offsetToSourcePos(directiveLiteral.end),\n    );\n    const val = (directiveLiteral.value = raw.slice(1, -1)); // remove quotes\n\n    this.addExtra(directiveLiteral, \"raw\", raw);\n    this.addExtra(directiveLiteral, \"rawValue\", val);\n    this.addExtra(directiveLiteral, \"expressionValue\", expressionValue);\n\n    directive.value = directiveLiteral;\n    delete stmt.expression;\n\n    return directive;\n  }\n\n  parseInterpreterDirective(): N.InterpreterDirective | null {\n    if (!this.match(tt.interpreterDirective)) {\n      return null;\n    }\n\n    const node = this.startNode<N.InterpreterDirective>();\n    node.value = this.state.value;\n    this.next();\n    return this.finishNode(node, \"InterpreterDirective\");\n  }\n\n  isLet(): boolean {\n    if (!this.isContextual(tt._let)) {\n      return false;\n    }\n    return this.hasFollowingBindingAtom();\n  }\n\n  isUsing(): boolean {\n    if (!this.isContextual(tt._using)) {\n      return false;\n    }\n    const next = this.nextTokenInLineStart();\n    const nextCh = this.codePointAtPos(next);\n    return this.chStartsBindingIdentifier(nextCh, next);\n  }\n\n  isForUsing(): boolean {\n    if (!this.isContextual(tt._using)) {\n      return false;\n    }\n    const next = this.nextTokenInLineStart();\n    const nextCh = this.codePointAtPos(next);\n    if (this.isUnparsedContextual(next, \"of\")) {\n      const nextCharAfterOf = this.lookaheadCharCodeSince(next + 2);\n      // `for( using of` must start either a for-lhs-of statement\n      // or a for lexical declaration\n      if (\n        nextCharAfterOf !== charCodes.equalsTo &&\n        nextCharAfterOf !== charCodes.colon &&\n        // recover from `for(using of;...);`\n        nextCharAfterOf !== charCodes.semicolon\n      ) {\n        return false;\n      }\n    }\n    if (\n      this.chStartsBindingIdentifier(nextCh, next) ||\n      this.isUnparsedContextual(next, \"void\")\n    ) {\n      return true;\n    }\n    return false;\n  }\n\n  isAwaitUsing(): boolean {\n    if (!this.isContextual(tt._await)) {\n      return false;\n    }\n    let next = this.nextTokenInLineStart();\n    if (this.isUnparsedContextual(next, \"using\")) {\n      next = this.nextTokenInLineStartSince(next + 5);\n      const nextCh = this.codePointAtPos(next);\n      if (this.chStartsBindingIdentifier(nextCh, next)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  chStartsBindingIdentifier(ch: number, pos: number) {\n    if (isIdentifierStart(ch)) {\n      keywordRelationalOperator.lastIndex = pos;\n      if (keywordRelationalOperator.test(this.input)) {\n        // We have seen `in` or `instanceof` so far, now check if the identifier\n        // ends here\n        const endCh = this.codePointAtPos(keywordRelationalOperator.lastIndex);\n        if (!isIdentifierChar(endCh) && endCh !== charCodes.backslash) {\n          return false;\n        }\n      }\n      return true;\n    } else if (ch === charCodes.backslash) {\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  chStartsBindingPattern(ch: number) {\n    return (\n      ch === charCodes.leftSquareBracket || ch === charCodes.leftCurlyBrace\n    );\n  }\n\n  /**\n   * Assuming we have seen a contextual `let` and declaration is allowed, check if it\n   * starts a variable declaration so that it should be interpreted as a keyword.\n   */\n  hasFollowingBindingAtom(): boolean {\n    const next = this.nextTokenStart();\n    const nextCh = this.codePointAtPos(next);\n    return (\n      this.chStartsBindingPattern(nextCh) ||\n      this.chStartsBindingIdentifier(nextCh, next)\n    );\n  }\n\n  /**\n   * Assuming we have seen a contextual `using` and declaration is allowed, check if it\n   * starts a variable declaration in the same line so that it should be interpreted as\n   * a keyword.\n   */\n  hasInLineFollowingBindingIdentifierOrBrace(): boolean {\n    const next = this.nextTokenInLineStart();\n    const nextCh = this.codePointAtPos(next);\n    return (\n      nextCh === charCodes.leftCurlyBrace ||\n      this.chStartsBindingIdentifier(nextCh, next)\n    );\n  }\n\n  allowsUsing(): boolean {\n    return (\n      (this.scope.inModule || !this.scope.inTopLevel) &&\n      !this.scope.inBareCaseStatement\n    );\n  }\n\n  // https://tc39.es/ecma262/#prod-ModuleItem\n  parseModuleItem(this: Parser) {\n    return this.parseStatementLike(\n      ParseStatementFlag.AllowImportExport |\n        ParseStatementFlag.AllowDeclaration |\n        ParseStatementFlag.AllowFunctionDeclaration |\n        // This function is actually also used to parse StatementItems,\n        // which with Annex B enabled allows labeled functions.\n        ParseStatementFlag.AllowLabeledFunction,\n    );\n  }\n\n  // https://tc39.es/ecma262/#prod-StatementListItem\n  parseStatementListItem(this: Parser) {\n    return this.parseStatementLike(\n      ParseStatementFlag.AllowDeclaration |\n        ParseStatementFlag.AllowFunctionDeclaration |\n        (!this.options.annexB || this.state.strict\n          ? 0\n          : ParseStatementFlag.AllowLabeledFunction),\n    );\n  }\n\n  parseStatementOrSloppyAnnexBFunctionDeclaration(\n    this: Parser,\n    allowLabeledFunction: boolean = false,\n  ) {\n    let flags: ParseStatementFlag = ParseStatementFlag.StatementOnly;\n    if (this.options.annexB && !this.state.strict) {\n      flags |= ParseStatementFlag.AllowFunctionDeclaration;\n      if (allowLabeledFunction) {\n        flags |= ParseStatementFlag.AllowLabeledFunction;\n      }\n    }\n    return this.parseStatementLike(flags);\n  }\n\n  // Parse a single statement.\n  //\n  // If expecting a statement and finding a slash operator, parse a\n  // regular expression literal. This is to handle cases like\n  // `if (foo) /blah/.exec(foo)`, where looking at the previous token\n  // does not help.\n  // https://tc39.es/ecma262/#prod-Statement\n  parseStatement(this: Parser) {\n    return this.parseStatementLike(ParseStatementFlag.StatementOnly);\n  }\n\n  // ImportDeclaration and ExportDeclaration are also handled here so we can throw recoverable errors\n  // when they are not at the top level\n  parseStatementLike(\n    this: Parser,\n    flags: ParseStatementFlag,\n  ):\n    | N.Statement\n    | N.Declaration\n    | N.ImportDeclaration\n    | N.ExportDefaultDeclaration\n    | N.ExportNamedDeclaration\n    | N.ExportAllDeclaration {\n    let decorators: N.Decorator[] | null = null;\n\n    if (this.match(tt.at)) {\n      decorators = this.parseDecorators(true);\n    }\n    return this.parseStatementContent(flags, decorators);\n  }\n\n  parseStatementContent(\n    this: Parser,\n    flags: ParseStatementFlag,\n    decorators?: N.Decorator[] | null,\n  ): N.Statement {\n    const startType = this.state.type;\n    const node = this.startNode();\n    const allowDeclaration = !!(flags & ParseStatementFlag.AllowDeclaration);\n    const allowFunctionDeclaration = !!(\n      flags & ParseStatementFlag.AllowFunctionDeclaration\n    );\n    const topLevel = flags & ParseStatementFlag.AllowImportExport;\n\n    // Most types of statements are recognized by the keyword they\n    // start with. Many are trivial to parse, some require a bit of\n    // complexity.\n\n    switch (startType) {\n      case tt._break:\n        return this.parseBreakContinueStatement(node, /* isBreak */ true);\n      case tt._continue:\n        return this.parseBreakContinueStatement(node, /* isBreak */ false);\n      case tt._debugger:\n        return this.parseDebuggerStatement(node as Undone<N.DebuggerStatement>);\n      case tt._do:\n        return this.parseDoWhileStatement(node as Undone<N.DoWhileStatement>);\n      case tt._for:\n        return this.parseForStatement(node as Undone<N.ForStatement>);\n      case tt._function:\n        if (this.lookaheadCharCode() === charCodes.dot) break;\n        if (!allowFunctionDeclaration) {\n          this.raise(\n            this.state.strict\n              ? Errors.StrictFunction\n              : this.options.annexB\n                ? Errors.SloppyFunctionAnnexB\n                : Errors.SloppyFunction,\n            this.state.startLoc,\n          );\n        }\n        return this.parseFunctionStatement(\n          node as Undone<N.FunctionDeclaration>,\n          false,\n          !allowDeclaration && allowFunctionDeclaration,\n        );\n      case tt._class:\n        if (!allowDeclaration) this.unexpected();\n        return this.parseClass(\n          this.maybeTakeDecorators(\n            decorators,\n            node as Undone<N.ClassDeclaration>,\n          ),\n          true,\n        );\n\n      case tt._if:\n        return this.parseIfStatement(node as Undone<N.IfStatement>);\n      case tt._return:\n        return this.parseReturnStatement(node as Undone<N.ReturnStatement>);\n      case tt._switch:\n        return this.parseSwitchStatement(node as Undone<N.SwitchStatement>);\n      case tt._throw:\n        return this.parseThrowStatement(node as Undone<N.ThrowStatement>);\n      case tt._try:\n        return this.parseTryStatement(node as Undone<N.TryStatement>);\n\n      case tt._await:\n        // [+Await] await [no LineTerminator here] using [no LineTerminator here] BindingList[+Using]\n        if (this.isAwaitUsing()) {\n          if (!this.allowsUsing()) {\n            this.raise(Errors.UnexpectedUsingDeclaration, node);\n          } else if (!allowDeclaration) {\n            this.raise(Errors.UnexpectedLexicalDeclaration, node);\n          } else if (!this.recordAwaitIfAllowed()) {\n            this.raise(Errors.AwaitUsingNotInAsyncContext, node);\n          }\n          this.next(); // eat 'await'\n          return this.parseVarStatement(\n            node as Undone<N.VariableDeclaration>,\n            \"await using\",\n          );\n        }\n        break;\n      case tt._using:\n        // using [no LineTerminator here] BindingList[+Using]\n        if (\n          this.state.containsEsc ||\n          !this.hasInLineFollowingBindingIdentifierOrBrace()\n        ) {\n          break;\n        }\n        if (!this.allowsUsing()) {\n          this.raise(Errors.UnexpectedUsingDeclaration, this.state.startLoc);\n        } else if (!allowDeclaration) {\n          this.raise(Errors.UnexpectedLexicalDeclaration, this.state.startLoc);\n        }\n        return this.parseVarStatement(\n          node as Undone<N.VariableDeclaration>,\n          \"using\",\n        );\n      case tt._let: {\n        if (this.state.containsEsc) {\n          break;\n        }\n        // `let [` is an explicit negative lookahead for\n        // ExpressionStatement, so special-case it first.\n        const next = this.nextTokenStart();\n        const nextCh = this.codePointAtPos(next);\n        if (nextCh !== charCodes.leftSquareBracket) {\n          if (!allowDeclaration && this.hasFollowingLineBreak()) break;\n          if (\n            !this.chStartsBindingIdentifier(nextCh, next) &&\n            nextCh !== charCodes.leftCurlyBrace\n          ) {\n            break;\n          }\n        }\n      }\n      // fall through\n      case tt._const: {\n        if (!allowDeclaration) {\n          this.raise(Errors.UnexpectedLexicalDeclaration, this.state.startLoc);\n        }\n      }\n      // fall through\n      case tt._var: {\n        const kind = this.state.value;\n        return this.parseVarStatement(\n          node as Undone<N.VariableDeclaration>,\n          kind,\n        );\n      }\n      case tt._while:\n        return this.parseWhileStatement(node as Undone<N.WhileStatement>);\n      case tt._with:\n        return this.parseWithStatement(node as Undone<N.WithStatement>);\n      case tt.braceL:\n        return this.parseBlock();\n      case tt.semi:\n        return this.parseEmptyStatement(node as Undone<N.EmptyStatement>);\n      case tt._import: {\n        const nextTokenCharCode = this.lookaheadCharCode();\n        if (\n          nextTokenCharCode === charCodes.leftParenthesis || // import()\n          nextTokenCharCode === charCodes.dot // import.meta\n        ) {\n          break;\n        }\n      }\n      // fall through\n      case tt._export: {\n        if (\n          !(this.optionFlags & OptionFlags.AllowImportExportEverywhere) &&\n          !topLevel\n        ) {\n          this.raise(Errors.UnexpectedImportExport, this.state.startLoc);\n        }\n\n        this.next(); // eat `import`/`export`\n\n        let result;\n        if (startType === tt._import) {\n          result = this.parseImport(node as Undone<N.ImportDeclaration>);\n        } else {\n          result = this.parseExport(\n            node as Undone<\n              | N.ExportAllDeclaration\n              | N.ExportDefaultDeclaration\n              | N.ExportNamedDeclaration\n            >,\n            decorators,\n          );\n        }\n\n        this.assertModuleNodeAllowed(result);\n\n        return result;\n      }\n\n      default: {\n        if (this.isAsyncFunction()) {\n          if (!allowDeclaration) {\n            this.raise(\n              Errors.AsyncFunctionInSingleStatementContext,\n              this.state.startLoc,\n            );\n          }\n          this.next(); // eat 'async'\n          return this.parseFunctionStatement(\n            node as Undone<N.FunctionDeclaration>,\n            true,\n            !allowDeclaration && allowFunctionDeclaration,\n          );\n        }\n      }\n    }\n\n    // If the statement does not start with a statement keyword or a\n    // brace, it's an ExpressionStatement or LabeledStatement. We\n    // simply start parsing an expression, and afterwards, if the\n    // next token is a colon and the expression was a simple\n    // Identifier node, we switch to interpreting it as a label.\n    const maybeName = this.state.value;\n    const expr = this.parseExpression();\n\n    if (\n      tokenIsIdentifier(startType) &&\n      expr.type === \"Identifier\" &&\n      this.eat(tt.colon)\n    ) {\n      return this.parseLabeledStatement(\n        node as Undone<N.LabeledStatement>,\n        maybeName,\n        expr,\n        flags,\n      );\n    } else {\n      return this.parseExpressionStatement(\n        node as Undone<N.ExpressionStatement>,\n        expr,\n        decorators,\n      );\n    }\n  }\n\n  assertModuleNodeAllowed(node: N.Node): void {\n    if (\n      !(this.optionFlags & OptionFlags.AllowImportExportEverywhere) &&\n      !this.inModule\n    ) {\n      this.raise(Errors.ImportOutsideModule, node);\n    }\n  }\n\n  decoratorsEnabledBeforeExport(): boolean {\n    if (this.hasPlugin(\"decorators-legacy\")) return true;\n    return (\n      this.hasPlugin(\"decorators\") &&\n      this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\") !== false\n    );\n  }\n\n  // Attach the decorators to the given class.\n  // NOTE: This method changes the .start location of the class, and thus\n  // can affect comment attachment. Calling it before or after finalizing\n  // the class node (and thus finalizing its comments) changes how comments\n  // before the `class` keyword or before the final .start location of the\n  // class are attached.\n  maybeTakeDecorators<T extends Undone<N.Class>>(\n    maybeDecorators: N.Decorator[] | null,\n    classNode: T,\n    exportNode?: Undone<N.ExportDefaultDeclaration | N.ExportNamedDeclaration>,\n  ): T {\n    if (maybeDecorators) {\n      if (classNode.decorators?.length) {\n        // Note: decorators attachment is only attempred multiple times\n        // when the class is part of an export declaration.\n        if (\n          typeof this.getPluginOption(\n            \"decorators\",\n            \"decoratorsBeforeExport\",\n          ) !== \"boolean\"\n        ) {\n          // If `decoratorsBeforeExport` was set to `true` or `false`, we\n          // already threw an error about decorators not being in a valid\n          // position.\n          this.raise(\n            Errors.DecoratorsBeforeAfterExport,\n            classNode.decorators[0],\n          );\n        }\n        classNode.decorators.unshift(...maybeDecorators);\n      } else {\n        classNode.decorators = maybeDecorators;\n      }\n      this.resetStartLocationFromNode(classNode, maybeDecorators[0]);\n      if (exportNode) this.resetStartLocationFromNode(exportNode, classNode);\n    }\n    return classNode;\n  }\n\n  canHaveLeadingDecorator(): boolean {\n    return this.match(tt._class);\n  }\n\n  parseDecorators(this: Parser, allowExport?: boolean): N.Decorator[] {\n    const decorators = [];\n    do {\n      decorators.push(this.parseDecorator());\n    } while (this.match(tt.at));\n\n    if (this.match(tt._export)) {\n      if (!allowExport) {\n        this.unexpected();\n      }\n\n      if (!this.decoratorsEnabledBeforeExport()) {\n        this.raise(Errors.DecoratorExportClass, this.state.startLoc);\n      }\n    } else if (!this.canHaveLeadingDecorator()) {\n      throw this.raise(Errors.UnexpectedLeadingDecorator, this.state.startLoc);\n    }\n\n    return decorators;\n  }\n\n  parseDecorator(this: Parser): N.Decorator {\n    this.expectOnePlugin([\"decorators\", \"decorators-legacy\"]);\n\n    const node = this.startNode<N.Decorator>();\n    this.next();\n\n    if (this.hasPlugin(\"decorators\")) {\n      const startLoc = this.state.startLoc;\n      let expr: N.Expression;\n\n      if (this.match(tt.parenL)) {\n        const startLoc = this.state.startLoc;\n        this.next(); // eat '('\n        expr = this.parseExpression();\n        this.expect(tt.parenR);\n        expr = this.wrapParenthesis(startLoc, expr);\n\n        const paramsStartLoc = this.state.startLoc;\n        node.expression = this.parseMaybeDecoratorArguments(expr, startLoc);\n        if (\n          this.getPluginOption(\"decorators\", \"allowCallParenthesized\") ===\n            false &&\n          node.expression !== expr\n        ) {\n          this.raise(\n            Errors.DecoratorArgumentsOutsideParentheses,\n            paramsStartLoc,\n          );\n        }\n      } else {\n        expr = this.parseIdentifier(false);\n\n        while (this.eat(tt.dot)) {\n          const node = this.startNodeAt<N.MemberExpression>(startLoc);\n          node.object = expr;\n          if (this.match(tt.privateName)) {\n            this.classScope.usePrivateName(\n              this.state.value,\n              this.state.startLoc,\n            );\n            node.property = this.parsePrivateName();\n          } else {\n            node.property = this.parseIdentifier(true);\n          }\n          node.computed = false;\n          expr = this.finishNode(node, \"MemberExpression\");\n        }\n\n        node.expression = this.parseMaybeDecoratorArguments(expr, startLoc);\n      }\n    } else {\n      node.expression = this.parseExprSubscripts();\n    }\n    return this.finishNode(node, \"Decorator\");\n  }\n\n  parseMaybeDecoratorArguments(\n    this: Parser,\n    expr: N.Expression,\n    startLoc: Position,\n  ): N.Expression {\n    if (this.eat(tt.parenL)) {\n      const node = this.startNodeAt<N.CallExpression>(startLoc);\n      node.callee = expr;\n      node.arguments = this.parseCallExpressionArguments();\n      this.toReferencedList(node.arguments);\n      return this.finishNode(node, \"CallExpression\");\n    }\n\n    return expr;\n  }\n\n  parseBreakContinueStatement(\n    node: Undone<N.Node>,\n    isBreak: true,\n  ): N.BreakStatement;\n  parseBreakContinueStatement(\n    node: Undone<N.Node>,\n    isBreak: false,\n  ): N.ContinueStatement;\n  parseBreakContinueStatement(\n    node: Undone<N.BreakStatement | N.ContinueStatement>,\n    isBreak: boolean,\n  ): N.BreakStatement | N.ContinueStatement {\n    this.next();\n\n    if (this.isLineTerminator()) {\n      node.label = null;\n    } else {\n      node.label = this.parseIdentifier();\n      this.semicolon();\n    }\n\n    this.verifyBreakContinue(node, isBreak);\n\n    return this.finishNode(\n      node,\n      isBreak ? \"BreakStatement\" : \"ContinueStatement\",\n    );\n  }\n\n  verifyBreakContinue(\n    node: Undone<N.BreakStatement | N.ContinueStatement>,\n    isBreak: boolean,\n  ) {\n    let i;\n    for (i = 0; i < this.state.labels.length; ++i) {\n      const lab = this.state.labels[i];\n      if (node.label == null || lab.name === node.label.name) {\n        if (lab.kind != null && (isBreak || lab.kind === LoopLabelKind.Loop)) {\n          break;\n        }\n        if (node.label && isBreak) break;\n      }\n    }\n    if (i === this.state.labels.length) {\n      const type = isBreak ? \"BreakStatement\" : \"ContinueStatement\";\n      this.raise(Errors.IllegalBreakContinue, node, { type });\n    }\n  }\n\n  parseDebuggerStatement(\n    node: Undone<N.DebuggerStatement>,\n  ): N.DebuggerStatement {\n    this.next();\n    this.semicolon();\n    return this.finishNode(node, \"DebuggerStatement\");\n  }\n\n  parseHeaderExpression(this: Parser): N.Expression {\n    this.expect(tt.parenL);\n    const val = this.parseExpression();\n    this.expect(tt.parenR);\n    return val;\n  }\n\n  // https://tc39.es/ecma262/#prod-DoWhileStatement\n  parseDoWhileStatement(\n    this: Parser,\n    node: Undone<N.DoWhileStatement>,\n  ): N.DoWhileStatement {\n    this.next();\n    this.state.labels.push(loopLabel);\n\n    // Parse the loop body's body.\n    node.body =\n      // For the smartPipelines plugin: Disable topic references from outer\n      // contexts within the loop body. They are permitted in test expressions,\n      // outside of the loop body.\n      this.withSmartMixTopicForbiddingContext(() =>\n        // Parse the loop body's body.\n        this.parseStatement(),\n      );\n\n    this.state.labels.pop();\n\n    this.expect(tt._while);\n    node.test = this.parseHeaderExpression();\n    this.eat(tt.semi);\n    return this.finishNode(node, \"DoWhileStatement\");\n  }\n\n  // Disambiguating between a `for` and a `for`/`in` or `for`/`of`\n  // loop is non-trivial. Basically, we have to parse the init `var`\n  // statement or expression, disallowing the `in` operator (see\n  // the second parameter to `parseExpression`), and then check\n  // whether the next token is `in` or `of`. When there is no init\n  // part (semicolon immediately after the opening parenthesis), it\n  // is a regular `for` loop.\n\n  parseForStatement(\n    this: Parser,\n    node: Undone<N.ForStatement | N.ForInOf>,\n  ): N.ForLike {\n    this.next();\n    this.state.labels.push(loopLabel);\n\n    let awaitAt = null;\n\n    if (this.isContextual(tt._await) && this.recordAwaitIfAllowed()) {\n      awaitAt = this.state.startLoc;\n      this.next();\n    }\n    this.scope.enter(ScopeFlag.OTHER);\n    this.expect(tt.parenL);\n\n    if (this.match(tt.semi)) {\n      if (awaitAt !== null) {\n        this.unexpected(awaitAt);\n      }\n      return this.parseFor(node as Undone<N.ForStatement>, null);\n    }\n\n    const startsWithLet = this.isContextual(tt._let);\n    {\n      const startsWithAwaitUsing = this.isAwaitUsing();\n      const starsWithUsingDeclaration =\n        startsWithAwaitUsing || this.isForUsing();\n      const isLetOrUsing =\n        (startsWithLet && this.hasFollowingBindingAtom()) ||\n        starsWithUsingDeclaration;\n\n      if (this.match(tt._var) || this.match(tt._const) || isLetOrUsing) {\n        const initNode = this.startNode<N.VariableDeclaration>();\n        let kind;\n        if (startsWithAwaitUsing) {\n          kind = \"await using\";\n          if (!this.recordAwaitIfAllowed()) {\n            this.raise(Errors.AwaitUsingNotInAsyncContext, this.state.startLoc);\n          }\n          this.next(); // eat 'await'\n        } else {\n          kind = this.state.value;\n        }\n        this.next();\n        this.parseVar(initNode, true, kind);\n        const init = this.finishNode(initNode, \"VariableDeclaration\");\n\n        const isForIn = this.match(tt._in);\n        if (isForIn && starsWithUsingDeclaration) {\n          this.raise(Errors.ForInUsing, init);\n        }\n        if (\n          (isForIn || this.isContextual(tt._of)) &&\n          init.declarations.length === 1\n        ) {\n          return this.parseForIn(node as Undone<N.ForInOf>, init, awaitAt);\n        }\n        if (awaitAt !== null) {\n          this.unexpected(awaitAt);\n        }\n        return this.parseFor(node as Undone<N.ForStatement>, init);\n      }\n    }\n\n    // Check whether the first token is possibly a contextual keyword, so that\n    // we can forbid `for (async of` if this turns out to be a for-of loop.\n    const startsWithAsync = this.isContextual(tt._async);\n\n    const refExpressionErrors = new ExpressionErrors();\n    const init = this.parseExpression(true, refExpressionErrors);\n    const isForOf = this.isContextual(tt._of);\n    if (isForOf) {\n      // Check for leading tokens that are forbidden in for-of loops:\n      if (startsWithLet) {\n        this.raise(Errors.ForOfLet, init);\n      }\n\n      if (\n        // `for await (async of []);` is allowed.\n        awaitAt === null &&\n        startsWithAsync &&\n        init.type === \"Identifier\"\n      ) {\n        // This catches the case where the `async` in `for (async of` was\n        // parsed as an identifier. If it was parsed as the start of an async\n        // arrow function (e.g. `for (async of => {} of []);`), the LVal check\n        // further down will raise a more appropriate error.\n        this.raise(Errors.ForOfAsync, init);\n      }\n    }\n    if (isForOf || this.match(tt._in)) {\n      this.checkDestructuringPrivate(refExpressionErrors);\n      this.toAssignable(init, /* isLHS */ true);\n      const type = isForOf ? \"ForOfStatement\" : \"ForInStatement\";\n      this.checkLVal(init, { type });\n      return this.parseForIn(\n        node as Undone<N.ForInStatement | N.ForOfStatement>,\n        // @ts-expect-error init has been transformed to an assignable\n        init,\n        awaitAt,\n      );\n    } else {\n      this.checkExpressionErrors(refExpressionErrors, true);\n    }\n    if (awaitAt !== null) {\n      this.unexpected(awaitAt);\n    }\n    return this.parseFor(node as Undone<N.ForStatement>, init);\n  }\n\n  // https://tc39.es/ecma262/#prod-HoistableDeclaration\n  parseFunctionStatement(\n    this: Parser,\n    node: Undone<N.FunctionDeclaration>,\n    isAsync: boolean,\n    isHangingDeclaration: boolean,\n  ): N.FunctionDeclaration {\n    this.next(); // eat 'function'\n    return this.parseFunction(\n      node,\n      ParseFunctionFlag.Declaration |\n        (isHangingDeclaration ? ParseFunctionFlag.HangingDeclaration : 0) |\n        (isAsync ? ParseFunctionFlag.Async : 0),\n    );\n  }\n\n  // https://tc39.es/ecma262/#prod-IfStatement\n  parseIfStatement(this: Parser, node: Undone<N.IfStatement>) {\n    this.next();\n    node.test = this.parseHeaderExpression();\n    // Annex B.3.3\n    // https://tc39.es/ecma262/#sec-functiondeclarations-in-ifstatement-statement-clauses\n    node.consequent = this.parseStatementOrSloppyAnnexBFunctionDeclaration();\n    node.alternate = this.eat(tt._else)\n      ? this.parseStatementOrSloppyAnnexBFunctionDeclaration()\n      : null;\n    return this.finishNode(node, \"IfStatement\");\n  }\n\n  parseReturnStatement(this: Parser, node: Undone<N.ReturnStatement>) {\n    if (!this.prodParam.hasReturn) {\n      this.raise(Errors.IllegalReturn, this.state.startLoc);\n    }\n\n    this.next();\n\n    // In `return` (and `break`/`continue`), the keywords with\n    // optional arguments, we eagerly look for a semicolon or the\n    // possibility to insert one.\n\n    if (this.isLineTerminator()) {\n      node.argument = null;\n    } else {\n      node.argument = this.parseExpression();\n      this.semicolon();\n    }\n\n    return this.finishNode(node, \"ReturnStatement\");\n  }\n\n  // https://tc39.es/ecma262/#prod-SwitchStatement\n  parseSwitchStatement(this: Parser, node: Undone<N.SwitchStatement>) {\n    this.next();\n    node.discriminant = this.parseHeaderExpression();\n    const cases: N.SwitchStatement[\"cases\"] = (node.cases = []);\n    this.expect(tt.braceL);\n    this.state.labels.push(switchLabel);\n    this.scope.enter(ScopeFlag.SWITCH);\n\n    // Statements under must be grouped (by label) in SwitchCase\n    // nodes. `cur` is used to keep the node that we are currently\n    // adding statements to.\n\n    let cur;\n    for (let sawDefault; !this.match(tt.braceR); ) {\n      if (this.match(tt._case) || this.match(tt._default)) {\n        const isCase = this.match(tt._case);\n        if (cur) this.finishNode(cur, \"SwitchCase\");\n        // @ts-expect-error Fixme\n        cases.push((cur = this.startNode<N.SwitchCase>()));\n        cur.consequent = [];\n        this.next();\n        if (isCase) {\n          cur.test = this.parseExpression();\n        } else {\n          if (sawDefault) {\n            this.raise(\n              Errors.MultipleDefaultsInSwitch,\n              this.state.lastTokStartLoc,\n            );\n          }\n          sawDefault = true;\n          cur.test = null;\n        }\n        this.expect(tt.colon);\n      } else {\n        if (cur) {\n          cur.consequent.push(this.parseStatementListItem());\n        } else {\n          this.unexpected();\n        }\n      }\n    }\n    this.scope.exit();\n    if (cur) this.finishNode(cur, \"SwitchCase\");\n    this.next(); // Closing brace\n    this.state.labels.pop();\n    return this.finishNode(node, \"SwitchStatement\");\n  }\n\n  parseThrowStatement(this: Parser, node: Undone<N.ThrowStatement>) {\n    this.next();\n    if (this.hasPrecedingLineBreak()) {\n      this.raise(Errors.NewlineAfterThrow, this.state.lastTokEndLoc);\n    }\n    node.argument = this.parseExpression();\n    this.semicolon();\n    return this.finishNode(node, \"ThrowStatement\");\n  }\n\n  parseCatchClauseParam(this: Parser): N.Pattern {\n    const param = this.parseBindingAtom();\n\n    this.scope.enter(\n      this.options.annexB && param.type === \"Identifier\"\n        ? ScopeFlag.SIMPLE_CATCH\n        : ScopeFlag.OTHER,\n    );\n    this.checkLVal(\n      param,\n      { type: \"CatchClause\" },\n      BindingFlag.TYPE_CATCH_PARAM,\n    );\n\n    return param;\n  }\n\n  parseTryStatement(\n    this: Parser,\n    node: Undone<N.TryStatement>,\n  ): N.TryStatement {\n    this.next();\n\n    node.block = this.parseBlock();\n    node.handler = null;\n\n    if (this.match(tt._catch)) {\n      const clause = this.startNode<N.CatchClause>();\n      this.next();\n      if (this.match(tt.parenL)) {\n        this.expect(tt.parenL);\n        clause.param = this.parseCatchClauseParam();\n        this.expect(tt.parenR);\n      } else {\n        clause.param = null;\n        this.scope.enter(ScopeFlag.OTHER);\n      }\n\n      // Parse the catch clause's body.\n      clause.body =\n        // For the smartPipelines plugin: Disable topic references from outer\n        // contexts within the catch clause's body.\n        this.withSmartMixTopicForbiddingContext(() =>\n          // Parse the catch clause's body.\n          this.parseBlock(false, false),\n        );\n\n      this.scope.exit();\n      node.handler = this.finishNode(clause, \"CatchClause\");\n    }\n\n    node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null;\n\n    if (!node.handler && !node.finalizer) {\n      this.raise(Errors.NoCatchOrFinally, node);\n    }\n\n    return this.finishNode(node, \"TryStatement\");\n  }\n\n  // https://tc39.es/ecma262/#prod-VariableStatement\n  // https://tc39.es/ecma262/#prod-LexicalDeclaration\n  parseVarStatement(\n    this: Parser,\n    node: Undone<N.VariableDeclaration>,\n    kind: \"var\" | \"let\" | \"const\" | \"using\" | \"await using\",\n    allowMissingInitializer: boolean = false,\n  ): N.VariableDeclaration {\n    this.next();\n    this.parseVar(node, false, kind, allowMissingInitializer);\n    this.semicolon();\n    return this.finishNode(node, \"VariableDeclaration\");\n  }\n\n  // https://tc39.es/ecma262/#prod-WhileStatement\n  parseWhileStatement(\n    this: Parser,\n    node: Undone<N.WhileStatement>,\n  ): N.WhileStatement {\n    this.next();\n    node.test = this.parseHeaderExpression();\n    this.state.labels.push(loopLabel);\n\n    // Parse the loop body.\n    node.body =\n      // For the smartPipelines plugin:\n      // Disable topic references from outer contexts within the loop body.\n      // They are permitted in test expressions, outside of the loop body.\n      this.withSmartMixTopicForbiddingContext(() =>\n        // Parse loop body.\n        this.parseStatement(),\n      );\n\n    this.state.labels.pop();\n\n    return this.finishNode(node, \"WhileStatement\");\n  }\n\n  parseWithStatement(\n    this: Parser,\n    node: Undone<N.WithStatement>,\n  ): N.WithStatement {\n    if (this.state.strict) {\n      this.raise(Errors.StrictWith, this.state.startLoc);\n    }\n    this.next();\n    node.object = this.parseHeaderExpression();\n\n    // Parse the statement body.\n    node.body =\n      // For the smartPipelines plugin:\n      // Disable topic references from outer contexts within the with statement's body.\n      // They are permitted in function default-parameter expressions, which are\n      // part of the outer context, outside of the with statement's body.\n      this.withSmartMixTopicForbiddingContext(() =>\n        // Parse the statement body.\n        this.parseStatement(),\n      );\n\n    return this.finishNode(node, \"WithStatement\");\n  }\n\n  parseEmptyStatement(node: Undone<N.EmptyStatement>): N.EmptyStatement {\n    this.next();\n    return this.finishNode(node, \"EmptyStatement\");\n  }\n\n  // https://tc39.es/ecma262/#prod-LabelledStatement\n  parseLabeledStatement(\n    this: Parser,\n    node: Undone<N.LabeledStatement>,\n    maybeName: string,\n    expr: N.Identifier,\n    flags: ParseStatementFlag,\n  ): N.LabeledStatement {\n    for (const label of this.state.labels) {\n      if (label.name === maybeName) {\n        this.raise(Errors.LabelRedeclaration, expr, {\n          labelName: maybeName,\n        });\n      }\n    }\n\n    const kind = tokenIsLoop(this.state.type)\n      ? LoopLabelKind.Loop\n      : this.match(tt._switch)\n        ? LoopLabelKind.Switch\n        : null;\n    for (let i = this.state.labels.length - 1; i >= 0; i--) {\n      const label = this.state.labels[i];\n      if (label.statementStart === node.start) {\n        label.statementStart = this.sourceToOffsetPos(this.state.start);\n        label.kind = kind;\n      } else {\n        break;\n      }\n    }\n\n    this.state.labels.push({\n      name: maybeName,\n      kind: kind,\n      statementStart: this.sourceToOffsetPos(this.state.start),\n    });\n    // https://tc39.es/ecma262/#prod-LabelledItem\n    node.body =\n      flags & ParseStatementFlag.AllowLabeledFunction\n        ? this.parseStatementOrSloppyAnnexBFunctionDeclaration(true)\n        : this.parseStatement();\n\n    this.state.labels.pop();\n    node.label = expr;\n    return this.finishNode(node, \"LabeledStatement\");\n  }\n\n  parseExpressionStatement(\n    node: Undone<N.ExpressionStatement>,\n    expr: N.Expression,\n    /* eslint-disable-next-line @typescript-eslint/no-unused-vars -- used in TypeScript parser */\n    decorators: N.Decorator[] | null,\n  ) {\n    node.expression = expr;\n    this.semicolon();\n    return this.finishNode(node, \"ExpressionStatement\");\n  }\n\n  // Parse a semicolon-enclosed block of statements, handling `\"use\n  // strict\"` declarations when `allowDirectives` is true (used for\n  // function bodies).\n\n  parseBlock(\n    this: Parser,\n    allowDirectives: boolean = false,\n    createNewLexicalScope: boolean = true,\n    afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n  ): N.BlockStatement {\n    const node = this.startNode<N.BlockStatement>();\n    if (allowDirectives) {\n      this.state.strictErrors.clear();\n    }\n    this.expect(tt.braceL);\n    if (createNewLexicalScope) {\n      this.scope.enter(ScopeFlag.OTHER);\n    }\n    this.parseBlockBody(\n      node,\n      allowDirectives,\n      false,\n      tt.braceR,\n      afterBlockParse,\n    );\n    if (createNewLexicalScope) {\n      this.scope.exit();\n    }\n    return this.finishNode(node, \"BlockStatement\");\n  }\n\n  isValidDirective(stmt: N.Statement): stmt is N.ExpressionStatement {\n    return (\n      stmt.type === \"ExpressionStatement\" &&\n      stmt.expression.type === \"StringLiteral\" &&\n      !stmt.expression.extra.parenthesized\n    );\n  }\n\n  parseBlockBody(\n    this: Parser,\n    node: Undone<N.BlockStatementLike>,\n    allowDirectives: boolean | undefined | null,\n    topLevel: boolean,\n    end: TokenType,\n    afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n  ): void {\n    const body: N.BlockStatementLike[\"body\"] = (node.body = []);\n    const directives: N.BlockStatementLike[\"directives\"] = (node.directives =\n      []);\n    this.parseBlockOrModuleBlockBody(\n      body,\n      allowDirectives ? directives : undefined,\n      topLevel,\n      end,\n      afterBlockParse,\n    );\n  }\n\n  // Undefined directives means that directives are not allowed.\n  // https://tc39.es/ecma262/#prod-Block\n  // https://tc39.es/ecma262/#prod-ModuleBody\n  parseBlockOrModuleBlockBody(\n    this: Parser,\n    body: N.Statement[],\n    directives: N.Directive[] | undefined | null,\n    topLevel: boolean,\n    end: TokenType,\n    afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n  ): void {\n    const oldStrict = this.state.strict;\n    let hasStrictModeDirective = false;\n    let parsedNonDirective = false;\n\n    while (!this.match(end)) {\n      const stmt = topLevel\n        ? this.parseModuleItem()\n        : this.parseStatementListItem();\n\n      if (directives && !parsedNonDirective) {\n        if (this.isValidDirective(stmt)) {\n          const directive = this.stmtToDirective(stmt);\n          directives.push(directive);\n\n          if (\n            !hasStrictModeDirective &&\n            directive.value.value === \"use strict\"\n          ) {\n            hasStrictModeDirective = true;\n            this.setStrict(true);\n          }\n\n          continue;\n        }\n        parsedNonDirective = true;\n        // clear strict errors since the strict mode will not change within the block\n        this.state.strictErrors.clear();\n      }\n      body.push(stmt);\n    }\n\n    afterBlockParse?.call(this, hasStrictModeDirective);\n\n    if (!oldStrict) {\n      this.setStrict(false);\n    }\n\n    this.next();\n  }\n\n  // Parse a regular `for` loop. The disambiguation code in\n  // `parseStatement` will already have parsed the init statement or\n  // expression.\n\n  parseFor(\n    this: Parser,\n    node: Undone<N.ForStatement>,\n    init?: N.VariableDeclaration | N.Expression | null,\n  ): N.ForStatement {\n    node.init = init;\n    this.semicolon(/* allowAsi */ false);\n    node.test = this.match(tt.semi) ? null : this.parseExpression();\n    this.semicolon(/* allowAsi */ false);\n    node.update = this.match(tt.parenR) ? null : this.parseExpression();\n    this.expect(tt.parenR);\n\n    // Parse the loop body.\n    node.body =\n      // For the smartPipelines plugin: Disable topic references from outer\n      // contexts within the loop body. They are permitted in test expressions,\n      // outside of the loop body.\n      this.withSmartMixTopicForbiddingContext(() =>\n        // Parse the loop body.\n        this.parseStatement(),\n      );\n\n    this.scope.exit();\n    this.state.labels.pop();\n\n    return this.finishNode(node, \"ForStatement\");\n  }\n\n  // Parse a `for`/`in` and `for`/`of` loop, which are almost\n  // same from parser's perspective.\n\n  parseForIn(\n    this: Parser,\n    node: Undone<N.ForInOf>,\n    init: N.VariableDeclaration | N.AssignmentPattern,\n    awaitAt?: Position | null,\n  ): N.ForInOf {\n    const isForIn = this.match(tt._in);\n    this.next();\n\n    if (isForIn) {\n      if (awaitAt !== null) this.unexpected(awaitAt);\n    } else {\n      node.await = awaitAt !== null;\n    }\n\n    if (\n      init.type === \"VariableDeclaration\" &&\n      init.declarations[0].init != null &&\n      (!isForIn ||\n        !this.options.annexB ||\n        this.state.strict ||\n        init.kind !== \"var\" ||\n        init.declarations[0].id.type !== \"Identifier\")\n    ) {\n      this.raise(Errors.ForInOfLoopInitializer, init, {\n        type: isForIn ? \"ForInStatement\" : \"ForOfStatement\",\n      });\n    }\n\n    if (init.type === \"AssignmentPattern\") {\n      this.raise(Errors.InvalidLhs, init, {\n        ancestor: { type: \"ForStatement\" },\n      });\n    }\n\n    node.left = init;\n    node.right = isForIn\n      ? this.parseExpression()\n      : this.parseMaybeAssignAllowIn();\n    this.expect(tt.parenR);\n\n    // Parse the loop body.\n    node.body =\n      // For the smartPipelines plugin:\n      // Disable topic references from outer contexts within the loop body.\n      // They are permitted in test expressions, outside of the loop body.\n      this.withSmartMixTopicForbiddingContext(() =>\n        // Parse loop body.\n        this.parseStatement(),\n      );\n\n    this.scope.exit();\n    this.state.labels.pop();\n\n    return this.finishNode(node, isForIn ? \"ForInStatement\" : \"ForOfStatement\");\n  }\n\n  // Parse a list of variable declarations.\n\n  parseVar(\n    this: Parser,\n    node: Undone<N.VariableDeclaration>,\n    isFor: boolean,\n    kind: \"var\" | \"let\" | \"const\" | \"using\" | \"await using\",\n    allowMissingInitializer: boolean = false,\n  ): Undone<N.VariableDeclaration> {\n    const declarations: N.VariableDeclarator[] = (node.declarations = []);\n    node.kind = kind;\n    for (;;) {\n      const decl = this.startNode<N.VariableDeclarator>();\n      this.parseVarId(decl, kind);\n      decl.init = !this.eat(tt.eq)\n        ? null\n        : isFor\n          ? this.parseMaybeAssignDisallowIn()\n          : this.parseMaybeAssignAllowIn();\n\n      if (decl.init === null && !allowMissingInitializer) {\n        if (\n          decl.id.type !== \"Identifier\" &&\n          !(isFor && (this.match(tt._in) || this.isContextual(tt._of)))\n        ) {\n          this.raise(\n            Errors.DeclarationMissingInitializer,\n            this.state.lastTokEndLoc,\n            {\n              kind: \"destructuring\",\n            },\n          );\n        } else if (\n          (kind === \"const\" || kind === \"using\" || kind === \"await using\") &&\n          !(this.match(tt._in) || this.isContextual(tt._of))\n        ) {\n          this.raise(\n            Errors.DeclarationMissingInitializer,\n            this.state.lastTokEndLoc,\n            { kind },\n          );\n        }\n      }\n      declarations.push(this.finishNode(decl, \"VariableDeclarator\"));\n      if (!this.eat(tt.comma)) break;\n    }\n    return node;\n  }\n\n  parseVarId(\n    this: Parser,\n    decl: Undone<N.VariableDeclarator>,\n    kind: \"var\" | \"let\" | \"const\" | \"using\" | \"await using\",\n  ): void {\n    const id = this.parseBindingAtom();\n    if (kind === \"using\" || kind === \"await using\") {\n      if (id.type === \"ArrayPattern\" || id.type === \"ObjectPattern\") {\n        this.raise(Errors.UsingDeclarationHasBindingPattern, id.loc.start);\n      }\n    } else {\n      if (id.type === \"VoidPattern\") {\n        this.raise(Errors.UnexpectedVoidPattern, id.loc.start);\n      }\n    }\n    this.checkLVal(\n      id,\n      { type: \"VariableDeclarator\" },\n      kind === \"var\" ? BindingFlag.TYPE_VAR : BindingFlag.TYPE_LEXICAL,\n    );\n    decl.id = id;\n  }\n\n  // https://tc39.es/ecma262/#prod-AsyncFunctionExpression\n  parseAsyncFunctionExpression(\n    this: Parser,\n    node: Undone<N.FunctionExpression>,\n  ): N.FunctionExpression {\n    return this.parseFunction(node, ParseFunctionFlag.Async);\n  }\n\n  // Parse a function declaration or expression (depending on the\n  // ParseFunctionFlag.Declaration flag).\n\n  parseFunction<T extends N.NormalFunction>(\n    this: Parser,\n    node: Undone<T>,\n    flags: ParseFunctionFlag = ParseFunctionFlag.Expression,\n  ): T {\n    const hangingDeclaration = flags & ParseFunctionFlag.HangingDeclaration;\n    const isDeclaration = !!(flags & ParseFunctionFlag.Declaration);\n    const requireId = isDeclaration && !(flags & ParseFunctionFlag.NullableId);\n    const isAsync = !!(flags & ParseFunctionFlag.Async);\n\n    this.initFunction(node, isAsync);\n\n    if (this.match(tt.star)) {\n      if (hangingDeclaration) {\n        this.raise(\n          Errors.GeneratorInSingleStatementContext,\n          this.state.startLoc,\n        );\n      }\n      this.next(); // eat *\n      node.generator = true;\n    }\n\n    if (isDeclaration) {\n      node.id = this.parseFunctionId(requireId);\n    }\n\n    const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n    this.state.maybeInArrowParameters = false;\n    this.scope.enter(ScopeFlag.FUNCTION);\n    this.prodParam.enter(functionFlags(isAsync, node.generator));\n\n    if (!isDeclaration) {\n      node.id = this.parseFunctionId();\n    }\n\n    this.parseFunctionParams(node, /* isConstructor */ false);\n\n    // For the smartPipelines plugin: Disable topic references from outer\n    // contexts within the function body. They are permitted in function\n    // default-parameter expressions, outside of the function body.\n    this.withSmartMixTopicForbiddingContext(() => {\n      // Parse the function body.\n      this.parseFunctionBodyAndFinish(\n        node,\n        isDeclaration ? \"FunctionDeclaration\" : \"FunctionExpression\",\n      );\n    });\n\n    this.prodParam.exit();\n    this.scope.exit();\n\n    if (isDeclaration && !hangingDeclaration) {\n      // We need to register this _after_ parsing the function body\n      // because of TypeScript body-less function declarations,\n      // which shouldn't be added to the scope.\n      this.registerFunctionStatementId(node as T);\n    }\n\n    this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n    return node as T;\n  }\n\n  parseFunctionId(requireId?: boolean): N.Identifier | undefined | null {\n    return requireId || tokenIsIdentifier(this.state.type)\n      ? this.parseIdentifier()\n      : null;\n  }\n\n  parseFunctionParams(\n    this: Parser,\n    node: Undone<N.Function>,\n    isConstructor?: boolean,\n  ): void {\n    this.expect(tt.parenL);\n    this.expressionScope.enter(newParameterDeclarationScope());\n    node.params = this.parseBindingList(\n      tt.parenR,\n      charCodes.rightParenthesis,\n      ParseBindingListFlags.IS_FUNCTION_PARAMS |\n        (isConstructor ? ParseBindingListFlags.IS_CONSTRUCTOR_PARAMS : 0),\n    );\n\n    this.expressionScope.exit();\n  }\n\n  registerFunctionStatementId(node: N.Function): void {\n    if (!node.id) return;\n\n    // If it is a regular function declaration in sloppy mode, then it is\n    // subject to Annex B semantics (BindingFlag.TYPE_FUNCTION). Otherwise, the binding\n    // mode depends on properties of the current scope (see\n    // treatFunctionsAsVar).\n    this.scope.declareName(\n      node.id.name,\n      !this.options.annexB || this.state.strict || node.generator || node.async\n        ? this.scope.treatFunctionsAsVar\n          ? BindingFlag.TYPE_VAR\n          : BindingFlag.TYPE_LEXICAL\n        : BindingFlag.TYPE_FUNCTION,\n      node.id.loc.start,\n    );\n  }\n\n  // Parse a class declaration or literal (depending on the\n  // `isStatement` parameter).\n\n  parseClass<T extends N.Class>(\n    this: Parser,\n    node: Undone<T>,\n    isStatement: /* T === ClassDeclaration */ boolean,\n    optionalId?: boolean,\n  ): T {\n    this.next(); // 'class'\n\n    // A class definition is always strict mode code.\n    const oldStrict = this.state.strict;\n    this.state.strict = true;\n\n    this.parseClassId(node, isStatement, optionalId);\n    this.parseClassSuper(node);\n    // this.state.strict is restored in parseClassBody\n    node.body = this.parseClassBody(!!node.superClass, oldStrict);\n\n    return this.finishNode(\n      node,\n      isStatement ? \"ClassDeclaration\" : \"ClassExpression\",\n    );\n  }\n\n  isClassProperty(): boolean {\n    return this.match(tt.eq) || this.match(tt.semi) || this.match(tt.braceR);\n  }\n\n  isClassMethod(): boolean {\n    return this.match(tt.parenL);\n  }\n\n  nameIsConstructor(key: N.Expression | N.PrivateName): boolean {\n    return (\n      (key.type === \"Identifier\" && key.name === \"constructor\") ||\n      (key.type === \"StringLiteral\" && key.value === \"constructor\")\n    );\n  }\n\n  isNonstaticConstructor(method: N.ClassMethod | N.ClassProperty): boolean {\n    return (\n      !method.computed && !method.static && this.nameIsConstructor(method.key)\n    );\n  }\n\n  // https://tc39.es/ecma262/#prod-ClassBody\n  parseClassBody(\n    this: Parser,\n    hadSuperClass: boolean,\n    oldStrict: boolean,\n  ): N.ClassBody {\n    this.classScope.enter();\n\n    const state: N.ParseClassMemberState = {\n      hadConstructor: false,\n      hadSuperClass,\n    };\n    let decorators: N.Decorator[] = [];\n    const classBody = this.startNode<N.ClassBody>();\n    classBody.body = [];\n\n    this.expect(tt.braceL);\n\n    // For the smartPipelines plugin: Disable topic references from outer\n    // contexts within the class body.\n    this.withSmartMixTopicForbiddingContext(() => {\n      // Parse the contents within the braces.\n      while (!this.match(tt.braceR)) {\n        if (this.eat(tt.semi)) {\n          if (decorators.length > 0) {\n            throw this.raise(\n              Errors.DecoratorSemicolon,\n              this.state.lastTokEndLoc,\n            );\n          }\n          continue;\n        }\n\n        if (this.match(tt.at)) {\n          decorators.push(this.parseDecorator());\n          continue;\n        }\n\n        const member = this.startNode<N.ClassMember>();\n\n        // steal the decorators if there are any\n        if (decorators.length) {\n          // @ts-expect-error Fixme\n          member.decorators = decorators;\n          this.resetStartLocationFromNode(member, decorators[0]);\n          decorators = [];\n        }\n\n        this.parseClassMember(classBody, member, state);\n\n        if (\n          // @ts-expect-error Fixme\n          member.kind === \"constructor\" &&\n          // @ts-expect-error Fixme\n          member.decorators &&\n          // @ts-expect-error Fixme\n          member.decorators.length > 0\n        ) {\n          this.raise(Errors.DecoratorConstructor, member);\n        }\n      }\n    });\n\n    this.state.strict = oldStrict;\n\n    this.next(); // eat `}`\n\n    if (decorators.length) {\n      throw this.raise(Errors.TrailingDecorator, this.state.startLoc);\n    }\n\n    this.classScope.exit();\n\n    return this.finishNode(classBody, \"ClassBody\");\n  }\n\n  // returns true if the current identifier is a method/field name,\n  // false if it is a modifier\n  parseClassMemberFromModifier(\n    this: Parser,\n    classBody: Undone<N.ClassBody>,\n    member: Undone<N.ClassMember>,\n  ): boolean {\n    const key = this.parseIdentifier(true); // eats the modifier\n\n    if (this.isClassMethod()) {\n      const method: N.ClassMethod = member as any;\n\n      // a method named like the modifier\n      method.kind = \"method\";\n      method.computed = false;\n      method.key = key;\n      method.static = false;\n      this.pushClassMethod(\n        classBody,\n        method,\n        false,\n        false,\n        /* isConstructor */ false,\n        false,\n      );\n      return true;\n    } else if (this.isClassProperty()) {\n      const prop: N.ClassProperty = member as any;\n\n      // a property named like the modifier\n      prop.computed = false;\n      prop.key = key;\n      prop.static = false;\n      classBody.body.push(this.parseClassProperty(prop));\n      return true;\n    }\n    this.resetPreviousNodeTrailingComments(key);\n    return false;\n  }\n\n  parseClassMember(\n    this: Parser,\n    classBody: Undone<N.ClassBody>,\n    member: Undone<N.ClassMember>,\n    state: N.ParseClassMemberState,\n  ): void {\n    const isStatic = this.isContextual(tt._static);\n\n    if (isStatic) {\n      if (this.parseClassMemberFromModifier(classBody, member)) {\n        // a class element named 'static'\n        return;\n      }\n      if (this.eat(tt.braceL)) {\n        this.parseClassStaticBlock(classBody, member as any as N.StaticBlock);\n        return;\n      }\n    }\n\n    this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);\n  }\n\n  parseClassMemberWithIsStatic(\n    this: Parser,\n    classBody: Undone<N.ClassBody>,\n    member: Undone<N.ClassMember>,\n    state: N.ParseClassMemberState,\n    isStatic: boolean,\n  ) {\n    const publicMethod = member as N.ClassMethod;\n    const privateMethod = member as N.ClassPrivateMethod;\n    const publicProp = member as N.ClassProperty;\n    const privateProp = member as N.ClassPrivateProperty;\n    const accessorProp = member as N.ClassAccessorProperty;\n\n    const method: typeof publicMethod | typeof privateMethod = publicMethod;\n    const publicMember: typeof publicMethod | typeof publicProp = publicMethod;\n\n    member.static = isStatic;\n    this.parsePropertyNamePrefixOperator(member);\n\n    if (this.eat(tt.star)) {\n      // a generator\n      method.kind = \"method\";\n      const isPrivateName = this.match(tt.privateName);\n      this.parseClassElementName(method);\n      this.parsePostMemberNameModifiers(method);\n\n      if (isPrivateName) {\n        // Private generator method\n        this.pushClassPrivateMethod(classBody, privateMethod, true, false);\n        return;\n      }\n\n      if (this.isNonstaticConstructor(publicMethod)) {\n        this.raise(Errors.ConstructorIsGenerator, publicMethod.key);\n      }\n\n      this.pushClassMethod(\n        classBody,\n        publicMethod,\n        true,\n        false,\n        /* isConstructor */ false,\n        false,\n      );\n\n      return;\n    }\n\n    const isContextual =\n      !this.state.containsEsc && tokenIsIdentifier(this.state.type);\n    const key = this.parseClassElementName(member);\n    const maybeContextualKw = isContextual ? (key as N.Identifier).name : null;\n    const isPrivate = this.isPrivateName(key);\n    const maybeQuestionTokenStartLoc = this.state.startLoc;\n\n    this.parsePostMemberNameModifiers(publicMember);\n\n    if (this.isClassMethod()) {\n      method.kind = \"method\";\n\n      if (isPrivate) {\n        this.pushClassPrivateMethod(classBody, privateMethod, false, false);\n        return;\n      }\n\n      // a normal method\n      const isConstructor = this.isNonstaticConstructor(publicMethod);\n      let allowsDirectSuper = false;\n      if (isConstructor) {\n        publicMethod.kind = \"constructor\";\n\n        // TypeScript allows multiple overloaded constructor declarations.\n        if (state.hadConstructor && !this.hasPlugin(\"typescript\")) {\n          this.raise(Errors.DuplicateConstructor, key);\n        }\n        if (isConstructor && this.hasPlugin(\"typescript\") && member.override) {\n          this.raise(Errors.OverrideOnConstructor, key);\n        }\n        state.hadConstructor = true;\n        allowsDirectSuper = state.hadSuperClass;\n      }\n\n      this.pushClassMethod(\n        classBody,\n        publicMethod,\n        false,\n        false,\n        isConstructor,\n        allowsDirectSuper,\n      );\n    } else if (this.isClassProperty()) {\n      if (isPrivate) {\n        this.pushClassPrivateProperty(classBody, privateProp);\n      } else {\n        this.pushClassProperty(classBody, publicProp);\n      }\n    } else if (maybeContextualKw === \"async\" && !this.isLineTerminator()) {\n      // an async method\n      this.resetPreviousNodeTrailingComments(key);\n      const isGenerator = this.eat(tt.star);\n\n      if (publicMember.optional) {\n        this.unexpected(maybeQuestionTokenStartLoc);\n      }\n\n      method.kind = \"method\";\n      // The so-called parsed name would have been \"async\": get the real name.\n      const isPrivate = this.match(tt.privateName);\n      this.parseClassElementName(method);\n      this.parsePostMemberNameModifiers(publicMember);\n\n      if (isPrivate) {\n        // private async method\n        this.pushClassPrivateMethod(\n          classBody,\n          privateMethod,\n          isGenerator,\n          true,\n        );\n      } else {\n        if (this.isNonstaticConstructor(publicMethod)) {\n          this.raise(Errors.ConstructorIsAsync, publicMethod.key);\n        }\n\n        this.pushClassMethod(\n          classBody,\n          publicMethod,\n          isGenerator,\n          true,\n          /* isConstructor */ false,\n          false,\n        );\n      }\n    } else if (\n      (maybeContextualKw === \"get\" || maybeContextualKw === \"set\") &&\n      !(this.match(tt.star) && this.isLineTerminator())\n    ) {\n      // `get\\n*` is an uninitialized property named 'get' followed by a generator.\n      // a getter or setter\n      this.resetPreviousNodeTrailingComments(key);\n      method.kind = maybeContextualKw;\n      // The so-called parsed name would have been \"get/set\": get the real name.\n      const isPrivate = this.match(tt.privateName);\n      this.parseClassElementName(publicMethod);\n\n      if (isPrivate) {\n        // private getter/setter\n        this.pushClassPrivateMethod(classBody, privateMethod, false, false);\n      } else {\n        if (this.isNonstaticConstructor(publicMethod)) {\n          this.raise(Errors.ConstructorIsAccessor, publicMethod.key);\n        }\n        this.pushClassMethod(\n          classBody,\n          publicMethod,\n          false,\n          false,\n          /* isConstructor */ false,\n          false,\n        );\n      }\n\n      this.checkGetterSetterParams(publicMethod);\n    } else if (maybeContextualKw === \"accessor\" && !this.isLineTerminator()) {\n      this.expectPlugin(\"decoratorAutoAccessors\");\n      this.resetPreviousNodeTrailingComments(key);\n\n      // The so-called parsed name would have been \"accessor\": get the real name.\n      const isPrivate = this.match(tt.privateName);\n      this.parseClassElementName(publicProp);\n      this.pushClassAccessorProperty(classBody, accessorProp, isPrivate);\n    } else if (this.isLineTerminator()) {\n      // an uninitialized class property (due to ASI, since we don't otherwise recognize the next token)\n      if (isPrivate) {\n        this.pushClassPrivateProperty(classBody, privateProp);\n      } else {\n        this.pushClassProperty(classBody, publicProp);\n      }\n    } else {\n      this.unexpected();\n    }\n  }\n\n  // https://tc39.es/ecma262/#prod-ClassElementName\n  parseClassElementName(\n    this: Parser,\n    member: Undone<N.ClassMember>,\n  ): N.Expression | N.Identifier | N.PrivateName {\n    const { type, value } = this.state;\n    if (\n      (type === tt.name || type === tt.string) &&\n      member.static &&\n      value === \"prototype\"\n    ) {\n      this.raise(Errors.StaticPrototype, this.state.startLoc);\n    }\n\n    if (type === tt.privateName) {\n      if (value === \"constructor\") {\n        this.raise(Errors.ConstructorClassPrivateField, this.state.startLoc);\n      }\n      const key = this.parsePrivateName();\n      member.key = key;\n      return key;\n    }\n\n    this.parsePropertyName(member);\n    return member.key;\n  }\n\n  parseClassStaticBlock(\n    this: Parser,\n    classBody: Undone<N.ClassBody>,\n    member: Undone<\n      N.StaticBlock & {\n        decorators?: Array<N.Decorator>;\n      }\n    >,\n  ) {\n    // Start a new lexical scope\n    this.scope.enter(\n      ScopeFlag.CLASS | ScopeFlag.STATIC_BLOCK | ScopeFlag.SUPER,\n    );\n    // Start a new scope with regard to loop labels\n    const oldLabels = this.state.labels;\n    this.state.labels = [];\n    // ClassStaticBlockStatementList:\n    //   StatementList[~Yield, ~Await, ~Return] opt\n    this.prodParam.enter(ParamKind.PARAM);\n    const body: N.Statement[] = (member.body = []);\n    this.parseBlockOrModuleBlockBody(body, undefined, false, tt.braceR);\n    this.prodParam.exit();\n    this.scope.exit();\n    this.state.labels = oldLabels;\n    classBody.body.push(this.finishNode<N.StaticBlock>(member, \"StaticBlock\"));\n    if (member.decorators?.length) {\n      this.raise(Errors.DecoratorStaticBlock, member);\n    }\n  }\n\n  pushClassProperty(\n    this: Parser,\n    classBody: Undone<N.ClassBody>,\n    prop: N.ClassProperty,\n  ) {\n    if (!prop.computed && this.nameIsConstructor(prop.key)) {\n      // Non-computed field, which is either an identifier named \"constructor\"\n      // or a string literal named \"constructor\"\n      this.raise(Errors.ConstructorClassField, prop.key);\n    }\n\n    classBody.body.push(this.parseClassProperty(prop));\n  }\n\n  pushClassPrivateProperty(\n    this: Parser,\n    classBody: Undone<N.ClassBody>,\n    prop: Undone<N.ClassPrivateProperty>,\n  ) {\n    const node = this.parseClassPrivateProperty(prop);\n    classBody.body.push(node);\n\n    this.classScope.declarePrivateName(\n      this.getPrivateNameSV(node.key),\n      ClassElementType.OTHER,\n      node.key.loc.start,\n    );\n  }\n\n  pushClassAccessorProperty(\n    this: Parser,\n    classBody: Undone<N.ClassBody>,\n    prop: N.ClassAccessorProperty,\n    isPrivate: boolean,\n  ) {\n    if (!isPrivate && !prop.computed && this.nameIsConstructor(prop.key)) {\n      // Non-computed field, which is either an identifier named \"constructor\"\n      // or a string literal named \"constructor\"\n      this.raise(Errors.ConstructorClassField, prop.key);\n    }\n\n    const node = this.parseClassAccessorProperty(prop);\n    classBody.body.push(node);\n\n    if (isPrivate) {\n      this.classScope.declarePrivateName(\n        this.getPrivateNameSV(node.key as N.PrivateName),\n        ClassElementType.OTHER,\n        node.key.loc.start,\n      );\n    }\n  }\n\n  pushClassMethod(\n    this: Parser,\n    classBody: Undone<N.ClassBody>,\n    method: Undone<N.ClassMethod>,\n    isGenerator: boolean,\n    isAsync: boolean,\n    isConstructor: boolean,\n    allowsDirectSuper: boolean,\n  ): void {\n    classBody.body.push(\n      this.parseMethod(\n        method,\n        isGenerator,\n        isAsync,\n        isConstructor,\n        allowsDirectSuper,\n        \"ClassMethod\",\n        true,\n      ),\n    );\n  }\n\n  pushClassPrivateMethod(\n    this: Parser,\n    classBody: Undone<N.ClassBody>,\n    method: Undone<N.ClassPrivateMethod>,\n    isGenerator: boolean,\n    isAsync: boolean,\n  ): void {\n    const node = this.parseMethod(\n      method,\n      isGenerator,\n      isAsync,\n      /* isConstructor */ false,\n      false,\n      \"ClassPrivateMethod\",\n      true,\n    );\n    classBody.body.push(node);\n\n    const kind =\n      node.kind === \"get\"\n        ? node.static\n          ? ClassElementType.STATIC_GETTER\n          : ClassElementType.INSTANCE_GETTER\n        : node.kind === \"set\"\n          ? node.static\n            ? ClassElementType.STATIC_SETTER\n            : ClassElementType.INSTANCE_SETTER\n          : ClassElementType.OTHER;\n    this.declareClassPrivateMethodInScope(node, kind);\n  }\n\n  declareClassPrivateMethodInScope(\n    node: Undone<N.ClassPrivateMethod | N.TSDeclareMethod>,\n    kind: number,\n  ) {\n    this.classScope.declarePrivateName(\n      this.getPrivateNameSV(node.key as N.PrivateName),\n      kind,\n      node.key.loc.start,\n    );\n  }\n\n  // Overridden in typescript.js\n  parsePostMemberNameModifiers(\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    methodOrProp: Undone<N.ClassMethod | N.ClassProperty>,\n  ): void {}\n\n  // https://tc39.es/ecma262/#prod-FieldDefinition\n  parseClassPrivateProperty(\n    this: Parser,\n    node: Undone<N.ClassPrivateProperty>,\n  ): N.ClassPrivateProperty {\n    this.parseInitializer(node);\n    this.semicolon();\n    return this.finishNode(node, \"ClassPrivateProperty\");\n  }\n\n  // https://tc39.es/ecma262/#prod-FieldDefinition\n  parseClassProperty(this: Parser, node: N.ClassProperty): N.ClassProperty {\n    this.parseInitializer(node);\n    this.semicolon();\n    return this.finishNode(node, \"ClassProperty\");\n  }\n\n  parseClassAccessorProperty(\n    this: Parser,\n    node: N.ClassAccessorProperty,\n  ): N.ClassAccessorProperty {\n    this.parseInitializer(node);\n    this.semicolon();\n    return this.finishNode(node, \"ClassAccessorProperty\");\n  }\n\n  // https://tc39.es/ecma262/#prod-Initializer\n  parseInitializer(\n    this: Parser,\n    node: Undone<\n      N.ClassProperty | N.ClassPrivateProperty | N.ClassAccessorProperty\n    >,\n  ): void {\n    this.scope.enter(ScopeFlag.CLASS | ScopeFlag.SUPER);\n    this.expressionScope.enter(newExpressionScope());\n    this.prodParam.enter(ParamKind.PARAM);\n    node.value = this.eat(tt.eq) ? this.parseMaybeAssignAllowIn() : null;\n    this.expressionScope.exit();\n    this.prodParam.exit();\n    this.scope.exit();\n  }\n\n  parseClassId(\n    node: Undone<N.Class>,\n    isStatement: boolean,\n    optionalId?: boolean | null,\n    bindingType: BindingFlag = BindingFlag.TYPE_CLASS,\n  ): void {\n    if (tokenIsIdentifier(this.state.type)) {\n      node.id = this.parseIdentifier();\n      if (isStatement) {\n        this.declareNameFromIdentifier(node.id, bindingType);\n      }\n    } else {\n      if (optionalId || !isStatement) {\n        node.id = null;\n      } else {\n        throw this.raise(Errors.MissingClassName, this.state.startLoc);\n      }\n    }\n  }\n\n  // https://tc39.es/ecma262/#prod-ClassHeritage\n  parseClassSuper(this: Parser, node: Undone<N.Class>): void {\n    node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null;\n  }\n\n  // Parses module export declaration.\n  // https://tc39.es/ecma262/#prod-ExportDeclaration\n\n  parseExport(\n    this: Parser,\n    node: Undone<\n      | N.ExportDefaultDeclaration\n      | N.ExportAllDeclaration\n      | N.ExportNamedDeclaration\n    >,\n    decorators: N.Decorator[] | null,\n  ): N.AnyExport {\n    const maybeDefaultIdentifier = this.parseMaybeImportPhase(\n      node,\n      /* isExport */ true,\n    );\n    const hasDefault = this.maybeParseExportDefaultSpecifier(\n      node,\n      maybeDefaultIdentifier,\n    );\n    const parseAfterDefault = !hasDefault || this.eat(tt.comma);\n    const hasStar = parseAfterDefault && this.eatExportStar(node);\n    const hasNamespace =\n      hasStar && this.maybeParseExportNamespaceSpecifier(node);\n    const parseAfterNamespace =\n      parseAfterDefault && (!hasNamespace || this.eat(tt.comma));\n    const isFromRequired = hasDefault || hasStar;\n\n    if (hasStar && !hasNamespace) {\n      if (hasDefault) this.unexpected();\n      if (decorators) {\n        throw this.raise(Errors.UnsupportedDecoratorExport, node);\n      }\n      this.parseExportFrom(node, true);\n\n      this.sawUnambiguousESM = true;\n\n      return this.finishNode(node, \"ExportAllDeclaration\");\n    }\n\n    const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node);\n\n    if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers) {\n      this.unexpected(null, tt.braceL);\n    }\n\n    if (hasNamespace && parseAfterNamespace) {\n      this.unexpected(null, tt._from);\n    }\n\n    let hasDeclaration;\n    if (isFromRequired || hasSpecifiers) {\n      hasDeclaration = false;\n      if (decorators) {\n        throw this.raise(Errors.UnsupportedDecoratorExport, node);\n      }\n      this.parseExportFrom(\n        node as Undone<N.ExportNamedDeclaration>,\n        isFromRequired,\n      );\n    } else {\n      hasDeclaration = this.maybeParseExportDeclaration(\n        node as Undone<N.ExportNamedDeclaration>,\n      );\n    }\n\n    if (isFromRequired || hasSpecifiers || hasDeclaration) {\n      const node2 = node as Undone<N.ExportNamedDeclaration>;\n      this.checkExport(node2, true, false, !!node2.source);\n      if (node2.declaration?.type === \"ClassDeclaration\") {\n        this.maybeTakeDecorators(decorators, node2.declaration, node2);\n      } else if (decorators) {\n        throw this.raise(Errors.UnsupportedDecoratorExport, node);\n      }\n      this.sawUnambiguousESM = true;\n      return this.finishNode(node2, \"ExportNamedDeclaration\");\n    }\n\n    if (this.eat(tt._default)) {\n      const node2 = node as Undone<N.ExportDefaultDeclaration>;\n      // export default ...\n      const decl = this.parseExportDefaultExpression();\n      node2.declaration = decl;\n\n      if (decl.type === \"ClassDeclaration\") {\n        this.maybeTakeDecorators(decorators, decl as N.ClassDeclaration, node2);\n      } else if (decorators) {\n        throw this.raise(Errors.UnsupportedDecoratorExport, node);\n      }\n\n      this.checkExport(node2, true, true);\n      this.sawUnambiguousESM = true;\n      return this.finishNode(node2, \"ExportDefaultDeclaration\");\n    }\n\n    this.unexpected(null, tt.braceL);\n  }\n\n  eatExportStar(\n    node: Undone<N.Node>,\n  ): node is Undone<N.ExportNamedDeclaration | N.ExportAllDeclaration> {\n    return this.eat(tt.star);\n  }\n\n  maybeParseExportDefaultSpecifier(\n    node: Undone<\n      | N.ExportDefaultDeclaration\n      | N.ExportAllDeclaration\n      | N.ExportNamedDeclaration\n    >,\n    maybeDefaultIdentifier: N.Identifier | null,\n  ): node is Undone<N.ExportNamedDeclaration> {\n    if (maybeDefaultIdentifier || this.isExportDefaultSpecifier()) {\n      // export defaultObj ...\n      this.expectPlugin(\"exportDefaultFrom\", maybeDefaultIdentifier?.loc.start);\n      const id = maybeDefaultIdentifier || this.parseIdentifier(true);\n      const specifier = this.startNodeAtNode<N.ExportDefaultSpecifier>(id);\n      specifier.exported = id;\n      (node as Undone<N.ExportNamedDeclaration>).specifiers = [\n        this.finishNode(specifier, \"ExportDefaultSpecifier\"),\n      ];\n      return true;\n    }\n    return false;\n  }\n\n  maybeParseExportNamespaceSpecifier(\n    node: Undone<N.ExportNamedDeclaration | N.ExportAllDeclaration>,\n  ): node is Undone<N.ExportNamedDeclaration> {\n    if (this.isContextual(tt._as)) {\n      (node as Undone<N.ExportNamedDeclaration>).specifiers ??= [];\n\n      const specifier = this.startNodeAt<N.ExportNamespaceSpecifier>(\n        this.state.lastTokStartLoc,\n      );\n\n      this.next();\n\n      specifier.exported = this.parseModuleExportName();\n      (node as Undone<N.ExportNamedDeclaration>).specifiers.push(\n        this.finishNode(specifier, \"ExportNamespaceSpecifier\"),\n      );\n      return true;\n    }\n    return false;\n  }\n\n  maybeParseExportNamedSpecifiers(\n    node: Undone<N.Node>,\n  ): node is Undone<N.ExportNamedDeclaration> {\n    if (this.match(tt.braceL)) {\n      const node2 = node as Undone<N.ExportNamedDeclaration>;\n\n      if (!node2.specifiers) node2.specifiers = [];\n      const isTypeExport = node2.exportKind === \"type\";\n      node2.specifiers.push(...this.parseExportSpecifiers(isTypeExport));\n      node2.source = null;\n      if (!process.env.BABEL_8_BREAKING && this.hasPlugin(\"importAssertions\")) {\n        node2.assertions = [];\n      } else {\n        node2.attributes = [];\n      }\n      node2.declaration = null;\n      return true;\n    }\n    return false;\n  }\n\n  maybeParseExportDeclaration(\n    this: Parser,\n    node: Undone<N.ExportNamedDeclaration>,\n  ): boolean {\n    if (this.shouldParseExportDeclaration()) {\n      node.specifiers = [];\n      node.source = null;\n      if (!process.env.BABEL_8_BREAKING && this.hasPlugin(\"importAssertions\")) {\n        node.assertions = [];\n      } else {\n        node.attributes = [];\n      }\n      node.declaration = this.parseExportDeclaration(node);\n      return true;\n    }\n    return false;\n  }\n\n  isAsyncFunction(): boolean {\n    if (!this.isContextual(tt._async)) return false;\n    const next = this.nextTokenInLineStart();\n    return this.isUnparsedContextual(next, \"function\");\n  }\n\n  parseExportDefaultExpression(\n    this: Parser,\n  ): N.ExportDefaultDeclaration[\"declaration\"] {\n    const expr = this.startNode();\n\n    if (this.match(tt._function)) {\n      this.next();\n      return this.parseFunction(\n        expr as Undone<N.FunctionDeclaration>,\n        ParseFunctionFlag.Declaration | ParseFunctionFlag.NullableId,\n      );\n    } else if (this.isAsyncFunction()) {\n      this.next(); // eat 'async'\n      this.next(); // eat 'function'\n      return this.parseFunction(\n        expr as Undone<N.FunctionDeclaration>,\n        ParseFunctionFlag.Declaration |\n          ParseFunctionFlag.NullableId |\n          ParseFunctionFlag.Async,\n      );\n    }\n\n    if (this.match(tt._class)) {\n      return this.parseClass(expr as Undone<N.ClassExpression>, true, true);\n    }\n\n    if (this.match(tt.at)) {\n      if (\n        this.hasPlugin(\"decorators\") &&\n        this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\") === true\n      ) {\n        this.raise(Errors.DecoratorBeforeExport, this.state.startLoc);\n      }\n      return this.parseClass(\n        this.maybeTakeDecorators(\n          this.parseDecorators(false),\n          this.startNode<N.ClassDeclaration>(),\n        ),\n        true,\n        true,\n      );\n    }\n\n    if (\n      this.match(tt._const) ||\n      this.match(tt._var) ||\n      this.isLet() ||\n      this.isUsing() ||\n      this.isAwaitUsing()\n    ) {\n      throw this.raise(Errors.UnsupportedDefaultExport, this.state.startLoc);\n    }\n\n    const res = this.parseMaybeAssignAllowIn();\n    this.semicolon();\n    return res;\n  }\n\n  // https://tc39.es/ecma262/#prod-ExportDeclaration\n  parseExportDeclaration(\n    this: Parser,\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    node: Undone<N.ExportNamedDeclaration>,\n  ): N.Declaration | undefined | null {\n    if (this.match(tt._class)) {\n      const node = this.parseClass(\n        this.startNode<N.ClassDeclaration>(),\n        true,\n        false,\n      );\n      return node;\n    }\n    return this.parseStatementListItem() as N.Declaration;\n  }\n\n  isExportDefaultSpecifier(): boolean {\n    const { type } = this.state;\n    if (tokenIsIdentifier(type)) {\n      if ((type === tt._async && !this.state.containsEsc) || type === tt._let) {\n        return false;\n      }\n      if (\n        (type === tt._type || type === tt._interface) &&\n        !this.state.containsEsc\n      ) {\n        // If we see any variable name other than `from` after `type` keyword,\n        // we consider it as flow/typescript type exports\n        // note that this approach may fail on some pedantic cases\n        // export type from = number\n        const next = this.nextTokenStart();\n        const nextChar = this.input.charCodeAt(next);\n        if (\n          nextChar === charCodes.leftCurlyBrace ||\n          (this.chStartsBindingIdentifier(nextChar, next) &&\n            !this.input.startsWith(\"from\", next))\n        ) {\n          this.expectOnePlugin([\"flow\", \"typescript\"]);\n          return false;\n        }\n      }\n    } else if (!this.match(tt._default)) {\n      return false;\n    }\n\n    const next = this.nextTokenStart();\n    const hasFrom = this.isUnparsedContextual(next, \"from\");\n    if (\n      this.input.charCodeAt(next) === charCodes.comma ||\n      (tokenIsIdentifier(this.state.type) && hasFrom)\n    ) {\n      return true;\n    }\n    // lookahead again when `export default from` is seen\n    if (this.match(tt._default) && hasFrom) {\n      const nextAfterFrom = this.input.charCodeAt(\n        this.nextTokenStartSince(next + 4),\n      );\n      return (\n        nextAfterFrom === charCodes.quotationMark ||\n        nextAfterFrom === charCodes.apostrophe\n      );\n    }\n    return false;\n  }\n\n  parseExportFrom(\n    this: Parser,\n    node: Undone<N.ExportNamedDeclaration | N.ExportAllDeclaration>,\n    expect?: boolean,\n  ): void {\n    if (this.eatContextual(tt._from)) {\n      node.source = this.parseImportSource();\n      this.checkExport(node);\n      this.maybeParseImportAttributes(node);\n      this.checkJSONModuleImport(node);\n    } else if (expect) {\n      this.unexpected();\n    }\n\n    this.semicolon();\n  }\n\n  shouldParseExportDeclaration(): boolean {\n    const { type } = this.state;\n    if (type === tt.at) {\n      this.expectOnePlugin([\"decorators\", \"decorators-legacy\"]);\n      if (this.hasPlugin(\"decorators\")) {\n        if (\n          this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\") === true\n        ) {\n          this.raise(Errors.DecoratorBeforeExport, this.state.startLoc);\n        }\n\n        return true;\n      }\n    }\n\n    if (this.isUsing()) {\n      this.raise(Errors.UsingDeclarationExport, this.state.startLoc);\n      return true;\n    }\n\n    if (this.isAwaitUsing()) {\n      this.raise(Errors.UsingDeclarationExport, this.state.startLoc);\n      return true;\n    }\n\n    return (\n      type === tt._var ||\n      type === tt._const ||\n      type === tt._function ||\n      type === tt._class ||\n      this.isLet() ||\n      this.isAsyncFunction()\n    );\n  }\n\n  checkExport(\n    node: Undone<\n      | N.ExportNamedDeclaration\n      | N.ExportAllDeclaration\n      | N.ExportDefaultDeclaration\n    >,\n    checkNames?: boolean,\n    isDefault?: boolean,\n    isFrom?: boolean,\n  ): void {\n    if (checkNames) {\n      // Check for duplicate exports\n      if (isDefault) {\n        // Default exports\n        this.checkDuplicateExports(node, \"default\");\n        if (this.hasPlugin(\"exportDefaultFrom\")) {\n          const declaration = (node as any as N.ExportDefaultDeclaration)\n            .declaration;\n          if (\n            declaration.type === \"Identifier\" &&\n            declaration.name === \"from\" &&\n            declaration.end - declaration.start === 4 && // does not contain escape\n            !declaration.extra?.parenthesized\n          ) {\n            this.raise(Errors.ExportDefaultFromAsIdentifier, declaration);\n          }\n        }\n        // @ts-expect-error node.specifiers may not exist\n      } else if (node.specifiers?.length) {\n        // Named exports\n        // @ts-expect-error node.specifiers may not exist\n        for (const specifier of node.specifiers) {\n          const { exported } = specifier;\n          const exportName =\n            exported.type === \"Identifier\" ? exported.name : exported.value;\n          this.checkDuplicateExports(specifier, exportName);\n          if (!isFrom && specifier.local) {\n            const { local } = specifier;\n            if (local.type !== \"Identifier\") {\n              this.raise(Errors.ExportBindingIsString, specifier, {\n                localName: local.value,\n                exportName,\n              });\n            } else {\n              // check for keywords used as local names\n              this.checkReservedWord(local.name, local.loc.start, true, false);\n              // check if export is defined\n              this.scope.checkLocalExport(local);\n            }\n          }\n        }\n      } else if ((node as Undone<N.ExportNamedDeclaration>).declaration) {\n        const decl = (node as Undone<N.ExportNamedDeclaration>).declaration;\n        // Exported declarations\n        if (\n          decl.type === \"FunctionDeclaration\" ||\n          decl.type === \"ClassDeclaration\"\n        ) {\n          const { id } = decl;\n          if (!id) throw new Error(\"Assertion failure\");\n\n          this.checkDuplicateExports(node, id.name);\n        } else if (decl.type === \"VariableDeclaration\") {\n          for (const declaration of decl.declarations) {\n            this.checkDeclaration(declaration.id);\n          }\n        }\n      }\n    }\n  }\n\n  checkDeclaration(node: N.Pattern | N.ObjectProperty): void {\n    if (node.type === \"Identifier\") {\n      this.checkDuplicateExports(node, node.name);\n    } else if (node.type === \"ObjectPattern\") {\n      for (const prop of node.properties) {\n        this.checkDeclaration(prop);\n      }\n    } else if (node.type === \"ArrayPattern\") {\n      for (const elem of node.elements) {\n        if (elem) {\n          this.checkDeclaration(elem);\n        }\n      }\n    } else if (node.type === \"ObjectProperty\") {\n      // @ts-expect-error migrate to Babel types\n      this.checkDeclaration(node.value);\n    } else if (node.type === \"RestElement\") {\n      this.checkDeclaration(node.argument);\n    } else if (node.type === \"AssignmentPattern\") {\n      this.checkDeclaration(node.left);\n    }\n  }\n\n  checkDuplicateExports(\n    node: Undone<\n      | N.Identifier\n      | N.StringLiteral\n      | N.ExportNamedDeclaration\n      | N.ExportSpecifier\n      | N.ExportDefaultSpecifier\n    >,\n    exportName: string,\n  ): void {\n    if (this.exportedIdentifiers.has(exportName)) {\n      if (exportName === \"default\") {\n        this.raise(Errors.DuplicateDefaultExport, node);\n      } else {\n        this.raise(Errors.DuplicateExport, node, { exportName });\n      }\n    }\n    this.exportedIdentifiers.add(exportName);\n  }\n\n  // Parses a comma-separated list of module exports.\n\n  parseExportSpecifiers(isInTypeExport: boolean): Array<N.ExportSpecifier> {\n    const nodes = [];\n    let first = true;\n\n    // export { x, y as z } [from '...']\n    this.expect(tt.braceL);\n\n    while (!this.eat(tt.braceR)) {\n      if (first) {\n        first = false;\n      } else {\n        this.expect(tt.comma);\n        if (this.eat(tt.braceR)) break;\n      }\n      const isMaybeTypeOnly = this.isContextual(tt._type);\n      const isString = this.match(tt.string);\n      const node = this.startNode<N.ExportSpecifier>();\n      node.local = this.parseModuleExportName() as N.Identifier;\n      nodes.push(\n        this.parseExportSpecifier(\n          node,\n          isString,\n          isInTypeExport,\n          isMaybeTypeOnly,\n        ),\n      );\n    }\n\n    return nodes;\n  }\n\n  parseExportSpecifier(\n    node: any,\n    isString: boolean,\n    /* eslint-disable @typescript-eslint/no-unused-vars -- used in TypeScript parser */\n    isInTypeExport: boolean,\n    isMaybeTypeOnly: boolean,\n    /* eslint-enable @typescript-eslint/no-unused-vars */\n  ): N.ExportSpecifier {\n    if (this.eatContextual(tt._as)) {\n      node.exported = this.parseModuleExportName();\n    } else if (isString) {\n      node.exported = this.cloneStringLiteral(node.local);\n    } else if (!node.exported) {\n      node.exported = this.cloneIdentifier(node.local);\n    }\n    return this.finishNode<N.ExportSpecifier>(node, \"ExportSpecifier\");\n  }\n\n  // https://tc39.es/ecma262/#prod-ModuleExportName\n  parseModuleExportName(): N.StringLiteral | N.Identifier {\n    if (this.match(tt.string)) {\n      const result = this.parseStringLiteral(this.state.value);\n      const surrogate = loneSurrogate.exec(result.value);\n      if (surrogate) {\n        this.raise(Errors.ModuleExportNameHasLoneSurrogate, result, {\n          surrogateCharCode: surrogate[0].charCodeAt(0),\n        });\n      }\n      return result;\n    }\n    return this.parseIdentifier(true);\n  }\n\n  isJSONModuleImport(\n    node: Undone<\n      N.ExportAllDeclaration | N.ExportNamedDeclaration | N.ImportDeclaration\n    >,\n  ): boolean {\n    if (node.assertions != null) {\n      return node.assertions.some(({ key, value }) => {\n        return (\n          value.value === \"json\" &&\n          (key.type === \"Identifier\"\n            ? key.name === \"type\"\n            : key.value === \"type\")\n        );\n      });\n    }\n    return false;\n  }\n\n  checkImportReflection(node: Undone<N.ImportDeclaration>) {\n    const { specifiers } = node;\n    const singleBindingType =\n      specifiers.length === 1 ? specifiers[0].type : null;\n\n    if (node.phase === \"source\") {\n      if (singleBindingType !== \"ImportDefaultSpecifier\") {\n        this.raise(\n          Errors.SourcePhaseImportRequiresDefault,\n          specifiers[0].loc.start,\n        );\n      }\n    } else if (node.phase === \"defer\") {\n      if (singleBindingType !== \"ImportNamespaceSpecifier\") {\n        this.raise(\n          Errors.DeferImportRequiresNamespace,\n          specifiers[0].loc.start,\n        );\n      }\n    } else if (node.module) {\n      if (singleBindingType !== \"ImportDefaultSpecifier\") {\n        this.raise(Errors.ImportReflectionNotBinding, specifiers[0].loc.start);\n      }\n      if (node.assertions?.length > 0) {\n        this.raise(\n          Errors.ImportReflectionHasAssertion,\n          specifiers[0].loc.start,\n        );\n      }\n    }\n  }\n\n  checkJSONModuleImport(\n    node: Undone<\n      N.ExportAllDeclaration | N.ExportNamedDeclaration | N.ImportDeclaration\n    >,\n  ) {\n    // @ts-expect-error Fixme: node.type must be undefined because they are undone\n    if (this.isJSONModuleImport(node) && node.type !== \"ExportAllDeclaration\") {\n      // @ts-expect-error specifiers may not index node\n      const { specifiers } = node;\n      if (specifiers != null) {\n        // @ts-expect-error refine specifier types\n        const nonDefaultNamedSpecifier = specifiers.find(specifier => {\n          let imported;\n          if (specifier.type === \"ExportSpecifier\") {\n            imported = specifier.local;\n          } else if (specifier.type === \"ImportSpecifier\") {\n            imported = specifier.imported;\n          }\n          if (imported !== undefined) {\n            return imported.type === \"Identifier\"\n              ? imported.name !== \"default\"\n              : imported.value !== \"default\";\n          }\n        });\n        if (nonDefaultNamedSpecifier !== undefined) {\n          this.raise(\n            Errors.ImportJSONBindingNotDefault,\n            nonDefaultNamedSpecifier.loc.start,\n          );\n        }\n      }\n    }\n  }\n\n  isPotentialImportPhase(isExport: boolean): boolean {\n    if (isExport) return false;\n    return (\n      this.isContextual(tt._source) ||\n      this.isContextual(tt._defer) ||\n      (!process.env.BABEL_8_BREAKING && this.isContextual(tt._module))\n    );\n  }\n\n  applyImportPhase(\n    node: Undone<N.ImportDeclaration | N.ExportNamedDeclaration>,\n    isExport: boolean,\n    phase: string | null,\n    loc?: Position,\n  ): void {\n    if (isExport) {\n      if (!process.env.IS_PUBLISH) {\n        if (\n          (!process.env.BABEL_8_BREAKING && phase === \"module\") ||\n          phase === \"source\"\n        ) {\n          throw new Error(\n            `Assertion failure: export declarations do not support the '${phase}' phase.`,\n          );\n        }\n      }\n      return;\n    }\n\n    if (!process.env.BABEL_8_BREAKING && phase === \"module\") {\n      this.expectPlugin(\"importReflection\", loc);\n      (node as N.ImportDeclaration).module = true;\n    } else if (this.hasPlugin(\"importReflection\")) {\n      (node as N.ImportDeclaration).module = false;\n    }\n\n    if (phase === \"source\") {\n      this.expectPlugin(\"sourcePhaseImports\", loc);\n      (node as N.ImportDeclaration).phase = \"source\";\n    } else if (phase === \"defer\") {\n      this.expectPlugin(\"deferredImportEvaluation\", loc);\n      (node as N.ImportDeclaration).phase = \"defer\";\n    } else if (this.hasPlugin(\"sourcePhaseImports\")) {\n      (node as N.ImportDeclaration).phase = null;\n    }\n  }\n\n  /*\n   * Parse `source` in `import source x from \"x\"`, disambiguating\n   * `import source from \"x\"` and `import source from from \"x\"`.\n   *\n   * This function might return an identifier representing the `source`\n   * if it eats `source` and then discovers that it was the default import\n   * binding and not the import reflection.\n   *\n   * This function is also used to parse `import type` and `import typeof`\n   * in the TS and Flow plugins, and for parsing `import defer`.\n   */\n  parseMaybeImportPhase(\n    node: Undone<N.ImportDeclaration | N.TsImportEqualsDeclaration>,\n    isExport: boolean,\n  ): N.Identifier | null {\n    if (!this.isPotentialImportPhase(isExport)) {\n      this.applyImportPhase(\n        node as Undone<N.ImportDeclaration>,\n        isExport,\n        null,\n      );\n      return null;\n    }\n\n    const phaseIdentifier = this.startNode<N.Identifier>();\n    const phaseIdentifierName = this.parseIdentifierName(true);\n\n    const { type } = this.state;\n    const isImportPhase = tokenIsKeywordOrIdentifier(type)\n      ? // OK: import <phase> x from \"foo\";\n        // OK: import <phase> from from \"foo\";\n        // NO: import <phase> from \"foo\";\n        // NO: import <phase> from 'foo';\n        // With the module declarations proposals, we will need further disambiguation\n        // for `import module from from;`.\n        type !== tt._from || this.lookaheadCharCode() === charCodes.lowercaseF\n      : // OK: import <phase> { x } from \"foo\";\n        // OK: import <phase> x from \"foo\";\n        // OK: import <phase> * as T from \"foo\";\n        // NO: import <phase> from \"foo\";\n        // OK: import <phase> \"foo\";\n        // The last one is invalid, we will continue parsing and throw\n        // an error later\n        type !== tt.comma;\n\n    if (isImportPhase) {\n      this.applyImportPhase(\n        node as Undone<N.ImportDeclaration>,\n        isExport,\n        phaseIdentifierName,\n        phaseIdentifier.loc.start,\n      );\n      return null;\n    } else {\n      this.applyImportPhase(\n        node as Undone<N.ImportDeclaration>,\n        isExport,\n        null,\n      );\n      // `<phase>` is a default binding, return it to the main import declaration parser\n      return this.createIdentifier(phaseIdentifier, phaseIdentifierName);\n    }\n  }\n\n  isPrecedingIdImportPhase(\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    phase: string,\n  ) {\n    const { type } = this.state;\n    return tokenIsIdentifier(type)\n      ? // OK: import <phase> x from \"foo\";\n        // OK: import <phase> from from \"foo\";\n        // NO: import <phase> from \"foo\";\n        // NO: import <phase> from 'foo';\n        // With the module declarations proposals, we will need further disambiguation\n        // for `import module from from;`.\n        type !== tt._from || this.lookaheadCharCode() === charCodes.lowercaseF\n      : // OK: import <phase> { x } from \"foo\";\n        // OK: import <phase> x from \"foo\";\n        // OK: import <phase> * as T from \"foo\";\n        // NO: import <phase> from \"foo\";\n        // OK: import <phase> \"foo\";\n        // The last one is invalid, we will continue parsing and throw\n        // an error later\n        type !== tt.comma;\n  }\n\n  // Parses import declaration.\n  // https://tc39.es/ecma262/#prod-ImportDeclaration\n\n  parseImport(this: Parser, node: Undone<N.ImportDeclaration>): N.AnyImport {\n    if (this.match(tt.string)) {\n      // import '...'\n      return this.parseImportSourceAndAttributes(node);\n    }\n\n    return this.parseImportSpecifiersAndAfter(\n      node,\n      this.parseMaybeImportPhase(node, /* isExport */ false),\n    );\n  }\n\n  parseImportSpecifiersAndAfter(\n    this: Parser,\n    node: Undone<N.ImportDeclaration>,\n    maybeDefaultIdentifier: N.Identifier | null,\n  ): N.AnyImport {\n    node.specifiers = [];\n\n    // check if we have a default import like\n    // import React from \"react\";\n    const hasDefault = this.maybeParseDefaultImportSpecifier(\n      node,\n      maybeDefaultIdentifier,\n    );\n    /* we are checking if we do not have a default import, then it is obvious that we need named imports\n     * import { get } from \"axios\";\n     * but if we do have a default import\n     * we need to check if we have a comma after that and\n     * that is where this `|| this.eat` condition comes into play\n     */\n    const parseNext = !hasDefault || this.eat(tt.comma);\n    // if we do have to parse the next set of specifiers, we first check for star imports\n    // import React, * from \"react\";\n    const hasStar = parseNext && this.maybeParseStarImportSpecifier(node);\n    // now we check if we need to parse the next imports\n    // but only if they are not importing * (everything)\n    if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node);\n    this.expectContextual(tt._from);\n\n    return this.parseImportSourceAndAttributes(node);\n  }\n\n  parseImportSourceAndAttributes(\n    this: Parser,\n    node: Undone<N.ImportDeclaration>,\n  ): N.AnyImport {\n    node.specifiers ??= [];\n    node.source = this.parseImportSource();\n    this.maybeParseImportAttributes(node);\n    this.checkImportReflection(node);\n    this.checkJSONModuleImport(node);\n\n    this.semicolon();\n    this.sawUnambiguousESM = true;\n    return this.finishNode(node, \"ImportDeclaration\");\n  }\n\n  parseImportSource(this: Parser): N.StringLiteral {\n    if (!this.match(tt.string)) this.unexpected();\n    return this.parseExprAtom() as N.StringLiteral;\n  }\n\n  parseImportSpecifierLocal<\n    T extends\n      | N.ImportSpecifier\n      | N.ImportDefaultSpecifier\n      | N.ImportNamespaceSpecifier,\n  >(\n    node: Undone<N.ImportDeclaration>,\n    specifier: Undone<T>,\n    type: T[\"type\"],\n  ): void {\n    specifier.local = this.parseIdentifier();\n    node.specifiers.push(this.finishImportSpecifier(specifier, type));\n  }\n\n  finishImportSpecifier<\n    T extends\n      | N.ImportSpecifier\n      | N.ImportDefaultSpecifier\n      | N.ImportNamespaceSpecifier,\n  >(\n    specifier: Undone<T>,\n    type: T[\"type\"],\n    bindingType: BindingFlag = BindingFlag.TYPE_LEXICAL,\n  ) {\n    this.checkLVal(specifier.local, { type }, bindingType);\n    return this.finishNode(specifier, type);\n  }\n\n  /**\n   * parse assert entries\n   *\n   * @see {@link https://tc39.es/proposal-import-attributes/#prod-WithEntries WithEntries}\n   */\n  parseImportAttributes(): N.ImportAttribute[] {\n    this.expect(tt.braceL);\n\n    const attrs = [];\n    const attrNames = new Set();\n\n    do {\n      if (this.match(tt.braceR)) {\n        break;\n      }\n\n      const node = this.startNode<N.ImportAttribute>();\n\n      // parse AssertionKey : IdentifierName, StringLiteral\n      const keyName = this.state.value;\n      // check if we already have an entry for an attribute\n      // if a duplicate entry is found, throw an error\n      // for now this logic will come into play only when someone declares `type` twice\n      if (attrNames.has(keyName)) {\n        this.raise(\n          Errors.ModuleAttributesWithDuplicateKeys,\n          this.state.startLoc,\n          {\n            key: keyName,\n          },\n        );\n      }\n      attrNames.add(keyName);\n      if (this.match(tt.string)) {\n        node.key = this.parseStringLiteral(keyName);\n      } else {\n        node.key = this.parseIdentifier(true);\n      }\n      this.expect(tt.colon);\n\n      if (!this.match(tt.string)) {\n        throw this.raise(\n          Errors.ModuleAttributeInvalidValue,\n          this.state.startLoc,\n        );\n      }\n      node.value = this.parseStringLiteral(this.state.value);\n      attrs.push(this.finishNode(node, \"ImportAttribute\"));\n    } while (this.eat(tt.comma));\n\n    this.expect(tt.braceR);\n\n    return attrs;\n  }\n\n  /**\n   * parse module attributes\n   * @deprecated It will be removed in Babel 8\n   */\n  parseModuleAttributes() {\n    const attrs: N.ImportAttribute[] = [];\n    const attributes = new Set();\n    do {\n      const node = this.startNode<N.ImportAttribute>();\n      node.key = this.parseIdentifier(true);\n\n      if (node.key.name !== \"type\") {\n        this.raise(Errors.ModuleAttributeDifferentFromType, node.key);\n      }\n\n      if (attributes.has(node.key.name)) {\n        this.raise(Errors.ModuleAttributesWithDuplicateKeys, node.key, {\n          key: node.key.name,\n        });\n      }\n      attributes.add(node.key.name);\n      this.expect(tt.colon);\n      if (!this.match(tt.string)) {\n        throw this.raise(\n          Errors.ModuleAttributeInvalidValue,\n          this.state.startLoc,\n        );\n      }\n      node.value = this.parseStringLiteral(this.state.value);\n      attrs.push(this.finishNode(node, \"ImportAttribute\"));\n    } while (this.eat(tt.comma));\n\n    return attrs;\n  }\n\n  maybeParseImportAttributes(\n    node: Undone<\n      N.ImportDeclaration | N.ExportNamedDeclaration | N.ExportAllDeclaration\n    >,\n  ) {\n    let attributes: N.ImportAttribute[];\n    if (!process.env.BABEL_8_BREAKING) {\n      // eslint-disable-next-line no-var\n      var useWith = false;\n    }\n\n    // https://tc39.es/proposal-import-attributes/#prod-WithClause\n    if (this.match(tt._with)) {\n      if (\n        this.hasPrecedingLineBreak() &&\n        this.lookaheadCharCode() === charCodes.leftParenthesis\n      ) {\n        // This will be parsed as a with statement, and we will throw a\n        // better error about it not being supported in strict mode.\n        return;\n      }\n\n      this.next(); // eat `with`\n\n      if (!process.env.BABEL_8_BREAKING && this.hasPlugin(\"moduleAttributes\")) {\n        attributes = this.parseModuleAttributes();\n        this.addExtra(node, \"deprecatedWithLegacySyntax\", true);\n      } else {\n        attributes = this.parseImportAttributes();\n      }\n      if (!process.env.BABEL_8_BREAKING) {\n        useWith = true;\n      }\n    } else if (this.isContextual(tt._assert) && !this.hasPrecedingLineBreak()) {\n      if (\n        !this.hasPlugin(\"deprecatedImportAssert\") &&\n        (process.env.BABEL_8_BREAKING || !this.hasPlugin(\"importAssertions\"))\n      ) {\n        this.raise(Errors.ImportAttributesUseAssert, this.state.startLoc);\n      }\n      if (process.env.BABEL_8_BREAKING || !this.hasPlugin(\"importAssertions\")) {\n        this.addExtra(node, \"deprecatedAssertSyntax\", true);\n      }\n      this.next(); // eat `assert`\n      attributes = this.parseImportAttributes();\n    } else {\n      attributes = [];\n    }\n\n    if (\n      !process.env.BABEL_8_BREAKING &&\n      !useWith &&\n      this.hasPlugin(\"importAssertions\")\n    ) {\n      node.assertions = attributes;\n    } else {\n      node.attributes = attributes;\n    }\n  }\n\n  maybeParseDefaultImportSpecifier(\n    node: Undone<N.ImportDeclaration>,\n    maybeDefaultIdentifier: N.Identifier | null,\n  ): boolean {\n    // import defaultObj, { x, y as z } from '...'\n    if (maybeDefaultIdentifier) {\n      const specifier = this.startNodeAtNode<N.ImportDefaultSpecifier>(\n        maybeDefaultIdentifier,\n      );\n      specifier.local = maybeDefaultIdentifier;\n      node.specifiers.push(\n        this.finishImportSpecifier(specifier, \"ImportDefaultSpecifier\"),\n      );\n      return true;\n    } else if (\n      // We allow keywords, and parseImportSpecifierLocal will report a recoverable error\n      tokenIsKeywordOrIdentifier(this.state.type)\n    ) {\n      this.parseImportSpecifierLocal(\n        node,\n        this.startNode<N.ImportDefaultSpecifier>(),\n        \"ImportDefaultSpecifier\",\n      );\n      return true;\n    }\n    return false;\n  }\n\n  maybeParseStarImportSpecifier(node: Undone<N.ImportDeclaration>): boolean {\n    if (this.match(tt.star)) {\n      const specifier = this.startNode<N.ImportNamespaceSpecifier>();\n      this.next();\n      this.expectContextual(tt._as);\n\n      this.parseImportSpecifierLocal(\n        node,\n        specifier,\n        \"ImportNamespaceSpecifier\",\n      );\n      return true;\n    }\n    return false;\n  }\n\n  parseNamedImportSpecifiers(node: Undone<N.ImportDeclaration>) {\n    let first = true;\n    this.expect(tt.braceL);\n    while (!this.eat(tt.braceR)) {\n      if (first) {\n        first = false;\n      } else {\n        // Detect an attempt to deep destructure\n        if (this.eat(tt.colon)) {\n          throw this.raise(Errors.DestructureNamedImport, this.state.startLoc);\n        }\n\n        this.expect(tt.comma);\n        if (this.eat(tt.braceR)) break;\n      }\n\n      const specifier = this.startNode<N.ImportSpecifier>();\n      const importedIsString = this.match(tt.string);\n      const isMaybeTypeOnly = this.isContextual(tt._type);\n      specifier.imported = this.parseModuleExportName();\n      const importSpecifier = this.parseImportSpecifier(\n        specifier,\n        importedIsString,\n        node.importKind === \"type\" || node.importKind === \"typeof\",\n        isMaybeTypeOnly,\n        undefined,\n      );\n      node.specifiers.push(importSpecifier);\n    }\n  }\n\n  // https://tc39.es/ecma262/#prod-ImportSpecifier\n  parseImportSpecifier(\n    specifier: Undone<N.ImportSpecifier>,\n    importedIsString: boolean,\n    /* used in TypeScript and Flow parser */\n    isInTypeOnlyImport: boolean,\n    isMaybeTypeOnly: boolean,\n    bindingType: BindingFlag | undefined,\n  ): N.ImportSpecifier {\n    if (this.eatContextual(tt._as)) {\n      specifier.local = this.parseIdentifier();\n    } else {\n      const { imported } = specifier;\n      if (importedIsString) {\n        throw this.raise(Errors.ImportBindingIsString, specifier, {\n          importName: (imported as N.StringLiteral).value,\n        });\n      }\n      this.checkReservedWord(\n        (imported as N.Identifier).name,\n        specifier.loc.start,\n        true,\n        true,\n      );\n      if (!specifier.local) {\n        specifier.local = this.cloneIdentifier(imported as N.Identifier);\n      }\n    }\n    return this.finishImportSpecifier(\n      specifier,\n      \"ImportSpecifier\",\n      bindingType,\n    );\n  }\n\n  // This is used in flow and typescript plugin\n  // Determine whether a parameter is a this param\n  isThisParam(\n    param: N.Pattern | N.Identifier | N.TSParameterProperty,\n  ): boolean {\n    return param.type === \"Identifier\" && param.name === \"this\";\n  }\n}\n","import type { Options } from \"../options.ts\";\nimport type * as N from \"../types.ts\";\nimport { getOptions, OptionFlags } from \"../options.ts\";\nimport StatementParser from \"./statement.ts\";\nimport ScopeHandler from \"../util/scope.ts\";\n\nexport type PluginsMap = Map<\n  string,\n  {\n    [x: string]: any;\n  }\n>;\n\nexport default class Parser extends StatementParser {\n  // Forward-declaration so typescript plugin can override jsx plugin\n  // todo(flow->ts) - this probably can be removed\n  // abstract jsxParseOpeningElementAfterName(\n  //   node: N.JSXOpeningElement,\n  // ): N.JSXOpeningElement;\n\n  constructor(\n    options: Options | undefined | null,\n    input: string,\n    pluginsMap: PluginsMap,\n  ) {\n    options = getOptions(options);\n    super(options, input);\n\n    this.options = options;\n    this.initializeScopes();\n    this.plugins = pluginsMap;\n    this.filename = options.sourceFilename;\n    this.startIndex = options.startIndex;\n\n    let optionFlags = 0;\n    if (options.allowAwaitOutsideFunction) {\n      optionFlags |= OptionFlags.AllowAwaitOutsideFunction;\n    }\n    if (options.allowReturnOutsideFunction) {\n      optionFlags |= OptionFlags.AllowReturnOutsideFunction;\n    }\n    if (options.allowImportExportEverywhere) {\n      optionFlags |= OptionFlags.AllowImportExportEverywhere;\n    }\n    if (options.allowSuperOutsideMethod) {\n      optionFlags |= OptionFlags.AllowSuperOutsideMethod;\n    }\n    if (options.allowUndeclaredExports) {\n      optionFlags |= OptionFlags.AllowUndeclaredExports;\n    }\n    if (options.allowNewTargetOutsideFunction) {\n      optionFlags |= OptionFlags.AllowNewTargetOutsideFunction;\n    }\n    if (options.allowYieldOutsideFunction) {\n      optionFlags |= OptionFlags.AllowYieldOutsideFunction;\n    }\n    if (options.ranges) {\n      optionFlags |= OptionFlags.Ranges;\n    }\n    if (options.tokens) {\n      optionFlags |= OptionFlags.Tokens;\n    }\n    if (options.createImportExpressions) {\n      optionFlags |= OptionFlags.CreateImportExpressions;\n    }\n    if (options.createParenthesizedExpressions) {\n      optionFlags |= OptionFlags.CreateParenthesizedExpressions;\n    }\n    if (options.errorRecovery) {\n      optionFlags |= OptionFlags.ErrorRecovery;\n    }\n    if (options.attachComment) {\n      optionFlags |= OptionFlags.AttachComment;\n    }\n    if (options.annexB) {\n      optionFlags |= OptionFlags.AnnexB;\n    }\n\n    this.optionFlags = optionFlags;\n  }\n\n  // This can be overwritten, for example, by the TypeScript plugin.\n  getScopeHandler(): new (...args: any) => ScopeHandler {\n    return ScopeHandler;\n  }\n\n  parse(): N.File {\n    this.enterInitialScopes();\n    const file = this.startNode<N.File>();\n    const program = this.startNode<N.Program>();\n    this.nextToken();\n    file.errors = null;\n    this.parseTopLevel(file, program);\n    file.errors = this.state.errors;\n    file.comments.length = this.state.commentsLen;\n    return file as N.File;\n  }\n}\n","import type { Options } from \"./options.ts\";\nimport {\n  validatePlugins,\n  mixinPluginNames,\n  mixinPlugins,\n} from \"./plugin-utils.ts\";\nexport type {\n  PluginConfig as ParserPlugin,\n  DecoratorsPluginOptions,\n  FlowPluginOptions,\n  PipelineOperatorPluginOptions,\n  RecordAndTuplePluginOptions,\n  TypeScriptPluginOptions,\n} from \"./typings.ts\";\nimport Parser, { type PluginsMap } from \"./parser/index.ts\";\n\nimport type { ExportedTokenType } from \"./tokenizer/types.ts\";\nimport {\n  getExportedToken,\n  tt as internalTokenTypes,\n  type InternalTokenTypes,\n} from \"./tokenizer/types.ts\";\nexport type { Token } from \"./tokenizer/index.ts\";\n\n// TODO: Rather than type-casting the internal AST definitions to the\n// @babel/types one, we should actually unify them.\nimport type { Expression, File } from \"@babel/types\";\nexport type { Expression, File };\n\nexport type ParserOptions = Partial<Options>;\n\nexport interface ParseError {\n  code: string;\n  reasonCode: string;\n}\nexport type ParseResult<Result extends File | Expression = File> = Result & {\n  errors: null | ParseError[];\n};\n\n/**\n * Parse the provided code as an entire ECMAScript program.\n */\nexport function parse(\n  input: string,\n  options?: ParserOptions,\n): ParseResult<File> {\n  if (options?.sourceType === \"unambiguous\") {\n    options = {\n      ...options,\n    };\n    try {\n      options.sourceType = \"module\";\n      const parser = getParser(options, input);\n      const ast = parser.parse();\n\n      if (parser.sawUnambiguousESM) {\n        return ast as unknown as ParseResult<File>;\n      }\n\n      if (parser.ambiguousScriptDifferentAst) {\n        // Top level await introduces code which can be both a valid script and\n        // a valid module, but which produces different ASTs:\n        //    await\n        //    0\n        // can be parsed either as an AwaitExpression, or as two ExpressionStatements.\n        try {\n          options.sourceType = \"script\";\n          return getParser(\n            options,\n            input,\n          ).parse() as unknown as ParseResult<File>;\n        } catch {}\n      } else {\n        // This is both a valid module and a valid script, but\n        // we parse it as a script by default\n        ast.program.sourceType = \"script\";\n      }\n\n      return ast as unknown as ParseResult<File>;\n    } catch (moduleError) {\n      try {\n        options.sourceType = \"script\";\n        return getParser(\n          options,\n          input,\n        ).parse() as unknown as ParseResult<File>;\n      } catch {}\n\n      throw moduleError;\n    }\n  } else {\n    return getParser(options, input).parse() as unknown as ParseResult<File>;\n  }\n}\n\nexport function parseExpression(\n  input: string,\n  options?: ParserOptions,\n): ParseResult<Expression> {\n  const parser = getParser(options, input);\n  if (parser.options.strictMode) {\n    parser.state.strict = true;\n  }\n  return parser.getExpression() as unknown as ParseResult<Expression>;\n}\n\nfunction generateExportedTokenTypes(\n  internalTokenTypes: InternalTokenTypes,\n): Record<string, ExportedTokenType> {\n  const tokenTypes: Record<string, ExportedTokenType> = {};\n  for (const typeName of Object.keys(\n    internalTokenTypes,\n  ) as (keyof InternalTokenTypes)[]) {\n    tokenTypes[typeName] = getExportedToken(internalTokenTypes[typeName]);\n  }\n  return tokenTypes;\n}\n\nexport const tokTypes = generateExportedTokenTypes(internalTokenTypes);\n\nfunction getParser(options: Options | undefined | null, input: string): Parser {\n  let cls = Parser;\n  const pluginsMap: PluginsMap = new Map();\n  if (options?.plugins) {\n    for (const plugin of options.plugins) {\n      let name, opts;\n      if (typeof plugin === \"string\") {\n        name = plugin;\n      } else {\n        [name, opts] = plugin;\n      }\n      if (!pluginsMap.has(name)) {\n        pluginsMap.set(name, opts || {});\n      }\n    }\n    validatePlugins(pluginsMap);\n    cls = getParserClass(pluginsMap);\n  }\n\n  return new cls(options, input, pluginsMap);\n}\n\nconst parserClassCache = new Map<string, new (...args: any) => Parser>();\n\n/** Get a Parser class with plugins applied. */\nfunction getParserClass(\n  pluginsMap: Map<string, any>,\n): new (...args: any) => Parser {\n  const pluginList = [];\n  for (const name of mixinPluginNames) {\n    if (pluginsMap.has(name)) {\n      pluginList.push(name);\n    }\n  }\n  const key = pluginList.join(\"|\");\n  let cls = parserClassCache.get(key);\n  if (!cls) {\n    cls = Parser;\n    for (const plugin of pluginList) {\n      // @ts-expect-error todo(flow->ts)\n      cls = mixinPlugins[plugin](cls);\n    }\n    parserClassCache.set(key, cls);\n  }\n  return cls;\n}\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\t(global = global || self, factory(global.estreeWalker = {}));\n}(this, (function (exports) { 'use strict';\n\n\t// @ts-check\n\t/** @typedef { import('estree').BaseNode} BaseNode */\n\n\t/** @typedef {{\n\t\tskip: () => void;\n\t\tremove: () => void;\n\t\treplace: (node: BaseNode) => void;\n\t}} WalkerContext */\n\n\tclass WalkerBase {\n\t\tconstructor() {\n\t\t\t/** @type {boolean} */\n\t\t\tthis.should_skip = false;\n\n\t\t\t/** @type {boolean} */\n\t\t\tthis.should_remove = false;\n\n\t\t\t/** @type {BaseNode | null} */\n\t\t\tthis.replacement = null;\n\n\t\t\t/** @type {WalkerContext} */\n\t\t\tthis.context = {\n\t\t\t\tskip: () => (this.should_skip = true),\n\t\t\t\tremove: () => (this.should_remove = true),\n\t\t\t\treplace: (node) => (this.replacement = node)\n\t\t\t};\n\t\t}\n\n\t\t/**\n\t\t *\n\t\t * @param {any} parent\n\t\t * @param {string} prop\n\t\t * @param {number} index\n\t\t * @param {BaseNode} node\n\t\t */\n\t\treplace(parent, prop, index, node) {\n\t\t\tif (parent) {\n\t\t\t\tif (index !== null) {\n\t\t\t\t\tparent[prop][index] = node;\n\t\t\t\t} else {\n\t\t\t\t\tparent[prop] = node;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t *\n\t\t * @param {any} parent\n\t\t * @param {string} prop\n\t\t * @param {number} index\n\t\t */\n\t\tremove(parent, prop, index) {\n\t\t\tif (parent) {\n\t\t\t\tif (index !== null) {\n\t\t\t\t\tparent[prop].splice(index, 1);\n\t\t\t\t} else {\n\t\t\t\t\tdelete parent[prop];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// @ts-check\n\n\t/** @typedef { import('estree').BaseNode} BaseNode */\n\t/** @typedef { import('./walker.js').WalkerContext} WalkerContext */\n\n\t/** @typedef {(\n\t *    this: WalkerContext,\n\t *    node: BaseNode,\n\t *    parent: BaseNode,\n\t *    key: string,\n\t *    index: number\n\t * ) => void} SyncHandler */\n\n\tclass SyncWalker extends WalkerBase {\n\t\t/**\n\t\t *\n\t\t * @param {SyncHandler} enter\n\t\t * @param {SyncHandler} leave\n\t\t */\n\t\tconstructor(enter, leave) {\n\t\t\tsuper();\n\n\t\t\t/** @type {SyncHandler} */\n\t\t\tthis.enter = enter;\n\n\t\t\t/** @type {SyncHandler} */\n\t\t\tthis.leave = leave;\n\t\t}\n\n\t\t/**\n\t\t *\n\t\t * @param {BaseNode} node\n\t\t * @param {BaseNode} parent\n\t\t * @param {string} [prop]\n\t\t * @param {number} [index]\n\t\t * @returns {BaseNode}\n\t\t */\n\t\tvisit(node, parent, prop, index) {\n\t\t\tif (node) {\n\t\t\t\tif (this.enter) {\n\t\t\t\t\tconst _should_skip = this.should_skip;\n\t\t\t\t\tconst _should_remove = this.should_remove;\n\t\t\t\t\tconst _replacement = this.replacement;\n\t\t\t\t\tthis.should_skip = false;\n\t\t\t\t\tthis.should_remove = false;\n\t\t\t\t\tthis.replacement = null;\n\n\t\t\t\t\tthis.enter.call(this.context, node, parent, prop, index);\n\n\t\t\t\t\tif (this.replacement) {\n\t\t\t\t\t\tnode = this.replacement;\n\t\t\t\t\t\tthis.replace(parent, prop, index, node);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (this.should_remove) {\n\t\t\t\t\t\tthis.remove(parent, prop, index);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst skipped = this.should_skip;\n\t\t\t\t\tconst removed = this.should_remove;\n\n\t\t\t\t\tthis.should_skip = _should_skip;\n\t\t\t\t\tthis.should_remove = _should_remove;\n\t\t\t\t\tthis.replacement = _replacement;\n\n\t\t\t\t\tif (skipped) return node;\n\t\t\t\t\tif (removed) return null;\n\t\t\t\t}\n\n\t\t\t\tfor (const key in node) {\n\t\t\t\t\tconst value = node[key];\n\n\t\t\t\t\tif (typeof value !== \"object\") {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (Array.isArray(value)) {\n\t\t\t\t\t\tfor (let i = 0; i < value.length; i += 1) {\n\t\t\t\t\t\t\tif (value[i] !== null && typeof value[i].type === 'string') {\n\t\t\t\t\t\t\t\tif (!this.visit(value[i], node, key, i)) {\n\t\t\t\t\t\t\t\t\t// removed\n\t\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (value !== null && typeof value.type === \"string\") {\n\t\t\t\t\t\tthis.visit(value, node, key, null);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (this.leave) {\n\t\t\t\t\tconst _replacement = this.replacement;\n\t\t\t\t\tconst _should_remove = this.should_remove;\n\t\t\t\t\tthis.replacement = null;\n\t\t\t\t\tthis.should_remove = false;\n\n\t\t\t\t\tthis.leave.call(this.context, node, parent, prop, index);\n\n\t\t\t\t\tif (this.replacement) {\n\t\t\t\t\t\tnode = this.replacement;\n\t\t\t\t\t\tthis.replace(parent, prop, index, node);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (this.should_remove) {\n\t\t\t\t\t\tthis.remove(parent, prop, index);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst removed = this.should_remove;\n\n\t\t\t\t\tthis.replacement = _replacement;\n\t\t\t\t\tthis.should_remove = _should_remove;\n\n\t\t\t\t\tif (removed) return null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn node;\n\t\t}\n\t}\n\n\t// @ts-check\n\n\t/** @typedef { import('estree').BaseNode} BaseNode */\n\t/** @typedef { import('./walker').WalkerContext} WalkerContext */\n\n\t/** @typedef {(\n\t *    this: WalkerContext,\n\t *    node: BaseNode,\n\t *    parent: BaseNode,\n\t *    key: string,\n\t *    index: number\n\t * ) => Promise<void>} AsyncHandler */\n\n\tclass AsyncWalker extends WalkerBase {\n\t\t/**\n\t\t *\n\t\t * @param {AsyncHandler} enter\n\t\t * @param {AsyncHandler} leave\n\t\t */\n\t\tconstructor(enter, leave) {\n\t\t\tsuper();\n\n\t\t\t/** @type {AsyncHandler} */\n\t\t\tthis.enter = enter;\n\n\t\t\t/** @type {AsyncHandler} */\n\t\t\tthis.leave = leave;\n\t\t}\n\n\t\t/**\n\t\t *\n\t\t * @param {BaseNode} node\n\t\t * @param {BaseNode} parent\n\t\t * @param {string} [prop]\n\t\t * @param {number} [index]\n\t\t * @returns {Promise<BaseNode>}\n\t\t */\n\t\tasync visit(node, parent, prop, index) {\n\t\t\tif (node) {\n\t\t\t\tif (this.enter) {\n\t\t\t\t\tconst _should_skip = this.should_skip;\n\t\t\t\t\tconst _should_remove = this.should_remove;\n\t\t\t\t\tconst _replacement = this.replacement;\n\t\t\t\t\tthis.should_skip = false;\n\t\t\t\t\tthis.should_remove = false;\n\t\t\t\t\tthis.replacement = null;\n\n\t\t\t\t\tawait this.enter.call(this.context, node, parent, prop, index);\n\n\t\t\t\t\tif (this.replacement) {\n\t\t\t\t\t\tnode = this.replacement;\n\t\t\t\t\t\tthis.replace(parent, prop, index, node);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (this.should_remove) {\n\t\t\t\t\t\tthis.remove(parent, prop, index);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst skipped = this.should_skip;\n\t\t\t\t\tconst removed = this.should_remove;\n\n\t\t\t\t\tthis.should_skip = _should_skip;\n\t\t\t\t\tthis.should_remove = _should_remove;\n\t\t\t\t\tthis.replacement = _replacement;\n\n\t\t\t\t\tif (skipped) return node;\n\t\t\t\t\tif (removed) return null;\n\t\t\t\t}\n\n\t\t\t\tfor (const key in node) {\n\t\t\t\t\tconst value = node[key];\n\n\t\t\t\t\tif (typeof value !== \"object\") {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (Array.isArray(value)) {\n\t\t\t\t\t\tfor (let i = 0; i < value.length; i += 1) {\n\t\t\t\t\t\t\tif (value[i] !== null && typeof value[i].type === 'string') {\n\t\t\t\t\t\t\t\tif (!(await this.visit(value[i], node, key, i))) {\n\t\t\t\t\t\t\t\t\t// removed\n\t\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (value !== null && typeof value.type === \"string\") {\n\t\t\t\t\t\tawait this.visit(value, node, key, null);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (this.leave) {\n\t\t\t\t\tconst _replacement = this.replacement;\n\t\t\t\t\tconst _should_remove = this.should_remove;\n\t\t\t\t\tthis.replacement = null;\n\t\t\t\t\tthis.should_remove = false;\n\n\t\t\t\t\tawait this.leave.call(this.context, node, parent, prop, index);\n\n\t\t\t\t\tif (this.replacement) {\n\t\t\t\t\t\tnode = this.replacement;\n\t\t\t\t\t\tthis.replace(parent, prop, index, node);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (this.should_remove) {\n\t\t\t\t\t\tthis.remove(parent, prop, index);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst removed = this.should_remove;\n\n\t\t\t\t\tthis.replacement = _replacement;\n\t\t\t\t\tthis.should_remove = _should_remove;\n\n\t\t\t\t\tif (removed) return null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn node;\n\t\t}\n\t}\n\n\t// @ts-check\n\n\t/** @typedef { import('estree').BaseNode} BaseNode */\n\t/** @typedef { import('./sync.js').SyncHandler} SyncHandler */\n\t/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */\n\n\t/**\n\t *\n\t * @param {BaseNode} ast\n\t * @param {{\n\t *   enter?: SyncHandler\n\t *   leave?: SyncHandler\n\t * }} walker\n\t * @returns {BaseNode}\n\t */\n\tfunction walk(ast, { enter, leave }) {\n\t\tconst instance = new SyncWalker(enter, leave);\n\t\treturn instance.visit(ast, null);\n\t}\n\n\t/**\n\t *\n\t * @param {BaseNode} ast\n\t * @param {{\n\t *   enter?: AsyncHandler\n\t *   leave?: AsyncHandler\n\t * }} walker\n\t * @returns {Promise<BaseNode>}\n\t */\n\tasync function asyncWalk(ast, { enter, leave }) {\n\t\tconst instance = new AsyncWalker(enter, leave);\n\t\treturn await instance.visit(ast, null);\n\t}\n\n\texports.asyncWalk = asyncWalk;\n\texports.walk = walk;\n\n\tObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n  if (0 <= number && number < intToCharMap.length) {\n    return intToCharMap[number];\n  }\n  throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n  var bigA = 65;     // 'A'\n  var bigZ = 90;     // 'Z'\n\n  var littleA = 97;  // 'a'\n  var littleZ = 122; // 'z'\n\n  var zero = 48;     // '0'\n  var nine = 57;     // '9'\n\n  var plus = 43;     // '+'\n  var slash = 47;    // '/'\n\n  var littleOffset = 26;\n  var numberOffset = 52;\n\n  // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n  if (bigA <= charCode && charCode <= bigZ) {\n    return (charCode - bigA);\n  }\n\n  // 26 - 51: abcdefghijklmnopqrstuvwxyz\n  if (littleA <= charCode && charCode <= littleZ) {\n    return (charCode - littleA + littleOffset);\n  }\n\n  // 52 - 61: 0123456789\n  if (zero <= charCode && charCode <= nine) {\n    return (charCode - zero + numberOffset);\n  }\n\n  // 62: +\n  if (charCode == plus) {\n    return 62;\n  }\n\n  // 63: /\n  if (charCode == slash) {\n    return 63;\n  }\n\n  // Invalid base64 digit.\n  return -1;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n *  * Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *  * Redistributions in binary form must reproduce the above\n *    copyright notice, this list of conditions and the following\n *    disclaimer in the documentation and/or other materials provided\n *    with the distribution.\n *  * Neither the name of Google Inc. nor the names of its\n *    contributors may be used to endorse or promote products derived\n *    from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n//   Continuation\n//   |    Sign\n//   |    |\n//   V    V\n//   101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit.  For example, as decimals:\n *   1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n *   2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n  return aValue < 0\n    ? ((-aValue) << 1) + 1\n    : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit.  For example, as decimals:\n *   2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n *   4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n  var isNegative = (aValue & 1) === 1;\n  var shifted = aValue >> 1;\n  return isNegative\n    ? -shifted\n    : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n  var encoded = \"\";\n  var digit;\n\n  var vlq = toVLQSigned(aValue);\n\n  do {\n    digit = vlq & VLQ_BASE_MASK;\n    vlq >>>= VLQ_BASE_SHIFT;\n    if (vlq > 0) {\n      // There are still more digits in this value, so we must make sure the\n      // continuation bit is marked.\n      digit |= VLQ_CONTINUATION_BIT;\n    }\n    encoded += base64.encode(digit);\n  } while (vlq > 0);\n\n  return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n  var strLen = aStr.length;\n  var result = 0;\n  var shift = 0;\n  var continuation, digit;\n\n  do {\n    if (aIndex >= strLen) {\n      throw new Error(\"Expected more digits in base 64 VLQ value.\");\n    }\n\n    digit = base64.decode(aStr.charCodeAt(aIndex++));\n    if (digit === -1) {\n      throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n    }\n\n    continuation = !!(digit & VLQ_CONTINUATION_BIT);\n    digit &= VLQ_BASE_MASK;\n    result = result + (digit << shift);\n    shift += VLQ_BASE_SHIFT;\n  } while (continuation);\n\n  aOutParam.value = fromVLQSigned(result);\n  aOutParam.rest = aIndex;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n  if (aName in aArgs) {\n    return aArgs[aName];\n  } else if (arguments.length === 3) {\n    return aDefaultValue;\n  } else {\n    throw new Error('\"' + aName + '\" is a required argument.');\n  }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n  var match = aUrl.match(urlRegexp);\n  if (!match) {\n    return null;\n  }\n  return {\n    scheme: match[1],\n    auth: match[2],\n    host: match[3],\n    port: match[4],\n    path: match[5]\n  };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n  var url = '';\n  if (aParsedUrl.scheme) {\n    url += aParsedUrl.scheme + ':';\n  }\n  url += '//';\n  if (aParsedUrl.auth) {\n    url += aParsedUrl.auth + '@';\n  }\n  if (aParsedUrl.host) {\n    url += aParsedUrl.host;\n  }\n  if (aParsedUrl.port) {\n    url += \":\" + aParsedUrl.port\n  }\n  if (aParsedUrl.path) {\n    url += aParsedUrl.path;\n  }\n  return url;\n}\nexports.urlGenerate = urlGenerate;\n\nvar MAX_CACHED_INPUTS = 32;\n\n/**\n * Takes some function `f(input) -> result` and returns a memoized version of\n * `f`.\n *\n * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The\n * memoization is a dumb-simple, linear least-recently-used cache.\n */\nfunction lruMemoize(f) {\n  var cache = [];\n\n  return function(input) {\n    for (var i = 0; i < cache.length; i++) {\n      if (cache[i].input === input) {\n        var temp = cache[0];\n        cache[0] = cache[i];\n        cache[i] = temp;\n        return cache[0].result;\n      }\n    }\n\n    var result = f(input);\n\n    cache.unshift({\n      input,\n      result,\n    });\n\n    if (cache.length > MAX_CACHED_INPUTS) {\n      cache.pop();\n    }\n\n    return result;\n  };\n}\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '<dir>/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nvar normalize = lruMemoize(function normalize(aPath) {\n  var path = aPath;\n  var url = urlParse(aPath);\n  if (url) {\n    if (!url.path) {\n      return aPath;\n    }\n    path = url.path;\n  }\n  var isAbsolute = exports.isAbsolute(path);\n  // Split the path into parts between `/` characters. This is much faster than\n  // using `.split(/\\/+/g)`.\n  var parts = [];\n  var start = 0;\n  var i = 0;\n  while (true) {\n    start = i;\n    i = path.indexOf(\"/\", start);\n    if (i === -1) {\n      parts.push(path.slice(start));\n      break;\n    } else {\n      parts.push(path.slice(start, i));\n      while (i < path.length && path[i] === \"/\") {\n        i++;\n      }\n    }\n  }\n\n  for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n    part = parts[i];\n    if (part === '.') {\n      parts.splice(i, 1);\n    } else if (part === '..') {\n      up++;\n    } else if (up > 0) {\n      if (part === '') {\n        // The first part is blank if the path is absolute. Trying to go\n        // above the root is a no-op. Therefore we can remove all '..' parts\n        // directly after the root.\n        parts.splice(i + 1, up);\n        up = 0;\n      } else {\n        parts.splice(i, 2);\n        up--;\n      }\n    }\n  }\n  path = parts.join('/');\n\n  if (path === '') {\n    path = isAbsolute ? '/' : '.';\n  }\n\n  if (url) {\n    url.path = path;\n    return urlGenerate(url);\n  }\n  return path;\n});\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n *   scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n *   first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n *   is updated with the result and aRoot is returned. Otherwise the result\n *   is returned.\n *   - If aPath is absolute, the result is aPath.\n *   - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n  if (aRoot === \"\") {\n    aRoot = \".\";\n  }\n  if (aPath === \"\") {\n    aPath = \".\";\n  }\n  var aPathUrl = urlParse(aPath);\n  var aRootUrl = urlParse(aRoot);\n  if (aRootUrl) {\n    aRoot = aRootUrl.path || '/';\n  }\n\n  // `join(foo, '//www.example.org')`\n  if (aPathUrl && !aPathUrl.scheme) {\n    if (aRootUrl) {\n      aPathUrl.scheme = aRootUrl.scheme;\n    }\n    return urlGenerate(aPathUrl);\n  }\n\n  if (aPathUrl || aPath.match(dataUrlRegexp)) {\n    return aPath;\n  }\n\n  // `join('http://', 'www.example.com')`\n  if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n    aRootUrl.host = aPath;\n    return urlGenerate(aRootUrl);\n  }\n\n  var joined = aPath.charAt(0) === '/'\n    ? aPath\n    : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n  if (aRootUrl) {\n    aRootUrl.path = joined;\n    return urlGenerate(aRootUrl);\n  }\n  return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n  return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n  if (aRoot === \"\") {\n    aRoot = \".\";\n  }\n\n  aRoot = aRoot.replace(/\\/$/, '');\n\n  // It is possible for the path to be above the root. In this case, simply\n  // checking whether the root is a prefix of the path won't work. Instead, we\n  // need to remove components from the root one by one, until either we find\n  // a prefix that fits, or we run out of components to remove.\n  var level = 0;\n  while (aPath.indexOf(aRoot + '/') !== 0) {\n    var index = aRoot.lastIndexOf(\"/\");\n    if (index < 0) {\n      return aPath;\n    }\n\n    // If the only part of the root that is left is the scheme (i.e. http://,\n    // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n    // have exhausted all components, so the path is not relative to the root.\n    aRoot = aRoot.slice(0, index);\n    if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n      return aPath;\n    }\n\n    ++level;\n  }\n\n  // Make sure we add a \"../\" for each component we removed from the root.\n  return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n  var obj = Object.create(null);\n  return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n  return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n  if (isProtoString(aStr)) {\n    return '$' + aStr;\n  }\n\n  return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n  if (isProtoString(aStr)) {\n    return aStr.slice(1);\n  }\n\n  return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n  if (!s) {\n    return false;\n  }\n\n  var length = s.length;\n\n  if (length < 9 /* \"__proto__\".length */) {\n    return false;\n  }\n\n  if (s.charCodeAt(length - 1) !== 95  /* '_' */ ||\n      s.charCodeAt(length - 2) !== 95  /* '_' */ ||\n      s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n      s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n      s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n      s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n      s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n      s.charCodeAt(length - 8) !== 95  /* '_' */ ||\n      s.charCodeAt(length - 9) !== 95  /* '_' */) {\n    return false;\n  }\n\n  for (var i = length - 10; i >= 0; i--) {\n    if (s.charCodeAt(i) !== 36 /* '$' */) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n  var cmp = strcmp(mappingA.source, mappingB.source);\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.originalLine - mappingB.originalLine;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.originalColumn - mappingB.originalColumn;\n  if (cmp !== 0 || onlyCompareOriginal) {\n    return cmp;\n  }\n\n  cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.generatedLine - mappingB.generatedLine;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\nfunction compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) {\n  var cmp\n\n  cmp = mappingA.originalLine - mappingB.originalLine;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.originalColumn - mappingB.originalColumn;\n  if (cmp !== 0 || onlyCompareOriginal) {\n    return cmp;\n  }\n\n  cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.generatedLine - mappingB.generatedLine;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n  var cmp = mappingA.generatedLine - mappingB.generatedLine;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n  if (cmp !== 0 || onlyCompareGenerated) {\n    return cmp;\n  }\n\n  cmp = strcmp(mappingA.source, mappingB.source);\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.originalLine - mappingB.originalLine;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.originalColumn - mappingB.originalColumn;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) {\n  var cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n  if (cmp !== 0 || onlyCompareGenerated) {\n    return cmp;\n  }\n\n  cmp = strcmp(mappingA.source, mappingB.source);\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.originalLine - mappingB.originalLine;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.originalColumn - mappingB.originalColumn;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine;\n\nfunction strcmp(aStr1, aStr2) {\n  if (aStr1 === aStr2) {\n    return 0;\n  }\n\n  if (aStr1 === null) {\n    return 1; // aStr2 !== null\n  }\n\n  if (aStr2 === null) {\n    return -1; // aStr1 !== null\n  }\n\n  if (aStr1 > aStr2) {\n    return 1;\n  }\n\n  return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n  var cmp = mappingA.generatedLine - mappingB.generatedLine;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = strcmp(mappingA.source, mappingB.source);\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.originalLine - mappingB.originalLine;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  cmp = mappingA.originalColumn - mappingB.originalColumn;\n  if (cmp !== 0) {\n    return cmp;\n  }\n\n  return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented\n * in the source maps specification), and then parse the string as\n * JSON.\n */\nfunction parseSourceMapInput(str) {\n  return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n}\nexports.parseSourceMapInput = parseSourceMapInput;\n\n/**\n * Compute the URL of a source given the the source root, the source's\n * URL, and the source map's URL.\n */\nfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n  sourceURL = sourceURL || '';\n\n  if (sourceRoot) {\n    // This follows what Chrome does.\n    if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n      sourceRoot += '/';\n    }\n    // The spec says:\n    //   Line 4: An optional source root, useful for relocating source\n    //   files on a server or removing repeated values in the\n    //   “sources” entry.  This value is prepended to the individual\n    //   entries in the “source” field.\n    sourceURL = sourceRoot + sourceURL;\n  }\n\n  // Historically, SourceMapConsumer did not take the sourceMapURL as\n  // a parameter.  This mode is still somewhat supported, which is why\n  // this code block is conditional.  However, it's preferable to pass\n  // the source map URL to SourceMapConsumer, so that this function\n  // can implement the source URL resolution algorithm as outlined in\n  // the spec.  This block is basically the equivalent of:\n  //    new URL(sourceURL, sourceMapURL).toString()\n  // ... except it avoids using URL, which wasn't available in the\n  // older releases of node still supported by this library.\n  //\n  // The spec says:\n  //   If the sources are not absolute URLs after prepending of the\n  //   “sourceRoot”, the sources are resolved relative to the\n  //   SourceMap (like resolving script src in a html document).\n  if (sourceMapURL) {\n    var parsed = urlParse(sourceMapURL);\n    if (!parsed) {\n      throw new Error(\"sourceMapURL could not be parsed\");\n    }\n    if (parsed.path) {\n      // Strip the last path component, but keep the \"/\".\n      var index = parsed.path.lastIndexOf('/');\n      if (index >= 0) {\n        parsed.path = parsed.path.substring(0, index + 1);\n      }\n    }\n    sourceURL = join(urlGenerate(parsed), sourceURL);\n  }\n\n  return normalize(sourceURL);\n}\nexports.computeSourceURL = computeSourceURL;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n  this._array = [];\n  this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n  var set = new ArraySet();\n  for (var i = 0, len = aArray.length; i < len; i++) {\n    set.add(aArray[i], aAllowDuplicates);\n  }\n  return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n  return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n  var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n  var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n  var idx = this._array.length;\n  if (!isDuplicate || aAllowDuplicates) {\n    this._array.push(aStr);\n  }\n  if (!isDuplicate) {\n    if (hasNativeMap) {\n      this._set.set(aStr, idx);\n    } else {\n      this._set[sStr] = idx;\n    }\n  }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n  if (hasNativeMap) {\n    return this._set.has(aStr);\n  } else {\n    var sStr = util.toSetString(aStr);\n    return has.call(this._set, sStr);\n  }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n  if (hasNativeMap) {\n    var idx = this._set.get(aStr);\n    if (idx >= 0) {\n        return idx;\n    }\n  } else {\n    var sStr = util.toSetString(aStr);\n    if (has.call(this._set, sStr)) {\n      return this._set[sStr];\n    }\n  }\n\n  throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n  if (aIdx >= 0 && aIdx < this._array.length) {\n    return this._array[aIdx];\n  }\n  throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n  return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n  // Optimized for most common case\n  var lineA = mappingA.generatedLine;\n  var lineB = mappingB.generatedLine;\n  var columnA = mappingA.generatedColumn;\n  var columnB = mappingB.generatedColumn;\n  return lineB > lineA || lineB == lineA && columnB >= columnA ||\n         util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n  this._array = [];\n  this._sorted = true;\n  // Serves as infimum\n  this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n  function MappingList_forEach(aCallback, aThisArg) {\n    this._array.forEach(aCallback, aThisArg);\n  };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n  if (generatedPositionAfter(this._last, aMapping)) {\n    this._last = aMapping;\n    this._array.push(aMapping);\n  } else {\n    this._sorted = false;\n    this._array.push(aMapping);\n  }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n  if (!this._sorted) {\n    this._array.sort(util.compareByGeneratedPositionsInflated);\n    this._sorted = true;\n  }\n  return this._array;\n};\n\nexports.MappingList = MappingList;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n *   - file: The filename of the generated source.\n *   - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n  if (!aArgs) {\n    aArgs = {};\n  }\n  this._file = util.getArg(aArgs, 'file', null);\n  this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n  this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n  this._ignoreInvalidMapping = util.getArg(aArgs, 'ignoreInvalidMapping', false);\n  this._sources = new ArraySet();\n  this._names = new ArraySet();\n  this._mappings = new MappingList();\n  this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n  function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) {\n    var sourceRoot = aSourceMapConsumer.sourceRoot;\n    var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, {\n      file: aSourceMapConsumer.file,\n      sourceRoot: sourceRoot\n    }));\n    aSourceMapConsumer.eachMapping(function (mapping) {\n      var newMapping = {\n        generated: {\n          line: mapping.generatedLine,\n          column: mapping.generatedColumn\n        }\n      };\n\n      if (mapping.source != null) {\n        newMapping.source = mapping.source;\n        if (sourceRoot != null) {\n          newMapping.source = util.relative(sourceRoot, newMapping.source);\n        }\n\n        newMapping.original = {\n          line: mapping.originalLine,\n          column: mapping.originalColumn\n        };\n\n        if (mapping.name != null) {\n          newMapping.name = mapping.name;\n        }\n      }\n\n      generator.addMapping(newMapping);\n    });\n    aSourceMapConsumer.sources.forEach(function (sourceFile) {\n      var sourceRelative = sourceFile;\n      if (sourceRoot !== null) {\n        sourceRelative = util.relative(sourceRoot, sourceFile);\n      }\n\n      if (!generator._sources.has(sourceRelative)) {\n        generator._sources.add(sourceRelative);\n      }\n\n      var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n      if (content != null) {\n        generator.setSourceContent(sourceFile, content);\n      }\n    });\n    return generator;\n  };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n *   - generated: An object with the generated line and column positions.\n *   - original: An object with the original line and column positions.\n *   - source: The original source file (relative to the sourceRoot).\n *   - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n  function SourceMapGenerator_addMapping(aArgs) {\n    var generated = util.getArg(aArgs, 'generated');\n    var original = util.getArg(aArgs, 'original', null);\n    var source = util.getArg(aArgs, 'source', null);\n    var name = util.getArg(aArgs, 'name', null);\n\n    if (!this._skipValidation) {\n      if (this._validateMapping(generated, original, source, name) === false) {\n        return;\n      }\n    }\n\n    if (source != null) {\n      source = String(source);\n      if (!this._sources.has(source)) {\n        this._sources.add(source);\n      }\n    }\n\n    if (name != null) {\n      name = String(name);\n      if (!this._names.has(name)) {\n        this._names.add(name);\n      }\n    }\n\n    this._mappings.add({\n      generatedLine: generated.line,\n      generatedColumn: generated.column,\n      originalLine: original != null && original.line,\n      originalColumn: original != null && original.column,\n      source: source,\n      name: name\n    });\n  };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n  function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n    var source = aSourceFile;\n    if (this._sourceRoot != null) {\n      source = util.relative(this._sourceRoot, source);\n    }\n\n    if (aSourceContent != null) {\n      // Add the source content to the _sourcesContents map.\n      // Create a new _sourcesContents map if the property is null.\n      if (!this._sourcesContents) {\n        this._sourcesContents = Object.create(null);\n      }\n      this._sourcesContents[util.toSetString(source)] = aSourceContent;\n    } else if (this._sourcesContents) {\n      // Remove the source file from the _sourcesContents map.\n      // If the _sourcesContents map is empty, set the property to null.\n      delete this._sourcesContents[util.toSetString(source)];\n      if (Object.keys(this._sourcesContents).length === 0) {\n        this._sourcesContents = null;\n      }\n    }\n  };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n *        If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n *        to be applied. If relative, it is relative to the SourceMapConsumer.\n *        This parameter is needed when the two source maps aren't in the same\n *        directory, and the source map to be applied contains relative source\n *        paths. If so, those relative source paths need to be rewritten\n *        relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n  function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n    var sourceFile = aSourceFile;\n    // If aSourceFile is omitted, we will use the file property of the SourceMap\n    if (aSourceFile == null) {\n      if (aSourceMapConsumer.file == null) {\n        throw new Error(\n          'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n          'or the source map\\'s \"file\" property. Both were omitted.'\n        );\n      }\n      sourceFile = aSourceMapConsumer.file;\n    }\n    var sourceRoot = this._sourceRoot;\n    // Make \"sourceFile\" relative if an absolute Url is passed.\n    if (sourceRoot != null) {\n      sourceFile = util.relative(sourceRoot, sourceFile);\n    }\n    // Applying the SourceMap can add and remove items from the sources and\n    // the names array.\n    var newSources = new ArraySet();\n    var newNames = new ArraySet();\n\n    // Find mappings for the \"sourceFile\"\n    this._mappings.unsortedForEach(function (mapping) {\n      if (mapping.source === sourceFile && mapping.originalLine != null) {\n        // Check if it can be mapped by the source map, then update the mapping.\n        var original = aSourceMapConsumer.originalPositionFor({\n          line: mapping.originalLine,\n          column: mapping.originalColumn\n        });\n        if (original.source != null) {\n          // Copy mapping\n          mapping.source = original.source;\n          if (aSourceMapPath != null) {\n            mapping.source = util.join(aSourceMapPath, mapping.source)\n          }\n          if (sourceRoot != null) {\n            mapping.source = util.relative(sourceRoot, mapping.source);\n          }\n          mapping.originalLine = original.line;\n          mapping.originalColumn = original.column;\n          if (original.name != null) {\n            mapping.name = original.name;\n          }\n        }\n      }\n\n      var source = mapping.source;\n      if (source != null && !newSources.has(source)) {\n        newSources.add(source);\n      }\n\n      var name = mapping.name;\n      if (name != null && !newNames.has(name)) {\n        newNames.add(name);\n      }\n\n    }, this);\n    this._sources = newSources;\n    this._names = newNames;\n\n    // Copy sourcesContents of applied map.\n    aSourceMapConsumer.sources.forEach(function (sourceFile) {\n      var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n      if (content != null) {\n        if (aSourceMapPath != null) {\n          sourceFile = util.join(aSourceMapPath, sourceFile);\n        }\n        if (sourceRoot != null) {\n          sourceFile = util.relative(sourceRoot, sourceFile);\n        }\n        this.setSourceContent(sourceFile, content);\n      }\n    }, this);\n  };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n *   1. Just the generated position.\n *   2. The Generated position, original position, and original source.\n *   3. Generated and original position, original source, as well as a name\n *      token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n  function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n                                              aName) {\n    // When aOriginal is truthy but has empty values for .line and .column,\n    // it is most likely a programmer error. In this case we throw a very\n    // specific error message to try to guide them the right way.\n    // For example: https://github.com/Polymer/polymer-bundler/pull/519\n    if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n      var message = 'original.line and original.column are not numbers -- you probably meant to omit ' +\n      'the original mapping entirely and only map the generated position. If so, pass ' +\n      'null for the original mapping instead of an object with empty or null values.'\n\n      if (this._ignoreInvalidMapping) {\n        if (typeof console !== 'undefined' && console.warn) {\n          console.warn(message);\n        }\n        return false;\n      } else {\n        throw new Error(message);\n      }\n    }\n\n    if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n        && aGenerated.line > 0 && aGenerated.column >= 0\n        && !aOriginal && !aSource && !aName) {\n      // Case 1.\n      return;\n    }\n    else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n             && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n             && aGenerated.line > 0 && aGenerated.column >= 0\n             && aOriginal.line > 0 && aOriginal.column >= 0\n             && aSource) {\n      // Cases 2 and 3.\n      return;\n    }\n    else {\n      var message = 'Invalid mapping: ' + JSON.stringify({\n        generated: aGenerated,\n        source: aSource,\n        original: aOriginal,\n        name: aName\n      });\n\n      if (this._ignoreInvalidMapping) {\n        if (typeof console !== 'undefined' && console.warn) {\n          console.warn(message);\n        }\n        return false;\n      } else {\n        throw new Error(message)\n      }\n    }\n  };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n  function SourceMapGenerator_serializeMappings() {\n    var previousGeneratedColumn = 0;\n    var previousGeneratedLine = 1;\n    var previousOriginalColumn = 0;\n    var previousOriginalLine = 0;\n    var previousName = 0;\n    var previousSource = 0;\n    var result = '';\n    var next;\n    var mapping;\n    var nameIdx;\n    var sourceIdx;\n\n    var mappings = this._mappings.toArray();\n    for (var i = 0, len = mappings.length; i < len; i++) {\n      mapping = mappings[i];\n      next = ''\n\n      if (mapping.generatedLine !== previousGeneratedLine) {\n        previousGeneratedColumn = 0;\n        while (mapping.generatedLine !== previousGeneratedLine) {\n          next += ';';\n          previousGeneratedLine++;\n        }\n      }\n      else {\n        if (i > 0) {\n          if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n            continue;\n          }\n          next += ',';\n        }\n      }\n\n      next += base64VLQ.encode(mapping.generatedColumn\n                                 - previousGeneratedColumn);\n      previousGeneratedColumn = mapping.generatedColumn;\n\n      if (mapping.source != null) {\n        sourceIdx = this._sources.indexOf(mapping.source);\n        next += base64VLQ.encode(sourceIdx - previousSource);\n        previousSource = sourceIdx;\n\n        // lines are stored 0-based in SourceMap spec version 3\n        next += base64VLQ.encode(mapping.originalLine - 1\n                                   - previousOriginalLine);\n        previousOriginalLine = mapping.originalLine - 1;\n\n        next += base64VLQ.encode(mapping.originalColumn\n                                   - previousOriginalColumn);\n        previousOriginalColumn = mapping.originalColumn;\n\n        if (mapping.name != null) {\n          nameIdx = this._names.indexOf(mapping.name);\n          next += base64VLQ.encode(nameIdx - previousName);\n          previousName = nameIdx;\n        }\n      }\n\n      result += next;\n    }\n\n    return result;\n  };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n  function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n    return aSources.map(function (source) {\n      if (!this._sourcesContents) {\n        return null;\n      }\n      if (aSourceRoot != null) {\n        source = util.relative(aSourceRoot, source);\n      }\n      var key = util.toSetString(source);\n      return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n        ? this._sourcesContents[key]\n        : null;\n    }, this);\n  };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n  function SourceMapGenerator_toJSON() {\n    var map = {\n      version: this._version,\n      sources: this._sources.toArray(),\n      names: this._names.toArray(),\n      mappings: this._serializeMappings()\n    };\n    if (this._file != null) {\n      map.file = this._file;\n    }\n    if (this._sourceRoot != null) {\n      map.sourceRoot = this._sourceRoot;\n    }\n    if (this._sourcesContents) {\n      map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n    }\n\n    return map;\n  };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n  function SourceMapGenerator_toString() {\n    return JSON.stringify(this.toJSON());\n  };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n *     'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n *     closest element that is smaller than or greater than the one we are\n *     searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n  // This function terminates when one of the following is true:\n  //\n  //   1. We find the exact element we are looking for.\n  //\n  //   2. We did not find the exact element, but we can return the index of\n  //      the next-closest element.\n  //\n  //   3. We did not find the exact element, and there is no next-closest\n  //      element than the one we are searching for, so we return -1.\n  var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n  var cmp = aCompare(aNeedle, aHaystack[mid], true);\n  if (cmp === 0) {\n    // Found the element we are looking for.\n    return mid;\n  }\n  else if (cmp > 0) {\n    // Our needle is greater than aHaystack[mid].\n    if (aHigh - mid > 1) {\n      // The element is in the upper half.\n      return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n    }\n\n    // The exact needle element was not found in this haystack. Determine if\n    // we are in termination case (3) or (2) and return the appropriate thing.\n    if (aBias == exports.LEAST_UPPER_BOUND) {\n      return aHigh < aHaystack.length ? aHigh : -1;\n    } else {\n      return mid;\n    }\n  }\n  else {\n    // Our needle is less than aHaystack[mid].\n    if (mid - aLow > 1) {\n      // The element is in the lower half.\n      return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n    }\n\n    // we are in termination case (3) or (2) and return the appropriate thing.\n    if (aBias == exports.LEAST_UPPER_BOUND) {\n      return mid;\n    } else {\n      return aLow < 0 ? -1 : aLow;\n    }\n  }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n *     array and returns -1, 0, or 1 depending on whether the needle is less\n *     than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n *     'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n *     closest element that is smaller than or greater than the one we are\n *     searching for, respectively, if the exact element cannot be found.\n *     Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n  if (aHaystack.length === 0) {\n    return -1;\n  }\n\n  var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n                              aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n  if (index < 0) {\n    return -1;\n  }\n\n  // We have found either the exact element, or the next-closest element than\n  // the one we are searching for. However, there may be more than one such\n  // element. Make sure we always return the smallest of these.\n  while (index - 1 >= 0) {\n    if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n      break;\n    }\n    --index;\n  }\n\n  return index;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\nfunction SortTemplate(comparator) {\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n *        The array.\n * @param {Number} x\n *        The index of the first item.\n * @param {Number} y\n *        The index of the second item.\n */\nfunction swap(ary, x, y) {\n  var temp = ary[x];\n  ary[x] = ary[y];\n  ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n *        The lower bound on the range.\n * @param {Number} high\n *        The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n  return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n *        An array to sort.\n * @param {function} comparator\n *        Function to use to compare two items.\n * @param {Number} p\n *        Start index of the array\n * @param {Number} r\n *        End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n  // If our lower bound is less than our upper bound, we (1) partition the\n  // array into two pieces and (2) recurse on each half. If it is not, this is\n  // the empty array and our base case.\n\n  if (p < r) {\n    // (1) Partitioning.\n    //\n    // The partitioning chooses a pivot between `p` and `r` and moves all\n    // elements that are less than or equal to the pivot to the before it, and\n    // all the elements that are greater than it after it. The effect is that\n    // once partition is done, the pivot is in the exact place it will be when\n    // the array is put in sorted order, and it will not need to be moved\n    // again. This runs in O(n) time.\n\n    // Always choose a random pivot so that an input array which is reverse\n    // sorted does not cause O(n^2) running time.\n    var pivotIndex = randomIntInRange(p, r);\n    var i = p - 1;\n\n    swap(ary, pivotIndex, r);\n    var pivot = ary[r];\n\n    // Immediately after `j` is incremented in this loop, the following hold\n    // true:\n    //\n    //   * Every element in `ary[p .. i]` is less than or equal to the pivot.\n    //\n    //   * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n    for (var j = p; j < r; j++) {\n      if (comparator(ary[j], pivot, false) <= 0) {\n        i += 1;\n        swap(ary, i, j);\n      }\n    }\n\n    swap(ary, i + 1, j);\n    var q = i + 1;\n\n    // (2) Recurse on each half.\n\n    doQuickSort(ary, comparator, p, q - 1);\n    doQuickSort(ary, comparator, q + 1, r);\n  }\n}\n\n  return doQuickSort;\n}\n\nfunction cloneSort(comparator) {\n  let template = SortTemplate.toString();\n  let templateFn = new Function(`return ${template}`)();\n  return templateFn(comparator);\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n *        An array to sort.\n * @param {function} comparator\n *        Function to use to compare two items.\n */\n\nlet sortCache = new WeakMap();\nexports.quickSort = function (ary, comparator, start = 0) {\n  let doQuickSort = sortCache.get(comparator);\n  if (doQuickSort === void 0) {\n    doQuickSort = cloneSort(comparator);\n    sortCache.set(comparator, doQuickSort);\n  }\n  doQuickSort(ary, comparator, start, ary.length - 1);\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n  var sourceMap = aSourceMap;\n  if (typeof aSourceMap === 'string') {\n    sourceMap = util.parseSourceMapInput(aSourceMap);\n  }\n\n  return sourceMap.sections != null\n    ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n    : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n  return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n//     {\n//       generatedLine: The line number in the generated code,\n//       generatedColumn: The column number in the generated code,\n//       source: The path to the original source file that generated this\n//               chunk of code,\n//       originalLine: The line number in the original source that\n//                     corresponds to this chunk of generated code,\n//       originalColumn: The column number in the original source that\n//                       corresponds to this chunk of generated code,\n//       name: The name of the original symbol which generated this chunk of\n//             code.\n//     }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n  configurable: true,\n  enumerable: true,\n  get: function () {\n    if (!this.__generatedMappings) {\n      this._parseMappings(this._mappings, this.sourceRoot);\n    }\n\n    return this.__generatedMappings;\n  }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n  configurable: true,\n  enumerable: true,\n  get: function () {\n    if (!this.__originalMappings) {\n      this._parseMappings(this._mappings, this.sourceRoot);\n    }\n\n    return this.__originalMappings;\n  }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n  function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n    var c = aStr.charAt(index);\n    return c === \";\" || c === \",\";\n  };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n  function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n    throw new Error(\"Subclasses must implement _parseMappings\");\n  };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n *        The function that is called with each mapping.\n * @param Object aContext\n *        Optional. If specified, this object will be the value of `this` every\n *        time that `aCallback` is called.\n * @param aOrder\n *        Either `SourceMapConsumer.GENERATED_ORDER` or\n *        `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n *        iterate over the mappings sorted by the generated file's line/column\n *        order or the original's source/line/column order, respectively. Defaults to\n *        `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n  function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n    var context = aContext || null;\n    var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n    var mappings;\n    switch (order) {\n    case SourceMapConsumer.GENERATED_ORDER:\n      mappings = this._generatedMappings;\n      break;\n    case SourceMapConsumer.ORIGINAL_ORDER:\n      mappings = this._originalMappings;\n      break;\n    default:\n      throw new Error(\"Unknown order of iteration.\");\n    }\n\n    var sourceRoot = this.sourceRoot;\n    var boundCallback = aCallback.bind(context);\n    var names = this._names;\n    var sources = this._sources;\n    var sourceMapURL = this._sourceMapURL;\n\n    for (var i = 0, n = mappings.length; i < n; i++) {\n      var mapping = mappings[i];\n      var source = mapping.source === null ? null : sources.at(mapping.source);\n      if(source !== null) {\n        source = util.computeSourceURL(sourceRoot, source, sourceMapURL);\n      }\n      boundCallback({\n        source: source,\n        generatedLine: mapping.generatedLine,\n        generatedColumn: mapping.generatedColumn,\n        originalLine: mapping.originalLine,\n        originalColumn: mapping.originalColumn,\n        name: mapping.name === null ? null : names.at(mapping.name)\n      });\n    }\n  };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n *   - source: The filename of the original source.\n *   - line: The line number in the original source.  The line number is 1-based.\n *   - column: Optional. the column number in the original source.\n *    The column number is 0-based.\n *\n * and an array of objects is returned, each with the following properties:\n *\n *   - line: The line number in the generated source, or null.  The\n *    line number is 1-based.\n *   - column: The column number in the generated source, or null.\n *    The column number is 0-based.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n  function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n    var line = util.getArg(aArgs, 'line');\n\n    // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n    // returns the index of the closest mapping less than the needle. By\n    // setting needle.originalColumn to 0, we thus find the last mapping for\n    // the given line, provided such a mapping exists.\n    var needle = {\n      source: util.getArg(aArgs, 'source'),\n      originalLine: line,\n      originalColumn: util.getArg(aArgs, 'column', 0)\n    };\n\n    needle.source = this._findSourceIndex(needle.source);\n    if (needle.source < 0) {\n      return [];\n    }\n\n    var mappings = [];\n\n    var index = this._findMapping(needle,\n                                  this._originalMappings,\n                                  \"originalLine\",\n                                  \"originalColumn\",\n                                  util.compareByOriginalPositions,\n                                  binarySearch.LEAST_UPPER_BOUND);\n    if (index >= 0) {\n      var mapping = this._originalMappings[index];\n\n      if (aArgs.column === undefined) {\n        var originalLine = mapping.originalLine;\n\n        // Iterate until either we run out of mappings, or we run into\n        // a mapping for a different line than the one we found. Since\n        // mappings are sorted, this is guaranteed to find all mappings for\n        // the line we found.\n        while (mapping && mapping.originalLine === originalLine) {\n          mappings.push({\n            line: util.getArg(mapping, 'generatedLine', null),\n            column: util.getArg(mapping, 'generatedColumn', null),\n            lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n          });\n\n          mapping = this._originalMappings[++index];\n        }\n      } else {\n        var originalColumn = mapping.originalColumn;\n\n        // Iterate until either we run out of mappings, or we run into\n        // a mapping for a different line than the one we were searching for.\n        // Since mappings are sorted, this is guaranteed to find all mappings for\n        // the line we are searching for.\n        while (mapping &&\n               mapping.originalLine === line &&\n               mapping.originalColumn == originalColumn) {\n          mappings.push({\n            line: util.getArg(mapping, 'generatedLine', null),\n            column: util.getArg(mapping, 'generatedColumn', null),\n            lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n          });\n\n          mapping = this._originalMappings[++index];\n        }\n      }\n    }\n\n    return mappings;\n  };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The first parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n *   - version: Which version of the source map spec this map is following.\n *   - sources: An array of URLs to the original source files.\n *   - names: An array of identifiers which can be referrenced by individual mappings.\n *   - sourceRoot: Optional. The URL root from which all sources are relative.\n *   - sourcesContent: Optional. An array of contents of the original source files.\n *   - mappings: A string of base64 VLQs which contain the actual mappings.\n *   - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n *     {\n *       version : 3,\n *       file: \"out.js\",\n *       sourceRoot : \"\",\n *       sources: [\"foo.js\", \"bar.js\"],\n *       names: [\"src\", \"maps\", \"are\", \"fun\"],\n *       mappings: \"AA,AB;;ABCDE;\"\n *     }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found.  This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n  var sourceMap = aSourceMap;\n  if (typeof aSourceMap === 'string') {\n    sourceMap = util.parseSourceMapInput(aSourceMap);\n  }\n\n  var version = util.getArg(sourceMap, 'version');\n  var sources = util.getArg(sourceMap, 'sources');\n  // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n  // requires the array) to play nice here.\n  var names = util.getArg(sourceMap, 'names', []);\n  var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n  var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n  var mappings = util.getArg(sourceMap, 'mappings');\n  var file = util.getArg(sourceMap, 'file', null);\n\n  // Once again, Sass deviates from the spec and supplies the version as a\n  // string rather than a number, so we use loose equality checking here.\n  if (version != this._version) {\n    throw new Error('Unsupported version: ' + version);\n  }\n\n  if (sourceRoot) {\n    sourceRoot = util.normalize(sourceRoot);\n  }\n\n  sources = sources\n    .map(String)\n    // Some source maps produce relative source paths like \"./foo.js\" instead of\n    // \"foo.js\".  Normalize these first so that future comparisons will succeed.\n    // See bugzil.la/1090768.\n    .map(util.normalize)\n    // Always ensure that absolute sources are internally stored relative to\n    // the source root, if the source root is absolute. Not doing this would\n    // be particularly problematic when the source root is a prefix of the\n    // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n    .map(function (source) {\n      return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n        ? util.relative(sourceRoot, source)\n        : source;\n    });\n\n  // Pass `true` below to allow duplicate names and sources. While source maps\n  // are intended to be compressed and deduplicated, the TypeScript compiler\n  // sometimes generates source maps with duplicates in them. See Github issue\n  // #72 and bugzil.la/889492.\n  this._names = ArraySet.fromArray(names.map(String), true);\n  this._sources = ArraySet.fromArray(sources, true);\n\n  this._absoluteSources = this._sources.toArray().map(function (s) {\n    return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n  });\n\n  this.sourceRoot = sourceRoot;\n  this.sourcesContent = sourcesContent;\n  this._mappings = mappings;\n  this._sourceMapURL = aSourceMapURL;\n  this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Utility function to find the index of a source.  Returns -1 if not\n * found.\n */\nBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n  var relativeSource = aSource;\n  if (this.sourceRoot != null) {\n    relativeSource = util.relative(this.sourceRoot, relativeSource);\n  }\n\n  if (this._sources.has(relativeSource)) {\n    return this._sources.indexOf(relativeSource);\n  }\n\n  // Maybe aSource is an absolute URL as returned by |sources|.  In\n  // this case we can't simply undo the transform.\n  var i;\n  for (i = 0; i < this._absoluteSources.length; ++i) {\n    if (this._absoluteSources[i] == aSource) {\n      return i;\n    }\n  }\n\n  return -1;\n};\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n *        The source map that will be consumed.\n * @param String aSourceMapURL\n *        The URL at which the source map can be found (optional)\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n  function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n    var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n    var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n    var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n    smc.sourceRoot = aSourceMap._sourceRoot;\n    smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n                                                            smc.sourceRoot);\n    smc.file = aSourceMap._file;\n    smc._sourceMapURL = aSourceMapURL;\n    smc._absoluteSources = smc._sources.toArray().map(function (s) {\n      return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n    });\n\n    // Because we are modifying the entries (by converting string sources and\n    // names to indices into the sources and names ArraySets), we have to make\n    // a copy of the entry or else bad things happen. Shared mutable state\n    // strikes again! See github issue #191.\n\n    var generatedMappings = aSourceMap._mappings.toArray().slice();\n    var destGeneratedMappings = smc.__generatedMappings = [];\n    var destOriginalMappings = smc.__originalMappings = [];\n\n    for (var i = 0, length = generatedMappings.length; i < length; i++) {\n      var srcMapping = generatedMappings[i];\n      var destMapping = new Mapping;\n      destMapping.generatedLine = srcMapping.generatedLine;\n      destMapping.generatedColumn = srcMapping.generatedColumn;\n\n      if (srcMapping.source) {\n        destMapping.source = sources.indexOf(srcMapping.source);\n        destMapping.originalLine = srcMapping.originalLine;\n        destMapping.originalColumn = srcMapping.originalColumn;\n\n        if (srcMapping.name) {\n          destMapping.name = names.indexOf(srcMapping.name);\n        }\n\n        destOriginalMappings.push(destMapping);\n      }\n\n      destGeneratedMappings.push(destMapping);\n    }\n\n    quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n    return smc;\n  };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n  get: function () {\n    return this._absoluteSources.slice();\n  }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n  this.generatedLine = 0;\n  this.generatedColumn = 0;\n  this.source = null;\n  this.originalLine = null;\n  this.originalColumn = null;\n  this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\n\nconst compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine;\nfunction sortGenerated(array, start) {\n  let l = array.length;\n  let n = array.length - start;\n  if (n <= 1) {\n    return;\n  } else if (n == 2) {\n    let a = array[start];\n    let b = array[start + 1];\n    if (compareGenerated(a, b) > 0) {\n      array[start] = b;\n      array[start + 1] = a;\n    }\n  } else if (n < 20) {\n    for (let i = start; i < l; i++) {\n      for (let j = i; j > start; j--) {\n        let a = array[j - 1];\n        let b = array[j];\n        if (compareGenerated(a, b) <= 0) {\n          break;\n        }\n        array[j - 1] = b;\n        array[j] = a;\n      }\n    }\n  } else {\n    quickSort(array, compareGenerated, start);\n  }\n}\nBasicSourceMapConsumer.prototype._parseMappings =\n  function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n    var generatedLine = 1;\n    var previousGeneratedColumn = 0;\n    var previousOriginalLine = 0;\n    var previousOriginalColumn = 0;\n    var previousSource = 0;\n    var previousName = 0;\n    var length = aStr.length;\n    var index = 0;\n    var cachedSegments = {};\n    var temp = {};\n    var originalMappings = [];\n    var generatedMappings = [];\n    var mapping, str, segment, end, value;\n\n    let subarrayStart = 0;\n    while (index < length) {\n      if (aStr.charAt(index) === ';') {\n        generatedLine++;\n        index++;\n        previousGeneratedColumn = 0;\n\n        sortGenerated(generatedMappings, subarrayStart);\n        subarrayStart = generatedMappings.length;\n      }\n      else if (aStr.charAt(index) === ',') {\n        index++;\n      }\n      else {\n        mapping = new Mapping();\n        mapping.generatedLine = generatedLine;\n\n        for (end = index; end < length; end++) {\n          if (this._charIsMappingSeparator(aStr, end)) {\n            break;\n          }\n        }\n        str = aStr.slice(index, end);\n\n        segment = [];\n        while (index < end) {\n          base64VLQ.decode(aStr, index, temp);\n          value = temp.value;\n          index = temp.rest;\n          segment.push(value);\n        }\n\n        if (segment.length === 2) {\n          throw new Error('Found a source, but no line and column');\n        }\n\n        if (segment.length === 3) {\n          throw new Error('Found a source and line, but no column');\n        }\n\n        // Generated column.\n        mapping.generatedColumn = previousGeneratedColumn + segment[0];\n        previousGeneratedColumn = mapping.generatedColumn;\n\n        if (segment.length > 1) {\n          // Original source.\n          mapping.source = previousSource + segment[1];\n          previousSource += segment[1];\n\n          // Original line.\n          mapping.originalLine = previousOriginalLine + segment[2];\n          previousOriginalLine = mapping.originalLine;\n          // Lines are stored 0-based\n          mapping.originalLine += 1;\n\n          // Original column.\n          mapping.originalColumn = previousOriginalColumn + segment[3];\n          previousOriginalColumn = mapping.originalColumn;\n\n          if (segment.length > 4) {\n            // Original name.\n            mapping.name = previousName + segment[4];\n            previousName += segment[4];\n          }\n        }\n\n        generatedMappings.push(mapping);\n        if (typeof mapping.originalLine === 'number') {\n          let currentSource = mapping.source;\n          while (originalMappings.length <= currentSource) {\n            originalMappings.push(null);\n          }\n          if (originalMappings[currentSource] === null) {\n            originalMappings[currentSource] = [];\n          }\n          originalMappings[currentSource].push(mapping);\n        }\n      }\n    }\n\n    sortGenerated(generatedMappings, subarrayStart);\n    this.__generatedMappings = generatedMappings;\n\n    for (var i = 0; i < originalMappings.length; i++) {\n      if (originalMappings[i] != null) {\n        quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource);\n      }\n    }\n    this.__originalMappings = [].concat(...originalMappings);\n  };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n  function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n                                         aColumnName, aComparator, aBias) {\n    // To return the position we are searching for, we must first find the\n    // mapping for the given position and then return the opposite position it\n    // points to. Because the mappings are sorted, we can use binary search to\n    // find the best mapping.\n\n    if (aNeedle[aLineName] <= 0) {\n      throw new TypeError('Line must be greater than or equal to 1, got '\n                          + aNeedle[aLineName]);\n    }\n    if (aNeedle[aColumnName] < 0) {\n      throw new TypeError('Column must be greater than or equal to 0, got '\n                          + aNeedle[aColumnName]);\n    }\n\n    return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n  };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n  function SourceMapConsumer_computeColumnSpans() {\n    for (var index = 0; index < this._generatedMappings.length; ++index) {\n      var mapping = this._generatedMappings[index];\n\n      // Mappings do not contain a field for the last generated columnt. We\n      // can come up with an optimistic estimate, however, by assuming that\n      // mappings are contiguous (i.e. given two consecutive mappings, the\n      // first mapping ends where the second one starts).\n      if (index + 1 < this._generatedMappings.length) {\n        var nextMapping = this._generatedMappings[index + 1];\n\n        if (mapping.generatedLine === nextMapping.generatedLine) {\n          mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n          continue;\n        }\n      }\n\n      // The last mapping for each line spans the entire line.\n      mapping.lastGeneratedColumn = Infinity;\n    }\n  };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n *   - line: The line number in the generated source.  The line number\n *     is 1-based.\n *   - column: The column number in the generated source.  The column\n *     number is 0-based.\n *   - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n *     'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n *     closest element that is smaller than or greater than the one we are\n *     searching for, respectively, if the exact element cannot be found.\n *     Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n *   - source: The original source file, or null.\n *   - line: The line number in the original source, or null.  The\n *     line number is 1-based.\n *   - column: The column number in the original source, or null.  The\n *     column number is 0-based.\n *   - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n  function SourceMapConsumer_originalPositionFor(aArgs) {\n    var needle = {\n      generatedLine: util.getArg(aArgs, 'line'),\n      generatedColumn: util.getArg(aArgs, 'column')\n    };\n\n    var index = this._findMapping(\n      needle,\n      this._generatedMappings,\n      \"generatedLine\",\n      \"generatedColumn\",\n      util.compareByGeneratedPositionsDeflated,\n      util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n    );\n\n    if (index >= 0) {\n      var mapping = this._generatedMappings[index];\n\n      if (mapping.generatedLine === needle.generatedLine) {\n        var source = util.getArg(mapping, 'source', null);\n        if (source !== null) {\n          source = this._sources.at(source);\n          source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n        }\n        var name = util.getArg(mapping, 'name', null);\n        if (name !== null) {\n          name = this._names.at(name);\n        }\n        return {\n          source: source,\n          line: util.getArg(mapping, 'originalLine', null),\n          column: util.getArg(mapping, 'originalColumn', null),\n          name: name\n        };\n      }\n    }\n\n    return {\n      source: null,\n      line: null,\n      column: null,\n      name: null\n    };\n  };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n  function BasicSourceMapConsumer_hasContentsOfAllSources() {\n    if (!this.sourcesContent) {\n      return false;\n    }\n    return this.sourcesContent.length >= this._sources.size() &&\n      !this.sourcesContent.some(function (sc) { return sc == null; });\n  };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n  function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n    if (!this.sourcesContent) {\n      return null;\n    }\n\n    var index = this._findSourceIndex(aSource);\n    if (index >= 0) {\n      return this.sourcesContent[index];\n    }\n\n    var relativeSource = aSource;\n    if (this.sourceRoot != null) {\n      relativeSource = util.relative(this.sourceRoot, relativeSource);\n    }\n\n    var url;\n    if (this.sourceRoot != null\n        && (url = util.urlParse(this.sourceRoot))) {\n      // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n      // many users. We can help them out when they expect file:// URIs to\n      // behave like it would if they were running a local HTTP server. See\n      // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n      var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n      if (url.scheme == \"file\"\n          && this._sources.has(fileUriAbsPath)) {\n        return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n      }\n\n      if ((!url.path || url.path == \"/\")\n          && this._sources.has(\"/\" + relativeSource)) {\n        return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n      }\n    }\n\n    // This function is used recursively from\n    // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n    // don't want to throw if we can't find the source - we just want to\n    // return null, so we provide a flag to exit gracefully.\n    if (nullOnMissing) {\n      return null;\n    }\n    else {\n      throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n    }\n  };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n *   - source: The filename of the original source.\n *   - line: The line number in the original source.  The line number\n *     is 1-based.\n *   - column: The column number in the original source.  The column\n *     number is 0-based.\n *   - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n *     'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n *     closest element that is smaller than or greater than the one we are\n *     searching for, respectively, if the exact element cannot be found.\n *     Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n *   - line: The line number in the generated source, or null.  The\n *     line number is 1-based.\n *   - column: The column number in the generated source, or null.\n *     The column number is 0-based.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n  function SourceMapConsumer_generatedPositionFor(aArgs) {\n    var source = util.getArg(aArgs, 'source');\n    source = this._findSourceIndex(source);\n    if (source < 0) {\n      return {\n        line: null,\n        column: null,\n        lastColumn: null\n      };\n    }\n\n    var needle = {\n      source: source,\n      originalLine: util.getArg(aArgs, 'line'),\n      originalColumn: util.getArg(aArgs, 'column')\n    };\n\n    var index = this._findMapping(\n      needle,\n      this._originalMappings,\n      \"originalLine\",\n      \"originalColumn\",\n      util.compareByOriginalPositions,\n      util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n    );\n\n    if (index >= 0) {\n      var mapping = this._originalMappings[index];\n\n      if (mapping.source === needle.source) {\n        return {\n          line: util.getArg(mapping, 'generatedLine', null),\n          column: util.getArg(mapping, 'generatedColumn', null),\n          lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n        };\n      }\n    }\n\n    return {\n      line: null,\n      column: null,\n      lastColumn: null\n    };\n  };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The first parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n *   - version: Which version of the source map spec this map is following.\n *   - file: Optional. The generated file this source map is associated with.\n *   - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n *   - offset: The offset into the original specified at which this section\n *       begins to apply, defined as an object with a \"line\" and \"column\"\n *       field.\n *   - map: A source map definition. This source map could also be indexed,\n *       but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n *  {\n *    version : 3,\n *    file: \"app.js\",\n *    sections: [{\n *      offset: {line:100, column:10},\n *      map: {\n *        version : 3,\n *        file: \"section.js\",\n *        sources: [\"foo.js\", \"bar.js\"],\n *        names: [\"src\", \"maps\", \"are\", \"fun\"],\n *        mappings: \"AAAA,E;;ABCDE;\"\n *      }\n *    }],\n *  }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found.  This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n  var sourceMap = aSourceMap;\n  if (typeof aSourceMap === 'string') {\n    sourceMap = util.parseSourceMapInput(aSourceMap);\n  }\n\n  var version = util.getArg(sourceMap, 'version');\n  var sections = util.getArg(sourceMap, 'sections');\n\n  if (version != this._version) {\n    throw new Error('Unsupported version: ' + version);\n  }\n\n  this._sources = new ArraySet();\n  this._names = new ArraySet();\n\n  var lastOffset = {\n    line: -1,\n    column: 0\n  };\n  this._sections = sections.map(function (s) {\n    if (s.url) {\n      // The url field will require support for asynchronicity.\n      // See https://github.com/mozilla/source-map/issues/16\n      throw new Error('Support for url field in sections not implemented.');\n    }\n    var offset = util.getArg(s, 'offset');\n    var offsetLine = util.getArg(offset, 'line');\n    var offsetColumn = util.getArg(offset, 'column');\n\n    if (offsetLine < lastOffset.line ||\n        (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n      throw new Error('Section offsets must be ordered and non-overlapping.');\n    }\n    lastOffset = offset;\n\n    return {\n      generatedOffset: {\n        // The offset fields are 0-based, but we use 1-based indices when\n        // encoding/decoding from VLQ.\n        generatedLine: offsetLine + 1,\n        generatedColumn: offsetColumn + 1\n      },\n      consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n    }\n  });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n  get: function () {\n    var sources = [];\n    for (var i = 0; i < this._sections.length; i++) {\n      for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n        sources.push(this._sections[i].consumer.sources[j]);\n      }\n    }\n    return sources;\n  }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n *   - line: The line number in the generated source.  The line number\n *     is 1-based.\n *   - column: The column number in the generated source.  The column\n *     number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n *   - source: The original source file, or null.\n *   - line: The line number in the original source, or null.  The\n *     line number is 1-based.\n *   - column: The column number in the original source, or null.  The\n *     column number is 0-based.\n *   - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n  function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n    var needle = {\n      generatedLine: util.getArg(aArgs, 'line'),\n      generatedColumn: util.getArg(aArgs, 'column')\n    };\n\n    // Find the section containing the generated position we're trying to map\n    // to an original position.\n    var sectionIndex = binarySearch.search(needle, this._sections,\n      function(needle, section) {\n        var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n        if (cmp) {\n          return cmp;\n        }\n\n        return (needle.generatedColumn -\n                section.generatedOffset.generatedColumn);\n      });\n    var section = this._sections[sectionIndex];\n\n    if (!section) {\n      return {\n        source: null,\n        line: null,\n        column: null,\n        name: null\n      };\n    }\n\n    return section.consumer.originalPositionFor({\n      line: needle.generatedLine -\n        (section.generatedOffset.generatedLine - 1),\n      column: needle.generatedColumn -\n        (section.generatedOffset.generatedLine === needle.generatedLine\n         ? section.generatedOffset.generatedColumn - 1\n         : 0),\n      bias: aArgs.bias\n    });\n  };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n  function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n    return this._sections.every(function (s) {\n      return s.consumer.hasContentsOfAllSources();\n    });\n  };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n  function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n    for (var i = 0; i < this._sections.length; i++) {\n      var section = this._sections[i];\n\n      var content = section.consumer.sourceContentFor(aSource, true);\n      if (content || content === '') {\n        return content;\n      }\n    }\n    if (nullOnMissing) {\n      return null;\n    }\n    else {\n      throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n    }\n  };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n *   - source: The filename of the original source.\n *   - line: The line number in the original source.  The line number\n *     is 1-based.\n *   - column: The column number in the original source.  The column\n *     number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n *   - line: The line number in the generated source, or null.  The\n *     line number is 1-based. \n *   - column: The column number in the generated source, or null.\n *     The column number is 0-based.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n  function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n    for (var i = 0; i < this._sections.length; i++) {\n      var section = this._sections[i];\n\n      // Only consider this section if the requested source is in the list of\n      // sources of the consumer.\n      if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n        continue;\n      }\n      var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n      if (generatedPosition) {\n        var ret = {\n          line: generatedPosition.line +\n            (section.generatedOffset.generatedLine - 1),\n          column: generatedPosition.column +\n            (section.generatedOffset.generatedLine === generatedPosition.line\n             ? section.generatedOffset.generatedColumn - 1\n             : 0)\n        };\n        return ret;\n      }\n    }\n\n    return {\n      line: null,\n      column: null\n    };\n  };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n  function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n    this.__generatedMappings = [];\n    this.__originalMappings = [];\n    for (var i = 0; i < this._sections.length; i++) {\n      var section = this._sections[i];\n      var sectionMappings = section.consumer._generatedMappings;\n      for (var j = 0; j < sectionMappings.length; j++) {\n        var mapping = sectionMappings[j];\n\n        var source = section.consumer._sources.at(mapping.source);\n        if(source !== null) {\n          source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n        }\n        this._sources.add(source);\n        source = this._sources.indexOf(source);\n\n        var name = null;\n        if (mapping.name) {\n          name = section.consumer._names.at(mapping.name);\n          this._names.add(name);\n          name = this._names.indexOf(name);\n        }\n\n        // The mappings coming from the consumer for the section have\n        // generated positions relative to the start of the section, so we\n        // need to offset them to be relative to the start of the concatenated\n        // generated file.\n        var adjustedMapping = {\n          source: source,\n          generatedLine: mapping.generatedLine +\n            (section.generatedOffset.generatedLine - 1),\n          generatedColumn: mapping.generatedColumn +\n            (section.generatedOffset.generatedLine === mapping.generatedLine\n            ? section.generatedOffset.generatedColumn - 1\n            : 0),\n          originalLine: mapping.originalLine,\n          originalColumn: mapping.originalColumn,\n          name: name\n        };\n\n        this.__generatedMappings.push(adjustedMapping);\n        if (typeof adjustedMapping.originalLine === 'number') {\n          this.__originalMappings.push(adjustedMapping);\n        }\n      }\n    }\n\n    quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n    quickSort(this.__originalMappings, util.compareByOriginalPositions);\n  };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n *        generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n  this.children = [];\n  this.sourceContents = {};\n  this.line = aLine == null ? null : aLine;\n  this.column = aColumn == null ? null : aColumn;\n  this.source = aSource == null ? null : aSource;\n  this.name = aName == null ? null : aName;\n  this[isSourceNode] = true;\n  if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n *        SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n  function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n    // The SourceNode we want to fill with the generated code\n    // and the SourceMap\n    var node = new SourceNode();\n\n    // All even indices of this array are one line of the generated code,\n    // while all odd indices are the newlines between two adjacent lines\n    // (since `REGEX_NEWLINE` captures its match).\n    // Processed fragments are accessed by calling `shiftNextLine`.\n    var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n    var remainingLinesIndex = 0;\n    var shiftNextLine = function() {\n      var lineContents = getNextLine();\n      // The last line of a file might not have a newline.\n      var newLine = getNextLine() || \"\";\n      return lineContents + newLine;\n\n      function getNextLine() {\n        return remainingLinesIndex < remainingLines.length ?\n            remainingLines[remainingLinesIndex++] : undefined;\n      }\n    };\n\n    // We need to remember the position of \"remainingLines\"\n    var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n    // The generate SourceNodes we need a code range.\n    // To extract it current and last mapping is used.\n    // Here we store the last mapping.\n    var lastMapping = null;\n\n    aSourceMapConsumer.eachMapping(function (mapping) {\n      if (lastMapping !== null) {\n        // We add the code from \"lastMapping\" to \"mapping\":\n        // First check if there is a new line in between.\n        if (lastGeneratedLine < mapping.generatedLine) {\n          // Associate first line with \"lastMapping\"\n          addMappingWithCode(lastMapping, shiftNextLine());\n          lastGeneratedLine++;\n          lastGeneratedColumn = 0;\n          // The remaining code is added without mapping\n        } else {\n          // There is no new line in between.\n          // Associate the code between \"lastGeneratedColumn\" and\n          // \"mapping.generatedColumn\" with \"lastMapping\"\n          var nextLine = remainingLines[remainingLinesIndex] || '';\n          var code = nextLine.substr(0, mapping.generatedColumn -\n                                        lastGeneratedColumn);\n          remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n                                              lastGeneratedColumn);\n          lastGeneratedColumn = mapping.generatedColumn;\n          addMappingWithCode(lastMapping, code);\n          // No more remaining code, continue\n          lastMapping = mapping;\n          return;\n        }\n      }\n      // We add the generated code until the first mapping\n      // to the SourceNode without any mapping.\n      // Each line is added as separate string.\n      while (lastGeneratedLine < mapping.generatedLine) {\n        node.add(shiftNextLine());\n        lastGeneratedLine++;\n      }\n      if (lastGeneratedColumn < mapping.generatedColumn) {\n        var nextLine = remainingLines[remainingLinesIndex] || '';\n        node.add(nextLine.substr(0, mapping.generatedColumn));\n        remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n        lastGeneratedColumn = mapping.generatedColumn;\n      }\n      lastMapping = mapping;\n    }, this);\n    // We have processed all mappings.\n    if (remainingLinesIndex < remainingLines.length) {\n      if (lastMapping) {\n        // Associate the remaining code in the current line with \"lastMapping\"\n        addMappingWithCode(lastMapping, shiftNextLine());\n      }\n      // and add the remaining lines without any mapping\n      node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n    }\n\n    // Copy sourcesContent into SourceNode\n    aSourceMapConsumer.sources.forEach(function (sourceFile) {\n      var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n      if (content != null) {\n        if (aRelativePath != null) {\n          sourceFile = util.join(aRelativePath, sourceFile);\n        }\n        node.setSourceContent(sourceFile, content);\n      }\n    });\n\n    return node;\n\n    function addMappingWithCode(mapping, code) {\n      if (mapping === null || mapping.source === undefined) {\n        node.add(code);\n      } else {\n        var source = aRelativePath\n          ? util.join(aRelativePath, mapping.source)\n          : mapping.source;\n        node.add(new SourceNode(mapping.originalLine,\n                                mapping.originalColumn,\n                                source,\n                                code,\n                                mapping.name));\n      }\n    }\n  };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n *        SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n  if (Array.isArray(aChunk)) {\n    aChunk.forEach(function (chunk) {\n      this.add(chunk);\n    }, this);\n  }\n  else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n    if (aChunk) {\n      this.children.push(aChunk);\n    }\n  }\n  else {\n    throw new TypeError(\n      \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n    );\n  }\n  return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n *        SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n  if (Array.isArray(aChunk)) {\n    for (var i = aChunk.length-1; i >= 0; i--) {\n      this.prepend(aChunk[i]);\n    }\n  }\n  else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n    this.children.unshift(aChunk);\n  }\n  else {\n    throw new TypeError(\n      \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n    );\n  }\n  return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n  var chunk;\n  for (var i = 0, len = this.children.length; i < len; i++) {\n    chunk = this.children[i];\n    if (chunk[isSourceNode]) {\n      chunk.walk(aFn);\n    }\n    else {\n      if (chunk !== '') {\n        aFn(chunk, { source: this.source,\n                     line: this.line,\n                     column: this.column,\n                     name: this.name });\n      }\n    }\n  }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n  var newChildren;\n  var i;\n  var len = this.children.length;\n  if (len > 0) {\n    newChildren = [];\n    for (i = 0; i < len-1; i++) {\n      newChildren.push(this.children[i]);\n      newChildren.push(aSep);\n    }\n    newChildren.push(this.children[i]);\n    this.children = newChildren;\n  }\n  return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n  var lastChild = this.children[this.children.length - 1];\n  if (lastChild[isSourceNode]) {\n    lastChild.replaceRight(aPattern, aReplacement);\n  }\n  else if (typeof lastChild === 'string') {\n    this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n  }\n  else {\n    this.children.push(''.replace(aPattern, aReplacement));\n  }\n  return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n  function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n    this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n  };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n  function SourceNode_walkSourceContents(aFn) {\n    for (var i = 0, len = this.children.length; i < len; i++) {\n      if (this.children[i][isSourceNode]) {\n        this.children[i].walkSourceContents(aFn);\n      }\n    }\n\n    var sources = Object.keys(this.sourceContents);\n    for (var i = 0, len = sources.length; i < len; i++) {\n      aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n    }\n  };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n  var str = \"\";\n  this.walk(function (chunk) {\n    str += chunk;\n  });\n  return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n  var generated = {\n    code: \"\",\n    line: 1,\n    column: 0\n  };\n  var map = new SourceMapGenerator(aArgs);\n  var sourceMappingActive = false;\n  var lastOriginalSource = null;\n  var lastOriginalLine = null;\n  var lastOriginalColumn = null;\n  var lastOriginalName = null;\n  this.walk(function (chunk, original) {\n    generated.code += chunk;\n    if (original.source !== null\n        && original.line !== null\n        && original.column !== null) {\n      if(lastOriginalSource !== original.source\n         || lastOriginalLine !== original.line\n         || lastOriginalColumn !== original.column\n         || lastOriginalName !== original.name) {\n        map.addMapping({\n          source: original.source,\n          original: {\n            line: original.line,\n            column: original.column\n          },\n          generated: {\n            line: generated.line,\n            column: generated.column\n          },\n          name: original.name\n        });\n      }\n      lastOriginalSource = original.source;\n      lastOriginalLine = original.line;\n      lastOriginalColumn = original.column;\n      lastOriginalName = original.name;\n      sourceMappingActive = true;\n    } else if (sourceMappingActive) {\n      map.addMapping({\n        generated: {\n          line: generated.line,\n          column: generated.column\n        }\n      });\n      lastOriginalSource = null;\n      sourceMappingActive = false;\n    }\n    for (var idx = 0, length = chunk.length; idx < length; idx++) {\n      if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n        generated.line++;\n        generated.column = 0;\n        // Mappings end at eol\n        if (idx + 1 === length) {\n          lastOriginalSource = null;\n          sourceMappingActive = false;\n        } else if (sourceMappingActive) {\n          map.addMapping({\n            source: original.source,\n            original: {\n              line: original.line,\n              column: original.column\n            },\n            generated: {\n              line: generated.line,\n              column: generated.column\n            },\n            name: original.name\n          });\n        }\n      } else {\n        generated.column++;\n      }\n    }\n  });\n  this.walkSourceContents(function (sourceFile, sourceContent) {\n    map.setSourceContent(sourceFile, sourceContent);\n  });\n\n  return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n","/**\n* @vue/compiler-core v3.5.18\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar shared = require('@vue/shared');\nvar decode_js = require('entities/lib/decode.js');\nvar parser = require('@babel/parser');\nvar estreeWalker = require('estree-walker');\nvar sourceMapJs = require('source-map-js');\n\nconst FRAGMENT = Symbol(``);\nconst TELEPORT = Symbol(``);\nconst SUSPENSE = Symbol(``);\nconst KEEP_ALIVE = Symbol(``);\nconst BASE_TRANSITION = Symbol(\n  ``\n);\nconst OPEN_BLOCK = Symbol(``);\nconst CREATE_BLOCK = Symbol(``);\nconst CREATE_ELEMENT_BLOCK = Symbol(\n  ``\n);\nconst CREATE_VNODE = Symbol(``);\nconst CREATE_ELEMENT_VNODE = Symbol(\n  ``\n);\nconst CREATE_COMMENT = Symbol(\n  ``\n);\nconst CREATE_TEXT = Symbol(\n  ``\n);\nconst CREATE_STATIC = Symbol(\n  ``\n);\nconst RESOLVE_COMPONENT = Symbol(\n  ``\n);\nconst RESOLVE_DYNAMIC_COMPONENT = Symbol(\n  ``\n);\nconst RESOLVE_DIRECTIVE = Symbol(\n  ``\n);\nconst RESOLVE_FILTER = Symbol(\n  ``\n);\nconst WITH_DIRECTIVES = Symbol(\n  ``\n);\nconst RENDER_LIST = Symbol(``);\nconst RENDER_SLOT = Symbol(``);\nconst CREATE_SLOTS = Symbol(``);\nconst TO_DISPLAY_STRING = Symbol(\n  ``\n);\nconst MERGE_PROPS = Symbol(``);\nconst NORMALIZE_CLASS = Symbol(\n  ``\n);\nconst NORMALIZE_STYLE = Symbol(\n  ``\n);\nconst NORMALIZE_PROPS = Symbol(\n  ``\n);\nconst GUARD_REACTIVE_PROPS = Symbol(\n  ``\n);\nconst TO_HANDLERS = Symbol(``);\nconst CAMELIZE = Symbol(``);\nconst CAPITALIZE = Symbol(``);\nconst TO_HANDLER_KEY = Symbol(\n  ``\n);\nconst SET_BLOCK_TRACKING = Symbol(\n  ``\n);\nconst PUSH_SCOPE_ID = Symbol(``);\nconst POP_SCOPE_ID = Symbol(``);\nconst WITH_CTX = Symbol(``);\nconst UNREF = Symbol(``);\nconst IS_REF = Symbol(``);\nconst WITH_MEMO = Symbol(``);\nconst IS_MEMO_SAME = Symbol(``);\nconst helperNameMap = {\n  [FRAGMENT]: `Fragment`,\n  [TELEPORT]: `Teleport`,\n  [SUSPENSE]: `Suspense`,\n  [KEEP_ALIVE]: `KeepAlive`,\n  [BASE_TRANSITION]: `BaseTransition`,\n  [OPEN_BLOCK]: `openBlock`,\n  [CREATE_BLOCK]: `createBlock`,\n  [CREATE_ELEMENT_BLOCK]: `createElementBlock`,\n  [CREATE_VNODE]: `createVNode`,\n  [CREATE_ELEMENT_VNODE]: `createElementVNode`,\n  [CREATE_COMMENT]: `createCommentVNode`,\n  [CREATE_TEXT]: `createTextVNode`,\n  [CREATE_STATIC]: `createStaticVNode`,\n  [RESOLVE_COMPONENT]: `resolveComponent`,\n  [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`,\n  [RESOLVE_DIRECTIVE]: `resolveDirective`,\n  [RESOLVE_FILTER]: `resolveFilter`,\n  [WITH_DIRECTIVES]: `withDirectives`,\n  [RENDER_LIST]: `renderList`,\n  [RENDER_SLOT]: `renderSlot`,\n  [CREATE_SLOTS]: `createSlots`,\n  [TO_DISPLAY_STRING]: `toDisplayString`,\n  [MERGE_PROPS]: `mergeProps`,\n  [NORMALIZE_CLASS]: `normalizeClass`,\n  [NORMALIZE_STYLE]: `normalizeStyle`,\n  [NORMALIZE_PROPS]: `normalizeProps`,\n  [GUARD_REACTIVE_PROPS]: `guardReactiveProps`,\n  [TO_HANDLERS]: `toHandlers`,\n  [CAMELIZE]: `camelize`,\n  [CAPITALIZE]: `capitalize`,\n  [TO_HANDLER_KEY]: `toHandlerKey`,\n  [SET_BLOCK_TRACKING]: `setBlockTracking`,\n  [PUSH_SCOPE_ID]: `pushScopeId`,\n  [POP_SCOPE_ID]: `popScopeId`,\n  [WITH_CTX]: `withCtx`,\n  [UNREF]: `unref`,\n  [IS_REF]: `isRef`,\n  [WITH_MEMO]: `withMemo`,\n  [IS_MEMO_SAME]: `isMemoSame`\n};\nfunction registerRuntimeHelpers(helpers) {\n  Object.getOwnPropertySymbols(helpers).forEach((s) => {\n    helperNameMap[s] = helpers[s];\n  });\n}\n\nconst Namespaces = {\n  \"HTML\": 0,\n  \"0\": \"HTML\",\n  \"SVG\": 1,\n  \"1\": \"SVG\",\n  \"MATH_ML\": 2,\n  \"2\": \"MATH_ML\"\n};\nconst NodeTypes = {\n  \"ROOT\": 0,\n  \"0\": \"ROOT\",\n  \"ELEMENT\": 1,\n  \"1\": \"ELEMENT\",\n  \"TEXT\": 2,\n  \"2\": \"TEXT\",\n  \"COMMENT\": 3,\n  \"3\": \"COMMENT\",\n  \"SIMPLE_EXPRESSION\": 4,\n  \"4\": \"SIMPLE_EXPRESSION\",\n  \"INTERPOLATION\": 5,\n  \"5\": \"INTERPOLATION\",\n  \"ATTRIBUTE\": 6,\n  \"6\": \"ATTRIBUTE\",\n  \"DIRECTIVE\": 7,\n  \"7\": \"DIRECTIVE\",\n  \"COMPOUND_EXPRESSION\": 8,\n  \"8\": \"COMPOUND_EXPRESSION\",\n  \"IF\": 9,\n  \"9\": \"IF\",\n  \"IF_BRANCH\": 10,\n  \"10\": \"IF_BRANCH\",\n  \"FOR\": 11,\n  \"11\": \"FOR\",\n  \"TEXT_CALL\": 12,\n  \"12\": \"TEXT_CALL\",\n  \"VNODE_CALL\": 13,\n  \"13\": \"VNODE_CALL\",\n  \"JS_CALL_EXPRESSION\": 14,\n  \"14\": \"JS_CALL_EXPRESSION\",\n  \"JS_OBJECT_EXPRESSION\": 15,\n  \"15\": \"JS_OBJECT_EXPRESSION\",\n  \"JS_PROPERTY\": 16,\n  \"16\": \"JS_PROPERTY\",\n  \"JS_ARRAY_EXPRESSION\": 17,\n  \"17\": \"JS_ARRAY_EXPRESSION\",\n  \"JS_FUNCTION_EXPRESSION\": 18,\n  \"18\": \"JS_FUNCTION_EXPRESSION\",\n  \"JS_CONDITIONAL_EXPRESSION\": 19,\n  \"19\": \"JS_CONDITIONAL_EXPRESSION\",\n  \"JS_CACHE_EXPRESSION\": 20,\n  \"20\": \"JS_CACHE_EXPRESSION\",\n  \"JS_BLOCK_STATEMENT\": 21,\n  \"21\": \"JS_BLOCK_STATEMENT\",\n  \"JS_TEMPLATE_LITERAL\": 22,\n  \"22\": \"JS_TEMPLATE_LITERAL\",\n  \"JS_IF_STATEMENT\": 23,\n  \"23\": \"JS_IF_STATEMENT\",\n  \"JS_ASSIGNMENT_EXPRESSION\": 24,\n  \"24\": \"JS_ASSIGNMENT_EXPRESSION\",\n  \"JS_SEQUENCE_EXPRESSION\": 25,\n  \"25\": \"JS_SEQUENCE_EXPRESSION\",\n  \"JS_RETURN_STATEMENT\": 26,\n  \"26\": \"JS_RETURN_STATEMENT\"\n};\nconst ElementTypes = {\n  \"ELEMENT\": 0,\n  \"0\": \"ELEMENT\",\n  \"COMPONENT\": 1,\n  \"1\": \"COMPONENT\",\n  \"SLOT\": 2,\n  \"2\": \"SLOT\",\n  \"TEMPLATE\": 3,\n  \"3\": \"TEMPLATE\"\n};\nconst ConstantTypes = {\n  \"NOT_CONSTANT\": 0,\n  \"0\": \"NOT_CONSTANT\",\n  \"CAN_SKIP_PATCH\": 1,\n  \"1\": \"CAN_SKIP_PATCH\",\n  \"CAN_CACHE\": 2,\n  \"2\": \"CAN_CACHE\",\n  \"CAN_STRINGIFY\": 3,\n  \"3\": \"CAN_STRINGIFY\"\n};\nconst locStub = {\n  start: { line: 1, column: 1, offset: 0 },\n  end: { line: 1, column: 1, offset: 0 },\n  source: \"\"\n};\nfunction createRoot(children, source = \"\") {\n  return {\n    type: 0,\n    source,\n    children,\n    helpers: /* @__PURE__ */ new Set(),\n    components: [],\n    directives: [],\n    hoists: [],\n    imports: [],\n    cached: [],\n    temps: 0,\n    codegenNode: void 0,\n    loc: locStub\n  };\n}\nfunction createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) {\n  if (context) {\n    if (isBlock) {\n      context.helper(OPEN_BLOCK);\n      context.helper(getVNodeBlockHelper(context.inSSR, isComponent));\n    } else {\n      context.helper(getVNodeHelper(context.inSSR, isComponent));\n    }\n    if (directives) {\n      context.helper(WITH_DIRECTIVES);\n    }\n  }\n  return {\n    type: 13,\n    tag,\n    props,\n    children,\n    patchFlag,\n    dynamicProps,\n    directives,\n    isBlock,\n    disableTracking,\n    isComponent,\n    loc\n  };\n}\nfunction createArrayExpression(elements, loc = locStub) {\n  return {\n    type: 17,\n    loc,\n    elements\n  };\n}\nfunction createObjectExpression(properties, loc = locStub) {\n  return {\n    type: 15,\n    loc,\n    properties\n  };\n}\nfunction createObjectProperty(key, value) {\n  return {\n    type: 16,\n    loc: locStub,\n    key: shared.isString(key) ? createSimpleExpression(key, true) : key,\n    value\n  };\n}\nfunction createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) {\n  return {\n    type: 4,\n    loc,\n    content,\n    isStatic,\n    constType: isStatic ? 3 : constType\n  };\n}\nfunction createInterpolation(content, loc) {\n  return {\n    type: 5,\n    loc,\n    content: shared.isString(content) ? createSimpleExpression(content, false, loc) : content\n  };\n}\nfunction createCompoundExpression(children, loc = locStub) {\n  return {\n    type: 8,\n    loc,\n    children\n  };\n}\nfunction createCallExpression(callee, args = [], loc = locStub) {\n  return {\n    type: 14,\n    loc,\n    callee,\n    arguments: args\n  };\n}\nfunction createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) {\n  return {\n    type: 18,\n    params,\n    returns,\n    newline,\n    isSlot,\n    loc\n  };\n}\nfunction createConditionalExpression(test, consequent, alternate, newline = true) {\n  return {\n    type: 19,\n    test,\n    consequent,\n    alternate,\n    newline,\n    loc: locStub\n  };\n}\nfunction createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) {\n  return {\n    type: 20,\n    index,\n    value,\n    needPauseTracking,\n    inVOnce,\n    needArraySpread: false,\n    loc: locStub\n  };\n}\nfunction createBlockStatement(body) {\n  return {\n    type: 21,\n    body,\n    loc: locStub\n  };\n}\nfunction createTemplateLiteral(elements) {\n  return {\n    type: 22,\n    elements,\n    loc: locStub\n  };\n}\nfunction createIfStatement(test, consequent, alternate) {\n  return {\n    type: 23,\n    test,\n    consequent,\n    alternate,\n    loc: locStub\n  };\n}\nfunction createAssignmentExpression(left, right) {\n  return {\n    type: 24,\n    left,\n    right,\n    loc: locStub\n  };\n}\nfunction createSequenceExpression(expressions) {\n  return {\n    type: 25,\n    expressions,\n    loc: locStub\n  };\n}\nfunction createReturnStatement(returns) {\n  return {\n    type: 26,\n    returns,\n    loc: locStub\n  };\n}\nfunction getVNodeHelper(ssr, isComponent) {\n  return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;\n}\nfunction getVNodeBlockHelper(ssr, isComponent) {\n  return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;\n}\nfunction convertToBlock(node, { helper, removeHelper, inSSR }) {\n  if (!node.isBlock) {\n    node.isBlock = true;\n    removeHelper(getVNodeHelper(inSSR, node.isComponent));\n    helper(OPEN_BLOCK);\n    helper(getVNodeBlockHelper(inSSR, node.isComponent));\n  }\n}\n\nconst defaultDelimitersOpen = new Uint8Array([123, 123]);\nconst defaultDelimitersClose = new Uint8Array([125, 125]);\nfunction isTagStartChar(c) {\n  return c >= 97 && c <= 122 || c >= 65 && c <= 90;\n}\nfunction isWhitespace(c) {\n  return c === 32 || c === 10 || c === 9 || c === 12 || c === 13;\n}\nfunction isEndOfTagSection(c) {\n  return c === 47 || c === 62 || isWhitespace(c);\n}\nfunction toCharCodes(str) {\n  const ret = new Uint8Array(str.length);\n  for (let i = 0; i < str.length; i++) {\n    ret[i] = str.charCodeAt(i);\n  }\n  return ret;\n}\nconst Sequences = {\n  Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),\n  // CDATA[\n  CdataEnd: new Uint8Array([93, 93, 62]),\n  // ]]>\n  CommentEnd: new Uint8Array([45, 45, 62]),\n  // `-->`\n  ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]),\n  // `<\\/script`\n  StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]),\n  // `</style`\n  TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]),\n  // `</title`\n  TextareaEnd: new Uint8Array([\n    60,\n    47,\n    116,\n    101,\n    120,\n    116,\n    97,\n    114,\n    101,\n    97\n  ])\n  // `</textarea\n};\nclass Tokenizer {\n  constructor(stack, cbs) {\n    this.stack = stack;\n    this.cbs = cbs;\n    /** The current state the tokenizer is in. */\n    this.state = 1;\n    /** The read buffer. */\n    this.buffer = \"\";\n    /** The beginning of the section that is currently being read. */\n    this.sectionStart = 0;\n    /** The index within the buffer that we are currently looking at. */\n    this.index = 0;\n    /** The start of the last entity. */\n    this.entityStart = 0;\n    /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */\n    this.baseState = 1;\n    /** For special parsing behavior inside of script and style tags. */\n    this.inRCDATA = false;\n    /** For disabling RCDATA tags handling */\n    this.inXML = false;\n    /** For disabling interpolation parsing in v-pre */\n    this.inVPre = false;\n    /** Record newline positions for fast line / column calculation */\n    this.newlines = [];\n    this.mode = 0;\n    this.delimiterOpen = defaultDelimitersOpen;\n    this.delimiterClose = defaultDelimitersClose;\n    this.delimiterIndex = -1;\n    this.currentSequence = void 0;\n    this.sequenceIndex = 0;\n    {\n      this.entityDecoder = new decode_js.EntityDecoder(\n        decode_js.htmlDecodeTree,\n        (cp, consumed) => this.emitCodePoint(cp, consumed)\n      );\n    }\n  }\n  get inSFCRoot() {\n    return this.mode === 2 && this.stack.length === 0;\n  }\n  reset() {\n    this.state = 1;\n    this.mode = 0;\n    this.buffer = \"\";\n    this.sectionStart = 0;\n    this.index = 0;\n    this.baseState = 1;\n    this.inRCDATA = false;\n    this.currentSequence = void 0;\n    this.newlines.length = 0;\n    this.delimiterOpen = defaultDelimitersOpen;\n    this.delimiterClose = defaultDelimitersClose;\n  }\n  /**\n   * Generate Position object with line / column information using recorded\n   * newline positions. We know the index is always going to be an already\n   * processed index, so all the newlines up to this index should have been\n   * recorded.\n   */\n  getPos(index) {\n    let line = 1;\n    let column = index + 1;\n    for (let i = this.newlines.length - 1; i >= 0; i--) {\n      const newlineIndex = this.newlines[i];\n      if (index > newlineIndex) {\n        line = i + 2;\n        column = index - newlineIndex;\n        break;\n      }\n    }\n    return {\n      column,\n      line,\n      offset: index\n    };\n  }\n  peek() {\n    return this.buffer.charCodeAt(this.index + 1);\n  }\n  stateText(c) {\n    if (c === 60) {\n      if (this.index > this.sectionStart) {\n        this.cbs.ontext(this.sectionStart, this.index);\n      }\n      this.state = 5;\n      this.sectionStart = this.index;\n    } else if (c === 38) {\n      this.startEntity();\n    } else if (!this.inVPre && c === this.delimiterOpen[0]) {\n      this.state = 2;\n      this.delimiterIndex = 0;\n      this.stateInterpolationOpen(c);\n    }\n  }\n  stateInterpolationOpen(c) {\n    if (c === this.delimiterOpen[this.delimiterIndex]) {\n      if (this.delimiterIndex === this.delimiterOpen.length - 1) {\n        const start = this.index + 1 - this.delimiterOpen.length;\n        if (start > this.sectionStart) {\n          this.cbs.ontext(this.sectionStart, start);\n        }\n        this.state = 3;\n        this.sectionStart = start;\n      } else {\n        this.delimiterIndex++;\n      }\n    } else if (this.inRCDATA) {\n      this.state = 32;\n      this.stateInRCDATA(c);\n    } else {\n      this.state = 1;\n      this.stateText(c);\n    }\n  }\n  stateInterpolation(c) {\n    if (c === this.delimiterClose[0]) {\n      this.state = 4;\n      this.delimiterIndex = 0;\n      this.stateInterpolationClose(c);\n    }\n  }\n  stateInterpolationClose(c) {\n    if (c === this.delimiterClose[this.delimiterIndex]) {\n      if (this.delimiterIndex === this.delimiterClose.length - 1) {\n        this.cbs.oninterpolation(this.sectionStart, this.index + 1);\n        if (this.inRCDATA) {\n          this.state = 32;\n        } else {\n          this.state = 1;\n        }\n        this.sectionStart = this.index + 1;\n      } else {\n        this.delimiterIndex++;\n      }\n    } else {\n      this.state = 3;\n      this.stateInterpolation(c);\n    }\n  }\n  stateSpecialStartSequence(c) {\n    const isEnd = this.sequenceIndex === this.currentSequence.length;\n    const isMatch = isEnd ? (\n      // If we are at the end of the sequence, make sure the tag name has ended\n      isEndOfTagSection(c)\n    ) : (\n      // Otherwise, do a case-insensitive comparison\n      (c | 32) === this.currentSequence[this.sequenceIndex]\n    );\n    if (!isMatch) {\n      this.inRCDATA = false;\n    } else if (!isEnd) {\n      this.sequenceIndex++;\n      return;\n    }\n    this.sequenceIndex = 0;\n    this.state = 6;\n    this.stateInTagName(c);\n  }\n  /** Look for an end tag. For <title> and <textarea>, also decode entities. */\n  stateInRCDATA(c) {\n    if (this.sequenceIndex === this.currentSequence.length) {\n      if (c === 62 || isWhitespace(c)) {\n        const endOfText = this.index - this.currentSequence.length;\n        if (this.sectionStart < endOfText) {\n          const actualIndex = this.index;\n          this.index = endOfText;\n          this.cbs.ontext(this.sectionStart, endOfText);\n          this.index = actualIndex;\n        }\n        this.sectionStart = endOfText + 2;\n        this.stateInClosingTagName(c);\n        this.inRCDATA = false;\n        return;\n      }\n      this.sequenceIndex = 0;\n    }\n    if ((c | 32) === this.currentSequence[this.sequenceIndex]) {\n      this.sequenceIndex += 1;\n    } else if (this.sequenceIndex === 0) {\n      if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) {\n        if (c === 38) {\n          this.startEntity();\n        } else if (!this.inVPre && c === this.delimiterOpen[0]) {\n          this.state = 2;\n          this.delimiterIndex = 0;\n          this.stateInterpolationOpen(c);\n        }\n      } else if (this.fastForwardTo(60)) {\n        this.sequenceIndex = 1;\n      }\n    } else {\n      this.sequenceIndex = Number(c === 60);\n    }\n  }\n  stateCDATASequence(c) {\n    if (c === Sequences.Cdata[this.sequenceIndex]) {\n      if (++this.sequenceIndex === Sequences.Cdata.length) {\n        this.state = 28;\n        this.currentSequence = Sequences.CdataEnd;\n        this.sequenceIndex = 0;\n        this.sectionStart = this.index + 1;\n      }\n    } else {\n      this.sequenceIndex = 0;\n      this.state = 23;\n      this.stateInDeclaration(c);\n    }\n  }\n  /**\n   * When we wait for one specific character, we can speed things up\n   * by skipping through the buffer until we find it.\n   *\n   * @returns Whether the character was found.\n   */\n  fastForwardTo(c) {\n    while (++this.index < this.buffer.length) {\n      const cc = this.buffer.charCodeAt(this.index);\n      if (cc === 10) {\n        this.newlines.push(this.index);\n      }\n      if (cc === c) {\n        return true;\n      }\n    }\n    this.index = this.buffer.length - 1;\n    return false;\n  }\n  /**\n   * Comments and CDATA end with `-->` and `]]>`.\n   *\n   * Their common qualities are:\n   * - Their end sequences have a distinct character they start with.\n   * - That character is then repeated, so we have to check multiple repeats.\n   * - All characters but the start character of the sequence can be skipped.\n   */\n  stateInCommentLike(c) {\n    if (c === this.currentSequence[this.sequenceIndex]) {\n      if (++this.sequenceIndex === this.currentSequence.length) {\n        if (this.currentSequence === Sequences.CdataEnd) {\n          this.cbs.oncdata(this.sectionStart, this.index - 2);\n        } else {\n          this.cbs.oncomment(this.sectionStart, this.index - 2);\n        }\n        this.sequenceIndex = 0;\n        this.sectionStart = this.index + 1;\n        this.state = 1;\n      }\n    } else if (this.sequenceIndex === 0) {\n      if (this.fastForwardTo(this.currentSequence[0])) {\n        this.sequenceIndex = 1;\n      }\n    } else if (c !== this.currentSequence[this.sequenceIndex - 1]) {\n      this.sequenceIndex = 0;\n    }\n  }\n  startSpecial(sequence, offset) {\n    this.enterRCDATA(sequence, offset);\n    this.state = 31;\n  }\n  enterRCDATA(sequence, offset) {\n    this.inRCDATA = true;\n    this.currentSequence = sequence;\n    this.sequenceIndex = offset;\n  }\n  stateBeforeTagName(c) {\n    if (c === 33) {\n      this.state = 22;\n      this.sectionStart = this.index + 1;\n    } else if (c === 63) {\n      this.state = 24;\n      this.sectionStart = this.index + 1;\n    } else if (isTagStartChar(c)) {\n      this.sectionStart = this.index;\n      if (this.mode === 0) {\n        this.state = 6;\n      } else if (this.inSFCRoot) {\n        this.state = 34;\n      } else if (!this.inXML) {\n        if (c === 116) {\n          this.state = 30;\n        } else {\n          this.state = c === 115 ? 29 : 6;\n        }\n      } else {\n        this.state = 6;\n      }\n    } else if (c === 47) {\n      this.state = 8;\n    } else {\n      this.state = 1;\n      this.stateText(c);\n    }\n  }\n  stateInTagName(c) {\n    if (isEndOfTagSection(c)) {\n      this.handleTagName(c);\n    }\n  }\n  stateInSFCRootTagName(c) {\n    if (isEndOfTagSection(c)) {\n      const tag = this.buffer.slice(this.sectionStart, this.index);\n      if (tag !== \"template\") {\n        this.enterRCDATA(toCharCodes(`</` + tag), 0);\n      }\n      this.handleTagName(c);\n    }\n  }\n  handleTagName(c) {\n    this.cbs.onopentagname(this.sectionStart, this.index);\n    this.sectionStart = -1;\n    this.state = 11;\n    this.stateBeforeAttrName(c);\n  }\n  stateBeforeClosingTagName(c) {\n    if (isWhitespace(c)) ; else if (c === 62) {\n      {\n        this.cbs.onerr(14, this.index);\n      }\n      this.state = 1;\n      this.sectionStart = this.index + 1;\n    } else {\n      this.state = isTagStartChar(c) ? 9 : 27;\n      this.sectionStart = this.index;\n    }\n  }\n  stateInClosingTagName(c) {\n    if (c === 62 || isWhitespace(c)) {\n      this.cbs.onclosetag(this.sectionStart, this.index);\n      this.sectionStart = -1;\n      this.state = 10;\n      this.stateAfterClosingTagName(c);\n    }\n  }\n  stateAfterClosingTagName(c) {\n    if (c === 62) {\n      this.state = 1;\n      this.sectionStart = this.index + 1;\n    }\n  }\n  stateBeforeAttrName(c) {\n    if (c === 62) {\n      this.cbs.onopentagend(this.index);\n      if (this.inRCDATA) {\n        this.state = 32;\n      } else {\n        this.state = 1;\n      }\n      this.sectionStart = this.index + 1;\n    } else if (c === 47) {\n      this.state = 7;\n      if (this.peek() !== 62) {\n        this.cbs.onerr(22, this.index);\n      }\n    } else if (c === 60 && this.peek() === 47) {\n      this.cbs.onopentagend(this.index);\n      this.state = 5;\n      this.sectionStart = this.index;\n    } else if (!isWhitespace(c)) {\n      if (c === 61) {\n        this.cbs.onerr(\n          19,\n          this.index\n        );\n      }\n      this.handleAttrStart(c);\n    }\n  }\n  handleAttrStart(c) {\n    if (c === 118 && this.peek() === 45) {\n      this.state = 13;\n      this.sectionStart = this.index;\n    } else if (c === 46 || c === 58 || c === 64 || c === 35) {\n      this.cbs.ondirname(this.index, this.index + 1);\n      this.state = 14;\n      this.sectionStart = this.index + 1;\n    } else {\n      this.state = 12;\n      this.sectionStart = this.index;\n    }\n  }\n  stateInSelfClosingTag(c) {\n    if (c === 62) {\n      this.cbs.onselfclosingtag(this.index);\n      this.state = 1;\n      this.sectionStart = this.index + 1;\n      this.inRCDATA = false;\n    } else if (!isWhitespace(c)) {\n      this.state = 11;\n      this.stateBeforeAttrName(c);\n    }\n  }\n  stateInAttrName(c) {\n    if (c === 61 || isEndOfTagSection(c)) {\n      this.cbs.onattribname(this.sectionStart, this.index);\n      this.handleAttrNameEnd(c);\n    } else if (c === 34 || c === 39 || c === 60) {\n      this.cbs.onerr(\n        17,\n        this.index\n      );\n    }\n  }\n  stateInDirName(c) {\n    if (c === 61 || isEndOfTagSection(c)) {\n      this.cbs.ondirname(this.sectionStart, this.index);\n      this.handleAttrNameEnd(c);\n    } else if (c === 58) {\n      this.cbs.ondirname(this.sectionStart, this.index);\n      this.state = 14;\n      this.sectionStart = this.index + 1;\n    } else if (c === 46) {\n      this.cbs.ondirname(this.sectionStart, this.index);\n      this.state = 16;\n      this.sectionStart = this.index + 1;\n    }\n  }\n  stateInDirArg(c) {\n    if (c === 61 || isEndOfTagSection(c)) {\n      this.cbs.ondirarg(this.sectionStart, this.index);\n      this.handleAttrNameEnd(c);\n    } else if (c === 91) {\n      this.state = 15;\n    } else if (c === 46) {\n      this.cbs.ondirarg(this.sectionStart, this.index);\n      this.state = 16;\n      this.sectionStart = this.index + 1;\n    }\n  }\n  stateInDynamicDirArg(c) {\n    if (c === 93) {\n      this.state = 14;\n    } else if (c === 61 || isEndOfTagSection(c)) {\n      this.cbs.ondirarg(this.sectionStart, this.index + 1);\n      this.handleAttrNameEnd(c);\n      {\n        this.cbs.onerr(\n          27,\n          this.index\n        );\n      }\n    }\n  }\n  stateInDirModifier(c) {\n    if (c === 61 || isEndOfTagSection(c)) {\n      this.cbs.ondirmodifier(this.sectionStart, this.index);\n      this.handleAttrNameEnd(c);\n    } else if (c === 46) {\n      this.cbs.ondirmodifier(this.sectionStart, this.index);\n      this.sectionStart = this.index + 1;\n    }\n  }\n  handleAttrNameEnd(c) {\n    this.sectionStart = this.index;\n    this.state = 17;\n    this.cbs.onattribnameend(this.index);\n    this.stateAfterAttrName(c);\n  }\n  stateAfterAttrName(c) {\n    if (c === 61) {\n      this.state = 18;\n    } else if (c === 47 || c === 62) {\n      this.cbs.onattribend(0, this.sectionStart);\n      this.sectionStart = -1;\n      this.state = 11;\n      this.stateBeforeAttrName(c);\n    } else if (!isWhitespace(c)) {\n      this.cbs.onattribend(0, this.sectionStart);\n      this.handleAttrStart(c);\n    }\n  }\n  stateBeforeAttrValue(c) {\n    if (c === 34) {\n      this.state = 19;\n      this.sectionStart = this.index + 1;\n    } else if (c === 39) {\n      this.state = 20;\n      this.sectionStart = this.index + 1;\n    } else if (!isWhitespace(c)) {\n      this.sectionStart = this.index;\n      this.state = 21;\n      this.stateInAttrValueNoQuotes(c);\n    }\n  }\n  handleInAttrValue(c, quote) {\n    if (c === quote || false) {\n      this.cbs.onattribdata(this.sectionStart, this.index);\n      this.sectionStart = -1;\n      this.cbs.onattribend(\n        quote === 34 ? 3 : 2,\n        this.index + 1\n      );\n      this.state = 11;\n    } else if (c === 38) {\n      this.startEntity();\n    }\n  }\n  stateInAttrValueDoubleQuotes(c) {\n    this.handleInAttrValue(c, 34);\n  }\n  stateInAttrValueSingleQuotes(c) {\n    this.handleInAttrValue(c, 39);\n  }\n  stateInAttrValueNoQuotes(c) {\n    if (isWhitespace(c) || c === 62) {\n      this.cbs.onattribdata(this.sectionStart, this.index);\n      this.sectionStart = -1;\n      this.cbs.onattribend(1, this.index);\n      this.state = 11;\n      this.stateBeforeAttrName(c);\n    } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) {\n      this.cbs.onerr(\n        18,\n        this.index\n      );\n    } else if (c === 38) {\n      this.startEntity();\n    }\n  }\n  stateBeforeDeclaration(c) {\n    if (c === 91) {\n      this.state = 26;\n      this.sequenceIndex = 0;\n    } else {\n      this.state = c === 45 ? 25 : 23;\n    }\n  }\n  stateInDeclaration(c) {\n    if (c === 62 || this.fastForwardTo(62)) {\n      this.state = 1;\n      this.sectionStart = this.index + 1;\n    }\n  }\n  stateInProcessingInstruction(c) {\n    if (c === 62 || this.fastForwardTo(62)) {\n      this.cbs.onprocessinginstruction(this.sectionStart, this.index);\n      this.state = 1;\n      this.sectionStart = this.index + 1;\n    }\n  }\n  stateBeforeComment(c) {\n    if (c === 45) {\n      this.state = 28;\n      this.currentSequence = Sequences.CommentEnd;\n      this.sequenceIndex = 2;\n      this.sectionStart = this.index + 1;\n    } else {\n      this.state = 23;\n    }\n  }\n  stateInSpecialComment(c) {\n    if (c === 62 || this.fastForwardTo(62)) {\n      this.cbs.oncomment(this.sectionStart, this.index);\n      this.state = 1;\n      this.sectionStart = this.index + 1;\n    }\n  }\n  stateBeforeSpecialS(c) {\n    if (c === Sequences.ScriptEnd[3]) {\n      this.startSpecial(Sequences.ScriptEnd, 4);\n    } else if (c === Sequences.StyleEnd[3]) {\n      this.startSpecial(Sequences.StyleEnd, 4);\n    } else {\n      this.state = 6;\n      this.stateInTagName(c);\n    }\n  }\n  stateBeforeSpecialT(c) {\n    if (c === Sequences.TitleEnd[3]) {\n      this.startSpecial(Sequences.TitleEnd, 4);\n    } else if (c === Sequences.TextareaEnd[3]) {\n      this.startSpecial(Sequences.TextareaEnd, 4);\n    } else {\n      this.state = 6;\n      this.stateInTagName(c);\n    }\n  }\n  startEntity() {\n    {\n      this.baseState = this.state;\n      this.state = 33;\n      this.entityStart = this.index;\n      this.entityDecoder.startEntity(\n        this.baseState === 1 || this.baseState === 32 ? decode_js.DecodingMode.Legacy : decode_js.DecodingMode.Attribute\n      );\n    }\n  }\n  stateInEntity() {\n    {\n      const length = this.entityDecoder.write(this.buffer, this.index);\n      if (length >= 0) {\n        this.state = this.baseState;\n        if (length === 0) {\n          this.index = this.entityStart;\n        }\n      } else {\n        this.index = this.buffer.length - 1;\n      }\n    }\n  }\n  /**\n   * Iterates through the buffer, calling the function corresponding to the current state.\n   *\n   * States that are more likely to be hit are higher up, as a performance improvement.\n   */\n  parse(input) {\n    this.buffer = input;\n    while (this.index < this.buffer.length) {\n      const c = this.buffer.charCodeAt(this.index);\n      if (c === 10 && this.state !== 33) {\n        this.newlines.push(this.index);\n      }\n      switch (this.state) {\n        case 1: {\n          this.stateText(c);\n          break;\n        }\n        case 2: {\n          this.stateInterpolationOpen(c);\n          break;\n        }\n        case 3: {\n          this.stateInterpolation(c);\n          break;\n        }\n        case 4: {\n          this.stateInterpolationClose(c);\n          break;\n        }\n        case 31: {\n          this.stateSpecialStartSequence(c);\n          break;\n        }\n        case 32: {\n          this.stateInRCDATA(c);\n          break;\n        }\n        case 26: {\n          this.stateCDATASequence(c);\n          break;\n        }\n        case 19: {\n          this.stateInAttrValueDoubleQuotes(c);\n          break;\n        }\n        case 12: {\n          this.stateInAttrName(c);\n          break;\n        }\n        case 13: {\n          this.stateInDirName(c);\n          break;\n        }\n        case 14: {\n          this.stateInDirArg(c);\n          break;\n        }\n        case 15: {\n          this.stateInDynamicDirArg(c);\n          break;\n        }\n        case 16: {\n          this.stateInDirModifier(c);\n          break;\n        }\n        case 28: {\n          this.stateInCommentLike(c);\n          break;\n        }\n        case 27: {\n          this.stateInSpecialComment(c);\n          break;\n        }\n        case 11: {\n          this.stateBeforeAttrName(c);\n          break;\n        }\n        case 6: {\n          this.stateInTagName(c);\n          break;\n        }\n        case 34: {\n          this.stateInSFCRootTagName(c);\n          break;\n        }\n        case 9: {\n          this.stateInClosingTagName(c);\n          break;\n        }\n        case 5: {\n          this.stateBeforeTagName(c);\n          break;\n        }\n        case 17: {\n          this.stateAfterAttrName(c);\n          break;\n        }\n        case 20: {\n          this.stateInAttrValueSingleQuotes(c);\n          break;\n        }\n        case 18: {\n          this.stateBeforeAttrValue(c);\n          break;\n        }\n        case 8: {\n          this.stateBeforeClosingTagName(c);\n          break;\n        }\n        case 10: {\n          this.stateAfterClosingTagName(c);\n          break;\n        }\n        case 29: {\n          this.stateBeforeSpecialS(c);\n          break;\n        }\n        case 30: {\n          this.stateBeforeSpecialT(c);\n          break;\n        }\n        case 21: {\n          this.stateInAttrValueNoQuotes(c);\n          break;\n        }\n        case 7: {\n          this.stateInSelfClosingTag(c);\n          break;\n        }\n        case 23: {\n          this.stateInDeclaration(c);\n          break;\n        }\n        case 22: {\n          this.stateBeforeDeclaration(c);\n          break;\n        }\n        case 25: {\n          this.stateBeforeComment(c);\n          break;\n        }\n        case 24: {\n          this.stateInProcessingInstruction(c);\n          break;\n        }\n        case 33: {\n          this.stateInEntity();\n          break;\n        }\n      }\n      this.index++;\n    }\n    this.cleanup();\n    this.finish();\n  }\n  /**\n   * Remove data that has already been consumed from the buffer.\n   */\n  cleanup() {\n    if (this.sectionStart !== this.index) {\n      if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) {\n        this.cbs.ontext(this.sectionStart, this.index);\n        this.sectionStart = this.index;\n      } else if (this.state === 19 || this.state === 20 || this.state === 21) {\n        this.cbs.onattribdata(this.sectionStart, this.index);\n        this.sectionStart = this.index;\n      }\n    }\n  }\n  finish() {\n    if (this.state === 33) {\n      this.entityDecoder.end();\n      this.state = this.baseState;\n    }\n    this.handleTrailingData();\n    this.cbs.onend();\n  }\n  /** Handle any trailing data. */\n  handleTrailingData() {\n    const endIndex = this.buffer.length;\n    if (this.sectionStart >= endIndex) {\n      return;\n    }\n    if (this.state === 28) {\n      if (this.currentSequence === Sequences.CdataEnd) {\n        this.cbs.oncdata(this.sectionStart, endIndex);\n      } else {\n        this.cbs.oncomment(this.sectionStart, endIndex);\n      }\n    } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else {\n      this.cbs.ontext(this.sectionStart, endIndex);\n    }\n  }\n  emitCodePoint(cp, consumed) {\n    {\n      if (this.baseState !== 1 && this.baseState !== 32) {\n        if (this.sectionStart < this.entityStart) {\n          this.cbs.onattribdata(this.sectionStart, this.entityStart);\n        }\n        this.sectionStart = this.entityStart + consumed;\n        this.index = this.sectionStart - 1;\n        this.cbs.onattribentity(\n          decode_js.fromCodePoint(cp),\n          this.entityStart,\n          this.sectionStart\n        );\n      } else {\n        if (this.sectionStart < this.entityStart) {\n          this.cbs.ontext(this.sectionStart, this.entityStart);\n        }\n        this.sectionStart = this.entityStart + consumed;\n        this.index = this.sectionStart - 1;\n        this.cbs.ontextentity(\n          decode_js.fromCodePoint(cp),\n          this.entityStart,\n          this.sectionStart\n        );\n      }\n    }\n  }\n}\n\nconst CompilerDeprecationTypes = {\n  \"COMPILER_IS_ON_ELEMENT\": \"COMPILER_IS_ON_ELEMENT\",\n  \"COMPILER_V_BIND_SYNC\": \"COMPILER_V_BIND_SYNC\",\n  \"COMPILER_V_BIND_OBJECT_ORDER\": \"COMPILER_V_BIND_OBJECT_ORDER\",\n  \"COMPILER_V_ON_NATIVE\": \"COMPILER_V_ON_NATIVE\",\n  \"COMPILER_V_IF_V_FOR_PRECEDENCE\": \"COMPILER_V_IF_V_FOR_PRECEDENCE\",\n  \"COMPILER_NATIVE_TEMPLATE\": \"COMPILER_NATIVE_TEMPLATE\",\n  \"COMPILER_INLINE_TEMPLATE\": \"COMPILER_INLINE_TEMPLATE\",\n  \"COMPILER_FILTERS\": \"COMPILER_FILTERS\"\n};\nconst deprecationData = {\n  [\"COMPILER_IS_ON_ELEMENT\"]: {\n    message: `Platform-native elements with \"is\" prop will no longer be treated as components in Vue 3 unless the \"is\" value is explicitly prefixed with \"vue:\".`,\n    link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html`\n  },\n  [\"COMPILER_V_BIND_SYNC\"]: {\n    message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \\`v-bind:${key}.sync\\` should be changed to \\`v-model:${key}\\`.`,\n    link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`\n  },\n  [\"COMPILER_V_BIND_OBJECT_ORDER\"]: {\n    message: `v-bind=\"obj\" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`,\n    link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html`\n  },\n  [\"COMPILER_V_ON_NATIVE\"]: {\n    message: `.native modifier for v-on has been removed as is no longer necessary.`,\n    link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html`\n  },\n  [\"COMPILER_V_IF_V_FOR_PRECEDENCE\"]: {\n    message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`,\n    link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html`\n  },\n  [\"COMPILER_NATIVE_TEMPLATE\"]: {\n    message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.`\n  },\n  [\"COMPILER_INLINE_TEMPLATE\"]: {\n    message: `\"inline-template\" has been removed in Vue 3.`,\n    link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html`\n  },\n  [\"COMPILER_FILTERS\"]: {\n    message: `filters have been removed in Vue 3. The \"|\" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`,\n    link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`\n  }\n};\nfunction getCompatValue(key, { compatConfig }) {\n  const value = compatConfig && compatConfig[key];\n  if (key === \"MODE\") {\n    return value || 3;\n  } else {\n    return value;\n  }\n}\nfunction isCompatEnabled(key, context) {\n  const mode = getCompatValue(\"MODE\", context);\n  const value = getCompatValue(key, context);\n  return mode === 3 ? value === true : value !== false;\n}\nfunction checkCompatEnabled(key, context, loc, ...args) {\n  const enabled = isCompatEnabled(key, context);\n  return enabled;\n}\nfunction warnDeprecation(key, context, loc, ...args) {\n  const val = getCompatValue(key, context);\n  if (val === \"suppress-warning\") {\n    return;\n  }\n  const { message, link } = deprecationData[key];\n  const msg = `(deprecation ${key}) ${typeof message === \"function\" ? message(...args) : message}${link ? `\n  Details: ${link}` : ``}`;\n  const err = new SyntaxError(msg);\n  err.code = key;\n  if (loc) err.loc = loc;\n  context.onWarn(err);\n}\n\nfunction defaultOnError(error) {\n  throw error;\n}\nfunction defaultOnWarn(msg) {\n}\nfunction createCompilerError(code, loc, messages, additionalMessage) {\n  const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ;\n  const error = new SyntaxError(String(msg));\n  error.code = code;\n  error.loc = loc;\n  return error;\n}\nconst ErrorCodes = {\n  \"ABRUPT_CLOSING_OF_EMPTY_COMMENT\": 0,\n  \"0\": \"ABRUPT_CLOSING_OF_EMPTY_COMMENT\",\n  \"CDATA_IN_HTML_CONTENT\": 1,\n  \"1\": \"CDATA_IN_HTML_CONTENT\",\n  \"DUPLICATE_ATTRIBUTE\": 2,\n  \"2\": \"DUPLICATE_ATTRIBUTE\",\n  \"END_TAG_WITH_ATTRIBUTES\": 3,\n  \"3\": \"END_TAG_WITH_ATTRIBUTES\",\n  \"END_TAG_WITH_TRAILING_SOLIDUS\": 4,\n  \"4\": \"END_TAG_WITH_TRAILING_SOLIDUS\",\n  \"EOF_BEFORE_TAG_NAME\": 5,\n  \"5\": \"EOF_BEFORE_TAG_NAME\",\n  \"EOF_IN_CDATA\": 6,\n  \"6\": \"EOF_IN_CDATA\",\n  \"EOF_IN_COMMENT\": 7,\n  \"7\": \"EOF_IN_COMMENT\",\n  \"EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT\": 8,\n  \"8\": \"EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT\",\n  \"EOF_IN_TAG\": 9,\n  \"9\": \"EOF_IN_TAG\",\n  \"INCORRECTLY_CLOSED_COMMENT\": 10,\n  \"10\": \"INCORRECTLY_CLOSED_COMMENT\",\n  \"INCORRECTLY_OPENED_COMMENT\": 11,\n  \"11\": \"INCORRECTLY_OPENED_COMMENT\",\n  \"INVALID_FIRST_CHARACTER_OF_TAG_NAME\": 12,\n  \"12\": \"INVALID_FIRST_CHARACTER_OF_TAG_NAME\",\n  \"MISSING_ATTRIBUTE_VALUE\": 13,\n  \"13\": \"MISSING_ATTRIBUTE_VALUE\",\n  \"MISSING_END_TAG_NAME\": 14,\n  \"14\": \"MISSING_END_TAG_NAME\",\n  \"MISSING_WHITESPACE_BETWEEN_ATTRIBUTES\": 15,\n  \"15\": \"MISSING_WHITESPACE_BETWEEN_ATTRIBUTES\",\n  \"NESTED_COMMENT\": 16,\n  \"16\": \"NESTED_COMMENT\",\n  \"UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME\": 17,\n  \"17\": \"UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME\",\n  \"UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE\": 18,\n  \"18\": \"UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE\",\n  \"UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME\": 19,\n  \"19\": \"UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME\",\n  \"UNEXPECTED_NULL_CHARACTER\": 20,\n  \"20\": \"UNEXPECTED_NULL_CHARACTER\",\n  \"UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME\": 21,\n  \"21\": \"UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME\",\n  \"UNEXPECTED_SOLIDUS_IN_TAG\": 22,\n  \"22\": \"UNEXPECTED_SOLIDUS_IN_TAG\",\n  \"X_INVALID_END_TAG\": 23,\n  \"23\": \"X_INVALID_END_TAG\",\n  \"X_MISSING_END_TAG\": 24,\n  \"24\": \"X_MISSING_END_TAG\",\n  \"X_MISSING_INTERPOLATION_END\": 25,\n  \"25\": \"X_MISSING_INTERPOLATION_END\",\n  \"X_MISSING_DIRECTIVE_NAME\": 26,\n  \"26\": \"X_MISSING_DIRECTIVE_NAME\",\n  \"X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END\": 27,\n  \"27\": \"X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END\",\n  \"X_V_IF_NO_EXPRESSION\": 28,\n  \"28\": \"X_V_IF_NO_EXPRESSION\",\n  \"X_V_IF_SAME_KEY\": 29,\n  \"29\": \"X_V_IF_SAME_KEY\",\n  \"X_V_ELSE_NO_ADJACENT_IF\": 30,\n  \"30\": \"X_V_ELSE_NO_ADJACENT_IF\",\n  \"X_V_FOR_NO_EXPRESSION\": 31,\n  \"31\": \"X_V_FOR_NO_EXPRESSION\",\n  \"X_V_FOR_MALFORMED_EXPRESSION\": 32,\n  \"32\": \"X_V_FOR_MALFORMED_EXPRESSION\",\n  \"X_V_FOR_TEMPLATE_KEY_PLACEMENT\": 33,\n  \"33\": \"X_V_FOR_TEMPLATE_KEY_PLACEMENT\",\n  \"X_V_BIND_NO_EXPRESSION\": 34,\n  \"34\": \"X_V_BIND_NO_EXPRESSION\",\n  \"X_V_ON_NO_EXPRESSION\": 35,\n  \"35\": \"X_V_ON_NO_EXPRESSION\",\n  \"X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET\": 36,\n  \"36\": \"X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET\",\n  \"X_V_SLOT_MIXED_SLOT_USAGE\": 37,\n  \"37\": \"X_V_SLOT_MIXED_SLOT_USAGE\",\n  \"X_V_SLOT_DUPLICATE_SLOT_NAMES\": 38,\n  \"38\": \"X_V_SLOT_DUPLICATE_SLOT_NAMES\",\n  \"X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN\": 39,\n  \"39\": \"X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN\",\n  \"X_V_SLOT_MISPLACED\": 40,\n  \"40\": \"X_V_SLOT_MISPLACED\",\n  \"X_V_MODEL_NO_EXPRESSION\": 41,\n  \"41\": \"X_V_MODEL_NO_EXPRESSION\",\n  \"X_V_MODEL_MALFORMED_EXPRESSION\": 42,\n  \"42\": \"X_V_MODEL_MALFORMED_EXPRESSION\",\n  \"X_V_MODEL_ON_SCOPE_VARIABLE\": 43,\n  \"43\": \"X_V_MODEL_ON_SCOPE_VARIABLE\",\n  \"X_V_MODEL_ON_PROPS\": 44,\n  \"44\": \"X_V_MODEL_ON_PROPS\",\n  \"X_INVALID_EXPRESSION\": 45,\n  \"45\": \"X_INVALID_EXPRESSION\",\n  \"X_KEEP_ALIVE_INVALID_CHILDREN\": 46,\n  \"46\": \"X_KEEP_ALIVE_INVALID_CHILDREN\",\n  \"X_PREFIX_ID_NOT_SUPPORTED\": 47,\n  \"47\": \"X_PREFIX_ID_NOT_SUPPORTED\",\n  \"X_MODULE_MODE_NOT_SUPPORTED\": 48,\n  \"48\": \"X_MODULE_MODE_NOT_SUPPORTED\",\n  \"X_CACHE_HANDLER_NOT_SUPPORTED\": 49,\n  \"49\": \"X_CACHE_HANDLER_NOT_SUPPORTED\",\n  \"X_SCOPE_ID_NOT_SUPPORTED\": 50,\n  \"50\": \"X_SCOPE_ID_NOT_SUPPORTED\",\n  \"X_VNODE_HOOKS\": 51,\n  \"51\": \"X_VNODE_HOOKS\",\n  \"X_V_BIND_INVALID_SAME_NAME_ARGUMENT\": 52,\n  \"52\": \"X_V_BIND_INVALID_SAME_NAME_ARGUMENT\",\n  \"__EXTEND_POINT__\": 53,\n  \"53\": \"__EXTEND_POINT__\"\n};\nconst errorMessages = {\n  // parse errors\n  [0]: \"Illegal comment.\",\n  [1]: \"CDATA section is allowed only in XML context.\",\n  [2]: \"Duplicate attribute.\",\n  [3]: \"End tag cannot have attributes.\",\n  [4]: \"Illegal '/' in tags.\",\n  [5]: \"Unexpected EOF in tag.\",\n  [6]: \"Unexpected EOF in CDATA section.\",\n  [7]: \"Unexpected EOF in comment.\",\n  [8]: \"Unexpected EOF in script.\",\n  [9]: \"Unexpected EOF in tag.\",\n  [10]: \"Incorrectly closed comment.\",\n  [11]: \"Incorrectly opened comment.\",\n  [12]: \"Illegal tag name. Use '&lt;' to print '<'.\",\n  [13]: \"Attribute value was expected.\",\n  [14]: \"End tag name was expected.\",\n  [15]: \"Whitespace was expected.\",\n  [16]: \"Unexpected '<!--' in comment.\",\n  [17]: `Attribute name cannot contain U+0022 (\"), U+0027 ('), and U+003C (<).`,\n  [18]: \"Unquoted attribute value cannot contain U+0022 (\\\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).\",\n  [19]: \"Attribute name cannot start with '='.\",\n  [21]: \"'<?' is allowed only in XML context.\",\n  [20]: `Unexpected null character.`,\n  [22]: \"Illegal '/' in tags.\",\n  // Vue-specific parse errors\n  [23]: \"Invalid end tag.\",\n  [24]: \"Element is missing end tag.\",\n  [25]: \"Interpolation end sign was not found.\",\n  [27]: \"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.\",\n  [26]: \"Legal directive name was expected.\",\n  // transform errors\n  [28]: `v-if/v-else-if is missing expression.`,\n  [29]: `v-if/else branches must use unique keys.`,\n  [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`,\n  [31]: `v-for is missing expression.`,\n  [32]: `v-for has invalid expression.`,\n  [33]: `<template v-for> key should be placed on the <template> tag.`,\n  [34]: `v-bind is missing expression.`,\n  [52]: `v-bind with same-name shorthand only allows static argument.`,\n  [35]: `v-on is missing expression.`,\n  [36]: `Unexpected custom directive on <slot> outlet.`,\n  [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,\n  [38]: `Duplicate slot names found. `,\n  [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`,\n  [40]: `v-slot can only be used on components or <template> tags.`,\n  [41]: `v-model is missing expression.`,\n  [42]: `v-model value must be a valid JavaScript member expression.`,\n  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,\n  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.\nUse a v-bind binding combined with a v-on listener that emits update:x event instead.`,\n  [45]: `Error parsing JavaScript expression: `,\n  [46]: `<KeepAlive> expects exactly one child component.`,\n  [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,\n  // generic errors\n  [47]: `\"prefixIdentifiers\" option is not supported in this build of compiler.`,\n  [48]: `ES module mode is not supported in this build of compiler.`,\n  [49]: `\"cacheHandlers\" option is only supported when the \"prefixIdentifiers\" option is enabled.`,\n  [50]: `\"scopeId\" option is only supported in module mode.`,\n  // just to fulfill types\n  [53]: ``\n};\n\nfunction walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) {\n  const rootExp = root.type === \"Program\" ? root.body[0].type === \"ExpressionStatement\" && root.body[0].expression : root;\n  estreeWalker.walk(root, {\n    enter(node, parent) {\n      parent && parentStack.push(parent);\n      if (parent && parent.type.startsWith(\"TS\") && !TS_NODE_TYPES.includes(parent.type)) {\n        return this.skip();\n      }\n      if (node.type === \"Identifier\") {\n        const isLocal = !!knownIds[node.name];\n        const isRefed = isReferencedIdentifier(node, parent, parentStack);\n        if (includeAll || isRefed && !isLocal) {\n          onIdentifier(node, parent, parentStack, isRefed, isLocal);\n        }\n      } else if (node.type === \"ObjectProperty\" && // eslint-disable-next-line no-restricted-syntax\n      (parent == null ? void 0 : parent.type) === \"ObjectPattern\") {\n        node.inPattern = true;\n      } else if (isFunctionType(node)) {\n        if (node.scopeIds) {\n          node.scopeIds.forEach((id) => markKnownIds(id, knownIds));\n        } else {\n          walkFunctionParams(\n            node,\n            (id) => markScopeIdentifier(node, id, knownIds)\n          );\n        }\n      } else if (node.type === \"BlockStatement\") {\n        if (node.scopeIds) {\n          node.scopeIds.forEach((id) => markKnownIds(id, knownIds));\n        } else {\n          walkBlockDeclarations(\n            node,\n            (id) => markScopeIdentifier(node, id, knownIds)\n          );\n        }\n      } else if (node.type === \"CatchClause\" && node.param) {\n        for (const id of extractIdentifiers(node.param)) {\n          markScopeIdentifier(node, id, knownIds);\n        }\n      } else if (isForStatement(node)) {\n        walkForStatement(\n          node,\n          false,\n          (id) => markScopeIdentifier(node, id, knownIds)\n        );\n      }\n    },\n    leave(node, parent) {\n      parent && parentStack.pop();\n      if (node !== rootExp && node.scopeIds) {\n        for (const id of node.scopeIds) {\n          knownIds[id]--;\n          if (knownIds[id] === 0) {\n            delete knownIds[id];\n          }\n        }\n      }\n    }\n  });\n}\nfunction isReferencedIdentifier(id, parent, parentStack) {\n  if (!parent) {\n    return true;\n  }\n  if (id.name === \"arguments\") {\n    return false;\n  }\n  if (isReferenced(id, parent, parentStack[parentStack.length - 2])) {\n    return true;\n  }\n  switch (parent.type) {\n    case \"AssignmentExpression\":\n    case \"AssignmentPattern\":\n      return true;\n    case \"ObjectProperty\":\n      return parent.key !== id && isInDestructureAssignment(parent, parentStack);\n    case \"ArrayPattern\":\n      return isInDestructureAssignment(parent, parentStack);\n  }\n  return false;\n}\nfunction isInDestructureAssignment(parent, parentStack) {\n  if (parent && (parent.type === \"ObjectProperty\" || parent.type === \"ArrayPattern\")) {\n    let i = parentStack.length;\n    while (i--) {\n      const p = parentStack[i];\n      if (p.type === \"AssignmentExpression\") {\n        return true;\n      } else if (p.type !== \"ObjectProperty\" && !p.type.endsWith(\"Pattern\")) {\n        break;\n      }\n    }\n  }\n  return false;\n}\nfunction isInNewExpression(parentStack) {\n  let i = parentStack.length;\n  while (i--) {\n    const p = parentStack[i];\n    if (p.type === \"NewExpression\") {\n      return true;\n    } else if (p.type !== \"MemberExpression\") {\n      break;\n    }\n  }\n  return false;\n}\nfunction walkFunctionParams(node, onIdent) {\n  for (const p of node.params) {\n    for (const id of extractIdentifiers(p)) {\n      onIdent(id);\n    }\n  }\n}\nfunction walkBlockDeclarations(block, onIdent) {\n  for (const stmt of block.body) {\n    if (stmt.type === \"VariableDeclaration\") {\n      if (stmt.declare) continue;\n      for (const decl of stmt.declarations) {\n        for (const id of extractIdentifiers(decl.id)) {\n          onIdent(id);\n        }\n      }\n    } else if (stmt.type === \"FunctionDeclaration\" || stmt.type === \"ClassDeclaration\") {\n      if (stmt.declare || !stmt.id) continue;\n      onIdent(stmt.id);\n    } else if (isForStatement(stmt)) {\n      walkForStatement(stmt, true, onIdent);\n    }\n  }\n}\nfunction isForStatement(stmt) {\n  return stmt.type === \"ForOfStatement\" || stmt.type === \"ForInStatement\" || stmt.type === \"ForStatement\";\n}\nfunction walkForStatement(stmt, isVar, onIdent) {\n  const variable = stmt.type === \"ForStatement\" ? stmt.init : stmt.left;\n  if (variable && variable.type === \"VariableDeclaration\" && (variable.kind === \"var\" ? isVar : !isVar)) {\n    for (const decl of variable.declarations) {\n      for (const id of extractIdentifiers(decl.id)) {\n        onIdent(id);\n      }\n    }\n  }\n}\nfunction extractIdentifiers(param, nodes = []) {\n  switch (param.type) {\n    case \"Identifier\":\n      nodes.push(param);\n      break;\n    case \"MemberExpression\":\n      let object = param;\n      while (object.type === \"MemberExpression\") {\n        object = object.object;\n      }\n      nodes.push(object);\n      break;\n    case \"ObjectPattern\":\n      for (const prop of param.properties) {\n        if (prop.type === \"RestElement\") {\n          extractIdentifiers(prop.argument, nodes);\n        } else {\n          extractIdentifiers(prop.value, nodes);\n        }\n      }\n      break;\n    case \"ArrayPattern\":\n      param.elements.forEach((element) => {\n        if (element) extractIdentifiers(element, nodes);\n      });\n      break;\n    case \"RestElement\":\n      extractIdentifiers(param.argument, nodes);\n      break;\n    case \"AssignmentPattern\":\n      extractIdentifiers(param.left, nodes);\n      break;\n  }\n  return nodes;\n}\nfunction markKnownIds(name, knownIds) {\n  if (name in knownIds) {\n    knownIds[name]++;\n  } else {\n    knownIds[name] = 1;\n  }\n}\nfunction markScopeIdentifier(node, child, knownIds) {\n  const { name } = child;\n  if (node.scopeIds && node.scopeIds.has(name)) {\n    return;\n  }\n  markKnownIds(name, knownIds);\n  (node.scopeIds || (node.scopeIds = /* @__PURE__ */ new Set())).add(name);\n}\nconst isFunctionType = (node) => {\n  return /Function(?:Expression|Declaration)$|Method$/.test(node.type);\n};\nconst isStaticProperty = (node) => node && (node.type === \"ObjectProperty\" || node.type === \"ObjectMethod\") && !node.computed;\nconst isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node;\nfunction isReferenced(node, parent, grandparent) {\n  switch (parent.type) {\n    // yes: PARENT[NODE]\n    // yes: NODE.child\n    // no: parent.NODE\n    case \"MemberExpression\":\n    case \"OptionalMemberExpression\":\n      if (parent.property === node) {\n        return !!parent.computed;\n      }\n      return parent.object === node;\n    case \"JSXMemberExpression\":\n      return parent.object === node;\n    // no: let NODE = init;\n    // yes: let id = NODE;\n    case \"VariableDeclarator\":\n      return parent.init === node;\n    // yes: () => NODE\n    // no: (NODE) => {}\n    case \"ArrowFunctionExpression\":\n      return parent.body === node;\n    // no: class { #NODE; }\n    // no: class { get #NODE() {} }\n    // no: class { #NODE() {} }\n    // no: class { fn() { return this.#NODE; } }\n    case \"PrivateName\":\n      return false;\n    // no: class { NODE() {} }\n    // yes: class { [NODE]() {} }\n    // no: class { foo(NODE) {} }\n    case \"ClassMethod\":\n    case \"ClassPrivateMethod\":\n    case \"ObjectMethod\":\n      if (parent.key === node) {\n        return !!parent.computed;\n      }\n      return false;\n    // yes: { [NODE]: \"\" }\n    // no: { NODE: \"\" }\n    // depends: { NODE }\n    // depends: { key: NODE }\n    case \"ObjectProperty\":\n      if (parent.key === node) {\n        return !!parent.computed;\n      }\n      return !grandparent || grandparent.type !== \"ObjectPattern\";\n    // no: class { NODE = value; }\n    // yes: class { [NODE] = value; }\n    // yes: class { key = NODE; }\n    case \"ClassProperty\":\n      if (parent.key === node) {\n        return !!parent.computed;\n      }\n      return true;\n    case \"ClassPrivateProperty\":\n      return parent.key !== node;\n    // no: class NODE {}\n    // yes: class Foo extends NODE {}\n    case \"ClassDeclaration\":\n    case \"ClassExpression\":\n      return parent.superClass === node;\n    // yes: left = NODE;\n    // no: NODE = right;\n    case \"AssignmentExpression\":\n      return parent.right === node;\n    // no: [NODE = foo] = [];\n    // yes: [foo = NODE] = [];\n    case \"AssignmentPattern\":\n      return parent.right === node;\n    // no: NODE: for (;;) {}\n    case \"LabeledStatement\":\n      return false;\n    // no: try {} catch (NODE) {}\n    case \"CatchClause\":\n      return false;\n    // no: function foo(...NODE) {}\n    case \"RestElement\":\n      return false;\n    case \"BreakStatement\":\n    case \"ContinueStatement\":\n      return false;\n    // no: function NODE() {}\n    // no: function foo(NODE) {}\n    case \"FunctionDeclaration\":\n    case \"FunctionExpression\":\n      return false;\n    // no: export NODE from \"foo\";\n    // no: export * as NODE from \"foo\";\n    case \"ExportNamespaceSpecifier\":\n    case \"ExportDefaultSpecifier\":\n      return false;\n    // no: export { foo as NODE };\n    // yes: export { NODE as foo };\n    // no: export { NODE as foo } from \"foo\";\n    case \"ExportSpecifier\":\n      if (grandparent == null ? void 0 : grandparent.source) {\n        return false;\n      }\n      return parent.local === node;\n    // no: import NODE from \"foo\";\n    // no: import * as NODE from \"foo\";\n    // no: import { NODE as foo } from \"foo\";\n    // no: import { foo as NODE } from \"foo\";\n    // no: import NODE from \"bar\";\n    case \"ImportDefaultSpecifier\":\n    case \"ImportNamespaceSpecifier\":\n    case \"ImportSpecifier\":\n      return false;\n    // no: import \"foo\" assert { NODE: \"json\" }\n    case \"ImportAttribute\":\n      return false;\n    // no: <div NODE=\"foo\" />\n    case \"JSXAttribute\":\n      return false;\n    // no: [NODE] = [];\n    // no: ({ NODE }) = [];\n    case \"ObjectPattern\":\n    case \"ArrayPattern\":\n      return false;\n    // no: new.NODE\n    // no: NODE.target\n    case \"MetaProperty\":\n      return false;\n    // yes: type X = { someProperty: NODE }\n    // no: type X = { NODE: OtherType }\n    case \"ObjectTypeProperty\":\n      return parent.key !== node;\n    // yes: enum X { Foo = NODE }\n    // no: enum X { NODE }\n    case \"TSEnumMember\":\n      return parent.id !== node;\n    // yes: { [NODE]: value }\n    // no: { NODE: value }\n    case \"TSPropertySignature\":\n      if (parent.key === node) {\n        return !!parent.computed;\n      }\n      return true;\n  }\n  return true;\n}\nconst TS_NODE_TYPES = [\n  \"TSAsExpression\",\n  // foo as number\n  \"TSTypeAssertion\",\n  // (<number>foo)\n  \"TSNonNullExpression\",\n  // foo!\n  \"TSInstantiationExpression\",\n  // foo<string>\n  \"TSSatisfiesExpression\"\n  // foo satisfies T\n];\nfunction unwrapTSNode(node) {\n  if (TS_NODE_TYPES.includes(node.type)) {\n    return unwrapTSNode(node.expression);\n  } else {\n    return node;\n  }\n}\n\nconst isStaticExp = (p) => p.type === 4 && p.isStatic;\nfunction isCoreComponent(tag) {\n  switch (tag) {\n    case \"Teleport\":\n    case \"teleport\":\n      return TELEPORT;\n    case \"Suspense\":\n    case \"suspense\":\n      return SUSPENSE;\n    case \"KeepAlive\":\n    case \"keep-alive\":\n      return KEEP_ALIVE;\n    case \"BaseTransition\":\n    case \"base-transition\":\n      return BASE_TRANSITION;\n  }\n}\nconst nonIdentifierRE = /^$|^\\d|[^\\$\\w\\xA0-\\uFFFF]/;\nconst isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);\nconst validFirstIdentCharRE = /[A-Za-z_$\\xA0-\\uFFFF]/;\nconst validIdentCharRE = /[\\.\\?\\w$\\xA0-\\uFFFF]/;\nconst whitespaceRE = /\\s+[.[]\\s*|\\s*[.[]\\s+/g;\nconst getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;\nconst isMemberExpressionBrowser = (exp) => {\n  const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());\n  let state = 0 /* inMemberExp */;\n  let stateStack = [];\n  let currentOpenBracketCount = 0;\n  let currentOpenParensCount = 0;\n  let currentStringType = null;\n  for (let i = 0; i < path.length; i++) {\n    const char = path.charAt(i);\n    switch (state) {\n      case 0 /* inMemberExp */:\n        if (char === \"[\") {\n          stateStack.push(state);\n          state = 1 /* inBrackets */;\n          currentOpenBracketCount++;\n        } else if (char === \"(\") {\n          stateStack.push(state);\n          state = 2 /* inParens */;\n          currentOpenParensCount++;\n        } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) {\n          return false;\n        }\n        break;\n      case 1 /* inBrackets */:\n        if (char === `'` || char === `\"` || char === \"`\") {\n          stateStack.push(state);\n          state = 3 /* inString */;\n          currentStringType = char;\n        } else if (char === `[`) {\n          currentOpenBracketCount++;\n        } else if (char === `]`) {\n          if (!--currentOpenBracketCount) {\n            state = stateStack.pop();\n          }\n        }\n        break;\n      case 2 /* inParens */:\n        if (char === `'` || char === `\"` || char === \"`\") {\n          stateStack.push(state);\n          state = 3 /* inString */;\n          currentStringType = char;\n        } else if (char === `(`) {\n          currentOpenParensCount++;\n        } else if (char === `)`) {\n          if (i === path.length - 1) {\n            return false;\n          }\n          if (!--currentOpenParensCount) {\n            state = stateStack.pop();\n          }\n        }\n        break;\n      case 3 /* inString */:\n        if (char === currentStringType) {\n          state = stateStack.pop();\n          currentStringType = null;\n        }\n        break;\n    }\n  }\n  return !currentOpenBracketCount && !currentOpenParensCount;\n};\nconst isMemberExpressionNode = (exp, context) => {\n  try {\n    let ret = exp.ast || parser.parseExpression(getExpSource(exp), {\n      plugins: context.expressionPlugins ? [...context.expressionPlugins, \"typescript\"] : [\"typescript\"]\n    });\n    ret = unwrapTSNode(ret);\n    return ret.type === \"MemberExpression\" || ret.type === \"OptionalMemberExpression\" || ret.type === \"Identifier\" && ret.name !== \"undefined\";\n  } catch (e) {\n    return false;\n  }\n};\nconst isMemberExpression = isMemberExpressionNode;\nconst fnExpRE = /^\\s*(async\\s*)?(\\([^)]*?\\)|[\\w$_]+)\\s*(:[^=]+)?=>|^\\s*(async\\s+)?function(?:\\s+[\\w$]+)?\\s*\\(/;\nconst isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));\nconst isFnExpressionNode = (exp, context) => {\n  try {\n    let ret = exp.ast || parser.parseExpression(getExpSource(exp), {\n      plugins: context.expressionPlugins ? [...context.expressionPlugins, \"typescript\"] : [\"typescript\"]\n    });\n    if (ret.type === \"Program\") {\n      ret = ret.body[0];\n      if (ret.type === \"ExpressionStatement\") {\n        ret = ret.expression;\n      }\n    }\n    ret = unwrapTSNode(ret);\n    return ret.type === \"FunctionExpression\" || ret.type === \"ArrowFunctionExpression\";\n  } catch (e) {\n    return false;\n  }\n};\nconst isFnExpression = isFnExpressionNode;\nfunction advancePositionWithClone(pos, source, numberOfCharacters = source.length) {\n  return advancePositionWithMutation(\n    {\n      offset: pos.offset,\n      line: pos.line,\n      column: pos.column\n    },\n    source,\n    numberOfCharacters\n  );\n}\nfunction advancePositionWithMutation(pos, source, numberOfCharacters = source.length) {\n  let linesCount = 0;\n  let lastNewLinePos = -1;\n  for (let i = 0; i < numberOfCharacters; i++) {\n    if (source.charCodeAt(i) === 10) {\n      linesCount++;\n      lastNewLinePos = i;\n    }\n  }\n  pos.offset += numberOfCharacters;\n  pos.line += linesCount;\n  pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos;\n  return pos;\n}\nfunction assert(condition, msg) {\n  if (!condition) {\n    throw new Error(msg || `unexpected compiler condition`);\n  }\n}\nfunction findDir(node, name, allowEmpty = false) {\n  for (let i = 0; i < node.props.length; i++) {\n    const p = node.props[i];\n    if (p.type === 7 && (allowEmpty || p.exp) && (shared.isString(name) ? p.name === name : name.test(p.name))) {\n      return p;\n    }\n  }\n}\nfunction findProp(node, name, dynamicOnly = false, allowEmpty = false) {\n  for (let i = 0; i < node.props.length; i++) {\n    const p = node.props[i];\n    if (p.type === 6) {\n      if (dynamicOnly) continue;\n      if (p.name === name && (p.value || allowEmpty)) {\n        return p;\n      }\n    } else if (p.name === \"bind\" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) {\n      return p;\n    }\n  }\n}\nfunction isStaticArgOf(arg, name) {\n  return !!(arg && isStaticExp(arg) && arg.content === name);\n}\nfunction hasDynamicKeyVBind(node) {\n  return node.props.some(\n    (p) => p.type === 7 && p.name === \"bind\" && (!p.arg || // v-bind=\"obj\"\n    p.arg.type !== 4 || // v-bind:[_ctx.foo]\n    !p.arg.isStatic)\n    // v-bind:[foo]\n  );\n}\nfunction isText$1(node) {\n  return node.type === 5 || node.type === 2;\n}\nfunction isVPre(p) {\n  return p.type === 7 && p.name === \"pre\";\n}\nfunction isVSlot(p) {\n  return p.type === 7 && p.name === \"slot\";\n}\nfunction isTemplateNode(node) {\n  return node.type === 1 && node.tagType === 3;\n}\nfunction isSlotOutlet(node) {\n  return node.type === 1 && node.tagType === 2;\n}\nconst propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);\nfunction getUnnormalizedProps(props, callPath = []) {\n  if (props && !shared.isString(props) && props.type === 14) {\n    const callee = props.callee;\n    if (!shared.isString(callee) && propsHelperSet.has(callee)) {\n      return getUnnormalizedProps(\n        props.arguments[0],\n        callPath.concat(props)\n      );\n    }\n  }\n  return [props, callPath];\n}\nfunction injectProp(node, prop, context) {\n  let propsWithInjection;\n  let props = node.type === 13 ? node.props : node.arguments[2];\n  let callPath = [];\n  let parentCall;\n  if (props && !shared.isString(props) && props.type === 14) {\n    const ret = getUnnormalizedProps(props);\n    props = ret[0];\n    callPath = ret[1];\n    parentCall = callPath[callPath.length - 1];\n  }\n  if (props == null || shared.isString(props)) {\n    propsWithInjection = createObjectExpression([prop]);\n  } else if (props.type === 14) {\n    const first = props.arguments[0];\n    if (!shared.isString(first) && first.type === 15) {\n      if (!hasProp(prop, first)) {\n        first.properties.unshift(prop);\n      }\n    } else {\n      if (props.callee === TO_HANDLERS) {\n        propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [\n          createObjectExpression([prop]),\n          props\n        ]);\n      } else {\n        props.arguments.unshift(createObjectExpression([prop]));\n      }\n    }\n    !propsWithInjection && (propsWithInjection = props);\n  } else if (props.type === 15) {\n    if (!hasProp(prop, props)) {\n      props.properties.unshift(prop);\n    }\n    propsWithInjection = props;\n  } else {\n    propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [\n      createObjectExpression([prop]),\n      props\n    ]);\n    if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) {\n      parentCall = callPath[callPath.length - 2];\n    }\n  }\n  if (node.type === 13) {\n    if (parentCall) {\n      parentCall.arguments[0] = propsWithInjection;\n    } else {\n      node.props = propsWithInjection;\n    }\n  } else {\n    if (parentCall) {\n      parentCall.arguments[0] = propsWithInjection;\n    } else {\n      node.arguments[2] = propsWithInjection;\n    }\n  }\n}\nfunction hasProp(prop, props) {\n  let result = false;\n  if (prop.key.type === 4) {\n    const propKeyName = prop.key.content;\n    result = props.properties.some(\n      (p) => p.key.type === 4 && p.key.content === propKeyName\n    );\n  }\n  return result;\n}\nfunction toValidAssetId(name, type) {\n  return `_${type}_${name.replace(/[^\\w]/g, (searchValue, replaceValue) => {\n    return searchValue === \"-\" ? \"_\" : name.charCodeAt(replaceValue).toString();\n  })}`;\n}\nfunction hasScopeRef(node, ids) {\n  if (!node || Object.keys(ids).length === 0) {\n    return false;\n  }\n  switch (node.type) {\n    case 1:\n      for (let i = 0; i < node.props.length; i++) {\n        const p = node.props[i];\n        if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) {\n          return true;\n        }\n      }\n      return node.children.some((c) => hasScopeRef(c, ids));\n    case 11:\n      if (hasScopeRef(node.source, ids)) {\n        return true;\n      }\n      return node.children.some((c) => hasScopeRef(c, ids));\n    case 9:\n      return node.branches.some((b) => hasScopeRef(b, ids));\n    case 10:\n      if (hasScopeRef(node.condition, ids)) {\n        return true;\n      }\n      return node.children.some((c) => hasScopeRef(c, ids));\n    case 4:\n      return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content];\n    case 8:\n      return node.children.some((c) => shared.isObject(c) && hasScopeRef(c, ids));\n    case 5:\n    case 12:\n      return hasScopeRef(node.content, ids);\n    case 2:\n    case 3:\n    case 20:\n      return false;\n    default:\n      return false;\n  }\n}\nfunction getMemoedVNodeCall(node) {\n  if (node.type === 14 && node.callee === WITH_MEMO) {\n    return node.arguments[1].returns;\n  } else {\n    return node;\n  }\n}\nconst forAliasRE = /([\\s\\S]*?)\\s+(?:in|of)\\s+(\\S[\\s\\S]*)/;\n\nconst defaultParserOptions = {\n  parseMode: \"base\",\n  ns: 0,\n  delimiters: [`{{`, `}}`],\n  getNamespace: () => 0,\n  isVoidTag: shared.NO,\n  isPreTag: shared.NO,\n  isIgnoreNewlineTag: shared.NO,\n  isCustomElement: shared.NO,\n  onError: defaultOnError,\n  onWarn: defaultOnWarn,\n  comments: false,\n  prefixIdentifiers: false\n};\nlet currentOptions = defaultParserOptions;\nlet currentRoot = null;\nlet currentInput = \"\";\nlet currentOpenTag = null;\nlet currentProp = null;\nlet currentAttrValue = \"\";\nlet currentAttrStartIndex = -1;\nlet currentAttrEndIndex = -1;\nlet inPre = 0;\nlet inVPre = false;\nlet currentVPreBoundary = null;\nconst stack = [];\nconst tokenizer = new Tokenizer(stack, {\n  onerr: emitError,\n  ontext(start, end) {\n    onText(getSlice(start, end), start, end);\n  },\n  ontextentity(char, start, end) {\n    onText(char, start, end);\n  },\n  oninterpolation(start, end) {\n    if (inVPre) {\n      return onText(getSlice(start, end), start, end);\n    }\n    let innerStart = start + tokenizer.delimiterOpen.length;\n    let innerEnd = end - tokenizer.delimiterClose.length;\n    while (isWhitespace(currentInput.charCodeAt(innerStart))) {\n      innerStart++;\n    }\n    while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) {\n      innerEnd--;\n    }\n    let exp = getSlice(innerStart, innerEnd);\n    if (exp.includes(\"&\")) {\n      {\n        exp = decode_js.decodeHTML(exp);\n      }\n    }\n    addNode({\n      type: 5,\n      content: createExp(exp, false, getLoc(innerStart, innerEnd)),\n      loc: getLoc(start, end)\n    });\n  },\n  onopentagname(start, end) {\n    const name = getSlice(start, end);\n    currentOpenTag = {\n      type: 1,\n      tag: name,\n      ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns),\n      tagType: 0,\n      // will be refined on tag close\n      props: [],\n      children: [],\n      loc: getLoc(start - 1, end),\n      codegenNode: void 0\n    };\n  },\n  onopentagend(end) {\n    endOpenTag(end);\n  },\n  onclosetag(start, end) {\n    const name = getSlice(start, end);\n    if (!currentOptions.isVoidTag(name)) {\n      let found = false;\n      for (let i = 0; i < stack.length; i++) {\n        const e = stack[i];\n        if (e.tag.toLowerCase() === name.toLowerCase()) {\n          found = true;\n          if (i > 0) {\n            emitError(24, stack[0].loc.start.offset);\n          }\n          for (let j = 0; j <= i; j++) {\n            const el = stack.shift();\n            onCloseTag(el, end, j < i);\n          }\n          break;\n        }\n      }\n      if (!found) {\n        emitError(23, backTrack(start, 60));\n      }\n    }\n  },\n  onselfclosingtag(end) {\n    const name = currentOpenTag.tag;\n    currentOpenTag.isSelfClosing = true;\n    endOpenTag(end);\n    if (stack[0] && stack[0].tag === name) {\n      onCloseTag(stack.shift(), end);\n    }\n  },\n  onattribname(start, end) {\n    currentProp = {\n      type: 6,\n      name: getSlice(start, end),\n      nameLoc: getLoc(start, end),\n      value: void 0,\n      loc: getLoc(start)\n    };\n  },\n  ondirname(start, end) {\n    const raw = getSlice(start, end);\n    const name = raw === \".\" || raw === \":\" ? \"bind\" : raw === \"@\" ? \"on\" : raw === \"#\" ? \"slot\" : raw.slice(2);\n    if (!inVPre && name === \"\") {\n      emitError(26, start);\n    }\n    if (inVPre || name === \"\") {\n      currentProp = {\n        type: 6,\n        name: raw,\n        nameLoc: getLoc(start, end),\n        value: void 0,\n        loc: getLoc(start)\n      };\n    } else {\n      currentProp = {\n        type: 7,\n        name,\n        rawName: raw,\n        exp: void 0,\n        arg: void 0,\n        modifiers: raw === \".\" ? [createSimpleExpression(\"prop\")] : [],\n        loc: getLoc(start)\n      };\n      if (name === \"pre\") {\n        inVPre = tokenizer.inVPre = true;\n        currentVPreBoundary = currentOpenTag;\n        const props = currentOpenTag.props;\n        for (let i = 0; i < props.length; i++) {\n          if (props[i].type === 7) {\n            props[i] = dirToAttr(props[i]);\n          }\n        }\n      }\n    }\n  },\n  ondirarg(start, end) {\n    if (start === end) return;\n    const arg = getSlice(start, end);\n    if (inVPre && !isVPre(currentProp)) {\n      currentProp.name += arg;\n      setLocEnd(currentProp.nameLoc, end);\n    } else {\n      const isStatic = arg[0] !== `[`;\n      currentProp.arg = createExp(\n        isStatic ? arg : arg.slice(1, -1),\n        isStatic,\n        getLoc(start, end),\n        isStatic ? 3 : 0\n      );\n    }\n  },\n  ondirmodifier(start, end) {\n    const mod = getSlice(start, end);\n    if (inVPre && !isVPre(currentProp)) {\n      currentProp.name += \".\" + mod;\n      setLocEnd(currentProp.nameLoc, end);\n    } else if (currentProp.name === \"slot\") {\n      const arg = currentProp.arg;\n      if (arg) {\n        arg.content += \".\" + mod;\n        setLocEnd(arg.loc, end);\n      }\n    } else {\n      const exp = createSimpleExpression(mod, true, getLoc(start, end));\n      currentProp.modifiers.push(exp);\n    }\n  },\n  onattribdata(start, end) {\n    currentAttrValue += getSlice(start, end);\n    if (currentAttrStartIndex < 0) currentAttrStartIndex = start;\n    currentAttrEndIndex = end;\n  },\n  onattribentity(char, start, end) {\n    currentAttrValue += char;\n    if (currentAttrStartIndex < 0) currentAttrStartIndex = start;\n    currentAttrEndIndex = end;\n  },\n  onattribnameend(end) {\n    const start = currentProp.loc.start.offset;\n    const name = getSlice(start, end);\n    if (currentProp.type === 7) {\n      currentProp.rawName = name;\n    }\n    if (currentOpenTag.props.some(\n      (p) => (p.type === 7 ? p.rawName : p.name) === name\n    )) {\n      emitError(2, start);\n    }\n  },\n  onattribend(quote, end) {\n    if (currentOpenTag && currentProp) {\n      setLocEnd(currentProp.loc, end);\n      if (quote !== 0) {\n        if (currentProp.type === 6) {\n          if (currentProp.name === \"class\") {\n            currentAttrValue = condense(currentAttrValue).trim();\n          }\n          if (quote === 1 && !currentAttrValue) {\n            emitError(13, end);\n          }\n          currentProp.value = {\n            type: 2,\n            content: currentAttrValue,\n            loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1)\n          };\n          if (tokenizer.inSFCRoot && currentOpenTag.tag === \"template\" && currentProp.name === \"lang\" && currentAttrValue && currentAttrValue !== \"html\") {\n            tokenizer.enterRCDATA(toCharCodes(`</template`), 0);\n          }\n        } else {\n          let expParseMode = 0 /* Normal */;\n          {\n            if (currentProp.name === \"for\") {\n              expParseMode = 3 /* Skip */;\n            } else if (currentProp.name === \"slot\") {\n              expParseMode = 1 /* Params */;\n            } else if (currentProp.name === \"on\" && currentAttrValue.includes(\";\")) {\n              expParseMode = 2 /* Statements */;\n            }\n          }\n          currentProp.exp = createExp(\n            currentAttrValue,\n            false,\n            getLoc(currentAttrStartIndex, currentAttrEndIndex),\n            0,\n            expParseMode\n          );\n          if (currentProp.name === \"for\") {\n            currentProp.forParseResult = parseForExpression(currentProp.exp);\n          }\n          let syncIndex = -1;\n          if (currentProp.name === \"bind\" && (syncIndex = currentProp.modifiers.findIndex(\n            (mod) => mod.content === \"sync\"\n          )) > -1 && checkCompatEnabled(\n            \"COMPILER_V_BIND_SYNC\",\n            currentOptions,\n            currentProp.loc,\n            currentProp.arg.loc.source\n          )) {\n            currentProp.name = \"model\";\n            currentProp.modifiers.splice(syncIndex, 1);\n          }\n        }\n      }\n      if (currentProp.type !== 7 || currentProp.name !== \"pre\") {\n        currentOpenTag.props.push(currentProp);\n      }\n    }\n    currentAttrValue = \"\";\n    currentAttrStartIndex = currentAttrEndIndex = -1;\n  },\n  oncomment(start, end) {\n    if (currentOptions.comments) {\n      addNode({\n        type: 3,\n        content: getSlice(start, end),\n        loc: getLoc(start - 4, end + 3)\n      });\n    }\n  },\n  onend() {\n    const end = currentInput.length;\n    if (tokenizer.state !== 1) {\n      switch (tokenizer.state) {\n        case 5:\n        case 8:\n          emitError(5, end);\n          break;\n        case 3:\n        case 4:\n          emitError(\n            25,\n            tokenizer.sectionStart\n          );\n          break;\n        case 28:\n          if (tokenizer.currentSequence === Sequences.CdataEnd) {\n            emitError(6, end);\n          } else {\n            emitError(7, end);\n          }\n          break;\n        case 6:\n        case 7:\n        case 9:\n        case 11:\n        case 12:\n        case 13:\n        case 14:\n        case 15:\n        case 16:\n        case 17:\n        case 18:\n        case 19:\n        // \"\n        case 20:\n        // '\n        case 21:\n          emitError(9, end);\n          break;\n      }\n    }\n    for (let index = 0; index < stack.length; index++) {\n      onCloseTag(stack[index], end - 1);\n      emitError(24, stack[index].loc.start.offset);\n    }\n  },\n  oncdata(start, end) {\n    if (stack[0].ns !== 0) {\n      onText(getSlice(start, end), start, end);\n    } else {\n      emitError(1, start - 9);\n    }\n  },\n  onprocessinginstruction(start) {\n    if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) {\n      emitError(\n        21,\n        start - 1\n      );\n    }\n  }\n});\nconst forIteratorRE = /,([^,\\}\\]]*)(?:,([^,\\}\\]]*))?$/;\nconst stripParensRE = /^\\(|\\)$/g;\nfunction parseForExpression(input) {\n  const loc = input.loc;\n  const exp = input.content;\n  const inMatch = exp.match(forAliasRE);\n  if (!inMatch) return;\n  const [, LHS, RHS] = inMatch;\n  const createAliasExpression = (content, offset, asParam = false) => {\n    const start = loc.start.offset + offset;\n    const end = start + content.length;\n    return createExp(\n      content,\n      false,\n      getLoc(start, end),\n      0,\n      asParam ? 1 /* Params */ : 0 /* Normal */\n    );\n  };\n  const result = {\n    source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)),\n    value: void 0,\n    key: void 0,\n    index: void 0,\n    finalized: false\n  };\n  let valueContent = LHS.trim().replace(stripParensRE, \"\").trim();\n  const trimmedOffset = LHS.indexOf(valueContent);\n  const iteratorMatch = valueContent.match(forIteratorRE);\n  if (iteratorMatch) {\n    valueContent = valueContent.replace(forIteratorRE, \"\").trim();\n    const keyContent = iteratorMatch[1].trim();\n    let keyOffset;\n    if (keyContent) {\n      keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length);\n      result.key = createAliasExpression(keyContent, keyOffset, true);\n    }\n    if (iteratorMatch[2]) {\n      const indexContent = iteratorMatch[2].trim();\n      if (indexContent) {\n        result.index = createAliasExpression(\n          indexContent,\n          exp.indexOf(\n            indexContent,\n            result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length\n          ),\n          true\n        );\n      }\n    }\n  }\n  if (valueContent) {\n    result.value = createAliasExpression(valueContent, trimmedOffset, true);\n  }\n  return result;\n}\nfunction getSlice(start, end) {\n  return currentInput.slice(start, end);\n}\nfunction endOpenTag(end) {\n  if (tokenizer.inSFCRoot) {\n    currentOpenTag.innerLoc = getLoc(end + 1, end + 1);\n  }\n  addNode(currentOpenTag);\n  const { tag, ns } = currentOpenTag;\n  if (ns === 0 && currentOptions.isPreTag(tag)) {\n    inPre++;\n  }\n  if (currentOptions.isVoidTag(tag)) {\n    onCloseTag(currentOpenTag, end);\n  } else {\n    stack.unshift(currentOpenTag);\n    if (ns === 1 || ns === 2) {\n      tokenizer.inXML = true;\n    }\n  }\n  currentOpenTag = null;\n}\nfunction onText(content, start, end) {\n  const parent = stack[0] || currentRoot;\n  const lastNode = parent.children[parent.children.length - 1];\n  if (lastNode && lastNode.type === 2) {\n    lastNode.content += content;\n    setLocEnd(lastNode.loc, end);\n  } else {\n    parent.children.push({\n      type: 2,\n      content,\n      loc: getLoc(start, end)\n    });\n  }\n}\nfunction onCloseTag(el, end, isImplied = false) {\n  if (isImplied) {\n    setLocEnd(el.loc, backTrack(end, 60));\n  } else {\n    setLocEnd(el.loc, lookAhead(end, 62) + 1);\n  }\n  if (tokenizer.inSFCRoot) {\n    if (el.children.length) {\n      el.innerLoc.end = shared.extend({}, el.children[el.children.length - 1].loc.end);\n    } else {\n      el.innerLoc.end = shared.extend({}, el.innerLoc.start);\n    }\n    el.innerLoc.source = getSlice(\n      el.innerLoc.start.offset,\n      el.innerLoc.end.offset\n    );\n  }\n  const { tag, ns, children } = el;\n  if (!inVPre) {\n    if (tag === \"slot\") {\n      el.tagType = 2;\n    } else if (isFragmentTemplate(el)) {\n      el.tagType = 3;\n    } else if (isComponent(el)) {\n      el.tagType = 1;\n    }\n  }\n  if (!tokenizer.inRCDATA) {\n    el.children = condenseWhitespace(children);\n  }\n  if (ns === 0 && currentOptions.isIgnoreNewlineTag(tag)) {\n    const first = children[0];\n    if (first && first.type === 2) {\n      first.content = first.content.replace(/^\\r?\\n/, \"\");\n    }\n  }\n  if (ns === 0 && currentOptions.isPreTag(tag)) {\n    inPre--;\n  }\n  if (currentVPreBoundary === el) {\n    inVPre = tokenizer.inVPre = false;\n    currentVPreBoundary = null;\n  }\n  if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) {\n    tokenizer.inXML = false;\n  }\n  {\n    const props = el.props;\n    if (!tokenizer.inSFCRoot && isCompatEnabled(\n      \"COMPILER_NATIVE_TEMPLATE\",\n      currentOptions\n    ) && el.tag === \"template\" && !isFragmentTemplate(el)) {\n      const parent = stack[0] || currentRoot;\n      const index = parent.children.indexOf(el);\n      parent.children.splice(index, 1, ...el.children);\n    }\n    const inlineTemplateProp = props.find(\n      (p) => p.type === 6 && p.name === \"inline-template\"\n    );\n    if (inlineTemplateProp && checkCompatEnabled(\n      \"COMPILER_INLINE_TEMPLATE\",\n      currentOptions,\n      inlineTemplateProp.loc\n    ) && el.children.length) {\n      inlineTemplateProp.value = {\n        type: 2,\n        content: getSlice(\n          el.children[0].loc.start.offset,\n          el.children[el.children.length - 1].loc.end.offset\n        ),\n        loc: inlineTemplateProp.loc\n      };\n    }\n  }\n}\nfunction lookAhead(index, c) {\n  let i = index;\n  while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1) i++;\n  return i;\n}\nfunction backTrack(index, c) {\n  let i = index;\n  while (currentInput.charCodeAt(i) !== c && i >= 0) i--;\n  return i;\n}\nconst specialTemplateDir = /* @__PURE__ */ new Set([\"if\", \"else\", \"else-if\", \"for\", \"slot\"]);\nfunction isFragmentTemplate({ tag, props }) {\n  if (tag === \"template\") {\n    for (let i = 0; i < props.length; i++) {\n      if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) {\n        return true;\n      }\n    }\n  }\n  return false;\n}\nfunction isComponent({ tag, props }) {\n  if (currentOptions.isCustomElement(tag)) {\n    return false;\n  }\n  if (tag === \"component\" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) {\n    return true;\n  }\n  for (let i = 0; i < props.length; i++) {\n    const p = props[i];\n    if (p.type === 6) {\n      if (p.name === \"is\" && p.value) {\n        if (p.value.content.startsWith(\"vue:\")) {\n          return true;\n        } else if (checkCompatEnabled(\n          \"COMPILER_IS_ON_ELEMENT\",\n          currentOptions,\n          p.loc\n        )) {\n          return true;\n        }\n      }\n    } else if (// :is on plain element - only treat as component in compat mode\n    p.name === \"bind\" && isStaticArgOf(p.arg, \"is\") && checkCompatEnabled(\n      \"COMPILER_IS_ON_ELEMENT\",\n      currentOptions,\n      p.loc\n    )) {\n      return true;\n    }\n  }\n  return false;\n}\nfunction isUpperCase(c) {\n  return c > 64 && c < 91;\n}\nconst windowsNewlineRE = /\\r\\n/g;\nfunction condenseWhitespace(nodes) {\n  const shouldCondense = currentOptions.whitespace !== \"preserve\";\n  let removedWhitespace = false;\n  for (let i = 0; i < nodes.length; i++) {\n    const node = nodes[i];\n    if (node.type === 2) {\n      if (!inPre) {\n        if (isAllWhitespace(node.content)) {\n          const prev = nodes[i - 1] && nodes[i - 1].type;\n          const next = nodes[i + 1] && nodes[i + 1].type;\n          if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) {\n            removedWhitespace = true;\n            nodes[i] = null;\n          } else {\n            node.content = \" \";\n          }\n        } else if (shouldCondense) {\n          node.content = condense(node.content);\n        }\n      } else {\n        node.content = node.content.replace(windowsNewlineRE, \"\\n\");\n      }\n    }\n  }\n  return removedWhitespace ? nodes.filter(Boolean) : nodes;\n}\nfunction isAllWhitespace(str) {\n  for (let i = 0; i < str.length; i++) {\n    if (!isWhitespace(str.charCodeAt(i))) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction hasNewlineChar(str) {\n  for (let i = 0; i < str.length; i++) {\n    const c = str.charCodeAt(i);\n    if (c === 10 || c === 13) {\n      return true;\n    }\n  }\n  return false;\n}\nfunction condense(str) {\n  let ret = \"\";\n  let prevCharIsWhitespace = false;\n  for (let i = 0; i < str.length; i++) {\n    if (isWhitespace(str.charCodeAt(i))) {\n      if (!prevCharIsWhitespace) {\n        ret += \" \";\n        prevCharIsWhitespace = true;\n      }\n    } else {\n      ret += str[i];\n      prevCharIsWhitespace = false;\n    }\n  }\n  return ret;\n}\nfunction addNode(node) {\n  (stack[0] || currentRoot).children.push(node);\n}\nfunction getLoc(start, end) {\n  return {\n    start: tokenizer.getPos(start),\n    // @ts-expect-error allow late attachment\n    end: end == null ? end : tokenizer.getPos(end),\n    // @ts-expect-error allow late attachment\n    source: end == null ? end : getSlice(start, end)\n  };\n}\nfunction cloneLoc(loc) {\n  return getLoc(loc.start.offset, loc.end.offset);\n}\nfunction setLocEnd(loc, end) {\n  loc.end = tokenizer.getPos(end);\n  loc.source = getSlice(loc.start.offset, end);\n}\nfunction dirToAttr(dir) {\n  const attr = {\n    type: 6,\n    name: dir.rawName,\n    nameLoc: getLoc(\n      dir.loc.start.offset,\n      dir.loc.start.offset + dir.rawName.length\n    ),\n    value: void 0,\n    loc: dir.loc\n  };\n  if (dir.exp) {\n    const loc = dir.exp.loc;\n    if (loc.end.offset < dir.loc.end.offset) {\n      loc.start.offset--;\n      loc.start.column--;\n      loc.end.offset++;\n      loc.end.column++;\n    }\n    attr.value = {\n      type: 2,\n      content: dir.exp.content,\n      loc\n    };\n  }\n  return attr;\n}\nfunction createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) {\n  const exp = createSimpleExpression(content, isStatic, loc, constType);\n  if (!isStatic && currentOptions.prefixIdentifiers && parseMode !== 3 /* Skip */ && content.trim()) {\n    if (isSimpleIdentifier(content)) {\n      exp.ast = null;\n      return exp;\n    }\n    try {\n      const plugins = currentOptions.expressionPlugins;\n      const options = {\n        plugins: plugins ? [...plugins, \"typescript\"] : [\"typescript\"]\n      };\n      if (parseMode === 2 /* Statements */) {\n        exp.ast = parser.parse(` ${content} `, options).program;\n      } else if (parseMode === 1 /* Params */) {\n        exp.ast = parser.parseExpression(`(${content})=>{}`, options);\n      } else {\n        exp.ast = parser.parseExpression(`(${content})`, options);\n      }\n    } catch (e) {\n      exp.ast = false;\n      emitError(45, loc.start.offset, e.message);\n    }\n  }\n  return exp;\n}\nfunction emitError(code, index, message) {\n  currentOptions.onError(\n    createCompilerError(code, getLoc(index, index), void 0, message)\n  );\n}\nfunction reset() {\n  tokenizer.reset();\n  currentOpenTag = null;\n  currentProp = null;\n  currentAttrValue = \"\";\n  currentAttrStartIndex = -1;\n  currentAttrEndIndex = -1;\n  stack.length = 0;\n}\nfunction baseParse(input, options) {\n  reset();\n  currentInput = input;\n  currentOptions = shared.extend({}, defaultParserOptions);\n  if (options) {\n    let key;\n    for (key in options) {\n      if (options[key] != null) {\n        currentOptions[key] = options[key];\n      }\n    }\n  }\n  tokenizer.mode = currentOptions.parseMode === \"html\" ? 1 : currentOptions.parseMode === \"sfc\" ? 2 : 0;\n  tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2;\n  const delimiters = options && options.delimiters;\n  if (delimiters) {\n    tokenizer.delimiterOpen = toCharCodes(delimiters[0]);\n    tokenizer.delimiterClose = toCharCodes(delimiters[1]);\n  }\n  const root = currentRoot = createRoot([], input);\n  tokenizer.parse(currentInput);\n  root.loc = getLoc(0, input.length);\n  root.children = condenseWhitespace(root.children);\n  currentRoot = null;\n  return root;\n}\n\nfunction cacheStatic(root, context) {\n  walk(\n    root,\n    void 0,\n    context,\n    // Root node is unfortunately non-hoistable due to potential parent\n    // fallthrough attributes.\n    !!getSingleElementRoot(root)\n  );\n}\nfunction getSingleElementRoot(root) {\n  const children = root.children.filter((x) => x.type !== 3);\n  return children.length === 1 && children[0].type === 1 && !isSlotOutlet(children[0]) ? children[0] : null;\n}\nfunction walk(node, parent, context, doNotHoistNode = false, inFor = false) {\n  const { children } = node;\n  const toCache = [];\n  for (let i = 0; i < children.length; i++) {\n    const child = children[i];\n    if (child.type === 1 && child.tagType === 0) {\n      const constantType = doNotHoistNode ? 0 : getConstantType(child, context);\n      if (constantType > 0) {\n        if (constantType >= 2) {\n          child.codegenNode.patchFlag = -1;\n          toCache.push(child);\n          continue;\n        }\n      } else {\n        const codegenNode = child.codegenNode;\n        if (codegenNode.type === 13) {\n          const flag = codegenNode.patchFlag;\n          if ((flag === void 0 || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) {\n            const props = getNodeProps(child);\n            if (props) {\n              codegenNode.props = context.hoist(props);\n            }\n          }\n          if (codegenNode.dynamicProps) {\n            codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps);\n          }\n        }\n      }\n    } else if (child.type === 12) {\n      const constantType = doNotHoistNode ? 0 : getConstantType(child, context);\n      if (constantType >= 2) {\n        if (child.codegenNode.type === 14 && child.codegenNode.arguments.length > 0) {\n          child.codegenNode.arguments.push(\n            -1 + (``)\n          );\n        }\n        toCache.push(child);\n        continue;\n      }\n    }\n    if (child.type === 1) {\n      const isComponent = child.tagType === 1;\n      if (isComponent) {\n        context.scopes.vSlot++;\n      }\n      walk(child, node, context, false, inFor);\n      if (isComponent) {\n        context.scopes.vSlot--;\n      }\n    } else if (child.type === 11) {\n      walk(child, node, context, child.children.length === 1, true);\n    } else if (child.type === 9) {\n      for (let i2 = 0; i2 < child.branches.length; i2++) {\n        walk(\n          child.branches[i2],\n          node,\n          context,\n          child.branches[i2].children.length === 1,\n          inFor\n        );\n      }\n    }\n  }\n  let cachedAsArray = false;\n  const slotCacheKeys = [];\n  if (toCache.length === children.length && node.type === 1) {\n    if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && shared.isArray(node.codegenNode.children)) {\n      node.codegenNode.children = getCacheExpression(\n        createArrayExpression(node.codegenNode.children)\n      );\n      cachedAsArray = true;\n    } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !shared.isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {\n      const slot = getSlotNode(node.codegenNode, \"default\");\n      if (slot) {\n        slotCacheKeys.push(context.cached.length);\n        slot.returns = getCacheExpression(\n          createArrayExpression(slot.returns)\n        );\n        cachedAsArray = true;\n      }\n    } else if (node.tagType === 3 && parent && parent.type === 1 && parent.tagType === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !shared.isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 15) {\n      const slotName = findDir(node, \"slot\", true);\n      const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);\n      if (slot) {\n        slotCacheKeys.push(context.cached.length);\n        slot.returns = getCacheExpression(\n          createArrayExpression(slot.returns)\n        );\n        cachedAsArray = true;\n      }\n    }\n  }\n  if (!cachedAsArray) {\n    for (const child of toCache) {\n      slotCacheKeys.push(context.cached.length);\n      child.codegenNode = context.cache(child.codegenNode);\n    }\n  }\n  if (slotCacheKeys.length && node.type === 1 && node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !shared.isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {\n    node.codegenNode.children.properties.push(\n      createObjectProperty(\n        `__`,\n        createSimpleExpression(JSON.stringify(slotCacheKeys), false)\n      )\n    );\n  }\n  function getCacheExpression(value) {\n    const exp = context.cache(value);\n    if (inFor && context.hmr) {\n      exp.needArraySpread = true;\n    }\n    return exp;\n  }\n  function getSlotNode(node2, name) {\n    if (node2.children && !shared.isArray(node2.children) && node2.children.type === 15) {\n      const slot = node2.children.properties.find(\n        (p) => p.key === name || p.key.content === name\n      );\n      return slot && slot.value;\n    }\n  }\n  if (toCache.length && context.transformHoist) {\n    context.transformHoist(children, context, node);\n  }\n}\nfunction getConstantType(node, context) {\n  const { constantCache } = context;\n  switch (node.type) {\n    case 1:\n      if (node.tagType !== 0) {\n        return 0;\n      }\n      const cached = constantCache.get(node);\n      if (cached !== void 0) {\n        return cached;\n      }\n      const codegenNode = node.codegenNode;\n      if (codegenNode.type !== 13) {\n        return 0;\n      }\n      if (codegenNode.isBlock && node.tag !== \"svg\" && node.tag !== \"foreignObject\" && node.tag !== \"math\") {\n        return 0;\n      }\n      if (codegenNode.patchFlag === void 0) {\n        let returnType2 = 3;\n        const generatedPropsType = getGeneratedPropsConstantType(node, context);\n        if (generatedPropsType === 0) {\n          constantCache.set(node, 0);\n          return 0;\n        }\n        if (generatedPropsType < returnType2) {\n          returnType2 = generatedPropsType;\n        }\n        for (let i = 0; i < node.children.length; i++) {\n          const childType = getConstantType(node.children[i], context);\n          if (childType === 0) {\n            constantCache.set(node, 0);\n            return 0;\n          }\n          if (childType < returnType2) {\n            returnType2 = childType;\n          }\n        }\n        if (returnType2 > 1) {\n          for (let i = 0; i < node.props.length; i++) {\n            const p = node.props[i];\n            if (p.type === 7 && p.name === \"bind\" && p.exp) {\n              const expType = getConstantType(p.exp, context);\n              if (expType === 0) {\n                constantCache.set(node, 0);\n                return 0;\n              }\n              if (expType < returnType2) {\n                returnType2 = expType;\n              }\n            }\n          }\n        }\n        if (codegenNode.isBlock) {\n          for (let i = 0; i < node.props.length; i++) {\n            const p = node.props[i];\n            if (p.type === 7) {\n              constantCache.set(node, 0);\n              return 0;\n            }\n          }\n          context.removeHelper(OPEN_BLOCK);\n          context.removeHelper(\n            getVNodeBlockHelper(context.inSSR, codegenNode.isComponent)\n          );\n          codegenNode.isBlock = false;\n          context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent));\n        }\n        constantCache.set(node, returnType2);\n        return returnType2;\n      } else {\n        constantCache.set(node, 0);\n        return 0;\n      }\n    case 2:\n    case 3:\n      return 3;\n    case 9:\n    case 11:\n    case 10:\n      return 0;\n    case 5:\n    case 12:\n      return getConstantType(node.content, context);\n    case 4:\n      return node.constType;\n    case 8:\n      let returnType = 3;\n      for (let i = 0; i < node.children.length; i++) {\n        const child = node.children[i];\n        if (shared.isString(child) || shared.isSymbol(child)) {\n          continue;\n        }\n        const childType = getConstantType(child, context);\n        if (childType === 0) {\n          return 0;\n        } else if (childType < returnType) {\n          returnType = childType;\n        }\n      }\n      return returnType;\n    case 20:\n      return 2;\n    default:\n      return 0;\n  }\n}\nconst allowHoistedHelperSet = /* @__PURE__ */ new Set([\n  NORMALIZE_CLASS,\n  NORMALIZE_STYLE,\n  NORMALIZE_PROPS,\n  GUARD_REACTIVE_PROPS\n]);\nfunction getConstantTypeOfHelperCall(value, context) {\n  if (value.type === 14 && !shared.isString(value.callee) && allowHoistedHelperSet.has(value.callee)) {\n    const arg = value.arguments[0];\n    if (arg.type === 4) {\n      return getConstantType(arg, context);\n    } else if (arg.type === 14) {\n      return getConstantTypeOfHelperCall(arg, context);\n    }\n  }\n  return 0;\n}\nfunction getGeneratedPropsConstantType(node, context) {\n  let returnType = 3;\n  const props = getNodeProps(node);\n  if (props && props.type === 15) {\n    const { properties } = props;\n    for (let i = 0; i < properties.length; i++) {\n      const { key, value } = properties[i];\n      const keyType = getConstantType(key, context);\n      if (keyType === 0) {\n        return keyType;\n      }\n      if (keyType < returnType) {\n        returnType = keyType;\n      }\n      let valueType;\n      if (value.type === 4) {\n        valueType = getConstantType(value, context);\n      } else if (value.type === 14) {\n        valueType = getConstantTypeOfHelperCall(value, context);\n      } else {\n        valueType = 0;\n      }\n      if (valueType === 0) {\n        return valueType;\n      }\n      if (valueType < returnType) {\n        returnType = valueType;\n      }\n    }\n  }\n  return returnType;\n}\nfunction getNodeProps(node) {\n  const codegenNode = node.codegenNode;\n  if (codegenNode.type === 13) {\n    return codegenNode.props;\n  }\n}\n\nfunction createTransformContext(root, {\n  filename = \"\",\n  prefixIdentifiers = false,\n  hoistStatic = false,\n  hmr = false,\n  cacheHandlers = false,\n  nodeTransforms = [],\n  directiveTransforms = {},\n  transformHoist = null,\n  isBuiltInComponent = shared.NOOP,\n  isCustomElement = shared.NOOP,\n  expressionPlugins = [],\n  scopeId = null,\n  slotted = true,\n  ssr = false,\n  inSSR = false,\n  ssrCssVars = ``,\n  bindingMetadata = shared.EMPTY_OBJ,\n  inline = false,\n  isTS = false,\n  onError = defaultOnError,\n  onWarn = defaultOnWarn,\n  compatConfig\n}) {\n  const nameMatch = filename.replace(/\\?.*$/, \"\").match(/([^/\\\\]+)\\.\\w+$/);\n  const context = {\n    // options\n    filename,\n    selfName: nameMatch && shared.capitalize(shared.camelize(nameMatch[1])),\n    prefixIdentifiers,\n    hoistStatic,\n    hmr,\n    cacheHandlers,\n    nodeTransforms,\n    directiveTransforms,\n    transformHoist,\n    isBuiltInComponent,\n    isCustomElement,\n    expressionPlugins,\n    scopeId,\n    slotted,\n    ssr,\n    inSSR,\n    ssrCssVars,\n    bindingMetadata,\n    inline,\n    isTS,\n    onError,\n    onWarn,\n    compatConfig,\n    // state\n    root,\n    helpers: /* @__PURE__ */ new Map(),\n    components: /* @__PURE__ */ new Set(),\n    directives: /* @__PURE__ */ new Set(),\n    hoists: [],\n    imports: [],\n    cached: [],\n    constantCache: /* @__PURE__ */ new WeakMap(),\n    temps: 0,\n    identifiers: /* @__PURE__ */ Object.create(null),\n    scopes: {\n      vFor: 0,\n      vSlot: 0,\n      vPre: 0,\n      vOnce: 0\n    },\n    parent: null,\n    grandParent: null,\n    currentNode: root,\n    childIndex: 0,\n    inVOnce: false,\n    // methods\n    helper(name) {\n      const count = context.helpers.get(name) || 0;\n      context.helpers.set(name, count + 1);\n      return name;\n    },\n    removeHelper(name) {\n      const count = context.helpers.get(name);\n      if (count) {\n        const currentCount = count - 1;\n        if (!currentCount) {\n          context.helpers.delete(name);\n        } else {\n          context.helpers.set(name, currentCount);\n        }\n      }\n    },\n    helperString(name) {\n      return `_${helperNameMap[context.helper(name)]}`;\n    },\n    replaceNode(node) {\n      context.parent.children[context.childIndex] = context.currentNode = node;\n    },\n    removeNode(node) {\n      const list = context.parent.children;\n      const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1;\n      if (!node || node === context.currentNode) {\n        context.currentNode = null;\n        context.onNodeRemoved();\n      } else {\n        if (context.childIndex > removalIndex) {\n          context.childIndex--;\n          context.onNodeRemoved();\n        }\n      }\n      context.parent.children.splice(removalIndex, 1);\n    },\n    onNodeRemoved: shared.NOOP,\n    addIdentifiers(exp) {\n      {\n        if (shared.isString(exp)) {\n          addId(exp);\n        } else if (exp.identifiers) {\n          exp.identifiers.forEach(addId);\n        } else if (exp.type === 4) {\n          addId(exp.content);\n        }\n      }\n    },\n    removeIdentifiers(exp) {\n      {\n        if (shared.isString(exp)) {\n          removeId(exp);\n        } else if (exp.identifiers) {\n          exp.identifiers.forEach(removeId);\n        } else if (exp.type === 4) {\n          removeId(exp.content);\n        }\n      }\n    },\n    hoist(exp) {\n      if (shared.isString(exp)) exp = createSimpleExpression(exp);\n      context.hoists.push(exp);\n      const identifier = createSimpleExpression(\n        `_hoisted_${context.hoists.length}`,\n        false,\n        exp.loc,\n        2\n      );\n      identifier.hoisted = exp;\n      return identifier;\n    },\n    cache(exp, isVNode = false, inVOnce = false) {\n      const cacheExp = createCacheExpression(\n        context.cached.length,\n        exp,\n        isVNode,\n        inVOnce\n      );\n      context.cached.push(cacheExp);\n      return cacheExp;\n    }\n  };\n  {\n    context.filters = /* @__PURE__ */ new Set();\n  }\n  function addId(id) {\n    const { identifiers } = context;\n    if (identifiers[id] === void 0) {\n      identifiers[id] = 0;\n    }\n    identifiers[id]++;\n  }\n  function removeId(id) {\n    context.identifiers[id]--;\n  }\n  return context;\n}\nfunction transform(root, options) {\n  const context = createTransformContext(root, options);\n  traverseNode(root, context);\n  if (options.hoistStatic) {\n    cacheStatic(root, context);\n  }\n  if (!options.ssr) {\n    createRootCodegen(root, context);\n  }\n  root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]);\n  root.components = [...context.components];\n  root.directives = [...context.directives];\n  root.imports = context.imports;\n  root.hoists = context.hoists;\n  root.temps = context.temps;\n  root.cached = context.cached;\n  root.transformed = true;\n  {\n    root.filters = [...context.filters];\n  }\n}\nfunction createRootCodegen(root, context) {\n  const { helper } = context;\n  const { children } = root;\n  if (children.length === 1) {\n    const singleElementRootChild = getSingleElementRoot(root);\n    if (singleElementRootChild && singleElementRootChild.codegenNode) {\n      const codegenNode = singleElementRootChild.codegenNode;\n      if (codegenNode.type === 13) {\n        convertToBlock(codegenNode, context);\n      }\n      root.codegenNode = codegenNode;\n    } else {\n      root.codegenNode = children[0];\n    }\n  } else if (children.length > 1) {\n    let patchFlag = 64;\n    root.codegenNode = createVNodeCall(\n      context,\n      helper(FRAGMENT),\n      void 0,\n      root.children,\n      patchFlag,\n      void 0,\n      void 0,\n      true,\n      void 0,\n      false\n    );\n  } else ;\n}\nfunction traverseChildren(parent, context) {\n  let i = 0;\n  const nodeRemoved = () => {\n    i--;\n  };\n  for (; i < parent.children.length; i++) {\n    const child = parent.children[i];\n    if (shared.isString(child)) continue;\n    context.grandParent = context.parent;\n    context.parent = parent;\n    context.childIndex = i;\n    context.onNodeRemoved = nodeRemoved;\n    traverseNode(child, context);\n  }\n}\nfunction traverseNode(node, context) {\n  context.currentNode = node;\n  const { nodeTransforms } = context;\n  const exitFns = [];\n  for (let i2 = 0; i2 < nodeTransforms.length; i2++) {\n    const onExit = nodeTransforms[i2](node, context);\n    if (onExit) {\n      if (shared.isArray(onExit)) {\n        exitFns.push(...onExit);\n      } else {\n        exitFns.push(onExit);\n      }\n    }\n    if (!context.currentNode) {\n      return;\n    } else {\n      node = context.currentNode;\n    }\n  }\n  switch (node.type) {\n    case 3:\n      if (!context.ssr) {\n        context.helper(CREATE_COMMENT);\n      }\n      break;\n    case 5:\n      if (!context.ssr) {\n        context.helper(TO_DISPLAY_STRING);\n      }\n      break;\n    // for container types, further traverse downwards\n    case 9:\n      for (let i2 = 0; i2 < node.branches.length; i2++) {\n        traverseNode(node.branches[i2], context);\n      }\n      break;\n    case 10:\n    case 11:\n    case 1:\n    case 0:\n      traverseChildren(node, context);\n      break;\n  }\n  context.currentNode = node;\n  let i = exitFns.length;\n  while (i--) {\n    exitFns[i]();\n  }\n}\nfunction createStructuralDirectiveTransform(name, fn) {\n  const matches = shared.isString(name) ? (n) => n === name : (n) => name.test(n);\n  return (node, context) => {\n    if (node.type === 1) {\n      const { props } = node;\n      if (node.tagType === 3 && props.some(isVSlot)) {\n        return;\n      }\n      const exitFns = [];\n      for (let i = 0; i < props.length; i++) {\n        const prop = props[i];\n        if (prop.type === 7 && matches(prop.name)) {\n          props.splice(i, 1);\n          i--;\n          const onExit = fn(node, prop, context);\n          if (onExit) exitFns.push(onExit);\n        }\n      }\n      return exitFns;\n    }\n  };\n}\n\nconst PURE_ANNOTATION = `/*@__PURE__*/`;\nconst aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`;\nfunction createCodegenContext(ast, {\n  mode = \"function\",\n  prefixIdentifiers = mode === \"module\",\n  sourceMap = false,\n  filename = `template.vue.html`,\n  scopeId = null,\n  optimizeImports = false,\n  runtimeGlobalName = `Vue`,\n  runtimeModuleName = `vue`,\n  ssrRuntimeModuleName = \"vue/server-renderer\",\n  ssr = false,\n  isTS = false,\n  inSSR = false\n}) {\n  const context = {\n    mode,\n    prefixIdentifiers,\n    sourceMap,\n    filename,\n    scopeId,\n    optimizeImports,\n    runtimeGlobalName,\n    runtimeModuleName,\n    ssrRuntimeModuleName,\n    ssr,\n    isTS,\n    inSSR,\n    source: ast.source,\n    code: ``,\n    column: 1,\n    line: 1,\n    offset: 0,\n    indentLevel: 0,\n    pure: false,\n    map: void 0,\n    helper(key) {\n      return `_${helperNameMap[key]}`;\n    },\n    push(code, newlineIndex = -2 /* None */, node) {\n      context.code += code;\n      if (context.map) {\n        if (node) {\n          let name;\n          if (node.type === 4 && !node.isStatic) {\n            const content = node.content.replace(/^_ctx\\./, \"\");\n            if (content !== node.content && isSimpleIdentifier(content)) {\n              name = content;\n            }\n          }\n          if (node.loc.source) {\n            addMapping(node.loc.start, name);\n          }\n        }\n        if (newlineIndex === -3 /* Unknown */) {\n          advancePositionWithMutation(context, code);\n        } else {\n          context.offset += code.length;\n          if (newlineIndex === -2 /* None */) {\n            context.column += code.length;\n          } else {\n            if (newlineIndex === -1 /* End */) {\n              newlineIndex = code.length - 1;\n            }\n            context.line++;\n            context.column = code.length - newlineIndex;\n          }\n        }\n        if (node && node.loc !== locStub && node.loc.source) {\n          addMapping(node.loc.end);\n        }\n      }\n    },\n    indent() {\n      newline(++context.indentLevel);\n    },\n    deindent(withoutNewLine = false) {\n      if (withoutNewLine) {\n        --context.indentLevel;\n      } else {\n        newline(--context.indentLevel);\n      }\n    },\n    newline() {\n      newline(context.indentLevel);\n    }\n  };\n  function newline(n) {\n    context.push(\"\\n\" + `  `.repeat(n), 0 /* Start */);\n  }\n  function addMapping(loc, name = null) {\n    const { _names, _mappings } = context.map;\n    if (name !== null && !_names.has(name)) _names.add(name);\n    _mappings.add({\n      originalLine: loc.line,\n      originalColumn: loc.column - 1,\n      // source-map column is 0 based\n      generatedLine: context.line,\n      generatedColumn: context.column - 1,\n      source: filename,\n      name\n    });\n  }\n  if (sourceMap) {\n    context.map = new sourceMapJs.SourceMapGenerator();\n    context.map.setSourceContent(filename, context.source);\n    context.map._sources.add(filename);\n  }\n  return context;\n}\nfunction generate(ast, options = {}) {\n  const context = createCodegenContext(ast, options);\n  if (options.onContextCreated) options.onContextCreated(context);\n  const {\n    mode,\n    push,\n    prefixIdentifiers,\n    indent,\n    deindent,\n    newline,\n    scopeId,\n    ssr\n  } = context;\n  const helpers = Array.from(ast.helpers);\n  const hasHelpers = helpers.length > 0;\n  const useWithBlock = !prefixIdentifiers && mode !== \"module\";\n  const genScopeId = scopeId != null && mode === \"module\";\n  const isSetupInlined = !!options.inline;\n  const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context;\n  if (mode === \"module\") {\n    genModulePreamble(ast, preambleContext, genScopeId, isSetupInlined);\n  } else {\n    genFunctionPreamble(ast, preambleContext);\n  }\n  const functionName = ssr ? `ssrRender` : `render`;\n  const args = ssr ? [\"_ctx\", \"_push\", \"_parent\", \"_attrs\"] : [\"_ctx\", \"_cache\"];\n  if (options.bindingMetadata && !options.inline) {\n    args.push(\"$props\", \"$setup\", \"$data\", \"$options\");\n  }\n  const signature = options.isTS ? args.map((arg) => `${arg}: any`).join(\",\") : args.join(\", \");\n  if (isSetupInlined) {\n    push(`(${signature}) => {`);\n  } else {\n    push(`function ${functionName}(${signature}) {`);\n  }\n  indent();\n  if (useWithBlock) {\n    push(`with (_ctx) {`);\n    indent();\n    if (hasHelpers) {\n      push(\n        `const { ${helpers.map(aliasHelper).join(\", \")} } = _Vue\n`,\n        -1 /* End */\n      );\n      newline();\n    }\n  }\n  if (ast.components.length) {\n    genAssets(ast.components, \"component\", context);\n    if (ast.directives.length || ast.temps > 0) {\n      newline();\n    }\n  }\n  if (ast.directives.length) {\n    genAssets(ast.directives, \"directive\", context);\n    if (ast.temps > 0) {\n      newline();\n    }\n  }\n  if (ast.filters && ast.filters.length) {\n    newline();\n    genAssets(ast.filters, \"filter\", context);\n    newline();\n  }\n  if (ast.temps > 0) {\n    push(`let `);\n    for (let i = 0; i < ast.temps; i++) {\n      push(`${i > 0 ? `, ` : ``}_temp${i}`);\n    }\n  }\n  if (ast.components.length || ast.directives.length || ast.temps) {\n    push(`\n`, 0 /* Start */);\n    newline();\n  }\n  if (!ssr) {\n    push(`return `);\n  }\n  if (ast.codegenNode) {\n    genNode(ast.codegenNode, context);\n  } else {\n    push(`null`);\n  }\n  if (useWithBlock) {\n    deindent();\n    push(`}`);\n  }\n  deindent();\n  push(`}`);\n  return {\n    ast,\n    code: context.code,\n    preamble: isSetupInlined ? preambleContext.code : ``,\n    map: context.map ? context.map.toJSON() : void 0\n  };\n}\nfunction genFunctionPreamble(ast, context) {\n  const {\n    ssr,\n    prefixIdentifiers,\n    push,\n    newline,\n    runtimeModuleName,\n    runtimeGlobalName,\n    ssrRuntimeModuleName\n  } = context;\n  const VueBinding = ssr ? `require(${JSON.stringify(runtimeModuleName)})` : runtimeGlobalName;\n  const helpers = Array.from(ast.helpers);\n  if (helpers.length > 0) {\n    if (prefixIdentifiers) {\n      push(\n        `const { ${helpers.map(aliasHelper).join(\", \")} } = ${VueBinding}\n`,\n        -1 /* End */\n      );\n    } else {\n      push(`const _Vue = ${VueBinding}\n`, -1 /* End */);\n      if (ast.hoists.length) {\n        const staticHelpers = [\n          CREATE_VNODE,\n          CREATE_ELEMENT_VNODE,\n          CREATE_COMMENT,\n          CREATE_TEXT,\n          CREATE_STATIC\n        ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(\", \");\n        push(`const { ${staticHelpers} } = _Vue\n`, -1 /* End */);\n      }\n    }\n  }\n  if (ast.ssrHelpers && ast.ssrHelpers.length) {\n    push(\n      `const { ${ast.ssrHelpers.map(aliasHelper).join(\", \")} } = require(\"${ssrRuntimeModuleName}\")\n`,\n      -1 /* End */\n    );\n  }\n  genHoists(ast.hoists, context);\n  newline();\n  push(`return `);\n}\nfunction genModulePreamble(ast, context, genScopeId, inline) {\n  const {\n    push,\n    newline,\n    optimizeImports,\n    runtimeModuleName,\n    ssrRuntimeModuleName\n  } = context;\n  if (ast.helpers.size) {\n    const helpers = Array.from(ast.helpers);\n    if (optimizeImports) {\n      push(\n        `import { ${helpers.map((s) => helperNameMap[s]).join(\", \")} } from ${JSON.stringify(runtimeModuleName)}\n`,\n        -1 /* End */\n      );\n      push(\n        `\n// Binding optimization for webpack code-split\nconst ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(\", \")}\n`,\n        -1 /* End */\n      );\n    } else {\n      push(\n        `import { ${helpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(\", \")} } from ${JSON.stringify(runtimeModuleName)}\n`,\n        -1 /* End */\n      );\n    }\n  }\n  if (ast.ssrHelpers && ast.ssrHelpers.length) {\n    push(\n      `import { ${ast.ssrHelpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(\", \")} } from \"${ssrRuntimeModuleName}\"\n`,\n      -1 /* End */\n    );\n  }\n  if (ast.imports.length) {\n    genImports(ast.imports, context);\n    newline();\n  }\n  genHoists(ast.hoists, context);\n  newline();\n  if (!inline) {\n    push(`export `);\n  }\n}\nfunction genAssets(assets, type, { helper, push, newline, isTS }) {\n  const resolver = helper(\n    type === \"filter\" ? RESOLVE_FILTER : type === \"component\" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE\n  );\n  for (let i = 0; i < assets.length; i++) {\n    let id = assets[i];\n    const maybeSelfReference = id.endsWith(\"__self\");\n    if (maybeSelfReference) {\n      id = id.slice(0, -6);\n    }\n    push(\n      `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}`\n    );\n    if (i < assets.length - 1) {\n      newline();\n    }\n  }\n}\nfunction genHoists(hoists, context) {\n  if (!hoists.length) {\n    return;\n  }\n  context.pure = true;\n  const { push, newline } = context;\n  newline();\n  for (let i = 0; i < hoists.length; i++) {\n    const exp = hoists[i];\n    if (exp) {\n      push(`const _hoisted_${i + 1} = `);\n      genNode(exp, context);\n      newline();\n    }\n  }\n  context.pure = false;\n}\nfunction genImports(importsOptions, context) {\n  if (!importsOptions.length) {\n    return;\n  }\n  importsOptions.forEach((imports) => {\n    context.push(`import `);\n    genNode(imports.exp, context);\n    context.push(` from '${imports.path}'`);\n    context.newline();\n  });\n}\nfunction isText(n) {\n  return shared.isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8;\n}\nfunction genNodeListAsArray(nodes, context) {\n  const multilines = nodes.length > 3 || nodes.some((n) => shared.isArray(n) || !isText(n));\n  context.push(`[`);\n  multilines && context.indent();\n  genNodeList(nodes, context, multilines);\n  multilines && context.deindent();\n  context.push(`]`);\n}\nfunction genNodeList(nodes, context, multilines = false, comma = true) {\n  const { push, newline } = context;\n  for (let i = 0; i < nodes.length; i++) {\n    const node = nodes[i];\n    if (shared.isString(node)) {\n      push(node, -3 /* Unknown */);\n    } else if (shared.isArray(node)) {\n      genNodeListAsArray(node, context);\n    } else {\n      genNode(node, context);\n    }\n    if (i < nodes.length - 1) {\n      if (multilines) {\n        comma && push(\",\");\n        newline();\n      } else {\n        comma && push(\", \");\n      }\n    }\n  }\n}\nfunction genNode(node, context) {\n  if (shared.isString(node)) {\n    context.push(node, -3 /* Unknown */);\n    return;\n  }\n  if (shared.isSymbol(node)) {\n    context.push(context.helper(node));\n    return;\n  }\n  switch (node.type) {\n    case 1:\n    case 9:\n    case 11:\n      genNode(node.codegenNode, context);\n      break;\n    case 2:\n      genText(node, context);\n      break;\n    case 4:\n      genExpression(node, context);\n      break;\n    case 5:\n      genInterpolation(node, context);\n      break;\n    case 12:\n      genNode(node.codegenNode, context);\n      break;\n    case 8:\n      genCompoundExpression(node, context);\n      break;\n    case 3:\n      genComment(node, context);\n      break;\n    case 13:\n      genVNodeCall(node, context);\n      break;\n    case 14:\n      genCallExpression(node, context);\n      break;\n    case 15:\n      genObjectExpression(node, context);\n      break;\n    case 17:\n      genArrayExpression(node, context);\n      break;\n    case 18:\n      genFunctionExpression(node, context);\n      break;\n    case 19:\n      genConditionalExpression(node, context);\n      break;\n    case 20:\n      genCacheExpression(node, context);\n      break;\n    case 21:\n      genNodeList(node.body, context, true, false);\n      break;\n    // SSR only types\n    case 22:\n      genTemplateLiteral(node, context);\n      break;\n    case 23:\n      genIfStatement(node, context);\n      break;\n    case 24:\n      genAssignmentExpression(node, context);\n      break;\n    case 25:\n      genSequenceExpression(node, context);\n      break;\n    case 26:\n      genReturnStatement(node, context);\n      break;\n  }\n}\nfunction genText(node, context) {\n  context.push(JSON.stringify(node.content), -3 /* Unknown */, node);\n}\nfunction genExpression(node, context) {\n  const { content, isStatic } = node;\n  context.push(\n    isStatic ? JSON.stringify(content) : content,\n    -3 /* Unknown */,\n    node\n  );\n}\nfunction genInterpolation(node, context) {\n  const { push, helper, pure } = context;\n  if (pure) push(PURE_ANNOTATION);\n  push(`${helper(TO_DISPLAY_STRING)}(`);\n  genNode(node.content, context);\n  push(`)`);\n}\nfunction genCompoundExpression(node, context) {\n  for (let i = 0; i < node.children.length; i++) {\n    const child = node.children[i];\n    if (shared.isString(child)) {\n      context.push(child, -3 /* Unknown */);\n    } else {\n      genNode(child, context);\n    }\n  }\n}\nfunction genExpressionAsPropertyKey(node, context) {\n  const { push } = context;\n  if (node.type === 8) {\n    push(`[`);\n    genCompoundExpression(node, context);\n    push(`]`);\n  } else if (node.isStatic) {\n    const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content);\n    push(text, -2 /* None */, node);\n  } else {\n    push(`[${node.content}]`, -3 /* Unknown */, node);\n  }\n}\nfunction genComment(node, context) {\n  const { push, helper, pure } = context;\n  if (pure) {\n    push(PURE_ANNOTATION);\n  }\n  push(\n    `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`,\n    -3 /* Unknown */,\n    node\n  );\n}\nfunction genVNodeCall(node, context) {\n  const { push, helper, pure } = context;\n  const {\n    tag,\n    props,\n    children,\n    patchFlag,\n    dynamicProps,\n    directives,\n    isBlock,\n    disableTracking,\n    isComponent\n  } = node;\n  let patchFlagString;\n  if (patchFlag) {\n    {\n      patchFlagString = String(patchFlag);\n    }\n  }\n  if (directives) {\n    push(helper(WITH_DIRECTIVES) + `(`);\n  }\n  if (isBlock) {\n    push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `);\n  }\n  if (pure) {\n    push(PURE_ANNOTATION);\n  }\n  const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent);\n  push(helper(callHelper) + `(`, -2 /* None */, node);\n  genNodeList(\n    genNullableArgs([tag, props, children, patchFlagString, dynamicProps]),\n    context\n  );\n  push(`)`);\n  if (isBlock) {\n    push(`)`);\n  }\n  if (directives) {\n    push(`, `);\n    genNode(directives, context);\n    push(`)`);\n  }\n}\nfunction genNullableArgs(args) {\n  let i = args.length;\n  while (i--) {\n    if (args[i] != null) break;\n  }\n  return args.slice(0, i + 1).map((arg) => arg || `null`);\n}\nfunction genCallExpression(node, context) {\n  const { push, helper, pure } = context;\n  const callee = shared.isString(node.callee) ? node.callee : helper(node.callee);\n  if (pure) {\n    push(PURE_ANNOTATION);\n  }\n  push(callee + `(`, -2 /* None */, node);\n  genNodeList(node.arguments, context);\n  push(`)`);\n}\nfunction genObjectExpression(node, context) {\n  const { push, indent, deindent, newline } = context;\n  const { properties } = node;\n  if (!properties.length) {\n    push(`{}`, -2 /* None */, node);\n    return;\n  }\n  const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4);\n  push(multilines ? `{` : `{ `);\n  multilines && indent();\n  for (let i = 0; i < properties.length; i++) {\n    const { key, value } = properties[i];\n    genExpressionAsPropertyKey(key, context);\n    push(`: `);\n    genNode(value, context);\n    if (i < properties.length - 1) {\n      push(`,`);\n      newline();\n    }\n  }\n  multilines && deindent();\n  push(multilines ? `}` : ` }`);\n}\nfunction genArrayExpression(node, context) {\n  genNodeListAsArray(node.elements, context);\n}\nfunction genFunctionExpression(node, context) {\n  const { push, indent, deindent } = context;\n  const { params, returns, body, newline, isSlot } = node;\n  if (isSlot) {\n    push(`_${helperNameMap[WITH_CTX]}(`);\n  }\n  push(`(`, -2 /* None */, node);\n  if (shared.isArray(params)) {\n    genNodeList(params, context);\n  } else if (params) {\n    genNode(params, context);\n  }\n  push(`) => `);\n  if (newline || body) {\n    push(`{`);\n    indent();\n  }\n  if (returns) {\n    if (newline) {\n      push(`return `);\n    }\n    if (shared.isArray(returns)) {\n      genNodeListAsArray(returns, context);\n    } else {\n      genNode(returns, context);\n    }\n  } else if (body) {\n    genNode(body, context);\n  }\n  if (newline || body) {\n    deindent();\n    push(`}`);\n  }\n  if (isSlot) {\n    if (node.isNonScopedSlot) {\n      push(`, undefined, true`);\n    }\n    push(`)`);\n  }\n}\nfunction genConditionalExpression(node, context) {\n  const { test, consequent, alternate, newline: needNewline } = node;\n  const { push, indent, deindent, newline } = context;\n  if (test.type === 4) {\n    const needsParens = !isSimpleIdentifier(test.content);\n    needsParens && push(`(`);\n    genExpression(test, context);\n    needsParens && push(`)`);\n  } else {\n    push(`(`);\n    genNode(test, context);\n    push(`)`);\n  }\n  needNewline && indent();\n  context.indentLevel++;\n  needNewline || push(` `);\n  push(`? `);\n  genNode(consequent, context);\n  context.indentLevel--;\n  needNewline && newline();\n  needNewline || push(` `);\n  push(`: `);\n  const isNested = alternate.type === 19;\n  if (!isNested) {\n    context.indentLevel++;\n  }\n  genNode(alternate, context);\n  if (!isNested) {\n    context.indentLevel--;\n  }\n  needNewline && deindent(\n    true\n    /* without newline */\n  );\n}\nfunction genCacheExpression(node, context) {\n  const { push, helper, indent, deindent, newline } = context;\n  const { needPauseTracking, needArraySpread } = node;\n  if (needArraySpread) {\n    push(`[...(`);\n  }\n  push(`_cache[${node.index}] || (`);\n  if (needPauseTracking) {\n    indent();\n    push(`${helper(SET_BLOCK_TRACKING)}(-1`);\n    if (node.inVOnce) push(`, true`);\n    push(`),`);\n    newline();\n    push(`(`);\n  }\n  push(`_cache[${node.index}] = `);\n  genNode(node.value, context);\n  if (needPauseTracking) {\n    push(`).cacheIndex = ${node.index},`);\n    newline();\n    push(`${helper(SET_BLOCK_TRACKING)}(1),`);\n    newline();\n    push(`_cache[${node.index}]`);\n    deindent();\n  }\n  push(`)`);\n  if (needArraySpread) {\n    push(`)]`);\n  }\n}\nfunction genTemplateLiteral(node, context) {\n  const { push, indent, deindent } = context;\n  push(\"`\");\n  const l = node.elements.length;\n  const multilines = l > 3;\n  for (let i = 0; i < l; i++) {\n    const e = node.elements[i];\n    if (shared.isString(e)) {\n      push(e.replace(/(`|\\$|\\\\)/g, \"\\\\$1\"), -3 /* Unknown */);\n    } else {\n      push(\"${\");\n      if (multilines) indent();\n      genNode(e, context);\n      if (multilines) deindent();\n      push(\"}\");\n    }\n  }\n  push(\"`\");\n}\nfunction genIfStatement(node, context) {\n  const { push, indent, deindent } = context;\n  const { test, consequent, alternate } = node;\n  push(`if (`);\n  genNode(test, context);\n  push(`) {`);\n  indent();\n  genNode(consequent, context);\n  deindent();\n  push(`}`);\n  if (alternate) {\n    push(` else `);\n    if (alternate.type === 23) {\n      genIfStatement(alternate, context);\n    } else {\n      push(`{`);\n      indent();\n      genNode(alternate, context);\n      deindent();\n      push(`}`);\n    }\n  }\n}\nfunction genAssignmentExpression(node, context) {\n  genNode(node.left, context);\n  context.push(` = `);\n  genNode(node.right, context);\n}\nfunction genSequenceExpression(node, context) {\n  context.push(`(`);\n  genNodeList(node.expressions, context);\n  context.push(`)`);\n}\nfunction genReturnStatement({ returns }, context) {\n  context.push(`return `);\n  if (shared.isArray(returns)) {\n    genNodeListAsArray(returns, context);\n  } else {\n    genNode(returns, context);\n  }\n}\n\nconst isLiteralWhitelisted = /* @__PURE__ */ shared.makeMap(\"true,false,null,this\");\nconst transformExpression = (node, context) => {\n  if (node.type === 5) {\n    node.content = processExpression(\n      node.content,\n      context\n    );\n  } else if (node.type === 1) {\n    const memo = findDir(node, \"memo\");\n    for (let i = 0; i < node.props.length; i++) {\n      const dir = node.props[i];\n      if (dir.type === 7 && dir.name !== \"for\") {\n        const exp = dir.exp;\n        const arg = dir.arg;\n        if (exp && exp.type === 4 && !(dir.name === \"on\" && arg) && // key has been processed in transformFor(vMemo + vFor)\n        !(memo && arg && arg.type === 4 && arg.content === \"key\")) {\n          dir.exp = processExpression(\n            exp,\n            context,\n            // slot args must be processed as function params\n            dir.name === \"slot\"\n          );\n        }\n        if (arg && arg.type === 4 && !arg.isStatic) {\n          dir.arg = processExpression(arg, context);\n        }\n      }\n    }\n  }\n};\nfunction processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) {\n  if (!context.prefixIdentifiers || !node.content.trim()) {\n    return node;\n  }\n  const { inline, bindingMetadata } = context;\n  const rewriteIdentifier = (raw, parent, id) => {\n    const type = shared.hasOwn(bindingMetadata, raw) && bindingMetadata[raw];\n    if (inline) {\n      const isAssignmentLVal = parent && parent.type === \"AssignmentExpression\" && parent.left === id;\n      const isUpdateArg = parent && parent.type === \"UpdateExpression\" && parent.argument === id;\n      const isDestructureAssignment = parent && isInDestructureAssignment(parent, parentStack);\n      const isNewExpression = parent && isInNewExpression(parentStack);\n      const wrapWithUnref = (raw2) => {\n        const wrapped = `${context.helperString(UNREF)}(${raw2})`;\n        return isNewExpression ? `(${wrapped})` : wrapped;\n      };\n      if (isConst(type) || type === \"setup-reactive-const\" || localVars[raw]) {\n        return raw;\n      } else if (type === \"setup-ref\") {\n        return `${raw}.value`;\n      } else if (type === \"setup-maybe-ref\") {\n        return isAssignmentLVal || isUpdateArg || isDestructureAssignment ? `${raw}.value` : wrapWithUnref(raw);\n      } else if (type === \"setup-let\") {\n        if (isAssignmentLVal) {\n          const { right: rVal, operator } = parent;\n          const rExp = rawExp.slice(rVal.start - 1, rVal.end - 1);\n          const rExpString = stringifyExpression(\n            processExpression(\n              createSimpleExpression(rExp, false),\n              context,\n              false,\n              false,\n              knownIds\n            )\n          );\n          return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore\n` : ``} ? ${raw}.value ${operator} ${rExpString} : ${raw}`;\n        } else if (isUpdateArg) {\n          id.start = parent.start;\n          id.end = parent.end;\n          const { prefix: isPrefix, operator } = parent;\n          const prefix = isPrefix ? operator : ``;\n          const postfix = isPrefix ? `` : operator;\n          return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore\n` : ``} ? ${prefix}${raw}.value${postfix} : ${prefix}${raw}${postfix}`;\n        } else if (isDestructureAssignment) {\n          return raw;\n        } else {\n          return wrapWithUnref(raw);\n        }\n      } else if (type === \"props\") {\n        return shared.genPropsAccessExp(raw);\n      } else if (type === \"props-aliased\") {\n        return shared.genPropsAccessExp(bindingMetadata.__propsAliases[raw]);\n      }\n    } else {\n      if (type && type.startsWith(\"setup\") || type === \"literal-const\") {\n        return `$setup.${raw}`;\n      } else if (type === \"props-aliased\") {\n        return `$props['${bindingMetadata.__propsAliases[raw]}']`;\n      } else if (type) {\n        return `$${type}.${raw}`;\n      }\n    }\n    return `_ctx.${raw}`;\n  };\n  const rawExp = node.content;\n  let ast = node.ast;\n  if (ast === false) {\n    return node;\n  }\n  if (ast === null || !ast && isSimpleIdentifier(rawExp)) {\n    const isScopeVarReference = context.identifiers[rawExp];\n    const isAllowedGlobal = shared.isGloballyAllowed(rawExp);\n    const isLiteral = isLiteralWhitelisted(rawExp);\n    if (!asParams && !isScopeVarReference && !isLiteral && (!isAllowedGlobal || bindingMetadata[rawExp])) {\n      if (isConst(bindingMetadata[rawExp])) {\n        node.constType = 1;\n      }\n      node.content = rewriteIdentifier(rawExp);\n    } else if (!isScopeVarReference) {\n      if (isLiteral) {\n        node.constType = 3;\n      } else {\n        node.constType = 2;\n      }\n    }\n    return node;\n  }\n  if (!ast) {\n    const source = asRawStatements ? ` ${rawExp} ` : `(${rawExp})${asParams ? `=>{}` : ``}`;\n    try {\n      ast = parser.parseExpression(source, {\n        sourceType: \"module\",\n        plugins: context.expressionPlugins\n      });\n    } catch (e) {\n      context.onError(\n        createCompilerError(\n          45,\n          node.loc,\n          void 0,\n          e.message\n        )\n      );\n      return node;\n    }\n  }\n  const ids = [];\n  const parentStack = [];\n  const knownIds = Object.create(context.identifiers);\n  walkIdentifiers(\n    ast,\n    (node2, parent, _, isReferenced, isLocal) => {\n      if (isStaticPropertyKey(node2, parent)) {\n        return;\n      }\n      if (node2.name.startsWith(\"_filter_\")) {\n        return;\n      }\n      const needPrefix = isReferenced && canPrefix(node2);\n      if (needPrefix && !isLocal) {\n        if (isStaticProperty(parent) && parent.shorthand) {\n          node2.prefix = `${node2.name}: `;\n        }\n        node2.name = rewriteIdentifier(node2.name, parent, node2);\n        ids.push(node2);\n      } else {\n        if (!(needPrefix && isLocal) && (!parent || parent.type !== \"CallExpression\" && parent.type !== \"NewExpression\" && parent.type !== \"MemberExpression\")) {\n          node2.isConstant = true;\n        }\n        ids.push(node2);\n      }\n    },\n    true,\n    // invoke on ALL identifiers\n    parentStack,\n    knownIds\n  );\n  const children = [];\n  ids.sort((a, b) => a.start - b.start);\n  ids.forEach((id, i) => {\n    const start = id.start - 1;\n    const end = id.end - 1;\n    const last = ids[i - 1];\n    const leadingText = rawExp.slice(last ? last.end - 1 : 0, start);\n    if (leadingText.length || id.prefix) {\n      children.push(leadingText + (id.prefix || ``));\n    }\n    const source = rawExp.slice(start, end);\n    children.push(\n      createSimpleExpression(\n        id.name,\n        false,\n        {\n          start: advancePositionWithClone(node.loc.start, source, start),\n          end: advancePositionWithClone(node.loc.start, source, end),\n          source\n        },\n        id.isConstant ? 3 : 0\n      )\n    );\n    if (i === ids.length - 1 && end < rawExp.length) {\n      children.push(rawExp.slice(end));\n    }\n  });\n  let ret;\n  if (children.length) {\n    ret = createCompoundExpression(children, node.loc);\n    ret.ast = ast;\n  } else {\n    ret = node;\n    ret.constType = 3;\n  }\n  ret.identifiers = Object.keys(knownIds);\n  return ret;\n}\nfunction canPrefix(id) {\n  if (shared.isGloballyAllowed(id.name)) {\n    return false;\n  }\n  if (id.name === \"require\") {\n    return false;\n  }\n  return true;\n}\nfunction stringifyExpression(exp) {\n  if (shared.isString(exp)) {\n    return exp;\n  } else if (exp.type === 4) {\n    return exp.content;\n  } else {\n    return exp.children.map(stringifyExpression).join(\"\");\n  }\n}\nfunction isConst(type) {\n  return type === \"setup-const\" || type === \"literal-const\";\n}\n\nconst transformIf = createStructuralDirectiveTransform(\n  /^(if|else|else-if)$/,\n  (node, dir, context) => {\n    return processIf(node, dir, context, (ifNode, branch, isRoot) => {\n      const siblings = context.parent.children;\n      let i = siblings.indexOf(ifNode);\n      let key = 0;\n      while (i-- >= 0) {\n        const sibling = siblings[i];\n        if (sibling && sibling.type === 9) {\n          key += sibling.branches.length;\n        }\n      }\n      return () => {\n        if (isRoot) {\n          ifNode.codegenNode = createCodegenNodeForBranch(\n            branch,\n            key,\n            context\n          );\n        } else {\n          const parentCondition = getParentCondition(ifNode.codegenNode);\n          parentCondition.alternate = createCodegenNodeForBranch(\n            branch,\n            key + ifNode.branches.length - 1,\n            context\n          );\n        }\n      };\n    });\n  }\n);\nfunction processIf(node, dir, context, processCodegen) {\n  if (dir.name !== \"else\" && (!dir.exp || !dir.exp.content.trim())) {\n    const loc = dir.exp ? dir.exp.loc : node.loc;\n    context.onError(\n      createCompilerError(28, dir.loc)\n    );\n    dir.exp = createSimpleExpression(`true`, false, loc);\n  }\n  if (context.prefixIdentifiers && dir.exp) {\n    dir.exp = processExpression(dir.exp, context);\n  }\n  if (dir.name === \"if\") {\n    const branch = createIfBranch(node, dir);\n    const ifNode = {\n      type: 9,\n      loc: cloneLoc(node.loc),\n      branches: [branch]\n    };\n    context.replaceNode(ifNode);\n    if (processCodegen) {\n      return processCodegen(ifNode, branch, true);\n    }\n  } else {\n    const siblings = context.parent.children;\n    let i = siblings.indexOf(node);\n    while (i-- >= -1) {\n      const sibling = siblings[i];\n      if (sibling && sibling.type === 3) {\n        context.removeNode(sibling);\n        continue;\n      }\n      if (sibling && sibling.type === 2 && !sibling.content.trim().length) {\n        context.removeNode(sibling);\n        continue;\n      }\n      if (sibling && sibling.type === 9) {\n        if (dir.name === \"else-if\" && sibling.branches[sibling.branches.length - 1].condition === void 0) {\n          context.onError(\n            createCompilerError(30, node.loc)\n          );\n        }\n        context.removeNode();\n        const branch = createIfBranch(node, dir);\n        {\n          const key = branch.userKey;\n          if (key) {\n            sibling.branches.forEach(({ userKey }) => {\n              if (isSameKey(userKey, key)) {\n                context.onError(\n                  createCompilerError(\n                    29,\n                    branch.userKey.loc\n                  )\n                );\n              }\n            });\n          }\n        }\n        sibling.branches.push(branch);\n        const onExit = processCodegen && processCodegen(sibling, branch, false);\n        traverseNode(branch, context);\n        if (onExit) onExit();\n        context.currentNode = null;\n      } else {\n        context.onError(\n          createCompilerError(30, node.loc)\n        );\n      }\n      break;\n    }\n  }\n}\nfunction createIfBranch(node, dir) {\n  const isTemplateIf = node.tagType === 3;\n  return {\n    type: 10,\n    loc: node.loc,\n    condition: dir.name === \"else\" ? void 0 : dir.exp,\n    children: isTemplateIf && !findDir(node, \"for\") ? node.children : [node],\n    userKey: findProp(node, `key`),\n    isTemplateIf\n  };\n}\nfunction createCodegenNodeForBranch(branch, keyIndex, context) {\n  if (branch.condition) {\n    return createConditionalExpression(\n      branch.condition,\n      createChildrenCodegenNode(branch, keyIndex, context),\n      // make sure to pass in asBlock: true so that the comment node call\n      // closes the current block.\n      createCallExpression(context.helper(CREATE_COMMENT), [\n        '\"\"',\n        \"true\"\n      ])\n    );\n  } else {\n    return createChildrenCodegenNode(branch, keyIndex, context);\n  }\n}\nfunction createChildrenCodegenNode(branch, keyIndex, context) {\n  const { helper } = context;\n  const keyProperty = createObjectProperty(\n    `key`,\n    createSimpleExpression(\n      `${keyIndex}`,\n      false,\n      locStub,\n      2\n    )\n  );\n  const { children } = branch;\n  const firstChild = children[0];\n  const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1;\n  if (needFragmentWrapper) {\n    if (children.length === 1 && firstChild.type === 11) {\n      const vnodeCall = firstChild.codegenNode;\n      injectProp(vnodeCall, keyProperty, context);\n      return vnodeCall;\n    } else {\n      let patchFlag = 64;\n      return createVNodeCall(\n        context,\n        helper(FRAGMENT),\n        createObjectExpression([keyProperty]),\n        children,\n        patchFlag,\n        void 0,\n        void 0,\n        true,\n        false,\n        false,\n        branch.loc\n      );\n    }\n  } else {\n    const ret = firstChild.codegenNode;\n    const vnodeCall = getMemoedVNodeCall(ret);\n    if (vnodeCall.type === 13) {\n      convertToBlock(vnodeCall, context);\n    }\n    injectProp(vnodeCall, keyProperty, context);\n    return ret;\n  }\n}\nfunction isSameKey(a, b) {\n  if (!a || a.type !== b.type) {\n    return false;\n  }\n  if (a.type === 6) {\n    if (a.value.content !== b.value.content) {\n      return false;\n    }\n  } else {\n    const exp = a.exp;\n    const branchExp = b.exp;\n    if (exp.type !== branchExp.type) {\n      return false;\n    }\n    if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction getParentCondition(node) {\n  while (true) {\n    if (node.type === 19) {\n      if (node.alternate.type === 19) {\n        node = node.alternate;\n      } else {\n        return node;\n      }\n    } else if (node.type === 20) {\n      node = node.value;\n    }\n  }\n}\n\nconst transformBind = (dir, _node, context) => {\n  const { modifiers, loc } = dir;\n  const arg = dir.arg;\n  let { exp } = dir;\n  if (exp && exp.type === 4 && !exp.content.trim()) {\n    {\n      context.onError(\n        createCompilerError(34, loc)\n      );\n      return {\n        props: [\n          createObjectProperty(arg, createSimpleExpression(\"\", true, loc))\n        ]\n      };\n    }\n  }\n  if (!exp) {\n    if (arg.type !== 4 || !arg.isStatic) {\n      context.onError(\n        createCompilerError(\n          52,\n          arg.loc\n        )\n      );\n      return {\n        props: [\n          createObjectProperty(arg, createSimpleExpression(\"\", true, loc))\n        ]\n      };\n    }\n    transformBindShorthand(dir, context);\n    exp = dir.exp;\n  }\n  if (arg.type !== 4) {\n    arg.children.unshift(`(`);\n    arg.children.push(`) || \"\"`);\n  } else if (!arg.isStatic) {\n    arg.content = arg.content ? `${arg.content} || \"\"` : `\"\"`;\n  }\n  if (modifiers.some((mod) => mod.content === \"camel\")) {\n    if (arg.type === 4) {\n      if (arg.isStatic) {\n        arg.content = shared.camelize(arg.content);\n      } else {\n        arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;\n      }\n    } else {\n      arg.children.unshift(`${context.helperString(CAMELIZE)}(`);\n      arg.children.push(`)`);\n    }\n  }\n  if (!context.inSSR) {\n    if (modifiers.some((mod) => mod.content === \"prop\")) {\n      injectPrefix(arg, \".\");\n    }\n    if (modifiers.some((mod) => mod.content === \"attr\")) {\n      injectPrefix(arg, \"^\");\n    }\n  }\n  return {\n    props: [createObjectProperty(arg, exp)]\n  };\n};\nconst transformBindShorthand = (dir, context) => {\n  const arg = dir.arg;\n  const propName = shared.camelize(arg.content);\n  dir.exp = createSimpleExpression(propName, false, arg.loc);\n  {\n    dir.exp = processExpression(dir.exp, context);\n  }\n};\nconst injectPrefix = (arg, prefix) => {\n  if (arg.type === 4) {\n    if (arg.isStatic) {\n      arg.content = prefix + arg.content;\n    } else {\n      arg.content = `\\`${prefix}\\${${arg.content}}\\``;\n    }\n  } else {\n    arg.children.unshift(`'${prefix}' + (`);\n    arg.children.push(`)`);\n  }\n};\n\nconst transformFor = createStructuralDirectiveTransform(\n  \"for\",\n  (node, dir, context) => {\n    const { helper, removeHelper } = context;\n    return processFor(node, dir, context, (forNode) => {\n      const renderExp = createCallExpression(helper(RENDER_LIST), [\n        forNode.source\n      ]);\n      const isTemplate = isTemplateNode(node);\n      const memo = findDir(node, \"memo\");\n      const keyProp = findProp(node, `key`, false, true);\n      const isDirKey = keyProp && keyProp.type === 7;\n      if (isDirKey && !keyProp.exp) {\n        transformBindShorthand(keyProp, context);\n      }\n      let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);\n      if (memo && keyExp && isDirKey) {\n        {\n          keyProp.exp = keyExp = processExpression(\n            keyExp,\n            context\n          );\n        }\n      }\n      const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;\n      if (isTemplate) {\n        if (memo) {\n          memo.exp = processExpression(\n            memo.exp,\n            context\n          );\n        }\n        if (keyProperty && keyProp.type !== 6) {\n          keyProperty.value = processExpression(\n            keyProperty.value,\n            context\n          );\n        }\n      }\n      const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;\n      const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;\n      forNode.codegenNode = createVNodeCall(\n        context,\n        helper(FRAGMENT),\n        void 0,\n        renderExp,\n        fragmentFlag,\n        void 0,\n        void 0,\n        true,\n        !isStableFragment,\n        false,\n        node.loc\n      );\n      return () => {\n        let childBlock;\n        const { children } = forNode;\n        if (isTemplate) {\n          node.children.some((c) => {\n            if (c.type === 1) {\n              const key = findProp(c, \"key\");\n              if (key) {\n                context.onError(\n                  createCompilerError(\n                    33,\n                    key.loc\n                  )\n                );\n                return true;\n              }\n            }\n          });\n        }\n        const needFragmentWrapper = children.length !== 1 || children[0].type !== 1;\n        const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null;\n        if (slotOutlet) {\n          childBlock = slotOutlet.codegenNode;\n          if (isTemplate && keyProperty) {\n            injectProp(childBlock, keyProperty, context);\n          }\n        } else if (needFragmentWrapper) {\n          childBlock = createVNodeCall(\n            context,\n            helper(FRAGMENT),\n            keyProperty ? createObjectExpression([keyProperty]) : void 0,\n            node.children,\n            64,\n            void 0,\n            void 0,\n            true,\n            void 0,\n            false\n          );\n        } else {\n          childBlock = children[0].codegenNode;\n          if (isTemplate && keyProperty) {\n            injectProp(childBlock, keyProperty, context);\n          }\n          if (childBlock.isBlock !== !isStableFragment) {\n            if (childBlock.isBlock) {\n              removeHelper(OPEN_BLOCK);\n              removeHelper(\n                getVNodeBlockHelper(context.inSSR, childBlock.isComponent)\n              );\n            } else {\n              removeHelper(\n                getVNodeHelper(context.inSSR, childBlock.isComponent)\n              );\n            }\n          }\n          childBlock.isBlock = !isStableFragment;\n          if (childBlock.isBlock) {\n            helper(OPEN_BLOCK);\n            helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));\n          } else {\n            helper(getVNodeHelper(context.inSSR, childBlock.isComponent));\n          }\n        }\n        if (memo) {\n          const loop = createFunctionExpression(\n            createForLoopParams(forNode.parseResult, [\n              createSimpleExpression(`_cached`)\n            ])\n          );\n          loop.body = createBlockStatement([\n            createCompoundExpression([`const _memo = (`, memo.exp, `)`]),\n            createCompoundExpression([\n              `if (_cached`,\n              ...keyExp ? [` && _cached.key === `, keyExp] : [],\n              ` && ${context.helperString(\n                IS_MEMO_SAME\n              )}(_cached, _memo)) return _cached`\n            ]),\n            createCompoundExpression([`const _item = `, childBlock]),\n            createSimpleExpression(`_item.memo = _memo`),\n            createSimpleExpression(`return _item`)\n          ]);\n          renderExp.arguments.push(\n            loop,\n            createSimpleExpression(`_cache`),\n            createSimpleExpression(String(context.cached.length))\n          );\n          context.cached.push(null);\n        } else {\n          renderExp.arguments.push(\n            createFunctionExpression(\n              createForLoopParams(forNode.parseResult),\n              childBlock,\n              true\n            )\n          );\n        }\n      };\n    });\n  }\n);\nfunction processFor(node, dir, context, processCodegen) {\n  if (!dir.exp) {\n    context.onError(\n      createCompilerError(31, dir.loc)\n    );\n    return;\n  }\n  const parseResult = dir.forParseResult;\n  if (!parseResult) {\n    context.onError(\n      createCompilerError(32, dir.loc)\n    );\n    return;\n  }\n  finalizeForParseResult(parseResult, context);\n  const { addIdentifiers, removeIdentifiers, scopes } = context;\n  const { source, value, key, index } = parseResult;\n  const forNode = {\n    type: 11,\n    loc: dir.loc,\n    source,\n    valueAlias: value,\n    keyAlias: key,\n    objectIndexAlias: index,\n    parseResult,\n    children: isTemplateNode(node) ? node.children : [node]\n  };\n  context.replaceNode(forNode);\n  scopes.vFor++;\n  if (context.prefixIdentifiers) {\n    value && addIdentifiers(value);\n    key && addIdentifiers(key);\n    index && addIdentifiers(index);\n  }\n  const onExit = processCodegen && processCodegen(forNode);\n  return () => {\n    scopes.vFor--;\n    if (context.prefixIdentifiers) {\n      value && removeIdentifiers(value);\n      key && removeIdentifiers(key);\n      index && removeIdentifiers(index);\n    }\n    if (onExit) onExit();\n  };\n}\nfunction finalizeForParseResult(result, context) {\n  if (result.finalized) return;\n  if (context.prefixIdentifiers) {\n    result.source = processExpression(\n      result.source,\n      context\n    );\n    if (result.key) {\n      result.key = processExpression(\n        result.key,\n        context,\n        true\n      );\n    }\n    if (result.index) {\n      result.index = processExpression(\n        result.index,\n        context,\n        true\n      );\n    }\n    if (result.value) {\n      result.value = processExpression(\n        result.value,\n        context,\n        true\n      );\n    }\n  }\n  result.finalized = true;\n}\nfunction createForLoopParams({ value, key, index }, memoArgs = []) {\n  return createParamsList([value, key, index, ...memoArgs]);\n}\nfunction createParamsList(args) {\n  let i = args.length;\n  while (i--) {\n    if (args[i]) break;\n  }\n  return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false));\n}\n\nconst defaultFallback = createSimpleExpression(`undefined`, false);\nconst trackSlotScopes = (node, context) => {\n  if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) {\n    const vSlot = findDir(node, \"slot\");\n    if (vSlot) {\n      const slotProps = vSlot.exp;\n      if (context.prefixIdentifiers) {\n        slotProps && context.addIdentifiers(slotProps);\n      }\n      context.scopes.vSlot++;\n      return () => {\n        if (context.prefixIdentifiers) {\n          slotProps && context.removeIdentifiers(slotProps);\n        }\n        context.scopes.vSlot--;\n      };\n    }\n  }\n};\nconst trackVForSlotScopes = (node, context) => {\n  let vFor;\n  if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, \"for\"))) {\n    const result = vFor.forParseResult;\n    if (result) {\n      finalizeForParseResult(result, context);\n      const { value, key, index } = result;\n      const { addIdentifiers, removeIdentifiers } = context;\n      value && addIdentifiers(value);\n      key && addIdentifiers(key);\n      index && addIdentifiers(index);\n      return () => {\n        value && removeIdentifiers(value);\n        key && removeIdentifiers(key);\n        index && removeIdentifiers(index);\n      };\n    }\n  }\n};\nconst buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression(\n  props,\n  children,\n  false,\n  true,\n  children.length ? children[0].loc : loc\n);\nfunction buildSlots(node, context, buildSlotFn = buildClientSlotFn) {\n  context.helper(WITH_CTX);\n  const { children, loc } = node;\n  const slotsProperties = [];\n  const dynamicSlots = [];\n  let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0;\n  if (!context.ssr && context.prefixIdentifiers) {\n    hasDynamicSlots = hasScopeRef(node, context.identifiers);\n  }\n  const onComponentSlot = findDir(node, \"slot\", true);\n  if (onComponentSlot) {\n    const { arg, exp } = onComponentSlot;\n    if (arg && !isStaticExp(arg)) {\n      hasDynamicSlots = true;\n    }\n    slotsProperties.push(\n      createObjectProperty(\n        arg || createSimpleExpression(\"default\", true),\n        buildSlotFn(exp, void 0, children, loc)\n      )\n    );\n  }\n  let hasTemplateSlots = false;\n  let hasNamedDefaultSlot = false;\n  const implicitDefaultChildren = [];\n  const seenSlotNames = /* @__PURE__ */ new Set();\n  let conditionalBranchIndex = 0;\n  for (let i = 0; i < children.length; i++) {\n    const slotElement = children[i];\n    let slotDir;\n    if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, \"slot\", true))) {\n      if (slotElement.type !== 3) {\n        implicitDefaultChildren.push(slotElement);\n      }\n      continue;\n    }\n    if (onComponentSlot) {\n      context.onError(\n        createCompilerError(37, slotDir.loc)\n      );\n      break;\n    }\n    hasTemplateSlots = true;\n    const { children: slotChildren, loc: slotLoc } = slotElement;\n    const {\n      arg: slotName = createSimpleExpression(`default`, true),\n      exp: slotProps,\n      loc: dirLoc\n    } = slotDir;\n    let staticSlotName;\n    if (isStaticExp(slotName)) {\n      staticSlotName = slotName ? slotName.content : `default`;\n    } else {\n      hasDynamicSlots = true;\n    }\n    const vFor = findDir(slotElement, \"for\");\n    const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc);\n    let vIf;\n    let vElse;\n    if (vIf = findDir(slotElement, \"if\")) {\n      hasDynamicSlots = true;\n      dynamicSlots.push(\n        createConditionalExpression(\n          vIf.exp,\n          buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++),\n          defaultFallback\n        )\n      );\n    } else if (vElse = findDir(\n      slotElement,\n      /^else(-if)?$/,\n      true\n      /* allowEmpty */\n    )) {\n      let j = i;\n      let prev;\n      while (j--) {\n        prev = children[j];\n        if (prev.type !== 3 && isNonWhitespaceContent(prev)) {\n          break;\n        }\n      }\n      if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) {\n        let conditional = dynamicSlots[dynamicSlots.length - 1];\n        while (conditional.alternate.type === 19) {\n          conditional = conditional.alternate;\n        }\n        conditional.alternate = vElse.exp ? createConditionalExpression(\n          vElse.exp,\n          buildDynamicSlot(\n            slotName,\n            slotFunction,\n            conditionalBranchIndex++\n          ),\n          defaultFallback\n        ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++);\n      } else {\n        context.onError(\n          createCompilerError(30, vElse.loc)\n        );\n      }\n    } else if (vFor) {\n      hasDynamicSlots = true;\n      const parseResult = vFor.forParseResult;\n      if (parseResult) {\n        finalizeForParseResult(parseResult, context);\n        dynamicSlots.push(\n          createCallExpression(context.helper(RENDER_LIST), [\n            parseResult.source,\n            createFunctionExpression(\n              createForLoopParams(parseResult),\n              buildDynamicSlot(slotName, slotFunction),\n              true\n            )\n          ])\n        );\n      } else {\n        context.onError(\n          createCompilerError(\n            32,\n            vFor.loc\n          )\n        );\n      }\n    } else {\n      if (staticSlotName) {\n        if (seenSlotNames.has(staticSlotName)) {\n          context.onError(\n            createCompilerError(\n              38,\n              dirLoc\n            )\n          );\n          continue;\n        }\n        seenSlotNames.add(staticSlotName);\n        if (staticSlotName === \"default\") {\n          hasNamedDefaultSlot = true;\n        }\n      }\n      slotsProperties.push(createObjectProperty(slotName, slotFunction));\n    }\n  }\n  if (!onComponentSlot) {\n    const buildDefaultSlotProperty = (props, children2) => {\n      const fn = buildSlotFn(props, void 0, children2, loc);\n      if (context.compatConfig) {\n        fn.isNonScopedSlot = true;\n      }\n      return createObjectProperty(`default`, fn);\n    };\n    if (!hasTemplateSlots) {\n      slotsProperties.push(buildDefaultSlotProperty(void 0, children));\n    } else if (implicitDefaultChildren.length && // #3766\n    // with whitespace: 'preserve', whitespaces between slots will end up in\n    // implicitDefaultChildren. Ignore if all implicit children are whitespaces.\n    implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) {\n      if (hasNamedDefaultSlot) {\n        context.onError(\n          createCompilerError(\n            39,\n            implicitDefaultChildren[0].loc\n          )\n        );\n      } else {\n        slotsProperties.push(\n          buildDefaultSlotProperty(void 0, implicitDefaultChildren)\n        );\n      }\n    }\n  }\n  const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1;\n  let slots = createObjectExpression(\n    slotsProperties.concat(\n      createObjectProperty(\n        `_`,\n        // 2 = compiled but dynamic = can skip normalization, but must run diff\n        // 1 = compiled and static = can skip normalization AND diff as optimized\n        createSimpleExpression(\n          slotFlag + (``),\n          false\n        )\n      )\n    ),\n    loc\n  );\n  if (dynamicSlots.length) {\n    slots = createCallExpression(context.helper(CREATE_SLOTS), [\n      slots,\n      createArrayExpression(dynamicSlots)\n    ]);\n  }\n  return {\n    slots,\n    hasDynamicSlots\n  };\n}\nfunction buildDynamicSlot(name, fn, index) {\n  const props = [\n    createObjectProperty(`name`, name),\n    createObjectProperty(`fn`, fn)\n  ];\n  if (index != null) {\n    props.push(\n      createObjectProperty(`key`, createSimpleExpression(String(index), true))\n    );\n  }\n  return createObjectExpression(props);\n}\nfunction hasForwardedSlots(children) {\n  for (let i = 0; i < children.length; i++) {\n    const child = children[i];\n    switch (child.type) {\n      case 1:\n        if (child.tagType === 2 || hasForwardedSlots(child.children)) {\n          return true;\n        }\n        break;\n      case 9:\n        if (hasForwardedSlots(child.branches)) return true;\n        break;\n      case 10:\n      case 11:\n        if (hasForwardedSlots(child.children)) return true;\n        break;\n    }\n  }\n  return false;\n}\nfunction isNonWhitespaceContent(node) {\n  if (node.type !== 2 && node.type !== 12)\n    return true;\n  return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content);\n}\n\nconst directiveImportMap = /* @__PURE__ */ new WeakMap();\nconst transformElement = (node, context) => {\n  return function postTransformElement() {\n    node = context.currentNode;\n    if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) {\n      return;\n    }\n    const { tag, props } = node;\n    const isComponent = node.tagType === 1;\n    let vnodeTag = isComponent ? resolveComponentType(node, context) : `\"${tag}\"`;\n    const isDynamicComponent = shared.isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT;\n    let vnodeProps;\n    let vnodeChildren;\n    let patchFlag = 0;\n    let vnodeDynamicProps;\n    let dynamicPropNames;\n    let vnodeDirectives;\n    let shouldUseBlock = (\n      // dynamic component may resolve to plain elements\n      isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block\n      // updates inside get proper isSVG flag at runtime. (#639, #643)\n      // This is technically web-specific, but splitting the logic out of core\n      // leads to too much unnecessary complexity.\n      (tag === \"svg\" || tag === \"foreignObject\" || tag === \"math\")\n    );\n    if (props.length > 0) {\n      const propsBuildResult = buildProps(\n        node,\n        context,\n        void 0,\n        isComponent,\n        isDynamicComponent\n      );\n      vnodeProps = propsBuildResult.props;\n      patchFlag = propsBuildResult.patchFlag;\n      dynamicPropNames = propsBuildResult.dynamicPropNames;\n      const directives = propsBuildResult.directives;\n      vnodeDirectives = directives && directives.length ? createArrayExpression(\n        directives.map((dir) => buildDirectiveArgs(dir, context))\n      ) : void 0;\n      if (propsBuildResult.shouldUseBlock) {\n        shouldUseBlock = true;\n      }\n    }\n    if (node.children.length > 0) {\n      if (vnodeTag === KEEP_ALIVE) {\n        shouldUseBlock = true;\n        patchFlag |= 1024;\n      }\n      const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling\n      vnodeTag !== TELEPORT && // explained above.\n      vnodeTag !== KEEP_ALIVE;\n      if (shouldBuildAsSlots) {\n        const { slots, hasDynamicSlots } = buildSlots(node, context);\n        vnodeChildren = slots;\n        if (hasDynamicSlots) {\n          patchFlag |= 1024;\n        }\n      } else if (node.children.length === 1 && vnodeTag !== TELEPORT) {\n        const child = node.children[0];\n        const type = child.type;\n        const hasDynamicTextChild = type === 5 || type === 8;\n        if (hasDynamicTextChild && getConstantType(child, context) === 0) {\n          patchFlag |= 1;\n        }\n        if (hasDynamicTextChild || type === 2) {\n          vnodeChildren = child;\n        } else {\n          vnodeChildren = node.children;\n        }\n      } else {\n        vnodeChildren = node.children;\n      }\n    }\n    if (dynamicPropNames && dynamicPropNames.length) {\n      vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames);\n    }\n    node.codegenNode = createVNodeCall(\n      context,\n      vnodeTag,\n      vnodeProps,\n      vnodeChildren,\n      patchFlag === 0 ? void 0 : patchFlag,\n      vnodeDynamicProps,\n      vnodeDirectives,\n      !!shouldUseBlock,\n      false,\n      isComponent,\n      node.loc\n    );\n  };\n};\nfunction resolveComponentType(node, context, ssr = false) {\n  let { tag } = node;\n  const isExplicitDynamic = isComponentTag(tag);\n  const isProp = findProp(\n    node,\n    \"is\",\n    false,\n    true\n    /* allow empty */\n  );\n  if (isProp) {\n    if (isExplicitDynamic || isCompatEnabled(\n      \"COMPILER_IS_ON_ELEMENT\",\n      context\n    )) {\n      let exp;\n      if (isProp.type === 6) {\n        exp = isProp.value && createSimpleExpression(isProp.value.content, true);\n      } else {\n        exp = isProp.exp;\n        if (!exp) {\n          exp = createSimpleExpression(`is`, false, isProp.arg.loc);\n          {\n            exp = isProp.exp = processExpression(exp, context);\n          }\n        }\n      }\n      if (exp) {\n        return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [\n          exp\n        ]);\n      }\n    } else if (isProp.type === 6 && isProp.value.content.startsWith(\"vue:\")) {\n      tag = isProp.value.content.slice(4);\n    }\n  }\n  const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag);\n  if (builtIn) {\n    if (!ssr) context.helper(builtIn);\n    return builtIn;\n  }\n  {\n    const fromSetup = resolveSetupReference(tag, context);\n    if (fromSetup) {\n      return fromSetup;\n    }\n    const dotIndex = tag.indexOf(\".\");\n    if (dotIndex > 0) {\n      const ns = resolveSetupReference(tag.slice(0, dotIndex), context);\n      if (ns) {\n        return ns + tag.slice(dotIndex);\n      }\n    }\n  }\n  if (context.selfName && shared.capitalize(shared.camelize(tag)) === context.selfName) {\n    context.helper(RESOLVE_COMPONENT);\n    context.components.add(tag + `__self`);\n    return toValidAssetId(tag, `component`);\n  }\n  context.helper(RESOLVE_COMPONENT);\n  context.components.add(tag);\n  return toValidAssetId(tag, `component`);\n}\nfunction resolveSetupReference(name, context) {\n  const bindings = context.bindingMetadata;\n  if (!bindings || bindings.__isScriptSetup === false) {\n    return;\n  }\n  const camelName = shared.camelize(name);\n  const PascalName = shared.capitalize(camelName);\n  const checkType = (type) => {\n    if (bindings[name] === type) {\n      return name;\n    }\n    if (bindings[camelName] === type) {\n      return camelName;\n    }\n    if (bindings[PascalName] === type) {\n      return PascalName;\n    }\n  };\n  const fromConst = checkType(\"setup-const\") || checkType(\"setup-reactive-const\") || checkType(\"literal-const\");\n  if (fromConst) {\n    return context.inline ? (\n      // in inline mode, const setup bindings (e.g. imports) can be used as-is\n      fromConst\n    ) : `$setup[${JSON.stringify(fromConst)}]`;\n  }\n  const fromMaybeRef = checkType(\"setup-let\") || checkType(\"setup-ref\") || checkType(\"setup-maybe-ref\");\n  if (fromMaybeRef) {\n    return context.inline ? (\n      // setup scope bindings that may be refs need to be unrefed\n      `${context.helperString(UNREF)}(${fromMaybeRef})`\n    ) : `$setup[${JSON.stringify(fromMaybeRef)}]`;\n  }\n  const fromProps = checkType(\"props\");\n  if (fromProps) {\n    return `${context.helperString(UNREF)}(${context.inline ? \"__props\" : \"$props\"}[${JSON.stringify(fromProps)}])`;\n  }\n}\nfunction buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) {\n  const { tag, loc: elementLoc, children } = node;\n  let properties = [];\n  const mergeArgs = [];\n  const runtimeDirectives = [];\n  const hasChildren = children.length > 0;\n  let shouldUseBlock = false;\n  let patchFlag = 0;\n  let hasRef = false;\n  let hasClassBinding = false;\n  let hasStyleBinding = false;\n  let hasHydrationEventBinding = false;\n  let hasDynamicKeys = false;\n  let hasVnodeHook = false;\n  const dynamicPropNames = [];\n  const pushMergeArg = (arg) => {\n    if (properties.length) {\n      mergeArgs.push(\n        createObjectExpression(dedupeProperties(properties), elementLoc)\n      );\n      properties = [];\n    }\n    if (arg) mergeArgs.push(arg);\n  };\n  const pushRefVForMarker = () => {\n    if (context.scopes.vFor > 0) {\n      properties.push(\n        createObjectProperty(\n          createSimpleExpression(\"ref_for\", true),\n          createSimpleExpression(\"true\")\n        )\n      );\n    }\n  };\n  const analyzePatchFlag = ({ key, value }) => {\n    if (isStaticExp(key)) {\n      const name = key.content;\n      const isEventHandler = shared.isOn(name);\n      if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click\n      // dedicated fast path.\n      name.toLowerCase() !== \"onclick\" && // omit v-model handlers\n      name !== \"onUpdate:modelValue\" && // omit onVnodeXXX hooks\n      !shared.isReservedProp(name)) {\n        hasHydrationEventBinding = true;\n      }\n      if (isEventHandler && shared.isReservedProp(name)) {\n        hasVnodeHook = true;\n      }\n      if (isEventHandler && value.type === 14) {\n        value = value.arguments[0];\n      }\n      if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {\n        return;\n      }\n      if (name === \"ref\") {\n        hasRef = true;\n      } else if (name === \"class\") {\n        hasClassBinding = true;\n      } else if (name === \"style\") {\n        hasStyleBinding = true;\n      } else if (name !== \"key\" && !dynamicPropNames.includes(name)) {\n        dynamicPropNames.push(name);\n      }\n      if (isComponent && (name === \"class\" || name === \"style\") && !dynamicPropNames.includes(name)) {\n        dynamicPropNames.push(name);\n      }\n    } else {\n      hasDynamicKeys = true;\n    }\n  };\n  for (let i = 0; i < props.length; i++) {\n    const prop = props[i];\n    if (prop.type === 6) {\n      const { loc, name, nameLoc, value } = prop;\n      let isStatic = true;\n      if (name === \"ref\") {\n        hasRef = true;\n        pushRefVForMarker();\n        if (value && context.inline) {\n          const binding = context.bindingMetadata[value.content];\n          if (binding === \"setup-let\" || binding === \"setup-ref\" || binding === \"setup-maybe-ref\") {\n            isStatic = false;\n            properties.push(\n              createObjectProperty(\n                createSimpleExpression(\"ref_key\", true),\n                createSimpleExpression(value.content, true, value.loc)\n              )\n            );\n          }\n        }\n      }\n      if (name === \"is\" && (isComponentTag(tag) || value && value.content.startsWith(\"vue:\") || isCompatEnabled(\n        \"COMPILER_IS_ON_ELEMENT\",\n        context\n      ))) {\n        continue;\n      }\n      properties.push(\n        createObjectProperty(\n          createSimpleExpression(name, true, nameLoc),\n          createSimpleExpression(\n            value ? value.content : \"\",\n            isStatic,\n            value ? value.loc : loc\n          )\n        )\n      );\n    } else {\n      const { name, arg, exp, loc, modifiers } = prop;\n      const isVBind = name === \"bind\";\n      const isVOn = name === \"on\";\n      if (name === \"slot\") {\n        if (!isComponent) {\n          context.onError(\n            createCompilerError(40, loc)\n          );\n        }\n        continue;\n      }\n      if (name === \"once\" || name === \"memo\") {\n        continue;\n      }\n      if (name === \"is\" || isVBind && isStaticArgOf(arg, \"is\") && (isComponentTag(tag) || isCompatEnabled(\n        \"COMPILER_IS_ON_ELEMENT\",\n        context\n      ))) {\n        continue;\n      }\n      if (isVOn && ssr) {\n        continue;\n      }\n      if (\n        // #938: elements with dynamic keys should be forced into blocks\n        isVBind && isStaticArgOf(arg, \"key\") || // inline before-update hooks need to force block so that it is invoked\n        // before children\n        isVOn && hasChildren && isStaticArgOf(arg, \"vue:before-update\")\n      ) {\n        shouldUseBlock = true;\n      }\n      if (isVBind && isStaticArgOf(arg, \"ref\")) {\n        pushRefVForMarker();\n      }\n      if (!arg && (isVBind || isVOn)) {\n        hasDynamicKeys = true;\n        if (exp) {\n          if (isVBind) {\n            {\n              pushMergeArg();\n              if (isCompatEnabled(\n                \"COMPILER_V_BIND_OBJECT_ORDER\",\n                context\n              )) {\n                mergeArgs.unshift(exp);\n                continue;\n              }\n            }\n            pushRefVForMarker();\n            pushMergeArg();\n            mergeArgs.push(exp);\n          } else {\n            pushMergeArg({\n              type: 14,\n              loc,\n              callee: context.helper(TO_HANDLERS),\n              arguments: isComponent ? [exp] : [exp, `true`]\n            });\n          }\n        } else {\n          context.onError(\n            createCompilerError(\n              isVBind ? 34 : 35,\n              loc\n            )\n          );\n        }\n        continue;\n      }\n      if (isVBind && modifiers.some((mod) => mod.content === \"prop\")) {\n        patchFlag |= 32;\n      }\n      const directiveTransform = context.directiveTransforms[name];\n      if (directiveTransform) {\n        const { props: props2, needRuntime } = directiveTransform(prop, node, context);\n        !ssr && props2.forEach(analyzePatchFlag);\n        if (isVOn && arg && !isStaticExp(arg)) {\n          pushMergeArg(createObjectExpression(props2, elementLoc));\n        } else {\n          properties.push(...props2);\n        }\n        if (needRuntime) {\n          runtimeDirectives.push(prop);\n          if (shared.isSymbol(needRuntime)) {\n            directiveImportMap.set(prop, needRuntime);\n          }\n        }\n      } else if (!shared.isBuiltInDirective(name)) {\n        runtimeDirectives.push(prop);\n        if (hasChildren) {\n          shouldUseBlock = true;\n        }\n      }\n    }\n  }\n  let propsExpression = void 0;\n  if (mergeArgs.length) {\n    pushMergeArg();\n    if (mergeArgs.length > 1) {\n      propsExpression = createCallExpression(\n        context.helper(MERGE_PROPS),\n        mergeArgs,\n        elementLoc\n      );\n    } else {\n      propsExpression = mergeArgs[0];\n    }\n  } else if (properties.length) {\n    propsExpression = createObjectExpression(\n      dedupeProperties(properties),\n      elementLoc\n    );\n  }\n  if (hasDynamicKeys) {\n    patchFlag |= 16;\n  } else {\n    if (hasClassBinding && !isComponent) {\n      patchFlag |= 2;\n    }\n    if (hasStyleBinding && !isComponent) {\n      patchFlag |= 4;\n    }\n    if (dynamicPropNames.length) {\n      patchFlag |= 8;\n    }\n    if (hasHydrationEventBinding) {\n      patchFlag |= 32;\n    }\n  }\n  if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) {\n    patchFlag |= 512;\n  }\n  if (!context.inSSR && propsExpression) {\n    switch (propsExpression.type) {\n      case 15:\n        let classKeyIndex = -1;\n        let styleKeyIndex = -1;\n        let hasDynamicKey = false;\n        for (let i = 0; i < propsExpression.properties.length; i++) {\n          const key = propsExpression.properties[i].key;\n          if (isStaticExp(key)) {\n            if (key.content === \"class\") {\n              classKeyIndex = i;\n            } else if (key.content === \"style\") {\n              styleKeyIndex = i;\n            }\n          } else if (!key.isHandlerKey) {\n            hasDynamicKey = true;\n          }\n        }\n        const classProp = propsExpression.properties[classKeyIndex];\n        const styleProp = propsExpression.properties[styleKeyIndex];\n        if (!hasDynamicKey) {\n          if (classProp && !isStaticExp(classProp.value)) {\n            classProp.value = createCallExpression(\n              context.helper(NORMALIZE_CLASS),\n              [classProp.value]\n            );\n          }\n          if (styleProp && // the static style is compiled into an object,\n          // so use `hasStyleBinding` to ensure that it is a dynamic style binding\n          (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist,\n          // v-bind:style with static literal object\n          styleProp.value.type === 17)) {\n            styleProp.value = createCallExpression(\n              context.helper(NORMALIZE_STYLE),\n              [styleProp.value]\n            );\n          }\n        } else {\n          propsExpression = createCallExpression(\n            context.helper(NORMALIZE_PROPS),\n            [propsExpression]\n          );\n        }\n        break;\n      case 14:\n        break;\n      default:\n        propsExpression = createCallExpression(\n          context.helper(NORMALIZE_PROPS),\n          [\n            createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [\n              propsExpression\n            ])\n          ]\n        );\n        break;\n    }\n  }\n  return {\n    props: propsExpression,\n    directives: runtimeDirectives,\n    patchFlag,\n    dynamicPropNames,\n    shouldUseBlock\n  };\n}\nfunction dedupeProperties(properties) {\n  const knownProps = /* @__PURE__ */ new Map();\n  const deduped = [];\n  for (let i = 0; i < properties.length; i++) {\n    const prop = properties[i];\n    if (prop.key.type === 8 || !prop.key.isStatic) {\n      deduped.push(prop);\n      continue;\n    }\n    const name = prop.key.content;\n    const existing = knownProps.get(name);\n    if (existing) {\n      if (name === \"style\" || name === \"class\" || shared.isOn(name)) {\n        mergeAsArray(existing, prop);\n      }\n    } else {\n      knownProps.set(name, prop);\n      deduped.push(prop);\n    }\n  }\n  return deduped;\n}\nfunction mergeAsArray(existing, incoming) {\n  if (existing.value.type === 17) {\n    existing.value.elements.push(incoming.value);\n  } else {\n    existing.value = createArrayExpression(\n      [existing.value, incoming.value],\n      existing.loc\n    );\n  }\n}\nfunction buildDirectiveArgs(dir, context) {\n  const dirArgs = [];\n  const runtime = directiveImportMap.get(dir);\n  if (runtime) {\n    dirArgs.push(context.helperString(runtime));\n  } else {\n    const fromSetup = resolveSetupReference(\"v-\" + dir.name, context);\n    if (fromSetup) {\n      dirArgs.push(fromSetup);\n    } else {\n      context.helper(RESOLVE_DIRECTIVE);\n      context.directives.add(dir.name);\n      dirArgs.push(toValidAssetId(dir.name, `directive`));\n    }\n  }\n  const { loc } = dir;\n  if (dir.exp) dirArgs.push(dir.exp);\n  if (dir.arg) {\n    if (!dir.exp) {\n      dirArgs.push(`void 0`);\n    }\n    dirArgs.push(dir.arg);\n  }\n  if (Object.keys(dir.modifiers).length) {\n    if (!dir.arg) {\n      if (!dir.exp) {\n        dirArgs.push(`void 0`);\n      }\n      dirArgs.push(`void 0`);\n    }\n    const trueExpression = createSimpleExpression(`true`, false, loc);\n    dirArgs.push(\n      createObjectExpression(\n        dir.modifiers.map(\n          (modifier) => createObjectProperty(modifier, trueExpression)\n        ),\n        loc\n      )\n    );\n  }\n  return createArrayExpression(dirArgs, dir.loc);\n}\nfunction stringifyDynamicPropNames(props) {\n  let propsNamesString = `[`;\n  for (let i = 0, l = props.length; i < l; i++) {\n    propsNamesString += JSON.stringify(props[i]);\n    if (i < l - 1) propsNamesString += \", \";\n  }\n  return propsNamesString + `]`;\n}\nfunction isComponentTag(tag) {\n  return tag === \"component\" || tag === \"Component\";\n}\n\nconst transformSlotOutlet = (node, context) => {\n  if (isSlotOutlet(node)) {\n    const { children, loc } = node;\n    const { slotName, slotProps } = processSlotOutlet(node, context);\n    const slotArgs = [\n      context.prefixIdentifiers ? `_ctx.$slots` : `$slots`,\n      slotName,\n      \"{}\",\n      \"undefined\",\n      \"true\"\n    ];\n    let expectedLen = 2;\n    if (slotProps) {\n      slotArgs[2] = slotProps;\n      expectedLen = 3;\n    }\n    if (children.length) {\n      slotArgs[3] = createFunctionExpression([], children, false, false, loc);\n      expectedLen = 4;\n    }\n    if (context.scopeId && !context.slotted) {\n      expectedLen = 5;\n    }\n    slotArgs.splice(expectedLen);\n    node.codegenNode = createCallExpression(\n      context.helper(RENDER_SLOT),\n      slotArgs,\n      loc\n    );\n  }\n};\nfunction processSlotOutlet(node, context) {\n  let slotName = `\"default\"`;\n  let slotProps = void 0;\n  const nonNameProps = [];\n  for (let i = 0; i < node.props.length; i++) {\n    const p = node.props[i];\n    if (p.type === 6) {\n      if (p.value) {\n        if (p.name === \"name\") {\n          slotName = JSON.stringify(p.value.content);\n        } else {\n          p.name = shared.camelize(p.name);\n          nonNameProps.push(p);\n        }\n      }\n    } else {\n      if (p.name === \"bind\" && isStaticArgOf(p.arg, \"name\")) {\n        if (p.exp) {\n          slotName = p.exp;\n        } else if (p.arg && p.arg.type === 4) {\n          const name = shared.camelize(p.arg.content);\n          slotName = p.exp = createSimpleExpression(name, false, p.arg.loc);\n          {\n            slotName = p.exp = processExpression(p.exp, context);\n          }\n        }\n      } else {\n        if (p.name === \"bind\" && p.arg && isStaticExp(p.arg)) {\n          p.arg.content = shared.camelize(p.arg.content);\n        }\n        nonNameProps.push(p);\n      }\n    }\n  }\n  if (nonNameProps.length > 0) {\n    const { props, directives } = buildProps(\n      node,\n      context,\n      nonNameProps,\n      false,\n      false\n    );\n    slotProps = props;\n    if (directives.length) {\n      context.onError(\n        createCompilerError(\n          36,\n          directives[0].loc\n        )\n      );\n    }\n  }\n  return {\n    slotName,\n    slotProps\n  };\n}\n\nconst transformOn = (dir, node, context, augmentor) => {\n  const { loc, modifiers, arg } = dir;\n  if (!dir.exp && !modifiers.length) {\n    context.onError(createCompilerError(35, loc));\n  }\n  let eventName;\n  if (arg.type === 4) {\n    if (arg.isStatic) {\n      let rawName = arg.content;\n      if (rawName.startsWith(\"vue:\")) {\n        rawName = `vnode-${rawName.slice(4)}`;\n      }\n      const eventString = node.tagType !== 0 || rawName.startsWith(\"vnode\") || !/[A-Z]/.test(rawName) ? (\n        // for non-element and vnode lifecycle event listeners, auto convert\n        // it to camelCase. See issue #2249\n        shared.toHandlerKey(shared.camelize(rawName))\n      ) : (\n        // preserve case for plain element listeners that have uppercase\n        // letters, as these may be custom elements' custom events\n        `on:${rawName}`\n      );\n      eventName = createSimpleExpression(eventString, true, arg.loc);\n    } else {\n      eventName = createCompoundExpression([\n        `${context.helperString(TO_HANDLER_KEY)}(`,\n        arg,\n        `)`\n      ]);\n    }\n  } else {\n    eventName = arg;\n    eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`);\n    eventName.children.push(`)`);\n  }\n  let exp = dir.exp;\n  if (exp && !exp.content.trim()) {\n    exp = void 0;\n  }\n  let shouldCache = context.cacheHandlers && !exp && !context.inVOnce;\n  if (exp) {\n    const isMemberExp = isMemberExpression(exp, context);\n    const isInlineStatement = !(isMemberExp || isFnExpression(exp, context));\n    const hasMultipleStatements = exp.content.includes(`;`);\n    if (context.prefixIdentifiers) {\n      isInlineStatement && context.addIdentifiers(`$event`);\n      exp = dir.exp = processExpression(\n        exp,\n        context,\n        false,\n        hasMultipleStatements\n      );\n      isInlineStatement && context.removeIdentifiers(`$event`);\n      shouldCache = context.cacheHandlers && // unnecessary to cache inside v-once\n      !context.inVOnce && // runtime constants don't need to be cached\n      // (this is analyzed by compileScript in SFC <script setup>)\n      !(exp.type === 4 && exp.constType > 0) && // #1541 bail if this is a member exp handler passed to a component -\n      // we need to use the original function to preserve arity,\n      // e.g. <transition> relies on checking cb.length to determine\n      // transition end handling. Inline function is ok since its arity\n      // is preserved even when cached.\n      !(isMemberExp && node.tagType === 1) && // bail if the function references closure variables (v-for, v-slot)\n      // it must be passed fresh to avoid stale values.\n      !hasScopeRef(exp, context.identifiers);\n      if (shouldCache && isMemberExp) {\n        if (exp.type === 4) {\n          exp.content = `${exp.content} && ${exp.content}(...args)`;\n        } else {\n          exp.children = [...exp.children, ` && `, ...exp.children, `(...args)`];\n        }\n      }\n    }\n    if (isInlineStatement || shouldCache && isMemberExp) {\n      exp = createCompoundExpression([\n        `${isInlineStatement ? context.isTS ? `($event: any)` : `$event` : `${context.isTS ? `\n//@ts-ignore\n` : ``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`,\n        exp,\n        hasMultipleStatements ? `}` : `)`\n      ]);\n    }\n  }\n  let ret = {\n    props: [\n      createObjectProperty(\n        eventName,\n        exp || createSimpleExpression(`() => {}`, false, loc)\n      )\n    ]\n  };\n  if (augmentor) {\n    ret = augmentor(ret);\n  }\n  if (shouldCache) {\n    ret.props[0].value = context.cache(ret.props[0].value);\n  }\n  ret.props.forEach((p) => p.key.isHandlerKey = true);\n  return ret;\n};\n\nconst transformText = (node, context) => {\n  if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {\n    return () => {\n      const children = node.children;\n      let currentContainer = void 0;\n      let hasText = false;\n      for (let i = 0; i < children.length; i++) {\n        const child = children[i];\n        if (isText$1(child)) {\n          hasText = true;\n          for (let j = i + 1; j < children.length; j++) {\n            const next = children[j];\n            if (isText$1(next)) {\n              if (!currentContainer) {\n                currentContainer = children[i] = createCompoundExpression(\n                  [child],\n                  child.loc\n                );\n              }\n              currentContainer.children.push(` + `, next);\n              children.splice(j, 1);\n              j--;\n            } else {\n              currentContainer = void 0;\n              break;\n            }\n          }\n        }\n      }\n      if (!hasText || // if this is a plain element with a single text child, leave it\n      // as-is since the runtime has dedicated fast path for this by directly\n      // setting textContent of the element.\n      // for component root it's always normalized anyway.\n      children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756\n      // custom directives can potentially add DOM elements arbitrarily,\n      // we need to avoid setting textContent of the element at runtime\n      // to avoid accidentally overwriting the DOM elements added\n      // by the user through custom directives.\n      !node.props.find(\n        (p) => p.type === 7 && !context.directiveTransforms[p.name]\n      ) && // in compat mode, <template> tags with no special directives\n      // will be rendered as a fragment so its children must be\n      // converted into vnodes.\n      !(node.tag === \"template\"))) {\n        return;\n      }\n      for (let i = 0; i < children.length; i++) {\n        const child = children[i];\n        if (isText$1(child) || child.type === 8) {\n          const callArgs = [];\n          if (child.type !== 2 || child.content !== \" \") {\n            callArgs.push(child);\n          }\n          if (!context.ssr && getConstantType(child, context) === 0) {\n            callArgs.push(\n              1 + (``)\n            );\n          }\n          children[i] = {\n            type: 12,\n            content: child,\n            loc: child.loc,\n            codegenNode: createCallExpression(\n              context.helper(CREATE_TEXT),\n              callArgs\n            )\n          };\n        }\n      }\n    };\n  }\n};\n\nconst seen$1 = /* @__PURE__ */ new WeakSet();\nconst transformOnce = (node, context) => {\n  if (node.type === 1 && findDir(node, \"once\", true)) {\n    if (seen$1.has(node) || context.inVOnce || context.inSSR) {\n      return;\n    }\n    seen$1.add(node);\n    context.inVOnce = true;\n    context.helper(SET_BLOCK_TRACKING);\n    return () => {\n      context.inVOnce = false;\n      const cur = context.currentNode;\n      if (cur.codegenNode) {\n        cur.codegenNode = context.cache(\n          cur.codegenNode,\n          true,\n          true\n        );\n      }\n    };\n  }\n};\n\nconst transformModel = (dir, node, context) => {\n  const { exp, arg } = dir;\n  if (!exp) {\n    context.onError(\n      createCompilerError(41, dir.loc)\n    );\n    return createTransformProps();\n  }\n  const rawExp = exp.loc.source.trim();\n  const expString = exp.type === 4 ? exp.content : rawExp;\n  const bindingType = context.bindingMetadata[rawExp];\n  if (bindingType === \"props\" || bindingType === \"props-aliased\") {\n    context.onError(createCompilerError(44, exp.loc));\n    return createTransformProps();\n  }\n  const maybeRef = context.inline && (bindingType === \"setup-let\" || bindingType === \"setup-ref\" || bindingType === \"setup-maybe-ref\");\n  if (!expString.trim() || !isMemberExpression(exp, context) && !maybeRef) {\n    context.onError(\n      createCompilerError(42, exp.loc)\n    );\n    return createTransformProps();\n  }\n  if (context.prefixIdentifiers && isSimpleIdentifier(expString) && context.identifiers[expString]) {\n    context.onError(\n      createCompilerError(43, exp.loc)\n    );\n    return createTransformProps();\n  }\n  const propName = arg ? arg : createSimpleExpression(\"modelValue\", true);\n  const eventName = arg ? isStaticExp(arg) ? `onUpdate:${shared.camelize(arg.content)}` : createCompoundExpression(['\"onUpdate:\" + ', arg]) : `onUpdate:modelValue`;\n  let assignmentExp;\n  const eventArg = context.isTS ? `($event: any)` : `$event`;\n  if (maybeRef) {\n    if (bindingType === \"setup-ref\") {\n      assignmentExp = createCompoundExpression([\n        `${eventArg} => ((`,\n        createSimpleExpression(rawExp, false, exp.loc),\n        `).value = $event)`\n      ]);\n    } else {\n      const altAssignment = bindingType === \"setup-let\" ? `${rawExp} = $event` : `null`;\n      assignmentExp = createCompoundExpression([\n        `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? (`,\n        createSimpleExpression(rawExp, false, exp.loc),\n        `).value = $event : ${altAssignment})`\n      ]);\n    }\n  } else {\n    assignmentExp = createCompoundExpression([\n      `${eventArg} => ((`,\n      exp,\n      `) = $event)`\n    ]);\n  }\n  const props = [\n    // modelValue: foo\n    createObjectProperty(propName, dir.exp),\n    // \"onUpdate:modelValue\": $event => (foo = $event)\n    createObjectProperty(eventName, assignmentExp)\n  ];\n  if (context.prefixIdentifiers && !context.inVOnce && context.cacheHandlers && !hasScopeRef(exp, context.identifiers)) {\n    props[1].value = context.cache(props[1].value);\n  }\n  if (dir.modifiers.length && node.tagType === 1) {\n    const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `);\n    const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + \"Modifiers\"']) : `modelModifiers`;\n    props.push(\n      createObjectProperty(\n        modifiersKey,\n        createSimpleExpression(\n          `{ ${modifiers} }`,\n          false,\n          dir.loc,\n          2\n        )\n      )\n    );\n  }\n  return createTransformProps(props);\n};\nfunction createTransformProps(props = []) {\n  return { props };\n}\n\nconst validDivisionCharRE = /[\\w).+\\-_$\\]]/;\nconst transformFilter = (node, context) => {\n  if (!isCompatEnabled(\"COMPILER_FILTERS\", context)) {\n    return;\n  }\n  if (node.type === 5) {\n    rewriteFilter(node.content, context);\n  } else if (node.type === 1) {\n    node.props.forEach((prop) => {\n      if (prop.type === 7 && prop.name !== \"for\" && prop.exp) {\n        rewriteFilter(prop.exp, context);\n      }\n    });\n  }\n};\nfunction rewriteFilter(node, context) {\n  if (node.type === 4) {\n    parseFilter(node, context);\n  } else {\n    for (let i = 0; i < node.children.length; i++) {\n      const child = node.children[i];\n      if (typeof child !== \"object\") continue;\n      if (child.type === 4) {\n        parseFilter(child, context);\n      } else if (child.type === 8) {\n        rewriteFilter(node, context);\n      } else if (child.type === 5) {\n        rewriteFilter(child.content, context);\n      }\n    }\n  }\n}\nfunction parseFilter(node, context) {\n  const exp = node.content;\n  let inSingle = false;\n  let inDouble = false;\n  let inTemplateString = false;\n  let inRegex = false;\n  let curly = 0;\n  let square = 0;\n  let paren = 0;\n  let lastFilterIndex = 0;\n  let c, prev, i, expression, filters = [];\n  for (i = 0; i < exp.length; i++) {\n    prev = c;\n    c = exp.charCodeAt(i);\n    if (inSingle) {\n      if (c === 39 && prev !== 92) inSingle = false;\n    } else if (inDouble) {\n      if (c === 34 && prev !== 92) inDouble = false;\n    } else if (inTemplateString) {\n      if (c === 96 && prev !== 92) inTemplateString = false;\n    } else if (inRegex) {\n      if (c === 47 && prev !== 92) inRegex = false;\n    } else if (c === 124 && // pipe\n    exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) {\n      if (expression === void 0) {\n        lastFilterIndex = i + 1;\n        expression = exp.slice(0, i).trim();\n      } else {\n        pushFilter();\n      }\n    } else {\n      switch (c) {\n        case 34:\n          inDouble = true;\n          break;\n        // \"\n        case 39:\n          inSingle = true;\n          break;\n        // '\n        case 96:\n          inTemplateString = true;\n          break;\n        // `\n        case 40:\n          paren++;\n          break;\n        // (\n        case 41:\n          paren--;\n          break;\n        // )\n        case 91:\n          square++;\n          break;\n        // [\n        case 93:\n          square--;\n          break;\n        // ]\n        case 123:\n          curly++;\n          break;\n        // {\n        case 125:\n          curly--;\n          break;\n      }\n      if (c === 47) {\n        let j = i - 1;\n        let p;\n        for (; j >= 0; j--) {\n          p = exp.charAt(j);\n          if (p !== \" \") break;\n        }\n        if (!p || !validDivisionCharRE.test(p)) {\n          inRegex = true;\n        }\n      }\n    }\n  }\n  if (expression === void 0) {\n    expression = exp.slice(0, i).trim();\n  } else if (lastFilterIndex !== 0) {\n    pushFilter();\n  }\n  function pushFilter() {\n    filters.push(exp.slice(lastFilterIndex, i).trim());\n    lastFilterIndex = i + 1;\n  }\n  if (filters.length) {\n    for (i = 0; i < filters.length; i++) {\n      expression = wrapFilter(expression, filters[i], context);\n    }\n    node.content = expression;\n    node.ast = void 0;\n  }\n}\nfunction wrapFilter(exp, filter, context) {\n  context.helper(RESOLVE_FILTER);\n  const i = filter.indexOf(\"(\");\n  if (i < 0) {\n    context.filters.add(filter);\n    return `${toValidAssetId(filter, \"filter\")}(${exp})`;\n  } else {\n    const name = filter.slice(0, i);\n    const args = filter.slice(i + 1);\n    context.filters.add(name);\n    return `${toValidAssetId(name, \"filter\")}(${exp}${args !== \")\" ? \",\" + args : args}`;\n  }\n}\n\nconst seen = /* @__PURE__ */ new WeakSet();\nconst transformMemo = (node, context) => {\n  if (node.type === 1) {\n    const dir = findDir(node, \"memo\");\n    if (!dir || seen.has(node)) {\n      return;\n    }\n    seen.add(node);\n    return () => {\n      const codegenNode = node.codegenNode || context.currentNode.codegenNode;\n      if (codegenNode && codegenNode.type === 13) {\n        if (node.tagType !== 1) {\n          convertToBlock(codegenNode, context);\n        }\n        node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [\n          dir.exp,\n          createFunctionExpression(void 0, codegenNode),\n          `_cache`,\n          String(context.cached.length)\n        ]);\n        context.cached.push(null);\n      }\n    };\n  }\n};\n\nfunction getBaseTransformPreset(prefixIdentifiers) {\n  return [\n    [\n      transformOnce,\n      transformIf,\n      transformMemo,\n      transformFor,\n      ...[transformFilter] ,\n      ...prefixIdentifiers ? [\n        // order is important\n        trackVForSlotScopes,\n        transformExpression\n      ] : [],\n      transformSlotOutlet,\n      transformElement,\n      trackSlotScopes,\n      transformText\n    ],\n    {\n      on: transformOn,\n      bind: transformBind,\n      model: transformModel\n    }\n  ];\n}\nfunction baseCompile(source, options = {}) {\n  const onError = options.onError || defaultOnError;\n  const isModuleMode = options.mode === \"module\";\n  const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode;\n  if (!prefixIdentifiers && options.cacheHandlers) {\n    onError(createCompilerError(49));\n  }\n  if (options.scopeId && !isModuleMode) {\n    onError(createCompilerError(50));\n  }\n  const resolvedOptions = shared.extend({}, options, {\n    prefixIdentifiers\n  });\n  const ast = shared.isString(source) ? baseParse(source, resolvedOptions) : source;\n  const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers);\n  if (options.isTS) {\n    const { expressionPlugins } = options;\n    if (!expressionPlugins || !expressionPlugins.includes(\"typescript\")) {\n      options.expressionPlugins = [...expressionPlugins || [], \"typescript\"];\n    }\n  }\n  transform(\n    ast,\n    shared.extend({}, resolvedOptions, {\n      nodeTransforms: [\n        ...nodeTransforms,\n        ...options.nodeTransforms || []\n        // user transforms\n      ],\n      directiveTransforms: shared.extend(\n        {},\n        directiveTransforms,\n        options.directiveTransforms || {}\n        // user transforms\n      )\n    })\n  );\n  return generate(ast, resolvedOptions);\n}\n\nconst BindingTypes = {\n  \"DATA\": \"data\",\n  \"PROPS\": \"props\",\n  \"PROPS_ALIASED\": \"props-aliased\",\n  \"SETUP_LET\": \"setup-let\",\n  \"SETUP_CONST\": \"setup-const\",\n  \"SETUP_REACTIVE_CONST\": \"setup-reactive-const\",\n  \"SETUP_MAYBE_REF\": \"setup-maybe-ref\",\n  \"SETUP_REF\": \"setup-ref\",\n  \"OPTIONS\": \"options\",\n  \"LITERAL_CONST\": \"literal-const\"\n};\n\nconst noopDirectiveTransform = () => ({ props: [] });\n\nexports.generateCodeFrame = shared.generateCodeFrame;\nexports.BASE_TRANSITION = BASE_TRANSITION;\nexports.BindingTypes = BindingTypes;\nexports.CAMELIZE = CAMELIZE;\nexports.CAPITALIZE = CAPITALIZE;\nexports.CREATE_BLOCK = CREATE_BLOCK;\nexports.CREATE_COMMENT = CREATE_COMMENT;\nexports.CREATE_ELEMENT_BLOCK = CREATE_ELEMENT_BLOCK;\nexports.CREATE_ELEMENT_VNODE = CREATE_ELEMENT_VNODE;\nexports.CREATE_SLOTS = CREATE_SLOTS;\nexports.CREATE_STATIC = CREATE_STATIC;\nexports.CREATE_TEXT = CREATE_TEXT;\nexports.CREATE_VNODE = CREATE_VNODE;\nexports.CompilerDeprecationTypes = CompilerDeprecationTypes;\nexports.ConstantTypes = ConstantTypes;\nexports.ElementTypes = ElementTypes;\nexports.ErrorCodes = ErrorCodes;\nexports.FRAGMENT = FRAGMENT;\nexports.GUARD_REACTIVE_PROPS = GUARD_REACTIVE_PROPS;\nexports.IS_MEMO_SAME = IS_MEMO_SAME;\nexports.IS_REF = IS_REF;\nexports.KEEP_ALIVE = KEEP_ALIVE;\nexports.MERGE_PROPS = MERGE_PROPS;\nexports.NORMALIZE_CLASS = NORMALIZE_CLASS;\nexports.NORMALIZE_PROPS = NORMALIZE_PROPS;\nexports.NORMALIZE_STYLE = NORMALIZE_STYLE;\nexports.Namespaces = Namespaces;\nexports.NodeTypes = NodeTypes;\nexports.OPEN_BLOCK = OPEN_BLOCK;\nexports.POP_SCOPE_ID = POP_SCOPE_ID;\nexports.PUSH_SCOPE_ID = PUSH_SCOPE_ID;\nexports.RENDER_LIST = RENDER_LIST;\nexports.RENDER_SLOT = RENDER_SLOT;\nexports.RESOLVE_COMPONENT = RESOLVE_COMPONENT;\nexports.RESOLVE_DIRECTIVE = RESOLVE_DIRECTIVE;\nexports.RESOLVE_DYNAMIC_COMPONENT = RESOLVE_DYNAMIC_COMPONENT;\nexports.RESOLVE_FILTER = RESOLVE_FILTER;\nexports.SET_BLOCK_TRACKING = SET_BLOCK_TRACKING;\nexports.SUSPENSE = SUSPENSE;\nexports.TELEPORT = TELEPORT;\nexports.TO_DISPLAY_STRING = TO_DISPLAY_STRING;\nexports.TO_HANDLERS = TO_HANDLERS;\nexports.TO_HANDLER_KEY = TO_HANDLER_KEY;\nexports.TS_NODE_TYPES = TS_NODE_TYPES;\nexports.UNREF = UNREF;\nexports.WITH_CTX = WITH_CTX;\nexports.WITH_DIRECTIVES = WITH_DIRECTIVES;\nexports.WITH_MEMO = WITH_MEMO;\nexports.advancePositionWithClone = advancePositionWithClone;\nexports.advancePositionWithMutation = advancePositionWithMutation;\nexports.assert = assert;\nexports.baseCompile = baseCompile;\nexports.baseParse = baseParse;\nexports.buildDirectiveArgs = buildDirectiveArgs;\nexports.buildProps = buildProps;\nexports.buildSlots = buildSlots;\nexports.checkCompatEnabled = checkCompatEnabled;\nexports.convertToBlock = convertToBlock;\nexports.createArrayExpression = createArrayExpression;\nexports.createAssignmentExpression = createAssignmentExpression;\nexports.createBlockStatement = createBlockStatement;\nexports.createCacheExpression = createCacheExpression;\nexports.createCallExpression = createCallExpression;\nexports.createCompilerError = createCompilerError;\nexports.createCompoundExpression = createCompoundExpression;\nexports.createConditionalExpression = createConditionalExpression;\nexports.createForLoopParams = createForLoopParams;\nexports.createFunctionExpression = createFunctionExpression;\nexports.createIfStatement = createIfStatement;\nexports.createInterpolation = createInterpolation;\nexports.createObjectExpression = createObjectExpression;\nexports.createObjectProperty = createObjectProperty;\nexports.createReturnStatement = createReturnStatement;\nexports.createRoot = createRoot;\nexports.createSequenceExpression = createSequenceExpression;\nexports.createSimpleExpression = createSimpleExpression;\nexports.createStructuralDirectiveTransform = createStructuralDirectiveTransform;\nexports.createTemplateLiteral = createTemplateLiteral;\nexports.createTransformContext = createTransformContext;\nexports.createVNodeCall = createVNodeCall;\nexports.errorMessages = errorMessages;\nexports.extractIdentifiers = extractIdentifiers;\nexports.findDir = findDir;\nexports.findProp = findProp;\nexports.forAliasRE = forAliasRE;\nexports.generate = generate;\nexports.getBaseTransformPreset = getBaseTransformPreset;\nexports.getConstantType = getConstantType;\nexports.getMemoedVNodeCall = getMemoedVNodeCall;\nexports.getVNodeBlockHelper = getVNodeBlockHelper;\nexports.getVNodeHelper = getVNodeHelper;\nexports.hasDynamicKeyVBind = hasDynamicKeyVBind;\nexports.hasScopeRef = hasScopeRef;\nexports.helperNameMap = helperNameMap;\nexports.injectProp = injectProp;\nexports.isCoreComponent = isCoreComponent;\nexports.isFnExpression = isFnExpression;\nexports.isFnExpressionBrowser = isFnExpressionBrowser;\nexports.isFnExpressionNode = isFnExpressionNode;\nexports.isFunctionType = isFunctionType;\nexports.isInDestructureAssignment = isInDestructureAssignment;\nexports.isInNewExpression = isInNewExpression;\nexports.isMemberExpression = isMemberExpression;\nexports.isMemberExpressionBrowser = isMemberExpressionBrowser;\nexports.isMemberExpressionNode = isMemberExpressionNode;\nexports.isReferencedIdentifier = isReferencedIdentifier;\nexports.isSimpleIdentifier = isSimpleIdentifier;\nexports.isSlotOutlet = isSlotOutlet;\nexports.isStaticArgOf = isStaticArgOf;\nexports.isStaticExp = isStaticExp;\nexports.isStaticProperty = isStaticProperty;\nexports.isStaticPropertyKey = isStaticPropertyKey;\nexports.isTemplateNode = isTemplateNode;\nexports.isText = isText$1;\nexports.isVPre = isVPre;\nexports.isVSlot = isVSlot;\nexports.locStub = locStub;\nexports.noopDirectiveTransform = noopDirectiveTransform;\nexports.processExpression = processExpression;\nexports.processFor = processFor;\nexports.processIf = processIf;\nexports.processSlotOutlet = processSlotOutlet;\nexports.registerRuntimeHelpers = registerRuntimeHelpers;\nexports.resolveComponentType = resolveComponentType;\nexports.stringifyExpression = stringifyExpression;\nexports.toValidAssetId = toValidAssetId;\nexports.trackSlotScopes = trackSlotScopes;\nexports.trackVForSlotScopes = trackVForSlotScopes;\nexports.transform = transform;\nexports.transformBind = transformBind;\nexports.transformElement = transformElement;\nexports.transformExpression = transformExpression;\nexports.transformModel = transformModel;\nexports.transformOn = transformOn;\nexports.traverseNode = traverseNode;\nexports.unwrapTSNode = unwrapTSNode;\nexports.walkBlockDeclarations = walkBlockDeclarations;\nexports.walkFunctionParams = walkFunctionParams;\nexports.walkIdentifiers = walkIdentifiers;\nexports.warnDeprecation = warnDeprecation;\n","'use strict'\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./dist/compiler-core.cjs.prod.js')\n} else {\n  module.exports = require('./dist/compiler-core.cjs.js')\n}\n","/**\n* @vue/compiler-dom v3.5.18\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar compilerCore = require('@vue/compiler-core');\nvar shared = require('@vue/shared');\n\nconst V_MODEL_RADIO = Symbol(``);\nconst V_MODEL_CHECKBOX = Symbol(\n  ``\n);\nconst V_MODEL_TEXT = Symbol(``);\nconst V_MODEL_SELECT = Symbol(\n  ``\n);\nconst V_MODEL_DYNAMIC = Symbol(\n  ``\n);\nconst V_ON_WITH_MODIFIERS = Symbol(\n  ``\n);\nconst V_ON_WITH_KEYS = Symbol(\n  ``\n);\nconst V_SHOW = Symbol(``);\nconst TRANSITION = Symbol(``);\nconst TRANSITION_GROUP = Symbol(\n  ``\n);\ncompilerCore.registerRuntimeHelpers({\n  [V_MODEL_RADIO]: `vModelRadio`,\n  [V_MODEL_CHECKBOX]: `vModelCheckbox`,\n  [V_MODEL_TEXT]: `vModelText`,\n  [V_MODEL_SELECT]: `vModelSelect`,\n  [V_MODEL_DYNAMIC]: `vModelDynamic`,\n  [V_ON_WITH_MODIFIERS]: `withModifiers`,\n  [V_ON_WITH_KEYS]: `withKeys`,\n  [V_SHOW]: `vShow`,\n  [TRANSITION]: `Transition`,\n  [TRANSITION_GROUP]: `TransitionGroup`\n});\n\nconst parserOptions = {\n  parseMode: \"html\",\n  isVoidTag: shared.isVoidTag,\n  isNativeTag: (tag) => shared.isHTMLTag(tag) || shared.isSVGTag(tag) || shared.isMathMLTag(tag),\n  isPreTag: (tag) => tag === \"pre\",\n  isIgnoreNewlineTag: (tag) => tag === \"pre\" || tag === \"textarea\",\n  decodeEntities: void 0,\n  isBuiltInComponent: (tag) => {\n    if (tag === \"Transition\" || tag === \"transition\") {\n      return TRANSITION;\n    } else if (tag === \"TransitionGroup\" || tag === \"transition-group\") {\n      return TRANSITION_GROUP;\n    }\n  },\n  // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher\n  getNamespace(tag, parent, rootNamespace) {\n    let ns = parent ? parent.ns : rootNamespace;\n    if (parent && ns === 2) {\n      if (parent.tag === \"annotation-xml\") {\n        if (tag === \"svg\") {\n          return 1;\n        }\n        if (parent.props.some(\n          (a) => a.type === 6 && a.name === \"encoding\" && a.value != null && (a.value.content === \"text/html\" || a.value.content === \"application/xhtml+xml\")\n        )) {\n          ns = 0;\n        }\n      } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== \"mglyph\" && tag !== \"malignmark\") {\n        ns = 0;\n      }\n    } else if (parent && ns === 1) {\n      if (parent.tag === \"foreignObject\" || parent.tag === \"desc\" || parent.tag === \"title\") {\n        ns = 0;\n      }\n    }\n    if (ns === 0) {\n      if (tag === \"svg\") {\n        return 1;\n      }\n      if (tag === \"math\") {\n        return 2;\n      }\n    }\n    return ns;\n  }\n};\n\nconst transformStyle = (node) => {\n  if (node.type === 1) {\n    node.props.forEach((p, i) => {\n      if (p.type === 6 && p.name === \"style\" && p.value) {\n        node.props[i] = {\n          type: 7,\n          name: `bind`,\n          arg: compilerCore.createSimpleExpression(`style`, true, p.loc),\n          exp: parseInlineCSS(p.value.content, p.loc),\n          modifiers: [],\n          loc: p.loc\n        };\n      }\n    });\n  }\n};\nconst parseInlineCSS = (cssText, loc) => {\n  const normalized = shared.parseStringStyle(cssText);\n  return compilerCore.createSimpleExpression(\n    JSON.stringify(normalized),\n    false,\n    loc,\n    3\n  );\n};\n\nfunction createDOMCompilerError(code, loc) {\n  return compilerCore.createCompilerError(\n    code,\n    loc,\n    DOMErrorMessages \n  );\n}\nconst DOMErrorCodes = {\n  \"X_V_HTML_NO_EXPRESSION\": 53,\n  \"53\": \"X_V_HTML_NO_EXPRESSION\",\n  \"X_V_HTML_WITH_CHILDREN\": 54,\n  \"54\": \"X_V_HTML_WITH_CHILDREN\",\n  \"X_V_TEXT_NO_EXPRESSION\": 55,\n  \"55\": \"X_V_TEXT_NO_EXPRESSION\",\n  \"X_V_TEXT_WITH_CHILDREN\": 56,\n  \"56\": \"X_V_TEXT_WITH_CHILDREN\",\n  \"X_V_MODEL_ON_INVALID_ELEMENT\": 57,\n  \"57\": \"X_V_MODEL_ON_INVALID_ELEMENT\",\n  \"X_V_MODEL_ARG_ON_ELEMENT\": 58,\n  \"58\": \"X_V_MODEL_ARG_ON_ELEMENT\",\n  \"X_V_MODEL_ON_FILE_INPUT_ELEMENT\": 59,\n  \"59\": \"X_V_MODEL_ON_FILE_INPUT_ELEMENT\",\n  \"X_V_MODEL_UNNECESSARY_VALUE\": 60,\n  \"60\": \"X_V_MODEL_UNNECESSARY_VALUE\",\n  \"X_V_SHOW_NO_EXPRESSION\": 61,\n  \"61\": \"X_V_SHOW_NO_EXPRESSION\",\n  \"X_TRANSITION_INVALID_CHILDREN\": 62,\n  \"62\": \"X_TRANSITION_INVALID_CHILDREN\",\n  \"X_IGNORED_SIDE_EFFECT_TAG\": 63,\n  \"63\": \"X_IGNORED_SIDE_EFFECT_TAG\",\n  \"__EXTEND_POINT__\": 64,\n  \"64\": \"__EXTEND_POINT__\"\n};\nconst DOMErrorMessages = {\n  [53]: `v-html is missing expression.`,\n  [54]: `v-html will override element children.`,\n  [55]: `v-text is missing expression.`,\n  [56]: `v-text will override element children.`,\n  [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`,\n  [58]: `v-model argument is not supported on plain elements.`,\n  [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,\n  [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,\n  [61]: `v-show is missing expression.`,\n  [62]: `<Transition> expects exactly one child element or component.`,\n  [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`\n};\n\nconst transformVHtml = (dir, node, context) => {\n  const { exp, loc } = dir;\n  if (!exp) {\n    context.onError(\n      createDOMCompilerError(53, loc)\n    );\n  }\n  if (node.children.length) {\n    context.onError(\n      createDOMCompilerError(54, loc)\n    );\n    node.children.length = 0;\n  }\n  return {\n    props: [\n      compilerCore.createObjectProperty(\n        compilerCore.createSimpleExpression(`innerHTML`, true, loc),\n        exp || compilerCore.createSimpleExpression(\"\", true)\n      )\n    ]\n  };\n};\n\nconst transformVText = (dir, node, context) => {\n  const { exp, loc } = dir;\n  if (!exp) {\n    context.onError(\n      createDOMCompilerError(55, loc)\n    );\n  }\n  if (node.children.length) {\n    context.onError(\n      createDOMCompilerError(56, loc)\n    );\n    node.children.length = 0;\n  }\n  return {\n    props: [\n      compilerCore.createObjectProperty(\n        compilerCore.createSimpleExpression(`textContent`, true),\n        exp ? compilerCore.getConstantType(exp, context) > 0 ? exp : compilerCore.createCallExpression(\n          context.helperString(compilerCore.TO_DISPLAY_STRING),\n          [exp],\n          loc\n        ) : compilerCore.createSimpleExpression(\"\", true)\n      )\n    ]\n  };\n};\n\nconst transformModel = (dir, node, context) => {\n  const baseResult = compilerCore.transformModel(dir, node, context);\n  if (!baseResult.props.length || node.tagType === 1) {\n    return baseResult;\n  }\n  if (dir.arg) {\n    context.onError(\n      createDOMCompilerError(\n        58,\n        dir.arg.loc\n      )\n    );\n  }\n  const { tag } = node;\n  const isCustomElement = context.isCustomElement(tag);\n  if (tag === \"input\" || tag === \"textarea\" || tag === \"select\" || isCustomElement) {\n    let directiveToUse = V_MODEL_TEXT;\n    let isInvalidType = false;\n    if (tag === \"input\" || isCustomElement) {\n      const type = compilerCore.findProp(node, `type`);\n      if (type) {\n        if (type.type === 7) {\n          directiveToUse = V_MODEL_DYNAMIC;\n        } else if (type.value) {\n          switch (type.value.content) {\n            case \"radio\":\n              directiveToUse = V_MODEL_RADIO;\n              break;\n            case \"checkbox\":\n              directiveToUse = V_MODEL_CHECKBOX;\n              break;\n            case \"file\":\n              isInvalidType = true;\n              context.onError(\n                createDOMCompilerError(\n                  59,\n                  dir.loc\n                )\n              );\n              break;\n          }\n        }\n      } else if (compilerCore.hasDynamicKeyVBind(node)) {\n        directiveToUse = V_MODEL_DYNAMIC;\n      } else ;\n    } else if (tag === \"select\") {\n      directiveToUse = V_MODEL_SELECT;\n    } else ;\n    if (!isInvalidType) {\n      baseResult.needRuntime = context.helper(directiveToUse);\n    }\n  } else {\n    context.onError(\n      createDOMCompilerError(\n        57,\n        dir.loc\n      )\n    );\n  }\n  baseResult.props = baseResult.props.filter(\n    (p) => !(p.key.type === 4 && p.key.content === \"modelValue\")\n  );\n  return baseResult;\n};\n\nconst isEventOptionModifier = /* @__PURE__ */ shared.makeMap(`passive,once,capture`);\nconst isNonKeyModifier = /* @__PURE__ */ shared.makeMap(\n  // event propagation management\n  `stop,prevent,self,ctrl,shift,alt,meta,exact,middle`\n);\nconst maybeKeyModifier = /* @__PURE__ */ shared.makeMap(\"left,right\");\nconst isKeyboardEvent = /* @__PURE__ */ shared.makeMap(`onkeyup,onkeydown,onkeypress`);\nconst resolveModifiers = (key, modifiers, context, loc) => {\n  const keyModifiers = [];\n  const nonKeyModifiers = [];\n  const eventOptionModifiers = [];\n  for (let i = 0; i < modifiers.length; i++) {\n    const modifier = modifiers[i].content;\n    if (modifier === \"native\" && compilerCore.checkCompatEnabled(\n      \"COMPILER_V_ON_NATIVE\",\n      context,\n      loc\n    )) {\n      eventOptionModifiers.push(modifier);\n    } else if (isEventOptionModifier(modifier)) {\n      eventOptionModifiers.push(modifier);\n    } else {\n      if (maybeKeyModifier(modifier)) {\n        if (compilerCore.isStaticExp(key)) {\n          if (isKeyboardEvent(key.content.toLowerCase())) {\n            keyModifiers.push(modifier);\n          } else {\n            nonKeyModifiers.push(modifier);\n          }\n        } else {\n          keyModifiers.push(modifier);\n          nonKeyModifiers.push(modifier);\n        }\n      } else {\n        if (isNonKeyModifier(modifier)) {\n          nonKeyModifiers.push(modifier);\n        } else {\n          keyModifiers.push(modifier);\n        }\n      }\n    }\n  }\n  return {\n    keyModifiers,\n    nonKeyModifiers,\n    eventOptionModifiers\n  };\n};\nconst transformClick = (key, event) => {\n  const isStaticClick = compilerCore.isStaticExp(key) && key.content.toLowerCase() === \"onclick\";\n  return isStaticClick ? compilerCore.createSimpleExpression(event, true) : key.type !== 4 ? compilerCore.createCompoundExpression([\n    `(`,\n    key,\n    `) === \"onClick\" ? \"${event}\" : (`,\n    key,\n    `)`\n  ]) : key;\n};\nconst transformOn = (dir, node, context) => {\n  return compilerCore.transformOn(dir, node, context, (baseResult) => {\n    const { modifiers } = dir;\n    if (!modifiers.length) return baseResult;\n    let { key, value: handlerExp } = baseResult.props[0];\n    const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc);\n    if (nonKeyModifiers.includes(\"right\")) {\n      key = transformClick(key, `onContextmenu`);\n    }\n    if (nonKeyModifiers.includes(\"middle\")) {\n      key = transformClick(key, `onMouseup`);\n    }\n    if (nonKeyModifiers.length) {\n      handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [\n        handlerExp,\n        JSON.stringify(nonKeyModifiers)\n      ]);\n    }\n    if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard\n    (!compilerCore.isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) {\n      handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_KEYS), [\n        handlerExp,\n        JSON.stringify(keyModifiers)\n      ]);\n    }\n    if (eventOptionModifiers.length) {\n      const modifierPostfix = eventOptionModifiers.map(shared.capitalize).join(\"\");\n      key = compilerCore.isStaticExp(key) ? compilerCore.createSimpleExpression(`${key.content}${modifierPostfix}`, true) : compilerCore.createCompoundExpression([`(`, key, `) + \"${modifierPostfix}\"`]);\n    }\n    return {\n      props: [compilerCore.createObjectProperty(key, handlerExp)]\n    };\n  });\n};\n\nconst transformShow = (dir, node, context) => {\n  const { exp, loc } = dir;\n  if (!exp) {\n    context.onError(\n      createDOMCompilerError(61, loc)\n    );\n  }\n  return {\n    props: [],\n    needRuntime: context.helper(V_SHOW)\n  };\n};\n\nconst expReplaceRE = /__VUE_EXP_START__(.*?)__VUE_EXP_END__/g;\nconst stringifyStatic = (children, context, parent) => {\n  if (context.scopes.vSlot > 0) {\n    return;\n  }\n  const isParentCached = parent.type === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !shared.isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 20;\n  let nc = 0;\n  let ec = 0;\n  const currentChunk = [];\n  const stringifyCurrentChunk = (currentIndex) => {\n    if (nc >= 20 || ec >= 5) {\n      const staticCall = compilerCore.createCallExpression(context.helper(compilerCore.CREATE_STATIC), [\n        JSON.stringify(\n          currentChunk.map((node) => stringifyNode(node, context)).join(\"\")\n        ).replace(expReplaceRE, `\" + $1 + \"`),\n        // the 2nd argument indicates the number of DOM nodes this static vnode\n        // will insert / hydrate\n        String(currentChunk.length)\n      ]);\n      const deleteCount = currentChunk.length - 1;\n      if (isParentCached) {\n        children.splice(\n          currentIndex - currentChunk.length,\n          currentChunk.length,\n          // @ts-expect-error\n          staticCall\n        );\n      } else {\n        currentChunk[0].codegenNode.value = staticCall;\n        if (currentChunk.length > 1) {\n          children.splice(currentIndex - currentChunk.length + 1, deleteCount);\n          const cacheIndex = context.cached.indexOf(\n            currentChunk[currentChunk.length - 1].codegenNode\n          );\n          if (cacheIndex > -1) {\n            for (let i2 = cacheIndex; i2 < context.cached.length; i2++) {\n              const c = context.cached[i2];\n              if (c) c.index -= deleteCount;\n            }\n            context.cached.splice(cacheIndex - deleteCount + 1, deleteCount);\n          }\n        }\n      }\n      return deleteCount;\n    }\n    return 0;\n  };\n  let i = 0;\n  for (; i < children.length; i++) {\n    const child = children[i];\n    const isCached = isParentCached || getCachedNode(child);\n    if (isCached) {\n      const result = analyzeNode(child);\n      if (result) {\n        nc += result[0];\n        ec += result[1];\n        currentChunk.push(child);\n        continue;\n      }\n    }\n    i -= stringifyCurrentChunk(i);\n    nc = 0;\n    ec = 0;\n    currentChunk.length = 0;\n  }\n  stringifyCurrentChunk(i);\n};\nconst getCachedNode = (node) => {\n  if ((node.type === 1 && node.tagType === 0 || node.type === 12) && node.codegenNode && node.codegenNode.type === 20) {\n    return node.codegenNode;\n  }\n};\nconst dataAriaRE = /^(data|aria)-/;\nconst isStringifiableAttr = (name, ns) => {\n  return (ns === 0 ? shared.isKnownHtmlAttr(name) : ns === 1 ? shared.isKnownSvgAttr(name) : ns === 2 ? shared.isKnownMathMLAttr(name) : false) || dataAriaRE.test(name);\n};\nconst isNonStringifiable = /* @__PURE__ */ shared.makeMap(\n  `caption,thead,tr,th,tbody,td,tfoot,colgroup,col`\n);\nfunction analyzeNode(node) {\n  if (node.type === 1 && isNonStringifiable(node.tag)) {\n    return false;\n  }\n  if (node.type === 12) {\n    return [1, 0];\n  }\n  let nc = 1;\n  let ec = node.props.length > 0 ? 1 : 0;\n  let bailed = false;\n  const bail = () => {\n    bailed = true;\n    return false;\n  };\n  function walk(node2) {\n    const isOptionTag = node2.tag === \"option\" && node2.ns === 0;\n    for (let i = 0; i < node2.props.length; i++) {\n      const p = node2.props[i];\n      if (p.type === 6 && !isStringifiableAttr(p.name, node2.ns)) {\n        return bail();\n      }\n      if (p.type === 7 && p.name === \"bind\") {\n        if (p.arg && (p.arg.type === 8 || p.arg.isStatic && !isStringifiableAttr(p.arg.content, node2.ns))) {\n          return bail();\n        }\n        if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) {\n          return bail();\n        }\n        if (isOptionTag && compilerCore.isStaticArgOf(p.arg, \"value\") && p.exp && !p.exp.isStatic) {\n          return bail();\n        }\n      }\n    }\n    for (let i = 0; i < node2.children.length; i++) {\n      nc++;\n      const child = node2.children[i];\n      if (child.type === 1) {\n        if (child.props.length > 0) {\n          ec++;\n        }\n        walk(child);\n        if (bailed) {\n          return false;\n        }\n      }\n    }\n    return true;\n  }\n  return walk(node) ? [nc, ec] : false;\n}\nfunction stringifyNode(node, context) {\n  if (shared.isString(node)) {\n    return node;\n  }\n  if (shared.isSymbol(node)) {\n    return ``;\n  }\n  switch (node.type) {\n    case 1:\n      return stringifyElement(node, context);\n    case 2:\n      return shared.escapeHtml(node.content);\n    case 3:\n      return `<!--${shared.escapeHtml(node.content)}-->`;\n    case 5:\n      return shared.escapeHtml(shared.toDisplayString(evaluateConstant(node.content)));\n    case 8:\n      return shared.escapeHtml(evaluateConstant(node));\n    case 12:\n      return stringifyNode(node.content, context);\n    default:\n      return \"\";\n  }\n}\nfunction stringifyElement(node, context) {\n  let res = `<${node.tag}`;\n  let innerHTML = \"\";\n  for (let i = 0; i < node.props.length; i++) {\n    const p = node.props[i];\n    if (p.type === 6) {\n      res += ` ${p.name}`;\n      if (p.value) {\n        res += `=\"${shared.escapeHtml(p.value.content)}\"`;\n      }\n    } else if (p.type === 7) {\n      if (p.name === \"bind\") {\n        const exp = p.exp;\n        if (exp.content[0] === \"_\") {\n          res += ` ${p.arg.content}=\"__VUE_EXP_START__${exp.content}__VUE_EXP_END__\"`;\n          continue;\n        }\n        if (shared.isBooleanAttr(p.arg.content) && exp.content === \"false\") {\n          continue;\n        }\n        let evaluated = evaluateConstant(exp);\n        if (evaluated != null) {\n          const arg = p.arg && p.arg.content;\n          if (arg === \"class\") {\n            evaluated = shared.normalizeClass(evaluated);\n          } else if (arg === \"style\") {\n            evaluated = shared.stringifyStyle(shared.normalizeStyle(evaluated));\n          }\n          res += ` ${p.arg.content}=\"${shared.escapeHtml(\n            evaluated\n          )}\"`;\n        }\n      } else if (p.name === \"html\") {\n        innerHTML = evaluateConstant(p.exp);\n      } else if (p.name === \"text\") {\n        innerHTML = shared.escapeHtml(\n          shared.toDisplayString(evaluateConstant(p.exp))\n        );\n      }\n    }\n  }\n  if (context.scopeId) {\n    res += ` ${context.scopeId}`;\n  }\n  res += `>`;\n  if (innerHTML) {\n    res += innerHTML;\n  } else {\n    for (let i = 0; i < node.children.length; i++) {\n      res += stringifyNode(node.children[i], context);\n    }\n  }\n  if (!shared.isVoidTag(node.tag)) {\n    res += `</${node.tag}>`;\n  }\n  return res;\n}\nfunction evaluateConstant(exp) {\n  if (exp.type === 4) {\n    return new Function(`return (${exp.content})`)();\n  } else {\n    let res = ``;\n    exp.children.forEach((c) => {\n      if (shared.isString(c) || shared.isSymbol(c)) {\n        return;\n      }\n      if (c.type === 2) {\n        res += c.content;\n      } else if (c.type === 5) {\n        res += shared.toDisplayString(evaluateConstant(c.content));\n      } else {\n        res += evaluateConstant(c);\n      }\n    });\n    return res;\n  }\n}\n\nconst ignoreSideEffectTags = (node, context) => {\n  if (node.type === 1 && node.tagType === 0 && (node.tag === \"script\" || node.tag === \"style\")) {\n    context.removeNode();\n  }\n};\n\nconst DOMNodeTransforms = [\n  transformStyle,\n  ...[]\n];\nconst DOMDirectiveTransforms = {\n  cloak: compilerCore.noopDirectiveTransform,\n  html: transformVHtml,\n  text: transformVText,\n  model: transformModel,\n  // override compiler-core\n  on: transformOn,\n  // override compiler-core\n  show: transformShow\n};\nfunction compile(src, options = {}) {\n  return compilerCore.baseCompile(\n    src,\n    shared.extend({}, parserOptions, options, {\n      nodeTransforms: [\n        // ignore <script> and <tag>\n        // this is not put inside DOMNodeTransforms because that list is used\n        // by compiler-ssr to generate vnode fallback branches\n        ignoreSideEffectTags,\n        ...DOMNodeTransforms,\n        ...options.nodeTransforms || []\n      ],\n      directiveTransforms: shared.extend(\n        {},\n        DOMDirectiveTransforms,\n        options.directiveTransforms || {}\n      ),\n      transformHoist: stringifyStatic\n    })\n  );\n}\nfunction parse(template, options = {}) {\n  return compilerCore.baseParse(template, shared.extend({}, parserOptions, options));\n}\n\nexports.DOMDirectiveTransforms = DOMDirectiveTransforms;\nexports.DOMErrorCodes = DOMErrorCodes;\nexports.DOMErrorMessages = DOMErrorMessages;\nexports.DOMNodeTransforms = DOMNodeTransforms;\nexports.TRANSITION = TRANSITION;\nexports.TRANSITION_GROUP = TRANSITION_GROUP;\nexports.V_MODEL_CHECKBOX = V_MODEL_CHECKBOX;\nexports.V_MODEL_DYNAMIC = V_MODEL_DYNAMIC;\nexports.V_MODEL_RADIO = V_MODEL_RADIO;\nexports.V_MODEL_SELECT = V_MODEL_SELECT;\nexports.V_MODEL_TEXT = V_MODEL_TEXT;\nexports.V_ON_WITH_KEYS = V_ON_WITH_KEYS;\nexports.V_ON_WITH_MODIFIERS = V_ON_WITH_MODIFIERS;\nexports.V_SHOW = V_SHOW;\nexports.compile = compile;\nexports.createDOMCompilerError = createDOMCompilerError;\nexports.parse = parse;\nexports.parserOptions = parserOptions;\nexports.transformStyle = transformStyle;\nObject.keys(compilerCore).forEach(function (k) {\n  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = compilerCore[k];\n});\n","'use strict'\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./dist/compiler-dom.cjs.prod.js')\n} else {\n  module.exports = require('./dist/compiler-dom.cjs.js')\n}\n","/**\n* @vue/reactivity v3.5.18\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar shared = require('@vue/shared');\n\nlet activeEffectScope;\nclass EffectScope {\n  constructor(detached = false) {\n    this.detached = detached;\n    /**\n     * @internal\n     */\n    this._active = true;\n    /**\n     * @internal track `on` calls, allow `on` call multiple times\n     */\n    this._on = 0;\n    /**\n     * @internal\n     */\n    this.effects = [];\n    /**\n     * @internal\n     */\n    this.cleanups = [];\n    this._isPaused = false;\n    this.parent = activeEffectScope;\n    if (!detached && activeEffectScope) {\n      this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(\n        this\n      ) - 1;\n    }\n  }\n  get active() {\n    return this._active;\n  }\n  pause() {\n    if (this._active) {\n      this._isPaused = true;\n      let i, l;\n      if (this.scopes) {\n        for (i = 0, l = this.scopes.length; i < l; i++) {\n          this.scopes[i].pause();\n        }\n      }\n      for (i = 0, l = this.effects.length; i < l; i++) {\n        this.effects[i].pause();\n      }\n    }\n  }\n  /**\n   * Resumes the effect scope, including all child scopes and effects.\n   */\n  resume() {\n    if (this._active) {\n      if (this._isPaused) {\n        this._isPaused = false;\n        let i, l;\n        if (this.scopes) {\n          for (i = 0, l = this.scopes.length; i < l; i++) {\n            this.scopes[i].resume();\n          }\n        }\n        for (i = 0, l = this.effects.length; i < l; i++) {\n          this.effects[i].resume();\n        }\n      }\n    }\n  }\n  run(fn) {\n    if (this._active) {\n      const currentEffectScope = activeEffectScope;\n      try {\n        activeEffectScope = this;\n        return fn();\n      } finally {\n        activeEffectScope = currentEffectScope;\n      }\n    }\n  }\n  /**\n   * This should only be called on non-detached scopes\n   * @internal\n   */\n  on() {\n    if (++this._on === 1) {\n      this.prevScope = activeEffectScope;\n      activeEffectScope = this;\n    }\n  }\n  /**\n   * This should only be called on non-detached scopes\n   * @internal\n   */\n  off() {\n    if (this._on > 0 && --this._on === 0) {\n      activeEffectScope = this.prevScope;\n      this.prevScope = void 0;\n    }\n  }\n  stop(fromParent) {\n    if (this._active) {\n      this._active = false;\n      let i, l;\n      for (i = 0, l = this.effects.length; i < l; i++) {\n        this.effects[i].stop();\n      }\n      this.effects.length = 0;\n      for (i = 0, l = this.cleanups.length; i < l; i++) {\n        this.cleanups[i]();\n      }\n      this.cleanups.length = 0;\n      if (this.scopes) {\n        for (i = 0, l = this.scopes.length; i < l; i++) {\n          this.scopes[i].stop(true);\n        }\n        this.scopes.length = 0;\n      }\n      if (!this.detached && this.parent && !fromParent) {\n        const last = this.parent.scopes.pop();\n        if (last && last !== this) {\n          this.parent.scopes[this.index] = last;\n          last.index = this.index;\n        }\n      }\n      this.parent = void 0;\n    }\n  }\n}\nfunction effectScope(detached) {\n  return new EffectScope(detached);\n}\nfunction getCurrentScope() {\n  return activeEffectScope;\n}\nfunction onScopeDispose(fn, failSilently = false) {\n  if (activeEffectScope) {\n    activeEffectScope.cleanups.push(fn);\n  }\n}\n\nlet activeSub;\nconst EffectFlags = {\n  \"ACTIVE\": 1,\n  \"1\": \"ACTIVE\",\n  \"RUNNING\": 2,\n  \"2\": \"RUNNING\",\n  \"TRACKING\": 4,\n  \"4\": \"TRACKING\",\n  \"NOTIFIED\": 8,\n  \"8\": \"NOTIFIED\",\n  \"DIRTY\": 16,\n  \"16\": \"DIRTY\",\n  \"ALLOW_RECURSE\": 32,\n  \"32\": \"ALLOW_RECURSE\",\n  \"PAUSED\": 64,\n  \"64\": \"PAUSED\",\n  \"EVALUATED\": 128,\n  \"128\": \"EVALUATED\"\n};\nconst pausedQueueEffects = /* @__PURE__ */ new WeakSet();\nclass ReactiveEffect {\n  constructor(fn) {\n    this.fn = fn;\n    /**\n     * @internal\n     */\n    this.deps = void 0;\n    /**\n     * @internal\n     */\n    this.depsTail = void 0;\n    /**\n     * @internal\n     */\n    this.flags = 1 | 4;\n    /**\n     * @internal\n     */\n    this.next = void 0;\n    /**\n     * @internal\n     */\n    this.cleanup = void 0;\n    this.scheduler = void 0;\n    if (activeEffectScope && activeEffectScope.active) {\n      activeEffectScope.effects.push(this);\n    }\n  }\n  pause() {\n    this.flags |= 64;\n  }\n  resume() {\n    if (this.flags & 64) {\n      this.flags &= -65;\n      if (pausedQueueEffects.has(this)) {\n        pausedQueueEffects.delete(this);\n        this.trigger();\n      }\n    }\n  }\n  /**\n   * @internal\n   */\n  notify() {\n    if (this.flags & 2 && !(this.flags & 32)) {\n      return;\n    }\n    if (!(this.flags & 8)) {\n      batch(this);\n    }\n  }\n  run() {\n    if (!(this.flags & 1)) {\n      return this.fn();\n    }\n    this.flags |= 2;\n    cleanupEffect(this);\n    prepareDeps(this);\n    const prevEffect = activeSub;\n    const prevShouldTrack = shouldTrack;\n    activeSub = this;\n    shouldTrack = true;\n    try {\n      return this.fn();\n    } finally {\n      cleanupDeps(this);\n      activeSub = prevEffect;\n      shouldTrack = prevShouldTrack;\n      this.flags &= -3;\n    }\n  }\n  stop() {\n    if (this.flags & 1) {\n      for (let link = this.deps; link; link = link.nextDep) {\n        removeSub(link);\n      }\n      this.deps = this.depsTail = void 0;\n      cleanupEffect(this);\n      this.onStop && this.onStop();\n      this.flags &= -2;\n    }\n  }\n  trigger() {\n    if (this.flags & 64) {\n      pausedQueueEffects.add(this);\n    } else if (this.scheduler) {\n      this.scheduler();\n    } else {\n      this.runIfDirty();\n    }\n  }\n  /**\n   * @internal\n   */\n  runIfDirty() {\n    if (isDirty(this)) {\n      this.run();\n    }\n  }\n  get dirty() {\n    return isDirty(this);\n  }\n}\nlet batchDepth = 0;\nlet batchedSub;\nlet batchedComputed;\nfunction batch(sub, isComputed = false) {\n  sub.flags |= 8;\n  if (isComputed) {\n    sub.next = batchedComputed;\n    batchedComputed = sub;\n    return;\n  }\n  sub.next = batchedSub;\n  batchedSub = sub;\n}\nfunction startBatch() {\n  batchDepth++;\n}\nfunction endBatch() {\n  if (--batchDepth > 0) {\n    return;\n  }\n  if (batchedComputed) {\n    let e = batchedComputed;\n    batchedComputed = void 0;\n    while (e) {\n      const next = e.next;\n      e.next = void 0;\n      e.flags &= -9;\n      e = next;\n    }\n  }\n  let error;\n  while (batchedSub) {\n    let e = batchedSub;\n    batchedSub = void 0;\n    while (e) {\n      const next = e.next;\n      e.next = void 0;\n      e.flags &= -9;\n      if (e.flags & 1) {\n        try {\n          ;\n          e.trigger();\n        } catch (err) {\n          if (!error) error = err;\n        }\n      }\n      e = next;\n    }\n  }\n  if (error) throw error;\n}\nfunction prepareDeps(sub) {\n  for (let link = sub.deps; link; link = link.nextDep) {\n    link.version = -1;\n    link.prevActiveLink = link.dep.activeLink;\n    link.dep.activeLink = link;\n  }\n}\nfunction cleanupDeps(sub) {\n  let head;\n  let tail = sub.depsTail;\n  let link = tail;\n  while (link) {\n    const prev = link.prevDep;\n    if (link.version === -1) {\n      if (link === tail) tail = prev;\n      removeSub(link);\n      removeDep(link);\n    } else {\n      head = link;\n    }\n    link.dep.activeLink = link.prevActiveLink;\n    link.prevActiveLink = void 0;\n    link = prev;\n  }\n  sub.deps = head;\n  sub.depsTail = tail;\n}\nfunction isDirty(sub) {\n  for (let link = sub.deps; link; link = link.nextDep) {\n    if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {\n      return true;\n    }\n  }\n  if (sub._dirty) {\n    return true;\n  }\n  return false;\n}\nfunction refreshComputed(computed) {\n  if (computed.flags & 4 && !(computed.flags & 16)) {\n    return;\n  }\n  computed.flags &= -17;\n  if (computed.globalVersion === globalVersion) {\n    return;\n  }\n  computed.globalVersion = globalVersion;\n  if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {\n    return;\n  }\n  computed.flags |= 2;\n  const dep = computed.dep;\n  const prevSub = activeSub;\n  const prevShouldTrack = shouldTrack;\n  activeSub = computed;\n  shouldTrack = true;\n  try {\n    prepareDeps(computed);\n    const value = computed.fn(computed._value);\n    if (dep.version === 0 || shared.hasChanged(value, computed._value)) {\n      computed.flags |= 128;\n      computed._value = value;\n      dep.version++;\n    }\n  } catch (err) {\n    dep.version++;\n    throw err;\n  } finally {\n    activeSub = prevSub;\n    shouldTrack = prevShouldTrack;\n    cleanupDeps(computed);\n    computed.flags &= -3;\n  }\n}\nfunction removeSub(link, soft = false) {\n  const { dep, prevSub, nextSub } = link;\n  if (prevSub) {\n    prevSub.nextSub = nextSub;\n    link.prevSub = void 0;\n  }\n  if (nextSub) {\n    nextSub.prevSub = prevSub;\n    link.nextSub = void 0;\n  }\n  if (dep.subs === link) {\n    dep.subs = prevSub;\n    if (!prevSub && dep.computed) {\n      dep.computed.flags &= -5;\n      for (let l = dep.computed.deps; l; l = l.nextDep) {\n        removeSub(l, true);\n      }\n    }\n  }\n  if (!soft && !--dep.sc && dep.map) {\n    dep.map.delete(dep.key);\n  }\n}\nfunction removeDep(link) {\n  const { prevDep, nextDep } = link;\n  if (prevDep) {\n    prevDep.nextDep = nextDep;\n    link.prevDep = void 0;\n  }\n  if (nextDep) {\n    nextDep.prevDep = prevDep;\n    link.nextDep = void 0;\n  }\n}\nfunction effect(fn, options) {\n  if (fn.effect instanceof ReactiveEffect) {\n    fn = fn.effect.fn;\n  }\n  const e = new ReactiveEffect(fn);\n  if (options) {\n    shared.extend(e, options);\n  }\n  try {\n    e.run();\n  } catch (err) {\n    e.stop();\n    throw err;\n  }\n  const runner = e.run.bind(e);\n  runner.effect = e;\n  return runner;\n}\nfunction stop(runner) {\n  runner.effect.stop();\n}\nlet shouldTrack = true;\nconst trackStack = [];\nfunction pauseTracking() {\n  trackStack.push(shouldTrack);\n  shouldTrack = false;\n}\nfunction enableTracking() {\n  trackStack.push(shouldTrack);\n  shouldTrack = true;\n}\nfunction resetTracking() {\n  const last = trackStack.pop();\n  shouldTrack = last === void 0 ? true : last;\n}\nfunction onEffectCleanup(fn, failSilently = false) {\n  if (activeSub instanceof ReactiveEffect) {\n    activeSub.cleanup = fn;\n  }\n}\nfunction cleanupEffect(e) {\n  const { cleanup } = e;\n  e.cleanup = void 0;\n  if (cleanup) {\n    const prevSub = activeSub;\n    activeSub = void 0;\n    try {\n      cleanup();\n    } finally {\n      activeSub = prevSub;\n    }\n  }\n}\n\nlet globalVersion = 0;\nclass Link {\n  constructor(sub, dep) {\n    this.sub = sub;\n    this.dep = dep;\n    this.version = dep.version;\n    this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;\n  }\n}\nclass Dep {\n  // TODO isolatedDeclarations \"__v_skip\"\n  constructor(computed) {\n    this.computed = computed;\n    this.version = 0;\n    /**\n     * Link between this dep and the current active effect\n     */\n    this.activeLink = void 0;\n    /**\n     * Doubly linked list representing the subscribing effects (tail)\n     */\n    this.subs = void 0;\n    /**\n     * For object property deps cleanup\n     */\n    this.map = void 0;\n    this.key = void 0;\n    /**\n     * Subscriber counter\n     */\n    this.sc = 0;\n    /**\n     * @internal\n     */\n    this.__v_skip = true;\n  }\n  track(debugInfo) {\n    if (!activeSub || !shouldTrack || activeSub === this.computed) {\n      return;\n    }\n    let link = this.activeLink;\n    if (link === void 0 || link.sub !== activeSub) {\n      link = this.activeLink = new Link(activeSub, this);\n      if (!activeSub.deps) {\n        activeSub.deps = activeSub.depsTail = link;\n      } else {\n        link.prevDep = activeSub.depsTail;\n        activeSub.depsTail.nextDep = link;\n        activeSub.depsTail = link;\n      }\n      addSub(link);\n    } else if (link.version === -1) {\n      link.version = this.version;\n      if (link.nextDep) {\n        const next = link.nextDep;\n        next.prevDep = link.prevDep;\n        if (link.prevDep) {\n          link.prevDep.nextDep = next;\n        }\n        link.prevDep = activeSub.depsTail;\n        link.nextDep = void 0;\n        activeSub.depsTail.nextDep = link;\n        activeSub.depsTail = link;\n        if (activeSub.deps === link) {\n          activeSub.deps = next;\n        }\n      }\n    }\n    return link;\n  }\n  trigger(debugInfo) {\n    this.version++;\n    globalVersion++;\n    this.notify(debugInfo);\n  }\n  notify(debugInfo) {\n    startBatch();\n    try {\n      if (false) ;\n      for (let link = this.subs; link; link = link.prevSub) {\n        if (link.sub.notify()) {\n          ;\n          link.sub.dep.notify();\n        }\n      }\n    } finally {\n      endBatch();\n    }\n  }\n}\nfunction addSub(link) {\n  link.dep.sc++;\n  if (link.sub.flags & 4) {\n    const computed = link.dep.computed;\n    if (computed && !link.dep.subs) {\n      computed.flags |= 4 | 16;\n      for (let l = computed.deps; l; l = l.nextDep) {\n        addSub(l);\n      }\n    }\n    const currentTail = link.dep.subs;\n    if (currentTail !== link) {\n      link.prevSub = currentTail;\n      if (currentTail) currentTail.nextSub = link;\n    }\n    link.dep.subs = link;\n  }\n}\nconst targetMap = /* @__PURE__ */ new WeakMap();\nconst ITERATE_KEY = Symbol(\n  \"\"\n);\nconst MAP_KEY_ITERATE_KEY = Symbol(\n  \"\"\n);\nconst ARRAY_ITERATE_KEY = Symbol(\n  \"\"\n);\nfunction track(target, type, key) {\n  if (shouldTrack && activeSub) {\n    let depsMap = targetMap.get(target);\n    if (!depsMap) {\n      targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n    }\n    let dep = depsMap.get(key);\n    if (!dep) {\n      depsMap.set(key, dep = new Dep());\n      dep.map = depsMap;\n      dep.key = key;\n    }\n    {\n      dep.track();\n    }\n  }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n  const depsMap = targetMap.get(target);\n  if (!depsMap) {\n    globalVersion++;\n    return;\n  }\n  const run = (dep) => {\n    if (dep) {\n      {\n        dep.trigger();\n      }\n    }\n  };\n  startBatch();\n  if (type === \"clear\") {\n    depsMap.forEach(run);\n  } else {\n    const targetIsArray = shared.isArray(target);\n    const isArrayIndex = targetIsArray && shared.isIntegerKey(key);\n    if (targetIsArray && key === \"length\") {\n      const newLength = Number(newValue);\n      depsMap.forEach((dep, key2) => {\n        if (key2 === \"length\" || key2 === ARRAY_ITERATE_KEY || !shared.isSymbol(key2) && key2 >= newLength) {\n          run(dep);\n        }\n      });\n    } else {\n      if (key !== void 0 || depsMap.has(void 0)) {\n        run(depsMap.get(key));\n      }\n      if (isArrayIndex) {\n        run(depsMap.get(ARRAY_ITERATE_KEY));\n      }\n      switch (type) {\n        case \"add\":\n          if (!targetIsArray) {\n            run(depsMap.get(ITERATE_KEY));\n            if (shared.isMap(target)) {\n              run(depsMap.get(MAP_KEY_ITERATE_KEY));\n            }\n          } else if (isArrayIndex) {\n            run(depsMap.get(\"length\"));\n          }\n          break;\n        case \"delete\":\n          if (!targetIsArray) {\n            run(depsMap.get(ITERATE_KEY));\n            if (shared.isMap(target)) {\n              run(depsMap.get(MAP_KEY_ITERATE_KEY));\n            }\n          }\n          break;\n        case \"set\":\n          if (shared.isMap(target)) {\n            run(depsMap.get(ITERATE_KEY));\n          }\n          break;\n      }\n    }\n  }\n  endBatch();\n}\nfunction getDepFromReactive(object, key) {\n  const depMap = targetMap.get(object);\n  return depMap && depMap.get(key);\n}\n\nfunction reactiveReadArray(array) {\n  const raw = toRaw(array);\n  if (raw === array) return raw;\n  track(raw, \"iterate\", ARRAY_ITERATE_KEY);\n  return isShallow(array) ? raw : raw.map(toReactive);\n}\nfunction shallowReadArray(arr) {\n  track(arr = toRaw(arr), \"iterate\", ARRAY_ITERATE_KEY);\n  return arr;\n}\nconst arrayInstrumentations = {\n  __proto__: null,\n  [Symbol.iterator]() {\n    return iterator(this, Symbol.iterator, toReactive);\n  },\n  concat(...args) {\n    return reactiveReadArray(this).concat(\n      ...args.map((x) => shared.isArray(x) ? reactiveReadArray(x) : x)\n    );\n  },\n  entries() {\n    return iterator(this, \"entries\", (value) => {\n      value[1] = toReactive(value[1]);\n      return value;\n    });\n  },\n  every(fn, thisArg) {\n    return apply(this, \"every\", fn, thisArg, void 0, arguments);\n  },\n  filter(fn, thisArg) {\n    return apply(this, \"filter\", fn, thisArg, (v) => v.map(toReactive), arguments);\n  },\n  find(fn, thisArg) {\n    return apply(this, \"find\", fn, thisArg, toReactive, arguments);\n  },\n  findIndex(fn, thisArg) {\n    return apply(this, \"findIndex\", fn, thisArg, void 0, arguments);\n  },\n  findLast(fn, thisArg) {\n    return apply(this, \"findLast\", fn, thisArg, toReactive, arguments);\n  },\n  findLastIndex(fn, thisArg) {\n    return apply(this, \"findLastIndex\", fn, thisArg, void 0, arguments);\n  },\n  // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement\n  forEach(fn, thisArg) {\n    return apply(this, \"forEach\", fn, thisArg, void 0, arguments);\n  },\n  includes(...args) {\n    return searchProxy(this, \"includes\", args);\n  },\n  indexOf(...args) {\n    return searchProxy(this, \"indexOf\", args);\n  },\n  join(separator) {\n    return reactiveReadArray(this).join(separator);\n  },\n  // keys() iterator only reads `length`, no optimisation required\n  lastIndexOf(...args) {\n    return searchProxy(this, \"lastIndexOf\", args);\n  },\n  map(fn, thisArg) {\n    return apply(this, \"map\", fn, thisArg, void 0, arguments);\n  },\n  pop() {\n    return noTracking(this, \"pop\");\n  },\n  push(...args) {\n    return noTracking(this, \"push\", args);\n  },\n  reduce(fn, ...args) {\n    return reduce(this, \"reduce\", fn, args);\n  },\n  reduceRight(fn, ...args) {\n    return reduce(this, \"reduceRight\", fn, args);\n  },\n  shift() {\n    return noTracking(this, \"shift\");\n  },\n  // slice could use ARRAY_ITERATE but also seems to beg for range tracking\n  some(fn, thisArg) {\n    return apply(this, \"some\", fn, thisArg, void 0, arguments);\n  },\n  splice(...args) {\n    return noTracking(this, \"splice\", args);\n  },\n  toReversed() {\n    return reactiveReadArray(this).toReversed();\n  },\n  toSorted(comparer) {\n    return reactiveReadArray(this).toSorted(comparer);\n  },\n  toSpliced(...args) {\n    return reactiveReadArray(this).toSpliced(...args);\n  },\n  unshift(...args) {\n    return noTracking(this, \"unshift\", args);\n  },\n  values() {\n    return iterator(this, \"values\", toReactive);\n  }\n};\nfunction iterator(self, method, wrapValue) {\n  const arr = shallowReadArray(self);\n  const iter = arr[method]();\n  if (arr !== self && !isShallow(self)) {\n    iter._next = iter.next;\n    iter.next = () => {\n      const result = iter._next();\n      if (result.value) {\n        result.value = wrapValue(result.value);\n      }\n      return result;\n    };\n  }\n  return iter;\n}\nconst arrayProto = Array.prototype;\nfunction apply(self, method, fn, thisArg, wrappedRetFn, args) {\n  const arr = shallowReadArray(self);\n  const needsWrap = arr !== self && !isShallow(self);\n  const methodFn = arr[method];\n  if (methodFn !== arrayProto[method]) {\n    const result2 = methodFn.apply(self, args);\n    return needsWrap ? toReactive(result2) : result2;\n  }\n  let wrappedFn = fn;\n  if (arr !== self) {\n    if (needsWrap) {\n      wrappedFn = function(item, index) {\n        return fn.call(this, toReactive(item), index, self);\n      };\n    } else if (fn.length > 2) {\n      wrappedFn = function(item, index) {\n        return fn.call(this, item, index, self);\n      };\n    }\n  }\n  const result = methodFn.call(arr, wrappedFn, thisArg);\n  return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;\n}\nfunction reduce(self, method, fn, args) {\n  const arr = shallowReadArray(self);\n  let wrappedFn = fn;\n  if (arr !== self) {\n    if (!isShallow(self)) {\n      wrappedFn = function(acc, item, index) {\n        return fn.call(this, acc, toReactive(item), index, self);\n      };\n    } else if (fn.length > 3) {\n      wrappedFn = function(acc, item, index) {\n        return fn.call(this, acc, item, index, self);\n      };\n    }\n  }\n  return arr[method](wrappedFn, ...args);\n}\nfunction searchProxy(self, method, args) {\n  const arr = toRaw(self);\n  track(arr, \"iterate\", ARRAY_ITERATE_KEY);\n  const res = arr[method](...args);\n  if ((res === -1 || res === false) && isProxy(args[0])) {\n    args[0] = toRaw(args[0]);\n    return arr[method](...args);\n  }\n  return res;\n}\nfunction noTracking(self, method, args = []) {\n  pauseTracking();\n  startBatch();\n  const res = toRaw(self)[method].apply(self, args);\n  endBatch();\n  resetTracking();\n  return res;\n}\n\nconst isNonTrackableKeys = /* @__PURE__ */ shared.makeMap(`__proto__,__v_isRef,__isVue`);\nconst builtInSymbols = new Set(\n  /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(shared.isSymbol)\n);\nfunction hasOwnProperty(key) {\n  if (!shared.isSymbol(key)) key = String(key);\n  const obj = toRaw(this);\n  track(obj, \"has\", key);\n  return obj.hasOwnProperty(key);\n}\nclass BaseReactiveHandler {\n  constructor(_isReadonly = false, _isShallow = false) {\n    this._isReadonly = _isReadonly;\n    this._isShallow = _isShallow;\n  }\n  get(target, key, receiver) {\n    if (key === \"__v_skip\") return target[\"__v_skip\"];\n    const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;\n    if (key === \"__v_isReactive\") {\n      return !isReadonly2;\n    } else if (key === \"__v_isReadonly\") {\n      return isReadonly2;\n    } else if (key === \"__v_isShallow\") {\n      return isShallow2;\n    } else if (key === \"__v_raw\") {\n      if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype\n      // this means the receiver is a user proxy of the reactive proxy\n      Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {\n        return target;\n      }\n      return;\n    }\n    const targetIsArray = shared.isArray(target);\n    if (!isReadonly2) {\n      let fn;\n      if (targetIsArray && (fn = arrayInstrumentations[key])) {\n        return fn;\n      }\n      if (key === \"hasOwnProperty\") {\n        return hasOwnProperty;\n      }\n    }\n    const res = Reflect.get(\n      target,\n      key,\n      // if this is a proxy wrapping a ref, return methods using the raw ref\n      // as receiver so that we don't have to call `toRaw` on the ref in all\n      // its class methods\n      isRef(target) ? target : receiver\n    );\n    if (shared.isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n      return res;\n    }\n    if (!isReadonly2) {\n      track(target, \"get\", key);\n    }\n    if (isShallow2) {\n      return res;\n    }\n    if (isRef(res)) {\n      return targetIsArray && shared.isIntegerKey(key) ? res : res.value;\n    }\n    if (shared.isObject(res)) {\n      return isReadonly2 ? readonly(res) : reactive(res);\n    }\n    return res;\n  }\n}\nclass MutableReactiveHandler extends BaseReactiveHandler {\n  constructor(isShallow2 = false) {\n    super(false, isShallow2);\n  }\n  set(target, key, value, receiver) {\n    let oldValue = target[key];\n    if (!this._isShallow) {\n      const isOldValueReadonly = isReadonly(oldValue);\n      if (!isShallow(value) && !isReadonly(value)) {\n        oldValue = toRaw(oldValue);\n        value = toRaw(value);\n      }\n      if (!shared.isArray(target) && isRef(oldValue) && !isRef(value)) {\n        if (isOldValueReadonly) {\n          return false;\n        } else {\n          oldValue.value = value;\n          return true;\n        }\n      }\n    }\n    const hadKey = shared.isArray(target) && shared.isIntegerKey(key) ? Number(key) < target.length : shared.hasOwn(target, key);\n    const result = Reflect.set(\n      target,\n      key,\n      value,\n      isRef(target) ? target : receiver\n    );\n    if (target === toRaw(receiver)) {\n      if (!hadKey) {\n        trigger(target, \"add\", key, value);\n      } else if (shared.hasChanged(value, oldValue)) {\n        trigger(target, \"set\", key, value);\n      }\n    }\n    return result;\n  }\n  deleteProperty(target, key) {\n    const hadKey = shared.hasOwn(target, key);\n    target[key];\n    const result = Reflect.deleteProperty(target, key);\n    if (result && hadKey) {\n      trigger(target, \"delete\", key, void 0);\n    }\n    return result;\n  }\n  has(target, key) {\n    const result = Reflect.has(target, key);\n    if (!shared.isSymbol(key) || !builtInSymbols.has(key)) {\n      track(target, \"has\", key);\n    }\n    return result;\n  }\n  ownKeys(target) {\n    track(\n      target,\n      \"iterate\",\n      shared.isArray(target) ? \"length\" : ITERATE_KEY\n    );\n    return Reflect.ownKeys(target);\n  }\n}\nclass ReadonlyReactiveHandler extends BaseReactiveHandler {\n  constructor(isShallow2 = false) {\n    super(true, isShallow2);\n  }\n  set(target, key) {\n    return true;\n  }\n  deleteProperty(target, key) {\n    return true;\n  }\n}\nconst mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();\nconst readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();\nconst shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);\nconst shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);\n\nconst toShallow = (value) => value;\nconst getProto = (v) => Reflect.getPrototypeOf(v);\nfunction createIterableMethod(method, isReadonly2, isShallow2) {\n  return function(...args) {\n    const target = this[\"__v_raw\"];\n    const rawTarget = toRaw(target);\n    const targetIsMap = shared.isMap(rawTarget);\n    const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n    const isKeyOnly = method === \"keys\" && targetIsMap;\n    const innerIterator = target[method](...args);\n    const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;\n    !isReadonly2 && track(\n      rawTarget,\n      \"iterate\",\n      isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY\n    );\n    return {\n      // iterator protocol\n      next() {\n        const { value, done } = innerIterator.next();\n        return done ? { value, done } : {\n          value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n          done\n        };\n      },\n      // iterable protocol\n      [Symbol.iterator]() {\n        return this;\n      }\n    };\n  };\n}\nfunction createReadonlyMethod(type) {\n  return function(...args) {\n    return type === \"delete\" ? false : type === \"clear\" ? void 0 : this;\n  };\n}\nfunction createInstrumentations(readonly, shallow) {\n  const instrumentations = {\n    get(key) {\n      const target = this[\"__v_raw\"];\n      const rawTarget = toRaw(target);\n      const rawKey = toRaw(key);\n      if (!readonly) {\n        if (shared.hasChanged(key, rawKey)) {\n          track(rawTarget, \"get\", key);\n        }\n        track(rawTarget, \"get\", rawKey);\n      }\n      const { has } = getProto(rawTarget);\n      const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;\n      if (has.call(rawTarget, key)) {\n        return wrap(target.get(key));\n      } else if (has.call(rawTarget, rawKey)) {\n        return wrap(target.get(rawKey));\n      } else if (target !== rawTarget) {\n        target.get(key);\n      }\n    },\n    get size() {\n      const target = this[\"__v_raw\"];\n      !readonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n      return Reflect.get(target, \"size\", target);\n    },\n    has(key) {\n      const target = this[\"__v_raw\"];\n      const rawTarget = toRaw(target);\n      const rawKey = toRaw(key);\n      if (!readonly) {\n        if (shared.hasChanged(key, rawKey)) {\n          track(rawTarget, \"has\", key);\n        }\n        track(rawTarget, \"has\", rawKey);\n      }\n      return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n    },\n    forEach(callback, thisArg) {\n      const observed = this;\n      const target = observed[\"__v_raw\"];\n      const rawTarget = toRaw(target);\n      const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;\n      !readonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n      return target.forEach((value, key) => {\n        return callback.call(thisArg, wrap(value), wrap(key), observed);\n      });\n    }\n  };\n  shared.extend(\n    instrumentations,\n    readonly ? {\n      add: createReadonlyMethod(\"add\"),\n      set: createReadonlyMethod(\"set\"),\n      delete: createReadonlyMethod(\"delete\"),\n      clear: createReadonlyMethod(\"clear\")\n    } : {\n      add(value) {\n        if (!shallow && !isShallow(value) && !isReadonly(value)) {\n          value = toRaw(value);\n        }\n        const target = toRaw(this);\n        const proto = getProto(target);\n        const hadKey = proto.has.call(target, value);\n        if (!hadKey) {\n          target.add(value);\n          trigger(target, \"add\", value, value);\n        }\n        return this;\n      },\n      set(key, value) {\n        if (!shallow && !isShallow(value) && !isReadonly(value)) {\n          value = toRaw(value);\n        }\n        const target = toRaw(this);\n        const { has, get } = getProto(target);\n        let hadKey = has.call(target, key);\n        if (!hadKey) {\n          key = toRaw(key);\n          hadKey = has.call(target, key);\n        }\n        const oldValue = get.call(target, key);\n        target.set(key, value);\n        if (!hadKey) {\n          trigger(target, \"add\", key, value);\n        } else if (shared.hasChanged(value, oldValue)) {\n          trigger(target, \"set\", key, value);\n        }\n        return this;\n      },\n      delete(key) {\n        const target = toRaw(this);\n        const { has, get } = getProto(target);\n        let hadKey = has.call(target, key);\n        if (!hadKey) {\n          key = toRaw(key);\n          hadKey = has.call(target, key);\n        }\n        get ? get.call(target, key) : void 0;\n        const result = target.delete(key);\n        if (hadKey) {\n          trigger(target, \"delete\", key, void 0);\n        }\n        return result;\n      },\n      clear() {\n        const target = toRaw(this);\n        const hadItems = target.size !== 0;\n        const result = target.clear();\n        if (hadItems) {\n          trigger(\n            target,\n            \"clear\",\n            void 0,\n            void 0);\n        }\n        return result;\n      }\n    }\n  );\n  const iteratorMethods = [\n    \"keys\",\n    \"values\",\n    \"entries\",\n    Symbol.iterator\n  ];\n  iteratorMethods.forEach((method) => {\n    instrumentations[method] = createIterableMethod(method, readonly, shallow);\n  });\n  return instrumentations;\n}\nfunction createInstrumentationGetter(isReadonly2, shallow) {\n  const instrumentations = createInstrumentations(isReadonly2, shallow);\n  return (target, key, receiver) => {\n    if (key === \"__v_isReactive\") {\n      return !isReadonly2;\n    } else if (key === \"__v_isReadonly\") {\n      return isReadonly2;\n    } else if (key === \"__v_raw\") {\n      return target;\n    }\n    return Reflect.get(\n      shared.hasOwn(instrumentations, key) && key in target ? instrumentations : target,\n      key,\n      receiver\n    );\n  };\n}\nconst mutableCollectionHandlers = {\n  get: /* @__PURE__ */ createInstrumentationGetter(false, false)\n};\nconst shallowCollectionHandlers = {\n  get: /* @__PURE__ */ createInstrumentationGetter(false, true)\n};\nconst readonlyCollectionHandlers = {\n  get: /* @__PURE__ */ createInstrumentationGetter(true, false)\n};\nconst shallowReadonlyCollectionHandlers = {\n  get: /* @__PURE__ */ createInstrumentationGetter(true, true)\n};\n\nconst reactiveMap = /* @__PURE__ */ new WeakMap();\nconst shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nconst readonlyMap = /* @__PURE__ */ new WeakMap();\nconst shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction targetTypeMap(rawType) {\n  switch (rawType) {\n    case \"Object\":\n    case \"Array\":\n      return 1 /* COMMON */;\n    case \"Map\":\n    case \"Set\":\n    case \"WeakMap\":\n    case \"WeakSet\":\n      return 2 /* COLLECTION */;\n    default:\n      return 0 /* INVALID */;\n  }\n}\nfunction getTargetType(value) {\n  return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(shared.toRawType(value));\n}\nfunction reactive(target) {\n  if (isReadonly(target)) {\n    return target;\n  }\n  return createReactiveObject(\n    target,\n    false,\n    mutableHandlers,\n    mutableCollectionHandlers,\n    reactiveMap\n  );\n}\nfunction shallowReactive(target) {\n  return createReactiveObject(\n    target,\n    false,\n    shallowReactiveHandlers,\n    shallowCollectionHandlers,\n    shallowReactiveMap\n  );\n}\nfunction readonly(target) {\n  return createReactiveObject(\n    target,\n    true,\n    readonlyHandlers,\n    readonlyCollectionHandlers,\n    readonlyMap\n  );\n}\nfunction shallowReadonly(target) {\n  return createReactiveObject(\n    target,\n    true,\n    shallowReadonlyHandlers,\n    shallowReadonlyCollectionHandlers,\n    shallowReadonlyMap\n  );\n}\nfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n  if (!shared.isObject(target)) {\n    return target;\n  }\n  if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\n    return target;\n  }\n  const targetType = getTargetType(target);\n  if (targetType === 0 /* INVALID */) {\n    return target;\n  }\n  const existingProxy = proxyMap.get(target);\n  if (existingProxy) {\n    return existingProxy;\n  }\n  const proxy = new Proxy(\n    target,\n    targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers\n  );\n  proxyMap.set(target, proxy);\n  return proxy;\n}\nfunction isReactive(value) {\n  if (isReadonly(value)) {\n    return isReactive(value[\"__v_raw\"]);\n  }\n  return !!(value && value[\"__v_isReactive\"]);\n}\nfunction isReadonly(value) {\n  return !!(value && value[\"__v_isReadonly\"]);\n}\nfunction isShallow(value) {\n  return !!(value && value[\"__v_isShallow\"]);\n}\nfunction isProxy(value) {\n  return value ? !!value[\"__v_raw\"] : false;\n}\nfunction toRaw(observed) {\n  const raw = observed && observed[\"__v_raw\"];\n  return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n  if (!shared.hasOwn(value, \"__v_skip\") && Object.isExtensible(value)) {\n    shared.def(value, \"__v_skip\", true);\n  }\n  return value;\n}\nconst toReactive = (value) => shared.isObject(value) ? reactive(value) : value;\nconst toReadonly = (value) => shared.isObject(value) ? readonly(value) : value;\n\nfunction isRef(r) {\n  return r ? r[\"__v_isRef\"] === true : false;\n}\nfunction ref(value) {\n  return createRef(value, false);\n}\nfunction shallowRef(value) {\n  return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n  if (isRef(rawValue)) {\n    return rawValue;\n  }\n  return new RefImpl(rawValue, shallow);\n}\nclass RefImpl {\n  constructor(value, isShallow2) {\n    this.dep = new Dep();\n    this[\"__v_isRef\"] = true;\n    this[\"__v_isShallow\"] = false;\n    this._rawValue = isShallow2 ? value : toRaw(value);\n    this._value = isShallow2 ? value : toReactive(value);\n    this[\"__v_isShallow\"] = isShallow2;\n  }\n  get value() {\n    {\n      this.dep.track();\n    }\n    return this._value;\n  }\n  set value(newValue) {\n    const oldValue = this._rawValue;\n    const useDirectValue = this[\"__v_isShallow\"] || isShallow(newValue) || isReadonly(newValue);\n    newValue = useDirectValue ? newValue : toRaw(newValue);\n    if (shared.hasChanged(newValue, oldValue)) {\n      this._rawValue = newValue;\n      this._value = useDirectValue ? newValue : toReactive(newValue);\n      {\n        this.dep.trigger();\n      }\n    }\n  }\n}\nfunction triggerRef(ref2) {\n  if (ref2.dep) {\n    {\n      ref2.dep.trigger();\n    }\n  }\n}\nfunction unref(ref2) {\n  return isRef(ref2) ? ref2.value : ref2;\n}\nfunction toValue(source) {\n  return shared.isFunction(source) ? source() : unref(source);\n}\nconst shallowUnwrapHandlers = {\n  get: (target, key, receiver) => key === \"__v_raw\" ? target : unref(Reflect.get(target, key, receiver)),\n  set: (target, key, value, receiver) => {\n    const oldValue = target[key];\n    if (isRef(oldValue) && !isRef(value)) {\n      oldValue.value = value;\n      return true;\n    } else {\n      return Reflect.set(target, key, value, receiver);\n    }\n  }\n};\nfunction proxyRefs(objectWithRefs) {\n  return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n}\nclass CustomRefImpl {\n  constructor(factory) {\n    this[\"__v_isRef\"] = true;\n    this._value = void 0;\n    const dep = this.dep = new Dep();\n    const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));\n    this._get = get;\n    this._set = set;\n  }\n  get value() {\n    return this._value = this._get();\n  }\n  set value(newVal) {\n    this._set(newVal);\n  }\n}\nfunction customRef(factory) {\n  return new CustomRefImpl(factory);\n}\nfunction toRefs(object) {\n  const ret = shared.isArray(object) ? new Array(object.length) : {};\n  for (const key in object) {\n    ret[key] = propertyToRef(object, key);\n  }\n  return ret;\n}\nclass ObjectRefImpl {\n  constructor(_object, _key, _defaultValue) {\n    this._object = _object;\n    this._key = _key;\n    this._defaultValue = _defaultValue;\n    this[\"__v_isRef\"] = true;\n    this._value = void 0;\n  }\n  get value() {\n    const val = this._object[this._key];\n    return this._value = val === void 0 ? this._defaultValue : val;\n  }\n  set value(newVal) {\n    this._object[this._key] = newVal;\n  }\n  get dep() {\n    return getDepFromReactive(toRaw(this._object), this._key);\n  }\n}\nclass GetterRefImpl {\n  constructor(_getter) {\n    this._getter = _getter;\n    this[\"__v_isRef\"] = true;\n    this[\"__v_isReadonly\"] = true;\n    this._value = void 0;\n  }\n  get value() {\n    return this._value = this._getter();\n  }\n}\nfunction toRef(source, key, defaultValue) {\n  if (isRef(source)) {\n    return source;\n  } else if (shared.isFunction(source)) {\n    return new GetterRefImpl(source);\n  } else if (shared.isObject(source) && arguments.length > 1) {\n    return propertyToRef(source, key, defaultValue);\n  } else {\n    return ref(source);\n  }\n}\nfunction propertyToRef(source, key, defaultValue) {\n  const val = source[key];\n  return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);\n}\n\nclass ComputedRefImpl {\n  constructor(fn, setter, isSSR) {\n    this.fn = fn;\n    this.setter = setter;\n    /**\n     * @internal\n     */\n    this._value = void 0;\n    /**\n     * @internal\n     */\n    this.dep = new Dep(this);\n    /**\n     * @internal\n     */\n    this.__v_isRef = true;\n    // TODO isolatedDeclarations \"__v_isReadonly\"\n    // A computed is also a subscriber that tracks other deps\n    /**\n     * @internal\n     */\n    this.deps = void 0;\n    /**\n     * @internal\n     */\n    this.depsTail = void 0;\n    /**\n     * @internal\n     */\n    this.flags = 16;\n    /**\n     * @internal\n     */\n    this.globalVersion = globalVersion - 1;\n    /**\n     * @internal\n     */\n    this.next = void 0;\n    // for backwards compat\n    this.effect = this;\n    this[\"__v_isReadonly\"] = !setter;\n    this.isSSR = isSSR;\n  }\n  /**\n   * @internal\n   */\n  notify() {\n    this.flags |= 16;\n    if (!(this.flags & 8) && // avoid infinite self recursion\n    activeSub !== this) {\n      batch(this, true);\n      return true;\n    }\n  }\n  get value() {\n    const link = this.dep.track();\n    refreshComputed(this);\n    if (link) {\n      link.version = this.dep.version;\n    }\n    return this._value;\n  }\n  set value(newValue) {\n    if (this.setter) {\n      this.setter(newValue);\n    }\n  }\n}\nfunction computed(getterOrOptions, debugOptions, isSSR = false) {\n  let getter;\n  let setter;\n  if (shared.isFunction(getterOrOptions)) {\n    getter = getterOrOptions;\n  } else {\n    getter = getterOrOptions.get;\n    setter = getterOrOptions.set;\n  }\n  const cRef = new ComputedRefImpl(getter, setter, isSSR);\n  return cRef;\n}\n\nconst TrackOpTypes = {\n  \"GET\": \"get\",\n  \"HAS\": \"has\",\n  \"ITERATE\": \"iterate\"\n};\nconst TriggerOpTypes = {\n  \"SET\": \"set\",\n  \"ADD\": \"add\",\n  \"DELETE\": \"delete\",\n  \"CLEAR\": \"clear\"\n};\nconst ReactiveFlags = {\n  \"SKIP\": \"__v_skip\",\n  \"IS_REACTIVE\": \"__v_isReactive\",\n  \"IS_READONLY\": \"__v_isReadonly\",\n  \"IS_SHALLOW\": \"__v_isShallow\",\n  \"RAW\": \"__v_raw\",\n  \"IS_REF\": \"__v_isRef\"\n};\n\nconst WatchErrorCodes = {\n  \"WATCH_GETTER\": 2,\n  \"2\": \"WATCH_GETTER\",\n  \"WATCH_CALLBACK\": 3,\n  \"3\": \"WATCH_CALLBACK\",\n  \"WATCH_CLEANUP\": 4,\n  \"4\": \"WATCH_CLEANUP\"\n};\nconst INITIAL_WATCHER_VALUE = {};\nconst cleanupMap = /* @__PURE__ */ new WeakMap();\nlet activeWatcher = void 0;\nfunction getCurrentWatcher() {\n  return activeWatcher;\n}\nfunction onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {\n  if (owner) {\n    let cleanups = cleanupMap.get(owner);\n    if (!cleanups) cleanupMap.set(owner, cleanups = []);\n    cleanups.push(cleanupFn);\n  }\n}\nfunction watch(source, cb, options = shared.EMPTY_OBJ) {\n  const { immediate, deep, once, scheduler, augmentJob, call } = options;\n  const reactiveGetter = (source2) => {\n    if (deep) return source2;\n    if (isShallow(source2) || deep === false || deep === 0)\n      return traverse(source2, 1);\n    return traverse(source2);\n  };\n  let effect;\n  let getter;\n  let cleanup;\n  let boundCleanup;\n  let forceTrigger = false;\n  let isMultiSource = false;\n  if (isRef(source)) {\n    getter = () => source.value;\n    forceTrigger = isShallow(source);\n  } else if (isReactive(source)) {\n    getter = () => reactiveGetter(source);\n    forceTrigger = true;\n  } else if (shared.isArray(source)) {\n    isMultiSource = true;\n    forceTrigger = source.some((s) => isReactive(s) || isShallow(s));\n    getter = () => source.map((s) => {\n      if (isRef(s)) {\n        return s.value;\n      } else if (isReactive(s)) {\n        return reactiveGetter(s);\n      } else if (shared.isFunction(s)) {\n        return call ? call(s, 2) : s();\n      } else ;\n    });\n  } else if (shared.isFunction(source)) {\n    if (cb) {\n      getter = call ? () => call(source, 2) : source;\n    } else {\n      getter = () => {\n        if (cleanup) {\n          pauseTracking();\n          try {\n            cleanup();\n          } finally {\n            resetTracking();\n          }\n        }\n        const currentEffect = activeWatcher;\n        activeWatcher = effect;\n        try {\n          return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);\n        } finally {\n          activeWatcher = currentEffect;\n        }\n      };\n    }\n  } else {\n    getter = shared.NOOP;\n  }\n  if (cb && deep) {\n    const baseGetter = getter;\n    const depth = deep === true ? Infinity : deep;\n    getter = () => traverse(baseGetter(), depth);\n  }\n  const scope = getCurrentScope();\n  const watchHandle = () => {\n    effect.stop();\n    if (scope && scope.active) {\n      shared.remove(scope.effects, effect);\n    }\n  };\n  if (once && cb) {\n    const _cb = cb;\n    cb = (...args) => {\n      _cb(...args);\n      watchHandle();\n    };\n  }\n  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n  const job = (immediateFirstRun) => {\n    if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) {\n      return;\n    }\n    if (cb) {\n      const newValue = effect.run();\n      if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => shared.hasChanged(v, oldValue[i])) : shared.hasChanged(newValue, oldValue))) {\n        if (cleanup) {\n          cleanup();\n        }\n        const currentWatcher = activeWatcher;\n        activeWatcher = effect;\n        try {\n          const args = [\n            newValue,\n            // pass undefined as the old value when it's changed for the first time\n            oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\n            boundCleanup\n          ];\n          oldValue = newValue;\n          call ? call(cb, 3, args) : (\n            // @ts-expect-error\n            cb(...args)\n          );\n        } finally {\n          activeWatcher = currentWatcher;\n        }\n      }\n    } else {\n      effect.run();\n    }\n  };\n  if (augmentJob) {\n    augmentJob(job);\n  }\n  effect = new ReactiveEffect(getter);\n  effect.scheduler = scheduler ? () => scheduler(job, false) : job;\n  boundCleanup = (fn) => onWatcherCleanup(fn, false, effect);\n  cleanup = effect.onStop = () => {\n    const cleanups = cleanupMap.get(effect);\n    if (cleanups) {\n      if (call) {\n        call(cleanups, 4);\n      } else {\n        for (const cleanup2 of cleanups) cleanup2();\n      }\n      cleanupMap.delete(effect);\n    }\n  };\n  if (cb) {\n    if (immediate) {\n      job(true);\n    } else {\n      oldValue = effect.run();\n    }\n  } else if (scheduler) {\n    scheduler(job.bind(null, true), true);\n  } else {\n    effect.run();\n  }\n  watchHandle.pause = effect.pause.bind(effect);\n  watchHandle.resume = effect.resume.bind(effect);\n  watchHandle.stop = watchHandle;\n  return watchHandle;\n}\nfunction traverse(value, depth = Infinity, seen) {\n  if (depth <= 0 || !shared.isObject(value) || value[\"__v_skip\"]) {\n    return value;\n  }\n  seen = seen || /* @__PURE__ */ new Set();\n  if (seen.has(value)) {\n    return value;\n  }\n  seen.add(value);\n  depth--;\n  if (isRef(value)) {\n    traverse(value.value, depth, seen);\n  } else if (shared.isArray(value)) {\n    for (let i = 0; i < value.length; i++) {\n      traverse(value[i], depth, seen);\n    }\n  } else if (shared.isSet(value) || shared.isMap(value)) {\n    value.forEach((v) => {\n      traverse(v, depth, seen);\n    });\n  } else if (shared.isPlainObject(value)) {\n    for (const key in value) {\n      traverse(value[key], depth, seen);\n    }\n    for (const key of Object.getOwnPropertySymbols(value)) {\n      if (Object.prototype.propertyIsEnumerable.call(value, key)) {\n        traverse(value[key], depth, seen);\n      }\n    }\n  }\n  return value;\n}\n\nexports.ARRAY_ITERATE_KEY = ARRAY_ITERATE_KEY;\nexports.EffectFlags = EffectFlags;\nexports.EffectScope = EffectScope;\nexports.ITERATE_KEY = ITERATE_KEY;\nexports.MAP_KEY_ITERATE_KEY = MAP_KEY_ITERATE_KEY;\nexports.ReactiveEffect = ReactiveEffect;\nexports.ReactiveFlags = ReactiveFlags;\nexports.TrackOpTypes = TrackOpTypes;\nexports.TriggerOpTypes = TriggerOpTypes;\nexports.WatchErrorCodes = WatchErrorCodes;\nexports.computed = computed;\nexports.customRef = customRef;\nexports.effect = effect;\nexports.effectScope = effectScope;\nexports.enableTracking = enableTracking;\nexports.getCurrentScope = getCurrentScope;\nexports.getCurrentWatcher = getCurrentWatcher;\nexports.isProxy = isProxy;\nexports.isReactive = isReactive;\nexports.isReadonly = isReadonly;\nexports.isRef = isRef;\nexports.isShallow = isShallow;\nexports.markRaw = markRaw;\nexports.onEffectCleanup = onEffectCleanup;\nexports.onScopeDispose = onScopeDispose;\nexports.onWatcherCleanup = onWatcherCleanup;\nexports.pauseTracking = pauseTracking;\nexports.proxyRefs = proxyRefs;\nexports.reactive = reactive;\nexports.reactiveReadArray = reactiveReadArray;\nexports.readonly = readonly;\nexports.ref = ref;\nexports.resetTracking = resetTracking;\nexports.shallowReactive = shallowReactive;\nexports.shallowReadArray = shallowReadArray;\nexports.shallowReadonly = shallowReadonly;\nexports.shallowRef = shallowRef;\nexports.stop = stop;\nexports.toRaw = toRaw;\nexports.toReactive = toReactive;\nexports.toReadonly = toReadonly;\nexports.toRef = toRef;\nexports.toRefs = toRefs;\nexports.toValue = toValue;\nexports.track = track;\nexports.traverse = traverse;\nexports.trigger = trigger;\nexports.triggerRef = triggerRef;\nexports.unref = unref;\nexports.watch = watch;\n","'use strict'\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./dist/reactivity.cjs.prod.js')\n} else {\n  module.exports = require('./dist/reactivity.cjs.js')\n}\n","/**\n* @vue/runtime-core v3.5.18\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar reactivity = require('@vue/reactivity');\nvar shared = require('@vue/shared');\n\nfunction pushWarningContext(vnode) {\n}\nfunction popWarningContext() {\n}\nfunction assertNumber(val, type) {\n  return;\n}\n\nconst ErrorCodes = {\n  \"SETUP_FUNCTION\": 0,\n  \"0\": \"SETUP_FUNCTION\",\n  \"RENDER_FUNCTION\": 1,\n  \"1\": \"RENDER_FUNCTION\",\n  \"NATIVE_EVENT_HANDLER\": 5,\n  \"5\": \"NATIVE_EVENT_HANDLER\",\n  \"COMPONENT_EVENT_HANDLER\": 6,\n  \"6\": \"COMPONENT_EVENT_HANDLER\",\n  \"VNODE_HOOK\": 7,\n  \"7\": \"VNODE_HOOK\",\n  \"DIRECTIVE_HOOK\": 8,\n  \"8\": \"DIRECTIVE_HOOK\",\n  \"TRANSITION_HOOK\": 9,\n  \"9\": \"TRANSITION_HOOK\",\n  \"APP_ERROR_HANDLER\": 10,\n  \"10\": \"APP_ERROR_HANDLER\",\n  \"APP_WARN_HANDLER\": 11,\n  \"11\": \"APP_WARN_HANDLER\",\n  \"FUNCTION_REF\": 12,\n  \"12\": \"FUNCTION_REF\",\n  \"ASYNC_COMPONENT_LOADER\": 13,\n  \"13\": \"ASYNC_COMPONENT_LOADER\",\n  \"SCHEDULER\": 14,\n  \"14\": \"SCHEDULER\",\n  \"COMPONENT_UPDATE\": 15,\n  \"15\": \"COMPONENT_UPDATE\",\n  \"APP_UNMOUNT_CLEANUP\": 16,\n  \"16\": \"APP_UNMOUNT_CLEANUP\"\n};\nconst ErrorTypeStrings$1 = {\n  [\"sp\"]: \"serverPrefetch hook\",\n  [\"bc\"]: \"beforeCreate hook\",\n  [\"c\"]: \"created hook\",\n  [\"bm\"]: \"beforeMount hook\",\n  [\"m\"]: \"mounted hook\",\n  [\"bu\"]: \"beforeUpdate hook\",\n  [\"u\"]: \"updated\",\n  [\"bum\"]: \"beforeUnmount hook\",\n  [\"um\"]: \"unmounted hook\",\n  [\"a\"]: \"activated hook\",\n  [\"da\"]: \"deactivated hook\",\n  [\"ec\"]: \"errorCaptured hook\",\n  [\"rtc\"]: \"renderTracked hook\",\n  [\"rtg\"]: \"renderTriggered hook\",\n  [0]: \"setup function\",\n  [1]: \"render function\",\n  [2]: \"watcher getter\",\n  [3]: \"watcher callback\",\n  [4]: \"watcher cleanup function\",\n  [5]: \"native event handler\",\n  [6]: \"component event handler\",\n  [7]: \"vnode hook\",\n  [8]: \"directive hook\",\n  [9]: \"transition hook\",\n  [10]: \"app errorHandler\",\n  [11]: \"app warnHandler\",\n  [12]: \"ref function\",\n  [13]: \"async component loader\",\n  [14]: \"scheduler flush\",\n  [15]: \"component update\",\n  [16]: \"app unmount cleanup function\"\n};\nfunction callWithErrorHandling(fn, instance, type, args) {\n  try {\n    return args ? fn(...args) : fn();\n  } catch (err) {\n    handleError(err, instance, type);\n  }\n}\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\n  if (shared.isFunction(fn)) {\n    const res = callWithErrorHandling(fn, instance, type, args);\n    if (res && shared.isPromise(res)) {\n      res.catch((err) => {\n        handleError(err, instance, type);\n      });\n    }\n    return res;\n  }\n  if (shared.isArray(fn)) {\n    const values = [];\n    for (let i = 0; i < fn.length; i++) {\n      values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\n    }\n    return values;\n  }\n}\nfunction handleError(err, instance, type, throwInDev = true) {\n  const contextVNode = instance ? instance.vnode : null;\n  const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || shared.EMPTY_OBJ;\n  if (instance) {\n    let cur = instance.parent;\n    const exposedInstance = instance.proxy;\n    const errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`;\n    while (cur) {\n      const errorCapturedHooks = cur.ec;\n      if (errorCapturedHooks) {\n        for (let i = 0; i < errorCapturedHooks.length; i++) {\n          if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\n            return;\n          }\n        }\n      }\n      cur = cur.parent;\n    }\n    if (errorHandler) {\n      reactivity.pauseTracking();\n      callWithErrorHandling(errorHandler, null, 10, [\n        err,\n        exposedInstance,\n        errorInfo\n      ]);\n      reactivity.resetTracking();\n      return;\n    }\n  }\n  logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);\n}\nfunction logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {\n  if (throwInProd) {\n    throw err;\n  } else {\n    console.error(err);\n  }\n}\n\nconst queue = [];\nlet flushIndex = -1;\nconst pendingPostFlushCbs = [];\nlet activePostFlushCbs = null;\nlet postFlushIndex = 0;\nconst resolvedPromise = /* @__PURE__ */ Promise.resolve();\nlet currentFlushPromise = null;\nfunction nextTick(fn) {\n  const p = currentFlushPromise || resolvedPromise;\n  return fn ? p.then(this ? fn.bind(this) : fn) : p;\n}\nfunction findInsertionIndex(id) {\n  let start = flushIndex + 1;\n  let end = queue.length;\n  while (start < end) {\n    const middle = start + end >>> 1;\n    const middleJob = queue[middle];\n    const middleJobId = getId(middleJob);\n    if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {\n      start = middle + 1;\n    } else {\n      end = middle;\n    }\n  }\n  return start;\n}\nfunction queueJob(job) {\n  if (!(job.flags & 1)) {\n    const jobId = getId(job);\n    const lastJob = queue[queue.length - 1];\n    if (!lastJob || // fast path when the job id is larger than the tail\n    !(job.flags & 2) && jobId >= getId(lastJob)) {\n      queue.push(job);\n    } else {\n      queue.splice(findInsertionIndex(jobId), 0, job);\n    }\n    job.flags |= 1;\n    queueFlush();\n  }\n}\nfunction queueFlush() {\n  if (!currentFlushPromise) {\n    currentFlushPromise = resolvedPromise.then(flushJobs);\n  }\n}\nfunction queuePostFlushCb(cb) {\n  if (!shared.isArray(cb)) {\n    if (activePostFlushCbs && cb.id === -1) {\n      activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);\n    } else if (!(cb.flags & 1)) {\n      pendingPostFlushCbs.push(cb);\n      cb.flags |= 1;\n    }\n  } else {\n    pendingPostFlushCbs.push(...cb);\n  }\n  queueFlush();\n}\nfunction flushPreFlushCbs(instance, seen, i = flushIndex + 1) {\n  for (; i < queue.length; i++) {\n    const cb = queue[i];\n    if (cb && cb.flags & 2) {\n      if (instance && cb.id !== instance.uid) {\n        continue;\n      }\n      queue.splice(i, 1);\n      i--;\n      if (cb.flags & 4) {\n        cb.flags &= -2;\n      }\n      cb();\n      if (!(cb.flags & 4)) {\n        cb.flags &= -2;\n      }\n    }\n  }\n}\nfunction flushPostFlushCbs(seen) {\n  if (pendingPostFlushCbs.length) {\n    const deduped = [...new Set(pendingPostFlushCbs)].sort(\n      (a, b) => getId(a) - getId(b)\n    );\n    pendingPostFlushCbs.length = 0;\n    if (activePostFlushCbs) {\n      activePostFlushCbs.push(...deduped);\n      return;\n    }\n    activePostFlushCbs = deduped;\n    for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\n      const cb = activePostFlushCbs[postFlushIndex];\n      if (cb.flags & 4) {\n        cb.flags &= -2;\n      }\n      if (!(cb.flags & 8)) cb();\n      cb.flags &= -2;\n    }\n    activePostFlushCbs = null;\n    postFlushIndex = 0;\n  }\n}\nconst getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;\nfunction flushJobs(seen) {\n  try {\n    for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\n      const job = queue[flushIndex];\n      if (job && !(job.flags & 8)) {\n        if (false) ;\n        if (job.flags & 4) {\n          job.flags &= ~1;\n        }\n        callWithErrorHandling(\n          job,\n          job.i,\n          job.i ? 15 : 14\n        );\n        if (!(job.flags & 4)) {\n          job.flags &= ~1;\n        }\n      }\n    }\n  } finally {\n    for (; flushIndex < queue.length; flushIndex++) {\n      const job = queue[flushIndex];\n      if (job) {\n        job.flags &= -2;\n      }\n    }\n    flushIndex = -1;\n    queue.length = 0;\n    flushPostFlushCbs();\n    currentFlushPromise = null;\n    if (queue.length || pendingPostFlushCbs.length) {\n      flushJobs();\n    }\n  }\n}\n\nlet currentRenderingInstance = null;\nlet currentScopeId = null;\nfunction setCurrentRenderingInstance(instance) {\n  const prev = currentRenderingInstance;\n  currentRenderingInstance = instance;\n  currentScopeId = instance && instance.type.__scopeId || null;\n  return prev;\n}\nfunction pushScopeId(id) {\n  currentScopeId = id;\n}\nfunction popScopeId() {\n  currentScopeId = null;\n}\nconst withScopeId = (_id) => withCtx;\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {\n  if (!ctx) return fn;\n  if (fn._n) {\n    return fn;\n  }\n  const renderFnWithContext = (...args) => {\n    if (renderFnWithContext._d) {\n      setBlockTracking(-1);\n    }\n    const prevInstance = setCurrentRenderingInstance(ctx);\n    let res;\n    try {\n      res = fn(...args);\n    } finally {\n      setCurrentRenderingInstance(prevInstance);\n      if (renderFnWithContext._d) {\n        setBlockTracking(1);\n      }\n    }\n    return res;\n  };\n  renderFnWithContext._n = true;\n  renderFnWithContext._c = true;\n  renderFnWithContext._d = true;\n  return renderFnWithContext;\n}\n\nfunction withDirectives(vnode, directives) {\n  if (currentRenderingInstance === null) {\n    return vnode;\n  }\n  const instance = getComponentPublicInstance(currentRenderingInstance);\n  const bindings = vnode.dirs || (vnode.dirs = []);\n  for (let i = 0; i < directives.length; i++) {\n    let [dir, value, arg, modifiers = shared.EMPTY_OBJ] = directives[i];\n    if (dir) {\n      if (shared.isFunction(dir)) {\n        dir = {\n          mounted: dir,\n          updated: dir\n        };\n      }\n      if (dir.deep) {\n        reactivity.traverse(value);\n      }\n      bindings.push({\n        dir,\n        instance,\n        value,\n        oldValue: void 0,\n        arg,\n        modifiers\n      });\n    }\n  }\n  return vnode;\n}\nfunction invokeDirectiveHook(vnode, prevVNode, instance, name) {\n  const bindings = vnode.dirs;\n  const oldBindings = prevVNode && prevVNode.dirs;\n  for (let i = 0; i < bindings.length; i++) {\n    const binding = bindings[i];\n    if (oldBindings) {\n      binding.oldValue = oldBindings[i].value;\n    }\n    let hook = binding.dir[name];\n    if (hook) {\n      reactivity.pauseTracking();\n      callWithAsyncErrorHandling(hook, instance, 8, [\n        vnode.el,\n        binding,\n        vnode,\n        prevVNode\n      ]);\n      reactivity.resetTracking();\n    }\n  }\n}\n\nconst TeleportEndKey = Symbol(\"_vte\");\nconst isTeleport = (type) => type.__isTeleport;\nconst isTeleportDisabled = (props) => props && (props.disabled || props.disabled === \"\");\nconst isTeleportDeferred = (props) => props && (props.defer || props.defer === \"\");\nconst isTargetSVG = (target) => typeof SVGElement !== \"undefined\" && target instanceof SVGElement;\nconst isTargetMathML = (target) => typeof MathMLElement === \"function\" && target instanceof MathMLElement;\nconst resolveTarget = (props, select) => {\n  const targetSelector = props && props.to;\n  if (shared.isString(targetSelector)) {\n    if (!select) {\n      return null;\n    } else {\n      const target = select(targetSelector);\n      return target;\n    }\n  } else {\n    return targetSelector;\n  }\n};\nconst TeleportImpl = {\n  name: \"Teleport\",\n  __isTeleport: true,\n  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {\n    const {\n      mc: mountChildren,\n      pc: patchChildren,\n      pbc: patchBlockChildren,\n      o: { insert, querySelector, createText, createComment }\n    } = internals;\n    const disabled = isTeleportDisabled(n2.props);\n    let { shapeFlag, children, dynamicChildren } = n2;\n    if (n1 == null) {\n      const placeholder = n2.el = createText(\"\");\n      const mainAnchor = n2.anchor = createText(\"\");\n      insert(placeholder, container, anchor);\n      insert(mainAnchor, container, anchor);\n      const mount = (container2, anchor2) => {\n        if (shapeFlag & 16) {\n          if (parentComponent && parentComponent.isCE) {\n            parentComponent.ce._teleportTarget = container2;\n          }\n          mountChildren(\n            children,\n            container2,\n            anchor2,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        }\n      };\n      const mountToTarget = () => {\n        const target = n2.target = resolveTarget(n2.props, querySelector);\n        const targetAnchor = prepareAnchor(target, n2, createText, insert);\n        if (target) {\n          if (namespace !== \"svg\" && isTargetSVG(target)) {\n            namespace = \"svg\";\n          } else if (namespace !== \"mathml\" && isTargetMathML(target)) {\n            namespace = \"mathml\";\n          }\n          if (!disabled) {\n            mount(target, targetAnchor);\n            updateCssVars(n2, false);\n          }\n        }\n      };\n      if (disabled) {\n        mount(container, mainAnchor);\n        updateCssVars(n2, true);\n      }\n      if (isTeleportDeferred(n2.props)) {\n        n2.el.__isMounted = false;\n        queuePostRenderEffect(() => {\n          mountToTarget();\n          delete n2.el.__isMounted;\n        }, parentSuspense);\n      } else {\n        mountToTarget();\n      }\n    } else {\n      if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {\n        queuePostRenderEffect(() => {\n          TeleportImpl.process(\n            n1,\n            n2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized,\n            internals\n          );\n        }, parentSuspense);\n        return;\n      }\n      n2.el = n1.el;\n      n2.targetStart = n1.targetStart;\n      const mainAnchor = n2.anchor = n1.anchor;\n      const target = n2.target = n1.target;\n      const targetAnchor = n2.targetAnchor = n1.targetAnchor;\n      const wasDisabled = isTeleportDisabled(n1.props);\n      const currentContainer = wasDisabled ? container : target;\n      const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;\n      if (namespace === \"svg\" || isTargetSVG(target)) {\n        namespace = \"svg\";\n      } else if (namespace === \"mathml\" || isTargetMathML(target)) {\n        namespace = \"mathml\";\n      }\n      if (dynamicChildren) {\n        patchBlockChildren(\n          n1.dynamicChildren,\n          dynamicChildren,\n          currentContainer,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds\n        );\n        traverseStaticChildren(n1, n2, true);\n      } else if (!optimized) {\n        patchChildren(\n          n1,\n          n2,\n          currentContainer,\n          currentAnchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          false\n        );\n      }\n      if (disabled) {\n        if (!wasDisabled) {\n          moveTeleport(\n            n2,\n            container,\n            mainAnchor,\n            internals,\n            1\n          );\n        } else {\n          if (n2.props && n1.props && n2.props.to !== n1.props.to) {\n            n2.props.to = n1.props.to;\n          }\n        }\n      } else {\n        if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {\n          const nextTarget = n2.target = resolveTarget(\n            n2.props,\n            querySelector\n          );\n          if (nextTarget) {\n            moveTeleport(\n              n2,\n              nextTarget,\n              null,\n              internals,\n              0\n            );\n          }\n        } else if (wasDisabled) {\n          moveTeleport(\n            n2,\n            target,\n            targetAnchor,\n            internals,\n            1\n          );\n        }\n      }\n      updateCssVars(n2, disabled);\n    }\n  },\n  remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {\n    const {\n      shapeFlag,\n      children,\n      anchor,\n      targetStart,\n      targetAnchor,\n      target,\n      props\n    } = vnode;\n    if (target) {\n      hostRemove(targetStart);\n      hostRemove(targetAnchor);\n    }\n    doRemove && hostRemove(anchor);\n    if (shapeFlag & 16) {\n      const shouldRemove = doRemove || !isTeleportDisabled(props);\n      for (let i = 0; i < children.length; i++) {\n        const child = children[i];\n        unmount(\n          child,\n          parentComponent,\n          parentSuspense,\n          shouldRemove,\n          !!child.dynamicChildren\n        );\n      }\n    }\n  },\n  move: moveTeleport,\n  hydrate: hydrateTeleport\n};\nfunction moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {\n  if (moveType === 0) {\n    insert(vnode.targetAnchor, container, parentAnchor);\n  }\n  const { el, anchor, shapeFlag, children, props } = vnode;\n  const isReorder = moveType === 2;\n  if (isReorder) {\n    insert(el, container, parentAnchor);\n  }\n  if (!isReorder || isTeleportDisabled(props)) {\n    if (shapeFlag & 16) {\n      for (let i = 0; i < children.length; i++) {\n        move(\n          children[i],\n          container,\n          parentAnchor,\n          2\n        );\n      }\n    }\n  }\n  if (isReorder) {\n    insert(anchor, container, parentAnchor);\n  }\n}\nfunction hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {\n  o: { nextSibling, parentNode, querySelector, insert, createText }\n}, hydrateChildren) {\n  const target = vnode.target = resolveTarget(\n    vnode.props,\n    querySelector\n  );\n  if (target) {\n    const disabled = isTeleportDisabled(vnode.props);\n    const targetNode = target._lpa || target.firstChild;\n    if (vnode.shapeFlag & 16) {\n      if (disabled) {\n        vnode.anchor = hydrateChildren(\n          nextSibling(node),\n          vnode,\n          parentNode(node),\n          parentComponent,\n          parentSuspense,\n          slotScopeIds,\n          optimized\n        );\n        vnode.targetStart = targetNode;\n        vnode.targetAnchor = targetNode && nextSibling(targetNode);\n      } else {\n        vnode.anchor = nextSibling(node);\n        let targetAnchor = targetNode;\n        while (targetAnchor) {\n          if (targetAnchor && targetAnchor.nodeType === 8) {\n            if (targetAnchor.data === \"teleport start anchor\") {\n              vnode.targetStart = targetAnchor;\n            } else if (targetAnchor.data === \"teleport anchor\") {\n              vnode.targetAnchor = targetAnchor;\n              target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);\n              break;\n            }\n          }\n          targetAnchor = nextSibling(targetAnchor);\n        }\n        if (!vnode.targetAnchor) {\n          prepareAnchor(target, vnode, createText, insert);\n        }\n        hydrateChildren(\n          targetNode && nextSibling(targetNode),\n          vnode,\n          target,\n          parentComponent,\n          parentSuspense,\n          slotScopeIds,\n          optimized\n        );\n      }\n    }\n    updateCssVars(vnode, disabled);\n  }\n  return vnode.anchor && nextSibling(vnode.anchor);\n}\nconst Teleport = TeleportImpl;\nfunction updateCssVars(vnode, isDisabled) {\n  const ctx = vnode.ctx;\n  if (ctx && ctx.ut) {\n    let node, anchor;\n    if (isDisabled) {\n      node = vnode.el;\n      anchor = vnode.anchor;\n    } else {\n      node = vnode.targetStart;\n      anchor = vnode.targetAnchor;\n    }\n    while (node && node !== anchor) {\n      if (node.nodeType === 1) node.setAttribute(\"data-v-owner\", ctx.uid);\n      node = node.nextSibling;\n    }\n    ctx.ut();\n  }\n}\nfunction prepareAnchor(target, vnode, createText, insert) {\n  const targetStart = vnode.targetStart = createText(\"\");\n  const targetAnchor = vnode.targetAnchor = createText(\"\");\n  targetStart[TeleportEndKey] = targetAnchor;\n  if (target) {\n    insert(targetStart, target);\n    insert(targetAnchor, target);\n  }\n  return targetAnchor;\n}\n\nconst leaveCbKey = Symbol(\"_leaveCb\");\nconst enterCbKey = Symbol(\"_enterCb\");\nfunction useTransitionState() {\n  const state = {\n    isMounted: false,\n    isLeaving: false,\n    isUnmounting: false,\n    leavingVNodes: /* @__PURE__ */ new Map()\n  };\n  onMounted(() => {\n    state.isMounted = true;\n  });\n  onBeforeUnmount(() => {\n    state.isUnmounting = true;\n  });\n  return state;\n}\nconst TransitionHookValidator = [Function, Array];\nconst BaseTransitionPropsValidators = {\n  mode: String,\n  appear: Boolean,\n  persisted: Boolean,\n  // enter\n  onBeforeEnter: TransitionHookValidator,\n  onEnter: TransitionHookValidator,\n  onAfterEnter: TransitionHookValidator,\n  onEnterCancelled: TransitionHookValidator,\n  // leave\n  onBeforeLeave: TransitionHookValidator,\n  onLeave: TransitionHookValidator,\n  onAfterLeave: TransitionHookValidator,\n  onLeaveCancelled: TransitionHookValidator,\n  // appear\n  onBeforeAppear: TransitionHookValidator,\n  onAppear: TransitionHookValidator,\n  onAfterAppear: TransitionHookValidator,\n  onAppearCancelled: TransitionHookValidator\n};\nconst recursiveGetSubtree = (instance) => {\n  const subTree = instance.subTree;\n  return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;\n};\nconst BaseTransitionImpl = {\n  name: `BaseTransition`,\n  props: BaseTransitionPropsValidators,\n  setup(props, { slots }) {\n    const instance = getCurrentInstance();\n    const state = useTransitionState();\n    return () => {\n      const children = slots.default && getTransitionRawChildren(slots.default(), true);\n      if (!children || !children.length) {\n        return;\n      }\n      const child = findNonCommentChild(children);\n      const rawProps = reactivity.toRaw(props);\n      const { mode } = rawProps;\n      if (state.isLeaving) {\n        return emptyPlaceholder(child);\n      }\n      const innerChild = getInnerChild$1(child);\n      if (!innerChild) {\n        return emptyPlaceholder(child);\n      }\n      let enterHooks = resolveTransitionHooks(\n        innerChild,\n        rawProps,\n        state,\n        instance,\n        // #11061, ensure enterHooks is fresh after clone\n        (hooks) => enterHooks = hooks\n      );\n      if (innerChild.type !== Comment) {\n        setTransitionHooks(innerChild, enterHooks);\n      }\n      let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);\n      if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {\n        let leavingHooks = resolveTransitionHooks(\n          oldInnerChild,\n          rawProps,\n          state,\n          instance\n        );\n        setTransitionHooks(oldInnerChild, leavingHooks);\n        if (mode === \"out-in\" && innerChild.type !== Comment) {\n          state.isLeaving = true;\n          leavingHooks.afterLeave = () => {\n            state.isLeaving = false;\n            if (!(instance.job.flags & 8)) {\n              instance.update();\n            }\n            delete leavingHooks.afterLeave;\n            oldInnerChild = void 0;\n          };\n          return emptyPlaceholder(child);\n        } else if (mode === \"in-out\" && innerChild.type !== Comment) {\n          leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {\n            const leavingVNodesCache = getLeavingNodesForType(\n              state,\n              oldInnerChild\n            );\n            leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;\n            el[leaveCbKey] = () => {\n              earlyRemove();\n              el[leaveCbKey] = void 0;\n              delete enterHooks.delayedLeave;\n              oldInnerChild = void 0;\n            };\n            enterHooks.delayedLeave = () => {\n              delayedLeave();\n              delete enterHooks.delayedLeave;\n              oldInnerChild = void 0;\n            };\n          };\n        } else {\n          oldInnerChild = void 0;\n        }\n      } else if (oldInnerChild) {\n        oldInnerChild = void 0;\n      }\n      return child;\n    };\n  }\n};\nfunction findNonCommentChild(children) {\n  let child = children[0];\n  if (children.length > 1) {\n    for (const c of children) {\n      if (c.type !== Comment) {\n        child = c;\n        break;\n      }\n    }\n  }\n  return child;\n}\nconst BaseTransition = BaseTransitionImpl;\nfunction getLeavingNodesForType(state, vnode) {\n  const { leavingVNodes } = state;\n  let leavingVNodesCache = leavingVNodes.get(vnode.type);\n  if (!leavingVNodesCache) {\n    leavingVNodesCache = /* @__PURE__ */ Object.create(null);\n    leavingVNodes.set(vnode.type, leavingVNodesCache);\n  }\n  return leavingVNodesCache;\n}\nfunction resolveTransitionHooks(vnode, props, state, instance, postClone) {\n  const {\n    appear,\n    mode,\n    persisted = false,\n    onBeforeEnter,\n    onEnter,\n    onAfterEnter,\n    onEnterCancelled,\n    onBeforeLeave,\n    onLeave,\n    onAfterLeave,\n    onLeaveCancelled,\n    onBeforeAppear,\n    onAppear,\n    onAfterAppear,\n    onAppearCancelled\n  } = props;\n  const key = String(vnode.key);\n  const leavingVNodesCache = getLeavingNodesForType(state, vnode);\n  const callHook = (hook, args) => {\n    hook && callWithAsyncErrorHandling(\n      hook,\n      instance,\n      9,\n      args\n    );\n  };\n  const callAsyncHook = (hook, args) => {\n    const done = args[1];\n    callHook(hook, args);\n    if (shared.isArray(hook)) {\n      if (hook.every((hook2) => hook2.length <= 1)) done();\n    } else if (hook.length <= 1) {\n      done();\n    }\n  };\n  const hooks = {\n    mode,\n    persisted,\n    beforeEnter(el) {\n      let hook = onBeforeEnter;\n      if (!state.isMounted) {\n        if (appear) {\n          hook = onBeforeAppear || onBeforeEnter;\n        } else {\n          return;\n        }\n      }\n      if (el[leaveCbKey]) {\n        el[leaveCbKey](\n          true\n          /* cancelled */\n        );\n      }\n      const leavingVNode = leavingVNodesCache[key];\n      if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {\n        leavingVNode.el[leaveCbKey]();\n      }\n      callHook(hook, [el]);\n    },\n    enter(el) {\n      let hook = onEnter;\n      let afterHook = onAfterEnter;\n      let cancelHook = onEnterCancelled;\n      if (!state.isMounted) {\n        if (appear) {\n          hook = onAppear || onEnter;\n          afterHook = onAfterAppear || onAfterEnter;\n          cancelHook = onAppearCancelled || onEnterCancelled;\n        } else {\n          return;\n        }\n      }\n      let called = false;\n      const done = el[enterCbKey] = (cancelled) => {\n        if (called) return;\n        called = true;\n        if (cancelled) {\n          callHook(cancelHook, [el]);\n        } else {\n          callHook(afterHook, [el]);\n        }\n        if (hooks.delayedLeave) {\n          hooks.delayedLeave();\n        }\n        el[enterCbKey] = void 0;\n      };\n      if (hook) {\n        callAsyncHook(hook, [el, done]);\n      } else {\n        done();\n      }\n    },\n    leave(el, remove) {\n      const key2 = String(vnode.key);\n      if (el[enterCbKey]) {\n        el[enterCbKey](\n          true\n          /* cancelled */\n        );\n      }\n      if (state.isUnmounting) {\n        return remove();\n      }\n      callHook(onBeforeLeave, [el]);\n      let called = false;\n      const done = el[leaveCbKey] = (cancelled) => {\n        if (called) return;\n        called = true;\n        remove();\n        if (cancelled) {\n          callHook(onLeaveCancelled, [el]);\n        } else {\n          callHook(onAfterLeave, [el]);\n        }\n        el[leaveCbKey] = void 0;\n        if (leavingVNodesCache[key2] === vnode) {\n          delete leavingVNodesCache[key2];\n        }\n      };\n      leavingVNodesCache[key2] = vnode;\n      if (onLeave) {\n        callAsyncHook(onLeave, [el, done]);\n      } else {\n        done();\n      }\n    },\n    clone(vnode2) {\n      const hooks2 = resolveTransitionHooks(\n        vnode2,\n        props,\n        state,\n        instance,\n        postClone\n      );\n      if (postClone) postClone(hooks2);\n      return hooks2;\n    }\n  };\n  return hooks;\n}\nfunction emptyPlaceholder(vnode) {\n  if (isKeepAlive(vnode)) {\n    vnode = cloneVNode(vnode);\n    vnode.children = null;\n    return vnode;\n  }\n}\nfunction getInnerChild$1(vnode) {\n  if (!isKeepAlive(vnode)) {\n    if (isTeleport(vnode.type) && vnode.children) {\n      return findNonCommentChild(vnode.children);\n    }\n    return vnode;\n  }\n  if (vnode.component) {\n    return vnode.component.subTree;\n  }\n  const { shapeFlag, children } = vnode;\n  if (children) {\n    if (shapeFlag & 16) {\n      return children[0];\n    }\n    if (shapeFlag & 32 && shared.isFunction(children.default)) {\n      return children.default();\n    }\n  }\n}\nfunction setTransitionHooks(vnode, hooks) {\n  if (vnode.shapeFlag & 6 && vnode.component) {\n    vnode.transition = hooks;\n    setTransitionHooks(vnode.component.subTree, hooks);\n  } else if (vnode.shapeFlag & 128) {\n    vnode.ssContent.transition = hooks.clone(vnode.ssContent);\n    vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);\n  } else {\n    vnode.transition = hooks;\n  }\n}\nfunction getTransitionRawChildren(children, keepComment = false, parentKey) {\n  let ret = [];\n  let keyedFragmentCount = 0;\n  for (let i = 0; i < children.length; i++) {\n    let child = children[i];\n    const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);\n    if (child.type === Fragment) {\n      if (child.patchFlag & 128) keyedFragmentCount++;\n      ret = ret.concat(\n        getTransitionRawChildren(child.children, keepComment, key)\n      );\n    } else if (keepComment || child.type !== Comment) {\n      ret.push(key != null ? cloneVNode(child, { key }) : child);\n    }\n  }\n  if (keyedFragmentCount > 1) {\n    for (let i = 0; i < ret.length; i++) {\n      ret[i].patchFlag = -2;\n    }\n  }\n  return ret;\n}\n\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineComponent(options, extraOptions) {\n  return shared.isFunction(options) ? (\n    // #8236: extend call and options.name access are considered side-effects\n    // by Rollup, so we have to wrap it in a pure-annotated IIFE.\n    /* @__PURE__ */ (() => shared.extend({ name: options.name }, extraOptions, { setup: options }))()\n  ) : options;\n}\n\nfunction useId() {\n  const i = getCurrentInstance();\n  if (i) {\n    return (i.appContext.config.idPrefix || \"v\") + \"-\" + i.ids[0] + i.ids[1]++;\n  }\n  return \"\";\n}\nfunction markAsyncBoundary(instance) {\n  instance.ids = [instance.ids[0] + instance.ids[2]++ + \"-\", 0, 0];\n}\n\nfunction useTemplateRef(key) {\n  const i = getCurrentInstance();\n  const r = reactivity.shallowRef(null);\n  if (i) {\n    const refs = i.refs === shared.EMPTY_OBJ ? i.refs = {} : i.refs;\n    {\n      Object.defineProperty(refs, key, {\n        enumerable: true,\n        get: () => r.value,\n        set: (val) => r.value = val\n      });\n    }\n  }\n  const ret = r;\n  return ret;\n}\n\nfunction setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {\n  if (shared.isArray(rawRef)) {\n    rawRef.forEach(\n      (r, i) => setRef(\n        r,\n        oldRawRef && (shared.isArray(oldRawRef) ? oldRawRef[i] : oldRawRef),\n        parentSuspense,\n        vnode,\n        isUnmount\n      )\n    );\n    return;\n  }\n  if (isAsyncWrapper(vnode) && !isUnmount) {\n    if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {\n      setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);\n    }\n    return;\n  }\n  const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;\n  const value = isUnmount ? null : refValue;\n  const { i: owner, r: ref } = rawRef;\n  const oldRef = oldRawRef && oldRawRef.r;\n  const refs = owner.refs === shared.EMPTY_OBJ ? owner.refs = {} : owner.refs;\n  const setupState = owner.setupState;\n  const rawSetupState = reactivity.toRaw(setupState);\n  const canSetSetupRef = setupState === shared.EMPTY_OBJ ? () => false : (key) => {\n    return shared.hasOwn(rawSetupState, key);\n  };\n  if (oldRef != null && oldRef !== ref) {\n    if (shared.isString(oldRef)) {\n      refs[oldRef] = null;\n      if (canSetSetupRef(oldRef)) {\n        setupState[oldRef] = null;\n      }\n    } else if (reactivity.isRef(oldRef)) {\n      oldRef.value = null;\n    }\n  }\n  if (shared.isFunction(ref)) {\n    callWithErrorHandling(ref, owner, 12, [value, refs]);\n  } else {\n    const _isString = shared.isString(ref);\n    const _isRef = reactivity.isRef(ref);\n    if (_isString || _isRef) {\n      const doSet = () => {\n        if (rawRef.f) {\n          const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;\n          if (isUnmount) {\n            shared.isArray(existing) && shared.remove(existing, refValue);\n          } else {\n            if (!shared.isArray(existing)) {\n              if (_isString) {\n                refs[ref] = [refValue];\n                if (canSetSetupRef(ref)) {\n                  setupState[ref] = refs[ref];\n                }\n              } else {\n                ref.value = [refValue];\n                if (rawRef.k) refs[rawRef.k] = ref.value;\n              }\n            } else if (!existing.includes(refValue)) {\n              existing.push(refValue);\n            }\n          }\n        } else if (_isString) {\n          refs[ref] = value;\n          if (canSetSetupRef(ref)) {\n            setupState[ref] = value;\n          }\n        } else if (_isRef) {\n          ref.value = value;\n          if (rawRef.k) refs[rawRef.k] = value;\n        } else ;\n      };\n      if (value) {\n        doSet.id = -1;\n        queuePostRenderEffect(doSet, parentSuspense);\n      } else {\n        doSet();\n      }\n    }\n  }\n}\n\nlet hasLoggedMismatchError = false;\nconst logMismatchError = () => {\n  if (hasLoggedMismatchError) {\n    return;\n  }\n  console.error(\"Hydration completed but contains mismatches.\");\n  hasLoggedMismatchError = true;\n};\nconst isSVGContainer = (container) => container.namespaceURI.includes(\"svg\") && container.tagName !== \"foreignObject\";\nconst isMathMLContainer = (container) => container.namespaceURI.includes(\"MathML\");\nconst getContainerType = (container) => {\n  if (container.nodeType !== 1) return void 0;\n  if (isSVGContainer(container)) return \"svg\";\n  if (isMathMLContainer(container)) return \"mathml\";\n  return void 0;\n};\nconst isComment = (node) => node.nodeType === 8;\nfunction createHydrationFunctions(rendererInternals) {\n  const {\n    mt: mountComponent,\n    p: patch,\n    o: {\n      patchProp,\n      createText,\n      nextSibling,\n      parentNode,\n      remove,\n      insert,\n      createComment\n    }\n  } = rendererInternals;\n  const hydrate = (vnode, container) => {\n    if (!container.hasChildNodes()) {\n      patch(null, vnode, container);\n      flushPostFlushCbs();\n      container._vnode = vnode;\n      return;\n    }\n    hydrateNode(container.firstChild, vnode, null, null, null);\n    flushPostFlushCbs();\n    container._vnode = vnode;\n  };\n  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {\n    optimized = optimized || !!vnode.dynamicChildren;\n    const isFragmentStart = isComment(node) && node.data === \"[\";\n    const onMismatch = () => handleMismatch(\n      node,\n      vnode,\n      parentComponent,\n      parentSuspense,\n      slotScopeIds,\n      isFragmentStart\n    );\n    const { type, ref, shapeFlag, patchFlag } = vnode;\n    let domType = node.nodeType;\n    vnode.el = node;\n    if (patchFlag === -2) {\n      optimized = false;\n      vnode.dynamicChildren = null;\n    }\n    let nextNode = null;\n    switch (type) {\n      case Text:\n        if (domType !== 3) {\n          if (vnode.children === \"\") {\n            insert(vnode.el = createText(\"\"), parentNode(node), node);\n            nextNode = node;\n          } else {\n            nextNode = onMismatch();\n          }\n        } else {\n          if (node.data !== vnode.children) {\n            logMismatchError();\n            node.data = vnode.children;\n          }\n          nextNode = nextSibling(node);\n        }\n        break;\n      case Comment:\n        if (isTemplateNode(node)) {\n          nextNode = nextSibling(node);\n          replaceNode(\n            vnode.el = node.content.firstChild,\n            node,\n            parentComponent\n          );\n        } else if (domType !== 8 || isFragmentStart) {\n          nextNode = onMismatch();\n        } else {\n          nextNode = nextSibling(node);\n        }\n        break;\n      case Static:\n        if (isFragmentStart) {\n          node = nextSibling(node);\n          domType = node.nodeType;\n        }\n        if (domType === 1 || domType === 3) {\n          nextNode = node;\n          const needToAdoptContent = !vnode.children.length;\n          for (let i = 0; i < vnode.staticCount; i++) {\n            if (needToAdoptContent)\n              vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data;\n            if (i === vnode.staticCount - 1) {\n              vnode.anchor = nextNode;\n            }\n            nextNode = nextSibling(nextNode);\n          }\n          return isFragmentStart ? nextSibling(nextNode) : nextNode;\n        } else {\n          onMismatch();\n        }\n        break;\n      case Fragment:\n        if (!isFragmentStart) {\n          nextNode = onMismatch();\n        } else {\n          nextNode = hydrateFragment(\n            node,\n            vnode,\n            parentComponent,\n            parentSuspense,\n            slotScopeIds,\n            optimized\n          );\n        }\n        break;\n      default:\n        if (shapeFlag & 1) {\n          if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {\n            nextNode = onMismatch();\n          } else {\n            nextNode = hydrateElement(\n              node,\n              vnode,\n              parentComponent,\n              parentSuspense,\n              slotScopeIds,\n              optimized\n            );\n          }\n        } else if (shapeFlag & 6) {\n          vnode.slotScopeIds = slotScopeIds;\n          const container = parentNode(node);\n          if (isFragmentStart) {\n            nextNode = locateClosingAnchor(node);\n          } else if (isComment(node) && node.data === \"teleport start\") {\n            nextNode = locateClosingAnchor(node, node.data, \"teleport end\");\n          } else {\n            nextNode = nextSibling(node);\n          }\n          mountComponent(\n            vnode,\n            container,\n            null,\n            parentComponent,\n            parentSuspense,\n            getContainerType(container),\n            optimized\n          );\n          if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {\n            let subTree;\n            if (isFragmentStart) {\n              subTree = createVNode(Fragment);\n              subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;\n            } else {\n              subTree = node.nodeType === 3 ? createTextVNode(\"\") : createVNode(\"div\");\n            }\n            subTree.el = node;\n            vnode.component.subTree = subTree;\n          }\n        } else if (shapeFlag & 64) {\n          if (domType !== 8) {\n            nextNode = onMismatch();\n          } else {\n            nextNode = vnode.type.hydrate(\n              node,\n              vnode,\n              parentComponent,\n              parentSuspense,\n              slotScopeIds,\n              optimized,\n              rendererInternals,\n              hydrateChildren\n            );\n          }\n        } else if (shapeFlag & 128) {\n          nextNode = vnode.type.hydrate(\n            node,\n            vnode,\n            parentComponent,\n            parentSuspense,\n            getContainerType(parentNode(node)),\n            slotScopeIds,\n            optimized,\n            rendererInternals,\n            hydrateNode\n          );\n        } else ;\n    }\n    if (ref != null) {\n      setRef(ref, null, parentSuspense, vnode);\n    }\n    return nextNode;\n  };\n  const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {\n    optimized = optimized || !!vnode.dynamicChildren;\n    const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;\n    const forcePatch = type === \"input\" || type === \"option\";\n    if (forcePatch || patchFlag !== -1) {\n      if (dirs) {\n        invokeDirectiveHook(vnode, null, parentComponent, \"created\");\n      }\n      let needCallTransitionHooks = false;\n      if (isTemplateNode(el)) {\n        needCallTransitionHooks = needTransition(\n          null,\n          // no need check parentSuspense in hydration\n          transition\n        ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;\n        const content = el.content.firstChild;\n        if (needCallTransitionHooks) {\n          const cls = content.getAttribute(\"class\");\n          if (cls) content.$cls = cls;\n          transition.beforeEnter(content);\n        }\n        replaceNode(content, el, parentComponent);\n        vnode.el = el = content;\n      }\n      if (shapeFlag & 16 && // skip if element has innerHTML / textContent\n      !(props && (props.innerHTML || props.textContent))) {\n        let next = hydrateChildren(\n          el.firstChild,\n          vnode,\n          el,\n          parentComponent,\n          parentSuspense,\n          slotScopeIds,\n          optimized\n        );\n        while (next) {\n          if (!isMismatchAllowed(el, 1 /* CHILDREN */)) {\n            logMismatchError();\n          }\n          const cur = next;\n          next = next.nextSibling;\n          remove(cur);\n        }\n      } else if (shapeFlag & 8) {\n        let clientText = vnode.children;\n        if (clientText[0] === \"\\n\" && (el.tagName === \"PRE\" || el.tagName === \"TEXTAREA\")) {\n          clientText = clientText.slice(1);\n        }\n        if (el.textContent !== clientText) {\n          if (!isMismatchAllowed(el, 0 /* TEXT */)) {\n            logMismatchError();\n          }\n          el.textContent = vnode.children;\n        }\n      }\n      if (props) {\n        if (forcePatch || !optimized || patchFlag & (16 | 32)) {\n          const isCustomElement = el.tagName.includes(\"-\");\n          for (const key in props) {\n            if (forcePatch && (key.endsWith(\"value\") || key === \"indeterminate\") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers\n            key[0] === \".\" || isCustomElement) {\n              patchProp(el, key, null, props[key], void 0, parentComponent);\n            }\n          }\n        } else if (props.onClick) {\n          patchProp(\n            el,\n            \"onClick\",\n            null,\n            props.onClick,\n            void 0,\n            parentComponent\n          );\n        } else if (patchFlag & 4 && reactivity.isReactive(props.style)) {\n          for (const key in props.style) props.style[key];\n        }\n      }\n      let vnodeHooks;\n      if (vnodeHooks = props && props.onVnodeBeforeMount) {\n        invokeVNodeHook(vnodeHooks, parentComponent, vnode);\n      }\n      if (dirs) {\n        invokeDirectiveHook(vnode, null, parentComponent, \"beforeMount\");\n      }\n      if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {\n        queueEffectWithSuspense(() => {\n          vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);\n          needCallTransitionHooks && transition.enter(el);\n          dirs && invokeDirectiveHook(vnode, null, parentComponent, \"mounted\");\n        }, parentSuspense);\n      }\n    }\n    return el.nextSibling;\n  };\n  const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {\n    optimized = optimized || !!parentVNode.dynamicChildren;\n    const children = parentVNode.children;\n    const l = children.length;\n    for (let i = 0; i < l; i++) {\n      const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);\n      const isText = vnode.type === Text;\n      if (node) {\n        if (isText && !optimized) {\n          if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) {\n            insert(\n              createText(\n                node.data.slice(vnode.children.length)\n              ),\n              container,\n              nextSibling(node)\n            );\n            node.data = vnode.children;\n          }\n        }\n        node = hydrateNode(\n          node,\n          vnode,\n          parentComponent,\n          parentSuspense,\n          slotScopeIds,\n          optimized\n        );\n      } else if (isText && !vnode.children) {\n        insert(vnode.el = createText(\"\"), container);\n      } else {\n        if (!isMismatchAllowed(container, 1 /* CHILDREN */)) {\n          logMismatchError();\n        }\n        patch(\n          null,\n          vnode,\n          container,\n          null,\n          parentComponent,\n          parentSuspense,\n          getContainerType(container),\n          slotScopeIds\n        );\n      }\n    }\n    return node;\n  };\n  const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {\n    const { slotScopeIds: fragmentSlotScopeIds } = vnode;\n    if (fragmentSlotScopeIds) {\n      slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;\n    }\n    const container = parentNode(node);\n    const next = hydrateChildren(\n      nextSibling(node),\n      vnode,\n      container,\n      parentComponent,\n      parentSuspense,\n      slotScopeIds,\n      optimized\n    );\n    if (next && isComment(next) && next.data === \"]\") {\n      return nextSibling(vnode.anchor = next);\n    } else {\n      logMismatchError();\n      insert(vnode.anchor = createComment(`]`), container, next);\n      return next;\n    }\n  };\n  const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {\n    if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) {\n      logMismatchError();\n    }\n    vnode.el = null;\n    if (isFragment) {\n      const end = locateClosingAnchor(node);\n      while (true) {\n        const next2 = nextSibling(node);\n        if (next2 && next2 !== end) {\n          remove(next2);\n        } else {\n          break;\n        }\n      }\n    }\n    const next = nextSibling(node);\n    const container = parentNode(node);\n    remove(node);\n    patch(\n      null,\n      vnode,\n      container,\n      next,\n      parentComponent,\n      parentSuspense,\n      getContainerType(container),\n      slotScopeIds\n    );\n    if (parentComponent) {\n      parentComponent.vnode.el = vnode.el;\n      updateHOCHostEl(parentComponent, vnode.el);\n    }\n    return next;\n  };\n  const locateClosingAnchor = (node, open = \"[\", close = \"]\") => {\n    let match = 0;\n    while (node) {\n      node = nextSibling(node);\n      if (node && isComment(node)) {\n        if (node.data === open) match++;\n        if (node.data === close) {\n          if (match === 0) {\n            return nextSibling(node);\n          } else {\n            match--;\n          }\n        }\n      }\n    }\n    return node;\n  };\n  const replaceNode = (newNode, oldNode, parentComponent) => {\n    const parentNode2 = oldNode.parentNode;\n    if (parentNode2) {\n      parentNode2.replaceChild(newNode, oldNode);\n    }\n    let parent = parentComponent;\n    while (parent) {\n      if (parent.vnode.el === oldNode) {\n        parent.vnode.el = parent.subTree.el = newNode;\n      }\n      parent = parent.parent;\n    }\n  };\n  const isTemplateNode = (node) => {\n    return node.nodeType === 1 && node.tagName === \"TEMPLATE\";\n  };\n  return [hydrate, hydrateNode];\n}\nconst allowMismatchAttr = \"data-allow-mismatch\";\nconst MismatchTypeString = {\n  [0 /* TEXT */]: \"text\",\n  [1 /* CHILDREN */]: \"children\",\n  [2 /* CLASS */]: \"class\",\n  [3 /* STYLE */]: \"style\",\n  [4 /* ATTRIBUTE */]: \"attribute\"\n};\nfunction isMismatchAllowed(el, allowedType) {\n  if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) {\n    while (el && !el.hasAttribute(allowMismatchAttr)) {\n      el = el.parentElement;\n    }\n  }\n  const allowedAttr = el && el.getAttribute(allowMismatchAttr);\n  if (allowedAttr == null) {\n    return false;\n  } else if (allowedAttr === \"\") {\n    return true;\n  } else {\n    const list = allowedAttr.split(\",\");\n    if (allowedType === 0 /* TEXT */ && list.includes(\"children\")) {\n      return true;\n    }\n    return list.includes(MismatchTypeString[allowedType]);\n  }\n}\n\nconst requestIdleCallback = shared.getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));\nconst cancelIdleCallback = shared.getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));\nconst hydrateOnIdle = (timeout = 1e4) => (hydrate) => {\n  const id = requestIdleCallback(hydrate, { timeout });\n  return () => cancelIdleCallback(id);\n};\nfunction elementIsVisibleInViewport(el) {\n  const { top, left, bottom, right } = el.getBoundingClientRect();\n  const { innerHeight, innerWidth } = window;\n  return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth);\n}\nconst hydrateOnVisible = (opts) => (hydrate, forEach) => {\n  const ob = new IntersectionObserver((entries) => {\n    for (const e of entries) {\n      if (!e.isIntersecting) continue;\n      ob.disconnect();\n      hydrate();\n      break;\n    }\n  }, opts);\n  forEach((el) => {\n    if (!(el instanceof Element)) return;\n    if (elementIsVisibleInViewport(el)) {\n      hydrate();\n      ob.disconnect();\n      return false;\n    }\n    ob.observe(el);\n  });\n  return () => ob.disconnect();\n};\nconst hydrateOnMediaQuery = (query) => (hydrate) => {\n  if (query) {\n    const mql = matchMedia(query);\n    if (mql.matches) {\n      hydrate();\n    } else {\n      mql.addEventListener(\"change\", hydrate, { once: true });\n      return () => mql.removeEventListener(\"change\", hydrate);\n    }\n  }\n};\nconst hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {\n  if (shared.isString(interactions)) interactions = [interactions];\n  let hasHydrated = false;\n  const doHydrate = (e) => {\n    if (!hasHydrated) {\n      hasHydrated = true;\n      teardown();\n      hydrate();\n      e.target.dispatchEvent(new e.constructor(e.type, e));\n    }\n  };\n  const teardown = () => {\n    forEach((el) => {\n      for (const i of interactions) {\n        el.removeEventListener(i, doHydrate);\n      }\n    });\n  };\n  forEach((el) => {\n    for (const i of interactions) {\n      el.addEventListener(i, doHydrate, { once: true });\n    }\n  });\n  return teardown;\n};\nfunction forEachElement(node, cb) {\n  if (isComment(node) && node.data === \"[\") {\n    let depth = 1;\n    let next = node.nextSibling;\n    while (next) {\n      if (next.nodeType === 1) {\n        const result = cb(next);\n        if (result === false) {\n          break;\n        }\n      } else if (isComment(next)) {\n        if (next.data === \"]\") {\n          if (--depth === 0) break;\n        } else if (next.data === \"[\") {\n          depth++;\n        }\n      }\n      next = next.nextSibling;\n    }\n  } else {\n    cb(node);\n  }\n}\n\nconst isAsyncWrapper = (i) => !!i.type.__asyncLoader;\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineAsyncComponent(source) {\n  if (shared.isFunction(source)) {\n    source = { loader: source };\n  }\n  const {\n    loader,\n    loadingComponent,\n    errorComponent,\n    delay = 200,\n    hydrate: hydrateStrategy,\n    timeout,\n    // undefined = never times out\n    suspensible = true,\n    onError: userOnError\n  } = source;\n  let pendingRequest = null;\n  let resolvedComp;\n  let retries = 0;\n  const retry = () => {\n    retries++;\n    pendingRequest = null;\n    return load();\n  };\n  const load = () => {\n    let thisRequest;\n    return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {\n      err = err instanceof Error ? err : new Error(String(err));\n      if (userOnError) {\n        return new Promise((resolve, reject) => {\n          const userRetry = () => resolve(retry());\n          const userFail = () => reject(err);\n          userOnError(err, userRetry, userFail, retries + 1);\n        });\n      } else {\n        throw err;\n      }\n    }).then((comp) => {\n      if (thisRequest !== pendingRequest && pendingRequest) {\n        return pendingRequest;\n      }\n      if (comp && (comp.__esModule || comp[Symbol.toStringTag] === \"Module\")) {\n        comp = comp.default;\n      }\n      resolvedComp = comp;\n      return comp;\n    }));\n  };\n  return defineComponent({\n    name: \"AsyncComponentWrapper\",\n    __asyncLoader: load,\n    __asyncHydrate(el, instance, hydrate) {\n      let patched = false;\n      (instance.bu || (instance.bu = [])).push(() => patched = true);\n      const performHydrate = () => {\n        if (patched) {\n          return;\n        }\n        hydrate();\n      };\n      const doHydrate = hydrateStrategy ? () => {\n        const teardown = hydrateStrategy(\n          performHydrate,\n          (cb) => forEachElement(el, cb)\n        );\n        if (teardown) {\n          (instance.bum || (instance.bum = [])).push(teardown);\n        }\n      } : performHydrate;\n      if (resolvedComp) {\n        doHydrate();\n      } else {\n        load().then(() => !instance.isUnmounted && doHydrate());\n      }\n    },\n    get __asyncResolved() {\n      return resolvedComp;\n    },\n    setup() {\n      const instance = currentInstance;\n      markAsyncBoundary(instance);\n      if (resolvedComp) {\n        return () => createInnerComp(resolvedComp, instance);\n      }\n      const onError = (err) => {\n        pendingRequest = null;\n        handleError(\n          err,\n          instance,\n          13,\n          !errorComponent\n        );\n      };\n      if (suspensible && instance.suspense || isInSSRComponentSetup) {\n        return load().then((comp) => {\n          return () => createInnerComp(comp, instance);\n        }).catch((err) => {\n          onError(err);\n          return () => errorComponent ? createVNode(errorComponent, {\n            error: err\n          }) : null;\n        });\n      }\n      const loaded = reactivity.ref(false);\n      const error = reactivity.ref();\n      const delayed = reactivity.ref(!!delay);\n      if (delay) {\n        setTimeout(() => {\n          delayed.value = false;\n        }, delay);\n      }\n      if (timeout != null) {\n        setTimeout(() => {\n          if (!loaded.value && !error.value) {\n            const err = new Error(\n              `Async component timed out after ${timeout}ms.`\n            );\n            onError(err);\n            error.value = err;\n          }\n        }, timeout);\n      }\n      load().then(() => {\n        loaded.value = true;\n        if (instance.parent && isKeepAlive(instance.parent.vnode)) {\n          instance.parent.update();\n        }\n      }).catch((err) => {\n        onError(err);\n        error.value = err;\n      });\n      return () => {\n        if (loaded.value && resolvedComp) {\n          return createInnerComp(resolvedComp, instance);\n        } else if (error.value && errorComponent) {\n          return createVNode(errorComponent, {\n            error: error.value\n          });\n        } else if (loadingComponent && !delayed.value) {\n          return createVNode(loadingComponent);\n        }\n      };\n    }\n  });\n}\nfunction createInnerComp(comp, parent) {\n  const { ref: ref2, props, children, ce } = parent.vnode;\n  const vnode = createVNode(comp, props, children);\n  vnode.ref = ref2;\n  vnode.ce = ce;\n  delete parent.vnode.ce;\n  return vnode;\n}\n\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\nconst KeepAliveImpl = {\n  name: `KeepAlive`,\n  // Marker for special handling inside the renderer. We are not using a ===\n  // check directly on KeepAlive in the renderer, because importing it directly\n  // would prevent it from being tree-shaken.\n  __isKeepAlive: true,\n  props: {\n    include: [String, RegExp, Array],\n    exclude: [String, RegExp, Array],\n    max: [String, Number]\n  },\n  setup(props, { slots }) {\n    const instance = getCurrentInstance();\n    const sharedContext = instance.ctx;\n    if (!sharedContext.renderer) {\n      return () => {\n        const children = slots.default && slots.default();\n        return children && children.length === 1 ? children[0] : children;\n      };\n    }\n    const cache = /* @__PURE__ */ new Map();\n    const keys = /* @__PURE__ */ new Set();\n    let current = null;\n    const parentSuspense = instance.suspense;\n    const {\n      renderer: {\n        p: patch,\n        m: move,\n        um: _unmount,\n        o: { createElement }\n      }\n    } = sharedContext;\n    const storageContainer = createElement(\"div\");\n    sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {\n      const instance2 = vnode.component;\n      move(vnode, container, anchor, 0, parentSuspense);\n      patch(\n        instance2.vnode,\n        vnode,\n        container,\n        anchor,\n        instance2,\n        parentSuspense,\n        namespace,\n        vnode.slotScopeIds,\n        optimized\n      );\n      queuePostRenderEffect(() => {\n        instance2.isDeactivated = false;\n        if (instance2.a) {\n          shared.invokeArrayFns(instance2.a);\n        }\n        const vnodeHook = vnode.props && vnode.props.onVnodeMounted;\n        if (vnodeHook) {\n          invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n        }\n      }, parentSuspense);\n    };\n    sharedContext.deactivate = (vnode) => {\n      const instance2 = vnode.component;\n      invalidateMount(instance2.m);\n      invalidateMount(instance2.a);\n      move(vnode, storageContainer, null, 1, parentSuspense);\n      queuePostRenderEffect(() => {\n        if (instance2.da) {\n          shared.invokeArrayFns(instance2.da);\n        }\n        const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;\n        if (vnodeHook) {\n          invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n        }\n        instance2.isDeactivated = true;\n      }, parentSuspense);\n    };\n    function unmount(vnode) {\n      resetShapeFlag(vnode);\n      _unmount(vnode, instance, parentSuspense, true);\n    }\n    function pruneCache(filter) {\n      cache.forEach((vnode, key) => {\n        const name = getComponentName(vnode.type);\n        if (name && !filter(name)) {\n          pruneCacheEntry(key);\n        }\n      });\n    }\n    function pruneCacheEntry(key) {\n      const cached = cache.get(key);\n      if (cached && (!current || !isSameVNodeType(cached, current))) {\n        unmount(cached);\n      } else if (current) {\n        resetShapeFlag(current);\n      }\n      cache.delete(key);\n      keys.delete(key);\n    }\n    watch(\n      () => [props.include, props.exclude],\n      ([include, exclude]) => {\n        include && pruneCache((name) => matches(include, name));\n        exclude && pruneCache((name) => !matches(exclude, name));\n      },\n      // prune post-render after `current` has been updated\n      { flush: \"post\", deep: true }\n    );\n    let pendingCacheKey = null;\n    const cacheSubtree = () => {\n      if (pendingCacheKey != null) {\n        if (isSuspense(instance.subTree.type)) {\n          queuePostRenderEffect(() => {\n            cache.set(pendingCacheKey, getInnerChild(instance.subTree));\n          }, instance.subTree.suspense);\n        } else {\n          cache.set(pendingCacheKey, getInnerChild(instance.subTree));\n        }\n      }\n    };\n    onMounted(cacheSubtree);\n    onUpdated(cacheSubtree);\n    onBeforeUnmount(() => {\n      cache.forEach((cached) => {\n        const { subTree, suspense } = instance;\n        const vnode = getInnerChild(subTree);\n        if (cached.type === vnode.type && cached.key === vnode.key) {\n          resetShapeFlag(vnode);\n          const da = vnode.component.da;\n          da && queuePostRenderEffect(da, suspense);\n          return;\n        }\n        unmount(cached);\n      });\n    });\n    return () => {\n      pendingCacheKey = null;\n      if (!slots.default) {\n        return current = null;\n      }\n      const children = slots.default();\n      const rawVNode = children[0];\n      if (children.length > 1) {\n        current = null;\n        return children;\n      } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {\n        current = null;\n        return rawVNode;\n      }\n      let vnode = getInnerChild(rawVNode);\n      if (vnode.type === Comment) {\n        current = null;\n        return vnode;\n      }\n      const comp = vnode.type;\n      const name = getComponentName(\n        isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp\n      );\n      const { include, exclude, max } = props;\n      if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {\n        vnode.shapeFlag &= -257;\n        current = vnode;\n        return rawVNode;\n      }\n      const key = vnode.key == null ? comp : vnode.key;\n      const cachedVNode = cache.get(key);\n      if (vnode.el) {\n        vnode = cloneVNode(vnode);\n        if (rawVNode.shapeFlag & 128) {\n          rawVNode.ssContent = vnode;\n        }\n      }\n      pendingCacheKey = key;\n      if (cachedVNode) {\n        vnode.el = cachedVNode.el;\n        vnode.component = cachedVNode.component;\n        if (vnode.transition) {\n          setTransitionHooks(vnode, vnode.transition);\n        }\n        vnode.shapeFlag |= 512;\n        keys.delete(key);\n        keys.add(key);\n      } else {\n        keys.add(key);\n        if (max && keys.size > parseInt(max, 10)) {\n          pruneCacheEntry(keys.values().next().value);\n        }\n      }\n      vnode.shapeFlag |= 256;\n      current = vnode;\n      return isSuspense(rawVNode.type) ? rawVNode : vnode;\n    };\n  }\n};\nconst KeepAlive = KeepAliveImpl;\nfunction matches(pattern, name) {\n  if (shared.isArray(pattern)) {\n    return pattern.some((p) => matches(p, name));\n  } else if (shared.isString(pattern)) {\n    return pattern.split(\",\").includes(name);\n  } else if (shared.isRegExp(pattern)) {\n    pattern.lastIndex = 0;\n    return pattern.test(name);\n  }\n  return false;\n}\nfunction onActivated(hook, target) {\n  registerKeepAliveHook(hook, \"a\", target);\n}\nfunction onDeactivated(hook, target) {\n  registerKeepAliveHook(hook, \"da\", target);\n}\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\n  const wrappedHook = hook.__wdc || (hook.__wdc = () => {\n    let current = target;\n    while (current) {\n      if (current.isDeactivated) {\n        return;\n      }\n      current = current.parent;\n    }\n    return hook();\n  });\n  injectHook(type, wrappedHook, target);\n  if (target) {\n    let current = target.parent;\n    while (current && current.parent) {\n      if (isKeepAlive(current.parent.vnode)) {\n        injectToKeepAliveRoot(wrappedHook, type, target, current);\n      }\n      current = current.parent;\n    }\n  }\n}\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\n  const injected = injectHook(\n    type,\n    hook,\n    keepAliveRoot,\n    true\n    /* prepend */\n  );\n  onUnmounted(() => {\n    shared.remove(keepAliveRoot[type], injected);\n  }, target);\n}\nfunction resetShapeFlag(vnode) {\n  vnode.shapeFlag &= -257;\n  vnode.shapeFlag &= -513;\n}\nfunction getInnerChild(vnode) {\n  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;\n}\n\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\n  if (target) {\n    const hooks = target[type] || (target[type] = []);\n    const wrappedHook = hook.__weh || (hook.__weh = (...args) => {\n      reactivity.pauseTracking();\n      const reset = setCurrentInstance(target);\n      const res = callWithAsyncErrorHandling(hook, target, type, args);\n      reset();\n      reactivity.resetTracking();\n      return res;\n    });\n    if (prepend) {\n      hooks.unshift(wrappedHook);\n    } else {\n      hooks.push(wrappedHook);\n    }\n    return wrappedHook;\n  }\n}\nconst createHook = (lifecycle) => (hook, target = currentInstance) => {\n  if (!isInSSRComponentSetup || lifecycle === \"sp\") {\n    injectHook(lifecycle, (...args) => hook(...args), target);\n  }\n};\nconst onBeforeMount = createHook(\"bm\");\nconst onMounted = createHook(\"m\");\nconst onBeforeUpdate = createHook(\n  \"bu\"\n);\nconst onUpdated = createHook(\"u\");\nconst onBeforeUnmount = createHook(\n  \"bum\"\n);\nconst onUnmounted = createHook(\"um\");\nconst onServerPrefetch = createHook(\n  \"sp\"\n);\nconst onRenderTriggered = createHook(\"rtg\");\nconst onRenderTracked = createHook(\"rtc\");\nfunction onErrorCaptured(hook, target = currentInstance) {\n  injectHook(\"ec\", hook, target);\n}\n\nconst COMPONENTS = \"components\";\nconst DIRECTIVES = \"directives\";\nfunction resolveComponent(name, maybeSelfReference) {\n  return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;\n}\nconst NULL_DYNAMIC_COMPONENT = Symbol.for(\"v-ndc\");\nfunction resolveDynamicComponent(component) {\n  if (shared.isString(component)) {\n    return resolveAsset(COMPONENTS, component, false) || component;\n  } else {\n    return component || NULL_DYNAMIC_COMPONENT;\n  }\n}\nfunction resolveDirective(name) {\n  return resolveAsset(DIRECTIVES, name);\n}\nfunction resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {\n  const instance = currentRenderingInstance || currentInstance;\n  if (instance) {\n    const Component = instance.type;\n    if (type === COMPONENTS) {\n      const selfName = getComponentName(\n        Component,\n        false\n      );\n      if (selfName && (selfName === name || selfName === shared.camelize(name) || selfName === shared.capitalize(shared.camelize(name)))) {\n        return Component;\n      }\n    }\n    const res = (\n      // local registration\n      // check instance[type] first which is resolved for options API\n      resolve(instance[type] || Component[type], name) || // global registration\n      resolve(instance.appContext[type], name)\n    );\n    if (!res && maybeSelfReference) {\n      return Component;\n    }\n    return res;\n  }\n}\nfunction resolve(registry, name) {\n  return registry && (registry[name] || registry[shared.camelize(name)] || registry[shared.capitalize(shared.camelize(name))]);\n}\n\nfunction renderList(source, renderItem, cache, index) {\n  let ret;\n  const cached = cache && cache[index];\n  const sourceIsArray = shared.isArray(source);\n  if (sourceIsArray || shared.isString(source)) {\n    const sourceIsReactiveArray = sourceIsArray && reactivity.isReactive(source);\n    let needsWrap = false;\n    let isReadonlySource = false;\n    if (sourceIsReactiveArray) {\n      needsWrap = !reactivity.isShallow(source);\n      isReadonlySource = reactivity.isReadonly(source);\n      source = reactivity.shallowReadArray(source);\n    }\n    ret = new Array(source.length);\n    for (let i = 0, l = source.length; i < l; i++) {\n      ret[i] = renderItem(\n        needsWrap ? isReadonlySource ? reactivity.toReadonly(reactivity.toReactive(source[i])) : reactivity.toReactive(source[i]) : source[i],\n        i,\n        void 0,\n        cached && cached[i]\n      );\n    }\n  } else if (typeof source === \"number\") {\n    ret = new Array(source);\n    for (let i = 0; i < source; i++) {\n      ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);\n    }\n  } else if (shared.isObject(source)) {\n    if (source[Symbol.iterator]) {\n      ret = Array.from(\n        source,\n        (item, i) => renderItem(item, i, void 0, cached && cached[i])\n      );\n    } else {\n      const keys = Object.keys(source);\n      ret = new Array(keys.length);\n      for (let i = 0, l = keys.length; i < l; i++) {\n        const key = keys[i];\n        ret[i] = renderItem(source[key], key, i, cached && cached[i]);\n      }\n    }\n  } else {\n    ret = [];\n  }\n  if (cache) {\n    cache[index] = ret;\n  }\n  return ret;\n}\n\nfunction createSlots(slots, dynamicSlots) {\n  for (let i = 0; i < dynamicSlots.length; i++) {\n    const slot = dynamicSlots[i];\n    if (shared.isArray(slot)) {\n      for (let j = 0; j < slot.length; j++) {\n        slots[slot[j].name] = slot[j].fn;\n      }\n    } else if (slot) {\n      slots[slot.name] = slot.key ? (...args) => {\n        const res = slot.fn(...args);\n        if (res) res.key = slot.key;\n        return res;\n      } : slot.fn;\n    }\n  }\n  return slots;\n}\n\nfunction renderSlot(slots, name, props = {}, fallback, noSlotted) {\n  if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {\n    if (name !== \"default\") props.name = name;\n    return openBlock(), createBlock(\n      Fragment,\n      null,\n      [createVNode(\"slot\", props, fallback && fallback())],\n      64\n    );\n  }\n  let slot = slots[name];\n  if (slot && slot._c) {\n    slot._d = false;\n  }\n  openBlock();\n  const validSlotContent = slot && ensureValidVNode(slot(props));\n  const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch\n  // key attached in the `createSlots` helper, respect that\n  validSlotContent && validSlotContent.key;\n  const rendered = createBlock(\n    Fragment,\n    {\n      key: (slotKey && !shared.isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content\n      (!validSlotContent && fallback ? \"_fb\" : \"\")\n    },\n    validSlotContent || (fallback ? fallback() : []),\n    validSlotContent && slots._ === 1 ? 64 : -2\n  );\n  if (!noSlotted && rendered.scopeId) {\n    rendered.slotScopeIds = [rendered.scopeId + \"-s\"];\n  }\n  if (slot && slot._c) {\n    slot._d = true;\n  }\n  return rendered;\n}\nfunction ensureValidVNode(vnodes) {\n  return vnodes.some((child) => {\n    if (!isVNode(child)) return true;\n    if (child.type === Comment) return false;\n    if (child.type === Fragment && !ensureValidVNode(child.children))\n      return false;\n    return true;\n  }) ? vnodes : null;\n}\n\nfunction toHandlers(obj, preserveCaseIfNecessary) {\n  const ret = {};\n  for (const key in obj) {\n    ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : shared.toHandlerKey(key)] = obj[key];\n  }\n  return ret;\n}\n\nconst getPublicInstance = (i) => {\n  if (!i) return null;\n  if (isStatefulComponent(i)) return getComponentPublicInstance(i);\n  return getPublicInstance(i.parent);\n};\nconst publicPropertiesMap = (\n  // Move PURE marker to new line to workaround compiler discarding it\n  // due to type annotation\n  /* @__PURE__ */ shared.extend(/* @__PURE__ */ Object.create(null), {\n    $: (i) => i,\n    $el: (i) => i.vnode.el,\n    $data: (i) => i.data,\n    $props: (i) => i.props,\n    $attrs: (i) => i.attrs,\n    $slots: (i) => i.slots,\n    $refs: (i) => i.refs,\n    $parent: (i) => getPublicInstance(i.parent),\n    $root: (i) => getPublicInstance(i.root),\n    $host: (i) => i.ce,\n    $emit: (i) => i.emit,\n    $options: (i) => resolveMergedOptions(i) ,\n    $forceUpdate: (i) => i.f || (i.f = () => {\n      queueJob(i.update);\n    }),\n    $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),\n    $watch: (i) => instanceWatch.bind(i) \n  })\n);\nconst hasSetupBinding = (state, key) => state !== shared.EMPTY_OBJ && !state.__isScriptSetup && shared.hasOwn(state, key);\nconst PublicInstanceProxyHandlers = {\n  get({ _: instance }, key) {\n    if (key === \"__v_skip\") {\n      return true;\n    }\n    const { ctx, setupState, data, props, accessCache, type, appContext } = instance;\n    let normalizedProps;\n    if (key[0] !== \"$\") {\n      const n = accessCache[key];\n      if (n !== void 0) {\n        switch (n) {\n          case 1 /* SETUP */:\n            return setupState[key];\n          case 2 /* DATA */:\n            return data[key];\n          case 4 /* CONTEXT */:\n            return ctx[key];\n          case 3 /* PROPS */:\n            return props[key];\n        }\n      } else if (hasSetupBinding(setupState, key)) {\n        accessCache[key] = 1 /* SETUP */;\n        return setupState[key];\n      } else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) {\n        accessCache[key] = 2 /* DATA */;\n        return data[key];\n      } else if (\n        // only cache other properties when instance has declared (thus stable)\n        // props\n        (normalizedProps = instance.propsOptions[0]) && shared.hasOwn(normalizedProps, key)\n      ) {\n        accessCache[key] = 3 /* PROPS */;\n        return props[key];\n      } else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) {\n        accessCache[key] = 4 /* CONTEXT */;\n        return ctx[key];\n      } else if (shouldCacheAccess) {\n        accessCache[key] = 0 /* OTHER */;\n      }\n    }\n    const publicGetter = publicPropertiesMap[key];\n    let cssModule, globalProperties;\n    if (publicGetter) {\n      if (key === \"$attrs\") {\n        reactivity.track(instance.attrs, \"get\", \"\");\n      }\n      return publicGetter(instance);\n    } else if (\n      // css module (injected by vue-loader)\n      (cssModule = type.__cssModules) && (cssModule = cssModule[key])\n    ) {\n      return cssModule;\n    } else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) {\n      accessCache[key] = 4 /* CONTEXT */;\n      return ctx[key];\n    } else if (\n      // global properties\n      globalProperties = appContext.config.globalProperties, shared.hasOwn(globalProperties, key)\n    ) {\n      {\n        return globalProperties[key];\n      }\n    } else ;\n  },\n  set({ _: instance }, key, value) {\n    const { data, setupState, ctx } = instance;\n    if (hasSetupBinding(setupState, key)) {\n      setupState[key] = value;\n      return true;\n    } else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) {\n      data[key] = value;\n      return true;\n    } else if (shared.hasOwn(instance.props, key)) {\n      return false;\n    }\n    if (key[0] === \"$\" && key.slice(1) in instance) {\n      return false;\n    } else {\n      {\n        ctx[key] = value;\n      }\n    }\n    return true;\n  },\n  has({\n    _: { data, setupState, accessCache, ctx, appContext, propsOptions }\n  }, key) {\n    let normalizedProps;\n    return !!accessCache[key] || data !== shared.EMPTY_OBJ && shared.hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key) || shared.hasOwn(ctx, key) || shared.hasOwn(publicPropertiesMap, key) || shared.hasOwn(appContext.config.globalProperties, key);\n  },\n  defineProperty(target, key, descriptor) {\n    if (descriptor.get != null) {\n      target._.accessCache[key] = 0;\n    } else if (shared.hasOwn(descriptor, \"value\")) {\n      this.set(target, key, descriptor.value, null);\n    }\n    return Reflect.defineProperty(target, key, descriptor);\n  }\n};\nconst RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ shared.extend({}, PublicInstanceProxyHandlers, {\n  get(target, key) {\n    if (key === Symbol.unscopables) {\n      return;\n    }\n    return PublicInstanceProxyHandlers.get(target, key, target);\n  },\n  has(_, key) {\n    const has = key[0] !== \"_\" && !shared.isGloballyAllowed(key);\n    return has;\n  }\n});\n\nfunction defineProps() {\n  return null;\n}\nfunction defineEmits() {\n  return null;\n}\nfunction defineExpose(exposed) {\n}\nfunction defineOptions(options) {\n}\nfunction defineSlots() {\n  return null;\n}\nfunction defineModel() {\n}\nfunction withDefaults(props, defaults) {\n  return null;\n}\nfunction useSlots() {\n  return getContext().slots;\n}\nfunction useAttrs() {\n  return getContext().attrs;\n}\nfunction getContext(calledFunctionName) {\n  const i = getCurrentInstance();\n  return i.setupContext || (i.setupContext = createSetupContext(i));\n}\nfunction normalizePropsOrEmits(props) {\n  return shared.isArray(props) ? props.reduce(\n    (normalized, p) => (normalized[p] = null, normalized),\n    {}\n  ) : props;\n}\nfunction mergeDefaults(raw, defaults) {\n  const props = normalizePropsOrEmits(raw);\n  for (const key in defaults) {\n    if (key.startsWith(\"__skip\")) continue;\n    let opt = props[key];\n    if (opt) {\n      if (shared.isArray(opt) || shared.isFunction(opt)) {\n        opt = props[key] = { type: opt, default: defaults[key] };\n      } else {\n        opt.default = defaults[key];\n      }\n    } else if (opt === null) {\n      opt = props[key] = { default: defaults[key] };\n    } else ;\n    if (opt && defaults[`__skip_${key}`]) {\n      opt.skipFactory = true;\n    }\n  }\n  return props;\n}\nfunction mergeModels(a, b) {\n  if (!a || !b) return a || b;\n  if (shared.isArray(a) && shared.isArray(b)) return a.concat(b);\n  return shared.extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));\n}\nfunction createPropsRestProxy(props, excludedKeys) {\n  const ret = {};\n  for (const key in props) {\n    if (!excludedKeys.includes(key)) {\n      Object.defineProperty(ret, key, {\n        enumerable: true,\n        get: () => props[key]\n      });\n    }\n  }\n  return ret;\n}\nfunction withAsyncContext(getAwaitable) {\n  const ctx = getCurrentInstance();\n  let awaitable = getAwaitable();\n  unsetCurrentInstance();\n  if (shared.isPromise(awaitable)) {\n    awaitable = awaitable.catch((e) => {\n      setCurrentInstance(ctx);\n      throw e;\n    });\n  }\n  return [awaitable, () => setCurrentInstance(ctx)];\n}\n\nlet shouldCacheAccess = true;\nfunction applyOptions(instance) {\n  const options = resolveMergedOptions(instance);\n  const publicThis = instance.proxy;\n  const ctx = instance.ctx;\n  shouldCacheAccess = false;\n  if (options.beforeCreate) {\n    callHook(options.beforeCreate, instance, \"bc\");\n  }\n  const {\n    // state\n    data: dataOptions,\n    computed: computedOptions,\n    methods,\n    watch: watchOptions,\n    provide: provideOptions,\n    inject: injectOptions,\n    // lifecycle\n    created,\n    beforeMount,\n    mounted,\n    beforeUpdate,\n    updated,\n    activated,\n    deactivated,\n    beforeDestroy,\n    beforeUnmount,\n    destroyed,\n    unmounted,\n    render,\n    renderTracked,\n    renderTriggered,\n    errorCaptured,\n    serverPrefetch,\n    // public API\n    expose,\n    inheritAttrs,\n    // assets\n    components,\n    directives,\n    filters\n  } = options;\n  const checkDuplicateProperties = null;\n  if (injectOptions) {\n    resolveInjections(injectOptions, ctx, checkDuplicateProperties);\n  }\n  if (methods) {\n    for (const key in methods) {\n      const methodHandler = methods[key];\n      if (shared.isFunction(methodHandler)) {\n        {\n          ctx[key] = methodHandler.bind(publicThis);\n        }\n      }\n    }\n  }\n  if (dataOptions) {\n    const data = dataOptions.call(publicThis, publicThis);\n    if (!shared.isObject(data)) ; else {\n      instance.data = reactivity.reactive(data);\n    }\n  }\n  shouldCacheAccess = true;\n  if (computedOptions) {\n    for (const key in computedOptions) {\n      const opt = computedOptions[key];\n      const get = shared.isFunction(opt) ? opt.bind(publicThis, publicThis) : shared.isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : shared.NOOP;\n      const set = !shared.isFunction(opt) && shared.isFunction(opt.set) ? opt.set.bind(publicThis) : shared.NOOP;\n      const c = computed({\n        get,\n        set\n      });\n      Object.defineProperty(ctx, key, {\n        enumerable: true,\n        configurable: true,\n        get: () => c.value,\n        set: (v) => c.value = v\n      });\n    }\n  }\n  if (watchOptions) {\n    for (const key in watchOptions) {\n      createWatcher(watchOptions[key], ctx, publicThis, key);\n    }\n  }\n  if (provideOptions) {\n    const provides = shared.isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;\n    Reflect.ownKeys(provides).forEach((key) => {\n      provide(key, provides[key]);\n    });\n  }\n  if (created) {\n    callHook(created, instance, \"c\");\n  }\n  function registerLifecycleHook(register, hook) {\n    if (shared.isArray(hook)) {\n      hook.forEach((_hook) => register(_hook.bind(publicThis)));\n    } else if (hook) {\n      register(hook.bind(publicThis));\n    }\n  }\n  registerLifecycleHook(onBeforeMount, beforeMount);\n  registerLifecycleHook(onMounted, mounted);\n  registerLifecycleHook(onBeforeUpdate, beforeUpdate);\n  registerLifecycleHook(onUpdated, updated);\n  registerLifecycleHook(onActivated, activated);\n  registerLifecycleHook(onDeactivated, deactivated);\n  registerLifecycleHook(onErrorCaptured, errorCaptured);\n  registerLifecycleHook(onRenderTracked, renderTracked);\n  registerLifecycleHook(onRenderTriggered, renderTriggered);\n  registerLifecycleHook(onBeforeUnmount, beforeUnmount);\n  registerLifecycleHook(onUnmounted, unmounted);\n  registerLifecycleHook(onServerPrefetch, serverPrefetch);\n  if (shared.isArray(expose)) {\n    if (expose.length) {\n      const exposed = instance.exposed || (instance.exposed = {});\n      expose.forEach((key) => {\n        Object.defineProperty(exposed, key, {\n          get: () => publicThis[key],\n          set: (val) => publicThis[key] = val,\n          enumerable: true\n        });\n      });\n    } else if (!instance.exposed) {\n      instance.exposed = {};\n    }\n  }\n  if (render && instance.render === shared.NOOP) {\n    instance.render = render;\n  }\n  if (inheritAttrs != null) {\n    instance.inheritAttrs = inheritAttrs;\n  }\n  if (components) instance.components = components;\n  if (directives) instance.directives = directives;\n  if (serverPrefetch) {\n    markAsyncBoundary(instance);\n  }\n}\nfunction resolveInjections(injectOptions, ctx, checkDuplicateProperties = shared.NOOP) {\n  if (shared.isArray(injectOptions)) {\n    injectOptions = normalizeInject(injectOptions);\n  }\n  for (const key in injectOptions) {\n    const opt = injectOptions[key];\n    let injected;\n    if (shared.isObject(opt)) {\n      if (\"default\" in opt) {\n        injected = inject(\n          opt.from || key,\n          opt.default,\n          true\n        );\n      } else {\n        injected = inject(opt.from || key);\n      }\n    } else {\n      injected = inject(opt);\n    }\n    if (reactivity.isRef(injected)) {\n      Object.defineProperty(ctx, key, {\n        enumerable: true,\n        configurable: true,\n        get: () => injected.value,\n        set: (v) => injected.value = v\n      });\n    } else {\n      ctx[key] = injected;\n    }\n  }\n}\nfunction callHook(hook, instance, type) {\n  callWithAsyncErrorHandling(\n    shared.isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy),\n    instance,\n    type\n  );\n}\nfunction createWatcher(raw, ctx, publicThis, key) {\n  let getter = key.includes(\".\") ? createPathGetter(publicThis, key) : () => publicThis[key];\n  if (shared.isString(raw)) {\n    const handler = ctx[raw];\n    if (shared.isFunction(handler)) {\n      {\n        watch(getter, handler);\n      }\n    }\n  } else if (shared.isFunction(raw)) {\n    {\n      watch(getter, raw.bind(publicThis));\n    }\n  } else if (shared.isObject(raw)) {\n    if (shared.isArray(raw)) {\n      raw.forEach((r) => createWatcher(r, ctx, publicThis, key));\n    } else {\n      const handler = shared.isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];\n      if (shared.isFunction(handler)) {\n        watch(getter, handler, raw);\n      }\n    }\n  } else ;\n}\nfunction resolveMergedOptions(instance) {\n  const base = instance.type;\n  const { mixins, extends: extendsOptions } = base;\n  const {\n    mixins: globalMixins,\n    optionsCache: cache,\n    config: { optionMergeStrategies }\n  } = instance.appContext;\n  const cached = cache.get(base);\n  let resolved;\n  if (cached) {\n    resolved = cached;\n  } else if (!globalMixins.length && !mixins && !extendsOptions) {\n    {\n      resolved = base;\n    }\n  } else {\n    resolved = {};\n    if (globalMixins.length) {\n      globalMixins.forEach(\n        (m) => mergeOptions(resolved, m, optionMergeStrategies, true)\n      );\n    }\n    mergeOptions(resolved, base, optionMergeStrategies);\n  }\n  if (shared.isObject(base)) {\n    cache.set(base, resolved);\n  }\n  return resolved;\n}\nfunction mergeOptions(to, from, strats, asMixin = false) {\n  const { mixins, extends: extendsOptions } = from;\n  if (extendsOptions) {\n    mergeOptions(to, extendsOptions, strats, true);\n  }\n  if (mixins) {\n    mixins.forEach(\n      (m) => mergeOptions(to, m, strats, true)\n    );\n  }\n  for (const key in from) {\n    if (asMixin && key === \"expose\") ; else {\n      const strat = internalOptionMergeStrats[key] || strats && strats[key];\n      to[key] = strat ? strat(to[key], from[key]) : from[key];\n    }\n  }\n  return to;\n}\nconst internalOptionMergeStrats = {\n  data: mergeDataFn,\n  props: mergeEmitsOrPropsOptions,\n  emits: mergeEmitsOrPropsOptions,\n  // objects\n  methods: mergeObjectOptions,\n  computed: mergeObjectOptions,\n  // lifecycle\n  beforeCreate: mergeAsArray,\n  created: mergeAsArray,\n  beforeMount: mergeAsArray,\n  mounted: mergeAsArray,\n  beforeUpdate: mergeAsArray,\n  updated: mergeAsArray,\n  beforeDestroy: mergeAsArray,\n  beforeUnmount: mergeAsArray,\n  destroyed: mergeAsArray,\n  unmounted: mergeAsArray,\n  activated: mergeAsArray,\n  deactivated: mergeAsArray,\n  errorCaptured: mergeAsArray,\n  serverPrefetch: mergeAsArray,\n  // assets\n  components: mergeObjectOptions,\n  directives: mergeObjectOptions,\n  // watch\n  watch: mergeWatchOptions,\n  // provide / inject\n  provide: mergeDataFn,\n  inject: mergeInject\n};\nfunction mergeDataFn(to, from) {\n  if (!from) {\n    return to;\n  }\n  if (!to) {\n    return from;\n  }\n  return function mergedDataFn() {\n    return (shared.extend)(\n      shared.isFunction(to) ? to.call(this, this) : to,\n      shared.isFunction(from) ? from.call(this, this) : from\n    );\n  };\n}\nfunction mergeInject(to, from) {\n  return mergeObjectOptions(normalizeInject(to), normalizeInject(from));\n}\nfunction normalizeInject(raw) {\n  if (shared.isArray(raw)) {\n    const res = {};\n    for (let i = 0; i < raw.length; i++) {\n      res[raw[i]] = raw[i];\n    }\n    return res;\n  }\n  return raw;\n}\nfunction mergeAsArray(to, from) {\n  return to ? [...new Set([].concat(to, from))] : from;\n}\nfunction mergeObjectOptions(to, from) {\n  return to ? shared.extend(/* @__PURE__ */ Object.create(null), to, from) : from;\n}\nfunction mergeEmitsOrPropsOptions(to, from) {\n  if (to) {\n    if (shared.isArray(to) && shared.isArray(from)) {\n      return [.../* @__PURE__ */ new Set([...to, ...from])];\n    }\n    return shared.extend(\n      /* @__PURE__ */ Object.create(null),\n      normalizePropsOrEmits(to),\n      normalizePropsOrEmits(from != null ? from : {})\n    );\n  } else {\n    return from;\n  }\n}\nfunction mergeWatchOptions(to, from) {\n  if (!to) return from;\n  if (!from) return to;\n  const merged = shared.extend(/* @__PURE__ */ Object.create(null), to);\n  for (const key in from) {\n    merged[key] = mergeAsArray(to[key], from[key]);\n  }\n  return merged;\n}\n\nfunction createAppContext() {\n  return {\n    app: null,\n    config: {\n      isNativeTag: shared.NO,\n      performance: false,\n      globalProperties: {},\n      optionMergeStrategies: {},\n      errorHandler: void 0,\n      warnHandler: void 0,\n      compilerOptions: {}\n    },\n    mixins: [],\n    components: {},\n    directives: {},\n    provides: /* @__PURE__ */ Object.create(null),\n    optionsCache: /* @__PURE__ */ new WeakMap(),\n    propsCache: /* @__PURE__ */ new WeakMap(),\n    emitsCache: /* @__PURE__ */ new WeakMap()\n  };\n}\nlet uid$1 = 0;\nfunction createAppAPI(render, hydrate) {\n  return function createApp(rootComponent, rootProps = null) {\n    if (!shared.isFunction(rootComponent)) {\n      rootComponent = shared.extend({}, rootComponent);\n    }\n    if (rootProps != null && !shared.isObject(rootProps)) {\n      rootProps = null;\n    }\n    const context = createAppContext();\n    const installedPlugins = /* @__PURE__ */ new WeakSet();\n    const pluginCleanupFns = [];\n    let isMounted = false;\n    const app = context.app = {\n      _uid: uid$1++,\n      _component: rootComponent,\n      _props: rootProps,\n      _container: null,\n      _context: context,\n      _instance: null,\n      version,\n      get config() {\n        return context.config;\n      },\n      set config(v) {\n      },\n      use(plugin, ...options) {\n        if (installedPlugins.has(plugin)) ; else if (plugin && shared.isFunction(plugin.install)) {\n          installedPlugins.add(plugin);\n          plugin.install(app, ...options);\n        } else if (shared.isFunction(plugin)) {\n          installedPlugins.add(plugin);\n          plugin(app, ...options);\n        } else ;\n        return app;\n      },\n      mixin(mixin) {\n        {\n          if (!context.mixins.includes(mixin)) {\n            context.mixins.push(mixin);\n          }\n        }\n        return app;\n      },\n      component(name, component) {\n        if (!component) {\n          return context.components[name];\n        }\n        context.components[name] = component;\n        return app;\n      },\n      directive(name, directive) {\n        if (!directive) {\n          return context.directives[name];\n        }\n        context.directives[name] = directive;\n        return app;\n      },\n      mount(rootContainer, isHydrate, namespace) {\n        if (!isMounted) {\n          const vnode = app._ceVNode || createVNode(rootComponent, rootProps);\n          vnode.appContext = context;\n          if (namespace === true) {\n            namespace = \"svg\";\n          } else if (namespace === false) {\n            namespace = void 0;\n          }\n          if (isHydrate && hydrate) {\n            hydrate(vnode, rootContainer);\n          } else {\n            render(vnode, rootContainer, namespace);\n          }\n          isMounted = true;\n          app._container = rootContainer;\n          rootContainer.__vue_app__ = app;\n          return getComponentPublicInstance(vnode.component);\n        }\n      },\n      onUnmount(cleanupFn) {\n        pluginCleanupFns.push(cleanupFn);\n      },\n      unmount() {\n        if (isMounted) {\n          callWithAsyncErrorHandling(\n            pluginCleanupFns,\n            app._instance,\n            16\n          );\n          render(null, app._container);\n          delete app._container.__vue_app__;\n        }\n      },\n      provide(key, value) {\n        context.provides[key] = value;\n        return app;\n      },\n      runWithContext(fn) {\n        const lastApp = currentApp;\n        currentApp = app;\n        try {\n          return fn();\n        } finally {\n          currentApp = lastApp;\n        }\n      }\n    };\n    return app;\n  };\n}\nlet currentApp = null;\n\nfunction provide(key, value) {\n  if (!currentInstance) ; else {\n    let provides = currentInstance.provides;\n    const parentProvides = currentInstance.parent && currentInstance.parent.provides;\n    if (parentProvides === provides) {\n      provides = currentInstance.provides = Object.create(parentProvides);\n    }\n    provides[key] = value;\n  }\n}\nfunction inject(key, defaultValue, treatDefaultAsFactory = false) {\n  const instance = getCurrentInstance();\n  if (instance || currentApp) {\n    let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;\n    if (provides && key in provides) {\n      return provides[key];\n    } else if (arguments.length > 1) {\n      return treatDefaultAsFactory && shared.isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;\n    } else ;\n  }\n}\nfunction hasInjectionContext() {\n  return !!(getCurrentInstance() || currentApp);\n}\n\nconst internalObjectProto = {};\nconst createInternalObject = () => Object.create(internalObjectProto);\nconst isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;\n\nfunction initProps(instance, rawProps, isStateful, isSSR = false) {\n  const props = {};\n  const attrs = createInternalObject();\n  instance.propsDefaults = /* @__PURE__ */ Object.create(null);\n  setFullProps(instance, rawProps, props, attrs);\n  for (const key in instance.propsOptions[0]) {\n    if (!(key in props)) {\n      props[key] = void 0;\n    }\n  }\n  if (isStateful) {\n    instance.props = isSSR ? props : reactivity.shallowReactive(props);\n  } else {\n    if (!instance.type.props) {\n      instance.props = attrs;\n    } else {\n      instance.props = props;\n    }\n  }\n  instance.attrs = attrs;\n}\nfunction updateProps(instance, rawProps, rawPrevProps, optimized) {\n  const {\n    props,\n    attrs,\n    vnode: { patchFlag }\n  } = instance;\n  const rawCurrentProps = reactivity.toRaw(props);\n  const [options] = instance.propsOptions;\n  let hasAttrsChanged = false;\n  if (\n    // always force full diff in dev\n    // - #1942 if hmr is enabled with sfc component\n    // - vite#872 non-sfc component used by sfc component\n    (optimized || patchFlag > 0) && !(patchFlag & 16)\n  ) {\n    if (patchFlag & 8) {\n      const propsToUpdate = instance.vnode.dynamicProps;\n      for (let i = 0; i < propsToUpdate.length; i++) {\n        let key = propsToUpdate[i];\n        if (isEmitListener(instance.emitsOptions, key)) {\n          continue;\n        }\n        const value = rawProps[key];\n        if (options) {\n          if (shared.hasOwn(attrs, key)) {\n            if (value !== attrs[key]) {\n              attrs[key] = value;\n              hasAttrsChanged = true;\n            }\n          } else {\n            const camelizedKey = shared.camelize(key);\n            props[camelizedKey] = resolvePropValue(\n              options,\n              rawCurrentProps,\n              camelizedKey,\n              value,\n              instance,\n              false\n            );\n          }\n        } else {\n          if (value !== attrs[key]) {\n            attrs[key] = value;\n            hasAttrsChanged = true;\n          }\n        }\n      }\n    }\n  } else {\n    if (setFullProps(instance, rawProps, props, attrs)) {\n      hasAttrsChanged = true;\n    }\n    let kebabKey;\n    for (const key in rawCurrentProps) {\n      if (!rawProps || // for camelCase\n      !shared.hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case\n      // and converted to camelCase (#955)\n      ((kebabKey = shared.hyphenate(key)) === key || !shared.hasOwn(rawProps, kebabKey))) {\n        if (options) {\n          if (rawPrevProps && // for camelCase\n          (rawPrevProps[key] !== void 0 || // for kebab-case\n          rawPrevProps[kebabKey] !== void 0)) {\n            props[key] = resolvePropValue(\n              options,\n              rawCurrentProps,\n              key,\n              void 0,\n              instance,\n              true\n            );\n          }\n        } else {\n          delete props[key];\n        }\n      }\n    }\n    if (attrs !== rawCurrentProps) {\n      for (const key in attrs) {\n        if (!rawProps || !shared.hasOwn(rawProps, key) && true) {\n          delete attrs[key];\n          hasAttrsChanged = true;\n        }\n      }\n    }\n  }\n  if (hasAttrsChanged) {\n    reactivity.trigger(instance.attrs, \"set\", \"\");\n  }\n}\nfunction setFullProps(instance, rawProps, props, attrs) {\n  const [options, needCastKeys] = instance.propsOptions;\n  let hasAttrsChanged = false;\n  let rawCastValues;\n  if (rawProps) {\n    for (let key in rawProps) {\n      if (shared.isReservedProp(key)) {\n        continue;\n      }\n      const value = rawProps[key];\n      let camelKey;\n      if (options && shared.hasOwn(options, camelKey = shared.camelize(key))) {\n        if (!needCastKeys || !needCastKeys.includes(camelKey)) {\n          props[camelKey] = value;\n        } else {\n          (rawCastValues || (rawCastValues = {}))[camelKey] = value;\n        }\n      } else if (!isEmitListener(instance.emitsOptions, key)) {\n        if (!(key in attrs) || value !== attrs[key]) {\n          attrs[key] = value;\n          hasAttrsChanged = true;\n        }\n      }\n    }\n  }\n  if (needCastKeys) {\n    const rawCurrentProps = reactivity.toRaw(props);\n    const castValues = rawCastValues || shared.EMPTY_OBJ;\n    for (let i = 0; i < needCastKeys.length; i++) {\n      const key = needCastKeys[i];\n      props[key] = resolvePropValue(\n        options,\n        rawCurrentProps,\n        key,\n        castValues[key],\n        instance,\n        !shared.hasOwn(castValues, key)\n      );\n    }\n  }\n  return hasAttrsChanged;\n}\nfunction resolvePropValue(options, props, key, value, instance, isAbsent) {\n  const opt = options[key];\n  if (opt != null) {\n    const hasDefault = shared.hasOwn(opt, \"default\");\n    if (hasDefault && value === void 0) {\n      const defaultValue = opt.default;\n      if (opt.type !== Function && !opt.skipFactory && shared.isFunction(defaultValue)) {\n        const { propsDefaults } = instance;\n        if (key in propsDefaults) {\n          value = propsDefaults[key];\n        } else {\n          const reset = setCurrentInstance(instance);\n          value = propsDefaults[key] = defaultValue.call(\n            null,\n            props\n          );\n          reset();\n        }\n      } else {\n        value = defaultValue;\n      }\n      if (instance.ce) {\n        instance.ce._setProp(key, value);\n      }\n    }\n    if (opt[0 /* shouldCast */]) {\n      if (isAbsent && !hasDefault) {\n        value = false;\n      } else if (opt[1 /* shouldCastTrue */] && (value === \"\" || value === shared.hyphenate(key))) {\n        value = true;\n      }\n    }\n  }\n  return value;\n}\nconst mixinPropsCache = /* @__PURE__ */ new WeakMap();\nfunction normalizePropsOptions(comp, appContext, asMixin = false) {\n  const cache = asMixin ? mixinPropsCache : appContext.propsCache;\n  const cached = cache.get(comp);\n  if (cached) {\n    return cached;\n  }\n  const raw = comp.props;\n  const normalized = {};\n  const needCastKeys = [];\n  let hasExtends = false;\n  if (!shared.isFunction(comp)) {\n    const extendProps = (raw2) => {\n      hasExtends = true;\n      const [props, keys] = normalizePropsOptions(raw2, appContext, true);\n      shared.extend(normalized, props);\n      if (keys) needCastKeys.push(...keys);\n    };\n    if (!asMixin && appContext.mixins.length) {\n      appContext.mixins.forEach(extendProps);\n    }\n    if (comp.extends) {\n      extendProps(comp.extends);\n    }\n    if (comp.mixins) {\n      comp.mixins.forEach(extendProps);\n    }\n  }\n  if (!raw && !hasExtends) {\n    if (shared.isObject(comp)) {\n      cache.set(comp, shared.EMPTY_ARR);\n    }\n    return shared.EMPTY_ARR;\n  }\n  if (shared.isArray(raw)) {\n    for (let i = 0; i < raw.length; i++) {\n      const normalizedKey = shared.camelize(raw[i]);\n      if (validatePropName(normalizedKey)) {\n        normalized[normalizedKey] = shared.EMPTY_OBJ;\n      }\n    }\n  } else if (raw) {\n    for (const key in raw) {\n      const normalizedKey = shared.camelize(key);\n      if (validatePropName(normalizedKey)) {\n        const opt = raw[key];\n        const prop = normalized[normalizedKey] = shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : shared.extend({}, opt);\n        const propType = prop.type;\n        let shouldCast = false;\n        let shouldCastTrue = true;\n        if (shared.isArray(propType)) {\n          for (let index = 0; index < propType.length; ++index) {\n            const type = propType[index];\n            const typeName = shared.isFunction(type) && type.name;\n            if (typeName === \"Boolean\") {\n              shouldCast = true;\n              break;\n            } else if (typeName === \"String\") {\n              shouldCastTrue = false;\n            }\n          }\n        } else {\n          shouldCast = shared.isFunction(propType) && propType.name === \"Boolean\";\n        }\n        prop[0 /* shouldCast */] = shouldCast;\n        prop[1 /* shouldCastTrue */] = shouldCastTrue;\n        if (shouldCast || shared.hasOwn(prop, \"default\")) {\n          needCastKeys.push(normalizedKey);\n        }\n      }\n    }\n  }\n  const res = [normalized, needCastKeys];\n  if (shared.isObject(comp)) {\n    cache.set(comp, res);\n  }\n  return res;\n}\nfunction validatePropName(key) {\n  if (key[0] !== \"$\" && !shared.isReservedProp(key)) {\n    return true;\n  }\n  return false;\n}\n\nconst isInternalKey = (key) => key === \"_\" || key === \"__\" || key === \"_ctx\" || key === \"$stable\";\nconst normalizeSlotValue = (value) => shared.isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];\nconst normalizeSlot = (key, rawSlot, ctx) => {\n  if (rawSlot._n) {\n    return rawSlot;\n  }\n  const normalized = withCtx((...args) => {\n    if (false) ;\n    return normalizeSlotValue(rawSlot(...args));\n  }, ctx);\n  normalized._c = false;\n  return normalized;\n};\nconst normalizeObjectSlots = (rawSlots, slots, instance) => {\n  const ctx = rawSlots._ctx;\n  for (const key in rawSlots) {\n    if (isInternalKey(key)) continue;\n    const value = rawSlots[key];\n    if (shared.isFunction(value)) {\n      slots[key] = normalizeSlot(key, value, ctx);\n    } else if (value != null) {\n      const normalized = normalizeSlotValue(value);\n      slots[key] = () => normalized;\n    }\n  }\n};\nconst normalizeVNodeSlots = (instance, children) => {\n  const normalized = normalizeSlotValue(children);\n  instance.slots.default = () => normalized;\n};\nconst assignSlots = (slots, children, optimized) => {\n  for (const key in children) {\n    if (optimized || !isInternalKey(key)) {\n      slots[key] = children[key];\n    }\n  }\n};\nconst initSlots = (instance, children, optimized) => {\n  const slots = instance.slots = createInternalObject();\n  if (instance.vnode.shapeFlag & 32) {\n    const cacheIndexes = children.__;\n    if (cacheIndexes) shared.def(slots, \"__\", cacheIndexes, true);\n    const type = children._;\n    if (type) {\n      assignSlots(slots, children, optimized);\n      if (optimized) {\n        shared.def(slots, \"_\", type, true);\n      }\n    } else {\n      normalizeObjectSlots(children, slots);\n    }\n  } else if (children) {\n    normalizeVNodeSlots(instance, children);\n  }\n};\nconst updateSlots = (instance, children, optimized) => {\n  const { vnode, slots } = instance;\n  let needDeletionCheck = true;\n  let deletionComparisonTarget = shared.EMPTY_OBJ;\n  if (vnode.shapeFlag & 32) {\n    const type = children._;\n    if (type) {\n      if (optimized && type === 1) {\n        needDeletionCheck = false;\n      } else {\n        assignSlots(slots, children, optimized);\n      }\n    } else {\n      needDeletionCheck = !children.$stable;\n      normalizeObjectSlots(children, slots);\n    }\n    deletionComparisonTarget = children;\n  } else if (children) {\n    normalizeVNodeSlots(instance, children);\n    deletionComparisonTarget = { default: 1 };\n  }\n  if (needDeletionCheck) {\n    for (const key in slots) {\n      if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {\n        delete slots[key];\n      }\n    }\n  }\n};\n\nconst queuePostRenderEffect = queueEffectWithSuspense ;\nfunction createRenderer(options) {\n  return baseCreateRenderer(options);\n}\nfunction createHydrationRenderer(options) {\n  return baseCreateRenderer(options, createHydrationFunctions);\n}\nfunction baseCreateRenderer(options, createHydrationFns) {\n  const target = shared.getGlobalThis();\n  target.__VUE__ = true;\n  const {\n    insert: hostInsert,\n    remove: hostRemove,\n    patchProp: hostPatchProp,\n    createElement: hostCreateElement,\n    createText: hostCreateText,\n    createComment: hostCreateComment,\n    setText: hostSetText,\n    setElementText: hostSetElementText,\n    parentNode: hostParentNode,\n    nextSibling: hostNextSibling,\n    setScopeId: hostSetScopeId = shared.NOOP,\n    insertStaticContent: hostInsertStaticContent\n  } = options;\n  const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren) => {\n    if (n1 === n2) {\n      return;\n    }\n    if (n1 && !isSameVNodeType(n1, n2)) {\n      anchor = getNextHostNode(n1);\n      unmount(n1, parentComponent, parentSuspense, true);\n      n1 = null;\n    }\n    if (n2.patchFlag === -2) {\n      optimized = false;\n      n2.dynamicChildren = null;\n    }\n    const { type, ref, shapeFlag } = n2;\n    switch (type) {\n      case Text:\n        processText(n1, n2, container, anchor);\n        break;\n      case Comment:\n        processCommentNode(n1, n2, container, anchor);\n        break;\n      case Static:\n        if (n1 == null) {\n          mountStaticNode(n2, container, anchor, namespace);\n        }\n        break;\n      case Fragment:\n        processFragment(\n          n1,\n          n2,\n          container,\n          anchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        break;\n      default:\n        if (shapeFlag & 1) {\n          processElement(\n            n1,\n            n2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        } else if (shapeFlag & 6) {\n          processComponent(\n            n1,\n            n2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        } else if (shapeFlag & 64) {\n          type.process(\n            n1,\n            n2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized,\n            internals\n          );\n        } else if (shapeFlag & 128) {\n          type.process(\n            n1,\n            n2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized,\n            internals\n          );\n        } else ;\n    }\n    if (ref != null && parentComponent) {\n      setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);\n    } else if (ref == null && n1 && n1.ref != null) {\n      setRef(n1.ref, null, parentSuspense, n1, true);\n    }\n  };\n  const processText = (n1, n2, container, anchor) => {\n    if (n1 == null) {\n      hostInsert(\n        n2.el = hostCreateText(n2.children),\n        container,\n        anchor\n      );\n    } else {\n      const el = n2.el = n1.el;\n      if (n2.children !== n1.children) {\n        hostSetText(el, n2.children);\n      }\n    }\n  };\n  const processCommentNode = (n1, n2, container, anchor) => {\n    if (n1 == null) {\n      hostInsert(\n        n2.el = hostCreateComment(n2.children || \"\"),\n        container,\n        anchor\n      );\n    } else {\n      n2.el = n1.el;\n    }\n  };\n  const mountStaticNode = (n2, container, anchor, namespace) => {\n    [n2.el, n2.anchor] = hostInsertStaticContent(\n      n2.children,\n      container,\n      anchor,\n      namespace,\n      n2.el,\n      n2.anchor\n    );\n  };\n  const moveStaticNode = ({ el, anchor }, container, nextSibling) => {\n    let next;\n    while (el && el !== anchor) {\n      next = hostNextSibling(el);\n      hostInsert(el, container, nextSibling);\n      el = next;\n    }\n    hostInsert(anchor, container, nextSibling);\n  };\n  const removeStaticNode = ({ el, anchor }) => {\n    let next;\n    while (el && el !== anchor) {\n      next = hostNextSibling(el);\n      hostRemove(el);\n      el = next;\n    }\n    hostRemove(anchor);\n  };\n  const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    if (n2.type === \"svg\") {\n      namespace = \"svg\";\n    } else if (n2.type === \"math\") {\n      namespace = \"mathml\";\n    }\n    if (n1 == null) {\n      mountElement(\n        n2,\n        container,\n        anchor,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n    } else {\n      patchElement(\n        n1,\n        n2,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n    }\n  };\n  const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    let el;\n    let vnodeHook;\n    const { props, shapeFlag, transition, dirs } = vnode;\n    el = vnode.el = hostCreateElement(\n      vnode.type,\n      namespace,\n      props && props.is,\n      props\n    );\n    if (shapeFlag & 8) {\n      hostSetElementText(el, vnode.children);\n    } else if (shapeFlag & 16) {\n      mountChildren(\n        vnode.children,\n        el,\n        null,\n        parentComponent,\n        parentSuspense,\n        resolveChildrenNamespace(vnode, namespace),\n        slotScopeIds,\n        optimized\n      );\n    }\n    if (dirs) {\n      invokeDirectiveHook(vnode, null, parentComponent, \"created\");\n    }\n    setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);\n    if (props) {\n      for (const key in props) {\n        if (key !== \"value\" && !shared.isReservedProp(key)) {\n          hostPatchProp(el, key, null, props[key], namespace, parentComponent);\n        }\n      }\n      if (\"value\" in props) {\n        hostPatchProp(el, \"value\", null, props.value, namespace);\n      }\n      if (vnodeHook = props.onVnodeBeforeMount) {\n        invokeVNodeHook(vnodeHook, parentComponent, vnode);\n      }\n    }\n    if (dirs) {\n      invokeDirectiveHook(vnode, null, parentComponent, \"beforeMount\");\n    }\n    const needCallTransitionHooks = needTransition(parentSuspense, transition);\n    if (needCallTransitionHooks) {\n      transition.beforeEnter(el);\n    }\n    hostInsert(el, container, anchor);\n    if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {\n      queuePostRenderEffect(() => {\n        vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);\n        needCallTransitionHooks && transition.enter(el);\n        dirs && invokeDirectiveHook(vnode, null, parentComponent, \"mounted\");\n      }, parentSuspense);\n    }\n  };\n  const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {\n    if (scopeId) {\n      hostSetScopeId(el, scopeId);\n    }\n    if (slotScopeIds) {\n      for (let i = 0; i < slotScopeIds.length; i++) {\n        hostSetScopeId(el, slotScopeIds[i]);\n      }\n    }\n    if (parentComponent) {\n      let subTree = parentComponent.subTree;\n      if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {\n        const parentVNode = parentComponent.vnode;\n        setScopeId(\n          el,\n          parentVNode,\n          parentVNode.scopeId,\n          parentVNode.slotScopeIds,\n          parentComponent.parent\n        );\n      }\n    }\n  };\n  const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {\n    for (let i = start; i < children.length; i++) {\n      const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);\n      patch(\n        null,\n        child,\n        container,\n        anchor,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n    }\n  };\n  const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    const el = n2.el = n1.el;\n    let { patchFlag, dynamicChildren, dirs } = n2;\n    patchFlag |= n1.patchFlag & 16;\n    const oldProps = n1.props || shared.EMPTY_OBJ;\n    const newProps = n2.props || shared.EMPTY_OBJ;\n    let vnodeHook;\n    parentComponent && toggleRecurse(parentComponent, false);\n    if (vnodeHook = newProps.onVnodeBeforeUpdate) {\n      invokeVNodeHook(vnodeHook, parentComponent, n2, n1);\n    }\n    if (dirs) {\n      invokeDirectiveHook(n2, n1, parentComponent, \"beforeUpdate\");\n    }\n    parentComponent && toggleRecurse(parentComponent, true);\n    if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) {\n      hostSetElementText(el, \"\");\n    }\n    if (dynamicChildren) {\n      patchBlockChildren(\n        n1.dynamicChildren,\n        dynamicChildren,\n        el,\n        parentComponent,\n        parentSuspense,\n        resolveChildrenNamespace(n2, namespace),\n        slotScopeIds\n      );\n    } else if (!optimized) {\n      patchChildren(\n        n1,\n        n2,\n        el,\n        null,\n        parentComponent,\n        parentSuspense,\n        resolveChildrenNamespace(n2, namespace),\n        slotScopeIds,\n        false\n      );\n    }\n    if (patchFlag > 0) {\n      if (patchFlag & 16) {\n        patchProps(el, oldProps, newProps, parentComponent, namespace);\n      } else {\n        if (patchFlag & 2) {\n          if (oldProps.class !== newProps.class) {\n            hostPatchProp(el, \"class\", null, newProps.class, namespace);\n          }\n        }\n        if (patchFlag & 4) {\n          hostPatchProp(el, \"style\", oldProps.style, newProps.style, namespace);\n        }\n        if (patchFlag & 8) {\n          const propsToUpdate = n2.dynamicProps;\n          for (let i = 0; i < propsToUpdate.length; i++) {\n            const key = propsToUpdate[i];\n            const prev = oldProps[key];\n            const next = newProps[key];\n            if (next !== prev || key === \"value\") {\n              hostPatchProp(el, key, prev, next, namespace, parentComponent);\n            }\n          }\n        }\n      }\n      if (patchFlag & 1) {\n        if (n1.children !== n2.children) {\n          hostSetElementText(el, n2.children);\n        }\n      }\n    } else if (!optimized && dynamicChildren == null) {\n      patchProps(el, oldProps, newProps, parentComponent, namespace);\n    }\n    if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {\n      queuePostRenderEffect(() => {\n        vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);\n        dirs && invokeDirectiveHook(n2, n1, parentComponent, \"updated\");\n      }, parentSuspense);\n    }\n  };\n  const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {\n    for (let i = 0; i < newChildren.length; i++) {\n      const oldVNode = oldChildren[i];\n      const newVNode = newChildren[i];\n      const container = (\n        // oldVNode may be an errored async setup() component inside Suspense\n        // which will not have a mounted element\n        oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent\n        // of the Fragment itself so it can move its children.\n        (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement\n        // which also requires the correct parent container\n        !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.\n        oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (\n          // In other cases, the parent container is not actually used so we\n          // just pass the block element here to avoid a DOM parentNode call.\n          fallbackContainer\n        )\n      );\n      patch(\n        oldVNode,\n        newVNode,\n        container,\n        null,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        true\n      );\n    }\n  };\n  const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {\n    if (oldProps !== newProps) {\n      if (oldProps !== shared.EMPTY_OBJ) {\n        for (const key in oldProps) {\n          if (!shared.isReservedProp(key) && !(key in newProps)) {\n            hostPatchProp(\n              el,\n              key,\n              oldProps[key],\n              null,\n              namespace,\n              parentComponent\n            );\n          }\n        }\n      }\n      for (const key in newProps) {\n        if (shared.isReservedProp(key)) continue;\n        const next = newProps[key];\n        const prev = oldProps[key];\n        if (next !== prev && key !== \"value\") {\n          hostPatchProp(el, key, prev, next, namespace, parentComponent);\n        }\n      }\n      if (\"value\" in newProps) {\n        hostPatchProp(el, \"value\", oldProps.value, newProps.value, namespace);\n      }\n    }\n  };\n  const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(\"\");\n    const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(\"\");\n    let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;\n    if (fragmentSlotScopeIds) {\n      slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;\n    }\n    if (n1 == null) {\n      hostInsert(fragmentStartAnchor, container, anchor);\n      hostInsert(fragmentEndAnchor, container, anchor);\n      mountChildren(\n        // #10007\n        // such fragment like `<></>` will be compiled into\n        // a fragment which doesn't have a children.\n        // In this case fallback to an empty array\n        n2.children || [],\n        container,\n        fragmentEndAnchor,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n    } else {\n      if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result\n      // of renderSlot() with no valid children\n      n1.dynamicChildren) {\n        patchBlockChildren(\n          n1.dynamicChildren,\n          dynamicChildren,\n          container,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds\n        );\n        if (\n          // #2080 if the stable fragment has a key, it's a <template v-for> that may\n          //  get moved around. Make sure all root level vnodes inherit el.\n          // #2134 or if it's a component root, it may also get moved around\n          // as the component is being moved.\n          n2.key != null || parentComponent && n2 === parentComponent.subTree\n        ) {\n          traverseStaticChildren(\n            n1,\n            n2,\n            true\n            /* shallow */\n          );\n        }\n      } else {\n        patchChildren(\n          n1,\n          n2,\n          container,\n          fragmentEndAnchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n      }\n    }\n  };\n  const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    n2.slotScopeIds = slotScopeIds;\n    if (n1 == null) {\n      if (n2.shapeFlag & 512) {\n        parentComponent.ctx.activate(\n          n2,\n          container,\n          anchor,\n          namespace,\n          optimized\n        );\n      } else {\n        mountComponent(\n          n2,\n          container,\n          anchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          optimized\n        );\n      }\n    } else {\n      updateComponent(n1, n2, optimized);\n    }\n  };\n  const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {\n    const instance = (initialVNode.component = createComponentInstance(\n      initialVNode,\n      parentComponent,\n      parentSuspense\n    ));\n    if (isKeepAlive(initialVNode)) {\n      instance.ctx.renderer = internals;\n    }\n    {\n      setupComponent(instance, false, optimized);\n    }\n    if (instance.asyncDep) {\n      parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);\n      if (!initialVNode.el) {\n        const placeholder = instance.subTree = createVNode(Comment);\n        processCommentNode(null, placeholder, container, anchor);\n        initialVNode.placeholder = placeholder.el;\n      }\n    } else {\n      setupRenderEffect(\n        instance,\n        initialVNode,\n        container,\n        anchor,\n        parentSuspense,\n        namespace,\n        optimized\n      );\n    }\n  };\n  const updateComponent = (n1, n2, optimized) => {\n    const instance = n2.component = n1.component;\n    if (shouldUpdateComponent(n1, n2, optimized)) {\n      if (instance.asyncDep && !instance.asyncResolved) {\n        updateComponentPreRender(instance, n2, optimized);\n        return;\n      } else {\n        instance.next = n2;\n        instance.update();\n      }\n    } else {\n      n2.el = n1.el;\n      instance.vnode = n2;\n    }\n  };\n  const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {\n    const componentUpdateFn = () => {\n      if (!instance.isMounted) {\n        let vnodeHook;\n        const { el, props } = initialVNode;\n        const { bm, m, parent, root, type } = instance;\n        const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);\n        toggleRecurse(instance, false);\n        if (bm) {\n          shared.invokeArrayFns(bm);\n        }\n        if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) {\n          invokeVNodeHook(vnodeHook, parent, initialVNode);\n        }\n        toggleRecurse(instance, true);\n        if (el && hydrateNode) {\n          const hydrateSubTree = () => {\n            instance.subTree = renderComponentRoot(instance);\n            hydrateNode(\n              el,\n              instance.subTree,\n              instance,\n              parentSuspense,\n              null\n            );\n          };\n          if (isAsyncWrapperVNode && type.__asyncHydrate) {\n            type.__asyncHydrate(\n              el,\n              instance,\n              hydrateSubTree\n            );\n          } else {\n            hydrateSubTree();\n          }\n        } else {\n          if (root.ce && // @ts-expect-error _def is private\n          root.ce._def.shadowRoot !== false) {\n            root.ce._injectChildStyle(type);\n          }\n          const subTree = instance.subTree = renderComponentRoot(instance);\n          patch(\n            null,\n            subTree,\n            container,\n            anchor,\n            instance,\n            parentSuspense,\n            namespace\n          );\n          initialVNode.el = subTree.el;\n        }\n        if (m) {\n          queuePostRenderEffect(m, parentSuspense);\n        }\n        if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {\n          const scopedInitialVNode = initialVNode;\n          queuePostRenderEffect(\n            () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode),\n            parentSuspense\n          );\n        }\n        if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) {\n          instance.a && queuePostRenderEffect(instance.a, parentSuspense);\n        }\n        instance.isMounted = true;\n        initialVNode = container = anchor = null;\n      } else {\n        let { next, bu, u, parent, vnode } = instance;\n        {\n          const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);\n          if (nonHydratedAsyncRoot) {\n            if (next) {\n              next.el = vnode.el;\n              updateComponentPreRender(instance, next, optimized);\n            }\n            nonHydratedAsyncRoot.asyncDep.then(() => {\n              if (!instance.isUnmounted) {\n                componentUpdateFn();\n              }\n            });\n            return;\n          }\n        }\n        let originNext = next;\n        let vnodeHook;\n        toggleRecurse(instance, false);\n        if (next) {\n          next.el = vnode.el;\n          updateComponentPreRender(instance, next, optimized);\n        } else {\n          next = vnode;\n        }\n        if (bu) {\n          shared.invokeArrayFns(bu);\n        }\n        if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) {\n          invokeVNodeHook(vnodeHook, parent, next, vnode);\n        }\n        toggleRecurse(instance, true);\n        const nextTree = renderComponentRoot(instance);\n        const prevTree = instance.subTree;\n        instance.subTree = nextTree;\n        patch(\n          prevTree,\n          nextTree,\n          // parent may have changed if it's in a teleport\n          hostParentNode(prevTree.el),\n          // anchor may have changed if it's in a fragment\n          getNextHostNode(prevTree),\n          instance,\n          parentSuspense,\n          namespace\n        );\n        next.el = nextTree.el;\n        if (originNext === null) {\n          updateHOCHostEl(instance, nextTree.el);\n        }\n        if (u) {\n          queuePostRenderEffect(u, parentSuspense);\n        }\n        if (vnodeHook = next.props && next.props.onVnodeUpdated) {\n          queuePostRenderEffect(\n            () => invokeVNodeHook(vnodeHook, parent, next, vnode),\n            parentSuspense\n          );\n        }\n      }\n    };\n    instance.scope.on();\n    const effect = instance.effect = new reactivity.ReactiveEffect(componentUpdateFn);\n    instance.scope.off();\n    const update = instance.update = effect.run.bind(effect);\n    const job = instance.job = effect.runIfDirty.bind(effect);\n    job.i = instance;\n    job.id = instance.uid;\n    effect.scheduler = () => queueJob(job);\n    toggleRecurse(instance, true);\n    update();\n  };\n  const updateComponentPreRender = (instance, nextVNode, optimized) => {\n    nextVNode.component = instance;\n    const prevProps = instance.vnode.props;\n    instance.vnode = nextVNode;\n    instance.next = null;\n    updateProps(instance, nextVNode.props, prevProps, optimized);\n    updateSlots(instance, nextVNode.children, optimized);\n    reactivity.pauseTracking();\n    flushPreFlushCbs(instance);\n    reactivity.resetTracking();\n  };\n  const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {\n    const c1 = n1 && n1.children;\n    const prevShapeFlag = n1 ? n1.shapeFlag : 0;\n    const c2 = n2.children;\n    const { patchFlag, shapeFlag } = n2;\n    if (patchFlag > 0) {\n      if (patchFlag & 128) {\n        patchKeyedChildren(\n          c1,\n          c2,\n          container,\n          anchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        return;\n      } else if (patchFlag & 256) {\n        patchUnkeyedChildren(\n          c1,\n          c2,\n          container,\n          anchor,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        return;\n      }\n    }\n    if (shapeFlag & 8) {\n      if (prevShapeFlag & 16) {\n        unmountChildren(c1, parentComponent, parentSuspense);\n      }\n      if (c2 !== c1) {\n        hostSetElementText(container, c2);\n      }\n    } else {\n      if (prevShapeFlag & 16) {\n        if (shapeFlag & 16) {\n          patchKeyedChildren(\n            c1,\n            c2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        } else {\n          unmountChildren(c1, parentComponent, parentSuspense, true);\n        }\n      } else {\n        if (prevShapeFlag & 8) {\n          hostSetElementText(container, \"\");\n        }\n        if (shapeFlag & 16) {\n          mountChildren(\n            c2,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        }\n      }\n    }\n  };\n  const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    c1 = c1 || shared.EMPTY_ARR;\n    c2 = c2 || shared.EMPTY_ARR;\n    const oldLength = c1.length;\n    const newLength = c2.length;\n    const commonLength = Math.min(oldLength, newLength);\n    let i;\n    for (i = 0; i < commonLength; i++) {\n      const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n      patch(\n        c1[i],\n        nextChild,\n        container,\n        null,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n    }\n    if (oldLength > newLength) {\n      unmountChildren(\n        c1,\n        parentComponent,\n        parentSuspense,\n        true,\n        false,\n        commonLength\n      );\n    } else {\n      mountChildren(\n        c2,\n        container,\n        anchor,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized,\n        commonLength\n      );\n    }\n  };\n  const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n    let i = 0;\n    const l2 = c2.length;\n    let e1 = c1.length - 1;\n    let e2 = l2 - 1;\n    while (i <= e1 && i <= e2) {\n      const n1 = c1[i];\n      const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n      if (isSameVNodeType(n1, n2)) {\n        patch(\n          n1,\n          n2,\n          container,\n          null,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n      } else {\n        break;\n      }\n      i++;\n    }\n    while (i <= e1 && i <= e2) {\n      const n1 = c1[e1];\n      const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);\n      if (isSameVNodeType(n1, n2)) {\n        patch(\n          n1,\n          n2,\n          container,\n          null,\n          parentComponent,\n          parentSuspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n      } else {\n        break;\n      }\n      e1--;\n      e2--;\n    }\n    if (i > e1) {\n      if (i <= e2) {\n        const nextPos = e2 + 1;\n        const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;\n        while (i <= e2) {\n          patch(\n            null,\n            c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]),\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n          i++;\n        }\n      }\n    } else if (i > e2) {\n      while (i <= e1) {\n        unmount(c1[i], parentComponent, parentSuspense, true);\n        i++;\n      }\n    } else {\n      const s1 = i;\n      const s2 = i;\n      const keyToNewIndexMap = /* @__PURE__ */ new Map();\n      for (i = s2; i <= e2; i++) {\n        const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n        if (nextChild.key != null) {\n          keyToNewIndexMap.set(nextChild.key, i);\n        }\n      }\n      let j;\n      let patched = 0;\n      const toBePatched = e2 - s2 + 1;\n      let moved = false;\n      let maxNewIndexSoFar = 0;\n      const newIndexToOldIndexMap = new Array(toBePatched);\n      for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;\n      for (i = s1; i <= e1; i++) {\n        const prevChild = c1[i];\n        if (patched >= toBePatched) {\n          unmount(prevChild, parentComponent, parentSuspense, true);\n          continue;\n        }\n        let newIndex;\n        if (prevChild.key != null) {\n          newIndex = keyToNewIndexMap.get(prevChild.key);\n        } else {\n          for (j = s2; j <= e2; j++) {\n            if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {\n              newIndex = j;\n              break;\n            }\n          }\n        }\n        if (newIndex === void 0) {\n          unmount(prevChild, parentComponent, parentSuspense, true);\n        } else {\n          newIndexToOldIndexMap[newIndex - s2] = i + 1;\n          if (newIndex >= maxNewIndexSoFar) {\n            maxNewIndexSoFar = newIndex;\n          } else {\n            moved = true;\n          }\n          patch(\n            prevChild,\n            c2[newIndex],\n            container,\n            null,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n          patched++;\n        }\n      }\n      const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : shared.EMPTY_ARR;\n      j = increasingNewIndexSequence.length - 1;\n      for (i = toBePatched - 1; i >= 0; i--) {\n        const nextIndex = s2 + i;\n        const nextChild = c2[nextIndex];\n        const anchorVNode = c2[nextIndex + 1];\n        const anchor = nextIndex + 1 < l2 ? (\n          // #13559, fallback to el placeholder for unresolved async component\n          anchorVNode.el || anchorVNode.placeholder\n        ) : parentAnchor;\n        if (newIndexToOldIndexMap[i] === 0) {\n          patch(\n            null,\n            nextChild,\n            container,\n            anchor,\n            parentComponent,\n            parentSuspense,\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n        } else if (moved) {\n          if (j < 0 || i !== increasingNewIndexSequence[j]) {\n            move(nextChild, container, anchor, 2);\n          } else {\n            j--;\n          }\n        }\n      }\n    }\n  };\n  const move = (vnode, container, anchor, moveType, parentSuspense = null) => {\n    const { el, type, transition, children, shapeFlag } = vnode;\n    if (shapeFlag & 6) {\n      move(vnode.component.subTree, container, anchor, moveType);\n      return;\n    }\n    if (shapeFlag & 128) {\n      vnode.suspense.move(container, anchor, moveType);\n      return;\n    }\n    if (shapeFlag & 64) {\n      type.move(vnode, container, anchor, internals);\n      return;\n    }\n    if (type === Fragment) {\n      hostInsert(el, container, anchor);\n      for (let i = 0; i < children.length; i++) {\n        move(children[i], container, anchor, moveType);\n      }\n      hostInsert(vnode.anchor, container, anchor);\n      return;\n    }\n    if (type === Static) {\n      moveStaticNode(vnode, container, anchor);\n      return;\n    }\n    const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;\n    if (needTransition2) {\n      if (moveType === 0) {\n        transition.beforeEnter(el);\n        hostInsert(el, container, anchor);\n        queuePostRenderEffect(() => transition.enter(el), parentSuspense);\n      } else {\n        const { leave, delayLeave, afterLeave } = transition;\n        const remove2 = () => {\n          if (vnode.ctx.isUnmounted) {\n            hostRemove(el);\n          } else {\n            hostInsert(el, container, anchor);\n          }\n        };\n        const performLeave = () => {\n          leave(el, () => {\n            remove2();\n            afterLeave && afterLeave();\n          });\n        };\n        if (delayLeave) {\n          delayLeave(el, remove2, performLeave);\n        } else {\n          performLeave();\n        }\n      }\n    } else {\n      hostInsert(el, container, anchor);\n    }\n  };\n  const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {\n    const {\n      type,\n      props,\n      ref,\n      children,\n      dynamicChildren,\n      shapeFlag,\n      patchFlag,\n      dirs,\n      cacheIndex\n    } = vnode;\n    if (patchFlag === -2) {\n      optimized = false;\n    }\n    if (ref != null) {\n      reactivity.pauseTracking();\n      setRef(ref, null, parentSuspense, vnode, true);\n      reactivity.resetTracking();\n    }\n    if (cacheIndex != null) {\n      parentComponent.renderCache[cacheIndex] = void 0;\n    }\n    if (shapeFlag & 256) {\n      parentComponent.ctx.deactivate(vnode);\n      return;\n    }\n    const shouldInvokeDirs = shapeFlag & 1 && dirs;\n    const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);\n    let vnodeHook;\n    if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {\n      invokeVNodeHook(vnodeHook, parentComponent, vnode);\n    }\n    if (shapeFlag & 6) {\n      unmountComponent(vnode.component, parentSuspense, doRemove);\n    } else {\n      if (shapeFlag & 128) {\n        vnode.suspense.unmount(parentSuspense, doRemove);\n        return;\n      }\n      if (shouldInvokeDirs) {\n        invokeDirectiveHook(vnode, null, parentComponent, \"beforeUnmount\");\n      }\n      if (shapeFlag & 64) {\n        vnode.type.remove(\n          vnode,\n          parentComponent,\n          parentSuspense,\n          internals,\n          doRemove\n        );\n      } else if (dynamicChildren && // #5154\n      // when v-once is used inside a block, setBlockTracking(-1) marks the\n      // parent block with hasOnce: true\n      // so that it doesn't take the fast path during unmount - otherwise\n      // components nested in v-once are never unmounted.\n      !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments\n      (type !== Fragment || patchFlag > 0 && patchFlag & 64)) {\n        unmountChildren(\n          dynamicChildren,\n          parentComponent,\n          parentSuspense,\n          false,\n          true\n        );\n      } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {\n        unmountChildren(children, parentComponent, parentSuspense);\n      }\n      if (doRemove) {\n        remove(vnode);\n      }\n    }\n    if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {\n      queuePostRenderEffect(() => {\n        vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);\n        shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, \"unmounted\");\n      }, parentSuspense);\n    }\n  };\n  const remove = (vnode) => {\n    const { type, el, anchor, transition } = vnode;\n    if (type === Fragment) {\n      {\n        removeFragment(el, anchor);\n      }\n      return;\n    }\n    if (type === Static) {\n      removeStaticNode(vnode);\n      return;\n    }\n    const performRemove = () => {\n      hostRemove(el);\n      if (transition && !transition.persisted && transition.afterLeave) {\n        transition.afterLeave();\n      }\n    };\n    if (vnode.shapeFlag & 1 && transition && !transition.persisted) {\n      const { leave, delayLeave } = transition;\n      const performLeave = () => leave(el, performRemove);\n      if (delayLeave) {\n        delayLeave(vnode.el, performRemove, performLeave);\n      } else {\n        performLeave();\n      }\n    } else {\n      performRemove();\n    }\n  };\n  const removeFragment = (cur, end) => {\n    let next;\n    while (cur !== end) {\n      next = hostNextSibling(cur);\n      hostRemove(cur);\n      cur = next;\n    }\n    hostRemove(end);\n  };\n  const unmountComponent = (instance, parentSuspense, doRemove) => {\n    const {\n      bum,\n      scope,\n      job,\n      subTree,\n      um,\n      m,\n      a,\n      parent,\n      slots: { __: slotCacheKeys }\n    } = instance;\n    invalidateMount(m);\n    invalidateMount(a);\n    if (bum) {\n      shared.invokeArrayFns(bum);\n    }\n    if (parent && shared.isArray(slotCacheKeys)) {\n      slotCacheKeys.forEach((v) => {\n        parent.renderCache[v] = void 0;\n      });\n    }\n    scope.stop();\n    if (job) {\n      job.flags |= 8;\n      unmount(subTree, instance, parentSuspense, doRemove);\n    }\n    if (um) {\n      queuePostRenderEffect(um, parentSuspense);\n    }\n    queuePostRenderEffect(() => {\n      instance.isUnmounted = true;\n    }, parentSuspense);\n    if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {\n      parentSuspense.deps--;\n      if (parentSuspense.deps === 0) {\n        parentSuspense.resolve();\n      }\n    }\n  };\n  const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {\n    for (let i = start; i < children.length; i++) {\n      unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);\n    }\n  };\n  const getNextHostNode = (vnode) => {\n    if (vnode.shapeFlag & 6) {\n      return getNextHostNode(vnode.component.subTree);\n    }\n    if (vnode.shapeFlag & 128) {\n      return vnode.suspense.next();\n    }\n    const el = hostNextSibling(vnode.anchor || vnode.el);\n    const teleportEnd = el && el[TeleportEndKey];\n    return teleportEnd ? hostNextSibling(teleportEnd) : el;\n  };\n  let isFlushing = false;\n  const render = (vnode, container, namespace) => {\n    if (vnode == null) {\n      if (container._vnode) {\n        unmount(container._vnode, null, null, true);\n      }\n    } else {\n      patch(\n        container._vnode || null,\n        vnode,\n        container,\n        null,\n        null,\n        null,\n        namespace\n      );\n    }\n    container._vnode = vnode;\n    if (!isFlushing) {\n      isFlushing = true;\n      flushPreFlushCbs();\n      flushPostFlushCbs();\n      isFlushing = false;\n    }\n  };\n  const internals = {\n    p: patch,\n    um: unmount,\n    m: move,\n    r: remove,\n    mt: mountComponent,\n    mc: mountChildren,\n    pc: patchChildren,\n    pbc: patchBlockChildren,\n    n: getNextHostNode,\n    o: options\n  };\n  let hydrate;\n  let hydrateNode;\n  if (createHydrationFns) {\n    [hydrate, hydrateNode] = createHydrationFns(\n      internals\n    );\n  }\n  return {\n    render,\n    hydrate,\n    createApp: createAppAPI(render, hydrate)\n  };\n}\nfunction resolveChildrenNamespace({ type, props }, currentNamespace) {\n  return currentNamespace === \"svg\" && type === \"foreignObject\" || currentNamespace === \"mathml\" && type === \"annotation-xml\" && props && props.encoding && props.encoding.includes(\"html\") ? void 0 : currentNamespace;\n}\nfunction toggleRecurse({ effect, job }, allowed) {\n  if (allowed) {\n    effect.flags |= 32;\n    job.flags |= 4;\n  } else {\n    effect.flags &= -33;\n    job.flags &= -5;\n  }\n}\nfunction needTransition(parentSuspense, transition) {\n  return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;\n}\nfunction traverseStaticChildren(n1, n2, shallow = false) {\n  const ch1 = n1.children;\n  const ch2 = n2.children;\n  if (shared.isArray(ch1) && shared.isArray(ch2)) {\n    for (let i = 0; i < ch1.length; i++) {\n      const c1 = ch1[i];\n      let c2 = ch2[i];\n      if (c2.shapeFlag & 1 && !c2.dynamicChildren) {\n        if (c2.patchFlag <= 0 || c2.patchFlag === 32) {\n          c2 = ch2[i] = cloneIfMounted(ch2[i]);\n          c2.el = c1.el;\n        }\n        if (!shallow && c2.patchFlag !== -2)\n          traverseStaticChildren(c1, c2);\n      }\n      if (c2.type === Text) {\n        c2.el = c1.el;\n      }\n      if (c2.type === Comment && !c2.el) {\n        c2.el = c1.el;\n      }\n    }\n  }\n}\nfunction getSequence(arr) {\n  const p = arr.slice();\n  const result = [0];\n  let i, j, u, v, c;\n  const len = arr.length;\n  for (i = 0; i < len; i++) {\n    const arrI = arr[i];\n    if (arrI !== 0) {\n      j = result[result.length - 1];\n      if (arr[j] < arrI) {\n        p[i] = j;\n        result.push(i);\n        continue;\n      }\n      u = 0;\n      v = result.length - 1;\n      while (u < v) {\n        c = u + v >> 1;\n        if (arr[result[c]] < arrI) {\n          u = c + 1;\n        } else {\n          v = c;\n        }\n      }\n      if (arrI < arr[result[u]]) {\n        if (u > 0) {\n          p[i] = result[u - 1];\n        }\n        result[u] = i;\n      }\n    }\n  }\n  u = result.length;\n  v = result[u - 1];\n  while (u-- > 0) {\n    result[u] = v;\n    v = p[v];\n  }\n  return result;\n}\nfunction locateNonHydratedAsyncRoot(instance) {\n  const subComponent = instance.subTree.component;\n  if (subComponent) {\n    if (subComponent.asyncDep && !subComponent.asyncResolved) {\n      return subComponent;\n    } else {\n      return locateNonHydratedAsyncRoot(subComponent);\n    }\n  }\n}\nfunction invalidateMount(hooks) {\n  if (hooks) {\n    for (let i = 0; i < hooks.length; i++)\n      hooks[i].flags |= 8;\n  }\n}\n\nconst ssrContextKey = Symbol.for(\"v-scx\");\nconst useSSRContext = () => {\n  {\n    const ctx = inject(ssrContextKey);\n    return ctx;\n  }\n};\n\nfunction watchEffect(effect, options) {\n  return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n  return doWatch(\n    effect,\n    null,\n    { flush: \"post\" }\n  );\n}\nfunction watchSyncEffect(effect, options) {\n  return doWatch(\n    effect,\n    null,\n    { flush: \"sync\" }\n  );\n}\nfunction watch(source, cb, options) {\n  return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, options = shared.EMPTY_OBJ) {\n  const { immediate, deep, flush, once } = options;\n  const baseWatchOptions = shared.extend({}, options);\n  const runsImmediately = cb && immediate || !cb && flush !== \"post\";\n  let ssrCleanup;\n  if (isInSSRComponentSetup) {\n    if (flush === \"sync\") {\n      const ctx = useSSRContext();\n      ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);\n    } else if (!runsImmediately) {\n      const watchStopHandle = () => {\n      };\n      watchStopHandle.stop = shared.NOOP;\n      watchStopHandle.resume = shared.NOOP;\n      watchStopHandle.pause = shared.NOOP;\n      return watchStopHandle;\n    }\n  }\n  const instance = currentInstance;\n  baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);\n  let isPre = false;\n  if (flush === \"post\") {\n    baseWatchOptions.scheduler = (job) => {\n      queuePostRenderEffect(job, instance && instance.suspense);\n    };\n  } else if (flush !== \"sync\") {\n    isPre = true;\n    baseWatchOptions.scheduler = (job, isFirstRun) => {\n      if (isFirstRun) {\n        job();\n      } else {\n        queueJob(job);\n      }\n    };\n  }\n  baseWatchOptions.augmentJob = (job) => {\n    if (cb) {\n      job.flags |= 4;\n    }\n    if (isPre) {\n      job.flags |= 2;\n      if (instance) {\n        job.id = instance.uid;\n        job.i = instance;\n      }\n    }\n  };\n  const watchHandle = reactivity.watch(source, cb, baseWatchOptions);\n  if (isInSSRComponentSetup) {\n    if (ssrCleanup) {\n      ssrCleanup.push(watchHandle);\n    } else if (runsImmediately) {\n      watchHandle();\n    }\n  }\n  return watchHandle;\n}\nfunction instanceWatch(source, value, options) {\n  const publicThis = this.proxy;\n  const getter = shared.isString(source) ? source.includes(\".\") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);\n  let cb;\n  if (shared.isFunction(value)) {\n    cb = value;\n  } else {\n    cb = value.handler;\n    options = value;\n  }\n  const reset = setCurrentInstance(this);\n  const res = doWatch(getter, cb.bind(publicThis), options);\n  reset();\n  return res;\n}\nfunction createPathGetter(ctx, path) {\n  const segments = path.split(\".\");\n  return () => {\n    let cur = ctx;\n    for (let i = 0; i < segments.length && cur; i++) {\n      cur = cur[segments[i]];\n    }\n    return cur;\n  };\n}\n\nfunction useModel(props, name, options = shared.EMPTY_OBJ) {\n  const i = getCurrentInstance();\n  const camelizedName = shared.camelize(name);\n  const hyphenatedName = shared.hyphenate(name);\n  const modifiers = getModelModifiers(props, camelizedName);\n  const res = reactivity.customRef((track, trigger) => {\n    let localValue;\n    let prevSetValue = shared.EMPTY_OBJ;\n    let prevEmittedValue;\n    watchSyncEffect(() => {\n      const propValue = props[camelizedName];\n      if (shared.hasChanged(localValue, propValue)) {\n        localValue = propValue;\n        trigger();\n      }\n    });\n    return {\n      get() {\n        track();\n        return options.get ? options.get(localValue) : localValue;\n      },\n      set(value) {\n        const emittedValue = options.set ? options.set(value) : value;\n        if (!shared.hasChanged(emittedValue, localValue) && !(prevSetValue !== shared.EMPTY_OBJ && shared.hasChanged(value, prevSetValue))) {\n          return;\n        }\n        const rawProps = i.vnode.props;\n        if (!(rawProps && // check if parent has passed v-model\n        (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {\n          localValue = value;\n          trigger();\n        }\n        i.emit(`update:${name}`, emittedValue);\n        if (shared.hasChanged(value, emittedValue) && shared.hasChanged(value, prevSetValue) && !shared.hasChanged(emittedValue, prevEmittedValue)) {\n          trigger();\n        }\n        prevSetValue = value;\n        prevEmittedValue = emittedValue;\n      }\n    };\n  });\n  res[Symbol.iterator] = () => {\n    let i2 = 0;\n    return {\n      next() {\n        if (i2 < 2) {\n          return { value: i2++ ? modifiers || shared.EMPTY_OBJ : res, done: false };\n        } else {\n          return { done: true };\n        }\n      }\n    };\n  };\n  return res;\n}\nconst getModelModifiers = (props, modelName) => {\n  return modelName === \"modelValue\" || modelName === \"model-value\" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${shared.camelize(modelName)}Modifiers`] || props[`${shared.hyphenate(modelName)}Modifiers`];\n};\n\nfunction emit(instance, event, ...rawArgs) {\n  if (instance.isUnmounted) return;\n  const props = instance.vnode.props || shared.EMPTY_OBJ;\n  let args = rawArgs;\n  const isModelListener = event.startsWith(\"update:\");\n  const modifiers = isModelListener && getModelModifiers(props, event.slice(7));\n  if (modifiers) {\n    if (modifiers.trim) {\n      args = rawArgs.map((a) => shared.isString(a) ? a.trim() : a);\n    }\n    if (modifiers.number) {\n      args = rawArgs.map(shared.looseToNumber);\n    }\n  }\n  let handlerName;\n  let handler = props[handlerName = shared.toHandlerKey(event)] || // also try camelCase event handler (#2249)\n  props[handlerName = shared.toHandlerKey(shared.camelize(event))];\n  if (!handler && isModelListener) {\n    handler = props[handlerName = shared.toHandlerKey(shared.hyphenate(event))];\n  }\n  if (handler) {\n    callWithAsyncErrorHandling(\n      handler,\n      instance,\n      6,\n      args\n    );\n  }\n  const onceHandler = props[handlerName + `Once`];\n  if (onceHandler) {\n    if (!instance.emitted) {\n      instance.emitted = {};\n    } else if (instance.emitted[handlerName]) {\n      return;\n    }\n    instance.emitted[handlerName] = true;\n    callWithAsyncErrorHandling(\n      onceHandler,\n      instance,\n      6,\n      args\n    );\n  }\n}\nfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\n  const cache = appContext.emitsCache;\n  const cached = cache.get(comp);\n  if (cached !== void 0) {\n    return cached;\n  }\n  const raw = comp.emits;\n  let normalized = {};\n  let hasExtends = false;\n  if (!shared.isFunction(comp)) {\n    const extendEmits = (raw2) => {\n      const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);\n      if (normalizedFromExtend) {\n        hasExtends = true;\n        shared.extend(normalized, normalizedFromExtend);\n      }\n    };\n    if (!asMixin && appContext.mixins.length) {\n      appContext.mixins.forEach(extendEmits);\n    }\n    if (comp.extends) {\n      extendEmits(comp.extends);\n    }\n    if (comp.mixins) {\n      comp.mixins.forEach(extendEmits);\n    }\n  }\n  if (!raw && !hasExtends) {\n    if (shared.isObject(comp)) {\n      cache.set(comp, null);\n    }\n    return null;\n  }\n  if (shared.isArray(raw)) {\n    raw.forEach((key) => normalized[key] = null);\n  } else {\n    shared.extend(normalized, raw);\n  }\n  if (shared.isObject(comp)) {\n    cache.set(comp, normalized);\n  }\n  return normalized;\n}\nfunction isEmitListener(options, key) {\n  if (!options || !shared.isOn(key)) {\n    return false;\n  }\n  key = key.slice(2).replace(/Once$/, \"\");\n  return shared.hasOwn(options, key[0].toLowerCase() + key.slice(1)) || shared.hasOwn(options, shared.hyphenate(key)) || shared.hasOwn(options, key);\n}\n\nfunction markAttrsAccessed() {\n}\nfunction renderComponentRoot(instance) {\n  const {\n    type: Component,\n    vnode,\n    proxy,\n    withProxy,\n    propsOptions: [propsOptions],\n    slots,\n    attrs,\n    emit,\n    render,\n    renderCache,\n    props,\n    data,\n    setupState,\n    ctx,\n    inheritAttrs\n  } = instance;\n  const prev = setCurrentRenderingInstance(instance);\n  let result;\n  let fallthroughAttrs;\n  try {\n    if (vnode.shapeFlag & 4) {\n      const proxyToUse = withProxy || proxy;\n      const thisProxy = false ? new Proxy(proxyToUse, {\n        get(target, key, receiver) {\n          warn(\n            `Property '${String(\n              key\n            )}' was accessed via 'this'. Avoid using 'this' in templates.`\n          );\n          return Reflect.get(target, key, receiver);\n        }\n      }) : proxyToUse;\n      result = normalizeVNode(\n        render.call(\n          thisProxy,\n          proxyToUse,\n          renderCache,\n          false ? shallowReadonly(props) : props,\n          setupState,\n          data,\n          ctx\n        )\n      );\n      fallthroughAttrs = attrs;\n    } else {\n      const render2 = Component;\n      if (false) ;\n      result = normalizeVNode(\n        render2.length > 1 ? render2(\n          false ? shallowReadonly(props) : props,\n          false ? {\n            get attrs() {\n              markAttrsAccessed();\n              return shallowReadonly(attrs);\n            },\n            slots,\n            emit\n          } : { attrs, slots, emit }\n        ) : render2(\n          false ? shallowReadonly(props) : props,\n          null\n        )\n      );\n      fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);\n    }\n  } catch (err) {\n    blockStack.length = 0;\n    handleError(err, instance, 1);\n    result = createVNode(Comment);\n  }\n  let root = result;\n  if (fallthroughAttrs && inheritAttrs !== false) {\n    const keys = Object.keys(fallthroughAttrs);\n    const { shapeFlag } = root;\n    if (keys.length) {\n      if (shapeFlag & (1 | 6)) {\n        if (propsOptions && keys.some(shared.isModelListener)) {\n          fallthroughAttrs = filterModelListeners(\n            fallthroughAttrs,\n            propsOptions\n          );\n        }\n        root = cloneVNode(root, fallthroughAttrs, false, true);\n      }\n    }\n  }\n  if (vnode.dirs) {\n    root = cloneVNode(root, null, false, true);\n    root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;\n  }\n  if (vnode.transition) {\n    setTransitionHooks(root, vnode.transition);\n  }\n  {\n    result = root;\n  }\n  setCurrentRenderingInstance(prev);\n  return result;\n}\nfunction filterSingleRoot(children, recurse = true) {\n  let singleRoot;\n  for (let i = 0; i < children.length; i++) {\n    const child = children[i];\n    if (isVNode(child)) {\n      if (child.type !== Comment || child.children === \"v-if\") {\n        if (singleRoot) {\n          return;\n        } else {\n          singleRoot = child;\n        }\n      }\n    } else {\n      return;\n    }\n  }\n  return singleRoot;\n}\nconst getFunctionalFallthrough = (attrs) => {\n  let res;\n  for (const key in attrs) {\n    if (key === \"class\" || key === \"style\" || shared.isOn(key)) {\n      (res || (res = {}))[key] = attrs[key];\n    }\n  }\n  return res;\n};\nconst filterModelListeners = (attrs, props) => {\n  const res = {};\n  for (const key in attrs) {\n    if (!shared.isModelListener(key) || !(key.slice(9) in props)) {\n      res[key] = attrs[key];\n    }\n  }\n  return res;\n};\nfunction shouldUpdateComponent(prevVNode, nextVNode, optimized) {\n  const { props: prevProps, children: prevChildren, component } = prevVNode;\n  const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;\n  const emits = component.emitsOptions;\n  if (nextVNode.dirs || nextVNode.transition) {\n    return true;\n  }\n  if (optimized && patchFlag >= 0) {\n    if (patchFlag & 1024) {\n      return true;\n    }\n    if (patchFlag & 16) {\n      if (!prevProps) {\n        return !!nextProps;\n      }\n      return hasPropsChanged(prevProps, nextProps, emits);\n    } else if (patchFlag & 8) {\n      const dynamicProps = nextVNode.dynamicProps;\n      for (let i = 0; i < dynamicProps.length; i++) {\n        const key = dynamicProps[i];\n        if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {\n          return true;\n        }\n      }\n    }\n  } else {\n    if (prevChildren || nextChildren) {\n      if (!nextChildren || !nextChildren.$stable) {\n        return true;\n      }\n    }\n    if (prevProps === nextProps) {\n      return false;\n    }\n    if (!prevProps) {\n      return !!nextProps;\n    }\n    if (!nextProps) {\n      return true;\n    }\n    return hasPropsChanged(prevProps, nextProps, emits);\n  }\n  return false;\n}\nfunction hasPropsChanged(prevProps, nextProps, emitsOptions) {\n  const nextKeys = Object.keys(nextProps);\n  if (nextKeys.length !== Object.keys(prevProps).length) {\n    return true;\n  }\n  for (let i = 0; i < nextKeys.length; i++) {\n    const key = nextKeys[i];\n    if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {\n      return true;\n    }\n  }\n  return false;\n}\nfunction updateHOCHostEl({ vnode, parent }, el) {\n  while (parent) {\n    const root = parent.subTree;\n    if (root.suspense && root.suspense.activeBranch === vnode) {\n      root.el = vnode.el;\n    }\n    if (root === vnode) {\n      (vnode = parent.vnode).el = el;\n      parent = parent.parent;\n    } else {\n      break;\n    }\n  }\n}\n\nconst isSuspense = (type) => type.__isSuspense;\nlet suspenseId = 0;\nconst SuspenseImpl = {\n  name: \"Suspense\",\n  // In order to make Suspense tree-shakable, we need to avoid importing it\n  // directly in the renderer. The renderer checks for the __isSuspense flag\n  // on a vnode's type and calls the `process` method, passing in renderer\n  // internals.\n  __isSuspense: true,\n  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {\n    if (n1 == null) {\n      mountSuspense(\n        n2,\n        container,\n        anchor,\n        parentComponent,\n        parentSuspense,\n        namespace,\n        slotScopeIds,\n        optimized,\n        rendererInternals\n      );\n    } else {\n      if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {\n        n2.suspense = n1.suspense;\n        n2.suspense.vnode = n2;\n        n2.el = n1.el;\n        return;\n      }\n      patchSuspense(\n        n1,\n        n2,\n        container,\n        anchor,\n        parentComponent,\n        namespace,\n        slotScopeIds,\n        optimized,\n        rendererInternals\n      );\n    }\n  },\n  hydrate: hydrateSuspense,\n  normalize: normalizeSuspenseChildren\n};\nconst Suspense = SuspenseImpl ;\nfunction triggerEvent(vnode, name) {\n  const eventListener = vnode.props && vnode.props[name];\n  if (shared.isFunction(eventListener)) {\n    eventListener();\n  }\n}\nfunction mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {\n  const {\n    p: patch,\n    o: { createElement }\n  } = rendererInternals;\n  const hiddenContainer = createElement(\"div\");\n  const suspense = vnode.suspense = createSuspenseBoundary(\n    vnode,\n    parentSuspense,\n    parentComponent,\n    container,\n    hiddenContainer,\n    anchor,\n    namespace,\n    slotScopeIds,\n    optimized,\n    rendererInternals\n  );\n  patch(\n    null,\n    suspense.pendingBranch = vnode.ssContent,\n    hiddenContainer,\n    null,\n    parentComponent,\n    suspense,\n    namespace,\n    slotScopeIds\n  );\n  if (suspense.deps > 0) {\n    triggerEvent(vnode, \"onPending\");\n    triggerEvent(vnode, \"onFallback\");\n    patch(\n      null,\n      vnode.ssFallback,\n      container,\n      anchor,\n      parentComponent,\n      null,\n      // fallback tree will not have suspense context\n      namespace,\n      slotScopeIds\n    );\n    setActiveBranch(suspense, vnode.ssFallback);\n  } else {\n    suspense.resolve(false, true);\n  }\n}\nfunction patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {\n  const suspense = n2.suspense = n1.suspense;\n  suspense.vnode = n2;\n  n2.el = n1.el;\n  const newBranch = n2.ssContent;\n  const newFallback = n2.ssFallback;\n  const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;\n  if (pendingBranch) {\n    suspense.pendingBranch = newBranch;\n    if (isSameVNodeType(newBranch, pendingBranch)) {\n      patch(\n        pendingBranch,\n        newBranch,\n        suspense.hiddenContainer,\n        null,\n        parentComponent,\n        suspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n      if (suspense.deps <= 0) {\n        suspense.resolve();\n      } else if (isInFallback) {\n        if (!isHydrating) {\n          patch(\n            activeBranch,\n            newFallback,\n            container,\n            anchor,\n            parentComponent,\n            null,\n            // fallback tree will not have suspense context\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n          setActiveBranch(suspense, newFallback);\n        }\n      }\n    } else {\n      suspense.pendingId = suspenseId++;\n      if (isHydrating) {\n        suspense.isHydrating = false;\n        suspense.activeBranch = pendingBranch;\n      } else {\n        unmount(pendingBranch, parentComponent, suspense);\n      }\n      suspense.deps = 0;\n      suspense.effects.length = 0;\n      suspense.hiddenContainer = createElement(\"div\");\n      if (isInFallback) {\n        patch(\n          null,\n          newBranch,\n          suspense.hiddenContainer,\n          null,\n          parentComponent,\n          suspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        if (suspense.deps <= 0) {\n          suspense.resolve();\n        } else {\n          patch(\n            activeBranch,\n            newFallback,\n            container,\n            anchor,\n            parentComponent,\n            null,\n            // fallback tree will not have suspense context\n            namespace,\n            slotScopeIds,\n            optimized\n          );\n          setActiveBranch(suspense, newFallback);\n        }\n      } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n        patch(\n          activeBranch,\n          newBranch,\n          container,\n          anchor,\n          parentComponent,\n          suspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        suspense.resolve(true);\n      } else {\n        patch(\n          null,\n          newBranch,\n          suspense.hiddenContainer,\n          null,\n          parentComponent,\n          suspense,\n          namespace,\n          slotScopeIds,\n          optimized\n        );\n        if (suspense.deps <= 0) {\n          suspense.resolve();\n        }\n      }\n    }\n  } else {\n    if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n      patch(\n        activeBranch,\n        newBranch,\n        container,\n        anchor,\n        parentComponent,\n        suspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n      setActiveBranch(suspense, newBranch);\n    } else {\n      triggerEvent(n2, \"onPending\");\n      suspense.pendingBranch = newBranch;\n      if (newBranch.shapeFlag & 512) {\n        suspense.pendingId = newBranch.component.suspenseId;\n      } else {\n        suspense.pendingId = suspenseId++;\n      }\n      patch(\n        null,\n        newBranch,\n        suspense.hiddenContainer,\n        null,\n        parentComponent,\n        suspense,\n        namespace,\n        slotScopeIds,\n        optimized\n      );\n      if (suspense.deps <= 0) {\n        suspense.resolve();\n      } else {\n        const { timeout, pendingId } = suspense;\n        if (timeout > 0) {\n          setTimeout(() => {\n            if (suspense.pendingId === pendingId) {\n              suspense.fallback(newFallback);\n            }\n          }, timeout);\n        } else if (timeout === 0) {\n          suspense.fallback(newFallback);\n        }\n      }\n    }\n  }\n}\nfunction createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {\n  const {\n    p: patch,\n    m: move,\n    um: unmount,\n    n: next,\n    o: { parentNode, remove }\n  } = rendererInternals;\n  let parentSuspenseId;\n  const isSuspensible = isVNodeSuspensible(vnode);\n  if (isSuspensible) {\n    if (parentSuspense && parentSuspense.pendingBranch) {\n      parentSuspenseId = parentSuspense.pendingId;\n      parentSuspense.deps++;\n    }\n  }\n  const timeout = vnode.props ? shared.toNumber(vnode.props.timeout) : void 0;\n  const initialAnchor = anchor;\n  const suspense = {\n    vnode,\n    parent: parentSuspense,\n    parentComponent,\n    namespace,\n    container,\n    hiddenContainer,\n    deps: 0,\n    pendingId: suspenseId++,\n    timeout: typeof timeout === \"number\" ? timeout : -1,\n    activeBranch: null,\n    pendingBranch: null,\n    isInFallback: !isHydrating,\n    isHydrating,\n    isUnmounted: false,\n    effects: [],\n    resolve(resume = false, sync = false) {\n      const {\n        vnode: vnode2,\n        activeBranch,\n        pendingBranch,\n        pendingId,\n        effects,\n        parentComponent: parentComponent2,\n        container: container2\n      } = suspense;\n      let delayEnter = false;\n      if (suspense.isHydrating) {\n        suspense.isHydrating = false;\n      } else if (!resume) {\n        delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === \"out-in\";\n        if (delayEnter) {\n          activeBranch.transition.afterLeave = () => {\n            if (pendingId === suspense.pendingId) {\n              move(\n                pendingBranch,\n                container2,\n                anchor === initialAnchor ? next(activeBranch) : anchor,\n                0\n              );\n              queuePostFlushCb(effects);\n            }\n          };\n        }\n        if (activeBranch) {\n          if (parentNode(activeBranch.el) === container2) {\n            anchor = next(activeBranch);\n          }\n          unmount(activeBranch, parentComponent2, suspense, true);\n        }\n        if (!delayEnter) {\n          move(pendingBranch, container2, anchor, 0);\n        }\n      }\n      setActiveBranch(suspense, pendingBranch);\n      suspense.pendingBranch = null;\n      suspense.isInFallback = false;\n      let parent = suspense.parent;\n      let hasUnresolvedAncestor = false;\n      while (parent) {\n        if (parent.pendingBranch) {\n          parent.effects.push(...effects);\n          hasUnresolvedAncestor = true;\n          break;\n        }\n        parent = parent.parent;\n      }\n      if (!hasUnresolvedAncestor && !delayEnter) {\n        queuePostFlushCb(effects);\n      }\n      suspense.effects = [];\n      if (isSuspensible) {\n        if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {\n          parentSuspense.deps--;\n          if (parentSuspense.deps === 0 && !sync) {\n            parentSuspense.resolve();\n          }\n        }\n      }\n      triggerEvent(vnode2, \"onResolve\");\n    },\n    fallback(fallbackVNode) {\n      if (!suspense.pendingBranch) {\n        return;\n      }\n      const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;\n      triggerEvent(vnode2, \"onFallback\");\n      const anchor2 = next(activeBranch);\n      const mountFallback = () => {\n        if (!suspense.isInFallback) {\n          return;\n        }\n        patch(\n          null,\n          fallbackVNode,\n          container2,\n          anchor2,\n          parentComponent2,\n          null,\n          // fallback tree will not have suspense context\n          namespace2,\n          slotScopeIds,\n          optimized\n        );\n        setActiveBranch(suspense, fallbackVNode);\n      };\n      const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === \"out-in\";\n      if (delayEnter) {\n        activeBranch.transition.afterLeave = mountFallback;\n      }\n      suspense.isInFallback = true;\n      unmount(\n        activeBranch,\n        parentComponent2,\n        null,\n        // no suspense so unmount hooks fire now\n        true\n        // shouldRemove\n      );\n      if (!delayEnter) {\n        mountFallback();\n      }\n    },\n    move(container2, anchor2, type) {\n      suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);\n      suspense.container = container2;\n    },\n    next() {\n      return suspense.activeBranch && next(suspense.activeBranch);\n    },\n    registerDep(instance, setupRenderEffect, optimized2) {\n      const isInPendingSuspense = !!suspense.pendingBranch;\n      if (isInPendingSuspense) {\n        suspense.deps++;\n      }\n      const hydratedEl = instance.vnode.el;\n      instance.asyncDep.catch((err) => {\n        handleError(err, instance, 0);\n      }).then((asyncSetupResult) => {\n        if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {\n          return;\n        }\n        instance.asyncResolved = true;\n        const { vnode: vnode2 } = instance;\n        handleSetupResult(instance, asyncSetupResult, false);\n        if (hydratedEl) {\n          vnode2.el = hydratedEl;\n        }\n        const placeholder = !hydratedEl && instance.subTree.el;\n        setupRenderEffect(\n          instance,\n          vnode2,\n          // component may have been moved before resolve.\n          // if this is not a hydration, instance.subTree will be the comment\n          // placeholder.\n          parentNode(hydratedEl || instance.subTree.el),\n          // anchor will not be used if this is hydration, so only need to\n          // consider the comment placeholder case.\n          hydratedEl ? null : next(instance.subTree),\n          suspense,\n          namespace,\n          optimized2\n        );\n        if (placeholder) {\n          remove(placeholder);\n        }\n        updateHOCHostEl(instance, vnode2.el);\n        if (isInPendingSuspense && --suspense.deps === 0) {\n          suspense.resolve();\n        }\n      });\n    },\n    unmount(parentSuspense2, doRemove) {\n      suspense.isUnmounted = true;\n      if (suspense.activeBranch) {\n        unmount(\n          suspense.activeBranch,\n          parentComponent,\n          parentSuspense2,\n          doRemove\n        );\n      }\n      if (suspense.pendingBranch) {\n        unmount(\n          suspense.pendingBranch,\n          parentComponent,\n          parentSuspense2,\n          doRemove\n        );\n      }\n    }\n  };\n  return suspense;\n}\nfunction hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {\n  const suspense = vnode.suspense = createSuspenseBoundary(\n    vnode,\n    parentSuspense,\n    parentComponent,\n    node.parentNode,\n    // eslint-disable-next-line no-restricted-globals\n    document.createElement(\"div\"),\n    null,\n    namespace,\n    slotScopeIds,\n    optimized,\n    rendererInternals,\n    true\n  );\n  const result = hydrateNode(\n    node,\n    suspense.pendingBranch = vnode.ssContent,\n    parentComponent,\n    suspense,\n    slotScopeIds,\n    optimized\n  );\n  if (suspense.deps === 0) {\n    suspense.resolve(false, true);\n  }\n  return result;\n}\nfunction normalizeSuspenseChildren(vnode) {\n  const { shapeFlag, children } = vnode;\n  const isSlotChildren = shapeFlag & 32;\n  vnode.ssContent = normalizeSuspenseSlot(\n    isSlotChildren ? children.default : children\n  );\n  vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);\n}\nfunction normalizeSuspenseSlot(s) {\n  let block;\n  if (shared.isFunction(s)) {\n    const trackBlock = isBlockTreeEnabled && s._c;\n    if (trackBlock) {\n      s._d = false;\n      openBlock();\n    }\n    s = s();\n    if (trackBlock) {\n      s._d = true;\n      block = currentBlock;\n      closeBlock();\n    }\n  }\n  if (shared.isArray(s)) {\n    const singleChild = filterSingleRoot(s);\n    s = singleChild;\n  }\n  s = normalizeVNode(s);\n  if (block && !s.dynamicChildren) {\n    s.dynamicChildren = block.filter((c) => c !== s);\n  }\n  return s;\n}\nfunction queueEffectWithSuspense(fn, suspense) {\n  if (suspense && suspense.pendingBranch) {\n    if (shared.isArray(fn)) {\n      suspense.effects.push(...fn);\n    } else {\n      suspense.effects.push(fn);\n    }\n  } else {\n    queuePostFlushCb(fn);\n  }\n}\nfunction setActiveBranch(suspense, branch) {\n  suspense.activeBranch = branch;\n  const { vnode, parentComponent } = suspense;\n  let el = branch.el;\n  while (!el && branch.component) {\n    branch = branch.component.subTree;\n    el = branch.el;\n  }\n  vnode.el = el;\n  if (parentComponent && parentComponent.subTree === vnode) {\n    parentComponent.vnode.el = el;\n    updateHOCHostEl(parentComponent, el);\n  }\n}\nfunction isVNodeSuspensible(vnode) {\n  const suspensible = vnode.props && vnode.props.suspensible;\n  return suspensible != null && suspensible !== false;\n}\n\nconst Fragment = Symbol.for(\"v-fgt\");\nconst Text = Symbol.for(\"v-txt\");\nconst Comment = Symbol.for(\"v-cmt\");\nconst Static = Symbol.for(\"v-stc\");\nconst blockStack = [];\nlet currentBlock = null;\nfunction openBlock(disableTracking = false) {\n  blockStack.push(currentBlock = disableTracking ? null : []);\n}\nfunction closeBlock() {\n  blockStack.pop();\n  currentBlock = blockStack[blockStack.length - 1] || null;\n}\nlet isBlockTreeEnabled = 1;\nfunction setBlockTracking(value, inVOnce = false) {\n  isBlockTreeEnabled += value;\n  if (value < 0 && currentBlock && inVOnce) {\n    currentBlock.hasOnce = true;\n  }\n}\nfunction setupBlock(vnode) {\n  vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || shared.EMPTY_ARR : null;\n  closeBlock();\n  if (isBlockTreeEnabled > 0 && currentBlock) {\n    currentBlock.push(vnode);\n  }\n  return vnode;\n}\nfunction createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {\n  return setupBlock(\n    createBaseVNode(\n      type,\n      props,\n      children,\n      patchFlag,\n      dynamicProps,\n      shapeFlag,\n      true\n    )\n  );\n}\nfunction createBlock(type, props, children, patchFlag, dynamicProps) {\n  return setupBlock(\n    createVNode(\n      type,\n      props,\n      children,\n      patchFlag,\n      dynamicProps,\n      true\n    )\n  );\n}\nfunction isVNode(value) {\n  return value ? value.__v_isVNode === true : false;\n}\nfunction isSameVNodeType(n1, n2) {\n  return n1.type === n2.type && n1.key === n2.key;\n}\nfunction transformVNodeArgs(transformer) {\n}\nconst normalizeKey = ({ key }) => key != null ? key : null;\nconst normalizeRef = ({\n  ref,\n  ref_key,\n  ref_for\n}) => {\n  if (typeof ref === \"number\") {\n    ref = \"\" + ref;\n  }\n  return ref != null ? shared.isString(ref) || reactivity.isRef(ref) || shared.isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null;\n};\nfunction createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {\n  const vnode = {\n    __v_isVNode: true,\n    __v_skip: true,\n    type,\n    props,\n    key: props && normalizeKey(props),\n    ref: props && normalizeRef(props),\n    scopeId: currentScopeId,\n    slotScopeIds: null,\n    children,\n    component: null,\n    suspense: null,\n    ssContent: null,\n    ssFallback: null,\n    dirs: null,\n    transition: null,\n    el: null,\n    anchor: null,\n    target: null,\n    targetStart: null,\n    targetAnchor: null,\n    staticCount: 0,\n    shapeFlag,\n    patchFlag,\n    dynamicProps,\n    dynamicChildren: null,\n    appContext: null,\n    ctx: currentRenderingInstance\n  };\n  if (needFullChildrenNormalization) {\n    normalizeChildren(vnode, children);\n    if (shapeFlag & 128) {\n      type.normalize(vnode);\n    }\n  } else if (children) {\n    vnode.shapeFlag |= shared.isString(children) ? 8 : 16;\n  }\n  if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself\n  !isBlockNode && // has current parent block\n  currentBlock && // presence of a patch flag indicates this node needs patching on updates.\n  // component nodes also should always be patched, because even if the\n  // component doesn't need to update, it needs to persist the instance on to\n  // the next vnode so that it can be properly unmounted later.\n  (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the\n  // vnode should not be considered dynamic due to handler caching.\n  vnode.patchFlag !== 32) {\n    currentBlock.push(vnode);\n  }\n  return vnode;\n}\nconst createVNode = _createVNode;\nfunction _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {\n  if (!type || type === NULL_DYNAMIC_COMPONENT) {\n    type = Comment;\n  }\n  if (isVNode(type)) {\n    const cloned = cloneVNode(\n      type,\n      props,\n      true\n      /* mergeRef: true */\n    );\n    if (children) {\n      normalizeChildren(cloned, children);\n    }\n    if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {\n      if (cloned.shapeFlag & 6) {\n        currentBlock[currentBlock.indexOf(type)] = cloned;\n      } else {\n        currentBlock.push(cloned);\n      }\n    }\n    cloned.patchFlag = -2;\n    return cloned;\n  }\n  if (isClassComponent(type)) {\n    type = type.__vccOpts;\n  }\n  if (props) {\n    props = guardReactiveProps(props);\n    let { class: klass, style } = props;\n    if (klass && !shared.isString(klass)) {\n      props.class = shared.normalizeClass(klass);\n    }\n    if (shared.isObject(style)) {\n      if (reactivity.isProxy(style) && !shared.isArray(style)) {\n        style = shared.extend({}, style);\n      }\n      props.style = shared.normalizeStyle(style);\n    }\n  }\n  const shapeFlag = shared.isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : shared.isObject(type) ? 4 : shared.isFunction(type) ? 2 : 0;\n  return createBaseVNode(\n    type,\n    props,\n    children,\n    patchFlag,\n    dynamicProps,\n    shapeFlag,\n    isBlockNode,\n    true\n  );\n}\nfunction guardReactiveProps(props) {\n  if (!props) return null;\n  return reactivity.isProxy(props) || isInternalObject(props) ? shared.extend({}, props) : props;\n}\nfunction cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {\n  const { props, ref, patchFlag, children, transition } = vnode;\n  const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;\n  const cloned = {\n    __v_isVNode: true,\n    __v_skip: true,\n    type: vnode.type,\n    props: mergedProps,\n    key: mergedProps && normalizeKey(mergedProps),\n    ref: extraProps && extraProps.ref ? (\n      // #2078 in the case of <component :is=\"vnode\" ref=\"extra\"/>\n      // if the vnode itself already has a ref, cloneVNode will need to merge\n      // the refs so the single vnode can be set on multiple refs\n      mergeRef && ref ? shared.isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps)\n    ) : ref,\n    scopeId: vnode.scopeId,\n    slotScopeIds: vnode.slotScopeIds,\n    children: children,\n    target: vnode.target,\n    targetStart: vnode.targetStart,\n    targetAnchor: vnode.targetAnchor,\n    staticCount: vnode.staticCount,\n    shapeFlag: vnode.shapeFlag,\n    // if the vnode is cloned with extra props, we can no longer assume its\n    // existing patch flag to be reliable and need to add the FULL_PROPS flag.\n    // note: preserve flag for fragments since they use the flag for children\n    // fast paths only.\n    patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,\n    dynamicProps: vnode.dynamicProps,\n    dynamicChildren: vnode.dynamicChildren,\n    appContext: vnode.appContext,\n    dirs: vnode.dirs,\n    transition,\n    // These should technically only be non-null on mounted VNodes. However,\n    // they *should* be copied for kept-alive vnodes. So we just always copy\n    // them since them being non-null during a mount doesn't affect the logic as\n    // they will simply be overwritten.\n    component: vnode.component,\n    suspense: vnode.suspense,\n    ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),\n    ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),\n    placeholder: vnode.placeholder,\n    el: vnode.el,\n    anchor: vnode.anchor,\n    ctx: vnode.ctx,\n    ce: vnode.ce\n  };\n  if (transition && cloneTransition) {\n    setTransitionHooks(\n      cloned,\n      transition.clone(cloned)\n    );\n  }\n  return cloned;\n}\nfunction createTextVNode(text = \" \", flag = 0) {\n  return createVNode(Text, null, text, flag);\n}\nfunction createStaticVNode(content, numberOfNodes) {\n  const vnode = createVNode(Static, null, content);\n  vnode.staticCount = numberOfNodes;\n  return vnode;\n}\nfunction createCommentVNode(text = \"\", asBlock = false) {\n  return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);\n}\nfunction normalizeVNode(child) {\n  if (child == null || typeof child === \"boolean\") {\n    return createVNode(Comment);\n  } else if (shared.isArray(child)) {\n    return createVNode(\n      Fragment,\n      null,\n      // #3666, avoid reference pollution when reusing vnode\n      child.slice()\n    );\n  } else if (isVNode(child)) {\n    return cloneIfMounted(child);\n  } else {\n    return createVNode(Text, null, String(child));\n  }\n}\nfunction cloneIfMounted(child) {\n  return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);\n}\nfunction normalizeChildren(vnode, children) {\n  let type = 0;\n  const { shapeFlag } = vnode;\n  if (children == null) {\n    children = null;\n  } else if (shared.isArray(children)) {\n    type = 16;\n  } else if (typeof children === \"object\") {\n    if (shapeFlag & (1 | 64)) {\n      const slot = children.default;\n      if (slot) {\n        slot._c && (slot._d = false);\n        normalizeChildren(vnode, slot());\n        slot._c && (slot._d = true);\n      }\n      return;\n    } else {\n      type = 32;\n      const slotFlag = children._;\n      if (!slotFlag && !isInternalObject(children)) {\n        children._ctx = currentRenderingInstance;\n      } else if (slotFlag === 3 && currentRenderingInstance) {\n        if (currentRenderingInstance.slots._ === 1) {\n          children._ = 1;\n        } else {\n          children._ = 2;\n          vnode.patchFlag |= 1024;\n        }\n      }\n    }\n  } else if (shared.isFunction(children)) {\n    children = { default: children, _ctx: currentRenderingInstance };\n    type = 32;\n  } else {\n    children = String(children);\n    if (shapeFlag & 64) {\n      type = 16;\n      children = [createTextVNode(children)];\n    } else {\n      type = 8;\n    }\n  }\n  vnode.children = children;\n  vnode.shapeFlag |= type;\n}\nfunction mergeProps(...args) {\n  const ret = {};\n  for (let i = 0; i < args.length; i++) {\n    const toMerge = args[i];\n    for (const key in toMerge) {\n      if (key === \"class\") {\n        if (ret.class !== toMerge.class) {\n          ret.class = shared.normalizeClass([ret.class, toMerge.class]);\n        }\n      } else if (key === \"style\") {\n        ret.style = shared.normalizeStyle([ret.style, toMerge.style]);\n      } else if (shared.isOn(key)) {\n        const existing = ret[key];\n        const incoming = toMerge[key];\n        if (incoming && existing !== incoming && !(shared.isArray(existing) && existing.includes(incoming))) {\n          ret[key] = existing ? [].concat(existing, incoming) : incoming;\n        }\n      } else if (key !== \"\") {\n        ret[key] = toMerge[key];\n      }\n    }\n  }\n  return ret;\n}\nfunction invokeVNodeHook(hook, instance, vnode, prevVNode = null) {\n  callWithAsyncErrorHandling(hook, instance, 7, [\n    vnode,\n    prevVNode\n  ]);\n}\n\nconst emptyAppContext = createAppContext();\nlet uid = 0;\nfunction createComponentInstance(vnode, parent, suspense) {\n  const type = vnode.type;\n  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;\n  const instance = {\n    uid: uid++,\n    vnode,\n    type,\n    parent,\n    appContext,\n    root: null,\n    // to be immediately set\n    next: null,\n    subTree: null,\n    // will be set synchronously right after creation\n    effect: null,\n    update: null,\n    // will be set synchronously right after creation\n    job: null,\n    scope: new reactivity.EffectScope(\n      true\n      /* detached */\n    ),\n    render: null,\n    proxy: null,\n    exposed: null,\n    exposeProxy: null,\n    withProxy: null,\n    provides: parent ? parent.provides : Object.create(appContext.provides),\n    ids: parent ? parent.ids : [\"\", 0, 0],\n    accessCache: null,\n    renderCache: [],\n    // local resolved assets\n    components: null,\n    directives: null,\n    // resolved props and emits options\n    propsOptions: normalizePropsOptions(type, appContext),\n    emitsOptions: normalizeEmitsOptions(type, appContext),\n    // emit\n    emit: null,\n    // to be set immediately\n    emitted: null,\n    // props default value\n    propsDefaults: shared.EMPTY_OBJ,\n    // inheritAttrs\n    inheritAttrs: type.inheritAttrs,\n    // state\n    ctx: shared.EMPTY_OBJ,\n    data: shared.EMPTY_OBJ,\n    props: shared.EMPTY_OBJ,\n    attrs: shared.EMPTY_OBJ,\n    slots: shared.EMPTY_OBJ,\n    refs: shared.EMPTY_OBJ,\n    setupState: shared.EMPTY_OBJ,\n    setupContext: null,\n    // suspense related\n    suspense,\n    suspenseId: suspense ? suspense.pendingId : 0,\n    asyncDep: null,\n    asyncResolved: false,\n    // lifecycle hooks\n    // not using enums here because it results in computed properties\n    isMounted: false,\n    isUnmounted: false,\n    isDeactivated: false,\n    bc: null,\n    c: null,\n    bm: null,\n    m: null,\n    bu: null,\n    u: null,\n    um: null,\n    bum: null,\n    da: null,\n    a: null,\n    rtg: null,\n    rtc: null,\n    ec: null,\n    sp: null\n  };\n  {\n    instance.ctx = { _: instance };\n  }\n  instance.root = parent ? parent.root : instance;\n  instance.emit = emit.bind(null, instance);\n  if (vnode.ce) {\n    vnode.ce(instance);\n  }\n  return instance;\n}\nlet currentInstance = null;\nconst getCurrentInstance = () => currentInstance || currentRenderingInstance;\nlet internalSetCurrentInstance;\nlet setInSSRSetupState;\n{\n  const g = shared.getGlobalThis();\n  const registerGlobalSetter = (key, setter) => {\n    let setters;\n    if (!(setters = g[key])) setters = g[key] = [];\n    setters.push(setter);\n    return (v) => {\n      if (setters.length > 1) setters.forEach((set) => set(v));\n      else setters[0](v);\n    };\n  };\n  internalSetCurrentInstance = registerGlobalSetter(\n    `__VUE_INSTANCE_SETTERS__`,\n    (v) => currentInstance = v\n  );\n  setInSSRSetupState = registerGlobalSetter(\n    `__VUE_SSR_SETTERS__`,\n    (v) => isInSSRComponentSetup = v\n  );\n}\nconst setCurrentInstance = (instance) => {\n  const prev = currentInstance;\n  internalSetCurrentInstance(instance);\n  instance.scope.on();\n  return () => {\n    instance.scope.off();\n    internalSetCurrentInstance(prev);\n  };\n};\nconst unsetCurrentInstance = () => {\n  currentInstance && currentInstance.scope.off();\n  internalSetCurrentInstance(null);\n};\nfunction isStatefulComponent(instance) {\n  return instance.vnode.shapeFlag & 4;\n}\nlet isInSSRComponentSetup = false;\nfunction setupComponent(instance, isSSR = false, optimized = false) {\n  isSSR && setInSSRSetupState(isSSR);\n  const { props, children } = instance.vnode;\n  const isStateful = isStatefulComponent(instance);\n  initProps(instance, props, isStateful, isSSR);\n  initSlots(instance, children, optimized || isSSR);\n  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;\n  isSSR && setInSSRSetupState(false);\n  return setupResult;\n}\nfunction setupStatefulComponent(instance, isSSR) {\n  const Component = instance.type;\n  instance.accessCache = /* @__PURE__ */ Object.create(null);\n  instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);\n  const { setup } = Component;\n  if (setup) {\n    reactivity.pauseTracking();\n    const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;\n    const reset = setCurrentInstance(instance);\n    const setupResult = callWithErrorHandling(\n      setup,\n      instance,\n      0,\n      [\n        instance.props,\n        setupContext\n      ]\n    );\n    const isAsyncSetup = shared.isPromise(setupResult);\n    reactivity.resetTracking();\n    reset();\n    if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {\n      markAsyncBoundary(instance);\n    }\n    if (isAsyncSetup) {\n      setupResult.then(unsetCurrentInstance, unsetCurrentInstance);\n      if (isSSR) {\n        return setupResult.then((resolvedResult) => {\n          handleSetupResult(instance, resolvedResult, isSSR);\n        }).catch((e) => {\n          handleError(e, instance, 0);\n        });\n      } else {\n        instance.asyncDep = setupResult;\n      }\n    } else {\n      handleSetupResult(instance, setupResult, isSSR);\n    }\n  } else {\n    finishComponentSetup(instance, isSSR);\n  }\n}\nfunction handleSetupResult(instance, setupResult, isSSR) {\n  if (shared.isFunction(setupResult)) {\n    if (instance.type.__ssrInlineRender) {\n      instance.ssrRender = setupResult;\n    } else {\n      instance.render = setupResult;\n    }\n  } else if (shared.isObject(setupResult)) {\n    instance.setupState = reactivity.proxyRefs(setupResult);\n  } else ;\n  finishComponentSetup(instance, isSSR);\n}\nlet compile;\nlet installWithProxy;\nfunction registerRuntimeCompiler(_compile) {\n  compile = _compile;\n  installWithProxy = (i) => {\n    if (i.render._rc) {\n      i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);\n    }\n  };\n}\nconst isRuntimeOnly = () => !compile;\nfunction finishComponentSetup(instance, isSSR, skipOptions) {\n  const Component = instance.type;\n  if (!instance.render) {\n    if (!isSSR && compile && !Component.render) {\n      const template = Component.template || resolveMergedOptions(instance).template;\n      if (template) {\n        const { isCustomElement, compilerOptions } = instance.appContext.config;\n        const { delimiters, compilerOptions: componentCompilerOptions } = Component;\n        const finalCompilerOptions = shared.extend(\n          shared.extend(\n            {\n              isCustomElement,\n              delimiters\n            },\n            compilerOptions\n          ),\n          componentCompilerOptions\n        );\n        Component.render = compile(template, finalCompilerOptions);\n      }\n    }\n    instance.render = Component.render || shared.NOOP;\n    if (installWithProxy) {\n      installWithProxy(instance);\n    }\n  }\n  {\n    const reset = setCurrentInstance(instance);\n    reactivity.pauseTracking();\n    try {\n      applyOptions(instance);\n    } finally {\n      reactivity.resetTracking();\n      reset();\n    }\n  }\n}\nconst attrsProxyHandlers = {\n  get(target, key) {\n    reactivity.track(target, \"get\", \"\");\n    return target[key];\n  }\n};\nfunction createSetupContext(instance) {\n  const expose = (exposed) => {\n    instance.exposed = exposed || {};\n  };\n  {\n    return {\n      attrs: new Proxy(instance.attrs, attrsProxyHandlers),\n      slots: instance.slots,\n      emit: instance.emit,\n      expose\n    };\n  }\n}\nfunction getComponentPublicInstance(instance) {\n  if (instance.exposed) {\n    return instance.exposeProxy || (instance.exposeProxy = new Proxy(reactivity.proxyRefs(reactivity.markRaw(instance.exposed)), {\n      get(target, key) {\n        if (key in target) {\n          return target[key];\n        } else if (key in publicPropertiesMap) {\n          return publicPropertiesMap[key](instance);\n        }\n      },\n      has(target, key) {\n        return key in target || key in publicPropertiesMap;\n      }\n    }));\n  } else {\n    return instance.proxy;\n  }\n}\nfunction getComponentName(Component, includeInferred = true) {\n  return shared.isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;\n}\nfunction isClassComponent(value) {\n  return shared.isFunction(value) && \"__vccOpts\" in value;\n}\n\nconst computed = (getterOrOptions, debugOptions) => {\n  const c = reactivity.computed(getterOrOptions, debugOptions, isInSSRComponentSetup);\n  return c;\n};\n\nfunction h(type, propsOrChildren, children) {\n  const l = arguments.length;\n  if (l === 2) {\n    if (shared.isObject(propsOrChildren) && !shared.isArray(propsOrChildren)) {\n      if (isVNode(propsOrChildren)) {\n        return createVNode(type, null, [propsOrChildren]);\n      }\n      return createVNode(type, propsOrChildren);\n    } else {\n      return createVNode(type, null, propsOrChildren);\n    }\n  } else {\n    if (l > 3) {\n      children = Array.prototype.slice.call(arguments, 2);\n    } else if (l === 3 && isVNode(children)) {\n      children = [children];\n    }\n    return createVNode(type, propsOrChildren, children);\n  }\n}\n\nfunction initCustomFormatter() {\n  {\n    return;\n  }\n}\n\nfunction withMemo(memo, render, cache, index) {\n  const cached = cache[index];\n  if (cached && isMemoSame(cached, memo)) {\n    return cached;\n  }\n  const ret = render();\n  ret.memo = memo.slice();\n  ret.cacheIndex = index;\n  return cache[index] = ret;\n}\nfunction isMemoSame(cached, memo) {\n  const prev = cached.memo;\n  if (prev.length != memo.length) {\n    return false;\n  }\n  for (let i = 0; i < prev.length; i++) {\n    if (shared.hasChanged(prev[i], memo[i])) {\n      return false;\n    }\n  }\n  if (isBlockTreeEnabled > 0 && currentBlock) {\n    currentBlock.push(cached);\n  }\n  return true;\n}\n\nconst version = \"3.5.18\";\nconst warn$1 = shared.NOOP;\nconst ErrorTypeStrings = ErrorTypeStrings$1 ;\nconst devtools = void 0;\nconst setDevtoolsHook = shared.NOOP;\nconst _ssrUtils = {\n  createComponentInstance,\n  setupComponent,\n  renderComponentRoot,\n  setCurrentRenderingInstance,\n  isVNode: isVNode,\n  normalizeVNode,\n  getComponentPublicInstance,\n  ensureValidVNode,\n  pushWarningContext,\n  popWarningContext\n};\nconst ssrUtils = _ssrUtils ;\nconst resolveFilter = null;\nconst compatUtils = null;\nconst DeprecationTypes = null;\n\nexports.EffectScope = reactivity.EffectScope;\nexports.ReactiveEffect = reactivity.ReactiveEffect;\nexports.TrackOpTypes = reactivity.TrackOpTypes;\nexports.TriggerOpTypes = reactivity.TriggerOpTypes;\nexports.customRef = reactivity.customRef;\nexports.effect = reactivity.effect;\nexports.effectScope = reactivity.effectScope;\nexports.getCurrentScope = reactivity.getCurrentScope;\nexports.getCurrentWatcher = reactivity.getCurrentWatcher;\nexports.isProxy = reactivity.isProxy;\nexports.isReactive = reactivity.isReactive;\nexports.isReadonly = reactivity.isReadonly;\nexports.isRef = reactivity.isRef;\nexports.isShallow = reactivity.isShallow;\nexports.markRaw = reactivity.markRaw;\nexports.onScopeDispose = reactivity.onScopeDispose;\nexports.onWatcherCleanup = reactivity.onWatcherCleanup;\nexports.proxyRefs = reactivity.proxyRefs;\nexports.reactive = reactivity.reactive;\nexports.readonly = reactivity.readonly;\nexports.ref = reactivity.ref;\nexports.shallowReactive = reactivity.shallowReactive;\nexports.shallowReadonly = reactivity.shallowReadonly;\nexports.shallowRef = reactivity.shallowRef;\nexports.stop = reactivity.stop;\nexports.toRaw = reactivity.toRaw;\nexports.toRef = reactivity.toRef;\nexports.toRefs = reactivity.toRefs;\nexports.toValue = reactivity.toValue;\nexports.triggerRef = reactivity.triggerRef;\nexports.unref = reactivity.unref;\nexports.camelize = shared.camelize;\nexports.capitalize = shared.capitalize;\nexports.normalizeClass = shared.normalizeClass;\nexports.normalizeProps = shared.normalizeProps;\nexports.normalizeStyle = shared.normalizeStyle;\nexports.toDisplayString = shared.toDisplayString;\nexports.toHandlerKey = shared.toHandlerKey;\nexports.BaseTransition = BaseTransition;\nexports.BaseTransitionPropsValidators = BaseTransitionPropsValidators;\nexports.Comment = Comment;\nexports.DeprecationTypes = DeprecationTypes;\nexports.ErrorCodes = ErrorCodes;\nexports.ErrorTypeStrings = ErrorTypeStrings;\nexports.Fragment = Fragment;\nexports.KeepAlive = KeepAlive;\nexports.Static = Static;\nexports.Suspense = Suspense;\nexports.Teleport = Teleport;\nexports.Text = Text;\nexports.assertNumber = assertNumber;\nexports.callWithAsyncErrorHandling = callWithAsyncErrorHandling;\nexports.callWithErrorHandling = callWithErrorHandling;\nexports.cloneVNode = cloneVNode;\nexports.compatUtils = compatUtils;\nexports.computed = computed;\nexports.createBlock = createBlock;\nexports.createCommentVNode = createCommentVNode;\nexports.createElementBlock = createElementBlock;\nexports.createElementVNode = createBaseVNode;\nexports.createHydrationRenderer = createHydrationRenderer;\nexports.createPropsRestProxy = createPropsRestProxy;\nexports.createRenderer = createRenderer;\nexports.createSlots = createSlots;\nexports.createStaticVNode = createStaticVNode;\nexports.createTextVNode = createTextVNode;\nexports.createVNode = createVNode;\nexports.defineAsyncComponent = defineAsyncComponent;\nexports.defineComponent = defineComponent;\nexports.defineEmits = defineEmits;\nexports.defineExpose = defineExpose;\nexports.defineModel = defineModel;\nexports.defineOptions = defineOptions;\nexports.defineProps = defineProps;\nexports.defineSlots = defineSlots;\nexports.devtools = devtools;\nexports.getCurrentInstance = getCurrentInstance;\nexports.getTransitionRawChildren = getTransitionRawChildren;\nexports.guardReactiveProps = guardReactiveProps;\nexports.h = h;\nexports.handleError = handleError;\nexports.hasInjectionContext = hasInjectionContext;\nexports.hydrateOnIdle = hydrateOnIdle;\nexports.hydrateOnInteraction = hydrateOnInteraction;\nexports.hydrateOnMediaQuery = hydrateOnMediaQuery;\nexports.hydrateOnVisible = hydrateOnVisible;\nexports.initCustomFormatter = initCustomFormatter;\nexports.inject = inject;\nexports.isMemoSame = isMemoSame;\nexports.isRuntimeOnly = isRuntimeOnly;\nexports.isVNode = isVNode;\nexports.mergeDefaults = mergeDefaults;\nexports.mergeModels = mergeModels;\nexports.mergeProps = mergeProps;\nexports.nextTick = nextTick;\nexports.onActivated = onActivated;\nexports.onBeforeMount = onBeforeMount;\nexports.onBeforeUnmount = onBeforeUnmount;\nexports.onBeforeUpdate = onBeforeUpdate;\nexports.onDeactivated = onDeactivated;\nexports.onErrorCaptured = onErrorCaptured;\nexports.onMounted = onMounted;\nexports.onRenderTracked = onRenderTracked;\nexports.onRenderTriggered = onRenderTriggered;\nexports.onServerPrefetch = onServerPrefetch;\nexports.onUnmounted = onUnmounted;\nexports.onUpdated = onUpdated;\nexports.openBlock = openBlock;\nexports.popScopeId = popScopeId;\nexports.provide = provide;\nexports.pushScopeId = pushScopeId;\nexports.queuePostFlushCb = queuePostFlushCb;\nexports.registerRuntimeCompiler = registerRuntimeCompiler;\nexports.renderList = renderList;\nexports.renderSlot = renderSlot;\nexports.resolveComponent = resolveComponent;\nexports.resolveDirective = resolveDirective;\nexports.resolveDynamicComponent = resolveDynamicComponent;\nexports.resolveFilter = resolveFilter;\nexports.resolveTransitionHooks = resolveTransitionHooks;\nexports.setBlockTracking = setBlockTracking;\nexports.setDevtoolsHook = setDevtoolsHook;\nexports.setTransitionHooks = setTransitionHooks;\nexports.ssrContextKey = ssrContextKey;\nexports.ssrUtils = ssrUtils;\nexports.toHandlers = toHandlers;\nexports.transformVNodeArgs = transformVNodeArgs;\nexports.useAttrs = useAttrs;\nexports.useId = useId;\nexports.useModel = useModel;\nexports.useSSRContext = useSSRContext;\nexports.useSlots = useSlots;\nexports.useTemplateRef = useTemplateRef;\nexports.useTransitionState = useTransitionState;\nexports.version = version;\nexports.warn = warn$1;\nexports.watch = watch;\nexports.watchEffect = watchEffect;\nexports.watchPostEffect = watchPostEffect;\nexports.watchSyncEffect = watchSyncEffect;\nexports.withAsyncContext = withAsyncContext;\nexports.withCtx = withCtx;\nexports.withDefaults = withDefaults;\nexports.withDirectives = withDirectives;\nexports.withMemo = withMemo;\nexports.withScopeId = withScopeId;\n","'use strict'\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./dist/runtime-core.cjs.prod.js')\n} else {\n  module.exports = require('./dist/runtime-core.cjs.js')\n}\n","/**\n* @vue/runtime-dom v3.5.18\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar runtimeCore = require('@vue/runtime-core');\nvar shared = require('@vue/shared');\n\nlet policy = void 0;\nconst tt = typeof window !== \"undefined\" && window.trustedTypes;\nif (tt) {\n  try {\n    policy = /* @__PURE__ */ tt.createPolicy(\"vue\", {\n      createHTML: (val) => val\n    });\n  } catch (e) {\n  }\n}\nconst unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;\nconst svgNS = \"http://www.w3.org/2000/svg\";\nconst mathmlNS = \"http://www.w3.org/1998/Math/MathML\";\nconst doc = typeof document !== \"undefined\" ? document : null;\nconst templateContainer = doc && /* @__PURE__ */ doc.createElement(\"template\");\nconst nodeOps = {\n  insert: (child, parent, anchor) => {\n    parent.insertBefore(child, anchor || null);\n  },\n  remove: (child) => {\n    const parent = child.parentNode;\n    if (parent) {\n      parent.removeChild(child);\n    }\n  },\n  createElement: (tag, namespace, is, props) => {\n    const el = namespace === \"svg\" ? doc.createElementNS(svgNS, tag) : namespace === \"mathml\" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);\n    if (tag === \"select\" && props && props.multiple != null) {\n      el.setAttribute(\"multiple\", props.multiple);\n    }\n    return el;\n  },\n  createText: (text) => doc.createTextNode(text),\n  createComment: (text) => doc.createComment(text),\n  setText: (node, text) => {\n    node.nodeValue = text;\n  },\n  setElementText: (el, text) => {\n    el.textContent = text;\n  },\n  parentNode: (node) => node.parentNode,\n  nextSibling: (node) => node.nextSibling,\n  querySelector: (selector) => doc.querySelector(selector),\n  setScopeId(el, id) {\n    el.setAttribute(id, \"\");\n  },\n  // __UNSAFE__\n  // Reason: innerHTML.\n  // Static content here can only come from compiled templates.\n  // As long as the user only uses trusted templates, this is safe.\n  insertStaticContent(content, parent, anchor, namespace, start, end) {\n    const before = anchor ? anchor.previousSibling : parent.lastChild;\n    if (start && (start === end || start.nextSibling)) {\n      while (true) {\n        parent.insertBefore(start.cloneNode(true), anchor);\n        if (start === end || !(start = start.nextSibling)) break;\n      }\n    } else {\n      templateContainer.innerHTML = unsafeToTrustedHTML(\n        namespace === \"svg\" ? `<svg>${content}</svg>` : namespace === \"mathml\" ? `<math>${content}</math>` : content\n      );\n      const template = templateContainer.content;\n      if (namespace === \"svg\" || namespace === \"mathml\") {\n        const wrapper = template.firstChild;\n        while (wrapper.firstChild) {\n          template.appendChild(wrapper.firstChild);\n        }\n        template.removeChild(wrapper);\n      }\n      parent.insertBefore(template, anchor);\n    }\n    return [\n      // first\n      before ? before.nextSibling : parent.firstChild,\n      // last\n      anchor ? anchor.previousSibling : parent.lastChild\n    ];\n  }\n};\n\nconst TRANSITION = \"transition\";\nconst ANIMATION = \"animation\";\nconst vtcKey = Symbol(\"_vtc\");\nconst DOMTransitionPropsValidators = {\n  name: String,\n  type: String,\n  css: {\n    type: Boolean,\n    default: true\n  },\n  duration: [String, Number, Object],\n  enterFromClass: String,\n  enterActiveClass: String,\n  enterToClass: String,\n  appearFromClass: String,\n  appearActiveClass: String,\n  appearToClass: String,\n  leaveFromClass: String,\n  leaveActiveClass: String,\n  leaveToClass: String\n};\nconst TransitionPropsValidators = /* @__PURE__ */ shared.extend(\n  {},\n  runtimeCore.BaseTransitionPropsValidators,\n  DOMTransitionPropsValidators\n);\nconst decorate$1 = (t) => {\n  t.displayName = \"Transition\";\n  t.props = TransitionPropsValidators;\n  return t;\n};\nconst Transition = /* @__PURE__ */ decorate$1(\n  (props, { slots }) => runtimeCore.h(runtimeCore.BaseTransition, resolveTransitionProps(props), slots)\n);\nconst callHook = (hook, args = []) => {\n  if (shared.isArray(hook)) {\n    hook.forEach((h2) => h2(...args));\n  } else if (hook) {\n    hook(...args);\n  }\n};\nconst hasExplicitCallback = (hook) => {\n  return hook ? shared.isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;\n};\nfunction resolveTransitionProps(rawProps) {\n  const baseProps = {};\n  for (const key in rawProps) {\n    if (!(key in DOMTransitionPropsValidators)) {\n      baseProps[key] = rawProps[key];\n    }\n  }\n  if (rawProps.css === false) {\n    return baseProps;\n  }\n  const {\n    name = \"v\",\n    type,\n    duration,\n    enterFromClass = `${name}-enter-from`,\n    enterActiveClass = `${name}-enter-active`,\n    enterToClass = `${name}-enter-to`,\n    appearFromClass = enterFromClass,\n    appearActiveClass = enterActiveClass,\n    appearToClass = enterToClass,\n    leaveFromClass = `${name}-leave-from`,\n    leaveActiveClass = `${name}-leave-active`,\n    leaveToClass = `${name}-leave-to`\n  } = rawProps;\n  const durations = normalizeDuration(duration);\n  const enterDuration = durations && durations[0];\n  const leaveDuration = durations && durations[1];\n  const {\n    onBeforeEnter,\n    onEnter,\n    onEnterCancelled,\n    onLeave,\n    onLeaveCancelled,\n    onBeforeAppear = onBeforeEnter,\n    onAppear = onEnter,\n    onAppearCancelled = onEnterCancelled\n  } = baseProps;\n  const finishEnter = (el, isAppear, done, isCancelled) => {\n    el._enterCancelled = isCancelled;\n    removeTransitionClass(el, isAppear ? appearToClass : enterToClass);\n    removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);\n    done && done();\n  };\n  const finishLeave = (el, done) => {\n    el._isLeaving = false;\n    removeTransitionClass(el, leaveFromClass);\n    removeTransitionClass(el, leaveToClass);\n    removeTransitionClass(el, leaveActiveClass);\n    done && done();\n  };\n  const makeEnterHook = (isAppear) => {\n    return (el, done) => {\n      const hook = isAppear ? onAppear : onEnter;\n      const resolve = () => finishEnter(el, isAppear, done);\n      callHook(hook, [el, resolve]);\n      nextFrame(() => {\n        removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);\n        addTransitionClass(el, isAppear ? appearToClass : enterToClass);\n        if (!hasExplicitCallback(hook)) {\n          whenTransitionEnds(el, type, enterDuration, resolve);\n        }\n      });\n    };\n  };\n  return shared.extend(baseProps, {\n    onBeforeEnter(el) {\n      callHook(onBeforeEnter, [el]);\n      addTransitionClass(el, enterFromClass);\n      addTransitionClass(el, enterActiveClass);\n    },\n    onBeforeAppear(el) {\n      callHook(onBeforeAppear, [el]);\n      addTransitionClass(el, appearFromClass);\n      addTransitionClass(el, appearActiveClass);\n    },\n    onEnter: makeEnterHook(false),\n    onAppear: makeEnterHook(true),\n    onLeave(el, done) {\n      el._isLeaving = true;\n      const resolve = () => finishLeave(el, done);\n      addTransitionClass(el, leaveFromClass);\n      if (!el._enterCancelled) {\n        forceReflow();\n        addTransitionClass(el, leaveActiveClass);\n      } else {\n        addTransitionClass(el, leaveActiveClass);\n        forceReflow();\n      }\n      nextFrame(() => {\n        if (!el._isLeaving) {\n          return;\n        }\n        removeTransitionClass(el, leaveFromClass);\n        addTransitionClass(el, leaveToClass);\n        if (!hasExplicitCallback(onLeave)) {\n          whenTransitionEnds(el, type, leaveDuration, resolve);\n        }\n      });\n      callHook(onLeave, [el, resolve]);\n    },\n    onEnterCancelled(el) {\n      finishEnter(el, false, void 0, true);\n      callHook(onEnterCancelled, [el]);\n    },\n    onAppearCancelled(el) {\n      finishEnter(el, true, void 0, true);\n      callHook(onAppearCancelled, [el]);\n    },\n    onLeaveCancelled(el) {\n      finishLeave(el);\n      callHook(onLeaveCancelled, [el]);\n    }\n  });\n}\nfunction normalizeDuration(duration) {\n  if (duration == null) {\n    return null;\n  } else if (shared.isObject(duration)) {\n    return [NumberOf(duration.enter), NumberOf(duration.leave)];\n  } else {\n    const n = NumberOf(duration);\n    return [n, n];\n  }\n}\nfunction NumberOf(val) {\n  const res = shared.toNumber(val);\n  return res;\n}\nfunction addTransitionClass(el, cls) {\n  cls.split(/\\s+/).forEach((c) => c && el.classList.add(c));\n  (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);\n}\nfunction removeTransitionClass(el, cls) {\n  cls.split(/\\s+/).forEach((c) => c && el.classList.remove(c));\n  const _vtc = el[vtcKey];\n  if (_vtc) {\n    _vtc.delete(cls);\n    if (!_vtc.size) {\n      el[vtcKey] = void 0;\n    }\n  }\n}\nfunction nextFrame(cb) {\n  requestAnimationFrame(() => {\n    requestAnimationFrame(cb);\n  });\n}\nlet endId = 0;\nfunction whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {\n  const id = el._endId = ++endId;\n  const resolveIfNotStale = () => {\n    if (id === el._endId) {\n      resolve();\n    }\n  };\n  if (explicitTimeout != null) {\n    return setTimeout(resolveIfNotStale, explicitTimeout);\n  }\n  const { type, timeout, propCount } = getTransitionInfo(el, expectedType);\n  if (!type) {\n    return resolve();\n  }\n  const endEvent = type + \"end\";\n  let ended = 0;\n  const end = () => {\n    el.removeEventListener(endEvent, onEnd);\n    resolveIfNotStale();\n  };\n  const onEnd = (e) => {\n    if (e.target === el && ++ended >= propCount) {\n      end();\n    }\n  };\n  setTimeout(() => {\n    if (ended < propCount) {\n      end();\n    }\n  }, timeout + 1);\n  el.addEventListener(endEvent, onEnd);\n}\nfunction getTransitionInfo(el, expectedType) {\n  const styles = window.getComputedStyle(el);\n  const getStyleProperties = (key) => (styles[key] || \"\").split(\", \");\n  const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);\n  const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);\n  const transitionTimeout = getTimeout(transitionDelays, transitionDurations);\n  const animationDelays = getStyleProperties(`${ANIMATION}Delay`);\n  const animationDurations = getStyleProperties(`${ANIMATION}Duration`);\n  const animationTimeout = getTimeout(animationDelays, animationDurations);\n  let type = null;\n  let timeout = 0;\n  let propCount = 0;\n  if (expectedType === TRANSITION) {\n    if (transitionTimeout > 0) {\n      type = TRANSITION;\n      timeout = transitionTimeout;\n      propCount = transitionDurations.length;\n    }\n  } else if (expectedType === ANIMATION) {\n    if (animationTimeout > 0) {\n      type = ANIMATION;\n      timeout = animationTimeout;\n      propCount = animationDurations.length;\n    }\n  } else {\n    timeout = Math.max(transitionTimeout, animationTimeout);\n    type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;\n    propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;\n  }\n  const hasTransform = type === TRANSITION && /\\b(transform|all)(,|$)/.test(\n    getStyleProperties(`${TRANSITION}Property`).toString()\n  );\n  return {\n    type,\n    timeout,\n    propCount,\n    hasTransform\n  };\n}\nfunction getTimeout(delays, durations) {\n  while (delays.length < durations.length) {\n    delays = delays.concat(delays);\n  }\n  return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));\n}\nfunction toMs(s) {\n  if (s === \"auto\") return 0;\n  return Number(s.slice(0, -1).replace(\",\", \".\")) * 1e3;\n}\nfunction forceReflow() {\n  return document.body.offsetHeight;\n}\n\nfunction patchClass(el, value, isSVG) {\n  const transitionClasses = el[vtcKey];\n  if (transitionClasses) {\n    value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(\" \");\n  }\n  if (value == null) {\n    el.removeAttribute(\"class\");\n  } else if (isSVG) {\n    el.setAttribute(\"class\", value);\n  } else {\n    el.className = value;\n  }\n}\n\nconst vShowOriginalDisplay = Symbol(\"_vod\");\nconst vShowHidden = Symbol(\"_vsh\");\nconst vShow = {\n  beforeMount(el, { value }, { transition }) {\n    el[vShowOriginalDisplay] = el.style.display === \"none\" ? \"\" : el.style.display;\n    if (transition && value) {\n      transition.beforeEnter(el);\n    } else {\n      setDisplay(el, value);\n    }\n  },\n  mounted(el, { value }, { transition }) {\n    if (transition && value) {\n      transition.enter(el);\n    }\n  },\n  updated(el, { value, oldValue }, { transition }) {\n    if (!value === !oldValue) return;\n    if (transition) {\n      if (value) {\n        transition.beforeEnter(el);\n        setDisplay(el, true);\n        transition.enter(el);\n      } else {\n        transition.leave(el, () => {\n          setDisplay(el, false);\n        });\n      }\n    } else {\n      setDisplay(el, value);\n    }\n  },\n  beforeUnmount(el, { value }) {\n    setDisplay(el, value);\n  }\n};\nfunction setDisplay(el, value) {\n  el.style.display = value ? el[vShowOriginalDisplay] : \"none\";\n  el[vShowHidden] = !value;\n}\nfunction initVShowForSSR() {\n  vShow.getSSRProps = ({ value }) => {\n    if (!value) {\n      return { style: { display: \"none\" } };\n    }\n  };\n}\n\nconst CSS_VAR_TEXT = Symbol(\"\");\nfunction useCssVars(getter) {\n  return;\n}\n\nconst displayRE = /(^|;)\\s*display\\s*:/;\nfunction patchStyle(el, prev, next) {\n  const style = el.style;\n  const isCssString = shared.isString(next);\n  let hasControlledDisplay = false;\n  if (next && !isCssString) {\n    if (prev) {\n      if (!shared.isString(prev)) {\n        for (const key in prev) {\n          if (next[key] == null) {\n            setStyle(style, key, \"\");\n          }\n        }\n      } else {\n        for (const prevStyle of prev.split(\";\")) {\n          const key = prevStyle.slice(0, prevStyle.indexOf(\":\")).trim();\n          if (next[key] == null) {\n            setStyle(style, key, \"\");\n          }\n        }\n      }\n    }\n    for (const key in next) {\n      if (key === \"display\") {\n        hasControlledDisplay = true;\n      }\n      setStyle(style, key, next[key]);\n    }\n  } else {\n    if (isCssString) {\n      if (prev !== next) {\n        const cssVarText = style[CSS_VAR_TEXT];\n        if (cssVarText) {\n          next += \";\" + cssVarText;\n        }\n        style.cssText = next;\n        hasControlledDisplay = displayRE.test(next);\n      }\n    } else if (prev) {\n      el.removeAttribute(\"style\");\n    }\n  }\n  if (vShowOriginalDisplay in el) {\n    el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : \"\";\n    if (el[vShowHidden]) {\n      style.display = \"none\";\n    }\n  }\n}\nconst importantRE = /\\s*!important$/;\nfunction setStyle(style, name, val) {\n  if (shared.isArray(val)) {\n    val.forEach((v) => setStyle(style, name, v));\n  } else {\n    if (val == null) val = \"\";\n    if (name.startsWith(\"--\")) {\n      style.setProperty(name, val);\n    } else {\n      const prefixed = autoPrefix(style, name);\n      if (importantRE.test(val)) {\n        style.setProperty(\n          shared.hyphenate(prefixed),\n          val.replace(importantRE, \"\"),\n          \"important\"\n        );\n      } else {\n        style[prefixed] = val;\n      }\n    }\n  }\n}\nconst prefixes = [\"Webkit\", \"Moz\", \"ms\"];\nconst prefixCache = {};\nfunction autoPrefix(style, rawName) {\n  const cached = prefixCache[rawName];\n  if (cached) {\n    return cached;\n  }\n  let name = runtimeCore.camelize(rawName);\n  if (name !== \"filter\" && name in style) {\n    return prefixCache[rawName] = name;\n  }\n  name = shared.capitalize(name);\n  for (let i = 0; i < prefixes.length; i++) {\n    const prefixed = prefixes[i] + name;\n    if (prefixed in style) {\n      return prefixCache[rawName] = prefixed;\n    }\n  }\n  return rawName;\n}\n\nconst xlinkNS = \"http://www.w3.org/1999/xlink\";\nfunction patchAttr(el, key, value, isSVG, instance, isBoolean = shared.isSpecialBooleanAttr(key)) {\n  if (isSVG && key.startsWith(\"xlink:\")) {\n    if (value == null) {\n      el.removeAttributeNS(xlinkNS, key.slice(6, key.length));\n    } else {\n      el.setAttributeNS(xlinkNS, key, value);\n    }\n  } else {\n    if (value == null || isBoolean && !shared.includeBooleanAttr(value)) {\n      el.removeAttribute(key);\n    } else {\n      el.setAttribute(\n        key,\n        isBoolean ? \"\" : shared.isSymbol(value) ? String(value) : value\n      );\n    }\n  }\n}\n\nfunction patchDOMProp(el, key, value, parentComponent, attrName) {\n  if (key === \"innerHTML\" || key === \"textContent\") {\n    if (value != null) {\n      el[key] = key === \"innerHTML\" ? unsafeToTrustedHTML(value) : value;\n    }\n    return;\n  }\n  const tag = el.tagName;\n  if (key === \"value\" && tag !== \"PROGRESS\" && // custom elements may use _value internally\n  !tag.includes(\"-\")) {\n    const oldValue = tag === \"OPTION\" ? el.getAttribute(\"value\") || \"\" : el.value;\n    const newValue = value == null ? (\n      // #11647: value should be set as empty string for null and undefined,\n      // but <input type=\"checkbox\"> should be set as 'on'.\n      el.type === \"checkbox\" ? \"on\" : \"\"\n    ) : String(value);\n    if (oldValue !== newValue || !(\"_value\" in el)) {\n      el.value = newValue;\n    }\n    if (value == null) {\n      el.removeAttribute(key);\n    }\n    el._value = value;\n    return;\n  }\n  let needRemove = false;\n  if (value === \"\" || value == null) {\n    const type = typeof el[key];\n    if (type === \"boolean\") {\n      value = shared.includeBooleanAttr(value);\n    } else if (value == null && type === \"string\") {\n      value = \"\";\n      needRemove = true;\n    } else if (type === \"number\") {\n      value = 0;\n      needRemove = true;\n    }\n  }\n  try {\n    el[key] = value;\n  } catch (e) {\n  }\n  needRemove && el.removeAttribute(attrName || key);\n}\n\nfunction addEventListener(el, event, handler, options) {\n  el.addEventListener(event, handler, options);\n}\nfunction removeEventListener(el, event, handler, options) {\n  el.removeEventListener(event, handler, options);\n}\nconst veiKey = Symbol(\"_vei\");\nfunction patchEvent(el, rawName, prevValue, nextValue, instance = null) {\n  const invokers = el[veiKey] || (el[veiKey] = {});\n  const existingInvoker = invokers[rawName];\n  if (nextValue && existingInvoker) {\n    existingInvoker.value = nextValue;\n  } else {\n    const [name, options] = parseName(rawName);\n    if (nextValue) {\n      const invoker = invokers[rawName] = createInvoker(\n        nextValue,\n        instance\n      );\n      addEventListener(el, name, invoker, options);\n    } else if (existingInvoker) {\n      removeEventListener(el, name, existingInvoker, options);\n      invokers[rawName] = void 0;\n    }\n  }\n}\nconst optionsModifierRE = /(?:Once|Passive|Capture)$/;\nfunction parseName(name) {\n  let options;\n  if (optionsModifierRE.test(name)) {\n    options = {};\n    let m;\n    while (m = name.match(optionsModifierRE)) {\n      name = name.slice(0, name.length - m[0].length);\n      options[m[0].toLowerCase()] = true;\n    }\n  }\n  const event = name[2] === \":\" ? name.slice(3) : shared.hyphenate(name.slice(2));\n  return [event, options];\n}\nlet cachedNow = 0;\nconst p = /* @__PURE__ */ Promise.resolve();\nconst getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());\nfunction createInvoker(initialValue, instance) {\n  const invoker = (e) => {\n    if (!e._vts) {\n      e._vts = Date.now();\n    } else if (e._vts <= invoker.attached) {\n      return;\n    }\n    runtimeCore.callWithAsyncErrorHandling(\n      patchStopImmediatePropagation(e, invoker.value),\n      instance,\n      5,\n      [e]\n    );\n  };\n  invoker.value = initialValue;\n  invoker.attached = getNow();\n  return invoker;\n}\nfunction patchStopImmediatePropagation(e, value) {\n  if (shared.isArray(value)) {\n    const originalStop = e.stopImmediatePropagation;\n    e.stopImmediatePropagation = () => {\n      originalStop.call(e);\n      e._stopped = true;\n    };\n    return value.map(\n      (fn) => (e2) => !e2._stopped && fn && fn(e2)\n    );\n  } else {\n    return value;\n  }\n}\n\nconst isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter\nkey.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;\nconst patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {\n  const isSVG = namespace === \"svg\";\n  if (key === \"class\") {\n    patchClass(el, nextValue, isSVG);\n  } else if (key === \"style\") {\n    patchStyle(el, prevValue, nextValue);\n  } else if (shared.isOn(key)) {\n    if (!shared.isModelListener(key)) {\n      patchEvent(el, key, prevValue, nextValue, parentComponent);\n    }\n  } else if (key[0] === \".\" ? (key = key.slice(1), true) : key[0] === \"^\" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {\n    patchDOMProp(el, key, nextValue);\n    if (!el.tagName.includes(\"-\") && (key === \"value\" || key === \"checked\" || key === \"selected\")) {\n      patchAttr(el, key, nextValue, isSVG, parentComponent, key !== \"value\");\n    }\n  } else if (\n    // #11081 force set props for possible async custom element\n    el._isVueCE && (/[A-Z]/.test(key) || !shared.isString(nextValue))\n  ) {\n    patchDOMProp(el, shared.camelize(key), nextValue, parentComponent, key);\n  } else {\n    if (key === \"true-value\") {\n      el._trueValue = nextValue;\n    } else if (key === \"false-value\") {\n      el._falseValue = nextValue;\n    }\n    patchAttr(el, key, nextValue, isSVG);\n  }\n};\nfunction shouldSetAsProp(el, key, value, isSVG) {\n  if (isSVG) {\n    if (key === \"innerHTML\" || key === \"textContent\") {\n      return true;\n    }\n    if (key in el && isNativeOn(key) && shared.isFunction(value)) {\n      return true;\n    }\n    return false;\n  }\n  if (key === \"spellcheck\" || key === \"draggable\" || key === \"translate\" || key === \"autocorrect\") {\n    return false;\n  }\n  if (key === \"form\") {\n    return false;\n  }\n  if (key === \"list\" && el.tagName === \"INPUT\") {\n    return false;\n  }\n  if (key === \"type\" && el.tagName === \"TEXTAREA\") {\n    return false;\n  }\n  if (key === \"width\" || key === \"height\") {\n    const tag = el.tagName;\n    if (tag === \"IMG\" || tag === \"VIDEO\" || tag === \"CANVAS\" || tag === \"SOURCE\") {\n      return false;\n    }\n  }\n  if (isNativeOn(key) && shared.isString(value)) {\n    return false;\n  }\n  return key in el;\n}\n\nconst REMOVAL = {};\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineCustomElement(options, extraOptions, _createApp) {\n  const Comp = runtimeCore.defineComponent(options, extraOptions);\n  if (shared.isPlainObject(Comp)) shared.extend(Comp, extraOptions);\n  class VueCustomElement extends VueElement {\n    constructor(initialProps) {\n      super(Comp, initialProps, _createApp);\n    }\n  }\n  VueCustomElement.def = Comp;\n  return VueCustomElement;\n}\n/*! #__NO_SIDE_EFFECTS__ */\nconst defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {\n  return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);\n};\nconst BaseClass = typeof HTMLElement !== \"undefined\" ? HTMLElement : class {\n};\nclass VueElement extends BaseClass {\n  constructor(_def, _props = {}, _createApp = createApp) {\n    super();\n    this._def = _def;\n    this._props = _props;\n    this._createApp = _createApp;\n    this._isVueCE = true;\n    /**\n     * @internal\n     */\n    this._instance = null;\n    /**\n     * @internal\n     */\n    this._app = null;\n    /**\n     * @internal\n     */\n    this._nonce = this._def.nonce;\n    this._connected = false;\n    this._resolved = false;\n    this._numberProps = null;\n    this._styleChildren = /* @__PURE__ */ new WeakSet();\n    this._ob = null;\n    if (this.shadowRoot && _createApp !== createApp) {\n      this._root = this.shadowRoot;\n    } else {\n      if (_def.shadowRoot !== false) {\n        this.attachShadow({ mode: \"open\" });\n        this._root = this.shadowRoot;\n      } else {\n        this._root = this;\n      }\n    }\n  }\n  connectedCallback() {\n    if (!this.isConnected) return;\n    if (!this.shadowRoot && !this._resolved) {\n      this._parseSlots();\n    }\n    this._connected = true;\n    let parent = this;\n    while (parent = parent && (parent.parentNode || parent.host)) {\n      if (parent instanceof VueElement) {\n        this._parent = parent;\n        break;\n      }\n    }\n    if (!this._instance) {\n      if (this._resolved) {\n        this._mount(this._def);\n      } else {\n        if (parent && parent._pendingResolve) {\n          this._pendingResolve = parent._pendingResolve.then(() => {\n            this._pendingResolve = void 0;\n            this._resolveDef();\n          });\n        } else {\n          this._resolveDef();\n        }\n      }\n    }\n  }\n  _setParent(parent = this._parent) {\n    if (parent) {\n      this._instance.parent = parent._instance;\n      this._inheritParentContext(parent);\n    }\n  }\n  _inheritParentContext(parent = this._parent) {\n    if (parent && this._app) {\n      Object.setPrototypeOf(\n        this._app._context.provides,\n        parent._instance.provides\n      );\n    }\n  }\n  disconnectedCallback() {\n    this._connected = false;\n    runtimeCore.nextTick(() => {\n      if (!this._connected) {\n        if (this._ob) {\n          this._ob.disconnect();\n          this._ob = null;\n        }\n        this._app && this._app.unmount();\n        if (this._instance) this._instance.ce = void 0;\n        this._app = this._instance = null;\n      }\n    });\n  }\n  /**\n   * resolve inner component definition (handle possible async component)\n   */\n  _resolveDef() {\n    if (this._pendingResolve) {\n      return;\n    }\n    for (let i = 0; i < this.attributes.length; i++) {\n      this._setAttr(this.attributes[i].name);\n    }\n    this._ob = new MutationObserver((mutations) => {\n      for (const m of mutations) {\n        this._setAttr(m.attributeName);\n      }\n    });\n    this._ob.observe(this, { attributes: true });\n    const resolve = (def, isAsync = false) => {\n      this._resolved = true;\n      this._pendingResolve = void 0;\n      const { props, styles } = def;\n      let numberProps;\n      if (props && !shared.isArray(props)) {\n        for (const key in props) {\n          const opt = props[key];\n          if (opt === Number || opt && opt.type === Number) {\n            if (key in this._props) {\n              this._props[key] = shared.toNumber(this._props[key]);\n            }\n            (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[shared.camelize(key)] = true;\n          }\n        }\n      }\n      this._numberProps = numberProps;\n      this._resolveProps(def);\n      if (this.shadowRoot) {\n        this._applyStyles(styles);\n      }\n      this._mount(def);\n    };\n    const asyncDef = this._def.__asyncLoader;\n    if (asyncDef) {\n      this._pendingResolve = asyncDef().then((def) => {\n        def.configureApp = this._def.configureApp;\n        resolve(this._def = def, true);\n      });\n    } else {\n      resolve(this._def);\n    }\n  }\n  _mount(def) {\n    this._app = this._createApp(def);\n    this._inheritParentContext();\n    if (def.configureApp) {\n      def.configureApp(this._app);\n    }\n    this._app._ceVNode = this._createVNode();\n    this._app.mount(this._root);\n    const exposed = this._instance && this._instance.exposed;\n    if (!exposed) return;\n    for (const key in exposed) {\n      if (!shared.hasOwn(this, key)) {\n        Object.defineProperty(this, key, {\n          // unwrap ref to be consistent with public instance behavior\n          get: () => runtimeCore.unref(exposed[key])\n        });\n      }\n    }\n  }\n  _resolveProps(def) {\n    const { props } = def;\n    const declaredPropKeys = shared.isArray(props) ? props : Object.keys(props || {});\n    for (const key of Object.keys(this)) {\n      if (key[0] !== \"_\" && declaredPropKeys.includes(key)) {\n        this._setProp(key, this[key]);\n      }\n    }\n    for (const key of declaredPropKeys.map(shared.camelize)) {\n      Object.defineProperty(this, key, {\n        get() {\n          return this._getProp(key);\n        },\n        set(val) {\n          this._setProp(key, val, true, true);\n        }\n      });\n    }\n  }\n  _setAttr(key) {\n    if (key.startsWith(\"data-v-\")) return;\n    const has = this.hasAttribute(key);\n    let value = has ? this.getAttribute(key) : REMOVAL;\n    const camelKey = shared.camelize(key);\n    if (has && this._numberProps && this._numberProps[camelKey]) {\n      value = shared.toNumber(value);\n    }\n    this._setProp(camelKey, value, false, true);\n  }\n  /**\n   * @internal\n   */\n  _getProp(key) {\n    return this._props[key];\n  }\n  /**\n   * @internal\n   */\n  _setProp(key, val, shouldReflect = true, shouldUpdate = false) {\n    if (val !== this._props[key]) {\n      if (val === REMOVAL) {\n        delete this._props[key];\n      } else {\n        this._props[key] = val;\n        if (key === \"key\" && this._app) {\n          this._app._ceVNode.key = val;\n        }\n      }\n      if (shouldUpdate && this._instance) {\n        this._update();\n      }\n      if (shouldReflect) {\n        const ob = this._ob;\n        ob && ob.disconnect();\n        if (val === true) {\n          this.setAttribute(shared.hyphenate(key), \"\");\n        } else if (typeof val === \"string\" || typeof val === \"number\") {\n          this.setAttribute(shared.hyphenate(key), val + \"\");\n        } else if (!val) {\n          this.removeAttribute(shared.hyphenate(key));\n        }\n        ob && ob.observe(this, { attributes: true });\n      }\n    }\n  }\n  _update() {\n    const vnode = this._createVNode();\n    if (this._app) vnode.appContext = this._app._context;\n    render(vnode, this._root);\n  }\n  _createVNode() {\n    const baseProps = {};\n    if (!this.shadowRoot) {\n      baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);\n    }\n    const vnode = runtimeCore.createVNode(this._def, shared.extend(baseProps, this._props));\n    if (!this._instance) {\n      vnode.ce = (instance) => {\n        this._instance = instance;\n        instance.ce = this;\n        instance.isCE = true;\n        const dispatch = (event, args) => {\n          this.dispatchEvent(\n            new CustomEvent(\n              event,\n              shared.isPlainObject(args[0]) ? shared.extend({ detail: args }, args[0]) : { detail: args }\n            )\n          );\n        };\n        instance.emit = (event, ...args) => {\n          dispatch(event, args);\n          if (shared.hyphenate(event) !== event) {\n            dispatch(shared.hyphenate(event), args);\n          }\n        };\n        this._setParent();\n      };\n    }\n    return vnode;\n  }\n  _applyStyles(styles, owner) {\n    if (!styles) return;\n    if (owner) {\n      if (owner === this._def || this._styleChildren.has(owner)) {\n        return;\n      }\n      this._styleChildren.add(owner);\n    }\n    const nonce = this._nonce;\n    for (let i = styles.length - 1; i >= 0; i--) {\n      const s = document.createElement(\"style\");\n      if (nonce) s.setAttribute(\"nonce\", nonce);\n      s.textContent = styles[i];\n      this.shadowRoot.prepend(s);\n    }\n  }\n  /**\n   * Only called when shadowRoot is false\n   */\n  _parseSlots() {\n    const slots = this._slots = {};\n    let n;\n    while (n = this.firstChild) {\n      const slotName = n.nodeType === 1 && n.getAttribute(\"slot\") || \"default\";\n      (slots[slotName] || (slots[slotName] = [])).push(n);\n      this.removeChild(n);\n    }\n  }\n  /**\n   * Only called when shadowRoot is false\n   */\n  _renderSlots() {\n    const outlets = (this._teleportTarget || this).querySelectorAll(\"slot\");\n    const scopeId = this._instance.type.__scopeId;\n    for (let i = 0; i < outlets.length; i++) {\n      const o = outlets[i];\n      const slotName = o.getAttribute(\"name\") || \"default\";\n      const content = this._slots[slotName];\n      const parent = o.parentNode;\n      if (content) {\n        for (const n of content) {\n          if (scopeId && n.nodeType === 1) {\n            const id = scopeId + \"-s\";\n            const walker = document.createTreeWalker(n, 1);\n            n.setAttribute(id, \"\");\n            let child;\n            while (child = walker.nextNode()) {\n              child.setAttribute(id, \"\");\n            }\n          }\n          parent.insertBefore(n, o);\n        }\n      } else {\n        while (o.firstChild) parent.insertBefore(o.firstChild, o);\n      }\n      parent.removeChild(o);\n    }\n  }\n  /**\n   * @internal\n   */\n  _injectChildStyle(comp) {\n    this._applyStyles(comp.styles, comp);\n  }\n  /**\n   * @internal\n   */\n  _removeChildStyle(comp) {\n  }\n}\nfunction useHost(caller) {\n  const instance = runtimeCore.getCurrentInstance();\n  const el = instance && instance.ce;\n  if (el) {\n    return el;\n  }\n  return null;\n}\nfunction useShadowRoot() {\n  const el = useHost();\n  return el && el.shadowRoot;\n}\n\nfunction useCssModule(name = \"$style\") {\n  {\n    const instance = runtimeCore.getCurrentInstance();\n    if (!instance) {\n      return shared.EMPTY_OBJ;\n    }\n    const modules = instance.type.__cssModules;\n    if (!modules) {\n      return shared.EMPTY_OBJ;\n    }\n    const mod = modules[name];\n    if (!mod) {\n      return shared.EMPTY_OBJ;\n    }\n    return mod;\n  }\n}\n\nconst positionMap = /* @__PURE__ */ new WeakMap();\nconst newPositionMap = /* @__PURE__ */ new WeakMap();\nconst moveCbKey = Symbol(\"_moveCb\");\nconst enterCbKey = Symbol(\"_enterCb\");\nconst decorate = (t) => {\n  delete t.props.mode;\n  return t;\n};\nconst TransitionGroupImpl = /* @__PURE__ */ decorate({\n  name: \"TransitionGroup\",\n  props: /* @__PURE__ */ shared.extend({}, TransitionPropsValidators, {\n    tag: String,\n    moveClass: String\n  }),\n  setup(props, { slots }) {\n    const instance = runtimeCore.getCurrentInstance();\n    const state = runtimeCore.useTransitionState();\n    let prevChildren;\n    let children;\n    runtimeCore.onUpdated(() => {\n      if (!prevChildren.length) {\n        return;\n      }\n      const moveClass = props.moveClass || `${props.name || \"v\"}-move`;\n      if (!hasCSSTransform(\n        prevChildren[0].el,\n        instance.vnode.el,\n        moveClass\n      )) {\n        prevChildren = [];\n        return;\n      }\n      prevChildren.forEach(callPendingCbs);\n      prevChildren.forEach(recordPosition);\n      const movedChildren = prevChildren.filter(applyTranslation);\n      forceReflow();\n      movedChildren.forEach((c) => {\n        const el = c.el;\n        const style = el.style;\n        addTransitionClass(el, moveClass);\n        style.transform = style.webkitTransform = style.transitionDuration = \"\";\n        const cb = el[moveCbKey] = (e) => {\n          if (e && e.target !== el) {\n            return;\n          }\n          if (!e || /transform$/.test(e.propertyName)) {\n            el.removeEventListener(\"transitionend\", cb);\n            el[moveCbKey] = null;\n            removeTransitionClass(el, moveClass);\n          }\n        };\n        el.addEventListener(\"transitionend\", cb);\n      });\n      prevChildren = [];\n    });\n    return () => {\n      const rawProps = runtimeCore.toRaw(props);\n      const cssTransitionProps = resolveTransitionProps(rawProps);\n      let tag = rawProps.tag || runtimeCore.Fragment;\n      prevChildren = [];\n      if (children) {\n        for (let i = 0; i < children.length; i++) {\n          const child = children[i];\n          if (child.el && child.el instanceof Element) {\n            prevChildren.push(child);\n            runtimeCore.setTransitionHooks(\n              child,\n              runtimeCore.resolveTransitionHooks(\n                child,\n                cssTransitionProps,\n                state,\n                instance\n              )\n            );\n            positionMap.set(\n              child,\n              child.el.getBoundingClientRect()\n            );\n          }\n        }\n      }\n      children = slots.default ? runtimeCore.getTransitionRawChildren(slots.default()) : [];\n      for (let i = 0; i < children.length; i++) {\n        const child = children[i];\n        if (child.key != null) {\n          runtimeCore.setTransitionHooks(\n            child,\n            runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance)\n          );\n        }\n      }\n      return runtimeCore.createVNode(tag, null, children);\n    };\n  }\n});\nconst TransitionGroup = TransitionGroupImpl;\nfunction callPendingCbs(c) {\n  const el = c.el;\n  if (el[moveCbKey]) {\n    el[moveCbKey]();\n  }\n  if (el[enterCbKey]) {\n    el[enterCbKey]();\n  }\n}\nfunction recordPosition(c) {\n  newPositionMap.set(c, c.el.getBoundingClientRect());\n}\nfunction applyTranslation(c) {\n  const oldPos = positionMap.get(c);\n  const newPos = newPositionMap.get(c);\n  const dx = oldPos.left - newPos.left;\n  const dy = oldPos.top - newPos.top;\n  if (dx || dy) {\n    const s = c.el.style;\n    s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;\n    s.transitionDuration = \"0s\";\n    return c;\n  }\n}\nfunction hasCSSTransform(el, root, moveClass) {\n  const clone = el.cloneNode();\n  const _vtc = el[vtcKey];\n  if (_vtc) {\n    _vtc.forEach((cls) => {\n      cls.split(/\\s+/).forEach((c) => c && clone.classList.remove(c));\n    });\n  }\n  moveClass.split(/\\s+/).forEach((c) => c && clone.classList.add(c));\n  clone.style.display = \"none\";\n  const container = root.nodeType === 1 ? root : root.parentNode;\n  container.appendChild(clone);\n  const { hasTransform } = getTransitionInfo(clone);\n  container.removeChild(clone);\n  return hasTransform;\n}\n\nconst getModelAssigner = (vnode) => {\n  const fn = vnode.props[\"onUpdate:modelValue\"] || false;\n  return shared.isArray(fn) ? (value) => shared.invokeArrayFns(fn, value) : fn;\n};\nfunction onCompositionStart(e) {\n  e.target.composing = true;\n}\nfunction onCompositionEnd(e) {\n  const target = e.target;\n  if (target.composing) {\n    target.composing = false;\n    target.dispatchEvent(new Event(\"input\"));\n  }\n}\nconst assignKey = Symbol(\"_assign\");\nconst vModelText = {\n  created(el, { modifiers: { lazy, trim, number } }, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n    const castToNumber = number || vnode.props && vnode.props.type === \"number\";\n    addEventListener(el, lazy ? \"change\" : \"input\", (e) => {\n      if (e.target.composing) return;\n      let domValue = el.value;\n      if (trim) {\n        domValue = domValue.trim();\n      }\n      if (castToNumber) {\n        domValue = shared.looseToNumber(domValue);\n      }\n      el[assignKey](domValue);\n    });\n    if (trim) {\n      addEventListener(el, \"change\", () => {\n        el.value = el.value.trim();\n      });\n    }\n    if (!lazy) {\n      addEventListener(el, \"compositionstart\", onCompositionStart);\n      addEventListener(el, \"compositionend\", onCompositionEnd);\n      addEventListener(el, \"change\", onCompositionEnd);\n    }\n  },\n  // set value on mounted so it's after min/max for type=\"range\"\n  mounted(el, { value }) {\n    el.value = value == null ? \"\" : value;\n  },\n  beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n    if (el.composing) return;\n    const elValue = (number || el.type === \"number\") && !/^0\\d/.test(el.value) ? shared.looseToNumber(el.value) : el.value;\n    const newValue = value == null ? \"\" : value;\n    if (elValue === newValue) {\n      return;\n    }\n    if (document.activeElement === el && el.type !== \"range\") {\n      if (lazy && value === oldValue) {\n        return;\n      }\n      if (trim && el.value.trim() === newValue) {\n        return;\n      }\n    }\n    el.value = newValue;\n  }\n};\nconst vModelCheckbox = {\n  // #4096 array checkboxes need to be deep traversed\n  deep: true,\n  created(el, _, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n    addEventListener(el, \"change\", () => {\n      const modelValue = el._modelValue;\n      const elementValue = getValue(el);\n      const checked = el.checked;\n      const assign = el[assignKey];\n      if (shared.isArray(modelValue)) {\n        const index = shared.looseIndexOf(modelValue, elementValue);\n        const found = index !== -1;\n        if (checked && !found) {\n          assign(modelValue.concat(elementValue));\n        } else if (!checked && found) {\n          const filtered = [...modelValue];\n          filtered.splice(index, 1);\n          assign(filtered);\n        }\n      } else if (shared.isSet(modelValue)) {\n        const cloned = new Set(modelValue);\n        if (checked) {\n          cloned.add(elementValue);\n        } else {\n          cloned.delete(elementValue);\n        }\n        assign(cloned);\n      } else {\n        assign(getCheckboxValue(el, checked));\n      }\n    });\n  },\n  // set initial checked on mount to wait for true-value/false-value\n  mounted: setChecked,\n  beforeUpdate(el, binding, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n    setChecked(el, binding, vnode);\n  }\n};\nfunction setChecked(el, { value, oldValue }, vnode) {\n  el._modelValue = value;\n  let checked;\n  if (shared.isArray(value)) {\n    checked = shared.looseIndexOf(value, vnode.props.value) > -1;\n  } else if (shared.isSet(value)) {\n    checked = value.has(vnode.props.value);\n  } else {\n    if (value === oldValue) return;\n    checked = shared.looseEqual(value, getCheckboxValue(el, true));\n  }\n  if (el.checked !== checked) {\n    el.checked = checked;\n  }\n}\nconst vModelRadio = {\n  created(el, { value }, vnode) {\n    el.checked = shared.looseEqual(value, vnode.props.value);\n    el[assignKey] = getModelAssigner(vnode);\n    addEventListener(el, \"change\", () => {\n      el[assignKey](getValue(el));\n    });\n  },\n  beforeUpdate(el, { value, oldValue }, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n    if (value !== oldValue) {\n      el.checked = shared.looseEqual(value, vnode.props.value);\n    }\n  }\n};\nconst vModelSelect = {\n  // <select multiple> value need to be deep traversed\n  deep: true,\n  created(el, { value, modifiers: { number } }, vnode) {\n    const isSetModel = shared.isSet(value);\n    addEventListener(el, \"change\", () => {\n      const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(\n        (o) => number ? shared.looseToNumber(getValue(o)) : getValue(o)\n      );\n      el[assignKey](\n        el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]\n      );\n      el._assigning = true;\n      runtimeCore.nextTick(() => {\n        el._assigning = false;\n      });\n    });\n    el[assignKey] = getModelAssigner(vnode);\n  },\n  // set value in mounted & updated because <select> relies on its children\n  // <option>s.\n  mounted(el, { value }) {\n    setSelected(el, value);\n  },\n  beforeUpdate(el, _binding, vnode) {\n    el[assignKey] = getModelAssigner(vnode);\n  },\n  updated(el, { value }) {\n    if (!el._assigning) {\n      setSelected(el, value);\n    }\n  }\n};\nfunction setSelected(el, value) {\n  const isMultiple = el.multiple;\n  const isArrayValue = shared.isArray(value);\n  if (isMultiple && !isArrayValue && !shared.isSet(value)) {\n    return;\n  }\n  for (let i = 0, l = el.options.length; i < l; i++) {\n    const option = el.options[i];\n    const optionValue = getValue(option);\n    if (isMultiple) {\n      if (isArrayValue) {\n        const optionType = typeof optionValue;\n        if (optionType === \"string\" || optionType === \"number\") {\n          option.selected = value.some((v) => String(v) === String(optionValue));\n        } else {\n          option.selected = shared.looseIndexOf(value, optionValue) > -1;\n        }\n      } else {\n        option.selected = value.has(optionValue);\n      }\n    } else if (shared.looseEqual(getValue(option), value)) {\n      if (el.selectedIndex !== i) el.selectedIndex = i;\n      return;\n    }\n  }\n  if (!isMultiple && el.selectedIndex !== -1) {\n    el.selectedIndex = -1;\n  }\n}\nfunction getValue(el) {\n  return \"_value\" in el ? el._value : el.value;\n}\nfunction getCheckboxValue(el, checked) {\n  const key = checked ? \"_trueValue\" : \"_falseValue\";\n  return key in el ? el[key] : checked;\n}\nconst vModelDynamic = {\n  created(el, binding, vnode) {\n    callModelHook(el, binding, vnode, null, \"created\");\n  },\n  mounted(el, binding, vnode) {\n    callModelHook(el, binding, vnode, null, \"mounted\");\n  },\n  beforeUpdate(el, binding, vnode, prevVNode) {\n    callModelHook(el, binding, vnode, prevVNode, \"beforeUpdate\");\n  },\n  updated(el, binding, vnode, prevVNode) {\n    callModelHook(el, binding, vnode, prevVNode, \"updated\");\n  }\n};\nfunction resolveDynamicModel(tagName, type) {\n  switch (tagName) {\n    case \"SELECT\":\n      return vModelSelect;\n    case \"TEXTAREA\":\n      return vModelText;\n    default:\n      switch (type) {\n        case \"checkbox\":\n          return vModelCheckbox;\n        case \"radio\":\n          return vModelRadio;\n        default:\n          return vModelText;\n      }\n  }\n}\nfunction callModelHook(el, binding, vnode, prevVNode, hook) {\n  const modelToUse = resolveDynamicModel(\n    el.tagName,\n    vnode.props && vnode.props.type\n  );\n  const fn = modelToUse[hook];\n  fn && fn(el, binding, vnode, prevVNode);\n}\nfunction initVModelForSSR() {\n  vModelText.getSSRProps = ({ value }) => ({ value });\n  vModelRadio.getSSRProps = ({ value }, vnode) => {\n    if (vnode.props && shared.looseEqual(vnode.props.value, value)) {\n      return { checked: true };\n    }\n  };\n  vModelCheckbox.getSSRProps = ({ value }, vnode) => {\n    if (shared.isArray(value)) {\n      if (vnode.props && shared.looseIndexOf(value, vnode.props.value) > -1) {\n        return { checked: true };\n      }\n    } else if (shared.isSet(value)) {\n      if (vnode.props && value.has(vnode.props.value)) {\n        return { checked: true };\n      }\n    } else if (value) {\n      return { checked: true };\n    }\n  };\n  vModelDynamic.getSSRProps = (binding, vnode) => {\n    if (typeof vnode.type !== \"string\") {\n      return;\n    }\n    const modelToUse = resolveDynamicModel(\n      // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase\n      vnode.type.toUpperCase(),\n      vnode.props && vnode.props.type\n    );\n    if (modelToUse.getSSRProps) {\n      return modelToUse.getSSRProps(binding, vnode);\n    }\n  };\n}\n\nconst systemModifiers = [\"ctrl\", \"shift\", \"alt\", \"meta\"];\nconst modifierGuards = {\n  stop: (e) => e.stopPropagation(),\n  prevent: (e) => e.preventDefault(),\n  self: (e) => e.target !== e.currentTarget,\n  ctrl: (e) => !e.ctrlKey,\n  shift: (e) => !e.shiftKey,\n  alt: (e) => !e.altKey,\n  meta: (e) => !e.metaKey,\n  left: (e) => \"button\" in e && e.button !== 0,\n  middle: (e) => \"button\" in e && e.button !== 1,\n  right: (e) => \"button\" in e && e.button !== 2,\n  exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))\n};\nconst withModifiers = (fn, modifiers) => {\n  const cache = fn._withMods || (fn._withMods = {});\n  const cacheKey = modifiers.join(\".\");\n  return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {\n    for (let i = 0; i < modifiers.length; i++) {\n      const guard = modifierGuards[modifiers[i]];\n      if (guard && guard(event, modifiers)) return;\n    }\n    return fn(event, ...args);\n  });\n};\nconst keyNames = {\n  esc: \"escape\",\n  space: \" \",\n  up: \"arrow-up\",\n  left: \"arrow-left\",\n  right: \"arrow-right\",\n  down: \"arrow-down\",\n  delete: \"backspace\"\n};\nconst withKeys = (fn, modifiers) => {\n  const cache = fn._withKeys || (fn._withKeys = {});\n  const cacheKey = modifiers.join(\".\");\n  return cache[cacheKey] || (cache[cacheKey] = (event) => {\n    if (!(\"key\" in event)) {\n      return;\n    }\n    const eventKey = shared.hyphenate(event.key);\n    if (modifiers.some(\n      (k) => k === eventKey || keyNames[k] === eventKey\n    )) {\n      return fn(event);\n    }\n  });\n};\n\nconst rendererOptions = /* @__PURE__ */ shared.extend({ patchProp }, nodeOps);\nlet renderer;\nlet enabledHydration = false;\nfunction ensureRenderer() {\n  return renderer || (renderer = runtimeCore.createRenderer(rendererOptions));\n}\nfunction ensureHydrationRenderer() {\n  renderer = enabledHydration ? renderer : runtimeCore.createHydrationRenderer(rendererOptions);\n  enabledHydration = true;\n  return renderer;\n}\nconst render = (...args) => {\n  ensureRenderer().render(...args);\n};\nconst hydrate = (...args) => {\n  ensureHydrationRenderer().hydrate(...args);\n};\nconst createApp = (...args) => {\n  const app = ensureRenderer().createApp(...args);\n  const { mount } = app;\n  app.mount = (containerOrSelector) => {\n    const container = normalizeContainer(containerOrSelector);\n    if (!container) return;\n    const component = app._component;\n    if (!shared.isFunction(component) && !component.render && !component.template) {\n      component.template = container.innerHTML;\n    }\n    if (container.nodeType === 1) {\n      container.textContent = \"\";\n    }\n    const proxy = mount(container, false, resolveRootNamespace(container));\n    if (container instanceof Element) {\n      container.removeAttribute(\"v-cloak\");\n      container.setAttribute(\"data-v-app\", \"\");\n    }\n    return proxy;\n  };\n  return app;\n};\nconst createSSRApp = (...args) => {\n  const app = ensureHydrationRenderer().createApp(...args);\n  const { mount } = app;\n  app.mount = (containerOrSelector) => {\n    const container = normalizeContainer(containerOrSelector);\n    if (container) {\n      return mount(container, true, resolveRootNamespace(container));\n    }\n  };\n  return app;\n};\nfunction resolveRootNamespace(container) {\n  if (container instanceof SVGElement) {\n    return \"svg\";\n  }\n  if (typeof MathMLElement === \"function\" && container instanceof MathMLElement) {\n    return \"mathml\";\n  }\n}\nfunction normalizeContainer(container) {\n  if (shared.isString(container)) {\n    const res = document.querySelector(container);\n    return res;\n  }\n  return container;\n}\nlet ssrDirectiveInitialized = false;\nconst initDirectivesForSSR = () => {\n  if (!ssrDirectiveInitialized) {\n    ssrDirectiveInitialized = true;\n    initVModelForSSR();\n    initVShowForSSR();\n  }\n} ;\n\nexports.Transition = Transition;\nexports.TransitionGroup = TransitionGroup;\nexports.VueElement = VueElement;\nexports.createApp = createApp;\nexports.createSSRApp = createSSRApp;\nexports.defineCustomElement = defineCustomElement;\nexports.defineSSRCustomElement = defineSSRCustomElement;\nexports.hydrate = hydrate;\nexports.initDirectivesForSSR = initDirectivesForSSR;\nexports.render = render;\nexports.useCssModule = useCssModule;\nexports.useCssVars = useCssVars;\nexports.useHost = useHost;\nexports.useShadowRoot = useShadowRoot;\nexports.vModelCheckbox = vModelCheckbox;\nexports.vModelDynamic = vModelDynamic;\nexports.vModelRadio = vModelRadio;\nexports.vModelSelect = vModelSelect;\nexports.vModelText = vModelText;\nexports.vShow = vShow;\nexports.withKeys = withKeys;\nexports.withModifiers = withModifiers;\nObject.keys(runtimeCore).forEach(function (k) {\n  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeCore[k];\n});\n","'use strict'\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./dist/runtime-dom.cjs.prod.js')\n} else {\n  module.exports = require('./dist/runtime-dom.cjs.js')\n}\n","/**\n* vue v3.5.18\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar compilerDom = require('@vue/compiler-dom');\nvar runtimeDom = require('@vue/runtime-dom');\nvar shared = require('@vue/shared');\n\nfunction _interopNamespaceDefault(e) {\n  var n = Object.create(null);\n  if (e) {\n    for (var k in e) {\n      n[k] = e[k];\n    }\n  }\n  n.default = e;\n  return Object.freeze(n);\n}\n\nvar runtimeDom__namespace = /*#__PURE__*/_interopNamespaceDefault(runtimeDom);\n\nconst compileCache = /* @__PURE__ */ Object.create(null);\nfunction compileToFunction(template, options) {\n  if (!shared.isString(template)) {\n    if (template.nodeType) {\n      template = template.innerHTML;\n    } else {\n      return shared.NOOP;\n    }\n  }\n  const key = shared.genCacheKey(template, options);\n  const cached = compileCache[key];\n  if (cached) {\n    return cached;\n  }\n  if (template[0] === \"#\") {\n    const el = document.querySelector(template);\n    template = el ? el.innerHTML : ``;\n  }\n  const opts = shared.extend(\n    {\n      hoistStatic: true,\n      onError: void 0,\n      onWarn: shared.NOOP\n    },\n    options\n  );\n  if (!opts.isCustomElement && typeof customElements !== \"undefined\") {\n    opts.isCustomElement = (tag) => !!customElements.get(tag);\n  }\n  const { code } = compilerDom.compile(template, opts);\n  const render = new Function(\"Vue\", code)(runtimeDom__namespace);\n  render._rc = true;\n  return compileCache[key] = render;\n}\nruntimeDom.registerRuntimeCompiler(compileToFunction);\n\nexports.compile = compileToFunction;\nObject.keys(runtimeDom).forEach(function (k) {\n  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeDom[k];\n});\n","'use strict'\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./dist/vue.cjs.prod.js')\n} else {\n  module.exports = require('./dist/vue.cjs.js')\n}\n","/*!\n  * vue-router v4.5.1\n  * (c) 2025 Eduardo San Martin Morote\n  * @license MIT\n  */\n'use strict';\n\nvar vue = require('vue');\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\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    }\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 (!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        const el = typeof positionEl === 'string'\n            ? isIdSelector\n                ? document.getElementById(positionEl.slice(1))\n                : document.querySelector(positionEl)\n            : positionEl;\n        if (!el) {\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            {\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        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    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('');\n/**\n * Enumeration with all possible types for navigation failures. Can be passed to\n * {@link isNavigationFailure} to check for specific failures.\n */\nexports.NavigationFailureType = void 0;\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})(exports.NavigationFailureType || (exports.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    {\n        return assign(new Error(ErrorTypeMessages[type](params)), {\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(`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    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        // 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            // create the object beforehand, so it can be passed to children\n            matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\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            }\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                    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            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            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}\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    }\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('');\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('');\n/**\n * Allows overriding the router instance returned by `useRouter` in tests. r\n * stands for router\n *\n * @internal\n */\nconst routerKey = Symbol('');\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('');\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('');\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    vue.onUnmounted(removeFromList);\n    vue.onDeactivated(removeFromList);\n    vue.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    const activeRecord = vue.inject(matchedRouteKey, \n    // to avoid warning\n    {}).value;\n    if (!activeRecord) {\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    const activeRecord = vue.inject(matchedRouteKey, \n    // to avoid warning\n    {}).value;\n    if (!activeRecord) {\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, next));\n        let guardCall = Promise.resolve(guardReturn);\n        if (guard.length < 3)\n            guardCall = guardCall.then(next);\n        guardCall.catch(err => reject(err));\n    });\n}\nfunction extractComponentsGuards(matched, guardType, to, from, runWithContext = fn => fn()) {\n    const guards = [];\n    for (const record of matched) {\n        for (const name in record.components) {\n            let rawComponent = record.components[name];\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                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 = vue.inject(routerKey);\n    const currentRoute = vue.inject(routeLocationKey);\n    const route = vue.computed(() => {\n        const to = vue.unref(props.to);\n        return router.resolve(to);\n    });\n    const activeRecordIndex = vue.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 = vue.computed(() => activeRecordIndex.value > -1 &&\n        includesParams(currentRoute.params, route.value.params));\n    const isExactActive = vue.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[vue.unref(props.replace) ? 'replace' : 'push'](vue.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    /**\n     * NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this\n     */\n    return {\n        route,\n        href: vue.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__*/ vue.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 = vue.reactive(useLink(props));\n        const { options } = vue.inject(routerKey);\n        const elClass = vue.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                : vue.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__*/ vue.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        const injectedRoute = vue.inject(routerViewLocationKey);\n        const routeToDisplay = vue.computed(() => props.route || injectedRoute.value);\n        const injectedDepth = vue.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 = vue.computed(() => {\n            let initialDepth = vue.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 = vue.computed(() => routeToDisplay.value.matched[depth.value]);\n        vue.provide(viewDepthKey, vue.computed(() => depth.value + 1));\n        vue.provide(matchedRouteKey, matchedRouteRef);\n        vue.provide(routerViewLocationKey, routeToDisplay);\n        const viewRef = vue.ref();\n        // watch at the same time the component instance, the route record we are\n        // rendering, and the name\n        vue.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 = vue.h(ViewComponent, assign({}, routeProps, attrs, {\n                onVnodeUnmounted,\n                ref: viewRef,\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\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    const beforeGuards = useCallbacks();\n    const beforeResolveGuards = useCallbacks();\n    const afterGuards = useCallbacks();\n    const currentRoute = vue.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            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    }\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            // 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        let matcherLocation;\n        // path could be relative in object as well\n        if (rawLocation.path != null) {\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        // 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        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            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                    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            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 vue.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: () => vue.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                });\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, vue.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        },\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 vue.inject(routerKey);\n}\n/**\n * Returns the current route location. Equivalent to using `$route` inside\n * templates.\n */\nfunction useRoute(_name) {\n    return vue.inject(routeLocationKey);\n}\n\nexports.RouterLink = RouterLink;\nexports.RouterView = RouterView;\nexports.START_LOCATION = START_LOCATION_NORMALIZED;\nexports.createMemoryHistory = createMemoryHistory;\nexports.createRouter = createRouter;\nexports.createRouterMatcher = createRouterMatcher;\nexports.createWebHashHistory = createWebHashHistory;\nexports.createWebHistory = createWebHistory;\nexports.isNavigationFailure = isNavigationFailure;\nexports.loadRouteLocation = loadRouteLocation;\nexports.matchedRouteKey = matchedRouteKey;\nexports.onBeforeRouteLeave = onBeforeRouteLeave;\nexports.onBeforeRouteUpdate = onBeforeRouteUpdate;\nexports.parseQuery = parseQuery;\nexports.routeLocationKey = routeLocationKey;\nexports.routerKey = routerKey;\nexports.routerViewLocationKey = routerViewLocationKey;\nexports.stringifyQuery = stringifyQuery;\nexports.useLink = useLink;\nexports.useRoute = useRoute;\nexports.useRouter = useRouter;\nexports.viewDepthKey = viewDepthKey;\n","'use strict'\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./dist/vue-router.prod.cjs')\n} else {\n  module.exports = require('./dist/vue-router.cjs')\n}\n","//#region rolldown:runtime\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\tkey = keys[i];\n\t\tif (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\tvalue: mod,\n\tenumerable: true\n}) : target, mod));\n\n//#endregion\n\nObject.defineProperty(exports, '__toESM', {\n  enumerable: true,\n  get: function () {\n    return __toESM;\n  }\n});","function serialize(o){return typeof o==\"string\"?`'${o}'`:new c().serialize(o)}const c=/*@__PURE__*/function(){class o{#t=new Map;compare(t,r){const e=typeof t,n=typeof r;return e===\"string\"&&n===\"string\"?t.localeCompare(r):e===\"number\"&&n===\"number\"?t-r:String.prototype.localeCompare.call(this.serialize(t,true),this.serialize(r,true))}serialize(t,r){if(t===null)return \"null\";switch(typeof t){case \"string\":return r?t:`'${t}'`;case \"bigint\":return `${t}n`;case \"object\":return this.$object(t);case \"function\":return this.$function(t)}return String(t)}serializeObject(t){const r=Object.prototype.toString.call(t);if(r!==\"[object Object]\")return this.serializeBuiltInType(r.length<10?`unknown:${r}`:r.slice(8,-1),t);const e=t.constructor,n=e===Object||e===void 0?\"\":e.name;if(n!==\"\"&&globalThis[n]===e)return this.serializeBuiltInType(n,t);if(typeof t.toJSON==\"function\"){const i=t.toJSON();return n+(i!==null&&typeof i==\"object\"?this.$object(i):`(${this.serialize(i)})`)}return this.serializeObjectEntries(n,Object.entries(t))}serializeBuiltInType(t,r){const e=this[\"$\"+t];if(e)return e.call(this,r);if(typeof r?.entries==\"function\")return this.serializeObjectEntries(t,r.entries());throw new Error(`Cannot serialize ${t}`)}serializeObjectEntries(t,r){const e=Array.from(r).sort((i,a)=>this.compare(i[0],a[0]));let n=`${t}{`;for(let i=0;i<e.length;i++){const[a,l]=e[i];n+=`${this.serialize(a,true)}:${this.serialize(l)}`,i<e.length-1&&(n+=\",\");}return n+\"}\"}$object(t){let r=this.#t.get(t);return r===void 0&&(this.#t.set(t,`#${this.#t.size}`),r=this.serializeObject(t),this.#t.set(t,r)),r}$function(t){const r=Function.prototype.toString.call(t);return r.slice(-15)===\"[native code] }\"?`${t.name||\"\"}()[native]`:`${t.name}(${t.length})${r.replace(/\\s*\\n\\s*/g,\"\")}`}$Array(t){let r=\"[\";for(let e=0;e<t.length;e++)r+=this.serialize(t[e]),e<t.length-1&&(r+=\",\");return r+\"]\"}$Date(t){try{return `Date(${t.toISOString()})`}catch{return \"Date(null)\"}}$ArrayBuffer(t){return `ArrayBuffer[${new Uint8Array(t).join(\",\")}]`}$Set(t){return `Set${this.$Array(Array.from(t).sort((r,e)=>this.compare(r,e)))}`}$Map(t){return this.serializeObjectEntries(\"Map\",t.entries())}}for(const s of [\"Error\",\"RegExp\",\"URL\"])o.prototype[\"$\"+s]=function(t){return `${s}(${t})`};for(const s of [\"Int8Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Int16Array\",\"Uint16Array\",\"Int32Array\",\"Uint32Array\",\"Float32Array\",\"Float64Array\"])o.prototype[\"$\"+s]=function(t){return `${s}[${t.join(\",\")}]`};for(const s of [\"BigInt64Array\",\"BigUint64Array\"])o.prototype[\"$\"+s]=function(t){return `${s}[${t.join(\"n,\")}${t.length>0?\"n\":\"\"}]`};return o}();\n\nfunction isEqual(object1, object2) {\n  if (object1 === object2) {\n    return true;\n  }\n  if (serialize(object1) === serialize(object2)) {\n    return true;\n  }\n  return false;\n}\n\nexport { isEqual as i, serialize as s };\n","const z=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],R=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],S=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\",r=[];class k{_data=new l;_hash=new l([...z]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);const s=this._nDataBytes*8,t=this._data.sigBytes*8;return this._data.words[t>>>5]|=128<<24-t%32,this._data.words[(t+64>>>9<<4)+14]=Math.floor(s/4294967296),this._data.words[(t+64>>>9<<4)+15]=s,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,s){const t=this._hash.words;let i=t[0],o=t[1],a=t[2],c=t[3],h=t[4],g=t[5],f=t[6],y=t[7];for(let n=0;n<64;n++){if(n<16)r[n]=e[s+n]|0;else {const d=r[n-15],j=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,B=r[n-2],x=(B<<15|B>>>17)^(B<<13|B>>>19)^B>>>10;r[n]=j+r[n-7]+x+r[n-16];}const m=h&g^~h&f,p=i&o^i&a^o&a,u=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),b=(h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25),w=y+b+m+R[n]+r[n],M=u+p;y=f,f=g,g=h,h=c+w|0,c=a,a=o,o=i,i=w+M|0;}t[0]=t[0]+i|0,t[1]=t[1]+o|0,t[2]=t[2]+a|0,t[3]=t[3]+c|0,t[4]=t[4]+h|0,t[5]=t[5]+g|0,t[6]=t[6]+f|0,t[7]=t[7]+y|0;}_append(e){typeof e==\"string\"&&(e=l.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes;}_process(e){let s,t=this._data.sigBytes/64;e?t=Math.ceil(t):t=Math.max((t|0)-this._minBufferSize,0);const i=t*16,o=Math.min(i*4,this._data.sigBytes);if(i){for(let a=0;a<i;a+=16)this._doProcessBlock(this._data.words,a);s=this._data.words.splice(0,i),this._data.sigBytes-=o;}return new l(s,o)}}class l{words;sigBytes;constructor(e,s){e=this.words=e||[],this.sigBytes=s===void 0?e.length*4:s;}static fromUtf8(e){const s=unescape(encodeURIComponent(e)),t=s.length,i=[];for(let o=0;o<t;o++)i[o>>>2]|=(s.charCodeAt(o)&255)<<24-o%4*8;return new l(i,t)}toBase64(){const e=[];for(let s=0;s<this.sigBytes;s+=3){const t=this.words[s>>>2]>>>24-s%4*8&255,i=this.words[s+1>>>2]>>>24-(s+1)%4*8&255,o=this.words[s+2>>>2]>>>24-(s+2)%4*8&255,a=t<<16|i<<8|o;for(let c=0;c<4&&s*8+c*6<this.sigBytes*8;c++)e.push(S.charAt(a>>>6*(3-c)&63));}return e.join(\"\")}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let s=0;s<e.sigBytes;s++){const t=e.words[s>>>2]>>>24-s%4*8&255;this.words[this.sigBytes+s>>>2]|=t<<24-(this.sigBytes+s)%4*8;}else for(let s=0;s<e.sigBytes;s+=4)this.words[this.sigBytes+s>>>2]=e.words[s>>>2];this.sigBytes+=e.sigBytes;}}function digest(_){return new k().finalize(_).toBase64()}\n\nexport { digest };\n","import { s as serialize } from './shared/ohash.D__AXeF1.mjs';\nexport { i as isEqual } from './shared/ohash.D__AXeF1.mjs';\nimport { digest } from 'ohash/crypto';\nexport { digest } from 'ohash/crypto';\n\nfunction hash(input) {\n  return digest(serialize(input));\n}\n\nexport { hash, serialize };\n","import { isEqual } from 'ohash'\n\n/**\n * The function `areEqual` compares two arrays and returns true if they are equal in length and have\n * the same elements at corresponding indexes.\n * @param {any[]} arrayA - An array of any type of elements.\n * @param {any[]} arrayB - It looks like you haven't provided the value for `arrayB`. Could you please\n * provide the arrayB value so that I can assist you further?\n * @returns The function `areEqual` is returning a boolean value, either `true` if the two input arrays\n * `arrayA` and `arrayB` are equal, or `false` if they are not equal.\n */\nexport function areEqual(arrayA: any[], arrayB: any[]): boolean {\n  if (arrayA.length !== arrayB.length)\n    return false\n\n  for (let index = 0; index < arrayA.length; index++) {\n    if (arrayA[index] !== arrayB[index])\n      return false\n  }\n\n  return true\n}\n\n/**\n * Splits an array into chunks of a given size.\n * @param arr The array to split.\n * @param size The size of each chunk.\n * @returns An array of arrays, where each sub-array has `size` elements from the original array.\n * @example ```ts\n * const arr = [1, 2, 3, 4, 5, 6, 7, 8];\n * const chunks = chunk(arr, 3);\n * // chunks = [[1, 2, 3], [4, 5, 6], [7, 8]]\n * ```\n */\nexport function chunk<T>(arr: T[], size: number): T[][] {\n  const result = []\n  for (let i = 0; i < arr.length; i += size)\n    result.push(arr.slice(i, i + size))\n\n  return result\n}\n\n/**\n * The function `findValuesBetween` takes an array and two values, then returns a subarray containing\n * elements between the first occurrence of the start value and the first occurrence of the end value\n * in the array.\n * @param {T[]} array - The `array` parameter is an array of values of type `T`.\n * @param {T} start - The `start` parameter is the value that marks the beginning of the range you want\n * to find in the array.\n * @param {T} end - The `end` parameter in the `findValuesBetween` function represents the end value\n * that you want to find in the array. This function will return a subarray of values that are between\n * the `start` and `end` values in the original array.\n * @returns The `findValuesBetween` function returns an array of values from the input array that are\n * between the `start` and `end` values (inclusive). If either the `start` or `end` values are not\n * found in the input array, an empty array is returned.\n */\nexport function findValuesBetween<T>(array: T[], start: T, end: T) {\n  const startIndex = array.findIndex(i => isEqual(i, start))\n  const endIndex = array.findIndex(i => isEqual(i, end))\n  if (startIndex === -1 || endIndex === -1)\n    return []\n\n  const [minIndex, maxIndex] = [startIndex, endIndex].sort((a, b) => a - b)\n\n  return array.slice(minIndex, maxIndex + 1)\n}\n","export const isBrowser = typeof document !== 'undefined'\n","/**\n * The `clamp` function restricts a number within a specified range by returning the value itself if it\n * falls within the range, or the closest boundary value if it exceeds the range.\n * @param {number} value - The `value` parameter represents the number that you want to clamp within\n * the specified range defined by `min` and `max` values.\n * @param {number} min - If the `value` parameter is less than the `min` value, the\n * function will return the `min` value.\n * @param {number} max - If the `value` parameter is greater than the `max` value,\n * the function will return `max`.\n * @returns The `clamp` function returns the value of `value` constrained within the range defined by\n * `min` and `max`.\n */\nexport function clamp(value: number, min: number = Number.NEGATIVE_INFINITY, max: number = Number.POSITIVE_INFINITY): number {\n  return Math.min(max, Math.max(min, value))\n}\n\n/**\n * The function `roundToStepPrecision` rounds a number to a specified precision step.\n * @param {number} value - The `value` parameter is the number that you want to round to a specific\n * precision based on the `step` parameter.\n * @param {number} step - The `step` parameter in the `roundToStepPrecision` function represents the\n * interval at which you want to round the `value`. For example, if `step` is 0.5, the `value` will be\n * rounded to the nearest half.\n * @returns the `roundedValue` after rounding it to the precision specified by the `step`.\n */\nexport function roundToStepPrecision(value: number, step: number) {\n  let roundedValue = value\n  const stepString = step.toString()\n  const pointIndex = stepString.indexOf('.')\n  const precision = pointIndex >= 0 ? stepString.length - pointIndex : 0\n  if (precision > 0) {\n    const pow = 10 ** precision\n    roundedValue = Math.round(roundedValue * pow) / pow\n  }\n  return roundedValue\n}\n\n/**\n * The function `snapValueToStep` snaps a given value to the nearest step within a specified range.\n * @param {number} value - The `value` parameter represents the number that you want to snap to the\n * nearest step value.\n * @param {number | undefined} min - The `min` parameter represents the minimum value that the `value`\n * should be snapped to. If `value` is less than `min`, it will be snapped to `min`. If `min` is not\n * provided (undefined), then the snapping will not consider a minimum value.\n * @param {number | undefined} max - The `max` parameter represents the maximum value that the `value`\n * should be snapped to. It ensures that the snapped value does not exceed this maximum value.\n * @param {number} step - The `step` parameter in the `snapValueToStep` function represents the\n * interval at which the `value` should be snapped to. It determines the granularity of the snapping\n * operation. For example, if `step` is 5, the `value` will be snapped to the nearest multiple of\n * @returns a number that has been snapped to the nearest step value within the specified range of minimum and maximum values.\n */\nexport function snapValueToStep(value: number, min: number | undefined, max: number | undefined, step: number): number {\n  min = Number(min)\n  max = Number(max)\n  const remainder = ((value - (Number.isNaN(min) ? 0 : min)) % step)\n  let snappedValue = roundToStepPrecision(Math.abs(remainder) * 2 >= step\n    ? value + Math.sign(remainder) * (step - Math.abs(remainder))\n    : value - remainder, step)\n\n  if (!Number.isNaN(min)) {\n    if (snappedValue < min)\n      snappedValue = min\n    else if (!Number.isNaN(max) && snappedValue > max)\n      snappedValue = min + Math.floor(roundToStepPrecision((max - min) / step, step)) * step\n  }\n  else if (!Number.isNaN(max) && snappedValue > max) {\n    snappedValue = Math.floor(roundToStepPrecision(max / step, step)) * step\n  }\n\n  // correct floating point behavior by rounding to step precision\n  snappedValue = roundToStepPrecision(snappedValue, step)\n\n  return snappedValue\n}\n","import type { InjectionKey } from 'vue'\nimport { inject, provide } from 'vue'\n\n/**\n * @param providerComponentName - The name(s) of the component(s) providing the context.\n *\n * There are situations where context can come from multiple components. In such cases, you might need to give an array of component names to provide your context, instead of just a single string.\n *\n * @param contextName The description for injection key symbol.\n */\nexport function createContext<ContextValue>(\n  providerComponentName: string | string[],\n  contextName?: string,\n) {\n  const symbolDescription\n    = typeof providerComponentName === 'string' && !contextName\n      ? `${providerComponentName}Context`\n      : contextName\n\n  const injectionKey: InjectionKey<ContextValue | null> = Symbol(symbolDescription)\n\n  /**\n   * @param fallback The context value to return if the injection fails.\n   *\n   * @throws When context injection failed and no fallback is specified.\n   * This happens when the component injecting the context is not a child of the root component providing the context.\n   */\n  const injectContext = <\n    T extends ContextValue | null | undefined = ContextValue,\n  >(\n    fallback?: T,\n  ): T extends null ? ContextValue | null : ContextValue => {\n    const context = inject(injectionKey, fallback)\n    if (context)\n      return context\n\n    if (context === null)\n      return context as any\n\n    throw new Error(\n      `Injection \\`${injectionKey.toString()}\\` not found. Component must be used within ${\n        Array.isArray(providerComponentName)\n          ? `one of the following components: ${providerComponentName.join(\n            ', ',\n          )}`\n          : `\\`${providerComponentName}\\``\n      }`,\n    )\n  }\n\n  const provideContext = (contextValue: ContextValue) => {\n    provide(injectionKey, contextValue)\n    return contextValue\n  }\n\n  return [injectContext, provideContext] as const\n}\n","export function getActiveElement(): Element | null {\n  let activeElement = document.activeElement\n  if (activeElement == null) {\n    return null\n  }\n\n  while (activeElement != null && activeElement.shadowRoot != null && activeElement.shadowRoot.activeElement != null) {\n    activeElement = activeElement.shadowRoot.activeElement\n  }\n\n  return activeElement\n}\n","export function handleAndDispatchCustomEvent<\n  E extends CustomEvent,\n  OriginalEvent extends Event,\n>(\n  name: string,\n  handler: ((event: E) => void) | undefined,\n  detail: { originalEvent: OriginalEvent } & (E extends CustomEvent<infer D>\n    ? D\n    : never),\n) {\n  const target = detail.originalEvent.target\n  const event = new CustomEvent(name, {\n    bubbles: false,\n    cancelable: true,\n    detail,\n  })\n  if (handler)\n    target.addEventListener(name, handler as EventListener, { once: true })\n\n  target.dispatchEvent(event)\n}\n","/**\n * Checks whether a given VNode is a render-vialble element.\n */\nexport function isValidVNodeElement(input: any): boolean {\n  return (\n    input\n    && (typeof input.type === 'string'\n      || typeof input.type === 'object'\n      || typeof input.type === 'function')\n  )\n}\n","export function isNullish(value: any): value is null | undefined {\n  return value === null || value === undefined\n}\n","import { isEqual } from 'ohash'\nimport { isNullish } from './nullish'\n\n/**\n * The function `isValueEqualOrExist` checks if a value is equal to or exists in another value or\n * array.\n * @param {T | T[] | undefined} base - It represents the base value that you want to compare with the `current` value.\n * @param {T | T[] | undefined} current - The `current` parameter represents the current value that you want to compare with the `base` value or values.\n * @returns The `isValueEqualOrExist` function returns a boolean value. It checks if the `base` value\n * is equal to the `current` value or if the `current` value exists within the `base` value. The\n * function handles cases where `base` can be a single value, an array of values, or undefined.\n */\nexport function isValueEqualOrExist<T>(base: T | T[] | undefined, current: T | T[] | undefined) {\n  if (isNullish(base))\n    return false\n  if (Array.isArray(base)) {\n    return base.some(val => isEqual(val, current))\n  }\n  else {\n    return isEqual(base, current)\n  }\n}\n","export function pick<T, K extends keyof T>(object: T, keys: K[]): Pick<T, K> {\n  return Object.assign(\n    {},\n    // eslint-disable-next-line array-callback-return\n    ...keys.map((key) => {\n      if (object && Object.hasOwn(object, key))\n        return { [key]: object[key] }\n    }),\n  )\n}\n\nexport function omit<T extends object, K extends keyof T>(obj: T, ...keys: K[]): Omit<T, K> {\n  keys.forEach(key => delete obj[key])\n  return obj\n}\n","import { computed, customRef, effectScope, getCurrentInstance, getCurrentScope, hasInjectionContext, inject, isReactive, isRef, nextTick, onBeforeMount, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, provide, reactive, readonly, ref, shallowReadonly, shallowRef, toRef as toRef$1, toRefs as toRefs$1, toValue, unref, watch, watchEffect } from \"vue\";\n//#region computedEager/index.ts\n/**\n*\n* @deprecated This function will be removed in future version.\n*\n* Note: If you are using Vue 3.4+, you can straight use computed instead.\n* Because in Vue 3.4+, if computed new value does not change,\n* computed, effect, watch, watchEffect, render dependencies will not be triggered.\n* refer: https://github.com/vuejs/core/pull/5912\n*\n* @param fn effect function\n* @param options WatchOptionsBase\n* @returns readonly shallowRef\n*/\nfunction computedEager(fn, options) {\n\tvar _options$flush;\n\tconst result = shallowRef();\n\twatchEffect(() => {\n\t\tresult.value = fn();\n\t}, {\n\t\t...options,\n\t\tflush: (_options$flush = options === null || options === void 0 ? void 0 : options.flush) !== null && _options$flush !== void 0 ? _options$flush : \"sync\"\n\t});\n\treturn readonly(result);\n}\n/** @deprecated use `computedEager` instead */\nconst eagerComputed = computedEager;\n//#endregion\n//#region computedWithControl/index.ts\n/**\n* Explicitly define the deps of computed.\n*\n* @param source\n* @param fn\n*/\nfunction computedWithControl(source, fn, options = {}) {\n\tlet v = void 0;\n\tlet track;\n\tlet trigger;\n\tlet dirty = true;\n\tconst update = () => {\n\t\tdirty = true;\n\t\ttrigger();\n\t};\n\twatch(source, update, {\n\t\tflush: \"sync\",\n\t\t...options\n\t});\n\tconst get = typeof fn === \"function\" ? fn : fn.get;\n\tconst set = typeof fn === \"function\" ? void 0 : fn.set;\n\tconst result = customRef((_track, _trigger) => {\n\t\ttrack = _track;\n\t\ttrigger = _trigger;\n\t\treturn {\n\t\t\tget() {\n\t\t\t\tif (dirty) {\n\t\t\t\t\tv = get(v);\n\t\t\t\t\tdirty = false;\n\t\t\t\t}\n\t\t\t\ttrack();\n\t\t\t\treturn v;\n\t\t\t},\n\t\t\tset(v) {\n\t\t\t\tset === null || set === void 0 || set(v);\n\t\t\t}\n\t\t};\n\t});\n\tresult.trigger = update;\n\treturn result;\n}\n/** @deprecated use `computedWithControl` instead */\nconst controlledComputed = computedWithControl;\n//#endregion\n//#region createDisposableDirective/index.ts\n/**\n* Utility for authoring disposable directives. Reactive effects created within `mounted` directive hook will be tracked and automatically disposed when directive is unmounted.\n*\n* @see https://vueuse.org/createDisposableDirective\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createDisposableDirective(origin = {}) {\n\tfunction isFunc(fn) {\n\t\treturn typeof fn === \"function\";\n\t}\n\tconst normalisedOrigin = isFunc(origin) ? {\n\t\tmounted: origin,\n\t\tupdated: origin\n\t} : origin;\n\tconst { mounted, unmounted } = normalisedOrigin;\n\tif (!isFunc(mounted)) return origin;\n\tconst scopeWeakMap = /* @__PURE__ */ new WeakMap();\n\treturn {\n\t\t...normalisedOrigin,\n\t\tmounted(el, binding, vNode, prevNode) {\n\t\t\tvar _scopeWeakMap$get;\n\t\t\tconst scope = (_scopeWeakMap$get = scopeWeakMap.get(el)) !== null && _scopeWeakMap$get !== void 0 ? _scopeWeakMap$get : effectScope();\n\t\t\tscopeWeakMap.set(el, scope);\n\t\t\tscope.run(() => {\n\t\t\t\tmounted === null || mounted === void 0 || mounted(el, binding, vNode, prevNode);\n\t\t\t});\n\t\t},\n\t\tunmounted(el, binding, vNode, prevNode) {\n\t\t\tvar _scopeWeakMap$get2;\n\t\t\t(_scopeWeakMap$get2 = scopeWeakMap.get(el)) === null || _scopeWeakMap$get2 === void 0 || _scopeWeakMap$get2.stop();\n\t\t\tscopeWeakMap.delete(el);\n\t\t\tif (isFunc(unmounted)) unmounted(el, binding, vNode, prevNode);\n\t\t}\n\t};\n}\n//#endregion\n//#region tryOnScopeDispose/index.ts\n/**\n* Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing\n*\n* @param fn\n*/\nfunction tryOnScopeDispose(fn, failSilently) {\n\tif (getCurrentScope()) {\n\t\tonScopeDispose(fn, failSilently);\n\t\treturn true;\n\t}\n\treturn false;\n}\n//#endregion\n//#region createEventHook/index.ts\n/**\n* Utility for creating event hooks\n*\n* @see https://vueuse.org/createEventHook\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createEventHook() {\n\tconst fns = /* @__PURE__ */ new Set();\n\tconst off = (fn) => {\n\t\tfns.delete(fn);\n\t};\n\tconst clear = () => {\n\t\tfns.clear();\n\t};\n\tconst on = (fn) => {\n\t\tfns.add(fn);\n\t\tconst offFn = () => off(fn);\n\t\ttryOnScopeDispose(offFn);\n\t\treturn { off: offFn };\n\t};\n\tconst trigger = (...args) => {\n\t\treturn Promise.all(Array.from(fns).map((fn) => fn(...args)));\n\t};\n\treturn {\n\t\ton,\n\t\toff,\n\t\ttrigger,\n\t\tclear\n\t};\n}\n//#endregion\n//#region createGlobalState/index.ts\n/**\n* Keep states in the global scope to be reusable across Vue instances.\n*\n* @see https://vueuse.org/createGlobalState\n* @param stateFactory A factory function to create the state\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createGlobalState(stateFactory) {\n\tlet initialized = false;\n\tlet state;\n\tconst scope = effectScope(true);\n\treturn ((...args) => {\n\t\tif (!initialized) {\n\t\t\tstate = scope.run(() => stateFactory(...args));\n\t\t\tinitialized = true;\n\t\t}\n\t\treturn state;\n\t});\n}\n//#endregion\n//#region provideLocal/map.ts\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n//#endregion\n//#region injectLocal/index.ts\n/**\n* On the basis of `inject`, it is allowed to directly call inject to obtain the value after call provide in the same component.\n*\n* @example\n* ```ts\n* injectLocal('MyInjectionKey', 1)\n* const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1\n* ```\n*\n* @__NO_SIDE_EFFECTS__\n*/\nconst injectLocal = (...args) => {\n\tvar _getCurrentInstance;\n\tconst key = args[0];\n\tconst instance = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy;\n\tconst owner = instance !== null && instance !== void 0 ? instance : getCurrentScope();\n\tif (owner == null && !hasInjectionContext()) throw new Error(\"injectLocal must be called in setup\");\n\tif (owner && localProvidedStateMap.has(owner) && key in localProvidedStateMap.get(owner)) return localProvidedStateMap.get(owner)[key];\n\treturn inject(...args);\n};\n//#endregion\n//#region provideLocal/index.ts\n/**\n* On the basis of `provide`, it is allowed to directly call inject to obtain the value after call provide in the same component.\n*\n* @example\n* ```ts\n* provideLocal('MyInjectionKey', 1)\n* const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1\n* ```\n*/\nfunction provideLocal(key, value) {\n\tvar _getCurrentInstance;\n\tconst instance = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy;\n\tconst owner = instance !== null && instance !== void 0 ? instance : getCurrentScope();\n\tif (owner == null) throw new Error(\"provideLocal must be called in setup\");\n\tif (!localProvidedStateMap.has(owner)) localProvidedStateMap.set(owner, Object.create(null));\n\tconst localProvidedState = localProvidedStateMap.get(owner);\n\tlocalProvidedState[key] = value;\n\treturn provide(key, value);\n}\n//#endregion\n//#region createInjectionState/index.ts\nfunction createInjectionState(composable, options) {\n\tconst key = (options === null || options === void 0 ? void 0 : options.injectionKey) || Symbol(composable.name || \"InjectionState\");\n\tconst defaultValue = options === null || options === void 0 ? void 0 : options.defaultValue;\n\tconst useProvidingState = (...args) => {\n\t\tconst state = composable(...args);\n\t\tprovideLocal(key, state);\n\t\treturn state;\n\t};\n\tconst useInjectedState = () => injectLocal(key, defaultValue);\n\treturn [useProvidingState, useInjectedState];\n}\n//#endregion\n//#region createRef/index.ts\n/**\n* Returns a `deepRef` or `shallowRef` depending on the `deep` param.\n*\n* @example createRef(1) // ShallowRef<number>\n* @example createRef(1, false) // ShallowRef<number>\n* @example createRef(1, true) // Ref<number>\n* @example createRef(\"string\") // ShallowRef<string>\n* @example createRef<\"A\"|\"B\">(\"A\", true) // Ref<\"A\"|\"B\">\n*\n* @param value\n* @param deep\n* @returns the `deepRef` or `shallowRef`\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createRef(value, deep) {\n\tif (deep === true) return ref(value);\n\telse return shallowRef(value);\n}\n//#endregion\n//#region utils/is.ts\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isWorker = typeof WorkerGlobalScope !== \"undefined\" && globalThis instanceof WorkerGlobalScope;\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n\tif (!condition) console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {};\nconst rand = (min, max) => {\n\tmin = Math.ceil(min);\n\tmax = Math.floor(max);\n\treturn Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.hasOwn(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n\tvar _window, _window2, _window3;\n\treturn isClient && !!((_window = window) === null || _window === void 0 || (_window = _window.navigator) === null || _window === void 0 ? void 0 : _window.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.navigator) === null || _window2 === void 0 ? void 0 : _window2.maxTouchPoints) > 2 && /iPad|Macintosh/.test((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.navigator.userAgent));\n}\n//#endregion\n//#region toRef/index.ts\nfunction toRef(...args) {\n\tif (args.length !== 1) return toRef$1(...args);\n\tconst r = args[0];\n\treturn typeof r === \"function\" ? readonly(customRef(() => ({\n\t\tget: r,\n\t\tset: noop\n\t}))) : ref(r);\n}\n//#endregion\n//#region utils/filters.ts\n/**\n* @internal\n*/\nfunction createFilterWrapper(filter, fn) {\n\tfunction wrapper(...args) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tPromise.resolve(filter(() => fn.apply(this, args), {\n\t\t\t\tfn,\n\t\t\t\tthisArg: this,\n\t\t\t\targs\n\t\t\t})).then(resolve).catch(reject);\n\t\t});\n\t}\n\treturn wrapper;\n}\nconst bypassFilter = (invoke) => {\n\treturn invoke();\n};\n/**\n* Create an EventFilter that debounce the events\n*/\nfunction debounceFilter(ms, options = {}) {\n\tlet timer;\n\tlet maxTimer;\n\tlet lastRejector = noop;\n\tconst _clearTimeout = (timer) => {\n\t\tclearTimeout(timer);\n\t\tlastRejector();\n\t\tlastRejector = noop;\n\t};\n\tlet lastInvoker;\n\tconst filter = (invoke) => {\n\t\tconst duration = toValue(ms);\n\t\tconst maxDuration = toValue(options.maxWait);\n\t\tif (timer) _clearTimeout(timer);\n\t\tif (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n\t\t\tif (maxTimer) {\n\t\t\t\t_clearTimeout(maxTimer);\n\t\t\t\tmaxTimer = void 0;\n\t\t\t}\n\t\t\treturn Promise.resolve(invoke());\n\t\t}\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlastRejector = options.rejectOnCancel ? reject : resolve;\n\t\t\tlastInvoker = invoke;\n\t\t\tif (maxDuration && !maxTimer) maxTimer = setTimeout(() => {\n\t\t\t\tif (timer) _clearTimeout(timer);\n\t\t\t\tmaxTimer = void 0;\n\t\t\t\tresolve(lastInvoker());\n\t\t\t}, maxDuration);\n\t\t\ttimer = setTimeout(() => {\n\t\t\t\tif (maxTimer) _clearTimeout(maxTimer);\n\t\t\t\tmaxTimer = void 0;\n\t\t\t\tresolve(invoke());\n\t\t\t}, duration);\n\t\t});\n\t};\n\treturn filter;\n}\nfunction throttleFilter(...args) {\n\tlet lastExec = 0;\n\tlet timer;\n\tlet isLeading = true;\n\tlet lastRejector = noop;\n\tlet lastValue;\n\tlet ms;\n\tlet trailing;\n\tlet leading;\n\tlet rejectOnCancel;\n\tif (!isRef(args[0]) && typeof args[0] === \"object\") ({delay: ms, trailing = true, leading = true, rejectOnCancel = false} = args[0]);\n\telse [ms, trailing = true, leading = true, rejectOnCancel = false] = args;\n\tconst clear = () => {\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = void 0;\n\t\t\tlastRejector();\n\t\t\tlastRejector = noop;\n\t\t}\n\t};\n\tconst filter = (_invoke) => {\n\t\tconst duration = toValue(ms);\n\t\tconst elapsed = Date.now() - lastExec;\n\t\tconst invoke = () => {\n\t\t\treturn lastValue = _invoke();\n\t\t};\n\t\tclear();\n\t\tif (duration <= 0) {\n\t\t\tlastExec = Date.now();\n\t\t\treturn invoke();\n\t\t}\n\t\tif (elapsed > duration) {\n\t\t\tlastExec = Date.now();\n\t\t\tif (leading || !isLeading) invoke();\n\t\t} else if (trailing) lastValue = new Promise((resolve, reject) => {\n\t\t\tlastRejector = rejectOnCancel ? reject : resolve;\n\t\t\ttimer = setTimeout(() => {\n\t\t\t\tlastExec = Date.now();\n\t\t\t\tisLeading = true;\n\t\t\t\tresolve(invoke());\n\t\t\t\tclear();\n\t\t\t}, Math.max(0, duration - elapsed));\n\t\t});\n\t\tif (!leading && !timer) timer = setTimeout(() => isLeading = true, duration);\n\t\tisLeading = false;\n\t\treturn lastValue;\n\t};\n\treturn filter;\n}\n/**\n* EventFilter that gives extra controls to pause and resume the filter\n*\n* @param extendFilter  Extra filter to apply when the PausableFilter is active, default to none\n* @param options Options to configure the filter\n*/\nfunction pausableFilter(extendFilter = bypassFilter, options = {}) {\n\tconst { initialState = \"active\" } = options;\n\tconst isActive = toRef(initialState === \"active\");\n\tfunction pause() {\n\t\tisActive.value = false;\n\t}\n\tfunction resume() {\n\t\tisActive.value = true;\n\t}\n\tconst eventFilter = (...args) => {\n\t\tif (isActive.value) extendFilter(...args);\n\t};\n\treturn {\n\t\tisActive: shallowReadonly(isActive),\n\t\tpause,\n\t\tresume,\n\t\teventFilter\n\t};\n}\n//#endregion\n//#region utils/general.ts\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n\treturn new Promise((resolve, reject) => {\n\t\tif (throwOnTimeout) setTimeout(reject, ms, reason);\n\t\telse setTimeout(resolve, ms);\n\t});\n}\nfunction identity(arg) {\n\treturn arg;\n}\n/**\n* Create singleton promise function\n*\n* @example\n* ```\n* const promise = createSingletonPromise(async () => { ... })\n*\n* await promise()\n* await promise() // all of them will be bind to a single promise instance\n* await promise() // and be resolved together\n* ```\n*/\nfunction createSingletonPromise(fn) {\n\tlet _promise;\n\tfunction wrapper() {\n\t\tif (!_promise) _promise = fn();\n\t\treturn _promise;\n\t}\n\twrapper.reset = async () => {\n\t\tconst _prev = _promise;\n\t\t_promise = void 0;\n\t\tif (_prev) await _prev;\n\t};\n\treturn wrapper;\n}\nfunction invoke(fn) {\n\treturn fn();\n}\nfunction containsProp(obj, ...props) {\n\treturn props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n\tvar _target$match;\n\tif (typeof target === \"number\") return target + delta;\n\tconst value = ((_target$match = target.match(/^-?\\d+\\.?\\d*/)) === null || _target$match === void 0 ? void 0 : _target$match[0]) || \"\";\n\tconst unit = target.slice(value.length);\n\tconst result = Number.parseFloat(value) + delta;\n\tif (Number.isNaN(result)) return target;\n\treturn result + unit;\n}\n/**\n* Get a px value for SSR use, do not rely on this method outside of SSR as REM unit is assumed at 16px, which might not be the case on the client\n*/\nfunction pxValue(px) {\n\treturn px.endsWith(\"rem\") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);\n}\n/**\n* Create a new subset object by giving keys\n*/\nfunction objectPick(obj, keys, omitUndefined = false) {\n\treturn keys.reduce((n, k) => {\n\t\tif (k in obj) {\n\t\t\tif (!omitUndefined || obj[k] !== void 0) n[k] = obj[k];\n\t\t}\n\t\treturn n;\n\t}, {});\n}\n/**\n* Create a new subset object by omit giving keys\n*/\nfunction objectOmit(obj, keys, omitUndefined = false) {\n\treturn Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n\t\treturn (!omitUndefined || value !== void 0) && !keys.includes(key);\n\t}));\n}\nfunction objectEntries(obj) {\n\treturn Object.entries(obj);\n}\nfunction toArray(value) {\n\treturn Array.isArray(value) ? value : [value];\n}\n//#endregion\n//#region utils/port.ts\nfunction cacheStringFunction(fn) {\n\tconst cache = Object.create(null);\n\treturn ((str) => {\n\t\treturn cache[str] || (cache[str] = fn(str));\n\t});\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n\treturn str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n//#endregion\n//#region utils/vue.ts\nfunction getLifeCycleTarget(target) {\n\treturn target || getCurrentInstance();\n}\n//#endregion\n//#region createSharedComposable/index.ts\n/**\n* Make a composable function usable with multiple Vue instances.\n*\n* @see https://vueuse.org/createSharedComposable\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createSharedComposable(composable) {\n\tif (!isClient) return composable;\n\tlet subscribers = 0;\n\tlet state;\n\tlet scope;\n\tconst dispose = () => {\n\t\tsubscribers -= 1;\n\t\tif (scope && subscribers <= 0) {\n\t\t\tscope.stop();\n\t\t\tstate = void 0;\n\t\t\tscope = void 0;\n\t\t}\n\t};\n\treturn ((...args) => {\n\t\tsubscribers += 1;\n\t\tif (!scope) {\n\t\t\tscope = effectScope(true);\n\t\t\tstate = scope.run(() => composable(...args));\n\t\t}\n\t\ttryOnScopeDispose(dispose);\n\t\treturn state;\n\t});\n}\n//#endregion\n//#region extendRef/index.ts\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n\tfor (const [key, value] of Object.entries(extend)) {\n\t\tif (key === \"value\") continue;\n\t\tif (isRef(value) && unwrap) Object.defineProperty(ref, key, {\n\t\t\tget() {\n\t\t\t\treturn value.value;\n\t\t\t},\n\t\t\tset(v) {\n\t\t\t\tvalue.value = v;\n\t\t\t},\n\t\t\tenumerable\n\t\t});\n\t\telse Object.defineProperty(ref, key, {\n\t\t\tvalue,\n\t\t\tenumerable\n\t\t});\n\t}\n\treturn ref;\n}\n//#endregion\n//#region get/index.ts\nfunction get(obj, key) {\n\tif (key == null) return unref(obj);\n\treturn unref(obj)[key];\n}\n//#endregion\n//#region isDefined/index.ts\nfunction isDefined(v) {\n\treturn unref(v) != null;\n}\n//#endregion\n//#region makeDestructurable/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction makeDestructurable(obj, arr) {\n\tif (typeof Symbol !== \"undefined\") {\n\t\tconst clone = { ...obj };\n\t\tObject.defineProperty(clone, Symbol.iterator, {\n\t\t\tenumerable: false,\n\t\t\tvalue() {\n\t\t\t\tlet index = 0;\n\t\t\t\treturn { next: () => ({\n\t\t\t\t\tvalue: arr[index++],\n\t\t\t\t\tdone: index > arr.length\n\t\t\t\t}) };\n\t\t\t}\n\t\t});\n\t\treturn clone;\n\t} else return Object.assign([...arr], obj);\n}\n//#endregion\n//#region reactify/index.ts\n/**\n* Converts plain function into a reactive function.\n* The converted function accepts refs as it's arguments\n* and returns a ComputedRef, with proper typing.\n*\n* @param fn - Source function\n* @param options - Options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction reactify(fn, options) {\n\tconst unrefFn = (options === null || options === void 0 ? void 0 : options.computedGetter) === false ? unref : toValue;\n\treturn function(...args) {\n\t\treturn computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n\t};\n}\n/** @deprecated use `reactify` instead */\nconst createReactiveFn = reactify;\n//#endregion\n//#region reactifyObject/index.ts\n/**\n* Apply `reactify` to an object\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n\tlet keys = [];\n\tlet options;\n\tif (Array.isArray(optionsOrKeys)) keys = optionsOrKeys;\n\telse {\n\t\toptions = optionsOrKeys;\n\t\tconst { includeOwnProperties = true } = optionsOrKeys;\n\t\tkeys.push(...Object.keys(obj));\n\t\tif (includeOwnProperties) keys.push(...Object.getOwnPropertyNames(obj));\n\t}\n\treturn Object.fromEntries(keys.map((key) => {\n\t\tconst value = obj[key];\n\t\treturn [key, typeof value === \"function\" ? reactify(value.bind(obj), options) : value];\n\t}));\n}\n//#endregion\n//#region toReactive/index.ts\n/**\n* Converts ref to reactive.\n*\n* @see https://vueuse.org/toReactive\n* @param objectRef A ref of object\n*/\nfunction toReactive(objectRef) {\n\tif (!isRef(objectRef)) return reactive(objectRef);\n\treturn reactive(new Proxy({}, {\n\t\tget(_, p, receiver) {\n\t\t\treturn unref(Reflect.get(objectRef.value, p, receiver));\n\t\t},\n\t\tset(_, p, value) {\n\t\t\tif (isRef(objectRef.value[p]) && !isRef(value)) objectRef.value[p].value = value;\n\t\t\telse objectRef.value[p] = value;\n\t\t\treturn true;\n\t\t},\n\t\tdeleteProperty(_, p) {\n\t\t\treturn Reflect.deleteProperty(objectRef.value, p);\n\t\t},\n\t\thas(_, p) {\n\t\t\treturn Reflect.has(objectRef.value, p);\n\t\t},\n\t\townKeys() {\n\t\t\treturn Object.keys(objectRef.value);\n\t\t},\n\t\tgetOwnPropertyDescriptor() {\n\t\t\treturn {\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true\n\t\t\t};\n\t\t}\n\t}));\n}\n//#endregion\n//#region reactiveComputed/index.ts\n/**\n* Computed reactive object.\n*/\nfunction reactiveComputed(fn) {\n\treturn toReactive(computed(fn));\n}\n//#endregion\n//#region reactiveOmit/index.ts\n/**\n* Reactively omit fields from a reactive object\n*\n* @see https://vueuse.org/reactiveOmit\n*/\nfunction reactiveOmit(obj, ...keys) {\n\tconst flatKeys = keys.flat();\n\tconst predicate = flatKeys[0];\n\treturn reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n//#endregion\n//#region reactivePick/index.ts\n/**\n* Reactively pick fields from a reactive object\n*\n* @see https://vueuse.org/reactivePick\n*/\nfunction reactivePick(obj, ...keys) {\n\tconst flatKeys = keys.flat();\n\tconst predicate = flatKeys[0];\n\treturn reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n//#endregion\n//#region refAutoReset/index.ts\n/**\n* Create a ref which will be reset to the default value after some time.\n*\n* @see https://vueuse.org/refAutoReset\n* @param defaultValue The value which will be set.\n* @param afterMs      A zero-or-greater delay in milliseconds.\n*/\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n\treturn customRef((track, trigger) => {\n\t\tlet value = toValue(defaultValue);\n\t\tlet timer;\n\t\tconst resetAfter = () => setTimeout(() => {\n\t\t\tvalue = toValue(defaultValue);\n\t\t\ttrigger();\n\t\t}, toValue(afterMs));\n\t\ttryOnScopeDispose(() => {\n\t\t\tclearTimeout(timer);\n\t\t});\n\t\treturn {\n\t\t\tget() {\n\t\t\t\ttrack();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\tset(newValue) {\n\t\t\t\tvalue = newValue;\n\t\t\t\ttrigger();\n\t\t\t\tclearTimeout(timer);\n\t\t\t\ttimer = resetAfter();\n\t\t\t}\n\t\t};\n\t});\n}\n/** @deprecated use `refAutoReset` instead */\nconst autoResetRef = refAutoReset;\n//#endregion\n//#region useDebounceFn/index.ts\n/**\n* Debounce execution of a function.\n*\n* @see https://vueuse.org/useDebounceFn\n* @param  fn          A function to be executed after delay milliseconds debounced.\n* @param  ms          A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n* @param  options     Options\n*\n* @return A new, debounce, function.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n\treturn createFilterWrapper(debounceFilter(ms, options), fn);\n}\n//#endregion\n//#region refDebounced/index.ts\n/**\n* Debounce updates of a ref.\n*\n* @return A new debounced ref.\n*/\nfunction refDebounced(value, ms = 200, options = {}) {\n\tconst debounced = ref(toValue(value));\n\tconst updater = useDebounceFn(() => {\n\t\tdebounced.value = value.value;\n\t}, ms, options);\n\twatch(value, () => updater());\n\treturn shallowReadonly(debounced);\n}\n/** @deprecated use `refDebounced` instead */\nconst debouncedRef = refDebounced;\n/** @deprecated use `refDebounced` instead */\nconst useDebounce = refDebounced;\n//#endregion\n//#region refDefault/index.ts\n/**\n* Apply default value to a ref.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction refDefault(source, defaultValue) {\n\treturn computed({\n\t\tget() {\n\t\t\tvar _source$value;\n\t\t\treturn (_source$value = source.value) !== null && _source$value !== void 0 ? _source$value : defaultValue;\n\t\t},\n\t\tset(value) {\n\t\t\tsource.value = value;\n\t\t}\n\t});\n}\n//#endregion\n//#region refManualReset/index.ts\n/**\n* Create a ref with manual reset functionality.\n*\n* @see https://vueuse.org/refManualReset\n* @param defaultValue The value which will be set.\n*/\nfunction refManualReset(defaultValue) {\n\tlet value = toValue(defaultValue);\n\tlet trigger;\n\tconst reset = () => {\n\t\tvalue = toValue(defaultValue);\n\t\ttrigger();\n\t};\n\tconst refValue = customRef((track, _trigger) => {\n\t\ttrigger = _trigger;\n\t\treturn {\n\t\t\tget() {\n\t\t\t\ttrack();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\tset(newValue) {\n\t\t\t\tvalue = newValue;\n\t\t\t\ttrigger();\n\t\t\t}\n\t\t};\n\t});\n\trefValue.reset = reset;\n\treturn refValue;\n}\n//#endregion\n//#region useThrottleFn/index.ts\n/**\n* Throttle execution of a function. Especially useful for rate limiting\n* execution of handlers on events like resize and scroll.\n*\n* @param   fn             A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n*                                    to `callback` when the throttled-function is executed.\n* @param   ms             A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n*                                    (default value: 200)\n*\n* @param [trailing] if true, call fn again after the time is up (default value: false)\n*\n* @param [leading] if true, call fn on the leading edge of the ms timeout (default value: true)\n*\n* @param [rejectOnCancel] if true, reject the last call if it's been cancel (default value: false)\n*\n* @return  A new, throttled, function.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n\treturn createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);\n}\n//#endregion\n//#region refThrottled/index.ts\n/**\n* Throttle execution of a function. Especially useful for rate limiting\n* execution of handlers on events like resize and scroll.\n*\n* @param value Ref value to be watched with throttle effect\n* @param  delay  A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n* @param trailing if true, update the value again after the delay time is up\n* @param leading if true, update the value on the leading edge of the ms timeout\n*/\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n\tif (delay <= 0) return value;\n\tconst throttled = ref(toValue(value));\n\tconst updater = useThrottleFn(() => {\n\t\tthrottled.value = value.value;\n\t}, delay, trailing, leading);\n\twatch(value, () => updater());\n\treturn throttled;\n}\n/** @deprecated use `refThrottled` instead */\nconst throttledRef = refThrottled;\n/** @deprecated use `refThrottled` instead */\nconst useThrottle = refThrottled;\n//#endregion\n//#region refWithControl/index.ts\n/**\n* Fine-grained controls over ref and its reactivity.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction refWithControl(initial, options = {}) {\n\tlet source = initial;\n\tlet track;\n\tlet trigger;\n\tconst ref = customRef((_track, _trigger) => {\n\t\ttrack = _track;\n\t\ttrigger = _trigger;\n\t\treturn {\n\t\t\tget() {\n\t\t\t\treturn get();\n\t\t\t},\n\t\t\tset(v) {\n\t\t\t\tset(v);\n\t\t\t}\n\t\t};\n\t});\n\tfunction get(tracking = true) {\n\t\tif (tracking) track();\n\t\treturn source;\n\t}\n\tfunction set(value, triggering = true) {\n\t\tvar _options$onBeforeChan, _options$onChanged;\n\t\tif (value === source) return;\n\t\tconst old = source;\n\t\tif (((_options$onBeforeChan = options.onBeforeChange) === null || _options$onBeforeChan === void 0 ? void 0 : _options$onBeforeChan.call(options, value, old)) === false) return;\n\t\tsource = value;\n\t\t(_options$onChanged = options.onChanged) === null || _options$onChanged === void 0 || _options$onChanged.call(options, value, old);\n\t\tif (triggering) trigger();\n\t}\n\t/**\n\t* Get the value without tracked in the reactivity system\n\t*/\n\tconst untrackedGet = () => get(false);\n\t/**\n\t* Set the value without triggering the reactivity system\n\t*/\n\tconst silentSet = (v) => set(v, false);\n\t/**\n\t* Get the value without tracked in the reactivity system.\n\t*\n\t* Alias for `untrackedGet()`\n\t*/\n\tconst peek = () => get(false);\n\t/**\n\t* Set the value without triggering the reactivity system\n\t*\n\t* Alias for `silentSet(v)`\n\t*/\n\tconst lay = (v) => set(v, false);\n\treturn extendRef(ref, {\n\t\tget,\n\t\tset,\n\t\tuntrackedGet,\n\t\tsilentSet,\n\t\tpeek,\n\t\tlay\n\t}, { enumerable: true });\n}\n/** @deprecated use `refWithControl` instead */\nconst controlledRef = refWithControl;\n//#endregion\n//#region set/index.ts\n/**\n*  Shorthand for `ref.value = x`\n*/\nfunction set(...args) {\n\tif (args.length === 2) {\n\t\tconst [ref, value] = args;\n\t\tref.value = value;\n\t}\n\tif (args.length === 3) {\n\t\tconst [target, key, value] = args;\n\t\ttarget[key] = value;\n\t}\n}\n//#endregion\n//#region watchWithFilter/index.ts\nfunction watchWithFilter(source, cb, options = {}) {\n\tconst { eventFilter = bypassFilter, ...watchOptions } = options;\n\treturn watch(source, createFilterWrapper(eventFilter, cb), watchOptions);\n}\n//#endregion\n//#region watchPausable/index.ts\n/** @deprecated Use Vue's built-in `watch` instead. This function will be removed in future version. */\nfunction watchPausable(source, cb, options = {}) {\n\tconst { eventFilter: filter, initialState = \"active\", ...watchOptions } = options;\n\tconst { eventFilter, pause, resume, isActive } = pausableFilter(filter, { initialState });\n\treturn {\n\t\tstop: watchWithFilter(source, cb, {\n\t\t\t...watchOptions,\n\t\t\teventFilter\n\t\t}),\n\t\tpause,\n\t\tresume,\n\t\tisActive\n\t};\n}\n/** @deprecated Use Vue's built-in `watch` instead. This function will be removed in future version. */\nconst pausableWatch = watchPausable;\n//#endregion\n//#region syncRef/index.ts\n/**\n* Two-way refs synchronization.\n* From the set theory perspective to restrict the option's type\n* Check in the following order:\n* 1. L = R\n* 2. L ∩ R ≠ ∅\n* 3. L ⊆ R\n* 4. L ∩ R = ∅\n*/\nfunction syncRef(left, right, ...[options]) {\n\tconst { flush = \"sync\", deep = false, immediate = true, direction = \"both\", transform = {} } = options || {};\n\tconst watchers = [];\n\tconst transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n\tconst transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n\tif (direction === \"both\" || direction === \"ltr\") watchers.push(watchPausable(left, (newValue) => {\n\t\twatchers.forEach((w) => w.pause());\n\t\tright.value = transformLTR(newValue);\n\t\twatchers.forEach((w) => w.resume());\n\t}, {\n\t\tflush,\n\t\tdeep,\n\t\timmediate\n\t}));\n\tif (direction === \"both\" || direction === \"rtl\") watchers.push(watchPausable(right, (newValue) => {\n\t\twatchers.forEach((w) => w.pause());\n\t\tleft.value = transformRTL(newValue);\n\t\twatchers.forEach((w) => w.resume());\n\t}, {\n\t\tflush,\n\t\tdeep,\n\t\timmediate\n\t}));\n\tconst stop = () => {\n\t\twatchers.forEach((w) => w.stop());\n\t};\n\treturn stop;\n}\n//#endregion\n//#region syncRefs/index.ts\n/**\n* Keep target ref(s) in sync with the source ref\n*\n* @param source source ref\n* @param targets\n*/\nfunction syncRefs(source, targets, options = {}) {\n\tconst { flush = \"sync\", deep = false, immediate = true } = options;\n\tconst targetsArray = toArray(targets);\n\treturn watch(source, (newValue) => targetsArray.forEach((target) => target.value = newValue), {\n\t\tflush,\n\t\tdeep,\n\t\timmediate\n\t});\n}\n//#endregion\n//#region toRefs/index.ts\n/**\n* Extended `toRefs` that also accepts refs of an object.\n*\n* @see https://vueuse.org/toRefs\n* @param objectRef A ref or normal object or array.\n* @param options Options\n*/\nfunction toRefs(objectRef, options = {}) {\n\tif (!isRef(objectRef)) return toRefs$1(objectRef);\n\tconst result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n\tfor (const key in objectRef.value) result[key] = customRef(() => ({\n\t\tget() {\n\t\t\treturn objectRef.value[key];\n\t\t},\n\t\tset(v) {\n\t\t\tvar _toValue;\n\t\t\tif ((_toValue = toValue(options.replaceRef)) !== null && _toValue !== void 0 ? _toValue : true) if (Array.isArray(objectRef.value)) {\n\t\t\t\tconst copy = [...objectRef.value];\n\t\t\t\tcopy[key] = v;\n\t\t\t\tobjectRef.value = copy;\n\t\t\t} else {\n\t\t\t\tconst newObject = {\n\t\t\t\t\t...objectRef.value,\n\t\t\t\t\t[key]: v\n\t\t\t\t};\n\t\t\t\tObject.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n\t\t\t\tobjectRef.value = newObject;\n\t\t\t}\n\t\t\telse objectRef.value[key] = v;\n\t\t}\n\t}));\n\treturn result;\n}\n//#endregion\n//#region tryOnBeforeMount/index.ts\n/**\n* Call onBeforeMount() if it's inside a component lifecycle, if not, just call the function\n*\n* @param fn\n* @param sync if set to false, it will run in the nextTick() of Vue\n* @param target\n*/\nfunction tryOnBeforeMount(fn, sync = true, target) {\n\tif (getLifeCycleTarget(target)) onBeforeMount(fn, target);\n\telse if (sync) fn();\n\telse nextTick(fn);\n}\n//#endregion\n//#region tryOnBeforeUnmount/index.ts\n/**\n* Call onBeforeUnmount() if it's inside a component lifecycle, if not, do nothing\n*\n* @param fn\n* @param target\n*/\nfunction tryOnBeforeUnmount(fn, target) {\n\tif (getLifeCycleTarget(target)) onBeforeUnmount(fn, target);\n}\n//#endregion\n//#region tryOnMounted/index.ts\n/**\n* Call onMounted() if it's inside a component lifecycle, if not, just call the function\n*\n* @param fn\n* @param sync if set to false, it will run in the nextTick() of Vue\n* @param target\n*/\nfunction tryOnMounted(fn, sync = true, target) {\n\tif (getLifeCycleTarget(target)) onMounted(fn, target);\n\telse if (sync) fn();\n\telse nextTick(fn);\n}\n//#endregion\n//#region tryOnUnmounted/index.ts\n/**\n* Call onUnmounted() if it's inside a component lifecycle, if not, do nothing\n*\n* @param fn\n* @param target\n*/\nfunction tryOnUnmounted(fn, target) {\n\tif (getLifeCycleTarget(target)) onUnmounted(fn, target);\n}\n//#endregion\n//#region until/index.ts\nfunction createUntil(r, isNot = false) {\n\tfunction toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n\t\tlet stop = null;\n\t\tconst promises = [new Promise((resolve) => {\n\t\t\tstop = watch(r, (v) => {\n\t\t\t\tif (condition(v) !== isNot) {\n\t\t\t\t\tif (stop) stop();\n\t\t\t\t\telse nextTick(() => stop === null || stop === void 0 ? void 0 : stop());\n\t\t\t\t\tresolve(v);\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tflush,\n\t\t\t\tdeep,\n\t\t\t\timmediate: true\n\t\t\t});\n\t\t})];\n\t\tif (timeout != null) promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop === null || stop === void 0 ? void 0 : stop()));\n\t\treturn Promise.race(promises);\n\t}\n\tfunction toBe(value, options) {\n\t\tif (!isRef(value)) return toMatch((v) => v === value, options);\n\t\tconst { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options !== null && options !== void 0 ? options : {};\n\t\tlet stop = null;\n\t\tconst promises = [new Promise((resolve) => {\n\t\t\tstop = watch([r, value], ([v1, v2]) => {\n\t\t\t\tif (isNot !== (v1 === v2)) {\n\t\t\t\t\tif (stop) stop();\n\t\t\t\t\telse nextTick(() => stop === null || stop === void 0 ? void 0 : stop());\n\t\t\t\t\tresolve(v1);\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tflush,\n\t\t\t\tdeep,\n\t\t\t\timmediate: true\n\t\t\t});\n\t\t})];\n\t\tif (timeout != null) promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n\t\t\tstop === null || stop === void 0 || stop();\n\t\t\treturn toValue(r);\n\t\t}));\n\t\treturn Promise.race(promises);\n\t}\n\tfunction toBeTruthy(options) {\n\t\treturn toMatch((v) => Boolean(v), options);\n\t}\n\tfunction toBeNull(options) {\n\t\treturn toBe(null, options);\n\t}\n\tfunction toBeUndefined(options) {\n\t\treturn toBe(void 0, options);\n\t}\n\tfunction toBeNaN(options) {\n\t\treturn toMatch(Number.isNaN, options);\n\t}\n\tfunction toContains(value, options) {\n\t\treturn toMatch((v) => {\n\t\t\tconst array = Array.from(v);\n\t\t\treturn array.includes(value) || array.includes(toValue(value));\n\t\t}, options);\n\t}\n\tfunction changed(options) {\n\t\treturn changedTimes(1, options);\n\t}\n\tfunction changedTimes(n = 1, options) {\n\t\tlet count = -1;\n\t\treturn toMatch(() => {\n\t\t\tcount += 1;\n\t\t\treturn count >= n;\n\t\t}, options);\n\t}\n\tif (Array.isArray(toValue(r))) return {\n\t\ttoMatch,\n\t\ttoContains,\n\t\tchanged,\n\t\tchangedTimes,\n\t\tget not() {\n\t\t\treturn createUntil(r, !isNot);\n\t\t}\n\t};\n\telse return {\n\t\ttoMatch,\n\t\ttoBe,\n\t\ttoBeTruthy,\n\t\ttoBeNull,\n\t\ttoBeNaN,\n\t\ttoBeUndefined,\n\t\tchanged,\n\t\tchangedTimes,\n\t\tget not() {\n\t\t\treturn createUntil(r, !isNot);\n\t\t}\n\t};\n}\nfunction until(r) {\n\treturn createUntil(r);\n}\n//#endregion\n//#region useArrayDifference/index.ts\nfunction defaultComparator(value, othVal) {\n\treturn value === othVal;\n}\n/**\n* Reactive get array difference of two array\n* @see https://vueuse.org/useArrayDifference\n* @returns - the difference of two array\n* @param args\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayDifference(...args) {\n\tvar _args$, _args$2;\n\tconst list = args[0];\n\tconst values = args[1];\n\tlet compareFn = (_args$ = args[2]) !== null && _args$ !== void 0 ? _args$ : defaultComparator;\n\tconst { symmetric = false } = (_args$2 = args[3]) !== null && _args$2 !== void 0 ? _args$2 : {};\n\tif (typeof compareFn === \"string\") {\n\t\tconst key = compareFn;\n\t\tcompareFn = (value, othVal) => value[key] === othVal[key];\n\t}\n\tconst diff1 = computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n\tif (symmetric) {\n\t\tconst diff2 = computed(() => toValue(values).filter((x) => toValue(list).findIndex((y) => compareFn(x, y)) === -1));\n\t\treturn computed(() => symmetric ? [...toValue(diff1), ...toValue(diff2)] : toValue(diff1));\n\t} else return diff1;\n}\n//#endregion\n//#region useArrayEvery/index.ts\n/**\n* Reactive `Array.every`\n*\n* @see https://vueuse.org/useArrayEvery\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns **true** if the `fn` function returns a **truthy** value for every element from the array. Otherwise, **false**.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayEvery(list, fn) {\n\treturn computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n//#endregion\n//#region useArrayFilter/index.ts\n/**\n* Reactive `Array.filter`\n*\n* @see https://vueuse.org/useArrayFilter\n* @param list - the array was called upon.\n* @param fn - a function that is called for every element of the given `list`. Each time `fn` executes, the returned value is added to the new array.\n*\n* @returns a shallow copy of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayFilter(list, fn) {\n\treturn computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n//#endregion\n//#region useArrayFind/index.ts\n/**\n* Reactive `Array.find`\n*\n* @see https://vueuse.org/useArrayFind\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns the first element in the array that satisfies the provided testing function. Otherwise, undefined is returned.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayFind(list, fn) {\n\treturn computed(() => toValue(toValue(list).find((element, index, array) => fn(toValue(element), index, array))));\n}\n//#endregion\n//#region useArrayFindIndex/index.ts\n/**\n* Reactive `Array.findIndex`\n*\n* @see https://vueuse.org/useArrayFindIndex\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns the index of the first element in the array that passes the test. Otherwise, \"-1\".\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayFindIndex(list, fn) {\n\treturn computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n//#endregion\n//#region useArrayFindLast/index.ts\nfunction findLast(arr, cb) {\n\tlet index = arr.length;\n\twhile (index-- > 0) if (cb(arr[index], index, arr)) return arr[index];\n}\n/**\n* Reactive `Array.findLast`\n*\n* @see https://vueuse.org/useArrayFindLast\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns the last element in the array that satisfies the provided testing function. Otherwise, undefined is returned.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayFindLast(list, fn) {\n\treturn computed(() => toValue(!Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))));\n}\n//#endregion\n//#region useArrayIncludes/index.ts\nfunction isArrayIncludesOptions(obj) {\n\treturn isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\n/**\n* Reactive `Array.includes`\n*\n* @see https://vueuse.org/useArrayIncludes\n*\n* @returns true if the `value` is found in the array. Otherwise, false.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayIncludes(...args) {\n\tvar _comparator;\n\tconst list = args[0];\n\tconst value = args[1];\n\tlet comparator = args[2];\n\tlet formIndex = 0;\n\tif (isArrayIncludesOptions(comparator)) {\n\t\tvar _comparator$fromIndex;\n\t\tformIndex = (_comparator$fromIndex = comparator.fromIndex) !== null && _comparator$fromIndex !== void 0 ? _comparator$fromIndex : 0;\n\t\tcomparator = comparator.comparator;\n\t}\n\tif (typeof comparator === \"string\") {\n\t\tconst key = comparator;\n\t\tcomparator = (element, value) => element[key] === toValue(value);\n\t}\n\tcomparator = (_comparator = comparator) !== null && _comparator !== void 0 ? _comparator : ((element, value) => element === toValue(value));\n\treturn computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(toValue(element), toValue(value), index, toValue(array))));\n}\n//#endregion\n//#region useArrayJoin/index.ts\n/**\n* Reactive `Array.join`\n*\n* @see https://vueuse.org/useArrayJoin\n* @param list - the array was called upon.\n* @param separator - a string to separate each pair of adjacent elements of the array. If omitted, the array elements are separated with a comma (\",\").\n*\n* @returns a string with all array elements joined. If arr.length is 0, the empty string is returned.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayJoin(list, separator) {\n\treturn computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n//#endregion\n//#region useArrayMap/index.ts\n/**\n* Reactive `Array.map`\n*\n* @see https://vueuse.org/useArrayMap\n* @param list - the array was called upon.\n* @param fn - a function that is called for every element of the given `list`. Each time `fn` executes, the returned value is added to the new array.\n*\n* @returns a new array with each element being the result of the callback function.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayMap(list, fn) {\n\treturn computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n//#endregion\n//#region useArrayReduce/index.ts\n/**\n* Reactive `Array.reduce`\n*\n* @see https://vueuse.org/useArrayReduce\n* @param list - the array was called upon.\n* @param reducer - a \"reducer\" function.\n* @param args\n*\n* @returns the value that results from running the \"reducer\" callback function to completion over the entire array.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayReduce(list, reducer, ...args) {\n\tconst reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n\treturn computed(() => {\n\t\tconst resolved = toValue(list);\n\t\treturn args.length ? resolved.reduce(reduceCallback, typeof args[0] === \"function\" ? toValue(args[0]()) : toValue(args[0])) : resolved.reduce(reduceCallback);\n\t});\n}\n//#endregion\n//#region useArraySome/index.ts\n/**\n* Reactive `Array.some`\n*\n* @see https://vueuse.org/useArraySome\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns **true** if the `fn` function returns a **truthy** value for any element from the array. Otherwise, **false**.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArraySome(list, fn) {\n\treturn computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n//#endregion\n//#region useArrayUnique/index.ts\nfunction uniq(array) {\n\treturn Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n\treturn array.reduce((acc, v) => {\n\t\tif (!acc.some((x) => fn(v, x, array))) acc.push(v);\n\t\treturn acc;\n\t}, []);\n}\n/**\n* reactive unique array\n* @see https://vueuse.org/useArrayUnique\n* @param list - the array was called upon.\n* @param compareFn\n* @returns A computed ref that returns a unique array of items.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayUnique(list, compareFn) {\n\treturn computed(() => {\n\t\tconst resolvedList = toValue(list).map((element) => toValue(element));\n\t\treturn compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n\t});\n}\n//#endregion\n//#region useCounter/index.ts\n/**\n* Basic counter with utility functions.\n*\n* @see https://vueuse.org/useCounter\n* @param [initialValue]\n* @param options\n*/\nfunction useCounter(initialValue = 0, options = {}) {\n\tlet _initialValue = unref(initialValue);\n\tconst count = shallowRef(initialValue);\n\tconst { max = Number.POSITIVE_INFINITY, min = Number.NEGATIVE_INFINITY } = options;\n\tconst inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min);\n\tconst dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max);\n\tconst get = () => count.value;\n\tconst set = (val) => count.value = Math.max(min, Math.min(max, val));\n\tconst reset = (val = _initialValue) => {\n\t\t_initialValue = val;\n\t\treturn set(val);\n\t};\n\treturn {\n\t\tcount: shallowReadonly(count),\n\t\tinc,\n\t\tdec,\n\t\tget,\n\t\tset,\n\t\treset\n\t};\n}\n//#endregion\n//#region useDateFormat/index.ts\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[T\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/i;\nconst REGEX_FORMAT = /[YMDHhms]o|\\[([^\\]]+)\\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|z{1,4}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n\tlet m = hours < 12 ? \"AM\" : \"PM\";\n\tif (hasPeriod) m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n\treturn isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n\tconst suffixes = [\n\t\t\"th\",\n\t\t\"st\",\n\t\t\"nd\",\n\t\t\"rd\"\n\t];\n\tconst v = num % 100;\n\treturn num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n\tvar _options$customMeridi;\n\tconst years = date.getFullYear();\n\tconst month = date.getMonth();\n\tconst days = date.getDate();\n\tconst hours = date.getHours();\n\tconst minutes = date.getMinutes();\n\tconst seconds = date.getSeconds();\n\tconst milliseconds = date.getMilliseconds();\n\tconst day = date.getDay();\n\tconst meridiem = (_options$customMeridi = options.customMeridiem) !== null && _options$customMeridi !== void 0 ? _options$customMeridi : defaultMeridiem;\n\tconst stripTimeZone = (dateString) => {\n\t\tvar _dateString$split$;\n\t\treturn (_dateString$split$ = dateString.split(\" \")[1]) !== null && _dateString$split$ !== void 0 ? _dateString$split$ : \"\";\n\t};\n\tconst matches = {\n\t\tYo: () => formatOrdinal(years),\n\t\tYY: () => String(years).slice(-2),\n\t\tYYYY: () => years,\n\t\tM: () => month + 1,\n\t\tMo: () => formatOrdinal(month + 1),\n\t\tMM: () => `${month + 1}`.padStart(2, \"0\"),\n\t\tMMM: () => date.toLocaleDateString(toValue(options.locales), { month: \"short\" }),\n\t\tMMMM: () => date.toLocaleDateString(toValue(options.locales), { month: \"long\" }),\n\t\tD: () => String(days),\n\t\tDo: () => formatOrdinal(days),\n\t\tDD: () => `${days}`.padStart(2, \"0\"),\n\t\tH: () => String(hours),\n\t\tHo: () => formatOrdinal(hours),\n\t\tHH: () => `${hours}`.padStart(2, \"0\"),\n\t\th: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n\t\tho: () => formatOrdinal(hours % 12 || 12),\n\t\thh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n\t\tm: () => String(minutes),\n\t\tmo: () => formatOrdinal(minutes),\n\t\tmm: () => `${minutes}`.padStart(2, \"0\"),\n\t\ts: () => String(seconds),\n\t\tso: () => formatOrdinal(seconds),\n\t\tss: () => `${seconds}`.padStart(2, \"0\"),\n\t\tSSS: () => `${milliseconds}`.padStart(3, \"0\"),\n\t\td: () => day,\n\t\tdd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"narrow\" }),\n\t\tddd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"short\" }),\n\t\tdddd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"long\" }),\n\t\tA: () => meridiem(hours, minutes),\n\t\tAA: () => meridiem(hours, minutes, false, true),\n\t\ta: () => meridiem(hours, minutes, true),\n\t\taa: () => meridiem(hours, minutes, true, true),\n\t\tz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: \"shortOffset\" })),\n\t\tzz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: \"shortOffset\" })),\n\t\tzzz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: \"shortOffset\" })),\n\t\tzzzz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: \"longOffset\" }))\n\t};\n\treturn formatStr.replace(REGEX_FORMAT, (match, $1) => {\n\t\tvar _ref, _matches$match;\n\t\treturn (_ref = $1 !== null && $1 !== void 0 ? $1 : (_matches$match = matches[match]) === null || _matches$match === void 0 ? void 0 : _matches$match.call(matches)) !== null && _ref !== void 0 ? _ref : match;\n\t});\n}\nfunction normalizeDate(date) {\n\tif (date === null) return /* @__PURE__ */ new Date(NaN);\n\tif (date === void 0) return /* @__PURE__ */ new Date();\n\tif (date instanceof Date) return new Date(date);\n\tif (typeof date === \"string\" && !/Z$/i.test(date)) {\n\t\tconst d = date.match(REGEX_PARSE);\n\t\tif (d) {\n\t\t\tconst m = d[2] - 1 || 0;\n\t\t\tconst ms = (d[7] || \"0\").substring(0, 3);\n\t\t\treturn new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n\t\t}\n\t}\n\treturn new Date(date);\n}\n/**\n* Get the formatted date according to the string of tokens passed in.\n*\n* @see https://vueuse.org/useDateFormat\n* @param date - The date to format, can either be a `Date` object, a timestamp, or a string\n* @param formatStr - The combination of tokens to format the date\n* @param options - UseDateFormatOptions\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n\treturn computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n//#endregion\n//#region useIntervalFn/index.ts\n/**\n* Wrapper for `setInterval` with controls\n*\n* @see https://vueuse.org/useIntervalFn\n* @param cb\n* @param interval\n* @param options\n*/\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n\tconst { immediate = true, immediateCallback = false } = options;\n\tlet timer = null;\n\tconst isActive = shallowRef(false);\n\tfunction clean() {\n\t\tif (timer) {\n\t\t\tclearInterval(timer);\n\t\t\ttimer = null;\n\t\t}\n\t}\n\tfunction pause() {\n\t\tisActive.value = false;\n\t\tclean();\n\t}\n\tfunction resume() {\n\t\tconst intervalValue = toValue(interval);\n\t\tif (intervalValue <= 0) return;\n\t\tisActive.value = true;\n\t\tif (immediateCallback) cb();\n\t\tclean();\n\t\tif (isActive.value) timer = setInterval(cb, intervalValue);\n\t}\n\tif (immediate && isClient) resume();\n\tif (isRef(interval) || typeof interval === \"function\") tryOnScopeDispose(watch(interval, () => {\n\t\tif (isActive.value && isClient) resume();\n\t}));\n\ttryOnScopeDispose(pause);\n\treturn {\n\t\tisActive: shallowReadonly(isActive),\n\t\tpause,\n\t\tresume\n\t};\n}\n//#endregion\n//#region useInterval/index.ts\nfunction useInterval(interval = 1e3, options = {}) {\n\tconst { controls: exposeControls = false, immediate = true, callback } = options;\n\tconst counter = shallowRef(0);\n\tconst update = () => counter.value += 1;\n\tconst reset = () => {\n\t\tcounter.value = 0;\n\t};\n\tconst controls = useIntervalFn(callback ? () => {\n\t\tupdate();\n\t\tcallback(counter.value);\n\t} : update, interval, { immediate });\n\tif (exposeControls) return {\n\t\tcounter: shallowReadonly(counter),\n\t\treset,\n\t\t...controls\n\t};\n\telse return shallowReadonly(counter);\n}\n//#endregion\n//#region useLastChanged/index.ts\nfunction useLastChanged(source, options = {}) {\n\tvar _options$initialValue;\n\tconst ms = shallowRef((_options$initialValue = options.initialValue) !== null && _options$initialValue !== void 0 ? _options$initialValue : null);\n\twatch(source, () => ms.value = timestamp(), options);\n\treturn shallowReadonly(ms);\n}\n//#endregion\n//#region useTimeoutFn/index.ts\n/**\n* Wrapper for `setTimeout` with controls.\n*\n* @param cb\n* @param interval\n* @param options\n*/\nfunction useTimeoutFn(cb, interval, options = {}) {\n\tconst { immediate = true, immediateCallback = false } = options;\n\tconst isPending = shallowRef(false);\n\tlet timer;\n\tfunction clear() {\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = void 0;\n\t\t}\n\t}\n\tfunction stop() {\n\t\tisPending.value = false;\n\t\tclear();\n\t}\n\tfunction start(...args) {\n\t\tif (immediateCallback) cb();\n\t\tclear();\n\t\tisPending.value = true;\n\t\ttimer = setTimeout(() => {\n\t\t\tisPending.value = false;\n\t\t\ttimer = void 0;\n\t\t\tcb(...args);\n\t\t}, toValue(interval));\n\t}\n\tif (immediate) {\n\t\tisPending.value = true;\n\t\tif (isClient) start();\n\t}\n\ttryOnScopeDispose(stop);\n\treturn {\n\t\tisPending: shallowReadonly(isPending),\n\t\tstart,\n\t\tstop\n\t};\n}\n//#endregion\n//#region useTimeout/index.ts\nfunction useTimeout(interval = 1e3, options = {}) {\n\tconst { controls: exposeControls = false, callback } = options;\n\tconst controls = useTimeoutFn(callback !== null && callback !== void 0 ? callback : noop, interval, options);\n\tconst ready = computed(() => !controls.isPending.value);\n\tif (exposeControls) return {\n\t\tready,\n\t\t...controls\n\t};\n\telse return ready;\n}\n//#endregion\n//#region useToNumber/index.ts\n/**\n* Reactively convert a string ref to number.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useToNumber(value, options = {}) {\n\tconst { method = \"parseFloat\", radix, nanToZero } = options;\n\treturn computed(() => {\n\t\tlet resolved = toValue(value);\n\t\tif (typeof method === \"function\") resolved = method(resolved);\n\t\telse if (typeof resolved === \"string\") resolved = Number[method](resolved, radix);\n\t\tif (nanToZero && Number.isNaN(resolved)) resolved = 0;\n\t\treturn resolved;\n\t});\n}\n//#endregion\n//#region useToString/index.ts\n/**\n* Reactively convert a ref to string.\n*\n* @see https://vueuse.org/useToString\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useToString(value) {\n\treturn computed(() => `${toValue(value)}`);\n}\n//#endregion\n//#region useToggle/index.ts\n/**\n* A boolean ref with a toggler\n*\n* @see https://vueuse.org/useToggle\n* @param [initialValue]\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useToggle(initialValue = false, options = {}) {\n\tconst { truthyValue = true, falsyValue = false } = options;\n\tconst valueIsRef = isRef(initialValue);\n\tconst _value = shallowRef(initialValue);\n\tfunction toggle(value) {\n\t\tif (arguments.length) {\n\t\t\t_value.value = value;\n\t\t\treturn _value.value;\n\t\t} else {\n\t\t\tconst truthy = toValue(truthyValue);\n\t\t\t_value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n\t\t\treturn _value.value;\n\t\t}\n\t}\n\tif (valueIsRef) return toggle;\n\telse return [_value, toggle];\n}\n//#endregion\n//#region watchArray/index.ts\n/**\n* Watch for an array with additions and removals.\n*\n* @see https://vueuse.org/watchArray\n*/\nfunction watchArray(source, cb, options) {\n\tlet oldList = (options === null || options === void 0 ? void 0 : options.immediate) ? [] : [...typeof source === \"function\" ? source() : Array.isArray(source) ? source : toValue(source)];\n\treturn watch(source, (newList, _, onCleanup) => {\n\t\tconst oldListRemains = Array.from({ length: oldList.length });\n\t\tconst added = [];\n\t\tfor (const obj of newList) {\n\t\t\tlet found = false;\n\t\t\tfor (let i = 0; i < oldList.length; i++) if (!oldListRemains[i] && obj === oldList[i]) {\n\t\t\t\toldListRemains[i] = true;\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (!found) added.push(obj);\n\t\t}\n\t\tconst removed = oldList.filter((_, i) => !oldListRemains[i]);\n\t\tcb(newList, oldList, added, removed, onCleanup);\n\t\toldList = [...newList];\n\t}, options);\n}\n//#endregion\n//#region watchAtMost/index.ts\nfunction watchAtMost(source, cb, options) {\n\tconst { count, ...watchOptions } = options;\n\tconst current = shallowRef(0);\n\tconst { stop, resume, pause } = watchWithFilter(source, (...args) => {\n\t\tcurrent.value += 1;\n\t\tif (current.value >= toValue(count)) nextTick(() => stop());\n\t\tcb(...args);\n\t}, watchOptions);\n\treturn {\n\t\tcount: current,\n\t\tstop,\n\t\tresume,\n\t\tpause\n\t};\n}\n//#endregion\n//#region watchDebounced/index.ts\nfunction watchDebounced(source, cb, options = {}) {\n\tconst { debounce = 0, maxWait = void 0, ...watchOptions } = options;\n\treturn watchWithFilter(source, cb, {\n\t\t...watchOptions,\n\t\teventFilter: debounceFilter(debounce, { maxWait })\n\t});\n}\n/** @deprecated use `watchDebounced` instead */\nconst debouncedWatch = watchDebounced;\n//#endregion\n//#region watchDeep/index.ts\n/**\n* Shorthand for watching value with {deep: true}\n*\n* @see https://vueuse.org/watchDeep\n*/\nfunction watchDeep(source, cb, options) {\n\treturn watch(source, cb, {\n\t\t...options,\n\t\tdeep: true\n\t});\n}\n//#endregion\n//#region watchIgnorable/index.ts\nfunction watchIgnorable(source, cb, options = {}) {\n\tconst { eventFilter = bypassFilter, ...watchOptions } = options;\n\tconst filteredCb = createFilterWrapper(eventFilter, cb);\n\tlet ignoreUpdates;\n\tlet ignorePrevAsyncUpdates;\n\tlet stop;\n\tif (watchOptions.flush === \"sync\") {\n\t\tlet ignore = false;\n\t\tignorePrevAsyncUpdates = () => {};\n\t\tignoreUpdates = (updater) => {\n\t\t\tignore = true;\n\t\t\tupdater();\n\t\t\tignore = false;\n\t\t};\n\t\tstop = watch(source, (...args) => {\n\t\t\tif (!ignore) filteredCb(...args);\n\t\t}, watchOptions);\n\t} else {\n\t\tconst disposables = [];\n\t\tlet ignoreCounter = 0;\n\t\tlet syncCounter = 0;\n\t\tignorePrevAsyncUpdates = () => {\n\t\t\tignoreCounter = syncCounter;\n\t\t};\n\t\tdisposables.push(watch(source, () => {\n\t\t\tsyncCounter++;\n\t\t}, {\n\t\t\t...watchOptions,\n\t\t\tflush: \"sync\"\n\t\t}));\n\t\tignoreUpdates = (updater) => {\n\t\t\tconst syncCounterPrev = syncCounter;\n\t\t\tupdater();\n\t\t\tignoreCounter += syncCounter - syncCounterPrev;\n\t\t};\n\t\tdisposables.push(watch(source, (...args) => {\n\t\t\tconst ignore = ignoreCounter > 0 && ignoreCounter === syncCounter;\n\t\t\tignoreCounter = 0;\n\t\t\tsyncCounter = 0;\n\t\t\tif (ignore) return;\n\t\t\tfilteredCb(...args);\n\t\t}, watchOptions));\n\t\tstop = () => {\n\t\t\tdisposables.forEach((fn) => fn());\n\t\t};\n\t}\n\treturn {\n\t\tstop,\n\t\tignoreUpdates,\n\t\tignorePrevAsyncUpdates\n\t};\n}\n/** @deprecated use `watchIgnorable` instead */\nconst ignorableWatch = watchIgnorable;\n//#endregion\n//#region watchImmediate/index.ts\n/**\n* Shorthand for watching value with {immediate: true}\n*\n* @see https://vueuse.org/watchImmediate\n*/\nfunction watchImmediate(source, cb, options) {\n\treturn watch(source, cb, {\n\t\t...options,\n\t\timmediate: true\n\t});\n}\n//#endregion\n//#region watchOnce/index.ts\n/**\n* Shorthand for watching value with { once: true }\n*\n* @see https://vueuse.org/watchOnce\n*/\nfunction watchOnce(source, cb, options) {\n\treturn watch(source, cb, {\n\t\t...options,\n\t\tonce: true\n\t});\n}\n//#endregion\n//#region watchThrottled/index.ts\nfunction watchThrottled(source, cb, options = {}) {\n\tconst { throttle = 0, trailing = true, leading = true, ...watchOptions } = options;\n\treturn watchWithFilter(source, cb, {\n\t\t...watchOptions,\n\t\teventFilter: throttleFilter(throttle, trailing, leading)\n\t});\n}\n/** @deprecated use `watchThrottled` instead */\nconst throttledWatch = watchThrottled;\n//#endregion\n//#region watchTriggerable/index.ts\nfunction watchTriggerable(source, cb, options = {}) {\n\tlet cleanupFn;\n\tfunction onEffect() {\n\t\tif (!cleanupFn) return;\n\t\tconst fn = cleanupFn;\n\t\tcleanupFn = void 0;\n\t\tfn();\n\t}\n\t/** Register the function `cleanupFn` */\n\tfunction onCleanup(callback) {\n\t\tcleanupFn = callback;\n\t}\n\tconst _cb = (value, oldValue) => {\n\t\tonEffect();\n\t\treturn cb(value, oldValue, onCleanup);\n\t};\n\tconst res = watchIgnorable(source, _cb, options);\n\tconst { ignoreUpdates } = res;\n\tconst trigger = () => {\n\t\tlet res;\n\t\tignoreUpdates(() => {\n\t\t\tres = _cb(getWatchSources(source), getOldValue(source));\n\t\t});\n\t\treturn res;\n\t};\n\treturn {\n\t\t...res,\n\t\ttrigger\n\t};\n}\nfunction getWatchSources(sources) {\n\tif (isReactive(sources)) return sources;\n\tif (Array.isArray(sources)) return sources.map((item) => toValue(item));\n\treturn toValue(sources);\n}\nfunction getOldValue(source) {\n\treturn Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n//#endregion\n//#region whenever/index.ts\nfunction whenever(source, cb, options) {\n\tconst stop = watch(source, (v, ov, onInvalidate) => {\n\t\tif (v) {\n\t\t\tif (options === null || options === void 0 ? void 0 : options.once) nextTick(() => stop());\n\t\t\tcb(v, ov, onInvalidate);\n\t\t}\n\t}, {\n\t\t...options,\n\t\tonce: false\n\t});\n\treturn stop;\n}\n//#endregion\nexport { assert, autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, controlledComputed, controlledRef, createDisposableDirective, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, createReactiveFn, createRef, createSharedComposable, createSingletonPromise, debounceFilter, debouncedRef, debouncedWatch, eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, pausableWatch, promiseTimeout, provideLocal, pxValue, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refManualReset, refThrottled, refWithControl, set, syncRef, syncRefs, throttleFilter, throttledRef, throttledWatch, timestamp, toArray, toReactive, toRef, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { bypassFilter, camelize, clamp, computedWithControl, containsProp, createEventHook, createFilterWrapper, createRef, createSingletonPromise, debounceFilter, hasOwn, identity, increaseWithUnit, injectLocal, isClient, isDef, isIOS, isObject, isWorker, makeDestructurable, noop, notNullish, objectEntries, objectOmit, objectPick, pausableFilter, promiseTimeout, provideLocal, pxValue, syncRef, throttleFilter, timestamp, toArray, toRef, toRefs, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useDebounceFn, useIntervalFn, useThrottleFn, useTimeoutFn, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchWithFilter, whenever } from \"@vueuse/shared\";\nimport { Fragment, TransitionGroup, computed, customRef, defineComponent, getCurrentInstance, getCurrentScope, h, hasInjectionContext, inject, isReadonly, isRef, markRaw, nextTick, onBeforeUpdate, onMounted, onUpdated, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, toRaw, toValue, unref, watch, watchEffect } from \"vue\";\nexport * from \"@vueuse/shared\";\n//#region computedAsync/index.ts\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n\tvar _globalThis$reportErr;\n\tlet options;\n\tif (isRef(optionsOrRef)) options = { evaluating: optionsOrRef };\n\telse options = optionsOrRef || {};\n\tconst { lazy = false, flush = \"sync\", evaluating = void 0, shallow = true, onError = (_globalThis$reportErr = globalThis.reportError) !== null && _globalThis$reportErr !== void 0 ? _globalThis$reportErr : noop } = options;\n\tconst started = shallowRef(!lazy);\n\tconst current = shallow ? shallowRef(initialState) : ref(initialState);\n\tlet counter = 0;\n\twatchEffect(async (onInvalidate) => {\n\t\tif (!started.value) return;\n\t\tcounter++;\n\t\tconst counterAtBeginning = counter;\n\t\tlet hasFinished = false;\n\t\tif (evaluating) Promise.resolve().then(() => {\n\t\t\tevaluating.value = true;\n\t\t});\n\t\ttry {\n\t\t\tconst result = await evaluationCallback((cancelCallback) => {\n\t\t\t\tonInvalidate(() => {\n\t\t\t\t\tif (evaluating) evaluating.value = false;\n\t\t\t\t\tif (!hasFinished) cancelCallback();\n\t\t\t\t});\n\t\t\t});\n\t\t\tif (counterAtBeginning === counter) current.value = result;\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t} finally {\n\t\t\tif (evaluating && counterAtBeginning === counter) evaluating.value = false;\n\t\t\thasFinished = true;\n\t\t}\n\t}, { flush });\n\tif (lazy) return computed(() => {\n\t\tstarted.value = true;\n\t\treturn current.value;\n\t});\n\telse return current;\n}\n/** @deprecated use `computedAsync` instead */\nconst asyncComputed = computedAsync;\n//#endregion\n//#region computedInject/index.ts\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n\tlet source = inject(key);\n\tif (defaultSource) source = inject(key, defaultSource);\n\tif (treatDefaultAsFactory) source = inject(key, defaultSource, treatDefaultAsFactory);\n\tif (typeof options === \"function\") return computed((oldValue) => options(source, oldValue));\n\telse return computed({\n\t\tget: (oldValue) => options.get(source, oldValue),\n\t\tset: options.set\n\t});\n}\n//#endregion\n//#region createReusableTemplate/index.ts\n/**\n* This function creates `define` and `reuse` components in pair,\n* It also allow to pass a generic to bind with type.\n*\n* @see https://vueuse.org/createReusableTemplate\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createReusableTemplate(options = {}) {\n\tconst { inheritAttrs = true, name = \"ReusableTemplate\" } = options;\n\tconst render = shallowRef();\n\tconst define = defineComponent({\n\t\tname: `${name}.define`,\n\t\tsetup(_, { slots }) {\n\t\t\treturn () => {\n\t\t\t\trender.value = slots.default;\n\t\t\t};\n\t\t}\n\t});\n\tconst reuse = defineComponent({\n\t\tinheritAttrs,\n\t\tname: `${name}.reuse`,\n\t\tprops: options.props,\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => {\n\t\t\t\tvar _render$value;\n\t\t\t\tif (!render.value && true) throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n\t\t\t\tconst vnode = (_render$value = render.value) === null || _render$value === void 0 ? void 0 : _render$value.call(render, {\n\t\t\t\t\t...options.props == null ? keysToCamelKebabCase(attrs) : props,\n\t\t\t\t\t$slots: slots\n\t\t\t\t});\n\t\t\t\treturn inheritAttrs && (vnode === null || vnode === void 0 ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n\t\t\t};\n\t\t}\n\t});\n\treturn makeDestructurable({\n\t\tdefine,\n\t\treuse\n\t}, [define, reuse]);\n}\nfunction keysToCamelKebabCase(obj) {\n\tconst newObj = {};\n\tfor (const key in obj) newObj[camelize(key)] = obj[key];\n\treturn newObj;\n}\n//#endregion\n//#region createTemplatePromise/index.ts\n/**\n* Creates a template promise component.\n*\n* @see https://vueuse.org/createTemplatePromise\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createTemplatePromise(options = {}) {\n\tlet index = 0;\n\tconst instances = ref([]);\n\tfunction create(...args) {\n\t\tconst props = shallowReactive({\n\t\t\tkey: index++,\n\t\t\targs,\n\t\t\tpromise: void 0,\n\t\t\tresolve: () => {},\n\t\t\treject: () => {},\n\t\t\tisResolving: false,\n\t\t\toptions\n\t\t});\n\t\tinstances.value.push(props);\n\t\tprops.promise = new Promise((_resolve, _reject) => {\n\t\t\tprops.resolve = (v) => {\n\t\t\t\tprops.isResolving = true;\n\t\t\t\treturn _resolve(v);\n\t\t\t};\n\t\t\tprops.reject = _reject;\n\t\t}).finally(() => {\n\t\t\tprops.promise = void 0;\n\t\t\tconst index = instances.value.indexOf(props);\n\t\t\tif (index !== -1) instances.value.splice(index, 1);\n\t\t});\n\t\treturn props.promise;\n\t}\n\tfunction start(...args) {\n\t\tif (options.singleton && instances.value.length > 0) return instances.value[0].promise;\n\t\treturn create(...args);\n\t}\n\tconst component = defineComponent((_, { slots }) => {\n\t\tconst renderList = () => instances.value.map((props) => {\n\t\t\tvar _slots$default;\n\t\t\treturn h(Fragment, { key: props.key }, (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots, props));\n\t\t});\n\t\tif (options.transition) return () => h(TransitionGroup, options.transition, renderList);\n\t\treturn renderList;\n\t});\n\tcomponent.start = start;\n\treturn component;\n}\n//#endregion\n//#region createUnrefFn/index.ts\n/**\n* Make a plain function accepting ref and raw values as arguments.\n* Returns the same value the unconverted function returns, with proper typing.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createUnrefFn(fn) {\n\treturn function(...args) {\n\t\treturn fn.apply(this, args.map((i) => toValue(i)));\n\t};\n}\n//#endregion\n//#region _configurable.ts\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n//#endregion\n//#region unrefElement/index.ts\n/**\n* Get the dom element of a ref of element or Vue component instance\n*\n* @param elRef\n*/\nfunction unrefElement(elRef) {\n\tvar _$el;\n\tconst plain = toValue(elRef);\n\treturn (_$el = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _$el !== void 0 ? _$el : plain;\n}\n//#endregion\n//#region useEventListener/index.ts\nfunction useEventListener(...args) {\n\tconst register = (el, event, listener, options) => {\n\t\tel.addEventListener(event, listener, options);\n\t\treturn () => el.removeEventListener(event, listener, options);\n\t};\n\tconst firstParamTargets = computed(() => {\n\t\tconst test = toArray(toValue(args[0])).filter((e) => e != null);\n\t\treturn test.every((e) => typeof e !== \"string\") ? test : void 0;\n\t});\n\treturn watchImmediate(() => {\n\t\tvar _firstParamTargets$va, _firstParamTargets$va2;\n\t\treturn [\n\t\t\t(_firstParamTargets$va = (_firstParamTargets$va2 = firstParamTargets.value) === null || _firstParamTargets$va2 === void 0 ? void 0 : _firstParamTargets$va2.map((e) => unrefElement(e))) !== null && _firstParamTargets$va !== void 0 ? _firstParamTargets$va : [defaultWindow].filter((e) => e != null),\n\t\t\ttoArray(toValue(firstParamTargets.value ? args[1] : args[0])),\n\t\t\ttoArray(unref(firstParamTargets.value ? args[2] : args[1])),\n\t\t\ttoValue(firstParamTargets.value ? args[3] : args[2])\n\t\t];\n\t}, ([raw_targets, raw_events, raw_listeners, raw_options], _, onCleanup) => {\n\t\tif (!(raw_targets === null || raw_targets === void 0 ? void 0 : raw_targets.length) || !(raw_events === null || raw_events === void 0 ? void 0 : raw_events.length) || !(raw_listeners === null || raw_listeners === void 0 ? void 0 : raw_listeners.length)) return;\n\t\tconst optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;\n\t\tconst cleanups = raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))));\n\t\tonCleanup(() => {\n\t\t\tcleanups.forEach((fn) => fn());\n\t\t});\n\t}, { flush: \"post\" });\n}\n//#endregion\n//#region onClickOutside/index.ts\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n\tconst { window = defaultWindow, ignore = [], capture = true, detectIframe = false, controls = false } = options;\n\tif (!window) return controls ? {\n\t\tstop: noop,\n\t\tcancel: noop,\n\t\ttrigger: noop\n\t} : noop;\n\tif (isIOS && !_iOSWorkaround) {\n\t\t_iOSWorkaround = true;\n\t\tconst listenerOptions = { passive: true };\n\t\tArray.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop, listenerOptions));\n\t\twindow.document.documentElement.addEventListener(\"click\", noop, listenerOptions);\n\t}\n\tlet shouldListen = true;\n\tconst shouldIgnore = (event) => {\n\t\treturn toValue(ignore).some((target) => {\n\t\t\tif (typeof target === \"string\") return Array.from(window.document.querySelectorAll(target)).some((el) => el === event.target || event.composedPath().includes(el));\n\t\t\telse {\n\t\t\t\tconst el = unrefElement(target);\n\t\t\t\treturn el && (event.target === el || event.composedPath().includes(el));\n\t\t\t}\n\t\t});\n\t};\n\t/**\n\t* Determines if the given target has multiple root elements.\n\t* Referenced from: https://github.com/vuejs/test-utils/blob/ccb460be55f9f6be05ab708500a41ec8adf6f4bc/src/vue-wrapper.ts#L21\n\t*/\n\tfunction hasMultipleRoots(target) {\n\t\tconst vm = toValue(target);\n\t\treturn vm && vm.$.subTree.shapeFlag === 16;\n\t}\n\tfunction checkMultipleRoots(target, event) {\n\t\tconst vm = toValue(target);\n\t\tconst children = vm.$.subTree && vm.$.subTree.children;\n\t\tif (children == null || !Array.isArray(children)) return false;\n\t\treturn children.some((child) => child.el === event.target || event.composedPath().includes(child.el));\n\t}\n\tconst listener = (event) => {\n\t\tconst el = unrefElement(target);\n\t\tif (event.target == null) return;\n\t\tif (!(el instanceof Element) && hasMultipleRoots(target) && checkMultipleRoots(target, event)) return;\n\t\tif (!el || el === event.target || event.composedPath().includes(el)) return;\n\t\tif (\"detail\" in event && event.detail === 0) shouldListen = !shouldIgnore(event);\n\t\tif (!shouldListen) {\n\t\t\tshouldListen = true;\n\t\t\treturn;\n\t\t}\n\t\thandler(event);\n\t};\n\tlet isProcessingClick = false;\n\tconst cleanup = [\n\t\tuseEventListener(window, \"click\", (event) => {\n\t\t\tif (!isProcessingClick) {\n\t\t\t\tisProcessingClick = true;\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tisProcessingClick = false;\n\t\t\t\t}, 0);\n\t\t\t\tlistener(event);\n\t\t\t}\n\t\t}, {\n\t\t\tpassive: true,\n\t\t\tcapture\n\t\t}),\n\t\tuseEventListener(window, \"pointerdown\", (e) => {\n\t\t\tconst el = unrefElement(target);\n\t\t\tshouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));\n\t\t}, { passive: true }),\n\t\tdetectIframe && useEventListener(window, \"blur\", (event) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\tconst el = unrefElement(target);\n\t\t\t\tlet activeEl = window.document.activeElement;\n\t\t\t\twhile (activeEl === null || activeEl === void 0 ? void 0 : activeEl.shadowRoot) activeEl = activeEl.shadowRoot.activeElement;\n\t\t\t\tif ((activeEl === null || activeEl === void 0 ? void 0 : activeEl.tagName) === \"IFRAME\" && !(el === null || el === void 0 ? void 0 : el.contains(window.document.activeElement))) handler(event);\n\t\t\t}, 0);\n\t\t}, { passive: true })\n\t].filter(Boolean);\n\tconst stop = () => cleanup.forEach((fn) => fn());\n\tif (controls) return {\n\t\tstop,\n\t\tcancel: () => {\n\t\t\tshouldListen = false;\n\t\t},\n\t\ttrigger: (event) => {\n\t\t\tshouldListen = true;\n\t\t\tlistener(event);\n\t\t\tshouldListen = false;\n\t\t}\n\t};\n\treturn stop;\n}\n//#endregion\n//#region useMounted/index.ts\n/**\n* Mounted state in ref.\n*\n* @see https://vueuse.org/useMounted\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useMounted() {\n\tconst isMounted = shallowRef(false);\n\tconst instance = getCurrentInstance();\n\tif (instance) onMounted(() => {\n\t\tisMounted.value = true;\n\t}, instance);\n\treturn isMounted;\n}\n//#endregion\n//#region useSupported/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useSupported(callback) {\n\tconst isMounted = useMounted();\n\treturn computed(() => {\n\t\tisMounted.value;\n\t\treturn Boolean(callback());\n\t});\n}\n//#endregion\n//#region useMutationObserver/index.ts\n/**\n* Watch for changes being made to the DOM tree.\n*\n* @see https://vueuse.org/useMutationObserver\n* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver MutationObserver MDN\n* @param target\n* @param callback\n* @param options\n*/\nfunction useMutationObserver(target, callback, options = {}) {\n\tconst { window = defaultWindow, ...mutationOptions } = options;\n\tlet observer;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window && \"MutationObserver\" in window);\n\tconst cleanup = () => {\n\t\tif (observer) {\n\t\t\tobserver.disconnect();\n\t\t\tobserver = void 0;\n\t\t}\n\t};\n\tconst stopWatch = watch(computed(() => {\n\t\tconst items = toArray(toValue(target)).map(unrefElement).filter(notNullish);\n\t\treturn new Set(items);\n\t}), (newTargets) => {\n\t\tcleanup();\n\t\tif (isSupported.value && newTargets.size) {\n\t\t\tobserver = new MutationObserver(callback);\n\t\t\tnewTargets.forEach((el) => observer.observe(el, mutationOptions));\n\t\t}\n\t}, {\n\t\timmediate: true,\n\t\tflush: \"post\"\n\t});\n\tconst takeRecords = () => {\n\t\treturn observer === null || observer === void 0 ? void 0 : observer.takeRecords();\n\t};\n\tconst stop = () => {\n\t\tstopWatch();\n\t\tcleanup();\n\t};\n\ttryOnScopeDispose(stop);\n\treturn {\n\t\tisSupported,\n\t\tstop,\n\t\ttakeRecords\n\t};\n}\n//#endregion\n//#region onElementRemoval/index.ts\n/**\n* Fires when the element or any element containing it is removed.\n*\n* @param target\n* @param callback\n* @param options\n*/\nfunction onElementRemoval(target, callback, options = {}) {\n\tconst { window = defaultWindow, document = window === null || window === void 0 ? void 0 : window.document, flush = \"sync\" } = options;\n\tif (!window || !document) return noop;\n\tlet stopFn;\n\tconst cleanupAndUpdate = (fn) => {\n\t\tstopFn === null || stopFn === void 0 || stopFn();\n\t\tstopFn = fn;\n\t};\n\tconst stopWatch = watchEffect(() => {\n\t\tconst el = unrefElement(target);\n\t\tif (el) {\n\t\t\tconst { stop } = useMutationObserver(document, (mutationsList) => {\n\t\t\t\tif (mutationsList.map((mutation) => [...mutation.removedNodes]).flat().some((node) => node === el || node.contains(el))) callback(mutationsList);\n\t\t\t}, {\n\t\t\t\twindow,\n\t\t\t\tchildList: true,\n\t\t\t\tsubtree: true\n\t\t\t});\n\t\t\tcleanupAndUpdate(stop);\n\t\t}\n\t}, { flush });\n\tconst stopHandle = () => {\n\t\tstopWatch();\n\t\tcleanupAndUpdate();\n\t};\n\ttryOnScopeDispose(stopHandle);\n\treturn stopHandle;\n}\n//#endregion\n//#region onKeyStroke/index.ts\nfunction createKeyPredicate(keyFilter) {\n\tif (typeof keyFilter === \"function\") return keyFilter;\n\telse if (typeof keyFilter === \"string\") return (event) => event.key === keyFilter;\n\telse if (Array.isArray(keyFilter)) return (event) => keyFilter.includes(event.key);\n\treturn () => true;\n}\nfunction onKeyStroke(...args) {\n\tlet key;\n\tlet handler;\n\tlet options = {};\n\tif (args.length === 3) {\n\t\tkey = args[0];\n\t\thandler = args[1];\n\t\toptions = args[2];\n\t} else if (args.length === 2) if (typeof args[1] === \"object\") {\n\t\tkey = true;\n\t\thandler = args[0];\n\t\toptions = args[1];\n\t} else {\n\t\tkey = args[0];\n\t\thandler = args[1];\n\t}\n\telse {\n\t\tkey = true;\n\t\thandler = args[0];\n\t}\n\tconst { target = defaultWindow, eventName = \"keydown\", passive = false, dedupe = false } = options;\n\tconst predicate = createKeyPredicate(key);\n\tconst listener = (e) => {\n\t\tif (e.repeat && toValue(dedupe)) return;\n\t\tif (predicate(e)) handler(e);\n\t};\n\treturn useEventListener(target, eventName, listener, passive);\n}\n/**\n* Listen to the keydown event of the given key.\n*\n* @see https://vueuse.org/onKeyStroke\n* @param key\n* @param handler\n* @param options\n*/\nfunction onKeyDown(key, handler, options = {}) {\n\treturn onKeyStroke(key, handler, {\n\t\t...options,\n\t\teventName: \"keydown\"\n\t});\n}\n/**\n* Listen to the keypress event of the given key.\n*\n* @see https://vueuse.org/onKeyStroke\n* @param key\n* @param handler\n* @param options\n*/\nfunction onKeyPressed(key, handler, options = {}) {\n\treturn onKeyStroke(key, handler, {\n\t\t...options,\n\t\teventName: \"keypress\"\n\t});\n}\n/**\n* Listen to the keyup event of the given key.\n*\n* @see https://vueuse.org/onKeyStroke\n* @param key\n* @param handler\n* @param options\n*/\nfunction onKeyUp(key, handler, options = {}) {\n\treturn onKeyStroke(key, handler, {\n\t\t...options,\n\t\teventName: \"keyup\"\n\t});\n}\n//#endregion\n//#region onLongPress/index.ts\nconst DEFAULT_DELAY = 500;\nconst DEFAULT_THRESHOLD = 10;\nfunction onLongPress(target, handler, options) {\n\tvar _options$modifiers10, _options$modifiers11;\n\tconst elementRef = computed(() => unrefElement(target));\n\tlet timeout;\n\tlet posStart;\n\tlet startTimestamp;\n\tlet hasLongPressed = false;\n\tfunction clear() {\n\t\tif (timeout) {\n\t\t\tclearTimeout(timeout);\n\t\t\ttimeout = void 0;\n\t\t}\n\t\tposStart = void 0;\n\t\tstartTimestamp = void 0;\n\t\thasLongPressed = false;\n\t}\n\tfunction getDelay(ev) {\n\t\tconst delay = options === null || options === void 0 ? void 0 : options.delay;\n\t\tif (typeof delay === \"function\") return delay(ev);\n\t\treturn delay !== null && delay !== void 0 ? delay : DEFAULT_DELAY;\n\t}\n\tfunction onRelease(ev) {\n\t\tvar _options$modifiers, _options$modifiers2, _options$modifiers3;\n\t\tconst [_startTimestamp, _posStart, _hasLongPressed] = [\n\t\t\tstartTimestamp,\n\t\t\tposStart,\n\t\t\thasLongPressed\n\t\t];\n\t\tclear();\n\t\tif (!(options === null || options === void 0 ? void 0 : options.onMouseUp) || !_posStart || !_startTimestamp) return;\n\t\tif ((options === null || options === void 0 || (_options$modifiers = options.modifiers) === null || _options$modifiers === void 0 ? void 0 : _options$modifiers.self) && ev.target !== elementRef.value) return;\n\t\tif (options === null || options === void 0 || (_options$modifiers2 = options.modifiers) === null || _options$modifiers2 === void 0 ? void 0 : _options$modifiers2.prevent) ev.preventDefault();\n\t\tif (options === null || options === void 0 || (_options$modifiers3 = options.modifiers) === null || _options$modifiers3 === void 0 ? void 0 : _options$modifiers3.stop) ev.stopPropagation();\n\t\tconst dx = ev.x - _posStart.x;\n\t\tconst dy = ev.y - _posStart.y;\n\t\tconst distance = Math.sqrt(dx * dx + dy * dy);\n\t\toptions.onMouseUp(ev.timeStamp - _startTimestamp, distance, _hasLongPressed, ev);\n\t}\n\tfunction onDown(ev) {\n\t\tvar _options$modifiers4, _options$modifiers5, _options$modifiers6;\n\t\tif ((options === null || options === void 0 || (_options$modifiers4 = options.modifiers) === null || _options$modifiers4 === void 0 ? void 0 : _options$modifiers4.self) && ev.target !== elementRef.value) return;\n\t\tclear();\n\t\tif (options === null || options === void 0 || (_options$modifiers5 = options.modifiers) === null || _options$modifiers5 === void 0 ? void 0 : _options$modifiers5.prevent) ev.preventDefault();\n\t\tif (options === null || options === void 0 || (_options$modifiers6 = options.modifiers) === null || _options$modifiers6 === void 0 ? void 0 : _options$modifiers6.stop) ev.stopPropagation();\n\t\tposStart = {\n\t\t\tx: ev.x,\n\t\t\ty: ev.y\n\t\t};\n\t\tstartTimestamp = ev.timeStamp;\n\t\ttimeout = setTimeout(() => {\n\t\t\thasLongPressed = true;\n\t\t\thandler(ev);\n\t\t}, getDelay(ev));\n\t}\n\tfunction onMove(ev) {\n\t\tvar _options$modifiers7, _options$modifiers8, _options$modifiers9, _options$distanceThre;\n\t\tif ((options === null || options === void 0 || (_options$modifiers7 = options.modifiers) === null || _options$modifiers7 === void 0 ? void 0 : _options$modifiers7.self) && ev.target !== elementRef.value) return;\n\t\tif (!posStart || (options === null || options === void 0 ? void 0 : options.distanceThreshold) === false) return;\n\t\tif (options === null || options === void 0 || (_options$modifiers8 = options.modifiers) === null || _options$modifiers8 === void 0 ? void 0 : _options$modifiers8.prevent) ev.preventDefault();\n\t\tif (options === null || options === void 0 || (_options$modifiers9 = options.modifiers) === null || _options$modifiers9 === void 0 ? void 0 : _options$modifiers9.stop) ev.stopPropagation();\n\t\tconst dx = ev.x - posStart.x;\n\t\tconst dy = ev.y - posStart.y;\n\t\tif (Math.sqrt(dx * dx + dy * dy) >= ((_options$distanceThre = options === null || options === void 0 ? void 0 : options.distanceThreshold) !== null && _options$distanceThre !== void 0 ? _options$distanceThre : DEFAULT_THRESHOLD)) clear();\n\t}\n\tconst listenerOptions = {\n\t\tcapture: options === null || options === void 0 || (_options$modifiers10 = options.modifiers) === null || _options$modifiers10 === void 0 ? void 0 : _options$modifiers10.capture,\n\t\tonce: options === null || options === void 0 || (_options$modifiers11 = options.modifiers) === null || _options$modifiers11 === void 0 ? void 0 : _options$modifiers11.once\n\t};\n\tconst cleanup = [\n\t\tuseEventListener(elementRef, \"pointerdown\", onDown, listenerOptions),\n\t\tuseEventListener(elementRef, \"pointermove\", onMove, listenerOptions),\n\t\tuseEventListener(elementRef, [\"pointerup\", \"pointerleave\"], onRelease, listenerOptions)\n\t];\n\tconst stop = () => cleanup.forEach((fn) => fn());\n\treturn stop;\n}\n//#endregion\n//#region onStartTyping/index.ts\nfunction isFocusedElementEditable() {\n\tconst { activeElement, body } = document;\n\tif (!activeElement) return false;\n\tif (activeElement === body) return false;\n\tswitch (activeElement.tagName) {\n\t\tcase \"INPUT\":\n\t\tcase \"TEXTAREA\": return true;\n\t}\n\treturn activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({ keyCode, metaKey, ctrlKey, altKey }) {\n\tif (metaKey || ctrlKey || altKey) return false;\n\tif (keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105) return true;\n\tif (keyCode >= 65 && keyCode <= 90) return true;\n\treturn false;\n}\n/**\n* Fires when users start typing on non-editable elements.\n*\n* @see https://vueuse.org/onStartTyping\n* @param callback\n* @param options\n*/\nfunction onStartTyping(callback, options = {}) {\n\tconst { document = defaultDocument } = options;\n\tconst keydown = (event) => {\n\t\tif (!isFocusedElementEditable() && isTypedCharValid(event)) callback(event);\n\t};\n\tif (document) useEventListener(document, \"keydown\", keydown, { passive: true });\n}\n//#endregion\n//#region templateRef/index.ts\n/**\n* @deprecated Use Vue's built-in `useTemplateRef` instead.\n*\n* Shorthand for binding ref to template element.\n*\n* @see https://vueuse.org/templateRef\n* @param key\n* @param initialValue\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction templateRef(key, initialValue = null) {\n\tconst instance = getCurrentInstance();\n\tlet _trigger = () => {};\n\tconst element = customRef((track, trigger) => {\n\t\t_trigger = trigger;\n\t\treturn {\n\t\t\tget() {\n\t\t\t\tvar _instance$proxy$$refs, _instance$proxy;\n\t\t\t\ttrack();\n\t\t\t\treturn (_instance$proxy$$refs = instance === null || instance === void 0 || (_instance$proxy = instance.proxy) === null || _instance$proxy === void 0 ? void 0 : _instance$proxy.$refs[key]) !== null && _instance$proxy$$refs !== void 0 ? _instance$proxy$$refs : initialValue;\n\t\t\t},\n\t\t\tset() {}\n\t\t};\n\t});\n\ttryOnMounted(_trigger);\n\tonUpdated(_trigger);\n\treturn element;\n}\n//#endregion\n//#region useActiveElement/index.ts\n/**\n* Reactive `document.activeElement`\n*\n* @see https://vueuse.org/useActiveElement\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useActiveElement(options = {}) {\n\tvar _options$document;\n\tconst { window = defaultWindow, deep = true, triggerOnRemoval = false } = options;\n\tconst document = (_options$document = options.document) !== null && _options$document !== void 0 ? _options$document : window === null || window === void 0 ? void 0 : window.document;\n\tconst getDeepActiveElement = () => {\n\t\tlet element = document === null || document === void 0 ? void 0 : document.activeElement;\n\t\tif (deep) {\n\t\t\tvar _element$shadowRoot;\n\t\t\twhile (element === null || element === void 0 ? void 0 : element.shadowRoot) element = element === null || element === void 0 || (_element$shadowRoot = element.shadowRoot) === null || _element$shadowRoot === void 0 ? void 0 : _element$shadowRoot.activeElement;\n\t\t}\n\t\treturn element;\n\t};\n\tconst activeElement = shallowRef();\n\tconst trigger = () => {\n\t\tactiveElement.value = getDeepActiveElement();\n\t};\n\tif (window) {\n\t\tconst listenerOptions = {\n\t\t\tcapture: true,\n\t\t\tpassive: true\n\t\t};\n\t\tuseEventListener(window, \"blur\", (event) => {\n\t\t\tif (event.relatedTarget !== null) return;\n\t\t\ttrigger();\n\t\t}, listenerOptions);\n\t\tuseEventListener(window, \"focus\", trigger, listenerOptions);\n\t}\n\tif (triggerOnRemoval) onElementRemoval(activeElement, trigger, { document });\n\ttrigger();\n\treturn activeElement;\n}\n//#endregion\n//#region useRafFn/index.ts\n/**\n* Call function on every `requestAnimationFrame`. With controls of pausing and resuming.\n*\n* @see https://vueuse.org/useRafFn\n* @param fn\n* @param options\n*/\nfunction useRafFn(fn, options = {}) {\n\tconst { immediate = true, fpsLimit = null, window = defaultWindow, once = false } = options;\n\tconst isActive = shallowRef(false);\n\tconst intervalLimit = computed(() => {\n\t\tconst limit = toValue(fpsLimit);\n\t\treturn limit ? 1e3 / limit : null;\n\t});\n\tlet previousFrameTimestamp = 0;\n\tlet rafId = null;\n\tfunction loop(timestamp) {\n\t\tif (!isActive.value || !window) return;\n\t\tif (!previousFrameTimestamp) previousFrameTimestamp = timestamp;\n\t\tconst delta = timestamp - previousFrameTimestamp;\n\t\tif (intervalLimit.value && delta < intervalLimit.value) {\n\t\t\trafId = window.requestAnimationFrame(loop);\n\t\t\treturn;\n\t\t}\n\t\tpreviousFrameTimestamp = timestamp;\n\t\tfn({\n\t\t\tdelta,\n\t\t\ttimestamp\n\t\t});\n\t\tif (once) {\n\t\t\tisActive.value = false;\n\t\t\trafId = null;\n\t\t\treturn;\n\t\t}\n\t\trafId = window.requestAnimationFrame(loop);\n\t}\n\tfunction resume() {\n\t\tif (!isActive.value && window) {\n\t\t\tisActive.value = true;\n\t\t\tpreviousFrameTimestamp = 0;\n\t\t\trafId = window.requestAnimationFrame(loop);\n\t\t}\n\t}\n\tfunction pause() {\n\t\tisActive.value = false;\n\t\tif (rafId != null && window) {\n\t\t\twindow.cancelAnimationFrame(rafId);\n\t\t\trafId = null;\n\t\t}\n\t}\n\tif (immediate) resume();\n\ttryOnScopeDispose(pause);\n\treturn {\n\t\tisActive: shallowReadonly(isActive),\n\t\tpause,\n\t\tresume\n\t};\n}\n//#endregion\n//#region useAnimate/index.ts\n/**\n* Reactive Web Animations API\n*\n* @see https://vueuse.org/useAnimate\n* @param target\n* @param keyframes\n* @param options\n*/\nfunction useAnimate(target, keyframes, options) {\n\tlet config;\n\tlet animateOptions;\n\tif (isObject(options)) {\n\t\tconfig = options;\n\t\tanimateOptions = objectOmit(options, [\n\t\t\t\"window\",\n\t\t\t\"immediate\",\n\t\t\t\"commitStyles\",\n\t\t\t\"persist\",\n\t\t\t\"onReady\",\n\t\t\t\"onError\"\n\t\t]);\n\t} else {\n\t\tconfig = { duration: options };\n\t\tanimateOptions = options;\n\t}\n\tconst { window = defaultWindow, immediate = true, commitStyles, persist, playbackRate: _playbackRate = 1, onReady, onError = (e) => {\n\t\tconsole.error(e);\n\t} } = config;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window && HTMLElement && \"animate\" in HTMLElement.prototype);\n\tconst animate = shallowRef(void 0);\n\tconst store = shallowReactive({\n\t\tstartTime: null,\n\t\tcurrentTime: null,\n\t\ttimeline: null,\n\t\tplaybackRate: _playbackRate,\n\t\tpending: false,\n\t\tplayState: immediate ? \"idle\" : \"paused\",\n\t\treplaceState: \"active\"\n\t});\n\tconst pending = computed(() => store.pending);\n\tconst playState = computed(() => store.playState);\n\tconst replaceState = computed(() => store.replaceState);\n\tconst startTime = computed({\n\t\tget() {\n\t\t\treturn store.startTime;\n\t\t},\n\t\tset(value) {\n\t\t\tstore.startTime = value;\n\t\t\tif (animate.value) animate.value.startTime = value;\n\t\t}\n\t});\n\tconst currentTime = computed({\n\t\tget() {\n\t\t\treturn store.currentTime;\n\t\t},\n\t\tset(value) {\n\t\t\tstore.currentTime = value;\n\t\t\tif (animate.value) {\n\t\t\t\tanimate.value.currentTime = value;\n\t\t\t\tsyncResume();\n\t\t\t}\n\t\t}\n\t});\n\tconst timeline = computed({\n\t\tget() {\n\t\t\treturn store.timeline;\n\t\t},\n\t\tset(value) {\n\t\t\tstore.timeline = value;\n\t\t\tif (animate.value) animate.value.timeline = value;\n\t\t}\n\t});\n\tconst playbackRate = computed({\n\t\tget() {\n\t\t\treturn store.playbackRate;\n\t\t},\n\t\tset(value) {\n\t\t\tstore.playbackRate = value;\n\t\t\tif (animate.value) animate.value.playbackRate = value;\n\t\t}\n\t});\n\tconst play = () => {\n\t\tif (animate.value) try {\n\t\t\tanimate.value.play();\n\t\t\tsyncResume();\n\t\t} catch (e) {\n\t\t\tsyncPause();\n\t\t\tonError(e);\n\t\t}\n\t\telse update();\n\t};\n\tconst pause = () => {\n\t\ttry {\n\t\t\tvar _animate$value;\n\t\t\t(_animate$value = animate.value) === null || _animate$value === void 0 || _animate$value.pause();\n\t\t\tsyncPause();\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t};\n\tconst reverse = () => {\n\t\tif (!animate.value) update();\n\t\ttry {\n\t\t\tvar _animate$value2;\n\t\t\t(_animate$value2 = animate.value) === null || _animate$value2 === void 0 || _animate$value2.reverse();\n\t\t\tsyncResume();\n\t\t} catch (e) {\n\t\t\tsyncPause();\n\t\t\tonError(e);\n\t\t}\n\t};\n\tconst finish = () => {\n\t\ttry {\n\t\t\tvar _animate$value3;\n\t\t\t(_animate$value3 = animate.value) === null || _animate$value3 === void 0 || _animate$value3.finish();\n\t\t\tsyncPause();\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t};\n\tconst cancel = () => {\n\t\ttry {\n\t\t\tvar _animate$value4;\n\t\t\t(_animate$value4 = animate.value) === null || _animate$value4 === void 0 || _animate$value4.cancel();\n\t\t\tsyncPause();\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t};\n\twatch(() => unrefElement(target), (el) => {\n\t\tif (el) update(true);\n\t\telse animate.value = void 0;\n\t});\n\twatch(() => keyframes, (value) => {\n\t\tif (animate.value) {\n\t\t\tupdate();\n\t\t\tconst targetEl = unrefElement(target);\n\t\t\tif (targetEl) animate.value.effect = new KeyframeEffect(targetEl, toValue(value), animateOptions);\n\t\t}\n\t}, { deep: true });\n\ttryOnMounted(() => update(true), false);\n\ttryOnScopeDispose(cancel);\n\tfunction update(init) {\n\t\tconst el = unrefElement(target);\n\t\tif (!isSupported.value || !el) return;\n\t\tif (!animate.value) animate.value = el.animate(toValue(keyframes), animateOptions);\n\t\tif (persist) animate.value.persist();\n\t\tif (_playbackRate !== 1) animate.value.playbackRate = _playbackRate;\n\t\tif (init && !immediate) animate.value.pause();\n\t\telse syncResume();\n\t\tonReady === null || onReady === void 0 || onReady(animate.value);\n\t}\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(animate, [\n\t\t\"cancel\",\n\t\t\"finish\",\n\t\t\"remove\"\n\t], syncPause, listenerOptions);\n\tuseEventListener(animate, \"finish\", () => {\n\t\tvar _animate$value5;\n\t\tif (commitStyles) (_animate$value5 = animate.value) === null || _animate$value5 === void 0 || _animate$value5.commitStyles();\n\t}, listenerOptions);\n\tconst { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n\t\tif (!animate.value) return;\n\t\tstore.pending = animate.value.pending;\n\t\tstore.playState = animate.value.playState;\n\t\tstore.replaceState = animate.value.replaceState;\n\t\tstore.startTime = animate.value.startTime;\n\t\tstore.currentTime = animate.value.currentTime;\n\t\tstore.timeline = animate.value.timeline;\n\t\tstore.playbackRate = animate.value.playbackRate;\n\t}, { immediate: false });\n\tfunction syncResume() {\n\t\tif (isSupported.value) resumeRef();\n\t}\n\tfunction syncPause() {\n\t\tif (isSupported.value && window) window.requestAnimationFrame(pauseRef);\n\t}\n\treturn {\n\t\tisSupported,\n\t\tanimate,\n\t\tplay,\n\t\tpause,\n\t\treverse,\n\t\tfinish,\n\t\tcancel,\n\t\tpending,\n\t\tplayState,\n\t\treplaceState,\n\t\tstartTime,\n\t\tcurrentTime,\n\t\ttimeline,\n\t\tplaybackRate\n\t};\n}\n//#endregion\n//#region useAsyncQueue/index.ts\n/**\n* Asynchronous queue task controller.\n*\n* @see https://vueuse.org/useAsyncQueue\n* @param tasks\n* @param options\n*/\nfunction useAsyncQueue(tasks, options) {\n\tconst { interrupt = true, onError = noop, onFinished = noop, signal } = options || {};\n\tconst promiseState = {\n\t\taborted: \"aborted\",\n\t\tfulfilled: \"fulfilled\",\n\t\tpending: \"pending\",\n\t\trejected: \"rejected\"\n\t};\n\tconst result = reactive(Array.from(Array.from({ length: tasks.length }), () => ({\n\t\tstate: promiseState.pending,\n\t\tdata: null\n\t})));\n\tconst activeIndex = shallowRef(-1);\n\tif (!tasks || tasks.length === 0) {\n\t\tonFinished();\n\t\treturn {\n\t\t\tactiveIndex,\n\t\t\tresult\n\t\t};\n\t}\n\tfunction updateResult(state, res) {\n\t\tactiveIndex.value++;\n\t\tresult[activeIndex.value].data = res;\n\t\tresult[activeIndex.value].state = state;\n\t}\n\ttasks.reduce((prev, curr) => {\n\t\treturn prev.then((prevRes) => {\n\t\t\tvar _result$activeIndex$v;\n\t\t\tif (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n\t\t\t\tupdateResult(promiseState.aborted, /* @__PURE__ */ new Error(\"aborted\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (((_result$activeIndex$v = result[activeIndex.value]) === null || _result$activeIndex$v === void 0 ? void 0 : _result$activeIndex$v.state) === promiseState.rejected && interrupt) {\n\t\t\t\tonFinished();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst done = curr(prevRes).then((currentRes) => {\n\t\t\t\tupdateResult(promiseState.fulfilled, currentRes);\n\t\t\t\tif (activeIndex.value === tasks.length - 1) onFinished();\n\t\t\t\treturn currentRes;\n\t\t\t});\n\t\t\tif (!signal) return done;\n\t\t\treturn Promise.race([done, whenAborted(signal)]);\n\t\t}).catch((e) => {\n\t\t\tif (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n\t\t\t\tupdateResult(promiseState.aborted, e);\n\t\t\t\treturn e;\n\t\t\t}\n\t\t\tupdateResult(promiseState.rejected, e);\n\t\t\tonError();\n\t\t\tif (activeIndex.value === tasks.length - 1) onFinished();\n\t\t\treturn e;\n\t\t});\n\t}, Promise.resolve());\n\treturn {\n\t\tactiveIndex,\n\t\tresult\n\t};\n}\nfunction whenAborted(signal) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst error = /* @__PURE__ */ new Error(\"aborted\");\n\t\tif (signal.aborted) reject(error);\n\t\telse signal.addEventListener(\"abort\", () => reject(error), { once: true });\n\t});\n}\n//#endregion\n//#region useAsyncState/index.ts\n/**\n* Reactive async state. Will not block your setup function and will trigger changes once\n* the promise is ready.\n*\n* @see https://vueuse.org/useAsyncState\n* @param promise         The promise / async function to be resolved\n* @param initialState    The initial state, used until the first evaluation finishes\n* @param options\n*/\nfunction useAsyncState(promise, initialState, options) {\n\tvar _globalThis$reportErr;\n\tconst { immediate = true, delay = 0, onError = (_globalThis$reportErr = globalThis.reportError) !== null && _globalThis$reportErr !== void 0 ? _globalThis$reportErr : noop, onSuccess = noop, resetOnExecute = true, shallow = true, throwError } = options !== null && options !== void 0 ? options : {};\n\tconst state = shallow ? shallowRef(initialState) : ref(initialState);\n\tconst isReady = shallowRef(false);\n\tconst isLoading = shallowRef(false);\n\tconst error = shallowRef(void 0);\n\tlet executionsCount = 0;\n\tasync function execute(delay = 0, ...args) {\n\t\tconst executionId = executionsCount += 1;\n\t\tif (resetOnExecute) state.value = toValue(initialState);\n\t\terror.value = void 0;\n\t\tisReady.value = false;\n\t\tisLoading.value = true;\n\t\tif (delay > 0) await promiseTimeout(delay);\n\t\tconst _promise = typeof promise === \"function\" ? promise(...args) : promise;\n\t\ttry {\n\t\t\tconst data = await _promise;\n\t\t\tif (executionId === executionsCount) {\n\t\t\t\tstate.value = data;\n\t\t\t\tisReady.value = true;\n\t\t\t}\n\t\t\tonSuccess(data);\n\t\t\treturn data;\n\t\t} catch (e) {\n\t\t\tif (executionId === executionsCount) error.value = e;\n\t\t\tonError(e);\n\t\t\tif (throwError) throw e;\n\t\t} finally {\n\t\t\tif (executionId === executionsCount) isLoading.value = false;\n\t\t}\n\t}\n\tif (immediate) execute(delay);\n\tconst shell = {\n\t\tstate,\n\t\tisReady,\n\t\tisLoading,\n\t\terror,\n\t\texecute,\n\t\texecuteImmediate: (...args) => execute(0, ...args)\n\t};\n\tfunction waitUntilIsLoaded() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tuntil(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n\t\t});\n\t}\n\treturn {\n\t\t...shell,\n\t\tthen(onFulfilled, onRejected) {\n\t\t\treturn waitUntilIsLoaded().then(onFulfilled, onRejected);\n\t\t}\n\t};\n}\n//#endregion\n//#region useBase64/serialization.ts\nconst defaults = {\n\tarray: (v) => JSON.stringify(v),\n\tobject: (v) => JSON.stringify(v),\n\tset: (v) => JSON.stringify(Array.from(v)),\n\tmap: (v) => JSON.stringify(Object.fromEntries(v)),\n\tnull: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n\tif (!target) return defaults.null;\n\tif (target instanceof Map) return defaults.map;\n\telse if (target instanceof Set) return defaults.set;\n\telse if (Array.isArray(target)) return defaults.array;\n\telse return defaults.object;\n}\n//#endregion\n//#region useBase64/index.ts\nfunction useBase64(target, options) {\n\tconst base64 = shallowRef(\"\");\n\tconst promise = shallowRef();\n\tfunction execute() {\n\t\tif (!isClient) return;\n\t\tpromise.value = new Promise((resolve, reject) => {\n\t\t\ttry {\n\t\t\t\tconst _target = toValue(target);\n\t\t\t\tif (_target == null) resolve(\"\");\n\t\t\t\telse if (typeof _target === \"string\") resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n\t\t\t\telse if (_target instanceof Blob) resolve(blobToBase64(_target));\n\t\t\t\telse if (_target instanceof ArrayBuffer) resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n\t\t\t\telse if (_target instanceof HTMLCanvasElement) resolve(_target.toDataURL(options === null || options === void 0 ? void 0 : options.type, options === null || options === void 0 ? void 0 : options.quality));\n\t\t\t\telse if (_target instanceof HTMLImageElement) {\n\t\t\t\t\tconst img = _target.cloneNode(false);\n\t\t\t\t\timg.crossOrigin = \"Anonymous\";\n\t\t\t\t\timgLoaded(img).then(() => {\n\t\t\t\t\t\tconst canvas = document.createElement(\"canvas\");\n\t\t\t\t\t\tconst ctx = canvas.getContext(\"2d\");\n\t\t\t\t\t\tcanvas.width = img.width;\n\t\t\t\t\t\tcanvas.height = img.height;\n\t\t\t\t\t\tctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n\t\t\t\t\t\tresolve(canvas.toDataURL(options === null || options === void 0 ? void 0 : options.type, options === null || options === void 0 ? void 0 : options.quality));\n\t\t\t\t\t}).catch(reject);\n\t\t\t\t} else if (typeof _target === \"object\") {\n\t\t\t\t\tconst serialized = ((options === null || options === void 0 ? void 0 : options.serializer) || getDefaultSerialization(_target))(_target);\n\t\t\t\t\treturn resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n\t\t\t\t} else reject(/* @__PURE__ */ new Error(\"target is unsupported types\"));\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t}\n\t\t});\n\t\tpromise.value.then((res) => {\n\t\t\tbase64.value = (options === null || options === void 0 ? void 0 : options.dataUrl) === false ? res.replace(/^data:.*?;base64,/, \"\") : res;\n\t\t});\n\t\treturn promise.value;\n\t}\n\tif (isRef(target) || typeof target === \"function\") watch(target, execute, { immediate: true });\n\telse execute();\n\treturn {\n\t\tbase64,\n\t\tpromise,\n\t\texecute\n\t};\n}\nfunction imgLoaded(img) {\n\treturn new Promise((resolve, reject) => {\n\t\tif (!img.complete) {\n\t\t\timg.onload = () => {\n\t\t\t\tresolve();\n\t\t\t};\n\t\t\timg.onerror = reject;\n\t\t} else resolve();\n\t});\n}\nfunction blobToBase64(blob) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst fr = new FileReader();\n\t\tfr.onload = (e) => {\n\t\t\tresolve(e.target.result);\n\t\t};\n\t\tfr.onerror = reject;\n\t\tfr.readAsDataURL(blob);\n\t});\n}\n//#endregion\n//#region useBattery/index.ts\n/**\n* Reactive Battery Status API.\n*\n* @see https://vueuse.org/useBattery\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useBattery(options = {}) {\n\tconst { navigator = defaultNavigator } = options;\n\tconst events = [\n\t\t\"chargingchange\",\n\t\t\"chargingtimechange\",\n\t\t\"dischargingtimechange\",\n\t\t\"levelchange\"\n\t];\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator && \"getBattery\" in navigator && typeof navigator.getBattery === \"function\");\n\tconst charging = shallowRef(false);\n\tconst chargingTime = shallowRef(0);\n\tconst dischargingTime = shallowRef(0);\n\tconst level = shallowRef(1);\n\tlet battery;\n\tfunction updateBatteryInfo() {\n\t\tcharging.value = this.charging;\n\t\tchargingTime.value = this.chargingTime || 0;\n\t\tdischargingTime.value = this.dischargingTime || 0;\n\t\tlevel.value = this.level;\n\t}\n\tif (isSupported.value) navigator.getBattery().then((_battery) => {\n\t\tbattery = _battery;\n\t\tupdateBatteryInfo.call(battery);\n\t\tuseEventListener(battery, events, updateBatteryInfo, { passive: true });\n\t});\n\treturn {\n\t\tisSupported,\n\t\tcharging,\n\t\tchargingTime,\n\t\tdischargingTime,\n\t\tlevel\n\t};\n}\n//#endregion\n//#region useBluetooth/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useBluetooth(options) {\n\tlet { acceptAllDevices = false } = options || {};\n\tconst { filters = void 0, optionalServices = void 0, navigator = defaultNavigator } = options || {};\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator && \"bluetooth\" in navigator);\n\tconst device = shallowRef();\n\tconst error = shallowRef(null);\n\twatch(device, () => {\n\t\tconnectToBluetoothGATTServer();\n\t});\n\tasync function requestDevice() {\n\t\tif (!isSupported.value) return;\n\t\terror.value = null;\n\t\tif (filters && filters.length > 0) acceptAllDevices = false;\n\t\ttry {\n\t\t\tdevice.value = await (navigator === null || navigator === void 0 ? void 0 : navigator.bluetooth.requestDevice({\n\t\t\t\tacceptAllDevices,\n\t\t\t\tfilters,\n\t\t\t\toptionalServices\n\t\t\t}));\n\t\t} catch (err) {\n\t\t\terror.value = err;\n\t\t}\n\t}\n\tconst server = shallowRef();\n\tconst isConnected = shallowRef(false);\n\tfunction reset() {\n\t\tisConnected.value = false;\n\t\tdevice.value = void 0;\n\t\tserver.value = void 0;\n\t}\n\tasync function connectToBluetoothGATTServer() {\n\t\terror.value = null;\n\t\tif (device.value && device.value.gatt) {\n\t\t\tuseEventListener(device, \"gattserverdisconnected\", reset, { passive: true });\n\t\t\ttry {\n\t\t\t\tserver.value = await device.value.gatt.connect();\n\t\t\t\tisConnected.value = server.value.connected;\n\t\t\t} catch (err) {\n\t\t\t\terror.value = err;\n\t\t\t}\n\t\t}\n\t}\n\ttryOnMounted(() => {\n\t\tvar _device$value$gatt;\n\t\tif (device.value) (_device$value$gatt = device.value.gatt) === null || _device$value$gatt === void 0 || _device$value$gatt.connect();\n\t});\n\ttryOnScopeDispose(() => {\n\t\tvar _device$value$gatt2;\n\t\tif (device.value) (_device$value$gatt2 = device.value.gatt) === null || _device$value$gatt2 === void 0 || _device$value$gatt2.disconnect();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tisConnected: shallowReadonly(isConnected),\n\t\tdevice,\n\t\trequestDevice,\n\t\tserver,\n\t\terror\n\t};\n}\n//#endregion\n//#region useSSRWidth/index.ts\nconst ssrWidthSymbol = Symbol(\"vueuse-ssr-width\");\n/* @__NO_SIDE_EFFECTS__ */\nfunction useSSRWidth() {\n\tconst ssrWidth = hasInjectionContext() ? injectLocal(ssrWidthSymbol, null) : null;\n\treturn typeof ssrWidth === \"number\" ? ssrWidth : void 0;\n}\nfunction provideSSRWidth(width, app) {\n\tif (app !== void 0) app.provide(ssrWidthSymbol, width);\n\telse provideLocal(ssrWidthSymbol, width);\n}\n//#endregion\n//#region useMediaQuery/index.ts\n/**\n* Reactive Media Query.\n*\n* @see https://vueuse.org/useMediaQuery\n* @param query\n* @param options\n*/\nfunction useMediaQuery(query, options = {}) {\n\tconst { window = defaultWindow, ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n\tconst ssrSupport = shallowRef(typeof ssrWidth === \"number\");\n\tconst mediaQuery = shallowRef();\n\tconst matches = shallowRef(false);\n\tconst handler = (event) => {\n\t\tmatches.value = event.matches;\n\t};\n\twatchEffect(() => {\n\t\tif (ssrSupport.value) {\n\t\t\tssrSupport.value = !isSupported.value;\n\t\t\tmatches.value = toValue(query).split(\",\").some((queryString) => {\n\t\t\t\tconst not = queryString.includes(\"not all\");\n\t\t\t\tconst minWidth = queryString.match(/\\(\\s*min-width:\\s*(-?\\d+(?:\\.\\d*)?[a-z]+\\s*)\\)/);\n\t\t\t\tconst maxWidth = queryString.match(/\\(\\s*max-width:\\s*(-?\\d+(?:\\.\\d*)?[a-z]+\\s*)\\)/);\n\t\t\t\tlet res = Boolean(minWidth || maxWidth);\n\t\t\t\tif (minWidth && res) res = ssrWidth >= pxValue(minWidth[1]);\n\t\t\t\tif (maxWidth && res) res = ssrWidth <= pxValue(maxWidth[1]);\n\t\t\t\treturn not ? !res : res;\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (!isSupported.value) return;\n\t\tmediaQuery.value = window.matchMedia(toValue(query));\n\t\tmatches.value = mediaQuery.value.matches;\n\t});\n\tuseEventListener(mediaQuery, \"change\", handler, { passive: true });\n\treturn computed(() => matches.value);\n}\n//#endregion\n//#region useBreakpoints/breakpoints.ts\n/**\n* Breakpoints from Tailwind V2\n*\n* @see https://tailwindcss.com/docs/breakpoints\n*/\nconst breakpointsTailwind = {\n\t\"sm\": 640,\n\t\"md\": 768,\n\t\"lg\": 1024,\n\t\"xl\": 1280,\n\t\"2xl\": 1536\n};\n/**\n* Breakpoints from Bootstrap V5\n*\n* @see https://getbootstrap.com/docs/5.0/layout/breakpoints\n*/\nconst breakpointsBootstrapV5 = {\n\txs: 0,\n\tsm: 576,\n\tmd: 768,\n\tlg: 992,\n\txl: 1200,\n\txxl: 1400\n};\n/**\n* Breakpoints from Vuetify V2\n*\n* @see https://v2.vuetifyjs.com/en/features/breakpoints/\n*/\nconst breakpointsVuetifyV2 = {\n\txs: 0,\n\tsm: 600,\n\tmd: 960,\n\tlg: 1264,\n\txl: 1904\n};\n/**\n* Breakpoints from Vuetify V3\n*\n* @see https://vuetifyjs.com/en/styles/float/#overview\n*/\nconst breakpointsVuetifyV3 = {\n\txs: 0,\n\tsm: 600,\n\tmd: 960,\n\tlg: 1280,\n\txl: 1920,\n\txxl: 2560\n};\n/**\n* Alias to `breakpointsVuetifyV2`\n*\n* @deprecated explictly use `breakpointsVuetifyV2` or `breakpointsVuetifyV3` instead\n*/\nconst breakpointsVuetify = breakpointsVuetifyV2;\n/**\n* Breakpoints from Ant Design\n*\n* @see https://ant.design/components/layout/#breakpoint-width\n*/\nconst breakpointsAntDesign = {\n\txs: 480,\n\tsm: 576,\n\tmd: 768,\n\tlg: 992,\n\txl: 1200,\n\txxl: 1600\n};\n/**\n* Breakpoints from Quasar V2\n*\n* @see https://quasar.dev/style/breakpoints\n*/\nconst breakpointsQuasar = {\n\txs: 0,\n\tsm: 600,\n\tmd: 1024,\n\tlg: 1440,\n\txl: 1920\n};\n/**\n* Sematic Breakpoints\n*/\nconst breakpointsSematic = {\n\tmobileS: 320,\n\tmobileM: 375,\n\tmobileL: 425,\n\ttablet: 768,\n\tlaptop: 1024,\n\tlaptopL: 1440,\n\tdesktop4K: 2560\n};\n/**\n* Breakpoints from Master CSS\n*\n* @see https://docs.master.co/css/breakpoints\n*/\nconst breakpointsMasterCss = {\n\t\"3xs\": 360,\n\t\"2xs\": 480,\n\t\"xs\": 600,\n\t\"sm\": 768,\n\t\"md\": 1024,\n\t\"lg\": 1280,\n\t\"xl\": 1440,\n\t\"2xl\": 1600,\n\t\"3xl\": 1920,\n\t\"4xl\": 2560\n};\n/**\n* Breakpoints from PrimeFlex\n*\n* @see https://primeflex.org/installation\n*/\nconst breakpointsPrimeFlex = {\n\tsm: 576,\n\tmd: 768,\n\tlg: 992,\n\txl: 1200\n};\n/**\n* Breakpoints from ElementUI/ElementPlus\n*\n* @see https://element.eleme.io/#/en-US/component/layout\n* @see https://element-plus.org/en-US/component/layout.html\n*/\nconst breakpointsElement = {\n\txs: 0,\n\tsm: 768,\n\tmd: 992,\n\tlg: 1200,\n\txl: 1920\n};\n//#endregion\n//#region useBreakpoints/index.ts\n/**\n* Reactively viewport breakpoints\n*\n* @see https://vueuse.org/useBreakpoints\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useBreakpoints(breakpoints, options = {}) {\n\tfunction getValue(k, delta) {\n\t\tlet v = toValue(breakpoints[toValue(k)]);\n\t\tif (delta != null) v = increaseWithUnit(v, delta);\n\t\tif (typeof v === \"number\") v = `${v}px`;\n\t\treturn v;\n\t}\n\tconst { window = defaultWindow, strategy = \"min-width\", ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;\n\tconst ssrSupport = typeof ssrWidth === \"number\";\n\tconst mounted = ssrSupport ? shallowRef(false) : { value: true };\n\tif (ssrSupport) tryOnMounted(() => mounted.value = !!window);\n\tfunction match(query, size) {\n\t\tif (!mounted.value && ssrSupport) return query === \"min\" ? ssrWidth >= pxValue(size) : ssrWidth <= pxValue(size);\n\t\tif (!window) return false;\n\t\treturn window.matchMedia(`(${query}-width: ${size})`).matches;\n\t}\n\tconst greaterOrEqual = (k) => {\n\t\treturn useMediaQuery(() => `(min-width: ${getValue(k)})`, options);\n\t};\n\tconst smallerOrEqual = (k) => {\n\t\treturn useMediaQuery(() => `(max-width: ${getValue(k)})`, options);\n\t};\n\tconst shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n\t\tObject.defineProperty(shortcuts, k, {\n\t\t\tget: () => strategy === \"min-width\" ? greaterOrEqual(k) : smallerOrEqual(k),\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true\n\t\t});\n\t\treturn shortcuts;\n\t}, {});\n\tfunction current() {\n\t\tconst points = Object.keys(breakpoints).map((k) => [\n\t\t\tk,\n\t\t\tshortcutMethods[k],\n\t\t\tpxValue(getValue(k))\n\t\t]).sort((a, b) => a[2] - b[2]);\n\t\treturn computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n\t}\n\treturn Object.assign(shortcutMethods, {\n\t\tgreaterOrEqual,\n\t\tsmallerOrEqual,\n\t\tgreater(k) {\n\t\t\treturn useMediaQuery(() => `(min-width: ${getValue(k, .1)})`, options);\n\t\t},\n\t\tsmaller(k) {\n\t\t\treturn useMediaQuery(() => `(max-width: ${getValue(k, -.1)})`, options);\n\t\t},\n\t\tbetween(a, b) {\n\t\t\treturn useMediaQuery(() => `(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -.1)})`, options);\n\t\t},\n\t\tisGreater(k) {\n\t\t\treturn match(\"min\", getValue(k, .1));\n\t\t},\n\t\tisGreaterOrEqual(k) {\n\t\t\treturn match(\"min\", getValue(k));\n\t\t},\n\t\tisSmaller(k) {\n\t\t\treturn match(\"max\", getValue(k, -.1));\n\t\t},\n\t\tisSmallerOrEqual(k) {\n\t\t\treturn match(\"max\", getValue(k));\n\t\t},\n\t\tisInBetween(a, b) {\n\t\t\treturn match(\"min\", getValue(a)) && match(\"max\", getValue(b, -.1));\n\t\t},\n\t\tcurrent,\n\t\tactive() {\n\t\t\tconst bps = current();\n\t\t\treturn computed(() => bps.value.length === 0 ? \"\" : bps.value.at(strategy === \"min-width\" ? -1 : 0));\n\t\t}\n\t});\n}\n//#endregion\n//#region useBroadcastChannel/index.ts\n/**\n* Reactive BroadcastChannel\n*\n* @see https://vueuse.org/useBroadcastChannel\n* @see https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel\n* @param options\n*\n*/\nfunction useBroadcastChannel(options) {\n\tconst { name, window = defaultWindow } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window && \"BroadcastChannel\" in window);\n\tconst isClosed = shallowRef(false);\n\tconst channel = shallowRef();\n\tconst data = shallowRef();\n\tconst error = shallowRef(null);\n\tconst post = (data) => {\n\t\tif (channel.value) channel.value.postMessage(data);\n\t};\n\tconst close = () => {\n\t\tif (channel.value) channel.value.close();\n\t\tisClosed.value = true;\n\t};\n\tif (isSupported.value) tryOnMounted(() => {\n\t\terror.value = null;\n\t\tchannel.value = new BroadcastChannel(name);\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(channel, \"message\", (e) => {\n\t\t\tdata.value = e.data;\n\t\t}, listenerOptions);\n\t\tuseEventListener(channel, \"messageerror\", (e) => {\n\t\t\terror.value = e;\n\t\t}, listenerOptions);\n\t\tuseEventListener(channel, \"close\", () => {\n\t\t\tisClosed.value = true;\n\t\t}, listenerOptions);\n\t});\n\ttryOnScopeDispose(() => {\n\t\tclose();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tchannel,\n\t\tdata,\n\t\tpost,\n\t\tclose,\n\t\terror,\n\t\tisClosed\n\t};\n}\n//#endregion\n//#region useBrowserLocation/index.ts\nconst WRITABLE_PROPERTIES = [\n\t\"hash\",\n\t\"host\",\n\t\"hostname\",\n\t\"href\",\n\t\"pathname\",\n\t\"port\",\n\t\"protocol\",\n\t\"search\"\n];\n/**\n* Reactive browser location.\n*\n* @see https://vueuse.org/useBrowserLocation\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useBrowserLocation(options = {}) {\n\tconst { window = defaultWindow } = options;\n\tconst refs = Object.fromEntries(WRITABLE_PROPERTIES.map((key) => [key, ref()]));\n\tfor (const [key, ref] of objectEntries(refs)) watch(ref, (value) => {\n\t\tif (!(window === null || window === void 0 ? void 0 : window.location) || window.location[key] === value) return;\n\t\twindow.location[key] = value;\n\t});\n\tconst buildState = (trigger) => {\n\t\tvar _window$location;\n\t\tconst { state, length } = (window === null || window === void 0 ? void 0 : window.history) || {};\n\t\tconst { origin } = (window === null || window === void 0 ? void 0 : window.location) || {};\n\t\tfor (const key of WRITABLE_PROPERTIES) refs[key].value = window === null || window === void 0 || (_window$location = window.location) === null || _window$location === void 0 ? void 0 : _window$location[key];\n\t\treturn reactive({\n\t\t\ttrigger,\n\t\t\tstate,\n\t\t\tlength,\n\t\t\torigin,\n\t\t\t...refs\n\t\t});\n\t};\n\tconst state = ref(buildState(\"load\"));\n\tif (window) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), listenerOptions);\n\t\tuseEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), listenerOptions);\n\t}\n\treturn state;\n}\n//#endregion\n//#region useCached/index.ts\nfunction useCached(refValue, comparator = (newSourceValue, cachedValue) => newSourceValue === cachedValue, options) {\n\tconst { deepRefs = true, ...watchOptions } = options || {};\n\tconst cachedValue = createRef(refValue.value, deepRefs);\n\twatch(() => refValue.value, (value) => {\n\t\tif (!comparator(value, cachedValue.value)) cachedValue.value = value;\n\t}, watchOptions);\n\treturn cachedValue;\n}\n//#endregion\n//#region usePermission/index.ts\n/**\n* Reactive Permissions API.\n*\n* @see https://vueuse.org/usePermission\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePermission(permissionDesc, options = {}) {\n\tconst { controls = false, navigator = defaultNavigator } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator && \"permissions\" in navigator);\n\tconst permissionStatus = shallowRef();\n\tconst desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n\tconst state = shallowRef();\n\tconst update = () => {\n\t\tvar _permissionStatus$val, _permissionStatus$val2;\n\t\tstate.value = (_permissionStatus$val = (_permissionStatus$val2 = permissionStatus.value) === null || _permissionStatus$val2 === void 0 ? void 0 : _permissionStatus$val2.state) !== null && _permissionStatus$val !== void 0 ? _permissionStatus$val : \"prompt\";\n\t};\n\tuseEventListener(permissionStatus, \"change\", update, { passive: true });\n\tconst query = createSingletonPromise(async () => {\n\t\tif (!isSupported.value) return;\n\t\tif (!permissionStatus.value) try {\n\t\t\tpermissionStatus.value = await navigator.permissions.query(desc);\n\t\t} catch (_unused) {\n\t\t\tpermissionStatus.value = void 0;\n\t\t} finally {\n\t\t\tupdate();\n\t\t}\n\t\tif (controls) return toRaw(permissionStatus.value);\n\t});\n\tquery();\n\tif (controls) return {\n\t\tstate,\n\t\tisSupported,\n\t\tquery\n\t};\n\telse return state;\n}\n//#endregion\n//#region useClipboard/index.ts\nfunction useClipboard(options = {}) {\n\tconst { navigator = defaultNavigator, read = false, source, copiedDuring = 1500, legacy = false } = options;\n\tconst isClipboardApiSupported = /* @__PURE__ */ useSupported(() => navigator && \"clipboard\" in navigator);\n\tconst permissionRead = usePermission(\"clipboard-read\");\n\tconst permissionWrite = usePermission(\"clipboard-write\");\n\tconst isSupported = computed(() => isClipboardApiSupported.value || legacy);\n\tconst text = shallowRef(\"\");\n\tconst copied = shallowRef(false);\n\tconst copyPending = shallowRef(false);\n\tconst timeout = useTimeoutFn(() => copied.value = false, copiedDuring, { immediate: false });\n\tlet lastLegacyId = 0;\n\tasync function updateText() {\n\t\tlet useLegacy = !(isClipboardApiSupported.value && isAllowed(permissionRead.value));\n\t\tif (!useLegacy) try {\n\t\t\ttext.value = await navigator.clipboard.readText();\n\t\t} catch (_unused) {\n\t\t\tuseLegacy = true;\n\t\t}\n\t\tif (useLegacy) text.value = legacyRead();\n\t}\n\tif (isSupported.value && read) useEventListener([\"copy\", \"cut\"], updateText, { passive: true });\n\tasync function copy(value) {\n\t\tconst resolvedValue = value !== null && value !== void 0 ? value : toValue(source);\n\t\tif (isSupported.value && resolvedValue != null) {\n\t\t\tcopyPending.value = true;\n\t\t\tlet useLegacy = !(isClipboardApiSupported.value && isAllowed(permissionWrite.value));\n\t\t\tif (!useLegacy) try {\n\t\t\t\tconst clipboardItem = createClipboardItem(resolvedValue);\n\t\t\t\tawait navigator.clipboard.write([clipboardItem]);\n\t\t\t} catch (_unused2) {\n\t\t\t\tuseLegacy = true;\n\t\t\t}\n\t\t\tif (useLegacy) if (typeof resolvedValue === \"string\") {\n\t\t\t\ttext.value = resolvedValue;\n\t\t\t\tlegacyCopy(resolvedValue);\n\t\t\t} else {\n\t\t\t\tconst currentId = ++lastLegacyId;\n\t\t\t\tconst resolvedText = await resolvedValue();\n\t\t\t\tif (resolvedText != null && currentId === lastLegacyId) {\n\t\t\t\t\ttext.value = resolvedText;\n\t\t\t\t\tlegacyCopy(resolvedText);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcopied.value = true;\n\t\t\ttimeout.start();\n\t\t\tcopyPending.value = false;\n\t\t}\n\t}\n\tfunction createClipboardItem(value) {\n\t\tif (typeof value === \"string\") {\n\t\t\ttext.value = value;\n\t\t\treturn new ClipboardItem({ \"text/plain\": value });\n\t\t} else return new ClipboardItem({ \"text/plain\": value().then((resolvedText = \"\") => {\n\t\t\ttext.value = resolvedText;\n\t\t\treturn new Blob([resolvedText], { type: \"text/plain\" });\n\t\t}) });\n\t}\n\tfunction legacyCopy(value) {\n\t\tconst ta = document.createElement(\"textarea\");\n\t\tta.value = value;\n\t\tta.style.position = \"absolute\";\n\t\tta.style.opacity = \"0\";\n\t\tta.setAttribute(\"readonly\", \"\");\n\t\tdocument.body.appendChild(ta);\n\t\tta.select();\n\t\tdocument.execCommand(\"copy\");\n\t\tta.remove();\n\t}\n\tfunction legacyRead() {\n\t\tvar _document$getSelectio, _document, _document$getSelectio2;\n\t\treturn (_document$getSelectio = (_document = document) === null || _document === void 0 || (_document$getSelectio2 = _document.getSelection) === null || _document$getSelectio2 === void 0 || (_document$getSelectio2 = _document$getSelectio2.call(_document)) === null || _document$getSelectio2 === void 0 ? void 0 : _document$getSelectio2.toString()) !== null && _document$getSelectio !== void 0 ? _document$getSelectio : \"\";\n\t}\n\tfunction isAllowed(status) {\n\t\treturn status === \"granted\" || status === \"prompt\";\n\t}\n\treturn {\n\t\tcopyPending: shallowReadonly(copyPending),\n\t\tisSupported,\n\t\ttext: shallowReadonly(text),\n\t\tcopied: shallowReadonly(copied),\n\t\tcopy\n\t};\n}\n//#endregion\n//#region useClipboardItems/index.ts\nfunction useClipboardItems(options = {}) {\n\tconst { navigator = defaultNavigator, read = false, source, copiedDuring = 1500 } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator && \"clipboard\" in navigator);\n\tconst content = shallowRef([]);\n\tconst copied = shallowRef(false);\n\tconst timeout = useTimeoutFn(() => copied.value = false, copiedDuring, { immediate: false });\n\tfunction updateContent() {\n\t\tif (isSupported.value) navigator.clipboard.read().then((items) => {\n\t\t\tcontent.value = items;\n\t\t});\n\t}\n\tif (isSupported.value && read) useEventListener([\"copy\", \"cut\"], updateContent, { passive: true });\n\tasync function copy(value = toValue(source)) {\n\t\tif (isSupported.value && value != null) {\n\t\t\tawait navigator.clipboard.write(value);\n\t\t\tcontent.value = value;\n\t\t\tcopied.value = true;\n\t\t\ttimeout.start();\n\t\t}\n\t}\n\treturn {\n\t\tisSupported,\n\t\tcontent: shallowReadonly(content),\n\t\tcopied: shallowReadonly(copied),\n\t\tcopy,\n\t\tread: updateContent\n\t};\n}\n//#endregion\n//#region useCloned/index.ts\nfunction cloneFnJSON(source) {\n\treturn JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n\tconst cloned = ref({});\n\tconst isModified = shallowRef(false);\n\tlet _lastSync = false;\n\tconst { manual, clone = cloneFnJSON, deep = true, immediate = true } = options;\n\twatch(cloned, () => {\n\t\tif (_lastSync) {\n\t\t\t_lastSync = false;\n\t\t\treturn;\n\t\t}\n\t\tisModified.value = true;\n\t}, {\n\t\tdeep: true,\n\t\tflush: \"sync\"\n\t});\n\tfunction sync() {\n\t\t_lastSync = true;\n\t\tisModified.value = false;\n\t\tcloned.value = clone(toValue(source));\n\t}\n\tif (!manual && (isRef(source) || typeof source === \"function\")) watch(source, sync, {\n\t\t...options,\n\t\tdeep,\n\t\timmediate\n\t});\n\telse sync();\n\treturn {\n\t\tcloned,\n\t\tisModified,\n\t\tsync\n\t};\n}\n//#endregion\n//#region ssr-handlers.ts\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\nconst handlers = /* @__PURE__ */ getHandlers();\nfunction getHandlers() {\n\tif (!(globalKey in _global)) _global[globalKey] = _global[globalKey] || {};\n\treturn _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n\treturn handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n\thandlers[key] = fn;\n}\n//#endregion\n//#region usePreferredDark/index.ts\n/**\n* Reactive dark theme preference.\n*\n* @see https://vueuse.org/usePreferredDark\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredDark(options) {\n\treturn useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n//#endregion\n//#region useStorage/guess.ts\nfunction guessSerializerType(rawInit) {\n\treturn rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n//#endregion\n//#region useStorage/index.ts\nconst StorageSerializers = {\n\tboolean: {\n\t\tread: (v) => v === \"true\",\n\t\twrite: (v) => String(v)\n\t},\n\tobject: {\n\t\tread: (v) => JSON.parse(v),\n\t\twrite: (v) => JSON.stringify(v)\n\t},\n\tnumber: {\n\t\tread: (v) => Number.parseFloat(v),\n\t\twrite: (v) => String(v)\n\t},\n\tany: {\n\t\tread: (v) => v,\n\t\twrite: (v) => String(v)\n\t},\n\tstring: {\n\t\tread: (v) => v,\n\t\twrite: (v) => String(v)\n\t},\n\tmap: {\n\t\tread: (v) => new Map(JSON.parse(v)),\n\t\twrite: (v) => JSON.stringify(Array.from(v.entries()))\n\t},\n\tset: {\n\t\tread: (v) => new Set(JSON.parse(v)),\n\t\twrite: (v) => JSON.stringify(Array.from(v))\n\t},\n\tdate: {\n\t\tread: (v) => new Date(v),\n\t\twrite: (v) => v.toISOString()\n\t}\n};\nconst customStorageEventName = \"vueuse-storage\";\n/**\n* Reactive LocalStorage/SessionStorage.\n*\n* @see https://vueuse.org/useStorage\n*/\nfunction useStorage(key, defaults, storage, options = {}) {\n\tvar _options$serializer;\n\tconst { flush = \"pre\", deep = true, listenToStorageChanges = true, writeDefaults = true, mergeDefaults = false, shallow, window = defaultWindow, eventFilter, onError = (e) => {\n\t\tconsole.error(e);\n\t}, initOnMounted } = options;\n\tconst data = (shallow ? shallowRef : ref)(typeof defaults === \"function\" ? defaults() : defaults);\n\tconst keyComputed = computed(() => toValue(key));\n\tif (!storage) try {\n\t\tstorage = getSSRHandler(\"getDefaultStorage\", () => defaultWindow === null || defaultWindow === void 0 ? void 0 : defaultWindow.localStorage)();\n\t} catch (e) {\n\t\tonError(e);\n\t}\n\tif (!storage) return data;\n\tconst rawInit = toValue(defaults);\n\tconst type = guessSerializerType(rawInit);\n\tconst serializer = (_options$serializer = options.serializer) !== null && _options$serializer !== void 0 ? _options$serializer : StorageSerializers[type];\n\tconst { pause: pauseWatch, resume: resumeWatch } = watchPausable(data, (newValue) => write(newValue), {\n\t\tflush,\n\t\tdeep,\n\t\teventFilter\n\t});\n\twatch(keyComputed, () => update(), { flush });\n\tlet firstMounted = false;\n\tconst onStorageEvent = (ev) => {\n\t\tif (initOnMounted && !firstMounted) return;\n\t\tupdate(ev);\n\t};\n\tconst onStorageCustomEvent = (ev) => {\n\t\tif (initOnMounted && !firstMounted) return;\n\t\tupdateFromCustomEvent(ev);\n\t};\n\t/**\n\t* The custom event is needed for same-document syncing when using custom\n\t* storage backends, but it doesn't work across different documents.\n\t*\n\t* TODO: Consider implementing a BroadcastChannel-based solution that fixes this.\n\t*/\n\tif (window && listenToStorageChanges) if (storage instanceof Storage) useEventListener(window, \"storage\", onStorageEvent, { passive: true });\n\telse useEventListener(window, customStorageEventName, onStorageCustomEvent);\n\tif (initOnMounted) tryOnMounted(() => {\n\t\tfirstMounted = true;\n\t\tupdate();\n\t});\n\telse update();\n\tfunction dispatchWriteEvent(oldValue, newValue) {\n\t\tif (window) {\n\t\t\tconst payload = {\n\t\t\t\tkey: keyComputed.value,\n\t\t\t\toldValue,\n\t\t\t\tnewValue,\n\t\t\t\tstorageArea: storage\n\t\t\t};\n\t\t\twindow.dispatchEvent(storage instanceof Storage ? new StorageEvent(\"storage\", payload) : new CustomEvent(customStorageEventName, { detail: payload }));\n\t\t}\n\t}\n\tfunction write(v) {\n\t\ttry {\n\t\t\tconst oldValue = storage.getItem(keyComputed.value);\n\t\t\tif (v == null) {\n\t\t\t\tdispatchWriteEvent(oldValue, null);\n\t\t\t\tstorage.removeItem(keyComputed.value);\n\t\t\t} else {\n\t\t\t\tconst serialized = serializer.write(v);\n\t\t\t\tif (oldValue !== serialized) {\n\t\t\t\t\tstorage.setItem(keyComputed.value, serialized);\n\t\t\t\t\tdispatchWriteEvent(oldValue, serialized);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t}\n\tfunction read(event) {\n\t\tconst rawValue = event ? event.newValue : storage.getItem(keyComputed.value);\n\t\tif (rawValue == null) {\n\t\t\tif (writeDefaults && rawInit != null) storage.setItem(keyComputed.value, serializer.write(rawInit));\n\t\t\treturn rawInit;\n\t\t} else if (!event && mergeDefaults) {\n\t\t\tconst value = serializer.read(rawValue);\n\t\t\tif (typeof mergeDefaults === \"function\") return mergeDefaults(value, rawInit);\n\t\t\telse if (type === \"object\" && !Array.isArray(value)) return {\n\t\t\t\t...rawInit,\n\t\t\t\t...value\n\t\t\t};\n\t\t\treturn value;\n\t\t} else if (typeof rawValue !== \"string\") return rawValue;\n\t\telse return serializer.read(rawValue);\n\t}\n\tfunction update(event) {\n\t\tif (event && event.storageArea !== storage) return;\n\t\tif (event && event.key == null) {\n\t\t\tdata.value = rawInit;\n\t\t\treturn;\n\t\t}\n\t\tif (event && event.key !== keyComputed.value) return;\n\t\tpauseWatch();\n\t\ttry {\n\t\t\tconst serializedData = serializer.write(data.value);\n\t\t\tif (event === void 0 || (event === null || event === void 0 ? void 0 : event.newValue) !== serializedData) data.value = read(event);\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t} finally {\n\t\t\tif (event) nextTick(resumeWatch);\n\t\t\telse resumeWatch();\n\t\t}\n\t}\n\tfunction updateFromCustomEvent(event) {\n\t\tupdate(event.detail);\n\t}\n\treturn data;\n}\n//#endregion\n//#region useColorMode/index.ts\nconst CSS_DISABLE_TRANS = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\n/**\n* Reactive color mode with auto data persistence.\n*\n* @see https://vueuse.org/useColorMode\n* @param options\n*/\nfunction useColorMode(options = {}) {\n\tconst { selector = \"html\", attribute = \"class\", initialValue = \"auto\", window = defaultWindow, storage, storageKey = \"vueuse-color-scheme\", listenToStorageChanges = true, storageRef, emitAuto, disableTransition = true } = options;\n\tconst modes = {\n\t\tauto: \"\",\n\t\tlight: \"light\",\n\t\tdark: \"dark\",\n\t\t...options.modes || {}\n\t};\n\tconst preferredDark = usePreferredDark({ window });\n\tconst system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n\tconst store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, {\n\t\twindow,\n\t\tlistenToStorageChanges\n\t}));\n\tconst state = computed(() => store.value === \"auto\" ? system.value : store.value);\n\tconst updateHTMLAttrs = getSSRHandler(\"updateHTMLAttrs\", (selector, attribute, value) => {\n\t\tconst el = typeof selector === \"string\" ? window === null || window === void 0 ? void 0 : window.document.querySelector(selector) : unrefElement(selector);\n\t\tif (!el) return;\n\t\tconst classesToAdd = /* @__PURE__ */ new Set();\n\t\tconst classesToRemove = /* @__PURE__ */ new Set();\n\t\tlet attributeToChange = null;\n\t\tif (attribute === \"class\") {\n\t\t\tconst current = value.split(/\\s/g);\n\t\t\tObject.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n\t\t\t\tif (current.includes(v)) classesToAdd.add(v);\n\t\t\t\telse classesToRemove.add(v);\n\t\t\t});\n\t\t} else attributeToChange = {\n\t\t\tkey: attribute,\n\t\t\tvalue\n\t\t};\n\t\tif (classesToAdd.size === 0 && classesToRemove.size === 0 && attributeToChange === null) return;\n\t\tlet style;\n\t\tif (disableTransition) {\n\t\t\tstyle = window.document.createElement(\"style\");\n\t\t\tstyle.appendChild(document.createTextNode(CSS_DISABLE_TRANS));\n\t\t\twindow.document.head.appendChild(style);\n\t\t}\n\t\tfor (const c of classesToAdd) el.classList.add(c);\n\t\tfor (const c of classesToRemove) el.classList.remove(c);\n\t\tif (attributeToChange) el.setAttribute(attributeToChange.key, attributeToChange.value);\n\t\tif (disableTransition) {\n\t\t\twindow.getComputedStyle(style).opacity;\n\t\t\tdocument.head.removeChild(style);\n\t\t}\n\t});\n\tfunction defaultOnChanged(mode) {\n\t\tvar _modes$mode;\n\t\tupdateHTMLAttrs(selector, attribute, (_modes$mode = modes[mode]) !== null && _modes$mode !== void 0 ? _modes$mode : mode);\n\t}\n\tfunction onChanged(mode) {\n\t\tif (options.onChanged) options.onChanged(mode, defaultOnChanged);\n\t\telse defaultOnChanged(mode);\n\t}\n\twatch(state, onChanged, {\n\t\tflush: \"post\",\n\t\timmediate: true\n\t});\n\ttryOnMounted(() => onChanged(state.value));\n\tconst auto = computed({\n\t\tget() {\n\t\t\treturn emitAuto ? store.value : state.value;\n\t\t},\n\t\tset(v) {\n\t\t\tstore.value = v;\n\t\t}\n\t});\n\treturn Object.assign(auto, {\n\t\tstore,\n\t\tsystem,\n\t\tstate\n\t});\n}\n//#endregion\n//#region useConfirmDialog/index.ts\n/**\n* Hooks for creating confirm dialogs. Useful for modal windows, popups and logins.\n*\n* @see https://vueuse.org/useConfirmDialog/\n* @param revealed `boolean` `ref` that handles a modal window\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useConfirmDialog(revealed = shallowRef(false)) {\n\tconst confirmHook = createEventHook();\n\tconst cancelHook = createEventHook();\n\tconst revealHook = createEventHook();\n\tlet _resolve = noop;\n\tconst reveal = (data) => {\n\t\trevealHook.trigger(data);\n\t\trevealed.value = true;\n\t\treturn new Promise((resolve) => {\n\t\t\t_resolve = resolve;\n\t\t});\n\t};\n\tconst confirm = (data) => {\n\t\trevealed.value = false;\n\t\tconfirmHook.trigger(data);\n\t\t_resolve({\n\t\t\tdata,\n\t\t\tisCanceled: false\n\t\t});\n\t};\n\tconst cancel = (data) => {\n\t\trevealed.value = false;\n\t\tcancelHook.trigger(data);\n\t\t_resolve({\n\t\t\tdata,\n\t\t\tisCanceled: true\n\t\t});\n\t};\n\treturn {\n\t\tisRevealed: computed(() => revealed.value),\n\t\treveal,\n\t\tconfirm,\n\t\tcancel,\n\t\tonReveal: revealHook.on,\n\t\tonConfirm: confirmHook.on,\n\t\tonCancel: cancelHook.on\n\t};\n}\n//#endregion\n//#region useCountdown/index.ts\nfunction getDefaultScheduler$8(options) {\n\tif (\"interval\" in options || \"immediate\" in options) {\n\t\tconst { interval = 1e3, immediate = false } = options;\n\t\treturn (cb) => useIntervalFn(cb, interval, { immediate });\n\t}\n\treturn (cb) => useIntervalFn(cb, 1e3, { immediate: false });\n}\n/**\n* Reactive countdown timer in seconds.\n*\n* @param initialCountdown\n* @param options\n*\n* @see https://vueuse.org/useCountdown\n*/\nfunction useCountdown(initialCountdown, options = {}) {\n\tconst remaining = shallowRef(toValue(initialCountdown));\n\tconst { scheduler = getDefaultScheduler$8(options), onTick, onComplete } = options;\n\tconst controls = scheduler(() => {\n\t\tconst value = remaining.value - 1;\n\t\tremaining.value = value < 0 ? 0 : value;\n\t\tonTick === null || onTick === void 0 || onTick();\n\t\tif (remaining.value <= 0) {\n\t\t\tcontrols.pause();\n\t\t\tonComplete === null || onComplete === void 0 || onComplete();\n\t\t}\n\t});\n\tconst reset = (countdown) => {\n\t\tvar _toValue;\n\t\tremaining.value = (_toValue = toValue(countdown)) !== null && _toValue !== void 0 ? _toValue : toValue(initialCountdown);\n\t};\n\tconst stop = () => {\n\t\tcontrols.pause();\n\t\treset();\n\t};\n\tconst resume = () => {\n\t\tif (!controls.isActive.value) {\n\t\t\tif (remaining.value > 0) controls.resume();\n\t\t}\n\t};\n\tconst start = (countdown) => {\n\t\treset(countdown);\n\t\tcontrols.resume();\n\t};\n\treturn {\n\t\tremaining,\n\t\treset,\n\t\tstop,\n\t\tstart,\n\t\tpause: controls.pause,\n\t\tresume,\n\t\tisActive: controls.isActive\n\t};\n}\n//#endregion\n//#region useCssSupports/index.ts\nfunction useCssSupports(...args) {\n\tlet options = {};\n\tif (typeof toValue(args.at(-1)) === \"object\") options = args.pop();\n\tconst [prop, value] = args;\n\tconst { window = defaultWindow, ssrValue = false } = options;\n\tconst isMounted = useMounted();\n\treturn { isSupported: computed(() => {\n\t\tif (!isClient || !isMounted.value) return ssrValue;\n\t\treturn args.length === 2 ? window === null || window === void 0 ? void 0 : window.CSS.supports(toValue(prop), toValue(value)) : window === null || window === void 0 ? void 0 : window.CSS.supports(toValue(prop));\n\t}) };\n}\n//#endregion\n//#region useCssVar/index.ts\n/**\n* Manipulate CSS variables.\n*\n* @see https://vueuse.org/useCssVar\n* @param prop\n* @param target\n* @param options\n*/\nfunction useCssVar(prop, target, options = {}) {\n\tconst { window = defaultWindow, initialValue, observe = false } = options;\n\tconst variable = shallowRef(initialValue);\n\tconst elRef = computed(() => {\n\t\tvar _window$document;\n\t\treturn unrefElement(target) || (window === null || window === void 0 || (_window$document = window.document) === null || _window$document === void 0 ? void 0 : _window$document.documentElement);\n\t});\n\tfunction updateCssVar() {\n\t\tconst key = toValue(prop);\n\t\tconst el = toValue(elRef);\n\t\tif (el && window && key) {\n\t\t\tvar _window$getComputedSt;\n\t\t\tvariable.value = ((_window$getComputedSt = window.getComputedStyle(el).getPropertyValue(key)) === null || _window$getComputedSt === void 0 ? void 0 : _window$getComputedSt.trim()) || variable.value || initialValue;\n\t\t}\n\t}\n\tif (observe) useMutationObserver(elRef, updateCssVar, {\n\t\tattributeFilter: [\"style\", \"class\"],\n\t\twindow\n\t});\n\twatch([elRef, () => toValue(prop)], (_, old) => {\n\t\tif (old[0] && old[1]) old[0].style.removeProperty(old[1]);\n\t\tupdateCssVar();\n\t}, { immediate: true });\n\twatch([variable, elRef], ([val, el]) => {\n\t\tconst raw_prop = toValue(prop);\n\t\tif ((el === null || el === void 0 ? void 0 : el.style) && raw_prop) if (val == null) el.style.removeProperty(raw_prop);\n\t\telse el.style.setProperty(raw_prop, val);\n\t}, { immediate: true });\n\treturn variable;\n}\n//#endregion\n//#region useCurrentElement/index.ts\nfunction useCurrentElement(rootComponent) {\n\tconst vm = getCurrentInstance();\n\tconst currentElement = computedWithControl(() => null, () => rootComponent ? unrefElement(rootComponent) : vm.proxy.$el);\n\tonUpdated(currentElement.trigger);\n\tonMounted(currentElement.trigger);\n\treturn currentElement;\n}\n//#endregion\n//#region useCycleList/index.ts\n/**\n* Cycle through a list of items\n*\n* @see https://vueuse.org/useCycleList\n*/\nfunction useCycleList(list, options) {\n\tconst state = shallowRef(getInitialValue());\n\tconst listRef = toRef(list);\n\tconst index = computed({\n\t\tget() {\n\t\t\tvar _options$fallbackInde;\n\t\t\tconst targetList = listRef.value;\n\t\t\tlet index = (options === null || options === void 0 ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n\t\t\tif (index < 0) index = (_options$fallbackInde = options === null || options === void 0 ? void 0 : options.fallbackIndex) !== null && _options$fallbackInde !== void 0 ? _options$fallbackInde : 0;\n\t\t\treturn index;\n\t\t},\n\t\tset(v) {\n\t\t\tset(v);\n\t\t}\n\t});\n\tfunction set(i) {\n\t\tconst targetList = listRef.value;\n\t\tconst length = targetList.length;\n\t\tconst value = targetList[(i % length + length) % length];\n\t\tstate.value = value;\n\t\treturn value;\n\t}\n\tfunction shift(delta = 1) {\n\t\treturn set(index.value + delta);\n\t}\n\tfunction next(n = 1) {\n\t\treturn shift(n);\n\t}\n\tfunction prev(n = 1) {\n\t\treturn shift(-n);\n\t}\n\tfunction getInitialValue() {\n\t\tvar _toValue, _options$initialValue;\n\t\treturn (_toValue = toValue((_options$initialValue = options === null || options === void 0 ? void 0 : options.initialValue) !== null && _options$initialValue !== void 0 ? _options$initialValue : toValue(list)[0])) !== null && _toValue !== void 0 ? _toValue : void 0;\n\t}\n\twatch(listRef, () => set(index.value));\n\treturn {\n\t\tstate,\n\t\tindex,\n\t\tnext,\n\t\tprev,\n\t\tgo: set\n\t};\n}\n//#endregion\n//#region useDark/index.ts\n/**\n* Reactive dark mode with auto data persistence.\n*\n* @see https://vueuse.org/useDark\n* @param options\n*/\nfunction useDark(options = {}) {\n\tconst { valueDark = \"dark\", valueLight = \"\" } = options;\n\tconst mode = useColorMode({\n\t\t...options,\n\t\tonChanged: (mode, defaultHandler) => {\n\t\t\tvar _options$onChanged;\n\t\t\tif (options.onChanged) (_options$onChanged = options.onChanged) === null || _options$onChanged === void 0 || _options$onChanged.call(options, mode === \"dark\", defaultHandler, mode);\n\t\t\telse defaultHandler(mode);\n\t\t},\n\t\tmodes: {\n\t\t\tdark: valueDark,\n\t\t\tlight: valueLight\n\t\t}\n\t});\n\tconst system = computed(() => mode.system.value);\n\treturn computed({\n\t\tget() {\n\t\t\treturn mode.value === \"dark\";\n\t\t},\n\t\tset(v) {\n\t\t\tconst modeVal = v ? \"dark\" : \"light\";\n\t\t\tif (system.value === modeVal) mode.value = \"auto\";\n\t\t\telse mode.value = modeVal;\n\t\t}\n\t});\n}\n//#endregion\n//#region useManualRefHistory/index.ts\nfunction fnBypass(v) {\n\treturn v;\n}\nfunction fnSetSource(source, value) {\n\treturn source.value = value;\n}\nfunction defaultDump(clone) {\n\treturn clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n\treturn clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\n/**\n* Track the change history of a ref, also provides undo and redo functionality.\n*\n* @see https://vueuse.org/useManualRefHistory\n* @param source\n* @param options\n*/\nfunction useManualRefHistory(source, options = {}) {\n\tconst { clone = false, dump = defaultDump(clone), parse = defaultParse(clone), setSource = fnSetSource } = options;\n\tfunction _createHistoryRecord() {\n\t\treturn markRaw({\n\t\t\tsnapshot: dump(source.value),\n\t\t\ttimestamp: timestamp()\n\t\t});\n\t}\n\tconst last = ref(_createHistoryRecord());\n\tconst undoStack = ref([]);\n\tconst redoStack = ref([]);\n\tconst _setSource = (record) => {\n\t\tsetSource(source, parse(record.snapshot));\n\t\tlast.value = record;\n\t};\n\tconst commit = () => {\n\t\tundoStack.value.unshift(last.value);\n\t\tlast.value = _createHistoryRecord();\n\t\tif (options.capacity && undoStack.value.length > options.capacity) undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n\t\tif (redoStack.value.length) redoStack.value.splice(0, redoStack.value.length);\n\t};\n\tconst clear = () => {\n\t\tundoStack.value.splice(0, undoStack.value.length);\n\t\tredoStack.value.splice(0, redoStack.value.length);\n\t};\n\tconst undo = () => {\n\t\tconst state = undoStack.value.shift();\n\t\tif (state) {\n\t\t\tredoStack.value.unshift(last.value);\n\t\t\t_setSource(state);\n\t\t}\n\t};\n\tconst redo = () => {\n\t\tconst state = redoStack.value.shift();\n\t\tif (state) {\n\t\t\tundoStack.value.unshift(last.value);\n\t\t\t_setSource(state);\n\t\t}\n\t};\n\tconst reset = () => {\n\t\t_setSource(last.value);\n\t};\n\treturn {\n\t\tsource,\n\t\tundoStack,\n\t\tredoStack,\n\t\tlast,\n\t\thistory: computed(() => [last.value, ...undoStack.value]),\n\t\tcanUndo: computed(() => undoStack.value.length > 0),\n\t\tcanRedo: computed(() => redoStack.value.length > 0),\n\t\tclear,\n\t\tcommit,\n\t\treset,\n\t\tundo,\n\t\tredo\n\t};\n}\n//#endregion\n//#region useRefHistory/index.ts\n/**\n* Track the change history of a ref, also provides undo and redo functionality.\n*\n* @see https://vueuse.org/useRefHistory\n* @param source\n* @param options\n*/\nfunction useRefHistory(source, options = {}) {\n\tconst { deep = false, flush = \"pre\", eventFilter, shouldCommit = () => true } = options;\n\tconst { eventFilter: composedFilter, pause, resume: resumeTracking, isActive: isTracking } = pausableFilter(eventFilter);\n\tlet lastRawValue = source.value;\n\tconst { ignoreUpdates, ignorePrevAsyncUpdates, stop } = watchIgnorable(source, commit, {\n\t\tdeep,\n\t\tflush,\n\t\teventFilter: composedFilter\n\t});\n\tfunction setSource(source, value) {\n\t\tignorePrevAsyncUpdates();\n\t\tignoreUpdates(() => {\n\t\t\tsource.value = value;\n\t\t\tlastRawValue = value;\n\t\t});\n\t}\n\tconst manualHistory = useManualRefHistory(source, {\n\t\t...options,\n\t\tclone: options.clone || deep,\n\t\tsetSource\n\t});\n\tconst { clear, commit: manualCommit } = manualHistory;\n\tfunction commit() {\n\t\tignorePrevAsyncUpdates();\n\t\tif (!shouldCommit(lastRawValue, source.value)) return;\n\t\tlastRawValue = source.value;\n\t\tmanualCommit();\n\t}\n\tfunction resume(commitNow) {\n\t\tresumeTracking();\n\t\tif (commitNow) commit();\n\t}\n\tfunction batch(fn) {\n\t\tlet canceled = false;\n\t\tconst cancel = () => canceled = true;\n\t\tignoreUpdates(() => {\n\t\t\tfn(cancel);\n\t\t});\n\t\tif (!canceled) commit();\n\t}\n\tfunction dispose() {\n\t\tstop();\n\t\tclear();\n\t}\n\treturn {\n\t\t...manualHistory,\n\t\tisTracking,\n\t\tpause,\n\t\tresume,\n\t\tcommit,\n\t\tbatch,\n\t\tdispose\n\t};\n}\n//#endregion\n//#region useDebouncedRefHistory/index.ts\n/**\n* Shorthand for [useRefHistory](https://vueuse.org/useRefHistory) with debounce filter.\n*\n* @see https://vueuse.org/useDebouncedRefHistory\n* @param source\n* @param options\n*/\nfunction useDebouncedRefHistory(source, options = {}) {\n\tconst filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n\treturn { ...useRefHistory(source, {\n\t\t...options,\n\t\teventFilter: filter\n\t}) };\n}\n//#endregion\n//#region useDeviceMotion/index.ts\n/**\n* Reactive DeviceMotionEvent.\n*\n* @see https://vueuse.org/useDeviceMotion\n* @param options\n*/\nfunction useDeviceMotion(options = {}) {\n\tconst { window = defaultWindow, requestPermissions = false, eventFilter = bypassFilter } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof DeviceMotionEvent !== \"undefined\");\n\tconst requirePermissions = /* @__PURE__ */ useSupported(() => isSupported.value && \"requestPermission\" in DeviceMotionEvent && typeof DeviceMotionEvent.requestPermission === \"function\");\n\tconst permissionGranted = shallowRef(false);\n\tconst acceleration = ref({\n\t\tx: null,\n\t\ty: null,\n\t\tz: null\n\t});\n\tconst rotationRate = ref({\n\t\talpha: null,\n\t\tbeta: null,\n\t\tgamma: null\n\t});\n\tconst interval = shallowRef(0);\n\tconst accelerationIncludingGravity = ref({\n\t\tx: null,\n\t\ty: null,\n\t\tz: null\n\t});\n\tfunction init() {\n\t\tif (window) useEventListener(window, \"devicemotion\", createFilterWrapper(eventFilter, (event) => {\n\t\t\tvar _event$acceleration, _event$acceleration2, _event$acceleration3, _event$accelerationIn, _event$accelerationIn2, _event$accelerationIn3, _event$rotationRate, _event$rotationRate2, _event$rotationRate3;\n\t\t\tacceleration.value = {\n\t\t\t\tx: ((_event$acceleration = event.acceleration) === null || _event$acceleration === void 0 ? void 0 : _event$acceleration.x) || null,\n\t\t\t\ty: ((_event$acceleration2 = event.acceleration) === null || _event$acceleration2 === void 0 ? void 0 : _event$acceleration2.y) || null,\n\t\t\t\tz: ((_event$acceleration3 = event.acceleration) === null || _event$acceleration3 === void 0 ? void 0 : _event$acceleration3.z) || null\n\t\t\t};\n\t\t\taccelerationIncludingGravity.value = {\n\t\t\t\tx: ((_event$accelerationIn = event.accelerationIncludingGravity) === null || _event$accelerationIn === void 0 ? void 0 : _event$accelerationIn.x) || null,\n\t\t\t\ty: ((_event$accelerationIn2 = event.accelerationIncludingGravity) === null || _event$accelerationIn2 === void 0 ? void 0 : _event$accelerationIn2.y) || null,\n\t\t\t\tz: ((_event$accelerationIn3 = event.accelerationIncludingGravity) === null || _event$accelerationIn3 === void 0 ? void 0 : _event$accelerationIn3.z) || null\n\t\t\t};\n\t\t\trotationRate.value = {\n\t\t\t\talpha: ((_event$rotationRate = event.rotationRate) === null || _event$rotationRate === void 0 ? void 0 : _event$rotationRate.alpha) || null,\n\t\t\t\tbeta: ((_event$rotationRate2 = event.rotationRate) === null || _event$rotationRate2 === void 0 ? void 0 : _event$rotationRate2.beta) || null,\n\t\t\t\tgamma: ((_event$rotationRate3 = event.rotationRate) === null || _event$rotationRate3 === void 0 ? void 0 : _event$rotationRate3.gamma) || null\n\t\t\t};\n\t\t\tinterval.value = event.interval;\n\t\t}), { passive: true });\n\t}\n\tconst ensurePermissions = async () => {\n\t\tif (!requirePermissions.value) permissionGranted.value = true;\n\t\tif (permissionGranted.value) return;\n\t\tif (requirePermissions.value) {\n\t\t\tconst requestPermission = DeviceMotionEvent.requestPermission;\n\t\t\ttry {\n\t\t\t\tif (await requestPermission() === \"granted\") {\n\t\t\t\t\tpermissionGranted.value = true;\n\t\t\t\t\tinit();\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(error);\n\t\t\t}\n\t\t}\n\t};\n\tif (isSupported.value) if (requestPermissions && requirePermissions.value) ensurePermissions().then(() => init());\n\telse init();\n\treturn {\n\t\tacceleration,\n\t\taccelerationIncludingGravity,\n\t\trotationRate,\n\t\tinterval,\n\t\tisSupported,\n\t\trequirePermissions,\n\t\tensurePermissions,\n\t\tpermissionGranted\n\t};\n}\n//#endregion\n//#region useDeviceOrientation/index.ts\n/**\n* Reactive DeviceOrientationEvent.\n*\n* @see https://vueuse.org/useDeviceOrientation\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDeviceOrientation(options = {}) {\n\tconst { window = defaultWindow } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window && \"DeviceOrientationEvent\" in window);\n\tconst isAbsolute = shallowRef(false);\n\tconst alpha = shallowRef(null);\n\tconst beta = shallowRef(null);\n\tconst gamma = shallowRef(null);\n\tif (window && isSupported.value) useEventListener(window, \"deviceorientation\", (event) => {\n\t\tisAbsolute.value = event.absolute;\n\t\talpha.value = event.alpha;\n\t\tbeta.value = event.beta;\n\t\tgamma.value = event.gamma;\n\t}, { passive: true });\n\treturn {\n\t\tisSupported,\n\t\tisAbsolute,\n\t\talpha,\n\t\tbeta,\n\t\tgamma\n\t};\n}\n//#endregion\n//#region useDevicePixelRatio/index.ts\n/**\n* Reactively track `window.devicePixelRatio`.\n*\n* @see https://vueuse.org/useDevicePixelRatio\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDevicePixelRatio(options = {}) {\n\tconst { window = defaultWindow } = options;\n\tconst pixelRatio = shallowRef(1);\n\tconst query = useMediaQuery(() => `(resolution: ${pixelRatio.value}dppx)`, options);\n\tlet stop = noop;\n\tif (window) stop = watchImmediate(query, () => pixelRatio.value = window.devicePixelRatio);\n\treturn {\n\t\tpixelRatio: shallowReadonly(pixelRatio),\n\t\tstop\n\t};\n}\n//#endregion\n//#region useDevicesList/index.ts\n/**\n* Reactive `enumerateDevices` listing available input/output devices\n*\n* @see https://vueuse.org/useDevicesList\n* @param options\n*/\nfunction useDevicesList(options = {}) {\n\tconst { navigator = defaultNavigator, requestPermissions = false, constraints = {\n\t\taudio: true,\n\t\tvideo: true\n\t}, onUpdated } = options;\n\tconst devices = shallowRef([]);\n\tconst videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n\tconst audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n\tconst audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n\tconst permissionGranted = shallowRef(false);\n\tlet stream;\n\tasync function update() {\n\t\tif (!isSupported.value) return;\n\t\tdevices.value = await navigator.mediaDevices.enumerateDevices();\n\t\tonUpdated === null || onUpdated === void 0 || onUpdated(devices.value);\n\t\tif (stream) {\n\t\t\tstream.getTracks().forEach((t) => t.stop());\n\t\t\tstream = null;\n\t\t}\n\t}\n\tasync function ensurePermissions() {\n\t\tconst deviceName = constraints.video ? \"camera\" : \"microphone\";\n\t\tif (!isSupported.value) return false;\n\t\tif (permissionGranted.value) return true;\n\t\tconst { state, query } = usePermission(deviceName, { controls: true });\n\t\tawait query();\n\t\tif (state.value !== \"granted\") {\n\t\t\tlet granted = true;\n\t\t\ttry {\n\t\t\t\tconst allDevices = await navigator.mediaDevices.enumerateDevices();\n\t\t\t\tconst hasCamera = allDevices.some((device) => device.kind === \"videoinput\");\n\t\t\t\tconst hasMicrophone = allDevices.some((device) => device.kind === \"audioinput\" || device.kind === \"audiooutput\");\n\t\t\t\tconstraints.video = hasCamera ? constraints.video : false;\n\t\t\t\tconstraints.audio = hasMicrophone ? constraints.audio : false;\n\t\t\t\tstream = await navigator.mediaDevices.getUserMedia(constraints);\n\t\t\t} catch (_unused) {\n\t\t\t\tstream = null;\n\t\t\t\tgranted = false;\n\t\t\t}\n\t\t\tupdate();\n\t\t\tpermissionGranted.value = granted;\n\t\t} else permissionGranted.value = true;\n\t\treturn permissionGranted.value;\n\t}\n\tif (isSupported.value) {\n\t\tif (requestPermissions) ensurePermissions();\n\t\tuseEventListener(navigator.mediaDevices, \"devicechange\", update, { passive: true });\n\t\tupdate();\n\t}\n\treturn {\n\t\tdevices,\n\t\tensurePermissions,\n\t\tpermissionGranted,\n\t\tvideoInputs,\n\t\taudioInputs,\n\t\taudioOutputs,\n\t\tisSupported\n\t};\n}\n//#endregion\n//#region useDisplayMedia/index.ts\n/**\n* Reactive `mediaDevices.getDisplayMedia` streaming\n*\n* @see https://vueuse.org/useDisplayMedia\n* @param options\n*/\nfunction useDisplayMedia(options = {}) {\n\tvar _options$enabled;\n\tconst enabled = shallowRef((_options$enabled = options.enabled) !== null && _options$enabled !== void 0 ? _options$enabled : false);\n\tconst video = options.video;\n\tconst audio = options.audio;\n\tconst { navigator = defaultNavigator } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => {\n\t\tvar _navigator$mediaDevic;\n\t\treturn navigator === null || navigator === void 0 || (_navigator$mediaDevic = navigator.mediaDevices) === null || _navigator$mediaDevic === void 0 ? void 0 : _navigator$mediaDevic.getDisplayMedia;\n\t});\n\tconst constraint = {\n\t\taudio,\n\t\tvideo\n\t};\n\tconst stream = shallowRef();\n\tasync function _start() {\n\t\tvar _stream$value;\n\t\tif (!isSupported.value || stream.value) return;\n\t\tstream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n\t\t(_stream$value = stream.value) === null || _stream$value === void 0 || _stream$value.getTracks().forEach((t) => useEventListener(t, \"ended\", stop, { passive: true }));\n\t\treturn stream.value;\n\t}\n\tasync function _stop() {\n\t\tvar _stream$value2;\n\t\t(_stream$value2 = stream.value) === null || _stream$value2 === void 0 || _stream$value2.getTracks().forEach((t) => t.stop());\n\t\tstream.value = void 0;\n\t}\n\tfunction stop() {\n\t\t_stop();\n\t\tenabled.value = false;\n\t}\n\tasync function start() {\n\t\tawait _start();\n\t\tif (stream.value) enabled.value = true;\n\t\treturn stream.value;\n\t}\n\twatch(enabled, (v) => {\n\t\tif (v) _start();\n\t\telse _stop();\n\t}, { immediate: true });\n\treturn {\n\t\tisSupported,\n\t\tstream,\n\t\tstart,\n\t\tstop,\n\t\tenabled\n\t};\n}\n//#endregion\n//#region useDocumentVisibility/index.ts\n/**\n* Reactively track `document.visibilityState`.\n*\n* @see https://vueuse.org/useDocumentVisibility\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDocumentVisibility(options = {}) {\n\tconst { document = defaultDocument } = options;\n\tif (!document) return shallowRef(\"visible\");\n\tconst visibility = shallowRef(document.visibilityState);\n\tuseEventListener(document, \"visibilitychange\", () => {\n\t\tvisibility.value = document.visibilityState;\n\t}, { passive: true });\n\treturn visibility;\n}\n//#endregion\n//#region useDraggable/index.ts\nconst defaultScrollConfig = {\n\tspeed: 2,\n\tmargin: 30,\n\tdirection: \"both\"\n};\nfunction clampContainerScroll(container) {\n\tif (container.scrollLeft > container.scrollWidth - container.clientWidth) container.scrollLeft = Math.max(0, container.scrollWidth - container.clientWidth);\n\tif (container.scrollTop > container.scrollHeight - container.clientHeight) container.scrollTop = Math.max(0, container.scrollHeight - container.clientHeight);\n}\n/**\n* Make elements draggable.\n*\n* @see https://vueuse.org/useDraggable\n* @param target\n* @param options\n*/\nfunction useDraggable(target, options = {}) {\n\tvar _toValue, _toValue2, _toValue3, _scrollConfig$directi;\n\tconst { pointerTypes, preventDefault, stopPropagation, exact, onMove, onEnd, onStart, initialValue, axis = \"both\", draggingElement = defaultWindow, containerElement, handle: draggingHandle = target, buttons = [0], restrictInView, autoScroll = false } = options;\n\tconst position = ref((_toValue = toValue(initialValue)) !== null && _toValue !== void 0 ? _toValue : {\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst pressedDelta = ref();\n\tconst filterEvent = (e) => {\n\t\tif (pointerTypes) return pointerTypes.includes(e.pointerType);\n\t\treturn true;\n\t};\n\tconst handleEvent = (e) => {\n\t\tif (toValue(preventDefault)) e.preventDefault();\n\t\tif (toValue(stopPropagation)) e.stopPropagation();\n\t};\n\tconst scrollConfig = toValue(autoScroll);\n\tconst scrollSettings = typeof scrollConfig === \"object\" ? {\n\t\tspeed: (_toValue2 = toValue(scrollConfig.speed)) !== null && _toValue2 !== void 0 ? _toValue2 : defaultScrollConfig.speed,\n\t\tmargin: (_toValue3 = toValue(scrollConfig.margin)) !== null && _toValue3 !== void 0 ? _toValue3 : defaultScrollConfig.margin,\n\t\tdirection: (_scrollConfig$directi = scrollConfig.direction) !== null && _scrollConfig$directi !== void 0 ? _scrollConfig$directi : defaultScrollConfig.direction\n\t} : defaultScrollConfig;\n\tconst getScrollAxisValues = (value) => typeof value === \"number\" ? [value, value] : [value.x, value.y];\n\tconst handleAutoScroll = (container, targetRect, position) => {\n\t\tconst { clientWidth, clientHeight, scrollLeft, scrollTop, scrollWidth, scrollHeight } = container;\n\t\tconst [marginX, marginY] = getScrollAxisValues(scrollSettings.margin);\n\t\tconst [speedX, speedY] = getScrollAxisValues(scrollSettings.speed);\n\t\tlet deltaX = 0;\n\t\tlet deltaY = 0;\n\t\tif (scrollSettings.direction === \"x\" || scrollSettings.direction === \"both\") {\n\t\t\tif (position.x < marginX && scrollLeft > 0) deltaX = -speedX;\n\t\t\telse if (position.x + targetRect.width > clientWidth - marginX && scrollLeft < scrollWidth - clientWidth) deltaX = speedX;\n\t\t}\n\t\tif (scrollSettings.direction === \"y\" || scrollSettings.direction === \"both\") {\n\t\t\tif (position.y < marginY && scrollTop > 0) deltaY = -speedY;\n\t\t\telse if (position.y + targetRect.height > clientHeight - marginY && scrollTop < scrollHeight - clientHeight) deltaY = speedY;\n\t\t}\n\t\tif (deltaX || deltaY) container.scrollBy({\n\t\t\tleft: deltaX,\n\t\t\ttop: deltaY,\n\t\t\tbehavior: \"auto\"\n\t\t});\n\t};\n\tlet autoScrollInterval = null;\n\tconst startAutoScroll = () => {\n\t\tconst container = toValue(containerElement);\n\t\tif (container && !autoScrollInterval) autoScrollInterval = setInterval(() => {\n\t\t\tconst targetRect = toValue(target).getBoundingClientRect();\n\t\t\tconst { x, y } = position.value;\n\t\t\tconst relativePosition = {\n\t\t\t\tx: x - container.scrollLeft,\n\t\t\t\ty: y - container.scrollTop\n\t\t\t};\n\t\t\tif (relativePosition.x >= 0 && relativePosition.y >= 0) {\n\t\t\t\thandleAutoScroll(container, targetRect, relativePosition);\n\t\t\t\trelativePosition.x += container.scrollLeft;\n\t\t\t\trelativePosition.y += container.scrollTop;\n\t\t\t\tposition.value = relativePosition;\n\t\t\t}\n\t\t}, 1e3 / 60);\n\t};\n\tconst stopAutoScroll = () => {\n\t\tif (autoScrollInterval) {\n\t\t\tclearInterval(autoScrollInterval);\n\t\t\tautoScrollInterval = null;\n\t\t}\n\t};\n\tconst isPointerNearEdge = (pointer, container, margin, targetRect) => {\n\t\tconst [marginX, marginY] = typeof margin === \"number\" ? [margin, margin] : [margin.x, margin.y];\n\t\tconst { clientWidth, clientHeight } = container;\n\t\treturn pointer.x < marginX || pointer.x + targetRect.width > clientWidth - marginX || pointer.y < marginY || pointer.y + targetRect.height > clientHeight - marginY;\n\t};\n\tconst checkAutoScroll = () => {\n\t\tif (toValue(options.disabled) || !pressedDelta.value) return;\n\t\tconst container = toValue(containerElement);\n\t\tif (!container) return;\n\t\tconst targetRect = toValue(target).getBoundingClientRect();\n\t\tconst { x, y } = position.value;\n\t\tif (isPointerNearEdge({\n\t\t\tx: x - container.scrollLeft,\n\t\t\ty: y - container.scrollTop\n\t\t}, container, scrollSettings.margin, targetRect)) startAutoScroll();\n\t\telse stopAutoScroll();\n\t};\n\tif (toValue(autoScroll)) watch(position, checkAutoScroll);\n\tconst start = (e) => {\n\t\tvar _container$getBoundin;\n\t\tif (!toValue(buttons).includes(e.button)) return;\n\t\tif (toValue(options.disabled) || !filterEvent(e)) return;\n\t\tif (toValue(exact) && e.target !== toValue(target)) return;\n\t\tconst container = toValue(containerElement);\n\t\tconst containerRect = container === null || container === void 0 || (_container$getBoundin = container.getBoundingClientRect) === null || _container$getBoundin === void 0 ? void 0 : _container$getBoundin.call(container);\n\t\tconst targetRect = toValue(target).getBoundingClientRect();\n\t\tconst pos = {\n\t\t\tx: e.clientX - (container ? targetRect.left - containerRect.left + (autoScroll ? 0 : container.scrollLeft) : targetRect.left),\n\t\t\ty: e.clientY - (container ? targetRect.top - containerRect.top + (autoScroll ? 0 : container.scrollTop) : targetRect.top)\n\t\t};\n\t\tif ((onStart === null || onStart === void 0 ? void 0 : onStart(pos, e)) === false) return;\n\t\tpressedDelta.value = pos;\n\t\thandleEvent(e);\n\t};\n\tconst move = (e) => {\n\t\tif (toValue(options.disabled) || !filterEvent(e)) return;\n\t\tif (!pressedDelta.value) return;\n\t\tconst container = toValue(containerElement);\n\t\tif (container instanceof HTMLElement) clampContainerScroll(container);\n\t\tconst targetRect = toValue(target).getBoundingClientRect();\n\t\tlet { x, y } = position.value;\n\t\tif (axis === \"x\" || axis === \"both\") {\n\t\t\tx = e.clientX - pressedDelta.value.x;\n\t\t\tif (container) x = Math.min(Math.max(0, x), container.scrollWidth - targetRect.width);\n\t\t}\n\t\tif (axis === \"y\" || axis === \"both\") {\n\t\t\ty = e.clientY - pressedDelta.value.y;\n\t\t\tif (container) y = Math.min(Math.max(0, y), container.scrollHeight - targetRect.height);\n\t\t}\n\t\tif (toValue(autoScroll) && container) {\n\t\t\tif (autoScrollInterval === null) handleAutoScroll(container, targetRect, {\n\t\t\t\tx,\n\t\t\t\ty\n\t\t\t});\n\t\t\tx += container.scrollLeft;\n\t\t\ty += container.scrollTop;\n\t\t}\n\t\tif (container && (restrictInView || autoScroll)) {\n\t\t\tif (axis !== \"y\") {\n\t\t\t\tconst relativeX = x - container.scrollLeft;\n\t\t\t\tif (relativeX < 0) x = container.scrollLeft;\n\t\t\t\telse if (relativeX > container.clientWidth - targetRect.width) x = container.clientWidth - targetRect.width + container.scrollLeft;\n\t\t\t}\n\t\t\tif (axis !== \"x\") {\n\t\t\t\tconst relativeY = y - container.scrollTop;\n\t\t\t\tif (relativeY < 0) y = container.scrollTop;\n\t\t\t\telse if (relativeY > container.clientHeight - targetRect.height) y = container.clientHeight - targetRect.height + container.scrollTop;\n\t\t\t}\n\t\t}\n\t\tposition.value = {\n\t\t\tx,\n\t\t\ty\n\t\t};\n\t\tonMove === null || onMove === void 0 || onMove(position.value, e);\n\t\thandleEvent(e);\n\t};\n\tconst end = (e) => {\n\t\tif (toValue(options.disabled) || !filterEvent(e)) return;\n\t\tif (!pressedDelta.value) return;\n\t\tpressedDelta.value = void 0;\n\t\tif (autoScroll) stopAutoScroll();\n\t\tonEnd === null || onEnd === void 0 || onEnd(position.value, e);\n\t\thandleEvent(e);\n\t};\n\tif (isClient) {\n\t\tconst config = () => {\n\t\t\tvar _options$capture;\n\t\t\treturn {\n\t\t\t\tcapture: (_options$capture = options.capture) !== null && _options$capture !== void 0 ? _options$capture : true,\n\t\t\t\tpassive: !toValue(preventDefault)\n\t\t\t};\n\t\t};\n\t\tuseEventListener(draggingHandle, \"pointerdown\", start, config);\n\t\tuseEventListener(draggingElement, \"pointermove\", move, config);\n\t\tuseEventListener(draggingElement, \"pointerup\", end, config);\n\t}\n\treturn {\n\t\t...toRefs(position),\n\t\tposition,\n\t\tisDragging: computed(() => !!pressedDelta.value),\n\t\tstyle: computed(() => `\n      left: ${position.value.x}px;\n      top: ${position.value.y}px;\n      ${autoScroll ? \"text-wrap: nowrap;\" : \"\"}\n    `)\n\t};\n}\n//#endregion\n//#region useDropZone/index.ts\nfunction useDropZone(target, options = {}) {\n\tconst isOverDropZone = shallowRef(false);\n\tconst files = shallowRef(null);\n\tlet counter = 0;\n\tlet isValid = true;\n\tif (isClient) {\n\t\tvar _options$multiple, _options$preventDefau;\n\t\tconst _options = typeof options === \"function\" ? { onDrop: options } : options;\n\t\tconst multiple = (_options$multiple = _options.multiple) !== null && _options$multiple !== void 0 ? _options$multiple : true;\n\t\tconst preventDefaultForUnhandled = (_options$preventDefau = _options.preventDefaultForUnhandled) !== null && _options$preventDefau !== void 0 ? _options$preventDefau : false;\n\t\tconst getFiles = (event) => {\n\t\t\tvar _event$dataTransfer$f, _event$dataTransfer;\n\t\t\tconst list = Array.from((_event$dataTransfer$f = (_event$dataTransfer = event.dataTransfer) === null || _event$dataTransfer === void 0 ? void 0 : _event$dataTransfer.files) !== null && _event$dataTransfer$f !== void 0 ? _event$dataTransfer$f : []);\n\t\t\treturn list.length === 0 ? null : multiple ? list : [list[0]];\n\t\t};\n\t\tconst checkDataTypes = (types) => {\n\t\t\tconst dataTypes = unref(_options.dataTypes);\n\t\t\tif (typeof dataTypes === \"function\") return dataTypes(types);\n\t\t\tif (!(dataTypes === null || dataTypes === void 0 ? void 0 : dataTypes.length)) return true;\n\t\t\tif (types.length === 0) return false;\n\t\t\treturn types.every((type) => dataTypes.some((allowedType) => type.includes(allowedType)));\n\t\t};\n\t\tconst checkValidity = (items) => {\n\t\t\tif (_options.checkValidity) return _options.checkValidity(items);\n\t\t\tconst dataTypesValid = checkDataTypes(Array.from(items !== null && items !== void 0 ? items : []).map((item) => item.type));\n\t\t\tconst multipleFilesValid = multiple || items.length <= 1;\n\t\t\treturn dataTypesValid && multipleFilesValid;\n\t\t};\n\t\tconst isSafari = () => /^(?:(?!chrome|android).)*safari/i.test(navigator.userAgent) && !(\"chrome\" in window);\n\t\tconst handleDragEvent = (event, eventType) => {\n\t\t\tvar _event$dataTransfer2, _ref;\n\t\t\tconst dataTransferItemList = (_event$dataTransfer2 = event.dataTransfer) === null || _event$dataTransfer2 === void 0 ? void 0 : _event$dataTransfer2.items;\n\t\t\tisValid = (_ref = dataTransferItemList && checkValidity(dataTransferItemList)) !== null && _ref !== void 0 ? _ref : false;\n\t\t\tif (preventDefaultForUnhandled) event.preventDefault();\n\t\t\tif (!isSafari() && !isValid) {\n\t\t\t\tif (event.dataTransfer) event.dataTransfer.dropEffect = \"none\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tif (event.dataTransfer) event.dataTransfer.dropEffect = \"copy\";\n\t\t\tconst currentFiles = getFiles(event);\n\t\t\tswitch (eventType) {\n\t\t\t\tcase \"enter\":\n\t\t\t\t\tvar _options$onEnter;\n\t\t\t\t\tcounter += 1;\n\t\t\t\t\tisOverDropZone.value = true;\n\t\t\t\t\t(_options$onEnter = _options.onEnter) === null || _options$onEnter === void 0 || _options$onEnter.call(_options, null, event);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"over\":\n\t\t\t\t\tvar _options$onOver;\n\t\t\t\t\t(_options$onOver = _options.onOver) === null || _options$onOver === void 0 || _options$onOver.call(_options, null, event);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"leave\":\n\t\t\t\t\tvar _options$onLeave;\n\t\t\t\t\tcounter -= 1;\n\t\t\t\t\tif (counter === 0) isOverDropZone.value = false;\n\t\t\t\t\t(_options$onLeave = _options.onLeave) === null || _options$onLeave === void 0 || _options$onLeave.call(_options, null, event);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"drop\":\n\t\t\t\t\tcounter = 0;\n\t\t\t\t\tisOverDropZone.value = false;\n\t\t\t\t\tif (isValid) {\n\t\t\t\t\t\tvar _options$onDrop;\n\t\t\t\t\t\tfiles.value = currentFiles;\n\t\t\t\t\t\t(_options$onDrop = _options.onDrop) === null || _options$onDrop === void 0 || _options$onDrop.call(_options, currentFiles, event);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t};\n\t\tuseEventListener(target, \"dragenter\", (event) => handleDragEvent(event, \"enter\"));\n\t\tuseEventListener(target, \"dragover\", (event) => handleDragEvent(event, \"over\"));\n\t\tuseEventListener(target, \"dragleave\", (event) => handleDragEvent(event, \"leave\"));\n\t\tuseEventListener(target, \"drop\", (event) => handleDragEvent(event, \"drop\"));\n\t}\n\treturn {\n\t\tfiles,\n\t\tisOverDropZone\n\t};\n}\n//#endregion\n//#region useResizeObserver/index.ts\n/**\n* Reports changes to the dimensions of an Element's content or the border-box\n*\n* @see https://vueuse.org/useResizeObserver\n* @param target\n* @param callback\n* @param options\n*/\nfunction useResizeObserver(target, callback, options = {}) {\n\tconst { window = defaultWindow, ...observerOptions } = options;\n\tlet observer;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window && \"ResizeObserver\" in window);\n\tconst cleanup = () => {\n\t\tif (observer) {\n\t\t\tobserver.disconnect();\n\t\t\tobserver = void 0;\n\t\t}\n\t};\n\tconst stopWatch = watch(computed(() => {\n\t\tconst _targets = toValue(target);\n\t\treturn Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];\n\t}), (els) => {\n\t\tcleanup();\n\t\tif (isSupported.value && window) {\n\t\t\tobserver = new ResizeObserver(callback);\n\t\t\tfor (const _el of els) if (_el) observer.observe(_el, observerOptions);\n\t\t}\n\t}, {\n\t\timmediate: true,\n\t\tflush: \"post\"\n\t});\n\tconst stop = () => {\n\t\tcleanup();\n\t\tstopWatch();\n\t};\n\ttryOnScopeDispose(stop);\n\treturn {\n\t\tisSupported,\n\t\tstop\n\t};\n}\n//#endregion\n//#region useElementBounding/index.ts\n/**\n* Reactive bounding box of an HTML element.\n*\n* @see https://vueuse.org/useElementBounding\n* @param target\n*/\nfunction useElementBounding(target, options = {}) {\n\tconst { reset = true, windowResize = true, windowScroll = true, immediate = true, updateTiming = \"sync\" } = options;\n\tconst height = shallowRef(0);\n\tconst bottom = shallowRef(0);\n\tconst left = shallowRef(0);\n\tconst right = shallowRef(0);\n\tconst top = shallowRef(0);\n\tconst width = shallowRef(0);\n\tconst x = shallowRef(0);\n\tconst y = shallowRef(0);\n\tfunction recalculate() {\n\t\tconst el = unrefElement(target);\n\t\tif (!el) {\n\t\t\tif (reset) {\n\t\t\t\theight.value = 0;\n\t\t\t\tbottom.value = 0;\n\t\t\t\tleft.value = 0;\n\t\t\t\tright.value = 0;\n\t\t\t\ttop.value = 0;\n\t\t\t\twidth.value = 0;\n\t\t\t\tx.value = 0;\n\t\t\t\ty.value = 0;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tconst rect = el.getBoundingClientRect();\n\t\theight.value = rect.height;\n\t\tbottom.value = rect.bottom;\n\t\tleft.value = rect.left;\n\t\tright.value = rect.right;\n\t\ttop.value = rect.top;\n\t\twidth.value = rect.width;\n\t\tx.value = rect.x;\n\t\ty.value = rect.y;\n\t}\n\tfunction update() {\n\t\tif (updateTiming === \"sync\") recalculate();\n\t\telse if (updateTiming === \"next-frame\") requestAnimationFrame(() => recalculate());\n\t}\n\tuseResizeObserver(target, update);\n\twatch(() => unrefElement(target), (ele) => !ele && update());\n\tuseMutationObserver(target, update, { attributeFilter: [\"style\", \"class\"] });\n\tif (windowScroll) useEventListener(\"scroll\", update, {\n\t\tcapture: true,\n\t\tpassive: true\n\t});\n\tif (windowResize) useEventListener(\"resize\", update, { passive: true });\n\ttryOnMounted(() => {\n\t\tif (immediate) update();\n\t});\n\treturn {\n\t\theight,\n\t\tbottom,\n\t\tleft,\n\t\tright,\n\t\ttop,\n\t\twidth,\n\t\tx,\n\t\ty,\n\t\tupdate\n\t};\n}\n//#endregion\n//#region useElementByPoint/index.ts\nfunction getDefaultScheduler$7(options) {\n\tif (\"interval\" in options || \"immediate\" in options) {\n\t\tconst { interval = \"requestAnimationFrame\", immediate = true } = options;\n\t\treturn interval === \"requestAnimationFrame\" ? (cb) => useRafFn(cb, { immediate }) : (cb) => useIntervalFn(cb, interval, { immediate });\n\t}\n\treturn useRafFn;\n}\n/**\n* Reactive element by point.\n*\n* @see https://vueuse.org/useElementByPoint\n* @param options - UseElementByPointOptions\n*/\nfunction useElementByPoint(options) {\n\tconst { x, y, document = defaultDocument, multiple, scheduler = getDefaultScheduler$7(options) } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => {\n\t\tif (toValue(multiple)) return document && \"elementsFromPoint\" in document;\n\t\treturn document && \"elementFromPoint\" in document;\n\t});\n\tconst element = shallowRef(null);\n\treturn {\n\t\tisSupported,\n\t\telement,\n\t\t...scheduler(() => {\n\t\t\tvar _document$elementsFro, _document$elementFrom;\n\t\t\telement.value = toValue(multiple) ? (_document$elementsFro = document === null || document === void 0 ? void 0 : document.elementsFromPoint(toValue(x), toValue(y))) !== null && _document$elementsFro !== void 0 ? _document$elementsFro : [] : (_document$elementFrom = document === null || document === void 0 ? void 0 : document.elementFromPoint(toValue(x), toValue(y))) !== null && _document$elementFrom !== void 0 ? _document$elementFrom : null;\n\t\t})\n\t};\n}\n//#endregion\n//#region useElementHover/index.ts\nfunction useElementHover(el, options = {}) {\n\tconst { delayEnter = 0, delayLeave = 0, triggerOnRemoval = false, window = defaultWindow } = options;\n\tconst isHovered = shallowRef(false);\n\tlet timer;\n\tconst toggle = (entering) => {\n\t\tconst delay = entering ? delayEnter : delayLeave;\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = void 0;\n\t\t}\n\t\tif (delay) timer = setTimeout(() => isHovered.value = entering, delay);\n\t\telse isHovered.value = entering;\n\t};\n\tif (!window) return isHovered;\n\tuseEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n\tuseEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n\tif (triggerOnRemoval) onElementRemoval(computed(() => unrefElement(el)), () => toggle(false));\n\treturn isHovered;\n}\n//#endregion\n//#region useElementSize/index.ts\n/**\n* Reactive size of an HTML element.\n*\n* @see https://vueuse.org/useElementSize\n*/\nfunction useElementSize(target, initialSize = {\n\twidth: 0,\n\theight: 0\n}, options = {}) {\n\tconst { window = defaultWindow, box = \"content-box\" } = options;\n\tconst isSVG = computed(() => {\n\t\tvar _unrefElement;\n\t\treturn (_unrefElement = unrefElement(target)) === null || _unrefElement === void 0 || (_unrefElement = _unrefElement.namespaceURI) === null || _unrefElement === void 0 ? void 0 : _unrefElement.includes(\"svg\");\n\t});\n\tconst width = shallowRef(initialSize.width);\n\tconst height = shallowRef(initialSize.height);\n\tconst { stop: stop1 } = useResizeObserver(target, ([entry]) => {\n\t\tconst boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n\t\tif (window && isSVG.value) {\n\t\t\tconst $elem = unrefElement(target);\n\t\t\tif ($elem) {\n\t\t\t\tconst rect = $elem.getBoundingClientRect();\n\t\t\t\twidth.value = rect.width;\n\t\t\t\theight.value = rect.height;\n\t\t\t}\n\t\t} else if (boxSize) {\n\t\t\tconst formatBoxSize = toArray(boxSize);\n\t\t\twidth.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n\t\t\theight.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n\t\t} else {\n\t\t\twidth.value = entry.contentRect.width;\n\t\t\theight.value = entry.contentRect.height;\n\t\t}\n\t}, options);\n\ttryOnMounted(() => {\n\t\tconst ele = unrefElement(target);\n\t\tif (ele) {\n\t\t\twidth.value = \"offsetWidth\" in ele ? ele.offsetWidth : initialSize.width;\n\t\t\theight.value = \"offsetHeight\" in ele ? ele.offsetHeight : initialSize.height;\n\t\t}\n\t});\n\tconst stop2 = watch(() => unrefElement(target), (ele) => {\n\t\twidth.value = ele ? initialSize.width : 0;\n\t\theight.value = ele ? initialSize.height : 0;\n\t});\n\tfunction stop() {\n\t\tstop1();\n\t\tstop2();\n\t}\n\treturn {\n\t\twidth,\n\t\theight,\n\t\tstop\n\t};\n}\n//#endregion\n//#region useIntersectionObserver/index.ts\n/**\n* Detects changes to a target element's visibility.\n*\n* @see https://vueuse.org/useIntersectionObserver\n* @param target\n* @param callback\n* @param options\n*/\nfunction useIntersectionObserver(target, callback, options = {}) {\n\tconst { root, rootMargin, threshold = 0, window = defaultWindow, immediate = true } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window && \"IntersectionObserver\" in window);\n\tconst targets = computed(() => {\n\t\treturn toArray(toValue(target)).map(unrefElement).filter(notNullish);\n\t});\n\tlet cleanup = noop;\n\tconst isActive = shallowRef(immediate);\n\tconst stopWatch = isSupported.value ? watch(() => [\n\t\ttargets.value,\n\t\tunrefElement(root),\n\t\ttoValue(rootMargin),\n\t\tisActive.value\n\t], ([targets, root, rootMargin]) => {\n\t\tcleanup();\n\t\tif (!isActive.value) return;\n\t\tif (!targets.length) return;\n\t\tconst observer = new IntersectionObserver(callback, {\n\t\t\troot: unrefElement(root),\n\t\t\trootMargin,\n\t\t\tthreshold\n\t\t});\n\t\ttargets.forEach((el) => el && observer.observe(el));\n\t\tcleanup = () => {\n\t\t\tobserver.disconnect();\n\t\t\tcleanup = noop;\n\t\t};\n\t}, {\n\t\timmediate,\n\t\tflush: \"post\"\n\t}) : noop;\n\tconst stop = () => {\n\t\tcleanup();\n\t\tstopWatch();\n\t\tisActive.value = false;\n\t};\n\ttryOnScopeDispose(stop);\n\treturn {\n\t\tisSupported,\n\t\tisActive,\n\t\tpause() {\n\t\t\tcleanup();\n\t\t\tisActive.value = false;\n\t\t},\n\t\tresume() {\n\t\t\tisActive.value = true;\n\t\t},\n\t\tstop\n\t};\n}\n//#endregion\n//#region useElementVisibility/index.ts\nfunction useElementVisibility(element, options = {}) {\n\tconst { window = defaultWindow, scrollTarget, threshold = 0, rootMargin, once = false, initialValue = false } = options;\n\tconst isVisible = shallowRef(initialValue);\n\tconst observerController = useIntersectionObserver(element, (intersectionObserverEntries) => {\n\t\tlet isIntersecting = isVisible.value;\n\t\tlet latestTime = 0;\n\t\tfor (const entry of intersectionObserverEntries) if (entry.time >= latestTime) {\n\t\t\tlatestTime = entry.time;\n\t\t\tisIntersecting = entry.isIntersecting;\n\t\t}\n\t\tisVisible.value = isIntersecting;\n\t\tif (once) watchOnce(isVisible, () => {\n\t\t\tobserverController.stop();\n\t\t});\n\t}, {\n\t\troot: scrollTarget,\n\t\twindow,\n\t\tthreshold,\n\t\trootMargin\n\t});\n\treturn options.controls ? {\n\t\t...observerController,\n\t\tisVisible\n\t} : isVisible;\n}\n//#endregion\n//#region useEventBus/internal.ts\n/* #__PURE__ */\nconst events = /* @__PURE__ */ new Map();\n//#endregion\n//#region useEventBus/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useEventBus(key) {\n\tconst scope = getCurrentScope();\n\tfunction on(listener) {\n\t\tvar _scope$cleanups;\n\t\tconst listeners = events.get(key) || /* @__PURE__ */ new Set();\n\t\tlisteners.add(listener);\n\t\tevents.set(key, listeners);\n\t\tconst _off = () => off(listener);\n\t\tscope === null || scope === void 0 || (_scope$cleanups = scope.cleanups) === null || _scope$cleanups === void 0 || _scope$cleanups.push(_off);\n\t\treturn _off;\n\t}\n\tfunction once(listener) {\n\t\tfunction _listener(...args) {\n\t\t\toff(_listener);\n\t\t\tlistener(...args);\n\t\t}\n\t\treturn on(_listener);\n\t}\n\tfunction off(listener) {\n\t\tconst listeners = events.get(key);\n\t\tif (!listeners) return;\n\t\tlisteners.delete(listener);\n\t\tif (!listeners.size) reset();\n\t}\n\tfunction reset() {\n\t\tevents.delete(key);\n\t}\n\tfunction emit(event, payload) {\n\t\tvar _events$get;\n\t\t(_events$get = events.get(key)) === null || _events$get === void 0 || _events$get.forEach((v) => v(event, payload));\n\t}\n\treturn {\n\t\ton,\n\t\tonce,\n\t\toff,\n\t\temit,\n\t\treset\n\t};\n}\n//#endregion\n//#region useEventSource/index.ts\nfunction resolveNestedOptions$1(options) {\n\tif (options === true) return {};\n\treturn options;\n}\n/**\n* Reactive wrapper for EventSource.\n*\n* @see https://vueuse.org/useEventSource\n* @see https://developer.mozilla.org/en-US/docs/Web/API/EventSource/EventSource EventSource\n* @param url\n* @param events\n* @param options\n*/\nfunction useEventSource(url, events = [], options = {}) {\n\tconst event = shallowRef(null);\n\tconst data = shallowRef(null);\n\tconst status = shallowRef(\"CONNECTING\");\n\tconst eventSource = shallowRef(null);\n\tconst error = shallowRef(null);\n\tconst urlRef = toRef(url);\n\tconst lastEventId = shallowRef(null);\n\tlet explicitlyClosed = false;\n\tlet retried = 0;\n\tconst { withCredentials = false, immediate = true, autoConnect = true, autoReconnect, serializer = { read: (v) => v } } = options;\n\tconst close = () => {\n\t\tif (isClient && eventSource.value) {\n\t\t\teventSource.value.close();\n\t\t\teventSource.value = null;\n\t\t\tstatus.value = \"CLOSED\";\n\t\t\texplicitlyClosed = true;\n\t\t}\n\t};\n\tconst _init = () => {\n\t\tif (explicitlyClosed || typeof urlRef.value === \"undefined\") return;\n\t\tconst es = new EventSource(urlRef.value, { withCredentials });\n\t\tstatus.value = \"CONNECTING\";\n\t\teventSource.value = es;\n\t\tes.onopen = () => {\n\t\t\tstatus.value = \"OPEN\";\n\t\t\terror.value = null;\n\t\t};\n\t\tes.onerror = (e) => {\n\t\t\tstatus.value = \"CLOSED\";\n\t\t\terror.value = e;\n\t\t\tif (es.readyState === 2 && !explicitlyClosed && autoReconnect) {\n\t\t\t\tes.close();\n\t\t\t\tconst { retries = -1, delay = 1e3, onFailed } = resolveNestedOptions$1(autoReconnect);\n\t\t\t\tretried += 1;\n\t\t\t\tif (typeof retries === \"number\" && (retries < 0 || retried < retries)) setTimeout(_init, delay);\n\t\t\t\telse if (typeof retries === \"function\" && retries()) setTimeout(_init, delay);\n\t\t\t\telse onFailed === null || onFailed === void 0 || onFailed();\n\t\t\t}\n\t\t};\n\t\tes.onmessage = (e) => {\n\t\t\tvar _serializer$read;\n\t\t\tevent.value = null;\n\t\t\tdata.value = (_serializer$read = serializer.read(e.data)) !== null && _serializer$read !== void 0 ? _serializer$read : null;\n\t\t\tlastEventId.value = e.lastEventId;\n\t\t};\n\t\tfor (const event_name of events) useEventListener(es, event_name, (e) => {\n\t\t\tvar _serializer$read2, _e$lastEventId;\n\t\t\tevent.value = event_name;\n\t\t\tdata.value = (_serializer$read2 = serializer.read(e.data)) !== null && _serializer$read2 !== void 0 ? _serializer$read2 : null;\n\t\t\tlastEventId.value = (_e$lastEventId = e.lastEventId) !== null && _e$lastEventId !== void 0 ? _e$lastEventId : null;\n\t\t}, { passive: true });\n\t};\n\tconst open = () => {\n\t\tif (!isClient) return;\n\t\tclose();\n\t\texplicitlyClosed = false;\n\t\tretried = 0;\n\t\t_init();\n\t};\n\tif (immediate) open();\n\tif (autoConnect) watch(urlRef, open);\n\ttryOnScopeDispose(close);\n\treturn {\n\t\teventSource,\n\t\tevent,\n\t\tdata,\n\t\tstatus,\n\t\terror,\n\t\topen,\n\t\tclose,\n\t\tlastEventId\n\t};\n}\n//#endregion\n//#region useEyeDropper/index.ts\n/**\n* Reactive [EyeDropper API](https://developer.mozilla.org/en-US/docs/Web/API/EyeDropper_API)\n*\n* @see https://vueuse.org/useEyeDropper\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useEyeDropper(options = {}) {\n\tconst { initialValue = \"\" } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n\tconst sRGBHex = shallowRef(initialValue);\n\tasync function open(openOptions) {\n\t\tif (!isSupported.value) return;\n\t\tconst result = await new window.EyeDropper().open(openOptions);\n\t\tsRGBHex.value = result.sRGBHex;\n\t\treturn result;\n\t}\n\treturn {\n\t\tisSupported,\n\t\tsRGBHex,\n\t\topen\n\t};\n}\n//#endregion\n//#region useFavicon/index.ts\nfunction useFavicon(newIcon = null, options = {}) {\n\tconst { baseUrl = \"\", rel = \"icon\", document = defaultDocument } = options;\n\tconst favicon = toRef(newIcon);\n\tconst applyIcon = (icon) => {\n\t\tconst elements = document === null || document === void 0 ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`);\n\t\tif (!elements || elements.length === 0) {\n\t\t\tconst link = document === null || document === void 0 ? void 0 : document.createElement(\"link\");\n\t\t\tif (link) {\n\t\t\t\tlink.rel = rel;\n\t\t\t\tlink.href = `${baseUrl}${icon}`;\n\t\t\t\tlink.type = `image/${icon.split(\".\").pop()}`;\n\t\t\t\tdocument === null || document === void 0 || document.head.append(link);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\telements === null || elements === void 0 || elements.forEach((el) => el.href = `${baseUrl}${icon}`);\n\t};\n\twatch(favicon, (i, o) => {\n\t\tif (typeof i === \"string\" && i !== o) applyIcon(i);\n\t}, { immediate: true });\n\treturn favicon;\n}\n//#endregion\n//#region useFetch/index.ts\nconst payloadMapping = {\n\tjson: \"application/json\",\n\ttext: \"text/plain\"\n};\n/**\n* !!!IMPORTANT!!!\n*\n* If you update the UseFetchOptions interface, be sure to update this object\n* to include the new options\n*/\nfunction isFetchOptions(obj) {\n\treturn obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\", \"updateDataOnError\");\n}\nconst reAbsolute = /^(?:[a-z][a-z\\d+\\-.]*:)?\\/\\//i;\nfunction isAbsoluteURL(url) {\n\treturn reAbsolute.test(url);\n}\nfunction headersToObject(headers) {\n\tif (typeof Headers !== \"undefined\" && headers instanceof Headers) return Object.fromEntries(headers.entries());\n\treturn headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n\tif (combination === \"overwrite\") return async (ctx) => {\n\t\tlet callback;\n\t\tfor (let i = callbacks.length - 1; i >= 0; i--) if (callbacks[i] != null) {\n\t\t\tcallback = callbacks[i];\n\t\t\tbreak;\n\t\t}\n\t\tif (callback) return {\n\t\t\t...ctx,\n\t\t\t...await callback(ctx)\n\t\t};\n\t\treturn ctx;\n\t};\n\telse return async (ctx) => {\n\t\tfor (const callback of callbacks) if (callback) ctx = {\n\t\t\t...ctx,\n\t\t\t...await callback(ctx)\n\t\t};\n\t\treturn ctx;\n\t};\n}\nfunction createFetch(config = {}) {\n\tconst _combination = config.combination || \"chain\";\n\tconst _options = config.options || {};\n\tconst _fetchOptions = config.fetchOptions || {};\n\tfunction useFactoryFetch(url, ...args) {\n\t\tconst computedUrl = computed(() => {\n\t\t\tconst baseUrl = toValue(config.baseUrl);\n\t\t\tconst targetUrl = toValue(url);\n\t\t\treturn baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n\t\t});\n\t\tlet options = _options;\n\t\tlet fetchOptions = _fetchOptions;\n\t\tif (args.length > 0) if (isFetchOptions(args[0])) options = {\n\t\t\t...options,\n\t\t\t...args[0],\n\t\t\tbeforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n\t\t\tafterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n\t\t\tonFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n\t\t};\n\t\telse fetchOptions = {\n\t\t\t...fetchOptions,\n\t\t\t...args[0],\n\t\t\theaders: {\n\t\t\t\t...headersToObject(fetchOptions.headers) || {},\n\t\t\t\t...headersToObject(args[0].headers) || {}\n\t\t\t}\n\t\t};\n\t\tif (args.length > 1 && isFetchOptions(args[1])) options = {\n\t\t\t...options,\n\t\t\t...args[1],\n\t\t\tbeforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n\t\t\tafterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n\t\t\tonFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n\t\t};\n\t\treturn useFetch(computedUrl, fetchOptions, options);\n\t}\n\treturn useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n\tvar _defaultWindow$fetch, _globalThis;\n\tconst supportsAbort = typeof AbortController === \"function\";\n\tlet fetchOptions = {};\n\tlet options = {\n\t\timmediate: true,\n\t\trefetch: false,\n\t\ttimeout: 0,\n\t\tupdateDataOnError: false\n\t};\n\tconst config = {\n\t\tmethod: \"GET\",\n\t\ttype: \"text\",\n\t\tpayload: void 0\n\t};\n\tif (args.length > 0) if (isFetchOptions(args[0])) options = {\n\t\t...options,\n\t\t...args[0]\n\t};\n\telse fetchOptions = args[0];\n\tif (args.length > 1) {\n\t\tif (isFetchOptions(args[1])) options = {\n\t\t\t...options,\n\t\t\t...args[1]\n\t\t};\n\t}\n\tconst { fetch = (_defaultWindow$fetch = defaultWindow === null || defaultWindow === void 0 ? void 0 : defaultWindow.fetch) !== null && _defaultWindow$fetch !== void 0 ? _defaultWindow$fetch : (_globalThis = globalThis) === null || _globalThis === void 0 ? void 0 : _globalThis.fetch, initialData, timeout } = options;\n\tconst responseEvent = createEventHook();\n\tconst errorEvent = createEventHook();\n\tconst finallyEvent = createEventHook();\n\tconst isFinished = shallowRef(false);\n\tconst isFetching = shallowRef(false);\n\tconst aborted = shallowRef(false);\n\tconst statusCode = shallowRef(null);\n\tconst response = shallowRef(null);\n\tconst error = shallowRef(null);\n\tconst data = shallowRef(initialData || null);\n\tconst canAbort = computed(() => supportsAbort && isFetching.value);\n\tlet controller;\n\tlet timer;\n\tconst abort = (reason) => {\n\t\tif (supportsAbort) {\n\t\t\tcontroller === null || controller === void 0 || controller.abort(reason);\n\t\t\tcontroller = new AbortController();\n\t\t\tcontroller.signal.onabort = () => aborted.value = true;\n\t\t\tfetchOptions = {\n\t\t\t\t...fetchOptions,\n\t\t\t\tsignal: controller.signal\n\t\t\t};\n\t\t}\n\t};\n\tconst loading = (isLoading) => {\n\t\tisFetching.value = isLoading;\n\t\tisFinished.value = !isLoading;\n\t};\n\tif (timeout) timer = useTimeoutFn(abort, timeout, { immediate: false });\n\tlet executeCounter = 0;\n\tconst execute = async (throwOnFailed = false) => {\n\t\tvar _context$options;\n\t\tabort();\n\t\tloading(true);\n\t\terror.value = null;\n\t\tstatusCode.value = null;\n\t\taborted.value = false;\n\t\texecuteCounter += 1;\n\t\tconst currentExecuteCounter = executeCounter;\n\t\tconst defaultFetchOptions = {\n\t\t\tmethod: config.method,\n\t\t\theaders: {}\n\t\t};\n\t\tconst payload = toValue(config.payload);\n\t\tif (payload) {\n\t\t\tvar _payloadMapping$confi;\n\t\t\tconst headers = headersToObject(defaultFetchOptions.headers);\n\t\t\tconst proto = Object.getPrototypeOf(payload);\n\t\t\tif (!config.payloadType && payload && (proto === Object.prototype || Array.isArray(proto)) && !(payload instanceof FormData)) config.payloadType = \"json\";\n\t\t\tif (config.payloadType) headers[\"Content-Type\"] = (_payloadMapping$confi = payloadMapping[config.payloadType]) !== null && _payloadMapping$confi !== void 0 ? _payloadMapping$confi : config.payloadType;\n\t\t\tdefaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n\t\t}\n\t\tlet isCanceled = false;\n\t\tconst context = {\n\t\t\turl: toValue(url),\n\t\t\toptions: {\n\t\t\t\t...defaultFetchOptions,\n\t\t\t\t...fetchOptions\n\t\t\t},\n\t\t\tcancel: () => {\n\t\t\t\tisCanceled = true;\n\t\t\t}\n\t\t};\n\t\tif (options.beforeFetch) Object.assign(context, await options.beforeFetch(context));\n\t\tif (isCanceled || !fetch) {\n\t\t\tloading(false);\n\t\t\treturn Promise.resolve(null);\n\t\t}\n\t\tlet responseData = null;\n\t\tif (timer) timer.start();\n\t\treturn fetch(context.url, {\n\t\t\t...defaultFetchOptions,\n\t\t\t...context.options,\n\t\t\theaders: {\n\t\t\t\t...headersToObject(defaultFetchOptions.headers),\n\t\t\t\t...headersToObject((_context$options = context.options) === null || _context$options === void 0 ? void 0 : _context$options.headers)\n\t\t\t}\n\t\t}).then(async (fetchResponse) => {\n\t\t\tresponse.value = fetchResponse;\n\t\t\tstatusCode.value = fetchResponse.status;\n\t\t\tresponseData = await fetchResponse.clone()[config.type]();\n\t\t\tif (!fetchResponse.ok) {\n\t\t\t\tdata.value = initialData || null;\n\t\t\t\tthrow new Error(fetchResponse.statusText);\n\t\t\t}\n\t\t\tif (options.afterFetch) ({data: responseData} = await options.afterFetch({\n\t\t\t\tdata: responseData,\n\t\t\t\tresponse: fetchResponse,\n\t\t\t\tcontext,\n\t\t\t\texecute\n\t\t\t}));\n\t\t\tdata.value = responseData;\n\t\t\tresponseEvent.trigger(fetchResponse);\n\t\t\treturn fetchResponse;\n\t\t}).catch(async (fetchError) => {\n\t\t\tlet errorData = fetchError.message || fetchError.name;\n\t\t\tif (options.onFetchError) ({error: errorData, data: responseData} = await options.onFetchError({\n\t\t\t\tdata: responseData,\n\t\t\t\terror: fetchError,\n\t\t\t\tresponse: response.value,\n\t\t\t\tcontext,\n\t\t\t\texecute\n\t\t\t}));\n\t\t\terror.value = errorData;\n\t\t\tif (options.updateDataOnError) data.value = responseData;\n\t\t\terrorEvent.trigger(fetchError);\n\t\t\tif (throwOnFailed) throw fetchError;\n\t\t\treturn null;\n\t\t}).finally(() => {\n\t\t\tif (currentExecuteCounter === executeCounter) loading(false);\n\t\t\tif (timer) timer.stop();\n\t\t\tfinallyEvent.trigger(null);\n\t\t});\n\t};\n\tconst refetch = toRef(options.refetch);\n\twatch([refetch, toRef(url)], ([refetch]) => refetch && execute(), { deep: true });\n\tconst shell = {\n\t\tisFinished: shallowReadonly(isFinished),\n\t\tisFetching: shallowReadonly(isFetching),\n\t\tstatusCode,\n\t\tresponse,\n\t\terror,\n\t\tdata,\n\t\tcanAbort,\n\t\taborted,\n\t\tabort,\n\t\texecute,\n\t\tonFetchResponse: responseEvent.on,\n\t\tonFetchError: errorEvent.on,\n\t\tonFetchFinally: finallyEvent.on,\n\t\tget: setMethod(\"GET\"),\n\t\tput: setMethod(\"PUT\"),\n\t\tpost: setMethod(\"POST\"),\n\t\tdelete: setMethod(\"DELETE\"),\n\t\tpatch: setMethod(\"PATCH\"),\n\t\thead: setMethod(\"HEAD\"),\n\t\toptions: setMethod(\"OPTIONS\"),\n\t\tjson: setType(\"json\"),\n\t\ttext: setType(\"text\"),\n\t\tblob: setType(\"blob\"),\n\t\tarrayBuffer: setType(\"arrayBuffer\"),\n\t\tformData: setType(\"formData\")\n\t};\n\tfunction setMethod(method) {\n\t\treturn (payload, payloadType) => {\n\t\t\tif (!isFetching.value) {\n\t\t\t\tconfig.method = method;\n\t\t\t\tconfig.payload = payload;\n\t\t\t\tconfig.payloadType = payloadType;\n\t\t\t\tif (isRef(config.payload)) watch([refetch, toRef(config.payload)], ([refetch]) => refetch && execute(), { deep: true });\n\t\t\t\treturn {\n\t\t\t\t\t...shell,\n\t\t\t\t\tthen(onFulfilled, onRejected) {\n\t\t\t\t\t\treturn waitUntilFinished().then(onFulfilled, onRejected);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n\tfunction waitUntilFinished() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tuntil(isFinished).toBe(true).then(() => resolve(shell)).catch(reject);\n\t\t});\n\t}\n\tfunction setType(type) {\n\t\treturn () => {\n\t\t\tif (!isFetching.value) {\n\t\t\t\tconfig.type = type;\n\t\t\t\treturn {\n\t\t\t\t\t...shell,\n\t\t\t\t\tthen(onFulfilled, onRejected) {\n\t\t\t\t\t\treturn waitUntilFinished().then(onFulfilled, onRejected);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n\tif (options.immediate) Promise.resolve().then(() => execute());\n\treturn {\n\t\t...shell,\n\t\tthen(onFulfilled, onRejected) {\n\t\t\treturn waitUntilFinished().then(onFulfilled, onRejected);\n\t\t}\n\t};\n}\nfunction joinPaths(start, end) {\n\tif (!start.endsWith(\"/\") && !end.startsWith(\"/\")) return `${start}/${end}`;\n\tif (start.endsWith(\"/\") && end.startsWith(\"/\")) return `${start.slice(0, -1)}${end}`;\n\treturn `${start}${end}`;\n}\n//#endregion\n//#region useFileDialog/index.ts\nconst DEFAULT_OPTIONS = {\n\tmultiple: true,\n\taccept: \"*\",\n\treset: false,\n\tdirectory: false\n};\nfunction prepareInitialFiles(files) {\n\tif (!files) return null;\n\tif (files instanceof FileList) return files;\n\tconst dt = new DataTransfer();\n\tfor (const file of files) dt.items.add(file);\n\treturn dt.files;\n}\n/**\n* Open file dialog with ease.\n*\n* @see https://vueuse.org/useFileDialog\n* @param options\n*/\nfunction useFileDialog(options = {}) {\n\tconst { document = defaultDocument } = options;\n\tconst files = ref(prepareInitialFiles(options.initialFiles));\n\tconst { on: onChange, trigger: changeTrigger } = createEventHook();\n\tconst { on: onCancel, trigger: cancelTrigger } = createEventHook();\n\tconst inputRef = computed(() => {\n\t\tvar _unrefElement;\n\t\tconst input = (_unrefElement = unrefElement(options.input)) !== null && _unrefElement !== void 0 ? _unrefElement : document ? document.createElement(\"input\") : void 0;\n\t\tif (input) {\n\t\t\tinput.type = \"file\";\n\t\t\tinput.onchange = (event) => {\n\t\t\t\tfiles.value = event.target.files;\n\t\t\t\tchangeTrigger(files.value);\n\t\t\t};\n\t\t\tinput.oncancel = () => {\n\t\t\t\tcancelTrigger();\n\t\t\t};\n\t\t}\n\t\treturn input;\n\t});\n\tconst reset = () => {\n\t\tfiles.value = null;\n\t\tif (inputRef.value && inputRef.value.value) {\n\t\t\tinputRef.value.value = \"\";\n\t\t\tchangeTrigger(null);\n\t\t}\n\t};\n\tconst applyOptions = (options) => {\n\t\tconst el = inputRef.value;\n\t\tif (!el) return;\n\t\tel.multiple = toValue(options.multiple);\n\t\tel.accept = toValue(options.accept);\n\t\tel.webkitdirectory = toValue(options.directory);\n\t\tif (hasOwn(options, \"capture\")) el.capture = toValue(options.capture);\n\t};\n\tconst open = (localOptions) => {\n\t\tconst el = inputRef.value;\n\t\tif (!el) return;\n\t\tconst mergedOptions = {\n\t\t\t...DEFAULT_OPTIONS,\n\t\t\t...options,\n\t\t\t...localOptions\n\t\t};\n\t\tapplyOptions(mergedOptions);\n\t\tif (toValue(mergedOptions.reset)) reset();\n\t\tel.click();\n\t};\n\twatchEffect(() => {\n\t\tapplyOptions(options);\n\t});\n\treturn {\n\t\tfiles: readonly(files),\n\t\topen,\n\t\treset,\n\t\tonCancel,\n\t\tonChange\n\t};\n}\n//#endregion\n//#region useFileSystemAccess/index.ts\nfunction useFileSystemAccess(options = {}) {\n\tconst { window: _window = defaultWindow, dataType = \"Text\" } = options;\n\tconst window = _window;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n\tconst fileHandle = shallowRef();\n\tconst data = shallowRef();\n\tconst file = shallowRef();\n\tconst fileName = computed(() => {\n\t\tvar _file$value$name, _file$value;\n\t\treturn (_file$value$name = (_file$value = file.value) === null || _file$value === void 0 ? void 0 : _file$value.name) !== null && _file$value$name !== void 0 ? _file$value$name : \"\";\n\t});\n\tconst fileMIME = computed(() => {\n\t\tvar _file$value$type, _file$value2;\n\t\treturn (_file$value$type = (_file$value2 = file.value) === null || _file$value2 === void 0 ? void 0 : _file$value2.type) !== null && _file$value$type !== void 0 ? _file$value$type : \"\";\n\t});\n\tconst fileSize = computed(() => {\n\t\tvar _file$value$size, _file$value3;\n\t\treturn (_file$value$size = (_file$value3 = file.value) === null || _file$value3 === void 0 ? void 0 : _file$value3.size) !== null && _file$value$size !== void 0 ? _file$value$size : 0;\n\t});\n\tconst fileLastModified = computed(() => {\n\t\tvar _file$value$lastModif, _file$value4;\n\t\treturn (_file$value$lastModif = (_file$value4 = file.value) === null || _file$value4 === void 0 ? void 0 : _file$value4.lastModified) !== null && _file$value$lastModif !== void 0 ? _file$value$lastModif : 0;\n\t});\n\tasync function open(_options = {}) {\n\t\tif (!isSupported.value) return;\n\t\tconst [handle] = await window.showOpenFilePicker({\n\t\t\t...toValue(options),\n\t\t\t..._options\n\t\t});\n\t\tfileHandle.value = handle;\n\t\tawait updateData();\n\t}\n\tasync function create(_options = {}) {\n\t\tif (!isSupported.value) return;\n\t\tfileHandle.value = await window.showSaveFilePicker({\n\t\t\t...options,\n\t\t\t..._options\n\t\t});\n\t\tdata.value = void 0;\n\t\tawait updateData();\n\t}\n\tasync function save(_options = {}) {\n\t\tif (!isSupported.value) return;\n\t\tif (!fileHandle.value) return saveAs(_options);\n\t\tif (data.value) {\n\t\t\tconst writableStream = await fileHandle.value.createWritable();\n\t\t\tawait writableStream.write(data.value);\n\t\t\tawait writableStream.close();\n\t\t}\n\t\tawait updateFile();\n\t}\n\tasync function saveAs(_options = {}) {\n\t\tif (!isSupported.value) return;\n\t\tfileHandle.value = await window.showSaveFilePicker({\n\t\t\t...options,\n\t\t\t..._options\n\t\t});\n\t\tif (data.value) {\n\t\t\tconst writableStream = await fileHandle.value.createWritable();\n\t\t\tawait writableStream.write(data.value);\n\t\t\tawait writableStream.close();\n\t\t}\n\t\tawait updateFile();\n\t}\n\tasync function updateFile() {\n\t\tvar _fileHandle$value;\n\t\tfile.value = await ((_fileHandle$value = fileHandle.value) === null || _fileHandle$value === void 0 ? void 0 : _fileHandle$value.getFile());\n\t}\n\tasync function updateData() {\n\t\tvar _file$value5, _file$value6;\n\t\tawait updateFile();\n\t\tconst type = toValue(dataType);\n\t\tif (type === \"Text\") data.value = await ((_file$value5 = file.value) === null || _file$value5 === void 0 ? void 0 : _file$value5.text());\n\t\telse if (type === \"ArrayBuffer\") data.value = await ((_file$value6 = file.value) === null || _file$value6 === void 0 ? void 0 : _file$value6.arrayBuffer());\n\t\telse if (type === \"Blob\") data.value = file.value;\n\t}\n\twatch(() => toValue(dataType), updateData);\n\treturn {\n\t\tisSupported,\n\t\tdata,\n\t\tfile,\n\t\tfileName,\n\t\tfileMIME,\n\t\tfileSize,\n\t\tfileLastModified,\n\t\topen,\n\t\tcreate,\n\t\tsave,\n\t\tsaveAs,\n\t\tupdateData\n\t};\n}\n//#endregion\n//#region useFocus/index.ts\n/**\n* Track or set the focus state of a DOM element.\n*\n* @see https://vueuse.org/useFocus\n* @param target The target element for the focus and blur events.\n* @param options\n*/\nfunction useFocus(target, options = {}) {\n\tconst { initialValue = false, focusVisible = false, preventScroll = false } = options;\n\tconst innerFocused = shallowRef(false);\n\tconst targetElement = computed(() => unrefElement(target));\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(targetElement, \"focus\", (event) => {\n\t\tvar _matches, _ref;\n\t\tif (!focusVisible || ((_matches = (_ref = event.target).matches) === null || _matches === void 0 ? void 0 : _matches.call(_ref, \":focus-visible\"))) innerFocused.value = true;\n\t}, listenerOptions);\n\tuseEventListener(targetElement, \"blur\", () => innerFocused.value = false, listenerOptions);\n\tconst focused = computed({\n\t\tget: () => innerFocused.value,\n\t\tset(value) {\n\t\t\tvar _targetElement$value, _targetElement$value2;\n\t\t\tif (!value && innerFocused.value) (_targetElement$value = targetElement.value) === null || _targetElement$value === void 0 || _targetElement$value.blur();\n\t\t\telse if (value && !innerFocused.value) (_targetElement$value2 = targetElement.value) === null || _targetElement$value2 === void 0 || _targetElement$value2.focus({ preventScroll });\n\t\t}\n\t});\n\twatch(targetElement, () => {\n\t\tfocused.value = initialValue;\n\t}, {\n\t\timmediate: true,\n\t\tflush: \"post\"\n\t});\n\treturn { focused };\n}\n//#endregion\n//#region useFocusWithin/index.ts\nconst EVENT_FOCUS_IN = \"focusin\";\nconst EVENT_FOCUS_OUT = \"focusout\";\nconst PSEUDO_CLASS_FOCUS_WITHIN = \":focus-within\";\n/**\n* Track if focus is contained within the target element\n*\n* @see https://vueuse.org/useFocusWithin\n* @param target The target element to track\n* @param options Focus within options\n*/\nfunction useFocusWithin(target, options = {}) {\n\tconst { window = defaultWindow } = options;\n\tconst targetElement = computed(() => unrefElement(target));\n\tconst _focused = shallowRef(false);\n\tconst focused = computed(() => _focused.value);\n\tconst activeElement = useActiveElement(options);\n\tif (!window || !activeElement.value) return { focused };\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(targetElement, EVENT_FOCUS_IN, () => _focused.value = true, listenerOptions);\n\tuseEventListener(targetElement, EVENT_FOCUS_OUT, () => {\n\t\tvar _targetElement$value$, _targetElement$value, _targetElement$value$2;\n\t\treturn _focused.value = (_targetElement$value$ = (_targetElement$value = targetElement.value) === null || _targetElement$value === void 0 || (_targetElement$value$2 = _targetElement$value.matches) === null || _targetElement$value$2 === void 0 ? void 0 : _targetElement$value$2.call(_targetElement$value, PSEUDO_CLASS_FOCUS_WITHIN)) !== null && _targetElement$value$ !== void 0 ? _targetElement$value$ : false;\n\t}, listenerOptions);\n\treturn { focused };\n}\n//#endregion\n//#region useFps/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useFps(options) {\n\tvar _options$every;\n\tconst fps = shallowRef(0);\n\tif (typeof performance === \"undefined\") return fps;\n\tconst every = (_options$every = options === null || options === void 0 ? void 0 : options.every) !== null && _options$every !== void 0 ? _options$every : 10;\n\tlet last = performance.now();\n\tlet ticks = 0;\n\tuseRafFn(() => {\n\t\tticks += 1;\n\t\tif (ticks >= every) {\n\t\t\tconst now = performance.now();\n\t\t\tconst diff = now - last;\n\t\t\tfps.value = Math.round(1e3 / (diff / ticks));\n\t\t\tlast = now;\n\t\t\tticks = 0;\n\t\t}\n\t});\n\treturn fps;\n}\n//#endregion\n//#region useFullscreen/index.ts\nconst eventHandlers = [\n\t\"fullscreenchange\",\n\t\"webkitfullscreenchange\",\n\t\"webkitendfullscreen\",\n\t\"mozfullscreenchange\",\n\t\"MSFullscreenChange\"\n];\n/**\n* Reactive Fullscreen API.\n*\n* @see https://vueuse.org/useFullscreen\n* @param target\n* @param options\n*/\nfunction useFullscreen(target, options = {}) {\n\tconst { document = defaultDocument, autoExit = false } = options;\n\tconst targetRef = computed(() => {\n\t\tvar _unrefElement;\n\t\treturn (_unrefElement = unrefElement(target)) !== null && _unrefElement !== void 0 ? _unrefElement : document === null || document === void 0 ? void 0 : document.documentElement;\n\t});\n\tconst isFullscreen = shallowRef(false);\n\tconst requestMethod = computed(() => {\n\t\treturn [\n\t\t\t\"requestFullscreen\",\n\t\t\t\"webkitRequestFullscreen\",\n\t\t\t\"webkitEnterFullscreen\",\n\t\t\t\"webkitEnterFullScreen\",\n\t\t\t\"webkitRequestFullScreen\",\n\t\t\t\"mozRequestFullScreen\",\n\t\t\t\"msRequestFullscreen\"\n\t\t].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n\t});\n\tconst exitMethod = computed(() => {\n\t\treturn [\n\t\t\t\"exitFullscreen\",\n\t\t\t\"webkitExitFullscreen\",\n\t\t\t\"webkitExitFullScreen\",\n\t\t\t\"webkitCancelFullScreen\",\n\t\t\t\"mozCancelFullScreen\",\n\t\t\t\"msExitFullscreen\"\n\t\t].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n\t});\n\tconst fullscreenEnabled = computed(() => {\n\t\treturn [\n\t\t\t\"fullScreen\",\n\t\t\t\"webkitIsFullScreen\",\n\t\t\t\"webkitDisplayingFullscreen\",\n\t\t\t\"mozFullScreen\",\n\t\t\t\"msFullscreenElement\"\n\t\t].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n\t});\n\tconst fullscreenElementMethod = [\n\t\t\"fullscreenElement\",\n\t\t\"webkitFullscreenElement\",\n\t\t\"mozFullScreenElement\",\n\t\t\"msFullscreenElement\"\n\t].find((m) => document && m in document);\n\tconst isSupported = /* @__PURE__ */ useSupported(() => targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);\n\tconst isCurrentElementFullScreen = () => {\n\t\tif (fullscreenElementMethod) return (document === null || document === void 0 ? void 0 : document[fullscreenElementMethod]) === targetRef.value;\n\t\treturn false;\n\t};\n\tconst isElementFullScreen = () => {\n\t\tif (fullscreenEnabled.value) if (document && document[fullscreenEnabled.value] != null) return document[fullscreenEnabled.value];\n\t\telse {\n\t\t\tconst target = targetRef.value;\n\t\t\tif ((target === null || target === void 0 ? void 0 : target[fullscreenEnabled.value]) != null) return Boolean(target[fullscreenEnabled.value]);\n\t\t}\n\t\treturn false;\n\t};\n\tasync function exit() {\n\t\tif (!isSupported.value || !isFullscreen.value) return;\n\t\tif (exitMethod.value) if ((document === null || document === void 0 ? void 0 : document[exitMethod.value]) != null) await document[exitMethod.value]();\n\t\telse {\n\t\t\tconst target = targetRef.value;\n\t\t\tif ((target === null || target === void 0 ? void 0 : target[exitMethod.value]) != null) await target[exitMethod.value]();\n\t\t}\n\t\tisFullscreen.value = false;\n\t}\n\tasync function enter() {\n\t\tif (!isSupported.value || isFullscreen.value) return;\n\t\tif (isElementFullScreen()) await exit();\n\t\tconst target = targetRef.value;\n\t\tif (requestMethod.value && (target === null || target === void 0 ? void 0 : target[requestMethod.value]) != null) {\n\t\t\tawait target[requestMethod.value]();\n\t\t\tisFullscreen.value = true;\n\t\t}\n\t}\n\tasync function toggle() {\n\t\tawait (isFullscreen.value ? exit() : enter());\n\t}\n\tconst handlerCallback = () => {\n\t\tconst isElementFullScreenValue = isElementFullScreen();\n\t\tif (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen()) isFullscreen.value = isElementFullScreenValue;\n\t};\n\tconst listenerOptions = {\n\t\tcapture: false,\n\t\tpassive: true\n\t};\n\tuseEventListener(document, eventHandlers, handlerCallback, listenerOptions);\n\tuseEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, listenerOptions);\n\ttryOnMounted(handlerCallback, false);\n\tif (autoExit) tryOnScopeDispose(exit);\n\treturn {\n\t\tisSupported,\n\t\tisFullscreen,\n\t\tenter,\n\t\texit,\n\t\ttoggle\n\t};\n}\n//#endregion\n//#region useGamepad/index.ts\n/**\n* Maps a standard standard gamepad to an Xbox 360 Controller.\n*/\nfunction mapGamepadToXbox360Controller(gamepad) {\n\treturn computed(() => {\n\t\tif (gamepad.value) return {\n\t\t\tbuttons: {\n\t\t\t\ta: gamepad.value.buttons[0],\n\t\t\t\tb: gamepad.value.buttons[1],\n\t\t\t\tx: gamepad.value.buttons[2],\n\t\t\t\ty: gamepad.value.buttons[3]\n\t\t\t},\n\t\t\tbumper: {\n\t\t\t\tleft: gamepad.value.buttons[4],\n\t\t\t\tright: gamepad.value.buttons[5]\n\t\t\t},\n\t\t\ttriggers: {\n\t\t\t\tleft: gamepad.value.buttons[6],\n\t\t\t\tright: gamepad.value.buttons[7]\n\t\t\t},\n\t\t\tstick: {\n\t\t\t\tleft: {\n\t\t\t\t\thorizontal: gamepad.value.axes[0],\n\t\t\t\t\tvertical: gamepad.value.axes[1],\n\t\t\t\t\tbutton: gamepad.value.buttons[10]\n\t\t\t\t},\n\t\t\t\tright: {\n\t\t\t\t\thorizontal: gamepad.value.axes[2],\n\t\t\t\t\tvertical: gamepad.value.axes[3],\n\t\t\t\t\tbutton: gamepad.value.buttons[11]\n\t\t\t\t}\n\t\t\t},\n\t\t\tdpad: {\n\t\t\t\tup: gamepad.value.buttons[12],\n\t\t\t\tdown: gamepad.value.buttons[13],\n\t\t\t\tleft: gamepad.value.buttons[14],\n\t\t\t\tright: gamepad.value.buttons[15]\n\t\t\t},\n\t\t\tback: gamepad.value.buttons[8],\n\t\t\tstart: gamepad.value.buttons[9]\n\t\t};\n\t\treturn null;\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction useGamepad(options = {}) {\n\tconst { navigator = defaultNavigator } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator && \"getGamepads\" in navigator);\n\tconst gamepads = ref([]);\n\tconst onConnectedHook = createEventHook();\n\tconst onDisconnectedHook = createEventHook();\n\tconst stateFromGamepad = (gamepad) => {\n\t\tconst hapticActuators = [];\n\t\tconst vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n\t\tif (vibrationActuator) hapticActuators.push(vibrationActuator);\n\t\tif (gamepad.hapticActuators) hapticActuators.push(...gamepad.hapticActuators);\n\t\treturn {\n\t\t\tid: gamepad.id,\n\t\t\tindex: gamepad.index,\n\t\t\tconnected: gamepad.connected,\n\t\t\tmapping: gamepad.mapping,\n\t\t\ttimestamp: gamepad.timestamp,\n\t\t\tvibrationActuator: gamepad.vibrationActuator,\n\t\t\thapticActuators,\n\t\t\taxes: gamepad.axes.map((axes) => axes),\n\t\t\tbuttons: gamepad.buttons.map((button) => ({\n\t\t\t\tpressed: button.pressed,\n\t\t\t\ttouched: button.touched,\n\t\t\t\tvalue: button.value\n\t\t\t}))\n\t\t};\n\t};\n\tconst updateGamepadState = () => {\n\t\tconst _gamepads = (navigator === null || navigator === void 0 ? void 0 : navigator.getGamepads()) || [];\n\t\tfor (const gamepad of _gamepads) if (gamepad && gamepads.value[gamepad.index]) gamepads.value[gamepad.index] = stateFromGamepad(gamepad);\n\t};\n\tconst { isActive, pause, resume } = useRafFn(updateGamepadState);\n\tconst onGamepadConnected = (gamepad) => {\n\t\tif (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n\t\t\tgamepads.value.push(stateFromGamepad(gamepad));\n\t\t\tonConnectedHook.trigger(gamepad.index);\n\t\t}\n\t\tresume();\n\t};\n\tconst onGamepadDisconnected = (gamepad) => {\n\t\tgamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n\t\tonDisconnectedHook.trigger(gamepad.index);\n\t};\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad), listenerOptions);\n\tuseEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad), listenerOptions);\n\ttryOnMounted(() => {\n\t\tconst _gamepads = (navigator === null || navigator === void 0 ? void 0 : navigator.getGamepads()) || [];\n\t\tfor (const gamepad of _gamepads) if (gamepad && gamepads.value[gamepad.index]) onGamepadConnected(gamepad);\n\t});\n\tpause();\n\treturn {\n\t\tisSupported,\n\t\tonConnected: onConnectedHook.on,\n\t\tonDisconnected: onDisconnectedHook.on,\n\t\tgamepads,\n\t\tpause,\n\t\tresume,\n\t\tisActive\n\t};\n}\n//#endregion\n//#region useGeolocation/index.ts\n/**\n* Reactive Geolocation API.\n*\n* @see https://vueuse.org/useGeolocation\n* @param options\n*/\nfunction useGeolocation(options = {}) {\n\tconst { enableHighAccuracy = true, maximumAge = 3e4, timeout = 27e3, navigator = defaultNavigator, immediate = true } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator && \"geolocation\" in navigator);\n\tconst locatedAt = shallowRef(null);\n\tconst error = shallowRef(null);\n\tconst coords = shallowRef({\n\t\taccuracy: 0,\n\t\tlatitude: Number.POSITIVE_INFINITY,\n\t\tlongitude: Number.POSITIVE_INFINITY,\n\t\taltitude: null,\n\t\taltitudeAccuracy: null,\n\t\theading: null,\n\t\tspeed: null\n\t});\n\tfunction updatePosition(position) {\n\t\tlocatedAt.value = position.timestamp;\n\t\tcoords.value = position.coords;\n\t\terror.value = null;\n\t}\n\tlet watcher;\n\tfunction resume() {\n\t\tif (isSupported.value) watcher = navigator.geolocation.watchPosition(updatePosition, (err) => error.value = err, {\n\t\t\tenableHighAccuracy,\n\t\t\tmaximumAge,\n\t\t\ttimeout\n\t\t});\n\t}\n\tif (immediate) resume();\n\tfunction pause() {\n\t\tif (watcher && navigator) navigator.geolocation.clearWatch(watcher);\n\t}\n\ttryOnScopeDispose(() => {\n\t\tpause();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tcoords,\n\t\tlocatedAt,\n\t\terror,\n\t\tresume,\n\t\tpause\n\t};\n}\n//#endregion\n//#region useIdle/index.ts\nconst defaultEvents$1 = [\n\t\"mousemove\",\n\t\"mousedown\",\n\t\"resize\",\n\t\"keydown\",\n\t\"touchstart\",\n\t\"wheel\"\n];\nconst oneMinute = 6e4;\n/**\n* Tracks whether the user is being inactive.\n*\n* @see https://vueuse.org/useIdle\n* @param timeout default to 1 minute\n* @param options IdleOptions\n*/\nfunction useIdle(timeout = oneMinute, options = {}) {\n\tconst { initialState = false, listenForVisibilityChange = true, events = defaultEvents$1, window = defaultWindow, eventFilter = throttleFilter(50) } = options;\n\tconst idle = shallowRef(initialState);\n\tconst lastActive = shallowRef(timestamp());\n\tconst isPending = shallowRef(false);\n\tlet timer;\n\tconst reset = () => {\n\t\tidle.value = false;\n\t\tclearTimeout(timer);\n\t\ttimer = setTimeout(() => idle.value = true, timeout);\n\t};\n\tconst onEvent = createFilterWrapper(eventFilter, () => {\n\t\tlastActive.value = timestamp();\n\t\treset();\n\t});\n\tif (window) {\n\t\tconst document = window.document;\n\t\tconst listenerOptions = { passive: true };\n\t\tfor (const event of events) useEventListener(window, event, () => {\n\t\t\tif (!isPending.value) return;\n\t\t\tonEvent();\n\t\t}, listenerOptions);\n\t\tif (listenForVisibilityChange) useEventListener(document, \"visibilitychange\", () => {\n\t\t\tif (document.hidden || !isPending.value) return;\n\t\t\tonEvent();\n\t\t}, listenerOptions);\n\t\tstart();\n\t}\n\tfunction start() {\n\t\tif (isPending.value) return;\n\t\tisPending.value = true;\n\t\tif (!initialState) reset();\n\t}\n\tfunction stop() {\n\t\tidle.value = initialState;\n\t\tclearTimeout(timer);\n\t\tisPending.value = false;\n\t}\n\treturn {\n\t\tidle,\n\t\tlastActive,\n\t\treset,\n\t\tstop,\n\t\tstart,\n\t\tisPending: shallowReadonly(isPending)\n\t};\n}\n//#endregion\n//#region useImage/index.ts\nasync function loadImage(options) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst img = new Image();\n\t\tconst { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy, width, height, decoding, fetchPriority, ismap, usemap } = options;\n\t\timg.src = src;\n\t\tif (srcset != null) img.srcset = srcset;\n\t\tif (sizes != null) img.sizes = sizes;\n\t\tif (clazz != null) img.className = clazz;\n\t\tif (loading != null) img.loading = loading;\n\t\tif (crossorigin != null) img.crossOrigin = crossorigin;\n\t\tif (referrerPolicy != null) img.referrerPolicy = referrerPolicy;\n\t\tif (width != null) img.width = width;\n\t\tif (height != null) img.height = height;\n\t\tif (decoding != null) img.decoding = decoding;\n\t\tif (fetchPriority != null) img.fetchPriority = fetchPriority;\n\t\tif (ismap != null) img.isMap = ismap;\n\t\tif (usemap != null) img.useMap = usemap;\n\t\timg.onload = () => resolve(img);\n\t\timg.onerror = reject;\n\t});\n}\n/**\n* Reactive load an image in the browser, you can wait the result to display it or show a fallback.\n*\n* @see https://vueuse.org/useImage\n* @param options Image attributes, as used in the <img> tag\n* @param asyncStateOptions\n*/\nfunction useImage(options, asyncStateOptions = {}) {\n\tconst state = useAsyncState(() => loadImage(toValue(options)), void 0, {\n\t\tresetOnExecute: true,\n\t\t...asyncStateOptions\n\t});\n\twatch(() => toValue(options), () => state.execute(asyncStateOptions.delay), { deep: true });\n\treturn state;\n}\n//#endregion\n//#region _resolve-element.ts\n/**\n* Resolves an element from a given element, window, or document.\n*\n* @internal\n*/\nfunction resolveElement(el) {\n\tif (typeof Window !== \"undefined\" && el instanceof Window) return el.document.documentElement;\n\tif (typeof Document !== \"undefined\" && el instanceof Document) return el.documentElement;\n\treturn el;\n}\n//#endregion\n//#region useScroll/index.ts\n/**\n* We have to check if the scroll amount is close enough to some threshold in order to\n* more accurately calculate arrivedState. This is because scrollTop/scrollLeft are non-rounded\n* numbers, while scrollHeight/scrollWidth and clientHeight/clientWidth are rounded.\n* https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#determine_if_an_element_has_been_totally_scrolled\n*/\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\n/**\n* Reactive scroll.\n*\n* @see https://vueuse.org/useScroll\n* @param element\n* @param options\n*/\nfunction useScroll(element, options = {}) {\n\tconst { throttle = 0, idle = 200, onStop = noop, onScroll = noop, offset = {\n\t\tleft: 0,\n\t\tright: 0,\n\t\ttop: 0,\n\t\tbottom: 0\n\t}, observe: _observe = { mutation: false }, eventListenerOptions = {\n\t\tcapture: false,\n\t\tpassive: true\n\t}, behavior = \"auto\", window = defaultWindow, onError = (e) => {\n\t\tconsole.error(e);\n\t} } = options;\n\tconst observe = typeof _observe === \"boolean\" ? { mutation: _observe } : _observe;\n\tconst internalX = shallowRef(0);\n\tconst internalY = shallowRef(0);\n\tconst x = computed({\n\t\tget() {\n\t\t\treturn internalX.value;\n\t\t},\n\t\tset(x) {\n\t\t\tscrollTo(x, void 0);\n\t\t}\n\t});\n\tconst y = computed({\n\t\tget() {\n\t\t\treturn internalY.value;\n\t\t},\n\t\tset(y) {\n\t\t\tscrollTo(void 0, y);\n\t\t}\n\t});\n\tfunction scrollTo(_x, _y) {\n\t\tvar _ref, _toValue, _toValue2, _document;\n\t\tif (!window) return;\n\t\tconst _element = toValue(element);\n\t\tif (!_element) return;\n\t\t(_ref = _element instanceof Document ? window.document.body : _element) === null || _ref === void 0 || _ref.scrollTo({\n\t\t\ttop: (_toValue = toValue(_y)) !== null && _toValue !== void 0 ? _toValue : y.value,\n\t\t\tleft: (_toValue2 = toValue(_x)) !== null && _toValue2 !== void 0 ? _toValue2 : x.value,\n\t\t\tbehavior: toValue(behavior)\n\t\t});\n\t\tconst scrollContainer = (_element === null || _element === void 0 || (_document = _element.document) === null || _document === void 0 ? void 0 : _document.documentElement) || (_element === null || _element === void 0 ? void 0 : _element.documentElement) || _element;\n\t\tif (x != null) internalX.value = scrollContainer.scrollLeft;\n\t\tif (y != null) internalY.value = scrollContainer.scrollTop;\n\t}\n\tconst isScrolling = shallowRef(false);\n\tconst arrivedState = reactive({\n\t\tleft: true,\n\t\tright: false,\n\t\ttop: true,\n\t\tbottom: false\n\t});\n\tconst directions = reactive({\n\t\tleft: false,\n\t\tright: false,\n\t\ttop: false,\n\t\tbottom: false\n\t});\n\tconst onScrollEnd = (e) => {\n\t\tif (!isScrolling.value) return;\n\t\tisScrolling.value = false;\n\t\tdirections.left = false;\n\t\tdirections.right = false;\n\t\tdirections.top = false;\n\t\tdirections.bottom = false;\n\t\tonStop(e);\n\t};\n\tconst onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n\tconst setArrivedState = (target) => {\n\t\tvar _document2;\n\t\tif (!window) return;\n\t\tconst el = (target === null || target === void 0 || (_document2 = target.document) === null || _document2 === void 0 ? void 0 : _document2.documentElement) || (target === null || target === void 0 ? void 0 : target.documentElement) || unrefElement(target);\n\t\tconst { display, flexDirection, direction } = window.getComputedStyle(el);\n\t\tconst directionMultipler = direction === \"rtl\" ? -1 : 1;\n\t\tconst scrollLeft = el.scrollLeft;\n\t\tdirections.left = scrollLeft < internalX.value;\n\t\tdirections.right = scrollLeft > internalX.value;\n\t\tconst left = Math.abs(scrollLeft * directionMultipler) <= (offset.left || 0);\n\t\tconst right = Math.abs(scrollLeft * directionMultipler) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n\t\tif (display === \"flex\" && flexDirection === \"row-reverse\") {\n\t\t\tarrivedState.left = right;\n\t\t\tarrivedState.right = left;\n\t\t} else {\n\t\t\tarrivedState.left = left;\n\t\t\tarrivedState.right = right;\n\t\t}\n\t\tinternalX.value = scrollLeft;\n\t\tlet scrollTop = el.scrollTop;\n\t\tif (target === window.document && !scrollTop) scrollTop = window.document.body.scrollTop;\n\t\tdirections.top = scrollTop < internalY.value;\n\t\tdirections.bottom = scrollTop > internalY.value;\n\t\tconst top = Math.abs(scrollTop) <= (offset.top || 0);\n\t\tconst bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n\t\t/**\n\t\t* reverse columns and rows behave exactly the other way around,\n\t\t* bottom is treated as top and top is treated as the negative version of bottom\n\t\t*/\n\t\tif (display === \"flex\" && flexDirection === \"column-reverse\") {\n\t\t\tarrivedState.top = bottom;\n\t\t\tarrivedState.bottom = top;\n\t\t} else {\n\t\t\tarrivedState.top = top;\n\t\t\tarrivedState.bottom = bottom;\n\t\t}\n\t\tinternalY.value = scrollTop;\n\t};\n\tconst onScrollHandler = (e) => {\n\t\tvar _documentElement;\n\t\tif (!window) return;\n\t\tsetArrivedState((_documentElement = e.target.documentElement) !== null && _documentElement !== void 0 ? _documentElement : e.target);\n\t\tisScrolling.value = true;\n\t\tonScrollEndDebounced(e);\n\t\tonScroll(e);\n\t};\n\tuseEventListener(element, \"scroll\", throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler, eventListenerOptions);\n\ttryOnMounted(() => {\n\t\ttry {\n\t\t\tconst _element = toValue(element);\n\t\t\tif (!_element) return;\n\t\t\tsetArrivedState(_element);\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t});\n\tif ((observe === null || observe === void 0 ? void 0 : observe.mutation) && element != null && element !== window && element !== document) useMutationObserver(element, () => {\n\t\tconst _element = toValue(element);\n\t\tif (!_element) return;\n\t\tsetArrivedState(_element);\n\t}, {\n\t\tattributes: true,\n\t\tchildList: true,\n\t\tsubtree: true\n\t});\n\tuseEventListener(element, \"scrollend\", onScrollEnd, eventListenerOptions);\n\treturn {\n\t\tx,\n\t\ty,\n\t\tisScrolling,\n\t\tarrivedState,\n\t\tdirections,\n\t\tmeasure() {\n\t\t\tconst _element = toValue(element);\n\t\t\tif (window && _element) setArrivedState(_element);\n\t\t}\n\t};\n}\n//#endregion\n//#region useInfiniteScroll/index.ts\n/**\n* Reactive infinite scroll.\n*\n* @see https://vueuse.org/useInfiniteScroll\n*/\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n\tvar _options$distance;\n\tconst { direction = \"bottom\", interval = 100, canLoadMore = () => true } = options;\n\tconst state = reactive(useScroll(element, {\n\t\t...options,\n\t\toffset: {\n\t\t\t[direction]: (_options$distance = options.distance) !== null && _options$distance !== void 0 ? _options$distance : 0,\n\t\t\t...options.offset\n\t\t}\n\t}));\n\tconst promise = shallowRef();\n\tconst isLoading = computed(() => !!promise.value);\n\tconst observedElement = computed(() => {\n\t\treturn resolveElement(toValue(element));\n\t});\n\tconst isElementVisible = useElementVisibility(observedElement);\n\tconst canLoad = computed(() => {\n\t\tif (!observedElement.value) return false;\n\t\treturn canLoadMore(observedElement.value);\n\t});\n\tfunction checkAndLoad() {\n\t\tstate.measure();\n\t\tif (!observedElement.value || !isElementVisible.value || !canLoad.value || promise.value) return;\n\t\tconst { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n\t\tconst isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n\t\tif (state.arrivedState[direction] || isNarrower) promise.value = Promise.all([onLoadMore(state), new Promise((resolve) => setTimeout(resolve, interval))]).finally(() => {\n\t\t\tpromise.value = null;\n\t\t\tnextTick(() => checkAndLoad());\n\t\t});\n\t}\n\ttryOnUnmounted(watch(() => [\n\t\tstate.arrivedState[direction],\n\t\tisElementVisible.value,\n\t\tcanLoad.value\n\t], checkAndLoad, {\n\t\timmediate: true,\n\t\tflush: \"post\"\n\t}));\n\treturn {\n\t\tisLoading,\n\t\treset() {\n\t\t\tnextTick(() => checkAndLoad());\n\t\t}\n\t};\n}\n//#endregion\n//#region useKeyModifier/index.ts\nconst defaultEvents = [\n\t\"mousedown\",\n\t\"mouseup\",\n\t\"keydown\",\n\t\"keyup\"\n];\n/* @__NO_SIDE_EFFECTS__ */\nfunction useKeyModifier(modifier, options = {}) {\n\tconst { events = defaultEvents, document = defaultDocument, initial = null } = options;\n\tconst state = shallowRef(initial);\n\tif (document) events.forEach((listenerEvent) => {\n\t\tuseEventListener(document, listenerEvent, (evt) => {\n\t\t\tif (typeof evt.getModifierState === \"function\") state.value = evt.getModifierState(modifier);\n\t\t}, { passive: true });\n\t});\n\treturn state;\n}\n//#endregion\n//#region useLocalStorage/index.ts\n/**\n* Reactive LocalStorage.\n*\n* @see https://vueuse.org/useLocalStorage\n* @param key\n* @param initialValue\n* @param options\n*/\nfunction useLocalStorage(key, initialValue, options = {}) {\n\tconst { window = defaultWindow } = options;\n\treturn useStorage(key, initialValue, window === null || window === void 0 ? void 0 : window.localStorage, options);\n}\n//#endregion\n//#region useMagicKeys/aliasMap.ts\nconst DefaultMagicKeysAliasMap = {\n\tctrl: \"control\",\n\tcommand: \"meta\",\n\tcmd: \"meta\",\n\toption: \"alt\",\n\tup: \"arrowup\",\n\tdown: \"arrowdown\",\n\tleft: \"arrowleft\",\n\tright: \"arrowright\"\n};\n//#endregion\n//#region useMagicKeys/index.ts\n/**\n* Reactive keys pressed state, with magical keys combination support.\n*\n* @see https://vueuse.org/useMagicKeys\n*/\nfunction useMagicKeys(options = {}) {\n\tconst { reactive: useReactive = false, target = defaultWindow, aliasMap = DefaultMagicKeysAliasMap, passive = true, onEventFired = noop } = options;\n\tconst current = reactive(/* @__PURE__ */ new Set());\n\tconst obj = {\n\t\ttoJSON() {\n\t\t\treturn {};\n\t\t},\n\t\tcurrent\n\t};\n\tconst refs = useReactive ? reactive(obj) : obj;\n\tconst metaDeps = /* @__PURE__ */ new Set();\n\tconst depsMap = new Map([\n\t\t[\"Meta\", metaDeps],\n\t\t[\"Shift\", /* @__PURE__ */ new Set()],\n\t\t[\"Alt\", /* @__PURE__ */ new Set()]\n\t]);\n\tconst usedKeys = /* @__PURE__ */ new Set();\n\tfunction setRefs(key, value) {\n\t\tif (key in refs) if (useReactive) refs[key] = value;\n\t\telse refs[key].value = value;\n\t}\n\tfunction reset() {\n\t\tcurrent.clear();\n\t\tfor (const key of usedKeys) setRefs(key, false);\n\t}\n\tfunction updateDeps(value, e, keys) {\n\t\tif (!value || typeof e.getModifierState !== \"function\") return;\n\t\tfor (const [modifier, depsSet] of depsMap) if (e.getModifierState(modifier)) {\n\t\t\tkeys.forEach((key) => depsSet.add(key));\n\t\t\tbreak;\n\t\t}\n\t}\n\tfunction clearDeps(value, key) {\n\t\tif (value) return;\n\t\tconst depsMapKey = `${key[0].toUpperCase()}${key.slice(1)}`;\n\t\tconst deps = depsMap.get(depsMapKey);\n\t\tif (![\"shift\", \"alt\"].includes(key) || !deps) return;\n\t\tconst depsArray = Array.from(deps);\n\t\tconst depsIndex = depsArray.indexOf(key);\n\t\tdepsArray.forEach((key, index) => {\n\t\t\tif (index >= depsIndex) {\n\t\t\t\tcurrent.delete(key);\n\t\t\t\tsetRefs(key, false);\n\t\t\t}\n\t\t});\n\t\tdeps.clear();\n\t}\n\tfunction updateRefs(e, value) {\n\t\tvar _e$key, _e$code;\n\t\tconst key = (_e$key = e.key) === null || _e$key === void 0 ? void 0 : _e$key.toLowerCase();\n\t\tconst values = [(_e$code = e.code) === null || _e$code === void 0 ? void 0 : _e$code.toLowerCase(), key].filter(Boolean);\n\t\tif (!key) return;\n\t\tif (key) if (value) current.add(key);\n\t\telse current.delete(key);\n\t\tfor (const key of values) {\n\t\t\tusedKeys.add(key);\n\t\t\tsetRefs(key, value);\n\t\t}\n\t\tupdateDeps(value, e, [...current, ...values]);\n\t\tclearDeps(value, key);\n\t\tif (key === \"meta\" && !value) {\n\t\t\tmetaDeps.forEach((key) => {\n\t\t\t\tcurrent.delete(key);\n\t\t\t\tsetRefs(key, false);\n\t\t\t});\n\t\t\tmetaDeps.clear();\n\t\t}\n\t}\n\tuseEventListener(target, \"keydown\", (e) => {\n\t\tupdateRefs(e, true);\n\t\treturn onEventFired(e);\n\t}, { passive });\n\tuseEventListener(target, \"keyup\", (e) => {\n\t\tupdateRefs(e, false);\n\t\treturn onEventFired(e);\n\t}, { passive });\n\tuseEventListener(\"blur\", reset, { passive });\n\tuseEventListener(\"focus\", reset, { passive });\n\tconst proxy = new Proxy(refs, { get(target, prop, rec) {\n\t\tif (typeof prop !== \"string\") return Reflect.get(target, prop, rec);\n\t\tprop = prop.toLowerCase();\n\t\tif (prop in aliasMap) prop = aliasMap[prop];\n\t\tif (!(prop in refs)) if (/[+_-]/.test(prop)) {\n\t\t\tconst keys = prop.split(/[+_-]/g).map((i) => i.trim());\n\t\t\trefs[prop] = computed(() => keys.map((key) => toValue(proxy[key])).every(Boolean));\n\t\t} else refs[prop] = shallowRef(false);\n\t\tconst r = Reflect.get(target, prop, rec);\n\t\treturn useReactive ? toValue(r) : r;\n\t} });\n\treturn proxy;\n}\n//#endregion\n//#region useMediaControls/index.ts\n/**\n* Automatically check if the ref exists and if it does run the cb fn\n*/\nfunction usingElRef(source, cb) {\n\tif (toValue(source)) cb(toValue(source));\n}\n/**\n* Converts a TimeRange object to an array\n*/\nfunction timeRangeToArray(timeRanges) {\n\tlet ranges = [];\n\tfor (let i = 0; i < timeRanges.length; ++i) ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n\treturn ranges;\n}\n/**\n* Converts a TextTrackList object to an array of `UseMediaTextTrack`\n*/\nfunction tracksToArray(tracks) {\n\treturn Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({\n\t\tid,\n\t\tlabel,\n\t\tkind,\n\t\tlanguage,\n\t\tmode,\n\t\tactiveCues,\n\t\tcues,\n\t\tinBandMetadataTrackDispatchType\n\t}));\n}\nconst defaultOptions = {\n\tsrc: \"\",\n\ttracks: []\n};\nfunction useMediaControls(target, options = {}) {\n\ttarget = toRef(target);\n\toptions = {\n\t\t...defaultOptions,\n\t\t...options\n\t};\n\tconst { document = defaultDocument } = options;\n\tconst listenerOptions = { passive: true };\n\tconst currentTime = shallowRef(0);\n\tconst duration = shallowRef(0);\n\tconst seeking = shallowRef(false);\n\tconst volume = shallowRef(1);\n\tconst waiting = shallowRef(false);\n\tconst ended = shallowRef(false);\n\tconst playing = shallowRef(false);\n\tconst rate = shallowRef(1);\n\tconst stalled = shallowRef(false);\n\tconst buffered = shallowRef([]);\n\tconst tracks = shallowRef([]);\n\tconst selectedTrack = shallowRef(-1);\n\tconst isPictureInPicture = shallowRef(false);\n\tconst muted = shallowRef(false);\n\tconst supportsPictureInPicture = Boolean(document && \"pictureInPictureEnabled\" in document);\n\tconst sourceErrorEvent = createEventHook();\n\tconst playbackErrorEvent = createEventHook();\n\t/**\n\t* Disables the specified track. If no track is specified then\n\t* all tracks will be disabled\n\t*\n\t* @param track The id of the track to disable\n\t*/\n\tconst disableTrack = (track) => {\n\t\tusingElRef(target, (el) => {\n\t\t\tif (track) {\n\t\t\t\tconst id = typeof track === \"number\" ? track : track.id;\n\t\t\t\tel.textTracks[id].mode = \"disabled\";\n\t\t\t} else for (let i = 0; i < el.textTracks.length; ++i) el.textTracks[i].mode = \"disabled\";\n\t\t\tselectedTrack.value = -1;\n\t\t});\n\t};\n\t/**\n\t* Enables the specified track and disables the\n\t* other tracks unless otherwise specified\n\t*\n\t* @param track The track of the id of the track to enable\n\t* @param disableTracks Disable all other tracks\n\t*/\n\tconst enableTrack = (track, disableTracks = true) => {\n\t\tusingElRef(target, (el) => {\n\t\t\tconst id = typeof track === \"number\" ? track : track.id;\n\t\t\tif (disableTracks) disableTrack();\n\t\t\tel.textTracks[id].mode = \"showing\";\n\t\t\tselectedTrack.value = id;\n\t\t});\n\t};\n\t/**\n\t* Toggle picture in picture mode for the player.\n\t*/\n\tconst togglePictureInPicture = () => {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tusingElRef(target, async (el) => {\n\t\t\t\tif (supportsPictureInPicture) if (!isPictureInPicture.value) el.requestPictureInPicture().then(resolve).catch(reject);\n\t\t\t\telse document.exitPictureInPicture().then(resolve).catch(reject);\n\t\t\t});\n\t\t});\n\t};\n\t/**\n\t* This will automatically inject sources to the media element. The sources will be\n\t* appended as children to the media element as `<source>` elements.\n\t*/\n\twatchEffect(() => {\n\t\tif (!document) return;\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tconst src = toValue(options.src);\n\t\tlet sources = [];\n\t\tif (!src) return;\n\t\tif (typeof src === \"string\") sources = [{ src }];\n\t\telse if (Array.isArray(src)) sources = src;\n\t\telse if (isObject(src)) sources = [src];\n\t\tel.querySelectorAll(\"source\").forEach((e) => {\n\t\t\te.remove();\n\t\t});\n\t\tsources.forEach(({ src, type, media }) => {\n\t\t\tconst source = document.createElement(\"source\");\n\t\t\tsource.setAttribute(\"src\", src);\n\t\t\tsource.setAttribute(\"type\", type || \"\");\n\t\t\tsource.setAttribute(\"media\", media || \"\");\n\t\t\tuseEventListener(source, \"error\", sourceErrorEvent.trigger, listenerOptions);\n\t\t\tel.appendChild(source);\n\t\t});\n\t\tel.load();\n\t});\n\t/**\n\t* Apply composable state to the element, also when element is changed\n\t*/\n\twatch([target, volume], () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tel.volume = volume.value;\n\t});\n\twatch([target, muted], () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tel.muted = muted.value;\n\t});\n\twatch([target, rate], () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tel.playbackRate = rate.value;\n\t});\n\t/**\n\t* Load Tracks\n\t*/\n\twatchEffect(() => {\n\t\tif (!document) return;\n\t\tconst textTracks = toValue(options.tracks);\n\t\tconst el = toValue(target);\n\t\tif (!textTracks || !textTracks.length || !el) return;\n\t\t/**\n\t\t* The MediaAPI provides an API for adding text tracks, but they don't currently\n\t\t* have an API for removing text tracks, so instead we will just create and remove\n\t\t* the tracks manually using the HTML api.\n\t\t*/\n\t\tel.querySelectorAll(\"track\").forEach((e) => e.remove());\n\t\ttextTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n\t\t\tconst track = document.createElement(\"track\");\n\t\t\ttrack.default = isDefault || false;\n\t\t\ttrack.kind = kind;\n\t\t\ttrack.label = label;\n\t\t\ttrack.src = src;\n\t\t\ttrack.srclang = srcLang;\n\t\t\tif (track.default) selectedTrack.value = i;\n\t\t\tel.appendChild(track);\n\t\t});\n\t});\n\t/**\n\t* This will allow us to update the current time from the timeupdate event\n\t* without setting the medias current position, but if the user changes the\n\t* current time via the ref, then the media will seek.\n\t*\n\t* If we did not use an ignorable watch, then the current time update from\n\t* the timeupdate event would cause the media to stutter.\n\t*/\n\tconst { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tel.currentTime = time;\n\t});\n\t/**\n\t* Using an ignorable watch so we can control the play state using a ref and not\n\t* a function\n\t*/\n\tconst { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tif (isPlaying) el.play().catch((e) => {\n\t\t\tplaybackErrorEvent.trigger(e);\n\t\t\tthrow e;\n\t\t});\n\t\telse el.pause();\n\t});\n\tuseEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime), listenerOptions);\n\tuseEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration, listenerOptions);\n\tuseEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered), listenerOptions);\n\tuseEventListener(target, \"seeking\", () => seeking.value = true, listenerOptions);\n\tuseEventListener(target, \"seeked\", () => seeking.value = false, listenerOptions);\n\tuseEventListener(target, [\"waiting\", \"loadstart\"], () => {\n\t\twaiting.value = true;\n\t\tignorePlayingUpdates(() => playing.value = false);\n\t}, listenerOptions);\n\tuseEventListener(target, \"loadeddata\", () => waiting.value = false, listenerOptions);\n\tuseEventListener(target, \"playing\", () => {\n\t\twaiting.value = false;\n\t\tended.value = false;\n\t\tignorePlayingUpdates(() => playing.value = true);\n\t}, listenerOptions);\n\tuseEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate, listenerOptions);\n\tuseEventListener(target, \"stalled\", () => stalled.value = true, listenerOptions);\n\tuseEventListener(target, \"ended\", () => ended.value = true, listenerOptions);\n\tuseEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false), listenerOptions);\n\tuseEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true), listenerOptions);\n\tuseEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true, listenerOptions);\n\tuseEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false, listenerOptions);\n\tuseEventListener(target, \"volumechange\", () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tvolume.value = el.volume;\n\t\tmuted.value = el.muted;\n\t}, listenerOptions);\n\t/**\n\t* The following listeners need to listen to a nested\n\t* object on the target, so we will have to use a nested\n\t* watch and manually remove the listeners\n\t*/\n\tconst listeners = [];\n\tconst stop = watch([target], () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tstop();\n\t\tlisteners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks), listenerOptions);\n\t\tlisteners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks), listenerOptions);\n\t\tlisteners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks), listenerOptions);\n\t});\n\ttryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n\treturn {\n\t\tcurrentTime,\n\t\tduration,\n\t\twaiting,\n\t\tseeking,\n\t\tended,\n\t\tstalled,\n\t\tbuffered,\n\t\tplaying,\n\t\trate,\n\t\tvolume,\n\t\tmuted,\n\t\ttracks,\n\t\tselectedTrack,\n\t\tenableTrack,\n\t\tdisableTrack,\n\t\tsupportsPictureInPicture,\n\t\ttogglePictureInPicture,\n\t\tisPictureInPicture,\n\t\tonSourceError: sourceErrorEvent.on,\n\t\tonPlaybackError: playbackErrorEvent.on\n\t};\n}\n//#endregion\n//#region useMemoize/index.ts\n/**\n* Reactive function result cache based on arguments\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useMemoize(resolver, options) {\n\tconst initCache = () => {\n\t\tif (options === null || options === void 0 ? void 0 : options.cache) return shallowReactive(options.cache);\n\t\treturn shallowReactive(/* @__PURE__ */ new Map());\n\t};\n\tconst cache = initCache();\n\t/**\n\t* Generate key from args\n\t*/\n\tconst generateKey = (...args) => (options === null || options === void 0 ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n\t/**\n\t* Load data and save in cache\n\t*/\n\tconst _loadData = (key, ...args) => {\n\t\tcache.set(key, resolver(...args));\n\t\treturn cache.get(key);\n\t};\n\tconst loadData = (...args) => _loadData(generateKey(...args), ...args);\n\t/**\n\t* Delete key from cache\n\t*/\n\tconst deleteData = (...args) => {\n\t\tcache.delete(generateKey(...args));\n\t};\n\t/**\n\t* Clear cached data\n\t*/\n\tconst clearData = () => {\n\t\tcache.clear();\n\t};\n\tconst memoized = (...args) => {\n\t\tconst key = generateKey(...args);\n\t\tif (cache.has(key)) return cache.get(key);\n\t\treturn _loadData(key, ...args);\n\t};\n\tmemoized.load = loadData;\n\tmemoized.delete = deleteData;\n\tmemoized.clear = clearData;\n\tmemoized.generateKey = generateKey;\n\tmemoized.cache = cache;\n\treturn memoized;\n}\n//#endregion\n//#region useMemory/index.ts\nfunction getDefaultScheduler$6(options) {\n\tif (\"interval\" in options || \"immediate\" in options || \"immediateCallback\" in options) {\n\t\tconst { interval = 1e3, immediate, immediateCallback } = options;\n\t\treturn (cb) => useIntervalFn(cb, interval, {\n\t\t\timmediate,\n\t\t\timmediateCallback\n\t\t});\n\t}\n\treturn useIntervalFn;\n}\n/**\n* Reactive Memory Info.\n*\n* @see https://vueuse.org/useMemory\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useMemory(options = {}) {\n\tconst memory = shallowRef();\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n\tif (isSupported.value) {\n\t\tconst { scheduler = getDefaultScheduler$6 } = options;\n\t\tscheduler(() => {\n\t\t\tmemory.value = performance.memory;\n\t\t});\n\t}\n\treturn {\n\t\tisSupported,\n\t\tmemory\n\t};\n}\n//#endregion\n//#region useMouse/index.ts\nconst UseMouseBuiltinExtractors = {\n\tpage: (event) => [event.pageX, event.pageY],\n\tclient: (event) => [event.clientX, event.clientY],\n\tscreen: (event) => [event.screenX, event.screenY],\n\tmovement: (event) => event instanceof MouseEvent ? [event.movementX, event.movementY] : null\n};\n/**\n* Reactive mouse position.\n*\n* @see https://vueuse.org/useMouse\n* @param options\n*/\nfunction useMouse(options = {}) {\n\tconst { type = \"page\", touch = true, resetOnTouchEnds = false, initialValue = {\n\t\tx: 0,\n\t\ty: 0\n\t}, window = defaultWindow, target = window, scroll = true, eventFilter } = options;\n\tlet _prevMouseEvent = null;\n\tlet _prevScrollX = 0;\n\tlet _prevScrollY = 0;\n\tconst x = shallowRef(initialValue.x);\n\tconst y = shallowRef(initialValue.y);\n\tconst sourceType = shallowRef(null);\n\tconst extractor = typeof type === \"function\" ? type : UseMouseBuiltinExtractors[type];\n\tconst mouseHandler = (event) => {\n\t\tconst result = extractor(event);\n\t\t_prevMouseEvent = event;\n\t\tif (result) {\n\t\t\t[x.value, y.value] = result;\n\t\t\tsourceType.value = \"mouse\";\n\t\t}\n\t\tif (window) {\n\t\t\t_prevScrollX = window.scrollX;\n\t\t\t_prevScrollY = window.scrollY;\n\t\t}\n\t};\n\tconst touchHandler = (event) => {\n\t\tif (event.touches.length > 0) {\n\t\t\tconst result = extractor(event.touches[0]);\n\t\t\tif (result) {\n\t\t\t\t[x.value, y.value] = result;\n\t\t\t\tsourceType.value = \"touch\";\n\t\t\t}\n\t\t}\n\t};\n\tconst scrollHandler = () => {\n\t\tif (!_prevMouseEvent || !window) return;\n\t\tconst pos = extractor(_prevMouseEvent);\n\t\tif (_prevMouseEvent instanceof MouseEvent && pos) {\n\t\t\tx.value = pos[0] + window.scrollX - _prevScrollX;\n\t\t\ty.value = pos[1] + window.scrollY - _prevScrollY;\n\t\t}\n\t};\n\tconst reset = () => {\n\t\tx.value = initialValue.x;\n\t\ty.value = initialValue.y;\n\t};\n\tconst mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n\tconst touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n\tconst scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler();\n\tif (target) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n\t\tif (touch && type !== \"movement\") {\n\t\t\tuseEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n\t\t\tif (resetOnTouchEnds) useEventListener(target, \"touchend\", reset, listenerOptions);\n\t\t}\n\t\tif (scroll && type === \"page\") useEventListener(window, \"scroll\", scrollHandlerWrapper, listenerOptions);\n\t}\n\treturn {\n\t\tx,\n\t\ty,\n\t\tsourceType\n\t};\n}\n//#endregion\n//#region useMouseInElement/index.ts\n/**\n* Reactive mouse position related to an element.\n*\n* @see https://vueuse.org/useMouseInElement\n* @param target\n* @param options\n*/\nfunction useMouseInElement(target, options = {}) {\n\tconst { windowResize = true, windowScroll = true, handleOutside = true, window = defaultWindow } = options;\n\tconst type = options.type || \"page\";\n\tconst { x, y, sourceType } = useMouse(options);\n\tconst targetRef = shallowRef(target !== null && target !== void 0 ? target : window === null || window === void 0 ? void 0 : window.document.body);\n\tconst elementX = shallowRef(0);\n\tconst elementY = shallowRef(0);\n\tconst elementPositionX = shallowRef(0);\n\tconst elementPositionY = shallowRef(0);\n\tconst elementHeight = shallowRef(0);\n\tconst elementWidth = shallowRef(0);\n\tconst isOutside = shallowRef(true);\n\tfunction update() {\n\t\tif (!window) return;\n\t\tconst el = unrefElement(targetRef);\n\t\tif (!el || !(el instanceof Element)) return;\n\t\tfor (const rect of el.getClientRects()) {\n\t\t\tconst { left, top, width, height } = rect;\n\t\t\telementPositionX.value = left + (type === \"page\" ? window.pageXOffset : 0);\n\t\t\telementPositionY.value = top + (type === \"page\" ? window.pageYOffset : 0);\n\t\t\telementHeight.value = height;\n\t\t\telementWidth.value = width;\n\t\t\tconst elX = x.value - elementPositionX.value;\n\t\t\tconst elY = y.value - elementPositionY.value;\n\t\t\tisOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n\t\t\tif (handleOutside || !isOutside.value) {\n\t\t\t\telementX.value = elX;\n\t\t\t\telementY.value = elY;\n\t\t\t}\n\t\t\tif (!isOutside.value) break;\n\t\t}\n\t}\n\tconst stopFnList = [];\n\tfunction stop() {\n\t\tstopFnList.forEach((fn) => fn());\n\t\tstopFnList.length = 0;\n\t}\n\ttryOnMounted(() => {\n\t\tupdate();\n\t});\n\tif (window) {\n\t\tconst { stop: stopResizeObserver } = useResizeObserver(targetRef, update);\n\t\tconst { stop: stopMutationObserver } = useMutationObserver(targetRef, update, { attributeFilter: [\"style\", \"class\"] });\n\t\tconst stopWatch = watch([\n\t\t\ttargetRef,\n\t\t\tx,\n\t\t\ty\n\t\t], update);\n\t\tstopFnList.push(stopResizeObserver, stopMutationObserver, stopWatch);\n\t\tuseEventListener(document, \"mouseleave\", () => isOutside.value = true, { passive: true });\n\t\tif (windowScroll) stopFnList.push(useEventListener(\"scroll\", update, {\n\t\t\tcapture: true,\n\t\t\tpassive: true\n\t\t}));\n\t\tif (windowResize) stopFnList.push(useEventListener(\"resize\", update, { passive: true }));\n\t}\n\treturn {\n\t\tx,\n\t\ty,\n\t\tsourceType,\n\t\telementX,\n\t\telementY,\n\t\telementPositionX,\n\t\telementPositionY,\n\t\telementHeight,\n\t\telementWidth,\n\t\tisOutside,\n\t\tstop\n\t};\n}\n//#endregion\n//#region useMousePressed/index.ts\n/**\n* Reactive mouse pressing state.\n*\n* @see https://vueuse.org/useMousePressed\n* @param options\n*/\nfunction useMousePressed(options = {}) {\n\tconst { touch = true, drag = true, capture = false, initialValue = false, window = defaultWindow } = options;\n\tconst pressed = shallowRef(initialValue);\n\tconst sourceType = shallowRef(null);\n\tif (!window) return {\n\t\tpressed,\n\t\tsourceType\n\t};\n\tconst onPressed = (srcType) => (event) => {\n\t\tvar _options$onPressed;\n\t\tpressed.value = true;\n\t\tsourceType.value = srcType;\n\t\t(_options$onPressed = options.onPressed) === null || _options$onPressed === void 0 || _options$onPressed.call(options, event);\n\t};\n\tconst onReleased = (event) => {\n\t\tvar _options$onReleased;\n\t\tpressed.value = false;\n\t\tsourceType.value = null;\n\t\t(_options$onReleased = options.onReleased) === null || _options$onReleased === void 0 || _options$onReleased.call(options, event);\n\t};\n\tconst target = computed(() => unrefElement(options.target) || window);\n\tconst listenerOptions = {\n\t\tpassive: true,\n\t\tcapture\n\t};\n\tuseEventListener(target, \"mousedown\", onPressed(\"mouse\"), listenerOptions);\n\tuseEventListener(window, \"mouseleave\", onReleased, listenerOptions);\n\tuseEventListener(window, \"mouseup\", onReleased, listenerOptions);\n\tif (drag) {\n\t\tuseEventListener(target, \"dragstart\", onPressed(\"mouse\"), listenerOptions);\n\t\tuseEventListener(window, \"drop\", onReleased, listenerOptions);\n\t\tuseEventListener(window, \"dragend\", onReleased, listenerOptions);\n\t}\n\tif (touch) {\n\t\tuseEventListener(target, \"touchstart\", onPressed(\"touch\"), listenerOptions);\n\t\tuseEventListener(window, \"touchend\", onReleased, listenerOptions);\n\t\tuseEventListener(window, \"touchcancel\", onReleased, listenerOptions);\n\t}\n\treturn {\n\t\tpressed,\n\t\tsourceType\n\t};\n}\n//#endregion\n//#region useNavigatorLanguage/index.ts\n/**\n*\n* Reactive useNavigatorLanguage\n*\n* Detects the currently selected user language and returns a reactive language\n* @see https://vueuse.org/useNavigatorLanguage\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useNavigatorLanguage(options = {}) {\n\tconst { window = defaultWindow } = options;\n\tconst navigator = window === null || window === void 0 ? void 0 : window.navigator;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator && \"language\" in navigator);\n\tconst language = shallowRef(navigator === null || navigator === void 0 ? void 0 : navigator.language);\n\tuseEventListener(window, \"languagechange\", () => {\n\t\tif (navigator) language.value = navigator.language;\n\t}, { passive: true });\n\treturn {\n\t\tisSupported,\n\t\tlanguage\n\t};\n}\n//#endregion\n//#region useNetwork/index.ts\n/**\n* Reactive Network status.\n*\n* @see https://vueuse.org/useNetwork\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useNetwork(options = {}) {\n\tconst { window = defaultWindow } = options;\n\tconst navigator = window === null || window === void 0 ? void 0 : window.navigator;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator && \"connection\" in navigator);\n\tconst isOnline = shallowRef(true);\n\tconst saveData = shallowRef(false);\n\tconst offlineAt = shallowRef(void 0);\n\tconst onlineAt = shallowRef(void 0);\n\tconst downlink = shallowRef(void 0);\n\tconst downlinkMax = shallowRef(void 0);\n\tconst rtt = shallowRef(void 0);\n\tconst effectiveType = shallowRef(void 0);\n\tconst type = shallowRef(\"unknown\");\n\tconst connection = isSupported.value && navigator.connection;\n\tfunction updateNetworkInformation() {\n\t\tif (!navigator) return;\n\t\tisOnline.value = navigator.onLine;\n\t\tofflineAt.value = isOnline.value ? void 0 : Date.now();\n\t\tonlineAt.value = isOnline.value ? Date.now() : void 0;\n\t\tif (connection) {\n\t\t\tdownlink.value = connection.downlink;\n\t\t\tdownlinkMax.value = connection.downlinkMax;\n\t\t\teffectiveType.value = connection.effectiveType;\n\t\t\trtt.value = connection.rtt;\n\t\t\tsaveData.value = connection.saveData;\n\t\t\ttype.value = connection.type;\n\t\t}\n\t}\n\tconst listenerOptions = { passive: true };\n\tif (window) {\n\t\tuseEventListener(window, \"offline\", () => {\n\t\t\tisOnline.value = false;\n\t\t\tofflineAt.value = Date.now();\n\t\t}, listenerOptions);\n\t\tuseEventListener(window, \"online\", () => {\n\t\t\tisOnline.value = true;\n\t\t\tonlineAt.value = Date.now();\n\t\t}, listenerOptions);\n\t}\n\tif (connection) useEventListener(connection, \"change\", updateNetworkInformation, listenerOptions);\n\tupdateNetworkInformation();\n\treturn {\n\t\tisSupported,\n\t\tisOnline: shallowReadonly(isOnline),\n\t\tsaveData: shallowReadonly(saveData),\n\t\tofflineAt: shallowReadonly(offlineAt),\n\t\tonlineAt: shallowReadonly(onlineAt),\n\t\tdownlink: shallowReadonly(downlink),\n\t\tdownlinkMax: shallowReadonly(downlinkMax),\n\t\teffectiveType: shallowReadonly(effectiveType),\n\t\trtt: shallowReadonly(rtt),\n\t\ttype: shallowReadonly(type)\n\t};\n}\n//#endregion\n//#region useNow/index.ts\nfunction getDefaultScheduler$5(options) {\n\tif (\"interval\" in options || \"immediate\" in options) {\n\t\tconst { interval = \"requestAnimationFrame\", immediate = true } = options;\n\t\treturn interval === \"requestAnimationFrame\" ? (fn) => useRafFn(fn, { immediate }) : (fn) => useIntervalFn(fn, interval, options);\n\t}\n\treturn useRafFn;\n}\n/**\n* Reactive current Date instance.\n*\n* @see https://vueuse.org/useNow\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useNow(options = {}) {\n\tconst { controls: exposeControls = false, scheduler = getDefaultScheduler$5(options) } = options;\n\tconst now = shallowRef(/* @__PURE__ */ new Date());\n\tconst update = () => now.value = /* @__PURE__ */ new Date();\n\tconst controls = scheduler(update);\n\tif (exposeControls) return {\n\t\tnow,\n\t\t...controls\n\t};\n\telse return now;\n}\n//#endregion\n//#region useObjectUrl/index.ts\n/**\n* Reactive URL representing an object.\n*\n* @see https://vueuse.org/useObjectUrl\n* @param object\n*/\nfunction useObjectUrl(object) {\n\tconst url = shallowRef();\n\tconst release = () => {\n\t\tif (url.value) URL.revokeObjectURL(url.value);\n\t\turl.value = void 0;\n\t};\n\twatch(() => toValue(object), (newObject) => {\n\t\trelease();\n\t\tif (newObject) url.value = URL.createObjectURL(newObject);\n\t}, { immediate: true });\n\ttryOnScopeDispose(release);\n\treturn shallowReadonly(url);\n}\n//#endregion\n//#region ../math/useClamp/index.ts\n/**\n* Reactively clamp a value between two other values.\n*\n* @see https://vueuse.org/useClamp\n* @param value number\n* @param min\n* @param max\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useClamp(value, min, max) {\n\tif (typeof value === \"function\" || isReadonly(value)) return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n\tconst _value = ref(value);\n\treturn computed({\n\t\tget() {\n\t\t\treturn _value.value = clamp(_value.value, toValue(min), toValue(max));\n\t\t},\n\t\tset(value) {\n\t\t\t_value.value = clamp(value, toValue(min), toValue(max));\n\t\t}\n\t});\n}\n//#endregion\n//#region useOffsetPagination/index.ts\nfunction useOffsetPagination(options) {\n\tconst { total = Number.POSITIVE_INFINITY, pageSize = 10, page = 1, onPageChange = noop, onPageSizeChange = noop, onPageCountChange = noop } = options;\n\tconst currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n\tconst pageCount = computed(() => Math.max(1, Math.ceil(toValue(total) / toValue(currentPageSize))));\n\tconst currentPage = useClamp(page, 1, pageCount);\n\tconst isFirstPage = computed(() => currentPage.value === 1);\n\tconst isLastPage = computed(() => currentPage.value === pageCount.value);\n\tif (isRef(page)) syncRef(page, currentPage, { direction: isReadonly(page) ? \"ltr\" : \"both\" });\n\tif (isRef(pageSize)) syncRef(pageSize, currentPageSize, { direction: isReadonly(pageSize) ? \"ltr\" : \"both\" });\n\tfunction prev() {\n\t\tcurrentPage.value--;\n\t}\n\tfunction next() {\n\t\tcurrentPage.value++;\n\t}\n\tconst returnValue = {\n\t\tcurrentPage,\n\t\tcurrentPageSize,\n\t\tpageCount,\n\t\tisFirstPage,\n\t\tisLastPage,\n\t\tprev,\n\t\tnext\n\t};\n\twatch(currentPage, () => {\n\t\tonPageChange(reactive(returnValue));\n\t});\n\twatch(currentPageSize, () => {\n\t\tonPageSizeChange(reactive(returnValue));\n\t});\n\twatch(pageCount, () => {\n\t\tonPageCountChange(reactive(returnValue));\n\t});\n\treturn returnValue;\n}\n//#endregion\n//#region useOnline/index.ts\n/**\n* Reactive online state.\n*\n* @see https://vueuse.org/useOnline\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useOnline(options = {}) {\n\tconst { isOnline } = useNetwork(options);\n\treturn isOnline;\n}\n//#endregion\n//#region usePageLeave/index.ts\n/**\n* Reactive state to show whether mouse leaves the page.\n*\n* @see https://vueuse.org/usePageLeave\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePageLeave(options = {}) {\n\tconst { window = defaultWindow } = options;\n\tconst isLeft = shallowRef(false);\n\tconst handler = (event) => {\n\t\tif (!window) return;\n\t\tevent = event || window.event;\n\t\tisLeft.value = !(event.relatedTarget || event.toElement);\n\t};\n\tif (window) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(window, \"mouseout\", handler, listenerOptions);\n\t\tuseEventListener(window.document, \"mouseleave\", handler, listenerOptions);\n\t\tuseEventListener(window.document, \"mouseenter\", handler, listenerOptions);\n\t}\n\treturn isLeft;\n}\n//#endregion\n//#region useScreenOrientation/index.ts\n/**\n* Reactive screen orientation\n*\n* @see https://vueuse.org/useScreenOrientation\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useScreenOrientation(options = {}) {\n\tconst { window = defaultWindow } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n\tconst screenOrientation = isSupported.value ? window.screen.orientation : {};\n\tconst orientation = shallowRef(screenOrientation.type);\n\tconst angle = shallowRef(screenOrientation.angle || 0);\n\tif (isSupported.value) useEventListener(window, \"orientationchange\", () => {\n\t\torientation.value = screenOrientation.type;\n\t\tangle.value = screenOrientation.angle;\n\t}, { passive: true });\n\tconst lockOrientation = (type) => {\n\t\tif (isSupported.value && typeof screenOrientation.lock === \"function\") return screenOrientation.lock(type);\n\t\treturn Promise.reject(/* @__PURE__ */ new Error(\"Not supported\"));\n\t};\n\tconst unlockOrientation = () => {\n\t\tif (isSupported.value && typeof screenOrientation.unlock === \"function\") screenOrientation.unlock();\n\t};\n\treturn {\n\t\tisSupported,\n\t\torientation,\n\t\tangle,\n\t\tlockOrientation,\n\t\tunlockOrientation\n\t};\n}\n//#endregion\n//#region useParallax/index.ts\n/**\n* Create parallax effect easily. It uses `useDeviceOrientation` and fallback to `useMouse`\n* if orientation is not supported.\n*\n* @param target\n* @param options\n*/\nfunction useParallax(target, options = {}) {\n\tconst { deviceOrientationTiltAdjust = (i) => i, deviceOrientationRollAdjust = (i) => i, mouseTiltAdjust = (i) => i, mouseRollAdjust = (i) => i, window = defaultWindow } = options;\n\tconst orientation = reactive(useDeviceOrientation({ window }));\n\tconst screenOrientation = reactive(useScreenOrientation({ window }));\n\tconst { elementX: x, elementY: y, elementWidth: width, elementHeight: height } = useMouseInElement(target, {\n\t\thandleOutside: false,\n\t\twindow\n\t});\n\tconst source = computed(() => {\n\t\tif (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0)) return \"deviceOrientation\";\n\t\treturn \"mouse\";\n\t});\n\treturn {\n\t\troll: computed(() => {\n\t\t\tif (source.value === \"deviceOrientation\") {\n\t\t\t\tlet value;\n\t\t\t\tswitch (screenOrientation.orientation) {\n\t\t\t\t\tcase \"landscape-primary\":\n\t\t\t\t\t\tvalue = orientation.gamma / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"landscape-secondary\":\n\t\t\t\t\t\tvalue = -orientation.gamma / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"portrait-primary\":\n\t\t\t\t\t\tvalue = -orientation.beta / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"portrait-secondary\":\n\t\t\t\t\t\tvalue = orientation.beta / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: value = -orientation.beta / 90;\n\t\t\t\t}\n\t\t\t\treturn deviceOrientationRollAdjust(value);\n\t\t\t} else return mouseRollAdjust(-(y.value - height.value / 2) / height.value);\n\t\t}),\n\t\ttilt: computed(() => {\n\t\t\tif (source.value === \"deviceOrientation\") {\n\t\t\t\tlet value;\n\t\t\t\tswitch (screenOrientation.orientation) {\n\t\t\t\t\tcase \"landscape-primary\":\n\t\t\t\t\t\tvalue = orientation.beta / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"landscape-secondary\":\n\t\t\t\t\t\tvalue = -orientation.beta / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"portrait-primary\":\n\t\t\t\t\t\tvalue = orientation.gamma / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"portrait-secondary\":\n\t\t\t\t\t\tvalue = -orientation.gamma / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: value = orientation.gamma / 90;\n\t\t\t\t}\n\t\t\t\treturn deviceOrientationTiltAdjust(value);\n\t\t\t} else return mouseTiltAdjust((x.value - width.value / 2) / width.value);\n\t\t}),\n\t\tsource\n\t};\n}\n//#endregion\n//#region useParentElement/index.ts\nfunction useParentElement(element = useCurrentElement()) {\n\tconst parentElement = shallowRef();\n\tconst update = () => {\n\t\tconst el = unrefElement(element);\n\t\tif (el) parentElement.value = el.parentElement;\n\t};\n\ttryOnMounted(update);\n\twatch(() => toValue(element), update);\n\treturn parentElement;\n}\n//#endregion\n//#region usePerformanceObserver/index.ts\n/**\n* Observe performance metrics.\n*\n* @see https://vueuse.org/usePerformanceObserver\n* @param options\n*/\nfunction usePerformanceObserver(options, callback) {\n\tconst { window = defaultWindow, immediate = true, ...performanceOptions } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window && \"PerformanceObserver\" in window);\n\tlet observer;\n\tconst stop = () => {\n\t\tobserver === null || observer === void 0 || observer.disconnect();\n\t};\n\tconst start = () => {\n\t\tif (isSupported.value) {\n\t\t\tstop();\n\t\t\tobserver = new PerformanceObserver(callback);\n\t\t\tobserver.observe(performanceOptions);\n\t\t}\n\t};\n\ttryOnScopeDispose(stop);\n\tif (immediate) start();\n\treturn {\n\t\tisSupported,\n\t\tstart,\n\t\tstop\n\t};\n}\n//#endregion\n//#region usePointer/index.ts\nconst defaultState = (/* #__PURE__ */ {\n\tx: 0,\n\ty: 0,\n\tpointerId: 0,\n\tpressure: 0,\n\ttiltX: 0,\n\ttiltY: 0,\n\twidth: 0,\n\theight: 0,\n\ttwist: 0,\n\tpointerType: null\n});\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\n/**\n* Reactive pointer state.\n*\n* @see https://vueuse.org/usePointer\n* @param options\n*/\nfunction usePointer(options = {}) {\n\tconst { target = defaultWindow } = options;\n\tconst isInside = shallowRef(false);\n\tconst state = shallowRef(options.initialValue || {});\n\tObject.assign(state.value, defaultState, state.value);\n\tconst handler = (event) => {\n\t\tisInside.value = true;\n\t\tif (options.pointerTypes && !options.pointerTypes.includes(event.pointerType)) return;\n\t\tstate.value = objectPick(event, keys, false);\n\t};\n\tif (target) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(target, [\n\t\t\t\"pointerdown\",\n\t\t\t\"pointermove\",\n\t\t\t\"pointerup\"\n\t\t], handler, listenerOptions);\n\t\tuseEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n\t}\n\treturn {\n\t\t...toRefs(state),\n\t\tisInside\n\t};\n}\n//#endregion\n//#region usePointerLock/index.ts\n/**\n* Reactive pointer lock.\n*\n* @see https://vueuse.org/usePointerLock\n* @param target\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePointerLock(target, options = {}) {\n\tconst { document = defaultDocument } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => document && \"pointerLockElement\" in document);\n\tconst element = shallowRef();\n\tconst triggerElement = shallowRef();\n\tlet targetElement;\n\tif (isSupported.value) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(document, \"pointerlockchange\", () => {\n\t\t\tvar _pointerLockElement;\n\t\t\tconst currentElement = (_pointerLockElement = document.pointerLockElement) !== null && _pointerLockElement !== void 0 ? _pointerLockElement : element.value;\n\t\t\tif (targetElement && currentElement === targetElement) {\n\t\t\t\telement.value = document.pointerLockElement;\n\t\t\t\tif (!element.value) targetElement = triggerElement.value = null;\n\t\t\t}\n\t\t}, listenerOptions);\n\t\tuseEventListener(document, \"pointerlockerror\", () => {\n\t\t\tvar _pointerLockElement2;\n\t\t\tconst currentElement = (_pointerLockElement2 = document.pointerLockElement) !== null && _pointerLockElement2 !== void 0 ? _pointerLockElement2 : element.value;\n\t\t\tif (targetElement && currentElement === targetElement) {\n\t\t\t\tconst action = document.pointerLockElement ? \"release\" : \"acquire\";\n\t\t\t\tthrow new Error(`Failed to ${action} pointer lock.`);\n\t\t\t}\n\t\t}, listenerOptions);\n\t}\n\tasync function lock(e) {\n\t\tvar _unrefElement;\n\t\tif (!isSupported.value) throw new Error(\"Pointer Lock API is not supported by your browser.\");\n\t\ttriggerElement.value = e instanceof Event ? e.currentTarget : null;\n\t\ttargetElement = e instanceof Event ? (_unrefElement = unrefElement(target)) !== null && _unrefElement !== void 0 ? _unrefElement : triggerElement.value : unrefElement(e);\n\t\tif (!targetElement) throw new Error(\"Target element undefined.\");\n\t\ttargetElement.requestPointerLock();\n\t\treturn await until(element).toBe(targetElement);\n\t}\n\tasync function unlock() {\n\t\tif (!element.value) return false;\n\t\tdocument.exitPointerLock();\n\t\tawait until(element).toBeNull();\n\t\treturn true;\n\t}\n\treturn {\n\t\tisSupported,\n\t\telement,\n\t\ttriggerElement,\n\t\tlock,\n\t\tunlock\n\t};\n}\n//#endregion\n//#region usePointerSwipe/index.ts\n/**\n* Reactive swipe detection based on PointerEvents.\n*\n* @see https://vueuse.org/usePointerSwipe\n* @param target\n* @param options\n*/\nfunction usePointerSwipe(target, options = {}) {\n\tconst targetRef = toRef(target);\n\tconst { threshold = 50, onSwipe, onSwipeEnd, onSwipeStart, disableTextSelect = false } = options;\n\tconst posStart = reactive({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst updatePosStart = (x, y) => {\n\t\tposStart.x = x;\n\t\tposStart.y = y;\n\t};\n\tconst posEnd = reactive({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst updatePosEnd = (x, y) => {\n\t\tposEnd.x = x;\n\t\tposEnd.y = y;\n\t};\n\tconst distanceX = computed(() => posStart.x - posEnd.x);\n\tconst distanceY = computed(() => posStart.y - posEnd.y);\n\tconst { max, abs } = Math;\n\tconst isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n\tconst isSwiping = shallowRef(false);\n\tconst isPointerDown = shallowRef(false);\n\tconst direction = computed(() => {\n\t\tif (!isThresholdExceeded.value) return \"none\";\n\t\tif (abs(distanceX.value) > abs(distanceY.value)) return distanceX.value > 0 ? \"left\" : \"right\";\n\t\telse return distanceY.value > 0 ? \"up\" : \"down\";\n\t});\n\tconst eventIsAllowed = (e) => {\n\t\tvar _ref, _options$pointerTypes, _options$pointerTypes2;\n\t\tconst isReleasingButton = e.buttons === 0;\n\t\tconst isPrimaryButton = e.buttons === 1;\n\t\treturn (_ref = (_options$pointerTypes = (_options$pointerTypes2 = options.pointerTypes) === null || _options$pointerTypes2 === void 0 ? void 0 : _options$pointerTypes2.includes(e.pointerType)) !== null && _options$pointerTypes !== void 0 ? _options$pointerTypes : isReleasingButton || isPrimaryButton) !== null && _ref !== void 0 ? _ref : true;\n\t};\n\tconst listenerOptions = { passive: true };\n\tconst stops = [\n\t\tuseEventListener(target, \"pointerdown\", (e) => {\n\t\t\tif (!eventIsAllowed(e)) return;\n\t\t\tisPointerDown.value = true;\n\t\t\tconst eventTarget = e.target;\n\t\t\teventTarget === null || eventTarget === void 0 || eventTarget.setPointerCapture(e.pointerId);\n\t\t\tconst { clientX: x, clientY: y } = e;\n\t\t\tupdatePosStart(x, y);\n\t\t\tupdatePosEnd(x, y);\n\t\t\tonSwipeStart === null || onSwipeStart === void 0 || onSwipeStart(e);\n\t\t}, listenerOptions),\n\t\tuseEventListener(target, \"pointermove\", (e) => {\n\t\t\tif (!eventIsAllowed(e)) return;\n\t\t\tif (!isPointerDown.value) return;\n\t\t\tconst { clientX: x, clientY: y } = e;\n\t\t\tupdatePosEnd(x, y);\n\t\t\tif (!isSwiping.value && isThresholdExceeded.value) isSwiping.value = true;\n\t\t\tif (isSwiping.value) onSwipe === null || onSwipe === void 0 || onSwipe(e);\n\t\t}, listenerOptions),\n\t\tuseEventListener(target, \"pointerup\", (e) => {\n\t\t\tif (!eventIsAllowed(e)) return;\n\t\t\tif (isSwiping.value) onSwipeEnd === null || onSwipeEnd === void 0 || onSwipeEnd(e, direction.value);\n\t\t\tisPointerDown.value = false;\n\t\t\tisSwiping.value = false;\n\t\t}, listenerOptions)\n\t];\n\ttryOnMounted(() => {\n\t\tvar _targetRef$value;\n\t\t(_targetRef$value = targetRef.value) === null || _targetRef$value === void 0 || (_targetRef$value = _targetRef$value.style) === null || _targetRef$value === void 0 || _targetRef$value.setProperty(\"touch-action\", \"pan-y\");\n\t\tif (disableTextSelect) {\n\t\t\tvar _targetRef$value2, _targetRef$value3, _targetRef$value4;\n\t\t\t(_targetRef$value2 = targetRef.value) === null || _targetRef$value2 === void 0 || (_targetRef$value2 = _targetRef$value2.style) === null || _targetRef$value2 === void 0 || _targetRef$value2.setProperty(\"-webkit-user-select\", \"none\");\n\t\t\t(_targetRef$value3 = targetRef.value) === null || _targetRef$value3 === void 0 || (_targetRef$value3 = _targetRef$value3.style) === null || _targetRef$value3 === void 0 || _targetRef$value3.setProperty(\"-ms-user-select\", \"none\");\n\t\t\t(_targetRef$value4 = targetRef.value) === null || _targetRef$value4 === void 0 || (_targetRef$value4 = _targetRef$value4.style) === null || _targetRef$value4 === void 0 || _targetRef$value4.setProperty(\"user-select\", \"none\");\n\t\t}\n\t});\n\tconst stop = () => stops.forEach((s) => s());\n\treturn {\n\t\tisSwiping: shallowReadonly(isSwiping),\n\t\tdirection: shallowReadonly(direction),\n\t\tposStart: readonly(posStart),\n\t\tposEnd: readonly(posEnd),\n\t\tdistanceX,\n\t\tdistanceY,\n\t\tstop\n\t};\n}\n//#endregion\n//#region usePreferredColorScheme/index.ts\n/**\n* Reactive prefers-color-scheme media query.\n*\n* @see https://vueuse.org/usePreferredColorScheme\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredColorScheme(options) {\n\tconst isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n\tconst isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n\treturn computed(() => {\n\t\tif (isDark.value) return \"dark\";\n\t\tif (isLight.value) return \"light\";\n\t\treturn \"no-preference\";\n\t});\n}\n//#endregion\n//#region usePreferredContrast/index.ts\n/**\n* Reactive prefers-contrast media query.\n*\n* @see https://vueuse.org/usePreferredContrast\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredContrast(options) {\n\tconst isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n\tconst isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n\tconst isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n\treturn computed(() => {\n\t\tif (isMore.value) return \"more\";\n\t\tif (isLess.value) return \"less\";\n\t\tif (isCustom.value) return \"custom\";\n\t\treturn \"no-preference\";\n\t});\n}\n//#endregion\n//#region usePreferredLanguages/index.ts\n/**\n* Reactive Navigator Languages.\n*\n* @see https://vueuse.org/usePreferredLanguages\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredLanguages(options = {}) {\n\tconst { window = defaultWindow } = options;\n\tif (!window) return shallowRef([\"en\"]);\n\tconst navigator = window.navigator;\n\tconst value = shallowRef(navigator.languages);\n\tuseEventListener(window, \"languagechange\", () => {\n\t\tvalue.value = navigator.languages;\n\t}, { passive: true });\n\treturn value;\n}\n//#endregion\n//#region usePreferredReducedMotion/index.ts\n/**\n* Reactive prefers-reduced-motion media query.\n*\n* @see https://vueuse.org/usePreferredReducedMotion\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredReducedMotion(options) {\n\tconst isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n\treturn computed(() => {\n\t\tif (isReduced.value) return \"reduce\";\n\t\treturn \"no-preference\";\n\t});\n}\n//#endregion\n//#region usePreferredReducedTransparency/index.ts\n/**\n* Reactive prefers-reduced-transparency media query.\n*\n* @see https://vueuse.org/usePreferredReducedTransparency\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredReducedTransparency(options) {\n\tconst isReduced = useMediaQuery(\"(prefers-reduced-transparency: reduce)\", options);\n\treturn computed(() => {\n\t\tif (isReduced.value) return \"reduce\";\n\t\treturn \"no-preference\";\n\t});\n}\n//#endregion\n//#region usePrevious/index.ts\nfunction usePrevious(value, initialValue) {\n\tconst previous = shallowRef(initialValue);\n\twatch(toRef(value), (_, oldValue) => {\n\t\tprevious.value = oldValue;\n\t}, { flush: \"sync\" });\n\treturn readonly(previous);\n}\n//#endregion\n//#region useScreenSafeArea/index.ts\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\n/**\n* Reactive `env(safe-area-inset-*)`\n*\n* @see https://vueuse.org/useScreenSafeArea\n*/\nfunction useScreenSafeArea() {\n\tconst top = shallowRef(\"\");\n\tconst right = shallowRef(\"\");\n\tconst bottom = shallowRef(\"\");\n\tconst left = shallowRef(\"\");\n\tif (isClient) {\n\t\tconst topCssVar = useCssVar(topVarName);\n\t\tconst rightCssVar = useCssVar(rightVarName);\n\t\tconst bottomCssVar = useCssVar(bottomVarName);\n\t\tconst leftCssVar = useCssVar(leftVarName);\n\t\ttopCssVar.value = \"env(safe-area-inset-top, 0px)\";\n\t\trightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n\t\tbottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n\t\tleftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n\t\ttryOnMounted(update);\n\t\tuseEventListener(\"resize\", useDebounceFn(update), { passive: true });\n\t}\n\tfunction update() {\n\t\ttop.value = getValue(topVarName);\n\t\tright.value = getValue(rightVarName);\n\t\tbottom.value = getValue(bottomVarName);\n\t\tleft.value = getValue(leftVarName);\n\t}\n\treturn {\n\t\ttop,\n\t\tright,\n\t\tbottom,\n\t\tleft,\n\t\tupdate\n\t};\n}\nfunction getValue(position) {\n\treturn getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n//#endregion\n//#region useScriptTag/index.ts\n/**\n* Async script tag loading.\n*\n* @see https://vueuse.org/useScriptTag\n* @param src\n* @param onLoaded\n* @param options\n*/\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n\tconst { immediate = true, manual = false, type = \"text/javascript\", async = true, crossOrigin, referrerPolicy, noModule, defer, document = defaultDocument, attrs = {}, nonce = void 0 } = options;\n\tconst scriptTag = shallowRef(null);\n\tlet _promise = null;\n\t/**\n\t* Load the script specified via `src`.\n\t*\n\t* @param waitForScriptLoad Whether if the Promise should resolve once the \"load\" event is emitted by the <script> attribute, or right after appending it to the DOM.\n\t* @returns Promise<HTMLScriptElement>\n\t*/\n\tconst loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n\t\tconst resolveWithElement = (el) => {\n\t\t\tscriptTag.value = el;\n\t\t\tresolve(el);\n\t\t\treturn el;\n\t\t};\n\t\tif (!document) {\n\t\t\tresolve(false);\n\t\t\treturn;\n\t\t}\n\t\tlet shouldAppend = false;\n\t\tlet el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n\t\tif (!el) {\n\t\t\tel = document.createElement(\"script\");\n\t\t\tel.type = type;\n\t\t\tel.async = async;\n\t\t\tel.src = toValue(src);\n\t\t\tif (defer) el.defer = defer;\n\t\t\tif (crossOrigin) el.crossOrigin = crossOrigin;\n\t\t\tif (noModule) el.noModule = noModule;\n\t\t\tif (referrerPolicy) el.referrerPolicy = referrerPolicy;\n\t\t\tif (nonce) el.nonce = nonce;\n\t\t\tObject.entries(attrs).forEach(([name, value]) => el === null || el === void 0 ? void 0 : el.setAttribute(name, value));\n\t\t\tshouldAppend = true;\n\t\t} else if (el.hasAttribute(\"data-loaded\")) resolveWithElement(el);\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(el, \"error\", (event) => reject(event), listenerOptions);\n\t\tuseEventListener(el, \"abort\", (event) => reject(event), listenerOptions);\n\t\tuseEventListener(el, \"load\", () => {\n\t\t\tel.setAttribute(\"data-loaded\", \"true\");\n\t\t\tonLoaded(el);\n\t\t\tresolveWithElement(el);\n\t\t}, listenerOptions);\n\t\tif (shouldAppend) el = document.head.appendChild(el);\n\t\tif (!waitForScriptLoad) resolveWithElement(el);\n\t});\n\t/**\n\t* Exposed singleton wrapper for `loadScript`, avoiding calling it twice.\n\t*\n\t* @param waitForScriptLoad Whether if the Promise should resolve once the \"load\" event is emitted by the <script> attribute, or right after appending it to the DOM.\n\t* @returns Promise<HTMLScriptElement>\n\t*/\n\tconst load = (waitForScriptLoad = true) => {\n\t\tif (!_promise) _promise = loadScript(waitForScriptLoad);\n\t\treturn _promise;\n\t};\n\t/**\n\t* Unload the script specified by `src`.\n\t*/\n\tconst unload = () => {\n\t\tif (!document) return;\n\t\t_promise = null;\n\t\tif (scriptTag.value) scriptTag.value = null;\n\t\tconst el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n\t\tif (el) document.head.removeChild(el);\n\t};\n\tif (immediate && !manual) tryOnMounted(load);\n\tif (!manual) tryOnUnmounted(unload);\n\treturn {\n\t\tscriptTag,\n\t\tload,\n\t\tunload\n\t};\n}\n//#endregion\n//#region useScrollLock/index.ts\nfunction checkOverflowScroll(ele) {\n\tconst style = window.getComputedStyle(ele);\n\tif (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) return true;\n\telse {\n\t\tconst parent = ele.parentNode;\n\t\tif (!parent || parent.tagName === \"BODY\") return false;\n\t\treturn checkOverflowScroll(parent);\n\t}\n}\nfunction preventDefault(rawEvent) {\n\tconst e = rawEvent || window.event;\n\tconst _target = e.target;\n\tif (checkOverflowScroll(_target)) return false;\n\tif (e.touches.length > 1) return true;\n\tif (e.preventDefault) e.preventDefault();\n\treturn false;\n}\nconst elInitialOverflow = /* @__PURE__ */ new WeakMap();\n/**\n* Lock scrolling of the element.\n*\n* @see https://vueuse.org/useScrollLock\n* @param element\n*/\nfunction useScrollLock(element, initialState = false) {\n\tconst isLocked = shallowRef(initialState);\n\tlet stopTouchMoveListener = null;\n\tlet initialOverflow = \"\";\n\twatch(toRef(element), (el) => {\n\t\tconst target = resolveElement(toValue(el));\n\t\tif (target) {\n\t\t\tconst ele = target;\n\t\t\tif (!elInitialOverflow.get(ele)) elInitialOverflow.set(ele, ele.style.overflow);\n\t\t\tif (ele.style.overflow !== \"hidden\") initialOverflow = ele.style.overflow;\n\t\t\tif (ele.style.overflow === \"hidden\") return isLocked.value = true;\n\t\t\tif (isLocked.value) return ele.style.overflow = \"hidden\";\n\t\t}\n\t}, { immediate: true });\n\tconst lock = () => {\n\t\tconst el = resolveElement(toValue(element));\n\t\tif (!el || isLocked.value) return;\n\t\tif (isIOS) stopTouchMoveListener = useEventListener(el, \"touchmove\", (e) => {\n\t\t\tpreventDefault(e);\n\t\t}, { passive: false });\n\t\tel.style.overflow = \"hidden\";\n\t\tisLocked.value = true;\n\t};\n\tconst unlock = () => {\n\t\tconst el = resolveElement(toValue(element));\n\t\tif (!el || !isLocked.value) return;\n\t\tif (isIOS) stopTouchMoveListener === null || stopTouchMoveListener === void 0 || stopTouchMoveListener();\n\t\tel.style.overflow = initialOverflow;\n\t\telInitialOverflow.delete(el);\n\t\tisLocked.value = false;\n\t};\n\ttryOnScopeDispose(unlock);\n\treturn computed({\n\t\tget() {\n\t\t\treturn isLocked.value;\n\t\t},\n\t\tset(v) {\n\t\t\tif (v) lock();\n\t\t\telse unlock();\n\t\t}\n\t});\n}\n//#endregion\n//#region useSessionStorage/index.ts\n/**\n* Reactive SessionStorage.\n*\n* @see https://vueuse.org/useSessionStorage\n* @param key\n* @param initialValue\n* @param options\n*/\nfunction useSessionStorage(key, initialValue, options = {}) {\n\tconst { window = defaultWindow } = options;\n\treturn useStorage(key, initialValue, window === null || window === void 0 ? void 0 : window.sessionStorage, options);\n}\n//#endregion\n//#region useShare/index.ts\n/**\n* Reactive Web Share API.\n*\n* @see https://vueuse.org/useShare\n* @param shareOptions\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useShare(shareOptions = {}, options = {}) {\n\tconst { navigator = defaultNavigator } = options;\n\tconst _navigator = navigator;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => _navigator && \"canShare\" in _navigator);\n\tconst share = async (overrideOptions = {}) => {\n\t\tif (isSupported.value) {\n\t\t\tconst data = {\n\t\t\t\t...toValue(shareOptions),\n\t\t\t\t...toValue(overrideOptions)\n\t\t\t};\n\t\t\tlet granted = false;\n\t\t\tif (_navigator.canShare) granted = _navigator.canShare(data);\n\t\t\tif (granted) return _navigator.share(data);\n\t\t}\n\t};\n\treturn {\n\t\tisSupported,\n\t\tshare\n\t};\n}\n//#endregion\n//#region useSorted/index.ts\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n\tconst [source] = args;\n\tlet compareFn = defaultCompare;\n\tlet options = {};\n\tif (args.length === 2) if (typeof args[1] === \"object\") {\n\t\tvar _options$compareFn;\n\t\toptions = args[1];\n\t\tcompareFn = (_options$compareFn = options.compareFn) !== null && _options$compareFn !== void 0 ? _options$compareFn : defaultCompare;\n\t} else {\n\t\tvar _args$;\n\t\tcompareFn = (_args$ = args[1]) !== null && _args$ !== void 0 ? _args$ : defaultCompare;\n\t}\n\telse if (args.length > 2) {\n\t\tvar _args$2, _args$3;\n\t\tcompareFn = (_args$2 = args[1]) !== null && _args$2 !== void 0 ? _args$2 : defaultCompare;\n\t\toptions = (_args$3 = args[2]) !== null && _args$3 !== void 0 ? _args$3 : {};\n\t}\n\tconst { dirty = false, sortFn = defaultSortFn } = options;\n\tif (!dirty) return computed(() => sortFn([...toValue(source)], compareFn));\n\twatchEffect(() => {\n\t\tconst result = sortFn(toValue(source), compareFn);\n\t\tif (isRef(source)) source.value = result;\n\t\telse source.splice(0, source.length, ...result);\n\t});\n\treturn source;\n}\n//#endregion\n//#region useSpeechRecognition/index.ts\n/**\n* Reactive SpeechRecognition.\n*\n* @see https://vueuse.org/useSpeechRecognition\n* @see https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition SpeechRecognition\n* @param options\n*/\nfunction useSpeechRecognition(options = {}) {\n\tconst { interimResults = true, continuous = true, maxAlternatives = 1, window = defaultWindow } = options;\n\tconst lang = toRef(options.lang || \"en-US\");\n\tconst isListening = shallowRef(false);\n\tconst isFinal = shallowRef(false);\n\tconst result = shallowRef(\"\");\n\tconst error = shallowRef(void 0);\n\tlet recognition;\n\tconst start = () => {\n\t\tisListening.value = true;\n\t};\n\tconst stop = () => {\n\t\tisListening.value = false;\n\t};\n\tconst toggle = (value = !isListening.value) => {\n\t\tif (value) start();\n\t\telse stop();\n\t};\n\tconst SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n\tconst isSupported = /* @__PURE__ */ useSupported(() => SpeechRecognition);\n\tif (isSupported.value) {\n\t\trecognition = new SpeechRecognition();\n\t\trecognition.continuous = continuous;\n\t\trecognition.interimResults = interimResults;\n\t\trecognition.lang = toValue(lang);\n\t\trecognition.maxAlternatives = maxAlternatives;\n\t\trecognition.onstart = () => {\n\t\t\tisListening.value = true;\n\t\t\tisFinal.value = false;\n\t\t};\n\t\twatch(lang, (lang) => {\n\t\t\tif (recognition && !isListening.value) recognition.lang = lang;\n\t\t});\n\t\trecognition.onresult = (event) => {\n\t\t\tconst currentResult = event.results[event.resultIndex];\n\t\t\tconst { transcript } = currentResult[0];\n\t\t\tisFinal.value = currentResult.isFinal;\n\t\t\tresult.value = transcript;\n\t\t\terror.value = void 0;\n\t\t};\n\t\trecognition.onerror = (event) => {\n\t\t\terror.value = event;\n\t\t};\n\t\trecognition.onend = () => {\n\t\t\tisListening.value = false;\n\t\t\trecognition.lang = toValue(lang);\n\t\t};\n\t\twatch(isListening, (newValue, oldValue) => {\n\t\t\tif (newValue === oldValue) return;\n\t\t\ttry {\n\t\t\t\tif (newValue) recognition.start();\n\t\t\t\telse recognition.stop();\n\t\t\t} catch (err) {\n\t\t\t\terror.value = err;\n\t\t\t}\n\t\t});\n\t}\n\ttryOnScopeDispose(() => {\n\t\tstop();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tisListening,\n\t\tisFinal,\n\t\trecognition,\n\t\tresult,\n\t\terror,\n\t\ttoggle,\n\t\tstart,\n\t\tstop\n\t};\n}\n//#endregion\n//#region useSpeechSynthesis/index.ts\n/**\n* Reactive SpeechSynthesis.\n*\n* @see https://vueuse.org/useSpeechSynthesis\n* @see https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis SpeechSynthesis\n*/\nfunction useSpeechSynthesis(text, options = {}) {\n\tconst { pitch = 1, rate = 1, volume = 1, window = defaultWindow, onBoundary } = options;\n\tconst synth = window && window.speechSynthesis;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => synth);\n\tconst isPlaying = shallowRef(false);\n\tconst status = shallowRef(\"init\");\n\tconst spokenText = toRef(text || \"\");\n\tconst lang = toRef(options.lang || \"en-US\");\n\tconst error = shallowRef(void 0);\n\tconst toggle = (value = !isPlaying.value) => {\n\t\tisPlaying.value = value;\n\t};\n\tconst bindEventsForUtterance = (utterance) => {\n\t\tutterance.lang = toValue(lang);\n\t\tutterance.voice = toValue(options.voice) || null;\n\t\tutterance.pitch = toValue(pitch);\n\t\tutterance.rate = toValue(rate);\n\t\tutterance.volume = toValue(volume);\n\t\tutterance.onstart = () => {\n\t\t\tisPlaying.value = true;\n\t\t\tstatus.value = \"play\";\n\t\t};\n\t\tutterance.onpause = () => {\n\t\t\tisPlaying.value = false;\n\t\t\tstatus.value = \"pause\";\n\t\t};\n\t\tutterance.onresume = () => {\n\t\t\tisPlaying.value = true;\n\t\t\tstatus.value = \"play\";\n\t\t};\n\t\tutterance.onend = () => {\n\t\t\tisPlaying.value = false;\n\t\t\tstatus.value = \"end\";\n\t\t};\n\t\tutterance.onerror = (event) => {\n\t\t\terror.value = event;\n\t\t};\n\t\tutterance.onboundary = (event) => {\n\t\t\tonBoundary === null || onBoundary === void 0 || onBoundary(event);\n\t\t};\n\t};\n\tconst utterance = computed(() => {\n\t\tisPlaying.value = false;\n\t\tstatus.value = \"init\";\n\t\tconst newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n\t\tbindEventsForUtterance(newUtterance);\n\t\treturn newUtterance;\n\t});\n\tconst speak = () => {\n\t\tsynth.cancel();\n\t\tif (utterance) synth.speak(utterance.value);\n\t};\n\tconst stop = () => {\n\t\tsynth.cancel();\n\t\tisPlaying.value = false;\n\t};\n\tif (isSupported.value) {\n\t\tbindEventsForUtterance(utterance.value);\n\t\twatch(lang, (lang) => {\n\t\t\tif (utterance.value && !isPlaying.value) utterance.value.lang = lang;\n\t\t});\n\t\tif (options.voice) watch(options.voice, () => {\n\t\t\tsynth.cancel();\n\t\t});\n\t\twatch(isPlaying, () => {\n\t\t\tif (isPlaying.value) synth.resume();\n\t\t\telse synth.pause();\n\t\t});\n\t}\n\ttryOnScopeDispose(() => {\n\t\tisPlaying.value = false;\n\t});\n\treturn {\n\t\tisSupported,\n\t\tisPlaying,\n\t\tstatus,\n\t\tutterance,\n\t\terror,\n\t\tstop,\n\t\ttoggle,\n\t\tspeak\n\t};\n}\n//#endregion\n//#region useStepper/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useStepper(steps, initialStep) {\n\tconst stepsRef = ref(steps);\n\tconst stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n\tconst index = ref(stepNames.value.indexOf(initialStep !== null && initialStep !== void 0 ? initialStep : stepNames.value[0]));\n\tconst current = computed(() => at(index.value));\n\tconst isFirst = computed(() => index.value === 0);\n\tconst isLast = computed(() => index.value === stepNames.value.length - 1);\n\tconst next = computed(() => stepNames.value[index.value + 1]);\n\tconst previous = computed(() => stepNames.value[index.value - 1]);\n\tfunction at(index) {\n\t\tif (Array.isArray(stepsRef.value)) return stepsRef.value[index];\n\t\treturn stepsRef.value[stepNames.value[index]];\n\t}\n\tfunction get(step) {\n\t\tif (!stepNames.value.includes(step)) return;\n\t\treturn at(stepNames.value.indexOf(step));\n\t}\n\tfunction goTo(step) {\n\t\tif (stepNames.value.includes(step)) index.value = stepNames.value.indexOf(step);\n\t}\n\tfunction goToNext() {\n\t\tif (isLast.value) return;\n\t\tindex.value++;\n\t}\n\tfunction goToPrevious() {\n\t\tif (isFirst.value) return;\n\t\tindex.value--;\n\t}\n\tfunction goBackTo(step) {\n\t\tif (isAfter(step)) goTo(step);\n\t}\n\tfunction isNext(step) {\n\t\treturn stepNames.value.indexOf(step) === index.value + 1;\n\t}\n\tfunction isPrevious(step) {\n\t\treturn stepNames.value.indexOf(step) === index.value - 1;\n\t}\n\tfunction isCurrent(step) {\n\t\treturn stepNames.value.indexOf(step) === index.value;\n\t}\n\tfunction isBefore(step) {\n\t\treturn index.value < stepNames.value.indexOf(step);\n\t}\n\tfunction isAfter(step) {\n\t\treturn index.value > stepNames.value.indexOf(step);\n\t}\n\treturn {\n\t\tsteps: stepsRef,\n\t\tstepNames,\n\t\tindex,\n\t\tcurrent,\n\t\tnext,\n\t\tprevious,\n\t\tisFirst,\n\t\tisLast,\n\t\tat,\n\t\tget,\n\t\tgoTo,\n\t\tgoToNext,\n\t\tgoToPrevious,\n\t\tgoBackTo,\n\t\tisNext,\n\t\tisPrevious,\n\t\tisCurrent,\n\t\tisBefore,\n\t\tisAfter\n\t};\n}\n//#endregion\n//#region useStorageAsync/index.ts\n/**\n* Reactive Storage with async support.\n*\n* @see https://vueuse.org/useStorageAsync\n* @param key\n* @param initialValue\n* @param storage\n* @param options\n*/\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n\tvar _options$serializer;\n\tconst { flush = \"pre\", deep = true, listenToStorageChanges = true, writeDefaults = true, mergeDefaults = false, shallow, window = defaultWindow, eventFilter, onError = (e) => {\n\t\tconsole.error(e);\n\t}, onReady } = options;\n\tconst rawInit = toValue(initialValue);\n\tconst type = guessSerializerType(rawInit);\n\tconst data = (shallow ? shallowRef : ref)(toValue(initialValue));\n\tconst serializer = (_options$serializer = options.serializer) !== null && _options$serializer !== void 0 ? _options$serializer : StorageSerializers[type];\n\tif (!storage) try {\n\t\tstorage = getSSRHandler(\"getDefaultStorageAsync\", () => defaultWindow === null || defaultWindow === void 0 ? void 0 : defaultWindow.localStorage)();\n\t} catch (e) {\n\t\tonError(e);\n\t}\n\tasync function read(event) {\n\t\tif (!storage || event && event.key !== key) return;\n\t\ttry {\n\t\t\tconst rawValue = event ? event.newValue : await storage.getItem(key);\n\t\t\tif (rawValue == null) {\n\t\t\t\tdata.value = rawInit;\n\t\t\t\tif (writeDefaults && rawInit !== null) await storage.setItem(key, await serializer.write(rawInit));\n\t\t\t} else if (mergeDefaults) {\n\t\t\t\tconst value = await serializer.read(rawValue);\n\t\t\t\tif (typeof mergeDefaults === \"function\") data.value = mergeDefaults(value, rawInit);\n\t\t\t\telse if (type === \"object\" && !Array.isArray(value)) data.value = {\n\t\t\t\t\t...rawInit,\n\t\t\t\t\t...value\n\t\t\t\t};\n\t\t\t\telse data.value = value;\n\t\t\t} else data.value = await serializer.read(rawValue);\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t}\n\tconst promise = new Promise((resolve) => {\n\t\tread().then(() => {\n\t\t\tonReady === null || onReady === void 0 || onReady(data.value);\n\t\t\tresolve(data);\n\t\t});\n\t});\n\tif (window && listenToStorageChanges) useEventListener(window, \"storage\", (e) => Promise.resolve().then(() => read(e)), { passive: true });\n\tif (storage) watchWithFilter(data, async () => {\n\t\ttry {\n\t\t\tif (data.value == null) await storage.removeItem(key);\n\t\t\telse await storage.setItem(key, await serializer.write(data.value));\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t}, {\n\t\tflush,\n\t\tdeep,\n\t\teventFilter\n\t});\n\tObject.assign(data, {\n\t\tthen: promise.then.bind(promise),\n\t\tcatch: promise.catch.bind(promise)\n\t});\n\treturn data;\n}\n//#endregion\n//#region useStyleTag/index.ts\nlet _id = 0;\n/**\n* Inject <style> element in head.\n*\n* Overload: Omitted id\n*\n* @see https://vueuse.org/useStyleTag\n* @param css\n* @param options\n*/\nfunction useStyleTag(css, options = {}) {\n\tconst isLoaded = shallowRef(false);\n\tconst { document = defaultDocument, immediate = true, manual = false, id = `vueuse_styletag_${++_id}` } = options;\n\tconst cssRef = shallowRef(css);\n\tlet stop = () => {};\n\tconst load = () => {\n\t\tif (!document) return;\n\t\tconst el = document.getElementById(id) || document.createElement(\"style\");\n\t\tif (!el.isConnected) {\n\t\t\tel.id = id;\n\t\t\tif (options.nonce) el.nonce = options.nonce;\n\t\t\tif (options.media) el.media = options.media;\n\t\t\tdocument.head.appendChild(el);\n\t\t}\n\t\tif (isLoaded.value) return;\n\t\tstop = watch(cssRef, (value) => {\n\t\t\tel.textContent = value;\n\t\t}, { immediate: true });\n\t\tisLoaded.value = true;\n\t};\n\tconst unload = () => {\n\t\tif (!document || !isLoaded.value) return;\n\t\tstop();\n\t\tdocument.head.removeChild(document.getElementById(id));\n\t\tisLoaded.value = false;\n\t};\n\tif (immediate && !manual) tryOnMounted(load);\n\tif (!manual) tryOnScopeDispose(unload);\n\treturn {\n\t\tid,\n\t\tcss: cssRef,\n\t\tunload,\n\t\tload,\n\t\tisLoaded: shallowReadonly(isLoaded)\n\t};\n}\n//#endregion\n//#region useSwipe/index.ts\n/**\n* Reactive swipe detection.\n*\n* @see https://vueuse.org/useSwipe\n* @param target\n* @param options\n*/\nfunction useSwipe(target, options = {}) {\n\tconst { threshold = 50, onSwipe, onSwipeEnd, onSwipeStart, passive = true } = options;\n\tconst coordsStart = reactive({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst coordsEnd = reactive({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst diffX = computed(() => coordsStart.x - coordsEnd.x);\n\tconst diffY = computed(() => coordsStart.y - coordsEnd.y);\n\tconst { max, abs } = Math;\n\tconst isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n\tconst isSwiping = shallowRef(false);\n\tconst direction = computed(() => {\n\t\tif (!isThresholdExceeded.value) return \"none\";\n\t\tif (abs(diffX.value) > abs(diffY.value)) return diffX.value > 0 ? \"left\" : \"right\";\n\t\telse return diffY.value > 0 ? \"up\" : \"down\";\n\t});\n\tconst getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n\tconst updateCoordsStart = (x, y) => {\n\t\tcoordsStart.x = x;\n\t\tcoordsStart.y = y;\n\t};\n\tconst updateCoordsEnd = (x, y) => {\n\t\tcoordsEnd.x = x;\n\t\tcoordsEnd.y = y;\n\t};\n\tconst listenerOptions = {\n\t\tpassive,\n\t\tcapture: !passive\n\t};\n\tconst onTouchEnd = (e) => {\n\t\tif (isSwiping.value) onSwipeEnd === null || onSwipeEnd === void 0 || onSwipeEnd(e, direction.value);\n\t\tisSwiping.value = false;\n\t};\n\tconst stops = [\n\t\tuseEventListener(target, \"touchstart\", (e) => {\n\t\t\tif (e.touches.length !== 1) return;\n\t\t\tconst [x, y] = getTouchEventCoords(e);\n\t\t\tupdateCoordsStart(x, y);\n\t\t\tupdateCoordsEnd(x, y);\n\t\t\tonSwipeStart === null || onSwipeStart === void 0 || onSwipeStart(e);\n\t\t}, listenerOptions),\n\t\tuseEventListener(target, \"touchmove\", (e) => {\n\t\t\tif (e.touches.length !== 1) return;\n\t\t\tconst [x, y] = getTouchEventCoords(e);\n\t\t\tupdateCoordsEnd(x, y);\n\t\t\tif (listenerOptions.capture && !listenerOptions.passive && Math.abs(diffX.value) > Math.abs(diffY.value)) e.preventDefault();\n\t\t\tif (!isSwiping.value && isThresholdExceeded.value) isSwiping.value = true;\n\t\t\tif (isSwiping.value) onSwipe === null || onSwipe === void 0 || onSwipe(e);\n\t\t}, listenerOptions),\n\t\tuseEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n\t];\n\tconst stop = () => stops.forEach((s) => s());\n\treturn {\n\t\tisSwiping,\n\t\tdirection,\n\t\tcoordsStart,\n\t\tcoordsEnd,\n\t\tlengthX: diffX,\n\t\tlengthY: diffY,\n\t\tstop\n\t};\n}\n//#endregion\n//#region useTemplateRefsList/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useTemplateRefsList() {\n\tconst refs = ref([]);\n\trefs.value.set = (el) => {\n\t\tif (el) refs.value.push(el);\n\t};\n\tonBeforeUpdate(() => {\n\t\trefs.value.length = 0;\n\t});\n\treturn refs;\n}\n//#endregion\n//#region useTextDirection/index.ts\n/**\n* Reactive dir of the element's text.\n*\n* @see https://vueuse.org/useTextDirection\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useTextDirection(options = {}) {\n\tconst { document = defaultDocument, selector = \"html\", observe = false, initialValue = \"ltr\" } = options;\n\tfunction getValue() {\n\t\tvar _ref, _document$querySelect;\n\t\treturn (_ref = document === null || document === void 0 || (_document$querySelect = document.querySelector(selector)) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.getAttribute(\"dir\")) !== null && _ref !== void 0 ? _ref : initialValue;\n\t}\n\tconst dir = shallowRef(getValue());\n\ttryOnMounted(() => dir.value = getValue());\n\tif (observe && document) useMutationObserver(document.querySelector(selector), () => dir.value = getValue(), { attributes: true });\n\treturn computed({\n\t\tget() {\n\t\t\treturn dir.value;\n\t\t},\n\t\tset(v) {\n\t\t\tvar _document$querySelect2, _document$querySelect3;\n\t\t\tdir.value = v;\n\t\t\tif (!document) return;\n\t\t\tif (dir.value) (_document$querySelect2 = document.querySelector(selector)) === null || _document$querySelect2 === void 0 || _document$querySelect2.setAttribute(\"dir\", dir.value);\n\t\t\telse (_document$querySelect3 = document.querySelector(selector)) === null || _document$querySelect3 === void 0 || _document$querySelect3.removeAttribute(\"dir\");\n\t\t}\n\t});\n}\n//#endregion\n//#region useTextSelection/index.ts\nfunction getRangesFromSelection(selection) {\n\tvar _selection$rangeCount;\n\tconst rangeCount = (_selection$rangeCount = selection.rangeCount) !== null && _selection$rangeCount !== void 0 ? _selection$rangeCount : 0;\n\treturn Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\n/**\n* Reactively track user text selection based on [`Window.getSelection`](https://developer.mozilla.org/en-US/docs/Web/API/Window/getSelection).\n*\n* @see https://vueuse.org/useTextSelection\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useTextSelection(options = {}) {\n\tvar _window$getSelection;\n\tconst { window = defaultWindow } = options;\n\tconst selection = shallowRef((_window$getSelection = window === null || window === void 0 ? void 0 : window.getSelection()) !== null && _window$getSelection !== void 0 ? _window$getSelection : null);\n\tconst text = computed(() => {\n\t\tvar _selection$value$toSt, _selection$value;\n\t\treturn (_selection$value$toSt = (_selection$value = selection.value) === null || _selection$value === void 0 ? void 0 : _selection$value.toString()) !== null && _selection$value$toSt !== void 0 ? _selection$value$toSt : \"\";\n\t});\n\tconst ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n\tconst rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n\tfunction onSelectionChange() {\n\t\tselection.value = null;\n\t\tif (window) selection.value = window.getSelection();\n\t}\n\tif (window) useEventListener(window.document, \"selectionchange\", onSelectionChange, { passive: true });\n\treturn {\n\t\ttext,\n\t\trects,\n\t\tranges,\n\t\tselection\n\t};\n}\n//#endregion\n//#region useTextareaAutosize/index.ts\n/**\n* Call window.requestAnimationFrame(), if not available, just call the function\n*\n* @param window\n* @param fn\n*/\nfunction tryRequestAnimationFrame(window = defaultWindow, fn) {\n\tif (window && typeof window.requestAnimationFrame === \"function\") window.requestAnimationFrame(fn);\n\telse fn();\n}\nfunction useTextareaAutosize(options = {}) {\n\tvar _options$input, _options$styleProp;\n\tconst { window = defaultWindow } = options;\n\tconst textarea = toRef(options === null || options === void 0 ? void 0 : options.element);\n\tconst input = toRef((_options$input = options === null || options === void 0 ? void 0 : options.input) !== null && _options$input !== void 0 ? _options$input : \"\");\n\tconst styleProp = (_options$styleProp = options === null || options === void 0 ? void 0 : options.styleProp) !== null && _options$styleProp !== void 0 ? _options$styleProp : \"height\";\n\tconst textareaScrollHeight = shallowRef(1);\n\tconst textareaOldWidth = shallowRef(0);\n\tfunction triggerResize() {\n\t\tvar _textarea$value;\n\t\tif (!textarea.value) return;\n\t\tlet height = \"\";\n\t\tconst maxHeight = options === null || options === void 0 ? void 0 : options.maxHeight;\n\t\ttextarea.value.style[styleProp] = \"1px\";\n\t\ttextareaScrollHeight.value = (_textarea$value = textarea.value) === null || _textarea$value === void 0 ? void 0 : _textarea$value.scrollHeight;\n\t\tconst _styleTarget = toValue(options === null || options === void 0 ? void 0 : options.styleTarget);\n\t\tconst styleHeight = maxHeight != null ? `${Math.min(textareaScrollHeight.value, maxHeight)}px` : `${textareaScrollHeight.value}px`;\n\t\tif (_styleTarget) _styleTarget.style[styleProp] = styleHeight;\n\t\telse height = styleHeight;\n\t\ttextarea.value.style[styleProp] = height;\n\t}\n\twatch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n\twatch(textareaScrollHeight, () => {\n\t\tvar _options$onResize;\n\t\treturn options === null || options === void 0 || (_options$onResize = options.onResize) === null || _options$onResize === void 0 ? void 0 : _options$onResize.call(options);\n\t});\n\tuseResizeObserver(textarea, ([{ contentRect }]) => {\n\t\tif (textareaOldWidth.value === contentRect.width) return;\n\t\ttryRequestAnimationFrame(window, () => {\n\t\t\ttextareaOldWidth.value = contentRect.width;\n\t\t\ttriggerResize();\n\t\t});\n\t});\n\tif (options === null || options === void 0 ? void 0 : options.watch) watch(options.watch, triggerResize, {\n\t\timmediate: true,\n\t\tdeep: true\n\t});\n\treturn {\n\t\ttextarea,\n\t\tinput,\n\t\ttriggerResize\n\t};\n}\n//#endregion\n//#region useThrottledRefHistory/index.ts\n/**\n* Shorthand for [useRefHistory](https://vueuse.org/useRefHistory) with throttled filter.\n*\n* @see https://vueuse.org/useThrottledRefHistory\n* @param source\n* @param options\n*/\nfunction useThrottledRefHistory(source, options = {}) {\n\tconst { throttle = 200, trailing = true } = options;\n\tconst filter = throttleFilter(throttle, trailing);\n\treturn { ...useRefHistory(source, {\n\t\t...options,\n\t\teventFilter: filter\n\t}) };\n}\n//#endregion\n//#region useTimeAgo/index.ts\nconst DEFAULT_UNITS = [\n\t{\n\t\tmax: 6e4,\n\t\tvalue: 1e3,\n\t\tname: \"second\"\n\t},\n\t{\n\t\tmax: 276e4,\n\t\tvalue: 6e4,\n\t\tname: \"minute\"\n\t},\n\t{\n\t\tmax: 72e6,\n\t\tvalue: 36e5,\n\t\tname: \"hour\"\n\t},\n\t{\n\t\tmax: 5184e5,\n\t\tvalue: 864e5,\n\t\tname: \"day\"\n\t},\n\t{\n\t\tmax: 24192e5,\n\t\tvalue: 6048e5,\n\t\tname: \"week\"\n\t},\n\t{\n\t\tmax: 28512e6,\n\t\tvalue: 2592e6,\n\t\tname: \"month\"\n\t},\n\t{\n\t\tmax: Number.POSITIVE_INFINITY,\n\t\tvalue: 31536e6,\n\t\tname: \"year\"\n\t}\n];\nconst DEFAULT_MESSAGES = {\n\tjustNow: \"just now\",\n\tpast: (n) => /\\d/.test(n) ? `${n} ago` : n,\n\tfuture: (n) => /\\d/.test(n) ? `in ${n}` : n,\n\tmonth: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n\tyear: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n\tday: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n\tweek: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n\thour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n\tminute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n\tsecond: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n\tinvalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n\treturn date.toISOString().slice(0, 10);\n}\nfunction getDefaultScheduler$4(options) {\n\tif (\"updateInterval\" in options) {\n\t\tconst { updateInterval = 3e4 } = options;\n\t\treturn (cb) => useIntervalFn(cb, updateInterval);\n\t}\n\treturn (cb) => useIntervalFn(cb, 3e4);\n}\n/**\n* Reactive time ago formatter.\n*\n* @see https://vueuse.org/useTimeAgo\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useTimeAgo(time, options = {}) {\n\tconst { controls: exposeControls = false, scheduler = getDefaultScheduler$4(options) } = options;\n\tconst { now, ...controls } = useNow({\n\t\tscheduler,\n\t\tcontrols: true\n\t});\n\tconst timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n\tif (exposeControls) return {\n\t\ttimeAgo,\n\t\t...controls\n\t};\n\telse return timeAgo;\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n\tconst { max, messages = DEFAULT_MESSAGES, fullDateFormatter = DEFAULT_FORMATTER, units = DEFAULT_UNITS, showSecond = false, rounding = \"round\" } = options;\n\tconst roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n\tconst diff = +now - +from;\n\tconst absDiff = Math.abs(diff);\n\tfunction getValue(diff, unit) {\n\t\treturn roundFn(Math.abs(diff) / unit.value);\n\t}\n\tfunction format(diff, unit) {\n\t\tconst val = getValue(diff, unit);\n\t\tconst past = diff > 0;\n\t\tconst str = applyFormat(unit.name, val, past);\n\t\treturn applyFormat(past ? \"past\" : \"future\", str, past);\n\t}\n\tfunction applyFormat(name, val, isPast) {\n\t\tconst formatter = messages[name];\n\t\tif (typeof formatter === \"function\") return formatter(val, isPast);\n\t\treturn formatter.replace(\"{0}\", val.toString());\n\t}\n\tif (absDiff < 6e4 && !showSecond) return messages.justNow;\n\tif (typeof max === \"number\" && absDiff > max) return fullDateFormatter(new Date(from));\n\tif (typeof max === \"string\") {\n\t\tvar _units$find;\n\t\tconst unitMax = (_units$find = units.find((i) => i.name === max)) === null || _units$find === void 0 ? void 0 : _units$find.max;\n\t\tif (unitMax && absDiff > unitMax) return fullDateFormatter(new Date(from));\n\t}\n\tfor (const [idx, unit] of units.entries()) {\n\t\tif (getValue(diff, unit) <= 0 && units[idx - 1]) return format(diff, units[idx - 1]);\n\t\tif (absDiff < unit.max) return format(diff, unit);\n\t}\n\treturn messages.invalid;\n}\n//#endregion\n//#region useTimeAgoIntl/index.ts\nconst UNITS = [\n\t{\n\t\tname: \"year\",\n\t\tms: 31536e6\n\t},\n\t{\n\t\tname: \"month\",\n\t\tms: 2592e6\n\t},\n\t{\n\t\tname: \"week\",\n\t\tms: 6048e5\n\t},\n\t{\n\t\tname: \"day\",\n\t\tms: 864e5\n\t},\n\t{\n\t\tname: \"hour\",\n\t\tms: 36e5\n\t},\n\t{\n\t\tname: \"minute\",\n\t\tms: 6e4\n\t},\n\t{\n\t\tname: \"second\",\n\t\tms: 1e3\n\t}\n];\nfunction getDefaultScheduler$3(options) {\n\tif (\"updateInterval\" in options) {\n\t\tconst { updateInterval = 3e4 } = options;\n\t\treturn (cb) => useIntervalFn(cb, updateInterval);\n\t}\n\treturn (cb) => useIntervalFn(cb, 3e4);\n}\nfunction useTimeAgoIntl(time, options = {}) {\n\tconst { controls: exposeControls = false, scheduler = getDefaultScheduler$3(options) } = options;\n\tconst { now, ...controls } = useNow({\n\t\tscheduler,\n\t\tcontrols: true\n\t});\n\tconst result = computed(() => getTimeAgoIntlResult(new Date(toValue(time)), options, toValue(now)));\n\tconst parts = computed(() => result.value.parts);\n\tconst timeAgoIntl = computed(() => formatTimeAgoIntlParts(parts.value, {\n\t\t...options,\n\t\tlocale: result.value.resolvedLocale\n\t}));\n\treturn exposeControls ? {\n\t\ttimeAgoIntl,\n\t\tparts,\n\t\t...controls\n\t} : timeAgoIntl;\n}\n/**\n* Non-reactive version of useTimeAgoIntl\n*/\nfunction formatTimeAgoIntl(from, options = {}, now = Date.now()) {\n\tconst { parts, resolvedLocale } = getTimeAgoIntlResult(from, options, now);\n\treturn formatTimeAgoIntlParts(parts, {\n\t\t...options,\n\t\tlocale: resolvedLocale\n\t});\n}\n/**\n* Get parts from `Intl.RelativeTimeFormat.formatToParts`.\n*/\nfunction getTimeAgoIntlResult(from, options = {}, now = Date.now()) {\n\tvar _options$units;\n\tconst { locale, relativeTimeFormatOptions = { numeric: \"auto\" } } = options;\n\tconst rtf = new Intl.RelativeTimeFormat(locale, relativeTimeFormatOptions);\n\tconst { locale: resolvedLocale } = rtf.resolvedOptions();\n\tconst diff = +from - +now;\n\tconst absDiff = Math.abs(diff);\n\tconst units = (_options$units = options.units) !== null && _options$units !== void 0 ? _options$units : UNITS;\n\tfor (const { name, ms } of units) if (absDiff >= ms) return {\n\t\tresolvedLocale,\n\t\tparts: rtf.formatToParts(Math.round(diff / ms), name)\n\t};\n\treturn {\n\t\tresolvedLocale,\n\t\tparts: rtf.formatToParts(0, units[units.length - 1].name)\n\t};\n}\n/**\n* Format parts into a string\n*/\nfunction formatTimeAgoIntlParts(parts, options = {}) {\n\tconst { insertSpace = true, joinParts, locale } = options;\n\tif (typeof joinParts === \"function\") return joinParts(parts, locale);\n\tif (!insertSpace) return parts.map((part) => part.value).join(\"\");\n\treturn parts.map((part) => part.value.trim()).join(\" \");\n}\n//#endregion\n//#region useTimeoutPoll/index.ts\nfunction useTimeoutPoll(fn, interval, options = {}) {\n\tconst { immediate = true, immediateCallback = false } = options;\n\tconst { start } = useTimeoutFn(loop, interval, { immediate });\n\tconst isActive = shallowRef(false);\n\tasync function loop() {\n\t\tif (!isActive.value) return;\n\t\tawait fn();\n\t\tstart();\n\t}\n\tfunction resume() {\n\t\tif (!isActive.value) {\n\t\t\tisActive.value = true;\n\t\t\tif (immediateCallback) fn();\n\t\t\tstart();\n\t\t}\n\t}\n\tfunction pause() {\n\t\tisActive.value = false;\n\t}\n\tif (immediate && isClient) resume();\n\ttryOnScopeDispose(pause);\n\treturn {\n\t\tisActive,\n\t\tpause,\n\t\tresume\n\t};\n}\n//#endregion\n//#region useTimestamp/index.ts\nfunction getDefaultScheduler$2(options) {\n\tif (\"interval\" in options || \"immediate\" in options) {\n\t\tconst { interval = \"requestAnimationFrame\", immediate = true } = options;\n\t\treturn interval === \"requestAnimationFrame\" ? (cb) => useRafFn(cb, { immediate }) : (cb) => useIntervalFn(cb, interval, { immediate });\n\t}\n\treturn useRafFn;\n}\nfunction useTimestamp(options = {}) {\n\tconst { controls: exposeControls = false, offset = 0, scheduler = getDefaultScheduler$2(options), callback } = options;\n\tconst ts = shallowRef(timestamp() + offset);\n\tconst update = () => ts.value = timestamp() + offset;\n\tconst controls = scheduler(callback ? () => {\n\t\tupdate();\n\t\tcallback(ts.value);\n\t} : update);\n\tif (exposeControls) return {\n\t\ttimestamp: ts,\n\t\t...controls\n\t};\n\telse return ts;\n}\n//#endregion\n//#region useTitle/index.ts\nfunction useTitle(newTitle = null, options = {}) {\n\tvar _document$title, _ref;\n\tconst { document = defaultDocument, restoreOnUnmount = (t) => t } = options;\n\tconst originalTitle = (_document$title = document === null || document === void 0 ? void 0 : document.title) !== null && _document$title !== void 0 ? _document$title : \"\";\n\tconst title = toRef((_ref = newTitle !== null && newTitle !== void 0 ? newTitle : document === null || document === void 0 ? void 0 : document.title) !== null && _ref !== void 0 ? _ref : null);\n\tconst isReadonly = !!(newTitle && typeof newTitle === \"function\");\n\tfunction format(t) {\n\t\tif (!(\"titleTemplate\" in options)) return t;\n\t\tconst template = options.titleTemplate || \"%s\";\n\t\treturn typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n\t}\n\twatch(title, (newValue, oldValue) => {\n\t\tif (newValue !== oldValue && document) document.title = format(newValue !== null && newValue !== void 0 ? newValue : \"\");\n\t}, { immediate: true });\n\tif (options.observe && !options.titleTemplate && document && !isReadonly) {\n\t\tvar _document$head;\n\t\tuseMutationObserver((_document$head = document.head) === null || _document$head === void 0 ? void 0 : _document$head.querySelector(\"title\"), () => {\n\t\t\tif (document && document.title !== title.value) title.value = format(document.title);\n\t\t}, { childList: true });\n\t}\n\ttryOnScopeDispose(() => {\n\t\tif (restoreOnUnmount) {\n\t\t\tconst restoredTitle = restoreOnUnmount(originalTitle, title.value || \"\");\n\t\t\tif (restoredTitle != null && document) document.title = restoredTitle;\n\t\t}\n\t});\n\treturn title;\n}\n/**\n* Common transitions\n*\n* @see https://easings.net\n*/\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, {\n\teaseInSine: [\n\t\t.12,\n\t\t0,\n\t\t.39,\n\t\t0\n\t],\n\teaseOutSine: [\n\t\t.61,\n\t\t1,\n\t\t.88,\n\t\t1\n\t],\n\teaseInOutSine: [\n\t\t.37,\n\t\t0,\n\t\t.63,\n\t\t1\n\t],\n\teaseInQuad: [\n\t\t.11,\n\t\t0,\n\t\t.5,\n\t\t0\n\t],\n\teaseOutQuad: [\n\t\t.5,\n\t\t1,\n\t\t.89,\n\t\t1\n\t],\n\teaseInOutQuad: [\n\t\t.45,\n\t\t0,\n\t\t.55,\n\t\t1\n\t],\n\teaseInCubic: [\n\t\t.32,\n\t\t0,\n\t\t.67,\n\t\t0\n\t],\n\teaseOutCubic: [\n\t\t.33,\n\t\t1,\n\t\t.68,\n\t\t1\n\t],\n\teaseInOutCubic: [\n\t\t.65,\n\t\t0,\n\t\t.35,\n\t\t1\n\t],\n\teaseInQuart: [\n\t\t.5,\n\t\t0,\n\t\t.75,\n\t\t0\n\t],\n\teaseOutQuart: [\n\t\t.25,\n\t\t1,\n\t\t.5,\n\t\t1\n\t],\n\teaseInOutQuart: [\n\t\t.76,\n\t\t0,\n\t\t.24,\n\t\t1\n\t],\n\teaseInQuint: [\n\t\t.64,\n\t\t0,\n\t\t.78,\n\t\t0\n\t],\n\teaseOutQuint: [\n\t\t.22,\n\t\t1,\n\t\t.36,\n\t\t1\n\t],\n\teaseInOutQuint: [\n\t\t.83,\n\t\t0,\n\t\t.17,\n\t\t1\n\t],\n\teaseInExpo: [\n\t\t.7,\n\t\t0,\n\t\t.84,\n\t\t0\n\t],\n\teaseOutExpo: [\n\t\t.16,\n\t\t1,\n\t\t.3,\n\t\t1\n\t],\n\teaseInOutExpo: [\n\t\t.87,\n\t\t0,\n\t\t.13,\n\t\t1\n\t],\n\teaseInCirc: [\n\t\t.55,\n\t\t0,\n\t\t1,\n\t\t.45\n\t],\n\teaseOutCirc: [\n\t\t0,\n\t\t.55,\n\t\t.45,\n\t\t1\n\t],\n\teaseInOutCirc: [\n\t\t.85,\n\t\t0,\n\t\t.15,\n\t\t1\n\t],\n\teaseInBack: [\n\t\t.36,\n\t\t0,\n\t\t.66,\n\t\t-.56\n\t],\n\teaseOutBack: [\n\t\t.34,\n\t\t1.56,\n\t\t.64,\n\t\t1\n\t],\n\teaseInOutBack: [\n\t\t.68,\n\t\t-.6,\n\t\t.32,\n\t\t1.6\n\t]\n});\n/**\n* Create an easing function from cubic bezier points.\n*/\nfunction createEasingFunction([p0, p1, p2, p3]) {\n\tconst a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n\tconst b = (a1, a2) => 3 * a2 - 6 * a1;\n\tconst c = (a1) => 3 * a1;\n\tconst calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n\tconst getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n\tconst getTforX = (x) => {\n\t\tlet aGuessT = x;\n\t\tfor (let i = 0; i < 4; ++i) {\n\t\t\tconst currentSlope = getSlope(aGuessT, p0, p2);\n\t\t\tif (currentSlope === 0) return aGuessT;\n\t\t\tconst currentX = calcBezier(aGuessT, p0, p2) - x;\n\t\t\taGuessT -= currentX / currentSlope;\n\t\t}\n\t\treturn aGuessT;\n\t};\n\treturn (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n\treturn a + alpha * (b - a);\n}\nfunction defaultInterpolation(a, b, t) {\n\tconst aVal = toValue(a);\n\tconst bVal = toValue(b);\n\tif (typeof aVal === \"number\" && typeof bVal === \"number\") return lerp(aVal, bVal, t);\n\tif (Array.isArray(aVal) && Array.isArray(bVal)) return aVal.map((v, i) => lerp(v, toValue(bVal[i]), t));\n\tthrow new TypeError(\"Unknown transition type, specify an interpolation function.\");\n}\nfunction normalizeEasing(easing) {\n\tvar _toValue;\n\treturn typeof easing === \"function\" ? easing : (_toValue = toValue(easing)) !== null && _toValue !== void 0 ? _toValue : identity;\n}\n/**\n* Transition from one value to another.\n*\n* @param source\n* @param from\n* @param to\n* @param options\n*/\nfunction transition(source, from, to, options = {}) {\n\tvar _toValue2;\n\tconst { window = defaultWindow } = options;\n\tconst fromVal = toValue(from);\n\tconst toVal = toValue(to);\n\tconst duration = (_toValue2 = toValue(options.duration)) !== null && _toValue2 !== void 0 ? _toValue2 : 1e3;\n\tconst startedAt = Date.now();\n\tconst endAt = Date.now() + duration;\n\tconst interpolation = typeof options.interpolation === \"function\" ? options.interpolation : defaultInterpolation;\n\tconst trans = typeof options.easing !== \"undefined\" ? normalizeEasing(options.easing) : normalizeEasing(options.transition);\n\tconst ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n\treturn new Promise((resolve) => {\n\t\tsource.value = fromVal;\n\t\tconst tick = () => {\n\t\t\tvar _options$abort;\n\t\t\tif ((_options$abort = options.abort) === null || _options$abort === void 0 ? void 0 : _options$abort.call(options)) {\n\t\t\t\tresolve();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst now = Date.now();\n\t\t\tsource.value = interpolation(fromVal, toVal, ease((now - startedAt) / duration));\n\t\t\tif (now < endAt) window === null || window === void 0 || window.requestAnimationFrame(tick);\n\t\t\telse {\n\t\t\t\tsource.value = toVal;\n\t\t\t\tresolve();\n\t\t\t}\n\t\t};\n\t\ttick();\n\t});\n}\n/**\n* Transition from one value to another.\n* @deprecated The `executeTransition` function is deprecated, use `transition` instead.\n*\n* @param source\n* @param from\n* @param to\n* @param options\n*/\nfunction executeTransition(source, from, to, options = {}) {\n\treturn transition(source, from, to, options);\n}\n/**\n* Follow value with a transition.\n*\n* @see https://vueuse.org/useTransition\n* @param source\n* @param options\n*/\nfunction useTransition(source, options = {}) {\n\tlet currentId = 0;\n\tconst sourceVal = () => {\n\t\tconst v = toValue(source);\n\t\treturn typeof options.interpolation === \"undefined\" && Array.isArray(v) ? v.map(toValue) : v;\n\t};\n\tconst outputRef = shallowRef(sourceVal());\n\twatch(sourceVal, async (to) => {\n\t\tvar _options$onStarted, _options$onFinished;\n\t\tif (toValue(options.disabled)) return;\n\t\tconst id = ++currentId;\n\t\tif (options.delay) await promiseTimeout(toValue(options.delay));\n\t\tif (id !== currentId) return;\n\t\t(_options$onStarted = options.onStarted) === null || _options$onStarted === void 0 || _options$onStarted.call(options);\n\t\tawait transition(outputRef, outputRef.value, to, {\n\t\t\t...options,\n\t\t\tabort: () => {\n\t\t\t\tvar _options$abort2;\n\t\t\t\treturn id !== currentId || ((_options$abort2 = options.abort) === null || _options$abort2 === void 0 ? void 0 : _options$abort2.call(options));\n\t\t\t}\n\t\t});\n\t\t(_options$onFinished = options.onFinished) === null || _options$onFinished === void 0 || _options$onFinished.call(options);\n\t}, { deep: true });\n\twatch(() => toValue(options.disabled), (disabled) => {\n\t\tif (disabled) {\n\t\t\tcurrentId++;\n\t\t\toutputRef.value = sourceVal();\n\t\t}\n\t});\n\ttryOnScopeDispose(() => {\n\t\tcurrentId++;\n\t});\n\treturn computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n//#endregion\n//#region useUrlSearchParams/index.ts\n/**\n* Reactive URLSearchParams\n*\n* @see https://vueuse.org/useUrlSearchParams\n* @param mode\n* @param options\n*/\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n\tconst { initialValue = {}, removeNullishValues = true, removeFalsyValues = false, write: enableWrite = true, writeMode = \"replace\", window = defaultWindow, stringify = (params) => params.toString() } = options;\n\tif (!window) return reactive(initialValue);\n\tconst state = reactive({});\n\tfunction getRawParams() {\n\t\tif (mode === \"history\") return window.location.search || \"\";\n\t\telse if (mode === \"hash\") {\n\t\t\tconst hash = window.location.hash || \"\";\n\t\t\tconst index = hash.indexOf(\"?\");\n\t\t\treturn index > 0 ? hash.slice(index) : \"\";\n\t\t} else return (window.location.hash || \"\").replace(/^#/, \"\");\n\t}\n\tfunction constructQuery(params) {\n\t\tconst stringified = stringify(params);\n\t\tif (mode === \"history\") return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n\t\tif (mode === \"hash-params\") return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n\t\tconst hash = window.location.hash || \"#\";\n\t\tconst index = hash.indexOf(\"?\");\n\t\tif (index > 0) return `${window.location.search || \"\"}${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n\t\treturn `${window.location.search || \"\"}${hash}${stringified ? `?${stringified}` : \"\"}`;\n\t}\n\tfunction read() {\n\t\treturn new URLSearchParams(getRawParams());\n\t}\n\tfunction updateState(params) {\n\t\tconst unusedKeys = new Set(Object.keys(state));\n\t\tfor (const key of params.keys()) {\n\t\t\tconst paramsForKey = params.getAll(key);\n\t\t\tstate[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n\t\t\tunusedKeys.delete(key);\n\t\t}\n\t\tArray.from(unusedKeys).forEach((key) => delete state[key]);\n\t}\n\tconst { pause, resume } = watchPausable(state, () => {\n\t\tconst params = new URLSearchParams(\"\");\n\t\tObject.keys(state).forEach((key) => {\n\t\t\tconst mapEntry = state[key];\n\t\t\tif (Array.isArray(mapEntry)) mapEntry.forEach((value) => params.append(key, value));\n\t\t\telse if (removeNullishValues && mapEntry == null) params.delete(key);\n\t\t\telse if (removeFalsyValues && !mapEntry) params.delete(key);\n\t\t\telse params.set(key, mapEntry);\n\t\t});\n\t\twrite(params, false);\n\t}, { deep: true });\n\tfunction write(params, shouldUpdate, shouldWriteHistory = true) {\n\t\tpause();\n\t\tif (shouldUpdate) updateState(params);\n\t\tif (writeMode === \"replace\") window.history.replaceState(window.history.state, window.document.title, window.location.pathname + constructQuery(params));\n\t\telse if (shouldWriteHistory) window.history.pushState(window.history.state, window.document.title, window.location.pathname + constructQuery(params));\n\t\tnextTick(() => resume());\n\t}\n\tfunction onChanged() {\n\t\tif (!enableWrite) return;\n\t\twrite(read(), true, false);\n\t}\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(window, \"popstate\", onChanged, listenerOptions);\n\tif (mode !== \"history\") useEventListener(window, \"hashchange\", onChanged, listenerOptions);\n\tconst initial = read();\n\tif (initial.keys().next().value) updateState(initial);\n\telse Object.assign(state, initialValue);\n\treturn state;\n}\n//#endregion\n//#region useUserMedia/index.ts\n/**\n* Reactive `mediaDevices.getUserMedia` streaming\n*\n* @see https://vueuse.org/useUserMedia\n* @param options\n*/\nfunction useUserMedia(options = {}) {\n\tvar _options$enabled, _options$autoSwitch;\n\tconst enabled = shallowRef((_options$enabled = options.enabled) !== null && _options$enabled !== void 0 ? _options$enabled : false);\n\tconst autoSwitch = shallowRef((_options$autoSwitch = options.autoSwitch) !== null && _options$autoSwitch !== void 0 ? _options$autoSwitch : true);\n\tconst constraints = ref(options.constraints);\n\tconst { navigator = defaultNavigator } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => {\n\t\tvar _navigator$mediaDevic;\n\t\treturn navigator === null || navigator === void 0 || (_navigator$mediaDevic = navigator.mediaDevices) === null || _navigator$mediaDevic === void 0 ? void 0 : _navigator$mediaDevic.getUserMedia;\n\t});\n\tconst stream = shallowRef();\n\tfunction getDeviceOptions(type) {\n\t\tswitch (type) {\n\t\t\tcase \"video\":\n\t\t\t\tif (constraints.value) return constraints.value.video || false;\n\t\t\t\tbreak;\n\t\t\tcase \"audio\":\n\t\t\t\tif (constraints.value) return constraints.value.audio || false;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tasync function _start() {\n\t\tif (!isSupported.value || stream.value) return;\n\t\tstream.value = await navigator.mediaDevices.getUserMedia({\n\t\t\tvideo: getDeviceOptions(\"video\"),\n\t\t\taudio: getDeviceOptions(\"audio\")\n\t\t});\n\t\treturn stream.value;\n\t}\n\tfunction _stop() {\n\t\tvar _stream$value;\n\t\t(_stream$value = stream.value) === null || _stream$value === void 0 || _stream$value.getTracks().forEach((t) => t.stop());\n\t\tstream.value = void 0;\n\t}\n\tfunction stop() {\n\t\t_stop();\n\t\tenabled.value = false;\n\t}\n\tasync function start() {\n\t\tawait _start();\n\t\tif (stream.value) enabled.value = true;\n\t\treturn stream.value;\n\t}\n\tasync function restart() {\n\t\t_stop();\n\t\treturn await start();\n\t}\n\twatch(enabled, (v) => {\n\t\tif (v) _start();\n\t\telse _stop();\n\t}, { immediate: true });\n\twatch(constraints, () => {\n\t\tif (autoSwitch.value && stream.value) restart();\n\t}, {\n\t\timmediate: true,\n\t\tdeep: true\n\t});\n\ttryOnScopeDispose(() => {\n\t\tstop();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tstream,\n\t\tstart,\n\t\tstop,\n\t\trestart,\n\t\tconstraints,\n\t\tenabled,\n\t\tautoSwitch\n\t};\n}\n//#endregion\n//#region useVModel/index.ts\n/**\n* Shorthand for v-model binding, props + emit -> ref\n*\n* @see https://vueuse.org/useVModel\n* @param props\n* @param key (default 'modelValue')\n* @param emit\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useVModel(props, key, emit, options = {}) {\n\tvar _vm$$emit, _vm$proxy;\n\tconst { clone = false, passive = false, eventName, deep = false, defaultValue, shouldEmit } = options;\n\tconst vm = getCurrentInstance();\n\tconst _emit = emit || (vm === null || vm === void 0 ? void 0 : vm.emit) || (vm === null || vm === void 0 || (_vm$$emit = vm.$emit) === null || _vm$$emit === void 0 ? void 0 : _vm$$emit.bind(vm)) || (vm === null || vm === void 0 || (_vm$proxy = vm.proxy) === null || _vm$proxy === void 0 || (_vm$proxy = _vm$proxy.$emit) === null || _vm$proxy === void 0 ? void 0 : _vm$proxy.bind(vm === null || vm === void 0 ? void 0 : vm.proxy));\n\tlet event = eventName;\n\tif (!key) key = \"modelValue\";\n\tevent = event || `update:${key.toString()}`;\n\tconst cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n\tconst getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n\tconst triggerEmit = (value) => {\n\t\tif (shouldEmit) {\n\t\t\tif (shouldEmit(value)) _emit(event, value);\n\t\t} else _emit(event, value);\n\t};\n\tif (passive) {\n\t\tconst proxy = ref(getValue());\n\t\tlet isUpdating = false;\n\t\twatch(() => props[key], (v) => {\n\t\t\tif (!isUpdating) {\n\t\t\t\tisUpdating = true;\n\t\t\t\tproxy.value = cloneFn(v);\n\t\t\t\tnextTick(() => isUpdating = false);\n\t\t\t}\n\t\t});\n\t\twatch(proxy, (v) => {\n\t\t\tif (!isUpdating && (v !== props[key] || deep)) triggerEmit(v);\n\t\t}, { deep });\n\t\treturn proxy;\n\t} else return computed({\n\t\tget() {\n\t\t\treturn getValue();\n\t\t},\n\t\tset(value) {\n\t\t\ttriggerEmit(value);\n\t\t}\n\t});\n}\n//#endregion\n//#region useVModels/index.ts\n/**\n* Shorthand for props v-model binding. Think like `toRefs(props)` but changes will also emit out.\n*\n* @see https://vueuse.org/useVModels\n* @param props\n* @param emit\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useVModels(props, emit, options = {}) {\n\tconst ret = {};\n\tfor (const key in props) ret[key] = useVModel(props, key, emit, options);\n\treturn ret;\n}\n//#endregion\n//#region useVibrate/index.ts\nfunction getDefaultScheduler$1(options = { interval: 0 }) {\n\tconst { interval } = options;\n\tif (interval === 0) return;\n\treturn (fn) => useIntervalFn(fn, interval, {\n\t\timmediate: false,\n\t\timmediateCallback: false\n\t});\n}\n/**\n* Reactive vibrate\n*\n* @see https://vueuse.org/useVibrate\n* @see https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useVibrate(options) {\n\tconst { pattern = [], scheduler = getDefaultScheduler$1(options), navigator = defaultNavigator } = options || {};\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n\tconst patternRef = toRef(pattern);\n\tconst vibrate = (pattern = patternRef.value) => {\n\t\tif (isSupported.value) navigator.vibrate(pattern);\n\t};\n\tconst intervalControls = scheduler === null || scheduler === void 0 ? void 0 : scheduler(vibrate);\n\tconst stop = () => {\n\t\tif (isSupported.value) navigator.vibrate(0);\n\t\tintervalControls === null || intervalControls === void 0 || intervalControls.pause();\n\t};\n\treturn {\n\t\tisSupported,\n\t\tpattern,\n\t\tintervalControls,\n\t\tvibrate,\n\t\tstop\n\t};\n}\n//#endregion\n//#region useVirtualList/index.ts\n/**\n* Please consider using [`vue-virtual-scroller`](https://github.com/Akryum/vue-virtual-scroller) if you are looking for more features.\n*/\nfunction useVirtualList(list, options) {\n\tconst { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n\treturn {\n\t\tlist: currentList,\n\t\tscrollTo,\n\t\tcontainerProps: {\n\t\t\tref: containerRef,\n\t\t\tonScroll: () => {\n\t\t\t\tcalculateRange();\n\t\t\t},\n\t\t\tstyle: containerStyle\n\t\t},\n\t\twrapperProps\n\t};\n}\nfunction useVirtualListResources(list) {\n\tconst containerRef = shallowRef(null);\n\tconst size = useElementSize(containerRef);\n\tconst currentList = ref([]);\n\tconst source = shallowRef(list);\n\treturn {\n\t\tstate: ref({\n\t\t\tstart: 0,\n\t\t\tend: 10\n\t\t}),\n\t\tsource,\n\t\tcurrentList,\n\t\tsize,\n\t\tcontainerRef\n\t};\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n\treturn (containerSize) => {\n\t\tif (typeof itemSize === \"number\") return Math.ceil(containerSize / itemSize);\n\t\tconst { start = 0 } = state.value;\n\t\tlet sum = 0;\n\t\tlet capacity = 0;\n\t\tfor (let i = start; i < source.value.length; i++) {\n\t\t\tconst size = itemSize(i);\n\t\t\tsum += size;\n\t\t\tcapacity = i;\n\t\t\tif (sum > containerSize) break;\n\t\t}\n\t\treturn capacity - start;\n\t};\n}\nfunction createGetOffset(source, itemSize) {\n\treturn (scrollDirection) => {\n\t\tif (typeof itemSize === \"number\") return Math.floor(scrollDirection / itemSize) + 1;\n\t\tlet sum = 0;\n\t\tlet offset = 0;\n\t\tfor (let i = 0; i < source.value.length; i++) {\n\t\t\tconst size = itemSize(i);\n\t\t\tsum += size;\n\t\t\tif (sum >= scrollDirection) {\n\t\t\t\toffset = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn offset + 1;\n\t};\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n\treturn () => {\n\t\tconst element = containerRef.value;\n\t\tif (element) {\n\t\t\tconst offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n\t\t\tconst viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n\t\t\tconst from = offset - overscan;\n\t\t\tconst to = offset + viewCapacity + overscan;\n\t\t\tstate.value = {\n\t\t\t\tstart: from < 0 ? 0 : from,\n\t\t\t\tend: to > source.value.length ? source.value.length : to\n\t\t\t};\n\t\t\tcurrentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n\t\t\t\tdata: ele,\n\t\t\t\tindex: index + state.value.start\n\t\t\t}));\n\t\t}\n\t};\n}\nfunction createGetDistance(itemSize, source) {\n\treturn (index) => {\n\t\tif (typeof itemSize === \"number\") return index * itemSize;\n\t\treturn source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n\t};\n}\nfunction useWatchForSizes(size, listRef, containerRef, calculateRange) {\n\twatch([\n\t\tsize.width,\n\t\tsize.height,\n\t\tlistRef,\n\t\tcontainerRef\n\t], () => {\n\t\tcalculateRange();\n\t});\n}\nfunction createComputedTotalSize(itemSize, source) {\n\treturn computed(() => {\n\t\tif (typeof itemSize === \"number\") return source.value.length * itemSize;\n\t\treturn source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n\t});\n}\nconst scrollToDictionaryForElementScrollKey = {\n\thorizontal: \"scrollLeft\",\n\tvertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n\treturn (index) => {\n\t\tif (containerRef.value) {\n\t\t\tcontainerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n\t\t\tcalculateRange();\n\t\t}\n\t};\n}\nfunction useHorizontalVirtualList(options, list) {\n\tconst resources = useVirtualListResources(list);\n\tconst { state, source, currentList, size, containerRef } = resources;\n\tconst containerStyle = { overflowX: \"auto\" };\n\tconst { itemWidth, overscan = 5 } = options;\n\tconst getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n\tconst calculateRange = createCalculateRange(\"horizontal\", overscan, createGetOffset(source, itemWidth), getViewCapacity, resources);\n\tconst getDistanceLeft = createGetDistance(itemWidth, source);\n\tconst offsetLeft = computed(() => getDistanceLeft(state.value.start));\n\tconst totalWidth = createComputedTotalSize(itemWidth, source);\n\tuseWatchForSizes(size, source, containerRef, calculateRange);\n\treturn {\n\t\tscrollTo: createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef),\n\t\tcalculateRange,\n\t\twrapperProps: computed(() => {\n\t\t\treturn { style: {\n\t\t\t\theight: \"100%\",\n\t\t\t\twidth: `${totalWidth.value - offsetLeft.value}px`,\n\t\t\t\tmarginLeft: `${offsetLeft.value}px`,\n\t\t\t\tdisplay: \"flex\"\n\t\t\t} };\n\t\t}),\n\t\tcontainerStyle,\n\t\tcurrentList,\n\t\tcontainerRef\n\t};\n}\nfunction useVerticalVirtualList(options, list) {\n\tconst resources = useVirtualListResources(list);\n\tconst { state, source, currentList, size, containerRef } = resources;\n\tconst containerStyle = { overflowY: \"auto\" };\n\tconst { itemHeight, overscan = 5 } = options;\n\tconst getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n\tconst calculateRange = createCalculateRange(\"vertical\", overscan, createGetOffset(source, itemHeight), getViewCapacity, resources);\n\tconst getDistanceTop = createGetDistance(itemHeight, source);\n\tconst offsetTop = computed(() => getDistanceTop(state.value.start));\n\tconst totalHeight = createComputedTotalSize(itemHeight, source);\n\tuseWatchForSizes(size, source, containerRef, calculateRange);\n\treturn {\n\t\tcalculateRange,\n\t\tscrollTo: createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef),\n\t\tcontainerStyle,\n\t\twrapperProps: computed(() => {\n\t\t\treturn { style: {\n\t\t\t\twidth: \"100%\",\n\t\t\t\theight: `${totalHeight.value - offsetTop.value}px`,\n\t\t\t\tmarginTop: `${offsetTop.value}px`\n\t\t\t} };\n\t\t}),\n\t\tcurrentList,\n\t\tcontainerRef\n\t};\n}\n//#endregion\n//#region useWakeLock/index.ts\n/**\n* Reactive Screen Wake Lock API.\n*\n* @see https://vueuse.org/useWakeLock\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useWakeLock(options = {}) {\n\tconst { navigator = defaultNavigator, document = defaultDocument } = options;\n\tconst requestedType = shallowRef(false);\n\tconst sentinel = shallowRef(null);\n\tconst documentVisibility = useDocumentVisibility({ document });\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator && \"wakeLock\" in navigator);\n\tconst isActive = computed(() => !!sentinel.value && documentVisibility.value === \"visible\");\n\tif (isSupported.value) {\n\t\tuseEventListener(sentinel, \"release\", () => {\n\t\t\tvar _sentinel$value$type, _sentinel$value;\n\t\t\trequestedType.value = (_sentinel$value$type = (_sentinel$value = sentinel.value) === null || _sentinel$value === void 0 ? void 0 : _sentinel$value.type) !== null && _sentinel$value$type !== void 0 ? _sentinel$value$type : false;\n\t\t}, { passive: true });\n\t\twhenever(() => documentVisibility.value === \"visible\" && (document === null || document === void 0 ? void 0 : document.visibilityState) === \"visible\" && requestedType.value, (type) => {\n\t\t\trequestedType.value = false;\n\t\t\tforceRequest(type);\n\t\t});\n\t}\n\tasync function forceRequest(type) {\n\t\tvar _sentinel$value2;\n\t\tawait ((_sentinel$value2 = sentinel.value) === null || _sentinel$value2 === void 0 ? void 0 : _sentinel$value2.release());\n\t\tsentinel.value = isSupported.value ? await navigator.wakeLock.request(type) : null;\n\t}\n\tasync function request(type) {\n\t\tif (documentVisibility.value === \"visible\") await forceRequest(type);\n\t\telse requestedType.value = type;\n\t}\n\tasync function release() {\n\t\trequestedType.value = false;\n\t\tconst s = sentinel.value;\n\t\tsentinel.value = null;\n\t\tawait (s === null || s === void 0 ? void 0 : s.release());\n\t}\n\ttryOnScopeDispose(() => {\n\t\trelease();\n\t});\n\treturn {\n\t\tsentinel,\n\t\tisSupported,\n\t\tisActive,\n\t\trequest,\n\t\tforceRequest,\n\t\trelease\n\t};\n}\n//#endregion\n//#region useWebNotification/index.ts\n/**\n* Reactive useWebNotification\n*\n* @see https://vueuse.org/useWebNotification\n* @see https://developer.mozilla.org/en-US/docs/Web/API/notification\n*/\nfunction useWebNotification(options = {}) {\n\tconst { window = defaultWindow, requestPermissions: _requestForPermissions = true } = options;\n\tconst defaultWebNotificationOptions = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => {\n\t\tif (!window || !(\"Notification\" in window)) return false;\n\t\tif (Notification.permission === \"granted\") return true;\n\t\ttry {\n\t\t\tconst notification = new Notification(\"\");\n\t\t\tnotification.onshow = () => {\n\t\t\t\tnotification.close();\n\t\t\t};\n\t\t} catch (e) {\n\t\t\tif (e.name === \"TypeError\") return false;\n\t\t}\n\t\treturn true;\n\t});\n\tconst permissionGranted = shallowRef(isSupported.value && \"permission\" in Notification && Notification.permission === \"granted\");\n\tconst notification = shallowRef(null);\n\tconst ensurePermissions = async () => {\n\t\tif (!isSupported.value) return;\n\t\tif (!permissionGranted.value && Notification.permission !== \"denied\") {\n\t\t\tif (await Notification.requestPermission() === \"granted\") permissionGranted.value = true;\n\t\t}\n\t\treturn permissionGranted.value;\n\t};\n\tconst { on: onClick, trigger: clickTrigger } = createEventHook();\n\tconst { on: onShow, trigger: showTrigger } = createEventHook();\n\tconst { on: onError, trigger: errorTrigger } = createEventHook();\n\tconst { on: onClose, trigger: closeTrigger } = createEventHook();\n\tconst show = async (overrides) => {\n\t\tif (!isSupported.value || !permissionGranted.value) return;\n\t\tconst options = Object.assign({}, defaultWebNotificationOptions, overrides);\n\t\tnotification.value = new Notification(options.title || \"\", options);\n\t\tnotification.value.onclick = clickTrigger;\n\t\tnotification.value.onshow = showTrigger;\n\t\tnotification.value.onerror = errorTrigger;\n\t\tnotification.value.onclose = closeTrigger;\n\t\treturn notification.value;\n\t};\n\tconst close = () => {\n\t\tif (notification.value) notification.value.close();\n\t\tnotification.value = null;\n\t};\n\tif (_requestForPermissions) tryOnMounted(ensurePermissions);\n\ttryOnScopeDispose(close);\n\tif (isSupported.value && window) {\n\t\tconst document = window.document;\n\t\tuseEventListener(document, \"visibilitychange\", (e) => {\n\t\t\te.preventDefault();\n\t\t\tif (document.visibilityState === \"visible\") close();\n\t\t});\n\t}\n\treturn {\n\t\tisSupported,\n\t\tnotification,\n\t\tensurePermissions,\n\t\tpermissionGranted,\n\t\tshow,\n\t\tclose,\n\t\tonClick,\n\t\tonShow,\n\t\tonError,\n\t\tonClose\n\t};\n}\n//#endregion\n//#region useWebSocket/index.ts\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n\tif (options === true) return {};\n\treturn options;\n}\nfunction getDefaultScheduler(options) {\n\tif (\"interval\" in options) {\n\t\tconst { interval = 1e3 } = options;\n\t\treturn (cb) => useIntervalFn(cb, interval, { immediate: false });\n\t}\n\treturn (cb) => useIntervalFn(cb, 1e3, { immediate: false });\n}\n/**\n* Reactive WebSocket client.\n*\n* @see https://vueuse.org/useWebSocket\n* @param url\n*/\nfunction useWebSocket(url, options = {}) {\n\tconst { onConnected, onDisconnected, onError, onMessage, immediate = true, autoConnect = true, autoClose = true, protocols = [] } = options;\n\tconst data = shallowRef(null);\n\tconst status = shallowRef(\"CLOSED\");\n\tconst wsRef = shallowRef();\n\tconst urlRef = toRef(url);\n\tlet heartbeatPause;\n\tlet heartbeatResume;\n\tlet explicitlyClosed = false;\n\tlet retried = 0;\n\tlet bufferedData = [];\n\tlet retryTimeout;\n\tlet pongTimeoutWait;\n\tconst _sendBuffer = () => {\n\t\tif (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n\t\t\tfor (const buffer of bufferedData) wsRef.value.send(buffer);\n\t\t\tbufferedData = [];\n\t\t}\n\t};\n\tconst resetRetry = () => {\n\t\tif (retryTimeout != null) {\n\t\t\tclearTimeout(retryTimeout);\n\t\t\tretryTimeout = void 0;\n\t\t}\n\t};\n\tconst resetHeartbeat = () => {\n\t\tclearTimeout(pongTimeoutWait);\n\t\tpongTimeoutWait = void 0;\n\t};\n\tconst close = (code = 1e3, reason) => {\n\t\tresetRetry();\n\t\tif (!isClient && !isWorker || !wsRef.value) return;\n\t\texplicitlyClosed = true;\n\t\tresetHeartbeat();\n\t\theartbeatPause === null || heartbeatPause === void 0 || heartbeatPause();\n\t\twsRef.value.close(code, reason);\n\t\twsRef.value = void 0;\n\t};\n\tconst send = (data, useBuffer = true) => {\n\t\tif (!wsRef.value || status.value !== \"OPEN\") {\n\t\t\tif (useBuffer) bufferedData.push(data);\n\t\t\treturn false;\n\t\t}\n\t\t_sendBuffer();\n\t\twsRef.value.send(data);\n\t\treturn true;\n\t};\n\tconst _init = () => {\n\t\tif (explicitlyClosed || typeof urlRef.value === \"undefined\") return;\n\t\tconst ws = new WebSocket(urlRef.value, protocols);\n\t\twsRef.value = ws;\n\t\tstatus.value = \"CONNECTING\";\n\t\tws.onopen = () => {\n\t\t\tif (wsRef.value !== ws) return;\n\t\t\tstatus.value = \"OPEN\";\n\t\t\tretried = 0;\n\t\t\tonConnected === null || onConnected === void 0 || onConnected(ws);\n\t\t\theartbeatResume === null || heartbeatResume === void 0 || heartbeatResume();\n\t\t\t_sendBuffer();\n\t\t};\n\t\tws.onclose = (ev) => {\n\t\t\tif (wsRef.value === ws) status.value = \"CLOSED\";\n\t\t\tresetHeartbeat();\n\t\t\theartbeatPause === null || heartbeatPause === void 0 || heartbeatPause();\n\t\t\tonDisconnected === null || onDisconnected === void 0 || onDisconnected(ws, ev);\n\t\t\tif (!explicitlyClosed && options.autoReconnect && (wsRef.value == null || ws === wsRef.value)) {\n\t\t\t\tconst { retries = -1, delay = 1e3, onFailed } = resolveNestedOptions(options.autoReconnect);\n\t\t\t\tif ((typeof retries === \"function\" ? retries : () => typeof retries === \"number\" && (retries < 0 || retried < retries))(retried)) {\n\t\t\t\t\tretried += 1;\n\t\t\t\t\tconst delayTime = typeof delay === \"function\" ? delay(retried) : delay;\n\t\t\t\t\tretryTimeout = setTimeout(_init, delayTime);\n\t\t\t\t} else onFailed === null || onFailed === void 0 || onFailed();\n\t\t\t}\n\t\t};\n\t\tws.onerror = (e) => {\n\t\t\tonError === null || onError === void 0 || onError(ws, e);\n\t\t};\n\t\tws.onmessage = (e) => {\n\t\t\tif (options.heartbeat) {\n\t\t\t\tresetHeartbeat();\n\t\t\t\tconst { message = DEFAULT_PING_MESSAGE, responseMessage = message } = resolveNestedOptions(options.heartbeat);\n\t\t\t\tif (e.data === toValue(responseMessage)) return;\n\t\t\t}\n\t\t\tdata.value = e.data;\n\t\t\tonMessage === null || onMessage === void 0 || onMessage(ws, e);\n\t\t};\n\t};\n\tif (options.heartbeat) {\n\t\tconst { message = DEFAULT_PING_MESSAGE, scheduler = getDefaultScheduler(resolveNestedOptions(options.heartbeat)), pongTimeout = 1e3 } = resolveNestedOptions(options.heartbeat);\n\t\tconst { pause, resume } = scheduler(() => {\n\t\t\tsend(toValue(message), false);\n\t\t\tif (pongTimeoutWait != null) return;\n\t\t\tpongTimeoutWait = setTimeout(() => {\n\t\t\t\tclose();\n\t\t\t\texplicitlyClosed = false;\n\t\t\t}, pongTimeout);\n\t\t});\n\t\theartbeatPause = pause;\n\t\theartbeatResume = resume;\n\t}\n\tif (autoClose) {\n\t\tif (isClient) useEventListener(\"beforeunload\", () => close(), { passive: true });\n\t\ttryOnScopeDispose(close);\n\t}\n\tconst open = () => {\n\t\tif (!isClient && !isWorker) return;\n\t\tclose();\n\t\texplicitlyClosed = false;\n\t\tretried = 0;\n\t\t_init();\n\t};\n\tif (immediate) open();\n\tif (autoConnect) watch(urlRef, open);\n\treturn {\n\t\tdata,\n\t\tstatus,\n\t\tclose,\n\t\tsend,\n\t\topen,\n\t\tws: wsRef\n\t};\n}\n//#endregion\n//#region useWebWorker/index.ts\nfunction useWebWorker(arg0, workerOptions, options) {\n\tconst { window = defaultWindow } = options !== null && options !== void 0 ? options : {};\n\tconst data = shallowRef(null);\n\tconst worker = shallowRef();\n\tconst post = (...args) => {\n\t\tif (!worker.value) return;\n\t\tworker.value.postMessage(...args);\n\t};\n\tconst terminate = function terminate() {\n\t\tif (!worker.value) return;\n\t\tworker.value.terminate();\n\t};\n\tif (window) {\n\t\tif (typeof arg0 === \"string\") worker.value = new Worker(arg0, workerOptions);\n\t\telse if (typeof arg0 === \"function\") worker.value = arg0();\n\t\telse worker.value = arg0;\n\t\tworker.value.onmessage = (e) => {\n\t\t\tdata.value = e.data;\n\t\t};\n\t\ttryOnScopeDispose(() => {\n\t\t\tif (worker.value) worker.value.terminate();\n\t\t});\n\t}\n\treturn {\n\t\tdata,\n\t\tpost,\n\t\tterminate,\n\t\tworker\n\t};\n}\n//#endregion\n//#region useWebWorkerFn/lib/depsParser.ts\n/**\n*\n* Concatenates the dependencies into a comma separated string.\n* this string will then be passed as an argument to the \"importScripts\" function\n*\n* @param deps array of string\n* @param localDeps array of function\n* @returns a string composed by the concatenation of the array\n* elements \"deps\" and \"importScripts\".\n*\n* @example\n* depsParser(['demo1', 'demo2']) // return importScripts('demo1', 'demo2')\n*/\nfunction depsParser(deps, localDeps) {\n\tif (deps.length === 0 && localDeps.length === 0) return \"\";\n\tconst depsString = deps.map((dep) => `'${dep}'`).toString();\n\tconst depsFunctionString = localDeps.filter((dep) => typeof dep === \"function\").map((fn) => {\n\t\tconst str = fn.toString();\n\t\tif (str.trim().startsWith(\"function\")) return str;\n\t\telse return `const ${fn.name} = ${str}`;\n\t}).join(\";\");\n\tconst importString = `importScripts(${depsString});`;\n\treturn `${depsString.trim() === \"\" ? \"\" : importString} ${depsFunctionString}`;\n}\n//#endregion\n//#region useWebWorkerFn/lib/jobRunner.ts\n/**\n* This function accepts as a parameter a function \"userFunc\"\n* And as a result returns an anonymous function.\n* This anonymous function, accepts as arguments,\n* the parameters to pass to the function \"useArgs\" and returns a Promise\n* This function can be used as a wrapper, only inside a Worker\n* because it depends by \"postMessage\".\n*\n* @param userFunc {Function} fn the function to run with web worker\n*\n* @returns returns a function that accepts the parameters\n* to be passed to the \"userFunc\" function\n*/\nfunction jobRunner(userFunc) {\n\treturn (e) => {\n\t\tconst userFuncArgs = e.data[0];\n\t\treturn Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n\t\t\tpostMessage([\"SUCCESS\", result]);\n\t\t}).catch((error) => {\n\t\t\tpostMessage([\"ERROR\", error]);\n\t\t});\n\t};\n}\n//#endregion\n//#region useWebWorkerFn/lib/createWorkerBlobUrl.ts\n/**\n* Converts the \"fn\" function into the syntax needed to be executed within a web worker\n*\n* @param fn the function to run with web worker\n* @param deps array of strings, imported into the worker through \"importScripts\"\n* @param localDeps array of function, local dependencies\n*\n* @returns a blob url, containing the code of \"fn\" as a string\n*\n* @example\n* createWorkerBlobUrl((a,b) => a+b, [])\n* // return \"onmessage=return Promise.resolve((a,b) => a + b)\n* .then(postMessage(['SUCCESS', result]))\n* .catch(postMessage(['ERROR', error])\"\n*/\nfunction createWorkerBlobUrl(fn, deps, localDeps) {\n\tconst blobCode = `${depsParser(deps, localDeps)}; onmessage=(${jobRunner})(${fn})`;\n\tconst blob = new Blob([blobCode], { type: \"text/javascript\" });\n\treturn URL.createObjectURL(blob);\n}\n//#endregion\n//#region useWebWorkerFn/index.ts\n/**\n* Run expensive function without blocking the UI, using a simple syntax that makes use of Promise.\n*\n* @see https://vueuse.org/useWebWorkerFn\n* @param fn\n* @param options\n*/\nfunction useWebWorkerFn(fn, options = {}) {\n\tconst { dependencies = [], localDependencies = [], timeout, window = defaultWindow } = options;\n\tlet worker;\n\tconst workerStatus = shallowRef(\"PENDING\");\n\tconst promise = shallowRef({});\n\tconst timeoutId = shallowRef();\n\tconst workerTerminate = (status = \"PENDING\") => {\n\t\tif (worker && worker._url && window) {\n\t\t\tworker.terminate();\n\t\t\tURL.revokeObjectURL(worker._url);\n\t\t\tpromise.value = {};\n\t\t\tworker = void 0;\n\t\t\twindow.clearTimeout(timeoutId.value);\n\t\t\tworkerStatus.value = status;\n\t\t}\n\t};\n\tworkerTerminate();\n\ttryOnScopeDispose(workerTerminate);\n\tconst generateWorker = () => {\n\t\tconst blobUrl = createWorkerBlobUrl(fn, dependencies, localDependencies);\n\t\tconst newWorker = new Worker(blobUrl);\n\t\tnewWorker._url = blobUrl;\n\t\tnewWorker.onmessage = (e) => {\n\t\t\tconst { resolve = () => {}, reject = () => {} } = promise.value;\n\t\t\tconst [status, result] = e.data;\n\t\t\tswitch (status) {\n\t\t\t\tcase \"SUCCESS\":\n\t\t\t\t\tresolve(result);\n\t\t\t\t\tworkerTerminate(status);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treject(result);\n\t\t\t\t\tworkerTerminate(\"ERROR\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t};\n\t\tnewWorker.onerror = (e) => {\n\t\t\tconst { reject = () => {} } = promise.value;\n\t\t\te.preventDefault();\n\t\t\treject(e);\n\t\t\tworkerTerminate(\"ERROR\");\n\t\t};\n\t\tif (timeout) timeoutId.value = setTimeout(workerTerminate, timeout, \"TIMEOUT_EXPIRED\");\n\t\treturn newWorker;\n\t};\n\tconst callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n\t\tpromise.value = {\n\t\t\tresolve,\n\t\t\treject\n\t\t};\n\t\tworker === null || worker === void 0 || worker.postMessage([[...fnArgs]]);\n\t\tworkerStatus.value = \"RUNNING\";\n\t});\n\tconst workerFn = (...fnArgs) => {\n\t\tif (workerStatus.value === \"RUNNING\") {\n\t\t\tconsole.error(\"[useWebWorkerFn] You can only run one instance of the worker at a time.\");\n\t\t\treturn Promise.reject();\n\t\t}\n\t\tworker = generateWorker();\n\t\treturn callWorker(...fnArgs);\n\t};\n\treturn {\n\t\tworkerFn,\n\t\tworkerStatus,\n\t\tworkerTerminate\n\t};\n}\n//#endregion\n//#region useWindowFocus/index.ts\n/**\n* Reactively track window focus with `window.onfocus` and `window.onblur`.\n*\n* @see https://vueuse.org/useWindowFocus\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useWindowFocus(options = {}) {\n\tconst { window = defaultWindow } = options;\n\tif (!window) return shallowRef(false);\n\tconst focused = shallowRef(window.document.hasFocus());\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(window, \"blur\", () => {\n\t\tfocused.value = false;\n\t}, listenerOptions);\n\tuseEventListener(window, \"focus\", () => {\n\t\tfocused.value = true;\n\t}, listenerOptions);\n\treturn focused;\n}\n//#endregion\n//#region useWindowScroll/index.ts\n/**\n* Reactive window scroll.\n*\n* @see https://vueuse.org/useWindowScroll\n* @param options\n*/\nfunction useWindowScroll(options = {}) {\n\tconst { window = defaultWindow, ...rest } = options;\n\treturn useScroll(window, rest);\n}\n//#endregion\n//#region useWindowSize/index.ts\n/**\n* Reactive window size.\n*\n* @see https://vueuse.org/useWindowSize\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useWindowSize(options = {}) {\n\tconst { window = defaultWindow, initialWidth = Number.POSITIVE_INFINITY, initialHeight = Number.POSITIVE_INFINITY, listenOrientation = true, includeScrollbar = true, type = \"inner\" } = options;\n\tconst width = shallowRef(initialWidth);\n\tconst height = shallowRef(initialHeight);\n\tconst update = () => {\n\t\tif (window) if (type === \"outer\") {\n\t\t\twidth.value = window.outerWidth;\n\t\t\theight.value = window.outerHeight;\n\t\t} else if (type === \"visual\" && window.visualViewport) {\n\t\t\tconst { width: visualViewportWidth, height: visualViewportHeight, scale } = window.visualViewport;\n\t\t\twidth.value = Math.round(visualViewportWidth * scale);\n\t\t\theight.value = Math.round(visualViewportHeight * scale);\n\t\t} else if (includeScrollbar) {\n\t\t\twidth.value = window.innerWidth;\n\t\t\theight.value = window.innerHeight;\n\t\t} else {\n\t\t\twidth.value = window.document.documentElement.clientWidth;\n\t\t\theight.value = window.document.documentElement.clientHeight;\n\t\t}\n\t};\n\tupdate();\n\ttryOnMounted(update);\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(\"resize\", update, listenerOptions);\n\tif (window && type === \"visual\" && window.visualViewport) useEventListener(window.visualViewport, \"resize\", update, listenerOptions);\n\tif (listenOrientation) watch(useMediaQuery(\"(orientation: portrait)\"), () => update());\n\treturn {\n\t\twidth,\n\t\theight\n\t};\n}\n//#endregion\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsElement, breakpointsMasterCss, breakpointsPrimeFlex, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, breakpointsVuetifyV2, breakpointsVuetifyV3, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, formatTimeAgoIntl, formatTimeAgoIntlParts, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onElementRemoval, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, provideSSRWidth, setSSRHandler, templateRef, transition, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useClipboardItems, useCloned, useColorMode, useConfirmDialog, useCountdown, useCssSupports, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePreferredReducedTransparency, usePrevious, useRafFn, useRefHistory, useResizeObserver, useSSRWidth, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeAgoIntl, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","import type { MaybeElementRef } from '@vueuse/core'\nimport { unrefElement } from '@vueuse/core'\nimport { onMounted, onUnmounted } from 'vue'\n\nexport function onFocusOutside(\n  element: MaybeElementRef,\n  handler: (event: FocusEvent) => void,\n) {\n  const handleFocusOut = (ev: FocusEvent) => {\n    const el = unrefElement(element)\n    if (!ev.relatedTarget)\n      return\n    const isFocusInsideElement = el?.contains(ev.relatedTarget as Node)\n\n    if (!isFocusInsideElement)\n      handler(ev)\n  }\n\n  onMounted(() => {\n    const el = unrefElement(element)\n    // @ts-expect-error focusout should received FocusEvent\n    el?.addEventListener('focusout', handleFocusOut)\n  })\n  onUnmounted(() => {\n    const el = unrefElement(element)\n    // @ts-expect-error focusout should received FocusEvent\n    el?.removeEventListener('focusout', handleFocusOut)\n  })\n}\n","import type { VNode } from 'vue'\nimport { Fragment } from 'vue'\n\nexport function renderSlotFragments(children?: VNode[]): VNode[] {\n  if (!children)\n    return []\n  return children.flatMap((child) => {\n    if (child.type === Fragment)\n      return renderSlotFragments(child.children as VNode[])\n\n    return [child]\n  })\n}\n","import { getActiveElement } from './getActiveElement'\n\nexport function trapFocus(element: HTMLElement) {\n  if (element) {\n    const focusableEls = [\n      ...Array.from(\n        element.querySelectorAll(\n          'a[href], button, input, textarea, select, details,[tabindex]:not([tabindex=\"-1\"])',\n        ),\n      ),\n    ].filter(\n      el => !el.hasAttribute('disabled') && !el.getAttribute('aria-hidden'),\n    )\n    const firstFocusableEl = focusableEls[0] as HTMLElement\n    const lastFocusableEl = focusableEls.at(-1) as HTMLElement\n    const KEYCODE_TAB = 9\n\n    if (firstFocusableEl)\n      firstFocusableEl.focus()\n\n    element.addEventListener('keydown', (e) => {\n      const isTabPressed = e.key === 'Tab' || e.keyCode === KEYCODE_TAB\n\n      if (!isTabPressed)\n        return\n\n      if (e.shiftKey) {\n        /* shift + tab */ if (getActiveElement() === firstFocusableEl) {\n          lastFocusableEl.focus()\n          e.preventDefault()\n        }\n      }\n      else {\n      /* tab */\n        if (getActiveElement() === lastFocusableEl) {\n          firstFocusableEl.focus()\n          e.preventDefault()\n        }\n      }\n    })\n    return firstFocusableEl\n  }\n}\n","import type { Direction } from './types'\n\ntype ArrowKeyOptions = 'horizontal' | 'vertical' | 'both'\n\ninterface ArrowNavigationOptions {\n  /**\n   * The arrow key options to allow navigation\n   *\n   * @defaultValue \"both\"\n   */\n  arrowKeyOptions?: ArrowKeyOptions\n\n  /**\n   * The attribute name to find the collection items in the parent element.\n   *\n   * @defaultValue \"data-reka-collection-item\"\n   */\n  attributeName?: string\n\n  /**\n   * The parent element where contains all the collection items, this will collect every item to be used when nav\n   * It will be ignored if attributeName is provided\n   *\n   * @defaultValue []\n   */\n  itemsArray?: HTMLElement[]\n\n  /**\n   * Allow loop navigation. If false, it will stop at the first and last element\n   *\n   * @defaultValue true\n   */\n  loop?: boolean\n\n  /**\n   * The orientation of the collection\n   *\n   * @defaultValue \"ltr\"\n   */\n  dir?: Direction\n\n  /**\n   * Prevent the scroll when navigating. This happens when the direction of the\n   * key matches the scroll direction of any ancestor scrollable elements.\n   *\n   * @defaultValue true\n   */\n  preventScroll?: boolean\n\n  /**\n   * By default all currentElement would trigger navigation. If `true`, currentElement nodeName in the ignore list will return null\n   *\n   * @defaultValue false\n   */\n  enableIgnoredElement?: boolean\n\n  /**\n   * Focus the element after navigation\n   *\n   * @defaultValue false\n   */\n  focus?: boolean\n}\n\nconst ignoredElement = ['INPUT', 'TEXTAREA']\n\n/**\n * Allow arrow navigation for every html element with data-reka-collection-item tag\n *\n * @param e               Keyboard event\n * @param currentElement  Event initiator element or any element that wants to handle the navigation\n * @param parentElement   Parent element where contains all the collection items, this will collect every item to be used when nav\n * @param options         further options\n * @returns               the navigated html element or null if none\n */\nexport function useArrowNavigation(\n  e: KeyboardEvent,\n  currentElement: HTMLElement,\n  parentElement: HTMLElement | undefined,\n  options: ArrowNavigationOptions = {},\n): HTMLElement | null {\n  if (!currentElement || (options.enableIgnoredElement && ignoredElement.includes(currentElement.nodeName)))\n    return null\n\n  const {\n    arrowKeyOptions = 'both',\n    attributeName = '[data-reka-collection-item]',\n    itemsArray = [],\n    loop = true,\n    dir = 'ltr',\n    preventScroll = true,\n    focus = false,\n  } = options\n\n  const [right, left, up, down, home, end] = [\n    e.key === 'ArrowRight',\n    e.key === 'ArrowLeft',\n    e.key === 'ArrowUp',\n    e.key === 'ArrowDown',\n    e.key === 'Home',\n    e.key === 'End',\n  ]\n  const goingVertical = up || down\n  const goingHorizontal = right || left\n  if (\n    !home\n    && !end\n    && ((!goingVertical && !goingHorizontal)\n      || (arrowKeyOptions === 'vertical' && goingHorizontal)\n      || (arrowKeyOptions === 'horizontal' && goingVertical))\n  ) {\n    return null\n  }\n\n  const allCollectionItems: HTMLElement[] = parentElement\n    ? Array.from(parentElement.querySelectorAll(attributeName))\n    : itemsArray\n\n  if (!allCollectionItems.length)\n    return null\n\n  if (preventScroll)\n    e.preventDefault()\n\n  let item: HTMLElement | null = null\n\n  if (goingHorizontal || goingVertical) {\n    const goForward = goingVertical ? down : dir === 'ltr' ? right : left\n    item = findNextFocusableElement(allCollectionItems, currentElement, {\n      goForward,\n      loop,\n    })\n  }\n  else if (home) {\n    item = allCollectionItems.at(0) || null\n  }\n  else if (end) {\n    item = allCollectionItems.at(-1) || null\n  }\n\n  if (focus)\n    item?.focus()\n\n  return item\n}\n\ninterface FindNextFocusableElementOptions {\n  /**\n   * Whether to search forwards or backwards.\n   */\n  goForward: boolean\n  /**\n   * Whether to allow looping the search. If false, it will stop at the first/last element.\n   *\n   * @default true\n   */\n  loop?: boolean\n}\n\n/**\n * Recursive function to find the next focusable element to avoid disabled elements\n *\n * @param elements Elements to navigate\n * @param currentElement Current active element\n * @param options\n * @returns next focusable element\n */\nfunction findNextFocusableElement(\n  elements: HTMLElement[],\n  currentElement: HTMLElement,\n  options: FindNextFocusableElementOptions,\n  iterations = !elements.includes(currentElement) ? elements.length + 1 : elements.length,\n): HTMLElement | null {\n  if (--iterations === 0)\n    return null\n\n  const index = elements.indexOf(currentElement)\n  let newIndex: number\n  if (index === -1) {\n    newIndex = options.goForward ? 0 : elements.length - 1\n  }\n  else {\n    newIndex = options.goForward ? index + 1 : index - 1\n  }\n\n  if (!options.loop && (newIndex < 0 || newIndex >= elements.length))\n    return null\n\n  const adjustedNewIndex = (newIndex + elements.length) % elements.length\n  const candidate = elements[adjustedNewIndex]\n  if (!candidate)\n    return null\n\n  const isDisabled\n    = candidate.hasAttribute('disabled')\n      && candidate.getAttribute('disabled') !== 'false'\n  if (isDisabled) {\n    return findNextFocusableElement(\n      elements,\n      candidate,\n      options,\n      iterations,\n    )\n  }\n  return candidate\n}\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { Direction, ScrollBodyOption } from '@/shared/types'\nimport { createContext } from '@/shared'\n\ninterface ConfigProviderContextValue {\n  dir?: Ref<Direction>\n  locale?: Ref<string>\n  scrollBody?: Ref<boolean | ScrollBodyOption>\n  nonce?: Ref<string | undefined>\n  useId?: () => string\n}\n\nexport const [injectConfigProviderContext, provideConfigProviderContext]\n  = createContext<ConfigProviderContextValue>('ConfigProvider')\n\nexport interface ConfigProviderProps {\n  /**\n   * The global reading direction of your application. This will be inherited by all primitives.\n   * @defaultValue 'ltr'\n   */\n  dir?: Direction\n  /**\n   * The global locale of your application. This will be inherited by all primitives.\n   * @defaultValue 'en'\n   */\n  locale?: string\n  /**\n   * The global scroll body behavior of your application. This will be inherited by the related primitives.\n   * @type boolean | ScrollBodyOption\n   */\n  scrollBody?: boolean | ScrollBodyOption\n  /**\n   * The global `nonce` value of your application. This will be inherited by the related primitives.\n   * @type string\n   */\n  nonce?: string\n  /**\n   * The global `useId` injection as a workaround for preventing hydration issue.\n   */\n  useId?: () => string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { toRefs } from 'vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<ConfigProviderProps>(), {\n  dir: 'ltr',\n  locale: 'en',\n  scrollBody: true,\n  nonce: undefined,\n  useId: undefined,\n})\n\nconst { dir, locale, scrollBody, nonce } = toRefs(props)\n\nprovideConfigProviderContext({\n  dir,\n  locale,\n  scrollBody,\n  nonce,\n  useId: props.useId,\n})\n</script>\n\n<template>\n  <slot />\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { Direction, ScrollBodyOption } from '@/shared/types'\nimport { createContext } from '@/shared'\n\ninterface ConfigProviderContextValue {\n  dir?: Ref<Direction>\n  locale?: Ref<string>\n  scrollBody?: Ref<boolean | ScrollBodyOption>\n  nonce?: Ref<string | undefined>\n  useId?: () => string\n}\n\nexport const [injectConfigProviderContext, provideConfigProviderContext]\n  = createContext<ConfigProviderContextValue>('ConfigProvider')\n\nexport interface ConfigProviderProps {\n  /**\n   * The global reading direction of your application. This will be inherited by all primitives.\n   * @defaultValue 'ltr'\n   */\n  dir?: Direction\n  /**\n   * The global locale of your application. This will be inherited by all primitives.\n   * @defaultValue 'en'\n   */\n  locale?: string\n  /**\n   * The global scroll body behavior of your application. This will be inherited by the related primitives.\n   * @type boolean | ScrollBodyOption\n   */\n  scrollBody?: boolean | ScrollBodyOption\n  /**\n   * The global `nonce` value of your application. This will be inherited by the related primitives.\n   * @type string\n   */\n  nonce?: string\n  /**\n   * The global `useId` injection as a workaround for preventing hydration issue.\n   */\n  useId?: () => string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { toRefs } from 'vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<ConfigProviderProps>(), {\n  dir: 'ltr',\n  locale: 'en',\n  scrollBody: true,\n  nonce: undefined,\n  useId: undefined,\n})\n\nconst { dir, locale, scrollBody, nonce } = toRefs(props)\n\nprovideConfigProviderContext({\n  dir,\n  locale,\n  scrollBody,\n  nonce,\n  useId: props.useId,\n})\n</script>\n\n<template>\n  <slot />\n</template>\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction isPlainObject(value) {\n  if (value === null || typeof value !== \"object\") {\n    return false;\n  }\n  const prototype = Object.getPrototypeOf(value);\n  if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {\n    return false;\n  }\n  if (Symbol.iterator in value) {\n    return false;\n  }\n  if (Symbol.toStringTag in value) {\n    return Object.prototype.toString.call(value) === \"[object Module]\";\n  }\n  return true;\n}\n\nfunction _defu(baseObject, defaults, namespace = \".\", merger) {\n  if (!isPlainObject(defaults)) {\n    return _defu(baseObject, {}, namespace, merger);\n  }\n  const object = { ...defaults };\n  for (const key of Object.keys(baseObject)) {\n    if (key === \"__proto__\" || key === \"constructor\") {\n      continue;\n    }\n    const value = baseObject[key];\n    if (value === null || value === void 0) {\n      continue;\n    }\n    if (merger && merger(object, key, value, namespace)) {\n      continue;\n    }\n    if (Array.isArray(value) && Array.isArray(object[key])) {\n      object[key] = [...value, ...object[key]];\n    } else if (isPlainObject(value) && isPlainObject(object[key])) {\n      object[key] = _defu(\n        value,\n        object[key],\n        (namespace ? `${namespace}.` : \"\") + key.toString(),\n        merger\n      );\n    } else {\n      object[key] = value;\n    }\n  }\n  return object;\n}\nfunction createDefu(merger) {\n  return (...arguments_) => (\n    // eslint-disable-next-line unicorn/no-array-reduce\n    arguments_.reduce((p, c) => _defu(p, c, \"\", merger), {})\n  );\n}\nconst defu = createDefu();\nconst defuFn = createDefu((object, key, currentValue) => {\n  if (object[key] !== void 0 && typeof currentValue === \"function\") {\n    object[key] = currentValue(object[key]);\n    return true;\n  }\n});\nconst defuArrayFn = createDefu((object, key, currentValue) => {\n  if (Array.isArray(object[key]) && typeof currentValue === \"function\") {\n    object[key] = currentValue(object[key]);\n    return true;\n  }\n});\n\nexports.createDefu = createDefu;\nexports.default = defu;\nexports.defu = defu;\nexports.defuArrayFn = defuArrayFn;\nexports.defuFn = defuFn;\n","const { defu, createDefu, defuFn, defuArrayFn } = require(\"../dist/defu.cjs\");\n\nmodule.exports = defu;\n\nmodule.exports.defu = defu;\nmodule.exports.default = defu;\n\nmodule.exports.createDefu = createDefu;\nmodule.exports.defuFn = defuFn;\nmodule.exports.defuArrayFn = defuArrayFn;\n","import type { Fn } from '@vueuse/shared'\nimport {\n  createSharedComposable,\n  useEventListener,\n} from '@vueuse/core'\nimport { isClient, isIOS, tryOnBeforeUnmount } from '@vueuse/shared'\nimport { defu } from 'defu'\nimport { computed, nextTick, ref, watch } from 'vue'\nimport { injectConfigProviderContext } from '@/ConfigProvider/ConfigProvider.vue'\n\nconst useBodyLockStackCount = createSharedComposable(() => {\n  const map = ref<Map<string, boolean>>(new Map())\n  const initialOverflow = ref<string | undefined>()\n\n  const locked = computed(() => {\n    for (const value of map.value.values()) {\n      if (value)\n        return true\n    }\n    return false\n  })\n\n  const context = injectConfigProviderContext({\n    scrollBody: ref(true),\n  })\n\n  let stopTouchMoveListener: Fn | null = null\n\n  const resetBodyStyle = () => {\n    document.body.style.paddingRight = ''\n    document.body.style.marginRight = ''\n    document.body.style.pointerEvents = ''\n    document.documentElement.style.removeProperty('--scrollbar-width')\n    document.body.style.overflow = initialOverflow.value ?? ''\n    isIOS && stopTouchMoveListener?.()\n\n    initialOverflow.value = undefined\n  }\n\n  watch(locked, (val, oldVal) => {\n    if (!isClient)\n      return\n\n    if (!val) {\n      if (oldVal)\n        resetBodyStyle()\n      return\n    }\n\n    if (initialOverflow.value === undefined)\n      initialOverflow.value = document.body.style.overflow\n\n    const verticalScrollbarWidth = window.innerWidth - document.documentElement.clientWidth\n    const defaultConfig = { padding: verticalScrollbarWidth, margin: 0 }\n\n    const config = context.scrollBody?.value\n      ? typeof context.scrollBody.value === 'object'\n        ? defu({\n            padding: context.scrollBody.value.padding === true ? verticalScrollbarWidth : context.scrollBody.value.padding,\n            margin: context.scrollBody.value.margin === true ? verticalScrollbarWidth : context.scrollBody.value.margin,\n          }, defaultConfig)\n        : defaultConfig\n      : ({ padding: 0, margin: 0 })\n\n    if (verticalScrollbarWidth > 0) {\n      document.body.style.paddingRight = typeof config.padding === 'number' ? `${config.padding}px` : String(config.padding)\n      document.body.style.marginRight = typeof config.margin === 'number' ? `${config.margin}px` : String(config.margin)\n      document.documentElement.style.setProperty('--scrollbar-width', `${verticalScrollbarWidth}px`)\n      document.body.style.overflow = 'hidden'\n    }\n\n    if (isIOS) {\n      stopTouchMoveListener = useEventListener(\n        document,\n        'touchmove',\n        (e: TouchEvent) => preventDefault(e),\n        { passive: false },\n      )\n    }\n\n    // let dismissibleLayer set previous pointerEvent first\n    nextTick(() => {\n      if (!locked.value)\n        return\n      document.body.style.pointerEvents = 'none'\n      document.body.style.overflow = 'hidden'\n    })\n  }, { immediate: true, flush: 'sync' })\n\n  return map\n})\n\nexport function useBodyScrollLock(initialState?: boolean | undefined) {\n  const id = Math.random().toString(36).substring(2, 7) // just simple random id, need not to be cryptographically secure\n  const map = useBodyLockStackCount()\n\n  map.value.set(id, initialState ?? false)\n\n  const locked = computed({\n    get: () => map.value.get(id) ?? false,\n    set: value => map.value.set(id, value),\n  })\n\n  tryOnBeforeUnmount(() => {\n    map.value.delete(id)\n  })\n\n  return locked\n}\n\n// Adapt from https://github.com/vueuse/vueuse/blob/main/packages/core/useScrollLock/index.ts#L28C10-L28C24\nfunction checkOverflowScroll(ele: Element): boolean {\n  const style = window.getComputedStyle(ele)\n  if (\n    style.overflowX === 'scroll'\n    || style.overflowY === 'scroll'\n    || (style.overflowX === 'auto' && ele.clientWidth < ele.scrollWidth)\n    || (style.overflowY === 'auto' && ele.clientHeight < ele.scrollHeight)\n  ) {\n    return true\n  }\n  else {\n    const parent = ele.parentNode\n\n    if (!(parent instanceof Element) || parent.tagName === 'BODY')\n      return false\n\n    return checkOverflowScroll(parent)\n  }\n}\n\nfunction preventDefault(rawEvent: TouchEvent): boolean {\n  const e = rawEvent || window.event\n\n  const _target = e.target\n\n  // Do not prevent if element or parentNodes have overflow: scroll set.\n  if (_target instanceof Element && checkOverflowScroll(_target))\n    return false\n\n  // Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom).\n  if (e.touches.length > 1)\n    return true\n\n  if (e.preventDefault && e.cancelable)\n    e.preventDefault()\n\n  return false\n}\n","import { nextTick, ref } from 'vue'\n\nexport function useComposing(onEnd?: (event: CompositionEvent) => void) {\n  const isComposing = ref(false)\n\n  function handleCompositionStart() {\n    isComposing.value = true\n  }\n\n  function handleCompositionEnd(event: CompositionEvent) {\n    nextTick(() => {\n      isComposing.value = false\n      onEnd?.(event)\n    })\n  }\n\n  return { isComposing, handleCompositionStart, handleCompositionEnd }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport type Mutable<T> = {\n  -readonly [P in keyof T]: T[P];\n};\n\nexport function mod(amount: number, numerator: number): number {\n  return amount - numerator * Math.floor(amount / numerator);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate, Calendar, CalendarIdentifier} from '../types';\nimport {CalendarDate} from '../CalendarDate';\nimport {mod, Mutable} from '../utils';\n\nconst EPOCH = 1721426; // 001/01/03 Julian C.E.\nexport function gregorianToJulianDay(\n  era: string,\n  year: number,\n  month: number,\n  day: number\n): number {\n  year = getExtendedYear(era, year);\n\n  let y1 = year - 1;\n  let monthOffset = -2;\n  if (month <= 2) {\n    monthOffset = 0;\n  } else if (isLeapYear(year)) {\n    monthOffset = -1;\n  }\n\n  return (\n    EPOCH -\n    1 +\n    365 * y1 +\n    Math.floor(y1 / 4) -\n    Math.floor(y1 / 100) +\n    Math.floor(y1 / 400) +\n    Math.floor((367 * month - 362) / 12 + monthOffset + day)\n  );\n}\n\nexport function isLeapYear(year: number): boolean {\n  return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n\nexport function getExtendedYear(era: string, year: number): number {\n  return era === 'BC' ? 1 - year : year;\n}\n\nexport function fromExtendedYear(year: number): [string, number] {\n  let era = 'AD';\n  if (year <= 0) {\n    era = 'BC';\n    year = 1 - year;\n  }\n\n  return [era, year];\n}\n\nconst daysInMonth = {\n  standard: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n  leapyear: [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]\n};\n\n/**\n * The Gregorian calendar is the most commonly used calendar system in the world. It supports two\n * eras: BC, and AD. Years always contain 12 months, and 365 or 366 days depending on whether it is\n * a leap year.\n */\nexport class GregorianCalendar implements Calendar {\n  identifier: CalendarIdentifier = 'gregory';\n\n  fromJulianDay(jd: number): CalendarDate {\n    let jd0 = jd;\n    let depoch = jd0 - EPOCH;\n    let quadricent = Math.floor(depoch / 146097);\n    let dqc = mod(depoch, 146097);\n    let cent = Math.floor(dqc / 36524);\n    let dcent = mod(dqc, 36524);\n    let quad = Math.floor(dcent / 1461);\n    let dquad = mod(dcent, 1461);\n    let yindex = Math.floor(dquad / 365);\n\n    let extendedYear =\n      quadricent * 400 + cent * 100 + quad * 4 + yindex + (cent !== 4 && yindex !== 4 ? 1 : 0);\n    let [era, year] = fromExtendedYear(extendedYear);\n    let yearDay = jd0 - gregorianToJulianDay(era, year, 1, 1);\n    let leapAdj = 2;\n    if (jd0 < gregorianToJulianDay(era, year, 3, 1)) {\n      leapAdj = 0;\n    } else if (isLeapYear(year)) {\n      leapAdj = 1;\n    }\n    let month = Math.floor(((yearDay + leapAdj) * 12 + 373) / 367);\n    let day = jd0 - gregorianToJulianDay(era, year, month, 1) + 1;\n\n    return new CalendarDate(era, year, month, day);\n  }\n\n  toJulianDay(date: AnyCalendarDate): number {\n    return gregorianToJulianDay(date.era, date.year, date.month, date.day);\n  }\n\n  getDaysInMonth(date: AnyCalendarDate): number {\n    return daysInMonth[isLeapYear(date.year) ? 'leapyear' : 'standard'][date.month - 1];\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  getMonthsInYear(date: AnyCalendarDate): number {\n    return 12;\n  }\n\n  getDaysInYear(date: AnyCalendarDate): number {\n    return isLeapYear(date.year) ? 366 : 365;\n  }\n\n  getMaximumMonthsInYear(): number {\n    return 12;\n  }\n\n  getMaximumDaysInMonth(): number {\n    return 31;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  getYearsInEra(date: AnyCalendarDate): number {\n    return 9999;\n  }\n\n  getEras(): string[] {\n    return ['BC', 'AD'];\n  }\n\n  isInverseEra(date: AnyCalendarDate): boolean {\n    return date.era === 'BC';\n  }\n\n  balanceDate(date: Mutable<AnyCalendarDate>): void {\n    if (date.year <= 0) {\n      date.era = date.era === 'BC' ? 'AD' : 'BC';\n      date.year = 1 - date.year;\n    }\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Data from https://github.com/unicode-cldr/cldr-core/blob/master/supplemental/weekData.json\n// Locales starting on Sunday have been removed for compression.\nexport const weekStartData = {\n  '001': 1,\n  AD: 1,\n  AE: 6,\n  AF: 6,\n  AI: 1,\n  AL: 1,\n  AM: 1,\n  AN: 1,\n  AR: 1,\n  AT: 1,\n  AU: 1,\n  AX: 1,\n  AZ: 1,\n  BA: 1,\n  BE: 1,\n  BG: 1,\n  BH: 6,\n  BM: 1,\n  BN: 1,\n  BY: 1,\n  CH: 1,\n  CL: 1,\n  CM: 1,\n  CN: 1,\n  CR: 1,\n  CY: 1,\n  CZ: 1,\n  DE: 1,\n  DJ: 6,\n  DK: 1,\n  DZ: 6,\n  EC: 1,\n  EE: 1,\n  EG: 6,\n  ES: 1,\n  FI: 1,\n  FJ: 1,\n  FO: 1,\n  FR: 1,\n  GB: 1,\n  GE: 1,\n  GF: 1,\n  GP: 1,\n  GR: 1,\n  HR: 1,\n  HU: 1,\n  IE: 1,\n  IQ: 6,\n  IR: 6,\n  IS: 1,\n  IT: 1,\n  JO: 6,\n  KG: 1,\n  KW: 6,\n  KZ: 1,\n  LB: 1,\n  LI: 1,\n  LK: 1,\n  LT: 1,\n  LU: 1,\n  LV: 1,\n  LY: 6,\n  MC: 1,\n  MD: 1,\n  ME: 1,\n  MK: 1,\n  MN: 1,\n  MQ: 1,\n  MV: 5,\n  MY: 1,\n  NL: 1,\n  NO: 1,\n  NZ: 1,\n  OM: 6,\n  PL: 1,\n  QA: 6,\n  RE: 1,\n  RO: 1,\n  RS: 1,\n  RU: 1,\n  SD: 6,\n  SE: 1,\n  SI: 1,\n  SK: 1,\n  SM: 1,\n  SY: 6,\n  TJ: 1,\n  TM: 1,\n  TR: 1,\n  UA: 1,\n  UY: 1,\n  UZ: 1,\n  VA: 1,\n  VN: 1,\n  XK: 1\n};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AnyCalendarDate, AnyTime, Calendar} from './types';\nimport {CalendarDate, CalendarDateTime, DateValue, ZonedDateTime} from './CalendarDate';\nimport {fromAbsolute, toAbsolute, toCalendar, toCalendarDate} from './conversion';\nimport {weekStartData} from './weekStartData';\n\n/** Returns whether the given dates occur on the same day, regardless of the time or calendar system. */\nexport function isSameDay(a: DateValue, b: DateValue): boolean {\n  b = toCalendar(b, a.calendar);\n  return a.era === b.era && a.year === b.year && a.month === b.month && a.day === b.day;\n}\n\n/**\n * Returns whether the given dates occur in the same month, using the calendar system of the first\n * date.\n */\nexport function isSameMonth(a: DateValue, b: DateValue): boolean {\n  b = toCalendar(b, a.calendar);\n  // In the Japanese calendar, months can span multiple eras/years, so only compare the first of the month.\n  a = startOfMonth(a);\n  b = startOfMonth(b);\n  return a.era === b.era && a.year === b.year && a.month === b.month;\n}\n\n/**\n * Returns whether the given dates occur in the same year, using the calendar system of the first\n * date.\n */\nexport function isSameYear(a: DateValue, b: DateValue): boolean {\n  b = toCalendar(b, a.calendar);\n  a = startOfYear(a);\n  b = startOfYear(b);\n  return a.era === b.era && a.year === b.year;\n}\n\n/** Returns whether the given dates occur on the same day, and are of the same calendar system. */\nexport function isEqualDay(a: DateValue, b: DateValue): boolean {\n  return isEqualCalendar(a.calendar, b.calendar) && isSameDay(a, b);\n}\n\n/** Returns whether the given dates occur in the same month, and are of the same calendar system. */\nexport function isEqualMonth(a: DateValue, b: DateValue): boolean {\n  return isEqualCalendar(a.calendar, b.calendar) && isSameMonth(a, b);\n}\n\n/** Returns whether the given dates occur in the same year, and are of the same calendar system. */\nexport function isEqualYear(a: DateValue, b: DateValue): boolean {\n  return isEqualCalendar(a.calendar, b.calendar) && isSameYear(a, b);\n}\n\n/** Returns whether two calendars are the same. */\nexport function isEqualCalendar(a: Calendar, b: Calendar): boolean {\n  return a.isEqual?.(b) ?? b.isEqual?.(a) ?? a.identifier === b.identifier;\n}\n\n/** Returns whether the date is today in the given time zone. */\nexport function isToday(date: DateValue, timeZone: string): boolean {\n  return isSameDay(date, today(timeZone));\n}\n\nconst DAY_MAP = {\n  sun: 0,\n  mon: 1,\n  tue: 2,\n  wed: 3,\n  thu: 4,\n  fri: 5,\n  sat: 6\n};\n\ntype DayOfWeek = 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat';\n\n/**\n * Returns the day of week for the given date and locale. Days are numbered from zero to six,\n * where zero is the first day of the week in the given locale. For example, in the United States,\n * the first day of the week is Sunday, but in France it is Monday.\n */\nexport function getDayOfWeek(date: DateValue, locale: string, firstDayOfWeek?: DayOfWeek): number {\n  let julian = date.calendar.toJulianDay(date);\n\n  // If julian is negative, then julian % 7 will be negative, so we adjust\n  // accordingly.  Julian day 0 is Monday.\n  let weekStart = firstDayOfWeek ? DAY_MAP[firstDayOfWeek] : getWeekStart(locale);\n  let dayOfWeek = Math.ceil(julian + 1 - weekStart) % 7;\n  if (dayOfWeek < 0) {\n    dayOfWeek += 7;\n  }\n\n  return dayOfWeek;\n}\n\n/** Returns the current time in the given time zone. */\nexport function now(timeZone: string): ZonedDateTime {\n  return fromAbsolute(Date.now(), timeZone);\n}\n\n/** Returns today's date in the given time zone. */\nexport function today(timeZone: string): CalendarDate {\n  return toCalendarDate(now(timeZone));\n}\n\nexport function compareDate(a: AnyCalendarDate, b: AnyCalendarDate): number {\n  return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b);\n}\n\nexport function compareTime(a: AnyTime, b: AnyTime): number {\n  return timeToMs(a) - timeToMs(b);\n}\n\nfunction timeToMs(a: AnyTime): number {\n  return a.hour * 60 * 60 * 1000 + a.minute * 60 * 1000 + a.second * 1000 + a.millisecond;\n}\n\n/**\n * Returns the number of hours in the given date and time zone.\n * Usually this is 24, but it could be 23 or 25 if the date is on a daylight saving transition.\n */\nexport function getHoursInDay(a: CalendarDate, timeZone: string): number {\n  let ms = toAbsolute(a, timeZone);\n  let tomorrow = a.add({days: 1});\n  let tomorrowMs = toAbsolute(tomorrow, timeZone);\n  return (tomorrowMs - ms) / 3600000;\n}\n\nlet localTimeZone: string | null = null;\nlet localTimeZoneOverride = false;\n\n/** Returns the time zone identifier for the current user. */\nexport function getLocalTimeZone(): string {\n  if (localTimeZone == null) {\n    localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;\n  }\n\n  return localTimeZone!;\n}\n\n/** Sets the time zone identifier for the current user. */\nexport function setLocalTimeZone(timeZone: string): void {\n  localTimeZoneOverride = true;\n  localTimeZone = timeZone;\n}\n\n/** Resets the time zone identifier for the current user. */\nexport function resetLocalTimeZone(): void {\n  localTimeZoneOverride = false;\n  localTimeZone = null;\n}\n\n/** Returns whether the local time zone has been explicitly overridden via `setLocalTimeZone`. */\nexport function isLocalTimeZoneOverridden(): boolean {\n  return localTimeZoneOverride;\n}\n\n/** Returns the first date of the month for the given date. */\nexport function startOfMonth(date: ZonedDateTime): ZonedDateTime;\nexport function startOfMonth(date: CalendarDateTime): CalendarDateTime;\nexport function startOfMonth(date: CalendarDate): CalendarDate;\nexport function startOfMonth(date: DateValue): DateValue;\nexport function startOfMonth(date: DateValue): DateValue {\n  // Use `subtract` instead of `set` so we don't get constrained in an era.\n  return date.subtract({days: date.day - 1});\n}\n\n/** Returns the last date of the month for the given date. */\nexport function endOfMonth(date: ZonedDateTime): ZonedDateTime;\nexport function endOfMonth(date: CalendarDateTime): CalendarDateTime;\nexport function endOfMonth(date: CalendarDate): CalendarDate;\nexport function endOfMonth(date: DateValue): DateValue;\nexport function endOfMonth(date: DateValue): DateValue {\n  return date.add({days: date.calendar.getDaysInMonth(date) - date.day});\n}\n\n/** Returns the first day of the year for the given date. */\nexport function startOfYear(date: ZonedDateTime): ZonedDateTime;\nexport function startOfYear(date: CalendarDateTime): CalendarDateTime;\nexport function startOfYear(date: CalendarDate): CalendarDate;\nexport function startOfYear(date: DateValue): DateValue;\nexport function startOfYear(date: DateValue): DateValue {\n  return startOfMonth(date.subtract({months: date.month - 1}));\n}\n\n/** Returns the last day of the year for the given date. */\nexport function endOfYear(date: ZonedDateTime): ZonedDateTime;\nexport function endOfYear(date: CalendarDateTime): CalendarDateTime;\nexport function endOfYear(date: CalendarDate): CalendarDate;\nexport function endOfYear(date: DateValue): DateValue;\nexport function endOfYear(date: DateValue): DateValue {\n  return endOfMonth(date.add({months: date.calendar.getMonthsInYear(date) - date.month}));\n}\n\nexport function getMinimumMonthInYear(date: AnyCalendarDate): number {\n  if (date.calendar.getMinimumMonthInYear) {\n    return date.calendar.getMinimumMonthInYear(date);\n  }\n\n  return 1;\n}\n\nexport function getMinimumDayInMonth(date: AnyCalendarDate): number {\n  if (date.calendar.getMinimumDayInMonth) {\n    return date.calendar.getMinimumDayInMonth(date);\n  }\n\n  return 1;\n}\n\n/** Returns the first date of the week for the given date and locale. */\nexport function startOfWeek(\n  date: ZonedDateTime,\n  locale: string,\n  firstDayOfWeek?: DayOfWeek\n): ZonedDateTime;\nexport function startOfWeek(\n  date: CalendarDateTime,\n  locale: string,\n  firstDayOfWeek?: DayOfWeek\n): CalendarDateTime;\nexport function startOfWeek(\n  date: CalendarDate,\n  locale: string,\n  firstDayOfWeek?: DayOfWeek\n): CalendarDate;\nexport function startOfWeek(date: DateValue, locale: string, firstDayOfWeek?: DayOfWeek): DateValue;\nexport function startOfWeek(\n  date: DateValue,\n  locale: string,\n  firstDayOfWeek?: DayOfWeek\n): DateValue {\n  let dayOfWeek = getDayOfWeek(date, locale, firstDayOfWeek);\n  return date.subtract({days: dayOfWeek});\n}\n\n/** Returns the last date of the week for the given date and locale. */\nexport function endOfWeek(\n  date: ZonedDateTime,\n  locale: string,\n  firstDayOfWeek?: DayOfWeek\n): ZonedDateTime;\nexport function endOfWeek(\n  date: CalendarDateTime,\n  locale: string,\n  firstDayOfWeek?: DayOfWeek\n): CalendarDateTime;\nexport function endOfWeek(\n  date: CalendarDate,\n  locale: string,\n  firstDayOfWeek?: DayOfWeek\n): CalendarDate;\nexport function endOfWeek(date: DateValue, locale: string, firstDayOfWeek?: DayOfWeek): DateValue;\nexport function endOfWeek(date: DateValue, locale: string, firstDayOfWeek?: DayOfWeek): DateValue {\n  return startOfWeek(date, locale, firstDayOfWeek).add({days: 6});\n}\n\nconst cachedRegions = new Map<string, string>();\nconst cachedWeekInfo = new Map<string, {firstDay: number}>();\n\nfunction getRegion(locale: string): string | undefined {\n  // If the Intl.Locale API is available, use it to get the region for the locale.\n  // @ts-ignore\n  if (Intl.Locale) {\n    // Constructing an Intl.Locale is expensive, so cache the result.\n    let region = cachedRegions.get(locale);\n    if (!region) {\n      // @ts-ignore\n      region = new Intl.Locale(locale).maximize().region;\n      if (region) {\n        cachedRegions.set(locale, region);\n      }\n    }\n    return region;\n  }\n\n  // If not, just try splitting the string.\n  // If the second part of the locale string is 'u',\n  // then this is a unicode extension, so ignore it.\n  // Otherwise, it should be the region.\n  let part = locale.split('-')[1];\n  return part === 'u' ? undefined : part;\n}\n\nfunction getWeekStart(locale: string): number {\n  // TODO: use Intl.Locale for this once browsers support the weekInfo property\n  // https://github.com/tc39/proposal-intl-locale-info\n  let weekInfo = cachedWeekInfo.get(locale);\n  if (!weekInfo) {\n    if (Intl.Locale) {\n      // @ts-ignore\n      let localeInst = new Intl.Locale(locale);\n      if ('getWeekInfo' in localeInst) {\n        // @ts-expect-error\n        weekInfo = localeInst.getWeekInfo();\n        if (weekInfo) {\n          cachedWeekInfo.set(locale, weekInfo);\n          return weekInfo.firstDay;\n        }\n      }\n    }\n    let region = getRegion(locale);\n    if (locale.includes('-fw-')) {\n      // pull the value for the attribute fw from strings such as en-US-u-ca-iso8601-fw-tue or en-US-u-ca-iso8601-fw-mon-nu-thai\n      // where the fw attribute could be followed by another unicode locale extension or not\n      let day = locale.split('-fw-')[1].split('-')[0];\n      if (day === 'mon') {\n        weekInfo = {firstDay: 1};\n      } else if (day === 'tue') {\n        weekInfo = {firstDay: 2};\n      } else if (day === 'wed') {\n        weekInfo = {firstDay: 3};\n      } else if (day === 'thu') {\n        weekInfo = {firstDay: 4};\n      } else if (day === 'fri') {\n        weekInfo = {firstDay: 5};\n      } else if (day === 'sat') {\n        weekInfo = {firstDay: 6};\n      } else {\n        weekInfo = {firstDay: 0};\n      }\n    } else if (locale.includes('-ca-iso8601')) {\n      weekInfo = {firstDay: 1};\n    } else {\n      weekInfo = {firstDay: region ? weekStartData[region] || 0 : 0};\n    }\n    cachedWeekInfo.set(locale, weekInfo);\n  }\n\n  return weekInfo.firstDay;\n}\n\n/** Returns the number of weeks in the given month and locale. */\nexport function getWeeksInMonth(\n  date: DateValue,\n  locale: string,\n  firstDayOfWeek?: DayOfWeek\n): number {\n  let days = date.calendar.getDaysInMonth(date);\n  return Math.ceil((getDayOfWeek(startOfMonth(date), locale, firstDayOfWeek) + days) / 7);\n}\n\n/** Returns the lesser of the two provider dates. */\nexport function minDate<A extends DateValue, B extends DateValue>(\n  a?: A | null,\n  b?: B | null\n): A | B | null | undefined {\n  if (a && b) {\n    return a.compare(b) <= 0 ? a : b;\n  }\n\n  return a || b;\n}\n\n/** Returns the greater of the two provider dates. */\nexport function maxDate<A extends DateValue, B extends DateValue>(\n  a?: A | null,\n  b?: B | null\n): A | B | null | undefined {\n  if (a && b) {\n    return a.compare(b) >= 0 ? a : b;\n  }\n\n  return a || b;\n}\n\nconst WEEKEND_DATA = {\n  AF: [4, 5],\n  AE: [5, 6],\n  BH: [5, 6],\n  DZ: [5, 6],\n  EG: [5, 6],\n  IL: [5, 6],\n  IQ: [5, 6],\n  IR: [5, 5],\n  JO: [5, 6],\n  KW: [5, 6],\n  LY: [5, 6],\n  OM: [5, 6],\n  QA: [5, 6],\n  SA: [5, 6],\n  SD: [5, 6],\n  SY: [5, 6],\n  YE: [5, 6]\n};\n\n/** Returns whether the given date is on a weekend in the given locale. */\nexport function isWeekend(date: DateValue, locale: string): boolean {\n  let julian = date.calendar.toJulianDay(date);\n\n  // If julian is negative, then julian % 7 will be negative, so we adjust\n  // accordingly.  Julian day 0 is Monday.\n  let dayOfWeek = Math.ceil(julian + 1) % 7;\n  if (dayOfWeek < 0) {\n    dayOfWeek += 7;\n  }\n\n  let region = getRegion(locale);\n  // Use Intl.Locale for this once weekInfo is supported.\n  // https://github.com/tc39/proposal-intl-locale-info\n  let [start, end] = WEEKEND_DATA[region!] || [6, 0];\n  return dayOfWeek === start || dayOfWeek === end;\n}\n\n/** Returns whether the given date is on a weekday in the given locale. */\nexport function isWeekday(date: DateValue, locale: string): boolean {\n  return !isWeekend(date, locale);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from the TC39 Temporal proposal.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {\n  AnyCalendarDate,\n  AnyDateTime,\n  AnyTime,\n  Calendar,\n  DateFields,\n  Disambiguation,\n  TimeFields\n} from './types';\nimport {CalendarDate, CalendarDateTime, Time, ZonedDateTime} from './CalendarDate';\nimport {constrain} from './manipulation';\nimport {getExtendedYear, GregorianCalendar} from './calendars/GregorianCalendar';\nimport {getLocalTimeZone, isEqualCalendar, isLocalTimeZoneOverridden} from './queries';\nimport {Mutable} from './utils';\n\nexport function epochFromDate(date: AnyDateTime): number {\n  date = toCalendar(date, new GregorianCalendar());\n  let year = getExtendedYear(date.era, date.year);\n  return epochFromParts(\n    year,\n    date.month,\n    date.day,\n    date.hour,\n    date.minute,\n    date.second,\n    date.millisecond\n  );\n}\n\nfunction epochFromParts(\n  year: number,\n  month: number,\n  day: number,\n  hour: number,\n  minute: number,\n  second: number,\n  millisecond: number\n): number {\n  // Note: Date.UTC() interprets one and two-digit years as being in the\n  // 20th century, so don't use it\n  let date = new Date();\n  date.setUTCHours(hour, minute, second, millisecond);\n  date.setUTCFullYear(year, month - 1, day);\n  return date.getTime();\n}\n\nexport function getTimeZoneOffset(ms: number, timeZone: string): number {\n  // Fast path for UTC.\n  if (timeZone === 'UTC') {\n    return 0;\n  }\n\n  // Fast path: for local timezone after 1970, use native Date.\n  // Skip this fast path if the local timezone was explicitly overridden via setLocalTimeZone,\n  // since native Date always uses the browser's timezone, not the overridden one.\n  if (ms > 0 && timeZone === getLocalTimeZone() && !isLocalTimeZoneOverridden()) {\n    return new Date(ms).getTimezoneOffset() * -60 * 1000;\n  }\n\n  let {year, month, day, hour, minute, second} = getTimeZoneParts(ms, timeZone);\n  let utc = epochFromParts(year, month, day, hour, minute, second, 0);\n  return utc - Math.floor(ms / 1000) * 1000;\n}\n\nconst formattersByTimeZone = new Map<string, Intl.DateTimeFormat>();\n\nfunction getTimeZoneParts(ms: number, timeZone: string) {\n  let formatter = formattersByTimeZone.get(timeZone);\n  if (!formatter) {\n    formatter = new Intl.DateTimeFormat('en-US', {\n      timeZone,\n      hour12: false,\n      era: 'short',\n      year: 'numeric',\n      month: 'numeric',\n      day: 'numeric',\n      hour: 'numeric',\n      minute: 'numeric',\n      second: 'numeric'\n    });\n\n    formattersByTimeZone.set(timeZone, formatter);\n  }\n\n  let parts = formatter.formatToParts(new Date(ms));\n  let namedParts: {[name: string]: string} = {};\n  for (let part of parts) {\n    if (part.type !== 'literal') {\n      namedParts[part.type] = part.value;\n    }\n  }\n\n  return {\n    // Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253\n    year:\n      namedParts.era === 'BC' || namedParts.era === 'B' ? -namedParts.year + 1 : +namedParts.year,\n    month: +namedParts.month,\n    day: +namedParts.day,\n    hour: namedParts.hour === '24' ? 0 : +namedParts.hour, // bugs.chromium.org/p/chromium/issues/detail?id=1045791\n    minute: +namedParts.minute,\n    second: +namedParts.second\n  };\n}\n\nconst DAYMILLIS = 86400000;\n\nexport function possibleAbsolutes(date: CalendarDateTime, timeZone: string): number[] {\n  let ms = epochFromDate(date);\n  let earlier = ms - getTimeZoneOffset(ms - DAYMILLIS, timeZone);\n  let later = ms - getTimeZoneOffset(ms + DAYMILLIS, timeZone);\n  return getValidWallTimes(date, timeZone, earlier, later);\n}\n\nfunction getValidWallTimes(\n  date: CalendarDateTime,\n  timeZone: string,\n  earlier: number,\n  later: number\n): number[] {\n  let found = earlier === later ? [earlier] : [earlier, later];\n  return found.filter(absolute => isValidWallTime(date, timeZone, absolute));\n}\n\nfunction isValidWallTime(date: CalendarDateTime, timeZone: string, absolute: number) {\n  let parts = getTimeZoneParts(absolute, timeZone);\n  return (\n    date.year === parts.year &&\n    date.month === parts.month &&\n    date.day === parts.day &&\n    date.hour === parts.hour &&\n    date.minute === parts.minute &&\n    date.second === parts.second\n  );\n}\n\nexport function toAbsolute(\n  date: CalendarDate | CalendarDateTime,\n  timeZone: string,\n  disambiguation: Disambiguation = 'compatible'\n): number {\n  let dateTime = toCalendarDateTime(date);\n\n  // Fast path: if the time zone is UTC, use native Date.\n  if (timeZone === 'UTC') {\n    return epochFromDate(dateTime);\n  }\n\n  // Fast path: if the time zone is the local timezone and disambiguation is compatible, use native Date.\n  // Skip this fast path if the local timezone was explicitly overridden via setLocalTimeZone,\n  // since native Date always uses the browser's timezone, not the overridden one.\n  if (\n    timeZone === getLocalTimeZone() &&\n    disambiguation === 'compatible' &&\n    !isLocalTimeZoneOverridden()\n  ) {\n    dateTime = toCalendar(dateTime, new GregorianCalendar());\n\n    // Don't use Date constructor here because two-digit years are interpreted in the 20th century.\n    let date = new Date();\n    let year = getExtendedYear(dateTime.era, dateTime.year);\n    date.setFullYear(year, dateTime.month - 1, dateTime.day);\n    date.setHours(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);\n    return date.getTime();\n  }\n\n  let ms = epochFromDate(dateTime);\n  let offsetBefore = getTimeZoneOffset(ms - DAYMILLIS, timeZone);\n  let offsetAfter = getTimeZoneOffset(ms + DAYMILLIS, timeZone);\n  let valid = getValidWallTimes(dateTime, timeZone, ms - offsetBefore, ms - offsetAfter);\n\n  if (valid.length === 1) {\n    return valid[0];\n  }\n\n  if (valid.length > 1) {\n    switch (disambiguation) {\n      // 'compatible' means 'earlier' for \"fall back\" transitions\n      case 'compatible':\n      case 'earlier':\n        return valid[0];\n      case 'later':\n        return valid[valid.length - 1];\n      case 'reject':\n        throw new RangeError('Multiple possible absolute times found');\n    }\n  }\n\n  switch (disambiguation) {\n    case 'earlier':\n      return Math.min(ms - offsetBefore, ms - offsetAfter);\n    // 'compatible' means 'later' for \"spring forward\" transitions\n    case 'compatible':\n    case 'later':\n      return Math.max(ms - offsetBefore, ms - offsetAfter);\n    case 'reject':\n      throw new RangeError('No such absolute time found');\n  }\n}\n\nexport function toDate(\n  dateTime: CalendarDate | CalendarDateTime,\n  timeZone: string,\n  disambiguation: Disambiguation = 'compatible'\n): Date {\n  return new Date(toAbsolute(dateTime, timeZone, disambiguation));\n}\n\n/**\n * Takes a Unix epoch (milliseconds since 1970) and converts it to the provided time zone.\n */\nexport function fromAbsolute(ms: number, timeZone: string): ZonedDateTime {\n  let offset = getTimeZoneOffset(ms, timeZone);\n  let date = new Date(ms + offset);\n  let year = date.getUTCFullYear();\n  let month = date.getUTCMonth() + 1;\n  let day = date.getUTCDate();\n  let hour = date.getUTCHours();\n  let minute = date.getUTCMinutes();\n  let second = date.getUTCSeconds();\n  let millisecond = date.getUTCMilliseconds();\n\n  return new ZonedDateTime(\n    year < 1 ? 'BC' : 'AD',\n    year < 1 ? -year + 1 : year,\n    month,\n    day,\n    timeZone,\n    offset,\n    hour,\n    minute,\n    second,\n    millisecond\n  );\n}\n\n/**\n * Takes a `Date` object and converts it to the provided time zone.\n */\nexport function fromDate(date: Date, timeZone: string): ZonedDateTime {\n  return fromAbsolute(date.getTime(), timeZone);\n}\n\n/**\n * Takes a `Date` object and converts it to the time zone identifier for the current user.\n */\nexport function fromDateToLocal(date: Date): ZonedDateTime {\n  return fromDate(date, getLocalTimeZone());\n}\n\n/**\n * Converts a value with date components such as a `CalendarDateTime` or `ZonedDateTime` into a\n * `CalendarDate`.\n */\nexport function toCalendarDate(dateTime: AnyCalendarDate): CalendarDate {\n  return new CalendarDate(\n    dateTime.calendar,\n    dateTime.era,\n    dateTime.year,\n    dateTime.month,\n    dateTime.day\n  );\n}\n\nexport function toDateFields(date: AnyCalendarDate): DateFields {\n  return {\n    era: date.era,\n    year: date.year,\n    month: date.month,\n    day: date.day\n  };\n}\n\nexport function toTimeFields(date: AnyTime): TimeFields {\n  return {\n    hour: date.hour,\n    minute: date.minute,\n    second: date.second,\n    millisecond: date.millisecond\n  };\n}\n\n/**\n * Converts a date value to a `CalendarDateTime`. An optional `Time` value can be passed to set the\n * time of the resulting value, otherwise it will default to midnight.\n */\nexport function toCalendarDateTime(\n  date: CalendarDate | CalendarDateTime | ZonedDateTime,\n  time?: AnyTime\n): CalendarDateTime {\n  let hour = 0,\n    minute = 0,\n    second = 0,\n    millisecond = 0;\n  if ('timeZone' in date) {\n    ({hour, minute, second, millisecond} = date);\n  } else if ('hour' in date && !time) {\n    return date;\n  }\n\n  if (time) {\n    ({hour, minute, second, millisecond} = time);\n  }\n\n  return new CalendarDateTime(\n    date.calendar,\n    date.era,\n    date.year,\n    date.month,\n    date.day,\n    hour,\n    minute,\n    second,\n    millisecond\n  );\n}\n\n/** Extracts the time components from a value containing a date and time. */\nexport function toTime(dateTime: CalendarDateTime | ZonedDateTime): Time {\n  return new Time(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);\n}\n\n/** Converts a date from one calendar system to another. */\nexport function toCalendar<T extends AnyCalendarDate>(date: T, calendar: Calendar): T {\n  if (isEqualCalendar(date.calendar, calendar)) {\n    return date;\n  }\n\n  let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));\n  let copy: Mutable<T> = date.copy();\n  copy.calendar = calendar;\n  copy.era = calendarDate.era;\n  copy.year = calendarDate.year;\n  copy.month = calendarDate.month;\n  copy.day = calendarDate.day;\n  constrain(copy);\n  return copy;\n}\n\n/**\n * Converts a date value to a `ZonedDateTime` in the provided time zone. The `disambiguation` option\n * can be set to control how values that fall on daylight saving time changes are interpreted.\n */\nexport function toZoned(\n  date: CalendarDate | CalendarDateTime | ZonedDateTime,\n  timeZone: string,\n  disambiguation?: Disambiguation\n): ZonedDateTime {\n  if (date instanceof ZonedDateTime) {\n    if (date.timeZone === timeZone) {\n      return date;\n    }\n\n    return toTimeZone(date, timeZone);\n  }\n\n  let ms = toAbsolute(date, timeZone, disambiguation);\n  return fromAbsolute(ms, timeZone);\n}\n\nexport function zonedToDate(date: ZonedDateTime): Date {\n  let ms = epochFromDate(date) - date.offset;\n  return new Date(ms);\n}\n\n/** Converts a `ZonedDateTime` from one time zone to another. */\nexport function toTimeZone(date: ZonedDateTime, timeZone: string): ZonedDateTime {\n  let ms = epochFromDate(date) - date.offset;\n  return toCalendar(fromAbsolute(ms, timeZone), date.calendar);\n}\n\n/** Converts the given `ZonedDateTime` into the user's local time zone. */\nexport function toLocalTimeZone(date: ZonedDateTime): ZonedDateTime {\n  return toTimeZone(date, getLocalTimeZone());\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n  AnyCalendarDate,\n  AnyDateTime,\n  AnyTime,\n  CycleOptions,\n  CycleTimeOptions,\n  DateDuration,\n  DateField,\n  DateFields,\n  DateTimeDuration,\n  Disambiguation,\n  TimeDuration,\n  TimeField,\n  TimeFields\n} from './types';\nimport {CalendarDate, CalendarDateTime, Time, ZonedDateTime} from './CalendarDate';\nimport {\n  epochFromDate,\n  fromAbsolute,\n  toAbsolute,\n  toCalendar,\n  toCalendarDateTime\n} from './conversion';\nimport {GregorianCalendar} from './calendars/GregorianCalendar';\nimport {Mutable} from './utils';\n\nconst ONE_HOUR = 3600000;\n\nexport function add(date: CalendarDateTime, duration: DateTimeDuration): CalendarDateTime;\nexport function add(date: CalendarDate, duration: DateDuration): CalendarDate;\nexport function add(\n  date: CalendarDate | CalendarDateTime,\n  duration: DateTimeDuration\n): CalendarDate | CalendarDateTime;\nexport function add(\n  date: CalendarDate | CalendarDateTime,\n  duration: DateTimeDuration\n): Mutable<AnyCalendarDate | AnyDateTime> {\n  let mutableDate: Mutable<AnyCalendarDate | AnyDateTime> = date.copy();\n  let days = 'hour' in mutableDate ? addTimeFields(mutableDate, duration) : 0;\n\n  addYears(mutableDate, duration.years || 0);\n  if (mutableDate.calendar.balanceYearMonth) {\n    mutableDate.calendar.balanceYearMonth(mutableDate, date);\n  }\n\n  mutableDate.month += duration.months || 0;\n\n  balanceYearMonth(mutableDate);\n  constrainMonthDay(mutableDate);\n\n  mutableDate.day += (duration.weeks || 0) * 7;\n  mutableDate.day += duration.days || 0;\n  mutableDate.day += days;\n\n  balanceDay(mutableDate);\n\n  if (mutableDate.calendar.balanceDate) {\n    mutableDate.calendar.balanceDate(mutableDate);\n  }\n\n  // Constrain in case adding ended up with a date outside the valid range for the calendar system.\n  // The behavior here is slightly different than when constraining in the `set` function in that\n  // we adjust smaller fields to their minimum/maximum values rather than constraining each field\n  // individually. This matches the general behavior of `add` vs `set` regarding how fields are balanced.\n  if (mutableDate.year < 1) {\n    mutableDate.year = 1;\n    mutableDate.month = 1;\n    mutableDate.day = 1;\n  }\n\n  let maxYear = mutableDate.calendar.getYearsInEra(mutableDate);\n  if (mutableDate.year > maxYear) {\n    let isInverseEra = mutableDate.calendar.isInverseEra?.(mutableDate);\n    mutableDate.year = maxYear;\n    mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate);\n    mutableDate.day = isInverseEra ? 1 : mutableDate.calendar.getDaysInMonth(mutableDate);\n  }\n\n  if (mutableDate.month < 1) {\n    mutableDate.month = 1;\n    mutableDate.day = 1;\n  }\n\n  let maxMonth = mutableDate.calendar.getMonthsInYear(mutableDate);\n  if (mutableDate.month > maxMonth) {\n    mutableDate.month = maxMonth;\n    mutableDate.day = mutableDate.calendar.getDaysInMonth(mutableDate);\n  }\n\n  mutableDate.day = Math.max(\n    1,\n    Math.min(mutableDate.calendar.getDaysInMonth(mutableDate), mutableDate.day)\n  );\n  return mutableDate;\n}\n\nfunction addYears(date: Mutable<AnyCalendarDate>, years: number) {\n  if (date.calendar.isInverseEra?.(date)) {\n    years = -years;\n  }\n\n  date.year += years;\n}\n\nfunction balanceYearMonth(date: Mutable<AnyCalendarDate>) {\n  while (date.month < 1) {\n    addYears(date, -1);\n    date.month += date.calendar.getMonthsInYear(date);\n  }\n\n  let monthsInYear = 0;\n  while (date.month > (monthsInYear = date.calendar.getMonthsInYear(date))) {\n    date.month -= monthsInYear;\n    addYears(date, 1);\n  }\n}\n\nfunction balanceDay(date: Mutable<AnyCalendarDate>) {\n  while (date.day < 1) {\n    date.month--;\n    balanceYearMonth(date);\n    date.day += date.calendar.getDaysInMonth(date);\n  }\n\n  while (date.day > date.calendar.getDaysInMonth(date)) {\n    date.day -= date.calendar.getDaysInMonth(date);\n    date.month++;\n    balanceYearMonth(date);\n  }\n}\n\nfunction constrainMonthDay(date: Mutable<AnyCalendarDate>) {\n  date.month = Math.max(1, Math.min(date.calendar.getMonthsInYear(date), date.month));\n  date.day = Math.max(1, Math.min(date.calendar.getDaysInMonth(date), date.day));\n}\n\nexport function constrain(date: Mutable<AnyCalendarDate>): void {\n  if (date.calendar.constrainDate) {\n    date.calendar.constrainDate(date);\n  }\n\n  date.year = Math.max(1, Math.min(date.calendar.getYearsInEra(date), date.year));\n  constrainMonthDay(date);\n}\n\nexport function invertDuration(duration: DateTimeDuration): DateTimeDuration {\n  let inverseDuration = {};\n  for (let key in duration) {\n    if (typeof duration[key] === 'number') {\n      inverseDuration[key] = -duration[key];\n    }\n  }\n\n  return inverseDuration;\n}\n\nexport function subtract(date: CalendarDateTime, duration: DateTimeDuration): CalendarDateTime;\nexport function subtract(date: CalendarDate, duration: DateDuration): CalendarDate;\nexport function subtract(\n  date: CalendarDate | CalendarDateTime,\n  duration: DateTimeDuration\n): CalendarDate | CalendarDateTime {\n  return add(date, invertDuration(duration));\n}\n\nexport function set(date: CalendarDateTime, fields: DateFields): CalendarDateTime;\nexport function set(date: CalendarDate, fields: DateFields): CalendarDate;\nexport function set(\n  date: CalendarDate | CalendarDateTime,\n  fields: DateFields\n): Mutable<AnyCalendarDate> {\n  let mutableDate: Mutable<AnyCalendarDate> = date.copy();\n\n  if (fields.era != null) {\n    mutableDate.era = fields.era;\n  }\n\n  if (fields.year != null) {\n    mutableDate.year = fields.year;\n  }\n\n  if (fields.month != null) {\n    mutableDate.month = fields.month;\n  }\n\n  if (fields.day != null) {\n    mutableDate.day = fields.day;\n  }\n\n  constrain(mutableDate);\n  return mutableDate;\n}\n\nexport function setTime(value: CalendarDateTime, fields: TimeFields): CalendarDateTime;\nexport function setTime(value: Time, fields: TimeFields): Time;\nexport function setTime(\n  value: Time | CalendarDateTime,\n  fields: TimeFields\n): Mutable<Time | CalendarDateTime> {\n  let mutableValue: Mutable<Time | CalendarDateTime> = value.copy();\n\n  if (fields.hour != null) {\n    mutableValue.hour = fields.hour;\n  }\n\n  if (fields.minute != null) {\n    mutableValue.minute = fields.minute;\n  }\n\n  if (fields.second != null) {\n    mutableValue.second = fields.second;\n  }\n\n  if (fields.millisecond != null) {\n    mutableValue.millisecond = fields.millisecond;\n  }\n\n  constrainTime(mutableValue);\n  return mutableValue;\n}\n\nfunction balanceTime(time: Mutable<AnyTime>): number {\n  time.second += Math.floor(time.millisecond / 1000);\n  time.millisecond = nonNegativeMod(time.millisecond, 1000);\n\n  time.minute += Math.floor(time.second / 60);\n  time.second = nonNegativeMod(time.second, 60);\n\n  time.hour += Math.floor(time.minute / 60);\n  time.minute = nonNegativeMod(time.minute, 60);\n\n  let days = Math.floor(time.hour / 24);\n  time.hour = nonNegativeMod(time.hour, 24);\n\n  return days;\n}\n\nexport function constrainTime(time: Mutable<AnyTime>): void {\n  time.millisecond = Math.max(0, Math.min(time.millisecond, 1000));\n  time.second = Math.max(0, Math.min(time.second, 59));\n  time.minute = Math.max(0, Math.min(time.minute, 59));\n  time.hour = Math.max(0, Math.min(time.hour, 23));\n}\n\nfunction nonNegativeMod(a: number, b: number) {\n  let result = a % b;\n  if (result < 0) {\n    result += b;\n  }\n  return result;\n}\n\nfunction addTimeFields(time: Mutable<AnyTime>, duration: TimeDuration): number {\n  time.hour += duration.hours || 0;\n  time.minute += duration.minutes || 0;\n  time.second += duration.seconds || 0;\n  time.millisecond += duration.milliseconds || 0;\n  return balanceTime(time);\n}\n\nexport function addTime(time: Time, duration: TimeDuration): Time {\n  let res = time.copy();\n  addTimeFields(res, duration);\n  return res;\n}\n\nexport function subtractTime(time: Time, duration: TimeDuration): Time {\n  return addTime(time, invertDuration(duration));\n}\n\nexport function cycleDate(\n  value: CalendarDateTime,\n  field: DateField,\n  amount: number,\n  options?: CycleOptions\n): CalendarDateTime;\nexport function cycleDate(\n  value: CalendarDate,\n  field: DateField,\n  amount: number,\n  options?: CycleOptions\n): CalendarDate;\nexport function cycleDate(\n  value: CalendarDate | CalendarDateTime,\n  field: DateField,\n  amount: number,\n  options?: CycleOptions\n): Mutable<CalendarDate | CalendarDateTime> {\n  let mutable: Mutable<CalendarDate | CalendarDateTime> = value.copy();\n\n  switch (field) {\n    case 'era': {\n      let eras = value.calendar.getEras();\n      let eraIndex = eras.indexOf(value.era);\n      if (eraIndex < 0) {\n        throw new Error('Invalid era: ' + value.era);\n      }\n      eraIndex = cycleValue(eraIndex, amount, 0, eras.length - 1, options?.round);\n      mutable.era = eras[eraIndex];\n\n      // Constrain the year and other fields within the era, so the era doesn't change when we balance below.\n      constrain(mutable);\n      break;\n    }\n    case 'year': {\n      if (mutable.calendar.isInverseEra?.(mutable)) {\n        amount = -amount;\n      }\n\n      // The year field should not cycle within the era as that can cause weird behavior affecting other fields.\n      // We need to also allow values < 1 so that decrementing goes to the previous era. If we get -Infinity back\n      // we know we wrapped around after reaching 9999 (the maximum), so set the year back to 1.\n      mutable.year = cycleValue(value.year, amount, -Infinity, 9999, options?.round);\n      if (mutable.year === -Infinity) {\n        mutable.year = 1;\n      }\n\n      if (mutable.calendar.balanceYearMonth) {\n        mutable.calendar.balanceYearMonth(mutable, value);\n      }\n      break;\n    }\n    case 'month':\n      mutable.month = cycleValue(\n        value.month,\n        amount,\n        1,\n        value.calendar.getMonthsInYear(value),\n        options?.round\n      );\n      break;\n    case 'day':\n      mutable.day = cycleValue(\n        value.day,\n        amount,\n        1,\n        value.calendar.getDaysInMonth(value),\n        options?.round\n      );\n      break;\n    default:\n      throw new Error('Unsupported field ' + field);\n  }\n\n  if (value.calendar.balanceDate) {\n    value.calendar.balanceDate(mutable);\n  }\n\n  constrain(mutable);\n  return mutable;\n}\n\nexport function cycleTime(\n  value: CalendarDateTime,\n  field: TimeField,\n  amount: number,\n  options?: CycleTimeOptions\n): CalendarDateTime;\nexport function cycleTime(\n  value: Time,\n  field: TimeField,\n  amount: number,\n  options?: CycleTimeOptions\n): Time;\nexport function cycleTime(\n  value: Time | CalendarDateTime,\n  field: TimeField,\n  amount: number,\n  options?: CycleTimeOptions\n): Mutable<Time | CalendarDateTime> {\n  let mutable: Mutable<Time | CalendarDateTime> = value.copy();\n\n  switch (field) {\n    case 'hour': {\n      let hours = value.hour;\n      let min = 0;\n      let max = 23;\n      if (options?.hourCycle === 12) {\n        let isPM = hours >= 12;\n        min = isPM ? 12 : 0;\n        max = isPM ? 23 : 11;\n      }\n      mutable.hour = cycleValue(hours, amount, min, max, options?.round);\n      break;\n    }\n    case 'minute':\n      mutable.minute = cycleValue(value.minute, amount, 0, 59, options?.round);\n      break;\n    case 'second':\n      mutable.second = cycleValue(value.second, amount, 0, 59, options?.round);\n      break;\n    case 'millisecond':\n      mutable.millisecond = cycleValue(value.millisecond, amount, 0, 999, options?.round);\n      break;\n    default:\n      throw new Error('Unsupported field ' + field);\n  }\n\n  return mutable;\n}\n\nfunction cycleValue(value: number, amount: number, min: number, max: number, round = false) {\n  if (round) {\n    value += Math.sign(amount);\n\n    if (value < min) {\n      value = max;\n    }\n\n    let div = Math.abs(amount);\n    if (amount > 0) {\n      value = Math.ceil(value / div) * div;\n    } else {\n      value = Math.floor(value / div) * div;\n    }\n\n    if (value > max) {\n      value = min;\n    }\n  } else {\n    value += amount;\n    if (value < min) {\n      value = max - (min - value - 1);\n    } else if (value > max) {\n      value = min + (value - max - 1);\n    }\n  }\n\n  return value;\n}\n\nexport function addZoned(dateTime: ZonedDateTime, duration: DateTimeDuration): ZonedDateTime {\n  let ms: number;\n  if (\n    (duration.years != null && duration.years !== 0) ||\n    (duration.months != null && duration.months !== 0) ||\n    (duration.weeks != null && duration.weeks !== 0) ||\n    (duration.days != null && duration.days !== 0)\n  ) {\n    let res = add(toCalendarDateTime(dateTime), {\n      years: duration.years,\n      months: duration.months,\n      weeks: duration.weeks,\n      days: duration.days\n    });\n\n    // Changing the date may change the timezone offset, so we need to recompute\n    // using the 'compatible' disambiguation.\n    ms = toAbsolute(res, dateTime.timeZone);\n  } else {\n    // Otherwise, preserve the offset of the original date.\n    ms = epochFromDate(dateTime) - dateTime.offset;\n  }\n\n  // Perform time manipulation in milliseconds rather than on the original time fields to account for DST.\n  // For example, adding one hour during a DST transition may result in the hour field staying the same or\n  // skipping an hour. This results in the offset field changing value instead of the specified field.\n  ms += duration.milliseconds || 0;\n  ms += (duration.seconds || 0) * 1000;\n  ms += (duration.minutes || 0) * 60 * 1000;\n  ms += (duration.hours || 0) * 60 * 60 * 1000;\n\n  let res = fromAbsolute(ms, dateTime.timeZone);\n  return toCalendar(res, dateTime.calendar);\n}\n\nexport function subtractZoned(dateTime: ZonedDateTime, duration: DateTimeDuration): ZonedDateTime {\n  return addZoned(dateTime, invertDuration(duration));\n}\n\nexport function cycleZoned(\n  dateTime: ZonedDateTime,\n  field: DateField | TimeField,\n  amount: number,\n  options?: CycleTimeOptions\n): ZonedDateTime {\n  // For date fields, we want the time to remain consistent and the UTC offset to potentially change to account for DST changes.\n  // For time fields, we want the time to change by the amount given. This may result in the hour field staying the same, but the UTC\n  // offset changing in the case of a backward DST transition, or skipping an hour in the case of a forward DST transition.\n  switch (field) {\n    case 'hour': {\n      let min = 0;\n      let max = 23;\n      if (options?.hourCycle === 12) {\n        let isPM = dateTime.hour >= 12;\n        min = isPM ? 12 : 0;\n        max = isPM ? 23 : 11;\n      }\n\n      // The minimum and maximum hour may be affected by daylight saving time.\n      // For example, it might jump forward at midnight, and skip 1am.\n      // Or it might end at midnight and repeat the 11pm hour. To handle this, we get\n      // the possible absolute times for the min and max, and find the maximum range\n      // that is within the current day.\n      let plainDateTime = toCalendarDateTime(dateTime);\n      let minDate = toCalendar(setTime(plainDateTime, {hour: min}), new GregorianCalendar());\n      let minAbsolute = [\n        toAbsolute(minDate, dateTime.timeZone, 'earlier'),\n        toAbsolute(minDate, dateTime.timeZone, 'later')\n      ].filter(ms => fromAbsolute(ms, dateTime.timeZone).day === minDate.day)[0];\n\n      let maxDate = toCalendar(setTime(plainDateTime, {hour: max}), new GregorianCalendar());\n      let maxAbsolute = [\n        toAbsolute(maxDate, dateTime.timeZone, 'earlier'),\n        toAbsolute(maxDate, dateTime.timeZone, 'later')\n      ]\n        .filter(ms => fromAbsolute(ms, dateTime.timeZone).day === maxDate.day)\n        .pop()!;\n\n      // Since hours may repeat, we need to operate on the absolute time in milliseconds.\n      // This is done in hours from the Unix epoch so that cycleValue works correctly,\n      // and then converted back to milliseconds.\n      let ms = epochFromDate(dateTime) - dateTime.offset;\n      let hours = Math.floor(ms / ONE_HOUR);\n      let remainder = ms % ONE_HOUR;\n      ms =\n        cycleValue(\n          hours,\n          amount,\n          Math.floor(minAbsolute / ONE_HOUR),\n          Math.floor(maxAbsolute / ONE_HOUR),\n          options?.round\n        ) *\n          ONE_HOUR +\n        remainder;\n\n      // Now compute the new timezone offset, and convert the absolute time back to local time.\n      return toCalendar(fromAbsolute(ms, dateTime.timeZone), dateTime.calendar);\n    }\n    case 'minute':\n    case 'second':\n    case 'millisecond':\n      // @ts-ignore\n      return cycleTime(dateTime, field, amount, options);\n    case 'era':\n    case 'year':\n    case 'month':\n    case 'day': {\n      let res = cycleDate(toCalendarDateTime(dateTime), field, amount, options);\n      let ms = toAbsolute(res, dateTime.timeZone);\n      return toCalendar(fromAbsolute(ms, dateTime.timeZone), dateTime.calendar);\n    }\n    default:\n      throw new Error('Unsupported field ' + field);\n  }\n}\n\nexport function setZoned(\n  dateTime: ZonedDateTime,\n  fields: DateFields & TimeFields,\n  disambiguation?: Disambiguation\n): ZonedDateTime {\n  // Set the date/time fields, and recompute the UTC offset to account for DST changes.\n  // We also need to validate by converting back to a local time in case hours are skipped during forward DST transitions.\n  let plainDateTime = toCalendarDateTime(dateTime);\n  let res = setTime(set(plainDateTime, fields), fields);\n\n  // If the resulting plain date time values are equal, return the original time.\n  // We don't want to change the offset when setting the time to the same value.\n  if (res.compare(plainDateTime) === 0) {\n    return dateTime;\n  }\n\n  let ms = toAbsolute(res, dateTime.timeZone, disambiguation);\n  return toCalendar(fromAbsolute(ms, dateTime.timeZone), dateTime.calendar);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AnyDateTime, DateTimeDuration, Disambiguation} from './types';\nimport {CalendarDate, CalendarDateTime, Time, ZonedDateTime} from './CalendarDate';\nimport {\n  epochFromDate,\n  fromAbsolute,\n  possibleAbsolutes,\n  toAbsolute,\n  toCalendar,\n  toCalendarDateTime,\n  toTimeZone\n} from './conversion';\nimport {getLocalTimeZone} from './queries';\nimport {GregorianCalendar} from './calendars/GregorianCalendar';\nimport {Mutable} from './utils';\n\nconst TIME_RE = /^(\\d{2})(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?$/;\nconst DATE_RE = /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})$/;\nconst DATE_TIME_RE =\n  /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?$/;\nconst ZONED_DATE_TIME_RE =\n  /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?(?:([+-]\\d{2})(?::?(\\d{2}))?(?::?(\\d{2}))?)?\\[(.*?)\\]$/;\nconst ABSOLUTE_RE =\n  /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?(?:(?:([+-]\\d{2})(?::?(\\d{2}))?)|Z)$/;\nconst DATE_TIME_DURATION_RE =\n  /^((?<negative>-)|\\+)?P((?<years>\\d*)Y)?((?<months>\\d*)M)?((?<weeks>\\d*)W)?((?<days>\\d*)D)?((?<time>T)((?<hours>\\d*[.,]?\\d{1,9})H)?((?<minutes>\\d*[.,]?\\d{1,9})M)?((?<seconds>\\d*[.,]?\\d{1,9})S)?)?$/;\nconst requiredDurationTimeGroups = ['hours', 'minutes', 'seconds'];\nconst requiredDurationGroups = ['years', 'months', 'weeks', 'days', ...requiredDurationTimeGroups];\n\n/** Parses an ISO 8601 time string. */\nexport function parseTime(value: string): Time {\n  let m = value.match(TIME_RE);\n  if (!m) {\n    throw new Error('Invalid ISO 8601 time string: ' + value);\n  }\n\n  return new Time(\n    parseNumber(m[1], 0, 23),\n    m[2] ? parseNumber(m[2], 0, 59) : 0,\n    m[3] ? parseNumber(m[3], 0, 59) : 0,\n    m[4] ? parseNumber(m[4], 0, Infinity) * 1000 : 0\n  );\n}\n\n/** Parses an ISO 8601 date string, with no time components. */\nexport function parseDate(value: string): CalendarDate {\n  let m = value.match(DATE_RE);\n  if (!m) {\n    if (ABSOLUTE_RE.test(value)) {\n      throw new Error(`Invalid ISO 8601 date string: ${value}. Use parseAbsolute() instead.`);\n    }\n    throw new Error('Invalid ISO 8601 date string: ' + value);\n  }\n\n  let date: Mutable<CalendarDate> = new CalendarDate(\n    parseNumber(m[1], 0, 9999),\n    parseNumber(m[2], 1, 12),\n    1\n  );\n\n  date.day = parseNumber(m[3], 1, date.calendar.getDaysInMonth(date));\n  return date as CalendarDate;\n}\n\n/** Parses an ISO 8601 date and time string, with no time zone. */\nexport function parseDateTime(value: string): CalendarDateTime {\n  let m = value.match(DATE_TIME_RE);\n  if (!m) {\n    if (ABSOLUTE_RE.test(value)) {\n      throw new Error(`Invalid ISO 8601 date time string: ${value}. Use parseAbsolute() instead.`);\n    }\n    throw new Error('Invalid ISO 8601 date time string: ' + value);\n  }\n\n  let year = parseNumber(m[1], -9999, 9999);\n  let era = year < 1 ? 'BC' : 'AD';\n\n  let date: Mutable<CalendarDateTime> = new CalendarDateTime(\n    era,\n    year < 1 ? -year + 1 : year,\n    parseNumber(m[2], 1, 12),\n    1,\n    m[4] ? parseNumber(m[4], 0, 23) : 0,\n    m[5] ? parseNumber(m[5], 0, 59) : 0,\n    m[6] ? parseNumber(m[6], 0, 59) : 0,\n    m[7] ? parseNumber(m[7], 0, Infinity) * 1000 : 0\n  );\n\n  date.day = parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));\n  return date as CalendarDateTime;\n}\n\n/**\n * Parses an ISO 8601 date and time string with a time zone extension and optional UTC offset (e.g.\n * \"2021-11-07T00:45[America/Los_Angeles]\" or \"2021-11-07T00:45-07:00[America/Los_Angeles]\").\n * Ambiguous times due to daylight saving time transitions are resolved according to the\n * `disambiguation` parameter.\n */\nexport function parseZonedDateTime(value: string, disambiguation?: Disambiguation): ZonedDateTime {\n  let m = value.match(ZONED_DATE_TIME_RE);\n  if (!m) {\n    throw new Error('Invalid ISO 8601 date time string: ' + value);\n  }\n\n  let year = parseNumber(m[1], -9999, 9999);\n  let era = year < 1 ? 'BC' : 'AD';\n\n  let date: Mutable<ZonedDateTime> = new ZonedDateTime(\n    era,\n    year < 1 ? -year + 1 : year,\n    parseNumber(m[2], 1, 12),\n    1,\n    m[11],\n    0,\n    m[4] ? parseNumber(m[4], 0, 23) : 0,\n    m[5] ? parseNumber(m[5], 0, 59) : 0,\n    m[6] ? parseNumber(m[6], 0, 59) : 0,\n    m[7] ? parseNumber(m[7], 0, Infinity) * 1000 : 0\n  );\n\n  date.day = parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));\n\n  let plainDateTime = toCalendarDateTime(date as ZonedDateTime);\n\n  let ms: number;\n  if (m[8]) {\n    let hourOffset = parseNumber(m[8], -23, 23);\n    date.offset =\n      Math.sign(hourOffset) *\n      (Math.abs(hourOffset) * 60 * 60 * 1000 +\n        parseNumber(m[9] ?? '0', 0, 59) * 60 * 1000 +\n        parseNumber(m[10] ?? '0', 0, 59) * 1000);\n    ms = epochFromDate(date as ZonedDateTime) - date.offset;\n\n    // Validate offset against parsed date.\n    let absolutes = possibleAbsolutes(plainDateTime, date.timeZone);\n    if (!absolutes.includes(ms)) {\n      throw new Error(\n        `Offset ${offsetToString(date.offset)} is invalid for ${dateTimeToString(date)} in ${date.timeZone}`\n      );\n    }\n  } else {\n    // Convert to absolute and back to fix invalid times due to DST.\n    ms = toAbsolute(toCalendarDateTime(plainDateTime), date.timeZone, disambiguation);\n  }\n\n  return fromAbsolute(ms, date.timeZone);\n}\n\n/**\n * Parses an ISO 8601 date and time string with a UTC offset (e.g. \"2021-11-07T07:45:00Z\"\n * or \"2021-11-07T07:45:00-07:00\"). The result is converted to the provided time zone.\n */\nexport function parseAbsolute(value: string, timeZone: string): ZonedDateTime {\n  let m = value.match(ABSOLUTE_RE);\n  if (!m) {\n    throw new Error('Invalid ISO 8601 date time string: ' + value);\n  }\n\n  let year = parseNumber(m[1], -9999, 9999);\n  let era = year < 1 ? 'BC' : 'AD';\n\n  let date: Mutable<ZonedDateTime> = new ZonedDateTime(\n    era,\n    year < 1 ? -year + 1 : year,\n    parseNumber(m[2], 1, 12),\n    1,\n    timeZone,\n    0,\n    m[4] ? parseNumber(m[4], 0, 23) : 0,\n    m[5] ? parseNumber(m[5], 0, 59) : 0,\n    m[6] ? parseNumber(m[6], 0, 59) : 0,\n    m[7] ? parseNumber(m[7], 0, Infinity) * 1000 : 0\n  );\n\n  date.day = parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));\n\n  if (m[8]) {\n    date.offset =\n      parseNumber(m[8], -23, 23) * 60 * 60 * 1000 + parseNumber(m[9] ?? '0', 0, 59) * 60 * 1000;\n  }\n\n  return toTimeZone(date as ZonedDateTime, timeZone);\n}\n\n/**\n * Parses an ISO 8601 date and time string with a UTC offset (e.g. \"2021-11-07T07:45:00Z\"\n * or \"2021-11-07T07:45:00-07:00\"). The result is converted to the user's local time zone.\n */\nexport function parseAbsoluteToLocal(value: string): ZonedDateTime {\n  return parseAbsolute(value, getLocalTimeZone());\n}\n\nfunction parseNumber(value: string, min: number, max: number) {\n  let val = Number(value);\n  if (val < min || val > max) {\n    throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max}`);\n  }\n\n  return val;\n}\n\nexport function timeToString(time: Time): string {\n  return `${String(time.hour).padStart(2, '0')}:${String(time.minute).padStart(2, '0')}:${String(time.second).padStart(2, '0')}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ''}`;\n}\n\nexport function dateToString(date: CalendarDate): string {\n  let gregorianDate = toCalendar(date, new GregorianCalendar());\n  let year: string;\n  if (gregorianDate.era === 'BC') {\n    year =\n      gregorianDate.year === 1\n        ? '0000'\n        : '-' + String(Math.abs(1 - gregorianDate.year)).padStart(6, '00');\n  } else {\n    year = String(gregorianDate.year).padStart(4, '0');\n  }\n  return `${year}-${String(gregorianDate.month).padStart(2, '0')}-${String(gregorianDate.day).padStart(2, '0')}`;\n}\n\nexport function dateTimeToString(date: AnyDateTime): string {\n  // @ts-ignore\n  return `${dateToString(date)}T${timeToString(date)}`;\n}\n\nfunction offsetToString(offset: number) {\n  let sign = Math.sign(offset) < 0 ? '-' : '+';\n  offset = Math.abs(offset);\n  let offsetHours = Math.floor(offset / (60 * 60 * 1000));\n  let offsetMinutes = Math.floor((offset % (60 * 60 * 1000)) / (60 * 1000));\n  let offsetSeconds = Math.floor(((offset % (60 * 60 * 1000)) % (60 * 1000)) / 1000);\n  let stringOffset = `${sign}${String(offsetHours).padStart(2, '0')}:${String(offsetMinutes).padStart(2, '0')}`;\n  if (offsetSeconds !== 0) {\n    stringOffset += `:${String(offsetSeconds).padStart(2, '0')}`;\n  }\n\n  return stringOffset;\n}\n\nexport function zonedDateTimeToString(date: ZonedDateTime): string {\n  return `${dateTimeToString(date)}${offsetToString(date.offset)}[${date.timeZone}]`;\n}\n\n/**\n * Parses an ISO 8601 duration string (e.g. \"P3Y6M6W4DT12H30M5S\").\n *\n * @param value An ISO 8601 duration string.\n * @returns A DateTimeDuration object.\n */\nexport function parseDuration(value: string): Required<DateTimeDuration> {\n  const match = value.match(DATE_TIME_DURATION_RE);\n\n  if (!match) {\n    throw new Error(`Invalid ISO 8601 Duration string: ${value}`);\n  }\n\n  const parseDurationGroup = (group: string | undefined, isNegative: boolean): number => {\n    if (!group) {\n      return 0;\n    }\n    try {\n      const sign = isNegative ? -1 : 1;\n      return sign * Number(group.replace(',', '.'));\n    } catch {\n      throw new Error(`Invalid ISO 8601 Duration string: ${value}`);\n    }\n  };\n\n  const isNegative = !!match.groups?.negative;\n\n  const hasRequiredGroups = requiredDurationGroups.some(group => match.groups?.[group]);\n\n  if (!hasRequiredGroups) {\n    throw new Error(`Invalid ISO 8601 Duration string: ${value}`);\n  }\n\n  const durationStringIncludesTime = match.groups?.time;\n\n  if (durationStringIncludesTime) {\n    const hasRequiredDurationTimeGroups = requiredDurationTimeGroups.some(\n      group => match.groups?.[group]\n    );\n    if (!hasRequiredDurationTimeGroups) {\n      throw new Error(`Invalid ISO 8601 Duration string: ${value}`);\n    }\n  }\n\n  const duration: Mutable<DateTimeDuration> = {\n    years: parseDurationGroup(match.groups?.years, isNegative),\n    months: parseDurationGroup(match.groups?.months, isNegative),\n    weeks: parseDurationGroup(match.groups?.weeks, isNegative),\n    days: parseDurationGroup(match.groups?.days, isNegative),\n    hours: parseDurationGroup(match.groups?.hours, isNegative),\n    minutes: parseDurationGroup(match.groups?.minutes, isNegative),\n    seconds: parseDurationGroup(match.groups?.seconds, isNegative)\n  };\n\n  if (\n    duration.hours !== undefined &&\n    duration.hours % 1 !== 0 &&\n    (duration.minutes || duration.seconds)\n  ) {\n    throw new Error(\n      `Invalid ISO 8601 Duration string: ${value} - only the smallest unit can be fractional`\n    );\n  }\n\n  if (duration.minutes !== undefined && duration.minutes % 1 !== 0 && duration.seconds) {\n    throw new Error(\n      `Invalid ISO 8601 Duration string: ${value} - only the smallest unit can be fractional`\n    );\n  }\n\n  return duration as Required<DateTimeDuration>;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n  add,\n  addTime,\n  addZoned,\n  constrain,\n  constrainTime,\n  cycleDate,\n  cycleTime,\n  cycleZoned,\n  set,\n  setTime,\n  setZoned,\n  subtract,\n  subtractTime,\n  subtractZoned\n} from './manipulation';\nimport {\n  AnyCalendarDate,\n  AnyTime,\n  Calendar,\n  CycleOptions,\n  CycleTimeOptions,\n  DateDuration,\n  DateField,\n  DateFields,\n  DateTimeDuration,\n  Disambiguation,\n  TimeDuration,\n  TimeField,\n  TimeFields\n} from './types';\nimport {compareDate, compareTime} from './queries';\nimport {dateTimeToString, dateToString, timeToString, zonedDateTimeToString} from './string';\nimport {GregorianCalendar} from './calendars/GregorianCalendar';\nimport {toCalendarDateTime, toDate, toZoned, zonedToDate} from './conversion';\n\nexport type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime;\n\nfunction shiftArgs(args: any[]) {\n  let calendar: Calendar = typeof args[0] === 'object' ? args.shift() : new GregorianCalendar();\n\n  let era: string;\n  if (typeof args[0] === 'string') {\n    era = args.shift();\n  } else {\n    let eras = calendar.getEras();\n    era = eras[eras.length - 1];\n  }\n\n  let year = args.shift();\n  let month = args.shift();\n  let day = args.shift();\n\n  return [calendar, era, year, month, day];\n}\n\n/** A CalendarDate represents a date without any time components in a specific calendar system. */\nexport class CalendarDate {\n  // This prevents TypeScript from allowing other types with the same fields to match.\n  // i.e. a ZonedDateTime should not be be passable to a parameter that expects CalendarDate.\n  // If that behavior is desired, use the AnyCalendarDate interface instead.\n  // @ts-ignore\n  #type;\n  /** The calendar system associated with this date, e.g. Gregorian. */\n  public readonly calendar: Calendar;\n  /** The calendar era for this date, e.g. \"BC\" or \"AD\". */\n  public readonly era: string;\n  /** The year of this date within the era. */\n  public readonly year: number;\n  /**\n   * The month number within the year. Note that some calendar systems such as Hebrew\n   * may have a variable number of months per year. Therefore, month numbers may not\n   * always correspond to the same month names in different years.\n   */\n  public readonly month: number;\n  /** The day number within the month. */\n  public readonly day: number;\n\n  constructor(year: number, month: number, day: number);\n  constructor(era: string, year: number, month: number, day: number);\n  constructor(calendar: Calendar, year: number, month: number, day: number);\n  constructor(calendar: Calendar, era: string, year: number, month: number, day: number);\n  constructor(...args: any[]) {\n    let [calendar, era, year, month, day] = shiftArgs(args);\n    this.calendar = calendar;\n    this.era = era;\n    this.year = year;\n    this.month = month;\n    this.day = day;\n\n    constrain(this);\n  }\n\n  /** Returns a copy of this date. */\n  copy(): CalendarDate {\n    if (this.era) {\n      return new CalendarDate(this.calendar, this.era, this.year, this.month, this.day);\n    } else {\n      return new CalendarDate(this.calendar, this.year, this.month, this.day);\n    }\n  }\n\n  /** Returns a new `CalendarDate` with the given duration added to it. */\n  add(duration: DateDuration): CalendarDate {\n    return add(this, duration);\n  }\n\n  /** Returns a new `CalendarDate` with the given duration subtracted from it. */\n  subtract(duration: DateDuration): CalendarDate {\n    return subtract(this, duration);\n  }\n\n  /**\n   * Returns a new `CalendarDate` with the given fields set to the provided values. Other fields\n   * will be constrained accordingly.\n   */\n  set(fields: DateFields): CalendarDate {\n    return set(this, fields);\n  }\n\n  /**\n   * Returns a new `CalendarDate` with the given field adjusted by a specified amount.\n   * When the resulting value reaches the limits of the field, it wraps around.\n   */\n  cycle(field: DateField, amount: number, options?: CycleOptions): CalendarDate {\n    return cycleDate(this, field, amount, options);\n  }\n\n  /**\n   * Converts the date to a native JavaScript Date object, with the time set to midnight in the\n   * given time zone.\n   */\n  toDate(timeZone: string): Date {\n    return toDate(this, timeZone);\n  }\n\n  /** Converts the date to an ISO 8601 formatted string. */\n  toString(): string {\n    return dateToString(this);\n  }\n\n  /**\n   * Compares this date with another. A negative result indicates that this date is before the given\n   * one, and a positive date indicates that it is after.\n   */\n  compare(b: AnyCalendarDate): number {\n    return compareDate(this, b);\n  }\n}\n\n/** A Time represents a clock time without any date components. */\nexport class Time {\n  // This prevents TypeScript from allowing other types with the same fields to match.\n  // @ts-ignore\n  #type;\n  /** The hour, numbered from 0 to 23. */\n  public readonly hour: number;\n  /** The minute in the hour. */\n  public readonly minute: number;\n  /** The second in the minute. */\n  public readonly second: number;\n  /** The millisecond in the second. */\n  public readonly millisecond: number;\n\n  constructor(hour: number = 0, minute: number = 0, second: number = 0, millisecond: number = 0) {\n    this.hour = hour;\n    this.minute = minute;\n    this.second = second;\n    this.millisecond = millisecond;\n    constrainTime(this);\n  }\n\n  /** Returns a copy of this time. */\n  copy(): Time {\n    return new Time(this.hour, this.minute, this.second, this.millisecond);\n  }\n\n  /** Returns a new `Time` with the given duration added to it. */\n  add(duration: TimeDuration): Time {\n    return addTime(this, duration);\n  }\n\n  /** Returns a new `Time` with the given duration subtracted from it. */\n  subtract(duration: TimeDuration): Time {\n    return subtractTime(this, duration);\n  }\n\n  /**\n   * Returns a new `Time` with the given fields set to the provided values. Other fields will be\n   * constrained accordingly.\n   */\n  set(fields: TimeFields): Time {\n    return setTime(this, fields);\n  }\n\n  /**\n   * Returns a new `Time` with the given field adjusted by a specified amount.\n   * When the resulting value reaches the limits of the field, it wraps around.\n   */\n  cycle(field: TimeField, amount: number, options?: CycleTimeOptions): Time {\n    return cycleTime(this, field, amount, options);\n  }\n\n  /** Converts the time to an ISO 8601 formatted string. */\n  toString(): string {\n    return timeToString(this);\n  }\n\n  /**\n   * Compares this time with another. A negative result indicates that this time is before the given\n   * one, and a positive time indicates that it is after.\n   */\n  compare(b: AnyTime): number {\n    return compareTime(this, b);\n  }\n}\n\n/** A CalendarDateTime represents a date and time without a time zone, in a specific calendar system. */\nexport class CalendarDateTime {\n  // This prevents TypeScript from allowing other types with the same fields to match.\n  // @ts-ignore\n  #type;\n  /** The calendar system associated with this date, e.g. Gregorian. */\n  public readonly calendar: Calendar;\n  /** The calendar era for this date, e.g. \"BC\" or \"AD\". */\n  public readonly era: string;\n  /** The year of this date within the era. */\n  public readonly year: number;\n  /**\n   * The month number within the year. Note that some calendar systems such as Hebrew\n   * may have a variable number of months per year. Therefore, month numbers may not\n   * always correspond to the same month names in different years.\n   */\n  public readonly month: number;\n  /** The day number within the month. */\n  public readonly day: number;\n  /** The hour in the day, numbered from 0 to 23. */\n  public readonly hour: number;\n  /** The minute in the hour. */\n  public readonly minute: number;\n  /** The second in the minute. */\n  public readonly second: number;\n  /** The millisecond in the second. */\n  public readonly millisecond: number;\n\n  constructor(\n    year: number,\n    month: number,\n    day: number,\n    hour?: number,\n    minute?: number,\n    second?: number,\n    millisecond?: number\n  );\n  constructor(\n    era: string,\n    year: number,\n    month: number,\n    day: number,\n    hour?: number,\n    minute?: number,\n    second?: number,\n    millisecond?: number\n  );\n  constructor(\n    calendar: Calendar,\n    year: number,\n    month: number,\n    day: number,\n    hour?: number,\n    minute?: number,\n    second?: number,\n    millisecond?: number\n  );\n  constructor(\n    calendar: Calendar,\n    era: string,\n    year: number,\n    month: number,\n    day: number,\n    hour?: number,\n    minute?: number,\n    second?: number,\n    millisecond?: number\n  );\n  constructor(...args: any[]) {\n    let [calendar, era, year, month, day] = shiftArgs(args);\n    this.calendar = calendar;\n    this.era = era;\n    this.year = year;\n    this.month = month;\n    this.day = day;\n    this.hour = args.shift() || 0;\n    this.minute = args.shift() || 0;\n    this.second = args.shift() || 0;\n    this.millisecond = args.shift() || 0;\n\n    constrain(this);\n  }\n\n  /** Returns a copy of this date. */\n  copy(): CalendarDateTime {\n    if (this.era) {\n      return new CalendarDateTime(\n        this.calendar,\n        this.era,\n        this.year,\n        this.month,\n        this.day,\n        this.hour,\n        this.minute,\n        this.second,\n        this.millisecond\n      );\n    } else {\n      return new CalendarDateTime(\n        this.calendar,\n        this.year,\n        this.month,\n        this.day,\n        this.hour,\n        this.minute,\n        this.second,\n        this.millisecond\n      );\n    }\n  }\n\n  /** Returns a new `CalendarDateTime` with the given duration added to it. */\n  add(duration: DateTimeDuration): CalendarDateTime {\n    return add(this, duration);\n  }\n\n  /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */\n  subtract(duration: DateTimeDuration): CalendarDateTime {\n    return subtract(this, duration);\n  }\n\n  /**\n   * Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields\n   * will be constrained accordingly.\n   */\n  set(fields: DateFields & TimeFields): CalendarDateTime {\n    return set(setTime(this, fields), fields);\n  }\n\n  /**\n   * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.\n   * When the resulting value reaches the limits of the field, it wraps around.\n   */\n  cycle(\n    field: DateField | TimeField,\n    amount: number,\n    options?: CycleTimeOptions\n  ): CalendarDateTime {\n    switch (field) {\n      case 'era':\n      case 'year':\n      case 'month':\n      case 'day':\n        return cycleDate(this, field, amount, options);\n      default:\n        return cycleTime(this, field, amount, options);\n    }\n  }\n\n  /** Converts the date to a native JavaScript Date object in the given time zone. */\n  toDate(timeZone: string, disambiguation?: Disambiguation): Date {\n    return toDate(this, timeZone, disambiguation);\n  }\n\n  /** Converts the date to an ISO 8601 formatted string. */\n  toString(): string {\n    return dateTimeToString(this);\n  }\n\n  /**\n   * Compares this date with another. A negative result indicates that this date is before the given\n   * one, and a positive date indicates that it is after.\n   */\n  compare(b: CalendarDate | CalendarDateTime | ZonedDateTime): number {\n    let res = compareDate(this, b);\n    if (res === 0) {\n      return compareTime(this, toCalendarDateTime(b));\n    }\n\n    return res;\n  }\n}\n\n/** A ZonedDateTime represents a date and time in a specific time zone and calendar system. */\nexport class ZonedDateTime {\n  // This prevents TypeScript from allowing other types with the same fields to match.\n  // @ts-ignore\n  #type;\n  /** The calendar system associated with this date, e.g. Gregorian. */\n  public readonly calendar: Calendar;\n  /** The calendar era for this date, e.g. \"BC\" or \"AD\". */\n  public readonly era: string;\n  /** The year of this date within the era. */\n  public readonly year: number;\n  /**\n   * The month number within the year. Note that some calendar systems such as Hebrew\n   * may have a variable number of months per year. Therefore, month numbers may not\n   * always correspond to the same month names in different years.\n   */\n  public readonly month: number;\n  /** The day number within the month. */\n  public readonly day: number;\n  /** The hour in the day, numbered from 0 to 23. */\n  public readonly hour: number;\n  /** The minute in the hour. */\n  public readonly minute: number;\n  /** The second in the minute. */\n  public readonly second: number;\n  /** The millisecond in the second. */\n  public readonly millisecond: number;\n  /** The IANA time zone identifier that this date and time is represented in. */\n  public readonly timeZone: string;\n  /** The UTC offset for this time, in milliseconds. */\n  public readonly offset: number;\n\n  constructor(\n    year: number,\n    month: number,\n    day: number,\n    timeZone: string,\n    offset: number,\n    hour?: number,\n    minute?: number,\n    second?: number,\n    millisecond?: number\n  );\n  constructor(\n    era: string,\n    year: number,\n    month: number,\n    day: number,\n    timeZone: string,\n    offset: number,\n    hour?: number,\n    minute?: number,\n    second?: number,\n    millisecond?: number\n  );\n  constructor(\n    calendar: Calendar,\n    year: number,\n    month: number,\n    day: number,\n    timeZone: string,\n    offset: number,\n    hour?: number,\n    minute?: number,\n    second?: number,\n    millisecond?: number\n  );\n  constructor(\n    calendar: Calendar,\n    era: string,\n    year: number,\n    month: number,\n    day: number,\n    timeZone: string,\n    offset: number,\n    hour?: number,\n    minute?: number,\n    second?: number,\n    millisecond?: number\n  );\n  constructor(...args: any[]) {\n    let [calendar, era, year, month, day] = shiftArgs(args);\n    let timeZone = args.shift();\n    let offset = args.shift();\n    this.calendar = calendar;\n    this.era = era;\n    this.year = year;\n    this.month = month;\n    this.day = day;\n    this.timeZone = timeZone;\n    this.offset = offset;\n    this.hour = args.shift() || 0;\n    this.minute = args.shift() || 0;\n    this.second = args.shift() || 0;\n    this.millisecond = args.shift() || 0;\n\n    constrain(this);\n  }\n\n  /** Returns a copy of this date. */\n  copy(): ZonedDateTime {\n    if (this.era) {\n      return new ZonedDateTime(\n        this.calendar,\n        this.era,\n        this.year,\n        this.month,\n        this.day,\n        this.timeZone,\n        this.offset,\n        this.hour,\n        this.minute,\n        this.second,\n        this.millisecond\n      );\n    } else {\n      return new ZonedDateTime(\n        this.calendar,\n        this.year,\n        this.month,\n        this.day,\n        this.timeZone,\n        this.offset,\n        this.hour,\n        this.minute,\n        this.second,\n        this.millisecond\n      );\n    }\n  }\n\n  /** Returns a new `ZonedDateTime` with the given duration added to it. */\n  add(duration: DateTimeDuration): ZonedDateTime {\n    return addZoned(this, duration);\n  }\n\n  /** Returns a new `ZonedDateTime` with the given duration subtracted from it. */\n  subtract(duration: DateTimeDuration): ZonedDateTime {\n    return subtractZoned(this, duration);\n  }\n\n  /**\n   * Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields\n   * will be constrained accordingly.\n   */\n  set(fields: DateFields & TimeFields, disambiguation?: Disambiguation): ZonedDateTime {\n    return setZoned(this, fields, disambiguation);\n  }\n\n  /**\n   * Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.\n   * When the resulting value reaches the limits of the field, it wraps around.\n   */\n  cycle(field: DateField | TimeField, amount: number, options?: CycleTimeOptions): ZonedDateTime {\n    return cycleZoned(this, field, amount, options);\n  }\n\n  /** Converts the date to a native JavaScript Date object. */\n  toDate(): Date {\n    return zonedToDate(this);\n  }\n\n  /**\n   * Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone\n   * identifier.\n   */\n  toString(): string {\n    return zonedDateTimeToString(this);\n  }\n\n  /** Converts the date to an ISO 8601 formatted string in UTC. */\n  toAbsoluteString(): string {\n    return this.toDate().toISOString();\n  }\n\n  /**\n   * Compares this date with another. A negative result indicates that this date is before the given\n   * one, and a positive date indicates that it is after.\n   */\n  compare(b: CalendarDate | CalendarDateTime | ZonedDateTime): number {\n    // TODO: Is this a bad idea??\n    return this.toDate().getTime() - toZoned(b, this.timeZone).toDate().getTime();\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from the TC39 Temporal proposal.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate, CalendarIdentifier} from '../types';\nimport {CalendarDate} from '../CalendarDate';\nimport {GregorianCalendar} from './GregorianCalendar';\nimport {Mutable} from '../utils';\n\nconst ERA_START_DATES = [\n  [1868, 9, 8],\n  [1912, 7, 30],\n  [1926, 12, 25],\n  [1989, 1, 8],\n  [2019, 5, 1]\n];\nconst ERA_END_DATES = [\n  [1912, 7, 29],\n  [1926, 12, 24],\n  [1989, 1, 7],\n  [2019, 4, 30]\n];\nconst ERA_ADDENDS = [1867, 1911, 1925, 1988, 2018];\nconst ERA_NAMES = ['meiji', 'taisho', 'showa', 'heisei', 'reiwa'];\n\nfunction findEraFromGregorianDate(date: AnyCalendarDate) {\n  const idx = ERA_START_DATES.findIndex(([year, month, day]) => {\n    if (date.year < year) {\n      return true;\n    }\n\n    if (date.year === year && date.month < month) {\n      return true;\n    }\n\n    if (date.year === year && date.month === month && date.day < day) {\n      return true;\n    }\n\n    return false;\n  });\n\n  if (idx === -1) {\n    return ERA_START_DATES.length - 1;\n  }\n\n  if (idx === 0) {\n    return 0;\n  }\n\n  return idx - 1;\n}\n\nfunction toGregorian(date: AnyCalendarDate) {\n  let eraAddend = ERA_ADDENDS[ERA_NAMES.indexOf(date.era)];\n  if (!eraAddend) {\n    throw new Error('Unknown era: ' + date.era);\n  }\n\n  return new CalendarDate(date.year + eraAddend, date.month, date.day);\n}\n\n/**\n * The Japanese calendar is based on the Gregorian calendar, but with eras for the reign of each\n * Japanese emperor. Whenever a new emperor ascends to the throne, a new era begins and the year\n * starts again from 1. Note that eras before 1868 (Gregorian) are not currently supported by this\n * implementation.\n */\nexport class JapaneseCalendar extends GregorianCalendar {\n  identifier: CalendarIdentifier = 'japanese';\n\n  fromJulianDay(jd: number): CalendarDate {\n    let date = super.fromJulianDay(jd);\n    let era = findEraFromGregorianDate(date);\n\n    return new CalendarDate(\n      this,\n      ERA_NAMES[era],\n      date.year - ERA_ADDENDS[era],\n      date.month,\n      date.day\n    );\n  }\n\n  toJulianDay(date: AnyCalendarDate): number {\n    return super.toJulianDay(toGregorian(date));\n  }\n\n  balanceDate(date: Mutable<AnyCalendarDate>): void {\n    let gregorianDate = toGregorian(date);\n    let era = findEraFromGregorianDate(gregorianDate);\n\n    if (ERA_NAMES[era] !== date.era) {\n      date.era = ERA_NAMES[era];\n      date.year = gregorianDate.year - ERA_ADDENDS[era];\n    }\n\n    // Constrain in case we went before the first supported era.\n    this.constrainDate(date);\n  }\n\n  constrainDate(date: Mutable<AnyCalendarDate>): void {\n    let idx = ERA_NAMES.indexOf(date.era);\n    let end = ERA_END_DATES[idx];\n    if (end != null) {\n      let [endYear, endMonth, endDay] = end;\n\n      // Constrain the year to the maximum possible value in the era.\n      // Then constrain the month and day fields within that.\n      let maxYear = endYear - ERA_ADDENDS[idx];\n      date.year = Math.max(1, Math.min(maxYear, date.year));\n      if (date.year === maxYear) {\n        date.month = Math.min(endMonth, date.month);\n\n        if (date.month === endMonth) {\n          date.day = Math.min(endDay, date.day);\n        }\n      }\n    }\n\n    if (date.year === 1 && idx >= 0) {\n      let [, startMonth, startDay] = ERA_START_DATES[idx];\n      date.month = Math.max(startMonth, date.month);\n\n      if (date.month === startMonth) {\n        date.day = Math.max(startDay, date.day);\n      }\n    }\n  }\n\n  getEras(): string[] {\n    return ERA_NAMES;\n  }\n\n  getYearsInEra(date: AnyCalendarDate): number {\n    // Get the number of years in the era, taking into account the date's month and day fields.\n    let era = ERA_NAMES.indexOf(date.era);\n    let cur = ERA_START_DATES[era];\n    let next = ERA_START_DATES[era + 1];\n    if (next == null) {\n      // 9999 gregorian is the maximum year allowed.\n      return 9999 - cur[0] + 1;\n    }\n\n    let years = next[0] - cur[0];\n\n    if (date.month < next[1] || (date.month === next[1] && date.day < next[2])) {\n      years++;\n    }\n\n    return years;\n  }\n\n  getDaysInMonth(date: AnyCalendarDate): number {\n    return super.getDaysInMonth(toGregorian(date));\n  }\n\n  getMinimumMonthInYear(date: AnyCalendarDate): number {\n    let start = getMinimums(date);\n    return start ? start[1] : 1;\n  }\n\n  getMinimumDayInMonth(date: AnyCalendarDate): number {\n    let start = getMinimums(date);\n    return start && date.month === start[1] ? start[2] : 1;\n  }\n}\n\nfunction getMinimums(date: AnyCalendarDate) {\n  if (date.year === 1) {\n    let idx = ERA_NAMES.indexOf(date.era);\n    return ERA_START_DATES[idx];\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate, CalendarIdentifier} from '../types';\nimport {CalendarDate} from '../CalendarDate';\nimport {fromExtendedYear, getExtendedYear, GregorianCalendar} from './GregorianCalendar';\n\nconst BUDDHIST_ERA_START = -543;\n\n/**\n * The Buddhist calendar is the same as the Gregorian calendar, but counts years\n * starting from the birth of Buddha in 543 BC (Gregorian). It supports only one\n * era, identified as 'BE'.\n */\nexport class BuddhistCalendar extends GregorianCalendar {\n  identifier: CalendarIdentifier = 'buddhist';\n\n  fromJulianDay(jd: number): CalendarDate {\n    let gregorianDate = super.fromJulianDay(jd);\n    let year = getExtendedYear(gregorianDate.era, gregorianDate.year);\n    return new CalendarDate(\n      this,\n      year - BUDDHIST_ERA_START,\n      gregorianDate.month,\n      gregorianDate.day\n    );\n  }\n\n  toJulianDay(date: AnyCalendarDate): number {\n    return super.toJulianDay(toGregorian(date));\n  }\n\n  getEras(): string[] {\n    return ['BE'];\n  }\n\n  getDaysInMonth(date: AnyCalendarDate): number {\n    return super.getDaysInMonth(toGregorian(date));\n  }\n\n  balanceDate(): void {}\n}\n\nfunction toGregorian(date: AnyCalendarDate) {\n  let [era, year] = fromExtendedYear(date.year + BUDDHIST_ERA_START);\n  return new CalendarDate(era, year, date.month, date.day);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate, CalendarIdentifier} from '../types';\nimport {CalendarDate} from '../CalendarDate';\nimport {fromExtendedYear, getExtendedYear, GregorianCalendar} from './GregorianCalendar';\nimport {Mutable} from '../utils';\n\nconst TAIWAN_ERA_START = 1911;\n\nfunction gregorianYear(date: AnyCalendarDate) {\n  return date.era === 'minguo' ? date.year + TAIWAN_ERA_START : 1 - date.year + TAIWAN_ERA_START;\n}\n\nfunction gregorianToTaiwan(year: number): [string, number] {\n  let y = year - TAIWAN_ERA_START;\n  if (y > 0) {\n    return ['minguo', y];\n  } else {\n    return ['before_minguo', 1 - y];\n  }\n}\n\n/**\n * The Taiwanese calendar is the same as the Gregorian calendar, but years\n * are numbered starting from 1912 (Gregorian). Two eras are supported:\n * 'before_minguo' and 'minguo'.\n */\nexport class TaiwanCalendar extends GregorianCalendar {\n  identifier: CalendarIdentifier = 'roc'; // Republic of China\n\n  fromJulianDay(jd: number): CalendarDate {\n    let date = super.fromJulianDay(jd);\n    let extendedYear = getExtendedYear(date.era, date.year);\n    let [era, year] = gregorianToTaiwan(extendedYear);\n    return new CalendarDate(this, era, year, date.month, date.day);\n  }\n\n  toJulianDay(date: AnyCalendarDate): number {\n    return super.toJulianDay(toGregorian(date));\n  }\n\n  getEras(): string[] {\n    return ['before_minguo', 'minguo'];\n  }\n\n  balanceDate(date: Mutable<AnyCalendarDate>): void {\n    let [era, year] = gregorianToTaiwan(gregorianYear(date));\n    date.era = era;\n    date.year = year;\n  }\n\n  isInverseEra(date: AnyCalendarDate): boolean {\n    return date.era === 'before_minguo';\n  }\n\n  getDaysInMonth(date: AnyCalendarDate): number {\n    return super.getDaysInMonth(toGregorian(date));\n  }\n\n  getYearsInEra(date: AnyCalendarDate): number {\n    return date.era === 'before_minguo' ? 9999 : 9999 - TAIWAN_ERA_START;\n  }\n}\n\nfunction toGregorian(date: AnyCalendarDate) {\n  let [era, year] = fromExtendedYear(gregorianYear(date));\n  return new CalendarDate(era, year, date.month, date.day);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate, Calendar, CalendarIdentifier} from '../types';\nimport {CalendarDate} from '../CalendarDate';\nimport {mod} from '../utils';\n\nconst PERSIAN_EPOCH = 1948320;\n\n// Number of days from the start of the year to the start of each month.\nconst MONTH_START = [\n  0, // Farvardin\n  31, // Ordibehesht\n  62, // Khordad\n  93, // Tir\n  124, // Mordad\n  155, // Shahrivar\n  186, // Mehr\n  216, // Aban\n  246, // Azar\n  276, // Dey\n  306, // Bahman\n  336 // Esfand\n];\n\n/**\n * The Persian calendar is the main calendar used in Iran and Afghanistan. It has 12 months\n * in each year, the first 6 of which have 31 days, and the next 5 have 30 days. The 12th month\n * has either 29 or 30 days depending on whether it is a leap year. The Persian year starts\n * around the March equinox.\n */\nexport class PersianCalendar implements Calendar {\n  identifier: CalendarIdentifier = 'persian';\n\n  fromJulianDay(jd: number): CalendarDate {\n    let daysSinceEpoch = jd - PERSIAN_EPOCH;\n    let year = 1 + Math.floor((33 * daysSinceEpoch + 3) / 12053);\n    let farvardin1 = 365 * (year - 1) + Math.floor((8 * year + 21) / 33);\n    let dayOfYear = daysSinceEpoch - farvardin1;\n    let month = dayOfYear < 216 ? Math.floor(dayOfYear / 31) : Math.floor((dayOfYear - 6) / 30);\n    let day = dayOfYear - MONTH_START[month] + 1;\n    return new CalendarDate(this, year, month + 1, day);\n  }\n\n  toJulianDay(date: AnyCalendarDate): number {\n    let jd = PERSIAN_EPOCH - 1 + 365 * (date.year - 1) + Math.floor((8 * date.year + 21) / 33);\n    jd += MONTH_START[date.month - 1];\n    jd += date.day;\n    return jd;\n  }\n\n  getMonthsInYear(): number {\n    return 12;\n  }\n\n  getDaysInMonth(date: AnyCalendarDate): number {\n    if (date.month <= 6) {\n      return 31;\n    }\n\n    if (date.month <= 11) {\n      return 30;\n    }\n\n    let isLeapYear = mod(25 * date.year + 11, 33) < 8;\n    return isLeapYear ? 30 : 29;\n  }\n\n  getMaximumMonthsInYear(): number {\n    return 12;\n  }\n\n  getMaximumDaysInMonth(): number {\n    return 31;\n  }\n\n  getEras(): string[] {\n    return ['AP'];\n  }\n\n  getYearsInEra(): number {\n    // 9378-10-10 persian is 9999-12-31 gregorian.\n    // Round down to 9377 to set the maximum full year.\n    return 9377;\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate, CalendarIdentifier} from '../types';\nimport {CalendarDate} from '../CalendarDate';\nimport {\n  fromExtendedYear,\n  GregorianCalendar,\n  gregorianToJulianDay,\n  isLeapYear\n} from './GregorianCalendar';\n\n// Starts in 78 AD,\nconst INDIAN_ERA_START = 78;\n\n// The Indian year starts 80 days later than the Gregorian year.\nconst INDIAN_YEAR_START = 80;\n\n/**\n * The Indian National Calendar is similar to the Gregorian calendar, but with\n * years numbered since the Saka era in 78 AD (Gregorian). There are 12 months\n * in each year, with either 30 or 31 days. Only one era identifier is supported: 'saka'.\n */\nexport class IndianCalendar extends GregorianCalendar {\n  identifier: CalendarIdentifier = 'indian';\n\n  fromJulianDay(jd: number): CalendarDate {\n    // Gregorian date for Julian day\n    let date = super.fromJulianDay(jd);\n\n    // Year in Saka era\n    let indianYear = date.year - INDIAN_ERA_START;\n\n    // Day number in Gregorian year (starting from 0)\n    let yDay = jd - gregorianToJulianDay(date.era, date.year, 1, 1);\n\n    let leapMonth: number;\n    if (yDay < INDIAN_YEAR_START) {\n      //  Day is at the end of the preceding Saka year\n      indianYear--;\n\n      // Days in leapMonth this year, previous Gregorian year\n      leapMonth = isLeapYear(date.year - 1) ? 31 : 30;\n      yDay += leapMonth + 31 * 5 + 30 * 3 + 10;\n    } else {\n      // Days in leapMonth this year\n      leapMonth = isLeapYear(date.year) ? 31 : 30;\n      yDay -= INDIAN_YEAR_START;\n    }\n\n    let indianMonth: number;\n    let indianDay: number;\n    if (yDay < leapMonth) {\n      indianMonth = 1;\n      indianDay = yDay + 1;\n    } else {\n      let mDay = yDay - leapMonth;\n      if (mDay < 31 * 5) {\n        indianMonth = Math.floor(mDay / 31) + 2;\n        indianDay = (mDay % 31) + 1;\n      } else {\n        mDay -= 31 * 5;\n        indianMonth = Math.floor(mDay / 30) + 7;\n        indianDay = (mDay % 30) + 1;\n      }\n    }\n\n    return new CalendarDate(this, indianYear, indianMonth, indianDay);\n  }\n\n  toJulianDay(date: AnyCalendarDate): number {\n    let extendedYear = date.year + INDIAN_ERA_START;\n    let [era, year] = fromExtendedYear(extendedYear);\n\n    let leapMonth: number;\n    let jd: number;\n    if (isLeapYear(year)) {\n      leapMonth = 31;\n      jd = gregorianToJulianDay(era, year, 3, 21);\n    } else {\n      leapMonth = 30;\n      jd = gregorianToJulianDay(era, year, 3, 22);\n    }\n\n    if (date.month === 1) {\n      return jd + date.day - 1;\n    }\n\n    jd += leapMonth + Math.min(date.month - 2, 5) * 31;\n\n    if (date.month >= 8) {\n      jd += (date.month - 7) * 30;\n    }\n\n    jd += date.day - 1;\n    return jd;\n  }\n\n  getDaysInMonth(date: AnyCalendarDate): number {\n    if (date.month === 1 && isLeapYear(date.year + INDIAN_ERA_START)) {\n      return 31;\n    }\n\n    if (date.month >= 2 && date.month <= 6) {\n      return 31;\n    }\n\n    return 30;\n  }\n\n  getYearsInEra(): number {\n    // 9999-12-31 gregorian is 9920-10-10 indian.\n    // Round down to 9919 for the last full year.\n    return 9919;\n  }\n\n  getEras(): string[] {\n    return ['saka'];\n  }\n\n  balanceDate(): void {}\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate, Calendar, CalendarIdentifier} from '../types';\nimport {CalendarDate} from '../CalendarDate';\n\nconst CIVIL_EPOC = 1948440; // CE 622 July 16 Friday (Julian calendar) / CE 622 July 19 (Gregorian calendar)\nconst ASTRONOMICAL_EPOC = 1948439; // CE 622 July 15 Thursday (Julian calendar)\nconst UMALQURA_YEAR_START = 1300;\nconst UMALQURA_YEAR_END = 1600;\nconst UMALQURA_START_DAYS = 460322;\n\nfunction islamicToJulianDay(epoch: number, year: number, month: number, day: number): number {\n  return (\n    day +\n    Math.ceil(29.5 * (month - 1)) +\n    (year - 1) * 354 +\n    Math.floor((3 + 11 * year) / 30) +\n    epoch -\n    1\n  );\n}\n\nfunction julianDayToIslamic(calendar: Calendar, epoch: number, jd: number) {\n  let year = Math.floor((30 * (jd - epoch) + 10646) / 10631);\n  let month = Math.min(\n    12,\n    Math.ceil((jd - (29 + islamicToJulianDay(epoch, year, 1, 1))) / 29.5) + 1\n  );\n  let day = jd - islamicToJulianDay(epoch, year, month, 1) + 1;\n\n  return new CalendarDate(calendar, year, month, day);\n}\n\nfunction isLeapYear(year: number): boolean {\n  return (14 + 11 * year) % 30 < 11;\n}\n\n/**\n * The Islamic calendar, also known as the \"Hijri\" calendar, is used throughout much of the Arab\n * world. The civil variant uses simple arithmetic rules rather than astronomical calculations to\n * approximate the traditional calendar, which is based on sighting of the crescent moon. It uses\n * Friday, July 16 622 CE (Julian) as the epoch. Each year has 12 months, with either 354 or 355\n * days depending on whether it is a leap year. Learn more about the available Islamic calendars\n * [here](https://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types).\n */\nexport class IslamicCivilCalendar implements Calendar {\n  identifier: CalendarIdentifier = 'islamic-civil';\n\n  fromJulianDay(jd: number): CalendarDate {\n    return julianDayToIslamic(this, CIVIL_EPOC, jd);\n  }\n\n  toJulianDay(date: AnyCalendarDate): number {\n    return islamicToJulianDay(CIVIL_EPOC, date.year, date.month, date.day);\n  }\n\n  getDaysInMonth(date: AnyCalendarDate): number {\n    let length = 29 + (date.month % 2);\n    if (date.month === 12 && isLeapYear(date.year)) {\n      length++;\n    }\n\n    return length;\n  }\n\n  getMonthsInYear(): number {\n    return 12;\n  }\n\n  getDaysInYear(date: AnyCalendarDate): number {\n    return isLeapYear(date.year) ? 355 : 354;\n  }\n\n  getMaximumMonthsInYear(): number {\n    return 12;\n  }\n\n  getMaximumDaysInMonth(): number {\n    return 30;\n  }\n\n  getYearsInEra(): number {\n    // 9999 gregorian\n    return 9665;\n  }\n\n  getEras(): string[] {\n    return ['AH'];\n  }\n}\n\n/**\n * The Islamic calendar, also known as the \"Hijri\" calendar, is used throughout much of the Arab\n * world. The tabular variant uses simple arithmetic rules rather than astronomical calculations to\n * approximate the traditional calendar, which is based on sighting of the crescent moon. It uses\n * Thursday, July 15 622 CE (Julian) as the epoch. Each year has 12 months, with either 354 or 355\n * days depending on whether it is a leap year. Learn more about the available Islamic calendars\n * [here](https://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types).\n */\nexport class IslamicTabularCalendar extends IslamicCivilCalendar {\n  identifier: CalendarIdentifier = 'islamic-tbla';\n\n  fromJulianDay(jd: number): CalendarDate {\n    return julianDayToIslamic(this, ASTRONOMICAL_EPOC, jd);\n  }\n\n  toJulianDay(date: AnyCalendarDate): number {\n    return islamicToJulianDay(ASTRONOMICAL_EPOC, date.year, date.month, date.day);\n  }\n}\n\n// Generated by scripts/generate-umalqura.js\nconst UMALQURA_DATA =\n  'qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=';\nlet UMALQURA_MONTHLENGTH: Uint16Array;\nlet UMALQURA_YEAR_START_TABLE: Uint32Array;\n\nfunction umalquraYearStart(year: number): number {\n  return UMALQURA_START_DAYS + UMALQURA_YEAR_START_TABLE[year - UMALQURA_YEAR_START];\n}\n\nfunction umalquraMonthLength(year: number, month: number): number {\n  let idx = year - UMALQURA_YEAR_START;\n  let mask = 0x01 << (11 - (month - 1));\n  if ((UMALQURA_MONTHLENGTH[idx] & mask) === 0) {\n    return 29;\n  } else {\n    return 30;\n  }\n}\n\nfunction umalquraMonthStart(year: number, month: number): number {\n  let day = umalquraYearStart(year);\n  for (let i = 1; i < month; i++) {\n    day += umalquraMonthLength(year, i);\n  }\n  return day;\n}\n\nfunction umalquraYearLength(year: number): number {\n  return (\n    UMALQURA_YEAR_START_TABLE[year + 1 - UMALQURA_YEAR_START] -\n    UMALQURA_YEAR_START_TABLE[year - UMALQURA_YEAR_START]\n  );\n}\n\n/**\n * The Islamic calendar, also known as the \"Hijri\" calendar, is used throughout much of the Arab\n * world. The Umalqura variant is primarily used in Saudi Arabia. It is a lunar calendar, based on\n * astronomical calculations that predict the sighting of a crescent moon. Month and year lengths\n * vary between years depending on these calculations. Learn more about the available Islamic\n * calendars\n * [here](https://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types).\n */\nexport class IslamicUmalquraCalendar extends IslamicCivilCalendar {\n  identifier: CalendarIdentifier = 'islamic-umalqura';\n\n  constructor() {\n    super();\n    if (!UMALQURA_MONTHLENGTH) {\n      UMALQURA_MONTHLENGTH = new Uint16Array(\n        Uint8Array.from(atob(UMALQURA_DATA), c => c.charCodeAt(0)).buffer\n      );\n    }\n\n    if (!UMALQURA_YEAR_START_TABLE) {\n      UMALQURA_YEAR_START_TABLE = new Uint32Array(UMALQURA_YEAR_END - UMALQURA_YEAR_START + 1);\n\n      let yearStart = 0;\n      for (let year = UMALQURA_YEAR_START; year <= UMALQURA_YEAR_END; year++) {\n        UMALQURA_YEAR_START_TABLE[year - UMALQURA_YEAR_START] = yearStart;\n        for (let i = 1; i <= 12; i++) {\n          yearStart += umalquraMonthLength(year, i);\n        }\n      }\n    }\n  }\n\n  fromJulianDay(jd: number): CalendarDate {\n    let days = jd - CIVIL_EPOC;\n    let startDays = umalquraYearStart(UMALQURA_YEAR_START);\n    let endDays = umalquraYearStart(UMALQURA_YEAR_END);\n    if (days < startDays || days > endDays) {\n      return super.fromJulianDay(jd);\n    } else {\n      let y = UMALQURA_YEAR_START - 1;\n      let m = 1;\n      let d = 1;\n      while (d > 0) {\n        y++;\n        d = days - umalquraYearStart(y) + 1;\n        let yearLength = umalquraYearLength(y);\n        if (d === yearLength) {\n          m = 12;\n          break;\n        } else if (d < yearLength) {\n          let monthLength = umalquraMonthLength(y, m);\n          m = 1;\n          while (d > monthLength) {\n            d -= monthLength;\n            m++;\n            monthLength = umalquraMonthLength(y, m);\n          }\n          break;\n        }\n      }\n\n      return new CalendarDate(this, y, m, days - umalquraMonthStart(y, m) + 1);\n    }\n  }\n\n  toJulianDay(date: AnyCalendarDate): number {\n    if (date.year < UMALQURA_YEAR_START || date.year > UMALQURA_YEAR_END) {\n      return super.toJulianDay(date);\n    }\n\n    return CIVIL_EPOC + umalquraMonthStart(date.year, date.month) + (date.day - 1);\n  }\n\n  getDaysInMonth(date: AnyCalendarDate): number {\n    if (date.year < UMALQURA_YEAR_START || date.year > UMALQURA_YEAR_END) {\n      return super.getDaysInMonth(date);\n    }\n\n    return umalquraMonthLength(date.year, date.month);\n  }\n\n  getDaysInYear(date: AnyCalendarDate): number {\n    if (date.year < UMALQURA_YEAR_START || date.year > UMALQURA_YEAR_END) {\n      return super.getDaysInYear(date);\n    }\n\n    return umalquraYearLength(date.year);\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate, Calendar, CalendarIdentifier} from '../types';\nimport {CalendarDate} from '../CalendarDate';\nimport {mod, Mutable} from '../utils';\n\nconst HEBREW_EPOCH = 347997;\n\n// Hebrew date calculations are performed in terms of days, hours, and\n// \"parts\" (or halakim), which are 1/1080 of an hour, or 3 1/3 seconds.\nconst HOUR_PARTS = 1080;\nconst DAY_PARTS = 24 * HOUR_PARTS;\n\n// An approximate value for the length of a lunar month.\n// It is used to calculate the approximate year and month of a given\n// absolute date.\nconst MONTH_DAYS = 29;\nconst MONTH_FRACT = 12 * HOUR_PARTS + 793;\nconst MONTH_PARTS = MONTH_DAYS * DAY_PARTS + MONTH_FRACT;\n\nfunction isLeapYear(year: number) {\n  return mod(year * 7 + 1, 19) < 7;\n}\n\n// Test for delay of start of new year and to avoid\n// Sunday, Wednesday, and Friday as start of the new year.\nfunction hebrewDelay1(year: number) {\n  let months = Math.floor((235 * year - 234) / 19);\n  let parts = 12084 + 13753 * months;\n  let day = months * 29 + Math.floor(parts / 25920);\n\n  if (mod(3 * (day + 1), 7) < 3) {\n    day += 1;\n  }\n\n  return day;\n}\n\n// Check for delay in start of new year due to length of adjacent years\nfunction hebrewDelay2(year: number) {\n  let last = hebrewDelay1(year - 1);\n  let present = hebrewDelay1(year);\n  let next = hebrewDelay1(year + 1);\n\n  if (next - present === 356) {\n    return 2;\n  }\n\n  if (present - last === 382) {\n    return 1;\n  }\n\n  return 0;\n}\n\nfunction startOfYear(year: number) {\n  return hebrewDelay1(year) + hebrewDelay2(year);\n}\n\nfunction getDaysInYear(year: number) {\n  return startOfYear(year + 1) - startOfYear(year);\n}\n\nfunction getYearType(year: number) {\n  let yearLength = getDaysInYear(year);\n\n  if (yearLength > 380) {\n    yearLength -= 30; // Subtract length of leap month.\n  }\n\n  switch (yearLength) {\n    case 353:\n      return 0; // deficient\n    case 354:\n      return 1; // normal\n    case 355:\n      return 2; // complete\n  }\n}\n\nfunction getDaysInMonth(year: number, month: number): number {\n  // Normalize month numbers from 1 - 13, even on non-leap years\n  if (month >= 6 && !isLeapYear(year)) {\n    month++;\n  }\n\n  // First of all, dispose of fixed-length 29 day months\n  if (month === 4 || month === 7 || month === 9 || month === 11 || month === 13) {\n    return 29;\n  }\n\n  let yearType = getYearType(year);\n\n  // If it's Heshvan, days depend on length of year\n  if (month === 2) {\n    return yearType === 2 ? 30 : 29;\n  }\n\n  // Similarly, Kislev varies with the length of year\n  if (month === 3) {\n    return yearType === 0 ? 29 : 30;\n  }\n\n  // Adar I only exists in leap years\n  if (month === 6) {\n    return isLeapYear(year) ? 30 : 0;\n  }\n\n  return 30;\n}\n\n/**\n * The Hebrew calendar is used in Israel and around the world by the Jewish faith.\n * Years include either 12 or 13 months depending on whether it is a leap year.\n * In leap years, an extra month is inserted at month 6.\n */\nexport class HebrewCalendar implements Calendar {\n  identifier: CalendarIdentifier = 'hebrew';\n\n  fromJulianDay(jd: number): CalendarDate {\n    let d = jd - HEBREW_EPOCH;\n    let m = (d * DAY_PARTS) / MONTH_PARTS; // Months (approx)\n    let year = Math.floor((19 * m + 234) / 235) + 1; // Years (approx)\n    let ys = startOfYear(year); // 1st day of year\n    let dayOfYear = Math.floor(d - ys);\n\n    // Because of the postponement rules, it's possible to guess wrong.  Fix it.\n    while (dayOfYear < 1) {\n      year--;\n      ys = startOfYear(year);\n      dayOfYear = Math.floor(d - ys);\n    }\n\n    // Now figure out which month we're in, and the date within that month\n    let month = 1;\n    let monthStart = 0;\n    while (monthStart < dayOfYear) {\n      monthStart += getDaysInMonth(year, month);\n      month++;\n    }\n\n    month--;\n    monthStart -= getDaysInMonth(year, month);\n\n    let day = dayOfYear - monthStart;\n    return new CalendarDate(this, year, month, day);\n  }\n\n  toJulianDay(date: AnyCalendarDate): number {\n    let jd = startOfYear(date.year);\n    for (let month = 1; month < date.month; month++) {\n      jd += getDaysInMonth(date.year, month);\n    }\n\n    return jd + date.day + HEBREW_EPOCH;\n  }\n\n  getDaysInMonth(date: AnyCalendarDate): number {\n    return getDaysInMonth(date.year, date.month);\n  }\n\n  getMonthsInYear(date: AnyCalendarDate): number {\n    return isLeapYear(date.year) ? 13 : 12;\n  }\n\n  getDaysInYear(date: AnyCalendarDate): number {\n    return getDaysInYear(date.year);\n  }\n\n  getMaximumMonthsInYear(): number {\n    return 13;\n  }\n\n  getMaximumDaysInMonth(): number {\n    return 30;\n  }\n\n  getYearsInEra(): number {\n    // 6239 gregorian\n    return 9999;\n  }\n\n  getEras(): string[] {\n    return ['AM'];\n  }\n\n  balanceYearMonth(date: Mutable<AnyCalendarDate>, previousDate: AnyCalendarDate): void {\n    // Keep date in the same month when switching between leap years and non leap years\n    if (previousDate.year !== date.year) {\n      if (isLeapYear(previousDate.year) && !isLeapYear(date.year) && previousDate.month > 6) {\n        date.month--;\n      } else if (\n        !isLeapYear(previousDate.year) &&\n        isLeapYear(date.year) &&\n        previousDate.month > 6\n      ) {\n        date.month++;\n      }\n    }\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate, Calendar, CalendarIdentifier} from '../types';\nimport {CalendarDate} from '../CalendarDate';\nimport {Mutable} from '../utils';\n\nconst ETHIOPIC_EPOCH = 1723856;\nconst COPTIC_EPOCH = 1824665;\n\n// The delta between Amete Alem 1 and Amete Mihret 1\n// AA 5501 = AM 1\nconst AMETE_MIHRET_DELTA = 5500;\n\nfunction ceToJulianDay(epoch: number, year: number, month: number, day: number): number {\n  return (\n    epoch + // difference from Julian epoch to 1,1,1\n    365 * year + // number of days from years\n    Math.floor(year / 4) + // extra day of leap year\n    30 * (month - 1) + // number of days from months (1 based)\n    day -\n    1 // number of days for present month (1 based)\n  );\n}\n\nfunction julianDayToCE(epoch: number, jd: number) {\n  let year = Math.floor((4 * (jd - epoch)) / 1461);\n  let month = 1 + Math.floor((jd - ceToJulianDay(epoch, year, 1, 1)) / 30);\n  let day = jd + 1 - ceToJulianDay(epoch, year, month, 1);\n  return [year, month, day];\n}\n\nfunction getLeapDay(year: number) {\n  return Math.floor((year % 4) / 3);\n}\n\nfunction getDaysInMonth(year: number, month: number) {\n  // The Ethiopian and Coptic calendars have 13 months, 12 of 30 days each and\n  // an intercalary month at the end of the year of 5 or 6 days, depending whether\n  // the year is a leap year or not. The Leap Year follows the same rules as the\n  // Julian Calendar so that the extra month always has six days in the year before\n  // a Julian Leap Year.\n  if (month % 13 !== 0) {\n    // not intercalary month\n    return 30;\n  } else {\n    // intercalary month 5 days + possible leap day\n    return getLeapDay(year) + 5;\n  }\n}\n\n/**\n * The Ethiopic calendar system is the official calendar used in Ethiopia.\n * It includes 12 months of 30 days each, plus 5 or 6 intercalary days depending\n * on whether it is a leap year. Two eras are supported: 'AA' and 'AM'.\n */\nexport class EthiopicCalendar implements Calendar {\n  identifier: CalendarIdentifier = 'ethiopic';\n\n  fromJulianDay(jd: number): CalendarDate {\n    let [year, month, day] = julianDayToCE(ETHIOPIC_EPOCH, jd);\n    let era = 'AM';\n    if (year <= 0) {\n      era = 'AA';\n      year += AMETE_MIHRET_DELTA;\n    }\n\n    return new CalendarDate(this, era, year, month, day);\n  }\n\n  toJulianDay(date: AnyCalendarDate): number {\n    let year = date.year;\n    if (date.era === 'AA') {\n      year -= AMETE_MIHRET_DELTA;\n    }\n\n    return ceToJulianDay(ETHIOPIC_EPOCH, year, date.month, date.day);\n  }\n\n  getDaysInMonth(date: AnyCalendarDate): number {\n    return getDaysInMonth(date.year, date.month);\n  }\n\n  getMonthsInYear(): number {\n    return 13;\n  }\n\n  getDaysInYear(date: AnyCalendarDate): number {\n    return 365 + getLeapDay(date.year);\n  }\n\n  getMaximumMonthsInYear(): number {\n    return 13;\n  }\n\n  getMaximumDaysInMonth(): number {\n    return 30;\n  }\n\n  getYearsInEra(date: AnyCalendarDate): number {\n    // 9999-12-31 gregorian is 9992-20-02 ethiopic.\n    // Round down to 9991 for the last full year.\n    // AA 9999-01-01 ethiopic is 4506-09-30 gregorian.\n    return date.era === 'AA' ? 9999 : 9991;\n  }\n\n  getEras(): string[] {\n    return ['AA', 'AM'];\n  }\n}\n\n/**\n * The Ethiopic (Amete Alem) calendar is the same as the modern Ethiopic calendar,\n * except years were measured from a different epoch. Only one era is supported: 'AA'.\n */\nexport class EthiopicAmeteAlemCalendar extends EthiopicCalendar {\n  identifier: CalendarIdentifier = 'ethioaa'; // also known as 'ethiopic-amete-alem' in ICU\n\n  fromJulianDay(jd: number): CalendarDate {\n    let [year, month, day] = julianDayToCE(ETHIOPIC_EPOCH, jd);\n    year += AMETE_MIHRET_DELTA;\n    return new CalendarDate(this, 'AA', year, month, day);\n  }\n\n  getEras(): string[] {\n    return ['AA'];\n  }\n\n  getYearsInEra(): number {\n    // 9999-13-04 ethioaa is the maximum date, which is equivalent to 4506-09-29 gregorian.\n    return 9999;\n  }\n}\n\n/**\n * The Coptic calendar is similar to the Ethiopic calendar.\n * It includes 12 months of 30 days each, plus 5 or 6 intercalary days depending\n * on whether it is a leap year. Two eras are supported: 'BCE' and 'CE'.\n */\nexport class CopticCalendar extends EthiopicCalendar {\n  identifier: CalendarIdentifier = 'coptic';\n\n  fromJulianDay(jd: number): CalendarDate {\n    let [year, month, day] = julianDayToCE(COPTIC_EPOCH, jd);\n    let era = 'CE';\n    if (year <= 0) {\n      era = 'BCE';\n      year = 1 - year;\n    }\n\n    return new CalendarDate(this, era, year, month, day);\n  }\n\n  toJulianDay(date: AnyCalendarDate): number {\n    let year = date.year;\n    if (date.era === 'BCE') {\n      year = 1 - year;\n    }\n\n    return ceToJulianDay(COPTIC_EPOCH, year, date.month, date.day);\n  }\n\n  getDaysInMonth(date: AnyCalendarDate): number {\n    let year = date.year;\n    if (date.era === 'BCE') {\n      year = 1 - year;\n    }\n\n    return getDaysInMonth(year, date.month);\n  }\n\n  isInverseEra(date: AnyCalendarDate): boolean {\n    return date.era === 'BCE';\n  }\n\n  balanceDate(date: Mutable<AnyCalendarDate>): void {\n    if (date.year <= 0) {\n      date.era = date.era === 'BCE' ? 'CE' : 'BCE';\n      date.year = 1 - date.year;\n    }\n  }\n\n  getEras(): string[] {\n    return ['BCE', 'CE'];\n  }\n\n  getYearsInEra(date: AnyCalendarDate): number {\n    // 9999-12-30 gregorian is 9716-02-20 coptic.\n    // Round down to 9715 for the last full year.\n    // BCE 9999-01-01 coptic is BC 9716-06-15 gregorian.\n    return date.era === 'BCE' ? 9999 : 9715;\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {BuddhistCalendar} from './calendars/BuddhistCalendar';\nimport {Calendar, CalendarIdentifier} from './types';\nimport {\n  CopticCalendar,\n  EthiopicAmeteAlemCalendar,\n  EthiopicCalendar\n} from './calendars/EthiopicCalendar';\nimport {GregorianCalendar} from './calendars/GregorianCalendar';\nimport {HebrewCalendar} from './calendars/HebrewCalendar';\nimport {IndianCalendar} from './calendars/IndianCalendar';\nimport {\n  IslamicCivilCalendar,\n  IslamicTabularCalendar,\n  IslamicUmalquraCalendar\n} from './calendars/IslamicCalendar';\nimport {JapaneseCalendar} from './calendars/JapaneseCalendar';\nimport {PersianCalendar} from './calendars/PersianCalendar';\nimport {TaiwanCalendar} from './calendars/TaiwanCalendar';\n\n/** Creates a `Calendar` instance from a Unicode calendar identifier string. */\nexport function createCalendar(name: CalendarIdentifier): Calendar {\n  switch (name) {\n    case 'buddhist':\n      return new BuddhistCalendar();\n    case 'ethiopic':\n      return new EthiopicCalendar();\n    case 'ethioaa':\n      return new EthiopicAmeteAlemCalendar();\n    case 'coptic':\n      return new CopticCalendar();\n    case 'hebrew':\n      return new HebrewCalendar();\n    case 'indian':\n      return new IndianCalendar();\n    case 'islamic-civil':\n      return new IslamicCivilCalendar();\n    case 'islamic-tbla':\n      return new IslamicTabularCalendar();\n    case 'islamic-umalqura':\n      return new IslamicUmalquraCalendar();\n    case 'japanese':\n      return new JapaneseCalendar();\n    case 'persian':\n      return new PersianCalendar();\n    case 'roc':\n      return new TaiwanCalendar();\n    case 'gregory':\n    default:\n      return new GregorianCalendar();\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nlet formatterCache = new Map<string, Intl.DateTimeFormat>();\n\ninterface DateRangeFormatPart extends Intl.DateTimeFormatPart {\n  source: 'startRange' | 'endRange' | 'shared';\n}\n\n/** A wrapper around Intl.DateTimeFormat that fixes various browser bugs, and polyfills new features. */\nexport class DateFormatter implements Intl.DateTimeFormat {\n  private formatter: Intl.DateTimeFormat;\n  private options: Intl.DateTimeFormatOptions;\n  private resolvedHourCycle: Intl.DateTimeFormatOptions['hourCycle'];\n\n  constructor(locale: string, options: Intl.DateTimeFormatOptions = {}) {\n    this.formatter = getCachedDateFormatter(locale, options);\n    this.options = options;\n  }\n\n  /**\n   * Formats a date as a string according to the locale and format options passed to the\n   * constructor.\n   */\n  format(value: Date): string {\n    return this.formatter.format(value);\n  }\n\n  /** Formats a date to an array of parts such as separators, numbers, punctuation, and more. */\n  formatToParts(value: Date): Intl.DateTimeFormatPart[] {\n    return this.formatter.formatToParts(value);\n  }\n\n  /** Formats a date range as a string. */\n  formatRange(start: Date, end: Date): string {\n    // @ts-ignore\n    if (typeof this.formatter.formatRange === 'function') {\n      // @ts-ignore\n      return this.formatter.formatRange(start, end);\n    }\n\n    if (end < start) {\n      throw new RangeError('End date must be >= start date');\n    }\n\n    // Very basic fallback for old browsers.\n    return `${this.formatter.format(start)} – ${this.formatter.format(end)}`;\n  }\n\n  /** Formats a date range as an array of parts. */\n  formatRangeToParts(start: Date, end: Date): DateRangeFormatPart[] {\n    // @ts-ignore\n    if (typeof this.formatter.formatRangeToParts === 'function') {\n      // @ts-ignore\n      return this.formatter.formatRangeToParts(start, end);\n    }\n\n    if (end < start) {\n      throw new RangeError('End date must be >= start date');\n    }\n\n    let startParts = this.formatter.formatToParts(start);\n    let endParts = this.formatter.formatToParts(end);\n    return [\n      ...startParts.map(p => ({...p, source: 'startRange'}) as DateRangeFormatPart),\n      {type: 'literal', value: ' – ', source: 'shared'},\n      ...endParts.map(p => ({...p, source: 'endRange'}) as DateRangeFormatPart)\n    ];\n  }\n\n  /** Returns the resolved formatting options based on the values passed to the constructor. */\n  resolvedOptions(): Intl.ResolvedDateTimeFormatOptions {\n    let resolvedOptions = this.formatter.resolvedOptions();\n    if (hasBuggyResolvedHourCycle()) {\n      if (!this.resolvedHourCycle) {\n        this.resolvedHourCycle = getResolvedHourCycle(resolvedOptions.locale, this.options);\n      }\n      resolvedOptions.hourCycle = this.resolvedHourCycle;\n      resolvedOptions.hour12 = this.resolvedHourCycle === 'h11' || this.resolvedHourCycle === 'h12';\n    }\n\n    // Safari uses a different name for the Ethiopic (Amete Alem) calendar.\n    // https://bugs.webkit.org/show_bug.cgi?id=241564\n    if (resolvedOptions.calendar === 'ethiopic-amete-alem') {\n      resolvedOptions.calendar = 'ethioaa';\n    }\n\n    return resolvedOptions;\n  }\n}\n\n// There are multiple bugs involving the hour12 and hourCycle options in various browser engines.\n//   - Chrome [1] (and the ECMA 402 spec [2]) resolve hour12: false in English and other locales to h24 (24:00 - 23:59)\n//     rather than h23 (00:00 - 23:59). Same can happen with hour12: true in French, which Chrome resolves to h11 (00:00 - 11:59)\n//     rather than h12 (12:00 - 11:59).\n//   - WebKit returns an incorrect hourCycle resolved option in the French locale due to incorrect parsing of 'h' literal\n//     in the resolved pattern. It also formats incorrectly when specifying the hourCycle option for the same reason. [3]\n// [1] https://bugs.chromium.org/p/chromium/issues/detail?id=1045791\n// [2] https://github.com/tc39/ecma402/issues/402\n// [3] https://bugs.webkit.org/show_bug.cgi?id=229313\n\n// https://github.com/unicode-org/cldr/blob/018b55eff7ceb389c7e3fc44e2f657eae3b10b38/common/supplemental/supplementalData.xml#L4774-L4802\nconst hour12Preferences = {\n  true: {\n    // Only Japanese uses the h11 style for 12 hour time. All others use h12.\n    ja: 'h11'\n  },\n  false: {\n    // All locales use h23 for 24 hour time. None use h24.\n  }\n};\n\nfunction getCachedDateFormatter(\n  locale: string,\n  options: Intl.DateTimeFormatOptions = {}\n): Intl.DateTimeFormat {\n  // Work around buggy hour12 behavior in Chrome / ECMA 402 spec by using hourCycle instead.\n  // Only apply the workaround if the issue is detected, because the hourCycle option is buggy in Safari.\n  if (typeof options.hour12 === 'boolean' && hasBuggyHour12Behavior()) {\n    options = {...options};\n    let pref = hour12Preferences[String(options.hour12)][locale.split('-')[0]];\n    let defaultHourCycle = options.hour12 ? 'h12' : 'h23';\n    options.hourCycle = pref ?? defaultHourCycle;\n    delete options.hour12;\n  }\n\n  let cacheKey =\n    locale +\n    (options\n      ? Object.entries(options)\n          .sort((a, b) => (a[0] < b[0] ? -1 : 1))\n          .join()\n      : '');\n  if (formatterCache.has(cacheKey)) {\n    return formatterCache.get(cacheKey)!;\n  }\n\n  let numberFormatter = new Intl.DateTimeFormat(locale, options);\n  formatterCache.set(cacheKey, numberFormatter);\n  return numberFormatter;\n}\n\nlet _hasBuggyHour12Behavior: boolean | null = null;\nfunction hasBuggyHour12Behavior() {\n  if (_hasBuggyHour12Behavior == null) {\n    _hasBuggyHour12Behavior =\n      new Intl.DateTimeFormat('en-US', {\n        hour: 'numeric',\n        hour12: false\n      }).format(new Date(2020, 2, 3, 0)) === '24';\n  }\n\n  return _hasBuggyHour12Behavior;\n}\n\nlet _hasBuggyResolvedHourCycle: boolean | null = null;\nfunction hasBuggyResolvedHourCycle() {\n  if (_hasBuggyResolvedHourCycle == null) {\n    _hasBuggyResolvedHourCycle =\n      new Intl.DateTimeFormat('fr', {\n        hour: 'numeric',\n        hour12: false\n      }).resolvedOptions().hourCycle === 'h12';\n  }\n\n  return _hasBuggyResolvedHourCycle;\n}\n\nfunction getResolvedHourCycle(locale: string, options: Intl.DateTimeFormatOptions) {\n  if (!options.timeStyle && !options.hour) {\n    return undefined;\n  }\n\n  // Work around buggy results in resolved hourCycle and hour12 options in WebKit.\n  // Format the minimum possible hour and maximum possible hour in a day and parse the results.\n  locale = locale.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, '');\n  locale += (locale.includes('-u-') ? '' : '-u') + '-nu-latn';\n  let formatter = getCachedDateFormatter(locale, {\n    ...options,\n    timeZone: undefined // use local timezone\n  });\n\n  let min = parseInt(\n    formatter.formatToParts(new Date(2020, 2, 3, 0)).find(p => p.type === 'hour')!.value,\n    10\n  );\n  let max = parseInt(\n    formatter.formatToParts(new Date(2020, 2, 3, 23)).find(p => p.type === 'hour')!.value,\n    10\n  );\n\n  if (min === 0 && max === 23) {\n    return 'h23';\n  }\n\n  if (min === 24 && max === 23) {\n    return 'h24';\n  }\n\n  if (min === 0 && max === 11) {\n    return 'h11';\n  }\n\n  if (min === 12 && max === 11) {\n    return 'h12';\n  }\n\n  throw new Error('Unexpected hour cycle result');\n}\n","import type { DateValue } from '@internationalized/date'\nimport type { Matcher } from './types'\nimport { CalendarDateTime, getDayOfWeek, getLocalTimeZone, parseDate, parseDateTime, parseZonedDateTime, toCalendar, ZonedDateTime } from '@internationalized/date'\n\n/**\n * Given a date string and a reference `DateValue` object, parse the\n * string to the same type as the reference object.\n *\n * Useful for parsing strings from data attributes, which are always\n * strings, to the same type being used by the date component.\n */\nexport function parseStringToDateValue(dateStr: string, referenceVal: DateValue): DateValue {\n  let dateValue: DateValue\n  if (isZonedDateTime(referenceVal))\n    dateValue = parseZonedDateTime(dateStr)\n\n  else if (isCalendarDateTime(referenceVal))\n    dateValue = parseDateTime(dateStr)\n\n  else\n    dateValue = parseDate(dateStr)\n\n  return dateValue.calendar !== referenceVal.calendar ? toCalendar(dateValue, referenceVal.calendar) : dateValue\n}\n\n/**\n * Given a `DateValue` object, convert it to a native `Date` object.\n * If a timezone is provided, the date will be converted to that timezone.\n * If no timezone is provided, the date will be converted to the local timezone.\n */\nexport function toDate(dateValue: DateValue, tz: string = getLocalTimeZone()) {\n  if (isZonedDateTime(dateValue))\n    return dateValue.toDate()\n  else\n    return dateValue.toDate(tz)\n}\n\nexport function isCalendarDateTime(dateValue: DateValue): dateValue is CalendarDateTime {\n  return dateValue instanceof CalendarDateTime\n}\n\nexport function isZonedDateTime(dateValue: DateValue): dateValue is ZonedDateTime {\n  return dateValue instanceof ZonedDateTime\n}\n\nexport function hasTime(dateValue: DateValue) {\n  return isCalendarDateTime(dateValue) || isZonedDateTime(dateValue)\n}\n\n/**\n * Given a date, return the number of days in the month.\n */\nexport function getDaysInMonth(date: Date | DateValue) {\n  if (date instanceof Date) {\n    const year = date.getFullYear()\n    const month = date.getMonth() + 1\n    /**\n     * By using zero as the day, we get the\n     * last day of the previous month, which\n     * is the month we originally passed in.\n     */\n    return new Date(year, month, 0).getDate()\n  }\n  else {\n    return date.set({ day: 100 }).day\n  }\n}\n\n/**\n * Determine if a date is before the reference date.\n * @param dateToCompare - is this date before the `referenceDate`\n * @param referenceDate - is the `dateToCompare` before this date\n *\n * @see {@link isBeforeOrSame} for inclusive\n */\nexport function isBefore(dateToCompare: DateValue, referenceDate: DateValue) {\n  return dateToCompare.compare(referenceDate) < 0\n}\n\n/**\n * Determine if a date is after the reference date.\n * @param dateToCompare - is this date after the `referenceDate`\n * @param referenceDate - is the `dateToCompare` after this date\n *\n * @see {@link isAfterOrSame} for inclusive\n */\nexport function isAfter(dateToCompare: DateValue, referenceDate: DateValue) {\n  return dateToCompare.compare(referenceDate) > 0\n}\n\n/**\n * Determine if a date is before or the same as the reference date.\n *\n * @param dateToCompare - the date to compare\n * @param referenceDate - the reference date to make the comparison against\n *\n * @see {@link isBefore} for non-inclusive\n */\nexport function isBeforeOrSame(dateToCompare: DateValue, referenceDate: DateValue) {\n  return dateToCompare.compare(referenceDate) <= 0\n}\n\n/**\n * Determine if a date is after or the same as the reference date.\n *\n * @param dateToCompare - is this date after or the same as the `referenceDate`\n * @param referenceDate - is the `dateToCompare` after or the same as this date\n *\n * @see {@link isAfter} for non-inclusive\n */\nexport function isAfterOrSame(dateToCompare: DateValue, referenceDate: DateValue) {\n  return dateToCompare.compare(referenceDate) >= 0\n}\n\n/**\n * Determine if a date is inclusively between a start and end reference date.\n *\n * @param date - is this date inclusively between the `start` and `end` dates\n * @param start - the start reference date to make the comparison against\n * @param end - the end reference date to make the comparison against\n *\n * @see {@link isBetween} for non-inclusive\n */\nexport function isBetweenInclusive(date: DateValue, start: DateValue, end: DateValue) {\n  return isAfterOrSame(date, start) && isBeforeOrSame(date, end)\n}\n\n/**\n * Determine if a date is between a start and end reference date.\n *\n * @param date - is this date between the `start` and `end` dates\n * @param start - the start reference date to make the comparison against\n * @param end - the end reference date to make the comparison against\n *\n * @see {@link isBetweenInclusive} for inclusive\n */\nexport function isBetween(date: DateValue, start: DateValue, end: DateValue) {\n  return isAfter(date, start) && isBefore(date, end)\n}\n\nexport function getLastFirstDayOfWeek<T extends DateValue = DateValue>(\n  date: T,\n  firstDayOfWeek: number,\n  locale: string,\n): T {\n  /**\n   * \"firstDayOfWeek\" is fixed to 0(Sunday) to avoid confusion regarding locales.\n   * This also aligns with other date libraries, e.g., date-fns.\n   *\n   * #see https://github.com/unovue/reka-ui/issues/2157\n   */\n  const day = getDayOfWeek(date, locale, 'sun')\n\n  if (firstDayOfWeek > day)\n    return date.subtract({ days: day + 7 - firstDayOfWeek }) as T\n\n  if (firstDayOfWeek === day)\n    return date as T\n\n  return date.subtract({ days: day - firstDayOfWeek }) as T\n}\n\nexport function getNextLastDayOfWeek<T extends DateValue = DateValue>(\n  date: T,\n  firstDayOfWeek: number,\n  locale: string,\n): T {\n  /**\n   * \"firstDayOfWeek\" is fixed to 0(Sunday) to avoid confusion regarding locales.\n   * This also aligns with other date libraries, e.g., date-fns.\n   *\n   * #see https://github.com/unovue/reka-ui/issues/2157\n   */\n  const day = getDayOfWeek(date, locale, 'sun')\n\n  const lastDayOfWeek = firstDayOfWeek === 0 ? 6 : firstDayOfWeek - 1\n\n  if (day === lastDayOfWeek)\n    return date as T\n\n  if (day > lastDayOfWeek)\n    return date.add({ days: 7 - day + lastDayOfWeek }) as T\n\n  return date.add({ days: lastDayOfWeek - day }) as T\n}\n\n/**\n * Check if two dates are in the same year and month.\n */\nexport function isSameYearMonth(a: DateValue, b: DateValue): boolean {\n  return a.year === b.year && a.month === b.month\n}\n\n/**\n * Check if two dates are in the same year.\n */\nexport function isSameYear(a: DateValue, b: DateValue): boolean {\n  return a.year === b.year\n}\n\nexport function areAllDaysBetweenValid(\n  start: DateValue,\n  end: DateValue,\n  isUnavailable: Matcher | undefined,\n  isDisabled: Matcher | undefined,\n  isHighlightable?: Matcher | undefined,\n) {\n  if (isUnavailable === undefined && isDisabled === undefined && isHighlightable === undefined)\n    return true\n\n  let dCurrent = start.add({ days: 1 })\n  if ((isDisabled?.(dCurrent) || isUnavailable?.(dCurrent))\n    && !isHighlightable?.(dCurrent)) {\n    return false\n  }\n\n  const dEnd = end\n  while (dCurrent.compare(dEnd) < 0) {\n    dCurrent = dCurrent.add({ days: 1 })\n    if ((isDisabled?.(dCurrent) || isUnavailable?.(dCurrent))\n      && !isHighlightable?.(dCurrent)) {\n      return false\n    }\n  }\n  return true\n}\n\n/**\n * Compare two dates by year and month only (ignoring day).\n */\nexport function compareYearMonth(a: DateValue, b: DateValue): number {\n  if (a.year !== b.year)\n    return a.year - b.year\n  return a.month - b.month\n}\n\n/**\n * Check if a date's month is between start and end (inclusive), comparing year+month only.\n */\nexport function isMonthBetweenInclusive(date: DateValue, start: DateValue, end: DateValue): boolean {\n  return compareYearMonth(date, start) >= 0 && compareYearMonth(date, end) <= 0\n}\n\n/**\n * Check if a date's year is between start and end (inclusive), comparing year only.\n */\nexport function isYearBetweenInclusive(date: DateValue, start: DateValue, end: DateValue): boolean {\n  return date.year >= start.year && date.year <= end.year\n}\n\n/**\n * Get the number of months between two dates (inclusive).\n */\nexport function getMonthsBetween(start: DateValue, end: DateValue): number {\n  return (end.year - start.year) * 12 + (end.month - start.month) + 1\n}\n\n/**\n * Get the number of years between two dates (inclusive).\n */\nexport function getYearsBetween(start: DateValue, end: DateValue): number {\n  return end.year - start.year + 1\n}\n\n/**\n * Check if all months between start and end are valid (not unavailable/disabled).\n */\nexport function areAllMonthsBetweenValid(\n  start: DateValue,\n  end: DateValue,\n  isUnavailable: Matcher | undefined,\n  isDisabled: Matcher | undefined,\n): boolean {\n  if (isUnavailable === undefined && isDisabled === undefined)\n    return true\n\n  let current = start.set({ day: 1 })\n  const endMonth = end.set({ day: 1 })\n\n  while (compareYearMonth(current, endMonth) <= 0) {\n    if (isDisabled?.(current) || isUnavailable?.(current))\n      return false\n    current = current.add({ months: 1 })\n  }\n  return true\n}\n\n/**\n * Check if all years between start and end are valid (not unavailable/disabled).\n */\nexport function areAllYearsBetweenValid(\n  start: DateValue,\n  end: DateValue,\n  isUnavailable: Matcher | undefined,\n  isDisabled: Matcher | undefined,\n): boolean {\n  if (isUnavailable === undefined && isDisabled === undefined)\n    return true\n\n  let current = start.set({ day: 1, month: 1 })\n  const endYear = end.set({ day: 1, month: 1 })\n\n  while (current.year <= endYear.year) {\n    if (isDisabled?.(current) || isUnavailable?.(current))\n      return false\n    current = current.add({ years: 1 })\n  }\n  return true\n}\n","/*\n  * Implementation ported from https://github.com/melt-ui/melt-ui/blob/develop/src/lib/internal/helpers/date/utils.ts\n*/\n\nimport type { DateValue, ZonedDateTime } from '@internationalized/date'\nimport { CalendarDate, CalendarDateTime, createCalendar, DateFormatter, Time, toCalendar } from '@internationalized/date'\n\nexport type TimeValue = Time | CalendarDateTime | ZonedDateTime\n\nexport type Granularity = 'day' | 'hour' | 'minute' | 'second'\nexport type TimeGranularity = 'hour' | 'minute' | 'second'\n\ntype GetDefaultDateProps = {\n  defaultValue?: DateValue | DateValue[] | undefined\n  defaultPlaceholder?: DateValue | undefined\n  granularity?: Granularity\n  locale?: string\n}\n\n/**\n * A helper function used throughout the various date builders\n * to generate a default `DateValue` using the `defaultValue`,\n * `defaultPlaceholder`, and `granularity` props.\n *\n * It's important to match the `DateValue` type being used\n * elsewhere in the builder, so they behave according to the\n * behavior the user expects based on the props they've provided.\n *\n */\nexport function getDefaultDate(props: GetDefaultDateProps): DateValue {\n  const { defaultValue, defaultPlaceholder, granularity = 'day', locale = 'en' } = props\n\n  if (Array.isArray(defaultValue) && defaultValue.length)\n    return defaultValue.at(-1)!.copy()\n\n  if (defaultValue && !Array.isArray(defaultValue))\n    return defaultValue.copy()\n\n  if (defaultPlaceholder)\n    return defaultPlaceholder.copy()\n\n  const date = new Date()\n  const year = date.getFullYear()\n  const month = date.getMonth() + 1\n  const day = date.getDate()\n  const calendarDateTimeGranularities = ['hour', 'minute', 'second']\n\n  const defaultFormatter = new DateFormatter(locale)\n  const calendar = createCalendar(defaultFormatter.resolvedOptions().calendar)\n\n  if (calendarDateTimeGranularities.includes(granularity ?? 'day'))\n    return toCalendar(new CalendarDateTime(year, month, day, 0, 0, 0), calendar)\n\n  return toCalendar(new CalendarDate(year, month, day), calendar)\n}\n\ntype GetDefaultTimeProps = {\n  defaultValue?: TimeValue | undefined\n  defaultPlaceholder?: TimeValue | undefined\n}\n\nexport function getDefaultTime(props: GetDefaultTimeProps): TimeValue {\n  const { defaultValue, defaultPlaceholder } = props\n\n  if (defaultValue) {\n    return defaultValue.copy()\n  }\n\n  if (defaultPlaceholder) {\n    return defaultPlaceholder.copy()\n  }\n\n  return new Time(0, 0, 0)\n}\n","/**\n * Splits an array into chunks of a given size.\n * @param arr The array to split.\n * @param size The size of each chunk.\n * @returns An array of arrays, where each sub-array has `size` elements from the original array.\n * @example ```ts\n * const arr = [1, 2, 3, 4, 5, 6, 7, 8];\n * const chunks = chunk(arr, 3);\n * // chunks = [[1, 2, 3], [4, 5, 6], [7, 8]]\n * ```\n */\nexport function chunk<T>(arr: T[], size: number): T[][] {\n  const result = []\n  for (let i = 0; i < arr.length; i += size)\n    result.push(arr.slice(i, i + size))\n\n  return result\n}\n","import type { Granularity } from './comparators'\nimport type { DateInputType, DateStep, DateValue, HourCycle } from './types'\nimport { defu } from 'defu'\n\nexport function getOptsByGranularity(granularity: Granularity, hourCycle: HourCycle, isTimeValue: boolean = false) {\n  const opts: Intl.DateTimeFormatOptions = {\n    year: 'numeric',\n    month: '2-digit',\n    day: '2-digit',\n    hour: '2-digit',\n    minute: '2-digit',\n    second: '2-digit',\n    timeZoneName: 'short',\n    hourCycle: normalizeHourCycle(hourCycle),\n    hour12: normalizeHour12(hourCycle),\n  }\n  if (isTimeValue) {\n    delete opts.year\n    delete opts.month\n    delete opts.day\n  }\n\n  if (granularity === 'day') {\n    delete opts.second\n    delete opts.hour\n    delete opts.minute\n    delete opts.timeZoneName\n  }\n  if (granularity === 'hour') {\n    delete opts.minute\n    delete opts.second\n  }\n\n  if (granularity === 'minute')\n    delete opts.second\n\n  return opts\n}\n\ntype GetDefaultDateStepProps = {\n  step?: DateStep\n}\n\nexport function normalizeDateStep(props?: GetDefaultDateStepProps): DateStep {\n  return defu(props?.step, {\n    year: 1,\n    month: 1,\n    day: 1,\n    hour: 1,\n    minute: 1,\n    second: 1,\n    millisecond: 1,\n  } satisfies DateStep)\n}\n\nexport function handleCalendarInitialFocus(calendar: HTMLElement) {\n  const selectedDay = calendar.querySelector<HTMLElement>('[data-selected]')\n  if (selectedDay)\n    return selectedDay.focus()\n\n  const today = calendar.querySelector<HTMLElement>('[data-today]')\n  if (today)\n    return today.focus()\n\n  const firstDay = calendar.querySelector<HTMLElement>('[data-reka-calendar-day]')\n  if (firstDay)\n    return firstDay.focus()\n}\n\nexport function normalizeHourCycle(hourCycle: HourCycle) {\n  if (hourCycle === 24)\n    return 'h23'\n  if (hourCycle === 12)\n    return 'h11'\n  return undefined\n}\n\nexport function normalizeHour12(hourCycle: HourCycle) {\n  if (hourCycle === 24)\n    return false\n  if (hourCycle === 12)\n    return true\n  return undefined\n}\n\nexport function getInputType(granularity: Granularity): DateInputType {\n  return granularity === 'day' ? 'date' : 'datetime-local'\n}\n\nexport function normalizeInputValue(date: DateValue | undefined, granularity: Granularity): string {\n  if (!date)\n    return ''\n\n  const type = getInputType(granularity)\n\n  const year = String(date.year).padStart(4, '0')\n  const month = String(date.month).padStart(2, '0')\n  const day = String(date.day).padStart(2, '0')\n\n  if (type === 'date')\n    return `${year}-${month}-${day}`\n\n  const hour = String('hour' in date ? date.hour : 0).padStart(2, '0')\n  const minute = String('minute' in date ? date.minute : 0).padStart(2, '0')\n\n  if (granularity === 'second') {\n    const second = String('second' in date ? date.second : 0).padStart(2, '0')\n    return `${year}-${month}-${day}T${hour}:${minute}:${second}`\n  }\n\n  return `${year}-${month}-${day}T${hour}:${minute}`\n}\n","/*\n * Implementation ported from from from https://github.com/melt-ui/melt-ui/blob/develop/src/lib/builders/calendar/create.ts\n*/\n\nimport type { DateValue, DayOfWeek } from '@internationalized/date'\nimport type { Grid } from './types'\nimport type { DateRange } from '@/shared'\nimport { CalendarDate, endOfMonth, endOfYear, getDayOfWeek, startOfMonth, startOfWeek, startOfYear } from '@internationalized/date'\nimport { getDaysInMonth, getLastFirstDayOfWeek, getNextLastDayOfWeek } from './comparators'\nimport { chunk } from './utils'\n\nexport type WeekDayFormat = 'narrow' | 'short' | 'long'\n\nexport type WeekStartsOn = 0 | 1 | 2 | 3 | 4 | 5 | 6\n\nexport type CreateSelectProps = {\n  /**\n   * The date object representing the date (usually the first day of the month/year).\n   */\n  dateObj: DateValue\n}\n\nexport type CreateMonthProps = {\n  /**\n   * The date object representing the month's date (usually the first day of the month).\n   */\n  dateObj: DateValue\n\n  /**\n   * The day of the week to start the calendar on (0 for Sunday, 1 for Monday, etc.).\n   */\n  weekStartsOn: WeekStartsOn\n\n  /**\n   * Whether to always render 6 weeks in the calendar, even if the month doesn't\n   * span 6 weeks.\n   */\n  fixedWeeks: boolean\n\n  /**\n   * The locale to use when creating the calendar month.\n   */\n  locale: string\n}\n\n/**\n * Retrieves an array of date values representing the days between\n * the provided start and end dates.\n */\nexport function getDaysBetween(start: DateValue, end: DateValue) {\n  const days: DateValue[] = []\n  let dCurrent = start.add({ days: 1 })\n  const dEnd = end\n  while (dCurrent.compare(dEnd) < 0) {\n    days.push(dCurrent)\n    dCurrent = dCurrent.add({ days: 1 })\n  }\n  return days\n}\n\nexport function createMonth(props: CreateMonthProps): Grid<DateValue> {\n  const { dateObj, weekStartsOn, fixedWeeks, locale } = props\n  const daysInMonth = getDaysInMonth(dateObj)\n\n  const datesArray = Array.from({ length: daysInMonth }, (_, i) => dateObj.set({ day: i + 1 }))\n\n  const firstDayOfMonth = startOfMonth(dateObj)\n  const lastDayOfMonth = endOfMonth(dateObj)\n\n  const lastSunday = getLastFirstDayOfWeek(firstDayOfMonth, weekStartsOn, locale)\n  const nextSaturday = getNextLastDayOfWeek(lastDayOfMonth, weekStartsOn, locale)\n\n  const lastMonthDays = getDaysBetween(lastSunday.subtract({ days: 1 }), firstDayOfMonth)\n  const nextMonthDays = getDaysBetween(lastDayOfMonth, nextSaturday.add({ days: 1 }))\n\n  const totalDays = lastMonthDays.length + datesArray.length + nextMonthDays.length\n\n  if (fixedWeeks && totalDays < 42) {\n    const extraDays = 42 - totalDays\n\n    let startFrom = nextMonthDays.at(-1)\n\n    if (!startFrom)\n      startFrom = endOfMonth(dateObj)\n\n    const extraDaysArray = Array.from({ length: extraDays }, (_, i) => {\n      const incr = i + 1\n      return startFrom.add({ days: incr })\n    })\n    nextMonthDays.push(...extraDaysArray)\n  }\n\n  const allDays = lastMonthDays.concat(datesArray, nextMonthDays)\n\n  const weeks = chunk(allDays, 7)\n\n  return {\n    value: dateObj,\n    cells: allDays,\n    rows: weeks,\n  }\n}\n\ntype SetMonthProps = CreateMonthProps & {\n  numberOfMonths: number | undefined\n  currentMonths?: Grid<DateValue>[]\n}\n\ntype SetYearProps = CreateSelectProps & {\n  numberOfMonths?: number\n  pagedNavigation?: boolean\n}\n\ntype SetDecadeProps = CreateSelectProps & {\n  startIndex?: number\n  endIndex: number\n}\n\nexport function startOfDecade(dateObj: DateValue) {\n  // round to the lowest nearest 10 when building the decade\n  return startOfYear(dateObj.subtract({ years: dateObj.year - Math.floor(dateObj.year / 10) * 10 }).set({ day: 1, month: 1 }))\n}\n\nexport function endOfDecade(dateObj: DateValue) {\n  // round to the lowest nearest 10 when building the decade\n  return endOfYear(dateObj.add({ years: Math.ceil((dateObj.year + 1) / 10) * 10 - dateObj.year - 1 }).set({ day: 35, month: 12 }))\n}\n\nexport function createDecade(props: SetDecadeProps): DateValue[] {\n  const { dateObj, startIndex, endIndex } = props\n\n  const decadeArray = Array.from({ length: Math.abs(startIndex ?? 0) + endIndex }, (_, i) =>\n    i <= Math.abs((startIndex ?? 0))\n      ? dateObj.subtract({ years: i }).set({ day: 1, month: 1 })\n      : dateObj.add({ years: i - endIndex }).set({ day: 1, month: 1 }))\n\n  decadeArray.sort((a: DateValue, b: DateValue) => a.year - b.year)\n\n  return decadeArray\n}\n\nexport function createYear(props: SetYearProps): DateValue[] {\n  const { dateObj, numberOfMonths = 1, pagedNavigation = false } = props\n\n  if (numberOfMonths && pagedNavigation) {\n    const monthsArray = Array.from({ length: Math.floor(12 / numberOfMonths) }, (_, i) => startOfMonth(dateObj.set({ month: i * numberOfMonths + 1 })))\n\n    return monthsArray\n  }\n\n  const monthsArray = Array.from({ length: 12 }, (_, i) => startOfMonth(dateObj.set({ month: i + 1 })))\n  return monthsArray\n}\n\nexport function createMonths(props: SetMonthProps) {\n  const { numberOfMonths, dateObj, ...monthProps } = props\n\n  const months: Grid<DateValue>[] = []\n\n  if (!numberOfMonths || numberOfMonths === 1) {\n    months.push(\n      createMonth({\n        ...monthProps,\n        dateObj,\n      }),\n    )\n    return months\n  }\n\n  months.push(\n    createMonth({\n      ...monthProps,\n      dateObj,\n    }),\n  )\n\n  // Create all the months, starting with the current month\n  for (let i = 1; i < numberOfMonths; i++) {\n    const nextMonth = dateObj.add({ months: i })\n    months.push(\n      createMonth({\n        ...monthProps,\n        dateObj: nextMonth,\n      }),\n    )\n  }\n\n  return months\n}\n\n/**\n * Creates a 3x4 grid of months for a given year.\n */\nexport function createMonthGrid(props: CreateSelectProps): Grid<DateValue> {\n  const { dateObj } = props\n  const months = createYear({ dateObj })\n  return { value: dateObj, cells: months, rows: chunk(months, 4) }\n}\n\n/**\n * Creates a 3x4 grid of years (decade-aligned).\n * The grid starts from the decade that contains the given date.\n */\nexport function createYearGrid(props: CreateSelectProps & { yearsPerPage?: number, decadeAligned?: boolean }): Grid<DateValue> {\n  const { dateObj, yearsPerPage = 12, decadeAligned = true } = props\n\n  let startYear: number\n  if (decadeAligned) {\n    startYear = startOfDecade(dateObj).year\n  }\n  else {\n    startYear = dateObj.year\n  }\n\n  const years = Array.from({ length: yearsPerPage }, (_, i) => startOfYear(dateObj.set({ year: startYear + i })))\n  const firstYear = years[0]\n  return { value: firstYear, cells: years, rows: chunk(years, 4) }\n}\n\nexport function createYearRange({ start, end }: DateRange): DateValue[] {\n  const years: DateValue[] = []\n\n  if (!start || !end)\n    return years\n\n  let current = startOfYear(start)\n\n  while (current.compare(end) <= 0) {\n    years.push(current)\n    // Move to the first day of the next year\n    current = startOfYear(current.add({ years: 1 }))\n  }\n\n  return years\n}\n\nexport function createDateRange({ start, end }: DateRange): DateValue[] {\n  const dates: DateValue[] = []\n\n  if (!start || !end)\n    return dates\n\n  let current = start\n\n  while (current.compare(end) <= 0) {\n    dates.push(current)\n    current = current.add({ days: 1 })\n  }\n\n  return dates\n}\n\n/**\n * It's better to use `getWeekStart` from `@internationalized/date`,\n * but sadly it is not yet exported from the package.\n * And the `Intl.Locale` API is not supported well enough yet.\n */\nexport function getWeekStartsOn(locale: string): WeekStartsOn {\n  // Jan 6, 2025 is a Monday (ISO day = 1)\n  const monday = new CalendarDate(2025, 1, 6)\n  const dayOfWeek = getDayOfWeek(monday, locale)\n  // dayOfWeek tells us Monday's position in the locale's week (0-indexed)\n  // If Monday is position 0 → week starts Monday (1)\n  // If Monday is position 1 → week starts Sunday (0)\n  return (1 - dayOfWeek + 7) % 7 as WeekStartsOn\n}\n\n/**\n * Returns the locale-specific week number\n */\nexport function getWeekNumber(date: DateValue, locale: string = 'en-US', firstDayOfWeek?: DayOfWeek): number {\n  const jan1 = new CalendarDate(date.year, 1, 1)\n\n  // Detect ISO locale by comparing JS day of week with locale day of week\n  const usesISOWeek = jan1.toDate('UTC').getUTCDay() !== getDayOfWeek(jan1, locale)\n  const weekStartsOn = firstDayOfWeek ?? (usesISOWeek ? 'mon' : 'sun')\n  const firstWeekContainsDate = usesISOWeek ? 4 : 1\n\n  // Find the \"deciding day\" - its year determines which year's week numbering to use\n  const dayOfWeek = getDayOfWeek(date, locale, weekStartsOn)\n  const decidingDay = date.add({ days: 7 - firstWeekContainsDate - dayOfWeek })\n  const weekYear = decidingDay.year\n\n  // Calculate week number from week 1 start\n  const week1Ref = new CalendarDate(weekYear, 1, firstWeekContainsDate)\n  const week1Start = startOfWeek(week1Ref, locale, weekStartsOn)\n  const currentWeekStart = startOfWeek(date, locale, weekStartsOn)\n\n  const MS_PER_WEEK = 7 * 24 * 60 * 60 * 1000\n  const daysDiff = Math.round(\n    (currentWeekStart.toDate('UTC').getTime() - week1Start.toDate('UTC').getTime())\n    / MS_PER_WEEK,\n  )\n  return daysDiff + 1\n}\n","","/*\n  * Implementation ported from https://github.com/melt-ui/melt-ui/blob/develop/src/lib/internal/helpers/date/formatter.ts\n*/\n\nimport type { DateValue, ZonedDateTime } from '@internationalized/date'\nimport { DateFormatter, getLocalTimeZone, today } from '@internationalized/date'\nimport { ref } from 'vue'\nimport { hasTime, isZonedDateTime, toDate } from '@/date'\n\nexport interface DateFormatterOptions extends Intl.DateTimeFormatOptions {\n  calendar?: string\n}\n\nexport type Formatter = {\n  getLocale: () => string\n  setLocale: (newLocale: string) => void\n  custom: (date: Date, options: DateFormatterOptions) => string\n  selectedDate: (date: DateValue, includeTime?: boolean) => string\n  dayOfWeek: (date: Date, length?: DateFormatterOptions['weekday']) => string\n  fullMonthAndYear: (date: Date, options?: DateFormatterOptions) => string\n  fullMonth: (date: Date, options?: DateFormatterOptions) => string\n  fullYear: (date: Date, options?: DateFormatterOptions) => string\n  dayPeriod: (date: Date) => string\n  part: (dateObj: DateValue, type: Intl.DateTimeFormatPartTypes, options?: DateFormatterOptions) => string\n  toParts: (date: DateValue, options?: DateFormatterOptions) => Intl.DateTimeFormatPart[]\n  getMonths: () => { label: string, value: number }[]\n}\n\n/**\n * Creates a wrapper around the `DateFormatter`, which is\n * an improved version of the {@link Intl.DateTimeFormat} API,\n * that is used internally by the various date builders to\n * easily format dates in a consistent way.\n *\n * @see [DateFormatter](https://react-spectrum.adobe.com/internationalized/date/DateFormatter.html)\n */\nexport function useDateFormatter(initialLocale: string, opts: DateFormatterOptions = {}): Formatter {\n  const locale = ref(initialLocale)\n\n  function getLocale() {\n    return locale.value\n  }\n\n  function setLocale(newLocale: string) {\n    locale.value = newLocale\n  }\n\n  function custom(date: Date, options: DateFormatterOptions) {\n    return new DateFormatter(locale.value, { ...opts, ...options }).format(date)\n  }\n\n  function selectedDate(date: DateValue, includeTime = true) {\n    if (hasTime(date) && includeTime) {\n      return custom(toDate(date), {\n        dateStyle: 'long',\n        timeStyle: 'long',\n      })\n    }\n    else {\n      return custom(toDate(date), {\n        dateStyle: 'long',\n      })\n    }\n  }\n\n  function fullMonthAndYear(date: Date, options: DateFormatterOptions = {}) {\n    return new DateFormatter(locale.value, { ...opts, month: 'long', year: 'numeric', ...options }).format(date)\n  }\n\n  function fullMonth(date: Date, options: DateFormatterOptions = {}) {\n    return new DateFormatter(locale.value, { ...opts, month: 'long', ...options }).format(date)\n  }\n\n  function getMonths() {\n    const defaultDate = today(getLocalTimeZone())\n    const months = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]\n    return months.map(item => ({ label: fullMonth(toDate(defaultDate.set({ month: item }))), value: item }))\n  }\n\n  function fullYear(date: Date, options: DateFormatterOptions = {}) {\n    return new DateFormatter(locale.value, { ...opts, year: 'numeric', ...options }).format(date)\n  }\n\n  function toParts(date: DateValue, options?: DateFormatterOptions) {\n    if (isZonedDateTime(date)) {\n      return new DateFormatter(locale.value, {\n        ...opts,\n        ...options,\n        timeZone: (date as ZonedDateTime).timeZone,\n      }).formatToParts(toDate(date))\n    }\n    else {\n      return new DateFormatter(locale.value, { ...opts, ...options }).formatToParts(toDate(date))\n    }\n  }\n\n  function dayOfWeek(date: Date, length: DateFormatterOptions['weekday'] = 'narrow') {\n    return new DateFormatter(locale.value, { ...opts, weekday: length }).format(date)\n  }\n\n  function dayPeriod(date: Date) {\n    const parts = new DateFormatter(locale.value, {\n      ...opts,\n      hour: 'numeric',\n      minute: 'numeric',\n    }).formatToParts(date)\n    const value = parts.find(p => p.type === 'dayPeriod')?.value\n    // Day period can be \"AM\"/\"PM\" or \"am\"/\"pm\" or \"a.m.\"/\"p.m.\" in some locales\n    if (value === 'PM' || value === 'pm' || value === 'p.m.')\n      return 'PM'\n\n    return 'AM'\n  }\n\n  const defaultPartOptions: DateFormatterOptions = {\n    year: 'numeric',\n    month: 'numeric',\n    day: 'numeric',\n    hour: 'numeric',\n    minute: 'numeric',\n    second: 'numeric',\n  }\n\n  function part(\n    dateObj: DateValue,\n    type: Intl.DateTimeFormatPartTypes,\n    options: DateFormatterOptions = {},\n  ) {\n    const opts = { ...defaultPartOptions, ...options }\n    const parts = toParts(dateObj, opts)\n    const part = parts.find(p => p.type === type)\n    return part ? part.value : ''\n  }\n\n  return {\n    setLocale,\n    getLocale,\n    fullMonth,\n    fullYear,\n    fullMonthAndYear,\n    toParts,\n    custom,\n    part,\n    dayPeriod,\n    selectedDate,\n    dayOfWeek,\n    getMonths,\n  }\n}\n","import type { Ref } from 'vue'\nimport type { Direction } from './types'\nimport { computed, ref } from 'vue'\nimport { injectConfigProviderContext } from '@/ConfigProvider/ConfigProvider.vue'\n\n/**\n * The `useDirection` function provides a way to access the current direction in your application.\n * @param {Ref<Direction | undefined>} [dir] - An optional ref containing the direction (ltr or rtl).\n * @returns  computed value that combines with the resolved direction.\n */\nexport function useDirection(dir?: Ref<Direction | undefined>) {\n  const context = injectConfigProviderContext({\n    dir: ref('ltr'),\n  })\n  return computed(() => dir?.value || context.dir?.value || 'ltr')\n}\n","import { camelize, getCurrentInstance, toHandlerKey } from 'vue'\n\n// Vue doesn't have emits forwarding, in order to bind the emits we have to convert events into `onXXX` handlers\n// issue: https://github.com/vuejs/core/issues/5917\n/**\n * The `useEmitAsProps` function is a TypeScript utility that converts emitted events into props for a\n * Vue component.\n * @param emit - The `emit` parameter is a function that is used to emit events from a component. It\n * takes two parameters: `name` which is the name of the event to be emitted, and `...args` which are\n * the arguments to be passed along with the event.\n * @returns The function `useEmitAsProps` returns an object that maps event names to functions that\n * call the `emit` function with the corresponding event name and arguments.\n */\nexport function useEmitAsProps<Name extends string>(\n  emit: (name: Name, ...args: any[]) => void,\n) {\n  const vm = getCurrentInstance()\n\n  const events = vm?.type.emits as Name[]\n  const result: Record<string, any> = {}\n\n  if (!events?.length) {\n    console.warn(\n      `No emitted event found. Please check component: ${vm?.type.__name}`,\n    )\n  }\n\n  events?.forEach((ev) => {\n    result[toHandlerKey(camelize(ev))] = (...arg: any) => emit(ev, ...arg)\n  })\n  return result\n}\n","import type { MaybeRef } from 'vue'\nimport { computed, unref } from 'vue'\n\n/**\n * Provides locale-aware string filtering functions.\n * Uses `Intl.Collator` for comparison to ensure proper Unicode handling.\n *\n * @param options - Optional collator options to customize comparison behavior.\n *   See [Intl.CollatorOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options) for details.\n * @returns An object with methods to check if a string starts with, ends with, or contains a substring.\n *\n * @example\n * const { startsWith, endsWith, contains } = useFilter();\n *\n * startsWith('hello', 'he'); // true\n * endsWith('hello', 'lo'); // true\n * contains('hello', 'ell'); // true\n */\nexport function useFilter(options?: MaybeRef<Intl.CollatorOptions>) {\n  const computedOptions = computed(() => unref(options))\n  const collator = computed(() => new Intl.Collator('en', { usage: 'search', ...computedOptions.value }))\n\n  const startsWith = (string: string, substring: string) => {\n    if (substring.length === 0)\n      return true\n\n    string = string.normalize('NFC')\n    substring = substring.normalize('NFC')\n    return collator.value.compare(string.slice(0, substring.length), substring) === 0\n  }\n\n  const endsWith = (string: string, substring: string) => {\n    if (substring.length === 0)\n      return true\n\n    string = string.normalize('NFC')\n    substring = substring.normalize('NFC')\n    return collator.value.compare(string.slice(-substring.length), substring) === 0\n  }\n\n  const contains = (string: string, substring: string) => {\n    if (substring.length === 0)\n      return true\n\n    string = string.normalize('NFC')\n    substring = substring.normalize('NFC')\n\n    let scan = 0\n    const sliceLen = substring.length\n    for (; scan + sliceLen <= string.length; scan++) {\n      const slice = string.slice(scan, scan + sliceLen)\n      if (collator.value.compare(substring, slice) === 0)\n        return true\n    }\n\n    return false\n  }\n\n  return {\n    startsWith,\n    endsWith,\n    contains,\n  }\n}\n","import { isClient } from '@vueuse/shared'\nimport { watchEffect } from 'vue'\n\n/** Number of components which have requested interest to have focus guards */\nlet count = 0\n\n/**\n * Injects a pair of focus guards at the edges of the whole DOM tree\n * to ensure `focusin` & `focusout` events can be caught consistently.\n */\nexport function useFocusGuards() {\n  watchEffect((cleanupFn) => {\n    if (!isClient)\n      return\n    const edgeGuards = document.querySelectorAll('[data-reka-focus-guard]')\n    document.body.insertAdjacentElement(\n      'afterbegin',\n      edgeGuards[0] ?? createFocusGuard(),\n    )\n    document.body.insertAdjacentElement(\n      'beforeend',\n      edgeGuards[1] ?? createFocusGuard(),\n    )\n    count++\n\n    cleanupFn(() => {\n      if (count === 1) {\n        document\n          .querySelectorAll('[data-reka-focus-guard]')\n          .forEach(node => node.remove())\n      }\n      count--\n    })\n  })\n}\n\nfunction createFocusGuard() {\n  const element = document.createElement('span')\n  element.setAttribute('data-reka-focus-guard', '')\n  element.tabIndex = 0\n  element.style.outline = 'none'\n  element.style.opacity = '0'\n  element.style.position = 'fixed'\n  element.style.pointerEvents = 'none'\n  return element\n}\n","import type { MaybeElementRef } from '@vueuse/core'\nimport { unrefElement } from '@vueuse/core'\nimport { computed, toValue } from 'vue'\n\nexport function useFormControl(el: MaybeElementRef) {\n  // We set this to true by default so that events bubble to forms without JS (SSR)\n  return computed(() => toValue(el) ? Boolean(unrefElement(el)?.closest('form')) : true)\n}\n","import type { MaybeElement } from '@vueuse/core'\nimport type { ComponentPublicInstance } from 'vue'\n// reference: https://github.com/vuejs/rfcs/issues/258#issuecomment-1068697672\nimport { unrefElement } from '@vueuse/core'\nimport { computed, getCurrentInstance, onUpdated, ref, triggerRef } from 'vue'\n\nexport function useForwardExpose<T extends ComponentPublicInstance>() {\n  const instance = getCurrentInstance()!\n\n  const currentRef = ref<Element | T | null>()\n  const currentElement = computed(() => resolveCurrentElement())\n\n  // When using as-child with conditional rendering (v-if/v-else), the underlying\n  // DOM element ($el) changes but currentRef (component instance) stays the same.\n  // Since $el is not reactive, we sync currentElement after DOM updates.\n  onUpdated(() => {\n    if (currentElement.value !== resolveCurrentElement()) {\n      triggerRef(currentRef)\n    }\n  })\n\n  function resolveCurrentElement() {\n    // $el could be text/comment for non-single root normal or text root, thus we retrieve the nextElementSibling\n    return currentRef.value\n      && '$el' in currentRef.value\n      && ['#text', '#comment'].includes(currentRef.value.$el.nodeName)\n      ? currentRef.value.$el.nextElementSibling as HTMLElement\n      : unrefElement(currentRef as unknown as MaybeElement) as HTMLElement\n  }\n\n  // Do give us credit if you reference our code :D\n  // localExpose should only be assigned once else will create infinite loop\n  const localExpose: Record<string, any> | null = Object.assign({}, instance.exposed)\n  const ret: Record<string, any> = {}\n\n  // retrieve props for current instance\n  for (const key in instance.props) {\n    Object.defineProperty(ret, key, {\n      enumerable: true,\n      configurable: true,\n      get: () => instance.props[key],\n    })\n  }\n\n  // retrieve default exposed value\n  if (Object.keys(localExpose).length > 0) {\n    for (const key in localExpose) {\n      Object.defineProperty(ret, key, {\n        enumerable: true,\n        configurable: true,\n        get: () => localExpose![key],\n      })\n    }\n  }\n\n  // retrieve original first root element\n  Object.defineProperty(ret, '$el', {\n    enumerable: true,\n    configurable: true,\n    get: () => instance.vnode.el,\n  })\n  instance.exposed = ret\n\n  function forwardRef(ref: Element | T | null) {\n    currentRef.value = ref\n\n    if (!ref)\n      return\n\n    // retrieve the forwarded element\n    Object.defineProperty(ret, '$el', {\n      enumerable: true,\n      configurable: true,\n      get: () => (ref instanceof Element ? ref : ref.$el),\n    })\n\n    // ref not is Element\n    // and `useForwardExpose.test.ts > useForwardRef > should forward plain DOM element ref - 2` Passing in `$el`\n    if (!(ref instanceof Element) && !Object.hasOwn(ref, '$el')) {\n      // Retrieves the `exposed` data that has not been unwrapped by `vue` from `$.exposed`.\n      const childExposed = ref.$.exposed\n      const merged = Object.assign({}, ret)\n\n      for (const key in childExposed) {\n        Object.defineProperty(merged, key, {\n          enumerable: true,\n          configurable: true,\n          get: () => childExposed[key],\n        })\n      }\n\n      instance.exposed = merged\n    }\n  }\n\n  return { forwardRef, currentRef, currentElement }\n}\n","import type { MaybeRefOrGetter } from 'vue'\nimport { camelize, computed, getCurrentInstance, toRef } from 'vue'\n\ninterface PropOptions {\n  type?: any\n  required?: boolean\n  default?: any\n}\n\n/**\n * Vue coerces optional boolean props (e.g. `foo?: boolean`) to non-optional (`foo: boolean`)\n * in the `defineProps` return type. Since `useForwardProps` only returns props that were\n * explicitly assigned, boolean-typed props should remain optional in the return type.\n */\ntype WithOptionalBooleans<T> = {\n  [K in keyof T as [T[K]] extends [boolean] ? K : never]?: T[K]\n} & {\n  [K in keyof T as [T[K]] extends [boolean] ? never : K]: T[K]\n}\n\n/**\n * The `useForwardProps` function in TypeScript takes in a set of props and returns a computed value\n * that combines default props with assigned props from the current instance.\n * @param {T} props - The `props` parameter is an object that represents the props passed to a\n * component.\n * @returns computed value that combines the default props, preserved props, and assigned props.\n */\nexport function useForwardProps<T extends Record<string, any>>(props: MaybeRefOrGetter<T>) {\n  const vm = getCurrentInstance()\n  // Default value for declared props\n  const defaultProps = Object.keys(vm?.type.props ?? {}).reduce((prev, curr) => {\n    const defaultValue = (vm?.type.props[curr] as PropOptions).default\n    if (defaultValue !== undefined)\n      prev[curr as keyof T] = defaultValue\n    return prev\n  }, {} as T)\n\n  const refProps = toRef(props)\n  return computed(() => {\n    const preservedProps = {} as T\n    const assignedProps = vm?.vnode.props ?? {}\n\n    Object.keys(assignedProps).forEach((key) => {\n      preservedProps[camelize(key) as keyof T] = assignedProps[key]\n    })\n\n    // Only return value from the props parameter\n    return Object.keys({ ...defaultProps, ...preservedProps }).reduce((prev, curr) => {\n      if (refProps.value[curr] !== undefined)\n        (prev as Record<string, any>)[curr] = refProps.value[curr]\n      return prev\n    }, {} as WithOptionalBooleans<T>)\n  })\n}\n","import type { MaybeRefOrGetter } from 'vue'\nimport { computed } from 'vue'\nimport { useEmitAsProps } from './useEmitAsProps'\nimport { useForwardProps } from './useForwardProps'\n\n/**\n * The function `useForwardPropsEmits` takes in props and an optional emit function, and returns a\n * computed object that combines the parsed props and emits as props.\n * @param {T} props - The `props` parameter is of type `T`, which is a generic type that extends the\n * parameters of the `useForwardProps` function. It represents the props object that is passed to the\n * `useForwardProps` function.\n * @param [emit] - The `emit` parameter is a function that can be used to emit events. It takes two\n * arguments: `name`, which is the name of the event to be emitted, and `args`, which are the arguments\n * to be passed along with the event.\n * @returns a computed property that combines the parsed\n * props and emits as props.\n */\nexport function useForwardPropsEmits<T extends Record<string, any>, Name extends string>(props: MaybeRefOrGetter<T>, emit?: (name: Name, ...args: any[]) => void) {\n  const parsedProps = useForwardProps(props)\n  const emitsAsProps = emit ? useEmitAsProps(emit) : {}\n\n  return computed(() => ({\n    ...parsedProps.value,\n    ...emitsAsProps,\n  }))\n}\n","import type { ComponentPublicInstance } from 'vue'\n// reference: https://github.com/vuejs/rfcs/issues/258#issuecomment-1068697672\nimport { getCurrentInstance } from 'vue'\n\nexport function useForwardRef() {\n  const instance = getCurrentInstance()!\n  function handleRefChange(ref: Element | ComponentPublicInstance | null) {\n    if (typeof ref === 'object') {\n      instance.exposed = ref\n      instance.exposeProxy = ref\n    }\n  }\n  return handleRefChange\n}\n","import type { Ref } from 'vue'\nimport type { Side } from '@/Popper/utils'\nimport { createEventHook, refAutoReset, tryOnScopeDispose } from '@vueuse/shared'\nimport { ref, watchEffect } from 'vue'\n\nexport function useGraceArea(triggerElement: Ref<HTMLElement | undefined>, containerElement: Ref<HTMLElement | undefined>) {\n// Reset the inTransit state if idle/scrolled.\n  const isPointerInTransit = refAutoReset(false, 300)\n  // `refAutoReset` will clear timeout-based resets on scope dispose (e.g., component unmount),\n  // thus leaving the state as-is without resetting it.\n  // So we need to manually reset it in such cases.\n  tryOnScopeDispose(() => {\n    isPointerInTransit.value = false\n  })\n\n  const pointerGraceArea = ref<Polygon | null>(null)\n  const pointerExit = createEventHook<void>()\n\n  function handleRemoveGraceArea() {\n    pointerGraceArea.value = null\n    isPointerInTransit.value = false\n  }\n\n  function handleCreateGraceArea(event: PointerEvent, hoverTarget: HTMLElement | undefined) {\n    if (!hoverTarget)\n      return\n    const currentTarget = event.currentTarget as HTMLElement\n    const exitPoint = { x: event.clientX, y: event.clientY }\n    const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect())\n    const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide, 1)\n    const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect())\n    const graceArea = getHull([...paddedExitPoints, ...hoverTargetPoints])\n    pointerGraceArea.value = graceArea\n    isPointerInTransit.value = true\n  }\n\n  watchEffect((cleanupFn) => {\n    if (triggerElement.value && containerElement.value) {\n      const handleTriggerLeave = (event: PointerEvent) => handleCreateGraceArea(event, containerElement.value)\n      const handleContentLeave = (event: PointerEvent) => handleCreateGraceArea(event, triggerElement.value)\n\n      triggerElement.value.addEventListener('pointerleave', handleTriggerLeave)\n      containerElement.value.addEventListener('pointerleave', handleContentLeave)\n\n      cleanupFn(() => {\n        triggerElement.value?.removeEventListener('pointerleave', handleTriggerLeave)\n        containerElement.value?.removeEventListener('pointerleave', handleContentLeave)\n      })\n    }\n  })\n\n  watchEffect((cleanupFn) => {\n    if (pointerGraceArea.value) {\n      const handleTrackPointerGrace = (event: PointerEvent) => {\n        if (!pointerGraceArea.value || !(event.target instanceof Element))\n          return\n\n        const target = event.target\n        const pointerPosition = { x: event.clientX, y: event.clientY }\n        const hasEnteredTarget = triggerElement.value?.contains(target) || containerElement.value?.contains(target)\n        const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, pointerGraceArea.value)\n        const isAnotherGraceAreaTrigger = !!target.closest('[data-grace-area-trigger]')\n\n        if (hasEnteredTarget) {\n          handleRemoveGraceArea()\n        }\n        else if (isPointerOutsideGraceArea || isAnotherGraceAreaTrigger) {\n          handleRemoveGraceArea()\n          pointerExit.trigger()\n        }\n      }\n      triggerElement.value?.ownerDocument.addEventListener('pointermove', handleTrackPointerGrace)\n\n      cleanupFn(() => triggerElement.value?.ownerDocument.removeEventListener('pointermove', handleTrackPointerGrace))\n    }\n  })\n\n  return {\n    isPointerInTransit,\n    onPointerExit: pointerExit.on,\n  }\n}\n\ninterface Point { x: number, y: number }\ntype Polygon = Point[]\n\nfunction getExitSideFromRect(point: Point, rect: DOMRect): Side {\n  const top = Math.abs(rect.top - point.y)\n  const bottom = Math.abs(rect.bottom - point.y)\n  const right = Math.abs(rect.right - point.x)\n  const left = Math.abs(rect.left - point.x)\n\n  switch (Math.min(top, bottom, right, left)) {\n    case left:\n      return 'left'\n    case right:\n      return 'right'\n    case top:\n      return 'top'\n    case bottom:\n      return 'bottom'\n    default:\n      throw new Error('unreachable')\n  }\n}\n\nfunction getPaddedExitPoints(exitPoint: Point, exitSide: Side, padding = 5) {\n  const paddedExitPoints: Point[] = []\n  switch (exitSide) {\n    case 'top':\n      paddedExitPoints.push(\n        { x: exitPoint.x - padding, y: exitPoint.y + padding },\n        { x: exitPoint.x + padding, y: exitPoint.y + padding },\n      )\n      break\n    case 'bottom':\n      paddedExitPoints.push(\n        { x: exitPoint.x - padding, y: exitPoint.y - padding },\n        { x: exitPoint.x + padding, y: exitPoint.y - padding },\n      )\n      break\n    case 'left':\n      paddedExitPoints.push(\n        { x: exitPoint.x + padding, y: exitPoint.y - padding },\n        { x: exitPoint.x + padding, y: exitPoint.y + padding },\n      )\n      break\n    case 'right':\n      paddedExitPoints.push(\n        { x: exitPoint.x - padding, y: exitPoint.y - padding },\n        { x: exitPoint.x - padding, y: exitPoint.y + padding },\n      )\n      break\n  }\n  return paddedExitPoints\n}\n\nfunction getPointsFromRect(rect: DOMRect) {\n  const { top, right, bottom, left } = rect\n  return [\n    { x: left, y: top },\n    { x: right, y: top },\n    { x: right, y: bottom },\n    { x: left, y: bottom },\n  ]\n}\n\n// Determine if a point is inside of a polygon.\n// Based on https://github.com/substack/point-in-polygon\nfunction isPointInPolygon(point: Point, polygon: Polygon) {\n  const { x, y } = point\n  let inside = false\n  for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n    const xi = polygon[i].x\n    const yi = polygon[i].y\n    const xj = polygon[j].x\n    const yj = polygon[j].y\n\n    // prettier-ignore\n    const intersect = ((yi > y) !== (yj > y)) && (x < (xj - xi) * (y - yi) / (yj - yi) + xi)\n    if (intersect)\n      inside = !inside\n  }\n\n  return inside\n}\n\n// Returns a new array of points representing the convex hull of the given set of points.\n// https://www.nayuki.io/page/convex-hull-algorithm\nfunction getHull<P extends Point>(points: Readonly<Array<P>>): Array<P> {\n  const newPoints: Array<P> = points.slice()\n  newPoints.sort((a: Point, b: Point) => {\n    if (a.x < b.x)\n      return -1\n    else if (a.x > b.x)\n      return +1\n    else if (a.y < b.y)\n      return -1\n    else if (a.y > b.y)\n      return +1\n    else return 0\n  })\n  return getHullPresorted(newPoints)\n}\n\n// Returns the convex hull, assuming that each points[i] <= points[i + 1]. Runs in O(n) time.\nfunction getHullPresorted<P extends Point>(points: Readonly<Array<P>>): Array<P> {\n  if (points.length <= 1)\n    return points.slice()\n\n  const upperHull: Array<P> = []\n  for (let i = 0; i < points.length; i++) {\n    const p = points[i]\n    while (upperHull.length >= 2) {\n      const q = upperHull.at(-1)!\n      const r = upperHull[upperHull.length - 2]\n      if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x))\n        upperHull.pop()\n      else break\n    }\n    upperHull.push(p)\n  }\n  upperHull.pop()\n\n  const lowerHull: Array<P> = []\n  for (let i = points.length - 1; i >= 0; i--) {\n    const p = points[i]\n    while (lowerHull.length >= 2) {\n      const q = lowerHull.at(-1)!\n      const r = lowerHull[lowerHull.length - 2]\n      if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x))\n        lowerHull.pop()\n      else break\n    }\n    lowerHull.push(p)\n  }\n  lowerHull.pop()\n\n  if (\n    upperHull.length === 1\n    && lowerHull.length === 1\n    && upperHull[0].x === lowerHull[0].x\n    && upperHull[0].y === lowerHull[0].y\n  ) {\n    return upperHull\n  }\n\n  else {\n    return upperHull.concat(lowerHull)\n  }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.suppressOthers = exports.supportsInert = exports.inertOthers = exports.hideOthers = void 0;\nvar getDefaultParent = function (originalTarget) {\n    if (typeof document === 'undefined') {\n        return null;\n    }\n    var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n    return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n    return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n    return targets\n        .map(function (target) {\n        if (parent.contains(target)) {\n            return target;\n        }\n        var correctedTarget = unwrapHost(target);\n        if (correctedTarget && parent.contains(correctedTarget)) {\n            return correctedTarget;\n        }\n        console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n        return null;\n    })\n        .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n    var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n    if (!markerMap[markerName]) {\n        markerMap[markerName] = new WeakMap();\n    }\n    var markerCounter = markerMap[markerName];\n    var hiddenNodes = [];\n    var elementsToKeep = new Set();\n    var elementsToStop = new Set(targets);\n    var keep = function (el) {\n        if (!el || elementsToKeep.has(el)) {\n            return;\n        }\n        elementsToKeep.add(el);\n        keep(el.parentNode);\n    };\n    targets.forEach(keep);\n    var deep = function (parent) {\n        if (!parent || elementsToStop.has(parent)) {\n            return;\n        }\n        Array.prototype.forEach.call(parent.children, function (node) {\n            if (elementsToKeep.has(node)) {\n                deep(node);\n            }\n            else {\n                try {\n                    var attr = node.getAttribute(controlAttribute);\n                    var alreadyHidden = attr !== null && attr !== 'false';\n                    var counterValue = (counterMap.get(node) || 0) + 1;\n                    var markerValue = (markerCounter.get(node) || 0) + 1;\n                    counterMap.set(node, counterValue);\n                    markerCounter.set(node, markerValue);\n                    hiddenNodes.push(node);\n                    if (counterValue === 1 && alreadyHidden) {\n                        uncontrolledNodes.set(node, true);\n                    }\n                    if (markerValue === 1) {\n                        node.setAttribute(markerName, 'true');\n                    }\n                    if (!alreadyHidden) {\n                        node.setAttribute(controlAttribute, 'true');\n                    }\n                }\n                catch (e) {\n                    console.error('aria-hidden: cannot operate on ', node, e);\n                }\n            }\n        });\n    };\n    deep(parentNode);\n    elementsToKeep.clear();\n    lockCount++;\n    return function () {\n        hiddenNodes.forEach(function (node) {\n            var counterValue = counterMap.get(node) - 1;\n            var markerValue = markerCounter.get(node) - 1;\n            counterMap.set(node, counterValue);\n            markerCounter.set(node, markerValue);\n            if (!counterValue) {\n                if (!uncontrolledNodes.has(node)) {\n                    node.removeAttribute(controlAttribute);\n                }\n                uncontrolledNodes.delete(node);\n            }\n            if (!markerValue) {\n                node.removeAttribute(markerName);\n            }\n        });\n        lockCount--;\n        if (!lockCount) {\n            // clear\n            counterMap = new WeakMap();\n            counterMap = new WeakMap();\n            uncontrolledNodes = new WeakMap();\n            markerMap = {};\n        }\n    };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nvar hideOthers = function (originalTarget, parentNode, markerName) {\n    if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n    var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n    var activeParentNode = parentNode || getDefaultParent(originalTarget);\n    if (!activeParentNode) {\n        return function () { return null; };\n    }\n    // we should not hide aria-live elements - https://github.com/theKashey/aria-hidden/issues/10\n    // and script elements, as they have no impact on accessibility.\n    targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live], script')));\n    return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\nexports.hideOthers = hideOthers;\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nvar inertOthers = function (originalTarget, parentNode, markerName) {\n    if (markerName === void 0) { markerName = 'data-inert-ed'; }\n    var activeParentNode = parentNode || getDefaultParent(originalTarget);\n    if (!activeParentNode) {\n        return function () { return null; };\n    }\n    return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\nexports.inertOthers = inertOthers;\n/**\n * @returns if current browser supports inert\n */\nvar supportsInert = function () {\n    return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\nexports.supportsInert = supportsInert;\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nvar suppressOthers = function (originalTarget, parentNode, markerName) {\n    if (markerName === void 0) { markerName = 'data-suppressed'; }\n    return ((0, exports.supportsInert)() ? exports.inertOthers : exports.hideOthers)(originalTarget, parentNode, markerName);\n};\nexports.suppressOthers = suppressOthers;\n","import type { MaybeElementRef } from '@vueuse/core'\nimport { unrefElement } from '@vueuse/core'\nimport { hideOthers } from 'aria-hidden'\nimport { onUnmounted, watch } from 'vue'\n\n/**\n * The `useHideOthers` function is a TypeScript function that takes a target element reference and\n * hides all other elements in ARIA when the target element is present, and restores the visibility of the\n * hidden elements when the target element is removed.\n * @param {MaybeElementRef} target - The `target` parameter is a reference to the element that you want\n * to hide other elements when it is clicked or focused.\n */\nexport function useHideOthers(target: MaybeElementRef) {\n  let undo: ReturnType<typeof hideOthers>\n  watch(() => unrefElement(target), (el) => {\n    // disable hideOthers on test mode\n    if (import.meta.env.MODE === 'test')\n      return\n    // Skip if inside a closed native popover\n    // Use try/catch as `:popover-open` pseudo-class is not supported in all browsers (e.g. Safari 18)\n    let isInsideClosedPopover = false\n    try {\n      isInsideClosedPopover = !!el?.closest('[popover]:not(:popover-open)')\n    }\n    catch {}\n    if (el && !isInsideClosedPopover)\n      undo = hideOthers(el)\n    else if (undo)\n      undo()\n  })\n\n  onUnmounted(() => {\n    if (undo)\n      undo()\n  })\n}\n","import * as vue from 'vue'\n// Inspired from https://github.com/tailwindlabs/headlessui/issues/2913\n// as the alternative, and a fallback for Vue version < 3.5\nimport { injectConfigProviderContext } from '@/ConfigProvider/ConfigProvider.vue'\n\nlet count = 0\n/**\n * The `useId` function generates a unique identifier using a provided deterministic ID,\n * a configured `<ConfigProvider>` ID source, Vue's native `useId`, or a fallback counter.\n * @param {string | null | undefined} [deterministicId] - The `useId` function you provided takes an\n * optional parameter `deterministicId`, which can be a string, null, or undefined. If\n * `deterministicId` is provided, the function will return it. Otherwise, it will generate an id using\n * the configured ID source.\n */\nexport function useId(deterministicId?: string | null | undefined, prefix = 'reka') {\n  if (deterministicId)\n    return deterministicId\n\n  let id: string\n  const configProviderContext = injectConfigProviderContext({ useId: undefined })\n\n  // Keep the app-provided ID source authoritative. Frameworks such as Nuxt can\n  // prerender with a different Vue app ID prefix than the hydrating client, so\n  // falling through to Vue's native useId would bypass the stable source that\n  // ConfigProvider was explicitly given.\n  if (configProviderContext.useId) {\n    id = configProviderContext.useId()\n  }\n  else if ('useId' in vue) {\n    id = vue.useId?.()\n  }\n  else {\n    id = `${++count}`\n  }\n\n  return prefix ? `${prefix}-${id}` : id\n}\n","export function useKbd() {\n  return {\n    ALT: 'Alt',\n    ARROW_DOWN: 'ArrowDown',\n    ARROW_LEFT: 'ArrowLeft',\n    ARROW_RIGHT: 'ArrowRight',\n    ARROW_UP: 'ArrowUp',\n    BACKSPACE: 'Backspace',\n    CAPS_LOCK: 'CapsLock',\n    CONTROL: 'Control',\n    DELETE: 'Delete',\n    END: 'End',\n    ENTER: 'Enter',\n    ESCAPE: 'Escape',\n    F1: 'F1',\n    F10: 'F10',\n    F11: 'F11',\n    F12: 'F12',\n    F2: 'F2',\n    F3: 'F3',\n    F4: 'F4',\n    F5: 'F5',\n    F6: 'F6',\n    F7: 'F7',\n    F8: 'F8',\n    F9: 'F9',\n    HOME: 'Home',\n    META: 'Meta',\n    PAGE_DOWN: 'PageDown',\n    PAGE_UP: 'PageUp',\n    SHIFT: 'Shift',\n    SPACE: ' ',\n    TAB: 'Tab',\n    CTRL: 'Control',\n    ASTERISK: '*',\n    SPACE_CODE: 'Space',\n  }\n}\n\n/**\n * A wrapper around the internal kbd object to make it easier to use in tests\n * which require the key names to be wrapped in curly braces.\n */\nexport type KbdKeys = keyof ReturnType<typeof useKbd>\n\nexport function useTestKbd() {\n  const kbd = useKbd()\n\n  const initTestKbd: Record<KbdKeys, string> = Object.entries(kbd).reduce((acc, [key, value]) => {\n    acc[key as KbdKeys] = `{${value}}`\n    return acc\n  }, {} as Record<KbdKeys, string>)\n\n  return {\n    ...initTestKbd,\n    SHIFT_TAB: `{Shift>}{${kbd.TAB}}`,\n  }\n}\n","import type { Ref } from 'vue'\nimport { computed, ref } from 'vue'\nimport { injectConfigProviderContext } from '@/ConfigProvider/ConfigProvider.vue'\n\n/**\n * The `useLocale` function provides a way to access the current locale in your application.\n * @param {Ref<string | undefined>} [locale] - An optional ref containing the locale.\n * @returns A computed ref holding the resolved locale.\n */\nexport function useLocale(locale?: Ref<string | undefined>) {\n  const context = injectConfigProviderContext({\n    locale: ref('en'),\n  })\n  return computed(() => locale?.value || context.locale?.value || 'en')\n}\n","import type { Ref, UnwrapNestedRefs } from 'vue'\nimport { ref } from 'vue'\nimport { findValuesBetween } from './arrays'\n\nexport function useSelectionBehavior<T>(\n  modelValue: Ref<T | T[]>,\n  props: UnwrapNestedRefs<{ multiple?: boolean, selectionBehavior?: 'toggle' | 'replace' }>,\n) {\n  const firstValue = ref()\n\n  const onSelectItem = (val: T, condition: (existingValue: T) => boolean) => {\n    // multiple select\n    if (props.multiple && Array.isArray(modelValue.value)) {\n      if (props.selectionBehavior === 'replace') {\n        modelValue.value = [val]\n        firstValue.value = val\n      }\n      else {\n        const index = modelValue.value.findIndex(v => condition(v))\n        if (index !== -1)\n          modelValue.value = modelValue.value.filter((_, i) => i !== index)\n        else\n          modelValue.value = [...modelValue.value, val]\n      }\n    }\n    // single select\n    else {\n      if (props.selectionBehavior === 'replace') {\n        modelValue.value = { ...val }\n      }\n      else {\n        if (!Array.isArray(modelValue.value) && condition(modelValue.value))\n          modelValue.value = undefined as any\n        else\n          modelValue.value = { ...val }\n      }\n    }\n    return modelValue.value\n  }\n\n  function handleMultipleReplace(intent: 'first' | 'last' | 'prev' | 'next', currentElement: HTMLElement | Element | null, getItems: () => { ref: HTMLElement, value?: any }[], options: any[]) {\n    if (!firstValue?.value || !props.multiple || !Array.isArray(modelValue.value))\n      return\n\n    const collection = getItems().filter(i => i.ref.dataset.disabled !== '')\n    const lastValue = collection.find(i => i.ref === currentElement)?.value\n    if (!lastValue)\n      return\n\n    let value: T[] | null = null\n    switch (intent) {\n      case 'prev':\n      case 'next': {\n        value = findValuesBetween(options, firstValue.value, lastValue)\n        break\n      }\n      case 'first': {\n        value = findValuesBetween(options, firstValue.value, options?.[0])\n        break\n      }\n      case 'last': {\n        value = findValuesBetween(options, firstValue.value, options.at(-1))\n        break\n      }\n    }\n\n    modelValue.value = value\n  }\n\n  return {\n    firstValue,\n    onSelectItem,\n    handleMultipleReplace,\n  }\n}\n","import type { MaybeElementRef } from '@vueuse/core'\nimport { unrefElement } from '@vueuse/core'\nimport { computed, onMounted, ref } from 'vue'\n\nexport function useSize(element: MaybeElementRef) {\n  const size = ref<{ width: number, height: number }>()\n  const width = computed(() => size.value?.width ?? 0)\n  const height = computed(() => size.value?.height ?? 0)\n\n  onMounted(() => {\n    const el = unrefElement(element) as HTMLElement\n    if (el) {\n      // provide size as early as possible\n      size.value = { width: el.offsetWidth, height: el.offsetHeight }\n\n      const resizeObserver = new ResizeObserver((entries) => {\n        if (!Array.isArray(entries))\n          return\n\n        // Since we only observe the one element, we don't need to loop over the\n        // array\n        if (!entries.length)\n          return\n\n        const entry = entries[0]\n        let width: number\n        let height: number\n\n        if ('borderBoxSize' in entry) {\n          const borderSizeEntry = entry.borderBoxSize\n          // iron out differences between browsers\n          const borderSize = Array.isArray(borderSizeEntry)\n            ? borderSizeEntry[0]\n            : borderSizeEntry\n          width = borderSize.inlineSize\n          height = borderSize.blockSize\n        }\n        else {\n          // for browsers that don't support `borderBoxSize`\n          // we calculate it ourselves to get the correct border box.\n          width = el.offsetWidth\n          height = el.offsetHeight\n        }\n\n        // temporary disable width/height from resize observer. borderSizeEntry seems to be incorrect\n        size.value = { width, height }\n      })\n\n      resizeObserver.observe(el, { box: 'border-box' })\n\n      return () => resizeObserver.unobserve(el)\n    }\n    else {\n      // We only want to reset to `undefined` when the element becomes `null`,\n      // not if it changes to another element.\n      size.value = undefined\n    }\n  })\n\n  return {\n    width,\n    height,\n  }\n}\n","import type { Ref } from 'vue'\nimport { ref } from 'vue'\n\ninterface Machine<S> {\n  [k: string]: { [k: string]: S }\n}\ntype MachineState<T> = keyof T\ntype MachineEvent<T> = keyof UnionToIntersection<T[keyof T]>\n\n// 🤯 https://fettblog.eu/typescript-union-to-intersection/\ntype UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (\n  x: infer R,\n) => any\n  ? R\n  : never\n\n/**\n * The `useStateMachine` function is a TypeScript function that creates a state machine and returns the\n * current state and a dispatch function to update the state based on events.\n * @param initialState - The `initialState` parameter is the initial state of the state machine. It\n * represents the starting point of the state machine's state.\n * @param machine - The `machine` parameter is an object that represents a state machine. It should\n * have keys that correspond to the possible states of the machine, and the values should be objects\n * that represent the possible events and their corresponding next states.\n * @returns The `useStateMachine` function returns an object with two properties: `state` and\n * `dispatch`.\n */\nexport function useStateMachine<M>(\n  initialState: MachineState<M>,\n  machine: M & Machine<MachineState<M>>,\n) {\n  const state = ref(initialState) as Ref<MachineState<M>>\n\n  function reducer(event: MachineEvent<M>) {\n    // @ts-expect-error  state.value is keyof M\n    const nextState = machine[state.value][event]\n    return nextState ?? state.value\n  }\n\n  const dispatch = (event: MachineEvent<M>) => {\n    state.value = reducer(event)\n  }\n\n  return {\n    state,\n    dispatch,\n  }\n}\n","import { refAutoReset } from '@vueuse/shared'\nimport { getActiveElement } from './getActiveElement'\n\nexport function useTypeahead(callback?: (search: string) => void) {\n  // Reset `search` 1 second after it was last updated\n  const search = refAutoReset('', 1000)\n\n  const handleTypeaheadSearch = (key: string, items: { ref: HTMLElement, value?: any }[]) => {\n    search.value = search.value + key\n\n    if (callback) {\n      callback(key)\n    }\n    else {\n      const currentItem = getActiveElement()\n      const itemsWithTextValue = items.map(item => ({\n        ...item,\n        textValue: item.value?.textValue ?? item.ref.textContent?.trim() ?? '',\n      }))\n      const currentMatch = itemsWithTextValue.find(item => item.ref === currentItem)\n      const values = itemsWithTextValue.map(item => item.textValue)\n      const nextMatch = getNextMatch(values, search.value, currentMatch?.textValue)\n\n      const newItem = itemsWithTextValue.find(item => item.textValue === nextMatch)\n\n      if (newItem)\n        (newItem.ref as HTMLElement).focus()\n      return newItem?.ref\n    }\n  }\n\n  const resetTypeahead = () => {\n    search.value = ''\n  }\n\n  return {\n    search,\n    handleTypeaheadSearch,\n    resetTypeahead,\n  }\n}\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nexport function wrapArray<T>(array: T[], startIndex: number) {\n  return array.map((_, index) => array[(startIndex + index) % array.length])\n}\n\n/**\n * This is the \"meat\" of the typeahead matching logic. It takes in all the values,\n * the search and the current match, and returns the next match (or `undefined`).\n *\n * We normalize the search because if a user has repeatedly pressed a character,\n * we want the exact same behavior as if we only had that one character\n * (ie. cycle through options starting with that character)\n *\n * We also reorder the values by wrapping the array around the current match.\n * This is so we always look forward from the current match, and picking the first\n * match will always be the correct one.\n *\n * Finally, if the normalized search is exactly one character, we exclude the\n * current match from the values because otherwise it would be the first to match always\n * and focus would never move. This is as opposed to the regular case, where we\n * don't want focus to move if the current match still matches.\n */\nexport function getNextMatch(\n  values: string[],\n  search: string,\n  currentMatch?: string,\n) {\n  const isRepeated\n    = search.length > 1 && Array.from(search).every(char => char === search[0])\n  const normalizedSearch = isRepeated ? search[0] : search\n  const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1\n  let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0))\n  const excludeCurrentMatch = normalizedSearch.length === 1\n  if (excludeCurrentMatch)\n    wrappedValues = wrappedValues.filter(v => v !== currentMatch)\n  const nextMatch = wrappedValues.find(value =>\n    value.toLowerCase().startsWith(normalizedSearch.toLowerCase()),\n  )\n  return nextMatch !== currentMatch ? nextMatch : undefined\n}\n","import type { ComponentOptionsBase, DefineComponent, VNodeProps } from 'vue'\nimport type { ComponentProps } from 'vue-component-type-helpers'\nimport { h, mergeProps } from 'vue'\nimport { useForwardExpose } from './useForwardExpose'\n\n// TODO: TEST\n\n// From vue next\n// https://github.com/vuejs/core/blob/1f2a652a9d2e3bec472fb1786a4c16d6ccfa1fb1/packages/runtime-core/src/h.ts#L53-L58\ntype RawProps = VNodeProps & {\n  // used to differ from a single VNode object as children\n  __v_isVNode?: never\n  // used to differ from Array children\n  [Symbol.iterator]?: never\n} & Record<string, any>\n\n// types inspired from vue-test-utils\n// https://github.com/vuejs/test-utils/blob/main/src/mount.ts#L36\ninterface MountingOptions<Props> {\n  /**\n   * Default props for the component\n   */\n  props?: (RawProps & Props) | ({} extends Props ? null : never) | ((attrs: Record<string, any>) => (RawProps & Props))\n  /**\n   * Pass attributes into the component\n   */\n  attrs?: Record<string, unknown>\n}\n\nexport function withDefault<\n  T,\n  C = T extends ((...args: any) => any) | (new (...args: any) => any)\n    ? T\n    : T extends { props?: infer Props }\n      ? DefineComponent<\n        Props extends Readonly<(infer PropNames)[]> | (infer PropNames)[]\n          ? { [key in PropNames extends string ? PropNames : string]?: any }\n          : Props\n      >\n      : DefineComponent,\n  P extends ComponentProps<C> = ComponentProps<C>,\n>(\n  originalComponent: T,\n  options?: MountingOptions<P>,\n): T\n\nexport function withDefault<T extends ComponentOptionsBase<{}, {}, {}, any, any, any, any, any>>(WrappedComponent: T, options?: MountingOptions<any>) {\n  return ({\n    inheritAttrs: false,\n    name: `${WrappedComponent.__name ?? ''}Wrapper`,\n    setup(_, ctx) {\n      return () => {\n        const optionProps = typeof options?.props === 'function' ? options?.props(ctx.attrs) : options?.props\n        const { forwardRef } = useForwardExpose()\n\n        const mergedProps = mergeProps(optionProps, ctx.attrs)\n        return h(WrappedComponent, { ...mergedProps, ref: forwardRef }, ctx.slots)\n      }\n    },\n  }) as T\n}\n","","import type { Ref } from 'vue'\nimport { defaultWindow } from '@vueuse/core'\nimport { isClient } from '@vueuse/shared'\nimport { computed, nextTick, onUnmounted, ref, watch } from 'vue'\nimport { useStateMachine } from '@/shared'\n\nexport function usePresence(\n  present: Ref<boolean>,\n  node: Ref<HTMLElement | undefined>,\n) {\n  const stylesRef = ref<CSSStyleDeclaration>({} as any)\n  const prevAnimationNameRef = ref<string>('none')\n  const prevPresentRef = ref(present)\n  const initialState = present.value ? 'mounted' : 'unmounted'\n  let timeoutId: number | undefined\n  const ownerWindow = node.value?.ownerDocument.defaultView ?? defaultWindow\n\n  const { state, dispatch } = useStateMachine(initialState, {\n    mounted: {\n      UNMOUNT: 'unmounted',\n      ANIMATION_OUT: 'unmountSuspended',\n    },\n    unmountSuspended: {\n      MOUNT: 'mounted',\n      ANIMATION_END: 'unmounted',\n    },\n    unmounted: {\n      MOUNT: 'mounted',\n    },\n  })\n\n  const dispatchCustomEvent = (name: 'enter' | 'after-enter' | 'leave' | 'after-leave') => {\n    // We only dispatch this event because CustomEvent is not available in Node18\n    // https://github.com/unovue/reka-ui/issues/930\n    if (isClient) {\n      const customEvent = new CustomEvent(name, { bubbles: false, cancelable: false })\n      node.value?.dispatchEvent(customEvent)\n    }\n  }\n\n  watch(\n    present,\n    async (currentPresent, prevPresent) => {\n      const hasPresentChanged = prevPresent !== currentPresent\n      await nextTick()\n      if (hasPresentChanged) {\n        const prevAnimationName = prevAnimationNameRef.value\n        const currentAnimationName = getAnimationName(node.value)\n\n        if (currentPresent) {\n          dispatch('MOUNT')\n          dispatchCustomEvent('enter')\n          if (currentAnimationName === 'none')\n            dispatchCustomEvent('after-enter')\n        }\n        else if (\n          currentAnimationName === 'none' || currentAnimationName === 'undefined'\n          || stylesRef.value?.display === 'none'\n        ) {\n          // If there is no exit animation or the element is hidden, animations won't run\n          // so we unmount instantly rv\n          dispatch('UNMOUNT')\n          dispatchCustomEvent('leave')\n          dispatchCustomEvent('after-leave')\n        }\n        else {\n          /**\n           * When `present` changes to `false`, we check changes to animation-name to\n           * determine whether an animation has started. We chose this approach (reading\n           * computed styles) because there is no `animationrun` event and `animationstart`\n           * fires after `animation-delay` has expired which would be too late.\n           */\n          const isAnimating = prevAnimationName !== currentAnimationName\n          if (prevPresent && isAnimating) {\n            dispatch('ANIMATION_OUT')\n            dispatchCustomEvent('leave')\n          }\n          else {\n            dispatch('UNMOUNT')\n            dispatchCustomEvent('after-leave')\n          }\n        }\n      }\n    },\n    { immediate: true },\n  )\n\n  /**\n   * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`\n   * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we\n   * make sure we only trigger ANIMATION_END for the currently active animation.\n   */\n  const handleAnimationEnd = (event: AnimationEvent) => {\n    const currentAnimationName = getAnimationName(node.value)\n    const isCurrentAnimation = currentAnimationName.includes(\n      CSS.escape(event.animationName),\n    )\n    const directionName = state.value === 'mounted' ? 'enter' : 'leave'\n    if (event.target === node.value && isCurrentAnimation) {\n      dispatchCustomEvent(`after-${directionName}`)\n      dispatch('ANIMATION_END')\n\n      if (!prevPresentRef.value) {\n        const currentFillMode = node.value.style.animationFillMode\n        node.value.style.animationFillMode = 'forwards'\n        // Reset the style after the node had time to unmount (for cases\n        // where the component chooses not to unmount). Doing this any\n        // sooner than `setTimeout` (e.g. with `requestAnimationFrame`)\n        // still causes a flash.\n        timeoutId = ownerWindow?.setTimeout(() => {\n          if (node.value?.style.animationFillMode === 'forwards') {\n            node.value.style.animationFillMode = currentFillMode\n          }\n        })\n      }\n    }\n    // if no animation, immediately trigger 'ANIMATION_END'\n    if (event.target === node.value && currentAnimationName === 'none')\n      dispatch('ANIMATION_END')\n  }\n  const handleAnimationStart = (event: AnimationEvent) => {\n    if (event.target === node.value) {\n      // if animation occurred, store its name as the previous animation.\n      prevAnimationNameRef.value = getAnimationName(node.value)\n    }\n  }\n\n  const watcher = watch(\n    node,\n    (newNode, oldNode) => {\n      if (newNode) {\n        stylesRef.value = getComputedStyle(newNode)\n        newNode.addEventListener('animationstart', handleAnimationStart)\n        newNode.addEventListener('animationcancel', handleAnimationEnd)\n        newNode.addEventListener('animationend', handleAnimationEnd)\n      }\n      else {\n        // Transition to the unmounted state if the node is removed prematurely.\n        // We avoid doing so during cleanup as the node may change but still exist.\n        dispatch('ANIMATION_END')\n\n        if (timeoutId !== undefined)\n          ownerWindow?.clearTimeout(timeoutId)\n        oldNode?.removeEventListener('animationstart', handleAnimationStart)\n        oldNode?.removeEventListener('animationcancel', handleAnimationEnd)\n        oldNode?.removeEventListener('animationend', handleAnimationEnd)\n      }\n    },\n    { immediate: true },\n  )\n\n  const stateWatcher = watch(state, () => {\n    const currentAnimationName = getAnimationName(node.value)\n    prevAnimationNameRef.value\n      = state.value === 'mounted' ? currentAnimationName : 'none'\n  })\n\n  onUnmounted(() => {\n    watcher()\n    stateWatcher()\n  })\n\n  const isPresent = computed(() =>\n    ['mounted', 'unmountSuspended'].includes(state.value),\n  )\n\n  return {\n    isPresent,\n  }\n}\n\nfunction getAnimationName(node?: HTMLElement) {\n  return node ? getComputedStyle(node).animationName || 'none' : 'none'\n}\n","import type {\n  SlotsType,\n  VNode,\n} from 'vue'\nimport { unrefElement } from '@vueuse/core'\nimport {\n  defineComponent,\n  getCurrentInstance,\n  h,\n  ref,\n  toRefs,\n} from 'vue'\nimport { renderSlotFragments } from '@/shared'\nimport { usePresence } from './usePresence'\n\nexport interface PresenceProps {\n  /**\n   * Conditional to mount or unmount the child element. Similar to `v-if`\n   *\n   * @required true\n   */\n  present: boolean\n  /**\n   * Force the element to render all the time.\n   *\n   * Useful for programmatically render grandchild component with the exposed `present`\n   *\n   * @defaultValue false\n   */\n  forceMount?: boolean\n}\n\nexport default defineComponent({\n  name: 'Presence',\n  props: {\n    present: {\n      type: Boolean,\n      required: true,\n    },\n    forceMount: {\n      type: Boolean,\n    },\n  },\n  slots: {} as SlotsType<{\n    default: (opts: { present: boolean }) => any\n  }>,\n  setup(props, { slots, expose }) {\n    const { present, forceMount } = toRefs(props)\n\n    const node = ref<HTMLElement>()\n    // Mount composables once to prevent duplicated eventListener\n    const { isPresent } = usePresence(present, node)\n    expose({ present: isPresent })\n\n    let children = slots.default({ present: isPresent.value })\n    children = renderSlotFragments(children || [])\n    const instance = getCurrentInstance()\n\n    if (children && children?.length > 1) {\n      const componentName = instance?.parent?.type.name\n        ? `<${instance.parent.type.name} />`\n        : 'component'\n\n      throw new Error(\n        [\n          `Detected an invalid children for \\`${componentName}\\` for  \\`Presence\\` component.`,\n          '',\n          'Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.',\n          'You can apply a few solutions:',\n          [\n            'Provide a single child element so that `presence` directive attach correctly.',\n            'Ensure the first child is an actual element instead of a raw text node or comment node.',\n          ]\n            .map(line => `  - ${line}`)\n            .join('\\n'),\n        ].join('\\n'),\n      )\n    }\n\n    return () => {\n      if (forceMount.value || present.value || isPresent.value) {\n        return h(slots.default({ present: isPresent.value })[0] as VNode, {\n          ref: (v) => {\n            const el = unrefElement(v as HTMLElement)\n            if (typeof el?.hasAttribute === 'undefined')\n              return el\n\n            // special case to handle animation for PopperContent\n            if (el?.hasAttribute('data-reka-popper-content-wrapper'))\n              node.value = el.firstElementChild as HTMLElement\n            else\n              node.value = el\n\n            return el\n          },\n        })\n      }\n      else { return null }\n    }\n  },\n})\n","import { cloneVNode, Comment, defineComponent, mergeProps } from 'vue'\nimport { renderSlotFragments } from '@/shared'\n\nexport const Slot = defineComponent({\n  name: 'PrimitiveSlot',\n  inheritAttrs: false,\n  setup(_, { attrs, slots }) {\n    return () => {\n      if (!slots.default)\n        return null\n\n      const children = renderSlotFragments(slots.default())\n      const firstNonCommentChildrenIndex = children.findIndex(child => child.type !== Comment)\n      if (firstNonCommentChildrenIndex === -1)\n        return children\n\n      const firstNonCommentChildren = children[firstNonCommentChildrenIndex]\n\n      // Remove props ref from being inferred\n      delete firstNonCommentChildren.props?.ref\n\n      // Manually merge props to ensure `firstNonCommentChildren.props`\n      // has higher priority than `attrs` and can override `attrs`.\n      // Otherwise `cloneVNode(firstNonCommentChildren, attrs)` will\n      // prioritize `attrs` and override `firstNonCommentChildren.props`.\n      const mergedProps = firstNonCommentChildren.props\n        ? mergeProps(attrs, firstNonCommentChildren.props)\n        : attrs\n      const cloned = cloneVNode({ ...firstNonCommentChildren, props: {} }, mergedProps)\n\n      if (children.length === 1)\n        return cloned\n\n      children[firstNonCommentChildrenIndex] = cloned\n      return children\n    }\n  },\n})\n","import type { Component, PropType } from 'vue'\nimport { defineComponent, h } from 'vue'\nimport { Slot } from './Slot'\n\nexport type AsTag\n  = | 'a'\n    | 'button'\n    | 'div'\n    | 'form'\n    | 'h2'\n    | 'h3'\n    | 'img'\n    | 'input'\n    | 'label'\n    | 'li'\n    | 'nav'\n    | 'ol'\n    | 'p'\n    | 'span'\n    | 'svg'\n    | 'ul'\n    | 'template'\n    | ({} & string) // any other string\n\nexport interface PrimitiveProps {\n  /**\n   * Change the default rendered element for the one passed as a child, merging their props and behavior.\n   *\n   * Read our [Composition](https://www.reka-ui.com/docs/guides/composition) guide for more details.\n   */\n  asChild?: boolean\n  /**\n   * The element or component this component should render as. Can be overwritten by `asChild`.\n   * @defaultValue \"div\"\n   */\n  as?: AsTag | Component\n}\n\n// For self closing tags, don't provide default slots because of hydration issue\nconst SELF_CLOSING_TAGS = ['area', 'img', 'input']\n\nexport const Primitive = defineComponent({\n  name: 'Primitive',\n  inheritAttrs: false,\n  props: {\n    asChild: {\n      type: Boolean,\n      default: false,\n    },\n    as: {\n      type: [String, Object] as PropType<AsTag | Component>,\n      default: 'div',\n    },\n  },\n  setup(props, { attrs, slots }) {\n    const asTag = props.asChild ? 'template' : props.as\n\n    if (typeof asTag === 'string' && SELF_CLOSING_TAGS.includes(asTag))\n      return () => h(asTag, attrs)\n\n    if (asTag !== 'template')\n      return () => h(props.as, attrs, { default: slots.default })\n\n    return () => h(Slot, attrs, { default: slots.default })\n  },\n})\n","import type { ComponentPublicInstance } from 'vue'\nimport { unrefElement } from '@vueuse/core'\nimport { computed, ref } from 'vue'\n\nexport function usePrimitiveElement<T extends ComponentPublicInstance>() {\n  const primitiveElement = ref<T>()\n  const currentElement = computed<HTMLElement>(() => ['#text', '#comment'].includes(primitiveElement.value?.$el.nodeName) ? primitiveElement.value?.$el.nextElementSibling : unrefElement(primitiveElement))\n\n  return {\n    primitiveElement,\n    currentElement,\n  }\n}\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { toRefs } from 'vue'\nimport { createContext, useForwardExpose } from '@/shared'\n\nexport interface CollapsibleRootProps extends PrimitiveProps {\n  /** The open state of the collapsible when it is initially rendered. <br> Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n  /** The controlled open state of the collapsible. Can be binded with `v-model`. */\n  open?: boolean\n  /** When `true`, prevents the user from interacting with the collapsible. */\n  disabled?: boolean\n  /** When `true`, the element will be unmounted on closed state. */\n  unmountOnHide?: boolean\n}\n\nexport type CollapsibleRootEmits = {\n  /** Event handler called when the open state of the collapsible changes. */\n  'update:open': [value: boolean]\n}\n\ninterface CollapsibleRootContext {\n  contentId: string\n  disabled?: Ref<boolean>\n  open: Ref<boolean>\n  unmountOnHide: Ref<boolean>\n  onOpenToggle: () => void\n}\n\nexport const [injectCollapsibleRootContext, provideCollapsibleRootContext]\n  = createContext<CollapsibleRootContext>('CollapsibleRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<CollapsibleRootProps>(), {\n  open: undefined,\n  defaultOpen: false,\n  unmountOnHide: true,\n})\n\nconst emit = defineEmits<CollapsibleRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nconst open = useVModel(props, 'open', emit, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst { disabled, unmountOnHide } = toRefs(props)\n\nprovideCollapsibleRootContext({\n  contentId: '',\n  disabled,\n  open,\n  unmountOnHide,\n  onOpenToggle: () => {\n    if (disabled.value)\n      return\n\n    open.value = !open.value\n  },\n})\n\ndefineExpose({ open })\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"props.asChild\"\n    :data-state=\"open ? 'open' : 'closed'\"\n    :data-disabled=\"disabled ? '' : undefined\"\n  >\n    <slot :open=\"open\" />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { toRefs } from 'vue'\nimport { createContext, useForwardExpose } from '@/shared'\n\nexport interface CollapsibleRootProps extends PrimitiveProps {\n  /** The open state of the collapsible when it is initially rendered. <br> Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n  /** The controlled open state of the collapsible. Can be binded with `v-model`. */\n  open?: boolean\n  /** When `true`, prevents the user from interacting with the collapsible. */\n  disabled?: boolean\n  /** When `true`, the element will be unmounted on closed state. */\n  unmountOnHide?: boolean\n}\n\nexport type CollapsibleRootEmits = {\n  /** Event handler called when the open state of the collapsible changes. */\n  'update:open': [value: boolean]\n}\n\ninterface CollapsibleRootContext {\n  contentId: string\n  disabled?: Ref<boolean>\n  open: Ref<boolean>\n  unmountOnHide: Ref<boolean>\n  onOpenToggle: () => void\n}\n\nexport const [injectCollapsibleRootContext, provideCollapsibleRootContext]\n  = createContext<CollapsibleRootContext>('CollapsibleRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<CollapsibleRootProps>(), {\n  open: undefined,\n  defaultOpen: false,\n  unmountOnHide: true,\n})\n\nconst emit = defineEmits<CollapsibleRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nconst open = useVModel(props, 'open', emit, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst { disabled, unmountOnHide } = toRefs(props)\n\nprovideCollapsibleRootContext({\n  contentId: '',\n  disabled,\n  open,\n  unmountOnHide,\n  onOpenToggle: () => {\n    if (disabled.value)\n      return\n\n    open.value = !open.value\n  },\n})\n\ndefineExpose({ open })\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"props.asChild\"\n    :data-state=\"open ? 'open' : 'closed'\"\n    :data-disabled=\"disabled ? '' : undefined\"\n  >\n    <slot :open=\"open\" />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CollapsibleContentProps extends PrimitiveProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n\nexport type CollapsibleContentEmits = {\n  contentFound: [void]\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useEventListener } from '@vueuse/core'\nimport { computed, nextTick, onMounted, ref, watch } from 'vue'\nimport { Presence } from '@/Presence'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { useForwardExpose, useId } from '@/shared'\nimport { injectCollapsibleRootContext } from './CollapsibleRoot.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<CollapsibleContentProps>()\nconst emits = defineEmits<CollapsibleContentEmits>()\n\nconst rootContext = injectCollapsibleRootContext()\nrootContext.contentId ||= useId(undefined, 'reka-collapsible-content')\n\nconst presentRef = ref<InstanceType<typeof Presence>>()\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst width = ref(0)\nconst height = ref(0)\n\n// when opening we want it to immediately open to retrieve dimensions\n// when closing we delay `present` to retrieve dimensions before closing\nconst isOpen = computed(() => rootContext.open.value)\nconst isMountAnimationPrevented = ref(isOpen.value)\nconst currentStyle = ref<Record<string, string>>()\n\nwatch(\n  () => [isOpen.value, presentRef.value?.present],\n  async () => {\n    await nextTick()\n    const node = currentElement.value\n    if (!node)\n      return\n    currentStyle.value = currentStyle.value || {\n      transitionDuration: node.style.transitionDuration,\n      animationName: node.style.animationName,\n    }\n    // block any animations/transitions so the element renders at its full dimensions\n    node.style.transitionDuration = '0s'\n    node.style.animationName = 'none'\n\n    // get width and height from full dimensions\n    const rect = node.getBoundingClientRect()\n    height.value = rect.height\n    width.value = rect.width\n\n    // kick off any animations/transitions that were originally set up if it isn't the initial mount\n    if (!isMountAnimationPrevented.value) {\n      node.style.transitionDuration = currentStyle.value.transitionDuration\n      node.style.animationName = currentStyle.value.animationName\n    }\n  },\n  {\n    immediate: true,\n  },\n)\n\nconst skipAnimation = computed(() => isMountAnimationPrevented.value && rootContext.open.value)\n\nonMounted(() => {\n  requestAnimationFrame(() => {\n    isMountAnimationPrevented.value = false\n  })\n})\n\nuseEventListener(currentElement, 'beforematch', (ev) => {\n  requestAnimationFrame(() => {\n    rootContext.onOpenToggle()\n    emits('contentFound')\n  })\n})\n</script>\n\n<template>\n  <Presence\n    v-slot=\"{ present }\"\n    ref=\"presentRef\"\n    :present=\"forceMount || rootContext.open.value\"\n    :force-mount=\"true\"\n  >\n    <Primitive\n      v-bind=\"$attrs\"\n      :id=\"rootContext.contentId\"\n      :ref=\"forwardRef\"\n      :as-child=\"props.asChild\"\n      :as=\"as\"\n      :hidden=\"!present ? rootContext.unmountOnHide.value ? '' : 'until-found' : undefined\"\n      :data-state=\"skipAnimation ? undefined : rootContext.open.value ? 'open' : 'closed'\"\n      :data-disabled=\"rootContext.disabled?.value ? '' : undefined\"\n      :style=\"{\n        [`--reka-collapsible-content-height`]: `${height}px`,\n        [`--reka-collapsible-content-width`]: `${width}px`,\n      }\"\n    >\n      <slot v-if=\"rootContext.unmountOnHide.value ? present : true\" />\n    </Primitive>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CollapsibleContentProps extends PrimitiveProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n\nexport type CollapsibleContentEmits = {\n  contentFound: [void]\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useEventListener } from '@vueuse/core'\nimport { computed, nextTick, onMounted, ref, watch } from 'vue'\nimport { Presence } from '@/Presence'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { useForwardExpose, useId } from '@/shared'\nimport { injectCollapsibleRootContext } from './CollapsibleRoot.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<CollapsibleContentProps>()\nconst emits = defineEmits<CollapsibleContentEmits>()\n\nconst rootContext = injectCollapsibleRootContext()\nrootContext.contentId ||= useId(undefined, 'reka-collapsible-content')\n\nconst presentRef = ref<InstanceType<typeof Presence>>()\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst width = ref(0)\nconst height = ref(0)\n\n// when opening we want it to immediately open to retrieve dimensions\n// when closing we delay `present` to retrieve dimensions before closing\nconst isOpen = computed(() => rootContext.open.value)\nconst isMountAnimationPrevented = ref(isOpen.value)\nconst currentStyle = ref<Record<string, string>>()\n\nwatch(\n  () => [isOpen.value, presentRef.value?.present],\n  async () => {\n    await nextTick()\n    const node = currentElement.value\n    if (!node)\n      return\n    currentStyle.value = currentStyle.value || {\n      transitionDuration: node.style.transitionDuration,\n      animationName: node.style.animationName,\n    }\n    // block any animations/transitions so the element renders at its full dimensions\n    node.style.transitionDuration = '0s'\n    node.style.animationName = 'none'\n\n    // get width and height from full dimensions\n    const rect = node.getBoundingClientRect()\n    height.value = rect.height\n    width.value = rect.width\n\n    // kick off any animations/transitions that were originally set up if it isn't the initial mount\n    if (!isMountAnimationPrevented.value) {\n      node.style.transitionDuration = currentStyle.value.transitionDuration\n      node.style.animationName = currentStyle.value.animationName\n    }\n  },\n  {\n    immediate: true,\n  },\n)\n\nconst skipAnimation = computed(() => isMountAnimationPrevented.value && rootContext.open.value)\n\nonMounted(() => {\n  requestAnimationFrame(() => {\n    isMountAnimationPrevented.value = false\n  })\n})\n\nuseEventListener(currentElement, 'beforematch', (ev) => {\n  requestAnimationFrame(() => {\n    rootContext.onOpenToggle()\n    emits('contentFound')\n  })\n})\n</script>\n\n<template>\n  <Presence\n    v-slot=\"{ present }\"\n    ref=\"presentRef\"\n    :present=\"forceMount || rootContext.open.value\"\n    :force-mount=\"true\"\n  >\n    <Primitive\n      v-bind=\"$attrs\"\n      :id=\"rootContext.contentId\"\n      :ref=\"forwardRef\"\n      :as-child=\"props.asChild\"\n      :as=\"as\"\n      :hidden=\"!present ? rootContext.unmountOnHide.value ? '' : 'until-found' : undefined\"\n      :data-state=\"skipAnimation ? undefined : rootContext.open.value ? 'open' : 'closed'\"\n      :data-disabled=\"rootContext.disabled?.value ? '' : undefined\"\n      :style=\"{\n        [`--reka-collapsible-content-height`]: `${height}px`,\n        [`--reka-collapsible-content-width`]: `${width}px`,\n      }\"\n    >\n      <slot v-if=\"rootContext.unmountOnHide.value ? present : true\" />\n    </Primitive>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface CollapsibleTriggerProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectCollapsibleRootContext } from './CollapsibleRoot.vue'\n\nconst props = withDefaults(defineProps<CollapsibleTriggerProps>(), {\n  as: 'button',\n})\n\nuseForwardExpose()\nconst rootContext = injectCollapsibleRootContext()\n</script>\n\n<template>\n  <Primitive\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :as=\"as\"\n    :as-child=\"props.asChild\"\n    :aria-controls=\"rootContext.contentId\"\n    :aria-expanded=\"rootContext.open.value\"\n    :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n    :data-disabled=\"rootContext.disabled?.value ? '' : undefined\"\n    :disabled=\"rootContext.disabled?.value\"\n    @click=\"rootContext.onOpenToggle\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface CollapsibleTriggerProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectCollapsibleRootContext } from './CollapsibleRoot.vue'\n\nconst props = withDefaults(defineProps<CollapsibleTriggerProps>(), {\n  as: 'button',\n})\n\nuseForwardExpose()\nconst rootContext = injectCollapsibleRootContext()\n</script>\n\n<template>\n  <Primitive\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :as=\"as\"\n    :as-child=\"props.asChild\"\n    :aria-controls=\"rootContext.contentId\"\n    :aria-expanded=\"rootContext.open.value\"\n    :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n    :data-disabled=\"rootContext.disabled?.value ? '' : undefined\"\n    :disabled=\"rootContext.disabled?.value\"\n    @click=\"rootContext.onOpenToggle\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","import type { Ref } from 'vue'\nimport type { AcceptableValue, SingleOrMultipleProps } from './types'\nimport { useVModel } from '@vueuse/core'\nimport { isEqual } from 'ohash'\nimport { computed } from 'vue'\nimport { isValueEqualOrExist } from './isValueEqualOrExist'\n\n/**\n * Validates the props and it makes sure that the types are coherent with each other\n *\n * 1. If type, defaultValue, and modelValue are all undefined, throw an error.\n * 2. If modelValue and defaultValue are defined and not of the same type, throw an error.\n * 3. If type is defined:\n *    a. If type is 'single' and either modelValue or defaultValue is an array, log an error and return 'multiple'.\n *    b. If type is 'multiple' and neither modelValue nor defaultValue is an array, log an error and return 'single'.\n * 4. Return 'multiple' if modelValue is an array, else return 'single'.\n */\nfunction validateProps({ type, defaultValue, modelValue }: SingleOrMultipleProps) {\n  const value = modelValue || defaultValue\n  const canTypeBeInferred = modelValue !== undefined || defaultValue !== undefined\n\n  if (canTypeBeInferred)\n    return Array.isArray(value) ? 'multiple' : 'single'\n  else\n    return type ?? 'single' // always fallback to `single`\n}\n\nfunction getDefaultType({ type, defaultValue, modelValue }: SingleOrMultipleProps) {\n  if (type)\n    return type\n\n  return validateProps({ type, defaultValue, modelValue })\n}\n\nfunction getDefaultValue({ type, defaultValue }: SingleOrMultipleProps) {\n  if (defaultValue !== undefined)\n    return defaultValue\n\n  return (type === 'single') ? undefined : []\n}\n\nexport function useSingleOrMultipleValue<P extends SingleOrMultipleProps, Name extends string>(\n  props: P,\n  emits: (name: Name, ...args: any[]) => void,\n) {\n  const type = computed(() => getDefaultType(props))\n  const modelValue = useVModel(props, 'modelValue', emits, {\n    defaultValue: getDefaultValue(props),\n    passive: (props.modelValue === undefined) as false,\n    deep: true,\n  }) as Ref<AcceptableValue | AcceptableValue[] | undefined>\n\n  function changeModelValue(value: AcceptableValue) {\n    if (type.value === 'single') {\n      modelValue.value = isEqual(value, modelValue.value) ? undefined : value\n    }\n    else {\n      const modelValueArray = Array.isArray(modelValue.value) ? [...(modelValue.value as AcceptableValue[] || [])] : [modelValue.value].filter(Boolean)\n      if (isValueEqualOrExist(modelValueArray, value)) {\n        const index = modelValueArray.findIndex(i => isEqual(i, value))\n        modelValueArray.splice(index, 1)\n      }\n      else {\n        modelValueArray.push(value)\n      }\n      modelValue.value = modelValueArray\n    }\n  }\n\n  const isSingle = computed(() => type.value === 'single')\n\n  return {\n    modelValue,\n    changeModelValue,\n    isSingle,\n  }\n}\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { AcceptableValue, DataOrientation, Direction, SingleOrMultipleProps, SingleOrMultipleType } from '@/shared/types'\nimport { createContext, useDirection, useForwardExpose } from '@/shared'\n\nexport interface AccordionRootProps<T = string | string[]>\n  extends PrimitiveProps, SingleOrMultipleProps<T> {\n  /**\n   * When type is \"single\", allows closing content when clicking trigger for an open item.\n   * When type is \"multiple\", this prop has no effect.\n   *\n   * @defaultValue false\n   */\n  collapsible?: boolean\n\n  /**\n   * When `true`, prevents the user from interacting with the accordion and all its items\n   *\n   * @defaultValue false\n   */\n  disabled?: boolean\n\n  /**\n   * The reading direction of the accordion when applicable. If omitted, assumes LTR (left-to-right) reading mode.\n   *\n   * @defaultValue \"ltr\"\n   */\n  dir?: Direction\n\n  /**\n   * The orientation of the accordion.\n   *\n   * @defaultValue \"vertical\"\n   */\n  orientation?: DataOrientation\n\n  /**\n   * When `true`, the element will be unmounted on closed state.\n   *\n   * @defaultValue `true`\n   */\n  unmountOnHide?: boolean\n}\n\nexport type AccordionRootEmits<T extends SingleOrMultipleType = SingleOrMultipleType> = {\n  /**\n   * Event handler called when the expanded state of an item changes\n   */\n  'update:modelValue': [value: (T extends 'single' ? string : string[]) | undefined]\n}\n\nexport type AccordionRootContext<P extends AccordionRootProps> = {\n  disabled: Ref<P['disabled']>\n  direction: Ref<P['dir']>\n  orientation: P['orientation']\n  parentElement: Ref<HTMLElement | undefined>\n  changeModelValue: (value: string) => void\n  isSingle: ComputedRef<boolean>\n  modelValue: Ref<AcceptableValue | AcceptableValue[] | undefined>\n  collapsible: boolean\n  unmountOnHide: Ref<boolean>\n}\n\nexport const [injectAccordionRootContext, provideAccordionRootContext]\n  = createContext<AccordionRootContext<AccordionRootProps>>('AccordionRoot')\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends (string | string[]), ExplicitType extends SingleOrMultipleType\">\nimport { toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useSingleOrMultipleValue } from '@/shared/useSingleOrMultipleValue'\n\nconst props = withDefaults(defineProps<AccordionRootProps<T>>(), {\n  disabled: false,\n  orientation: 'vertical',\n  collapsible: false,\n  unmountOnHide: true,\n})\n\nconst emits = defineEmits<AccordionRootEmits<ExplicitType>>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current active value */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { dir, disabled, unmountOnHide } = toRefs(props)\nconst direction = useDirection(dir)\n\nconst { modelValue, changeModelValue, isSingle } = useSingleOrMultipleValue(props, emits)\n\nconst { forwardRef, currentElement: parentElement } = useForwardExpose()\n\nprovideAccordionRootContext({\n  disabled,\n  direction,\n  orientation: props.orientation,\n  parentElement,\n  isSingle,\n  collapsible: props.collapsible,\n  modelValue,\n  changeModelValue,\n  unmountOnHide,\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n  >\n    <slot :model-value=\"modelValue\" />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { AcceptableValue, DataOrientation, Direction, SingleOrMultipleProps, SingleOrMultipleType } from '@/shared/types'\nimport { createContext, useDirection, useForwardExpose } from '@/shared'\n\nexport interface AccordionRootProps<T = string | string[]>\n  extends PrimitiveProps, SingleOrMultipleProps<T> {\n  /**\n   * When type is \"single\", allows closing content when clicking trigger for an open item.\n   * When type is \"multiple\", this prop has no effect.\n   *\n   * @defaultValue false\n   */\n  collapsible?: boolean\n\n  /**\n   * When `true`, prevents the user from interacting with the accordion and all its items\n   *\n   * @defaultValue false\n   */\n  disabled?: boolean\n\n  /**\n   * The reading direction of the accordion when applicable. If omitted, assumes LTR (left-to-right) reading mode.\n   *\n   * @defaultValue \"ltr\"\n   */\n  dir?: Direction\n\n  /**\n   * The orientation of the accordion.\n   *\n   * @defaultValue \"vertical\"\n   */\n  orientation?: DataOrientation\n\n  /**\n   * When `true`, the element will be unmounted on closed state.\n   *\n   * @defaultValue `true`\n   */\n  unmountOnHide?: boolean\n}\n\nexport type AccordionRootEmits<T extends SingleOrMultipleType = SingleOrMultipleType> = {\n  /**\n   * Event handler called when the expanded state of an item changes\n   */\n  'update:modelValue': [value: (T extends 'single' ? string : string[]) | undefined]\n}\n\nexport type AccordionRootContext<P extends AccordionRootProps> = {\n  disabled: Ref<P['disabled']>\n  direction: Ref<P['dir']>\n  orientation: P['orientation']\n  parentElement: Ref<HTMLElement | undefined>\n  changeModelValue: (value: string) => void\n  isSingle: ComputedRef<boolean>\n  modelValue: Ref<AcceptableValue | AcceptableValue[] | undefined>\n  collapsible: boolean\n  unmountOnHide: Ref<boolean>\n}\n\nexport const [injectAccordionRootContext, provideAccordionRootContext]\n  = createContext<AccordionRootContext<AccordionRootProps>>('AccordionRoot')\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends (string | string[]), ExplicitType extends SingleOrMultipleType\">\nimport { toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useSingleOrMultipleValue } from '@/shared/useSingleOrMultipleValue'\n\nconst props = withDefaults(defineProps<AccordionRootProps<T>>(), {\n  disabled: false,\n  orientation: 'vertical',\n  collapsible: false,\n  unmountOnHide: true,\n})\n\nconst emits = defineEmits<AccordionRootEmits<ExplicitType>>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current active value */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { dir, disabled, unmountOnHide } = toRefs(props)\nconst direction = useDirection(dir)\n\nconst { modelValue, changeModelValue, isSingle } = useSingleOrMultipleValue(props, emits)\n\nconst { forwardRef, currentElement: parentElement } = useForwardExpose()\n\nprovideAccordionRootContext({\n  disabled,\n  direction,\n  orientation: props.orientation,\n  parentElement,\n  isSingle,\n  collapsible: props.collapsible,\n  modelValue,\n  changeModelValue,\n  unmountOnHide,\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n  >\n    <slot :model-value=\"modelValue\" />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, VNodeRef } from 'vue'\nimport type { CollapsibleRootProps } from '../Collapsible'\nimport { createContext, useArrowNavigation, useForwardExpose } from '@/shared'\nimport { injectAccordionRootContext } from './AccordionRoot.vue'\n\nenum AccordionItemState {\n  Open = 'open',\n  Closed = 'closed',\n}\n\nexport interface AccordionItemProps\n  extends Omit<CollapsibleRootProps, 'open' | 'defaultOpen' | 'onOpenChange'> {\n  /**\n   * Whether or not an accordion item is disabled from user interaction.\n   * When `true`, prevents the user from interacting with the item.\n   *\n   * @defaultValue false\n   */\n  disabled?: boolean\n  /**\n   * A string value for the accordion item. All items within an accordion should use a unique value.\n   */\n  value: string\n}\n\ninterface AccordionItemContext {\n  open: ComputedRef<boolean>\n  dataState: ComputedRef<AccordionItemState>\n  disabled: ComputedRef<boolean>\n  dataDisabled: ComputedRef<'' | undefined>\n  triggerId: string\n  currentRef: VNodeRef\n  currentElement: ComputedRef<HTMLElement | undefined>\n  value: ComputedRef<string>\n}\n\nexport const [injectAccordionItemContext, provideAccordionItemContext]\n  = createContext<AccordionItemContext>('AccordionItem')\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { CollapsibleRoot } from '@/Collapsible'\n\nconst props = withDefaults(\n  defineProps<AccordionItemProps>(),\n  {\n    unmountOnHide: undefined,\n  },\n)\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nconst rootContext = injectAccordionRootContext()\n\nconst open = computed(() =>\n  rootContext.isSingle.value\n    ? props.value === rootContext.modelValue.value\n    : Array.isArray(rootContext.modelValue.value)\n      && rootContext.modelValue.value.includes(props.value),\n)\n\nconst disabled = computed(() => {\n  return (rootContext.disabled.value || props.disabled)\n})\n\nconst dataDisabled = computed(() => (disabled.value ? '' : undefined))\n\nconst dataState = computed(() =>\n  open.value ? AccordionItemState.Open : AccordionItemState.Closed,\n)\n\ndefineExpose({ open, dataDisabled })\nconst { currentRef, currentElement } = useForwardExpose()\n\nprovideAccordionItemContext({\n  open,\n  dataState,\n  disabled,\n  dataDisabled,\n  triggerId: '',\n  currentRef,\n  currentElement,\n  value: computed(() => props.value),\n})\n\nfunction handleArrowKey(e: KeyboardEvent) {\n  const target = e.target as HTMLElement\n  const allCollectionItems: HTMLElement[] = Array.from(rootContext.parentElement.value?.querySelectorAll('[data-reka-collection-item]') ?? [])\n\n  const collectionItemIndex = allCollectionItems.findIndex(item => item === target)\n  if (collectionItemIndex === -1)\n    return null\n\n  useArrowNavigation(\n    e,\n    target,\n    rootContext.parentElement.value!,\n    {\n      arrowKeyOptions: rootContext.orientation,\n      dir: rootContext.direction.value,\n      focus: true,\n    },\n  )\n}\n</script>\n\n<template>\n  <CollapsibleRoot\n    :data-orientation=\"rootContext.orientation\"\n    :data-disabled=\"dataDisabled\"\n    :data-state=\"dataState\"\n    :disabled=\"disabled\"\n    :open=\"open\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    :unmount-on-hide=\"props.unmountOnHide ?? rootContext.unmountOnHide.value\"\n    @keydown.up.down.left.right.home.end=\"handleArrowKey\"\n  >\n    <slot :open=\"open\" />\n  </CollapsibleRoot>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, VNodeRef } from 'vue'\nimport type { CollapsibleRootProps } from '../Collapsible'\nimport { createContext, useArrowNavigation, useForwardExpose } from '@/shared'\nimport { injectAccordionRootContext } from './AccordionRoot.vue'\n\nenum AccordionItemState {\n  Open = 'open',\n  Closed = 'closed',\n}\n\nexport interface AccordionItemProps\n  extends Omit<CollapsibleRootProps, 'open' | 'defaultOpen' | 'onOpenChange'> {\n  /**\n   * Whether or not an accordion item is disabled from user interaction.\n   * When `true`, prevents the user from interacting with the item.\n   *\n   * @defaultValue false\n   */\n  disabled?: boolean\n  /**\n   * A string value for the accordion item. All items within an accordion should use a unique value.\n   */\n  value: string\n}\n\ninterface AccordionItemContext {\n  open: ComputedRef<boolean>\n  dataState: ComputedRef<AccordionItemState>\n  disabled: ComputedRef<boolean>\n  dataDisabled: ComputedRef<'' | undefined>\n  triggerId: string\n  currentRef: VNodeRef\n  currentElement: ComputedRef<HTMLElement | undefined>\n  value: ComputedRef<string>\n}\n\nexport const [injectAccordionItemContext, provideAccordionItemContext]\n  = createContext<AccordionItemContext>('AccordionItem')\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { CollapsibleRoot } from '@/Collapsible'\n\nconst props = withDefaults(\n  defineProps<AccordionItemProps>(),\n  {\n    unmountOnHide: undefined,\n  },\n)\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nconst rootContext = injectAccordionRootContext()\n\nconst open = computed(() =>\n  rootContext.isSingle.value\n    ? props.value === rootContext.modelValue.value\n    : Array.isArray(rootContext.modelValue.value)\n      && rootContext.modelValue.value.includes(props.value),\n)\n\nconst disabled = computed(() => {\n  return (rootContext.disabled.value || props.disabled)\n})\n\nconst dataDisabled = computed(() => (disabled.value ? '' : undefined))\n\nconst dataState = computed(() =>\n  open.value ? AccordionItemState.Open : AccordionItemState.Closed,\n)\n\ndefineExpose({ open, dataDisabled })\nconst { currentRef, currentElement } = useForwardExpose()\n\nprovideAccordionItemContext({\n  open,\n  dataState,\n  disabled,\n  dataDisabled,\n  triggerId: '',\n  currentRef,\n  currentElement,\n  value: computed(() => props.value),\n})\n\nfunction handleArrowKey(e: KeyboardEvent) {\n  const target = e.target as HTMLElement\n  const allCollectionItems: HTMLElement[] = Array.from(rootContext.parentElement.value?.querySelectorAll('[data-reka-collection-item]') ?? [])\n\n  const collectionItemIndex = allCollectionItems.findIndex(item => item === target)\n  if (collectionItemIndex === -1)\n    return null\n\n  useArrowNavigation(\n    e,\n    target,\n    rootContext.parentElement.value!,\n    {\n      arrowKeyOptions: rootContext.orientation,\n      dir: rootContext.direction.value,\n      focus: true,\n    },\n  )\n}\n</script>\n\n<template>\n  <CollapsibleRoot\n    :data-orientation=\"rootContext.orientation\"\n    :data-disabled=\"dataDisabled\"\n    :data-state=\"dataState\"\n    :disabled=\"disabled\"\n    :open=\"open\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    :unmount-on-hide=\"props.unmountOnHide ?? rootContext.unmountOnHide.value\"\n    @keydown.up.down.left.right.home.end=\"handleArrowKey\"\n  >\n    <slot :open=\"open\" />\n  </CollapsibleRoot>\n</template>\n","<script lang=\"ts\">\nimport type { CollapsibleContentProps } from '../Collapsible'\n\nexport interface AccordionContentProps extends CollapsibleContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useForwardExpose } from '@/shared'\nimport { CollapsibleContent } from '../Collapsible'\nimport { injectAccordionItemContext } from './AccordionItem.vue'\nimport { injectAccordionRootContext } from './AccordionRoot.vue'\n\nconst props = defineProps<AccordionContentProps>()\n\nconst rootContext = injectAccordionRootContext()\nconst itemContext = injectAccordionItemContext()\n\nuseForwardExpose()\n</script>\n\n<template>\n  <CollapsibleContent\n    role=\"region\"\n    :as-child=\"props.asChild\"\n    :as=\"as\"\n    :force-mount=\"props.forceMount\"\n    :aria-labelledby=\"itemContext.triggerId\"\n    :data-state=\"itemContext.dataState.value\"\n    :data-disabled=\"itemContext.dataDisabled.value\"\n    :data-orientation=\"rootContext.orientation\"\n    style=\"\n      --reka-accordion-content-width: var(--reka-collapsible-content-width);\n      --reka-accordion-content-height: var(--reka-collapsible-content-height);\n    \"\n    @content-found=\"rootContext.changeModelValue(itemContext.value.value)\"\n  >\n    <slot />\n  </CollapsibleContent>\n</template>\n","<script lang=\"ts\">\nimport type { CollapsibleContentProps } from '../Collapsible'\n\nexport interface AccordionContentProps extends CollapsibleContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useForwardExpose } from '@/shared'\nimport { CollapsibleContent } from '../Collapsible'\nimport { injectAccordionItemContext } from './AccordionItem.vue'\nimport { injectAccordionRootContext } from './AccordionRoot.vue'\n\nconst props = defineProps<AccordionContentProps>()\n\nconst rootContext = injectAccordionRootContext()\nconst itemContext = injectAccordionItemContext()\n\nuseForwardExpose()\n</script>\n\n<template>\n  <CollapsibleContent\n    role=\"region\"\n    :as-child=\"props.asChild\"\n    :as=\"as\"\n    :force-mount=\"props.forceMount\"\n    :aria-labelledby=\"itemContext.triggerId\"\n    :data-state=\"itemContext.dataState.value\"\n    :data-disabled=\"itemContext.dataDisabled.value\"\n    :data-orientation=\"rootContext.orientation\"\n    style=\"\n      --reka-accordion-content-width: var(--reka-collapsible-content-width);\n      --reka-accordion-content-height: var(--reka-collapsible-content-height);\n    \"\n    @content-found=\"rootContext.changeModelValue(itemContext.value.value)\"\n  >\n    <slot />\n  </CollapsibleContent>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface AccordionHeaderProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectAccordionItemContext } from './AccordionItem.vue'\nimport { injectAccordionRootContext } from './AccordionRoot.vue'\n\nconst props = withDefaults(defineProps<AccordionHeaderProps>(), {\n  as: 'h3',\n})\n\nconst rootContext = injectAccordionRootContext()\nconst itemContext = injectAccordionItemContext()\n\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    :data-orientation=\"rootContext.orientation\"\n    :data-state=\"itemContext.dataState.value\"\n    :data-disabled=\"itemContext.dataDisabled.value\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface AccordionHeaderProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectAccordionItemContext } from './AccordionItem.vue'\nimport { injectAccordionRootContext } from './AccordionRoot.vue'\n\nconst props = withDefaults(defineProps<AccordionHeaderProps>(), {\n  as: 'h3',\n})\n\nconst rootContext = injectAccordionRootContext()\nconst itemContext = injectAccordionItemContext()\n\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    :data-orientation=\"rootContext.orientation\"\n    :data-state=\"itemContext.dataState.value\"\n    :data-disabled=\"itemContext.dataDisabled.value\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface AccordionTriggerProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { CollapsibleTrigger } from '@/Collapsible'\nimport { useId } from '@/shared'\nimport { injectAccordionItemContext } from './AccordionItem.vue'\n\nimport { injectAccordionRootContext } from './AccordionRoot.vue'\n\nconst props = defineProps<AccordionTriggerProps>()\n\nconst rootContext = injectAccordionRootContext()\nconst itemContext = injectAccordionItemContext()\n\nitemContext.triggerId ||= useId(undefined, 'reka-accordion-trigger')\nfunction changeItem() {\n  const triggerDisabled = rootContext.isSingle.value && itemContext.open.value && !rootContext.collapsible\n  if (itemContext.disabled.value || triggerDisabled)\n    return\n\n  rootContext.changeModelValue(itemContext.value.value)\n}\n</script>\n\n<template>\n  <CollapsibleTrigger\n    :id=\"itemContext.triggerId\"\n    :ref=\"itemContext.currentRef\"\n    data-reka-collection-item\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    :aria-disabled=\"itemContext.disabled.value || undefined\"\n    :aria-expanded=\"itemContext.open.value || false\"\n    :data-disabled=\"itemContext.dataDisabled.value\"\n    :data-orientation=\"rootContext.orientation\"\n    :data-state=\"itemContext.dataState.value\"\n    :disabled=\"itemContext.disabled.value\"\n    @click=\"changeItem\"\n  >\n    <slot />\n  </CollapsibleTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface AccordionTriggerProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { CollapsibleTrigger } from '@/Collapsible'\nimport { useId } from '@/shared'\nimport { injectAccordionItemContext } from './AccordionItem.vue'\n\nimport { injectAccordionRootContext } from './AccordionRoot.vue'\n\nconst props = defineProps<AccordionTriggerProps>()\n\nconst rootContext = injectAccordionRootContext()\nconst itemContext = injectAccordionItemContext()\n\nitemContext.triggerId ||= useId(undefined, 'reka-accordion-trigger')\nfunction changeItem() {\n  const triggerDisabled = rootContext.isSingle.value && itemContext.open.value && !rootContext.collapsible\n  if (itemContext.disabled.value || triggerDisabled)\n    return\n\n  rootContext.changeModelValue(itemContext.value.value)\n}\n</script>\n\n<template>\n  <CollapsibleTrigger\n    :id=\"itemContext.triggerId\"\n    :ref=\"itemContext.currentRef\"\n    data-reka-collection-item\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    :aria-disabled=\"itemContext.disabled.value || undefined\"\n    :aria-expanded=\"itemContext.open.value || false\"\n    :data-disabled=\"itemContext.dataDisabled.value\"\n    :data-orientation=\"rootContext.orientation\"\n    :data-state=\"itemContext.dataState.value\"\n    :disabled=\"itemContext.disabled.value\"\n    @click=\"changeItem\"\n  >\n    <slot />\n  </CollapsibleTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport { createContext } from '@/shared'\n\nexport interface DialogRootProps {\n  /** The controlled open state of the dialog. Can be binded as `v-model:open`. */\n  open?: boolean\n  /** The open state of the dialog when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n  /**\n   * The modality of the dialog When set to `true`, <br>\n   * interaction with outside elements will be disabled and only dialog content will be visible to screen readers.\n   */\n  modal?: boolean\n}\n\nexport type DialogRootEmits = {\n  /** Event handler called when the open state of the dialog changes. */\n  'update:open': [value: boolean]\n}\n\nexport interface DialogRootContext {\n  open: Readonly<Ref<boolean>>\n  modal: Ref<boolean>\n  openModal: () => void\n  onOpenChange: (value: boolean) => void\n  onOpenToggle: () => void\n  triggerElement: Ref<HTMLElement | undefined>\n  contentElement: Ref<HTMLElement | undefined>\n  contentId: string\n  titleId: string\n  descriptionId: string\n}\n\nexport const [injectDialogRootContext, provideDialogRootContext]\n  = createContext<DialogRootContext>('DialogRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { ref, toRefs } from 'vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<DialogRootProps>(), {\n  open: undefined,\n  defaultOpen: false,\n  modal: true,\n})\nconst emit = defineEmits<DialogRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n    /** Close the dialog */\n    close: () => void\n  }) => any\n}>()\n\nconst open = useVModel(props, 'open', emit, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst triggerElement = ref<HTMLElement>()\nconst contentElement = ref<HTMLElement>()\nconst { modal } = toRefs(props)\n\nprovideDialogRootContext({\n  open,\n  modal,\n  openModal: () => {\n    open.value = true\n  },\n  onOpenChange: (value) => {\n    open.value = value\n  },\n  onOpenToggle: () => {\n    open.value = !open.value\n  },\n  contentId: '',\n  titleId: '',\n  descriptionId: '',\n  triggerElement,\n  contentElement,\n})\n</script>\n\n<template>\n  <slot\n    :open=\"open\"\n    :close=\"() => open = false\"\n  />\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport { createContext } from '@/shared'\n\nexport interface DialogRootProps {\n  /** The controlled open state of the dialog. Can be binded as `v-model:open`. */\n  open?: boolean\n  /** The open state of the dialog when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n  /**\n   * The modality of the dialog When set to `true`, <br>\n   * interaction with outside elements will be disabled and only dialog content will be visible to screen readers.\n   */\n  modal?: boolean\n}\n\nexport type DialogRootEmits = {\n  /** Event handler called when the open state of the dialog changes. */\n  'update:open': [value: boolean]\n}\n\nexport interface DialogRootContext {\n  open: Readonly<Ref<boolean>>\n  modal: Ref<boolean>\n  openModal: () => void\n  onOpenChange: (value: boolean) => void\n  onOpenToggle: () => void\n  triggerElement: Ref<HTMLElement | undefined>\n  contentElement: Ref<HTMLElement | undefined>\n  contentId: string\n  titleId: string\n  descriptionId: string\n}\n\nexport const [injectDialogRootContext, provideDialogRootContext]\n  = createContext<DialogRootContext>('DialogRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { ref, toRefs } from 'vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<DialogRootProps>(), {\n  open: undefined,\n  defaultOpen: false,\n  modal: true,\n})\nconst emit = defineEmits<DialogRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n    /** Close the dialog */\n    close: () => void\n  }) => any\n}>()\n\nconst open = useVModel(props, 'open', emit, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst triggerElement = ref<HTMLElement>()\nconst contentElement = ref<HTMLElement>()\nconst { modal } = toRefs(props)\n\nprovideDialogRootContext({\n  open,\n  modal,\n  openModal: () => {\n    open.value = true\n  },\n  onOpenChange: (value) => {\n    open.value = value\n  },\n  onOpenToggle: () => {\n    open.value = !open.value\n  },\n  contentId: '',\n  titleId: '',\n  descriptionId: '',\n  triggerElement,\n  contentElement,\n})\n</script>\n\n<template>\n  <slot\n    :open=\"open\"\n    :close=\"() => open = false\"\n  />\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface DialogCloseProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\nconst props = withDefaults(defineProps<DialogCloseProps>(), {\n  as: 'button',\n})\n\nuseForwardExpose()\nconst rootContext = injectDialogRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    @click=\"rootContext.onOpenChange(false)\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface DialogCloseProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\nconst props = withDefaults(defineProps<DialogCloseProps>(), {\n  as: 'button',\n})\n\nuseForwardExpose()\nconst rootContext = injectDialogRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    @click=\"rootContext.onOpenChange(false)\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","import type { MaybeRefOrGetter, Ref } from 'vue'\nimport { isClient } from '@vueuse/shared'\nimport { nextTick, ref, toValue, watchEffect } from 'vue'\nimport { handleAndDispatchCustomEvent } from '@/shared'\n\nexport type PointerDownOutsideEvent = CustomEvent<{\n  originalEvent: PointerEvent\n}>\nexport type FocusOutsideEvent = CustomEvent<{ originalEvent: FocusEvent }>\n\nexport const DISMISSABLE_LAYER_NAME = 'DismissableLayer'\nexport const CONTEXT_UPDATE = 'dismissableLayer.update'\nexport const POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside'\nexport const FOCUS_OUTSIDE = 'dismissableLayer.focusOutside'\n\nexport function isLayerExist(layerElement: HTMLElement, targetElement: HTMLElement) {\n  if (!(targetElement instanceof Element))\n    return false\n\n  const targetLayer = targetElement.closest(\n    '[data-dismissable-layer]',\n  )\n\n  const mainLayer = layerElement.dataset.dismissableLayer === ''\n    ? layerElement\n    : layerElement.querySelector(\n      '[data-dismissable-layer]',\n    ) as HTMLElement\n\n  const nodeList = Array.from(\n    layerElement.ownerDocument.querySelectorAll('[data-dismissable-layer]'),\n  )\n\n  if (targetLayer && (mainLayer === targetLayer || nodeList.indexOf(mainLayer) < nodeList.indexOf(targetLayer))) {\n    return true\n  }\n  else {\n    return false\n  }\n}\n\n/**\n * Listens for `pointerdown` outside a DOM subtree. We use `pointerdown` rather than `pointerup`\n * to mimic layer dismissing behaviour present in OS.\n * Returns props to pass to the node we want to check for outside events.\n */\nexport function usePointerDownOutside(\n  onPointerDownOutside?: (event: PointerDownOutsideEvent) => void,\n  element?: Ref<HTMLElement | undefined>,\n  enabled: MaybeRefOrGetter<boolean> = true,\n) {\n  const ownerDocument: Document\n    = element?.value?.ownerDocument ?? globalThis?.document\n\n  const isPointerInsideDOMTree = ref(false)\n  const handleClickRef = ref(() => {})\n\n  watchEffect((cleanupFn) => {\n    if (!isClient || !toValue(enabled))\n      return\n    const handlePointerDown = async (event: PointerEvent) => {\n      const target = event.target as HTMLElement | undefined\n\n      if (!element?.value || !target)\n        return\n\n      if (isLayerExist(element.value, target)) {\n        isPointerInsideDOMTree.value = false\n        return\n      }\n\n      if (event.target && !isPointerInsideDOMTree.value) {\n        const eventDetail = { originalEvent: event }\n\n        function handleAndDispatchPointerDownOutsideEvent() {\n          handleAndDispatchCustomEvent(\n            POINTER_DOWN_OUTSIDE,\n            onPointerDownOutside,\n            eventDetail,\n          )\n        }\n\n        /**\n         * On touch devices, we need to wait for a click event because browsers implement\n         * a ~350ms delay between the time the user stops touching the display and when the\n         * browser executes events. We need to ensure we don't reactivate pointer-events within\n         * this timeframe otherwise the browser may execute events that should have been prevented.\n         *\n         * Additionally, this also lets us deal automatically with cancellations when a click event\n         * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.\n         *\n         * This is why we also continuously remove the previous listener, because we cannot be\n         * certain that it was raised, and therefore cleaned-up.\n         */\n        if (event.pointerType === 'touch') {\n          ownerDocument.removeEventListener('click', handleClickRef.value)\n          handleClickRef.value = handleAndDispatchPointerDownOutsideEvent\n          ownerDocument.addEventListener('click', handleClickRef.value, {\n            once: true,\n          })\n        }\n        else {\n          handleAndDispatchPointerDownOutsideEvent()\n        }\n      }\n      else {\n        // We need to remove the event listener in case the outside click has been canceled.\n        // See: https://github.com/radix-ui/primitives/issues/2171\n        ownerDocument.removeEventListener('click', handleClickRef.value)\n      }\n      isPointerInsideDOMTree.value = false\n    }\n    /**\n     * if this hook executes in a component that mounts via a `pointerdown` event, the event\n     * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid\n     * this by delaying the event listener registration on the document.\n     * This is how the DOM works, ie:\n     * ```\n     * button.addEventListener('pointerdown', () => {\n     *   console.log('I will log');\n     *   document.addEventListener('pointerdown', () => {\n     *     console.log('I will also log');\n     *   })\n     * });\n     */\n    const timerId = window.setTimeout(() => {\n      ownerDocument.addEventListener('pointerdown', handlePointerDown)\n    }, 0)\n\n    cleanupFn(() => {\n      window.clearTimeout(timerId)\n      ownerDocument.removeEventListener('pointerdown', handlePointerDown)\n      ownerDocument.removeEventListener('click', handleClickRef.value)\n    })\n  })\n\n  return {\n    onPointerDownCapture: () => {\n      if (!toValue(enabled))\n        return\n      isPointerInsideDOMTree.value = true\n    },\n  }\n}\n\n/**\n * Listens for when focus happens outside a DOM subtree.\n * Returns props to pass to the root (node) of the subtree we want to check.\n */\nexport function useFocusOutside(\n  onFocusOutside?: (event: FocusOutsideEvent) => void,\n  element?: Ref<HTMLElement | undefined>,\n  enabled: MaybeRefOrGetter<boolean> = true,\n) {\n  const ownerDocument: Document\n    = element?.value?.ownerDocument ?? globalThis?.document\n\n  const isFocusInsideDOMTree = ref(false)\n  watchEffect((cleanupFn) => {\n    if (!isClient || !toValue(enabled))\n      return\n    const handleFocus = async (event: FocusEvent) => {\n      if (!element?.value)\n        return\n\n      await nextTick()\n      await nextTick()\n      const target = event.target as HTMLElement | undefined\n      if (!element.value || !target || isLayerExist(element.value, target))\n        return\n\n      if (event.target && !isFocusInsideDOMTree.value) {\n        const eventDetail = { originalEvent: event }\n        handleAndDispatchCustomEvent(\n          FOCUS_OUTSIDE,\n          onFocusOutside,\n          eventDetail,\n        )\n      }\n    }\n\n    ownerDocument.addEventListener('focusin', handleFocus)\n\n    cleanupFn(() => ownerDocument.removeEventListener('focusin', handleFocus))\n  })\n\n  return {\n    onFocusCapture: () => {\n      if (!toValue(enabled))\n        return\n\n      isFocusInsideDOMTree.value = true\n    },\n    onBlurCapture: () => {\n      if (!toValue(enabled))\n        return\n\n      isFocusInsideDOMTree.value = false\n    },\n  }\n}\n\nexport function dispatchUpdate() {\n  const event = new CustomEvent(CONTEXT_UPDATE)\n  document.dispatchEvent(event)\n}\n","<script lang=\"ts\">\nimport type {\n  FocusOutsideEvent,\n  PointerDownOutsideEvent,\n} from './utils'\n\nimport type { PrimitiveProps } from '@/Primitive'\nimport {\n  computed,\n  nextTick,\n  reactive,\n  watch,\n  watchEffect,\n} from 'vue'\nimport { isNullish, useForwardExpose } from '@/shared'\n\nexport interface DismissableLayerProps extends PrimitiveProps {\n  /**\n   * When `true`, hover/focus/click interactions will be disabled on elements outside\n   * the `DismissableLayer`. Users will need to click twice on outside elements to\n   * interact with them: once to close the `DismissableLayer`, and again to trigger the element.\n   */\n  disableOutsidePointerEvents?: boolean\n}\n\nexport type DismissableLayerEmits = {\n  /**\n   * Event handler called when the escape key is down.\n   * Can be prevented.\n   */\n  escapeKeyDown: [event: KeyboardEvent]\n  /**\n   * Event handler called when a `pointerdown` event happens outside of the `DismissableLayer`.\n   * Can be prevented.\n   */\n  pointerDownOutside: [event: PointerDownOutsideEvent]\n  /**\n   * Event handler called when the focus moves outside of the `DismissableLayer`.\n   * Can be prevented.\n   */\n  focusOutside: [ event: FocusOutsideEvent]\n  /**\n   * Event handler called when an interaction happens outside the `DismissableLayer`.\n   * Specifically, when a `pointerdown` event happens outside or focus moves outside of it.\n   * Can be prevented.\n   */\n  interactOutside: [ event: PointerDownOutsideEvent | FocusOutsideEvent]\n}\n\nexport type DismissableLayerPrivateEmits = DismissableLayerEmits & {\n  /**\n   * Handler called when the `DismissableLayer` should be dismissed\n   */\n  dismiss: []\n}\n\nexport const context = reactive({\n  layersRoot: new Set<HTMLElement>(),\n  layersWithOutsidePointerEventsDisabled: new Set<HTMLElement>(),\n  originalBodyPointerEvents: undefined as string | undefined,\n  branches: new Set<HTMLElement>(),\n})\n</script>\n\n<script setup lang=\"ts\">\nimport { onKeyStroke } from '@vueuse/core'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport {\n  useFocusOutside,\n  usePointerDownOutside,\n} from './utils'\n\nconst props = withDefaults(defineProps<DismissableLayerProps>(), {\n  disableOutsidePointerEvents: false,\n})\n\nconst emits = defineEmits<DismissableLayerPrivateEmits>()\n\nconst { forwardRef, currentElement: layerElement } = useForwardExpose()\nconst ownerDocument = computed(\n  () => layerElement.value?.ownerDocument ?? globalThis.document,\n)\n\nconst layers = computed(() => context.layersRoot)\n\nconst index = computed(() => {\n  return layerElement.value\n    ? Array.from(layers.value).indexOf(layerElement.value)\n    : -1\n})\n\nconst isBodyPointerEventsDisabled = computed(() => {\n  return context.layersWithOutsidePointerEventsDisabled.size > 0\n})\n\nconst isPointerEventsEnabled = computed(() => {\n  const localLayers = Array.from(layers.value)\n  const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1)\n  const highestLayerWithOutsidePointerEventsDisabledIndex = localLayers.indexOf(highestLayerWithOutsidePointerEventsDisabled)\n\n  return index.value >= highestLayerWithOutsidePointerEventsDisabledIndex\n})\n\nconst pointerDownOutside = usePointerDownOutside(async (event) => {\n  const isPointerDownOnBranch = [...context.branches].some(branch =>\n    branch?.contains(event.target as HTMLElement),\n  )\n\n  if (!isPointerEventsEnabled.value || isPointerDownOnBranch)\n    return\n  emits('pointerDownOutside', event)\n  emits('interactOutside', event)\n  await nextTick()\n  if (!event.defaultPrevented)\n    emits('dismiss')\n}, layerElement)\n\nconst focusOutside = useFocusOutside((event) => {\n  const isFocusInBranch = [...context.branches].some(branch =>\n    branch?.contains(event.target as HTMLElement),\n  )\n\n  if (isFocusInBranch)\n    return\n  emits('focusOutside', event)\n  emits('interactOutside', event)\n  if (!event.defaultPrevented)\n    emits('dismiss')\n}, layerElement)\n\nonKeyStroke('Escape', (event) => {\n  const isHighestLayer = index.value === layers.value.size - 1\n  if (!isHighestLayer)\n    return\n  emits('escapeKeyDown', event)\n  if (!event.defaultPrevented)\n    emits('dismiss')\n})\n\n// Use `watch` with explicit sources (instead of `watchEffect`) so this effect\n// only re-runs when `layerElement` or `disableOutsidePointerEvents` change.\n// Reading `context.layersWithOutsidePointerEventsDisabled.size` inside the\n// callback must NOT make it reactive: otherwise adding/removing any other\n// layer would re-run this effect and its cleanup could prematurely restore the\n// body's `pointer-events` while an ancestor layer is still open (#2674).\nwatch(\n  [layerElement, () => props.disableOutsidePointerEvents],\n  ([element, disableOutsidePointerEvents], _, onCleanup) => {\n    if (!element)\n      return\n    if (disableOutsidePointerEvents) {\n      if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n        context.originalBodyPointerEvents = ownerDocument.value.body.style.pointerEvents\n        ownerDocument.value.body.style.pointerEvents = 'none'\n      }\n      context.layersWithOutsidePointerEventsDisabled.add(element)\n\n      // Remove this layer from the set on cleanup (re-run via prop toggle, or\n      // unmount) and restore the body's `pointer-events` only once the last\n      // disabling layer is gone. Removing here — rather than relying solely on\n      // the unmount-only effect below — keeps the set accurate when\n      // `disableOutsidePointerEvents` toggles `true -> false` while still\n      // mounted (e.g. a modal Menu closing). Checking `size === 0` *after*\n      // deletion makes the restore independent of cleanup ordering (#2674).\n      onCleanup(() => {\n        context.layersWithOutsidePointerEventsDisabled.delete(element)\n        if (\n          context.layersWithOutsidePointerEventsDisabled.size === 0\n          && !isNullish(context.originalBodyPointerEvents)\n        ) {\n          ownerDocument.value.body.style.pointerEvents = context.originalBodyPointerEvents\n        }\n      })\n    }\n    layers.value.add(element)\n  },\n  { immediate: true },\n)\n\nwatchEffect((cleanupFn) => {\n  cleanupFn(() => {\n    if (!layerElement.value)\n      return\n    layers.value.delete(layerElement.value)\n    context.layersWithOutsidePointerEventsDisabled.delete(layerElement.value)\n  })\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    data-dismissable-layer\n    :style=\"{\n      pointerEvents: isBodyPointerEventsDisabled\n        ? isPointerEventsEnabled\n          ? 'auto'\n          : 'none'\n        : undefined,\n    }\"\n    @focus.capture=\"focusOutside.onFocusCapture\"\n    @blur.capture=\"focusOutside.onBlurCapture\"\n    @pointerdown.capture=\"pointerDownOutside.onPointerDownCapture\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type {\n  FocusOutsideEvent,\n  PointerDownOutsideEvent,\n} from './utils'\n\nimport type { PrimitiveProps } from '@/Primitive'\nimport {\n  computed,\n  nextTick,\n  reactive,\n  watch,\n  watchEffect,\n} from 'vue'\nimport { isNullish, useForwardExpose } from '@/shared'\n\nexport interface DismissableLayerProps extends PrimitiveProps {\n  /**\n   * When `true`, hover/focus/click interactions will be disabled on elements outside\n   * the `DismissableLayer`. Users will need to click twice on outside elements to\n   * interact with them: once to close the `DismissableLayer`, and again to trigger the element.\n   */\n  disableOutsidePointerEvents?: boolean\n}\n\nexport type DismissableLayerEmits = {\n  /**\n   * Event handler called when the escape key is down.\n   * Can be prevented.\n   */\n  escapeKeyDown: [event: KeyboardEvent]\n  /**\n   * Event handler called when a `pointerdown` event happens outside of the `DismissableLayer`.\n   * Can be prevented.\n   */\n  pointerDownOutside: [event: PointerDownOutsideEvent]\n  /**\n   * Event handler called when the focus moves outside of the `DismissableLayer`.\n   * Can be prevented.\n   */\n  focusOutside: [ event: FocusOutsideEvent]\n  /**\n   * Event handler called when an interaction happens outside the `DismissableLayer`.\n   * Specifically, when a `pointerdown` event happens outside or focus moves outside of it.\n   * Can be prevented.\n   */\n  interactOutside: [ event: PointerDownOutsideEvent | FocusOutsideEvent]\n}\n\nexport type DismissableLayerPrivateEmits = DismissableLayerEmits & {\n  /**\n   * Handler called when the `DismissableLayer` should be dismissed\n   */\n  dismiss: []\n}\n\nexport const context = reactive({\n  layersRoot: new Set<HTMLElement>(),\n  layersWithOutsidePointerEventsDisabled: new Set<HTMLElement>(),\n  originalBodyPointerEvents: undefined as string | undefined,\n  branches: new Set<HTMLElement>(),\n})\n</script>\n\n<script setup lang=\"ts\">\nimport { onKeyStroke } from '@vueuse/core'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport {\n  useFocusOutside,\n  usePointerDownOutside,\n} from './utils'\n\nconst props = withDefaults(defineProps<DismissableLayerProps>(), {\n  disableOutsidePointerEvents: false,\n})\n\nconst emits = defineEmits<DismissableLayerPrivateEmits>()\n\nconst { forwardRef, currentElement: layerElement } = useForwardExpose()\nconst ownerDocument = computed(\n  () => layerElement.value?.ownerDocument ?? globalThis.document,\n)\n\nconst layers = computed(() => context.layersRoot)\n\nconst index = computed(() => {\n  return layerElement.value\n    ? Array.from(layers.value).indexOf(layerElement.value)\n    : -1\n})\n\nconst isBodyPointerEventsDisabled = computed(() => {\n  return context.layersWithOutsidePointerEventsDisabled.size > 0\n})\n\nconst isPointerEventsEnabled = computed(() => {\n  const localLayers = Array.from(layers.value)\n  const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1)\n  const highestLayerWithOutsidePointerEventsDisabledIndex = localLayers.indexOf(highestLayerWithOutsidePointerEventsDisabled)\n\n  return index.value >= highestLayerWithOutsidePointerEventsDisabledIndex\n})\n\nconst pointerDownOutside = usePointerDownOutside(async (event) => {\n  const isPointerDownOnBranch = [...context.branches].some(branch =>\n    branch?.contains(event.target as HTMLElement),\n  )\n\n  if (!isPointerEventsEnabled.value || isPointerDownOnBranch)\n    return\n  emits('pointerDownOutside', event)\n  emits('interactOutside', event)\n  await nextTick()\n  if (!event.defaultPrevented)\n    emits('dismiss')\n}, layerElement)\n\nconst focusOutside = useFocusOutside((event) => {\n  const isFocusInBranch = [...context.branches].some(branch =>\n    branch?.contains(event.target as HTMLElement),\n  )\n\n  if (isFocusInBranch)\n    return\n  emits('focusOutside', event)\n  emits('interactOutside', event)\n  if (!event.defaultPrevented)\n    emits('dismiss')\n}, layerElement)\n\nonKeyStroke('Escape', (event) => {\n  const isHighestLayer = index.value === layers.value.size - 1\n  if (!isHighestLayer)\n    return\n  emits('escapeKeyDown', event)\n  if (!event.defaultPrevented)\n    emits('dismiss')\n})\n\n// Use `watch` with explicit sources (instead of `watchEffect`) so this effect\n// only re-runs when `layerElement` or `disableOutsidePointerEvents` change.\n// Reading `context.layersWithOutsidePointerEventsDisabled.size` inside the\n// callback must NOT make it reactive: otherwise adding/removing any other\n// layer would re-run this effect and its cleanup could prematurely restore the\n// body's `pointer-events` while an ancestor layer is still open (#2674).\nwatch(\n  [layerElement, () => props.disableOutsidePointerEvents],\n  ([element, disableOutsidePointerEvents], _, onCleanup) => {\n    if (!element)\n      return\n    if (disableOutsidePointerEvents) {\n      if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n        context.originalBodyPointerEvents = ownerDocument.value.body.style.pointerEvents\n        ownerDocument.value.body.style.pointerEvents = 'none'\n      }\n      context.layersWithOutsidePointerEventsDisabled.add(element)\n\n      // Remove this layer from the set on cleanup (re-run via prop toggle, or\n      // unmount) and restore the body's `pointer-events` only once the last\n      // disabling layer is gone. Removing here — rather than relying solely on\n      // the unmount-only effect below — keeps the set accurate when\n      // `disableOutsidePointerEvents` toggles `true -> false` while still\n      // mounted (e.g. a modal Menu closing). Checking `size === 0` *after*\n      // deletion makes the restore independent of cleanup ordering (#2674).\n      onCleanup(() => {\n        context.layersWithOutsidePointerEventsDisabled.delete(element)\n        if (\n          context.layersWithOutsidePointerEventsDisabled.size === 0\n          && !isNullish(context.originalBodyPointerEvents)\n        ) {\n          ownerDocument.value.body.style.pointerEvents = context.originalBodyPointerEvents\n        }\n      })\n    }\n    layers.value.add(element)\n  },\n  { immediate: true },\n)\n\nwatchEffect((cleanupFn) => {\n  cleanupFn(() => {\n    if (!layerElement.value)\n      return\n    layers.value.delete(layerElement.value)\n    context.layersWithOutsidePointerEventsDisabled.delete(layerElement.value)\n  })\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    data-dismissable-layer\n    :style=\"{\n      pointerEvents: isBodyPointerEventsDisabled\n        ? isPointerEventsEnabled\n          ? 'auto'\n          : 'none'\n        : undefined,\n    }\"\n    @focus.capture=\"focusOutside.onFocusCapture\"\n    @blur.capture=\"focusOutside.onBlurCapture\"\n    @pointerdown.capture=\"pointerDownOutside.onPointerDownCapture\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DismissableLayerBranchProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted, onUnmounted } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { context } from './DismissableLayer.vue'\n\nconst props = defineProps<DismissableLayerBranchProps>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\nonMounted(() => {\n  context.branches.add(currentElement.value)\n})\nonUnmounted(() => {\n  context.branches.delete(currentElement.value)\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    v-bind=\"props\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DismissableLayerBranchProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted, onUnmounted } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { context } from './DismissableLayer.vue'\n\nconst props = defineProps<DismissableLayerBranchProps>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\nonMounted(() => {\n  context.branches.add(currentElement.value)\n})\nonUnmounted(() => {\n  context.branches.delete(currentElement.value)\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    v-bind=\"props\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","import { createGlobalState } from '@vueuse/core'\nimport { ref } from 'vue'\n\ninterface FocusScopeAPI {\n  paused: boolean\n  pause: () => void\n  resume: () => void\n}\n\nconst useFocusStackState = createGlobalState(() => {\n  const stack = ref<FocusScopeAPI[]>([])\n  return stack\n})\n\nexport function createFocusScopesStack() {\n  /** A stack of focus scopes, with the active one at the top */\n  const stack = useFocusStackState()\n\n  return {\n    add(focusScope: FocusScopeAPI) {\n      // pause the currently active focus scope (at the top of the stack)\n      const activeFocusScope = stack.value[0]\n      if (focusScope !== activeFocusScope)\n        activeFocusScope?.pause()\n\n      // remove in case it already exists (because we'll re-add it at the top of the stack)\n      stack.value = arrayRemove(stack.value, focusScope)\n      stack.value.unshift(focusScope)\n    },\n\n    remove(focusScope: FocusScopeAPI) {\n      stack.value = arrayRemove(stack.value, focusScope)\n      stack.value[0]?.resume()\n    },\n  }\n}\n\nexport function arrayRemove<T>(array: T[], item: T) {\n  const updatedArray = [...array]\n  const index = updatedArray.indexOf(item)\n  if (index !== -1)\n    updatedArray.splice(index, 1)\n\n  return updatedArray\n}\n\nexport function removeLinks(items: HTMLElement[]) {\n  return items.filter(item => item.tagName !== 'A')\n}\n","import { getActiveElement } from '@/shared'\n\nexport const AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount'\nexport const AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount'\nexport const EVENT_OPTIONS = { bubbles: false, cancelable: true }\n\ntype FocusableTarget = HTMLElement | { focus: () => void }\n\n/**\n * Attempts focusing the first element in a list of candidates.\n * Stops when focus has actually moved.\n */\nexport function focusFirst(candidates: HTMLElement[], { select = false } = {}) {\n  const previouslyFocusedElement = getActiveElement()\n  for (const candidate of candidates) {\n    focus(candidate, { select })\n    if (getActiveElement() !== previouslyFocusedElement)\n      return true\n  }\n}\n\n/**\n * Returns the first and last tabbable elements inside a container.\n */\nexport function getTabbableEdges(container: HTMLElement) {\n  const candidates = getTabbableCandidates(container)\n  const first = findVisible(candidates, container)\n  const last = findVisible(candidates.reverse(), container)\n  return [first, last] as const\n}\n\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */\nexport function getTabbableCandidates(container: HTMLElement) {\n  const nodes: HTMLElement[] = []\n  const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n    acceptNode: (node: any) => {\n      const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden'\n      if (node.disabled || node.hidden || isHiddenInput)\n        return NodeFilter.FILTER_SKIP\n      // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n      // runtime's understanding of tabbability, so this automatically accounts\n      // for any kind of element that could be tabbed to.\n      return node.tabIndex >= 0\n        ? NodeFilter.FILTER_ACCEPT\n        : NodeFilter.FILTER_SKIP\n    },\n  })\n  while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement)\n  // we do not take into account the order of nodes with positive `tabIndex` as it\n  // hinders accessibility to have tab order different from visual order.\n  return nodes\n}\n\n/**\n * Returns the first visible element in a list.\n * NOTE: Only checks visibility up to the `container`.\n */\nexport function findVisible(elements: HTMLElement[], container: HTMLElement) {\n  for (const element of elements) {\n    // we stop checking if it's hidden at the `container` level (excluding)\n    if (!isHidden(element, { upTo: container }))\n      return element\n  }\n}\n\nexport function isHidden(node: HTMLElement, { upTo }: { upTo?: HTMLElement }) {\n  if (getComputedStyle(node).visibility === 'hidden')\n    return true\n  while (node) {\n    // we stop at `upTo` (excluding it)\n    if (upTo !== undefined && node === upTo)\n      return false\n    if (getComputedStyle(node).display === 'none')\n      return true\n    node = node.parentElement as HTMLElement\n  }\n  return false\n}\n\nexport function isSelectableInput(\n  element: any,\n): element is FocusableTarget & { select: () => void } {\n  return element instanceof HTMLInputElement && 'select' in element\n}\n\nexport function focus(\n  element?: FocusableTarget | null,\n  { select = false } = {},\n) {\n  // only focus if that element is focusable\n  if (element && element.focus) {\n    const previouslyFocusedElement = getActiveElement()\n    // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users\n    element.focus({ preventScroll: true })\n    // only select if its not the same element, it supports selection and we need to select\n    if (\n      element !== previouslyFocusedElement\n      && isSelectableInput(element)\n      && select\n    ) {\n      element.select()\n    }\n  }\n}\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { getActiveElement, useForwardExpose } from '@/shared'\n\nexport type FocusScopeEmits = {\n  /**\n   * Event handler called when auto-focusing on mount.\n   * Can be prevented.\n   */\n  mountAutoFocus: [event: Event]\n\n  /**\n   * Event handler called when auto-focusing on unmount.\n   * Can be prevented.\n   */\n  unmountAutoFocus: [event: Event]\n}\n\nexport interface FocusScopeProps extends PrimitiveProps {\n  /**\n   * When `true`, tabbing from last item will focus first tabbable\n   * and shift+tab from first item will focus last tababble.\n   * @defaultValue false\n   */\n  loop?: boolean\n\n  /**\n   * When `true`, focus cannot escape the focus scope via keyboard,\n   * pointer, or a programmatic focus.\n   * @defaultValue false\n   */\n  trapped?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { isClient } from '@vueuse/shared'\nimport { nextTick, reactive, ref, watchEffect } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { createFocusScopesStack } from './stack'\nimport {\n  AUTOFOCUS_ON_MOUNT,\n  AUTOFOCUS_ON_UNMOUNT,\n  EVENT_OPTIONS,\n  focus,\n  focusFirst,\n  getTabbableCandidates,\n  getTabbableEdges,\n} from './utils'\n\nconst props = withDefaults(defineProps<FocusScopeProps>(), {\n  loop: false,\n  trapped: false,\n})\nconst emits = defineEmits<FocusScopeEmits>()\n\nconst { currentRef, currentElement } = useForwardExpose()\nconst lastFocusedElementRef = ref<HTMLElement | null>(null)\nconst focusScopesStack = createFocusScopesStack()\n\nconst focusScope = reactive({\n  paused: false,\n  pause() {\n    this.paused = true\n  },\n  resume() {\n    this.paused = false\n  },\n})\n\nwatchEffect((cleanupFn) => {\n  if (!isClient)\n    return\n  const container = currentElement.value\n  if (!props.trapped)\n    return\n\n  function handleFocusIn(event: FocusEvent) {\n    if (focusScope.paused || !container)\n      return\n    const target = event.target as HTMLElement | null\n    if (container.contains(target))\n      lastFocusedElementRef.value = target\n    else focus(lastFocusedElementRef.value, { select: true })\n  }\n\n  function handleFocusOut(event: FocusEvent) {\n    if (focusScope.paused || !container)\n      return\n    const relatedTarget = event.relatedTarget as HTMLElement | null\n\n    // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases:\n    //\n    // 1. When the user switches app/tabs/windows/the browser itself loses focus.\n    // 2. In Google Chrome, when the focused element is removed from the DOM.\n    //\n    // We let the browser do its thing here because:\n    //\n    // 1. The browser already keeps a memory of what's focused for when the page gets refocused.\n    // 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it\n    //    throws the CPU to 100%, so we avoid doing anything for this reason here too.\n    if (relatedTarget === null)\n      return\n\n    // If the focus has moved to an actual legitimate element (`relatedTarget !== null`)\n    // that is outside the container, we move focus to the last valid focused element inside.\n    if (!container.contains(relatedTarget))\n      focus(lastFocusedElementRef.value, { select: true })\n  }\n\n  // When the focused element gets removed from the DOM, browsers move focus\n  // back to the document.body. In this case, we move focus to the container\n  // to keep focus trapped correctly.\n  // -- related: https://github.com/unovue/reka-ui/issues/518\n  // Reka UI tentative solution:\n  // instead of leaning on document.activeElement, we use lastFocusedElementRef.value to check\n  // if the element still exist inside the container,\n  // if not then we focus to the container\n  function handleMutations(mutations: MutationRecord[]) {\n    const lastFocusedElement = lastFocusedElementRef.value\n\n    // Mutation may be triggered by something unrelated to focus, e.g. class is set on an element\n    // so we first check if we even have a previously focused element.\n    if (lastFocusedElement === null) {\n      return\n    }\n\n    // Ensure mutations removed nodes from the DOM at all.\n    const anyNodesRemoved = mutations.some(m => m.removedNodes.length > 0)\n    if (!anyNodesRemoved) {\n      return\n    }\n\n    const isLastFocusedElementExist = container.contains(lastFocusedElement)\n    if (!isLastFocusedElementExist)\n      focus(container)\n  }\n\n  document.addEventListener('focusin', handleFocusIn)\n  document.addEventListener('focusout', handleFocusOut)\n  const mutationObserver = new MutationObserver(handleMutations)\n  if (container)\n    mutationObserver.observe(container, { childList: true, subtree: true })\n\n  cleanupFn(() => {\n    document.removeEventListener('focusin', handleFocusIn)\n    document.removeEventListener('focusout', handleFocusOut)\n    mutationObserver.disconnect()\n  })\n})\n\nwatchEffect(async (cleanupFn) => {\n  const container = currentElement.value\n\n  await nextTick()\n  if (!container)\n    return\n  focusScopesStack.add(focusScope)\n  const previouslyFocusedElement = getActiveElement() as HTMLElement | null\n  const hasFocusedCandidate = container.contains(previouslyFocusedElement)\n\n  if (!hasFocusedCandidate) {\n    const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS)\n    container.addEventListener(AUTOFOCUS_ON_MOUNT, (ev: Event) =>\n      emits('mountAutoFocus', ev))\n    container.dispatchEvent(mountEvent)\n\n    if (!mountEvent.defaultPrevented) {\n      focusFirst(getTabbableCandidates(container), {\n        select: true,\n      })\n      if (getActiveElement() === previouslyFocusedElement)\n        focus(container)\n    }\n  }\n\n  cleanupFn(() => {\n    container.removeEventListener(AUTOFOCUS_ON_MOUNT, (ev: Event) =>\n      emits('mountAutoFocus', ev))\n\n    const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS)\n    const unmountEventHandler = (ev: Event) => {\n      emits('unmountAutoFocus', ev)\n    }\n    container.addEventListener(AUTOFOCUS_ON_UNMOUNT, unmountEventHandler)\n    container.dispatchEvent(unmountEvent)\n\n    // Signal that blur events fired below are system-initiated (focus trap\n    // cleanup), not user-initiated. Consumers can use this to skip validation.\n    container.setAttribute('data-focus-scope-unmounting', '')\n\n    setTimeout(() => {\n      if (!unmountEvent.defaultPrevented)\n        focus(previouslyFocusedElement ?? document.body, { select: true })\n\n      // we need to remove the listener after we `dispatchEvent`\n      container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, unmountEventHandler)\n\n      focusScopesStack.remove(focusScope)\n      container.removeAttribute('data-focus-scope-unmounting')\n    }, 0)\n  })\n})\n\nfunction handleKeyDown(event: KeyboardEvent) {\n  if (!props.loop && !props.trapped)\n    return\n  if (focusScope.paused)\n    return\n\n  const isTabKey\n    = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey\n  const focusedElement = getActiveElement() as HTMLElement | null\n\n  if (isTabKey && focusedElement) {\n    const container = event.currentTarget as HTMLElement\n    const [first, last] = getTabbableEdges(container)\n    const hasTabbableElementsInside = first && last\n\n    // we can only wrap focus if we have tabbable edges\n    if (!hasTabbableElementsInside) {\n      if (focusedElement === container)\n        event.preventDefault()\n    }\n    else {\n      if (!event.shiftKey && focusedElement === last) {\n        event.preventDefault()\n        if (props.loop)\n          focus(first, { select: true })\n      }\n      else if (event.shiftKey && focusedElement === first) {\n        event.preventDefault()\n        if (props.loop)\n          focus(last, { select: true })\n      }\n    }\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"currentRef\"\n    tabindex=\"-1\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    @keydown=\"handleKeyDown\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { getActiveElement, useForwardExpose } from '@/shared'\n\nexport type FocusScopeEmits = {\n  /**\n   * Event handler called when auto-focusing on mount.\n   * Can be prevented.\n   */\n  mountAutoFocus: [event: Event]\n\n  /**\n   * Event handler called when auto-focusing on unmount.\n   * Can be prevented.\n   */\n  unmountAutoFocus: [event: Event]\n}\n\nexport interface FocusScopeProps extends PrimitiveProps {\n  /**\n   * When `true`, tabbing from last item will focus first tabbable\n   * and shift+tab from first item will focus last tababble.\n   * @defaultValue false\n   */\n  loop?: boolean\n\n  /**\n   * When `true`, focus cannot escape the focus scope via keyboard,\n   * pointer, or a programmatic focus.\n   * @defaultValue false\n   */\n  trapped?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { isClient } from '@vueuse/shared'\nimport { nextTick, reactive, ref, watchEffect } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { createFocusScopesStack } from './stack'\nimport {\n  AUTOFOCUS_ON_MOUNT,\n  AUTOFOCUS_ON_UNMOUNT,\n  EVENT_OPTIONS,\n  focus,\n  focusFirst,\n  getTabbableCandidates,\n  getTabbableEdges,\n} from './utils'\n\nconst props = withDefaults(defineProps<FocusScopeProps>(), {\n  loop: false,\n  trapped: false,\n})\nconst emits = defineEmits<FocusScopeEmits>()\n\nconst { currentRef, currentElement } = useForwardExpose()\nconst lastFocusedElementRef = ref<HTMLElement | null>(null)\nconst focusScopesStack = createFocusScopesStack()\n\nconst focusScope = reactive({\n  paused: false,\n  pause() {\n    this.paused = true\n  },\n  resume() {\n    this.paused = false\n  },\n})\n\nwatchEffect((cleanupFn) => {\n  if (!isClient)\n    return\n  const container = currentElement.value\n  if (!props.trapped)\n    return\n\n  function handleFocusIn(event: FocusEvent) {\n    if (focusScope.paused || !container)\n      return\n    const target = event.target as HTMLElement | null\n    if (container.contains(target))\n      lastFocusedElementRef.value = target\n    else focus(lastFocusedElementRef.value, { select: true })\n  }\n\n  function handleFocusOut(event: FocusEvent) {\n    if (focusScope.paused || !container)\n      return\n    const relatedTarget = event.relatedTarget as HTMLElement | null\n\n    // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases:\n    //\n    // 1. When the user switches app/tabs/windows/the browser itself loses focus.\n    // 2. In Google Chrome, when the focused element is removed from the DOM.\n    //\n    // We let the browser do its thing here because:\n    //\n    // 1. The browser already keeps a memory of what's focused for when the page gets refocused.\n    // 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it\n    //    throws the CPU to 100%, so we avoid doing anything for this reason here too.\n    if (relatedTarget === null)\n      return\n\n    // If the focus has moved to an actual legitimate element (`relatedTarget !== null`)\n    // that is outside the container, we move focus to the last valid focused element inside.\n    if (!container.contains(relatedTarget))\n      focus(lastFocusedElementRef.value, { select: true })\n  }\n\n  // When the focused element gets removed from the DOM, browsers move focus\n  // back to the document.body. In this case, we move focus to the container\n  // to keep focus trapped correctly.\n  // -- related: https://github.com/unovue/reka-ui/issues/518\n  // Reka UI tentative solution:\n  // instead of leaning on document.activeElement, we use lastFocusedElementRef.value to check\n  // if the element still exist inside the container,\n  // if not then we focus to the container\n  function handleMutations(mutations: MutationRecord[]) {\n    const lastFocusedElement = lastFocusedElementRef.value\n\n    // Mutation may be triggered by something unrelated to focus, e.g. class is set on an element\n    // so we first check if we even have a previously focused element.\n    if (lastFocusedElement === null) {\n      return\n    }\n\n    // Ensure mutations removed nodes from the DOM at all.\n    const anyNodesRemoved = mutations.some(m => m.removedNodes.length > 0)\n    if (!anyNodesRemoved) {\n      return\n    }\n\n    const isLastFocusedElementExist = container.contains(lastFocusedElement)\n    if (!isLastFocusedElementExist)\n      focus(container)\n  }\n\n  document.addEventListener('focusin', handleFocusIn)\n  document.addEventListener('focusout', handleFocusOut)\n  const mutationObserver = new MutationObserver(handleMutations)\n  if (container)\n    mutationObserver.observe(container, { childList: true, subtree: true })\n\n  cleanupFn(() => {\n    document.removeEventListener('focusin', handleFocusIn)\n    document.removeEventListener('focusout', handleFocusOut)\n    mutationObserver.disconnect()\n  })\n})\n\nwatchEffect(async (cleanupFn) => {\n  const container = currentElement.value\n\n  await nextTick()\n  if (!container)\n    return\n  focusScopesStack.add(focusScope)\n  const previouslyFocusedElement = getActiveElement() as HTMLElement | null\n  const hasFocusedCandidate = container.contains(previouslyFocusedElement)\n\n  if (!hasFocusedCandidate) {\n    const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS)\n    container.addEventListener(AUTOFOCUS_ON_MOUNT, (ev: Event) =>\n      emits('mountAutoFocus', ev))\n    container.dispatchEvent(mountEvent)\n\n    if (!mountEvent.defaultPrevented) {\n      focusFirst(getTabbableCandidates(container), {\n        select: true,\n      })\n      if (getActiveElement() === previouslyFocusedElement)\n        focus(container)\n    }\n  }\n\n  cleanupFn(() => {\n    container.removeEventListener(AUTOFOCUS_ON_MOUNT, (ev: Event) =>\n      emits('mountAutoFocus', ev))\n\n    const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS)\n    const unmountEventHandler = (ev: Event) => {\n      emits('unmountAutoFocus', ev)\n    }\n    container.addEventListener(AUTOFOCUS_ON_UNMOUNT, unmountEventHandler)\n    container.dispatchEvent(unmountEvent)\n\n    // Signal that blur events fired below are system-initiated (focus trap\n    // cleanup), not user-initiated. Consumers can use this to skip validation.\n    container.setAttribute('data-focus-scope-unmounting', '')\n\n    setTimeout(() => {\n      if (!unmountEvent.defaultPrevented)\n        focus(previouslyFocusedElement ?? document.body, { select: true })\n\n      // we need to remove the listener after we `dispatchEvent`\n      container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, unmountEventHandler)\n\n      focusScopesStack.remove(focusScope)\n      container.removeAttribute('data-focus-scope-unmounting')\n    }, 0)\n  })\n})\n\nfunction handleKeyDown(event: KeyboardEvent) {\n  if (!props.loop && !props.trapped)\n    return\n  if (focusScope.paused)\n    return\n\n  const isTabKey\n    = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey\n  const focusedElement = getActiveElement() as HTMLElement | null\n\n  if (isTabKey && focusedElement) {\n    const container = event.currentTarget as HTMLElement\n    const [first, last] = getTabbableEdges(container)\n    const hasTabbableElementsInside = first && last\n\n    // we can only wrap focus if we have tabbable edges\n    if (!hasTabbableElementsInside) {\n      if (focusedElement === container)\n        event.preventDefault()\n    }\n    else {\n      if (!event.shiftKey && focusedElement === last) {\n        event.preventDefault()\n        if (props.loop)\n          focus(first, { select: true })\n      }\n      else if (event.shiftKey && focusedElement === first) {\n        event.preventDefault()\n        if (props.loop)\n          focus(last, { select: true })\n      }\n    }\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"currentRef\"\n    tabindex=\"-1\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    @keydown=\"handleKeyDown\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","import { getActiveElement } from '@/shared'\n\nexport type CheckedState = boolean | 'indeterminate'\nexport type Direction = 'ltr' | 'rtl'\n\nexport const ITEM_NAME = 'MenuItem'\nexport const ITEM_SELECT = 'menu.itemSelect'\nexport const SELECTION_KEYS = ['Enter', ' ']\nexport const FIRST_KEYS = ['ArrowDown', 'PageUp', 'Home']\nexport const LAST_KEYS = ['ArrowUp', 'PageDown', 'End']\nexport const FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS]\nexport const SUB_OPEN_KEYS: Record<Direction, string[]> = {\n  ltr: [...SELECTION_KEYS, 'ArrowRight'],\n  rtl: [...SELECTION_KEYS, 'ArrowLeft'],\n}\nexport const SUB_CLOSE_KEYS: Record<Direction, string[]> = {\n  ltr: ['ArrowLeft'],\n  rtl: ['ArrowRight'],\n}\n\nexport function getOpenState(open: boolean) {\n  return open ? 'open' : 'closed'\n}\n\nexport function isIndeterminate(\n  checked?: CheckedState,\n): checked is 'indeterminate' {\n  return checked === 'indeterminate'\n}\n\nexport function getCheckedState(checked: CheckedState) {\n  return isIndeterminate(checked)\n    ? 'indeterminate'\n    : checked\n      ? 'checked'\n      : 'unchecked'\n}\n\nexport function focusFirst(candidates: HTMLElement[]) {\n  const PREVIOUSLY_FOCUSED_ELEMENT = getActiveElement()\n  for (const candidate of candidates) {\n    // if focus is already where we want to go, we don't want to keep going through the candidates\n    if (candidate === PREVIOUSLY_FOCUSED_ELEMENT)\n      return\n    candidate.focus()\n    if (getActiveElement() !== PREVIOUSLY_FOCUSED_ELEMENT)\n      return\n  }\n}\n\nexport interface Point {\n  x: number\n  y: number\n}\nexport type Polygon = Point[]\nexport type Side = 'left' | 'right'\nexport interface GraceIntent {\n  area: Polygon\n  side: Side\n}\n\n// Determine if a point is inside of a polygon.\n// Based on https://github.com/substack/point-in-polygon\nexport function isPointInPolygon(point: Point, polygon: Polygon) {\n  const { x, y } = point\n  let inside = false\n  for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n    const xi = polygon[i].x\n    const yi = polygon[i].y\n    const xj = polygon[j].x\n    const yj = polygon[j].y\n\n    const intersect = ((yi > y) !== (yj > y)) && (x < (xj - xi) * (y - yi) / (yj - yi) + xi)\n    if (intersect)\n      inside = !inside\n  }\n\n  return inside\n}\n\nexport function isPointerInGraceArea(event: PointerEvent, area?: Polygon) {\n  if (!area)\n    return false\n  const cursorPos = { x: event.clientX, y: event.clientY }\n  return isPointInPolygon(cursorPos, area)\n}\n\nexport function isMouseEvent(event: PointerEvent) {\n  return event.pointerType === 'mouse'\n}\n","import type { Ref } from 'vue'\nimport { onMounted } from 'vue'\n\nconst DEFAULT_TITLE_NAME = 'DialogTitle'\nconst DEFAULT_CONTENT_NAME = 'DialogContent'\n\nexport type WarningProps = {\n  titleName?: string\n  contentName?: string\n  componentLink?: string\n  titleId: string\n  descriptionId: string\n  contentElement: Ref<HTMLElement | undefined>\n}\n\nexport function useWarning({\n  titleName = DEFAULT_TITLE_NAME,\n  contentName = DEFAULT_CONTENT_NAME,\n  componentLink = 'dialog.html#title',\n  titleId,\n  descriptionId,\n  contentElement,\n}: WarningProps) {\n  const TITLE_MESSAGE = `Warning: \\`${contentName}\\` requires a \\`${titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://www.reka-ui.com/docs/components/${componentLink}`\n\n  const DESCRIPTION_MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby=\"undefined\"\\` for ${contentName}.`\n\n  onMounted(() => {\n    const hasTitle = document.getElementById(titleId)\n    if (!hasTitle)\n      console.warn(TITLE_MESSAGE)\n\n    const describedById = contentElement.value?.getAttribute('aria-describedby')\n    // if we have an id and the user hasn't set aria-describedby=\"undefined\"\n    if (descriptionId && describedById) {\n      const hasDescription = document.getElementById(descriptionId)\n      if (!hasDescription)\n        console.warn(DESCRIPTION_MESSAGE)\n    }\n  })\n}\n","<script lang=\"ts\">\nimport type {\n  DismissableLayerEmits,\n  DismissableLayerProps,\n} from '@/DismissableLayer'\nimport { getActiveElement, useForwardExpose, useId } from '@/shared'\n\nexport type DialogContentImplEmits = DismissableLayerEmits & {\n  /**\n   * Event handler called when auto-focusing on open.\n   * Can be prevented.\n   */\n  openAutoFocus: [event: Event]\n  /**\n   * Event handler called when auto-focusing on close.\n   * Can be prevented.\n   */\n  closeAutoFocus: [event: Event]\n}\n\nexport interface DialogContentImplProps extends DismissableLayerProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling transntion with Vue native transition or other animation libraries.\n   */\n  forceMount?: boolean\n  /**\n   * When `true`, focus cannot escape the `Content` via keyboard,\n   * pointer, or a programmatic focus.\n   * @defaultValue false\n   */\n  trapFocus?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted } from 'vue'\nimport { DismissableLayer } from '@/DismissableLayer'\nimport { FocusScope } from '@/FocusScope'\nimport { getOpenState } from '@/Menu/utils'\nimport { injectDialogRootContext } from './DialogRoot.vue'\nimport { useWarning } from './utils'\n\nconst props = defineProps<DialogContentImplProps>()\nconst emits = defineEmits<DialogContentImplEmits>()\n\nconst rootContext = injectDialogRootContext()\nconst { forwardRef, currentElement: contentElement } = useForwardExpose()\n\nrootContext.titleId ||= useId(undefined, 'reka-dialog-title')\nrootContext.descriptionId ||= useId(undefined, 'reka-dialog-description')\n\nonMounted(() => {\n  rootContext.contentElement = contentElement\n\n  // Preserve the `DialogTrigger` element in case it was triggered programmatically\n  if (getActiveElement() !== document.body)\n    rootContext.triggerElement.value = getActiveElement() as HTMLElement\n})\n\nif (process.env.NODE_ENV !== 'production') {\n  useWarning({\n    titleName: 'DialogTitle',\n    contentName: 'DialogContent',\n    componentLink: 'dialog.html#title',\n    titleId: rootContext.titleId,\n    descriptionId: rootContext.descriptionId,\n    contentElement,\n  })\n}\n</script>\n\n<template>\n  <FocusScope\n    as-child\n    loop\n    :trapped=\"props.trapFocus\"\n    @mount-auto-focus=\"emits('openAutoFocus', $event)\"\n    @unmount-auto-focus=\"emits('closeAutoFocus', $event)\"\n  >\n    <DismissableLayer\n      :id=\"rootContext.contentId\"\n      :ref=\"forwardRef\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n      role=\"dialog\"\n      :aria-describedby=\"rootContext.descriptionId\"\n      :aria-labelledby=\"rootContext.titleId\"\n      :data-state=\"getOpenState(rootContext.open.value)\"\n      v-bind=\"$attrs\"\n      @dismiss=\"rootContext.onOpenChange(false)\"\n      @escape-key-down=\"emits('escapeKeyDown', $event)\"\n      @focus-outside=\"emits('focusOutside', $event)\"\n      @interact-outside=\"emits('interactOutside', $event)\"\n      @pointer-down-outside=\"emits('pointerDownOutside', $event)\"\n    >\n      <slot />\n    </DismissableLayer>\n  </FocusScope>\n</template>\n","<script lang=\"ts\">\nimport type {\n  DismissableLayerEmits,\n  DismissableLayerProps,\n} from '@/DismissableLayer'\nimport { getActiveElement, useForwardExpose, useId } from '@/shared'\n\nexport type DialogContentImplEmits = DismissableLayerEmits & {\n  /**\n   * Event handler called when auto-focusing on open.\n   * Can be prevented.\n   */\n  openAutoFocus: [event: Event]\n  /**\n   * Event handler called when auto-focusing on close.\n   * Can be prevented.\n   */\n  closeAutoFocus: [event: Event]\n}\n\nexport interface DialogContentImplProps extends DismissableLayerProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling transntion with Vue native transition or other animation libraries.\n   */\n  forceMount?: boolean\n  /**\n   * When `true`, focus cannot escape the `Content` via keyboard,\n   * pointer, or a programmatic focus.\n   * @defaultValue false\n   */\n  trapFocus?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted } from 'vue'\nimport { DismissableLayer } from '@/DismissableLayer'\nimport { FocusScope } from '@/FocusScope'\nimport { getOpenState } from '@/Menu/utils'\nimport { injectDialogRootContext } from './DialogRoot.vue'\nimport { useWarning } from './utils'\n\nconst props = defineProps<DialogContentImplProps>()\nconst emits = defineEmits<DialogContentImplEmits>()\n\nconst rootContext = injectDialogRootContext()\nconst { forwardRef, currentElement: contentElement } = useForwardExpose()\n\nrootContext.titleId ||= useId(undefined, 'reka-dialog-title')\nrootContext.descriptionId ||= useId(undefined, 'reka-dialog-description')\n\nonMounted(() => {\n  rootContext.contentElement = contentElement\n\n  // Preserve the `DialogTrigger` element in case it was triggered programmatically\n  if (getActiveElement() !== document.body)\n    rootContext.triggerElement.value = getActiveElement() as HTMLElement\n})\n\nif (process.env.NODE_ENV !== 'production') {\n  useWarning({\n    titleName: 'DialogTitle',\n    contentName: 'DialogContent',\n    componentLink: 'dialog.html#title',\n    titleId: rootContext.titleId,\n    descriptionId: rootContext.descriptionId,\n    contentElement,\n  })\n}\n</script>\n\n<template>\n  <FocusScope\n    as-child\n    loop\n    :trapped=\"props.trapFocus\"\n    @mount-auto-focus=\"emits('openAutoFocus', $event)\"\n    @unmount-auto-focus=\"emits('closeAutoFocus', $event)\"\n  >\n    <DismissableLayer\n      :id=\"rootContext.contentId\"\n      :ref=\"forwardRef\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n      role=\"dialog\"\n      :aria-describedby=\"rootContext.descriptionId\"\n      :aria-labelledby=\"rootContext.titleId\"\n      :data-state=\"getOpenState(rootContext.open.value)\"\n      v-bind=\"$attrs\"\n      @dismiss=\"rootContext.onOpenChange(false)\"\n      @escape-key-down=\"emits('escapeKeyDown', $event)\"\n      @focus-outside=\"emits('focusOutside', $event)\"\n      @interact-outside=\"emits('interactOutside', $event)\"\n      @pointer-down-outside=\"emits('pointerDownOutside', $event)\"\n    >\n      <slot />\n    </DismissableLayer>\n  </FocusScope>\n</template>\n","<script setup lang=\"ts\">\nimport type { DialogContentImplEmits, DialogContentImplProps } from './DialogContentImpl.vue'\nimport { useEmitAsProps, useForwardExpose, useHideOthers } from '@/shared'\nimport DialogContentImpl from './DialogContentImpl.vue'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\nconst props = withDefaults(defineProps<DialogContentImplProps>(), {\n  disableOutsidePointerEvents: true,\n})\nconst emits = defineEmits<DialogContentImplEmits>()\n\nconst rootContext = injectDialogRootContext()\n\nconst emitsAsProps = useEmitAsProps(emits)\n\nconst { forwardRef, currentElement } = useForwardExpose()\nuseHideOthers(currentElement)\n</script>\n\n<template>\n  <DialogContentImpl\n    v-bind=\"{ ...props, ...emitsAsProps }\"\n    :ref=\"forwardRef\"\n    :trap-focus=\"rootContext.open.value\"\n    :disable-outside-pointer-events=\"props.disableOutsidePointerEvents\"\n    @close-auto-focus=\"\n      (event) => {\n        if (!event.defaultPrevented) {\n          event.preventDefault();\n          rootContext.triggerElement.value?.focus();\n        }\n      }\n    \"\n    @pointer-down-outside=\"\n      (event) => {\n        const originalEvent = event.detail.originalEvent;\n        const ctrlLeftClick\n          = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n        const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n        // If the event is a right-click, we shouldn't close because\n        // it is effectively as if we right-clicked the `Overlay`.\n        if (isRightClick) event.preventDefault();\n      }\n    \"\n    @focus-outside=\"\n      (event) => {\n        // When focus is trapped, a `focusout` event may still happen.\n        // We make sure we don't trigger our `onDismiss` in such case.\n        event.preventDefault();\n      }\n    \"\n  >\n    <slot />\n  </DialogContentImpl>\n</template>\n","<script setup lang=\"ts\">\nimport type { DialogContentImplEmits, DialogContentImplProps } from './DialogContentImpl.vue'\nimport { useEmitAsProps, useForwardExpose, useHideOthers } from '@/shared'\nimport DialogContentImpl from './DialogContentImpl.vue'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\nconst props = withDefaults(defineProps<DialogContentImplProps>(), {\n  disableOutsidePointerEvents: true,\n})\nconst emits = defineEmits<DialogContentImplEmits>()\n\nconst rootContext = injectDialogRootContext()\n\nconst emitsAsProps = useEmitAsProps(emits)\n\nconst { forwardRef, currentElement } = useForwardExpose()\nuseHideOthers(currentElement)\n</script>\n\n<template>\n  <DialogContentImpl\n    v-bind=\"{ ...props, ...emitsAsProps }\"\n    :ref=\"forwardRef\"\n    :trap-focus=\"rootContext.open.value\"\n    :disable-outside-pointer-events=\"props.disableOutsidePointerEvents\"\n    @close-auto-focus=\"\n      (event) => {\n        if (!event.defaultPrevented) {\n          event.preventDefault();\n          rootContext.triggerElement.value?.focus();\n        }\n      }\n    \"\n    @pointer-down-outside=\"\n      (event) => {\n        const originalEvent = event.detail.originalEvent;\n        const ctrlLeftClick\n          = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n        const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n        // If the event is a right-click, we shouldn't close because\n        // it is effectively as if we right-clicked the `Overlay`.\n        if (isRightClick) event.preventDefault();\n      }\n    \"\n    @focus-outside=\"\n      (event) => {\n        // When focus is trapped, a `focusout` event may still happen.\n        // We make sure we don't trigger our `onDismiss` in such case.\n        event.preventDefault();\n      }\n    \"\n  >\n    <slot />\n  </DialogContentImpl>\n</template>\n","<script setup lang=\"ts\">\nimport type { DialogContentImplEmits, DialogContentImplProps } from './DialogContentImpl.vue'\nimport { ref } from 'vue'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\nimport DialogContentImpl from './DialogContentImpl.vue'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\nconst props = defineProps<DialogContentImplProps>()\nconst emits = defineEmits<DialogContentImplEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n\nconst rootContext = injectDialogRootContext()\nconst hasInteractedOutsideRef = ref(false)\nconst hasPointerDownOutsideRef = ref(false)\n</script>\n\n<template>\n  <DialogContentImpl\n    v-bind=\"{ ...props, ...emitsAsProps }\"\n    :trap-focus=\"false\"\n    :disable-outside-pointer-events=\"false\"\n    @close-auto-focus=\"\n      (event) => {\n        if (!event.defaultPrevented) {\n          if (!hasInteractedOutsideRef) rootContext.triggerElement.value?.focus();\n          // Always prevent auto focus because we either focus manually or want user agent focus\n          event.preventDefault();\n        }\n\n        hasInteractedOutsideRef = false;\n        hasPointerDownOutsideRef = false;\n      }\n    \"\n    @interact-outside=\"(event) => {\n      if (!event.defaultPrevented) {\n        hasInteractedOutsideRef = true;\n        if (event.detail.originalEvent.type === 'pointerdown') {\n          hasPointerDownOutsideRef = true;\n        }\n      }\n\n      // Prevent dismissing when clicking the trigger.\n      // As the trigger is already setup to close, without doing so would\n      // cause it to close and immediately open.\n      const target = event.target as HTMLElement;\n      const targetIsTrigger = rootContext.triggerElement.value?.contains(target);\n      if (targetIsTrigger) event.preventDefault();\n\n      // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n      // we will get the pointer down outside event on the trigger, but then a subsequent\n      // focus outside event on the container, we ignore any focus outside event when we've\n      // already had a pointer down outside event.\n      if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef) {\n        event.preventDefault();\n      }\n    }\"\n  >\n    <slot />\n  </DialogContentImpl>\n</template>\n","<script setup lang=\"ts\">\nimport type { DialogContentImplEmits, DialogContentImplProps } from './DialogContentImpl.vue'\nimport { ref } from 'vue'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\nimport DialogContentImpl from './DialogContentImpl.vue'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\nconst props = defineProps<DialogContentImplProps>()\nconst emits = defineEmits<DialogContentImplEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n\nconst rootContext = injectDialogRootContext()\nconst hasInteractedOutsideRef = ref(false)\nconst hasPointerDownOutsideRef = ref(false)\n</script>\n\n<template>\n  <DialogContentImpl\n    v-bind=\"{ ...props, ...emitsAsProps }\"\n    :trap-focus=\"false\"\n    :disable-outside-pointer-events=\"false\"\n    @close-auto-focus=\"\n      (event) => {\n        if (!event.defaultPrevented) {\n          if (!hasInteractedOutsideRef) rootContext.triggerElement.value?.focus();\n          // Always prevent auto focus because we either focus manually or want user agent focus\n          event.preventDefault();\n        }\n\n        hasInteractedOutsideRef = false;\n        hasPointerDownOutsideRef = false;\n      }\n    \"\n    @interact-outside=\"(event) => {\n      if (!event.defaultPrevented) {\n        hasInteractedOutsideRef = true;\n        if (event.detail.originalEvent.type === 'pointerdown') {\n          hasPointerDownOutsideRef = true;\n        }\n      }\n\n      // Prevent dismissing when clicking the trigger.\n      // As the trigger is already setup to close, without doing so would\n      // cause it to close and immediately open.\n      const target = event.target as HTMLElement;\n      const targetIsTrigger = rootContext.triggerElement.value?.contains(target);\n      if (targetIsTrigger) event.preventDefault();\n\n      // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n      // we will get the pointer down outside event on the trigger, but then a subsequent\n      // focus outside event on the container, we ignore any focus outside event when we've\n      // already had a pointer down outside event.\n      if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef) {\n        event.preventDefault();\n      }\n    }\"\n  >\n    <slot />\n  </DialogContentImpl>\n</template>\n","<script lang=\"ts\">\nimport type {\n  DialogContentImplEmits,\n  DialogContentImplProps,\n} from './DialogContentImpl.vue'\n\nexport type DialogContentEmits = DialogContentImplEmits\n\nexport interface DialogContentProps extends Omit<DialogContentImplProps, 'trapFocus'> {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\nimport DialogContentModal from './DialogContentModal.vue'\nimport DialogContentNonModal from './DialogContentNonModal.vue'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\nconst props = withDefaults(defineProps<DialogContentProps>(), {\n  // Keep `undefined` (instead of Vue's boolean coercion to `false`) so the\n  // modal/non-modal child can apply its own default. This lets a modal\n  // `DialogContent` stay locked by default while still honoring an explicit\n  // `:disable-outside-pointer-events=\"false\"` (#2677).\n  disableOutsidePointerEvents: undefined,\n})\nconst emits = defineEmits<DialogContentEmits>()\n\nconst rootContext = injectDialogRootContext()\n\nconst emitsAsProps = useEmitAsProps(emits)\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <Presence :present=\"forceMount || rootContext.open.value\">\n    <DialogContentModal\n      v-if=\"rootContext.modal.value\"\n      :ref=\"forwardRef\"\n      v-bind=\"{ ...props, ...emitsAsProps, ...$attrs }\"\n    >\n      <slot />\n    </DialogContentModal>\n    <DialogContentNonModal\n      v-else\n      :ref=\"forwardRef\"\n      v-bind=\"{ ...props, ...emitsAsProps, ...$attrs }\"\n    >\n      <slot />\n    </DialogContentNonModal>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type {\n  DialogContentImplEmits,\n  DialogContentImplProps,\n} from './DialogContentImpl.vue'\n\nexport type DialogContentEmits = DialogContentImplEmits\n\nexport interface DialogContentProps extends Omit<DialogContentImplProps, 'trapFocus'> {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\nimport DialogContentModal from './DialogContentModal.vue'\nimport DialogContentNonModal from './DialogContentNonModal.vue'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\nconst props = withDefaults(defineProps<DialogContentProps>(), {\n  // Keep `undefined` (instead of Vue's boolean coercion to `false`) so the\n  // modal/non-modal child can apply its own default. This lets a modal\n  // `DialogContent` stay locked by default while still honoring an explicit\n  // `:disable-outside-pointer-events=\"false\"` (#2677).\n  disableOutsidePointerEvents: undefined,\n})\nconst emits = defineEmits<DialogContentEmits>()\n\nconst rootContext = injectDialogRootContext()\n\nconst emitsAsProps = useEmitAsProps(emits)\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <Presence :present=\"forceMount || rootContext.open.value\">\n    <DialogContentModal\n      v-if=\"rootContext.modal.value\"\n      :ref=\"forwardRef\"\n      v-bind=\"{ ...props, ...emitsAsProps, ...$attrs }\"\n    >\n      <slot />\n    </DialogContentModal>\n    <DialogContentNonModal\n      v-else\n      :ref=\"forwardRef\"\n      v-bind=\"{ ...props, ...emitsAsProps, ...$attrs }\"\n    >\n      <slot />\n    </DialogContentNonModal>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DialogDescriptionProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\nconst props = withDefaults(defineProps<DialogDescriptionProps>(), { as: 'p' })\n\nuseForwardExpose()\nconst rootContext = injectDialogRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"rootContext.descriptionId\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DialogDescriptionProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\nconst props = withDefaults(defineProps<DialogDescriptionProps>(), { as: 'p' })\n\nuseForwardExpose()\nconst rootContext = injectDialogRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"rootContext.descriptionId\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface DialogOverlayImplProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { useBodyScrollLock } from '@/shared/useBodyScrollLock'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\ndefineProps<DialogOverlayImplProps>()\nconst rootContext = injectDialogRootContext()\n\nuseBodyScrollLock(true)\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n    style=\"pointer-events: auto\"\n    @pointerdown.left.self.prevent\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface DialogOverlayImplProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { useBodyScrollLock } from '@/shared/useBodyScrollLock'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\ndefineProps<DialogOverlayImplProps>()\nconst rootContext = injectDialogRootContext()\n\nuseBodyScrollLock(true)\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n    style=\"pointer-events: auto\"\n    @pointerdown.left.self.prevent\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DialogOverlayImplProps } from './DialogOverlayImpl.vue'\nimport { useForwardExpose } from '@/shared'\nimport DialogOverlayImpl from './DialogOverlayImpl.vue'\n\nexport interface DialogOverlayProps extends DialogOverlayImplProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\ndefineProps<DialogOverlayProps>()\nconst rootContext = injectDialogRootContext()\n\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <Presence\n    v-if=\"rootContext?.modal.value\"\n    :present=\"forceMount || rootContext.open.value\"\n  >\n    <DialogOverlayImpl\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n    >\n      <slot />\n    </DialogOverlayImpl>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { DialogOverlayImplProps } from './DialogOverlayImpl.vue'\nimport { useForwardExpose } from '@/shared'\nimport DialogOverlayImpl from './DialogOverlayImpl.vue'\n\nexport interface DialogOverlayProps extends DialogOverlayImplProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\ndefineProps<DialogOverlayProps>()\nconst rootContext = injectDialogRootContext()\n\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <Presence\n    v-if=\"rootContext?.modal.value\"\n    :present=\"forceMount || rootContext.open.value\"\n  >\n    <DialogOverlayImpl\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n    >\n      <slot />\n    </DialogOverlayImpl>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nexport interface TeleportProps {\n  /**\n   * Vue native teleport component prop `:to`\n   *\n   * {@link https://vuejs.org/guide/built-ins/teleport.html#basic-usage}\n   */\n  to?: string | HTMLElement\n  /**\n   * Disable teleport and render the component inline\n   *\n   * {@link https://vuejs.org/guide/built-ins/teleport.html#disabling-teleport}\n   */\n  disabled?: boolean\n  /**\n   * Defer the resolving of a Teleport target until other parts of the\n   * application have mounted (requires Vue 3.5.0+)\n   *\n   * {@link https://vuejs.org/guide/built-ins/teleport.html#deferred-teleport}\n   */\n  defer?: boolean\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useMounted } from '@vueuse/core'\n\nwithDefaults(defineProps<TeleportProps>(), {\n  to: 'body',\n})\n\nconst isMounted = useMounted()\n</script>\n\n<template>\n  <Teleport\n    v-if=\"isMounted || forceMount\"\n    :to=\"to\"\n    :disabled=\"disabled\"\n    :defer=\"defer\"\n  >\n    <slot />\n  </Teleport>\n</template>\n","<script lang=\"ts\">\nexport interface TeleportProps {\n  /**\n   * Vue native teleport component prop `:to`\n   *\n   * {@link https://vuejs.org/guide/built-ins/teleport.html#basic-usage}\n   */\n  to?: string | HTMLElement\n  /**\n   * Disable teleport and render the component inline\n   *\n   * {@link https://vuejs.org/guide/built-ins/teleport.html#disabling-teleport}\n   */\n  disabled?: boolean\n  /**\n   * Defer the resolving of a Teleport target until other parts of the\n   * application have mounted (requires Vue 3.5.0+)\n   *\n   * {@link https://vuejs.org/guide/built-ins/teleport.html#deferred-teleport}\n   */\n  defer?: boolean\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useMounted } from '@vueuse/core'\n\nwithDefaults(defineProps<TeleportProps>(), {\n  to: 'body',\n})\n\nconst isMounted = useMounted()\n</script>\n\n<template>\n  <Teleport\n    v-if=\"isMounted || forceMount\"\n    :to=\"to\"\n    :disabled=\"disabled\"\n    :defer=\"defer\"\n  >\n    <slot />\n  </Teleport>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface DialogPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<DialogPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface DialogPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<DialogPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DialogTitleProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\nconst props = withDefaults(defineProps<DialogTitleProps>(), { as: 'h2' })\nconst rootContext = injectDialogRootContext()\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"rootContext.titleId\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DialogTitleProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\nconst props = withDefaults(defineProps<DialogTitleProps>(), { as: 'h2' })\nconst rootContext = injectDialogRootContext()\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"rootContext.titleId\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface DialogTriggerProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose, useId } from '@/shared'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\nconst props = withDefaults(defineProps<DialogTriggerProps>(), {\n  as: 'button',\n})\nconst rootContext = injectDialogRootContext()\nconst { forwardRef, currentElement } = useForwardExpose()\n\nrootContext.contentId ||= useId(undefined, 'reka-dialog-content')\nonMounted(() => {\n  rootContext.triggerElement.value = currentElement.value\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :ref=\"forwardRef\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    aria-haspopup=\"dialog\"\n    :aria-expanded=\"rootContext.open.value || false\"\n    :aria-controls=\"rootContext.open.value ? rootContext.contentId : undefined\"\n    :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n    @click=\"rootContext.onOpenToggle\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface DialogTriggerProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose, useId } from '@/shared'\nimport { injectDialogRootContext } from './DialogRoot.vue'\n\nconst props = withDefaults(defineProps<DialogTriggerProps>(), {\n  as: 'button',\n})\nconst rootContext = injectDialogRootContext()\nconst { forwardRef, currentElement } = useForwardExpose()\n\nrootContext.contentId ||= useId(undefined, 'reka-dialog-content')\nonMounted(() => {\n  rootContext.triggerElement.value = currentElement.value\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :ref=\"forwardRef\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    aria-haspopup=\"dialog\"\n    :aria-expanded=\"rootContext.open.value || false\"\n    :aria-controls=\"rootContext.open.value ? rootContext.contentId : undefined\"\n    :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n    @click=\"rootContext.onOpenToggle\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DialogCloseProps } from '@/Dialog'\nimport { useForwardExpose } from '@/shared'\n\nexport interface AlertDialogActionProps extends DialogCloseProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { DialogClose } from '@/Dialog'\n\nconst props = withDefaults(defineProps<AlertDialogActionProps>(), { as: 'button' })\nuseForwardExpose()\n</script>\n\n<template>\n  <DialogClose v-bind=\"props\">\n    <slot />\n  </DialogClose>\n</template>\n","<script lang=\"ts\">\nimport type { DialogCloseProps } from '@/Dialog'\nimport { useForwardExpose } from '@/shared'\n\nexport interface AlertDialogActionProps extends DialogCloseProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { DialogClose } from '@/Dialog'\n\nconst props = withDefaults(defineProps<AlertDialogActionProps>(), { as: 'button' })\nuseForwardExpose()\n</script>\n\n<template>\n  <DialogClose v-bind=\"props\">\n    <slot />\n  </DialogClose>\n</template>\n","<script lang=\"ts\">\nimport type {\n  DialogContentEmits,\n  DialogContentProps,\n} from '@/Dialog'\nimport { createContext, useEmitAsProps, useForwardExpose } from '@/shared'\n\ninterface AlertDialogContentContext {\n  onCancelElementChange: (el: HTMLElement | undefined) => void\n}\n\nexport const [injectAlertDialogContentContext, provideAlertDialogContentContext]\n  = createContext<AlertDialogContentContext>('AlertDialogContent')\n\nexport type AlertDialogContentEmits = DialogContentEmits\nexport interface AlertDialogContentProps extends DialogContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { nextTick, ref } from 'vue'\nimport { DialogContent } from '@/Dialog'\n\nconst props = defineProps<AlertDialogContentProps>()\nconst emits = defineEmits<AlertDialogContentEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n\nconst cancelElement = ref<HTMLElement | undefined>()\n\nprovideAlertDialogContentContext({\n  onCancelElementChange: (el) => {\n    cancelElement.value = el\n  },\n})\n</script>\n\n<template>\n  <DialogContent\n    v-bind=\"{ ...props, ...emitsAsProps }\"\n    role=\"alertdialog\"\n    @pointer-down-outside.prevent\n    @interact-outside.prevent\n    @open-auto-focus=\"\n      () => {\n        nextTick(() => {\n          cancelElement?.focus({\n            preventScroll: true,\n          });\n        });\n      }\n    \"\n  >\n    <slot />\n  </DialogContent>\n</template>\n","<script lang=\"ts\">\nimport type {\n  DialogContentEmits,\n  DialogContentProps,\n} from '@/Dialog'\nimport { createContext, useEmitAsProps, useForwardExpose } from '@/shared'\n\ninterface AlertDialogContentContext {\n  onCancelElementChange: (el: HTMLElement | undefined) => void\n}\n\nexport const [injectAlertDialogContentContext, provideAlertDialogContentContext]\n  = createContext<AlertDialogContentContext>('AlertDialogContent')\n\nexport type AlertDialogContentEmits = DialogContentEmits\nexport interface AlertDialogContentProps extends DialogContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { nextTick, ref } from 'vue'\nimport { DialogContent } from '@/Dialog'\n\nconst props = defineProps<AlertDialogContentProps>()\nconst emits = defineEmits<AlertDialogContentEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n\nconst cancelElement = ref<HTMLElement | undefined>()\n\nprovideAlertDialogContentContext({\n  onCancelElementChange: (el) => {\n    cancelElement.value = el\n  },\n})\n</script>\n\n<template>\n  <DialogContent\n    v-bind=\"{ ...props, ...emitsAsProps }\"\n    role=\"alertdialog\"\n    @pointer-down-outside.prevent\n    @interact-outside.prevent\n    @open-auto-focus=\"\n      () => {\n        nextTick(() => {\n          cancelElement?.focus({\n            preventScroll: true,\n          });\n        });\n      }\n    \"\n  >\n    <slot />\n  </DialogContent>\n</template>\n","<script lang=\"ts\">\nimport type { DialogCloseProps } from '@/Dialog'\nimport { useForwardExpose } from '@/shared'\n\nexport interface AlertDialogCancelProps extends DialogCloseProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted } from 'vue'\nimport { DialogClose } from '@/Dialog'\nimport { injectAlertDialogContentContext } from './AlertDialogContent.vue'\n\nconst props = withDefaults(defineProps<AlertDialogCancelProps>(), { as: 'button' })\nconst contentContext = injectAlertDialogContentContext()\nconst { forwardRef, currentElement } = useForwardExpose()\n\nonMounted(() => {\n  contentContext.onCancelElementChange(currentElement.value)\n})\n</script>\n\n<template>\n  <DialogClose\n    v-bind=\"props\"\n    :ref=\"forwardRef\"\n  >\n    <slot />\n  </DialogClose>\n</template>\n","<script lang=\"ts\">\nimport type { DialogCloseProps } from '@/Dialog'\nimport { useForwardExpose } from '@/shared'\n\nexport interface AlertDialogCancelProps extends DialogCloseProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted } from 'vue'\nimport { DialogClose } from '@/Dialog'\nimport { injectAlertDialogContentContext } from './AlertDialogContent.vue'\n\nconst props = withDefaults(defineProps<AlertDialogCancelProps>(), { as: 'button' })\nconst contentContext = injectAlertDialogContentContext()\nconst { forwardRef, currentElement } = useForwardExpose()\n\nonMounted(() => {\n  contentContext.onCancelElementChange(currentElement.value)\n})\n</script>\n\n<template>\n  <DialogClose\n    v-bind=\"props\"\n    :ref=\"forwardRef\"\n  >\n    <slot />\n  </DialogClose>\n</template>\n","<script lang=\"ts\">\nimport type { DialogDescriptionProps } from '@/Dialog'\nimport { useForwardExpose } from '@/shared'\n\nexport interface AlertDialogDescriptionProps extends DialogDescriptionProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { DialogDescription } from '@/Dialog'\n\nconst props = withDefaults(defineProps<AlertDialogDescriptionProps>(), { as: 'p' })\nuseForwardExpose()\n</script>\n\n<template>\n  <DialogDescription v-bind=\"props\">\n    <slot />\n  </DialogDescription>\n</template>\n","<script lang=\"ts\">\nimport type { DialogDescriptionProps } from '@/Dialog'\nimport { useForwardExpose } from '@/shared'\n\nexport interface AlertDialogDescriptionProps extends DialogDescriptionProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { DialogDescription } from '@/Dialog'\n\nconst props = withDefaults(defineProps<AlertDialogDescriptionProps>(), { as: 'p' })\nuseForwardExpose()\n</script>\n\n<template>\n  <DialogDescription v-bind=\"props\">\n    <slot />\n  </DialogDescription>\n</template>\n","<script lang=\"ts\">\nimport type { DialogOverlayProps } from '@/Dialog'\nimport { useForwardExpose } from '@/shared'\n\nexport interface AlertDialogOverlayProps extends DialogOverlayProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { DialogOverlay } from '@/Dialog'\n\nconst props = defineProps<AlertDialogOverlayProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <DialogOverlay v-bind=\"props\">\n    <slot />\n  </DialogOverlay>\n</template>\n","<script lang=\"ts\">\nimport type { DialogOverlayProps } from '@/Dialog'\nimport { useForwardExpose } from '@/shared'\n\nexport interface AlertDialogOverlayProps extends DialogOverlayProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { DialogOverlay } from '@/Dialog'\n\nconst props = defineProps<AlertDialogOverlayProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <DialogOverlay v-bind=\"props\">\n    <slot />\n  </DialogOverlay>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface AlertDialogPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<AlertDialogPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface AlertDialogPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<AlertDialogPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport type {\n  DialogRootEmits,\n  DialogRootProps,\n} from '@/Dialog'\n\nexport type AlertDialogEmits = DialogRootEmits\nexport interface AlertDialogProps extends Omit<DialogRootProps, 'modal'> {}\n</script>\n\n<script setup lang=\"ts\">\nimport { DialogRoot } from '@/Dialog'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\n\nconst props = defineProps<AlertDialogProps>()\nconst emits = defineEmits<AlertDialogEmits>()\n\nconst forwarded = useForwardPropsEmits(props, emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <DialogRoot\n    v-slot=\"slotProps\"\n    v-bind=\"forwarded\"\n    :modal=\"true\"\n  >\n    <slot v-bind=\"slotProps\" />\n  </DialogRoot>\n</template>\n","<script lang=\"ts\">\nimport type {\n  DialogRootEmits,\n  DialogRootProps,\n} from '@/Dialog'\n\nexport type AlertDialogEmits = DialogRootEmits\nexport interface AlertDialogProps extends Omit<DialogRootProps, 'modal'> {}\n</script>\n\n<script setup lang=\"ts\">\nimport { DialogRoot } from '@/Dialog'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\n\nconst props = defineProps<AlertDialogProps>()\nconst emits = defineEmits<AlertDialogEmits>()\n\nconst forwarded = useForwardPropsEmits(props, emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <DialogRoot\n    v-slot=\"slotProps\"\n    v-bind=\"forwarded\"\n    :modal=\"true\"\n  >\n    <slot v-bind=\"slotProps\" />\n  </DialogRoot>\n</template>\n","<script lang=\"ts\">\nimport type { DialogTitleProps } from '@/Dialog'\nimport { useForwardExpose } from '@/shared'\n\nexport interface AlertDialogTitleProps extends DialogTitleProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { DialogTitle } from '@/Dialog'\n\nconst props = withDefaults(defineProps<AlertDialogTitleProps>(), { as: 'h2' })\nuseForwardExpose()\n</script>\n\n<template>\n  <DialogTitle v-bind=\"props\">\n    <slot />\n  </DialogTitle>\n</template>\n","<script lang=\"ts\">\nimport type { DialogTitleProps } from '@/Dialog'\nimport { useForwardExpose } from '@/shared'\n\nexport interface AlertDialogTitleProps extends DialogTitleProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { DialogTitle } from '@/Dialog'\n\nconst props = withDefaults(defineProps<AlertDialogTitleProps>(), { as: 'h2' })\nuseForwardExpose()\n</script>\n\n<template>\n  <DialogTitle v-bind=\"props\">\n    <slot />\n  </DialogTitle>\n</template>\n","<script lang=\"ts\">\nimport type { DialogTriggerProps } from '@/Dialog'\nimport { useForwardExpose } from '@/shared'\n\nexport interface AlertDialogTriggerProps extends DialogTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { DialogTrigger } from '@/Dialog'\n\nconst props = withDefaults(defineProps<AlertDialogTriggerProps>(), { as: 'button' })\nuseForwardExpose()\n</script>\n\n<template>\n  <DialogTrigger v-bind=\"props\">\n    <slot />\n  </DialogTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { DialogTriggerProps } from '@/Dialog'\nimport { useForwardExpose } from '@/shared'\n\nexport interface AlertDialogTriggerProps extends DialogTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { DialogTrigger } from '@/Dialog'\n\nconst props = withDefaults(defineProps<AlertDialogTriggerProps>(), { as: 'button' })\nuseForwardExpose()\n</script>\n\n<template>\n  <DialogTrigger v-bind=\"props\">\n    <slot />\n  </DialogTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface AspectRatioProps extends PrimitiveProps {\n  /**\n   * The desired ratio. Eg: 16/9\n   * @defaultValue 1\n   */\n  ratio?: number\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<AspectRatioProps>(), {\n  ratio: 1,\n})\ndefineSlots<{\n  default?: (props: {\n    /** Current aspect ratio (in %) */\n    aspect: typeof aspect.value\n  }) => any\n}>()\n\nconst { forwardRef } = useForwardExpose()\n\nconst aspect = computed(() => {\n  return (1 / props.ratio) * 100\n})\n</script>\n\n<template>\n  <div\n    :style=\"`position: relative; width: 100%; padding-bottom: ${aspect}%`\"\n    data-reka-aspect-ratio-wrapper\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      style=\"position: absolute; inset: 0px\"\n      v-bind=\"$attrs\"\n    >\n      <slot :aspect=\"aspect\" />\n    </Primitive>\n  </div>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface AspectRatioProps extends PrimitiveProps {\n  /**\n   * The desired ratio. Eg: 16/9\n   * @defaultValue 1\n   */\n  ratio?: number\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<AspectRatioProps>(), {\n  ratio: 1,\n})\ndefineSlots<{\n  default?: (props: {\n    /** Current aspect ratio (in %) */\n    aspect: typeof aspect.value\n  }) => any\n}>()\n\nconst { forwardRef } = useForwardExpose()\n\nconst aspect = computed(() => {\n  return (1 / props.ratio) * 100\n})\n</script>\n\n<template>\n  <div\n    :style=\"`position: relative; width: 100%; padding-bottom: ${aspect}%`\"\n    data-reka-aspect-ratio-wrapper\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      style=\"position: absolute; inset: 0px\"\n      v-bind=\"$attrs\"\n    >\n      <slot :aspect=\"aspect\" />\n    </Primitive>\n  </div>\n</template>\n","import type { Ref } from 'vue'\nimport { computed, defineComponent, h, inject, markRaw, provide, ref, watch, watchEffect } from 'vue'\nimport { Slot, usePrimitiveElement } from '@/Primitive'\n\ninterface CollectionContext<ItemData = {}> {\n  collectionRef: Ref<HTMLElement | undefined>\n  itemMap: Ref<Map<HTMLElement, { ref: HTMLElement, value?: any } & ItemData>>\n}\n\nconst ITEM_DATA_ATTR = 'data-reka-collection-item'\n\nexport function useCollection<ItemData = {}>(options: { key?: string, isProvider?: boolean } = {}) {\n  const { key = '', isProvider = false } = options\n  const injectionKey = `${key}CollectionProvider`\n  let context: CollectionContext<ItemData>\n\n  if (isProvider) {\n    const itemMap = ref<Map<HTMLElement, { ref: HTMLElement } & ItemData>>(new Map())\n    const collectionRef = ref<HTMLElement>()\n\n    context = {\n      collectionRef,\n      itemMap,\n    } as CollectionContext<ItemData>\n    provide(injectionKey, context)\n  }\n  else {\n    context = inject(injectionKey) as CollectionContext<ItemData>\n  }\n\n  const getItems = (includeDisabledItem = false) => {\n    const collectionNode = context.collectionRef.value\n    if (!collectionNode)\n      return []\n    const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`))\n    const items = Array.from(context.itemMap.value.values())\n    const orderedItems = items.sort(\n      (a, b) => orderedNodes.indexOf(a.ref) - orderedNodes.indexOf(b.ref),\n    )\n\n    if (includeDisabledItem)\n      return orderedItems\n    else\n      return orderedItems.filter(i => i.ref.dataset.disabled !== '')\n  }\n\n  const CollectionSlot = defineComponent({\n    name: 'CollectionSlot',\n    inheritAttrs: false,\n    setup(_, { slots, attrs }) {\n      const { primitiveElement, currentElement } = usePrimitiveElement()\n      watch(currentElement, () => {\n        context.collectionRef.value = currentElement.value\n      })\n      return () => h(Slot, { ref: primitiveElement, ...attrs }, slots)\n    },\n  })\n\n  const CollectionItem = defineComponent({\n    name: 'CollectionItem',\n    inheritAttrs: false,\n    props: {\n      value: {\n        // It accepts any value\n        validator: () => true,\n      },\n    },\n    setup(props, { slots, attrs }) {\n      const { primitiveElement, currentElement } = usePrimitiveElement()\n\n      watchEffect((cleanupFn) => {\n        if (currentElement.value) {\n          const key = markRaw(currentElement.value)\n          // @ts-expect-error ignore assignment of unknown to any\n          context.itemMap.value.set(key, { ref: currentElement.value!, value: props.value })\n          cleanupFn(() => context.itemMap.value.delete(key))\n        }\n      })\n\n      return () => h(Slot, { ...attrs, [ITEM_DATA_ATTR]: '', ref: primitiveElement }, slots)\n    },\n  })\n\n  const reactiveItems = computed(() => Array.from(context.itemMap.value.values()))\n  const itemMapSize = computed(() => context.itemMap.value.size)\n\n  return { getItems, reactiveItems, itemMapSize, CollectionSlot, CollectionItem }\n}\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface VisuallyHiddenProps extends PrimitiveProps {\n  feature?: 'focusable' | 'fully-hidden'\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nwithDefaults(defineProps<VisuallyHiddenProps>(), { as: 'span', feature: 'focusable' })\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-hidden=\"feature === 'focusable' ? 'true' : undefined\"\n    :data-hidden=\"feature === 'fully-hidden' ? '' : undefined\"\n    :tabindex=\"feature === 'fully-hidden' ? '-1' : undefined\"\n    :style=\"{\n      // See: https://github.com/twbs/bootstrap/blob/a360960b8dfdb4bf48f87539c2243458fa0366f7/scss/mixins/_visually-hidden.scss\n      position: 'absolute',\n      border: 0,\n      width: '1px',\n      height: '1px',\n      padding: 0,\n      margin: '-1px',\n      overflow: 'hidden',\n      clip: 'rect(0, 0, 0, 0)',\n      clipPath: 'inset(50%)',\n      whiteSpace: 'nowrap',\n      wordWrap: 'normal',\n\n      // Prevent causing unnecessary container scroll\n      // @see https://github.com/unovue/reka-ui/issues/2127\n      top: '-1px',\n      left: '-1px',\n    }\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface VisuallyHiddenProps extends PrimitiveProps {\n  feature?: 'focusable' | 'fully-hidden'\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nwithDefaults(defineProps<VisuallyHiddenProps>(), { as: 'span', feature: 'focusable' })\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-hidden=\"feature === 'focusable' ? 'true' : undefined\"\n    :data-hidden=\"feature === 'fully-hidden' ? '' : undefined\"\n    :tabindex=\"feature === 'fully-hidden' ? '-1' : undefined\"\n    :style=\"{\n      // See: https://github.com/twbs/bootstrap/blob/a360960b8dfdb4bf48f87539c2243458fa0366f7/scss/mixins/_visually-hidden.scss\n      position: 'absolute',\n      border: 0,\n      width: '1px',\n      height: '1px',\n      padding: 0,\n      margin: '-1px',\n      overflow: 'hidden',\n      clip: 'rect(0, 0, 0, 0)',\n      clipPath: 'inset(50%)',\n      whiteSpace: 'nowrap',\n      wordWrap: 'normal',\n\n      // Prevent causing unnecessary container scroll\n      // @see https://github.com/unovue/reka-ui/issues/2127\n      top: '-1px',\n      left: '-1px',\n    }\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nexport interface VisuallyHiddenInputBubbleProps<T> {\n  name: string\n  value: T\n  checked?: boolean\n  required?: boolean\n  disabled?: boolean\n  feature?: VisuallyHiddenProps['feature']\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport type { VisuallyHiddenProps } from './VisuallyHidden.vue'\nimport { computed, watch } from 'vue'\nimport { usePrimitiveElement } from '@/Primitive'\nimport VisuallyHidden from './VisuallyHidden.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<VisuallyHiddenInputBubbleProps<T>>(), {\n  feature: 'fully-hidden',\n  checked: undefined,\n})\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\nconst valueState = computed(() => props.checked ?? props.value)\n\nwatch(valueState, (cur, prev) => {\n  if (!currentElement.value)\n    return\n\n  const input = currentElement.value as HTMLInputElement\n  const inputProto = window.HTMLInputElement.prototype\n  const descriptor = Object.getOwnPropertyDescriptor(inputProto, 'value') as PropertyDescriptor\n  const setValue = descriptor.set\n  if (setValue && cur !== prev) {\n    const inputEvent = new Event('input', { bubbles: true })\n    const changeEvent = new Event('change', { bubbles: true })\n    setValue.call(input, cur)\n    input.dispatchEvent(inputEvent)\n    input.dispatchEvent(changeEvent)\n  }\n})\n</script>\n\n<template>\n  <VisuallyHidden\n    ref=\"primitiveElement\"\n    v-bind=\"{ ...props, ...$attrs }\"\n    as=\"input\"\n  />\n</template>\n","<script lang=\"ts\">\nexport interface VisuallyHiddenInputBubbleProps<T> {\n  name: string\n  value: T\n  checked?: boolean\n  required?: boolean\n  disabled?: boolean\n  feature?: VisuallyHiddenProps['feature']\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport type { VisuallyHiddenProps } from './VisuallyHidden.vue'\nimport { computed, watch } from 'vue'\nimport { usePrimitiveElement } from '@/Primitive'\nimport VisuallyHidden from './VisuallyHidden.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<VisuallyHiddenInputBubbleProps<T>>(), {\n  feature: 'fully-hidden',\n  checked: undefined,\n})\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\nconst valueState = computed(() => props.checked ?? props.value)\n\nwatch(valueState, (cur, prev) => {\n  if (!currentElement.value)\n    return\n\n  const input = currentElement.value as HTMLInputElement\n  const inputProto = window.HTMLInputElement.prototype\n  const descriptor = Object.getOwnPropertyDescriptor(inputProto, 'value') as PropertyDescriptor\n  const setValue = descriptor.set\n  if (setValue && cur !== prev) {\n    const inputEvent = new Event('input', { bubbles: true })\n    const changeEvent = new Event('change', { bubbles: true })\n    setValue.call(input, cur)\n    input.dispatchEvent(inputEvent)\n    input.dispatchEvent(changeEvent)\n  }\n})\n</script>\n\n<template>\n  <VisuallyHidden\n    ref=\"primitiveElement\"\n    v-bind=\"{ ...props, ...$attrs }\"\n    as=\"input\"\n  />\n</template>\n","<script setup lang=\"ts\" generic=\"T\">\nimport type { VisuallyHiddenInputBubbleProps } from './VisuallyHiddenInputBubble.vue'\nimport { computed } from 'vue'\nimport VisuallyHiddenInputBubble from './VisuallyHiddenInputBubble.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<VisuallyHiddenInputBubbleProps<T>>(), {\n  feature: 'fully-hidden',\n  checked: undefined,\n})\n\nconst isFormArrayEmptyAndRequired = computed(() =>\n  typeof props.value === 'object'\n  && Array.isArray(props.value)\n  && props.value.length === 0\n  && props.required,\n)\n\nconst parsedValue = computed(() => {\n  // if primitive value\n  if (typeof props.value === 'string' || typeof props.value === 'number' || typeof props.value === 'boolean' || props.value === null || props.value === undefined) {\n    return [{ name: props.name, value: props.value }]\n  }\n\n  // if array value\n  else if (typeof props.value === 'object' && Array.isArray(props.value)) {\n    return props.value.flatMap((obj, index) => {\n      // if item in array is object\n      if (typeof obj === 'object')\n        return Object.entries(obj).map(([key, value]) => ({ name: `${props.name}[${index}][${key}]`, value }))\n      // if item in array is not object, may be primitive\n      else\n        return ({ name: `${props.name}[${index}]`, value: obj })\n    })\n  }\n\n  // if object value\n  else if (props.value !== null && typeof props.value === 'object' && !Array.isArray(props.value)) {\n    return Object.entries(props.value as object).map(([key, value]) => ({ name: `${props.name}[${key}]`, value }))\n  }\n\n  return []\n})\n</script>\n\n<template>\n  <!-- We render single input if it's required -->\n  <VisuallyHiddenInputBubble\n    v-if=\"isFormArrayEmptyAndRequired\"\n    :key=\"name\"\n    v-bind=\"{ ...props, ...$attrs }\"\n    :name=\"name\"\n    :value=\"value\"\n  />\n\n  <VisuallyHiddenInputBubble\n    v-for=\"parsed in parsedValue\"\n    v-else\n    :key=\"parsed.name\"\n    v-bind=\"{ ...props, ...$attrs }\"\n    :name=\"parsed.name\"\n    :value=\"parsed.value\"\n  />\n</template>\n","<script setup lang=\"ts\" generic=\"T\">\nimport type { VisuallyHiddenInputBubbleProps } from './VisuallyHiddenInputBubble.vue'\nimport { computed } from 'vue'\nimport VisuallyHiddenInputBubble from './VisuallyHiddenInputBubble.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<VisuallyHiddenInputBubbleProps<T>>(), {\n  feature: 'fully-hidden',\n  checked: undefined,\n})\n\nconst isFormArrayEmptyAndRequired = computed(() =>\n  typeof props.value === 'object'\n  && Array.isArray(props.value)\n  && props.value.length === 0\n  && props.required,\n)\n\nconst parsedValue = computed(() => {\n  // if primitive value\n  if (typeof props.value === 'string' || typeof props.value === 'number' || typeof props.value === 'boolean' || props.value === null || props.value === undefined) {\n    return [{ name: props.name, value: props.value }]\n  }\n\n  // if array value\n  else if (typeof props.value === 'object' && Array.isArray(props.value)) {\n    return props.value.flatMap((obj, index) => {\n      // if item in array is object\n      if (typeof obj === 'object')\n        return Object.entries(obj).map(([key, value]) => ({ name: `${props.name}[${index}][${key}]`, value }))\n      // if item in array is not object, may be primitive\n      else\n        return ({ name: `${props.name}[${index}]`, value: obj })\n    })\n  }\n\n  // if object value\n  else if (props.value !== null && typeof props.value === 'object' && !Array.isArray(props.value)) {\n    return Object.entries(props.value as object).map(([key, value]) => ({ name: `${props.name}[${key}]`, value }))\n  }\n\n  return []\n})\n</script>\n\n<template>\n  <!-- We render single input if it's required -->\n  <VisuallyHiddenInputBubble\n    v-if=\"isFormArrayEmptyAndRequired\"\n    :key=\"name\"\n    v-bind=\"{ ...props, ...$attrs }\"\n    :name=\"name\"\n    :value=\"value\"\n  />\n\n  <VisuallyHiddenInputBubble\n    v-for=\"parsed in parsedValue\"\n    v-else\n    :key=\"parsed.name\"\n    v-bind=\"{ ...props, ...$attrs }\"\n    :name=\"parsed.name\"\n    :value=\"parsed.value\"\n  />\n</template>\n","import { isEqual } from 'ohash'\n\nexport function queryCheckedElement(parentEl: HTMLElement | null) {\n  return parentEl?.querySelector('[data-state=checked]') as HTMLElement | null\n}\n\nexport function valueComparator<T>(value: T | T[] | undefined, currentValue: T, comparator?: string | ((a: T, b: T) => boolean)) {\n  if (value === undefined)\n    return false\n  else if (Array.isArray(value))\n    return value.some(val => compare(val, currentValue, comparator))\n  else\n    return compare(value, currentValue, comparator)\n}\n\nexport function compare<T>(value?: T, currentValue?: T, comparator?: string | ((a: T, b: T) => boolean)) {\n  if (value === undefined || currentValue === undefined)\n    return false\n\n  if (typeof value === 'string')\n    return value === currentValue\n\n  if (typeof comparator === 'function')\n    return comparator(value, currentValue)\n\n  if (typeof comparator === 'string')\n    return value?.[comparator as keyof T] === currentValue?.[comparator as keyof T]\n\n  return isEqual(value, currentValue)\n}\n","import { getActiveElement } from '@/shared'\n\nexport type Orientation = 'horizontal' | 'vertical'\nexport type Direction = 'ltr' | 'rtl'\n\nexport const ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus'\nexport const EVENT_OPTIONS = { bubbles: false, cancelable: true }\n\nexport const MAP_KEY_TO_FOCUS_INTENT: Record<string, FocusIntent> = {\n  ArrowLeft: 'prev',\n  ArrowUp: 'prev',\n  ArrowRight: 'next',\n  ArrowDown: 'next',\n  PageUp: 'first',\n  Home: 'first',\n  PageDown: 'last',\n  End: 'last',\n}\n\nexport function getDirectionAwareKey(key: string, dir?: Direction) {\n  if (dir !== 'rtl')\n    return key\n  return key === 'ArrowLeft'\n    ? 'ArrowRight'\n    : key === 'ArrowRight'\n      ? 'ArrowLeft'\n      : key\n}\n\ntype FocusIntent = 'first' | 'last' | 'prev' | 'next'\n\nexport function getFocusIntent(\n  event: KeyboardEvent,\n  orientation?: Orientation,\n  dir?: Direction,\n) {\n  const key = getDirectionAwareKey(event.key, dir)\n  if (orientation === 'vertical' && ['ArrowLeft', 'ArrowRight'].includes(key))\n    return undefined\n  if (orientation === 'horizontal' && ['ArrowUp', 'ArrowDown'].includes(key))\n    return undefined\n  return MAP_KEY_TO_FOCUS_INTENT[key]\n}\n\nexport function focusFirst(candidates: HTMLElement[], preventScroll = false) {\n  const PREVIOUSLY_FOCUSED_ELEMENT = getActiveElement()\n  for (const candidate of candidates) {\n    // if focus is already where we want to go, we don't want to keep going through the candidates\n    if (candidate === PREVIOUSLY_FOCUSED_ELEMENT)\n      return\n    candidate.focus({ preventScroll })\n    if (getActiveElement() !== PREVIOUSLY_FOCUSED_ELEMENT)\n      return\n  }\n}\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nexport function wrapArray<T>(array: T[], startIndex: number) {\n  return array.map((_, index) => array[(startIndex + index) % array.length])\n}\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { AcceptableValue, DataOrientation, Direction, FormFieldProps } from '@/shared/types'\nimport { usePrimitiveElement } from '@/Primitive'\nimport { getFocusIntent } from '@/RovingFocus/utils'\nimport { createContext, findValuesBetween, useDirection, useFormControl, useKbd, useTypeahead } from '@/shared'\nimport { Primitive } from '..'\n\ntype ListboxRootContext<T> = {\n  modelValue: Ref<T | Array<T> | undefined>\n  onValueChange: (val: T) => void\n  multiple: Ref<boolean>\n  orientation: Ref<DataOrientation>\n  dir: Ref<Direction>\n  disabled: Ref<boolean>\n  highlightOnHover: Ref<boolean>\n  highlightedElement: Ref<HTMLElement | null>\n  isVirtual: Ref<boolean>\n  virtualFocusHook: EventHook<{ event?: Event, scroll: boolean }>\n  virtualKeydownHook: EventHook<KeyboardEvent>\n  virtualHighlightHook: EventHook<any>\n  by?: string | ((a: T, b: T) => boolean)\n  firstValue?: Ref<T | undefined>\n  selectionBehavior?: Ref<'toggle' | 'replace'>\n\n  focusable: Ref<boolean>\n\n  onLeave: (event: Event) => void\n  onEnter: (event: Event) => void\n  changeHighlight: (el: HTMLElement, scrollIntoView?: boolean, focus?: boolean) => void\n  onKeydownNavigation: (event: KeyboardEvent) => void\n  onKeydownEnter: (event: KeyboardEvent) => void\n  onKeydownTypeAhead: (event: KeyboardEvent) => void\n  onCompositionStart: () => void\n  onCompositionEnd: () => void\n  highlightFirstItem: () => void\n}\n\nexport const [injectListboxRootContext, provideListboxRootContext]\n  = createContext<ListboxRootContext<AcceptableValue>>('ListboxRoot')\n\nexport interface ListboxRootProps<T = AcceptableValue> extends PrimitiveProps, FormFieldProps {\n  /** The controlled value of the listbox. Can be binded with `v-model`. */\n  modelValue?: T | Array<T>\n  /** The value of the listbox when initially rendered. Use when you do not need to control the state of the Listbox */\n  defaultValue?: T | Array<T>\n  /** Whether multiple options can be selected or not. */\n  multiple?: boolean\n  /** The orientation of the listbox. <br>Mainly so arrow navigation is done accordingly (left & right vs. up & down) */\n  orientation?: DataOrientation\n  /** The reading direction of the listbox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** When `true`, prevents the user from interacting with listbox */\n  disabled?: boolean\n  /**\n   * How multiple selection should behave in the collection.\n   * @defaultValue 'toggle'\n   */\n  selectionBehavior?: 'toggle' | 'replace'\n  /** When `true`, hover over item will trigger highlight */\n  highlightOnHover?: boolean\n  /** Use this to compare objects by a particular field, or pass your own comparison function for complete control over how objects are compared. */\n  by?: string | ((a: T, b: T) => boolean)\n}\n\nexport type ListboxRootEmits<T = AcceptableValue> = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [value: T]\n  /** Event handler when highlighted element changes. */\n  'highlight': [payload: { ref: HTMLElement, value: T } | undefined]\n  /** Event handler called when container is being focused. Can be prevented. */\n  'entryFocus': [event: CustomEvent]\n  /** Event handler called when the mouse leave the container */\n  'leave': [event: Event]\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableValue = AcceptableValue\">\nimport type { EventHook } from '@vueuse/core'\nimport type { Ref } from 'vue'\nimport { createEventHook, useVModel } from '@vueuse/core'\nimport { isClient } from '@vueuse/shared'\nimport { nextTick, ref, toRefs, watch } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\nimport { compare } from './utils'\n\nconst props = withDefaults(defineProps<ListboxRootProps>(), {\n  selectionBehavior: 'toggle',\n  orientation: 'vertical',\n})\nconst emits = defineEmits<ListboxRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current active value */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { multiple, highlightOnHover, orientation, disabled, selectionBehavior, dir: propDir } = toRefs(props)\nconst { getItems } = useCollection<{ value: T }>({ isProvider: true })\nconst { handleTypeaheadSearch } = useTypeahead()\nconst { primitiveElement, currentElement } = usePrimitiveElement()\nconst kbd = useKbd()\nconst dir = useDirection(propDir)\n\nconst isFormControl = useFormControl(currentElement)\n\nconst firstValue = ref<T>()\nconst isUserAction = ref(false)\nconst focusable = ref(true)\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? (multiple.value ? [] : undefined),\n  passive: (props.modelValue === undefined) as false,\n  deep: true,\n}) as Ref<T | T[] | undefined>\n\nfunction onValueChange(val: T) {\n  isUserAction.value = true\n  if (props.multiple) {\n    const modelArray = Array.isArray(modelValue.value) ? [...modelValue.value] : []\n    const index = modelArray.findIndex(i => compare(i, val, props.by))\n    if (props.selectionBehavior === 'toggle') {\n      index === -1 ? modelArray.push(val) : modelArray.splice(index, 1)\n      modelValue.value = modelArray\n    }\n    else {\n      modelValue.value = [val]\n      firstValue.value = val\n    }\n  }\n  else {\n    if (props.selectionBehavior === 'toggle') {\n      if (compare(modelValue.value, val, props.by))\n        modelValue.value = undefined\n      else\n        modelValue.value = val\n    }\n    else {\n      modelValue.value = val\n    }\n  }\n  setTimeout(() => {\n    isUserAction.value = false\n  }, 1)\n}\n\nconst highlightedElement = ref<HTMLElement | null>(null)\nconst previousElement = ref<HTMLElement | null>(null)\nconst isVirtual = ref(false)\nconst isComposing = ref(false)\nconst virtualFocusHook = createEventHook<{ event?: Event, scroll: boolean }>()\nconst virtualKeydownHook = createEventHook<KeyboardEvent>()\nconst virtualHighlightHook = createEventHook<T>()\n\nfunction getCollectionItem() {\n  return getItems().map(i => i.ref).filter(i => i.dataset.disabled !== '')\n}\n\nfunction changeHighlight(el: HTMLElement, scrollIntoView = true, focus?: boolean) {\n  if (!el)\n    return\n\n  highlightedElement.value = el\n  if (focus ?? focusable.value)\n    highlightedElement.value.focus()\n  if (scrollIntoView)\n    highlightedElement.value.scrollIntoView({ block: 'nearest' })\n\n  const highlightedItem = getItems().find(i => i.ref === el)\n  emits('highlight', highlightedItem)\n}\n\nfunction highlightItem(value: T) {\n  if (isVirtual.value) {\n    // @ts-expect-error known type issue https://github.com/vueuse/vueuse/issues/4610\n    virtualHighlightHook.trigger(value)\n  }\n  else {\n    const item = getItems().find(i => compare(i.value, value, props.by))\n    if (item) {\n      highlightedElement.value = item.ref\n      changeHighlight(item.ref)\n    }\n  }\n}\n\nfunction onKeydownEnter(event: KeyboardEvent) {\n  if (highlightedElement.value && highlightedElement.value.isConnected) {\n    event.preventDefault()\n    event.stopPropagation()\n\n    if (!isComposing.value) {\n      highlightedElement.value.click()\n    }\n  }\n}\n\nfunction onKeydownTypeAhead(event: KeyboardEvent) {\n  if (!focusable.value)\n    return\n  isUserAction.value = true\n  if (isVirtual.value) {\n    virtualKeydownHook.trigger(event)\n  }\n  else {\n    const isMetaKey = event.altKey || event.ctrlKey || event.metaKey\n\n    if (isMetaKey && event.key === 'a' && multiple.value) {\n      const collection = getItems()\n      const values = collection.map(i => i.value)\n      modelValue.value = [...values]\n      event.preventDefault()\n      const lastItem = collection.at(-1)\n      if (lastItem)\n        changeHighlight(lastItem.ref)\n    }\n    else if (!isMetaKey) {\n      const el = handleTypeaheadSearch(event.key, getItems())\n      if (el)\n        changeHighlight(el)\n    }\n  }\n  setTimeout(() => {\n    isUserAction.value = false\n  }, 1)\n}\n\nfunction onCompositionStart() {\n  isComposing.value = true\n}\nfunction onCompositionEnd() {\n  nextTick(() => {\n    isComposing.value = false\n  })\n}\n\nfunction highlightFirstItem() {\n  nextTick(() => {\n    const event = new KeyboardEvent('keydown', { key: 'PageUp' })\n    onKeydownNavigation(event)\n  })\n}\n\nfunction onLeave(event: Event) {\n  const el = highlightedElement.value\n\n  if ((el as Node)?.isConnected) {\n    previousElement.value = el\n  }\n\n  highlightedElement.value = null\n  emits('leave', event)\n}\n\nfunction onEnter(event: Event) {\n  const entryFocusEvent = new CustomEvent('listbox.entryFocus', { bubbles: false, cancelable: true })\n  event.currentTarget?.dispatchEvent(entryFocusEvent)\n  emits('entryFocus', entryFocusEvent)\n\n  if (entryFocusEvent.defaultPrevented)\n    return\n\n  if (previousElement.value) {\n    changeHighlight(previousElement.value)\n  }\n  else {\n    const el = getCollectionItem()?.[0]\n    changeHighlight(el)\n  }\n}\n\nfunction onKeydownNavigation(event: KeyboardEvent) {\n  const intent = getFocusIntent(event, orientation.value, dir.value)\n  if (!intent)\n    return\n\n  let collection = getCollectionItem()\n  if (highlightedElement.value) {\n    if (intent === 'last') {\n      collection.reverse()\n    }\n    else if (intent === 'prev' || intent === 'next') {\n      if (intent === 'prev')\n        collection.reverse()\n\n      const currentIndex = collection.indexOf(highlightedElement.value)\n      collection = collection.slice(currentIndex + 1)\n    }\n    handleMultipleReplace(event, collection[0])\n  }\n\n  if (collection.length) {\n    const index = !highlightedElement.value && intent === 'prev' ? collection.length - 1 : 0\n    changeHighlight(collection[index])\n  }\n\n  if (isVirtual.value)\n    return virtualKeydownHook.trigger(event)\n}\n\nfunction handleMultipleReplace(event: KeyboardEvent, targetEl: HTMLElement) {\n  if (isVirtual.value || props.selectionBehavior !== 'replace' || !multiple.value || !Array.isArray(modelValue.value))\n    return\n  const isMetaKey = event.altKey || event.ctrlKey || event.metaKey\n  if (isMetaKey && !event.shiftKey)\n    return\n\n  if (event.shiftKey) {\n    const collection = getItems().filter(i => i.ref.dataset.disabled !== '')\n    let lastValue = collection.find(i => i.ref === targetEl)?.value\n\n    if (event.key === kbd.END)\n      lastValue = collection.at(-1)?.value\n    else if (event.key === kbd.HOME)\n      lastValue = collection[0]?.value\n\n    if (!lastValue || !firstValue.value)\n      return\n\n    const values = findValuesBetween(collection.map(i => i.value), firstValue.value, lastValue)\n    modelValue.value = values\n  }\n}\n\nasync function highlightSelected(event?: Event, scroll = true) {\n  // highlightSelected is called inside a watch with immediate set to true.\n  // This results in code execution during SSR.\n  // Ensure this code only runs in a browser environment, since it performs\n  // DOM-only side effects (focus, scrollIntoView, synthetic KeyboardEvent).\n  if (!isClient)\n    return\n  await nextTick()\n  if (isVirtual.value) {\n    // Trigger on nextTick for Virtualizer to be mounted.\n    // `scroll` is `false` on the initial mount highlight, so the virtualizer sets\n    // its roving-tabindex target without focusing/scrolling — otherwise a\n    // virtualized Listbox below the fold would pull the page to it on load.\n    virtualFocusHook.trigger({ event, scroll })\n  }\n  else {\n    const collection = getCollectionItem()\n    const item = collection.find(i => i.dataset.state === 'checked')\n    // On the initial (mount) highlight we only set the roving-tabindex target.\n    // Focusing/scrolling here would scroll the page to a Listbox the user never\n    // interacted with (e.g. one below the fold). Later highlights scroll as before.\n    const focus = scroll ? undefined : false\n    if (item)\n      changeHighlight(item, scroll, focus)\n    else if (collection.length)\n      changeHighlight(collection[0], scroll, focus)\n  }\n}\n\n// `false` until the initial (mount) modelValue highlight has been queued.\n// Flipped synchronously in the watcher so the \"is this the mount highlight?\"\n// decision never depends on nextTick ordering, which differs between a client\n// mount and SSR hydration. The intent travels with the call as an argument\n// rather than via a shared flag released on a later tick.\nlet hasHighlightedOnMount = false\n\n// watch for only programmatic changes\nwatch(modelValue, () => {\n  if (!isUserAction.value) {\n    const scroll = hasHighlightedOnMount\n    hasHighlightedOnMount = true\n    nextTick(() => {\n      highlightSelected(undefined, scroll)\n    })\n  }\n}, { immediate: true, deep: true })\n\ndefineExpose({\n  highlightedElement,\n  highlightItem,\n  highlightFirstItem,\n  highlightSelected,\n  getItems,\n})\n\nprovideListboxRootContext({\n  modelValue,\n  // @ts-expect-error ignoring\n  onValueChange,\n  multiple,\n  orientation,\n  dir,\n  disabled,\n  highlightOnHover,\n  highlightedElement,\n  isVirtual,\n  virtualFocusHook,\n  virtualKeydownHook,\n  virtualHighlightHook,\n  by: props.by,\n  firstValue,\n  selectionBehavior,\n\n  focusable,\n  onLeave,\n  onEnter,\n  changeHighlight,\n  onKeydownEnter,\n  onKeydownNavigation,\n  onKeydownTypeAhead,\n  onCompositionStart,\n  onCompositionEnd,\n  highlightFirstItem,\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :dir=\"dir\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    @pointerleave=\"onLeave\"\n    @focusout=\"async (event: FocusEvent) => {\n      const target = (event.relatedTarget || event.target) as HTMLElement | null\n      await nextTick()\n      if (highlightedElement && currentElement && !currentElement.contains(target)) {\n        onLeave(event)\n      }\n    }\"\n  >\n    <slot :model-value=\"modelValue\" />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name\"\n      :name=\"name\"\n      :value=\"modelValue\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { AcceptableValue, DataOrientation, Direction, FormFieldProps } from '@/shared/types'\nimport { usePrimitiveElement } from '@/Primitive'\nimport { getFocusIntent } from '@/RovingFocus/utils'\nimport { createContext, findValuesBetween, useDirection, useFormControl, useKbd, useTypeahead } from '@/shared'\nimport { Primitive } from '..'\n\ntype ListboxRootContext<T> = {\n  modelValue: Ref<T | Array<T> | undefined>\n  onValueChange: (val: T) => void\n  multiple: Ref<boolean>\n  orientation: Ref<DataOrientation>\n  dir: Ref<Direction>\n  disabled: Ref<boolean>\n  highlightOnHover: Ref<boolean>\n  highlightedElement: Ref<HTMLElement | null>\n  isVirtual: Ref<boolean>\n  virtualFocusHook: EventHook<{ event?: Event, scroll: boolean }>\n  virtualKeydownHook: EventHook<KeyboardEvent>\n  virtualHighlightHook: EventHook<any>\n  by?: string | ((a: T, b: T) => boolean)\n  firstValue?: Ref<T | undefined>\n  selectionBehavior?: Ref<'toggle' | 'replace'>\n\n  focusable: Ref<boolean>\n\n  onLeave: (event: Event) => void\n  onEnter: (event: Event) => void\n  changeHighlight: (el: HTMLElement, scrollIntoView?: boolean, focus?: boolean) => void\n  onKeydownNavigation: (event: KeyboardEvent) => void\n  onKeydownEnter: (event: KeyboardEvent) => void\n  onKeydownTypeAhead: (event: KeyboardEvent) => void\n  onCompositionStart: () => void\n  onCompositionEnd: () => void\n  highlightFirstItem: () => void\n}\n\nexport const [injectListboxRootContext, provideListboxRootContext]\n  = createContext<ListboxRootContext<AcceptableValue>>('ListboxRoot')\n\nexport interface ListboxRootProps<T = AcceptableValue> extends PrimitiveProps, FormFieldProps {\n  /** The controlled value of the listbox. Can be binded with `v-model`. */\n  modelValue?: T | Array<T>\n  /** The value of the listbox when initially rendered. Use when you do not need to control the state of the Listbox */\n  defaultValue?: T | Array<T>\n  /** Whether multiple options can be selected or not. */\n  multiple?: boolean\n  /** The orientation of the listbox. <br>Mainly so arrow navigation is done accordingly (left & right vs. up & down) */\n  orientation?: DataOrientation\n  /** The reading direction of the listbox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** When `true`, prevents the user from interacting with listbox */\n  disabled?: boolean\n  /**\n   * How multiple selection should behave in the collection.\n   * @defaultValue 'toggle'\n   */\n  selectionBehavior?: 'toggle' | 'replace'\n  /** When `true`, hover over item will trigger highlight */\n  highlightOnHover?: boolean\n  /** Use this to compare objects by a particular field, or pass your own comparison function for complete control over how objects are compared. */\n  by?: string | ((a: T, b: T) => boolean)\n}\n\nexport type ListboxRootEmits<T = AcceptableValue> = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [value: T]\n  /** Event handler when highlighted element changes. */\n  'highlight': [payload: { ref: HTMLElement, value: T } | undefined]\n  /** Event handler called when container is being focused. Can be prevented. */\n  'entryFocus': [event: CustomEvent]\n  /** Event handler called when the mouse leave the container */\n  'leave': [event: Event]\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableValue = AcceptableValue\">\nimport type { EventHook } from '@vueuse/core'\nimport type { Ref } from 'vue'\nimport { createEventHook, useVModel } from '@vueuse/core'\nimport { isClient } from '@vueuse/shared'\nimport { nextTick, ref, toRefs, watch } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\nimport { compare } from './utils'\n\nconst props = withDefaults(defineProps<ListboxRootProps>(), {\n  selectionBehavior: 'toggle',\n  orientation: 'vertical',\n})\nconst emits = defineEmits<ListboxRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current active value */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { multiple, highlightOnHover, orientation, disabled, selectionBehavior, dir: propDir } = toRefs(props)\nconst { getItems } = useCollection<{ value: T }>({ isProvider: true })\nconst { handleTypeaheadSearch } = useTypeahead()\nconst { primitiveElement, currentElement } = usePrimitiveElement()\nconst kbd = useKbd()\nconst dir = useDirection(propDir)\n\nconst isFormControl = useFormControl(currentElement)\n\nconst firstValue = ref<T>()\nconst isUserAction = ref(false)\nconst focusable = ref(true)\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? (multiple.value ? [] : undefined),\n  passive: (props.modelValue === undefined) as false,\n  deep: true,\n}) as Ref<T | T[] | undefined>\n\nfunction onValueChange(val: T) {\n  isUserAction.value = true\n  if (props.multiple) {\n    const modelArray = Array.isArray(modelValue.value) ? [...modelValue.value] : []\n    const index = modelArray.findIndex(i => compare(i, val, props.by))\n    if (props.selectionBehavior === 'toggle') {\n      index === -1 ? modelArray.push(val) : modelArray.splice(index, 1)\n      modelValue.value = modelArray\n    }\n    else {\n      modelValue.value = [val]\n      firstValue.value = val\n    }\n  }\n  else {\n    if (props.selectionBehavior === 'toggle') {\n      if (compare(modelValue.value, val, props.by))\n        modelValue.value = undefined\n      else\n        modelValue.value = val\n    }\n    else {\n      modelValue.value = val\n    }\n  }\n  setTimeout(() => {\n    isUserAction.value = false\n  }, 1)\n}\n\nconst highlightedElement = ref<HTMLElement | null>(null)\nconst previousElement = ref<HTMLElement | null>(null)\nconst isVirtual = ref(false)\nconst isComposing = ref(false)\nconst virtualFocusHook = createEventHook<{ event?: Event, scroll: boolean }>()\nconst virtualKeydownHook = createEventHook<KeyboardEvent>()\nconst virtualHighlightHook = createEventHook<T>()\n\nfunction getCollectionItem() {\n  return getItems().map(i => i.ref).filter(i => i.dataset.disabled !== '')\n}\n\nfunction changeHighlight(el: HTMLElement, scrollIntoView = true, focus?: boolean) {\n  if (!el)\n    return\n\n  highlightedElement.value = el\n  if (focus ?? focusable.value)\n    highlightedElement.value.focus()\n  if (scrollIntoView)\n    highlightedElement.value.scrollIntoView({ block: 'nearest' })\n\n  const highlightedItem = getItems().find(i => i.ref === el)\n  emits('highlight', highlightedItem)\n}\n\nfunction highlightItem(value: T) {\n  if (isVirtual.value) {\n    // @ts-expect-error known type issue https://github.com/vueuse/vueuse/issues/4610\n    virtualHighlightHook.trigger(value)\n  }\n  else {\n    const item = getItems().find(i => compare(i.value, value, props.by))\n    if (item) {\n      highlightedElement.value = item.ref\n      changeHighlight(item.ref)\n    }\n  }\n}\n\nfunction onKeydownEnter(event: KeyboardEvent) {\n  if (highlightedElement.value && highlightedElement.value.isConnected) {\n    event.preventDefault()\n    event.stopPropagation()\n\n    if (!isComposing.value) {\n      highlightedElement.value.click()\n    }\n  }\n}\n\nfunction onKeydownTypeAhead(event: KeyboardEvent) {\n  if (!focusable.value)\n    return\n  isUserAction.value = true\n  if (isVirtual.value) {\n    virtualKeydownHook.trigger(event)\n  }\n  else {\n    const isMetaKey = event.altKey || event.ctrlKey || event.metaKey\n\n    if (isMetaKey && event.key === 'a' && multiple.value) {\n      const collection = getItems()\n      const values = collection.map(i => i.value)\n      modelValue.value = [...values]\n      event.preventDefault()\n      const lastItem = collection.at(-1)\n      if (lastItem)\n        changeHighlight(lastItem.ref)\n    }\n    else if (!isMetaKey) {\n      const el = handleTypeaheadSearch(event.key, getItems())\n      if (el)\n        changeHighlight(el)\n    }\n  }\n  setTimeout(() => {\n    isUserAction.value = false\n  }, 1)\n}\n\nfunction onCompositionStart() {\n  isComposing.value = true\n}\nfunction onCompositionEnd() {\n  nextTick(() => {\n    isComposing.value = false\n  })\n}\n\nfunction highlightFirstItem() {\n  nextTick(() => {\n    const event = new KeyboardEvent('keydown', { key: 'PageUp' })\n    onKeydownNavigation(event)\n  })\n}\n\nfunction onLeave(event: Event) {\n  const el = highlightedElement.value\n\n  if ((el as Node)?.isConnected) {\n    previousElement.value = el\n  }\n\n  highlightedElement.value = null\n  emits('leave', event)\n}\n\nfunction onEnter(event: Event) {\n  const entryFocusEvent = new CustomEvent('listbox.entryFocus', { bubbles: false, cancelable: true })\n  event.currentTarget?.dispatchEvent(entryFocusEvent)\n  emits('entryFocus', entryFocusEvent)\n\n  if (entryFocusEvent.defaultPrevented)\n    return\n\n  if (previousElement.value) {\n    changeHighlight(previousElement.value)\n  }\n  else {\n    const el = getCollectionItem()?.[0]\n    changeHighlight(el)\n  }\n}\n\nfunction onKeydownNavigation(event: KeyboardEvent) {\n  const intent = getFocusIntent(event, orientation.value, dir.value)\n  if (!intent)\n    return\n\n  let collection = getCollectionItem()\n  if (highlightedElement.value) {\n    if (intent === 'last') {\n      collection.reverse()\n    }\n    else if (intent === 'prev' || intent === 'next') {\n      if (intent === 'prev')\n        collection.reverse()\n\n      const currentIndex = collection.indexOf(highlightedElement.value)\n      collection = collection.slice(currentIndex + 1)\n    }\n    handleMultipleReplace(event, collection[0])\n  }\n\n  if (collection.length) {\n    const index = !highlightedElement.value && intent === 'prev' ? collection.length - 1 : 0\n    changeHighlight(collection[index])\n  }\n\n  if (isVirtual.value)\n    return virtualKeydownHook.trigger(event)\n}\n\nfunction handleMultipleReplace(event: KeyboardEvent, targetEl: HTMLElement) {\n  if (isVirtual.value || props.selectionBehavior !== 'replace' || !multiple.value || !Array.isArray(modelValue.value))\n    return\n  const isMetaKey = event.altKey || event.ctrlKey || event.metaKey\n  if (isMetaKey && !event.shiftKey)\n    return\n\n  if (event.shiftKey) {\n    const collection = getItems().filter(i => i.ref.dataset.disabled !== '')\n    let lastValue = collection.find(i => i.ref === targetEl)?.value\n\n    if (event.key === kbd.END)\n      lastValue = collection.at(-1)?.value\n    else if (event.key === kbd.HOME)\n      lastValue = collection[0]?.value\n\n    if (!lastValue || !firstValue.value)\n      return\n\n    const values = findValuesBetween(collection.map(i => i.value), firstValue.value, lastValue)\n    modelValue.value = values\n  }\n}\n\nasync function highlightSelected(event?: Event, scroll = true) {\n  // highlightSelected is called inside a watch with immediate set to true.\n  // This results in code execution during SSR.\n  // Ensure this code only runs in a browser environment, since it performs\n  // DOM-only side effects (focus, scrollIntoView, synthetic KeyboardEvent).\n  if (!isClient)\n    return\n  await nextTick()\n  if (isVirtual.value) {\n    // Trigger on nextTick for Virtualizer to be mounted.\n    // `scroll` is `false` on the initial mount highlight, so the virtualizer sets\n    // its roving-tabindex target without focusing/scrolling — otherwise a\n    // virtualized Listbox below the fold would pull the page to it on load.\n    virtualFocusHook.trigger({ event, scroll })\n  }\n  else {\n    const collection = getCollectionItem()\n    const item = collection.find(i => i.dataset.state === 'checked')\n    // On the initial (mount) highlight we only set the roving-tabindex target.\n    // Focusing/scrolling here would scroll the page to a Listbox the user never\n    // interacted with (e.g. one below the fold). Later highlights scroll as before.\n    const focus = scroll ? undefined : false\n    if (item)\n      changeHighlight(item, scroll, focus)\n    else if (collection.length)\n      changeHighlight(collection[0], scroll, focus)\n  }\n}\n\n// `false` until the initial (mount) modelValue highlight has been queued.\n// Flipped synchronously in the watcher so the \"is this the mount highlight?\"\n// decision never depends on nextTick ordering, which differs between a client\n// mount and SSR hydration. The intent travels with the call as an argument\n// rather than via a shared flag released on a later tick.\nlet hasHighlightedOnMount = false\n\n// watch for only programmatic changes\nwatch(modelValue, () => {\n  if (!isUserAction.value) {\n    const scroll = hasHighlightedOnMount\n    hasHighlightedOnMount = true\n    nextTick(() => {\n      highlightSelected(undefined, scroll)\n    })\n  }\n}, { immediate: true, deep: true })\n\ndefineExpose({\n  highlightedElement,\n  highlightItem,\n  highlightFirstItem,\n  highlightSelected,\n  getItems,\n})\n\nprovideListboxRootContext({\n  modelValue,\n  // @ts-expect-error ignoring\n  onValueChange,\n  multiple,\n  orientation,\n  dir,\n  disabled,\n  highlightOnHover,\n  highlightedElement,\n  isVirtual,\n  virtualFocusHook,\n  virtualKeydownHook,\n  virtualHighlightHook,\n  by: props.by,\n  firstValue,\n  selectionBehavior,\n\n  focusable,\n  onLeave,\n  onEnter,\n  changeHighlight,\n  onKeydownEnter,\n  onKeydownNavigation,\n  onKeydownTypeAhead,\n  onCompositionStart,\n  onCompositionEnd,\n  highlightFirstItem,\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :dir=\"dir\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    @pointerleave=\"onLeave\"\n    @focusout=\"async (event: FocusEvent) => {\n      const target = (event.relatedTarget || event.target) as HTMLElement | null\n      await nextTick()\n      if (highlightedElement && currentElement && !currentElement.contains(target)) {\n        onLeave(event)\n      }\n    }\"\n  >\n    <slot :model-value=\"modelValue\" />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name\"\n      :name=\"name\"\n      :value=\"modelValue\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '..'\nimport { refAutoReset } from '@vueuse/shared'\nimport { Primitive } from '..'\nimport { injectListboxRootContext } from './ListboxRoot.vue'\n\nexport interface ListboxContentProps extends PrimitiveProps { }\n</script>\n\n<script setup lang=\"ts\">\nimport { useCollection } from '@/Collection'\n\ndefineProps<ListboxContentProps>()\n\nconst { CollectionSlot } = useCollection()\nconst rootContext = injectListboxRootContext()\n\nconst isClickFocus = refAutoReset(false, 10)\n</script>\n\n<template>\n  <CollectionSlot>\n    <Primitive\n      role=\"listbox\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :tabindex=\"rootContext.focusable.value ? rootContext.highlightedElement.value ? '-1' : '0' : '-1'\"\n      :aria-orientation=\"rootContext.orientation.value\"\n      :aria-multiselectable=\"!!rootContext.multiple.value\"\n      :data-orientation=\"rootContext.orientation.value\"\n      @mousedown.left=\"isClickFocus = true\"\n      @focus=\"(ev: FocusEvent) => {\n        if (isClickFocus)\n          return\n        rootContext.onEnter(ev)\n      }\"\n      @keydown.down.up.left.right.home.end=\"(event: KeyboardEvent) => {\n        if (\n          // when orientation is vertical, ignore left/right\n          (\n            rootContext.orientation.value === 'vertical'\n            && (event.key === 'ArrowLeft' || event.key === 'ArrowRight')\n          )\n          // when orientation is horizontal, ignore up/down\n          || (\n            rootContext.orientation.value === 'horizontal'\n            && (event.key === 'ArrowUp' || event.key === 'ArrowDown')\n          )\n        ) {\n          return\n        }\n\n        event.preventDefault()\n        rootContext.focusable.value ? rootContext.onKeydownNavigation(event) : undefined\n      }\"\n      @keydown.enter=\"rootContext.onKeydownEnter\"\n      @keydown=\"rootContext.onKeydownTypeAhead\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionSlot>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '..'\nimport { refAutoReset } from '@vueuse/shared'\nimport { Primitive } from '..'\nimport { injectListboxRootContext } from './ListboxRoot.vue'\n\nexport interface ListboxContentProps extends PrimitiveProps { }\n</script>\n\n<script setup lang=\"ts\">\nimport { useCollection } from '@/Collection'\n\ndefineProps<ListboxContentProps>()\n\nconst { CollectionSlot } = useCollection()\nconst rootContext = injectListboxRootContext()\n\nconst isClickFocus = refAutoReset(false, 10)\n</script>\n\n<template>\n  <CollectionSlot>\n    <Primitive\n      role=\"listbox\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :tabindex=\"rootContext.focusable.value ? rootContext.highlightedElement.value ? '-1' : '0' : '-1'\"\n      :aria-orientation=\"rootContext.orientation.value\"\n      :aria-multiselectable=\"!!rootContext.multiple.value\"\n      :data-orientation=\"rootContext.orientation.value\"\n      @mousedown.left=\"isClickFocus = true\"\n      @focus=\"(ev: FocusEvent) => {\n        if (isClickFocus)\n          return\n        rootContext.onEnter(ev)\n      }\"\n      @keydown.down.up.left.right.home.end=\"(event: KeyboardEvent) => {\n        if (\n          // when orientation is vertical, ignore left/right\n          (\n            rootContext.orientation.value === 'vertical'\n            && (event.key === 'ArrowLeft' || event.key === 'ArrowRight')\n          )\n          // when orientation is horizontal, ignore up/down\n          || (\n            rootContext.orientation.value === 'horizontal'\n            && (event.key === 'ArrowUp' || event.key === 'ArrowDown')\n          )\n        ) {\n          return\n        }\n\n        event.preventDefault()\n        rootContext.focusable.value ? rootContext.onKeydownNavigation(event) : undefined\n      }\"\n      @keydown.enter=\"rootContext.onKeydownEnter\"\n      @keydown=\"rootContext.onKeydownTypeAhead\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionSlot>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '..'\nimport { useVModel } from '@vueuse/core'\nimport { computed, onMounted, onUnmounted, ref, watchSyncEffect } from 'vue'\nimport { usePrimitiveElement } from '@/Primitive'\nimport { useComposing } from '@/shared'\nimport { Primitive } from '..'\nimport { injectListboxRootContext } from './ListboxRoot.vue'\n\nexport interface ListboxFilterProps extends PrimitiveProps {\n  /** The controlled value of the filter. Can be binded with v-model. */\n  modelValue?: string\n  /** Focus on element when mounted. */\n  autoFocus?: boolean\n  /** When `true`, prevents the user from interacting with item */\n  disabled?: boolean\n}\n\nexport type ListboxFilterEmits = {\n  'update:modelValue': [string]\n}\n</script>\n\n<script setup lang=\"ts\">\nconst props = withDefaults(defineProps<ListboxFilterProps>(), {\n  as: 'input',\n})\nconst emits = defineEmits<ListboxFilterEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: '',\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst rootContext = injectListboxRootContext()\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\nconst disabled = computed(() => props.disabled || rootContext.disabled.value || false)\n\nconst activedescendant = ref<string | undefined>()\nwatchSyncEffect(() => activedescendant.value = rootContext.highlightedElement.value?.id)\n\nonMounted(() => {\n  rootContext.focusable.value = false\n\n  setTimeout(() => {\n    // make sure all DOM was flush then only capture the focus\n    if (props.autoFocus)\n      currentElement.value?.focus()\n  }, 1)\n})\n\nonUnmounted(() => {\n  rootContext.focusable.value = true\n})\n\nconst { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing((event) => {\n  modelValue.value = (event.target as HTMLInputElement).value\n  rootContext.onCompositionEnd()\n  rootContext.highlightFirstItem()\n})\n\nfunction onCompositionStart() {\n  rootContext.onCompositionStart()\n  handleCompositionStart()\n}\n\nfunction handleInput(event: InputEvent) {\n  if (isComposing.value)\n    return\n  modelValue.value = (event.target as HTMLInputElement).value\n  rootContext.highlightFirstItem()\n}\n\nfunction handleKeydownNavigation(event: KeyboardEvent) {\n  // Don't navigate mid-composition, arrow keys are used for IME candidate navigation\n  if (isComposing.value)\n    return\n  event.preventDefault()\n  rootContext.onKeydownNavigation(event)\n}\n\nfunction handleKeydownEnter(event: KeyboardEvent) {\n  // Don't select mid-composition, Enter commits the IME candidate\n  if (isComposing.value)\n    return\n  rootContext.onKeydownEnter(event)\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :value=\"modelValue\"\n    :disabled=\"disabled ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :aria-disabled=\"disabled ?? undefined\"\n    :aria-activedescendant=\"activedescendant\"\n    type=\"text\"\n    @keydown.down.up.home.end=\"handleKeydownNavigation\"\n    @keydown.enter=\"handleKeydownEnter\"\n    @input=\"handleInput\"\n    @compositionstart=\"onCompositionStart\"\n    @compositionend=\"handleCompositionEnd\"\n  >\n    <slot :model-value=\"modelValue\" />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '..'\nimport { useVModel } from '@vueuse/core'\nimport { computed, onMounted, onUnmounted, ref, watchSyncEffect } from 'vue'\nimport { usePrimitiveElement } from '@/Primitive'\nimport { useComposing } from '@/shared'\nimport { Primitive } from '..'\nimport { injectListboxRootContext } from './ListboxRoot.vue'\n\nexport interface ListboxFilterProps extends PrimitiveProps {\n  /** The controlled value of the filter. Can be binded with v-model. */\n  modelValue?: string\n  /** Focus on element when mounted. */\n  autoFocus?: boolean\n  /** When `true`, prevents the user from interacting with item */\n  disabled?: boolean\n}\n\nexport type ListboxFilterEmits = {\n  'update:modelValue': [string]\n}\n</script>\n\n<script setup lang=\"ts\">\nconst props = withDefaults(defineProps<ListboxFilterProps>(), {\n  as: 'input',\n})\nconst emits = defineEmits<ListboxFilterEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: '',\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst rootContext = injectListboxRootContext()\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\nconst disabled = computed(() => props.disabled || rootContext.disabled.value || false)\n\nconst activedescendant = ref<string | undefined>()\nwatchSyncEffect(() => activedescendant.value = rootContext.highlightedElement.value?.id)\n\nonMounted(() => {\n  rootContext.focusable.value = false\n\n  setTimeout(() => {\n    // make sure all DOM was flush then only capture the focus\n    if (props.autoFocus)\n      currentElement.value?.focus()\n  }, 1)\n})\n\nonUnmounted(() => {\n  rootContext.focusable.value = true\n})\n\nconst { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing((event) => {\n  modelValue.value = (event.target as HTMLInputElement).value\n  rootContext.onCompositionEnd()\n  rootContext.highlightFirstItem()\n})\n\nfunction onCompositionStart() {\n  rootContext.onCompositionStart()\n  handleCompositionStart()\n}\n\nfunction handleInput(event: InputEvent) {\n  if (isComposing.value)\n    return\n  modelValue.value = (event.target as HTMLInputElement).value\n  rootContext.highlightFirstItem()\n}\n\nfunction handleKeydownNavigation(event: KeyboardEvent) {\n  // Don't navigate mid-composition, arrow keys are used for IME candidate navigation\n  if (isComposing.value)\n    return\n  event.preventDefault()\n  rootContext.onKeydownNavigation(event)\n}\n\nfunction handleKeydownEnter(event: KeyboardEvent) {\n  // Don't select mid-composition, Enter commits the IME candidate\n  if (isComposing.value)\n    return\n  rootContext.onKeydownEnter(event)\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :value=\"modelValue\"\n    :disabled=\"disabled ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :aria-disabled=\"disabled ?? undefined\"\n    :aria-activedescendant=\"activedescendant\"\n    type=\"text\"\n    @keydown.down.up.home.end=\"handleKeydownNavigation\"\n    @keydown.enter=\"handleKeydownEnter\"\n    @input=\"handleInput\"\n    @compositionstart=\"onCompositionStart\"\n    @compositionend=\"handleCompositionEnd\"\n  >\n    <slot :model-value=\"modelValue\" />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useId } from '@/shared'\n\nexport interface ListboxGroupProps extends PrimitiveProps {}\n\ninterface ListboxGroupContext {\n  id: string\n}\n\nexport const [injectListboxGroupContext, provideListboxGroupContext]\n  = createContext<ListboxGroupContext>('ListboxGroup')\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<ListboxGroupProps>()\n\nconst id = useId(undefined, 'reka-listbox-group')\nprovideListboxGroupContext({ id })\n</script>\n\n<template>\n  <Primitive\n    role=\"group\"\n    v-bind=\"props\"\n    :aria-labelledby=\"id\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useId } from '@/shared'\n\nexport interface ListboxGroupProps extends PrimitiveProps {}\n\ninterface ListboxGroupContext {\n  id: string\n}\n\nexport const [injectListboxGroupContext, provideListboxGroupContext]\n  = createContext<ListboxGroupContext>('ListboxGroup')\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<ListboxGroupProps>()\n\nconst id = useId(undefined, 'reka-listbox-group')\nprovideListboxGroupContext({ id })\n</script>\n\n<template>\n  <Primitive\n    role=\"group\"\n    v-bind=\"props\"\n    :aria-labelledby=\"id\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ListboxGroupLabelProps extends PrimitiveProps {\n  for?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectListboxGroupContext } from './ListboxGroup.vue'\n\nconst props = withDefaults(defineProps<ListboxGroupLabelProps>(), {\n  as: 'div',\n})\n\nconst groupContext = injectListboxGroupContext({ id: '' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"groupContext.id\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ListboxGroupLabelProps extends PrimitiveProps {\n  for?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectListboxGroupContext } from './ListboxGroup.vue'\n\nconst props = withDefaults(defineProps<ListboxGroupLabelProps>(), {\n  as: 'div',\n})\n\nconst groupContext = injectListboxGroupContext({ id: '' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"groupContext.id\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport { createContext, handleAndDispatchCustomEvent, useForwardExpose, useId } from '@/shared'\n\nexport interface ListboxItemProps<T = AcceptableValue> extends PrimitiveProps {\n  /** The value given as data when submitted with a `name`. */\n  value: T\n  /** When `true`, prevents the user from interacting with the item. */\n  disabled?: boolean\n}\nexport type SelectEvent<T> = CustomEvent<{ originalEvent: PointerEvent, value?: T }>\n\nexport type ListboxItemEmits<T = AcceptableValue> = {\n  /** Event handler called when the selecting item. <br> It can be prevented by calling `event.preventDefault`. */\n  select: [event: SelectEvent<T>]\n}\n\nconst LISTBOX_SELECT = 'listbox.select'\n\ninterface ListboxItemContext {\n  isSelected: Ref<boolean>\n}\n\nexport const [injectListboxItemContext, provideListboxItemContext]\n  = createContext<ListboxItemContext>('ListboxItem')\n</script>\n\n<script setup lang=\"ts\"  generic=\"T extends AcceptableValue = AcceptableValue\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '..'\nimport type { AcceptableValue } from '@/shared/types'\nimport { computed } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { Primitive } from '..'\nimport { injectListboxRootContext } from './ListboxRoot.vue'\nimport { valueComparator } from './utils'\n\nconst props = withDefaults(defineProps<ListboxItemProps<T>>(), {\n  as: 'div',\n})\nconst emits = defineEmits<ListboxItemEmits<T>>()\n\nconst id = useId(undefined, 'reka-listbox-item')\nconst { CollectionItem } = useCollection()\nconst { forwardRef, currentElement } = useForwardExpose()\nconst rootContext = injectListboxRootContext()\n\nconst isHighlighted = computed(() => currentElement.value != null && currentElement.value === rootContext.highlightedElement.value)\nconst isSelected = computed(() => valueComparator(rootContext.modelValue.value, props.value, rootContext.by))\n\nconst disabled = computed(() => rootContext.disabled.value || props.disabled)\n\nasync function handleSelect(ev: SelectEvent<T>) {\n  emits('select', ev)\n  if (ev?.defaultPrevented)\n    return\n\n  if (!disabled.value && ev) {\n    rootContext.onValueChange(props.value)\n    rootContext.changeHighlight(currentElement.value)\n  }\n}\n\nfunction handleSelectCustomEvent(ev: PointerEvent) {\n  const eventDetail = { originalEvent: ev, value: props.value as T }\n  handleAndDispatchCustomEvent(LISTBOX_SELECT, handleSelect, eventDetail)\n}\n\nprovideListboxItemContext({\n  isSelected,\n})\n</script>\n\n<template>\n  <CollectionItem :value=\"value\">\n    <Primitive\n      :id=\"id\"\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      v-memo=\"[isHighlighted, isSelected, disabled, rootContext.focusable.value]\"\n      role=\"option\"\n      :tabindex=\"rootContext.focusable.value ? isHighlighted ? '0' : '-1' : -1\"\n      :aria-selected=\"isSelected\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :disabled=\"disabled ? '' : undefined\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :data-highlighted=\"isHighlighted ? '' : undefined\"\n      :data-state=\"isSelected ? 'checked' : 'unchecked'\"\n      @click=\"handleSelectCustomEvent\"\n      @keydown.space.prevent=\"handleSelectCustomEvent\"\n      @pointermove=\"() => {\n        if (rootContext.highlightedElement.value === currentElement)\n          return\n\n        if (rootContext.highlightOnHover.value)\n          rootContext.changeHighlight(currentElement, false, false)\n      }\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionItem>\n</template>\n","<script lang=\"ts\">\nimport { createContext, handleAndDispatchCustomEvent, useForwardExpose, useId } from '@/shared'\n\nexport interface ListboxItemProps<T = AcceptableValue> extends PrimitiveProps {\n  /** The value given as data when submitted with a `name`. */\n  value: T\n  /** When `true`, prevents the user from interacting with the item. */\n  disabled?: boolean\n}\nexport type SelectEvent<T> = CustomEvent<{ originalEvent: PointerEvent, value?: T }>\n\nexport type ListboxItemEmits<T = AcceptableValue> = {\n  /** Event handler called when the selecting item. <br> It can be prevented by calling `event.preventDefault`. */\n  select: [event: SelectEvent<T>]\n}\n\nconst LISTBOX_SELECT = 'listbox.select'\n\ninterface ListboxItemContext {\n  isSelected: Ref<boolean>\n}\n\nexport const [injectListboxItemContext, provideListboxItemContext]\n  = createContext<ListboxItemContext>('ListboxItem')\n</script>\n\n<script setup lang=\"ts\"  generic=\"T extends AcceptableValue = AcceptableValue\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '..'\nimport type { AcceptableValue } from '@/shared/types'\nimport { computed } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { Primitive } from '..'\nimport { injectListboxRootContext } from './ListboxRoot.vue'\nimport { valueComparator } from './utils'\n\nconst props = withDefaults(defineProps<ListboxItemProps<T>>(), {\n  as: 'div',\n})\nconst emits = defineEmits<ListboxItemEmits<T>>()\n\nconst id = useId(undefined, 'reka-listbox-item')\nconst { CollectionItem } = useCollection()\nconst { forwardRef, currentElement } = useForwardExpose()\nconst rootContext = injectListboxRootContext()\n\nconst isHighlighted = computed(() => currentElement.value != null && currentElement.value === rootContext.highlightedElement.value)\nconst isSelected = computed(() => valueComparator(rootContext.modelValue.value, props.value, rootContext.by))\n\nconst disabled = computed(() => rootContext.disabled.value || props.disabled)\n\nasync function handleSelect(ev: SelectEvent<T>) {\n  emits('select', ev)\n  if (ev?.defaultPrevented)\n    return\n\n  if (!disabled.value && ev) {\n    rootContext.onValueChange(props.value)\n    rootContext.changeHighlight(currentElement.value)\n  }\n}\n\nfunction handleSelectCustomEvent(ev: PointerEvent) {\n  const eventDetail = { originalEvent: ev, value: props.value as T }\n  handleAndDispatchCustomEvent(LISTBOX_SELECT, handleSelect, eventDetail)\n}\n\nprovideListboxItemContext({\n  isSelected,\n})\n</script>\n\n<template>\n  <CollectionItem :value=\"value\">\n    <Primitive\n      :id=\"id\"\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      v-memo=\"[isHighlighted, isSelected, disabled, rootContext.focusable.value]\"\n      role=\"option\"\n      :tabindex=\"rootContext.focusable.value ? isHighlighted ? '0' : '-1' : -1\"\n      :aria-selected=\"isSelected\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :disabled=\"disabled ? '' : undefined\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :data-highlighted=\"isHighlighted ? '' : undefined\"\n      :data-state=\"isSelected ? 'checked' : 'unchecked'\"\n      @click=\"handleSelectCustomEvent\"\n      @keydown.space.prevent=\"handleSelectCustomEvent\"\n      @pointermove=\"() => {\n        if (rootContext.highlightedElement.value === currentElement)\n          return\n\n        if (rootContext.highlightOnHover.value)\n          rootContext.changeHighlight(currentElement, false, false)\n      }\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionItem>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ListboxItemIndicatorProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectListboxItemContext } from './ListboxItem.vue'\n\nconst props = withDefaults(defineProps<ListboxItemIndicatorProps>(), {\n  as: 'span',\n})\n\nuseForwardExpose()\nconst itemContext = injectListboxItemContext()\n</script>\n\n<template>\n  <Primitive\n    v-if=\"itemContext.isSelected.value\"\n    aria-hidden=\"true\"\n    v-bind=\"props\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ListboxItemIndicatorProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectListboxItemContext } from './ListboxItem.vue'\n\nconst props = withDefaults(defineProps<ListboxItemIndicatorProps>(), {\n  as: 'span',\n})\n\nuseForwardExpose()\nconst itemContext = injectListboxItemContext()\n</script>\n\n<template>\n  <Primitive\n    v-if=\"itemContext.isSelected.value\"\n    aria-hidden=\"true\"\n    v-bind=\"props\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","// Lazy materialization for the lanes===1 fast path. Backed by a\n// Float64Array (stride 2: start, size, …); VirtualItems are constructed on\n// first indexed read and cached. Saves the per-item object allocation at\n// large list counts where most items are never visible.\n\nimport type { VirtualItem } from './index'\n\ntype Key = number | string | bigint\n\nexport function createLazyMeasurementsView(\n  count: number,\n  flat: Float64Array,\n  getItemKey: (i: number) => Key,\n): Array<VirtualItem> {\n  const cache: Array<VirtualItem | undefined> = new Array(count)\n  return new Proxy(cache as any, {\n    get(target, prop, receiver) {\n      if (typeof prop === 'string') {\n        // Cheap digit-prefix sniff before number coerce.\n        const c = prop.charCodeAt(0)\n        if (c >= 48 && c <= 57) {\n          const i = +prop\n          if (Number.isInteger(i) && i >= 0 && i < count) {\n            let v = target[i]\n            if (!v) {\n              const s = flat[i * 2]!\n              v = target[i] = {\n                index: i,\n                key: getItemKey(i),\n                start: s,\n                size: flat[i * 2 + 1]!,\n                end: s + flat[i * 2 + 1]!,\n                lane: 0,\n              }\n            }\n            return v\n          }\n        }\n        if (prop === 'length') return count\n      }\n      return Reflect.get(target, prop, receiver)\n    },\n  }) as Array<VirtualItem>\n}\n","export type NoInfer<A extends any> = [A][A extends any ? 0 : never]\n\nexport type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>\n\nexport function memo<TDeps extends ReadonlyArray<any>, TResult>(\n  getDeps: () => [...TDeps],\n  fn: (...args: NoInfer<[...TDeps]>) => TResult,\n  opts: {\n    key: false | string\n    debug?: () => boolean\n    onChange?: (result: TResult) => void\n    initialDeps?: TDeps\n    skipInitialOnChange?: boolean\n  },\n) {\n  let deps = opts.initialDeps ?? []\n  let result: TResult | undefined\n  let isInitial = true\n\n  function memoizedFunction(): TResult {\n    // Debug-only timing. In production builds, `process.env.NODE_ENV !==\n    // 'production'` is constant-folded to `false` by downstream minifiers\n    // (Terser/esbuild/swc with `define`), which DCEs the entire block.\n    const debugEnabled =\n      process.env.NODE_ENV !== 'production' && !!opts.key && !!opts.debug?.()\n    let depTime = 0\n    if (debugEnabled) depTime = Date.now()\n\n    const newDeps = getDeps()\n\n    const depsChanged =\n      newDeps.length !== deps.length ||\n      newDeps.some((dep: any, index: number) => deps[index] !== dep)\n\n    if (!depsChanged) {\n      return result!\n    }\n\n    deps = newDeps\n\n    let resultTime = 0\n    if (debugEnabled) resultTime = Date.now()\n\n    result = fn(...newDeps)\n\n    if (debugEnabled) {\n      const depEndTime = Math.round((Date.now() - depTime) * 100) / 100\n      const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100\n      const resultFpsPercentage = resultEndTime / 16\n\n      const pad = (str: number | string, num: number) => {\n        str = String(str)\n        while (str.length < num) {\n          str = ' ' + str\n        }\n        return str\n      }\n\n      console.info(\n        `%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,\n        `\n            font-size: .6rem;\n            font-weight: bold;\n            color: hsl(${Math.max(\n              0,\n              Math.min(120 - 120 * resultFpsPercentage, 120),\n            )}deg 100% 31%);`,\n        opts?.key,\n      )\n    }\n\n    if (opts?.onChange && !(isInitial && opts.skipInitialOnChange)) {\n      opts.onChange(result)\n    }\n\n    isInitial = false\n\n    return result\n  }\n\n  // Attach updateDeps to the function itself\n  memoizedFunction.updateDeps = (newDeps: [...TDeps]) => {\n    deps = newDeps\n  }\n\n  return memoizedFunction\n}\n\nexport function notUndefined<T>(value: T | undefined, msg?: string): T {\n  if (value === undefined) {\n    throw new Error(`Unexpected undefined${msg ? `: ${msg}` : ''}`)\n  } else {\n    return value\n  }\n}\n\nexport const approxEqual = (a: number, b: number) => Math.abs(a - b) < 1.01\n\nexport const debounce = (\n  targetWindow: Window & typeof globalThis,\n  fn: Function,\n  ms: number,\n) => {\n  let timeoutId: number\n  return function (this: any, ...args: Array<any>) {\n    targetWindow.clearTimeout(timeoutId)\n    timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms)\n  }\n}\n","import { createLazyMeasurementsView } from './lazy-measurements'\nimport { approxEqual, debounce, memo, notUndefined } from './utils'\n\n// Browser-aware iOS detection. Programmatic `scrollTo`/`scrollTop` writes\n// during a momentum-scroll cancel the momentum on iOS WebKit, so we defer\n// scroll-position adjustments triggered by mid-scroll resizes until the\n// scroll settles. SSR-safe (returns false when navigator is unavailable).\nlet _isIOSResult: boolean | undefined\nconst isIOSWebKit = (): boolean => {\n  if (_isIOSResult !== undefined) return _isIOSResult\n  if (typeof navigator === 'undefined') return (_isIOSResult = false)\n  if (/iP(hone|od|ad)/.test(navigator.userAgent)) return (_isIOSResult = true)\n  // iPadOS 13+ reports as MacIntel; touch-points distinguishes it from desktop.\n  const mtp = (navigator as Navigator & { maxTouchPoints?: number })\n    .maxTouchPoints\n  return (_isIOSResult =\n    navigator.platform === 'MacIntel' && mtp !== undefined && mtp > 0)\n}\n\n// Test hook: reset the iOS detection cache. Not exported.\nexport const _resetIOSDetectionForTests = () => {\n  _isIOSResult = undefined\n}\n\nexport { approxEqual, debounce, memo, notUndefined } from './utils'\nexport type { NoInfer, PartialKeys } from './utils'\n\n//\n\ntype ScrollDirection = 'forward' | 'backward'\n\ntype ScrollAlignment = 'start' | 'center' | 'end' | 'auto'\n\ntype ScrollBehavior = 'auto' | 'smooth' | 'instant'\n\ntype ScrollAnchor = 'start' | 'end'\n\ntype FollowOnAppend = boolean | ScrollBehavior\n\nexport interface ScrollToOptions {\n  align?: ScrollAlignment\n  behavior?: ScrollBehavior\n}\n\ntype ScrollToOffsetOptions = ScrollToOptions\n\ntype ScrollToIndexOptions = ScrollToOptions\n\ntype ScrollToEndOptions = Pick<ScrollToOptions, 'behavior'>\n\nexport interface Range {\n  startIndex: number\n  endIndex: number\n  overscan: number\n  count: number\n}\n\ntype Key = number | string | bigint\n\nexport interface VirtualItem {\n  key: Key\n  index: number\n  start: number\n  end: number\n  size: number\n  lane: number\n}\n\nexport interface Rect {\n  width: number\n  height: number\n}\n\n//\n\nconst getRect = (element: HTMLElement): Rect => {\n  const { offsetWidth, offsetHeight } = element\n  return { width: offsetWidth, height: offsetHeight }\n}\n\nexport const defaultKeyExtractor = (index: number) => index\n\nexport const defaultRangeExtractor = (range: Range) => {\n  const start = Math.max(range.startIndex - range.overscan, 0)\n  const end = Math.min(range.endIndex + range.overscan, range.count - 1)\n  const len = end - start + 1\n\n  const arr = new Array<number>(len)\n  for (let i = 0; i < len; i++) {\n    arr[i] = start + i\n  }\n  return arr\n}\n\nexport const observeElementRect = <T extends Element>(\n  instance: Virtualizer<T, any>,\n  cb: (rect: Rect) => void,\n) => {\n  const element = instance.scrollElement\n  if (!element) {\n    return\n  }\n  const targetWindow = instance.targetWindow\n  if (!targetWindow) {\n    return\n  }\n\n  const handler = (rect: Rect) => {\n    const { width, height } = rect\n    cb({ width: Math.round(width), height: Math.round(height) })\n  }\n\n  handler(getRect(element as unknown as HTMLElement))\n\n  if (!targetWindow.ResizeObserver) {\n    return () => {}\n  }\n\n  const observer = new targetWindow.ResizeObserver((entries) => {\n    const run = () => {\n      const entry = entries[0]\n      if (entry?.borderBoxSize) {\n        const box = entry.borderBoxSize[0]\n        if (box) {\n          handler({ width: box.inlineSize, height: box.blockSize })\n          return\n        }\n      }\n      handler(getRect(element as unknown as HTMLElement))\n    }\n\n    instance.options.useAnimationFrameWithResizeObserver\n      ? requestAnimationFrame(run)\n      : run()\n  })\n\n  observer.observe(element, { box: 'border-box' })\n\n  return () => {\n    observer.unobserve(element)\n  }\n}\n\nconst addEventListenerOptions = {\n  passive: true,\n}\n\nexport const observeWindowRect = (\n  instance: Virtualizer<Window, any>,\n  cb: (rect: Rect) => void,\n) => {\n  const element = instance.scrollElement\n  if (!element) {\n    return\n  }\n\n  const handler = () => {\n    cb({ width: element.innerWidth, height: element.innerHeight })\n  }\n  handler()\n\n  element.addEventListener('resize', handler, addEventListenerOptions)\n\n  return () => {\n    element.removeEventListener('resize', handler)\n  }\n}\n\nconst supportsScrollend =\n  typeof window == 'undefined' ? true : 'onscrollend' in window\n\ntype ObserveOffsetCallBack = (offset: number, isScrolling: boolean) => void\n\n// Shared core: both element and window variants attach scroll/scrollend\n// listeners with the same lifecycle; they only differ in how to read the\n// current offset from the scroll target.\nconst observeOffset = <T extends Element | Window>(\n  instance: Virtualizer<T, any>,\n  cb: ObserveOffsetCallBack,\n  readOffset: (target: T) => number,\n) => {\n  const element = instance.scrollElement\n  if (!element) {\n    return\n  }\n  const targetWindow = instance.targetWindow\n  if (!targetWindow) {\n    return\n  }\n\n  const registerScrollendEvent =\n    instance.options.useScrollendEvent && supportsScrollend\n\n  let offset = 0\n  const fallback = registerScrollendEvent\n    ? null\n    : debounce(\n        targetWindow,\n        () => cb(offset, false),\n        instance.options.isScrollingResetDelay,\n      )\n\n  const createHandler = (isScrolling: boolean) => () => {\n    offset = readOffset(element)\n    fallback?.()\n    cb(offset, isScrolling)\n  }\n  const handler = createHandler(true)\n  const endHandler = createHandler(false)\n\n  element.addEventListener('scroll', handler, addEventListenerOptions)\n  if (registerScrollendEvent) {\n    element.addEventListener('scrollend', endHandler, addEventListenerOptions)\n  }\n  return () => {\n    element.removeEventListener('scroll', handler)\n    if (registerScrollendEvent) {\n      element.removeEventListener('scrollend', endHandler)\n    }\n  }\n}\n\nexport const observeElementOffset = <T extends Element>(\n  instance: Virtualizer<T, any>,\n  cb: ObserveOffsetCallBack,\n) =>\n  observeOffset(instance, cb, (el) => {\n    const { horizontal, isRtl } = instance.options\n    return horizontal ? el.scrollLeft * ((isRtl && -1) || 1) : el.scrollTop\n  })\n\nexport const observeWindowOffset = (\n  instance: Virtualizer<Window, any>,\n  cb: ObserveOffsetCallBack,\n) =>\n  observeOffset(instance, cb, (win) =>\n    instance.options.horizontal ? win.scrollX : win.scrollY,\n  )\n\nexport const measureElement = <TItemElement extends Element>(\n  element: TItemElement,\n  entry: ResizeObserverEntry | undefined,\n  instance: Virtualizer<any, TItemElement>,\n) => {\n  // When useCachedMeasurements is enabled, return the cached size\n  // (or estimateSize as fallback) instead of measuring the DOM.\n  if (instance.options.useCachedMeasurements) {\n    const index = instance.indexFromElement(element)\n    const key = instance.options.getItemKey(index)\n    return (\n      instance.itemSizeCache.get(key) ?? instance.options.estimateSize(index)\n    )\n  }\n\n  if (entry?.borderBoxSize) {\n    const box = entry.borderBoxSize[0]\n    if (box) {\n      const size = Math.round(\n        box[instance.options.horizontal ? 'inlineSize' : 'blockSize'],\n      )\n      return size\n    }\n  }\n\n  // When called without a ResizeObserverEntry (sync measurement path),\n  // return the previously measured size if available. This avoids a\n  // synchronous layout read (offsetWidth/offsetHeight) on re-renders.\n  // The ResizeObserver is already observing the element and will deliver\n  // the accurate size asynchronously if it changed.\n  // Users who need synchronous DOM reads can provide a custom measureElement.\n  if (!entry) {\n    const index = instance.indexFromElement(element)\n    const key = instance.options.getItemKey(index)\n    const cachedSize = instance.itemSizeCache.get(key)\n    if (cachedSize !== undefined) {\n      return cachedSize\n    }\n  }\n\n  return (element as unknown as HTMLElement)[\n    instance.options.horizontal ? 'offsetWidth' : 'offsetHeight'\n  ]\n}\n\nconst scrollWithAdjustments = (\n  offset: number,\n  {\n    adjustments = 0,\n    behavior,\n  }: { adjustments?: number; behavior?: ScrollBehavior },\n  instance: Virtualizer<any, any>,\n) => {\n  instance.scrollElement?.scrollTo?.({\n    [instance.options.horizontal ? 'left' : 'top']: offset + adjustments,\n    behavior,\n  })\n}\n\nexport const windowScroll: <T extends Window>(\n  offset: number,\n  options: { adjustments?: number; behavior?: ScrollBehavior },\n  instance: Virtualizer<T, any>,\n) => void = scrollWithAdjustments\n\nexport const elementScroll: <T extends Element>(\n  offset: number,\n  options: { adjustments?: number; behavior?: ScrollBehavior },\n  instance: Virtualizer<T, any>,\n) => void = scrollWithAdjustments\n\ntype LaneAssignmentMode = 'estimate' | 'measured'\n\nexport interface VirtualizerOptions<\n  TScrollElement extends Element | Window,\n  TItemElement extends Element,\n> {\n  // Required from the user\n  count: number\n  getScrollElement: () => TScrollElement | null\n  estimateSize: (index: number) => number\n\n  // Required from the framework adapter (but can be overridden)\n  scrollToFn: (\n    offset: number,\n    options: { adjustments?: number; behavior?: ScrollBehavior },\n    instance: Virtualizer<TScrollElement, TItemElement>,\n  ) => void\n  observeElementRect: (\n    instance: Virtualizer<TScrollElement, TItemElement>,\n    cb: (rect: Rect) => void,\n  ) => void | (() => void)\n  observeElementOffset: (\n    instance: Virtualizer<TScrollElement, TItemElement>,\n    cb: ObserveOffsetCallBack,\n  ) => void | (() => void)\n  // Optional\n  debug?: boolean\n  initialRect?: Rect\n  onChange?: (\n    instance: Virtualizer<TScrollElement, TItemElement>,\n    sync: boolean,\n  ) => void\n  measureElement?: (\n    element: TItemElement,\n    entry: ResizeObserverEntry | undefined,\n    instance: Virtualizer<TScrollElement, TItemElement>,\n  ) => number\n  overscan?: number\n  horizontal?: boolean\n  paddingStart?: number\n  paddingEnd?: number\n  scrollPaddingStart?: number\n  scrollPaddingEnd?: number\n  initialOffset?: number | (() => number)\n  getItemKey?: (index: number) => Key\n  rangeExtractor?: (range: Range) => Array<number>\n  scrollMargin?: number\n  gap?: number\n  indexAttribute?: string\n  initialMeasurementsCache?: Array<VirtualItem>\n  lanes?: number\n  anchorTo?: ScrollAnchor\n  followOnAppend?: FollowOnAppend\n  scrollEndThreshold?: number\n  isScrollingResetDelay?: number\n  useScrollendEvent?: boolean\n  enabled?: boolean\n  isRtl?: boolean\n  useAnimationFrameWithResizeObserver?: boolean\n  laneAssignmentMode?: LaneAssignmentMode\n  useCachedMeasurements?: boolean\n}\n\ntype ScrollState = {\n  // what we want\n  index: number | null\n  align: ScrollAlignment\n  behavior: ScrollBehavior\n\n  // lifecycle\n  startedAt: number\n\n  // target tracking\n  lastTargetOffset: number\n\n  // settling\n  stableFrames: number\n}\n\ntype PendingScrollAnchor = [\n  key: Key | null,\n  offset: number,\n  followOnAppend: ScrollBehavior | null,\n  anchorDelta: number,\n]\n\nexport class Virtualizer<\n  TScrollElement extends Element | Window,\n  TItemElement extends Element,\n> {\n  private unsubs: Array<void | (() => void)> = []\n  options!: Required<VirtualizerOptions<TScrollElement, TItemElement>>\n  scrollElement: TScrollElement | null = null\n  targetWindow: (Window & typeof globalThis) | null = null\n  isScrolling = false\n  private scrollState: ScrollState | null = null\n  measurementsCache: Array<VirtualItem> = []\n  // Flat backing store for the lanes===1 fast path: [start_0, size_0, start_1, size_1, ...].\n  // null until the first single-lane build; reused (and grown) across rebuilds.\n  private _flatMeasurements: Float64Array | null = null\n  itemSizeCache = new Map<Key, number>()\n  private itemSizeCacheVersion = 0\n  private laneAssignments = new Map<number, number>() // index → lane cache\n  // Earliest index dirtied since last getMeasurements() rebuild, or null.\n  private pendingMin: number | null = null\n  private prevLanes: number | undefined = undefined\n  private lanesChangedFlag = false\n  private lanesSettling = false\n  private pendingScrollAnchor: PendingScrollAnchor | null = null\n  scrollRect: Rect | null = null\n  scrollOffset: number | null = null\n  scrollDirection: ScrollDirection | null = null\n  private scrollAdjustments = 0\n  // Sum of size-change deltas above-viewport that were skipped during\n  // iOS momentum scroll (writing scrollTop mid-momentum cancels it).\n  // Flushed in a single scrollTo when iOS is fully settled.\n  private _iosDeferredAdjustment = 0\n  // Touch state. iOS WebKit cancels momentum when scrollTop is written, so\n  // we defer adjustments not only during `isScrolling` but also through the\n  // touchstart→touchend window (active drag) and a short tail after\n  // touchend (early-momentum window — iOS only fires touch events once at\n  // the start of momentum, so we use a timer rather than another event).\n  private _iosTouching = false\n  private _iosJustTouchEnded = false\n  private _iosTouchEndTimerId: number | null = null\n  // Subpixel reconciliation. Safari (and Chrome/Firefox under certain DPRs)\n  // round scrollTop/scrollLeft writes to integer pixels. If we wrote 12345.5\n  // but the browser reports back 12346, the next reconcileScroll sees a\n  // \"target changed\" and re-fires scrollTo — a feedback loop that the\n  // approxEqual(<1.01) tolerance otherwise absorbs as a workaround.\n  // By remembering the intended value of our most-recent self-driven\n  // scrollTo, we can match the browser's rounded read back to the intended\n  // value when the diff is < 1.5 px, distinguishing it from a real user\n  // scroll. The +0.5 over Math.abs lets us also absorb the +1 / -1 cases.\n  private _intendedScrollOffset: number | null = null\n  shouldAdjustScrollPositionOnItemSizeChange:\n    | undefined\n    | ((\n        item: VirtualItem,\n        delta: number,\n        instance: Virtualizer<TScrollElement, TItemElement>,\n      ) => boolean)\n  elementsCache = new Map<Key, TItemElement>()\n  private now = () => this.targetWindow?.performance?.now?.() ?? Date.now()\n  private observer = (() => {\n    let _ro: ResizeObserver | null = null\n\n    const get = () => {\n      if (_ro) {\n        return _ro\n      }\n\n      if (!this.targetWindow || !this.targetWindow.ResizeObserver) {\n        return null\n      }\n\n      return (_ro = new this.targetWindow.ResizeObserver((entries) => {\n        entries.forEach((entry) => {\n          const run = () => {\n            const node = entry.target as TItemElement\n            const index = this.indexFromElement(node)\n\n            if (!node.isConnected) {\n              this.observer.unobserve(node)\n              // Find the cache entry pointing to this exact node and remove\n              // it. We can't call getItemKey(index) here because items may\n              // have been removed since this node was rendered — the index\n              // could be stale and out-of-bounds in the user's data array\n              // (regression test in e2e/.../stale-index.spec.ts, fix #1148).\n              // The === comparison naturally handles the React-replaced-\n              // a-node-for-the-same-key case: that entry now points to a\n              // different node, so this loop won't match.\n              for (const [cacheKey, cachedNode] of this.elementsCache) {\n                if (cachedNode === node) {\n                  this.elementsCache.delete(cacheKey)\n                  break\n                }\n              }\n              return\n            }\n\n            if (this.shouldMeasureDuringScroll(index)) {\n              this.resizeItem(\n                index,\n                this.options.measureElement(node, entry, this),\n              )\n            }\n          }\n          this.options.useAnimationFrameWithResizeObserver\n            ? requestAnimationFrame(run)\n            : run()\n        })\n      }))\n    }\n\n    return {\n      disconnect: () => {\n        get()?.disconnect()\n        _ro = null\n      },\n      observe: (target: Element) =>\n        get()?.observe(target, { box: 'border-box' }),\n      unobserve: (target: Element) => get()?.unobserve(target),\n    }\n  })()\n  range: { startIndex: number; endIndex: number } | null = null\n\n  constructor(opts: VirtualizerOptions<TScrollElement, TItemElement>) {\n    this.setOptions(opts)\n  }\n\n  setOptions = (opts: VirtualizerOptions<TScrollElement, TItemElement>) => {\n    // Skip `{...defaults, ...opts}` because explicit `undefined` values in\n    // opts would override defaults with `undefined`.\n    const merged = {\n      debug: false,\n      initialOffset: 0,\n      overscan: 1,\n      paddingStart: 0,\n      paddingEnd: 0,\n      scrollPaddingStart: 0,\n      scrollPaddingEnd: 0,\n      horizontal: false,\n      getItemKey: defaultKeyExtractor,\n      rangeExtractor: defaultRangeExtractor,\n      onChange: () => {},\n      measureElement,\n      initialRect: { width: 0, height: 0 },\n      scrollMargin: 0,\n      gap: 0,\n      indexAttribute: 'data-index',\n      initialMeasurementsCache: [],\n      lanes: 1,\n      anchorTo: 'start',\n      followOnAppend: false,\n      scrollEndThreshold: 1,\n      isScrollingResetDelay: 150,\n      enabled: true,\n      isRtl: false,\n      useScrollendEvent: false,\n      useAnimationFrameWithResizeObserver: false,\n      laneAssignmentMode: 'estimate',\n      useCachedMeasurements: false,\n    } as unknown as Required<VirtualizerOptions<TScrollElement, TItemElement>>\n\n    for (const key in opts) {\n      const v = (opts as any)[key]\n      if (v !== undefined) (merged as any)[key] = v\n    }\n\n    const prevOptions = this.options as\n      | Required<VirtualizerOptions<TScrollElement, TItemElement>>\n      | undefined\n    let anchor: [Key, number] | null = null\n    let followOnAppend: ScrollBehavior | null = null\n    let edgeKeysChanged = false\n\n    if (\n      prevOptions !== undefined &&\n      prevOptions.enabled &&\n      merged.enabled &&\n      merged.anchorTo === 'end' &&\n      this.scrollElement !== null\n    ) {\n      const prevCount = prevOptions.count\n      const nextCount = merged.count\n      const measurements = this.getMeasurements()\n      const prevFirstKey =\n        prevCount > 0\n          ? (measurements[0]?.key ?? prevOptions.getItemKey(0))\n          : null\n      const prevLastKey =\n        prevCount > 0\n          ? (measurements[prevCount - 1]?.key ??\n            prevOptions.getItemKey(prevCount - 1))\n          : null\n      const didCountChange = nextCount !== prevCount\n      const didEdgeKeysChange =\n        didCountChange ||\n        (prevCount > 0 &&\n          nextCount > 0 &&\n          (merged.getItemKey(0) !== prevFirstKey ||\n            merged.getItemKey(nextCount - 1) !== prevLastKey))\n\n      if (didEdgeKeysChange) {\n        edgeKeysChanged = true\n        const item =\n          prevCount > 0\n            ? (this.getVirtualItemForOffset(this.getScrollOffset()) ??\n              measurements[0])\n            : null\n\n        if (item) {\n          anchor = [item.key, this.getScrollOffset() - item.start]\n        }\n\n        const behavior =\n          merged.followOnAppend === true\n            ? 'auto'\n            : merged.followOnAppend || null\n\n        if (\n          behavior &&\n          nextCount > prevCount &&\n          this.isAtEnd(prevOptions.scrollEndThreshold) &&\n          (prevCount === 0 || merged.getItemKey(nextCount - 1) !== prevLastKey)\n        ) {\n          followOnAppend = behavior\n        }\n      }\n    }\n\n    this.options = merged\n\n    // When edge keys changed (prepend, trim, reorder, etc.) the key→index\n    // mapping has shifted. Force a full measurement rebuild so the anchor\n    // resolution below reads positions from the new layout, not the stale\n    // memoised cache. Without this, a stable `getItemKey` reference +\n    // unchanged `count` would let getMeasurements() return the old layout.\n    if (edgeKeysChanged) {\n      this.pendingMin = 0\n      this.itemSizeCacheVersion++\n    }\n\n    // Eagerly adjust scrollOffset so the virtualizer computes the correct\n    // visible range during the current render pass — before _willUpdate\n    // syncs the DOM scroll position in a layout effect. Without this,\n    // the virtualizer would render the wrong items for one frame (the\n    // estimate-based positions are stale) and then correct in the next\n    // frame, producing a visible \"jump\" on prepend with dynamic sizes.\n    let anchorResolved = false\n    let anchorDelta = 0\n    if (anchor && this.scrollOffset !== null) {\n      const [anchorKey, anchorOffset] = anchor\n      const newMeasurements = this.getMeasurements()\n      const { count, getItemKey } = this.options\n      let idx = 0\n      while (idx < count && getItemKey(idx) !== anchorKey) {\n        idx++\n      }\n      if (idx < count) {\n        const anchorItem = newMeasurements[idx]\n        if (anchorItem) {\n          const newOffset = anchorItem.start + anchorOffset\n          if (newOffset !== this.scrollOffset) {\n            anchorDelta = newOffset - this.scrollOffset\n            this.scrollOffset = newOffset\n            anchorResolved = true\n          }\n        }\n      }\n    }\n\n    if (anchorResolved || followOnAppend) {\n      this.pendingScrollAnchor = [\n        anchorResolved ? anchor![0] : null,\n        anchorResolved ? anchor![1] : 0,\n        followOnAppend,\n        anchorDelta,\n      ]\n    }\n  }\n\n  private notify = (sync: boolean) => {\n    this.options.onChange?.(this, sync)\n  }\n\n  private applyScrollAdjustment(delta: number, behavior?: ScrollBehavior) {\n    if (delta === 0) return\n\n    if (process.env.NODE_ENV !== 'production' && this.options.debug) {\n      console.info('correction', delta)\n    }\n\n    if (\n      isIOSWebKit() &&\n      (this.isScrolling || this._iosTouching || this._iosJustTouchEnded)\n    ) {\n      this._iosDeferredAdjustment += delta\n    } else {\n      this._scrollToOffset(this.getScrollOffset(), {\n        adjustments: (this.scrollAdjustments += delta),\n        behavior,\n      })\n    }\n  }\n\n  private maybeNotify = memo(\n    () => {\n      this.calculateRange()\n\n      return [\n        this.isScrolling,\n        this.range ? this.range.startIndex : null,\n        this.range ? this.range.endIndex : null,\n      ]\n    },\n    (isScrolling) => {\n      this.notify(isScrolling)\n    },\n    {\n      key: process.env.NODE_ENV !== 'production' && 'maybeNotify',\n      debug: () => this.options.debug,\n      initialDeps: [\n        this.isScrolling,\n        this.range ? this.range.startIndex : null,\n        this.range ? this.range.endIndex : null,\n      ] as [boolean, number | null, number | null],\n    },\n  )\n\n  private cleanup = () => {\n    this.unsubs.filter(Boolean).forEach((d) => d!())\n    this.unsubs = []\n    this.observer.disconnect()\n    if (this.rafId != null && this.targetWindow) {\n      this.targetWindow.cancelAnimationFrame(this.rafId)\n      this.rafId = null\n    }\n    this.scrollState = null\n    this.scrollElement = null\n    this.targetWindow = null\n  }\n\n  _didMount = () => {\n    return () => {\n      this.cleanup()\n    }\n  }\n\n  _willUpdate = () => {\n    const scrollElement = this.options.enabled\n      ? this.options.getScrollElement()\n      : null\n\n    if (this.scrollElement !== scrollElement) {\n      this.cleanup()\n\n      if (!scrollElement) {\n        this.maybeNotify()\n        return\n      }\n\n      this.scrollElement = scrollElement\n\n      if (this.scrollElement && 'ownerDocument' in this.scrollElement) {\n        this.targetWindow = this.scrollElement.ownerDocument.defaultView\n      } else {\n        this.targetWindow = this.scrollElement?.window ?? null\n      }\n\n      this.elementsCache.forEach((cached) => {\n        this.observer.observe(cached)\n      })\n\n      this.unsubs.push(\n        this.options.observeElementRect(this, (rect) => {\n          this.scrollRect = rect\n          this.maybeNotify()\n        }),\n      )\n\n      this.unsubs.push(\n        this.options.observeElementOffset(this, (offset, isScrolling) => {\n          // If this scroll event looks like the browser's read-back of a\n          // value we just wrote, prefer our intended (sub-pixel-accurate)\n          // value over the browser's rounded one. The 1.5 px tolerance is\n          // tight enough to avoid mistaking a real user scroll for a\n          // self-write — by the time the user has moved 1.5 px, the\n          // intended value will already have been consumed by a prior\n          // scroll event and cleared.\n          if (\n            this._intendedScrollOffset !== null &&\n            Math.abs(offset - this._intendedScrollOffset) < 1.5\n          ) {\n            offset = this._intendedScrollOffset\n          }\n          this._intendedScrollOffset = null\n\n          this.scrollAdjustments = 0\n          this.scrollDirection = isScrolling\n            ? this.getScrollOffset() < offset\n              ? 'forward'\n              : 'backward'\n            : null\n          this.scrollOffset = offset\n          this.isScrolling = isScrolling\n\n          // Flush deferred iOS adjustments if we're now fully settled.\n          // \"Fully settled\" means: not actively scrolling, no finger on\n          // screen, and the post-touchend grace window has expired.\n          this._flushIosDeferredIfReady()\n\n          if (this.scrollState) {\n            this.scheduleScrollReconcile()\n          }\n          this.maybeNotify()\n        }),\n      )\n\n      // Touch event listeners (iOS-aware deferral). We attach unconditionally\n      // — the listeners are passive and cheap; on non-touch devices they\n      // simply never fire. The gating by isIOSWebKit() lives in resizeItem\n      // and _flushIosDeferredIfReady so we only burn the path on iOS.\n      if ('addEventListener' in this.scrollElement) {\n        const scrollEl = this.scrollElement as unknown as EventTarget\n        const onTouchStart = () => {\n          this._iosTouching = true\n          this._iosJustTouchEnded = false\n          if (this._iosTouchEndTimerId !== null && this.targetWindow != null) {\n            this.targetWindow.clearTimeout(this._iosTouchEndTimerId)\n            this._iosTouchEndTimerId = null\n          }\n        }\n        const onTouchEnd = () => {\n          this._iosTouching = false\n          if (!isIOSWebKit() || this.targetWindow == null) {\n            // Non-iOS: nothing more to track. Just clear the touching flag.\n            return\n          }\n          this._iosJustTouchEnded = true\n          // After ~150 ms with no scroll/touch events, momentum is done.\n          this._iosTouchEndTimerId = this.targetWindow.setTimeout(() => {\n            this._iosJustTouchEnded = false\n            this._iosTouchEndTimerId = null\n            // After the grace window, attempt to flush. The scroll event\n            // for momentum decay may have already fired before our timer.\n            this._flushIosDeferredIfReady()\n          }, 150)\n        }\n        scrollEl.addEventListener(\n          'touchstart',\n          onTouchStart,\n          addEventListenerOptions,\n        )\n        scrollEl.addEventListener(\n          'touchend',\n          onTouchEnd,\n          addEventListenerOptions,\n        )\n        this.unsubs.push(() => {\n          scrollEl.removeEventListener('touchstart', onTouchStart)\n          scrollEl.removeEventListener('touchend', onTouchEnd)\n          if (this._iosTouchEndTimerId !== null && this.targetWindow != null) {\n            this.targetWindow.clearTimeout(this._iosTouchEndTimerId)\n            this._iosTouchEndTimerId = null\n          }\n        })\n      }\n\n      this._scrollToOffset(this.getScrollOffset(), {\n        adjustments: undefined,\n        behavior: undefined,\n      })\n    }\n\n    const anchor = this.pendingScrollAnchor\n    this.pendingScrollAnchor = null\n\n    if (anchor && this.scrollElement && this.options.enabled) {\n      const [key, _offset, followOnAppend, anchorDelta] = anchor\n\n      if (key !== null && !followOnAppend) {\n        // scrollOffset was eagerly adjusted in setOptions so the\n        // virtualizer already computed the correct range during render.\n        // Now sync the browser's actual scroll position to match.\n        // Skip when followOnAppend is set — scrollToEnd will handle it.\n        //\n        // On iOS WebKit, writing scrollTop during touch/momentum cancels\n        // the in-flight scroll. Defer the DOM sync the same way\n        // applyScrollAdjustment does — accumulate the delta and let\n        // _flushIosDeferredIfReady handle it once the scroll settles.\n        if (\n          isIOSWebKit() &&\n          (this.isScrolling || this._iosTouching || this._iosJustTouchEnded)\n        ) {\n          if (anchorDelta !== 0) {\n            this._iosDeferredAdjustment += anchorDelta\n          }\n        } else {\n          this._scrollToOffset(this.getScrollOffset(), {\n            adjustments: undefined,\n            behavior: undefined,\n          })\n        }\n      }\n\n      if (followOnAppend) {\n        this.scrollToEnd({ behavior: followOnAppend })\n      }\n    }\n  }\n\n  // Apply any accumulated iOS-deferred scroll adjustment, but only when we're\n  // truly settled — not actively scrolling, not under an active touch, and\n  // past the post-touchend grace window. Called from the scroll callback\n  // and the touchend grace-timer.\n  private _flushIosDeferredIfReady = () => {\n    if (this._iosDeferredAdjustment === 0) return\n    if (this.isScrolling) return\n    if (this._iosTouching) return\n    if (this._iosJustTouchEnded) return\n    // Phase 2b: Safari elastic-overscroll (rubber-band) lets scrollTop go\n    // negative or beyond scrollHeight - clientHeight. Writing scrollTop\n    // while in that zone snaps the page back to the clamped value at the\n    // end of the bounce, often discarding the user's intent. Skip the\n    // flush; the next in-bounds scroll event will retry.\n    const cur = this.getScrollOffset()\n    const max = this.getMaxScrollOffset()\n    if (cur < 0 || cur > max) return\n    const delta = this._iosDeferredAdjustment\n    this._iosDeferredAdjustment = 0\n    // Roll the deferred delta into the running accumulator so any resize\n    // landing between now and the resulting scroll event computes from the\n    // post-flush offset rather than the stale one.\n    this._scrollToOffset(cur, {\n      adjustments: (this.scrollAdjustments += delta),\n      behavior: undefined,\n    })\n  }\n\n  private rafId: number | null = null\n  private scheduleScrollReconcile() {\n    if (!this.targetWindow) {\n      this.scrollState = null\n      return\n    }\n    if (this.rafId != null) return\n    this.rafId = this.targetWindow.requestAnimationFrame(() => {\n      this.rafId = null\n      this.reconcileScroll()\n    })\n  }\n  private reconcileScroll() {\n    if (!this.scrollState) return\n\n    const el = this.scrollElement\n    if (!el) return\n\n    // Safety valve: bail out if reconciliation has been running too long\n    const MAX_RECONCILE_MS = 5000\n    if (this.now() - this.scrollState.startedAt > MAX_RECONCILE_MS) {\n      this.scrollState = null\n      return\n    }\n\n    const offsetInfo =\n      this.scrollState.index != null\n        ? this.getOffsetForIndex(this.scrollState.index, this.scrollState.align)\n        : undefined\n    const targetOffset = offsetInfo\n      ? offsetInfo[0]\n      : this.scrollState.lastTargetOffset\n\n    // Require one stable frame where target matches scroll offset.\n    // approxEqual() already tolerates minor fluctuations, so one frame is sufficient\n    // to confirm scroll has reached its target without premature cleanup.\n    const STABLE_FRAMES = 1\n\n    const targetChanged = targetOffset !== this.scrollState.lastTargetOffset\n\n    if (!targetChanged && approxEqual(targetOffset, this.getScrollOffset())) {\n      this.scrollState.stableFrames++\n      if (this.scrollState.stableFrames >= STABLE_FRAMES) {\n        // Final-pass exact landing. The reconcile-stable check uses a 1.01px\n        // tolerance (approxEqual) so we don't fight subpixel browser rounding\n        // during the converging phase. Once we're definitively settled,\n        // commit the exact target so consumers calling scrollToIndex(N)\n        // end up at the EXACT computed position of item N — matching\n        // virtuoso's 0px landing accuracy rather than our prior 0.5-1px.\n        if (this.getScrollOffset() !== targetOffset) {\n          this._scrollToOffset(targetOffset, {\n            adjustments: undefined,\n            behavior: 'auto',\n          })\n        }\n        this.scrollState = null\n        return\n      }\n    } else {\n      this.scrollState.stableFrames = 0\n\n      if (targetChanged) {\n        // When the target moves during smooth scroll (because items came into\n        // view and got measured, shifting positions), the original logic was\n        // to immediately snap to 'auto' — visibly jarring on long\n        // scroll-to-index calls. Now: keep smooth while we're still far\n        // (more than a viewport) from the new target. Only fall back to\n        // 'auto' for the final approach, so the user sees one continuous\n        // motion that smoothly adjusts its endpoint as measurements arrive.\n        const viewport = this.getSize() || 600\n        const distance = Math.abs(targetOffset - this.getScrollOffset())\n        const keepSmooth =\n          this.scrollState.behavior === 'smooth' && distance > viewport\n\n        this.scrollState.lastTargetOffset = targetOffset\n        if (!keepSmooth) {\n          this.scrollState.behavior = 'auto'\n        }\n\n        this._scrollToOffset(targetOffset, {\n          adjustments: undefined,\n          behavior: keepSmooth ? 'smooth' : 'auto',\n        })\n      }\n    }\n\n    // Always reschedule while scrollState is active to guarantee\n    // the safety valve timeout runs even if no scroll events fire\n    // (e.g. no-op scrollToFn, detached element)\n    this.scheduleScrollReconcile()\n  }\n\n  private getSize = () => {\n    if (!this.options.enabled) {\n      this.scrollRect = null\n      return 0\n    }\n\n    this.scrollRect = this.scrollRect ?? this.options.initialRect\n\n    return this.scrollRect[this.options.horizontal ? 'width' : 'height']\n  }\n\n  private getScrollOffset = () => {\n    if (!this.options.enabled) {\n      this.scrollOffset = null\n      return 0\n    }\n\n    this.scrollOffset =\n      this.scrollOffset ??\n      (typeof this.options.initialOffset === 'function'\n        ? this.options.initialOffset()\n        : this.options.initialOffset)\n\n    return this.scrollOffset\n  }\n\n  private getFurthestMeasurement = (\n    measurements: Array<VirtualItem>,\n    index: number,\n  ) => {\n    const furthestMeasurementsFound = new Map<number, true>()\n    const furthestMeasurements = new Map<number, VirtualItem>()\n    for (let m = index - 1; m >= 0; m--) {\n      const measurement = measurements[m]!\n\n      if (furthestMeasurementsFound.has(measurement.lane)) {\n        continue\n      }\n\n      const previousFurthestMeasurement = furthestMeasurements.get(\n        measurement.lane,\n      )\n      if (\n        previousFurthestMeasurement == null ||\n        measurement.end > previousFurthestMeasurement.end\n      ) {\n        furthestMeasurements.set(measurement.lane, measurement)\n      } else if (measurement.end < previousFurthestMeasurement.end) {\n        furthestMeasurementsFound.set(measurement.lane, true)\n      }\n\n      if (furthestMeasurementsFound.size === this.options.lanes) {\n        break\n      }\n    }\n\n    return furthestMeasurements.size === this.options.lanes\n      ? Array.from(furthestMeasurements.values()).sort((a, b) => {\n          if (a.end === b.end) {\n            return a.index - b.index\n          }\n\n          return a.end - b.end\n        })[0]\n      : undefined\n  }\n\n  private getMeasurementOptions = memo(\n    () => [\n      this.options.count,\n      this.options.paddingStart,\n      this.options.scrollMargin,\n      this.options.getItemKey,\n      this.options.enabled,\n      this.options.lanes,\n      this.options.laneAssignmentMode,\n    ],\n    (\n      count,\n      paddingStart,\n      scrollMargin,\n      getItemKey,\n      enabled,\n      lanes,\n      laneAssignmentMode,\n    ) => {\n      const lanesChanged =\n        this.prevLanes !== undefined && this.prevLanes !== lanes\n\n      if (lanesChanged) {\n        // Set flag for getMeasurements to handle\n        this.lanesChangedFlag = true\n      }\n\n      this.prevLanes = lanes\n      this.pendingMin = null\n\n      return {\n        count,\n        paddingStart,\n        scrollMargin,\n        getItemKey,\n        enabled,\n        lanes,\n        laneAssignmentMode,\n      }\n    },\n    {\n      key: false,\n    },\n  )\n\n  private getMeasurements = memo(\n    () => [this.getMeasurementOptions(), this.itemSizeCacheVersion],\n    (\n      {\n        count,\n        paddingStart,\n        scrollMargin,\n        getItemKey,\n        enabled,\n        lanes,\n        laneAssignmentMode,\n      },\n      _itemSizeCacheVersion,\n    ) => {\n      const itemSizeCache = this.itemSizeCache\n      if (!enabled) {\n        this.measurementsCache = []\n        this.itemSizeCache.clear()\n        this.laneAssignments.clear()\n        return []\n      }\n\n      // Clean up stale lane cache entries when count decreases\n      if (this.laneAssignments.size > count) {\n        for (const index of this.laneAssignments.keys()) {\n          if (index >= count) {\n            this.laneAssignments.delete(index)\n          }\n        }\n      }\n\n      // ✅ Force complete recalculation when lanes change\n      if (this.lanesChangedFlag) {\n        this.lanesChangedFlag = false // Reset immediately\n        this.lanesSettling = true // Start settling period\n        this.measurementsCache = []\n        this.itemSizeCache.clear()\n        this.laneAssignments.clear() // Clear lane cache for new lane count\n        // Force min = 0 on the rebuild\n        this.pendingMin = null\n      }\n\n      // Don't restore from initialMeasurementsCache during lane changes\n      // as it contains stale lane assignments from the previous lane count\n      if (this.measurementsCache.length === 0 && !this.lanesSettling) {\n        this.measurementsCache = this.options.initialMeasurementsCache\n        this.measurementsCache.forEach((item) => {\n          this.itemSizeCache.set(item.key, item.size)\n        })\n      }\n\n      // During lanes settling, ignore pendingMin to prevent repositioning\n      const min = this.lanesSettling ? 0 : (this.pendingMin ?? 0)\n      this.pendingMin = null\n\n      // ✅ End settling period when cache is fully built\n      if (this.lanesSettling && this.measurementsCache.length === count) {\n        this.lanesSettling = false\n      }\n\n      // ─── Fast path: single-lane lazy materialization ────────────────────\n      // For lanes === 1 (the default and most common case), skip the\n      // per-item VirtualItem object allocation. We write start/size pairs\n      // into a Float64Array and return a Proxy that builds VirtualItem\n      // objects on demand (only the indices a consumer actually reads).\n      //\n      // At n=100k this drops cold-mount cost from ~2.5ms (eager object\n      // allocation) to roughly the cost of a single typed-array fill.\n      if (lanes === 1) {\n        const gap = this.options.gap\n        // Reuse flat backing if large enough; else grow (preserving data\n        // before `min` to mirror the slice-and-rebuild contract).\n        const need = count * 2\n        let flat = this._flatMeasurements\n        if (!flat || flat.length < need) {\n          const next = new Float64Array(need)\n          if (flat && min > 0) next.set(flat.subarray(0, min * 2))\n          flat = next\n          this._flatMeasurements = flat\n        }\n\n        let runningStart: number\n        if (min === 0) {\n          runningStart = paddingStart + scrollMargin\n        } else {\n          // Continue from where we left off\n          const prevIdx = min - 1\n          runningStart = flat[prevIdx * 2]! + flat[prevIdx * 2 + 1]! + gap\n        }\n\n        for (let i = min; i < count; i++) {\n          const key = getItemKey(i)\n          const measuredSize = itemSizeCache.get(key)\n          const size =\n            typeof measuredSize === 'number'\n              ? measuredSize\n              : this.options.estimateSize(i)\n          flat[i * 2] = runningStart\n          flat[i * 2 + 1] = size\n          runningStart += size + gap\n        }\n\n        const view = createLazyMeasurementsView(count, flat, getItemKey)\n        this.measurementsCache = view\n        return view\n      }\n\n      const measurements = this.measurementsCache.slice(0, min)\n\n      // ✅ Performance: Track last item index per lane for O(1) lookup\n      const laneLastIndex: Array<number | undefined> = new Array(lanes).fill(\n        undefined,\n      )\n\n      // Initialize from existing measurements (before min)\n      for (let m = 0; m < min; m++) {\n        const item = measurements[m]\n        if (item) {\n          laneLastIndex[item.lane] = m\n        }\n      }\n\n      for (let i = min; i < count; i++) {\n        const key = getItemKey(i)\n\n        // Check for cached lane assignment\n        const cachedLane = this.laneAssignments.get(i)\n        let lane: number\n        let start: number\n\n        const shouldCacheLane =\n          laneAssignmentMode === 'estimate' || itemSizeCache.has(key)\n\n        if (cachedLane !== undefined && this.options.lanes > 1) {\n          // Use cached lane - O(1) lookup for previous item in same lane\n          lane = cachedLane\n          const prevIndex = laneLastIndex[lane]\n          const prevInLane =\n            prevIndex !== undefined ? measurements[prevIndex] : undefined\n          start = prevInLane\n            ? prevInLane.end + this.options.gap\n            : paddingStart + scrollMargin\n        } else {\n          // No cache - use original logic (find shortest lane)\n          const furthestMeasurement =\n            this.options.lanes === 1\n              ? measurements[i - 1]\n              : this.getFurthestMeasurement(measurements, i)\n\n          start = furthestMeasurement\n            ? furthestMeasurement.end + this.options.gap\n            : paddingStart + scrollMargin\n\n          lane = furthestMeasurement\n            ? furthestMeasurement.lane\n            : i % this.options.lanes\n\n          if (this.options.lanes > 1 && shouldCacheLane) {\n            this.laneAssignments.set(i, lane)\n          }\n        }\n\n        const measuredSize = itemSizeCache.get(key)\n        const size =\n          typeof measuredSize === 'number'\n            ? measuredSize\n            : this.options.estimateSize(i)\n\n        const end = start + size\n\n        measurements[i] = {\n          index: i,\n          start,\n          size,\n          end,\n          key,\n          lane,\n        }\n\n        // ✅ Performance: Update lane's last item index\n        laneLastIndex[lane] = i\n      }\n\n      this.measurementsCache = measurements\n\n      return measurements\n    },\n    {\n      key: process.env.NODE_ENV !== 'production' && 'getMeasurements',\n      debug: () => this.options.debug,\n    },\n  )\n\n  calculateRange = memo(\n    () => [\n      this.getMeasurements(),\n      this.getSize(),\n      this.getScrollOffset(),\n      this.options.lanes,\n    ],\n    (measurements, outerSize, scrollOffset, lanes) => {\n      return (this.range =\n        measurements.length > 0 && outerSize > 0\n          ? calculateRange({\n              measurements,\n              outerSize,\n              scrollOffset,\n              lanes,\n              // Pass the typed array so binary search + forward-walk can\n              // read start/end directly from Float64Array, skipping the\n              // Proxy traps that materialize a full VirtualItem per probe.\n              flat:\n                lanes === 1 && this._flatMeasurements != null\n                  ? this._flatMeasurements\n                  : null,\n            })\n          : null)\n    },\n    {\n      key: process.env.NODE_ENV !== 'production' && 'calculateRange',\n      debug: () => this.options.debug,\n    },\n  )\n\n  getVirtualIndexes = memo(\n    () => {\n      let startIndex: number | null = null\n      let endIndex: number | null = null\n      const range = this.calculateRange()\n      if (range) {\n        startIndex = range.startIndex\n        endIndex = range.endIndex\n      }\n      this.maybeNotify.updateDeps([this.isScrolling, startIndex, endIndex])\n      return [\n        this.options.rangeExtractor,\n        this.options.overscan,\n        this.options.count,\n        startIndex,\n        endIndex,\n      ]\n    },\n    (rangeExtractor, overscan, count, startIndex, endIndex) => {\n      return startIndex === null || endIndex === null\n        ? []\n        : rangeExtractor({\n            startIndex,\n            endIndex,\n            overscan,\n            count,\n          })\n    },\n    {\n      key: process.env.NODE_ENV !== 'production' && 'getVirtualIndexes',\n      debug: () => this.options.debug,\n    },\n  )\n\n  indexFromElement = (node: TItemElement) => {\n    const attributeName = this.options.indexAttribute\n    const indexStr = node.getAttribute(attributeName)\n\n    if (!indexStr) {\n      console.warn(\n        `Missing attribute name '${attributeName}={index}' on measured element.`,\n      )\n      return -1\n    }\n\n    return parseInt(indexStr, 10)\n  }\n\n  /**\n   * Determines if an item at the given index should be measured during smooth scroll.\n   * During smooth scroll, only items within a buffer range around the target are measured\n   * to prevent items far from the target from pushing it away.\n   */\n  private shouldMeasureDuringScroll = (index: number): boolean => {\n    // No scroll state or not smooth scroll - always allow measurements\n    if (!this.scrollState || this.scrollState.behavior !== 'smooth') {\n      return true\n    }\n\n    const scrollIndex =\n      this.scrollState.index ??\n      this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index\n\n    if (scrollIndex !== undefined && this.range) {\n      // Allow measurements within a buffer range around the scroll target\n      const bufferSize = Math.max(\n        this.options.overscan,\n        Math.ceil((this.range.endIndex - this.range.startIndex) / 2),\n      )\n      const minIndex = Math.max(0, scrollIndex - bufferSize)\n      const maxIndex = Math.min(\n        this.options.count - 1,\n        scrollIndex + bufferSize,\n      )\n      return index >= minIndex && index <= maxIndex\n    }\n\n    return true\n  }\n\n  measureElement = (node: TItemElement | null) => {\n    if (!node) {\n      this.elementsCache.forEach((cached, key) => {\n        if (!cached.isConnected) {\n          this.observer.unobserve(cached)\n          this.elementsCache.delete(key)\n        }\n      })\n      return\n    }\n\n    const index = this.indexFromElement(node)\n    const key = this.options.getItemKey(index)\n    const prevNode = this.elementsCache.get(key)\n\n    if (prevNode !== node) {\n      if (prevNode) {\n        this.observer.unobserve(prevNode)\n      }\n      this.observer.observe(node)\n      this.elementsCache.set(key, node)\n    }\n\n    // Sync-measure when idle (initial render) or during programmatic scrolling\n    // (scrollToIndex/scrollToOffset) where reconcileScroll needs sizes in the same frame.\n    // During normal user scrolling, skip sync measurement — the RO callback handles it async.\n    if (\n      (!this.isScrolling || this.scrollState) &&\n      this.shouldMeasureDuringScroll(index)\n    ) {\n      this.resizeItem(index, this.options.measureElement(node, undefined, this))\n    }\n  }\n\n  resizeItem = (index: number, size: number) => {\n    if (index < 0 || index >= this.options.count) return\n\n    // Fast field reads. For lanes===1 we read raw start/size from the flat\n    // typed array, avoiding a Proxy.get + VirtualItem allocation per call.\n    // For lanes>1 we fall back to the cached VirtualItem array.\n    let cachedSize: number\n    let itemStart: number\n    let key: Key\n    const flat = this._flatMeasurements\n    if (this.options.lanes === 1 && flat !== null) {\n      key = this.options.getItemKey(index)\n      itemStart = flat[index * 2]!\n      cachedSize = flat[index * 2 + 1]!\n    } else {\n      const item = this.measurementsCache[index]\n      if (!item) return\n      key = item.key\n      itemStart = item.start\n      cachedSize = item.size\n    }\n\n    const itemSize = this.itemSizeCache.get(key) ?? cachedSize\n    const delta = size - itemSize\n\n    if (delta !== 0) {\n      const wasAtEnd =\n        this.options.anchorTo === 'end' &&\n        this.scrollState?.behavior !== 'smooth' &&\n        this.getVirtualDistanceFromEnd() <= this.options.scrollEndThreshold\n      const prevTotalSize = wasAtEnd ? this.getTotalSize() : 0\n      const shouldAdjustScroll =\n        this.scrollState?.behavior !== 'smooth' &&\n        (this.shouldAdjustScrollPositionOnItemSizeChange !== undefined\n          ? this.shouldAdjustScrollPositionOnItemSizeChange(\n              // The callback expects a VirtualItem; build one lazily only\n              // when the consumer actually supplied a custom predicate.\n              this.measurementsCache[index] ?? {\n                index,\n                key,\n                start: itemStart,\n                size: cachedSize,\n                end: itemStart + cachedSize,\n                lane: 0,\n              },\n              delta,\n              this,\n            )\n          : // Default: adjust when the resize is an above-viewport item.\n            // First measurement (!has(key)): always adjust — the item\n            // has never been sized, so the estimate→actual delta must\n            // be compensated regardless of scroll direction.\n            // Re-measurement (has(key)): skip during backward scroll\n            // to avoid the \"items jump while scrolling up\" cascade.\n            itemStart < this.getScrollOffset() + this.scrollAdjustments &&\n            (!this.itemSizeCache.has(key) ||\n              this.scrollDirection !== 'backward'))\n\n      if (this.pendingMin === null || index < this.pendingMin) {\n        this.pendingMin = index\n      }\n      this.itemSizeCache.set(key, size)\n      this.itemSizeCacheVersion++\n\n      if (wasAtEnd) {\n        this.applyScrollAdjustment(this.getTotalSize() - prevTotalSize)\n      } else if (shouldAdjustScroll) {\n        this.applyScrollAdjustment(delta)\n      }\n\n      this.notify(false)\n    }\n  }\n\n  getVirtualItems = memo(\n    () => [this.getVirtualIndexes(), this.getMeasurements()],\n    (indexes, measurements) => {\n      const virtualItems: Array<VirtualItem> = []\n\n      for (let k = 0, len = indexes.length; k < len; k++) {\n        const i = indexes[k]!\n        const measurement = measurements[i]!\n\n        virtualItems.push(measurement)\n      }\n\n      return virtualItems\n    },\n    {\n      key: process.env.NODE_ENV !== 'production' && 'getVirtualItems',\n      debug: () => this.options.debug,\n    },\n  )\n\n  getVirtualItemForOffset = (offset: number) => {\n    const measurements = this.getMeasurements()\n    if (measurements.length === 0) {\n      return undefined\n    }\n    // Same fast-path as calculateRange: read start values directly from the\n    // typed array during binary search to skip the Proxy.get materialization\n    // per probe.\n    const flat = this._flatMeasurements\n    const useFlat = this.options.lanes === 1 && flat != null\n    const idx = findNearestBinarySearch(\n      0,\n      measurements.length - 1,\n      useFlat\n        ? (i: number) => flat[i * 2]!\n        : (i: number) => notUndefined(measurements[i]).start,\n      offset,\n    )\n    return notUndefined(measurements[idx])\n  }\n\n  private getMaxScrollOffset = () => {\n    if (!this.scrollElement) return 0\n\n    if ('scrollHeight' in this.scrollElement) {\n      // Element\n      return this.options.horizontal\n        ? this.scrollElement.scrollWidth - this.scrollElement.clientWidth\n        : this.scrollElement.scrollHeight - this.scrollElement.clientHeight\n    } else {\n      // Window\n      const doc = this.scrollElement.document.documentElement\n      return this.options.horizontal\n        ? doc.scrollWidth - this.scrollElement.innerWidth\n        : doc.scrollHeight - this.scrollElement.innerHeight\n    }\n  }\n\n  private getVirtualDistanceFromEnd = () => {\n    return Math.max(\n      this.getTotalSize() - this.getSize() - this.getScrollOffset(),\n      0,\n    )\n  }\n\n  getDistanceFromEnd = () => {\n    return Math.max(this.getMaxScrollOffset() - this.getScrollOffset(), 0)\n  }\n\n  isAtEnd = (threshold = this.options.scrollEndThreshold) => {\n    return this.getDistanceFromEnd() <= threshold\n  }\n\n  getOffsetForAlignment = (\n    toOffset: number,\n    align: ScrollAlignment,\n    itemSize = 0,\n  ) => {\n    if (!this.scrollElement) return 0\n\n    const size = this.getSize()\n    const scrollOffset = this.getScrollOffset()\n\n    if (align === 'auto') {\n      align = toOffset >= scrollOffset + size ? 'end' : 'start'\n    }\n\n    if (align === 'center') {\n      // When aligning to a particular item (e.g. with scrollToIndex),\n      // adjust offset by the size of the item to center on the item\n      toOffset += (itemSize - size) / 2\n    } else if (align === 'end') {\n      toOffset -= size\n    }\n\n    const maxOffset = this.getMaxScrollOffset()\n\n    return Math.max(Math.min(maxOffset, toOffset), 0)\n  }\n\n  getOffsetForIndex = (index: number, align: ScrollAlignment = 'auto') => {\n    index = Math.max(0, Math.min(index, this.options.count - 1))\n\n    const size = this.getSize()\n    const scrollOffset = this.getScrollOffset()\n\n    const item = this.measurementsCache[index]\n    if (!item) return\n\n    if (align === 'auto') {\n      if (item.end >= scrollOffset + size - this.options.scrollPaddingEnd) {\n        align = 'end'\n      } else if (item.start <= scrollOffset + this.options.scrollPaddingStart) {\n        align = 'start'\n      } else {\n        return [scrollOffset, align] as const\n      }\n    }\n\n    // For the last item with 'end' alignment, use browser's actual max scroll\n    // to account for borders/padding that aren't in our measurements\n    if (align === 'end' && index === this.options.count - 1) {\n      return [this.getMaxScrollOffset(), align] as const\n    }\n\n    const toOffset =\n      align === 'end'\n        ? item.end + this.options.scrollPaddingEnd\n        : item.start - this.options.scrollPaddingStart\n\n    return [\n      this.getOffsetForAlignment(toOffset, align, item.size),\n      align,\n    ] as const\n  }\n\n  scrollToOffset = (\n    toOffset: number,\n    { align = 'start', behavior = 'auto' }: ScrollToOffsetOptions = {},\n  ) => {\n    const offset = this.getOffsetForAlignment(toOffset, align)\n\n    const now = this.now()\n    this.scrollState = {\n      index: null,\n      align,\n      behavior,\n      startedAt: now,\n      lastTargetOffset: offset,\n      stableFrames: 0,\n    }\n\n    this._scrollToOffset(offset, { adjustments: undefined, behavior })\n\n    this.scheduleScrollReconcile()\n  }\n\n  scrollToIndex = (\n    index: number,\n    {\n      align: initialAlign = 'auto',\n      behavior = 'auto',\n    }: ScrollToIndexOptions = {},\n  ) => {\n    index = Math.max(0, Math.min(index, this.options.count - 1))\n\n    const offsetInfo = this.getOffsetForIndex(index, initialAlign)\n    if (!offsetInfo) {\n      return\n    }\n    const [offset, align] = offsetInfo\n\n    const now = this.now()\n    this.scrollState = {\n      index,\n      align,\n      behavior,\n      startedAt: now,\n      lastTargetOffset: offset,\n      stableFrames: 0,\n    }\n\n    this._scrollToOffset(offset, { adjustments: undefined, behavior })\n\n    this.scheduleScrollReconcile()\n  }\n\n  scrollBy = (\n    delta: number,\n    { behavior = 'auto' }: ScrollToOffsetOptions = {},\n  ) => {\n    const offset = this.getScrollOffset() + delta\n    const now = this.now()\n\n    this.scrollState = {\n      index: null,\n      align: 'start',\n      behavior,\n      startedAt: now,\n      lastTargetOffset: offset,\n      stableFrames: 0,\n    }\n\n    this._scrollToOffset(offset, { adjustments: undefined, behavior })\n\n    this.scheduleScrollReconcile()\n  }\n\n  scrollToEnd = ({ behavior = 'auto' }: ScrollToEndOptions = {}) => {\n    if (this.options.count > 0) {\n      this.scrollToIndex(this.options.count - 1, {\n        align: 'end',\n        behavior,\n      })\n      return\n    }\n\n    this.scrollToOffset(Math.max(this.getTotalSize() - this.getSize(), 0), {\n      behavior,\n    })\n  }\n\n  getTotalSize = () => {\n    const measurements = this.getMeasurements()\n\n    let end: number\n    // If there are no measurements, set the end to paddingStart\n    // If there is only one lane, use the last measurement's end\n    // Otherwise find the maximum end value among all measurements\n    if (measurements.length === 0) {\n      end = this.options.paddingStart\n    } else if (this.options.lanes === 1) {\n      // Fast path: read last item's end directly from the flat typed array\n      // when available; avoids a Proxy.get + VirtualItem materialization\n      // just to call getTotalSize (which React renders trigger every commit).\n      const lastIdx = measurements.length - 1\n      const flat = this._flatMeasurements\n      if (flat != null) {\n        end = flat[lastIdx * 2]! + flat[lastIdx * 2 + 1]!\n      } else {\n        end = measurements[lastIdx]?.end ?? 0\n      }\n    } else {\n      const endByLane = Array<number | null>(this.options.lanes).fill(null)\n      let endIndex = measurements.length - 1\n      while (endIndex >= 0 && endByLane.some((val) => val === null)) {\n        const item = measurements[endIndex]!\n        if (endByLane[item.lane] === null) {\n          endByLane[item.lane] = item.end\n        }\n\n        endIndex--\n      }\n\n      end = Math.max(...endByLane.filter((val): val is number => val !== null))\n    }\n\n    return Math.max(\n      end - this.options.scrollMargin + this.options.paddingEnd,\n      0,\n    )\n  }\n\n  /**\n   * Returns a snapshot of currently-measured items suitable for round-\n   * tripping through state storage (sessionStorage, history, etc.) and\n   * passing back as `initialMeasurementsCache` on remount. Pair with the\n   * current `scrollOffset` to restore exact scroll position after navigation.\n   *\n   * Only items the consumer has actually rendered (and thus measured) appear\n   * in the snapshot; unmeasured items will fall back to `estimateSize` on\n   * restore. Returns an empty array if no items have been measured.\n   */\n  takeSnapshot = (): Array<VirtualItem> => {\n    const snapshot: Array<VirtualItem> = []\n    if (this.itemSizeCache.size === 0) return snapshot\n    // Iterate measurementsCache only for indices whose key is in itemSizeCache\n    // (i.e., have been measured). We build VirtualItem objects with the\n    // current start/size/end so they can be persisted as plain data.\n    const m = this.getMeasurements()\n    for (const item of m) {\n      if (item && this.itemSizeCache.has(item.key)) {\n        // Force materialization (lazy path) and copy plain fields.\n        snapshot.push({\n          index: item.index,\n          key: item.key,\n          start: item.start,\n          size: item.size,\n          end: item.end,\n          lane: item.lane,\n        })\n      }\n    }\n    return snapshot\n  }\n\n  private _scrollToOffset = (\n    offset: number,\n    {\n      adjustments,\n      behavior,\n    }: {\n      adjustments: number | undefined\n      behavior: ScrollBehavior | undefined\n    },\n  ) => {\n    // Record the intended logical scroll target so the next scroll event\n    // can reconcile against subpixel rounding by the browser.\n    this._intendedScrollOffset = offset + (adjustments ?? 0)\n    this.options.scrollToFn(offset, { behavior, adjustments }, this)\n  }\n\n  measure = () => {\n    // Reset pendingMin so the next getMeasurements rebuilds from index 0.\n    // Without this, a prior resizeItem() that left pendingMin > 0 would\n    // cause the rebuild to preserve stale items before that index.\n    this.pendingMin = null\n    this.itemSizeCache.clear()\n    this.laneAssignments.clear() // Clear lane cache for full re-layout\n    this.itemSizeCacheVersion++\n    this.notify(false)\n  }\n}\n\nconst findNearestBinarySearch = (\n  low: number,\n  high: number,\n  getCurrentValue: (i: number) => number,\n  value: number,\n) => {\n  while (low <= high) {\n    const middle = ((low + high) / 2) | 0\n    const currentValue = getCurrentValue(middle)\n\n    if (currentValue < value) {\n      low = middle + 1\n    } else if (currentValue > value) {\n      high = middle - 1\n    } else {\n      return middle\n    }\n  }\n\n  if (low > 0) {\n    return low - 1\n  } else {\n    return 0\n  }\n}\n\nfunction calculateRange({\n  measurements,\n  outerSize,\n  scrollOffset,\n  lanes,\n  flat,\n}: {\n  measurements: Array<VirtualItem>\n  outerSize: number\n  scrollOffset: number\n  lanes: number\n  flat: Float64Array | null\n}) {\n  const lastIndex = measurements.length - 1\n  // When the lanes===1 fast-path is active, read start/end directly from the\n  // flat Float64Array instead of going through the lazy-view Proxy. Cuts\n  // ~17 Proxy.get traps per scroll for the binary search alone.\n  const getStart = flat\n    ? (index: number) => flat[index * 2]!\n    : (index: number) => measurements[index]!.start\n  const getEnd = flat\n    ? (index: number) => flat[index * 2]! + flat[index * 2 + 1]!\n    : (index: number) => measurements[index]!.end\n\n  // handle case when item count is less than or equal to lanes\n  if (measurements.length <= lanes) {\n    return {\n      startIndex: 0,\n      endIndex: lastIndex,\n    }\n  }\n\n  let startIndex = findNearestBinarySearch(0, lastIndex, getStart, scrollOffset)\n  let endIndex = startIndex\n\n  if (lanes === 1) {\n    while (\n      endIndex < lastIndex &&\n      getEnd(endIndex) < scrollOffset + outerSize\n    ) {\n      endIndex++\n    }\n  } else if (lanes > 1) {\n    // Expand forward until we include the visible items from all lanes\n    // which are closer to the end of the virtualizer window\n    const endPerLane = Array(lanes).fill(0)\n    while (\n      endIndex < lastIndex &&\n      endPerLane.some((pos) => pos < scrollOffset + outerSize)\n    ) {\n      const item = measurements[endIndex]!\n      endPerLane[item.lane] = item.end\n      endIndex++\n    }\n\n    // Expand backward until we include all lanes' visible items\n    // closer to the top\n    const startPerLane = Array(lanes).fill(scrollOffset + outerSize)\n    while (startIndex >= 0 && startPerLane.some((pos) => pos >= scrollOffset)) {\n      const item = measurements[startIndex]!\n      startPerLane[item.lane] = item.start\n      startIndex--\n    }\n\n    // Align startIndex to the beginning of its lane\n    startIndex = Math.max(0, startIndex - (startIndex % lanes))\n    // Align endIndex to the end of its lane\n    endIndex = Math.min(lastIndex, endIndex + (lanes - 1 - (endIndex % lanes)))\n  }\n\n  return { startIndex, endIndex }\n}\n","import {\n  Virtualizer,\n  elementScroll,\n  observeElementOffset,\n  observeElementRect,\n  observeWindowOffset,\n  observeWindowRect,\n  windowScroll,\n} from '@tanstack/virtual-core'\nimport {\n  computed,\n  onScopeDispose,\n  shallowRef,\n  triggerRef,\n  unref,\n  watch,\n} from 'vue'\nimport type { PartialKeys, VirtualizerOptions } from '@tanstack/virtual-core'\nimport type { Ref } from 'vue'\n\nexport * from '@tanstack/virtual-core'\n\ntype MaybeRef<T> = T | Ref<T>\n\nfunction useVirtualizerBase<\n  TScrollElement extends Element | Window,\n  TItemElement extends Element,\n>(\n  options: MaybeRef<VirtualizerOptions<TScrollElement, TItemElement>>,\n): Ref<Virtualizer<TScrollElement, TItemElement>> {\n  const virtualizer = new Virtualizer(unref(options))\n  const state = shallowRef(virtualizer)\n\n  const cleanup = virtualizer._didMount()\n\n  watch(\n    () => unref(options).getScrollElement(),\n    (el) => {\n      if (el) {\n        virtualizer._willUpdate()\n      }\n    },\n    {\n      immediate: true,\n    },\n  )\n\n  watch(\n    () => unref(options),\n    (options) => {\n      virtualizer.setOptions({\n        ...options,\n        onChange: (instance, sync) => {\n          triggerRef(state)\n          options.onChange?.(instance, sync)\n        },\n      })\n\n      virtualizer._willUpdate()\n      triggerRef(state)\n    },\n    {\n      immediate: true,\n    },\n  )\n\n  onScopeDispose(cleanup)\n\n  return state\n}\n\nexport function useVirtualizer<\n  TScrollElement extends Element,\n  TItemElement extends Element,\n>(\n  options: MaybeRef<\n    PartialKeys<\n      VirtualizerOptions<TScrollElement, TItemElement>,\n      'observeElementRect' | 'observeElementOffset' | 'scrollToFn'\n    >\n  >,\n): Ref<Virtualizer<TScrollElement, TItemElement>> {\n  return useVirtualizerBase<TScrollElement, TItemElement>(\n    computed(() => ({\n      observeElementRect: observeElementRect,\n      observeElementOffset: observeElementOffset,\n      scrollToFn: elementScroll,\n      ...unref(options),\n    })),\n  )\n}\n\nexport function useWindowVirtualizer<TItemElement extends Element>(\n  options: MaybeRef<\n    PartialKeys<\n      VirtualizerOptions<Window, TItemElement>,\n      | 'observeElementRect'\n      | 'observeElementOffset'\n      | 'scrollToFn'\n      | 'getScrollElement'\n    >\n  >,\n): Ref<Virtualizer<Window, TItemElement>> {\n  return useVirtualizerBase<Window, TItemElement>(\n    computed(() => ({\n      getScrollElement: () => (typeof document !== 'undefined' ? window : null),\n      observeElementRect: observeWindowRect,\n      observeElementOffset: observeWindowOffset,\n      scrollToFn: windowScroll,\n      initialOffset: () =>\n        typeof document !== 'undefined' ? window.scrollY : 0,\n      ...unref(options),\n    })),\n  )\n}\n","<script lang=\"ts\">\nexport interface ListboxVirtualizerProps<T extends AcceptableValue = AcceptableValue> {\n  /** List of items */\n  options: T[]\n  /** Number of items rendered outside the visible area */\n  overscan?: number\n  /** Estimated size (in px) of each item */\n  estimateSize?: number | ((index: number) => number)\n  /** Text content for each item to achieve type-ahead feature */\n  textContent?: (option: T) => string\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableValue = AcceptableValue\">\nimport type { VirtualItem, Virtualizer } from '@tanstack/vue-virtual'\nimport type { Ref, VNode } from 'vue'\nimport type { AcceptableValue } from '@/shared/types'\nimport { useVirtualizer } from '@tanstack/vue-virtual'\nimport { useParentElement } from '@vueuse/core'\nimport { refAutoReset } from '@vueuse/shared'\nimport { cloneVNode, computed, Fragment, useSlots } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { MAP_KEY_TO_FOCUS_INTENT } from '@/RovingFocus/utils'\nimport { findValuesBetween, getActiveElement } from '@/shared'\nimport { getNextMatch } from '@/shared/useTypeahead'\nimport { injectListboxRootContext } from './ListboxRoot.vue'\nimport { compare, queryCheckedElement } from './utils'\n\nconst props = defineProps<ListboxVirtualizerProps<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    option: T\n    virtualizer: Virtualizer<HTMLElement, Element>\n    virtualItem: VirtualItem\n  }) => any\n}>()\n\nconst slots = useSlots()\nconst rootContext = injectListboxRootContext()\nconst parentEl = useParentElement() as Ref<HTMLElement>\nconst { getItems } = useCollection<{ value: T }>()\n\n// set virtual true when this component mounted\nrootContext.isVirtual.value = true\n\nconst padding = computed(() => {\n  const el = parentEl.value\n  if (!el) {\n    return { start: 0, end: 0 }\n  }\n  else {\n    const styles = window.getComputedStyle(el)\n    return {\n      start: Number.parseFloat(styles.paddingBlockStart || styles.paddingTop),\n      end: Number.parseFloat(styles.paddingBlockEnd || styles.paddingBottom),\n    }\n  }\n})\n\nconst virtualizer = useVirtualizer(\n  {\n    get scrollPaddingStart() { return padding.value.start },\n    get scrollPaddingEnd() { return padding.value.end },\n    get count() { return props.options.length },\n    get horizontal() { return rootContext.orientation.value === 'horizontal' },\n    estimateSize(index) {\n      if (typeof props.estimateSize === 'function')\n        return props.estimateSize(index)\n\n      return props.estimateSize ?? 28\n    },\n    getScrollElement() { return parentEl.value },\n    overscan: props.overscan ?? 12,\n  },\n)\n\nconst virtualizedItems = computed(() => virtualizer.value.getVirtualItems().map((item) => {\n  const defaultNode = slots.default!({\n    option: props.options[item.index],\n    virtualizer: virtualizer.value,\n    virtualItem: item,\n  })[0]\n\n  const targetNode = defaultNode.type === Fragment && Array.isArray(defaultNode.children)\n    ? defaultNode.children.find(child => typeof (child as VNode).type !== 'symbol') as VNode\n    : defaultNode\n\n  return {\n    item,\n    is: cloneVNode(targetNode, {\n      'key': `${item.key}`,\n      'data-index': item.index,\n      'aria-setsize': props.options.length,\n      'aria-posinset': item.index + 1,\n      'style': {\n        position: 'absolute',\n        top: 0,\n        left: 0,\n        transform: `translateY(${item.start}px)`,\n        overflowAnchor: 'none',\n      },\n    }),\n  }\n}))\n\nrootContext.virtualFocusHook.on(({ event, scroll }) => {\n  // `scroll` is `false` only for the initial mount highlight. There we set the\n  // roving-tabindex target without focusing or scrolling, so a virtualized\n  // Listbox below the fold doesn't pull the page to it on load. User-driven\n  // highlights (keyboard, typeahead, select) keep scrolling as before.\n  const index = props.options.findIndex((option) => {\n    if (Array.isArray(rootContext.modelValue.value))\n      return compare(option, rootContext.modelValue.value[0], rootContext.by)\n    else\n      return compare(option, rootContext.modelValue.value!, rootContext.by)\n  })\n  if (index !== -1) {\n    event?.preventDefault()\n\n    // Bringing the checked item into the (internal) scroll viewport is safe — it\n    // only scrolls the listbox container, never the page.\n    virtualizer.value.scrollToIndex(index, { align: 'start' })\n    requestAnimationFrame(() => {\n      const item = queryCheckedElement(parentEl.value)\n      if (item) {\n        rootContext.changeHighlight(item, scroll, scroll ? undefined : false)\n        if (event)\n          item?.focus()\n      }\n    })\n  }\n  else if (scroll) {\n    rootContext.highlightFirstItem()\n  }\n  else {\n    // Mount highlight with no checked item: highlight the first enabled item only,\n    // mirroring the non-virtual path. `highlightFirstItem` is reserved for\n    // user-driven PageUp/Home navigation, which focuses and scrolls.\n    requestAnimationFrame(() => {\n      const item = getItems().find(i => i.ref.dataset.disabled !== '')?.ref\n      if (item)\n        rootContext.changeHighlight(item, false, false)\n    })\n  }\n})\n\nrootContext.virtualHighlightHook.on((value) => {\n  const index = props.options.findIndex((option) => {\n    return compare(option, value, rootContext.by)\n  })\n  virtualizer.value.scrollToIndex(index, { align: 'start' })\n  requestAnimationFrame(() => {\n    const item = queryCheckedElement(parentEl.value)\n    if (item)\n      rootContext.changeHighlight(item)\n  })\n})\n\n// Reset `search` 1 second after it was last updated\nconst search = refAutoReset('', 1000)\nconst optionsWithMetadata = computed(() => {\n  const parseTextContent = (option: T) => {\n    if (props.textContent)\n      return props.textContent(option)\n    else\n      return option?.toString().toLowerCase()\n  }\n\n  return props.options.map((option, index) => ({\n    index,\n    textContent: parseTextContent(option),\n  }))\n})\n\nfunction handleMultipleReplace(event: Event, intent: 'first' | 'last' | 'prev' | 'next') {\n  if (!rootContext.firstValue?.value || !rootContext.multiple.value || !Array.isArray(rootContext.modelValue.value))\n    return\n\n  const collection = getItems().filter(i => i.ref.dataset.disabled !== '')\n  const lastValue = collection.find(i => i.ref === rootContext.highlightedElement.value)?.value\n  if (!lastValue)\n    return\n\n  let value: T[] | null = null\n  switch (intent) {\n    case 'prev':\n    case 'next': {\n      value = findValuesBetween(props.options, rootContext.firstValue.value as T, lastValue)\n      break\n    }\n    case 'first': {\n      value = findValuesBetween(props.options, rootContext.firstValue.value as T, props.options?.[0])\n      break\n    }\n    case 'last': {\n      value = findValuesBetween(props.options, rootContext.firstValue.value as T, props.options.at(-1)!)\n      break\n    }\n  }\n  rootContext.modelValue.value = value\n}\n\nrootContext.virtualKeydownHook.on((event) => {\n  const isMetaKey = event.altKey || event.ctrlKey || event.metaKey\n  const isTabKey = event.key === 'Tab' && !isMetaKey\n  if (isTabKey)\n    return\n\n  let intent = MAP_KEY_TO_FOCUS_INTENT[event.key]\n\n  // Meta + A, select all feature\n  if (isMetaKey && event.key === 'a' && rootContext.multiple.value) {\n    event.preventDefault()\n    rootContext.modelValue.value = [...props.options]\n    // purposely make the focus to last\n    intent = 'last'\n  }\n  else if (event.shiftKey && intent) {\n    handleMultipleReplace(event, intent)\n  }\n\n  if (['first', 'last'].includes(intent)) {\n    event.preventDefault()\n\n    const index = intent === 'first' ? 0 : props.options.length - 1\n    virtualizer.value.scrollToIndex(index)\n    requestAnimationFrame(() => {\n      const items = getItems()\n      const item = intent === 'first' ? items[0] : items.at(-1)\n      if (item)\n        rootContext.changeHighlight(item.ref)\n    })\n  }\n  else if (!intent && !isMetaKey) {\n    search.value += event.key\n    const currentIndex = Number(getActiveElement()?.getAttribute('data-index'))\n    const currentMatch = optionsWithMetadata.value[currentIndex].textContent\n    const filteredOptions = optionsWithMetadata.value.map(i => i.textContent ?? '')\n    const next = getNextMatch(filteredOptions, search.value, currentMatch)\n\n    const nextMatch = optionsWithMetadata.value.find(option => option.textContent === next)\n    if (nextMatch) {\n      virtualizer.value.scrollToIndex(nextMatch.index, { align: 'start' })\n      requestAnimationFrame(() => {\n        const item = parentEl.value.querySelector(`[data-index=\"${nextMatch.index}\"]`)\n        if (item instanceof HTMLElement)\n          rootContext.changeHighlight(item)\n      })\n    }\n  }\n})\n</script>\n\n<template>\n  <div\n    data-reka-virtualizer\n    :style=\"{\n      position: 'relative',\n      width: '100%',\n      height: `${virtualizer.getTotalSize()}px`,\n    }\"\n  >\n    <component\n      :is=\"is\"\n      v-for=\"{ is, item } in virtualizedItems\"\n      :key=\"item.index\"\n    />\n  </div>\n</template>\n","<script lang=\"ts\">\nexport interface ListboxVirtualizerProps<T extends AcceptableValue = AcceptableValue> {\n  /** List of items */\n  options: T[]\n  /** Number of items rendered outside the visible area */\n  overscan?: number\n  /** Estimated size (in px) of each item */\n  estimateSize?: number | ((index: number) => number)\n  /** Text content for each item to achieve type-ahead feature */\n  textContent?: (option: T) => string\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableValue = AcceptableValue\">\nimport type { VirtualItem, Virtualizer } from '@tanstack/vue-virtual'\nimport type { Ref, VNode } from 'vue'\nimport type { AcceptableValue } from '@/shared/types'\nimport { useVirtualizer } from '@tanstack/vue-virtual'\nimport { useParentElement } from '@vueuse/core'\nimport { refAutoReset } from '@vueuse/shared'\nimport { cloneVNode, computed, Fragment, useSlots } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { MAP_KEY_TO_FOCUS_INTENT } from '@/RovingFocus/utils'\nimport { findValuesBetween, getActiveElement } from '@/shared'\nimport { getNextMatch } from '@/shared/useTypeahead'\nimport { injectListboxRootContext } from './ListboxRoot.vue'\nimport { compare, queryCheckedElement } from './utils'\n\nconst props = defineProps<ListboxVirtualizerProps<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    option: T\n    virtualizer: Virtualizer<HTMLElement, Element>\n    virtualItem: VirtualItem\n  }) => any\n}>()\n\nconst slots = useSlots()\nconst rootContext = injectListboxRootContext()\nconst parentEl = useParentElement() as Ref<HTMLElement>\nconst { getItems } = useCollection<{ value: T }>()\n\n// set virtual true when this component mounted\nrootContext.isVirtual.value = true\n\nconst padding = computed(() => {\n  const el = parentEl.value\n  if (!el) {\n    return { start: 0, end: 0 }\n  }\n  else {\n    const styles = window.getComputedStyle(el)\n    return {\n      start: Number.parseFloat(styles.paddingBlockStart || styles.paddingTop),\n      end: Number.parseFloat(styles.paddingBlockEnd || styles.paddingBottom),\n    }\n  }\n})\n\nconst virtualizer = useVirtualizer(\n  {\n    get scrollPaddingStart() { return padding.value.start },\n    get scrollPaddingEnd() { return padding.value.end },\n    get count() { return props.options.length },\n    get horizontal() { return rootContext.orientation.value === 'horizontal' },\n    estimateSize(index) {\n      if (typeof props.estimateSize === 'function')\n        return props.estimateSize(index)\n\n      return props.estimateSize ?? 28\n    },\n    getScrollElement() { return parentEl.value },\n    overscan: props.overscan ?? 12,\n  },\n)\n\nconst virtualizedItems = computed(() => virtualizer.value.getVirtualItems().map((item) => {\n  const defaultNode = slots.default!({\n    option: props.options[item.index],\n    virtualizer: virtualizer.value,\n    virtualItem: item,\n  })[0]\n\n  const targetNode = defaultNode.type === Fragment && Array.isArray(defaultNode.children)\n    ? defaultNode.children.find(child => typeof (child as VNode).type !== 'symbol') as VNode\n    : defaultNode\n\n  return {\n    item,\n    is: cloneVNode(targetNode, {\n      'key': `${item.key}`,\n      'data-index': item.index,\n      'aria-setsize': props.options.length,\n      'aria-posinset': item.index + 1,\n      'style': {\n        position: 'absolute',\n        top: 0,\n        left: 0,\n        transform: `translateY(${item.start}px)`,\n        overflowAnchor: 'none',\n      },\n    }),\n  }\n}))\n\nrootContext.virtualFocusHook.on(({ event, scroll }) => {\n  // `scroll` is `false` only for the initial mount highlight. There we set the\n  // roving-tabindex target without focusing or scrolling, so a virtualized\n  // Listbox below the fold doesn't pull the page to it on load. User-driven\n  // highlights (keyboard, typeahead, select) keep scrolling as before.\n  const index = props.options.findIndex((option) => {\n    if (Array.isArray(rootContext.modelValue.value))\n      return compare(option, rootContext.modelValue.value[0], rootContext.by)\n    else\n      return compare(option, rootContext.modelValue.value!, rootContext.by)\n  })\n  if (index !== -1) {\n    event?.preventDefault()\n\n    // Bringing the checked item into the (internal) scroll viewport is safe — it\n    // only scrolls the listbox container, never the page.\n    virtualizer.value.scrollToIndex(index, { align: 'start' })\n    requestAnimationFrame(() => {\n      const item = queryCheckedElement(parentEl.value)\n      if (item) {\n        rootContext.changeHighlight(item, scroll, scroll ? undefined : false)\n        if (event)\n          item?.focus()\n      }\n    })\n  }\n  else if (scroll) {\n    rootContext.highlightFirstItem()\n  }\n  else {\n    // Mount highlight with no checked item: highlight the first enabled item only,\n    // mirroring the non-virtual path. `highlightFirstItem` is reserved for\n    // user-driven PageUp/Home navigation, which focuses and scrolls.\n    requestAnimationFrame(() => {\n      const item = getItems().find(i => i.ref.dataset.disabled !== '')?.ref\n      if (item)\n        rootContext.changeHighlight(item, false, false)\n    })\n  }\n})\n\nrootContext.virtualHighlightHook.on((value) => {\n  const index = props.options.findIndex((option) => {\n    return compare(option, value, rootContext.by)\n  })\n  virtualizer.value.scrollToIndex(index, { align: 'start' })\n  requestAnimationFrame(() => {\n    const item = queryCheckedElement(parentEl.value)\n    if (item)\n      rootContext.changeHighlight(item)\n  })\n})\n\n// Reset `search` 1 second after it was last updated\nconst search = refAutoReset('', 1000)\nconst optionsWithMetadata = computed(() => {\n  const parseTextContent = (option: T) => {\n    if (props.textContent)\n      return props.textContent(option)\n    else\n      return option?.toString().toLowerCase()\n  }\n\n  return props.options.map((option, index) => ({\n    index,\n    textContent: parseTextContent(option),\n  }))\n})\n\nfunction handleMultipleReplace(event: Event, intent: 'first' | 'last' | 'prev' | 'next') {\n  if (!rootContext.firstValue?.value || !rootContext.multiple.value || !Array.isArray(rootContext.modelValue.value))\n    return\n\n  const collection = getItems().filter(i => i.ref.dataset.disabled !== '')\n  const lastValue = collection.find(i => i.ref === rootContext.highlightedElement.value)?.value\n  if (!lastValue)\n    return\n\n  let value: T[] | null = null\n  switch (intent) {\n    case 'prev':\n    case 'next': {\n      value = findValuesBetween(props.options, rootContext.firstValue.value as T, lastValue)\n      break\n    }\n    case 'first': {\n      value = findValuesBetween(props.options, rootContext.firstValue.value as T, props.options?.[0])\n      break\n    }\n    case 'last': {\n      value = findValuesBetween(props.options, rootContext.firstValue.value as T, props.options.at(-1)!)\n      break\n    }\n  }\n  rootContext.modelValue.value = value\n}\n\nrootContext.virtualKeydownHook.on((event) => {\n  const isMetaKey = event.altKey || event.ctrlKey || event.metaKey\n  const isTabKey = event.key === 'Tab' && !isMetaKey\n  if (isTabKey)\n    return\n\n  let intent = MAP_KEY_TO_FOCUS_INTENT[event.key]\n\n  // Meta + A, select all feature\n  if (isMetaKey && event.key === 'a' && rootContext.multiple.value) {\n    event.preventDefault()\n    rootContext.modelValue.value = [...props.options]\n    // purposely make the focus to last\n    intent = 'last'\n  }\n  else if (event.shiftKey && intent) {\n    handleMultipleReplace(event, intent)\n  }\n\n  if (['first', 'last'].includes(intent)) {\n    event.preventDefault()\n\n    const index = intent === 'first' ? 0 : props.options.length - 1\n    virtualizer.value.scrollToIndex(index)\n    requestAnimationFrame(() => {\n      const items = getItems()\n      const item = intent === 'first' ? items[0] : items.at(-1)\n      if (item)\n        rootContext.changeHighlight(item.ref)\n    })\n  }\n  else if (!intent && !isMetaKey) {\n    search.value += event.key\n    const currentIndex = Number(getActiveElement()?.getAttribute('data-index'))\n    const currentMatch = optionsWithMetadata.value[currentIndex].textContent\n    const filteredOptions = optionsWithMetadata.value.map(i => i.textContent ?? '')\n    const next = getNextMatch(filteredOptions, search.value, currentMatch)\n\n    const nextMatch = optionsWithMetadata.value.find(option => option.textContent === next)\n    if (nextMatch) {\n      virtualizer.value.scrollToIndex(nextMatch.index, { align: 'start' })\n      requestAnimationFrame(() => {\n        const item = parentEl.value.querySelector(`[data-index=\"${nextMatch.index}\"]`)\n        if (item instanceof HTMLElement)\n          rootContext.changeHighlight(item)\n      })\n    }\n  }\n})\n</script>\n\n<template>\n  <div\n    data-reka-virtualizer\n    :style=\"{\n      position: 'relative',\n      width: '100%',\n      height: `${virtualizer.getTotalSize()}px`,\n    }\"\n  >\n    <component\n      :is=\"is\"\n      v-for=\"{ is, item } in virtualizedItems\"\n      :key=\"item.index\"\n    />\n  </div>\n</template>\n","<script lang=\"ts\">\nimport type { ReferenceElement } from '@floating-ui/vue'\nimport type { Ref } from 'vue'\nimport { createContext } from '@/shared'\n\nexport interface Measurable {\n  getBoundingClientRect: () => DOMRect\n}\n\ninterface PopperRootContext {\n  anchor: Ref<ReferenceElement | undefined>\n  onAnchorChange: (element: ReferenceElement | undefined) => void\n}\n\nexport const [injectPopperRootContext, providePopperRootContext]\n  = createContext<PopperRootContext>('PopperRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst anchor = ref<ReferenceElement>()\n\nprovidePopperRootContext({\n  anchor,\n  onAnchorChange: element => anchor.value = element,\n})\n</script>\n\n<template>\n  <slot />\n</template>\n","<script lang=\"ts\">\nimport type { ReferenceElement } from '@floating-ui/vue'\nimport type { Ref } from 'vue'\nimport { createContext } from '@/shared'\n\nexport interface Measurable {\n  getBoundingClientRect: () => DOMRect\n}\n\ninterface PopperRootContext {\n  anchor: Ref<ReferenceElement | undefined>\n  onAnchorChange: (element: ReferenceElement | undefined) => void\n}\n\nexport const [injectPopperRootContext, providePopperRootContext]\n  = createContext<PopperRootContext>('PopperRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst anchor = ref<ReferenceElement>()\n\nprovidePopperRootContext({\n  anchor,\n  onAnchorChange: element => anchor.value = element,\n})\n</script>\n\n<template>\n  <slot />\n</template>\n","<script lang=\"ts\">\nimport type { ReferenceElement } from '@floating-ui/vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PopperAnchorProps extends PrimitiveProps {\n  /**\n   *  The reference (or anchor) element that is being referred to for positioning.\n   *\n   *  If not provided will use the current component as anchor.\n   */\n  reference?: ReferenceElement\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { watchPostEffect } from 'vue'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { injectPopperRootContext } from './PopperRoot.vue'\n\nconst props = defineProps<PopperAnchorProps>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst rootContext = injectPopperRootContext()\n\nwatchPostEffect(() => {\n  rootContext.onAnchorChange(props.reference ?? currentElement.value)\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { ReferenceElement } from '@floating-ui/vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PopperAnchorProps extends PrimitiveProps {\n  /**\n   *  The reference (or anchor) element that is being referred to for positioning.\n   *\n   *  If not provided will use the current component as anchor.\n   */\n  reference?: ReferenceElement\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { watchPostEffect } from 'vue'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { injectPopperRootContext } from './PopperRoot.vue'\n\nconst props = defineProps<PopperAnchorProps>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst rootContext = injectPopperRootContext()\n\nwatchPostEffect(() => {\n  rootContext.onAnchorChange(props.reference ?? currentElement.value)\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '../useForwardExpose'\n\nexport interface ArrowProps extends PrimitiveProps {\n  /**\n   * The width of the arrow in pixels.\n   *\n   * @defaultValue 10\n   */\n  width?: number\n  /**\n   * The height of the arrow in pixels.\n   *\n   * @defaultValue 5\n   */\n  height?: number\n  /**\n   * When `true`, render the rounded version of arrow. Do not work with `as`/`asChild`\n   *\n   * @defaultValue false\n   */\n  rounded?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<ArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\n\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :width=\"width\"\n    :height=\"height\"\n    :viewBox=\"asChild ? undefined : '0 0 12 6'\"\n    :preserveAspectRatio=\"asChild ? undefined : 'none'\"\n  >\n    <slot>\n      <path\n        v-if=\"!rounded\"\n        d=\"M0 0L6 6L12 0\"\n      />\n      <path\n        v-else\n        d=\"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0\"\n      />\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '../useForwardExpose'\n\nexport interface ArrowProps extends PrimitiveProps {\n  /**\n   * The width of the arrow in pixels.\n   *\n   * @defaultValue 10\n   */\n  width?: number\n  /**\n   * The height of the arrow in pixels.\n   *\n   * @defaultValue 5\n   */\n  height?: number\n  /**\n   * When `true`, render the rounded version of arrow. Do not work with `as`/`asChild`\n   *\n   * @defaultValue false\n   */\n  rounded?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<ArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\n\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :width=\"width\"\n    :height=\"height\"\n    :viewBox=\"asChild ? undefined : '0 0 12 6'\"\n    :preserveAspectRatio=\"asChild ? undefined : 'none'\"\n  >\n    <slot>\n      <path\n        v-if=\"!rounded\"\n        d=\"M0 0L6 6L12 0\"\n      />\n      <path\n        v-else\n        d=\"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0\"\n      />\n    </slot>\n  </Primitive>\n</template>\n","import type { Middleware, Placement } from '@floating-ui/vue'\n\nconst SIDE_OPTIONS = ['top', 'right', 'bottom', 'left'] as const\nconst ALIGN_OPTIONS = ['start', 'center', 'end'] as const\n\nexport type Side = (typeof SIDE_OPTIONS)[number]\nexport type Align = (typeof ALIGN_OPTIONS)[number]\n\nexport function isNotNull<T>(value: T | null): value is T {\n  return value !== null\n}\n\nexport function transformOrigin(options: {\n  arrowWidth: number\n  arrowHeight: number\n}): Middleware {\n  return {\n    name: 'transformOrigin',\n    options,\n    fn(data) {\n      const { placement, rects, middlewareData } = data\n\n      const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0\n      const isArrowHidden = cannotCenterArrow\n      const arrowWidth = isArrowHidden ? 0 : options.arrowWidth\n      const arrowHeight = isArrowHidden ? 0 : options.arrowHeight\n\n      const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement)\n      const noArrowAlign = { start: '0%', center: '50%', end: '100%' }[\n        placedAlign\n      ]\n\n      const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2\n      const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2\n\n      let x = ''\n      let y = ''\n\n      if (placedSide === 'bottom') {\n        x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`\n        y = `${-arrowHeight}px`\n      }\n      else if (placedSide === 'top') {\n        x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`\n        y = `${rects.floating.height + arrowHeight}px`\n      }\n      else if (placedSide === 'right') {\n        x = `${-arrowHeight}px`\n        y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`\n      }\n      else if (placedSide === 'left') {\n        x = `${rects.floating.width + arrowHeight}px`\n        y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`\n      }\n      return { data: { x, y } }\n    },\n  }\n}\n\nexport function getSideAndAlignFromPlacement(placement: Placement) {\n  const [side, align = 'center'] = placement.split('-')\n  return [side as Side, align as Align] as const\n}\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n  x: v,\n  y: v\n});\nconst oppositeSideMap = {\n  left: 'right',\n  right: 'left',\n  bottom: 'top',\n  top: 'bottom'\n};\nfunction clamp(start, value, end) {\n  return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n  return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n  return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n  return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n  return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n  return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n  const firstChar = placement[0];\n  return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n  return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n  if (rtl === void 0) {\n    rtl = false;\n  }\n  const alignment = getAlignment(placement);\n  const alignmentAxis = getAlignmentAxis(placement);\n  const length = getAxisLength(alignmentAxis);\n  let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n  if (rects.reference[length] > rects.floating[length]) {\n    mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n  }\n  return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n  const oppositePlacement = getOppositePlacement(placement);\n  return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n  return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n  switch (side) {\n    case 'top':\n    case 'bottom':\n      if (rtl) return isStart ? rlPlacement : lrPlacement;\n      return isStart ? lrPlacement : rlPlacement;\n    case 'left':\n    case 'right':\n      return isStart ? tbPlacement : btPlacement;\n    default:\n      return [];\n  }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n  const alignment = getAlignment(placement);\n  let list = getSideList(getSide(placement), direction === 'start', rtl);\n  if (alignment) {\n    list = list.map(side => side + \"-\" + alignment);\n    if (flipAlignment) {\n      list = list.concat(list.map(getOppositeAlignmentPlacement));\n    }\n  }\n  return list;\n}\nfunction getOppositePlacement(placement) {\n  const side = getSide(placement);\n  return oppositeSideMap[side] + placement.slice(side.length);\n}\nfunction expandPaddingObject(padding) {\n  return {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0,\n    ...padding\n  };\n}\nfunction getPaddingObject(padding) {\n  return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n    top: padding,\n    right: padding,\n    bottom: padding,\n    left: padding\n  };\n}\nfunction rectToClientRect(rect) {\n  const {\n    x,\n    y,\n    width,\n    height\n  } = rect;\n  return {\n    width,\n    height,\n    top: y,\n    left: x,\n    right: x + width,\n    bottom: y + height,\n    x,\n    y\n  };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n  let {\n    reference,\n    floating\n  } = _ref;\n  const sideAxis = getSideAxis(placement);\n  const alignmentAxis = getAlignmentAxis(placement);\n  const alignLength = getAxisLength(alignmentAxis);\n  const side = getSide(placement);\n  const isVertical = sideAxis === 'y';\n  const commonX = reference.x + reference.width / 2 - floating.width / 2;\n  const commonY = reference.y + reference.height / 2 - floating.height / 2;\n  const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n  let coords;\n  switch (side) {\n    case 'top':\n      coords = {\n        x: commonX,\n        y: reference.y - floating.height\n      };\n      break;\n    case 'bottom':\n      coords = {\n        x: commonX,\n        y: reference.y + reference.height\n      };\n      break;\n    case 'right':\n      coords = {\n        x: reference.x + reference.width,\n        y: commonY\n      };\n      break;\n    case 'left':\n      coords = {\n        x: reference.x - floating.width,\n        y: commonY\n      };\n      break;\n    default:\n      coords = {\n        x: reference.x,\n        y: reference.y\n      };\n  }\n  switch (getAlignment(placement)) {\n    case 'start':\n      coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n      break;\n    case 'end':\n      coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n      break;\n  }\n  return coords;\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n  var _await$platform$isEle;\n  if (options === void 0) {\n    options = {};\n  }\n  const {\n    x,\n    y,\n    platform,\n    rects,\n    elements,\n    strategy\n  } = state;\n  const {\n    boundary = 'clippingAncestors',\n    rootBoundary = 'viewport',\n    elementContext = 'floating',\n    altBoundary = false,\n    padding = 0\n  } = evaluate(options, state);\n  const paddingObject = getPaddingObject(padding);\n  const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n  const element = elements[altBoundary ? altContext : elementContext];\n  const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n    element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n    boundary,\n    rootBoundary,\n    strategy\n  }));\n  const rect = elementContext === 'floating' ? {\n    x,\n    y,\n    width: rects.floating.width,\n    height: rects.floating.height\n  } : rects.reference;\n  const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n  const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n    x: 1,\n    y: 1\n  } : {\n    x: 1,\n    y: 1\n  };\n  const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n    elements,\n    rect,\n    offsetParent,\n    strategy\n  }) : rect);\n  return {\n    top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n    bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n    left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n    right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n  };\n}\n\n// Maximum number of resets that can occur before bailing to avoid infinite reset loops.\nconst MAX_RESET_COUNT = 50;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n  const {\n    placement = 'bottom',\n    strategy = 'absolute',\n    middleware = [],\n    platform\n  } = config;\n  const platformWithDetectOverflow = platform.detectOverflow ? platform : {\n    ...platform,\n    detectOverflow\n  };\n  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n  let rects = await platform.getElementRects({\n    reference,\n    floating,\n    strategy\n  });\n  let {\n    x,\n    y\n  } = computeCoordsFromPlacement(rects, placement, rtl);\n  let statefulPlacement = placement;\n  let resetCount = 0;\n  const middlewareData = {};\n  for (let i = 0; i < middleware.length; i++) {\n    const currentMiddleware = middleware[i];\n    if (!currentMiddleware) {\n      continue;\n    }\n    const {\n      name,\n      fn\n    } = currentMiddleware;\n    const {\n      x: nextX,\n      y: nextY,\n      data,\n      reset\n    } = await fn({\n      x,\n      y,\n      initialPlacement: placement,\n      placement: statefulPlacement,\n      strategy,\n      middlewareData,\n      rects,\n      platform: platformWithDetectOverflow,\n      elements: {\n        reference,\n        floating\n      }\n    });\n    x = nextX != null ? nextX : x;\n    y = nextY != null ? nextY : y;\n    middlewareData[name] = {\n      ...middlewareData[name],\n      ...data\n    };\n    if (reset && resetCount < MAX_RESET_COUNT) {\n      resetCount++;\n      if (typeof reset === 'object') {\n        if (reset.placement) {\n          statefulPlacement = reset.placement;\n        }\n        if (reset.rects) {\n          rects = reset.rects === true ? await platform.getElementRects({\n            reference,\n            floating,\n            strategy\n          }) : reset.rects;\n        }\n        ({\n          x,\n          y\n        } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n      }\n      i = -1;\n    }\n  }\n  return {\n    x,\n    y,\n    placement: statefulPlacement,\n    strategy,\n    middlewareData\n  };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n  name: 'arrow',\n  options,\n  async fn(state) {\n    const {\n      x,\n      y,\n      placement,\n      rects,\n      platform,\n      elements,\n      middlewareData\n    } = state;\n    // Since `element` is required, we don't Partial<> the type.\n    const {\n      element,\n      padding = 0\n    } = evaluate(options, state) || {};\n    if (element == null) {\n      return {};\n    }\n    const paddingObject = getPaddingObject(padding);\n    const coords = {\n      x,\n      y\n    };\n    const axis = getAlignmentAxis(placement);\n    const length = getAxisLength(axis);\n    const arrowDimensions = await platform.getDimensions(element);\n    const isYAxis = axis === 'y';\n    const minProp = isYAxis ? 'top' : 'left';\n    const maxProp = isYAxis ? 'bottom' : 'right';\n    const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n    const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n    const startDiff = coords[axis] - rects.reference[axis];\n    const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n    let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n    // DOM platform can return `window` as the `offsetParent`.\n    if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n      clientSize = elements.floating[clientProp] || rects.floating[length];\n    }\n    const centerToReference = endDiff / 2 - startDiff / 2;\n\n    // If the padding is large enough that it causes the arrow to no longer be\n    // centered, modify the padding so that it is centered.\n    const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n    const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n    const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n    // Make sure the arrow doesn't overflow the floating element if the center\n    // point is outside the floating element's bounds.\n    const min$1 = minPadding;\n    const max = clientSize - arrowDimensions[length] - maxPadding;\n    const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n    const offset = clamp(min$1, center, max);\n\n    // If the reference is small enough that the arrow's padding causes it to\n    // to point to nothing for an aligned placement, adjust the offset of the\n    // floating element itself. To ensure `shift()` continues to take action,\n    // a single reset is performed when this is true.\n    const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n    const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n    return {\n      [axis]: coords[axis] + alignmentOffset,\n      data: {\n        [axis]: offset,\n        centerOffset: center - offset - alignmentOffset,\n        ...(shouldAddOffset && {\n          alignmentOffset\n        })\n      },\n      reset: shouldAddOffset\n    };\n  }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n  const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n  return allowedPlacementsSortedByAlignment.filter(placement => {\n    if (alignment) {\n      return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n    }\n    return true;\n  });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'autoPlacement',\n    options,\n    async fn(state) {\n      var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n      const {\n        rects,\n        middlewareData,\n        placement,\n        platform,\n        elements\n      } = state;\n      const {\n        crossAxis = false,\n        alignment,\n        allowedPlacements = placements,\n        autoAlignment = true,\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n      const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n      const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n      const currentPlacement = placements$1[currentIndex];\n      if (currentPlacement == null) {\n        return {};\n      }\n      const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n      // Make `computeCoords` start from the right place.\n      if (placement !== currentPlacement) {\n        return {\n          reset: {\n            placement: placements$1[0]\n          }\n        };\n      }\n      const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n      const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n        placement: currentPlacement,\n        overflows: currentOverflows\n      }];\n      const nextPlacement = placements$1[currentIndex + 1];\n\n      // There are more placements to check.\n      if (nextPlacement) {\n        return {\n          data: {\n            index: currentIndex + 1,\n            overflows: allOverflows\n          },\n          reset: {\n            placement: nextPlacement\n          }\n        };\n      }\n      const placementsSortedByMostSpace = allOverflows.map(d => {\n        const alignment = getAlignment(d.placement);\n        return [d.placement, alignment && crossAxis ?\n        // Check along the mainAxis and main crossAxis side.\n        d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n        // Check only the mainAxis.\n        d.overflows[0], d.overflows];\n      }).sort((a, b) => a[1] - b[1]);\n      const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n      // Aligned placements should not check their opposite crossAxis\n      // side.\n      getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n      const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n      if (resetPlacement !== placement) {\n        return {\n          data: {\n            index: currentIndex + 1,\n            overflows: allOverflows\n          },\n          reset: {\n            placement: resetPlacement\n          }\n        };\n      }\n      return {};\n    }\n  };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'flip',\n    options,\n    async fn(state) {\n      var _middlewareData$arrow, _middlewareData$flip;\n      const {\n        placement,\n        middlewareData,\n        rects,\n        initialPlacement,\n        platform,\n        elements\n      } = state;\n      const {\n        mainAxis: checkMainAxis = true,\n        crossAxis: checkCrossAxis = true,\n        fallbackPlacements: specifiedFallbackPlacements,\n        fallbackStrategy = 'bestFit',\n        fallbackAxisSideDirection = 'none',\n        flipAlignment = true,\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n\n      // If a reset by the arrow was caused due to an alignment offset being\n      // added, we should skip any logic now since `flip()` has already done its\n      // work.\n      // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n      if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n        return {};\n      }\n      const side = getSide(placement);\n      const initialSideAxis = getSideAxis(initialPlacement);\n      const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n      const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n      const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n      const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n      if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n        fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n      }\n      const placements = [initialPlacement, ...fallbackPlacements];\n      const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n      const overflows = [];\n      let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n      if (checkMainAxis) {\n        overflows.push(overflow[side]);\n      }\n      if (checkCrossAxis) {\n        const sides = getAlignmentSides(placement, rects, rtl);\n        overflows.push(overflow[sides[0]], overflow[sides[1]]);\n      }\n      overflowsData = [...overflowsData, {\n        placement,\n        overflows\n      }];\n\n      // One or more sides is overflowing.\n      if (!overflows.every(side => side <= 0)) {\n        var _middlewareData$flip2, _overflowsData$filter;\n        const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n        const nextPlacement = placements[nextIndex];\n        if (nextPlacement) {\n          const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n          if (!ignoreCrossAxisOverflow ||\n          // We leave the current main axis only if every placement on that axis\n          // overflows the main axis.\n          overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n            // Try next placement and re-run the lifecycle.\n            return {\n              data: {\n                index: nextIndex,\n                overflows: overflowsData\n              },\n              reset: {\n                placement: nextPlacement\n              }\n            };\n          }\n        }\n\n        // First, find the candidates that fit on the mainAxis side of overflow,\n        // then find the placement that fits the best on the main crossAxis side.\n        let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n        // Otherwise fallback.\n        if (!resetPlacement) {\n          switch (fallbackStrategy) {\n            case 'bestFit':\n              {\n                var _overflowsData$filter2;\n                const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n                  if (hasFallbackAxisSideDirection) {\n                    const currentSideAxis = getSideAxis(d.placement);\n                    return currentSideAxis === initialSideAxis ||\n                    // Create a bias to the `y` side axis due to horizontal\n                    // reading directions favoring greater width.\n                    currentSideAxis === 'y';\n                  }\n                  return true;\n                }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n                if (placement) {\n                  resetPlacement = placement;\n                }\n                break;\n              }\n            case 'initialPlacement':\n              resetPlacement = initialPlacement;\n              break;\n          }\n        }\n        if (placement !== resetPlacement) {\n          return {\n            reset: {\n              placement: resetPlacement\n            }\n          };\n        }\n      }\n      return {};\n    }\n  };\n};\n\nfunction getSideOffsets(overflow, rect) {\n  return {\n    top: overflow.top - rect.height,\n    right: overflow.right - rect.width,\n    bottom: overflow.bottom - rect.height,\n    left: overflow.left - rect.width\n  };\n}\nfunction isAnySideFullyClipped(overflow) {\n  return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'hide',\n    options,\n    async fn(state) {\n      const {\n        rects,\n        platform\n      } = state;\n      const {\n        strategy = 'referenceHidden',\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      switch (strategy) {\n        case 'referenceHidden':\n          {\n            const overflow = await platform.detectOverflow(state, {\n              ...detectOverflowOptions,\n              elementContext: 'reference'\n            });\n            const offsets = getSideOffsets(overflow, rects.reference);\n            return {\n              data: {\n                referenceHiddenOffsets: offsets,\n                referenceHidden: isAnySideFullyClipped(offsets)\n              }\n            };\n          }\n        case 'escaped':\n          {\n            const overflow = await platform.detectOverflow(state, {\n              ...detectOverflowOptions,\n              altBoundary: true\n            });\n            const offsets = getSideOffsets(overflow, rects.floating);\n            return {\n              data: {\n                escapedOffsets: offsets,\n                escaped: isAnySideFullyClipped(offsets)\n              }\n            };\n          }\n        default:\n          {\n            return {};\n          }\n      }\n    }\n  };\n};\n\nfunction getBoundingRect(rects) {\n  const minX = min(...rects.map(rect => rect.left));\n  const minY = min(...rects.map(rect => rect.top));\n  const maxX = max(...rects.map(rect => rect.right));\n  const maxY = max(...rects.map(rect => rect.bottom));\n  return {\n    x: minX,\n    y: minY,\n    width: maxX - minX,\n    height: maxY - minY\n  };\n}\nfunction getRectsByLine(rects) {\n  const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n  const groups = [];\n  let prevRect = null;\n  for (let i = 0; i < sortedRects.length; i++) {\n    const rect = sortedRects[i];\n    if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n      groups.push([rect]);\n    } else {\n      groups[groups.length - 1].push(rect);\n    }\n    prevRect = rect;\n  }\n  return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'inline',\n    options,\n    async fn(state) {\n      const {\n        placement,\n        elements,\n        rects,\n        platform,\n        strategy\n      } = state;\n      // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n      // ClientRect's bounds, despite the event listener being triggered. A\n      // padding of 2 seems to handle this issue.\n      const {\n        padding = 2,\n        x,\n        y\n      } = evaluate(options, state);\n      const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n      const clientRects = getRectsByLine(nativeClientRects);\n      const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n      const paddingObject = getPaddingObject(padding);\n      function getBoundingClientRect() {\n        // There are two rects and they are disjoined.\n        if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n          // Find the first rect in which the point is fully inside.\n          return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n        }\n\n        // There are 2 or more connected rects.\n        if (clientRects.length >= 2) {\n          if (getSideAxis(placement) === 'y') {\n            const firstRect = clientRects[0];\n            const lastRect = clientRects[clientRects.length - 1];\n            const isTop = getSide(placement) === 'top';\n            const top = firstRect.top;\n            const bottom = lastRect.bottom;\n            const left = isTop ? firstRect.left : lastRect.left;\n            const right = isTop ? firstRect.right : lastRect.right;\n            const width = right - left;\n            const height = bottom - top;\n            return {\n              top,\n              bottom,\n              left,\n              right,\n              width,\n              height,\n              x: left,\n              y: top\n            };\n          }\n          const isLeftSide = getSide(placement) === 'left';\n          const maxRight = max(...clientRects.map(rect => rect.right));\n          const minLeft = min(...clientRects.map(rect => rect.left));\n          const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n          const top = measureRects[0].top;\n          const bottom = measureRects[measureRects.length - 1].bottom;\n          const left = minLeft;\n          const right = maxRight;\n          const width = right - left;\n          const height = bottom - top;\n          return {\n            top,\n            bottom,\n            left,\n            right,\n            width,\n            height,\n            x: left,\n            y: top\n          };\n        }\n        return fallback;\n      }\n      const resetRects = await platform.getElementRects({\n        reference: {\n          getBoundingClientRect\n        },\n        floating: elements.floating,\n        strategy\n      });\n      if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n        return {\n          reset: {\n            rects: resetRects\n          }\n        };\n      }\n      return {};\n    }\n  };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n  const {\n    placement,\n    platform,\n    elements\n  } = state;\n  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n  const side = getSide(placement);\n  const alignment = getAlignment(placement);\n  const isVertical = getSideAxis(placement) === 'y';\n  const mainAxisMulti = originSides.has(side) ? -1 : 1;\n  const crossAxisMulti = rtl && isVertical ? -1 : 1;\n  const rawValue = evaluate(options, state);\n\n  // eslint-disable-next-line prefer-const\n  let {\n    mainAxis,\n    crossAxis,\n    alignmentAxis\n  } = typeof rawValue === 'number' ? {\n    mainAxis: rawValue,\n    crossAxis: 0,\n    alignmentAxis: null\n  } : {\n    mainAxis: rawValue.mainAxis || 0,\n    crossAxis: rawValue.crossAxis || 0,\n    alignmentAxis: rawValue.alignmentAxis\n  };\n  if (alignment && typeof alignmentAxis === 'number') {\n    crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n  }\n  return isVertical ? {\n    x: crossAxis * crossAxisMulti,\n    y: mainAxis * mainAxisMulti\n  } : {\n    x: mainAxis * mainAxisMulti,\n    y: crossAxis * crossAxisMulti\n  };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n  if (options === void 0) {\n    options = 0;\n  }\n  return {\n    name: 'offset',\n    options,\n    async fn(state) {\n      var _middlewareData$offse, _middlewareData$arrow;\n      const {\n        x,\n        y,\n        placement,\n        middlewareData\n      } = state;\n      const diffCoords = await convertValueToCoords(state, options);\n\n      // If the placement is the same and the arrow caused an alignment offset\n      // then we don't need to change the positioning coordinates.\n      if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n        return {};\n      }\n      return {\n        x: x + diffCoords.x,\n        y: y + diffCoords.y,\n        data: {\n          ...diffCoords,\n          placement\n        }\n      };\n    }\n  };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'shift',\n    options,\n    async fn(state) {\n      const {\n        x,\n        y,\n        placement,\n        platform\n      } = state;\n      const {\n        mainAxis: checkMainAxis = true,\n        crossAxis: checkCrossAxis = false,\n        limiter = {\n          fn: _ref => {\n            let {\n              x,\n              y\n            } = _ref;\n            return {\n              x,\n              y\n            };\n          }\n        },\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      const coords = {\n        x,\n        y\n      };\n      const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n      const crossAxis = getSideAxis(getSide(placement));\n      const mainAxis = getOppositeAxis(crossAxis);\n      let mainAxisCoord = coords[mainAxis];\n      let crossAxisCoord = coords[crossAxis];\n      if (checkMainAxis) {\n        const minSide = mainAxis === 'y' ? 'top' : 'left';\n        const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n        const min = mainAxisCoord + overflow[minSide];\n        const max = mainAxisCoord - overflow[maxSide];\n        mainAxisCoord = clamp(min, mainAxisCoord, max);\n      }\n      if (checkCrossAxis) {\n        const minSide = crossAxis === 'y' ? 'top' : 'left';\n        const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n        const min = crossAxisCoord + overflow[minSide];\n        const max = crossAxisCoord - overflow[maxSide];\n        crossAxisCoord = clamp(min, crossAxisCoord, max);\n      }\n      const limitedCoords = limiter.fn({\n        ...state,\n        [mainAxis]: mainAxisCoord,\n        [crossAxis]: crossAxisCoord\n      });\n      return {\n        ...limitedCoords,\n        data: {\n          x: limitedCoords.x - x,\n          y: limitedCoords.y - y,\n          enabled: {\n            [mainAxis]: checkMainAxis,\n            [crossAxis]: checkCrossAxis\n          }\n        }\n      };\n    }\n  };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    options,\n    fn(state) {\n      const {\n        x,\n        y,\n        placement,\n        rects,\n        middlewareData\n      } = state;\n      const {\n        offset = 0,\n        mainAxis: checkMainAxis = true,\n        crossAxis: checkCrossAxis = true\n      } = evaluate(options, state);\n      const coords = {\n        x,\n        y\n      };\n      const crossAxis = getSideAxis(placement);\n      const mainAxis = getOppositeAxis(crossAxis);\n      let mainAxisCoord = coords[mainAxis];\n      let crossAxisCoord = coords[crossAxis];\n      const rawOffset = evaluate(offset, state);\n      const computedOffset = typeof rawOffset === 'number' ? {\n        mainAxis: rawOffset,\n        crossAxis: 0\n      } : {\n        mainAxis: 0,\n        crossAxis: 0,\n        ...rawOffset\n      };\n      if (checkMainAxis) {\n        const len = mainAxis === 'y' ? 'height' : 'width';\n        const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n        const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n        if (mainAxisCoord < limitMin) {\n          mainAxisCoord = limitMin;\n        } else if (mainAxisCoord > limitMax) {\n          mainAxisCoord = limitMax;\n        }\n      }\n      if (checkCrossAxis) {\n        var _middlewareData$offse, _middlewareData$offse2;\n        const len = mainAxis === 'y' ? 'width' : 'height';\n        const isOriginSide = originSides.has(getSide(placement));\n        const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n        const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n        if (crossAxisCoord < limitMin) {\n          crossAxisCoord = limitMin;\n        } else if (crossAxisCoord > limitMax) {\n          crossAxisCoord = limitMax;\n        }\n      }\n      return {\n        [mainAxis]: mainAxisCoord,\n        [crossAxis]: crossAxisCoord\n      };\n    }\n  };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n  if (options === void 0) {\n    options = {};\n  }\n  return {\n    name: 'size',\n    options,\n    async fn(state) {\n      var _state$middlewareData, _state$middlewareData2;\n      const {\n        placement,\n        rects,\n        platform,\n        elements\n      } = state;\n      const {\n        apply = () => {},\n        ...detectOverflowOptions\n      } = evaluate(options, state);\n      const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n      const side = getSide(placement);\n      const alignment = getAlignment(placement);\n      const isYAxis = getSideAxis(placement) === 'y';\n      const {\n        width,\n        height\n      } = rects.floating;\n      let heightSide;\n      let widthSide;\n      if (side === 'top' || side === 'bottom') {\n        heightSide = side;\n        widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n      } else {\n        widthSide = side;\n        heightSide = alignment === 'end' ? 'top' : 'bottom';\n      }\n      const maximumClippingHeight = height - overflow.top - overflow.bottom;\n      const maximumClippingWidth = width - overflow.left - overflow.right;\n      const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n      const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n      const noShift = !state.middlewareData.shift;\n      let availableHeight = overflowAvailableHeight;\n      let availableWidth = overflowAvailableWidth;\n      if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n        availableWidth = maximumClippingWidth;\n      }\n      if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n        availableHeight = maximumClippingHeight;\n      }\n      if (noShift && !alignment) {\n        const xMin = max(overflow.left, 0);\n        const xMax = max(overflow.right, 0);\n        const yMin = max(overflow.top, 0);\n        const yMax = max(overflow.bottom, 0);\n        if (isYAxis) {\n          availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n        } else {\n          availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n        }\n      }\n      await apply({\n        ...state,\n        availableWidth,\n        availableHeight\n      });\n      const nextDimensions = await platform.getDimensions(elements.floating);\n      if (width !== nextDimensions.width || height !== nextDimensions.height) {\n        return {\n          reset: {\n            rects: true\n          }\n        };\n      }\n      return {};\n    }\n  };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function hasWindow() {\n  return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n  if (isNode(node)) {\n    return (node.nodeName || '').toLowerCase();\n  }\n  // Mocked nodes in testing environments may not be instances of Node. By\n  // returning `#document` an infinite loop won't occur.\n  // https://github.com/floating-ui/floating-ui/issues/2317\n  return '#document';\n}\nfunction getWindow(node) {\n  var _node$ownerDocument;\n  return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n  var _ref;\n  return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n  if (!hasWindow()) {\n    return false;\n  }\n  return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n  if (!hasWindow()) {\n    return false;\n  }\n  return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n  if (!hasWindow()) {\n    return false;\n  }\n  return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n  if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n    return false;\n  }\n  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n  const {\n    overflow,\n    overflowX,\n    overflowY,\n    display\n  } = getComputedStyle(element);\n  return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';\n}\nfunction isTableElement(element) {\n  return /^(table|td|th)$/.test(getNodeName(element));\n}\nfunction isTopLayer(element) {\n  try {\n    if (element.matches(':popover-open')) {\n      return true;\n    }\n  } catch (_e) {\n    // no-op\n  }\n  try {\n    return element.matches(':modal');\n  } catch (_e) {\n    return false;\n  }\n}\nconst willChangeRe = /transform|translate|scale|rotate|perspective|filter/;\nconst containRe = /paint|layout|strict|content/;\nconst isNotNone = value => !!value && value !== 'none';\nlet isWebKitValue;\nfunction isContainingBlock(elementOrCss) {\n  const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n  // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n  return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');\n}\nfunction getContainingBlock(element) {\n  let currentNode = getParentNode(element);\n  while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n    if (isContainingBlock(currentNode)) {\n      return currentNode;\n    } else if (isTopLayer(currentNode)) {\n      return null;\n    }\n    currentNode = getParentNode(currentNode);\n  }\n  return null;\n}\nfunction isWebKit() {\n  if (isWebKitValue == null) {\n    isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');\n  }\n  return isWebKitValue;\n}\nfunction isLastTraversableNode(node) {\n  return /^(html|body|#document)$/.test(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n  return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n  if (isElement(element)) {\n    return {\n      scrollLeft: element.scrollLeft,\n      scrollTop: element.scrollTop\n    };\n  }\n  return {\n    scrollLeft: element.scrollX,\n    scrollTop: element.scrollY\n  };\n}\nfunction getParentNode(node) {\n  if (getNodeName(node) === 'html') {\n    return node;\n  }\n  const result =\n  // Step into the shadow DOM of the parent of a slotted node.\n  node.assignedSlot ||\n  // DOM Element detected.\n  node.parentNode ||\n  // ShadowRoot detected.\n  isShadowRoot(node) && node.host ||\n  // Fallback.\n  getDocumentElement(node);\n  return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n  const parentNode = getParentNode(node);\n  if (isLastTraversableNode(parentNode)) {\n    return node.ownerDocument ? node.ownerDocument.body : node.body;\n  }\n  if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n    return parentNode;\n  }\n  return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n  var _node$ownerDocument2;\n  if (list === void 0) {\n    list = [];\n  }\n  if (traverseIframes === void 0) {\n    traverseIframes = true;\n  }\n  const scrollableAncestor = getNearestOverflowAncestor(node);\n  const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n  const win = getWindow(scrollableAncestor);\n  if (isBody) {\n    const frameElement = getFrameElement(win);\n    return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n  } else {\n    return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n  }\n}\nfunction getFrameElement(win) {\n  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n  const css = getComputedStyle$1(element);\n  // In testing environments, the `width` and `height` properties are empty\n  // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n  let width = parseFloat(css.width) || 0;\n  let height = parseFloat(css.height) || 0;\n  const hasOffset = isHTMLElement(element);\n  const offsetWidth = hasOffset ? element.offsetWidth : width;\n  const offsetHeight = hasOffset ? element.offsetHeight : height;\n  const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n  if (shouldFallback) {\n    width = offsetWidth;\n    height = offsetHeight;\n  }\n  return {\n    width,\n    height,\n    $: shouldFallback\n  };\n}\n\nfunction unwrapElement(element) {\n  return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n  const domElement = unwrapElement(element);\n  if (!isHTMLElement(domElement)) {\n    return createCoords(1);\n  }\n  const rect = domElement.getBoundingClientRect();\n  const {\n    width,\n    height,\n    $\n  } = getCssDimensions(domElement);\n  let x = ($ ? round(rect.width) : rect.width) / width;\n  let y = ($ ? round(rect.height) : rect.height) / height;\n\n  // 0, NaN, or Infinity should always fallback to 1.\n\n  if (!x || !Number.isFinite(x)) {\n    x = 1;\n  }\n  if (!y || !Number.isFinite(y)) {\n    y = 1;\n  }\n  return {\n    x,\n    y\n  };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n  const win = getWindow(element);\n  if (!isWebKit() || !win.visualViewport) {\n    return noOffsets;\n  }\n  return {\n    x: win.visualViewport.offsetLeft,\n    y: win.visualViewport.offsetTop\n  };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n  if (isFixed === void 0) {\n    isFixed = false;\n  }\n  if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n    return false;\n  }\n  return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n  if (includeScale === void 0) {\n    includeScale = false;\n  }\n  if (isFixedStrategy === void 0) {\n    isFixedStrategy = false;\n  }\n  const clientRect = element.getBoundingClientRect();\n  const domElement = unwrapElement(element);\n  let scale = createCoords(1);\n  if (includeScale) {\n    if (offsetParent) {\n      if (isElement(offsetParent)) {\n        scale = getScale(offsetParent);\n      }\n    } else {\n      scale = getScale(element);\n    }\n  }\n  const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n  let x = (clientRect.left + visualOffsets.x) / scale.x;\n  let y = (clientRect.top + visualOffsets.y) / scale.y;\n  let width = clientRect.width / scale.x;\n  let height = clientRect.height / scale.y;\n  if (domElement) {\n    const win = getWindow(domElement);\n    const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n    let currentWin = win;\n    let currentIFrame = getFrameElement(currentWin);\n    while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n      const iframeScale = getScale(currentIFrame);\n      const iframeRect = currentIFrame.getBoundingClientRect();\n      const css = getComputedStyle$1(currentIFrame);\n      const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n      const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n      x *= iframeScale.x;\n      y *= iframeScale.y;\n      width *= iframeScale.x;\n      height *= iframeScale.y;\n      x += left;\n      y += top;\n      currentWin = getWindow(currentIFrame);\n      currentIFrame = getFrameElement(currentWin);\n    }\n  }\n  return rectToClientRect({\n    width,\n    height,\n    x,\n    y\n  });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n  const leftScroll = getNodeScroll(element).scrollLeft;\n  if (!rect) {\n    return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n  }\n  return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n  const htmlRect = documentElement.getBoundingClientRect();\n  const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n  const y = htmlRect.top + scroll.scrollTop;\n  return {\n    x,\n    y\n  };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n  let {\n    elements,\n    rect,\n    offsetParent,\n    strategy\n  } = _ref;\n  const isFixed = strategy === 'fixed';\n  const documentElement = getDocumentElement(offsetParent);\n  const topLayer = elements ? isTopLayer(elements.floating) : false;\n  if (offsetParent === documentElement || topLayer && isFixed) {\n    return rect;\n  }\n  let scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  let scale = createCoords(1);\n  const offsets = createCoords(0);\n  const isOffsetParentAnElement = isHTMLElement(offsetParent);\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n    if (isOffsetParentAnElement) {\n      const offsetRect = getBoundingClientRect(offsetParent);\n      scale = getScale(offsetParent);\n      offsets.x = offsetRect.x + offsetParent.clientLeft;\n      offsets.y = offsetRect.y + offsetParent.clientTop;\n    }\n  }\n  const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n  return {\n    width: rect.width * scale.x,\n    height: rect.height * scale.y,\n    x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n    y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n  };\n}\n\nfunction getClientRects(element) {\n  return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n  const html = getDocumentElement(element);\n  const scroll = getNodeScroll(element);\n  const body = element.ownerDocument.body;\n  const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n  const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n  let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n  const y = -scroll.scrollTop;\n  if (getComputedStyle$1(body).direction === 'rtl') {\n    x += max(html.clientWidth, body.clientWidth) - width;\n  }\n  return {\n    width,\n    height,\n    x,\n    y\n  };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy) {\n  const win = getWindow(element);\n  const html = getDocumentElement(element);\n  const visualViewport = win.visualViewport;\n  let width = html.clientWidth;\n  let height = html.clientHeight;\n  let x = 0;\n  let y = 0;\n  if (visualViewport) {\n    width = visualViewport.width;\n    height = visualViewport.height;\n    const visualViewportBased = isWebKit();\n    if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n      x = visualViewport.offsetLeft;\n      y = visualViewport.offsetTop;\n    }\n  }\n  const windowScrollbarX = getWindowScrollBarX(html);\n  // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the\n  // visual width of the <html> but this is not considered in the size\n  // of `html.clientWidth`.\n  if (windowScrollbarX <= 0) {\n    const doc = html.ownerDocument;\n    const body = doc.body;\n    const bodyStyles = getComputedStyle(body);\n    const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n    const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n    if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {\n      width -= clippingStableScrollbarWidth;\n    }\n  } else if (windowScrollbarX <= SCROLLBAR_MAX) {\n    // If the <body> scrollbar is on the left, the width needs to be extended\n    // by the scrollbar amount so there isn't extra space on the right.\n    width += windowScrollbarX;\n  }\n  return {\n    width,\n    height,\n    x,\n    y\n  };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n  const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n  const top = clientRect.top + element.clientTop;\n  const left = clientRect.left + element.clientLeft;\n  const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n  const width = element.clientWidth * scale.x;\n  const height = element.clientHeight * scale.y;\n  const x = left * scale.x;\n  const y = top * scale.y;\n  return {\n    width,\n    height,\n    x,\n    y\n  };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n  let rect;\n  if (clippingAncestor === 'viewport') {\n    rect = getViewportRect(element, strategy);\n  } else if (clippingAncestor === 'document') {\n    rect = getDocumentRect(getDocumentElement(element));\n  } else if (isElement(clippingAncestor)) {\n    rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n  } else {\n    const visualOffsets = getVisualOffsets(element);\n    rect = {\n      x: clippingAncestor.x - visualOffsets.x,\n      y: clippingAncestor.y - visualOffsets.y,\n      width: clippingAncestor.width,\n      height: clippingAncestor.height\n    };\n  }\n  return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n  const parentNode = getParentNode(element);\n  if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n    return false;\n  }\n  return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n  const cachedResult = cache.get(element);\n  if (cachedResult) {\n    return cachedResult;\n  }\n  let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n  let currentContainingBlockComputedStyle = null;\n  const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n  let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n    const computedStyle = getComputedStyle$1(currentNode);\n    const currentNodeIsContaining = isContainingBlock(currentNode);\n    if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n      currentContainingBlockComputedStyle = null;\n    }\n    const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n    if (shouldDropCurrentNode) {\n      // Drop non-containing blocks.\n      result = result.filter(ancestor => ancestor !== currentNode);\n    } else {\n      // Record last containing block for next iteration.\n      currentContainingBlockComputedStyle = computedStyle;\n    }\n    currentNode = getParentNode(currentNode);\n  }\n  cache.set(element, result);\n  return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n  let {\n    element,\n    boundary,\n    rootBoundary,\n    strategy\n  } = _ref;\n  const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n  const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n  const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);\n  let top = firstRect.top;\n  let right = firstRect.right;\n  let bottom = firstRect.bottom;\n  let left = firstRect.left;\n  for (let i = 1; i < clippingAncestors.length; i++) {\n    const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);\n    top = max(rect.top, top);\n    right = min(rect.right, right);\n    bottom = min(rect.bottom, bottom);\n    left = max(rect.left, left);\n  }\n  return {\n    width: right - left,\n    height: bottom - top,\n    x: left,\n    y: top\n  };\n}\n\nfunction getDimensions(element) {\n  const {\n    width,\n    height\n  } = getCssDimensions(element);\n  return {\n    width,\n    height\n  };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n  const isOffsetParentAnElement = isHTMLElement(offsetParent);\n  const documentElement = getDocumentElement(offsetParent);\n  const isFixed = strategy === 'fixed';\n  const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n  let scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  const offsets = createCoords(0);\n\n  // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n  // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n  function setLeftRTLScrollbarOffset() {\n    offsets.x = getWindowScrollBarX(documentElement);\n  }\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n    if (isOffsetParentAnElement) {\n      const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n      offsets.x = offsetRect.x + offsetParent.clientLeft;\n      offsets.y = offsetRect.y + offsetParent.clientTop;\n    } else if (documentElement) {\n      setLeftRTLScrollbarOffset();\n    }\n  }\n  if (isFixed && !isOffsetParentAnElement && documentElement) {\n    setLeftRTLScrollbarOffset();\n  }\n  const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n  const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n  const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n  return {\n    x,\n    y,\n    width: rect.width,\n    height: rect.height\n  };\n}\n\nfunction isStaticPositioned(element) {\n  return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n  if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n    return null;\n  }\n  if (polyfill) {\n    return polyfill(element);\n  }\n  let rawOffsetParent = element.offsetParent;\n\n  // Firefox returns the <html> element as the offsetParent if it's non-static,\n  // while Chrome and Safari return the <body> element. The <body> element must\n  // be used to perform the correct calculations even if the <html> element is\n  // non-static.\n  if (getDocumentElement(element) === rawOffsetParent) {\n    rawOffsetParent = rawOffsetParent.ownerDocument.body;\n  }\n  return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n  const win = getWindow(element);\n  if (isTopLayer(element)) {\n    return win;\n  }\n  if (!isHTMLElement(element)) {\n    let svgOffsetParent = getParentNode(element);\n    while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n      if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n        return svgOffsetParent;\n      }\n      svgOffsetParent = getParentNode(svgOffsetParent);\n    }\n    return win;\n  }\n  let offsetParent = getTrueOffsetParent(element, polyfill);\n  while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n    offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n  }\n  if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n    return win;\n  }\n  return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n  const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n  const getDimensionsFn = this.getDimensions;\n  const floatingDimensions = await getDimensionsFn(data.floating);\n  return {\n    reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n    floating: {\n      x: 0,\n      y: 0,\n      width: floatingDimensions.width,\n      height: floatingDimensions.height\n    }\n  };\n};\n\nfunction isRTL(element) {\n  return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n  convertOffsetParentRelativeRectToViewportRelativeRect,\n  getDocumentElement,\n  getClippingRect,\n  getOffsetParent,\n  getElementRects,\n  getClientRects,\n  getDimensions,\n  getScale,\n  isElement,\n  isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n  return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n  let io = null;\n  let timeoutId;\n  const root = getDocumentElement(element);\n  function cleanup() {\n    var _io;\n    clearTimeout(timeoutId);\n    (_io = io) == null || _io.disconnect();\n    io = null;\n  }\n  function refresh(skip, threshold) {\n    if (skip === void 0) {\n      skip = false;\n    }\n    if (threshold === void 0) {\n      threshold = 1;\n    }\n    cleanup();\n    const elementRectForRootMargin = element.getBoundingClientRect();\n    const {\n      left,\n      top,\n      width,\n      height\n    } = elementRectForRootMargin;\n    if (!skip) {\n      onMove();\n    }\n    if (!width || !height) {\n      return;\n    }\n    const insetTop = floor(top);\n    const insetRight = floor(root.clientWidth - (left + width));\n    const insetBottom = floor(root.clientHeight - (top + height));\n    const insetLeft = floor(left);\n    const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n    const options = {\n      rootMargin,\n      threshold: max(0, min(1, threshold)) || 1\n    };\n    let isFirstUpdate = true;\n    function handleObserve(entries) {\n      const ratio = entries[0].intersectionRatio;\n      if (ratio !== threshold) {\n        if (!isFirstUpdate) {\n          return refresh();\n        }\n        if (!ratio) {\n          // If the reference is clipped, the ratio is 0. Throttle the refresh\n          // to prevent an infinite loop of updates.\n          timeoutId = setTimeout(() => {\n            refresh(false, 1e-7);\n          }, 1000);\n        } else {\n          refresh(false, ratio);\n        }\n      }\n      if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n        // It's possible that even though the ratio is reported as 1, the\n        // element is not actually fully within the IntersectionObserver's root\n        // area anymore. This can happen under performance constraints. This may\n        // be a bug in the browser's IntersectionObserver implementation. To\n        // work around this, we compare the element's bounding rect now with\n        // what it was at the time we created the IntersectionObserver. If they\n        // are not equal then the element moved, so we refresh.\n        refresh();\n      }\n      isFirstUpdate = false;\n    }\n\n    // Older browsers don't support a `document` as the root and will throw an\n    // error.\n    try {\n      io = new IntersectionObserver(handleObserve, {\n        ...options,\n        // Handle <iframe>s\n        root: root.ownerDocument\n      });\n    } catch (_e) {\n      io = new IntersectionObserver(handleObserve, options);\n    }\n    io.observe(element);\n  }\n  refresh(true);\n  return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  const {\n    ancestorScroll = true,\n    ancestorResize = true,\n    elementResize = typeof ResizeObserver === 'function',\n    layoutShift = typeof IntersectionObserver === 'function',\n    animationFrame = false\n  } = options;\n  const referenceEl = unwrapElement(reference);\n  const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];\n  ancestors.forEach(ancestor => {\n    ancestorScroll && ancestor.addEventListener('scroll', update, {\n      passive: true\n    });\n    ancestorResize && ancestor.addEventListener('resize', update);\n  });\n  const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n  let reobserveFrame = -1;\n  let resizeObserver = null;\n  if (elementResize) {\n    resizeObserver = new ResizeObserver(_ref => {\n      let [firstEntry] = _ref;\n      if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {\n        // Prevent update loops when using the `size` middleware.\n        // https://github.com/floating-ui/floating-ui/issues/1740\n        resizeObserver.unobserve(floating);\n        cancelAnimationFrame(reobserveFrame);\n        reobserveFrame = requestAnimationFrame(() => {\n          var _resizeObserver;\n          (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n        });\n      }\n      update();\n    });\n    if (referenceEl && !animationFrame) {\n      resizeObserver.observe(referenceEl);\n    }\n    if (floating) {\n      resizeObserver.observe(floating);\n    }\n  }\n  let frameId;\n  let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n  if (animationFrame) {\n    frameLoop();\n  }\n  function frameLoop() {\n    const nextRefRect = getBoundingClientRect(reference);\n    if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n      update();\n    }\n    prevRefRect = nextRefRect;\n    frameId = requestAnimationFrame(frameLoop);\n  }\n  update();\n  return () => {\n    var _resizeObserver2;\n    ancestors.forEach(ancestor => {\n      ancestorScroll && ancestor.removeEventListener('scroll', update);\n      ancestorResize && ancestor.removeEventListener('resize', update);\n    });\n    cleanupIo == null || cleanupIo();\n    (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n    resizeObserver = null;\n    if (animationFrame) {\n      cancelAnimationFrame(frameId);\n    }\n  };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n  // This caches the expensive `getClippingElementAncestors` function so that\n  // multiple lifecycle resets re-use the same result. It only lives for a\n  // single call. If other functions become expensive, we can add them as well.\n  const cache = new Map();\n  const mergedOptions = {\n    platform,\n    ...options\n  };\n  const platformWithCache = {\n    ...mergedOptions.platform,\n    _c: cache\n  };\n  return computePosition$1(reference, floating, {\n    ...mergedOptions,\n    platform: platformWithCache\n  });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","var Vue = require('vue')\n\nObject.keys(Vue).forEach(function(key) {\n  exports[key] = Vue[key]\n})\n\nexports.set = function(target, key, val) {\n  if (Array.isArray(target)) {\n    target.length = Math.max(target.length, key)\n    target.splice(key, 1, val)\n    return val\n  }\n  target[key] = val\n  return val\n}\n\nexports.del = function(target, key) {\n  if (Array.isArray(target)) {\n    target.splice(key, 1)\n    return\n  }\n  delete target[key]\n}\n\nexports.Vue = Vue\nexports.Vue2 = undefined\nexports.isVue2 = false\nexports.isVue3 = true\nexports.install = function(){}\n","import { arrow as arrow$1, computePosition } from '@floating-ui/dom';\nexport { autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size } from '@floating-ui/dom';\nimport { isNode, getNodeName } from '@floating-ui/utils/dom';\nimport { unref, computed, ref, shallowRef, watch, getCurrentScope, onScopeDispose, shallowReadonly } from 'vue-demi';\n\nfunction isComponentPublicInstance(target) {\n  return target != null && typeof target === 'object' && '$el' in target;\n}\nfunction unwrapElement(target) {\n  if (isComponentPublicInstance(target)) {\n    const element = target.$el;\n    return isNode(element) && getNodeName(element) === '#comment' ? null : element;\n  }\n  return target;\n}\n\nfunction toValue(source) {\n  return typeof source === 'function' ? source() : unref(source);\n}\n\n/**\n * Positions an inner element of the floating element such that it is centered to the reference element.\n * @param options The arrow options.\n * @see https://floating-ui.com/docs/arrow\n */\nfunction arrow(options) {\n  return {\n    name: 'arrow',\n    options,\n    fn(args) {\n      const element = unwrapElement(toValue(options.element));\n      if (element == null) {\n        return {};\n      }\n      return arrow$1({\n        element,\n        padding: options.padding\n      }).fn(args);\n    }\n  };\n}\n\nfunction getDPR(element) {\n  if (typeof window === 'undefined') {\n    return 1;\n  }\n  const win = element.ownerDocument.defaultView || window;\n  return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n  const dpr = getDPR(element);\n  return Math.round(value * dpr) / dpr;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element next to a reference element when it is given a certain CSS positioning strategy.\n * @param reference The reference template ref.\n * @param floating The floating template ref.\n * @param options The floating options.\n * @see https://floating-ui.com/docs/vue\n */\nfunction useFloating(reference, floating, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  const whileElementsMountedOption = options.whileElementsMounted;\n  const openOption = computed(() => {\n    var _toValue;\n    return (_toValue = toValue(options.open)) != null ? _toValue : true;\n  });\n  const middlewareOption = computed(() => toValue(options.middleware));\n  const placementOption = computed(() => {\n    var _toValue2;\n    return (_toValue2 = toValue(options.placement)) != null ? _toValue2 : 'bottom';\n  });\n  const strategyOption = computed(() => {\n    var _toValue3;\n    return (_toValue3 = toValue(options.strategy)) != null ? _toValue3 : 'absolute';\n  });\n  const transformOption = computed(() => {\n    var _toValue4;\n    return (_toValue4 = toValue(options.transform)) != null ? _toValue4 : true;\n  });\n  const referenceElement = computed(() => unwrapElement(reference.value));\n  const floatingElement = computed(() => unwrapElement(floating.value));\n  const x = ref(0);\n  const y = ref(0);\n  const strategy = ref(strategyOption.value);\n  const placement = ref(placementOption.value);\n  const middlewareData = shallowRef({});\n  const isPositioned = ref(false);\n  const floatingStyles = computed(() => {\n    const initialStyles = {\n      position: strategy.value,\n      left: '0',\n      top: '0'\n    };\n    if (!floatingElement.value) {\n      return initialStyles;\n    }\n    const xVal = roundByDPR(floatingElement.value, x.value);\n    const yVal = roundByDPR(floatingElement.value, y.value);\n    if (transformOption.value) {\n      return {\n        ...initialStyles,\n        transform: \"translate(\" + xVal + \"px, \" + yVal + \"px)\",\n        ...(getDPR(floatingElement.value) >= 1.5 && {\n          willChange: 'transform'\n        })\n      };\n    }\n    return {\n      position: strategy.value,\n      left: xVal + \"px\",\n      top: yVal + \"px\"\n    };\n  });\n  let whileElementsMountedCleanup;\n  function update() {\n    if (referenceElement.value == null || floatingElement.value == null) {\n      return;\n    }\n    const open = openOption.value;\n    computePosition(referenceElement.value, floatingElement.value, {\n      middleware: middlewareOption.value,\n      placement: placementOption.value,\n      strategy: strategyOption.value\n    }).then(position => {\n      x.value = position.x;\n      y.value = position.y;\n      strategy.value = position.strategy;\n      placement.value = position.placement;\n      middlewareData.value = position.middlewareData;\n      /**\n       * The floating element's position may be recomputed while it's closed\n       * but still mounted (such as when transitioning out). To ensure\n       * `isPositioned` will be `false` initially on the next open, avoid\n       * setting it to `true` when `open === false` (must be specified).\n       */\n      isPositioned.value = open !== false;\n    });\n  }\n  function cleanup() {\n    if (typeof whileElementsMountedCleanup === 'function') {\n      whileElementsMountedCleanup();\n      whileElementsMountedCleanup = undefined;\n    }\n  }\n  function attach() {\n    cleanup();\n    if (whileElementsMountedOption === undefined) {\n      update();\n      return;\n    }\n    if (referenceElement.value != null && floatingElement.value != null) {\n      whileElementsMountedCleanup = whileElementsMountedOption(referenceElement.value, floatingElement.value, update);\n      return;\n    }\n  }\n  function reset() {\n    if (!openOption.value) {\n      isPositioned.value = false;\n    }\n  }\n  watch([middlewareOption, placementOption, strategyOption, openOption], update, {\n    flush: 'sync'\n  });\n  watch([referenceElement, floatingElement], attach, {\n    flush: 'sync'\n  });\n  watch(openOption, reset, {\n    flush: 'sync'\n  });\n  if (getCurrentScope()) {\n    onScopeDispose(cleanup);\n  }\n  return {\n    x: shallowReadonly(x),\n    y: shallowReadonly(y),\n    strategy: shallowReadonly(strategy),\n    placement: shallowReadonly(placement),\n    middlewareData: shallowReadonly(middlewareData),\n    isPositioned: shallowReadonly(isPositioned),\n    floatingStyles,\n    update\n  };\n}\n\nexport { arrow, useFloating };\n","<script lang=\"ts\">\nimport type {\n  Middleware,\n  Placement,\n  ReferenceElement,\n} from '@floating-ui/vue'\nimport type { Ref } from 'vue'\nimport type {\n  Align,\n  Side,\n} from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useForwardExpose, useSize } from '@/shared'\n\nexport const PopperContentPropsDefaultValue = {\n  side: 'bottom' as Side,\n  sideOffset: 0,\n  sideFlip: true,\n  align: 'center' as Align,\n  alignOffset: 0,\n  alignFlip: true,\n  arrowPadding: 0,\n  hideShiftedArrow: true,\n  avoidCollisions: true,\n  collisionBoundary: () => [],\n  collisionPadding: 0,\n  sticky: 'partial' as 'partial' | 'always',\n  hideWhenDetached: false,\n  positionStrategy: 'fixed' as 'absolute' | 'fixed',\n  updatePositionStrategy: 'optimized' as 'optimized' | 'always',\n  prioritizePosition: false,\n}\n\nexport interface PopperContentProps extends PrimitiveProps {\n  /**\n   * The preferred side of the trigger to render against when open.\n   * Will be reversed when collisions occur and avoidCollisions\n   * is enabled.\n   *\n   * @defaultValue \"bottom\"\n   */\n  side?: Side\n\n  /**\n   * The distance in pixels from the trigger.\n   *\n   * @defaultValue 0\n   */\n  sideOffset?: number\n\n  /**\n   * Flip to the opposite side when colliding with boundary.\n   *\n   * @defaultValue true\n   */\n  sideFlip?: boolean\n\n  /**\n   * The preferred alignment against the trigger.\n   * May change when collisions occur.\n   *\n   * @defaultValue \"center\"\n   */\n  align?: Align\n\n  /**\n   * An offset in pixels from the `start` or `end` alignment options.\n   *\n   * @defaultValue 0\n   */\n  alignOffset?: number\n\n  /**\n   * Flip alignment when colliding with boundary.\n   * May only occur when `prioritizePosition` is true.\n   *\n   * @defaultValue true\n   */\n  alignFlip?: boolean\n\n  /**\n   * When `true`, overrides the side and align preferences\n   * to prevent collisions with boundary edges.\n   *\n   * @defaultValue true\n   */\n  avoidCollisions?: boolean\n\n  /**\n   * The element used as the collision boundary. By default\n   * this is the viewport, though you can provide additional\n   * element(s) to be included in this check.\n   *\n   * @defaultValue []\n   */\n  collisionBoundary?: Element | null | Array<Element | null>\n\n  /**\n   * The distance in pixels from the boundary edges where collision\n   * detection should occur. Accepts a number (same for all sides),\n   * or a partial padding object, for example: { top: 20, left: 20 }.\n   *\n   * @defaultValue 0\n   */\n  collisionPadding?: number | Partial<Record<Side, number>>\n\n  /**\n   * The padding between the arrow and the edges of the content.\n   * If your content has border-radius, this will prevent it from\n   * overflowing the corners.\n   *\n   * @defaultValue 0\n   */\n  arrowPadding?: number\n\n  /**\n   * When `true`, hides the arrow when it cannot be centered\n   * to the reference element.\n   *\n   * @defaultValue true\n   */\n  hideShiftedArrow?: boolean\n\n  /**\n   * The sticky behavior on the align axis. `partial` will keep the\n   * content in the boundary as long as the trigger is at least partially\n   * in the boundary whilst \"always\" will keep the content in the boundary\n   * regardless.\n   *\n   * @defaultValue \"partial\"\n   */\n  sticky?: 'partial' | 'always'\n\n  /**\n   * Whether to hide the content when the trigger becomes fully occluded.\n   *\n   * @defaultValue false\n   */\n  hideWhenDetached?: boolean\n\n  /**\n   *  The type of CSS position property to use.\n   */\n  positionStrategy?: 'absolute' | 'fixed'\n\n  /**\n   * Strategy to update the position of the floating element on every animation frame.\n   *\n   * @defaultValue 'optimized'\n   */\n  updatePositionStrategy?: 'optimized' | 'always'\n\n  /**\n   * Whether to disable the update position for the content when the layout shifted.\n   *\n   * @defaultValue false\n   */\n  disableUpdateOnLayoutShift?: boolean\n\n  /**\n   * Force content to be position within the viewport.\n   *\n   * Might overlap the reference element, which may not be desired.\n   *\n   * @defaultValue false\n   */\n  prioritizePosition?: boolean\n\n  /**\n   *  The custom element or virtual element that will be set as the reference\n   *  to position the floating element.\n   *\n   *  If provided, it will replace the default anchor element.\n   */\n  reference?: ReferenceElement\n}\n\nexport interface PopperContentContext {\n  placedSide: Ref<Side>\n  onArrowChange: (arrow: HTMLElement | undefined) => void\n  arrowX?: Ref<number>\n  arrowY?: Ref<number>\n  shouldHideArrow: Ref<boolean>\n}\n\nexport const [injectPopperContentContext, providePopperContentContext]\n  = createContext<PopperContentContext>('PopperContent')\n</script>\n\n<script setup lang=\"ts\">\nimport {\n  autoUpdate,\n  flip,\n  arrow as floatingUIarrow,\n  hide,\n  limitShift,\n  offset,\n  shift,\n  size,\n  useFloating,\n} from '@floating-ui/vue'\nimport { computedEager } from '@vueuse/core'\nimport { computed, ref, watchEffect, watchPostEffect } from 'vue'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { injectPopperRootContext } from './PopperRoot.vue'\nimport {\n  getSideAndAlignFromPlacement,\n  isNotNull,\n  transformOrigin,\n} from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<PopperContentProps>(), {\n  ...PopperContentPropsDefaultValue,\n})\nconst emits = defineEmits<{\n  placed: [void]\n}>()\n\nconst rootContext = injectPopperRootContext()\nconst { forwardRef, currentElement: contentElement } = useForwardExpose()\n\nconst floatingRef = ref<HTMLElement>()\n\nconst arrow = ref<HTMLElement>()\nconst { width: arrowWidth, height: arrowHeight } = useSize(arrow)\n\nconst desiredPlacement = computed(\n  () =>\n    (props.side\n      + (props.align !== 'center' ? `-${props.align}` : '')) as Placement,\n)\n\nconst collisionPadding = computed(() => {\n  return typeof props.collisionPadding === 'number'\n    ? props.collisionPadding\n    : { top: 0, right: 0, bottom: 0, left: 0, ...props.collisionPadding }\n})\n\nconst boundary = computed(() => {\n  return Array.isArray(props.collisionBoundary)\n    ? props.collisionBoundary\n    : [props.collisionBoundary]\n})\n\nconst detectOverflowOptions = computed(() => {\n  return {\n    padding: collisionPadding.value,\n    boundary: boundary.value.filter(isNotNull),\n    // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n    altBoundary: boundary.value.length > 0,\n  }\n})\n\nconst flipOptions = computed(() => {\n  return {\n    mainAxis: props.sideFlip,\n    crossAxis: props.alignFlip,\n  }\n})\n\nconst computedMiddleware = computedEager(() => {\n  return [\n    offset({\n      mainAxis: props.sideOffset + arrowHeight.value,\n      alignmentAxis: props.alignOffset,\n    }),\n    props.prioritizePosition\n    && props.avoidCollisions\n    && flip({\n      ...detectOverflowOptions.value,\n      ...flipOptions.value,\n    }),\n    props.avoidCollisions\n    && shift({\n      mainAxis: true,\n      crossAxis: !!props.prioritizePosition,\n      limiter: props.sticky === 'partial' ? limitShift() : undefined,\n      ...detectOverflowOptions.value,\n    }),\n    !props.prioritizePosition\n    && props.avoidCollisions\n    && flip({\n      ...detectOverflowOptions.value,\n      ...flipOptions.value,\n    }),\n    size({\n      ...detectOverflowOptions.value,\n      apply: ({ elements, rects, availableWidth, availableHeight }) => {\n        const { width: anchorWidth, height: anchorHeight } = rects.reference\n        const contentStyle = elements.floating.style\n        contentStyle.setProperty(\n          '--reka-popper-available-width',\n          `${availableWidth}px`,\n        )\n        contentStyle.setProperty(\n          '--reka-popper-available-height',\n          `${availableHeight}px`,\n        )\n        contentStyle.setProperty(\n          '--reka-popper-anchor-width',\n          `${anchorWidth}px`,\n        )\n        contentStyle.setProperty(\n          '--reka-popper-anchor-height',\n          `${anchorHeight}px`,\n        )\n      },\n    }),\n    arrow.value\n    && floatingUIarrow({ element: arrow.value, padding: props.arrowPadding }),\n    transformOrigin({\n      arrowWidth: arrowWidth.value,\n      arrowHeight: arrowHeight.value,\n    }),\n    props.hideWhenDetached\n    && hide({ strategy: 'referenceHidden', ...detectOverflowOptions.value }),\n  ] as Middleware[]\n})\n\n// If provided custom reference, it will overwrite the default anchor element\nconst reference = computed(() => props.reference ?? rootContext.anchor.value)\n\nconst { floatingStyles, placement, isPositioned, middlewareData, update } = useFloating(\n  reference,\n  floatingRef,\n  {\n    strategy: props.positionStrategy,\n    placement: desiredPlacement,\n    whileElementsMounted: (...args) => {\n      const cleanup = autoUpdate(...args, {\n        layoutShift: !props.disableUpdateOnLayoutShift,\n        animationFrame: props.updatePositionStrategy === 'always',\n      })\n      return cleanup\n    },\n    middleware: computedMiddleware,\n  },\n)\n\nconst placedSide = computed(\n  () => getSideAndAlignFromPlacement(placement.value)[0],\n)\nconst placedAlign = computed(\n  () => getSideAndAlignFromPlacement(placement.value)[1],\n)\n\nwatchPostEffect(() => {\n  if (isPositioned.value)\n    emits('placed')\n})\n\nconst shouldHideArrow = computed(() => {\n  const cannotCenterArrow = middlewareData.value.arrow?.centerOffset !== 0\n  return props.hideShiftedArrow && cannotCenterArrow\n})\n\nconst contentZIndex = ref('')\nwatchEffect(() => {\n  if (contentElement.value)\n    contentZIndex.value = window.getComputedStyle(contentElement.value).zIndex\n})\n\nconst arrowX = computed(() => middlewareData.value.arrow?.x ?? 0)\nconst arrowY = computed(() => middlewareData.value.arrow?.y ?? 0)\n\nprovidePopperContentContext({\n  placedSide,\n  onArrowChange: element => arrow.value = element,\n  arrowX,\n  arrowY,\n  shouldHideArrow,\n})\n</script>\n\n<template>\n  <div\n    ref=\"floatingRef\"\n    data-reka-popper-content-wrapper=\"\"\n    :style=\"{\n      ...floatingStyles,\n      transform: isPositioned ? floatingStyles.transform : 'translate(0, -200%)', // keep off the page when measuring\n      minWidth: 'max-content',\n      zIndex: contentZIndex,\n      ['--reka-popper-transform-origin' as any]: [\n        middlewareData.transformOrigin?.x,\n        middlewareData.transformOrigin?.y,\n      ].join(' '),\n\n      // hide the content if using the hide middleware and should be hidden\n      // set visibility to hidden and disable pointer events so the UI behaves\n      // as if the PopperContent isn't there at all\n      ...(middlewareData.hide?.referenceHidden && {\n        visibility: 'hidden',\n        pointerEvents: 'none',\n      }),\n    }\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      v-bind=\"$attrs\"\n      :as-child=\"props.asChild\"\n      :as=\"as\"\n      :data-side=\"placedSide\"\n      :data-align=\"placedAlign\"\n      :style=\"{\n        // if the PopperContent hasn't been placed yet (not all measurements done)\n        // we prevent animations so that users's animation don't kick in too early referring wrong sides\n        animation: !isPositioned ? 'none' : undefined,\n      }\"\n    >\n      <slot />\n    </Primitive>\n  </div>\n</template>\n","<script lang=\"ts\">\nimport type {\n  Middleware,\n  Placement,\n  ReferenceElement,\n} from '@floating-ui/vue'\nimport type { Ref } from 'vue'\nimport type {\n  Align,\n  Side,\n} from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useForwardExpose, useSize } from '@/shared'\n\nexport const PopperContentPropsDefaultValue = {\n  side: 'bottom' as Side,\n  sideOffset: 0,\n  sideFlip: true,\n  align: 'center' as Align,\n  alignOffset: 0,\n  alignFlip: true,\n  arrowPadding: 0,\n  hideShiftedArrow: true,\n  avoidCollisions: true,\n  collisionBoundary: () => [],\n  collisionPadding: 0,\n  sticky: 'partial' as 'partial' | 'always',\n  hideWhenDetached: false,\n  positionStrategy: 'fixed' as 'absolute' | 'fixed',\n  updatePositionStrategy: 'optimized' as 'optimized' | 'always',\n  prioritizePosition: false,\n}\n\nexport interface PopperContentProps extends PrimitiveProps {\n  /**\n   * The preferred side of the trigger to render against when open.\n   * Will be reversed when collisions occur and avoidCollisions\n   * is enabled.\n   *\n   * @defaultValue \"bottom\"\n   */\n  side?: Side\n\n  /**\n   * The distance in pixels from the trigger.\n   *\n   * @defaultValue 0\n   */\n  sideOffset?: number\n\n  /**\n   * Flip to the opposite side when colliding with boundary.\n   *\n   * @defaultValue true\n   */\n  sideFlip?: boolean\n\n  /**\n   * The preferred alignment against the trigger.\n   * May change when collisions occur.\n   *\n   * @defaultValue \"center\"\n   */\n  align?: Align\n\n  /**\n   * An offset in pixels from the `start` or `end` alignment options.\n   *\n   * @defaultValue 0\n   */\n  alignOffset?: number\n\n  /**\n   * Flip alignment when colliding with boundary.\n   * May only occur when `prioritizePosition` is true.\n   *\n   * @defaultValue true\n   */\n  alignFlip?: boolean\n\n  /**\n   * When `true`, overrides the side and align preferences\n   * to prevent collisions with boundary edges.\n   *\n   * @defaultValue true\n   */\n  avoidCollisions?: boolean\n\n  /**\n   * The element used as the collision boundary. By default\n   * this is the viewport, though you can provide additional\n   * element(s) to be included in this check.\n   *\n   * @defaultValue []\n   */\n  collisionBoundary?: Element | null | Array<Element | null>\n\n  /**\n   * The distance in pixels from the boundary edges where collision\n   * detection should occur. Accepts a number (same for all sides),\n   * or a partial padding object, for example: { top: 20, left: 20 }.\n   *\n   * @defaultValue 0\n   */\n  collisionPadding?: number | Partial<Record<Side, number>>\n\n  /**\n   * The padding between the arrow and the edges of the content.\n   * If your content has border-radius, this will prevent it from\n   * overflowing the corners.\n   *\n   * @defaultValue 0\n   */\n  arrowPadding?: number\n\n  /**\n   * When `true`, hides the arrow when it cannot be centered\n   * to the reference element.\n   *\n   * @defaultValue true\n   */\n  hideShiftedArrow?: boolean\n\n  /**\n   * The sticky behavior on the align axis. `partial` will keep the\n   * content in the boundary as long as the trigger is at least partially\n   * in the boundary whilst \"always\" will keep the content in the boundary\n   * regardless.\n   *\n   * @defaultValue \"partial\"\n   */\n  sticky?: 'partial' | 'always'\n\n  /**\n   * Whether to hide the content when the trigger becomes fully occluded.\n   *\n   * @defaultValue false\n   */\n  hideWhenDetached?: boolean\n\n  /**\n   *  The type of CSS position property to use.\n   */\n  positionStrategy?: 'absolute' | 'fixed'\n\n  /**\n   * Strategy to update the position of the floating element on every animation frame.\n   *\n   * @defaultValue 'optimized'\n   */\n  updatePositionStrategy?: 'optimized' | 'always'\n\n  /**\n   * Whether to disable the update position for the content when the layout shifted.\n   *\n   * @defaultValue false\n   */\n  disableUpdateOnLayoutShift?: boolean\n\n  /**\n   * Force content to be position within the viewport.\n   *\n   * Might overlap the reference element, which may not be desired.\n   *\n   * @defaultValue false\n   */\n  prioritizePosition?: boolean\n\n  /**\n   *  The custom element or virtual element that will be set as the reference\n   *  to position the floating element.\n   *\n   *  If provided, it will replace the default anchor element.\n   */\n  reference?: ReferenceElement\n}\n\nexport interface PopperContentContext {\n  placedSide: Ref<Side>\n  onArrowChange: (arrow: HTMLElement | undefined) => void\n  arrowX?: Ref<number>\n  arrowY?: Ref<number>\n  shouldHideArrow: Ref<boolean>\n}\n\nexport const [injectPopperContentContext, providePopperContentContext]\n  = createContext<PopperContentContext>('PopperContent')\n</script>\n\n<script setup lang=\"ts\">\nimport {\n  autoUpdate,\n  flip,\n  arrow as floatingUIarrow,\n  hide,\n  limitShift,\n  offset,\n  shift,\n  size,\n  useFloating,\n} from '@floating-ui/vue'\nimport { computedEager } from '@vueuse/core'\nimport { computed, ref, watchEffect, watchPostEffect } from 'vue'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { injectPopperRootContext } from './PopperRoot.vue'\nimport {\n  getSideAndAlignFromPlacement,\n  isNotNull,\n  transformOrigin,\n} from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<PopperContentProps>(), {\n  ...PopperContentPropsDefaultValue,\n})\nconst emits = defineEmits<{\n  placed: [void]\n}>()\n\nconst rootContext = injectPopperRootContext()\nconst { forwardRef, currentElement: contentElement } = useForwardExpose()\n\nconst floatingRef = ref<HTMLElement>()\n\nconst arrow = ref<HTMLElement>()\nconst { width: arrowWidth, height: arrowHeight } = useSize(arrow)\n\nconst desiredPlacement = computed(\n  () =>\n    (props.side\n      + (props.align !== 'center' ? `-${props.align}` : '')) as Placement,\n)\n\nconst collisionPadding = computed(() => {\n  return typeof props.collisionPadding === 'number'\n    ? props.collisionPadding\n    : { top: 0, right: 0, bottom: 0, left: 0, ...props.collisionPadding }\n})\n\nconst boundary = computed(() => {\n  return Array.isArray(props.collisionBoundary)\n    ? props.collisionBoundary\n    : [props.collisionBoundary]\n})\n\nconst detectOverflowOptions = computed(() => {\n  return {\n    padding: collisionPadding.value,\n    boundary: boundary.value.filter(isNotNull),\n    // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n    altBoundary: boundary.value.length > 0,\n  }\n})\n\nconst flipOptions = computed(() => {\n  return {\n    mainAxis: props.sideFlip,\n    crossAxis: props.alignFlip,\n  }\n})\n\nconst computedMiddleware = computedEager(() => {\n  return [\n    offset({\n      mainAxis: props.sideOffset + arrowHeight.value,\n      alignmentAxis: props.alignOffset,\n    }),\n    props.prioritizePosition\n    && props.avoidCollisions\n    && flip({\n      ...detectOverflowOptions.value,\n      ...flipOptions.value,\n    }),\n    props.avoidCollisions\n    && shift({\n      mainAxis: true,\n      crossAxis: !!props.prioritizePosition,\n      limiter: props.sticky === 'partial' ? limitShift() : undefined,\n      ...detectOverflowOptions.value,\n    }),\n    !props.prioritizePosition\n    && props.avoidCollisions\n    && flip({\n      ...detectOverflowOptions.value,\n      ...flipOptions.value,\n    }),\n    size({\n      ...detectOverflowOptions.value,\n      apply: ({ elements, rects, availableWidth, availableHeight }) => {\n        const { width: anchorWidth, height: anchorHeight } = rects.reference\n        const contentStyle = elements.floating.style\n        contentStyle.setProperty(\n          '--reka-popper-available-width',\n          `${availableWidth}px`,\n        )\n        contentStyle.setProperty(\n          '--reka-popper-available-height',\n          `${availableHeight}px`,\n        )\n        contentStyle.setProperty(\n          '--reka-popper-anchor-width',\n          `${anchorWidth}px`,\n        )\n        contentStyle.setProperty(\n          '--reka-popper-anchor-height',\n          `${anchorHeight}px`,\n        )\n      },\n    }),\n    arrow.value\n    && floatingUIarrow({ element: arrow.value, padding: props.arrowPadding }),\n    transformOrigin({\n      arrowWidth: arrowWidth.value,\n      arrowHeight: arrowHeight.value,\n    }),\n    props.hideWhenDetached\n    && hide({ strategy: 'referenceHidden', ...detectOverflowOptions.value }),\n  ] as Middleware[]\n})\n\n// If provided custom reference, it will overwrite the default anchor element\nconst reference = computed(() => props.reference ?? rootContext.anchor.value)\n\nconst { floatingStyles, placement, isPositioned, middlewareData, update } = useFloating(\n  reference,\n  floatingRef,\n  {\n    strategy: props.positionStrategy,\n    placement: desiredPlacement,\n    whileElementsMounted: (...args) => {\n      const cleanup = autoUpdate(...args, {\n        layoutShift: !props.disableUpdateOnLayoutShift,\n        animationFrame: props.updatePositionStrategy === 'always',\n      })\n      return cleanup\n    },\n    middleware: computedMiddleware,\n  },\n)\n\nconst placedSide = computed(\n  () => getSideAndAlignFromPlacement(placement.value)[0],\n)\nconst placedAlign = computed(\n  () => getSideAndAlignFromPlacement(placement.value)[1],\n)\n\nwatchPostEffect(() => {\n  if (isPositioned.value)\n    emits('placed')\n})\n\nconst shouldHideArrow = computed(() => {\n  const cannotCenterArrow = middlewareData.value.arrow?.centerOffset !== 0\n  return props.hideShiftedArrow && cannotCenterArrow\n})\n\nconst contentZIndex = ref('')\nwatchEffect(() => {\n  if (contentElement.value)\n    contentZIndex.value = window.getComputedStyle(contentElement.value).zIndex\n})\n\nconst arrowX = computed(() => middlewareData.value.arrow?.x ?? 0)\nconst arrowY = computed(() => middlewareData.value.arrow?.y ?? 0)\n\nprovidePopperContentContext({\n  placedSide,\n  onArrowChange: element => arrow.value = element,\n  arrowX,\n  arrowY,\n  shouldHideArrow,\n})\n</script>\n\n<template>\n  <div\n    ref=\"floatingRef\"\n    data-reka-popper-content-wrapper=\"\"\n    :style=\"{\n      ...floatingStyles,\n      transform: isPositioned ? floatingStyles.transform : 'translate(0, -200%)', // keep off the page when measuring\n      minWidth: 'max-content',\n      zIndex: contentZIndex,\n      ['--reka-popper-transform-origin' as any]: [\n        middlewareData.transformOrigin?.x,\n        middlewareData.transformOrigin?.y,\n      ].join(' '),\n\n      // hide the content if using the hide middleware and should be hidden\n      // set visibility to hidden and disable pointer events so the UI behaves\n      // as if the PopperContent isn't there at all\n      ...(middlewareData.hide?.referenceHidden && {\n        visibility: 'hidden',\n        pointerEvents: 'none',\n      }),\n    }\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      v-bind=\"$attrs\"\n      :as-child=\"props.asChild\"\n      :as=\"as\"\n      :data-side=\"placedSide\"\n      :data-align=\"placedAlign\"\n      :style=\"{\n        // if the PopperContent hasn't been placed yet (not all measurements done)\n        // we prevent animations so that users's animation don't kick in too early referring wrong sides\n        animation: !isPositioned ? 'none' : undefined,\n      }\"\n    >\n      <slot />\n    </Primitive>\n  </div>\n</template>\n","<script lang=\"ts\">\nimport type { Side } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { ArrowProps } from '@/shared/component/Arrow.vue'\n\nconst OPPOSITE_SIDE: Record<Side, Side> = {\n  top: 'bottom',\n  right: 'left',\n  bottom: 'top',\n  left: 'right',\n}\n\nexport interface PopperArrowProps extends ArrowProps, PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ComponentPublicInstance } from 'vue'\nimport { computed } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport Arrow from '@/shared/component/Arrow.vue'\nimport { injectPopperContentContext } from './PopperContent.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nwithDefaults(\n  defineProps<PopperArrowProps>(),\n  { as: 'svg' },\n)\n\nconst { forwardRef } = useForwardExpose()\nconst contentContext = injectPopperContentContext()\n\nconst baseSide = computed(() => OPPOSITE_SIDE[contentContext.placedSide.value])\n</script>\n\n<template>\n  <span\n    :ref=\"(el: Element | ComponentPublicInstance | null) => {\n      contentContext.onArrowChange((el as HTMLElement) ?? undefined)\n      return undefined\n    }\"\n    :style=\"{\n      position: 'absolute',\n      left: contentContext.arrowX?.value ? `${contentContext.arrowX?.value}px` : undefined,\n      top: contentContext.arrowY?.value ? `${contentContext.arrowY?.value}px` : undefined,\n      [baseSide]: 0,\n      transformOrigin: {\n        top: '',\n        right: '0 0',\n        bottom: 'center 0',\n        left: '100% 0',\n      }[contentContext.placedSide.value],\n      transform: {\n        top: 'translateY(100%)',\n        right: 'translateY(50%) rotate(90deg) translateX(-50%)',\n        bottom: `rotate(180deg)`,\n        left: 'translateY(50%) rotate(-90deg) translateX(50%)',\n      }[contentContext.placedSide.value],\n      visibility: contentContext.shouldHideArrow.value ? 'hidden' : undefined,\n    }\"\n  >\n    <Arrow\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      :style=\"{\n        display: 'block',\n      }\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :rounded=\"rounded\"\n      :width=\"width\"\n      :height=\"height\"\n    >\n      <slot />\n    </Arrow>\n  </span>\n</template>\n","<script lang=\"ts\">\nimport type { Side } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { ArrowProps } from '@/shared/component/Arrow.vue'\n\nconst OPPOSITE_SIDE: Record<Side, Side> = {\n  top: 'bottom',\n  right: 'left',\n  bottom: 'top',\n  left: 'right',\n}\n\nexport interface PopperArrowProps extends ArrowProps, PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ComponentPublicInstance } from 'vue'\nimport { computed } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport Arrow from '@/shared/component/Arrow.vue'\nimport { injectPopperContentContext } from './PopperContent.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nwithDefaults(\n  defineProps<PopperArrowProps>(),\n  { as: 'svg' },\n)\n\nconst { forwardRef } = useForwardExpose()\nconst contentContext = injectPopperContentContext()\n\nconst baseSide = computed(() => OPPOSITE_SIDE[contentContext.placedSide.value])\n</script>\n\n<template>\n  <span\n    :ref=\"(el: Element | ComponentPublicInstance | null) => {\n      contentContext.onArrowChange((el as HTMLElement) ?? undefined)\n      return undefined\n    }\"\n    :style=\"{\n      position: 'absolute',\n      left: contentContext.arrowX?.value ? `${contentContext.arrowX?.value}px` : undefined,\n      top: contentContext.arrowY?.value ? `${contentContext.arrowY?.value}px` : undefined,\n      [baseSide]: 0,\n      transformOrigin: {\n        top: '',\n        right: '0 0',\n        bottom: 'center 0',\n        left: '100% 0',\n      }[contentContext.placedSide.value],\n      transform: {\n        top: 'translateY(100%)',\n        right: 'translateY(50%) rotate(90deg) translateX(-50%)',\n        bottom: `rotate(180deg)`,\n        left: 'translateY(50%) rotate(-90deg) translateX(50%)',\n      }[contentContext.placedSide.value],\n      visibility: contentContext.shouldHideArrow.value ? 'hidden' : undefined,\n    }\"\n  >\n    <Arrow\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      :style=\"{\n        display: 'block',\n      }\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :rounded=\"rounded\"\n      :width=\"width\"\n      :height=\"height\"\n    >\n      <slot />\n    </Arrow>\n  </span>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { ListboxRootProps } from '@/Listbox'\nimport type { AcceptableValue, GenericComponentInstance } from '@/shared/types'\nimport { usePrimitiveElement } from '@/Primitive'\nimport { createContext, useDirection, useFilter } from '@/shared'\n\ntype ComboboxRootContext<T> = {\n  modelValue: Ref<T | Array<T>>\n  multiple: Ref<boolean>\n  disabled: Ref<boolean>\n  open: Ref<boolean>\n  onOpenChange: (value: boolean) => void\n  isUserInputted: Ref<boolean>\n  isVirtual: Ref<boolean>\n  contentId: string\n  inputElement: Ref<HTMLInputElement | undefined>\n  onInputElementChange: (el: HTMLInputElement) => void\n  triggerElement: Ref<HTMLElement | undefined>\n  onTriggerElementChange: (el: HTMLElement) => void\n  highlightedElement: Ref<HTMLElement | undefined>\n  parentElement: Ref<HTMLElement | undefined>\n  resetSearchTermOnSelect: Ref<boolean>\n  onResetSearchTerm: EventHookOn\n  allItems: Ref<Map<string, string>>\n  allGroups: Ref<Map<string, Set<string>>>\n  filterSearch: Ref<string>\n  filterState: ComputedRef<{ count: number, items: Map<string, number>, groups: Set<string> }>\n  ignoreFilter: Ref<boolean>\n  openOnFocus: Ref<boolean>\n  openOnClick: Ref<boolean>\n  resetModelValueOnClear: Ref<boolean>\n}\n\nexport const [injectComboboxRootContext, provideComboboxRootContext]\n  = createContext<ComboboxRootContext<AcceptableValue>>('ComboboxRoot')\n\nexport type ComboboxRootEmits<T = AcceptableValue> = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [value: T]\n  /** Event handler when highlighted element changes. */\n  'highlight': [payload: { ref: HTMLElement, value: T } | undefined]\n  /** Event handler called when the open state of the combobox changes. */\n  'update:open': [value: boolean]\n}\n\nexport interface ComboboxRootProps<T = AcceptableValue> extends Omit<ListboxRootProps<T>, 'orientation' | 'selectionBehavior'> {\n  /** The controlled open state of the Combobox. Can be binded with `v-model:open`. */\n  open?: boolean\n  /** The open state of the combobox when it is initially rendered. <br> Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n  /**\n   * Whether to reset the searchTerm when the Combobox input blurred\n   * @defaultValue `true`\n   */\n  resetSearchTermOnBlur?: boolean\n  /**\n   * Whether to reset the searchTerm when the Combobox value is selected\n   * @defaultValue `true`\n   */\n  resetSearchTermOnSelect?: boolean\n  /**\n   * Whether to open the combobox when the input is focused\n   * @defaultValue `false`\n   */\n  openOnFocus?: boolean\n  /**\n   * Whether to open the combobox when the input is clicked\n   * @defaultValue `false`\n   */\n  openOnClick?: boolean\n  /**\n   * When `true`, disable the default filters\n   */\n  ignoreFilter?: boolean\n  /**\n   * When `true` the `modelValue` will be reset to `null` (or `[]` if `multiple`)\n   */\n  resetModelValueOnClear?: boolean\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableValue = AcceptableValue\">\nimport type { EventHookOn } from '@vueuse/core'\nimport { createEventHook, useVModel } from '@vueuse/core'\nimport { computed, getCurrentInstance, nextTick, onMounted, ref, toRefs } from 'vue'\nimport { ListboxRoot } from '@/Listbox'\nimport { PopperRoot } from '@/Popper'\n\nconst props = withDefaults(defineProps<ComboboxRootProps<T>>(), {\n  open: undefined,\n  resetSearchTermOnBlur: true,\n  resetSearchTermOnSelect: true,\n  openOnFocus: false,\n  openOnClick: false,\n  resetModelValueOnClear: false,\n  highlightOnHover: true,\n})\nconst emits = defineEmits<ComboboxRootEmits<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n    /** Current active value */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { primitiveElement, currentElement: parentElement } = usePrimitiveElement<GenericComponentInstance<typeof ListboxRoot>>()\nconst { multiple, disabled, ignoreFilter, resetSearchTermOnSelect, openOnFocus, openOnClick, dir: propDir, resetModelValueOnClear, highlightOnHover } = toRefs(props)\n\nconst dir = useDirection(propDir)\n\nconst modelValue = useVModel(props as ComboboxRootProps<T>, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? (multiple.value ? [] : undefined),\n  passive: (props.modelValue === undefined) as false,\n  deep: true,\n}) as Ref<T | T[]>\n\nconst open = useVModel(props, 'open', emits, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nasync function onOpenChange(val: boolean) {\n  open.value = val\n  filterSearch.value = ''\n\n  if (val) {\n    // make sure dom is ready then only highlight the selected\n    await nextTick()\n    primitiveElement.value?.highlightSelected()\n    isUserInputted.value = true\n    inputElement.value?.focus()\n  }\n  else {\n    isUserInputted.value = false\n    setTimeout(() => {\n      if (!val && props.resetSearchTermOnBlur)\n        resetSearchTerm.trigger()\n    }, 1)\n  }\n}\n\nconst resetSearchTerm = createEventHook()\nconst isUserInputted = ref(false)\nconst isVirtual = ref(false)\nconst inputElement = ref<HTMLInputElement>()\nconst triggerElement = ref<HTMLElement>()\n\nconst highlightedElement = computed(() => primitiveElement.value?.highlightedElement ?? undefined)\n\nconst allItems = ref<Map<string, string>>(new Map())\nconst allGroups = ref<Map<string, Set<string>>>(new Map())\n\nconst { contains } = useFilter({ sensitivity: 'base' })\n\nconst filterSearch = ref('')\n\nconst filterState = computed<{\n  count: number\n  items: Map<string, number>\n  groups: Set<string>\n}>((oldValue) => {\n  if (!filterSearch.value || props.ignoreFilter || isVirtual.value) {\n    // Do nothing, each item will know to show itself because search is empty\n    return {\n      count: allItems.value.size,\n      items: oldValue?.items ?? new Map(),\n      groups: oldValue?.groups ?? new Set(allGroups.value.keys()),\n    }\n  }\n\n  let itemCount = 0\n  const filteredItems = new Map<string, number>()\n  const filteredGroups = new Set<string>()\n\n  // Check which items should be included\n  for (const [id, value] of allItems.value) {\n    const score = contains(value, filterSearch.value)\n    filteredItems.set(id, score ? 1 : 0)\n    if (score)\n      itemCount++\n  }\n\n  // Check which groups have at least 1 item shown\n  for (const [groupId, group] of allGroups.value) {\n    for (const itemId of group) {\n      if (filteredItems.get(itemId)! > 0) {\n        filteredGroups.add(groupId)\n        break\n      }\n    }\n  }\n\n  return {\n    count: itemCount,\n    items: filteredItems,\n    groups: filteredGroups,\n  }\n})\n\nconst inst = getCurrentInstance()\nonMounted(() => {\n  if (inst?.exposed) {\n    inst.exposed.highlightItem = primitiveElement.value?.highlightItem\n    inst.exposed.highlightFirstItem = primitiveElement.value?.highlightFirstItem\n    inst.exposed.highlightSelected = primitiveElement.value?.highlightSelected\n  }\n})\n\ndefineExpose({\n  filtered: filterState,\n  highlightedElement,\n  highlightItem: primitiveElement.value?.highlightItem,\n  highlightFirstItem: primitiveElement.value?.highlightFirstItem,\n  highlightSelected: primitiveElement.value?.highlightSelected,\n})\n\nprovideComboboxRootContext({\n  modelValue,\n  multiple,\n  disabled,\n  open,\n  onOpenChange,\n  contentId: '',\n  isUserInputted,\n  isVirtual,\n  inputElement,\n  highlightedElement,\n  onInputElementChange: val => inputElement.value = val,\n  triggerElement,\n  onTriggerElementChange: val => triggerElement.value = val,\n  parentElement,\n  resetSearchTermOnSelect,\n  onResetSearchTerm: resetSearchTerm.on,\n  allItems,\n  allGroups,\n  filterSearch,\n  filterState,\n  ignoreFilter,\n  openOnFocus,\n  openOnClick,\n  resetModelValueOnClear,\n})\n</script>\n\n<template>\n  <PopperRoot>\n    <ListboxRoot\n      ref=\"primitiveElement\"\n      v-bind=\"$attrs\"\n      v-model=\"modelValue\"\n      :style=\"{\n        pointerEvents: open ? 'auto' : undefined,\n      }\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :dir=\"dir\"\n      :multiple=\"multiple\"\n      :name=\"name\"\n      :required=\"required\"\n      :disabled=\"disabled\"\n      :highlight-on-hover=\"highlightOnHover\"\n      :by=\"props.by as any\"\n      @highlight=\"emits('highlight', $event as any)\"\n    >\n      <slot\n        :open=\"open\"\n        :model-value=\"modelValue\"\n      />\n    </ListboxRoot>\n  </PopperRoot>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { ListboxRootProps } from '@/Listbox'\nimport type { AcceptableValue, GenericComponentInstance } from '@/shared/types'\nimport { usePrimitiveElement } from '@/Primitive'\nimport { createContext, useDirection, useFilter } from '@/shared'\n\ntype ComboboxRootContext<T> = {\n  modelValue: Ref<T | Array<T>>\n  multiple: Ref<boolean>\n  disabled: Ref<boolean>\n  open: Ref<boolean>\n  onOpenChange: (value: boolean) => void\n  isUserInputted: Ref<boolean>\n  isVirtual: Ref<boolean>\n  contentId: string\n  inputElement: Ref<HTMLInputElement | undefined>\n  onInputElementChange: (el: HTMLInputElement) => void\n  triggerElement: Ref<HTMLElement | undefined>\n  onTriggerElementChange: (el: HTMLElement) => void\n  highlightedElement: Ref<HTMLElement | undefined>\n  parentElement: Ref<HTMLElement | undefined>\n  resetSearchTermOnSelect: Ref<boolean>\n  onResetSearchTerm: EventHookOn\n  allItems: Ref<Map<string, string>>\n  allGroups: Ref<Map<string, Set<string>>>\n  filterSearch: Ref<string>\n  filterState: ComputedRef<{ count: number, items: Map<string, number>, groups: Set<string> }>\n  ignoreFilter: Ref<boolean>\n  openOnFocus: Ref<boolean>\n  openOnClick: Ref<boolean>\n  resetModelValueOnClear: Ref<boolean>\n}\n\nexport const [injectComboboxRootContext, provideComboboxRootContext]\n  = createContext<ComboboxRootContext<AcceptableValue>>('ComboboxRoot')\n\nexport type ComboboxRootEmits<T = AcceptableValue> = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [value: T]\n  /** Event handler when highlighted element changes. */\n  'highlight': [payload: { ref: HTMLElement, value: T } | undefined]\n  /** Event handler called when the open state of the combobox changes. */\n  'update:open': [value: boolean]\n}\n\nexport interface ComboboxRootProps<T = AcceptableValue> extends Omit<ListboxRootProps<T>, 'orientation' | 'selectionBehavior'> {\n  /** The controlled open state of the Combobox. Can be binded with `v-model:open`. */\n  open?: boolean\n  /** The open state of the combobox when it is initially rendered. <br> Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n  /**\n   * Whether to reset the searchTerm when the Combobox input blurred\n   * @defaultValue `true`\n   */\n  resetSearchTermOnBlur?: boolean\n  /**\n   * Whether to reset the searchTerm when the Combobox value is selected\n   * @defaultValue `true`\n   */\n  resetSearchTermOnSelect?: boolean\n  /**\n   * Whether to open the combobox when the input is focused\n   * @defaultValue `false`\n   */\n  openOnFocus?: boolean\n  /**\n   * Whether to open the combobox when the input is clicked\n   * @defaultValue `false`\n   */\n  openOnClick?: boolean\n  /**\n   * When `true`, disable the default filters\n   */\n  ignoreFilter?: boolean\n  /**\n   * When `true` the `modelValue` will be reset to `null` (or `[]` if `multiple`)\n   */\n  resetModelValueOnClear?: boolean\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableValue = AcceptableValue\">\nimport type { EventHookOn } from '@vueuse/core'\nimport { createEventHook, useVModel } from '@vueuse/core'\nimport { computed, getCurrentInstance, nextTick, onMounted, ref, toRefs } from 'vue'\nimport { ListboxRoot } from '@/Listbox'\nimport { PopperRoot } from '@/Popper'\n\nconst props = withDefaults(defineProps<ComboboxRootProps<T>>(), {\n  open: undefined,\n  resetSearchTermOnBlur: true,\n  resetSearchTermOnSelect: true,\n  openOnFocus: false,\n  openOnClick: false,\n  resetModelValueOnClear: false,\n  highlightOnHover: true,\n})\nconst emits = defineEmits<ComboboxRootEmits<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n    /** Current active value */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { primitiveElement, currentElement: parentElement } = usePrimitiveElement<GenericComponentInstance<typeof ListboxRoot>>()\nconst { multiple, disabled, ignoreFilter, resetSearchTermOnSelect, openOnFocus, openOnClick, dir: propDir, resetModelValueOnClear, highlightOnHover } = toRefs(props)\n\nconst dir = useDirection(propDir)\n\nconst modelValue = useVModel(props as ComboboxRootProps<T>, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? (multiple.value ? [] : undefined),\n  passive: (props.modelValue === undefined) as false,\n  deep: true,\n}) as Ref<T | T[]>\n\nconst open = useVModel(props, 'open', emits, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nasync function onOpenChange(val: boolean) {\n  open.value = val\n  filterSearch.value = ''\n\n  if (val) {\n    // make sure dom is ready then only highlight the selected\n    await nextTick()\n    primitiveElement.value?.highlightSelected()\n    isUserInputted.value = true\n    inputElement.value?.focus()\n  }\n  else {\n    isUserInputted.value = false\n    setTimeout(() => {\n      if (!val && props.resetSearchTermOnBlur)\n        resetSearchTerm.trigger()\n    }, 1)\n  }\n}\n\nconst resetSearchTerm = createEventHook()\nconst isUserInputted = ref(false)\nconst isVirtual = ref(false)\nconst inputElement = ref<HTMLInputElement>()\nconst triggerElement = ref<HTMLElement>()\n\nconst highlightedElement = computed(() => primitiveElement.value?.highlightedElement ?? undefined)\n\nconst allItems = ref<Map<string, string>>(new Map())\nconst allGroups = ref<Map<string, Set<string>>>(new Map())\n\nconst { contains } = useFilter({ sensitivity: 'base' })\n\nconst filterSearch = ref('')\n\nconst filterState = computed<{\n  count: number\n  items: Map<string, number>\n  groups: Set<string>\n}>((oldValue) => {\n  if (!filterSearch.value || props.ignoreFilter || isVirtual.value) {\n    // Do nothing, each item will know to show itself because search is empty\n    return {\n      count: allItems.value.size,\n      items: oldValue?.items ?? new Map(),\n      groups: oldValue?.groups ?? new Set(allGroups.value.keys()),\n    }\n  }\n\n  let itemCount = 0\n  const filteredItems = new Map<string, number>()\n  const filteredGroups = new Set<string>()\n\n  // Check which items should be included\n  for (const [id, value] of allItems.value) {\n    const score = contains(value, filterSearch.value)\n    filteredItems.set(id, score ? 1 : 0)\n    if (score)\n      itemCount++\n  }\n\n  // Check which groups have at least 1 item shown\n  for (const [groupId, group] of allGroups.value) {\n    for (const itemId of group) {\n      if (filteredItems.get(itemId)! > 0) {\n        filteredGroups.add(groupId)\n        break\n      }\n    }\n  }\n\n  return {\n    count: itemCount,\n    items: filteredItems,\n    groups: filteredGroups,\n  }\n})\n\nconst inst = getCurrentInstance()\nonMounted(() => {\n  if (inst?.exposed) {\n    inst.exposed.highlightItem = primitiveElement.value?.highlightItem\n    inst.exposed.highlightFirstItem = primitiveElement.value?.highlightFirstItem\n    inst.exposed.highlightSelected = primitiveElement.value?.highlightSelected\n  }\n})\n\ndefineExpose({\n  filtered: filterState,\n  highlightedElement,\n  highlightItem: primitiveElement.value?.highlightItem,\n  highlightFirstItem: primitiveElement.value?.highlightFirstItem,\n  highlightSelected: primitiveElement.value?.highlightSelected,\n})\n\nprovideComboboxRootContext({\n  modelValue,\n  multiple,\n  disabled,\n  open,\n  onOpenChange,\n  contentId: '',\n  isUserInputted,\n  isVirtual,\n  inputElement,\n  highlightedElement,\n  onInputElementChange: val => inputElement.value = val,\n  triggerElement,\n  onTriggerElementChange: val => triggerElement.value = val,\n  parentElement,\n  resetSearchTermOnSelect,\n  onResetSearchTerm: resetSearchTerm.on,\n  allItems,\n  allGroups,\n  filterSearch,\n  filterState,\n  ignoreFilter,\n  openOnFocus,\n  openOnClick,\n  resetModelValueOnClear,\n})\n</script>\n\n<template>\n  <PopperRoot>\n    <ListboxRoot\n      ref=\"primitiveElement\"\n      v-bind=\"$attrs\"\n      v-model=\"modelValue\"\n      :style=\"{\n        pointerEvents: open ? 'auto' : undefined,\n      }\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :dir=\"dir\"\n      :multiple=\"multiple\"\n      :name=\"name\"\n      :required=\"required\"\n      :disabled=\"disabled\"\n      :highlight-on-hover=\"highlightOnHover\"\n      :by=\"props.by as any\"\n      @highlight=\"emits('highlight', $event as any)\"\n    >\n      <slot\n        :open=\"open\"\n        :model-value=\"modelValue\"\n      />\n    </ListboxRoot>\n  </PopperRoot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Direction, GenericComponentInstance } from '@/shared/types'\nimport { provideComboboxRootContext } from '@/Combobox/ComboboxRoot.vue'\nimport { usePrimitiveElement } from '@/Primitive'\nimport { createContext, useDirection, useFilter } from '@/shared'\n\nexport interface AutocompleteRootProps extends PrimitiveProps {\n  /** The controlled value of the Autocomplete (the input text). Can be bound with `v-model`. */\n  modelValue?: string\n  /** The value of the autocomplete when initially rendered. Use when you do not need to control the state. */\n  defaultValue?: string\n  /** The controlled open state of the Autocomplete. Can be bound with `v-model:open`. */\n  open?: boolean\n  /** The open state of the autocomplete when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n  /** When `true`, prevents the user from interacting with autocomplete */\n  disabled?: boolean\n  /** The reading direction of the autocomplete when applicable. */\n  dir?: Direction\n  /** The name of the field. Submitted with its owning form as part of a name/value pair. */\n  name?: string\n  /** When `true`, indicates that the user must set the value before the owning form can be submitted. */\n  required?: boolean\n  /**\n   * Whether to reset the searchTerm when the Autocomplete input blurred\n   * @defaultValue `false`\n   */\n  resetSearchTermOnBlur?: boolean\n  /**\n   * Whether to open the autocomplete when the input is focused\n   * @defaultValue `false`\n   */\n  openOnFocus?: boolean\n  /**\n   * Whether to open the autocomplete when the input is clicked\n   * @defaultValue `false`\n   */\n  openOnClick?: boolean\n  /**\n   * When `true`, disable the default filters\n   */\n  ignoreFilter?: boolean\n  /** When `true`, hover over item will trigger highlight */\n  highlightOnHover?: boolean\n}\n\nexport type AutocompleteRootEmits = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [value: string]\n  /** Event handler when highlighted element changes. */\n  'highlight': [payload: { ref: HTMLElement, value: string } | undefined]\n  /** Event handler called when the open state of the autocomplete changes. */\n  'update:open': [value: boolean]\n}\n\nexport type AutocompleteRootContext = {\n  modelValue: Ref<string>\n}\n\nexport const [injectAutocompleteRootContext, provideAutocompleteRootContext]\n  = createContext<AutocompleteRootContext>('AutocompleteRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { createEventHook, useVModel } from '@vueuse/core'\nimport { computed, getCurrentInstance, nextTick, onMounted, ref, toRefs } from 'vue'\nimport { ListboxRoot } from '@/Listbox'\nimport { PopperRoot } from '@/Popper'\n\nconst props = withDefaults(defineProps<AutocompleteRootProps>(), {\n  open: undefined,\n  resetSearchTermOnBlur: false,\n  openOnFocus: false,\n  openOnClick: false,\n  highlightOnHover: true,\n})\nconst emits = defineEmits<AutocompleteRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n    /** Current active value */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { primitiveElement, currentElement: parentElement } = usePrimitiveElement<GenericComponentInstance<typeof ListboxRoot>>()\nconst { disabled, ignoreFilter, openOnFocus, openOnClick, dir: propDir, highlightOnHover } = toRefs(props)\n\nconst dir = useDirection(propDir)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? '',\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<string>\n\nconst open = useVModel(props, 'open', emits, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\n// Writable computed that converts any value to string for the ComboboxRootContext.\n// This handles the case when ComboboxItem sets modelValue to a non-string value,\n// or when ComboboxCancel resets modelValue to null.\nconst contextModelValue = computed({\n  get: () => modelValue.value,\n  set: (val: any) => {\n    if (val === null || val === undefined) {\n      modelValue.value = ''\n    }\n    else {\n      modelValue.value = String(val)\n    }\n  },\n})\n\nasync function onOpenChange(val: boolean) {\n  open.value = val\n\n  if (val) {\n    // When opening, set filter to current text so items are filtered by what's in the input\n    filterSearch.value = modelValue.value || ''\n\n    await nextTick()\n    primitiveElement.value?.highlightSelected()\n    isUserInputted.value = true\n    inputElement.value?.focus()\n  }\n  else {\n    isUserInputted.value = false\n    filterSearch.value = ''\n    setTimeout(() => {\n      if (!val && props.resetSearchTermOnBlur)\n        resetSearchTerm.trigger()\n    }, 1)\n  }\n}\n\nconst resetSearchTerm = createEventHook()\nconst isUserInputted = ref(false)\nconst isVirtual = ref(false)\nconst inputElement = ref<HTMLInputElement>()\nconst triggerElement = ref<HTMLElement>()\n\nconst highlightedElement = computed(() => primitiveElement.value?.highlightedElement ?? undefined)\n\nconst allItems = ref<Map<string, string>>(new Map())\nconst allGroups = ref<Map<string, Set<string>>>(new Map())\n\nconst { contains } = useFilter({ sensitivity: 'base' })\n\nconst filterSearch = ref('')\n\nconst filterState = computed<{\n  count: number\n  items: Map<string, number>\n  groups: Set<string>\n}>((oldValue) => {\n  if (!filterSearch.value || props.ignoreFilter || isVirtual.value) {\n    return {\n      count: allItems.value.size,\n      items: oldValue?.items ?? new Map(),\n      groups: oldValue?.groups ?? new Set(allGroups.value.keys()),\n    }\n  }\n\n  let itemCount = 0\n  const filteredItems = new Map<string, number>()\n  const filteredGroups = new Set<string>()\n\n  for (const [id, value] of allItems.value) {\n    const score = contains(value, filterSearch.value)\n    filteredItems.set(id, score ? 1 : 0)\n    if (score)\n      itemCount++\n  }\n\n  for (const [groupId, group] of allGroups.value) {\n    for (const itemId of group) {\n      if (filteredItems.get(itemId)! > 0) {\n        filteredGroups.add(groupId)\n        break\n      }\n    }\n  }\n\n  return {\n    count: itemCount,\n    items: filteredItems,\n    groups: filteredGroups,\n  }\n})\n\nconst inst = getCurrentInstance()\nonMounted(() => {\n  if (inst?.exposed) {\n    inst.exposed.highlightItem = primitiveElement.value?.highlightItem\n    inst.exposed.highlightFirstItem = primitiveElement.value?.highlightFirstItem\n    inst.exposed.highlightSelected = primitiveElement.value?.highlightSelected\n  }\n})\n\ndefineExpose({\n  filtered: filterState,\n  highlightedElement,\n  highlightItem: primitiveElement.value?.highlightItem,\n  highlightFirstItem: primitiveElement.value?.highlightFirstItem,\n  highlightSelected: primitiveElement.value?.highlightSelected,\n})\n\n// Provide the Combobox context so all Combobox sub-components work inside Autocomplete\nprovideComboboxRootContext({\n  modelValue: contextModelValue as any,\n  multiple: ref(false),\n  disabled,\n  open,\n  onOpenChange,\n  contentId: '',\n  isUserInputted,\n  isVirtual,\n  inputElement,\n  highlightedElement,\n  onInputElementChange: val => inputElement.value = val,\n  triggerElement,\n  onTriggerElementChange: val => triggerElement.value = val,\n  parentElement,\n  resetSearchTermOnSelect: ref(false),\n  onResetSearchTerm: resetSearchTerm.on,\n  allItems,\n  allGroups,\n  filterSearch,\n  filterState,\n  ignoreFilter,\n  openOnFocus,\n  openOnClick,\n  resetModelValueOnClear: ref(true),\n})\n\n// Provide autocomplete-specific context\nprovideAutocompleteRootContext({\n  modelValue,\n})\n</script>\n\n<template>\n  <PopperRoot>\n    <ListboxRoot\n      ref=\"primitiveElement\"\n      v-bind=\"$attrs\"\n      v-model=\"(contextModelValue as any)\"\n      :style=\"{\n        pointerEvents: open ? 'auto' : undefined,\n      }\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :dir=\"dir\"\n      :name=\"name\"\n      :required=\"required\"\n      :disabled=\"disabled\"\n      :highlight-on-hover=\"highlightOnHover\"\n      @highlight=\"emits('highlight', $event as any)\"\n    >\n      <slot\n        :open=\"open\"\n        :model-value=\"modelValue\"\n      />\n    </ListboxRoot>\n  </PopperRoot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Direction, GenericComponentInstance } from '@/shared/types'\nimport { provideComboboxRootContext } from '@/Combobox/ComboboxRoot.vue'\nimport { usePrimitiveElement } from '@/Primitive'\nimport { createContext, useDirection, useFilter } from '@/shared'\n\nexport interface AutocompleteRootProps extends PrimitiveProps {\n  /** The controlled value of the Autocomplete (the input text). Can be bound with `v-model`. */\n  modelValue?: string\n  /** The value of the autocomplete when initially rendered. Use when you do not need to control the state. */\n  defaultValue?: string\n  /** The controlled open state of the Autocomplete. Can be bound with `v-model:open`. */\n  open?: boolean\n  /** The open state of the autocomplete when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n  /** When `true`, prevents the user from interacting with autocomplete */\n  disabled?: boolean\n  /** The reading direction of the autocomplete when applicable. */\n  dir?: Direction\n  /** The name of the field. Submitted with its owning form as part of a name/value pair. */\n  name?: string\n  /** When `true`, indicates that the user must set the value before the owning form can be submitted. */\n  required?: boolean\n  /**\n   * Whether to reset the searchTerm when the Autocomplete input blurred\n   * @defaultValue `false`\n   */\n  resetSearchTermOnBlur?: boolean\n  /**\n   * Whether to open the autocomplete when the input is focused\n   * @defaultValue `false`\n   */\n  openOnFocus?: boolean\n  /**\n   * Whether to open the autocomplete when the input is clicked\n   * @defaultValue `false`\n   */\n  openOnClick?: boolean\n  /**\n   * When `true`, disable the default filters\n   */\n  ignoreFilter?: boolean\n  /** When `true`, hover over item will trigger highlight */\n  highlightOnHover?: boolean\n}\n\nexport type AutocompleteRootEmits = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [value: string]\n  /** Event handler when highlighted element changes. */\n  'highlight': [payload: { ref: HTMLElement, value: string } | undefined]\n  /** Event handler called when the open state of the autocomplete changes. */\n  'update:open': [value: boolean]\n}\n\nexport type AutocompleteRootContext = {\n  modelValue: Ref<string>\n}\n\nexport const [injectAutocompleteRootContext, provideAutocompleteRootContext]\n  = createContext<AutocompleteRootContext>('AutocompleteRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { createEventHook, useVModel } from '@vueuse/core'\nimport { computed, getCurrentInstance, nextTick, onMounted, ref, toRefs } from 'vue'\nimport { ListboxRoot } from '@/Listbox'\nimport { PopperRoot } from '@/Popper'\n\nconst props = withDefaults(defineProps<AutocompleteRootProps>(), {\n  open: undefined,\n  resetSearchTermOnBlur: false,\n  openOnFocus: false,\n  openOnClick: false,\n  highlightOnHover: true,\n})\nconst emits = defineEmits<AutocompleteRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n    /** Current active value */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { primitiveElement, currentElement: parentElement } = usePrimitiveElement<GenericComponentInstance<typeof ListboxRoot>>()\nconst { disabled, ignoreFilter, openOnFocus, openOnClick, dir: propDir, highlightOnHover } = toRefs(props)\n\nconst dir = useDirection(propDir)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? '',\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<string>\n\nconst open = useVModel(props, 'open', emits, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\n// Writable computed that converts any value to string for the ComboboxRootContext.\n// This handles the case when ComboboxItem sets modelValue to a non-string value,\n// or when ComboboxCancel resets modelValue to null.\nconst contextModelValue = computed({\n  get: () => modelValue.value,\n  set: (val: any) => {\n    if (val === null || val === undefined) {\n      modelValue.value = ''\n    }\n    else {\n      modelValue.value = String(val)\n    }\n  },\n})\n\nasync function onOpenChange(val: boolean) {\n  open.value = val\n\n  if (val) {\n    // When opening, set filter to current text so items are filtered by what's in the input\n    filterSearch.value = modelValue.value || ''\n\n    await nextTick()\n    primitiveElement.value?.highlightSelected()\n    isUserInputted.value = true\n    inputElement.value?.focus()\n  }\n  else {\n    isUserInputted.value = false\n    filterSearch.value = ''\n    setTimeout(() => {\n      if (!val && props.resetSearchTermOnBlur)\n        resetSearchTerm.trigger()\n    }, 1)\n  }\n}\n\nconst resetSearchTerm = createEventHook()\nconst isUserInputted = ref(false)\nconst isVirtual = ref(false)\nconst inputElement = ref<HTMLInputElement>()\nconst triggerElement = ref<HTMLElement>()\n\nconst highlightedElement = computed(() => primitiveElement.value?.highlightedElement ?? undefined)\n\nconst allItems = ref<Map<string, string>>(new Map())\nconst allGroups = ref<Map<string, Set<string>>>(new Map())\n\nconst { contains } = useFilter({ sensitivity: 'base' })\n\nconst filterSearch = ref('')\n\nconst filterState = computed<{\n  count: number\n  items: Map<string, number>\n  groups: Set<string>\n}>((oldValue) => {\n  if (!filterSearch.value || props.ignoreFilter || isVirtual.value) {\n    return {\n      count: allItems.value.size,\n      items: oldValue?.items ?? new Map(),\n      groups: oldValue?.groups ?? new Set(allGroups.value.keys()),\n    }\n  }\n\n  let itemCount = 0\n  const filteredItems = new Map<string, number>()\n  const filteredGroups = new Set<string>()\n\n  for (const [id, value] of allItems.value) {\n    const score = contains(value, filterSearch.value)\n    filteredItems.set(id, score ? 1 : 0)\n    if (score)\n      itemCount++\n  }\n\n  for (const [groupId, group] of allGroups.value) {\n    for (const itemId of group) {\n      if (filteredItems.get(itemId)! > 0) {\n        filteredGroups.add(groupId)\n        break\n      }\n    }\n  }\n\n  return {\n    count: itemCount,\n    items: filteredItems,\n    groups: filteredGroups,\n  }\n})\n\nconst inst = getCurrentInstance()\nonMounted(() => {\n  if (inst?.exposed) {\n    inst.exposed.highlightItem = primitiveElement.value?.highlightItem\n    inst.exposed.highlightFirstItem = primitiveElement.value?.highlightFirstItem\n    inst.exposed.highlightSelected = primitiveElement.value?.highlightSelected\n  }\n})\n\ndefineExpose({\n  filtered: filterState,\n  highlightedElement,\n  highlightItem: primitiveElement.value?.highlightItem,\n  highlightFirstItem: primitiveElement.value?.highlightFirstItem,\n  highlightSelected: primitiveElement.value?.highlightSelected,\n})\n\n// Provide the Combobox context so all Combobox sub-components work inside Autocomplete\nprovideComboboxRootContext({\n  modelValue: contextModelValue as any,\n  multiple: ref(false),\n  disabled,\n  open,\n  onOpenChange,\n  contentId: '',\n  isUserInputted,\n  isVirtual,\n  inputElement,\n  highlightedElement,\n  onInputElementChange: val => inputElement.value = val,\n  triggerElement,\n  onTriggerElementChange: val => triggerElement.value = val,\n  parentElement,\n  resetSearchTermOnSelect: ref(false),\n  onResetSearchTerm: resetSearchTerm.on,\n  allItems,\n  allGroups,\n  filterSearch,\n  filterState,\n  ignoreFilter,\n  openOnFocus,\n  openOnClick,\n  resetModelValueOnClear: ref(true),\n})\n\n// Provide autocomplete-specific context\nprovideAutocompleteRootContext({\n  modelValue,\n})\n</script>\n\n<template>\n  <PopperRoot>\n    <ListboxRoot\n      ref=\"primitiveElement\"\n      v-bind=\"$attrs\"\n      v-model=\"(contextModelValue as any)\"\n      :style=\"{\n        pointerEvents: open ? 'auto' : undefined,\n      }\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :dir=\"dir\"\n      :name=\"name\"\n      :required=\"required\"\n      :disabled=\"disabled\"\n      :highlight-on-hover=\"highlightOnHover\"\n      @highlight=\"emits('highlight', $event as any)\"\n    >\n      <slot\n        :open=\"open\"\n        :model-value=\"modelValue\"\n      />\n    </ListboxRoot>\n  </PopperRoot>\n</template>\n","<script lang=\"ts\">\nimport type { ListboxFilterEmits, ListboxFilterProps } from '@/Listbox'\n\nexport type AutocompleteInputEmits = ListboxFilterEmits\nexport interface AutocompleteInputProps extends ListboxFilterProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { nextTick, onMounted, watch } from 'vue'\nimport { injectComboboxRootContext } from '@/Combobox/ComboboxRoot.vue'\nimport { ListboxFilter } from '@/Listbox'\nimport { injectListboxRootContext } from '@/Listbox/ListboxRoot.vue'\nimport { usePrimitiveElement } from '@/Primitive'\nimport { useComposing } from '@/shared'\nimport { injectAutocompleteRootContext } from './AutocompleteRoot.vue'\n\nconst props = withDefaults(defineProps<AutocompleteInputProps>(), {\n  as: 'input',\n})\nconst emits = defineEmits<AutocompleteInputEmits>()\n\nconst rootContext = injectComboboxRootContext()\nconst autocompleteContext = injectAutocompleteRootContext()\nconst listboxContext = injectListboxRootContext()\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  passive: (props.modelValue === undefined) as false,\n})\n\nif (autocompleteContext.modelValue.value) {\n  modelValue.value = autocompleteContext.modelValue.value\n}\n\nonMounted(() => {\n  if (currentElement.value)\n    rootContext.onInputElementChange(currentElement.value as HTMLInputElement)\n})\n\nconst { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing((event) => {\n  const el = event.target as HTMLInputElement\n  if (el)\n    processInputValue(el.value)\n})\n\nfunction handleKeyDown(ev: KeyboardEvent) {\n  // Don't swallow arrow keys mid-composition, they're used for IME candidate navigation\n  if (isComposing.value)\n    return\n  ev.preventDefault()\n  if (!rootContext.open.value)\n    rootContext.onOpenChange(true)\n}\n\nfunction processInputValue(value: string) {\n  if (!rootContext.open.value) {\n    rootContext.onOpenChange(true)\n    nextTick(() => {\n      if (value) {\n        rootContext.filterSearch.value = value\n        listboxContext.highlightFirstItem()\n      }\n    })\n  }\n  else {\n    rootContext.filterSearch.value = value\n  }\n  // Autocomplete-specific: update root's modelValue with the typed text\n  autocompleteContext.modelValue.value = value\n}\n\nfunction handleInput(event: InputEvent) {\n  if (isComposing.value)\n    return\n  processInputValue((event.target as HTMLInputElement).value)\n}\n\nfunction handleFocus() {\n  if (rootContext.openOnFocus.value && !rootContext.open.value)\n    rootContext.onOpenChange(true)\n}\n\nfunction handleClick() {\n  if (rootContext.openOnClick.value && !rootContext.open.value)\n    rootContext.onOpenChange(true)\n}\n\n// When root's modelValue changes externally (e.g. item click, programmatic), sync the input display\nwatch(autocompleteContext.modelValue, (newVal) => {\n  const text = newVal ?? ''\n  if (modelValue.value !== text)\n    modelValue.value = text\n})\n\n// Restore input text when root triggers resetSearchTerm (e.g. on blur with resetSearchTermOnBlur)\nrootContext.onResetSearchTerm(() => {\n  modelValue.value = autocompleteContext.modelValue.value ?? ''\n})\n\nwatch(rootContext.filterState, (_newValue, oldValue) => {\n  if (!rootContext.isVirtual.value && (oldValue.count === 0)) {\n    listboxContext.highlightFirstItem()\n  }\n})\n</script>\n\n<template>\n  <ListboxFilter\n    ref=\"primitiveElement\"\n    v-model=\"modelValue\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :auto-focus=\"autoFocus\"\n    :disabled=\"disabled\"\n    :aria-expanded=\"rootContext.open.value\"\n    :aria-controls=\"rootContext.contentId\"\n    aria-autocomplete=\"list\"\n    role=\"combobox\"\n    autocomplete=\"off\"\n    @click=\"handleClick\"\n    @input=\"handleInput\"\n    @keydown.down.up=\"handleKeyDown\"\n    @focus=\"handleFocus\"\n    @compositionstart=\"handleCompositionStart\"\n    @compositionend=\"handleCompositionEnd\"\n  >\n    <slot />\n  </ListboxFilter>\n</template>\n","<script lang=\"ts\">\nimport type { ListboxFilterEmits, ListboxFilterProps } from '@/Listbox'\n\nexport type AutocompleteInputEmits = ListboxFilterEmits\nexport interface AutocompleteInputProps extends ListboxFilterProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { nextTick, onMounted, watch } from 'vue'\nimport { injectComboboxRootContext } from '@/Combobox/ComboboxRoot.vue'\nimport { ListboxFilter } from '@/Listbox'\nimport { injectListboxRootContext } from '@/Listbox/ListboxRoot.vue'\nimport { usePrimitiveElement } from '@/Primitive'\nimport { useComposing } from '@/shared'\nimport { injectAutocompleteRootContext } from './AutocompleteRoot.vue'\n\nconst props = withDefaults(defineProps<AutocompleteInputProps>(), {\n  as: 'input',\n})\nconst emits = defineEmits<AutocompleteInputEmits>()\n\nconst rootContext = injectComboboxRootContext()\nconst autocompleteContext = injectAutocompleteRootContext()\nconst listboxContext = injectListboxRootContext()\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  passive: (props.modelValue === undefined) as false,\n})\n\nif (autocompleteContext.modelValue.value) {\n  modelValue.value = autocompleteContext.modelValue.value\n}\n\nonMounted(() => {\n  if (currentElement.value)\n    rootContext.onInputElementChange(currentElement.value as HTMLInputElement)\n})\n\nconst { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing((event) => {\n  const el = event.target as HTMLInputElement\n  if (el)\n    processInputValue(el.value)\n})\n\nfunction handleKeyDown(ev: KeyboardEvent) {\n  // Don't swallow arrow keys mid-composition, they're used for IME candidate navigation\n  if (isComposing.value)\n    return\n  ev.preventDefault()\n  if (!rootContext.open.value)\n    rootContext.onOpenChange(true)\n}\n\nfunction processInputValue(value: string) {\n  if (!rootContext.open.value) {\n    rootContext.onOpenChange(true)\n    nextTick(() => {\n      if (value) {\n        rootContext.filterSearch.value = value\n        listboxContext.highlightFirstItem()\n      }\n    })\n  }\n  else {\n    rootContext.filterSearch.value = value\n  }\n  // Autocomplete-specific: update root's modelValue with the typed text\n  autocompleteContext.modelValue.value = value\n}\n\nfunction handleInput(event: InputEvent) {\n  if (isComposing.value)\n    return\n  processInputValue((event.target as HTMLInputElement).value)\n}\n\nfunction handleFocus() {\n  if (rootContext.openOnFocus.value && !rootContext.open.value)\n    rootContext.onOpenChange(true)\n}\n\nfunction handleClick() {\n  if (rootContext.openOnClick.value && !rootContext.open.value)\n    rootContext.onOpenChange(true)\n}\n\n// When root's modelValue changes externally (e.g. item click, programmatic), sync the input display\nwatch(autocompleteContext.modelValue, (newVal) => {\n  const text = newVal ?? ''\n  if (modelValue.value !== text)\n    modelValue.value = text\n})\n\n// Restore input text when root triggers resetSearchTerm (e.g. on blur with resetSearchTermOnBlur)\nrootContext.onResetSearchTerm(() => {\n  modelValue.value = autocompleteContext.modelValue.value ?? ''\n})\n\nwatch(rootContext.filterState, (_newValue, oldValue) => {\n  if (!rootContext.isVirtual.value && (oldValue.count === 0)) {\n    listboxContext.highlightFirstItem()\n  }\n})\n</script>\n\n<template>\n  <ListboxFilter\n    ref=\"primitiveElement\"\n    v-model=\"modelValue\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :auto-focus=\"autoFocus\"\n    :disabled=\"disabled\"\n    :aria-expanded=\"rootContext.open.value\"\n    :aria-controls=\"rootContext.contentId\"\n    aria-autocomplete=\"list\"\n    role=\"combobox\"\n    autocomplete=\"off\"\n    @click=\"handleClick\"\n    @input=\"handleInput\"\n    @keydown.down.up=\"handleKeyDown\"\n    @focus=\"handleFocus\"\n    @compositionstart=\"handleCompositionStart\"\n    @compositionend=\"handleCompositionEnd\"\n  >\n    <slot />\n  </ListboxFilter>\n</template>\n","<script lang=\"ts\">\nexport interface ComboboxAnchorProps extends PopperAnchorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { PopperAnchorProps } from '@/Popper'\nimport { PopperAnchor } from '@/Popper'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\ndefineProps<ComboboxAnchorProps>()\n\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <PopperAnchor\n    as-child\n    :reference=\"reference\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      v-bind=\"$attrs\"\n    >\n      <slot />\n    </Primitive>\n  </PopperAnchor>\n</template>\n","<script lang=\"ts\">\nexport interface ComboboxAnchorProps extends PopperAnchorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { PopperAnchorProps } from '@/Popper'\nimport { PopperAnchor } from '@/Popper'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\ndefineProps<ComboboxAnchorProps>()\n\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <PopperAnchor\n    as-child\n    :reference=\"reference\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      v-bind=\"$attrs\"\n    >\n      <slot />\n    </Primitive>\n  </PopperAnchor>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { DismissableLayerEmits, DismissableLayerProps } from '@/DismissableLayer'\nimport type { PopperContentProps } from '@/Popper'\n\nimport { createContext, getActiveElement, useFocusGuards, useForwardExpose, useForwardProps, useHideOthers } from '@/shared'\nimport { useBodyScrollLock } from '@/shared/useBodyScrollLock'\n\nexport type ComboboxContentImplEmits = DismissableLayerEmits\n\nexport interface ComboboxContentImplProps extends PopperContentProps, DismissableLayerProps {\n  /**\n   * The positioning mode to use, <br>\n   * `inline` is the default and you can control the position using CSS. <br>\n   * `popper` positions content in the same way as our other primitives, for example `Popover` or `DropdownMenu`.\n   */\n  position?: 'inline' | 'popper'\n  /** The document.body will be lock, and scrolling will be disabled. */\n  bodyLock?: boolean\n  /**\n   * When `true`, hides the content when there are no items matching the filter.\n   * @defaultValue false\n   */\n  hideWhenEmpty?: boolean\n}\n\nexport const [injectComboboxContentContext, provideComboboxContentContext]\n  = createContext<{\n    position: Ref<'inline' | 'popper'>\n  }>('ComboboxContent')\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted, ref, toRefs } from 'vue'\nimport { DismissableLayer } from '@/DismissableLayer'\nimport { FocusScope } from '@/FocusScope'\nimport { ListboxContent } from '@/Listbox'\nimport { PopperContent } from '@/Popper'\nimport { Primitive } from '@/Primitive'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nconst props = withDefaults(defineProps<ComboboxContentImplProps>(), {\n  position: 'inline',\n})\nconst emits = defineEmits<ComboboxContentImplEmits>()\n\nconst { position } = toRefs(props)\nconst rootContext = injectComboboxRootContext()\n\nconst isEmpty = computed(() => rootContext.ignoreFilter.value\n  ? rootContext.allItems.value.size === 0\n  : rootContext.filterState.value.count === 0,\n)\n\nconst { forwardRef, currentElement } = useForwardExpose()\nuseBodyScrollLock(props.bodyLock)\nuseFocusGuards()\nuseHideOthers(rootContext.parentElement)\n\nconst pickedProps = computed(() => {\n  if (props.position === 'popper')\n    return props\n  else return {}\n})\n\nconst forwardedProps = useForwardProps(pickedProps.value)\n\nconst popperStyle = {\n  // Ensure border-box for floating-ui calculations\n  'boxSizing': 'border-box',\n  '--reka-combobox-content-transform-origin':\n        'var(--reka-popper-transform-origin)',\n  '--reka-combobox-content-available-width':\n        'var(--reka-popper-available-width)',\n  '--reka-combobox-content-available-height':\n        'var(--reka-popper-available-height)',\n  '--reka-combobox-trigger-width': 'var(--reka-popper-anchor-width)',\n  '--reka-combobox-trigger-height': 'var(--reka-popper-anchor-height)',\n}\n\nprovideComboboxContentContext({ position })\n\n// Handle case where input position within the content\nconst isInputWithinContent = ref(false)\nonMounted(() => {\n  if (rootContext.inputElement.value) {\n    isInputWithinContent.value = currentElement.value.contains(rootContext.inputElement.value)\n    if (isInputWithinContent.value) {\n      rootContext.inputElement.value.focus()\n    }\n  }\n})\n\nonUnmounted(() => {\n  const activeElement = getActiveElement()\n  if (isInputWithinContent.value && (!activeElement || activeElement === document.body)) {\n    rootContext.triggerElement.value?.focus()\n  }\n})\n\nfunction isEventTargetWithinCombobox(target: EventTarget | null) {\n  if (rootContext.parentElement.value?.contains(target as Node))\n    return true\n\n  // A `<label>` associated (via `for`) with an element inside the combobox forwards its\n  // click/focus to that control, so interacting with it should not dismiss the content.\n  // Without this, clicking such a label while open dismisses on `pointerdown` and the\n  // forwarded click/focus immediately re-opens it.\n  const label = target instanceof Element ? target.closest('label') : null\n  const control = label?.control\n  return !!control && !!rootContext.parentElement.value?.contains(control)\n}\n</script>\n\n<template>\n  <ListboxContent as-child>\n    <FocusScope\n      as-child\n      @mount-auto-focus.prevent\n      @unmount-auto-focus.prevent\n    >\n      <DismissableLayer\n        as-child\n        :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n        @dismiss=\"rootContext.onOpenChange(false)\"\n        @focus-outside=\"(ev) => {\n          // if focusing inside the combobox (or a label tied to it), prevent dismiss\n          if (isEventTargetWithinCombobox(ev.target)) ev.preventDefault()\n          emits('focusOutside', ev)\n        }\"\n        @interact-outside=\"emits('interactOutside', $event)\"\n        @escape-key-down=\"emits('escapeKeyDown', $event)\"\n        @pointer-down-outside=\"(ev) => {\n          // if clicking inside the combobox (or a label tied to it), prevent dismiss\n          if (isEventTargetWithinCombobox(ev.target)) ev.preventDefault()\n          emits('pointerDownOutside', ev)\n        }\"\n      >\n        <component\n          :is=\"position === 'popper' ? PopperContent : Primitive\"\n          v-bind=\"{ ...$attrs, ...forwardedProps }\"\n          :id=\"rootContext.contentId\"\n          :ref=\"forwardRef\"\n          :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n          :data-empty=\"isEmpty ? '' : undefined\"\n          :style=\"{\n            // flex layout so we can place the scroll buttons properly\n            // When hideWhenEmpty is true, hide the content when no items match\n            display: (props.hideWhenEmpty && isEmpty) ? 'none' : 'flex',\n            flexDirection: 'column',\n            // reset the outline by default as the content MAY get focused\n            outline: 'none',\n            ...(position === 'popper' ? popperStyle : {}),\n          }\"\n        >\n          <slot />\n        </component>\n      </DismissableLayer>\n    </FocusScope>\n  </ListboxContent>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { DismissableLayerEmits, DismissableLayerProps } from '@/DismissableLayer'\nimport type { PopperContentProps } from '@/Popper'\n\nimport { createContext, getActiveElement, useFocusGuards, useForwardExpose, useForwardProps, useHideOthers } from '@/shared'\nimport { useBodyScrollLock } from '@/shared/useBodyScrollLock'\n\nexport type ComboboxContentImplEmits = DismissableLayerEmits\n\nexport interface ComboboxContentImplProps extends PopperContentProps, DismissableLayerProps {\n  /**\n   * The positioning mode to use, <br>\n   * `inline` is the default and you can control the position using CSS. <br>\n   * `popper` positions content in the same way as our other primitives, for example `Popover` or `DropdownMenu`.\n   */\n  position?: 'inline' | 'popper'\n  /** The document.body will be lock, and scrolling will be disabled. */\n  bodyLock?: boolean\n  /**\n   * When `true`, hides the content when there are no items matching the filter.\n   * @defaultValue false\n   */\n  hideWhenEmpty?: boolean\n}\n\nexport const [injectComboboxContentContext, provideComboboxContentContext]\n  = createContext<{\n    position: Ref<'inline' | 'popper'>\n  }>('ComboboxContent')\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted, ref, toRefs } from 'vue'\nimport { DismissableLayer } from '@/DismissableLayer'\nimport { FocusScope } from '@/FocusScope'\nimport { ListboxContent } from '@/Listbox'\nimport { PopperContent } from '@/Popper'\nimport { Primitive } from '@/Primitive'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nconst props = withDefaults(defineProps<ComboboxContentImplProps>(), {\n  position: 'inline',\n})\nconst emits = defineEmits<ComboboxContentImplEmits>()\n\nconst { position } = toRefs(props)\nconst rootContext = injectComboboxRootContext()\n\nconst isEmpty = computed(() => rootContext.ignoreFilter.value\n  ? rootContext.allItems.value.size === 0\n  : rootContext.filterState.value.count === 0,\n)\n\nconst { forwardRef, currentElement } = useForwardExpose()\nuseBodyScrollLock(props.bodyLock)\nuseFocusGuards()\nuseHideOthers(rootContext.parentElement)\n\nconst pickedProps = computed(() => {\n  if (props.position === 'popper')\n    return props\n  else return {}\n})\n\nconst forwardedProps = useForwardProps(pickedProps.value)\n\nconst popperStyle = {\n  // Ensure border-box for floating-ui calculations\n  'boxSizing': 'border-box',\n  '--reka-combobox-content-transform-origin':\n        'var(--reka-popper-transform-origin)',\n  '--reka-combobox-content-available-width':\n        'var(--reka-popper-available-width)',\n  '--reka-combobox-content-available-height':\n        'var(--reka-popper-available-height)',\n  '--reka-combobox-trigger-width': 'var(--reka-popper-anchor-width)',\n  '--reka-combobox-trigger-height': 'var(--reka-popper-anchor-height)',\n}\n\nprovideComboboxContentContext({ position })\n\n// Handle case where input position within the content\nconst isInputWithinContent = ref(false)\nonMounted(() => {\n  if (rootContext.inputElement.value) {\n    isInputWithinContent.value = currentElement.value.contains(rootContext.inputElement.value)\n    if (isInputWithinContent.value) {\n      rootContext.inputElement.value.focus()\n    }\n  }\n})\n\nonUnmounted(() => {\n  const activeElement = getActiveElement()\n  if (isInputWithinContent.value && (!activeElement || activeElement === document.body)) {\n    rootContext.triggerElement.value?.focus()\n  }\n})\n\nfunction isEventTargetWithinCombobox(target: EventTarget | null) {\n  if (rootContext.parentElement.value?.contains(target as Node))\n    return true\n\n  // A `<label>` associated (via `for`) with an element inside the combobox forwards its\n  // click/focus to that control, so interacting with it should not dismiss the content.\n  // Without this, clicking such a label while open dismisses on `pointerdown` and the\n  // forwarded click/focus immediately re-opens it.\n  const label = target instanceof Element ? target.closest('label') : null\n  const control = label?.control\n  return !!control && !!rootContext.parentElement.value?.contains(control)\n}\n</script>\n\n<template>\n  <ListboxContent as-child>\n    <FocusScope\n      as-child\n      @mount-auto-focus.prevent\n      @unmount-auto-focus.prevent\n    >\n      <DismissableLayer\n        as-child\n        :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n        @dismiss=\"rootContext.onOpenChange(false)\"\n        @focus-outside=\"(ev) => {\n          // if focusing inside the combobox (or a label tied to it), prevent dismiss\n          if (isEventTargetWithinCombobox(ev.target)) ev.preventDefault()\n          emits('focusOutside', ev)\n        }\"\n        @interact-outside=\"emits('interactOutside', $event)\"\n        @escape-key-down=\"emits('escapeKeyDown', $event)\"\n        @pointer-down-outside=\"(ev) => {\n          // if clicking inside the combobox (or a label tied to it), prevent dismiss\n          if (isEventTargetWithinCombobox(ev.target)) ev.preventDefault()\n          emits('pointerDownOutside', ev)\n        }\"\n      >\n        <component\n          :is=\"position === 'popper' ? PopperContent : Primitive\"\n          v-bind=\"{ ...$attrs, ...forwardedProps }\"\n          :id=\"rootContext.contentId\"\n          :ref=\"forwardRef\"\n          :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n          :data-empty=\"isEmpty ? '' : undefined\"\n          :style=\"{\n            // flex layout so we can place the scroll buttons properly\n            // When hideWhenEmpty is true, hide the content when no items match\n            display: (props.hideWhenEmpty && isEmpty) ? 'none' : 'flex',\n            flexDirection: 'column',\n            // reset the outline by default as the content MAY get focused\n            outline: 'none',\n            ...(position === 'popper' ? popperStyle : {}),\n          }\"\n        >\n          <slot />\n        </component>\n      </DismissableLayer>\n    </FocusScope>\n  </ListboxContent>\n</template>\n","<script lang=\"ts\">\nimport type { PopperArrowProps } from '@/Popper'\n\nexport interface ComboboxArrowProps extends PopperArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { PopperArrow } from '@/Popper'\nimport { useForwardExpose } from '@/shared'\nimport { injectComboboxContentContext } from './ComboboxContentImpl.vue'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nconst props = withDefaults(defineProps<ComboboxArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\nconst rootContext = injectComboboxRootContext()\nconst contentContext = injectComboboxContentContext()\n\nuseForwardExpose()\n</script>\n\n<template>\n  <PopperArrow\n    v-if=\"rootContext.open.value && contentContext.position.value === 'popper'\"\n    v-bind=\"props\"\n  >\n    <slot />\n  </PopperArrow>\n</template>\n","<script lang=\"ts\">\nimport type { PopperArrowProps } from '@/Popper'\n\nexport interface ComboboxArrowProps extends PopperArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { PopperArrow } from '@/Popper'\nimport { useForwardExpose } from '@/shared'\nimport { injectComboboxContentContext } from './ComboboxContentImpl.vue'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nconst props = withDefaults(defineProps<ComboboxArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\nconst rootContext = injectComboboxRootContext()\nconst contentContext = injectComboboxContentContext()\n\nuseForwardExpose()\n</script>\n\n<template>\n  <PopperArrow\n    v-if=\"rootContext.open.value && contentContext.position.value === 'popper'\"\n    v-bind=\"props\"\n  >\n    <slot />\n  </PopperArrow>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ComboboxCancelProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nconst props = withDefaults(defineProps<ComboboxCancelProps>(), {\n  as: 'button',\n})\n\nuseForwardExpose()\nconst rootContext = injectComboboxRootContext()\n\nfunction handleClick() {\n  // Reset the search to show all options.\n  rootContext.filterSearch.value = ''\n\n  if (rootContext.inputElement.value) {\n    rootContext.inputElement.value.value = ''\n    rootContext.inputElement.value.focus()\n  }\n\n  if (rootContext.resetModelValueOnClear?.value) {\n    rootContext.modelValue.value = rootContext.multiple.value ? [] : null\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    :type=\"as === 'button' ? 'button' : undefined\"\n    v-bind=\"props\"\n    tabindex=\"-1\"\n    @click=\"handleClick\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ComboboxCancelProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nconst props = withDefaults(defineProps<ComboboxCancelProps>(), {\n  as: 'button',\n})\n\nuseForwardExpose()\nconst rootContext = injectComboboxRootContext()\n\nfunction handleClick() {\n  // Reset the search to show all options.\n  rootContext.filterSearch.value = ''\n\n  if (rootContext.inputElement.value) {\n    rootContext.inputElement.value.value = ''\n    rootContext.inputElement.value.focus()\n  }\n\n  if (rootContext.resetModelValueOnClear?.value) {\n    rootContext.modelValue.value = rootContext.multiple.value ? [] : null\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    :type=\"as === 'button' ? 'button' : undefined\"\n    v-bind=\"props\"\n    tabindex=\"-1\"\n    @click=\"handleClick\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { ComboboxContentImplEmits, ComboboxContentImplProps } from './ComboboxContentImpl.vue'\n\nexport type ComboboxContentEmits = ComboboxContentImplEmits\nexport interface ComboboxContentProps extends ComboboxContentImplProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { useForwardExpose, useForwardPropsEmits, useId } from '@/shared'\nimport ComboboxContentImpl from './ComboboxContentImpl.vue'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nconst props = defineProps<ComboboxContentProps>()\nconst emits = defineEmits<ComboboxContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\nconst { forwardRef } = useForwardExpose()\n\nconst rootContext = injectComboboxRootContext()\n\nrootContext.contentId ||= useId(undefined, 'reka-combobox-content')\n</script>\n\n<template>\n  <Presence :present=\"forceMount || rootContext.open.value\">\n    <ComboboxContentImpl\n      v-bind=\"{ ...forwarded, ...$attrs }\"\n      :ref=\"forwardRef\"\n    >\n      <slot />\n    </ComboboxContentImpl>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { ComboboxContentImplEmits, ComboboxContentImplProps } from './ComboboxContentImpl.vue'\n\nexport type ComboboxContentEmits = ComboboxContentImplEmits\nexport interface ComboboxContentProps extends ComboboxContentImplProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { useForwardExpose, useForwardPropsEmits, useId } from '@/shared'\nimport ComboboxContentImpl from './ComboboxContentImpl.vue'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nconst props = defineProps<ComboboxContentProps>()\nconst emits = defineEmits<ComboboxContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\nconst { forwardRef } = useForwardExpose()\n\nconst rootContext = injectComboboxRootContext()\n\nrootContext.contentId ||= useId(undefined, 'reka-combobox-content')\n</script>\n\n<template>\n  <Presence :present=\"forceMount || rootContext.open.value\">\n    <ComboboxContentImpl\n      v-bind=\"{ ...forwarded, ...$attrs }\"\n      :ref=\"forwardRef\"\n    >\n      <slot />\n    </ComboboxContentImpl>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed } from 'vue'\n\nexport interface ComboboxEmptyProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nconst props = defineProps<ComboboxEmptyProps>()\nconst rootContext = injectComboboxRootContext()\n\nconst isRender = computed(() => rootContext.ignoreFilter.value\n  ? rootContext.allItems.value.size === 0\n  : rootContext.filterState.value.count === 0,\n)\n</script>\n\n<template>\n  <Primitive\n    v-if=\"isRender\"\n    v-bind=\"props\"\n  >\n    <slot>No options</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed } from 'vue'\n\nexport interface ComboboxEmptyProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nconst props = defineProps<ComboboxEmptyProps>()\nconst rootContext = injectComboboxRootContext()\n\nconst isRender = computed(() => rootContext.ignoreFilter.value\n  ? rootContext.allItems.value.size === 0\n  : rootContext.filterState.value.count === 0,\n)\n</script>\n\n<template>\n  <Primitive\n    v-if=\"isRender\"\n    v-bind=\"props\"\n  >\n    <slot>No options</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { ListboxGroupProps } from '@/Listbox'\nimport { computed, onMounted, onUnmounted } from 'vue'\nimport { createContext, useId } from '@/shared'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nexport interface ComboboxGroupProps extends ListboxGroupProps {}\n\ntype ComboboxGroupContext = {\n  id: string\n  labelId: string\n}\n\nexport const [injectComboboxGroupContext, provideComboboxGroupContext]\n  = createContext<ComboboxGroupContext>('ComboboxGroup')\n</script>\n\n<script setup lang=\"ts\">\nimport { ListboxGroup } from '@/Listbox'\n\nconst props = defineProps<ComboboxGroupProps>()\nconst id = useId(undefined, 'reka-combobox-group')\nconst rootContext = injectComboboxRootContext()\n\nconst isRender = computed(() => rootContext.ignoreFilter.value ? true : !rootContext.filterSearch.value ? true : rootContext.filterState.value.groups.has(id))\n\nconst context = provideComboboxGroupContext({\n  id,\n  labelId: '',\n})\n\nonMounted(() => {\n  if (!rootContext.allGroups.value.has(id))\n    rootContext.allGroups.value.set(id, new Set())\n})\nonUnmounted(() => {\n  rootContext.allGroups.value.delete(id)\n})\n</script>\n\n<template>\n  <ListboxGroup\n    :id=\"id\"\n    :aria-labelledby=\"context.labelId\"\n    v-bind=\"props\"\n    :hidden=\"isRender ? undefined : true\"\n  >\n    <slot />\n  </ListboxGroup>\n</template>\n","<script lang=\"ts\">\nimport type { ListboxGroupProps } from '@/Listbox'\nimport { computed, onMounted, onUnmounted } from 'vue'\nimport { createContext, useId } from '@/shared'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nexport interface ComboboxGroupProps extends ListboxGroupProps {}\n\ntype ComboboxGroupContext = {\n  id: string\n  labelId: string\n}\n\nexport const [injectComboboxGroupContext, provideComboboxGroupContext]\n  = createContext<ComboboxGroupContext>('ComboboxGroup')\n</script>\n\n<script setup lang=\"ts\">\nimport { ListboxGroup } from '@/Listbox'\n\nconst props = defineProps<ComboboxGroupProps>()\nconst id = useId(undefined, 'reka-combobox-group')\nconst rootContext = injectComboboxRootContext()\n\nconst isRender = computed(() => rootContext.ignoreFilter.value ? true : !rootContext.filterSearch.value ? true : rootContext.filterState.value.groups.has(id))\n\nconst context = provideComboboxGroupContext({\n  id,\n  labelId: '',\n})\n\nonMounted(() => {\n  if (!rootContext.allGroups.value.has(id))\n    rootContext.allGroups.value.set(id, new Set())\n})\nonUnmounted(() => {\n  rootContext.allGroups.value.delete(id)\n})\n</script>\n\n<template>\n  <ListboxGroup\n    :id=\"id\"\n    :aria-labelledby=\"context.labelId\"\n    v-bind=\"props\"\n    :hidden=\"isRender ? undefined : true\"\n  >\n    <slot />\n  </ListboxGroup>\n</template>\n","<script lang=\"ts\">\nimport type { ListboxFilterEmits, ListboxFilterProps } from '@/Listbox'\nimport { useVModel } from '@vueuse/core'\nimport { nextTick, onMounted, watch } from 'vue'\nimport { usePrimitiveElement } from '@/Primitive'\nimport { useComposing } from '@/shared'\n\nexport type ComboboxInputEmits = ListboxFilterEmits\nexport interface ComboboxInputProps extends ListboxFilterProps {\n  /** The display value of input for selected item. Does not work with `multiple`. */\n  displayValue?: (val: any) => string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { ListboxFilter } from '@/Listbox'\nimport { injectListboxRootContext } from '@/Listbox/ListboxRoot.vue'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nconst props = withDefaults(defineProps<ComboboxInputProps>(), {\n  as: 'input',\n})\nconst emits = defineEmits<ComboboxInputEmits>()\n\nconst rootContext = injectComboboxRootContext()\nconst listboxContext = injectListboxRootContext()\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  passive: (props.modelValue === undefined) as false,\n})\n\nonMounted(() => {\n  if (currentElement.value)\n    rootContext.onInputElementChange(currentElement.value as HTMLInputElement)\n})\n\nconst { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing((event) => {\n  const el = event.target as HTMLInputElement\n  if (el)\n    processInputValue(el.value)\n})\n\nfunction handleKeyDown(ev: KeyboardEvent) {\n  // Don't swallow arrow keys mid-composition, they're used for IME candidate navigation\n  if (isComposing.value)\n    return\n  ev.preventDefault()\n  if (!rootContext.open.value)\n    rootContext.onOpenChange(true)\n}\n\nfunction processInputValue(value: string) {\n  if (!rootContext.open.value) {\n    rootContext.onOpenChange(true)\n    nextTick(() => {\n      if (value) {\n        rootContext.filterSearch.value = value\n        listboxContext.highlightFirstItem()\n      }\n    })\n  }\n  else {\n    rootContext.filterSearch.value = value\n  }\n}\n\nfunction handleInput(event: InputEvent) {\n  if (isComposing.value)\n    return\n  processInputValue((event.target as HTMLInputElement).value)\n}\n\nfunction handleFocus() {\n  if (rootContext.openOnFocus.value && !rootContext.open.value)\n    rootContext.onOpenChange(true)\n}\n\nfunction handleBlur(ev: FocusEvent) {\n  if (!rootContext.open.value)\n    return\n\n  const nextFocus = ev.relatedTarget as Element | null\n\n  // If focus moves to nothing (e.g. click on non-focusable area), let DismissableLayer handle it\n  if (!nextFocus)\n    return\n\n  const isInsideRoot = rootContext.parentElement.value?.contains(nextFocus)\n  const isInsideContent = document.getElementById(rootContext.contentId)?.contains(nextFocus)\n\n  if (!isInsideRoot && !isInsideContent) {\n    // Delay to let FocusScope's focus-restoration (handleFocusOut) run first.\n    // Without this, closing fires before FocusScope can pull focus back inside,\n    // causing a second combobox to immediately close when switching between two.\n    requestAnimationFrame(() => {\n      if (!rootContext.open.value)\n        return\n      const active = document.activeElement\n      const isStillOutside = !rootContext.parentElement.value?.contains(active)\n        && !document.getElementById(rootContext.contentId)?.contains(active)\n      if (isStillOutside) {\n        rootContext.onOpenChange(false)\n      }\n    })\n  }\n}\n\nfunction handleClick() {\n  if (rootContext.openOnClick.value && !rootContext.open.value)\n    rootContext.onOpenChange(true)\n}\n\nfunction resetSearchTerm() {\n  const rootModelValue = rootContext.modelValue.value\n\n  if (props.displayValue) {\n    modelValue.value = props.displayValue(rootModelValue)\n  }\n  else if (!rootContext.multiple.value && rootModelValue && !Array.isArray(rootModelValue)) {\n    if (typeof rootModelValue !== 'object')\n      modelValue.value = rootModelValue.toString()\n    else modelValue.value = ''\n  }\n  else {\n    modelValue.value = ''\n  }\n\n  nextTick(() => {\n    // Temporary force reassign\n    // eslint-disable-next-line no-self-assign\n    modelValue.value = modelValue.value\n  })\n}\n\nrootContext.onResetSearchTerm(() => {\n  resetSearchTerm()\n})\n\nwatch(rootContext.modelValue, async () => {\n  if (!rootContext.isUserInputted.value && rootContext.resetSearchTermOnSelect.value)\n    resetSearchTerm()\n}, { immediate: true, deep: true })\n\nwatch(rootContext.filterState, (_newValue, oldValue) => {\n  // we exclude virtualized list as the state would be constantly updated,\n  // and only change highlight when previously there were no items displayed\n  if (!rootContext.isVirtual.value && (oldValue.count === 0)) {\n    listboxContext.highlightFirstItem()\n  }\n})\n</script>\n\n<template>\n  <ListboxFilter\n    ref=\"primitiveElement\"\n    v-model=\"modelValue\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :auto-focus=\"autoFocus\"\n    :disabled=\"disabled\"\n    :aria-expanded=\"rootContext.open.value\"\n    :aria-controls=\"rootContext.contentId\"\n    aria-autocomplete=\"list\"\n    role=\"combobox\"\n    autocomplete=\"off\"\n    @click=\"handleClick\"\n    @input=\"handleInput\"\n    @keydown.down.up=\"handleKeyDown\"\n    @focus=\"handleFocus\"\n    @blur=\"handleBlur\"\n    @compositionstart=\"handleCompositionStart\"\n    @compositionend=\"handleCompositionEnd\"\n  >\n    <slot />\n  </ListboxFilter>\n</template>\n","<script lang=\"ts\">\nimport type { ListboxFilterEmits, ListboxFilterProps } from '@/Listbox'\nimport { useVModel } from '@vueuse/core'\nimport { nextTick, onMounted, watch } from 'vue'\nimport { usePrimitiveElement } from '@/Primitive'\nimport { useComposing } from '@/shared'\n\nexport type ComboboxInputEmits = ListboxFilterEmits\nexport interface ComboboxInputProps extends ListboxFilterProps {\n  /** The display value of input for selected item. Does not work with `multiple`. */\n  displayValue?: (val: any) => string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { ListboxFilter } from '@/Listbox'\nimport { injectListboxRootContext } from '@/Listbox/ListboxRoot.vue'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nconst props = withDefaults(defineProps<ComboboxInputProps>(), {\n  as: 'input',\n})\nconst emits = defineEmits<ComboboxInputEmits>()\n\nconst rootContext = injectComboboxRootContext()\nconst listboxContext = injectListboxRootContext()\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  passive: (props.modelValue === undefined) as false,\n})\n\nonMounted(() => {\n  if (currentElement.value)\n    rootContext.onInputElementChange(currentElement.value as HTMLInputElement)\n})\n\nconst { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing((event) => {\n  const el = event.target as HTMLInputElement\n  if (el)\n    processInputValue(el.value)\n})\n\nfunction handleKeyDown(ev: KeyboardEvent) {\n  // Don't swallow arrow keys mid-composition, they're used for IME candidate navigation\n  if (isComposing.value)\n    return\n  ev.preventDefault()\n  if (!rootContext.open.value)\n    rootContext.onOpenChange(true)\n}\n\nfunction processInputValue(value: string) {\n  if (!rootContext.open.value) {\n    rootContext.onOpenChange(true)\n    nextTick(() => {\n      if (value) {\n        rootContext.filterSearch.value = value\n        listboxContext.highlightFirstItem()\n      }\n    })\n  }\n  else {\n    rootContext.filterSearch.value = value\n  }\n}\n\nfunction handleInput(event: InputEvent) {\n  if (isComposing.value)\n    return\n  processInputValue((event.target as HTMLInputElement).value)\n}\n\nfunction handleFocus() {\n  if (rootContext.openOnFocus.value && !rootContext.open.value)\n    rootContext.onOpenChange(true)\n}\n\nfunction handleBlur(ev: FocusEvent) {\n  if (!rootContext.open.value)\n    return\n\n  const nextFocus = ev.relatedTarget as Element | null\n\n  // If focus moves to nothing (e.g. click on non-focusable area), let DismissableLayer handle it\n  if (!nextFocus)\n    return\n\n  const isInsideRoot = rootContext.parentElement.value?.contains(nextFocus)\n  const isInsideContent = document.getElementById(rootContext.contentId)?.contains(nextFocus)\n\n  if (!isInsideRoot && !isInsideContent) {\n    // Delay to let FocusScope's focus-restoration (handleFocusOut) run first.\n    // Without this, closing fires before FocusScope can pull focus back inside,\n    // causing a second combobox to immediately close when switching between two.\n    requestAnimationFrame(() => {\n      if (!rootContext.open.value)\n        return\n      const active = document.activeElement\n      const isStillOutside = !rootContext.parentElement.value?.contains(active)\n        && !document.getElementById(rootContext.contentId)?.contains(active)\n      if (isStillOutside) {\n        rootContext.onOpenChange(false)\n      }\n    })\n  }\n}\n\nfunction handleClick() {\n  if (rootContext.openOnClick.value && !rootContext.open.value)\n    rootContext.onOpenChange(true)\n}\n\nfunction resetSearchTerm() {\n  const rootModelValue = rootContext.modelValue.value\n\n  if (props.displayValue) {\n    modelValue.value = props.displayValue(rootModelValue)\n  }\n  else if (!rootContext.multiple.value && rootModelValue && !Array.isArray(rootModelValue)) {\n    if (typeof rootModelValue !== 'object')\n      modelValue.value = rootModelValue.toString()\n    else modelValue.value = ''\n  }\n  else {\n    modelValue.value = ''\n  }\n\n  nextTick(() => {\n    // Temporary force reassign\n    // eslint-disable-next-line no-self-assign\n    modelValue.value = modelValue.value\n  })\n}\n\nrootContext.onResetSearchTerm(() => {\n  resetSearchTerm()\n})\n\nwatch(rootContext.modelValue, async () => {\n  if (!rootContext.isUserInputted.value && rootContext.resetSearchTermOnSelect.value)\n    resetSearchTerm()\n}, { immediate: true, deep: true })\n\nwatch(rootContext.filterState, (_newValue, oldValue) => {\n  // we exclude virtualized list as the state would be constantly updated,\n  // and only change highlight when previously there were no items displayed\n  if (!rootContext.isVirtual.value && (oldValue.count === 0)) {\n    listboxContext.highlightFirstItem()\n  }\n})\n</script>\n\n<template>\n  <ListboxFilter\n    ref=\"primitiveElement\"\n    v-model=\"modelValue\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :auto-focus=\"autoFocus\"\n    :disabled=\"disabled\"\n    :aria-expanded=\"rootContext.open.value\"\n    :aria-controls=\"rootContext.contentId\"\n    aria-autocomplete=\"list\"\n    role=\"combobox\"\n    autocomplete=\"off\"\n    @click=\"handleClick\"\n    @input=\"handleInput\"\n    @keydown.down.up=\"handleKeyDown\"\n    @focus=\"handleFocus\"\n    @blur=\"handleBlur\"\n    @compositionstart=\"handleCompositionStart\"\n    @compositionend=\"handleCompositionEnd\"\n  >\n    <slot />\n  </ListboxFilter>\n</template>\n","<script lang=\"ts\">\nimport type { ListboxItemEmits, ListboxItemProps } from '@/Listbox'\nimport type { AcceptableValue } from '@/shared/types'\nimport { computed, onMounted, onUnmounted } from 'vue'\nimport { usePrimitiveElement } from '@/Primitive'\nimport { useId } from '@/shared'\nimport { injectComboboxGroupContext } from './ComboboxGroup.vue'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nexport { injectListboxItemContext as injectComboboxItemContext } from '@/Listbox'\n\nexport type ComboboxItemEmits<T = AcceptableValue> = ListboxItemEmits<T>\nexport interface ComboboxItemProps<T = AcceptableValue> extends ListboxItemProps<T> {\n  /**\n   * A string representation of the item contents.\n   *\n   * If the children are not plain text, then the `textValue` prop must also be set to a plain text representation, which will be used for autocomplete in the ComboBox.\n   */\n  textValue?: string\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableValue = AcceptableValue\">\nimport { ListboxItem } from '@/Listbox'\n\nconst props = defineProps<ComboboxItemProps<T>>()\nconst emits = defineEmits<ComboboxItemEmits<T>>()\n\nconst id = useId(undefined, 'reka-combobox-item')\nconst rootContext = injectComboboxRootContext()\nconst groupContext = injectComboboxGroupContext(null)\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nif (props.value === '') {\n  throw new Error(\n    'A <ComboboxItem /> must have a value prop that is not an empty string. This is because the Combobox value can be set to an empty string to clear the selection and show the placeholder.',\n  )\n}\n\nconst isRender = computed(() => {\n  if (rootContext.isVirtual.value || rootContext.ignoreFilter.value || !rootContext.filterSearch.value) {\n    return true\n  }\n  else {\n    const filteredCurrentItem = rootContext.filterState.value.items.get(id)\n    // If the filtered items is undefined means not in the all times map yet\n    // Do the first render to add into the map\n    if (filteredCurrentItem === undefined) {\n      return true\n    }\n\n    // Check with filter\n    return filteredCurrentItem > 0\n  }\n})\n\nonMounted(() => {\n  // textValue to perform filter\n  rootContext.allItems.value.set(id, props.textValue || currentElement.value.textContent || currentElement.value.innerText)\n\n  const groupId = groupContext?.id\n  if (groupId) {\n    if (!rootContext.allGroups.value.has(groupId)) {\n      rootContext.allGroups.value.set(groupId, new Set([id]))\n    }\n    else {\n      rootContext.allGroups.value.get(groupId)?.add(id)\n    }\n  }\n})\nonUnmounted(() => {\n  rootContext.allItems.value.delete(id)\n})\n</script>\n\n<template>\n  <ListboxItem\n    v-if=\"isRender\"\n    v-bind=\"props\"\n    :id=\"id\"\n    ref=\"primitiveElement\"\n    :disabled=\"rootContext.disabled.value || disabled\"\n    @select=\"(event) => {\n      emits('select', event as any)\n      if (event.defaultPrevented)\n        return\n\n      if (!rootContext.multiple.value && !disabled && !rootContext.disabled.value) {\n        event.preventDefault()\n        rootContext.onOpenChange(false)\n        rootContext.modelValue.value = props.value\n      }\n      else if (rootContext.multiple.value) {\n        rootContext.inputElement.value?.focus()\n      }\n    }\"\n  >\n    <slot>{{ value }}</slot>\n  </ListboxItem>\n</template>\n","<script lang=\"ts\">\nimport type { ListboxItemEmits, ListboxItemProps } from '@/Listbox'\nimport type { AcceptableValue } from '@/shared/types'\nimport { computed, onMounted, onUnmounted } from 'vue'\nimport { usePrimitiveElement } from '@/Primitive'\nimport { useId } from '@/shared'\nimport { injectComboboxGroupContext } from './ComboboxGroup.vue'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nexport { injectListboxItemContext as injectComboboxItemContext } from '@/Listbox'\n\nexport type ComboboxItemEmits<T = AcceptableValue> = ListboxItemEmits<T>\nexport interface ComboboxItemProps<T = AcceptableValue> extends ListboxItemProps<T> {\n  /**\n   * A string representation of the item contents.\n   *\n   * If the children are not plain text, then the `textValue` prop must also be set to a plain text representation, which will be used for autocomplete in the ComboBox.\n   */\n  textValue?: string\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableValue = AcceptableValue\">\nimport { ListboxItem } from '@/Listbox'\n\nconst props = defineProps<ComboboxItemProps<T>>()\nconst emits = defineEmits<ComboboxItemEmits<T>>()\n\nconst id = useId(undefined, 'reka-combobox-item')\nconst rootContext = injectComboboxRootContext()\nconst groupContext = injectComboboxGroupContext(null)\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nif (props.value === '') {\n  throw new Error(\n    'A <ComboboxItem /> must have a value prop that is not an empty string. This is because the Combobox value can be set to an empty string to clear the selection and show the placeholder.',\n  )\n}\n\nconst isRender = computed(() => {\n  if (rootContext.isVirtual.value || rootContext.ignoreFilter.value || !rootContext.filterSearch.value) {\n    return true\n  }\n  else {\n    const filteredCurrentItem = rootContext.filterState.value.items.get(id)\n    // If the filtered items is undefined means not in the all times map yet\n    // Do the first render to add into the map\n    if (filteredCurrentItem === undefined) {\n      return true\n    }\n\n    // Check with filter\n    return filteredCurrentItem > 0\n  }\n})\n\nonMounted(() => {\n  // textValue to perform filter\n  rootContext.allItems.value.set(id, props.textValue || currentElement.value.textContent || currentElement.value.innerText)\n\n  const groupId = groupContext?.id\n  if (groupId) {\n    if (!rootContext.allGroups.value.has(groupId)) {\n      rootContext.allGroups.value.set(groupId, new Set([id]))\n    }\n    else {\n      rootContext.allGroups.value.get(groupId)?.add(id)\n    }\n  }\n})\nonUnmounted(() => {\n  rootContext.allItems.value.delete(id)\n})\n</script>\n\n<template>\n  <ListboxItem\n    v-if=\"isRender\"\n    v-bind=\"props\"\n    :id=\"id\"\n    ref=\"primitiveElement\"\n    :disabled=\"rootContext.disabled.value || disabled\"\n    @select=\"(event) => {\n      emits('select', event as any)\n      if (event.defaultPrevented)\n        return\n\n      if (!rootContext.multiple.value && !disabled && !rootContext.disabled.value) {\n        event.preventDefault()\n        rootContext.onOpenChange(false)\n        rootContext.modelValue.value = props.value\n      }\n      else if (rootContext.multiple.value) {\n        rootContext.inputElement.value?.focus()\n      }\n    }\"\n  >\n    <slot>{{ value }}</slot>\n  </ListboxItem>\n</template>\n","<script lang=\"ts\">\nimport type { ListboxItemIndicatorProps } from '@/Listbox'\n\nexport interface ComboboxItemIndicatorProps extends ListboxItemIndicatorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ListboxItemIndicator } from '@/Listbox'\n\nconst props = withDefaults(defineProps<ComboboxItemIndicatorProps>(), {\n  as: 'span',\n})\n</script>\n\n<template>\n  <ListboxItemIndicator\n    v-bind=\"props\"\n  >\n    <slot />\n  </ListboxItemIndicator>\n</template>\n","<script lang=\"ts\">\nimport type { ListboxItemIndicatorProps } from '@/Listbox'\n\nexport interface ComboboxItemIndicatorProps extends ListboxItemIndicatorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ListboxItemIndicator } from '@/Listbox'\n\nconst props = withDefaults(defineProps<ComboboxItemIndicatorProps>(), {\n  as: 'span',\n})\n</script>\n\n<template>\n  <ListboxItemIndicator\n    v-bind=\"props\"\n  >\n    <slot />\n  </ListboxItemIndicator>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ComboboxLabelProps extends PrimitiveProps {\n  for?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose, useId } from '@/shared'\nimport { injectComboboxGroupContext } from './ComboboxGroup.vue'\n\nconst props = withDefaults(defineProps<ComboboxLabelProps>(), {\n  as: 'div',\n})\n\nuseForwardExpose()\nconst groupContext = injectComboboxGroupContext({ id: '', labelId: '' })\n\ngroupContext.labelId ||= useId(undefined, 'reka-combobox-group-label')\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"groupContext.labelId\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ComboboxLabelProps extends PrimitiveProps {\n  for?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose, useId } from '@/shared'\nimport { injectComboboxGroupContext } from './ComboboxGroup.vue'\n\nconst props = withDefaults(defineProps<ComboboxLabelProps>(), {\n  as: 'div',\n})\n\nuseForwardExpose()\nconst groupContext = injectComboboxGroupContext({ id: '', labelId: '' })\n\ngroupContext.labelId ||= useId(undefined, 'reka-combobox-group-label')\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"groupContext.labelId\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface ComboboxPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<ComboboxPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface ComboboxPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<ComboboxPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ComboboxSeparatorProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<ComboboxSeparatorProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-hidden=\"true\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ComboboxSeparatorProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<ComboboxSeparatorProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-hidden=\"true\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ComboboxTriggerProps extends PrimitiveProps {\n  /** When `true`, prevents the user from interacting with item */\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nconst props = withDefaults(defineProps<ComboboxTriggerProps>(), {\n  as: 'button',\n})\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst rootContext = injectComboboxRootContext()\nconst disabled = computed(() => props.disabled || rootContext.disabled.value || false)\n\nonMounted(() => {\n  if (currentElement.value)\n    rootContext.onTriggerElementChange(currentElement.value)\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :ref=\"forwardRef\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    tabindex=\"-1\"\n    aria-label=\"Show popup\"\n    aria-haspopup=\"listbox\"\n    :aria-expanded=\"rootContext.open.value\"\n    :aria-controls=\"rootContext.contentId\"\n    :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n    :disabled=\"disabled\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :aria-disabled=\"disabled ?? undefined\"\n    @click=\"rootContext.onOpenChange(!rootContext.open.value)\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ComboboxTriggerProps extends PrimitiveProps {\n  /** When `true`, prevents the user from interacting with item */\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nconst props = withDefaults(defineProps<ComboboxTriggerProps>(), {\n  as: 'button',\n})\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst rootContext = injectComboboxRootContext()\nconst disabled = computed(() => props.disabled || rootContext.disabled.value || false)\n\nonMounted(() => {\n  if (currentElement.value)\n    rootContext.onTriggerElementChange(currentElement.value)\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :ref=\"forwardRef\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    tabindex=\"-1\"\n    aria-label=\"Show popup\"\n    aria-haspopup=\"listbox\"\n    :aria-expanded=\"rootContext.open.value\"\n    :aria-controls=\"rootContext.contentId\"\n    :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n    :disabled=\"disabled\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :aria-disabled=\"disabled ?? undefined\"\n    @click=\"rootContext.onOpenChange(!rootContext.open.value)\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","import type { Ref } from 'vue'\nimport { computed, ref } from 'vue'\nimport { injectConfigProviderContext } from '@/ConfigProvider/ConfigProvider.vue'\n\nexport function useNonce(nonce?: Ref<string | undefined>) {\n  const context = injectConfigProviderContext({\n    nonce: ref(),\n  })\n  return computed(() => nonce?.value || context.nonce?.value)\n}\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { toRefs } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport { useNonce } from '@/shared/useNonce'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nexport interface ComboboxViewportProps extends PrimitiveProps {\n  /**\n   * Will add `nonce` attribute to the style tag which can be used by Content Security Policy. <br> If omitted, inherits globally from `ConfigProvider`.\n   */\n  nonce?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<ComboboxViewportProps>()\nconst { forwardRef } = useForwardExpose()\n\nconst { nonce: propNonce } = toRefs(props)\nconst nonce = useNonce(propNonce)\n\nconst rootContext = injectComboboxRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"{ ...$attrs, ...props }\"\n    :ref=\"forwardRef\"\n    data-reka-combobox-viewport\n    role=\"presentation\"\n    :style=\"{\n      // we use position: 'relative' here on the `viewport` so that when we call\n      // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport\n      // (independent of the scrollUpButton).\n      position: 'relative',\n      flex: rootContext.isVirtual.value ? undefined : 1,\n      overflow: 'auto',\n    }\"\n  >\n    <slot />\n  </Primitive>\n  <Primitive\n    as=\"style\"\n    :nonce=\"nonce\"\n  >\n    /* Hide scrollbars cross-browser and enable momentum scroll for touch\n    devices */ [data-reka-combobox-viewport] { scrollbar-width:none; -ms-overflow-style: none;\n    -webkit-overflow-scrolling: touch; }\n    [data-reka-combobox-viewport]::-webkit-scrollbar { display: none; }\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { toRefs } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport { useNonce } from '@/shared/useNonce'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nexport interface ComboboxViewportProps extends PrimitiveProps {\n  /**\n   * Will add `nonce` attribute to the style tag which can be used by Content Security Policy. <br> If omitted, inherits globally from `ConfigProvider`.\n   */\n  nonce?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<ComboboxViewportProps>()\nconst { forwardRef } = useForwardExpose()\n\nconst { nonce: propNonce } = toRefs(props)\nconst nonce = useNonce(propNonce)\n\nconst rootContext = injectComboboxRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"{ ...$attrs, ...props }\"\n    :ref=\"forwardRef\"\n    data-reka-combobox-viewport\n    role=\"presentation\"\n    :style=\"{\n      // we use position: 'relative' here on the `viewport` so that when we call\n      // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport\n      // (independent of the scrollUpButton).\n      position: 'relative',\n      flex: rootContext.isVirtual.value ? undefined : 1,\n      overflow: 'auto',\n    }\"\n  >\n    <slot />\n  </Primitive>\n  <Primitive\n    as=\"style\"\n    :nonce=\"nonce\"\n  >\n    /* Hide scrollbars cross-browser and enable momentum scroll for touch\n    devices */ [data-reka-combobox-viewport] { scrollbar-width:none; -ms-overflow-style: none;\n    -webkit-overflow-scrolling: touch; }\n    [data-reka-combobox-viewport]::-webkit-scrollbar { display: none; }\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nexport interface ComboboxVirtualizerProps<T extends AcceptableValue = AcceptableValue> extends ListboxVirtualizerProps<T> {}\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableValue = AcceptableValue\">\nimport type { VirtualItem, Virtualizer } from '@tanstack/vue-virtual'\nimport type { ListboxVirtualizerProps } from '@/Listbox/ListboxVirtualizer.vue'\nimport type { AcceptableValue } from '@/shared/types'\nimport ListboxVirtualizer from '@/Listbox/ListboxVirtualizer.vue'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nconst props = defineProps<ComboboxVirtualizerProps<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    option: T\n    virtualizer: Virtualizer<HTMLElement, Element>\n    virtualItem: VirtualItem\n  }) => any\n}>()\n\nconst rootContext = injectComboboxRootContext()\n// set virtual true when this component mounted\nrootContext.isVirtual.value = true\n</script>\n\n<template>\n  <ListboxVirtualizer\n    v-slot=\"slotProps\"\n    v-bind=\"props\"\n  >\n    <slot v-bind=\"slotProps\" />\n  </ListboxVirtualizer>\n</template>\n","<script lang=\"ts\">\nexport interface ComboboxVirtualizerProps<T extends AcceptableValue = AcceptableValue> extends ListboxVirtualizerProps<T> {}\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableValue = AcceptableValue\">\nimport type { VirtualItem, Virtualizer } from '@tanstack/vue-virtual'\nimport type { ListboxVirtualizerProps } from '@/Listbox/ListboxVirtualizer.vue'\nimport type { AcceptableValue } from '@/shared/types'\nimport ListboxVirtualizer from '@/Listbox/ListboxVirtualizer.vue'\nimport { injectComboboxRootContext } from './ComboboxRoot.vue'\n\nconst props = defineProps<ComboboxVirtualizerProps<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    option: T\n    virtualizer: Virtualizer<HTMLElement, Element>\n    virtualItem: VirtualItem\n  }) => any\n}>()\n\nconst rootContext = injectComboboxRootContext()\n// set virtual true when this component mounted\nrootContext.isVirtual.value = true\n</script>\n\n<template>\n  <ListboxVirtualizer\n    v-slot=\"slotProps\"\n    v-bind=\"props\"\n  >\n    <slot v-bind=\"slotProps\" />\n  </ListboxVirtualizer>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { ImageLoadingStatus } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useForwardExpose } from '@/shared'\n\nexport interface AvatarRootProps extends PrimitiveProps {}\n\nexport type AvatarRootContext = {\n  imageLoadingStatus: Ref<ImageLoadingStatus>\n}\n\nexport const [injectAvatarRootContext, provideAvatarRootContext]\n  = createContext<AvatarRootContext>('AvatarRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { Primitive } from '@/Primitive'\n\nwithDefaults(defineProps<AvatarRootProps>(), {\n  as: 'span',\n})\n\nuseForwardExpose()\n\nprovideAvatarRootContext({\n  imageLoadingStatus: ref<ImageLoadingStatus>('idle'),\n})\n</script>\n\n<template>\n  <Primitive\n    :as-child=\"asChild\"\n    :as=\"as\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { ImageLoadingStatus } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useForwardExpose } from '@/shared'\n\nexport interface AvatarRootProps extends PrimitiveProps {}\n\nexport type AvatarRootContext = {\n  imageLoadingStatus: Ref<ImageLoadingStatus>\n}\n\nexport const [injectAvatarRootContext, provideAvatarRootContext]\n  = createContext<AvatarRootContext>('AvatarRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { Primitive } from '@/Primitive'\n\nwithDefaults(defineProps<AvatarRootProps>(), {\n  as: 'span',\n})\n\nuseForwardExpose()\n\nprovideAvatarRootContext({\n  imageLoadingStatus: ref<ImageLoadingStatus>('idle'),\n})\n</script>\n\n<template>\n  <Primitive\n    :as-child=\"asChild\"\n    :as=\"as\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { isClient } from '@vueuse/shared'\nimport { useForwardExpose } from '@/shared'\n\nexport interface AvatarFallbackProps extends PrimitiveProps {\n  /** Useful for delaying rendering so it only appears for those with slower connections. */\n  delayMs?: number\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { ref, watchEffect } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectAvatarRootContext } from './AvatarRoot.vue'\n\nconst props = withDefaults(defineProps<AvatarFallbackProps>(), {\n  as: 'span',\n})\n\nconst rootContext = injectAvatarRootContext()\nuseForwardExpose()\n\nconst canRender = ref(props.delayMs === undefined)\n\nwatchEffect((onCleanup) => {\n  if (props.delayMs && isClient) {\n    const timerId = window.setTimeout(() => {\n      canRender.value = true\n    }, props.delayMs)\n\n    onCleanup(() => {\n      window.clearTimeout(timerId)\n    })\n  }\n})\n</script>\n\n<template>\n  <Primitive\n    v-if=\"canRender && rootContext.imageLoadingStatus.value !== 'loaded'\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { isClient } from '@vueuse/shared'\nimport { useForwardExpose } from '@/shared'\n\nexport interface AvatarFallbackProps extends PrimitiveProps {\n  /** Useful for delaying rendering so it only appears for those with slower connections. */\n  delayMs?: number\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { ref, watchEffect } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectAvatarRootContext } from './AvatarRoot.vue'\n\nconst props = withDefaults(defineProps<AvatarFallbackProps>(), {\n  as: 'span',\n})\n\nconst rootContext = injectAvatarRootContext()\nuseForwardExpose()\n\nconst canRender = ref(props.delayMs === undefined)\n\nwatchEffect((onCleanup) => {\n  if (props.delayMs && isClient) {\n    const timerId = window.setTimeout(() => {\n      canRender.value = true\n    }, props.delayMs)\n\n    onCleanup(() => {\n      window.clearTimeout(timerId)\n    })\n  }\n})\n</script>\n\n<template>\n  <Primitive\n    v-if=\"canRender && rootContext.imageLoadingStatus.value !== 'loaded'\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","import type { ImgHTMLAttributes, Ref } from 'vue'\nimport { isClient } from '@vueuse/shared'\nimport { computed, onMounted, onUnmounted, ref, watchEffect } from 'vue'\n\nexport type ImageLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error'\n\nfunction resolveLoadingStatus(image: HTMLImageElement | null, src?: string): ImageLoadingStatus {\n  if (!image) {\n    return 'idle'\n  }\n  if (!src) {\n    return 'error'\n  }\n  if (image.src !== src) {\n    image.src = src\n  }\n  return image.complete && image.naturalWidth > 0 ? 'loaded' : 'loading'\n}\n\nexport function useImageLoadingStatus(src: Ref<string>, { referrerPolicy, crossOrigin }: { referrerPolicy?: Ref<ImgHTMLAttributes['referrerpolicy']>, crossOrigin?: Ref<ImgHTMLAttributes['crossorigin']> } = {}) {\n  const isMounted = ref(false)\n  const imageRef = ref<HTMLImageElement | null>(null)\n  const image = computed(() => {\n    if (!isMounted.value) {\n      return null\n    }\n    if (!imageRef.value && isClient) {\n      imageRef.value = new window.Image()\n    }\n    return imageRef.value\n  })\n\n  const loadingStatus = ref<ImageLoadingStatus>(resolveLoadingStatus(image.value, src.value))\n\n  const updateStatus = (status: ImageLoadingStatus) => () => {\n    if (isMounted.value)\n      loadingStatus.value = status\n  }\n\n  onMounted(() => {\n    isMounted.value = true\n\n    watchEffect((onCleanup) => {\n      const img = image.value\n      if (!img)\n        return\n\n      loadingStatus.value = resolveLoadingStatus(img, src.value)\n\n      const handleLoad = updateStatus('loaded')\n      const handleError = updateStatus('error')\n\n      img.addEventListener('load', handleLoad)\n      img.addEventListener('error', handleError)\n\n      if (referrerPolicy?.value)\n        img.referrerPolicy = referrerPolicy.value\n      if (typeof crossOrigin?.value === 'string')\n        img.crossOrigin = crossOrigin.value\n\n      onCleanup(() => {\n        img.removeEventListener('load', handleLoad)\n        img.removeEventListener('error', handleError)\n      })\n    })\n  })\n\n  onUnmounted(() => {\n    isMounted.value = false\n  })\n\n  return loadingStatus\n}\n","<script lang=\"ts\">\nimport type { ImageLoadingStatus } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport type AvatarImageEmits = {\n  /**\n   * A callback providing information about the loading status of the image. <br>\n   * This is useful in case you want to control more precisely what to render as the image is loading.\n   */\n  loadingStatusChange: [value: ImageLoadingStatus]\n}\nexport interface AvatarImageProps extends PrimitiveProps {\n  src: string\n  referrerPolicy?: ImgHTMLAttributes['referrerpolicy']\n  crossOrigin?: ImgHTMLAttributes['crossorigin']\n}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ImgHTMLAttributes } from 'vue'\nimport { toRefs, watch } from 'vue'\nimport { Primitive } from '../Primitive'\nimport { injectAvatarRootContext } from './AvatarRoot.vue'\nimport { useImageLoadingStatus } from './utils'\n\nconst props = withDefaults(defineProps<AvatarImageProps>(), { as: 'img' })\nconst emits = defineEmits<AvatarImageEmits>()\n\nconst { src, referrerPolicy, crossOrigin } = toRefs(props)\nuseForwardExpose()\nconst rootContext = injectAvatarRootContext()\n\nconst imageLoadingStatus = useImageLoadingStatus(src, { referrerPolicy, crossOrigin })\n\nwatch(\n  imageLoadingStatus,\n  (newValue) => {\n    emits('loadingStatusChange', newValue)\n    if (newValue !== 'idle')\n      rootContext.imageLoadingStatus.value = newValue\n  },\n  { immediate: true },\n)\n</script>\n\n<template>\n  <Primitive\n    v-show=\"imageLoadingStatus === 'loaded'\"\n    role=\"img\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :src=\"src\"\n    :referrerpolicy=\"referrerPolicy\"\n    :crossorigin=\"crossOrigin\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { ImageLoadingStatus } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport type AvatarImageEmits = {\n  /**\n   * A callback providing information about the loading status of the image. <br>\n   * This is useful in case you want to control more precisely what to render as the image is loading.\n   */\n  loadingStatusChange: [value: ImageLoadingStatus]\n}\nexport interface AvatarImageProps extends PrimitiveProps {\n  src: string\n  referrerPolicy?: ImgHTMLAttributes['referrerpolicy']\n  crossOrigin?: ImgHTMLAttributes['crossorigin']\n}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ImgHTMLAttributes } from 'vue'\nimport { toRefs, watch } from 'vue'\nimport { Primitive } from '../Primitive'\nimport { injectAvatarRootContext } from './AvatarRoot.vue'\nimport { useImageLoadingStatus } from './utils'\n\nconst props = withDefaults(defineProps<AvatarImageProps>(), { as: 'img' })\nconst emits = defineEmits<AvatarImageEmits>()\n\nconst { src, referrerPolicy, crossOrigin } = toRefs(props)\nuseForwardExpose()\nconst rootContext = injectAvatarRootContext()\n\nconst imageLoadingStatus = useImageLoadingStatus(src, { referrerPolicy, crossOrigin })\n\nwatch(\n  imageLoadingStatus,\n  (newValue) => {\n    emits('loadingStatusChange', newValue)\n    if (newValue !== 'idle')\n      rootContext.imageLoadingStatus.value = newValue\n  },\n  { immediate: true },\n)\n</script>\n\n<template>\n  <Primitive\n    v-show=\"imageLoadingStatus === 'loaded'\"\n    role=\"img\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :src=\"src\"\n    :referrerpolicy=\"referrerPolicy\"\n    :crossorigin=\"crossOrigin\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","/*\n  * Implementation ported from https://github.com/melt-ui/melt-ui/blob/develop/src/lib/builders/date-field/_internal/helpers.ts\n*/\n\nimport type { DateSegmentPart, EditableSegmentPart, SegmentPart, TimeSegmentPart } from './types'\n\nexport const DATE_SEGMENT_PARTS = ['day', 'month', 'year'] as const\nexport const TIME_SEGMENT_PARTS = ['hour', 'minute', 'second', 'dayPeriod'] as const\nexport const NON_EDITABLE_SEGMENT_PARTS = ['literal', 'timeZoneName'] as const\nexport const EDITABLE_SEGMENT_PARTS = [...DATE_SEGMENT_PARTS, ...TIME_SEGMENT_PARTS] as const\nexport const EDITABLE_TIME_SEGMENT_PARTS = [...TIME_SEGMENT_PARTS] as const\nexport const ALL_SEGMENT_PARTS = [\n  ...EDITABLE_SEGMENT_PARTS,\n  ...NON_EDITABLE_SEGMENT_PARTS,\n] as const\nexport const ALL_EXCEPT_LITERAL_PARTS = ALL_SEGMENT_PARTS.filter(part => part !== 'literal')\n\nexport function isDateSegmentPart(part: unknown): part is DateSegmentPart {\n  return DATE_SEGMENT_PARTS.includes(part as DateSegmentPart)\n}\n\nexport function isTimeSegmentPart(part: unknown): part is TimeSegmentPart {\n  return TIME_SEGMENT_PARTS.includes(part as TimeSegmentPart)\n}\n\nexport function isSegmentPart(part: string): part is EditableSegmentPart {\n  return EDITABLE_SEGMENT_PARTS.includes(part as EditableSegmentPart)\n}\n\nexport function isAnySegmentPart(part: unknown): part is SegmentPart {\n  return ALL_SEGMENT_PARTS.includes(part as EditableSegmentPart)\n}\n","/*\n * Implementation ported from from from https://github.com/melt-ui/melt-ui/blob/develop/src/lib/internal/helpers/date/placeholders.ts\n*/\n\nconst supportedLocales = [\n  'ach',\n  'af',\n  'am',\n  'an',\n  'ar',\n  'ast',\n  'az',\n  'be',\n  'bg',\n  'bn',\n  'br',\n  'bs',\n  'ca',\n  'cak',\n  'ckb',\n  'cs',\n  'cy',\n  'da',\n  'de',\n  'dsb',\n  'el',\n  'en',\n  'eo',\n  'es',\n  'et',\n  'eu',\n  'fa',\n  'ff',\n  'fi',\n  'fr',\n  'fy',\n  'ga',\n  'gd',\n  'gl',\n  'he',\n  'hr',\n  'hsb',\n  'hu',\n  'ia',\n  'id',\n  'it',\n  'ja',\n  'ka',\n  'kk',\n  'kn',\n  'ko',\n  'lb',\n  'lo',\n  'lt',\n  'lv',\n  'meh',\n  'ml',\n  'ms',\n  'nl',\n  'nn',\n  'no',\n  'oc',\n  'pl',\n  'pt',\n  'rm',\n  'ro',\n  'ru',\n  'sc',\n  'scn',\n  'sk',\n  'sl',\n  'sr',\n  'sv',\n  'szl',\n  'tg',\n  'th',\n  'tr',\n  'uk',\n  'zh-CN',\n  'zh-TW',\n] as const\n\nconst placeholderFields = ['year', 'month', 'day'] as const\n\ntype PlaceholderField = (typeof placeholderFields)[number]\nexport type SupportedLocale = (typeof supportedLocales)[number]\nexport type PlaceholderMap = Record<SupportedLocale, Record<PlaceholderField, string>>\n\nconst placeholders: PlaceholderMap = {\n  'ach': { year: 'mwaka', month: 'dwe', day: 'nino' },\n  'af': { year: 'jjjj', month: 'mm', day: 'dd' },\n  'am': { year: 'ዓዓዓዓ', month: 'ሚሜ', day: 'ቀቀ' },\n  'an': { year: 'aaaa', month: 'mm', day: 'dd' },\n  'ar': { year: 'سنة', month: 'شهر', day: 'يوم' },\n  'ast': { year: 'aaaa', month: 'mm', day: 'dd' },\n  'az': { year: 'iiii', month: 'aa', day: 'gg' },\n  'be': { year: 'гггг', month: 'мм', day: 'дд' },\n  'bg': { year: 'гггг', month: 'мм', day: 'дд' },\n  'bn': { year: 'yyyy', month: 'মিমি', day: 'dd' },\n  'br': { year: 'bbbb', month: 'mm', day: 'dd' },\n  'bs': { year: 'gggg', month: 'mm', day: 'dd' },\n  'ca': { year: 'aaaa', month: 'mm', day: 'dd' },\n  'cak': { year: 'jjjj', month: 'ii', day: 'q\\'q\\'' },\n  'ckb': { year: 'ساڵ', month: 'مانگ', day: 'ڕۆژ' },\n  'cs': { year: 'rrrr', month: 'mm', day: 'dd' },\n  'cy': { year: 'bbbb', month: 'mm', day: 'dd' },\n  'da': { year: 'åååå', month: 'mm', day: 'dd' },\n  'de': { year: 'jjjj', month: 'mm', day: 'tt' },\n  'dsb': { year: 'llll', month: 'mm', day: 'źź' },\n  'el': { year: 'εεεε', month: 'μμ', day: 'ηη' },\n  'en': { year: 'yyyy', month: 'mm', day: 'dd' },\n  'eo': { year: 'jjjj', month: 'mm', day: 'tt' },\n  'es': { year: 'aaaa', month: 'mm', day: 'dd' },\n  'et': { year: 'aaaa', month: 'kk', day: 'pp' },\n  'eu': { year: 'uuuu', month: 'hh', day: 'ee' },\n  'fa': { year: 'سال', month: 'ماه', day: 'روز' },\n  'ff': { year: 'hhhh', month: 'll', day: 'ññ' },\n  'fi': { year: 'vvvv', month: 'kk', day: 'pp' },\n  'fr': { year: 'aaaa', month: 'mm', day: 'jj' },\n  'fy': { year: 'jjjj', month: 'mm', day: 'dd' },\n  'ga': { year: 'bbbb', month: 'mm', day: 'll' },\n  'gd': { year: 'bbbb', month: 'mm', day: 'll' },\n  'gl': { year: 'aaaa', month: 'mm', day: 'dd' },\n  'he': { year: 'שנה', month: 'חודש', day: 'יום' },\n  'hr': { year: 'gggg', month: 'mm', day: 'dd' },\n  'hsb': { year: 'llll', month: 'mm', day: 'dd' },\n  'hu': { year: 'éééé', month: 'hh', day: 'nn' },\n  'ia': { year: 'aaaa', month: 'mm', day: 'dd' },\n  'id': { year: 'tttt', month: 'bb', day: 'hh' },\n  'it': { year: 'aaaa', month: 'mm', day: 'gg' },\n  'ja': { year: ' 年 ', month: '月', day: '日' },\n  'ka': { year: 'წწწწ', month: 'თთ', day: 'რრ' },\n  'kk': { year: 'жжжж', month: 'аа', day: 'кк' },\n  'kn': { year: 'ವವವವ', month: 'ಮಿಮೀ', day: 'ದಿದಿ' },\n  'ko': { year: '연도', month: '월', day: '일' },\n  'lb': { year: 'jjjj', month: 'mm', day: 'dd' },\n  'lo': { year: 'ປປປປ', month: 'ດດ', day: 'ວວ' },\n  'lt': { year: 'mmmm', month: 'mm', day: 'dd' },\n  'lv': { year: 'gggg', month: 'mm', day: 'dd' },\n  'meh': { year: 'aaaa', month: 'mm', day: 'dd' },\n  'ml': { year: 'വർഷം', month: 'മാസം', day: 'തീയതി' },\n  'ms': { year: 'tttt', month: 'mm', day: 'hh' },\n  'nl': { year: 'jjjj', month: 'mm', day: 'dd' },\n  'nn': { year: 'åååå', month: 'mm', day: 'dd' },\n  'no': { year: 'åååå', month: 'mm', day: 'dd' },\n  'oc': { year: 'aaaa', month: 'mm', day: 'jj' },\n  'pl': { year: 'rrrr', month: 'mm', day: 'dd' },\n  'pt': { year: 'aaaa', month: 'mm', day: 'dd' },\n  'rm': { year: 'oooo', month: 'mm', day: 'dd' },\n  'ro': { year: 'aaaa', month: 'll', day: 'zz' },\n  'ru': { year: 'гггг', month: 'мм', day: 'дд' },\n  'sc': { year: 'aaaa', month: 'mm', day: 'dd' },\n  'scn': { year: 'aaaa', month: 'mm', day: 'jj' },\n  'sk': { year: 'rrrr', month: 'mm', day: 'dd' },\n  'sl': { year: 'llll', month: 'mm', day: 'dd' },\n  'sr': { year: 'гггг', month: 'мм', day: 'дд' },\n  'sv': { year: 'åååå', month: 'mm', day: 'dd' },\n  'szl': { year: 'rrrr', month: 'mm', day: 'dd' },\n  'tg': { year: 'сссс', month: 'мм', day: 'рр' },\n  'th': { year: 'ปปปป', month: 'ดด', day: 'วว' },\n  'tr': { year: 'yyyy', month: 'aa', day: 'gg' },\n  'uk': { year: 'рррр', month: 'мм', day: 'дд' },\n  'zh-CN': { year: '年', month: '月', day: '日' },\n  'zh-TW': { year: '年', month: '月', day: '日' },\n}\n\nfunction getPlaceholderObj(locale: SupportedLocale | (string & {})) {\n  if (!isSupportedLocale(locale)) {\n    const localeLanguage = getLocaleLanguage(locale)\n    if (!isSupportedLocale(localeLanguage))\n      return placeholders.en\n\n    else\n      return placeholders[localeLanguage]\n  }\n  else {\n    return placeholders[locale]\n  }\n}\n\ntype Field = 'era' | 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'dayPeriod'\n\nexport function getPlaceholder(\n  field: Field,\n  value: string,\n  locale: SupportedLocale | (string & {}),\n) {\n  if (isPlaceholderField(field))\n    return getPlaceholderObj(locale)[field]\n\n  if (isDefaultField(field))\n    return value\n\n  if (isTimeField(field))\n    return '––'\n\n  return ''\n}\n\nfunction isSupportedLocale(locale: string): locale is SupportedLocale {\n  return supportedLocales.includes(locale as SupportedLocale)\n}\n\nfunction isPlaceholderField(field: unknown): field is PlaceholderField {\n  return placeholderFields.includes(field as PlaceholderField)\n}\n\nfunction isTimeField(field: unknown): field is 'hour' | 'minute' | 'second' {\n  return field === 'hour' || field === 'minute' || field === 'second'\n}\n\nfunction isDefaultField(field: unknown): field is 'era' | 'dayPeriod' {\n  return field === 'era' || field === 'dayPeriod'\n}\n\nfunction getLocaleLanguage(locale: string) {\n  if (Intl.Locale)\n    return new Intl.Locale(locale).language\n\n  return locale.split('-')[0]\n}\n","import type { DateFields, DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Formatter } from '@/shared'\nimport type { DateSegmentPart, Granularity, HourCycle, SegmentContentObj, SegmentPart, SegmentValueObj, TimeSegmentPart } from '@/shared/date'\nimport { isZonedDateTime, toDate } from '@/date'\nimport { DATE_SEGMENT_PARTS, EDITABLE_SEGMENT_PARTS, getOptsByGranularity, getPlaceholder, isDateSegmentPart, isSegmentPart, normalizeHourCycle, TIME_SEGMENT_PARTS } from '@/shared/date'\n\nconst calendarDateTimeGranularities = ['hour', 'minute', 'second']\n\ntype SyncDateSegmentValuesProps = {\n  value: DateValue\n  formatter: Formatter\n}\n\ntype SyncTimeSegmentValuesProps = {\n  value: DateValue\n  formatter: Formatter\n}\n\nexport function syncTimeSegmentValues(props: SyncTimeSegmentValuesProps) {\n  return Object.fromEntries(TIME_SEGMENT_PARTS.map((part) => {\n    if (part === 'dayPeriod')\n      return [part, props.formatter.dayPeriod(toDate(props.value))]\n    return [part, props.value[part as keyof DateValue]]\n  })) as SegmentValueObj\n}\n\nexport function syncSegmentValues(props: SyncDateSegmentValuesProps) {\n  const { formatter } = props\n\n  const dateValues = DATE_SEGMENT_PARTS.map((part) => {\n    return [part, props.value[part]]\n  })\n  if ('hour' in props.value) {\n    const timeValues = syncTimeSegmentValues({ value: props.value, formatter })\n\n    return { ...Object.fromEntries(dateValues), ...timeValues } as SegmentValueObj\n  }\n\n  return Object.fromEntries(dateValues) as SegmentValueObj\n}\n\nexport function initializeTimeSegmentValues(granularity: 'hour' | 'minute' | 'second'): SegmentValueObj {\n  return Object.fromEntries(\n    TIME_SEGMENT_PARTS.map((part) => {\n      if (part === 'dayPeriod')\n        return [part, 'AM']\n      return [part, null]\n    }).filter(([key]) => {\n      if (key === 'literal' || key === null)\n        return false\n      if (granularity === 'minute' && key === 'second')\n        return false\n      if (granularity === 'hour' && (key === 'second' || key === 'minute'))\n        return false\n      else return true\n    }),\n  )\n}\n\nexport function initializeSegmentValues(granularity: Granularity): SegmentValueObj {\n  const initialParts = EDITABLE_SEGMENT_PARTS.map((part) => {\n    if (part === 'dayPeriod')\n      return [part, 'AM']\n\n    return [part, null]\n  }).filter(([key]) => {\n    if (key === 'literal' || key === null)\n      return false\n    if (granularity === 'minute' && key === 'second')\n      return false\n    if (granularity === 'hour' && (key === 'second' || key === 'minute'))\n      return false\n    if (granularity === 'day')\n      return !calendarDateTimeGranularities.includes(key) && key !== 'dayPeriod'\n    else return true\n  })\n\n  return Object.fromEntries(initialParts)\n}\n\ntype SharedContentProps = {\n  granularity: Granularity\n  dateRef: DateValue\n  formatter: Formatter\n  hideTimeZone: boolean\n  hourCycle: HourCycle\n  isTimeValue?: boolean\n}\n\ntype CreateContentObjProps = SharedContentProps & {\n  segmentValues: SegmentValueObj\n  locale: Ref<string>\n}\n\ntype CreateContentArrProps = SharedContentProps & {\n  contentObj: SegmentContentObj\n}\n\nfunction createContentObj(props: CreateContentObjProps) {\n  const { segmentValues, formatter, locale } = props\n  function getPartContent(part: DateSegmentPart | TimeSegmentPart) {\n    if ('hour' in segmentValues) {\n      const value = segmentValues[part]\n      if (value !== null) {\n        if (part === 'day') {\n          return formatter.part(props.dateRef.set({\n            [part as keyof DateFields]: value,\n            /**\n             * Edge case for the day field:\n             *\n             * 1. If the month is filled,\n             *   we need to ensure that the day snaps to the maximum value of that month.\n             * 2. If the month is not filled,\n             *   we default to the month with the maximum number of days (here just using January, 31 days),\n             *   so that user can input any possible day.\n             */\n            month: segmentValues.month ?? 1,\n          }), part, { hourCycle: normalizeHourCycle(props.hourCycle) })\n        }\n        return formatter.part(props.dateRef.set({ [part]: value }), part, {\n          hourCycle: normalizeHourCycle(props.hourCycle),\n        })\n      }\n      else {\n        return getPlaceholder(part, '', locale.value)\n      }\n    }\n    else {\n      if (isDateSegmentPart(part)) {\n        const value = segmentValues[part]\n        if (value !== null) {\n          if (part === 'day') {\n            return formatter.part(props.dateRef.set({\n              [part]: value,\n              // Same logic as above for the day field\n              month: segmentValues.month ?? 1,\n            }), part)\n          }\n\n          return formatter.part(props.dateRef.set({ [part]: value }), part)\n        }\n\n        else {\n          return getPlaceholder(part, '', locale.value)\n        }\n      }\n      return ''\n    }\n  }\n\n  const content = Object.keys(segmentValues).reduce((obj, part) => {\n    if (!isSegmentPart(part))\n      return obj\n    if ('hour' in segmentValues && part === 'dayPeriod') {\n      const value = segmentValues[part]\n\n      if (value !== null)\n        obj[part] = value\n\n      else\n        obj[part] = getPlaceholder(part, 'AM', locale.value)\n    }\n    else {\n      obj[part] = getPartContent(part)\n    }\n\n    return obj\n  }, {} as SegmentContentObj)\n\n  return content\n}\n\nfunction createContentArr(props: CreateContentArrProps) {\n  const { granularity, formatter, contentObj, hideTimeZone, hourCycle, isTimeValue } = props\n  const parts = formatter.toParts(props.dateRef, getOptsByGranularity(granularity, hourCycle, isTimeValue))\n\n  const segmentContentArr = parts\n    .map((part) => {\n      const defaultParts = ['literal', 'timeZoneName', null]\n\n      if (defaultParts.includes(part.type) || !isSegmentPart(part.type)) {\n        return {\n          part: part.type,\n          value: part.value,\n        }\n      }\n\n      return {\n        part: part.type,\n        value: contentObj[part.type],\n      }\n    })\n    .filter((segment): segment is { part: SegmentPart, value: string } => {\n      if (segment.part === null || segment.value === null)\n        return false\n      if (segment.part === 'timeZoneName' && (!isZonedDateTime(props.dateRef) || hideTimeZone))\n        return false\n\n      // In some locales (e.g., zh-TW), the time zone is represented with square brackets.\n      // We also filter out these literals that are just brackets.\n      // @see https://github.com/unovue/reka-ui/issues/1670\n      if (\n        (!isZonedDateTime(props.dateRef) || hideTimeZone)\n        && segment.part === 'literal' && ['[', ']'].includes(segment.value.trim())\n      ) {\n        return false\n      }\n\n      return true\n    })\n\n  return segmentContentArr\n}\n\ntype CreateContentProps = CreateContentObjProps\n\nexport function createContent(props: CreateContentProps) {\n  const contentObj = createContentObj(props)\n\n  const contentArr = createContentArr({\n    contentObj,\n    ...props,\n  })\n\n  return {\n    obj: contentObj,\n    arr: contentArr,\n  }\n}\n","import { useKbd } from '@/shared'\n\nexport function isSegmentNavigationKey(key: string) {\n  const kbd = useKbd()\n  if (key === kbd.ARROW_RIGHT || key === kbd.ARROW_LEFT)\n    return true\n  return false\n}\n\nexport function isNumberString(value: string) {\n  if (Number.isNaN(Number.parseInt(value)))\n    return false\n  return true\n}\n\nexport function isAcceptableSegmentKey(key: string) {\n  const kbd = useKbd()\n  const acceptableSegmentKeys = [\n    kbd.ENTER,\n    kbd.ARROW_UP,\n    kbd.ARROW_DOWN,\n    kbd.ARROW_LEFT,\n    kbd.ARROW_RIGHT,\n    kbd.BACKSPACE,\n    kbd.SPACE,\n    'a',\n    'A',\n    'p',\n    'P',\n  ]\n  if (acceptableSegmentKeys.includes(key))\n    return true\n  if (isNumberString(key))\n    return true\n  return false\n}\n\nexport function getSegmentElements(parentElement: HTMLElement): Element[] {\n  return Array.from(parentElement.querySelectorAll('[data-reka-date-field-segment]')).filter(item => item.getAttribute('data-reka-date-field-segment') !== 'literal')\n}\n\nexport function getTimeFieldSegmentElements(parentElement: HTMLElement): Element[] {\n  return Array.from(parentElement.querySelectorAll('[data-reka-time-field-segment]')).filter(item => item.getAttribute('data-reka-time-field-segment') !== 'literal')\n}\n","import type { CalendarDateTime, DateFields, DateValue, TimeFields } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { AnyExceptLiteral, DateStep, HourCycle, SegmentPart, SegmentValueObj } from './types'\nimport type { Formatter } from '@/shared'\nimport {\n  DateFormatter,\n} from '@internationalized/date'\nimport { computed } from 'vue'\nimport { getDaysInMonth, toDate } from '@/date'\nimport { getActiveElement, snapValueToStep, useKbd } from '@/shared'\nimport { isAcceptableSegmentKey, isNumberString, isSegmentNavigationKey } from './segment'\n\nconst DIGIT_REG = /^\\d$/\n\ntype MinuteSecondIncrementProps = {\n  e: KeyboardEvent\n  part: keyof TimeFields\n  dateRef: DateValue\n  prevValue: number | null\n}\n\ntype DateTimeValueIncrementation = {\n  e: KeyboardEvent\n  part: keyof Omit<DateFields, 'era'> | keyof TimeFields\n  dateRef: DateValue\n  prevValue: number | null\n}\n\ntype SegmentAttrProps = {\n  disabled: boolean\n  segmentValues: SegmentValueObj\n  hourCycle: HourCycle\n  placeholder: DateValue\n  formatter: Formatter\n}\n\nfunction commonSegmentAttrs(props: SegmentAttrProps) {\n  return {\n    role: 'spinbutton',\n    contenteditable: true,\n    tabindex: props.disabled ? undefined : 0,\n    spellcheck: false,\n    inputmode: 'numeric',\n    autocorrect: 'off',\n    enterkeyhint: 'next',\n    style: 'caret-color: transparent;',\n  }\n}\n\nfunction daySegmentAttrs(props: SegmentAttrProps) {\n  const { segmentValues, placeholder } = props\n  const isEmpty = segmentValues.day === null\n\n  // Include month from segmentValues to ensure correct max days calculation\n  const dateFields: { day?: number, month?: number } = {}\n  if (segmentValues.day)\n    dateFields.day = segmentValues.day\n  if (segmentValues.month)\n    dateFields.month = segmentValues.month\n\n  const date = Object.keys(dateFields).length > 0 ? placeholder.set(dateFields) : placeholder\n\n  const valueNow = date.day\n  const valueMin = 1\n  const valueMax = getDaysInMonth(date)\n  const valueText = isEmpty ? 'Empty' : `${valueNow}`\n\n  return {\n    ...commonSegmentAttrs(props),\n    'aria-label': 'day,',\n    'aria-valuemin': valueMin,\n    'aria-valuemax': valueMax,\n    'aria-valuenow': valueNow,\n    'aria-valuetext': valueText,\n    'data-placeholder': isEmpty ? '' : undefined,\n  }\n}\n\nfunction monthSegmentAttrs(props: SegmentAttrProps) {\n  const { segmentValues, placeholder, formatter } = props\n  const isEmpty = segmentValues.month === null\n  const date = segmentValues.month\n    ? placeholder.set({ month: segmentValues.month })\n    : placeholder\n  const valueNow = date.month\n  const valueMin = 1\n  const valueMax = 12\n  const valueText = isEmpty ? 'Empty' : `${valueNow} - ${formatter.fullMonth(toDate(date))}`\n\n  return {\n    ...commonSegmentAttrs(props),\n    'aria-label': 'month, ',\n    'contenteditable': true,\n    'aria-valuemin': valueMin,\n    'aria-valuemax': valueMax,\n    'aria-valuenow': valueNow,\n    'aria-valuetext': valueText,\n    'data-placeholder': isEmpty ? '' : undefined,\n  }\n}\n\nfunction yearSegmentAttrs(props: SegmentAttrProps) {\n  const { segmentValues, placeholder } = props\n  const isEmpty = segmentValues.year === null\n  const date = segmentValues.year ? placeholder.set({ year: segmentValues.year }) : placeholder\n  const valueMin = 1\n  const valueMax = 9999\n  const valueNow = date.year\n  const valueText = isEmpty ? 'Empty' : `${valueNow}`\n\n  return {\n    ...commonSegmentAttrs(props),\n    'aria-label': 'year, ',\n    'aria-valuemin': valueMin,\n    'aria-valuemax': valueMax,\n    'aria-valuenow': valueNow,\n    'aria-valuetext': valueText,\n    'data-placeholder': isEmpty ? '' : undefined,\n  }\n}\n\nfunction hourSegmentAttrs(props: SegmentAttrProps) {\n  const { segmentValues, hourCycle, placeholder } = props\n\n  if (!('hour' in segmentValues) || !('hour' in placeholder))\n    return {}\n  const isEmpty = segmentValues.hour === null\n  const date = segmentValues.hour ? placeholder.set({ hour: segmentValues.hour }) : placeholder\n  const valueMin = hourCycle === 12 ? 1 : 0\n  const valueMax = hourCycle === 12 ? 12 : 23\n  const valueNow = date.hour\n  const valueText = isEmpty ? 'Empty' : `${valueNow} ${segmentValues.dayPeriod ?? ''}`\n\n  return {\n    ...commonSegmentAttrs(props),\n    'aria-label': 'hour, ',\n    'aria-valuemin': valueMin,\n    'aria-valuemax': valueMax,\n    'aria-valuenow': valueNow,\n    'aria-valuetext': valueText,\n    'data-placeholder': isEmpty ? '' : undefined,\n  }\n}\n\nfunction minuteSegmentAttrs(props: SegmentAttrProps) {\n  const { segmentValues, placeholder } = props\n  if (!('minute' in segmentValues) || !('minute' in placeholder))\n    return {}\n  const isEmpty = segmentValues.minute === null\n  const date = segmentValues.minute\n    ? placeholder.set({ minute: segmentValues.minute })\n    : placeholder\n  const valueNow = date.minute\n  const valueMin = 0\n  const valueMax = 59\n  const valueText = isEmpty ? 'Empty' : `${valueNow}`\n\n  return {\n    ...commonSegmentAttrs(props),\n    'aria-label': 'minute, ',\n    'aria-valuemin': valueMin,\n    'aria-valuemax': valueMax,\n    'aria-valuenow': valueNow,\n    'aria-valuetext': valueText,\n    'data-placeholder': isEmpty ? '' : undefined,\n  }\n}\n\nfunction secondSegmentAttrs(props: SegmentAttrProps) {\n  const { segmentValues, placeholder } = props\n  if (!('second' in segmentValues) || !('second' in placeholder))\n    return {}\n  const isEmpty = segmentValues.second === null\n  const date = segmentValues.second\n    ? placeholder.set({ second: segmentValues.second })\n    : placeholder\n  const valueNow = date.second\n  const valueMin = 0\n  const valueMax = 59\n  const valueText = isEmpty ? 'Empty' : `${valueNow}`\n\n  return {\n    ...commonSegmentAttrs(props),\n    'aria-label': 'second, ',\n    'aria-valuemin': valueMin,\n    'aria-valuemax': valueMax,\n    'aria-valuenow': valueNow,\n    'aria-valuetext': valueText,\n    'data-placeholder': isEmpty ? '' : undefined,\n  }\n}\n\nfunction dayPeriodSegmentAttrs(props: SegmentAttrProps) {\n  const { segmentValues } = props\n  if (!('dayPeriod' in segmentValues))\n    return {}\n\n  const valueMin = 0\n  const valueMax = 12\n  const valueNow = segmentValues.hour ? (segmentValues.hour > 12 ? segmentValues.hour - 12 : segmentValues.hour) : 0\n  const valueText = segmentValues.dayPeriod ?? 'AM'\n\n  return {\n    ...commonSegmentAttrs(props),\n    'inputmode': 'text',\n    'aria-label': 'AM/PM',\n    'aria-valuemin': valueMin,\n    'aria-valuemax': valueMax,\n    'aria-valuenow': valueNow,\n    'aria-valuetext': valueText,\n  }\n}\n\nfunction literalSegmentAttrs(_props: SegmentAttrProps) {\n  return {\n    'aria-hidden': true,\n    'data-segment': 'literal',\n  }\n}\n\nfunction timeZoneSegmentAttrs(props: SegmentAttrProps) {\n  return {\n    'role': 'textbox',\n    'aria-label': 'timezone, ',\n    'data-readonly': true,\n    'data-segment': 'timeZoneName',\n    'tabindex': props.disabled ? undefined : 0,\n    'style': 'caret-color: transparent;',\n  }\n}\n\nfunction eraSegmentAttrs(props: SegmentAttrProps) {\n  const { segmentValues, placeholder } = props\n\n  const valueMin = 0\n  const valueMax = 0\n  const valueNow = 0\n  const valueText = 'era' in segmentValues ? segmentValues.era : placeholder.era\n\n  return {\n    ...commonSegmentAttrs(props),\n    'aria-label': 'era',\n    'aria-valuemin': valueMin,\n    'aria-valuemax': valueMax,\n    'aria-valuenow': valueNow,\n    'aria-valuetext': valueText,\n  }\n}\n\nexport const segmentBuilders = {\n  day: {\n    attrs: daySegmentAttrs,\n  },\n  month: {\n    attrs: monthSegmentAttrs,\n  },\n  year: {\n    attrs: yearSegmentAttrs,\n  },\n  hour: {\n    attrs: hourSegmentAttrs,\n  },\n  minute: {\n    attrs: minuteSegmentAttrs,\n  },\n  second: {\n    attrs: secondSegmentAttrs,\n  },\n  dayPeriod: {\n    attrs: dayPeriodSegmentAttrs,\n  },\n  literal: {\n    attrs: literalSegmentAttrs,\n  },\n  timeZoneName: {\n    attrs: timeZoneSegmentAttrs,\n  },\n  era: {\n    attrs: eraSegmentAttrs,\n  },\n}\n\nexport type UseDateFieldProps = {\n  hasLeftFocus: Ref<boolean>\n  lastKeyZero: Ref<boolean>\n  placeholder: Ref<DateValue>\n  hourCycle: HourCycle\n  step: Ref<DateStep>\n  stepSnapping?: Ref<boolean>\n  formatter: Formatter\n  segmentValues: Ref<SegmentValueObj>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  part: SegmentPart\n  modelValue: Ref<DateValue | undefined>\n  focusNext: () => void\n}\n\nexport function useDateField(props: UseDateFieldProps) {\n  const kbd = useKbd()\n\n  function minuteSecondIncrementation({ e, part, dateRef, prevValue }: MinuteSecondIncrementProps): number {\n    const step = props.step.value[part] ?? 1\n    const sign = e.key === kbd.ARROW_UP ? step : -step\n    const min = 0\n    const max = 59\n\n    if (prevValue === null)\n      return sign > 0 ? min : max\n\n    const cycleArgs: [keyof TimeFields, number] = [part, sign]\n    return (dateRef as CalendarDateTime).set({ [part]: prevValue }).cycle(...cycleArgs)[part]\n  }\n\n  function deleteValue(prevValue: number | null) {\n    props.hasLeftFocus.value = false\n    if (prevValue === null)\n      return prevValue\n\n    const str = prevValue.toString()\n    if (str.length === 1) {\n      props.modelValue.value = undefined\n      return null\n    }\n\n    return Number.parseInt(str.slice(0, -1))\n  }\n  function dateTimeValueIncrementation({ e, part, dateRef, prevValue }: DateTimeValueIncrementation): number {\n    const step = props.step.value[part] ?? 1\n    const sign = e.key === kbd.ARROW_UP ? step : -step\n\n    if (prevValue === null)\n      return dateRef[part as keyof Omit<DateFields, 'era'>]\n\n    if (part === 'hour' && 'hour' in dateRef) {\n      // Don't pass hourCycle to cycle - internal representation is always 24-hour\n      // The hourCycle prop only affects display, not internal cycling\n      const cycleArgs: [keyof DateFields | keyof TimeFields, number] = [part, sign]\n      return dateRef.set({ [part as keyof DateValue]: prevValue }).cycle(...cycleArgs)[part]\n    }\n\n    const cycleArgs: [keyof DateFields, number] = [part as keyof DateFields, sign]\n    if (part === 'day') {\n      return dateRef.set({\n        [part as keyof DateValue]: prevValue,\n        /**\n         * Edge case for the day field:\n         *\n         * 1. If the month is filled,\n         *   we need to ensure that the day snaps to the maximum value of that month.\n         * 2. If the month is not filled,\n         *   we default to the month with the maximum number of days (here just using January, 31 days),\n         *   so that user can input any possible day.\n         */\n        month: props.segmentValues.value.month ?? 1,\n      }).cycle(...cycleArgs)[part as keyof Omit<DateFields, 'era'>]\n    }\n\n    return dateRef.set({ [part as keyof DateValue]: prevValue }).cycle(...cycleArgs)[part as keyof Omit<DateFields, 'era'>]\n  }\n  function updateDayOrMonth(max: number, num: number, prev: number | null) {\n    let moveToNext = false\n    const maxStart = Math.floor(max / 10)\n\n    /**\n     * If the user has left the segment, we want to reset the\n     * `prev` value so that we can start the segment over again\n     * when the user types a number.\n     */\n    if (props.hasLeftFocus.value) {\n      props.hasLeftFocus.value = false\n      props.lastKeyZero.value = false\n      prev = null\n    }\n\n    if (prev === null) {\n      /**\n       * If the user types a 0 as the first number, we want\n       * to keep track of that so that when they type the next\n       * number, we can move to the next segment.\n       */\n\n      if (num === 0) {\n        props.lastKeyZero.value = true\n        return { value: null, moveToNext }\n      }\n      /**\n       * If the last key was a 0, or if the first number is\n       * greater than the max start digit (0-3 in most cases), then\n       * we want to move to the next segment, since it's not possible\n       * to continue typing a valid number in this segment.\n       */\n\n      if (props.lastKeyZero.value || num > maxStart) {\n        // move to next\n        moveToNext = true\n      }\n      props.lastKeyZero.value = false\n      /**\n       * If none of the above conditions are met, then we can just\n       * return the number as the segment value and continue typing\n       * in this segment.\n       */\n      return { value: num, moveToNext }\n    }\n\n    /**\n     * If the number of digits is 2, or if the total with the existing digit\n     * and the pressed digit is greater than the maximum value for this\n     * month, then we will reset the segment as if the user had pressed the\n     * backspace key and then typed the number.\n     */\n    const digits = prev.toString().length\n    const total = Number.parseInt(prev.toString() + num.toString())\n    /**\n     * If the number of digits is 2, or if the total with the existing digit\n     * and the pressed digit is greater than the maximum value for this\n     * month, then we will reset the segment as if the user had pressed the\n     * backspace key and then typed the number.\n     */\n\n    if (digits === 2 || total > max) {\n      /**\n       * As we're doing elsewhere, we're checking if the number is greater\n       * than the max start digit (0-3 in most months), and if so, we're\n       * going to move to the next segment.\n       */\n      if (num > maxStart || total > max) {\n        // move to next\n        moveToNext = true\n      }\n      return { value: num, moveToNext }\n    }\n    // move to next\n    moveToNext = true\n    return { value: total, moveToNext }\n  }\n\n  function updateMinuteOrSecond(num: number, prev: number | null) {\n    const max = 59\n    let moveToNext = false\n    const maxStart = Math.floor(max / 10)\n\n    /**\n     * If the user has left the segment, we want to reset the\n     * `prev` value so that we can start the segment over again\n     * when the user types a number.\n     */\n    if (props.hasLeftFocus.value) {\n      props.hasLeftFocus.value = false\n      props.lastKeyZero.value = false\n      prev = null\n    }\n\n    if (prev === null) {\n      /**\n       * If the user types a 0 as the first number, we want\n       * to keep track of that so that when they type the next\n       * number, we can move to the next segment.\n       */\n\n      if (num === 0) {\n        props.lastKeyZero.value = true\n        return { value: 0, moveToNext }\n      }\n      /**\n       * If the last key was a 0, or if the first number is\n       * greater than the max start digit (0-3 in most cases), then\n       * we want to move to the next segment, since it's not possible\n       * to continue typing a valid number in this segment.\n       */\n\n      if (props.lastKeyZero.value || num > maxStart) {\n        // move to next\n        moveToNext = true\n      }\n      props.lastKeyZero.value = false\n      /**\n       * If none of the above conditions are met, then we can just\n       * return the number as the segment value and continue typing\n       * in this segment.\n       */\n      return { value: num, moveToNext }\n    }\n\n    /**\n     * If the number of digits is 2, or if the total with the existing digit\n     * and the pressed digit is greater than the maximum value for this\n     * month, then we will reset the segment as if the user had pressed the\n     * backspace key and then typed the number.\n     */\n    const digits = prev.toString().length\n    const total = Number.parseInt(prev.toString() + num.toString())\n\n    /**\n     * If the number of digits is 2, or if the total with the existing digit\n     * and the pressed digit is greater than the maximum value for this\n     * month, then we will reset the segment as if the user had pressed the\n     * backspace key and then typed the number.\n     */\n\n    if (digits === 2 || total > max) {\n      /**\n       * As we're doing elsewhere, we're checking if the number is greater\n       * than the max start digit (0-3 in most months), and if so, we're\n       * going to move to the next segment.\n       */\n      if (num > maxStart) {\n        // move to next\n        moveToNext = true\n      }\n      return { value: num, moveToNext }\n    }\n    // move to next\n    moveToNext = true\n    return { value: total, moveToNext }\n  }\n\n  function updateHour(max: number, num: number, prev: number | null) {\n    let moveToNext = false\n    const maxStart = Math.floor(max / 10)\n\n    /**\n     * If the user has left the segment, we want to reset the\n     * `prev` value so that we can start the segment over again\n     * when the user types a number.\n     */\n    // probably not implement, kind of weird\n    if (props.hasLeftFocus.value) {\n      props.hasLeftFocus.value = false\n      props.lastKeyZero.value = false\n      prev = null\n    }\n\n    if (prev === null) {\n      /**\n       * If the user types a 0 as the first number, we want\n       * to keep track of that so that when they type the next\n       * number, we can move to the next segment.\n       */\n\n      if (num === 0) {\n        props.lastKeyZero.value = true\n        return { value: 0, moveToNext }\n      }\n      /**\n       * If the last key was a 0, or if the first number is\n       * greater than the max start digit (0-3 in most cases), then\n       * we want to move to the next segment, since it's not possible\n       * to continue typing a valid number in this segment.\n       */\n\n      if (props.lastKeyZero.value || num > maxStart) {\n        // move to next\n        moveToNext = true\n      }\n      props.lastKeyZero.value = false\n      /**\n       * If none of the above conditions are met, then we can just\n       * return the number as the segment value and continue typing\n       * in this segment.\n       */\n      return { value: num, moveToNext }\n    }\n\n    /**\n     * If the number of digits is 2, or if the total with the existing digit\n     * and the pressed digit is greater than the maximum value for this\n     * month, then we will reset the segment as if the user had pressed the\n     * backspace key and then typed the number.\n     */\n    const digits = prev.toString().length\n    const total = Number.parseInt(prev.toString() + num.toString())\n\n    /**\n     * If the number of digits is 2, or if the total with the existing digit\n     * and the pressed digit is greater than the maximum value for this\n     * month, then we will reset the segment as if the user had pressed the\n     * backspace key and then typed the number.\n     */\n\n    if (digits === 2 || total > max) {\n      /**\n       * As we're doing elsewhere, we're checking if the number is greater\n       * than the max start digit (0-3 in most months), and if so, we're\n       * going to move to the next segment.\n       */\n      if (num > maxStart) {\n        // move to next\n        moveToNext = true\n      }\n      return { value: num, moveToNext }\n    }\n    // move to next\n    moveToNext = true\n    return { value: total, moveToNext }\n  }\n\n  function updateYear(num: number, prev: number | null) {\n    let moveToNext = false\n\n    /**\n     * If the user has left the segment, we want to reset the\n     * `prev` value so that we can start the segment over again\n     * when the user types a number.\n     */\n    // probably not implement, kind of weird\n    if (props.hasLeftFocus.value) {\n      props.hasLeftFocus.value = false\n      prev = null\n    }\n\n    if (prev === null)\n      return { value: num === 0 ? 1 : num, moveToNext }\n\n    const str = prev.toString() + num.toString()\n\n    if (str.length > 4)\n      return { value: num === 0 ? 1 : num, moveToNext }\n\n    if (str.length === 4)\n      moveToNext = true\n\n    const int = Number.parseInt(str)\n    return { value: int, moveToNext }\n  }\n\n  const attributes = computed(() => segmentBuilders[props.part]?.attrs({\n    disabled: props.disabled.value,\n    placeholder: props.placeholder.value,\n    hourCycle: props.hourCycle,\n    segmentValues: props.segmentValues.value,\n    formatter: props.formatter,\n  }) ?? {})\n\n  // TODO: look into abstracting segment keydown functions since they have the same structure (checks -> arrow_up, arrow_down update -> number string update -> move to next -> backspace update)\n  function handleDaySegmentKeydown(e: KeyboardEvent) {\n    if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key))\n      return\n\n    const prevValue = props.segmentValues.value.day\n\n    if (e.key === kbd.ARROW_DOWN || e.key === kbd.ARROW_UP) {\n      props.segmentValues.value.day = dateTimeValueIncrementation({ e, part: 'day', dateRef: props.placeholder.value, prevValue })\n      return\n    }\n\n    if (isNumberString(e.key)) {\n      const num = Number.parseInt(e.key)\n      const segmentMonthValue = props.segmentValues.value.month\n\n      const daysInMonth = segmentMonthValue\n        ? getDaysInMonth(props.placeholder.value.set({ month: segmentMonthValue }))\n        // if the month is not set, we default to the maximum number of days in a month\n        // so that user can input any possible day\n        : 31\n\n      const { value, moveToNext } = updateDayOrMonth(daysInMonth, num, prevValue)\n\n      props.segmentValues.value.day = value\n\n      if (moveToNext)\n        props.focusNext()\n    }\n\n    if (e.key === kbd.BACKSPACE) {\n      props.hasLeftFocus.value = false\n      props.segmentValues.value.day = deleteValue(prevValue)\n    }\n  }\n\n  function handleMonthSegmentKeydown(e: KeyboardEvent) {\n    if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key))\n      return\n\n    const prevValue = props.segmentValues.value.month\n\n    if (e.key === kbd.ARROW_DOWN || e.key === kbd.ARROW_UP) {\n      props.segmentValues.value.month = dateTimeValueIncrementation({ e, part: 'month', dateRef: props.placeholder.value, prevValue })\n      return\n    }\n\n    if (isNumberString(e.key)) {\n      const num = Number.parseInt(e.key)\n      const { value, moveToNext } = updateDayOrMonth(12, num, prevValue)\n\n      props.segmentValues.value.month = value\n\n      if (moveToNext)\n        props.focusNext()\n    }\n\n    if (e.key === kbd.BACKSPACE) {\n      props.hasLeftFocus.value = false\n      props.segmentValues.value.month = deleteValue(prevValue)\n    }\n  }\n\n  function handleYearSegmentKeydown(e: KeyboardEvent) {\n    if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key))\n      return\n\n    const prevValue = props.segmentValues.value.year\n\n    if (e.key === kbd.ARROW_DOWN || e.key === kbd.ARROW_UP) {\n      props.segmentValues.value.year = dateTimeValueIncrementation({ e, part: 'year', dateRef: props.placeholder.value, prevValue })\n      return\n    }\n\n    if (isNumberString(e.key)) {\n      const num = Number.parseInt(e.key)\n      const { value, moveToNext } = updateYear(num, prevValue)\n\n      props.segmentValues.value.year = value\n\n      if (moveToNext)\n        props.focusNext()\n    }\n\n    if (e.key === kbd.BACKSPACE) {\n      props.hasLeftFocus.value = false\n      props.segmentValues.value.year = deleteValue(prevValue)\n    }\n  }\n\n  function uses12HourFormat(locale: string): boolean {\n    const hourCycle = new DateFormatter(locale, { hour: 'numeric' }).resolvedOptions().hourCycle\n    return hourCycle === 'h11' || hourCycle === 'h12'\n  }\n\n  function handleHourSegmentKeydown(e: KeyboardEvent) {\n    const dateRef = props.placeholder.value\n    if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key) || !('hour' in dateRef) || !('hour' in props.segmentValues.value))\n      return\n\n    const prevValue = props.segmentValues.value.hour\n\n    if (e.key === kbd.ARROW_UP || e.key === kbd.ARROW_DOWN) {\n      const newHour = dateTimeValueIncrementation({ e, part: 'hour', dateRef: props.placeholder.value, prevValue })\n      props.segmentValues.value.hour = newHour\n\n      if ('dayPeriod' in props.segmentValues.value && newHour !== null) {\n        // Determine AM/PM based on internal 24-hour value\n        // Hour 0-11 = AM, Hour 12-23 = PM\n        props.segmentValues.value.dayPeriod = newHour >= 12 ? 'PM' : 'AM'\n      }\n\n      return\n    }\n\n    if (isNumberString(e.key)) {\n      const num = Number.parseInt(e.key)\n      const is12Hour = props.hourCycle !== undefined\n        ? props.hourCycle === 12\n        : uses12HourFormat(props.formatter.getLocale())\n      const max = is12Hour ? 12 : 24\n\n      let displayPrev = prevValue\n      if (is12Hour && prevValue !== null) {\n        // 12 AM/PM should be treated as 0 internally even if it doesn't match the display\n        // otherwise repeatedly typing 0 will not advance to the next segment\n        displayPrev = prevValue % 12 === 0 ? 0 : (prevValue > 12 ? prevValue - 12 : prevValue)\n      }\n\n      const { value, moveToNext } = updateHour(max, num, displayPrev)\n\n      // Convert display hour back to internal 24-hour format\n      let internalValue = value\n      if (is12Hour && value !== null) {\n        const period = props.segmentValues.value.dayPeriod || 'AM'\n        if (value === 12) {\n          internalValue = period === 'AM' ? 0 : 12\n        }\n        else {\n          internalValue = period === 'PM' ? value + 12 : value\n        }\n      }\n\n      props.segmentValues.value.hour = internalValue\n\n      if (moveToNext)\n        props.focusNext()\n    }\n\n    if (e.key === kbd.BACKSPACE) {\n      props.hasLeftFocus.value = false\n      props.segmentValues.value.hour = deleteValue(prevValue)\n    }\n  }\n\n  function handleMinuteSegmentKeydown(e: KeyboardEvent) {\n    const dateRef = props.placeholder.value\n\n    if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key) || !('minute' in dateRef) || !('minute' in props.segmentValues.value))\n      return\n\n    const prevValue = props.segmentValues.value.minute\n\n    if (e.key === kbd.ARROW_UP || e.key === kbd.ARROW_DOWN) {\n      props.segmentValues.value.minute = minuteSecondIncrementation({ e, part: 'minute', dateRef: props.placeholder.value, prevValue })\n    }\n\n    if (isNumberString(e.key)) {\n      const num = Number.parseInt(e.key)\n\n      const { value, moveToNext } = updateMinuteOrSecond(num, prevValue)\n\n      props.segmentValues.value.minute = value\n\n      if (moveToNext)\n        props.focusNext()\n    }\n\n    if (e.key === kbd.BACKSPACE) {\n      props.hasLeftFocus.value = false\n      props.segmentValues.value.minute = deleteValue(prevValue)\n    }\n  }\n\n  function handleSecondSegmentKeydown(e: KeyboardEvent) {\n    const dateRef = props.placeholder.value\n\n    if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key) || !('second' in dateRef) || !('second' in props.segmentValues.value))\n      return\n\n    const prevValue = props.segmentValues.value.second\n\n    if (e.key === kbd.ARROW_UP || e.key === kbd.ARROW_DOWN) {\n      props.segmentValues.value.second = minuteSecondIncrementation({ e, part: 'second', dateRef: props.placeholder.value, prevValue })\n    }\n\n    if (isNumberString(e.key)) {\n      const num = Number.parseInt(e.key)\n      const { value, moveToNext } = updateMinuteOrSecond(num, prevValue)\n\n      props.segmentValues.value.second = value\n\n      if (moveToNext)\n        props.focusNext()\n    }\n\n    if (e.key === kbd.BACKSPACE) {\n      props.hasLeftFocus.value = false\n      props.segmentValues.value.second = deleteValue(prevValue)\n    }\n  }\n\n  function handleDayPeriodSegmentKeydown(e: KeyboardEvent) {\n    if (((!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key)) && e.key !== 'a' && e.key !== 'p') || !('hour' in props.placeholder.value) || !('dayPeriod' in props.segmentValues.value))\n      return\n\n    if (e.key === kbd.ARROW_UP || e.key === kbd.ARROW_DOWN) {\n      if (props.segmentValues.value.dayPeriod === 'AM') {\n        props.segmentValues.value.dayPeriod = 'PM'\n        props.segmentValues.value.hour = props.segmentValues.value.hour! + 12\n        return\n      }\n      props.segmentValues.value.dayPeriod = 'AM'\n      props.segmentValues.value.hour = props.segmentValues.value.hour! - 12\n      return\n    }\n\n    if (['a', 'A'].includes(e.key) && props.segmentValues.value.dayPeriod !== 'AM') {\n      props.segmentValues.value.dayPeriod = 'AM'\n      props.segmentValues.value.hour = props.segmentValues.value.hour! - 12\n      return\n    }\n\n    if (['p', 'P'].includes(e.key) && props.segmentValues.value.dayPeriod !== 'PM') {\n      props.segmentValues.value.dayPeriod = 'PM'\n      props.segmentValues.value.hour = props.segmentValues.value.hour! + 12\n    }\n  }\n\n  function handleSegmentClick(e: MouseEvent) {\n    const disabled = props.disabled.value\n    if (disabled)\n      e.preventDefault()\n  }\n\n  function handleSegmentKeydown(e: KeyboardEvent) {\n    // A genuine composition keydown sets `isComposing` or reports `key === 'Process'`.\n    // Don't use `keyCode === 229` alone: a CJK IME (e.g. Pinyin) keeps that flag set\n    // while passing a directly-typed key through, so a real digit (`key === '1'`)\n    // would be dropped and leak into the contenteditable as raw text.\n    if (e.isComposing || e.key === 'Process')\n      return\n\n    const disabled = props.disabled.value\n    const readonly = props.readonly.value\n    if (disabled || readonly)\n      return\n    if (e.key !== kbd.TAB)\n      e.preventDefault()\n    const segmentKeydownHandlers = {\n      day: handleDaySegmentKeydown,\n      month: handleMonthSegmentKeydown,\n      year: handleYearSegmentKeydown,\n      hour: handleHourSegmentKeydown,\n      minute: handleMinuteSegmentKeydown,\n      second: handleSecondSegmentKeydown,\n      dayPeriod: handleDayPeriodSegmentKeydown,\n      timeZoneName: () => { },\n    } as const\n\n    segmentKeydownHandlers[props.part as keyof typeof segmentKeydownHandlers](e)\n\n    if (![kbd.ARROW_LEFT, kbd.ARROW_RIGHT].includes(e.key) && e.key !== kbd.TAB && e.key !== kbd.SHIFT && isAcceptableSegmentKey(e.key)) {\n      if (Object.values(props.segmentValues.value).every(item => item !== null)) {\n        const updateObject = { ...props.segmentValues.value as Record<AnyExceptLiteral, number> }\n\n        // Set all date fields at once to avoid order-dependent constraints\n        // (e.g., setting day: 31 before month: 3 would incorrectly constrain the day)\n        const dateRef = props.placeholder.value.set(updateObject)\n\n        props.modelValue.value = dateRef.copy()\n      }\n    }\n  }\n\n  function handleSegmentFocusOut() {\n    if (!props.stepSnapping?.value)\n      return\n\n    if (props.part === 'hour' && 'hour' in props.segmentValues.value && props.segmentValues.value.hour !== null && props.step.value.hour && props.step.value.hour > 1) {\n      props.segmentValues.value.hour = snapValueToStep(props.segmentValues.value.hour, 0, 23, props.step.value.hour)\n      if ('dayPeriod' in props.segmentValues.value) {\n        if (props.segmentValues.value.hour < 12)\n          props.segmentValues.value.dayPeriod = 'AM'\n        else if (props.segmentValues.value.hour)\n          props.segmentValues.value.dayPeriod = 'PM'\n      }\n    }\n    else if (props.part === 'minute' && 'minute' in props.segmentValues.value && props.segmentValues.value.minute !== null && props.step.value.minute && props.step.value.minute > 1) {\n      props.segmentValues.value.minute = snapValueToStep(props.segmentValues.value.minute, 0, 59, props.step.value.minute)\n    }\n    else if (props.part === 'second' && 'second' in props.segmentValues.value && props.segmentValues.value.second !== null && props.step.value.second && props.step.value.second > 1) {\n      props.segmentValues.value.second = snapValueToStep(props.segmentValues.value.second, 0, 59, props.step.value.second)\n    }\n\n    if (Object.values(props.segmentValues.value).every(item => item !== null)) {\n      const dateRef = props.placeholder.value.set({ ...props.segmentValues.value as Record<AnyExceptLiteral, number> })\n      props.modelValue.value = dateRef.copy()\n    }\n  }\n\n  // Snapshot of the segment's child nodes (and their text) before the IME mutates\n  // the contenteditable. Vue renders the value into one text node but may keep\n  // empty sibling text nodes around it, so we must preserve EVERY node it owns and\n  // restore them verbatim on `compositionend`. Recreating nodes (textContent) would\n  // detach Vue's binding and freeze the segment; recreating the element isn't an\n  // option either, since the root captures segment elements once via\n  // `getSegmentElements` and a fresh node would break navigation.\n  let preCompositionNodes: { node: ChildNode, value: string | null }[] | null = null\n\n  function handleSegmentBeforeInput(e: InputEvent) {\n    // The segment's text is driven programmatically (keydown -> segmentValues ->\n    // Vue render), so the contenteditable must never be edited directly. Safari\n    // dispatches `beforeinput`/`input` BEFORE `keydown` while an IME is active,\n    // so a passed-through key (e.g. a digit typed while Pinyin is selected) would\n    // leak into the DOM as raw text before `handleSegmentKeydown` can prevent it.\n    // Composition input keeps `isComposing` true, so let it through and reconcile\n    // on `compositionend`.\n    if (!e.isComposing)\n      e.preventDefault()\n  }\n\n  function handleSegmentCompositionStart(e: CompositionEvent) {\n    const el = e.target as HTMLElement\n    preCompositionNodes = Array.from(el.childNodes, node => ({ node, value: node.nodeValue }))\n  }\n\n  function handleSegmentCompositionEnd(e: CompositionEvent) {\n    const el = e.target as HTMLElement\n    const original = preCompositionNodes\n    preCompositionNodes = null\n\n    // Restore Vue's original nodes (with their text) and drop anything the IME\n    // inserted, keeping Vue's bindings intact so later renders still patch the DOM.\n    // When no composition was tracked (e.g. synthetic events in tests) leave it be.\n    if (original) {\n      for (const { node, value } of original)\n        node.nodeValue = value\n      el.replaceChildren(...original.map(o => o.node))\n    }\n\n    const data = e.data\n    if (!data)\n      return\n\n    for (const char of data) {\n      if (!DIGIT_REG.test(char))\n        continue\n\n      // Dispatch to the focused segment so subsequent digits follow focus\n      // after `focusNext()` advances to the next segment (e.g. \"34\" → 3 in day, 4 in month).\n      const target = getActiveElement()\n      if (!(target instanceof HTMLElement))\n        break\n\n      target.dispatchEvent(new KeyboardEvent('keydown', {\n        key: char,\n        bubbles: true,\n        cancelable: true,\n      }))\n    }\n  }\n\n  return {\n    handleSegmentClick,\n    handleSegmentKeydown,\n    handleSegmentBeforeInput,\n    handleSegmentCompositionStart,\n    handleSegmentCompositionEnd,\n    handleSegmentFocusOut,\n    attributes,\n  }\n}\n","/*\n  * Adapted from https://github.com/melt-ui/melt-ui/blob/develop/src/lib/builders/calendar/create.ts\n*/\n\nimport type { DateFields, DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Grid, Matcher, WeekDayFormat, WeekStartsOn } from '@/date'\nimport type { DateFormatterOptions } from '@/shared/useDateFormatter'\nimport { isEqualMonth, isSameDay, isSameMonth } from '@internationalized/date'\nimport { computed, ref, watch } from 'vue'\nimport { createMonths, getDaysInMonth, isAfter, isBefore, toDate } from '@/date'\nimport { useDateFormatter } from '@/shared'\n\nexport type UseCalendarProps = {\n  locale: Ref<string>\n  placeholder: Ref<DateValue>\n  weekStartsOn: Ref<WeekStartsOn>\n  fixedWeeks: Ref<boolean>\n  numberOfMonths: Ref<number>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n  disabled: Ref<boolean>\n  weekdayFormat: Ref<WeekDayFormat>\n  pagedNavigation: Ref<boolean>\n  isDateDisabled?: Matcher\n  isDateUnavailable?: Matcher\n  calendarLabel: Ref<string | undefined>\n  nextPage: Ref<((placeholder: DateValue) => DateValue) | undefined>\n  prevPage: Ref<((placeholder: DateValue) => DateValue) | undefined>\n}\n\nexport type UseCalendarStateProps = {\n  isDateDisabled: Matcher\n  isDateUnavailable: Matcher\n  date: Ref<DateValue | DateValue[] | undefined>\n}\n\nexport function useCalendarState(props: UseCalendarStateProps) {\n  function isDateSelected(dateObj: DateValue) {\n    if (Array.isArray(props.date.value))\n      return props.date.value.some(d => isSameDay(d, dateObj))\n\n    else if (!props.date.value)\n      return false\n\n    else\n      return isSameDay(props.date.value, dateObj)\n  }\n\n  const isInvalid = computed(\n    () => {\n      if (Array.isArray(props.date.value)) {\n        if (!props.date.value.length)\n          return false\n        for (const dateObj of props.date.value) {\n          if (props.isDateDisabled?.(dateObj))\n            return true\n          if (props.isDateUnavailable?.(dateObj))\n            return true\n        }\n      }\n      else {\n        if (!props.date.value)\n          return false\n        if (props.isDateDisabled?.(props.date.value))\n          return true\n        if (props.isDateUnavailable?.(props.date.value))\n          return true\n      }\n      return false\n    },\n  )\n\n  const hasSelectedDate = computed(() => {\n    return Array.isArray(props.date.value) ? props.date.value.length > 0 : !!props.date.value\n  })\n\n  const isSelectedDateDisabled = computed(() => {\n    if (Array.isArray(props.date.value)) {\n      if (!props.date.value.length)\n        return false\n      return props.date.value.some(dateObj => props.isDateDisabled?.(dateObj))\n    }\n    if (!props.date.value)\n      return false\n    return !!props.isDateDisabled?.(props.date.value)\n  })\n\n  return {\n    isDateSelected,\n    isInvalid,\n    hasSelectedDate,\n    isSelectedDateDisabled,\n  }\n}\n\nfunction handleNextDisabled(lastPeriodInView: DateValue, nextPageFunc: (date: DateValue) => DateValue): DateValue {\n  const firstPeriodOfNextPage = nextPageFunc(lastPeriodInView)\n  const diff = firstPeriodOfNextPage.compare(lastPeriodInView)\n  const duration: DateFields = {}\n  if (diff >= 7)\n    duration.day = 1\n  if (diff >= getDaysInMonth(lastPeriodInView))\n    duration.month = 1\n  return firstPeriodOfNextPage.set({ ...duration })\n}\nfunction handlePrevDisabled(firstPeriodInView: DateValue, prevPageFunc: (date: DateValue) => DateValue): DateValue {\n  const lastPeriodOfPrevPage = prevPageFunc(firstPeriodInView)\n  const diff = firstPeriodInView.compare(lastPeriodOfPrevPage)\n  const duration: DateFields = {}\n  if (diff >= 7)\n    duration.day = 35\n  if (diff >= getDaysInMonth(firstPeriodInView))\n    duration.month = 13\n  return lastPeriodOfPrevPage.set({ ...duration })\n}\nfunction handleNextPage(date: DateValue, nextPageFunc: (date: DateValue) => DateValue): DateValue {\n  return nextPageFunc(date)\n}\n\nfunction handlePrevPage(date: DateValue, prevPageFunc: (date: DateValue) => DateValue): DateValue {\n  return prevPageFunc(date)\n}\n\nexport function useCalendar(props: UseCalendarProps) {\n  const formatter = useDateFormatter(props.locale.value)\n\n  const headingFormatOptions = computed(() => {\n    const options: DateFormatterOptions = {\n      calendar: props.placeholder.value.calendar.identifier,\n    }\n\n    if (props.placeholder.value.calendar.identifier === 'gregory' && props.placeholder.value.era === 'BC')\n      options.era = 'short'\n\n    return options\n  })\n\n  const grid = ref<Grid<DateValue>[]>(createMonths({\n    dateObj: props.placeholder.value,\n    weekStartsOn: props.weekStartsOn.value,\n    locale: props.locale.value,\n    fixedWeeks: props.fixedWeeks.value,\n    numberOfMonths: props.numberOfMonths.value,\n  })) as Ref<Grid<DateValue>[]>\n\n  const visibleView = computed(() => {\n    return grid.value.map(month => month.value)\n  })\n\n  function isOutsideVisibleView(date: DateValue) {\n    return !visibleView.value.some(month => isEqualMonth(date, month))\n  }\n\n  const isNextButtonDisabled = (nextPageFunc?: (date: DateValue) => DateValue) => {\n    if (!props.maxValue.value || !grid.value.length)\n      return false\n    if (props.disabled.value)\n      return true\n\n    const lastPeriodInView = grid.value.at(-1)!.value\n\n    if (!nextPageFunc && !props.nextPage.value) {\n      const firstPeriodOfNextPage = lastPeriodInView.add({ months: 1 }).set({ day: 1 })\n      return isAfter(firstPeriodOfNextPage, props.maxValue.value)\n    }\n\n    const firstPeriodOfNextPage = handleNextDisabled(lastPeriodInView, nextPageFunc || props.nextPage.value!)\n    return isAfter(firstPeriodOfNextPage, props.maxValue.value)\n  }\n\n  const isPrevButtonDisabled = (prevPageFunc?: (date: DateValue) => DateValue) => {\n    if (!props.minValue.value || !grid.value.length)\n      return false\n    if (props.disabled.value)\n      return true\n    const firstPeriodInView = grid.value[0].value\n\n    if (!prevPageFunc && !props.prevPage.value) {\n      const lastPeriodOfPrevPage = firstPeriodInView.subtract({ months: 1 }).set({ day: 35 })\n      return isBefore(lastPeriodOfPrevPage, props.minValue.value)\n    }\n\n    const lastPeriodOfPrevPage = handlePrevDisabled(firstPeriodInView, prevPageFunc || props.prevPage.value!)\n    return isBefore(lastPeriodOfPrevPage, props.minValue.value)\n  }\n\n  function isDateDisabled(dateObj: DateValue) {\n    if (props.isDateDisabled?.(dateObj) || props.disabled.value)\n      return true\n    if (props.maxValue.value && isAfter(dateObj, props.maxValue.value))\n      return true\n    if (props.minValue.value && isBefore(dateObj, props.minValue.value))\n      return true\n    return false\n  }\n\n  const isDateUnavailable = (date: DateValue) => {\n    if (props.isDateUnavailable?.(date))\n      return true\n    return false\n  }\n\n  const weekdays = computed(() => {\n    if (!grid.value.length)\n      return []\n    return grid.value[0].rows[0].map((date) => {\n      return formatter.dayOfWeek(toDate(date), props.weekdayFormat.value)\n    })\n  })\n\n  const nextPage = (nextPageFunc?: (date: DateValue) => DateValue) => {\n    const firstDate = grid.value[0].value\n\n    if (!nextPageFunc && !props.nextPage.value) {\n      const newDate = firstDate.add({ months: props.pagedNavigation.value ? props.numberOfMonths.value : 1 })\n\n      const newGrid = createMonths({\n        dateObj: newDate,\n        weekStartsOn: props.weekStartsOn.value,\n        locale: props.locale.value,\n        fixedWeeks: props.fixedWeeks.value,\n        numberOfMonths: props.numberOfMonths.value,\n      })\n\n      grid.value = newGrid\n\n      props.placeholder.value = newGrid[0].value.set({ day: 1 })\n      return\n    }\n\n    const newDate = handleNextPage(firstDate, nextPageFunc || props.nextPage.value!)\n    const newGrid = createMonths({\n      dateObj: newDate,\n      weekStartsOn: props.weekStartsOn.value,\n      locale: props.locale.value,\n      fixedWeeks: props.fixedWeeks.value,\n      numberOfMonths: props.numberOfMonths.value,\n    })\n\n    grid.value = newGrid\n\n    const duration: DateFields = {}\n\n    // Do not adjust the placeholder if the nextPageFunc is defined (overwrite)\n    if (!nextPageFunc) {\n      const diff = newGrid[0].value.compare(firstDate)\n      if (diff >= getDaysInMonth(firstDate))\n        duration.day = 1\n\n      if (diff >= 365)\n        duration.month = 1\n    }\n\n    props.placeholder.value = newGrid[0].value.set({ ...duration })\n  }\n\n  const prevPage = (prevPageFunc?: (date: DateValue) => DateValue) => {\n    const firstDate = grid.value[0].value\n\n    if (!prevPageFunc && !props.prevPage.value) {\n      const newDate = firstDate.subtract({ months: props.pagedNavigation.value ? props.numberOfMonths.value : 1 })\n\n      const newGrid = createMonths({\n        dateObj: newDate,\n        weekStartsOn: props.weekStartsOn.value,\n        locale: props.locale.value,\n        fixedWeeks: props.fixedWeeks.value,\n        numberOfMonths: props.numberOfMonths.value,\n      })\n\n      grid.value = newGrid\n\n      props.placeholder.value = newGrid[0].value.set({ day: 1 })\n      return\n    }\n\n    const newDate = handlePrevPage(firstDate, prevPageFunc || props.prevPage.value!)\n    const newGrid = createMonths({\n      dateObj: newDate,\n      weekStartsOn: props.weekStartsOn.value,\n      locale: props.locale.value,\n      fixedWeeks: props.fixedWeeks.value,\n      numberOfMonths: props.numberOfMonths.value,\n    })\n\n    grid.value = newGrid\n\n    const duration: DateFields = {}\n\n    // Do not adjust the placeholder if the prevPageFunc is defined (overwrite)\n    if (!prevPageFunc) {\n      const diff = firstDate.compare(newGrid[0].value)\n      if (diff >= getDaysInMonth(firstDate))\n        duration.day = 1\n\n      if (diff >= 365)\n        duration.month = 1\n    }\n\n    props.placeholder.value = newGrid[0].value.set({ ...duration })\n  }\n\n  watch(props.placeholder, (value) => {\n    if (visibleView.value.some(month => isEqualMonth(month, value)))\n      return\n    grid.value = createMonths({\n      dateObj: value,\n      weekStartsOn: props.weekStartsOn.value,\n      locale: props.locale.value,\n      fixedWeeks: props.fixedWeeks.value,\n      numberOfMonths: props.numberOfMonths.value,\n    })\n  })\n\n  watch([props.locale, props.weekStartsOn, props.fixedWeeks, props.numberOfMonths], () => {\n    grid.value = createMonths({\n      dateObj: props.placeholder.value,\n      weekStartsOn: props.weekStartsOn.value,\n      locale: props.locale.value,\n      fixedWeeks: props.fixedWeeks.value,\n      numberOfMonths: props.numberOfMonths.value,\n    })\n  })\n\n  const headingValue = computed(() => {\n    if (!grid.value.length)\n      return ''\n\n    if (props.locale.value !== formatter.getLocale())\n      formatter.setLocale(props.locale.value)\n\n    if (grid.value.length === 1) {\n      const month = grid.value[0].value\n      return `${formatter.fullMonthAndYear(toDate(month), headingFormatOptions.value)}`\n    }\n\n    const startMonth = toDate(grid.value[0].value)\n    const endMonth = toDate(grid.value.at(-1)!.value)\n\n    const startMonthName = formatter.fullMonth(startMonth, headingFormatOptions.value)\n    const endMonthName = formatter.fullMonth(endMonth, headingFormatOptions.value)\n    const startMonthYear = formatter.fullYear(startMonth, headingFormatOptions.value)\n    const endMonthYear = formatter.fullYear(endMonth, headingFormatOptions.value)\n\n    const content\n      = startMonthYear === endMonthYear\n        ? `${startMonthName} - ${endMonthName} ${endMonthYear}`\n        : `${startMonthName} ${startMonthYear} - ${endMonthName} ${endMonthYear}`\n\n    return content\n  })\n\n  const fullCalendarLabel = computed(() => `${props.calendarLabel.value ?? 'Event Date'}, ${headingValue.value}`)\n\n  const isPlaceholderFocusable = computed(() => {\n    return !(isDateDisabled(props.placeholder.value) || isDateUnavailable(props.placeholder.value) || isOutsideVisibleView(props.placeholder.value))\n  })\n\n  const firstFocusableDate = computed(() => {\n    for (const month of grid.value) {\n      if (props.minValue.value && isBefore(month.value, props.minValue.value))\n        continue\n\n      const daysInMonth = getDaysInMonth(month.value)\n      const startDay = props.minValue.value && isSameMonth(props.minValue.value, month.value) ? props.minValue.value.day : 1\n\n      for (let day = startDay; day <= daysInMonth; day++) {\n        const date = month.value.set({ day })\n        if (isDateDisabled(date) || isDateUnavailable(date))\n          continue\n        return date\n      }\n    }\n  })\n\n  return {\n    isDateDisabled,\n    isDateUnavailable,\n    isNextButtonDisabled,\n    isPrevButtonDisabled,\n    grid,\n    weekdays,\n    visibleView,\n    isOutsideVisibleView,\n    formatter,\n    nextPage,\n    prevPage,\n    headingValue,\n    fullCalendarLabel,\n    isPlaceholderFocusable,\n    firstFocusableDate,\n  }\n}\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\n\nimport type { Ref } from 'vue'\nimport type { Grid, Matcher, WeekDayFormat, WeekStartsOn } from '@/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nimport type { Formatter } from '@/shared'\nimport type { Direction } from '@/shared/types'\nimport { isEqualDay, isSameDay } from '@internationalized/date'\nimport { getWeekStartsOn } from '@/date'\nimport { createContext, useDirection, useLocale } from '@/shared'\nimport { getDefaultDate, handleCalendarInitialFocus } from '@/shared/date'\nimport { useCalendar, useCalendarState } from './useCalendar'\n\ntype CalendarRootContext = {\n  locale: Ref<string>\n  modelValue: Ref<DateValue | DateValue[] | undefined>\n  placeholder: Ref<DateValue>\n  pagedNavigation: Ref<boolean>\n  preventDeselect: Ref<boolean>\n  grid: Ref<Grid<DateValue>[]>\n  weekDays: Ref<string[]>\n  weekStartsOn: Ref<WeekStartsOn>\n  weekdayFormat: Ref<WeekDayFormat>\n  fixedWeeks: Ref<boolean>\n  multiple: Ref<boolean>\n  numberOfMonths: Ref<number>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  initialFocus: Ref<boolean>\n  onDateChange: (date: DateValue) => void\n  onPlaceholderChange: (date: DateValue) => void\n  fullCalendarLabel: Ref<string>\n  parentElement: Ref<HTMLElement | undefined>\n  headingValue: Ref<string>\n  isInvalid: Ref<boolean>\n  isDateDisabled: Matcher\n  isDateSelected: Matcher\n  isDateUnavailable?: Matcher\n  isOutsideVisibleView: (date: DateValue) => boolean\n  prevPage: (prevPageFunc?: (date: DateValue) => DateValue) => void\n  nextPage: (nextPageFunc?: (date: DateValue) => DateValue) => void\n  isNextButtonDisabled: (nextPageFunc?: (date: DateValue) => DateValue) => boolean\n  isPrevButtonDisabled: (prevPageFunc?: (date: DateValue) => DateValue) => boolean\n  formatter: Formatter\n  dir: Ref<Direction>\n  disableDaysOutsideCurrentView: Ref<boolean>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n  isPlaceholderFocusable: Ref<boolean>\n  firstFocusableDate: Ref<DateValue | undefined>\n  hasSelectedDate: Ref<boolean>\n  isSelectedDateDisabled: Ref<boolean>\n}\n\nexport interface CalendarRootProps extends PrimitiveProps {\n  /** The default value for the calendar */\n  defaultValue?: DateValue\n  /** The default placeholder date */\n  defaultPlaceholder?: DateValue\n  /** The placeholder date, which is used to determine what month to display when no date is selected */\n  placeholder?: DateValue\n  /** This property causes the previous and next buttons to navigate by the number of months displayed at once, rather than one month */\n  pagedNavigation?: boolean\n  /** Whether or not to prevent the user from deselecting a date without selecting another date first */\n  preventDeselect?: boolean\n  /** The day of the week to start the calendar on */\n  weekStartsOn?: WeekStartsOn\n  /** The format to use for the weekday strings provided via the weekdays slot prop */\n  weekdayFormat?: WeekDayFormat\n  /** The accessible label for the calendar */\n  calendarLabel?: string\n  /** Whether or not to always display 6 weeks in the calendar */\n  fixedWeeks?: boolean\n  /** The maximum date that can be selected */\n  maxValue?: DateValue\n  /** The minimum date that can be selected */\n  minValue?: DateValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** The number of months to display at once */\n  numberOfMonths?: number\n  /** Whether the calendar is disabled */\n  disabled?: boolean\n  /** Whether the calendar is readonly */\n  readonly?: boolean\n  /** If true, the calendar will focus the selected day, today, or the first day of the month depending on what is visible when the calendar is mounted */\n  initialFocus?: boolean\n  /** A function that returns whether or not a date is disabled */\n  isDateDisabled?: Matcher\n  /** A function that returns whether or not a date is unavailable */\n  isDateUnavailable?: Matcher\n  /** The reading direction of the calendar when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** A function that returns the next page of the calendar. It receives the current placeholder as an argument inside the component. */\n  nextPage?: (placeholder: DateValue) => DateValue\n  /** A function that returns the previous page of the calendar. It receives the current placeholder as an argument inside the component. */\n  prevPage?: (placeholder: DateValue) => DateValue\n  /** The controlled selected date value of the calendar. Can be bound as `v-model`. */\n  modelValue?: DateValue | DateValue[] | null\n  /** Whether multiple dates can be selected */\n  multiple?: boolean\n  /** Whether or not to disable days outside the current view. */\n  disableDaysOutsideCurrentView?: boolean\n}\n\nexport type CalendarRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateValue | undefined]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n}\n\nexport const [injectCalendarRootContext, provideCalendarRootContext]\n  = createContext<CalendarRootContext>('CalendarRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, onMounted, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<CalendarRootProps>(), {\n  defaultValue: undefined,\n  as: 'div',\n  pagedNavigation: false,\n  preventDeselect: false,\n  weekdayFormat: 'narrow',\n  fixedWeeks: false,\n  multiple: false,\n  numberOfMonths: 1,\n  disabled: false,\n  readonly: false,\n  initialFocus: false,\n  placeholder: undefined,\n  isDateDisabled: undefined,\n  isDateUnavailable: undefined,\n  disableDaysOutsideCurrentView: false,\n})\nconst emits = defineEmits<CalendarRootEmits>()\ndefineSlots<{\n  default?: (props: {\n    /** The current date of the placeholder */\n    date: DateValue\n    /** The grid of dates */\n    grid: Grid<DateValue>[]\n    /** The days of the week */\n    weekDays: string[]\n    /** The start of the week */\n    weekStartsOn: WeekStartsOn\n    /** The calendar locale */\n    locale: string\n    /** Whether or not to always display 6 weeks in the calendar */\n    fixedWeeks: boolean\n    /** The current date of the calendar */\n    modelValue: DateValue | DateValue[] | undefined\n  }) => any\n}>()\n\nconst {\n  disabled,\n  readonly,\n  initialFocus,\n  pagedNavigation,\n  weekdayFormat,\n  fixedWeeks,\n  multiple,\n  minValue,\n  maxValue,\n  numberOfMonths,\n  preventDeselect,\n  isDateDisabled: propsIsDateDisabled,\n  isDateUnavailable: propsIsDateUnavailable,\n  calendarLabel,\n  defaultValue,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n  dir: propDir,\n  locale: propLocale,\n  disableDaysOutsideCurrentView,\n} = toRefs(props)\n\nconst { primitiveElement, currentElement: parentElement }\n  = usePrimitiveElement()\nconst locale = useLocale(propLocale)\nconst dir = useDirection(propDir)\nconst weekStartsOn = computed(() => props.weekStartsOn ?? getWeekStartsOn(locale.value))\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: defaultValue.value,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateValue | DateValue[] | undefined>\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  defaultValue: modelValue.value,\n  locale: props.locale,\n})\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nfunction onPlaceholderChange(value: DateValue) {\n  placeholder.value = value.copy()\n}\n\nconst {\n  fullCalendarLabel,\n  headingValue,\n  isDateDisabled,\n  isDateUnavailable,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  weekdays,\n  isOutsideVisibleView,\n  nextPage,\n  prevPage,\n  formatter,\n  grid,\n  isPlaceholderFocusable,\n  firstFocusableDate,\n} = useCalendar({\n  locale,\n  placeholder,\n  weekStartsOn,\n  fixedWeeks,\n  numberOfMonths,\n  minValue,\n  maxValue,\n  disabled,\n  weekdayFormat,\n  pagedNavigation,\n  isDateDisabled: propsIsDateDisabled.value,\n  isDateUnavailable: propsIsDateUnavailable.value,\n  calendarLabel,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n})\n\nconst {\n  isInvalid,\n  isDateSelected,\n  hasSelectedDate,\n  isSelectedDateDisabled,\n} = useCalendarState({\n  date: modelValue,\n  isDateDisabled,\n  isDateUnavailable,\n})\n\nwatch(modelValue, (_modelValue) => {\n  if (Array.isArray(_modelValue) && _modelValue.length) {\n    const lastValue = _modelValue.at(-1)\n    if (lastValue && !isEqualDay(placeholder.value, lastValue))\n      onPlaceholderChange(lastValue)\n  }\n  else if (!Array.isArray(_modelValue) && _modelValue && !isEqualDay(placeholder.value, _modelValue)) {\n    onPlaceholderChange(_modelValue)\n  }\n})\n\nfunction onDateChange(value: DateValue) {\n  if (!multiple.value) {\n    if (!modelValue.value) {\n      modelValue.value = value.copy()\n      return\n    }\n\n    if (!preventDeselect.value && isEqualDay(modelValue.value as DateValue, value)) {\n      placeholder.value = value.copy()\n      modelValue.value = undefined\n    }\n    else { modelValue.value = value.copy() }\n  }\n  else if (!modelValue.value) {\n    modelValue.value = [value.copy()]\n  }\n  else if (Array.isArray(modelValue.value)) {\n    const index = modelValue.value.findIndex(date => isSameDay(date, value))\n    if (index === -1) {\n      modelValue.value = [...modelValue.value, value]\n    }\n    else if (!preventDeselect.value) {\n      const next = modelValue.value.filter(date => !isSameDay(date, value))\n      if (!next.length) {\n        placeholder.value = value.copy()\n        modelValue.value = undefined\n        return\n      }\n      modelValue.value = next.map(date => date.copy())\n    }\n  }\n}\n\nonMounted(() => {\n  if (initialFocus.value)\n    handleCalendarInitialFocus(parentElement.value)\n})\n\nprovideCalendarRootContext({\n  isDateUnavailable,\n  dir,\n  isDateDisabled,\n  locale,\n  formatter,\n  modelValue,\n  placeholder,\n  disabled,\n  initialFocus,\n  pagedNavigation,\n  grid,\n  weekDays: weekdays,\n  weekStartsOn,\n  weekdayFormat,\n  fixedWeeks,\n  multiple,\n  numberOfMonths,\n  readonly,\n  preventDeselect,\n  fullCalendarLabel,\n  headingValue,\n  isInvalid,\n  isDateSelected,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  isOutsideVisibleView,\n  nextPage,\n  prevPage,\n  parentElement,\n  onPlaceholderChange,\n  onDateChange,\n  disableDaysOutsideCurrentView,\n  minValue,\n  maxValue,\n  isPlaceholderFocusable,\n  firstFocusableDate,\n  hasSelectedDate,\n  isSelectedDateDisabled,\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-label=\"fullCalendarLabel\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n  >\n    <slot\n      :date=\"placeholder\"\n      :grid=\"grid\"\n      :week-days=\"weekdays\"\n      :week-starts-on=\"weekStartsOn\"\n      :locale=\"locale\"\n      :fixed-weeks=\"fixedWeeks\"\n      :model-value=\"modelValue\"\n    />\n    <div\n      style=\"border: 0px; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; white-space: nowrap; width: 1px;\"\n    >\n      <div\n        role=\"heading\"\n        aria-level=\"2\"\n      >\n        {{ fullCalendarLabel }}\n      </div>\n    </div>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\n\nimport type { Ref } from 'vue'\nimport type { Grid, Matcher, WeekDayFormat, WeekStartsOn } from '@/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nimport type { Formatter } from '@/shared'\nimport type { Direction } from '@/shared/types'\nimport { isEqualDay, isSameDay } from '@internationalized/date'\nimport { getWeekStartsOn } from '@/date'\nimport { createContext, useDirection, useLocale } from '@/shared'\nimport { getDefaultDate, handleCalendarInitialFocus } from '@/shared/date'\nimport { useCalendar, useCalendarState } from './useCalendar'\n\ntype CalendarRootContext = {\n  locale: Ref<string>\n  modelValue: Ref<DateValue | DateValue[] | undefined>\n  placeholder: Ref<DateValue>\n  pagedNavigation: Ref<boolean>\n  preventDeselect: Ref<boolean>\n  grid: Ref<Grid<DateValue>[]>\n  weekDays: Ref<string[]>\n  weekStartsOn: Ref<WeekStartsOn>\n  weekdayFormat: Ref<WeekDayFormat>\n  fixedWeeks: Ref<boolean>\n  multiple: Ref<boolean>\n  numberOfMonths: Ref<number>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  initialFocus: Ref<boolean>\n  onDateChange: (date: DateValue) => void\n  onPlaceholderChange: (date: DateValue) => void\n  fullCalendarLabel: Ref<string>\n  parentElement: Ref<HTMLElement | undefined>\n  headingValue: Ref<string>\n  isInvalid: Ref<boolean>\n  isDateDisabled: Matcher\n  isDateSelected: Matcher\n  isDateUnavailable?: Matcher\n  isOutsideVisibleView: (date: DateValue) => boolean\n  prevPage: (prevPageFunc?: (date: DateValue) => DateValue) => void\n  nextPage: (nextPageFunc?: (date: DateValue) => DateValue) => void\n  isNextButtonDisabled: (nextPageFunc?: (date: DateValue) => DateValue) => boolean\n  isPrevButtonDisabled: (prevPageFunc?: (date: DateValue) => DateValue) => boolean\n  formatter: Formatter\n  dir: Ref<Direction>\n  disableDaysOutsideCurrentView: Ref<boolean>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n  isPlaceholderFocusable: Ref<boolean>\n  firstFocusableDate: Ref<DateValue | undefined>\n  hasSelectedDate: Ref<boolean>\n  isSelectedDateDisabled: Ref<boolean>\n}\n\nexport interface CalendarRootProps extends PrimitiveProps {\n  /** The default value for the calendar */\n  defaultValue?: DateValue\n  /** The default placeholder date */\n  defaultPlaceholder?: DateValue\n  /** The placeholder date, which is used to determine what month to display when no date is selected */\n  placeholder?: DateValue\n  /** This property causes the previous and next buttons to navigate by the number of months displayed at once, rather than one month */\n  pagedNavigation?: boolean\n  /** Whether or not to prevent the user from deselecting a date without selecting another date first */\n  preventDeselect?: boolean\n  /** The day of the week to start the calendar on */\n  weekStartsOn?: WeekStartsOn\n  /** The format to use for the weekday strings provided via the weekdays slot prop */\n  weekdayFormat?: WeekDayFormat\n  /** The accessible label for the calendar */\n  calendarLabel?: string\n  /** Whether or not to always display 6 weeks in the calendar */\n  fixedWeeks?: boolean\n  /** The maximum date that can be selected */\n  maxValue?: DateValue\n  /** The minimum date that can be selected */\n  minValue?: DateValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** The number of months to display at once */\n  numberOfMonths?: number\n  /** Whether the calendar is disabled */\n  disabled?: boolean\n  /** Whether the calendar is readonly */\n  readonly?: boolean\n  /** If true, the calendar will focus the selected day, today, or the first day of the month depending on what is visible when the calendar is mounted */\n  initialFocus?: boolean\n  /** A function that returns whether or not a date is disabled */\n  isDateDisabled?: Matcher\n  /** A function that returns whether or not a date is unavailable */\n  isDateUnavailable?: Matcher\n  /** The reading direction of the calendar when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** A function that returns the next page of the calendar. It receives the current placeholder as an argument inside the component. */\n  nextPage?: (placeholder: DateValue) => DateValue\n  /** A function that returns the previous page of the calendar. It receives the current placeholder as an argument inside the component. */\n  prevPage?: (placeholder: DateValue) => DateValue\n  /** The controlled selected date value of the calendar. Can be bound as `v-model`. */\n  modelValue?: DateValue | DateValue[] | null\n  /** Whether multiple dates can be selected */\n  multiple?: boolean\n  /** Whether or not to disable days outside the current view. */\n  disableDaysOutsideCurrentView?: boolean\n}\n\nexport type CalendarRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateValue | undefined]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n}\n\nexport const [injectCalendarRootContext, provideCalendarRootContext]\n  = createContext<CalendarRootContext>('CalendarRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, onMounted, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<CalendarRootProps>(), {\n  defaultValue: undefined,\n  as: 'div',\n  pagedNavigation: false,\n  preventDeselect: false,\n  weekdayFormat: 'narrow',\n  fixedWeeks: false,\n  multiple: false,\n  numberOfMonths: 1,\n  disabled: false,\n  readonly: false,\n  initialFocus: false,\n  placeholder: undefined,\n  isDateDisabled: undefined,\n  isDateUnavailable: undefined,\n  disableDaysOutsideCurrentView: false,\n})\nconst emits = defineEmits<CalendarRootEmits>()\ndefineSlots<{\n  default?: (props: {\n    /** The current date of the placeholder */\n    date: DateValue\n    /** The grid of dates */\n    grid: Grid<DateValue>[]\n    /** The days of the week */\n    weekDays: string[]\n    /** The start of the week */\n    weekStartsOn: WeekStartsOn\n    /** The calendar locale */\n    locale: string\n    /** Whether or not to always display 6 weeks in the calendar */\n    fixedWeeks: boolean\n    /** The current date of the calendar */\n    modelValue: DateValue | DateValue[] | undefined\n  }) => any\n}>()\n\nconst {\n  disabled,\n  readonly,\n  initialFocus,\n  pagedNavigation,\n  weekdayFormat,\n  fixedWeeks,\n  multiple,\n  minValue,\n  maxValue,\n  numberOfMonths,\n  preventDeselect,\n  isDateDisabled: propsIsDateDisabled,\n  isDateUnavailable: propsIsDateUnavailable,\n  calendarLabel,\n  defaultValue,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n  dir: propDir,\n  locale: propLocale,\n  disableDaysOutsideCurrentView,\n} = toRefs(props)\n\nconst { primitiveElement, currentElement: parentElement }\n  = usePrimitiveElement()\nconst locale = useLocale(propLocale)\nconst dir = useDirection(propDir)\nconst weekStartsOn = computed(() => props.weekStartsOn ?? getWeekStartsOn(locale.value))\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: defaultValue.value,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateValue | DateValue[] | undefined>\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  defaultValue: modelValue.value,\n  locale: props.locale,\n})\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nfunction onPlaceholderChange(value: DateValue) {\n  placeholder.value = value.copy()\n}\n\nconst {\n  fullCalendarLabel,\n  headingValue,\n  isDateDisabled,\n  isDateUnavailable,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  weekdays,\n  isOutsideVisibleView,\n  nextPage,\n  prevPage,\n  formatter,\n  grid,\n  isPlaceholderFocusable,\n  firstFocusableDate,\n} = useCalendar({\n  locale,\n  placeholder,\n  weekStartsOn,\n  fixedWeeks,\n  numberOfMonths,\n  minValue,\n  maxValue,\n  disabled,\n  weekdayFormat,\n  pagedNavigation,\n  isDateDisabled: propsIsDateDisabled.value,\n  isDateUnavailable: propsIsDateUnavailable.value,\n  calendarLabel,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n})\n\nconst {\n  isInvalid,\n  isDateSelected,\n  hasSelectedDate,\n  isSelectedDateDisabled,\n} = useCalendarState({\n  date: modelValue,\n  isDateDisabled,\n  isDateUnavailable,\n})\n\nwatch(modelValue, (_modelValue) => {\n  if (Array.isArray(_modelValue) && _modelValue.length) {\n    const lastValue = _modelValue.at(-1)\n    if (lastValue && !isEqualDay(placeholder.value, lastValue))\n      onPlaceholderChange(lastValue)\n  }\n  else if (!Array.isArray(_modelValue) && _modelValue && !isEqualDay(placeholder.value, _modelValue)) {\n    onPlaceholderChange(_modelValue)\n  }\n})\n\nfunction onDateChange(value: DateValue) {\n  if (!multiple.value) {\n    if (!modelValue.value) {\n      modelValue.value = value.copy()\n      return\n    }\n\n    if (!preventDeselect.value && isEqualDay(modelValue.value as DateValue, value)) {\n      placeholder.value = value.copy()\n      modelValue.value = undefined\n    }\n    else { modelValue.value = value.copy() }\n  }\n  else if (!modelValue.value) {\n    modelValue.value = [value.copy()]\n  }\n  else if (Array.isArray(modelValue.value)) {\n    const index = modelValue.value.findIndex(date => isSameDay(date, value))\n    if (index === -1) {\n      modelValue.value = [...modelValue.value, value]\n    }\n    else if (!preventDeselect.value) {\n      const next = modelValue.value.filter(date => !isSameDay(date, value))\n      if (!next.length) {\n        placeholder.value = value.copy()\n        modelValue.value = undefined\n        return\n      }\n      modelValue.value = next.map(date => date.copy())\n    }\n  }\n}\n\nonMounted(() => {\n  if (initialFocus.value)\n    handleCalendarInitialFocus(parentElement.value)\n})\n\nprovideCalendarRootContext({\n  isDateUnavailable,\n  dir,\n  isDateDisabled,\n  locale,\n  formatter,\n  modelValue,\n  placeholder,\n  disabled,\n  initialFocus,\n  pagedNavigation,\n  grid,\n  weekDays: weekdays,\n  weekStartsOn,\n  weekdayFormat,\n  fixedWeeks,\n  multiple,\n  numberOfMonths,\n  readonly,\n  preventDeselect,\n  fullCalendarLabel,\n  headingValue,\n  isInvalid,\n  isDateSelected,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  isOutsideVisibleView,\n  nextPage,\n  prevPage,\n  parentElement,\n  onPlaceholderChange,\n  onDateChange,\n  disableDaysOutsideCurrentView,\n  minValue,\n  maxValue,\n  isPlaceholderFocusable,\n  firstFocusableDate,\n  hasSelectedDate,\n  isSelectedDateDisabled,\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-label=\"fullCalendarLabel\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n  >\n    <slot\n      :date=\"placeholder\"\n      :grid=\"grid\"\n      :week-days=\"weekdays\"\n      :week-starts-on=\"weekStartsOn\"\n      :locale=\"locale\"\n      :fixed-weeks=\"fixedWeeks\"\n      :model-value=\"modelValue\"\n    />\n    <div\n      style=\"border: 0px; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; white-space: nowrap; width: 1px;\"\n    >\n      <div\n        role=\"heading\"\n        aria-level=\"2\"\n      >\n        {{ fullCalendarLabel }}\n      </div>\n    </div>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarCellProps extends PrimitiveProps {\n  /** The date value for the cell */\n  date: DateValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectCalendarRootContext } from './CalendarRoot.vue'\n\nwithDefaults(defineProps<CalendarCellProps>(), { as: 'td' })\nconst rootContext = injectCalendarRootContext()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"gridcell\"\n    :aria-selected=\"rootContext.isDateSelected(date) ? true : undefined\"\n    :aria-disabled=\"rootContext.isDateDisabled(date) || rootContext.isDateUnavailable?.(date) || rootContext.disableDaysOutsideCurrentView.value\"\n    :data-disabled=\"rootContext.isDateDisabled(date) || rootContext.disableDaysOutsideCurrentView.value ? '' : undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarCellProps extends PrimitiveProps {\n  /** The date value for the cell */\n  date: DateValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectCalendarRootContext } from './CalendarRoot.vue'\n\nwithDefaults(defineProps<CalendarCellProps>(), { as: 'td' })\nconst rootContext = injectCalendarRootContext()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"gridcell\"\n    :aria-selected=\"rootContext.isDateSelected(date) ? true : undefined\"\n    :aria-disabled=\"rootContext.isDateDisabled(date) || rootContext.isDateUnavailable?.(date) || rootContext.disableDaysOutsideCurrentView.value\"\n    :data-disabled=\"rootContext.isDateDisabled(date) || rootContext.disableDaysOutsideCurrentView.value ? '' : undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport {\n\n  getLocalTimeZone,\n  isSameDay,\n  isSameMonth,\n  isToday,\n} from '@internationalized/date'\nimport { computed, nextTick } from 'vue'\nimport { toDate } from '@/date'\nimport { useKbd } from '@/shared'\n\nexport interface CalendarCellTriggerProps extends PrimitiveProps {\n  /** The date value provided to the cell trigger */\n  day: DateValue\n  /** The month in which the cell is rendered */\n  month: DateValue\n}\n\nexport interface CalendarCellTriggerSlot {\n  default?: (props: {\n    /** Current day */\n    dayValue: string\n    /** Current disable state */\n    disabled: boolean\n    /** Current selected state */\n    selected: boolean\n    /** Current today state */\n    today: boolean\n    /** Current outside view state */\n    outsideView: boolean\n    /** Current outside visible view state */\n    outsideVisibleView: boolean\n    /** Current unavailable state */\n    unavailable: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { injectCalendarRootContext } from './CalendarRoot.vue'\n\nconst props = withDefaults(defineProps<CalendarCellTriggerProps>(), {\n  as: 'div',\n})\n\ndefineSlots<CalendarCellTriggerSlot>()\n\nconst kbd = useKbd()\nconst rootContext = injectCalendarRootContext()\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nconst dayValue = computed(() => props.day.day.toLocaleString(rootContext.locale.value))\n\nconst labelText = computed(() => {\n  return rootContext.formatter.custom(toDate(props.day), {\n    weekday: 'long',\n    month: 'long',\n    day: 'numeric',\n    year: 'numeric',\n  })\n})\n\nconst isUnavailable = computed(() =>\n  rootContext.isDateUnavailable?.(props.day) ?? false,\n)\nconst isDateToday = computed(() => {\n  return isToday(props.day, getLocalTimeZone())\n})\nconst isOutsideView = computed(() => {\n  return !isSameMonth(props.day, props.month)\n})\n\nconst isOutsideVisibleView = computed(() =>\n  rootContext.isOutsideVisibleView(props.day),\n)\n\nconst isDisabled = computed(() => rootContext.isDateDisabled(props.day) || (rootContext.disableDaysOutsideCurrentView.value && isOutsideView.value))\n\nconst isFocusedDate = computed(() => {\n  if (isOutsideView.value || isDisabled.value)\n    return false\n  if (!rootContext.disabled.value && rootContext.isPlaceholderFocusable.value && isSameDay(props.day, rootContext.placeholder.value))\n    return true\n  if ((!rootContext.hasSelectedDate.value || rootContext.isSelectedDateDisabled.value) && !rootContext.isPlaceholderFocusable.value)\n    return rootContext.firstFocusableDate.value && isSameDay(props.day, rootContext.firstFocusableDate.value)\n  return false\n})\n\nconst isSelectedDate = computed(() => rootContext.isDateSelected(props.day))\n\nfunction changeDate(date: DateValue) {\n  if (rootContext.readonly.value)\n    return\n  if (rootContext.isDateDisabled(date) || rootContext.isDateUnavailable?.(date))\n    return\n\n  rootContext.onDateChange(date)\n}\n\nfunction handleClick() {\n  if (isDisabled.value)\n    return\n  changeDate(props.day)\n}\n\nfunction handleArrowKey(e: KeyboardEvent) {\n  if (isDisabled.value)\n    return\n  e.preventDefault()\n  e.stopPropagation()\n  const parentElement = rootContext.parentElement.value!\n  const indexIncrementation = 7\n  const sign = rootContext.dir.value === 'rtl' ? -1 : 1\n  switch (e.code) {\n    case kbd.ARROW_RIGHT:\n      shiftFocus(props.day, sign)\n      break\n    case kbd.ARROW_LEFT:\n      shiftFocus(props.day, -sign)\n      break\n    case kbd.ARROW_UP:\n      shiftFocus(props.day, -indexIncrementation)\n      break\n    case kbd.ARROW_DOWN:\n      shiftFocus(props.day, indexIncrementation)\n      break\n    case kbd.ENTER:\n    case kbd.SPACE_CODE:\n      changeDate(props.day)\n  }\n\n  function shiftFocus(day: DateValue, add: number) {\n    const candidateDayValue = day.add({ days: add })\n\n    if ((rootContext.minValue.value && candidateDayValue.compare(rootContext.minValue.value) < 0) || (rootContext.maxValue.value && candidateDayValue.compare(rootContext.maxValue.value) > 0))\n      return\n\n    const candidateDay = parentElement.querySelector<HTMLElement>(`[data-value='${candidateDayValue.toString()}']:not([data-outside-view])`)\n    // If the date is not found it means we must change the page\n    if (!candidateDay) {\n      if (add > 0) {\n        if (rootContext.isNextButtonDisabled())\n          return\n        rootContext.nextPage()\n      }\n      else {\n        if (rootContext.isPrevButtonDisabled())\n          return\n        rootContext.prevPage()\n      }\n      nextTick(() => {\n        shiftFocus(day, add)\n      })\n      return\n    }\n\n    if (candidateDay && candidateDay.hasAttribute('data-disabled')) {\n      return shiftFocus(candidateDayValue, add)\n    }\n    rootContext.onPlaceholderChange(candidateDayValue)\n    candidateDay?.focus()\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    role=\"button\"\n    :aria-label=\"labelText\"\n    data-reka-calendar-cell-trigger\n    :aria-disabled=\"isDisabled || isUnavailable ? true : undefined\"\n    :data-selected=\"isSelectedDate ? true : undefined\"\n    :data-value=\"day.toString()\"\n    :data-disabled=\"isDisabled ? '' : undefined\"\n    :data-unavailable=\"isUnavailable ? '' : undefined\"\n    :data-today=\"isDateToday ? '' : undefined\"\n    :data-outside-view=\"isOutsideView ? '' : undefined\"\n    :data-outside-visible-view=\"isOutsideVisibleView ? '' : undefined\"\n    :data-focused=\"isFocusedDate ? '' : undefined\"\n    :tabindex=\"isFocusedDate ? 0 : isOutsideView || isDisabled ? undefined : -1\"\n    @click=\"handleClick\"\n    @keydown.up.down.left.right.space.enter=\"handleArrowKey\"\n    @keydown.enter.prevent\n  >\n    <slot\n      :day-value=\"dayValue\"\n      :disabled=\"isDisabled\"\n      :today=\"isDateToday\"\n      :selected=\"isSelectedDate\"\n      :outside-view=\"isOutsideView\"\n      :outside-visible-view=\"isOutsideVisibleView\"\n      :unavailable=\"isUnavailable\"\n    >\n      {{ dayValue }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport {\n\n  getLocalTimeZone,\n  isSameDay,\n  isSameMonth,\n  isToday,\n} from '@internationalized/date'\nimport { computed, nextTick } from 'vue'\nimport { toDate } from '@/date'\nimport { useKbd } from '@/shared'\n\nexport interface CalendarCellTriggerProps extends PrimitiveProps {\n  /** The date value provided to the cell trigger */\n  day: DateValue\n  /** The month in which the cell is rendered */\n  month: DateValue\n}\n\nexport interface CalendarCellTriggerSlot {\n  default?: (props: {\n    /** Current day */\n    dayValue: string\n    /** Current disable state */\n    disabled: boolean\n    /** Current selected state */\n    selected: boolean\n    /** Current today state */\n    today: boolean\n    /** Current outside view state */\n    outsideView: boolean\n    /** Current outside visible view state */\n    outsideVisibleView: boolean\n    /** Current unavailable state */\n    unavailable: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { injectCalendarRootContext } from './CalendarRoot.vue'\n\nconst props = withDefaults(defineProps<CalendarCellTriggerProps>(), {\n  as: 'div',\n})\n\ndefineSlots<CalendarCellTriggerSlot>()\n\nconst kbd = useKbd()\nconst rootContext = injectCalendarRootContext()\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nconst dayValue = computed(() => props.day.day.toLocaleString(rootContext.locale.value))\n\nconst labelText = computed(() => {\n  return rootContext.formatter.custom(toDate(props.day), {\n    weekday: 'long',\n    month: 'long',\n    day: 'numeric',\n    year: 'numeric',\n  })\n})\n\nconst isUnavailable = computed(() =>\n  rootContext.isDateUnavailable?.(props.day) ?? false,\n)\nconst isDateToday = computed(() => {\n  return isToday(props.day, getLocalTimeZone())\n})\nconst isOutsideView = computed(() => {\n  return !isSameMonth(props.day, props.month)\n})\n\nconst isOutsideVisibleView = computed(() =>\n  rootContext.isOutsideVisibleView(props.day),\n)\n\nconst isDisabled = computed(() => rootContext.isDateDisabled(props.day) || (rootContext.disableDaysOutsideCurrentView.value && isOutsideView.value))\n\nconst isFocusedDate = computed(() => {\n  if (isOutsideView.value || isDisabled.value)\n    return false\n  if (!rootContext.disabled.value && rootContext.isPlaceholderFocusable.value && isSameDay(props.day, rootContext.placeholder.value))\n    return true\n  if ((!rootContext.hasSelectedDate.value || rootContext.isSelectedDateDisabled.value) && !rootContext.isPlaceholderFocusable.value)\n    return rootContext.firstFocusableDate.value && isSameDay(props.day, rootContext.firstFocusableDate.value)\n  return false\n})\n\nconst isSelectedDate = computed(() => rootContext.isDateSelected(props.day))\n\nfunction changeDate(date: DateValue) {\n  if (rootContext.readonly.value)\n    return\n  if (rootContext.isDateDisabled(date) || rootContext.isDateUnavailable?.(date))\n    return\n\n  rootContext.onDateChange(date)\n}\n\nfunction handleClick() {\n  if (isDisabled.value)\n    return\n  changeDate(props.day)\n}\n\nfunction handleArrowKey(e: KeyboardEvent) {\n  if (isDisabled.value)\n    return\n  e.preventDefault()\n  e.stopPropagation()\n  const parentElement = rootContext.parentElement.value!\n  const indexIncrementation = 7\n  const sign = rootContext.dir.value === 'rtl' ? -1 : 1\n  switch (e.code) {\n    case kbd.ARROW_RIGHT:\n      shiftFocus(props.day, sign)\n      break\n    case kbd.ARROW_LEFT:\n      shiftFocus(props.day, -sign)\n      break\n    case kbd.ARROW_UP:\n      shiftFocus(props.day, -indexIncrementation)\n      break\n    case kbd.ARROW_DOWN:\n      shiftFocus(props.day, indexIncrementation)\n      break\n    case kbd.ENTER:\n    case kbd.SPACE_CODE:\n      changeDate(props.day)\n  }\n\n  function shiftFocus(day: DateValue, add: number) {\n    const candidateDayValue = day.add({ days: add })\n\n    if ((rootContext.minValue.value && candidateDayValue.compare(rootContext.minValue.value) < 0) || (rootContext.maxValue.value && candidateDayValue.compare(rootContext.maxValue.value) > 0))\n      return\n\n    const candidateDay = parentElement.querySelector<HTMLElement>(`[data-value='${candidateDayValue.toString()}']:not([data-outside-view])`)\n    // If the date is not found it means we must change the page\n    if (!candidateDay) {\n      if (add > 0) {\n        if (rootContext.isNextButtonDisabled())\n          return\n        rootContext.nextPage()\n      }\n      else {\n        if (rootContext.isPrevButtonDisabled())\n          return\n        rootContext.prevPage()\n      }\n      nextTick(() => {\n        shiftFocus(day, add)\n      })\n      return\n    }\n\n    if (candidateDay && candidateDay.hasAttribute('data-disabled')) {\n      return shiftFocus(candidateDayValue, add)\n    }\n    rootContext.onPlaceholderChange(candidateDayValue)\n    candidateDay?.focus()\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    role=\"button\"\n    :aria-label=\"labelText\"\n    data-reka-calendar-cell-trigger\n    :aria-disabled=\"isDisabled || isUnavailable ? true : undefined\"\n    :data-selected=\"isSelectedDate ? true : undefined\"\n    :data-value=\"day.toString()\"\n    :data-disabled=\"isDisabled ? '' : undefined\"\n    :data-unavailable=\"isUnavailable ? '' : undefined\"\n    :data-today=\"isDateToday ? '' : undefined\"\n    :data-outside-view=\"isOutsideView ? '' : undefined\"\n    :data-outside-visible-view=\"isOutsideVisibleView ? '' : undefined\"\n    :data-focused=\"isFocusedDate ? '' : undefined\"\n    :tabindex=\"isFocusedDate ? 0 : isOutsideView || isDisabled ? undefined : -1\"\n    @click=\"handleClick\"\n    @keydown.up.down.left.right.space.enter=\"handleArrowKey\"\n    @keydown.enter.prevent\n  >\n    <slot\n      :day-value=\"dayValue\"\n      :disabled=\"isDisabled\"\n      :today=\"isDateToday\"\n      :selected=\"isSelectedDate\"\n      :outside-view=\"isOutsideView\"\n      :outside-visible-view=\"isOutsideVisibleView\"\n      :unavailable=\"isUnavailable\"\n    >\n      {{ dayValue }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarGridProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectCalendarRootContext } from './CalendarRoot.vue'\n\nconst props = withDefaults(defineProps<CalendarGridProps>(), { as: 'table' })\n\nconst rootContext = injectCalendarRootContext()\nconst disabled = computed(() => rootContext.disabled.value ? true : undefined)\nconst readonly = computed(() => rootContext.readonly.value ? true : undefined)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    tabindex=\"-1\"\n    role=\"application\"\n    :aria-readonly=\"readonly\"\n    :aria-disabled=\"disabled\"\n    :data-readonly=\"readonly && ''\"\n    :data-disabled=\"disabled && ''\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarGridProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectCalendarRootContext } from './CalendarRoot.vue'\n\nconst props = withDefaults(defineProps<CalendarGridProps>(), { as: 'table' })\n\nconst rootContext = injectCalendarRootContext()\nconst disabled = computed(() => rootContext.disabled.value ? true : undefined)\nconst readonly = computed(() => rootContext.readonly.value ? true : undefined)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    tabindex=\"-1\"\n    role=\"application\"\n    :aria-readonly=\"readonly\"\n    :aria-disabled=\"disabled\"\n    :data-readonly=\"readonly && ''\"\n    :data-disabled=\"disabled && ''\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarGridBodyProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<CalendarGridBodyProps>(), { as: 'tbody' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarGridBodyProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<CalendarGridBodyProps>(), { as: 'tbody' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarGridHeadProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<CalendarGridHeadProps>(), { as: 'thead' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-hidden=\"true\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarGridHeadProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<CalendarGridHeadProps>(), { as: 'thead' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-hidden=\"true\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarGridRowProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<CalendarGridRowProps>(), { as: 'tr' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarGridRowProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<CalendarGridRowProps>(), { as: 'tr' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarHeadCellProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<CalendarHeadCellProps>(), { as: 'th' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarHeadCellProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<CalendarHeadCellProps>(), { as: 'th' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarHeaderProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<CalendarHeaderProps>(), { as: 'div' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarHeaderProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<CalendarHeaderProps>(), { as: 'div' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarHeadingProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectCalendarRootContext } from './CalendarRoot.vue'\n\nconst props = withDefaults(defineProps<CalendarHeadingProps>(), { as: 'div' })\n\ndefineSlots<{\n  default?: (props: {\n    /** Current month and year */\n    headingValue: string\n  }) => any\n}>()\n\nconst rootContext = injectCalendarRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n  >\n    <slot :heading-value=\"rootContext.headingValue.value\">\n      {{ rootContext.headingValue.value }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarHeadingProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectCalendarRootContext } from './CalendarRoot.vue'\n\nconst props = withDefaults(defineProps<CalendarHeadingProps>(), { as: 'div' })\n\ndefineSlots<{\n  default?: (props: {\n    /** Current month and year */\n    headingValue: string\n  }) => any\n}>()\n\nconst rootContext = injectCalendarRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n  >\n    <slot :heading-value=\"rootContext.headingValue.value\">\n      {{ rootContext.headingValue.value }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarNextProps extends PrimitiveProps {\n  /** The function to be used for the next page. Overwrites the `nextPage` function set on the `CalendarRoot`. */\n  nextPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface CalendarNextSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectCalendarRootContext } from './CalendarRoot.vue'\n\nconst props = withDefaults(defineProps<CalendarNextProps>(), { as: 'button', step: 'month' })\ndefineSlots<CalendarNextSlot>()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isNextButtonDisabled(props.nextPage))\n\nconst rootContext = injectCalendarRootContext()\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.nextPage(props.nextPage)\n}\n</script>\n\n<template>\n  <Primitive\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    aria-label=\"Next page\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Next page\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarNextProps extends PrimitiveProps {\n  /** The function to be used for the next page. Overwrites the `nextPage` function set on the `CalendarRoot`. */\n  nextPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface CalendarNextSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectCalendarRootContext } from './CalendarRoot.vue'\n\nconst props = withDefaults(defineProps<CalendarNextProps>(), { as: 'button', step: 'month' })\ndefineSlots<CalendarNextSlot>()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isNextButtonDisabled(props.nextPage))\n\nconst rootContext = injectCalendarRootContext()\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.nextPage(props.nextPage)\n}\n</script>\n\n<template>\n  <Primitive\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    aria-label=\"Next page\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Next page\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarPrevProps extends PrimitiveProps {\n  /** The function to be used for the prev page. Overwrites the `prevPage` function set on the `CalendarRoot`. */\n  prevPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface CalendarPrevSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectCalendarRootContext } from './CalendarRoot.vue'\n\nconst props = withDefaults(defineProps<CalendarPrevProps>(), { as: 'button', step: 'month' })\ndefineSlots<CalendarPrevSlot>()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isPrevButtonDisabled(props.prevPage))\n\nconst rootContext = injectCalendarRootContext()\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.prevPage(props.prevPage)\n}\n</script>\n\n<template>\n  <Primitive\n    aria-label=\"Previous page\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Prev page\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface CalendarPrevProps extends PrimitiveProps {\n  /** The function to be used for the prev page. Overwrites the `prevPage` function set on the `CalendarRoot`. */\n  prevPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface CalendarPrevSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectCalendarRootContext } from './CalendarRoot.vue'\n\nconst props = withDefaults(defineProps<CalendarPrevProps>(), { as: 'button', step: 'month' })\ndefineSlots<CalendarPrevSlot>()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isPrevButtonDisabled(props.prevPage))\n\nconst rootContext = injectCalendarRootContext()\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.prevPage(props.prevPage)\n}\n</script>\n\n<template>\n  <Primitive\n    aria-label=\"Previous page\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Prev page\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type {\n  Direction,\n  Orientation,\n} from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useDirection } from '@/shared'\n\nexport interface RovingFocusGroupProps extends PrimitiveProps {\n  /**\n   * The orientation of the group.\n   * Mainly so arrow navigation is done accordingly (left & right vs. up & down)\n   */\n  orientation?: Orientation\n  /**\n   * The direction of navigation between items.\n   */\n  dir?: Direction\n  /**\n   * Whether keyboard navigation should loop around\n   * @defaultValue false\n   */\n  loop?: boolean\n  /** The controlled value of the current stop item. Can be binded as `v-model`. */\n  currentTabStopId?: string | null\n  /**\n   * The value of the current stop item.\n   *\n   * Use when you do not need to control the state of the stop item.\n   */\n  defaultCurrentTabStopId?: string\n  /**\n   * When `true`, will prevent scrolling to the focus item when focused.\n   */\n  preventScrollOnEntryFocus?: boolean\n}\n\nexport type RovingFocusGroupEmits = {\n  'entryFocus': [event: Event]\n  'update:currentTabStopId': [value: string | null | undefined]\n}\n\ninterface RovingContext {\n  orientation: Ref<Orientation | undefined>\n  dir: Ref<Direction>\n  loop: Ref<boolean>\n  currentTabStopId: Ref<string | null | undefined>\n  onItemFocus: (tabStopId: string) => void\n  onItemShiftTab: () => void\n  onFocusableItemAdd: () => void\n  onFocusableItemRemove: () => void\n}\n\nexport const [injectRovingFocusGroupContext, provideRovingFocusGroupContext]\n  = createContext<RovingContext>('RovingFocusGroup')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { ref, toRefs } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { Primitive } from '@/Primitive'\nimport { ENTRY_FOCUS, EVENT_OPTIONS, focusFirst } from './utils'\n\nconst props = withDefaults(defineProps<RovingFocusGroupProps>(), {\n  loop: false,\n  orientation: undefined,\n  preventScrollOnEntryFocus: false,\n})\nconst emits = defineEmits<RovingFocusGroupEmits>()\n\nconst { loop, orientation, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\nconst currentTabStopId = useVModel(props, 'currentTabStopId', emits, {\n  defaultValue: props.defaultCurrentTabStopId,\n  passive: (props.currentTabStopId === undefined) as false,\n})\nconst isTabbingBackOut = ref(false)\nconst isClickFocus = ref(false)\nconst focusableItemsCount = ref(0)\n\nconst { getItems, CollectionSlot } = useCollection({ isProvider: true })\n\nfunction handleFocus(event: FocusEvent) {\n  // We normally wouldn't need this check, because we already check\n  // that the focus is on the current target and not bubbling to it.\n  // We do this because Safari doesn't focus buttons when clicked, and\n  // instead, the wrapper will get focused and not through a bubbling event.\n  const isKeyboardFocus = !isClickFocus.value\n\n  if (\n    event.currentTarget\n    && event.target === event.currentTarget\n    && isKeyboardFocus\n    && !isTabbingBackOut.value\n  ) {\n    const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS)\n    event.currentTarget.dispatchEvent(entryFocusEvent)\n    emits('entryFocus', entryFocusEvent)\n\n    if (!entryFocusEvent.defaultPrevented) {\n      const items = getItems().map(i => i.ref).filter(i => i.dataset.disabled !== '')\n      const activeItem = items.find(item => item.getAttribute('data-active') === '')\n      const highlightedItem = items.find(item => item.getAttribute('data-highlighted') === '')\n      const currentItem = items.find(\n        item => item.id === currentTabStopId.value,\n      )\n      const candidateItems = [activeItem, highlightedItem, currentItem, ...items].filter(\n        Boolean,\n      ) as typeof items\n      focusFirst(candidateItems, props.preventScrollOnEntryFocus)\n    }\n  }\n  isClickFocus.value = false\n}\n\nfunction handleMouseUp() {\n  // reset `isClickFocus` after 1 tick because handleFocus might not triggered due to focused element\n  setTimeout(() => {\n    isClickFocus.value = false\n  }, 1)\n}\n\ndefineExpose({\n  getItems,\n})\n\nprovideRovingFocusGroupContext({\n  loop,\n  dir,\n  orientation,\n  currentTabStopId,\n  onItemFocus: (tabStopId) => {\n    currentTabStopId.value = tabStopId\n  },\n  onItemShiftTab: () => {\n    isTabbingBackOut.value = true\n  },\n  onFocusableItemAdd: () => {\n    focusableItemsCount.value++\n  },\n  onFocusableItemRemove: () => {\n    focusableItemsCount.value--\n  },\n})\n</script>\n\n<template>\n  <CollectionSlot>\n    <Primitive\n      :tabindex=\"isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0\"\n      :data-orientation=\"orientation\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :dir=\"dir\"\n      style=\"outline: none\"\n      @mousedown=\"isClickFocus = true\"\n      @mouseup=\"handleMouseUp\"\n      @focus=\"handleFocus\"\n      @blur=\"isTabbingBackOut = false\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionSlot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type {\n  Direction,\n  Orientation,\n} from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useDirection } from '@/shared'\n\nexport interface RovingFocusGroupProps extends PrimitiveProps {\n  /**\n   * The orientation of the group.\n   * Mainly so arrow navigation is done accordingly (left & right vs. up & down)\n   */\n  orientation?: Orientation\n  /**\n   * The direction of navigation between items.\n   */\n  dir?: Direction\n  /**\n   * Whether keyboard navigation should loop around\n   * @defaultValue false\n   */\n  loop?: boolean\n  /** The controlled value of the current stop item. Can be binded as `v-model`. */\n  currentTabStopId?: string | null\n  /**\n   * The value of the current stop item.\n   *\n   * Use when you do not need to control the state of the stop item.\n   */\n  defaultCurrentTabStopId?: string\n  /**\n   * When `true`, will prevent scrolling to the focus item when focused.\n   */\n  preventScrollOnEntryFocus?: boolean\n}\n\nexport type RovingFocusGroupEmits = {\n  'entryFocus': [event: Event]\n  'update:currentTabStopId': [value: string | null | undefined]\n}\n\ninterface RovingContext {\n  orientation: Ref<Orientation | undefined>\n  dir: Ref<Direction>\n  loop: Ref<boolean>\n  currentTabStopId: Ref<string | null | undefined>\n  onItemFocus: (tabStopId: string) => void\n  onItemShiftTab: () => void\n  onFocusableItemAdd: () => void\n  onFocusableItemRemove: () => void\n}\n\nexport const [injectRovingFocusGroupContext, provideRovingFocusGroupContext]\n  = createContext<RovingContext>('RovingFocusGroup')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { ref, toRefs } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { Primitive } from '@/Primitive'\nimport { ENTRY_FOCUS, EVENT_OPTIONS, focusFirst } from './utils'\n\nconst props = withDefaults(defineProps<RovingFocusGroupProps>(), {\n  loop: false,\n  orientation: undefined,\n  preventScrollOnEntryFocus: false,\n})\nconst emits = defineEmits<RovingFocusGroupEmits>()\n\nconst { loop, orientation, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\nconst currentTabStopId = useVModel(props, 'currentTabStopId', emits, {\n  defaultValue: props.defaultCurrentTabStopId,\n  passive: (props.currentTabStopId === undefined) as false,\n})\nconst isTabbingBackOut = ref(false)\nconst isClickFocus = ref(false)\nconst focusableItemsCount = ref(0)\n\nconst { getItems, CollectionSlot } = useCollection({ isProvider: true })\n\nfunction handleFocus(event: FocusEvent) {\n  // We normally wouldn't need this check, because we already check\n  // that the focus is on the current target and not bubbling to it.\n  // We do this because Safari doesn't focus buttons when clicked, and\n  // instead, the wrapper will get focused and not through a bubbling event.\n  const isKeyboardFocus = !isClickFocus.value\n\n  if (\n    event.currentTarget\n    && event.target === event.currentTarget\n    && isKeyboardFocus\n    && !isTabbingBackOut.value\n  ) {\n    const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS)\n    event.currentTarget.dispatchEvent(entryFocusEvent)\n    emits('entryFocus', entryFocusEvent)\n\n    if (!entryFocusEvent.defaultPrevented) {\n      const items = getItems().map(i => i.ref).filter(i => i.dataset.disabled !== '')\n      const activeItem = items.find(item => item.getAttribute('data-active') === '')\n      const highlightedItem = items.find(item => item.getAttribute('data-highlighted') === '')\n      const currentItem = items.find(\n        item => item.id === currentTabStopId.value,\n      )\n      const candidateItems = [activeItem, highlightedItem, currentItem, ...items].filter(\n        Boolean,\n      ) as typeof items\n      focusFirst(candidateItems, props.preventScrollOnEntryFocus)\n    }\n  }\n  isClickFocus.value = false\n}\n\nfunction handleMouseUp() {\n  // reset `isClickFocus` after 1 tick because handleFocus might not triggered due to focused element\n  setTimeout(() => {\n    isClickFocus.value = false\n  }, 1)\n}\n\ndefineExpose({\n  getItems,\n})\n\nprovideRovingFocusGroupContext({\n  loop,\n  dir,\n  orientation,\n  currentTabStopId,\n  onItemFocus: (tabStopId) => {\n    currentTabStopId.value = tabStopId\n  },\n  onItemShiftTab: () => {\n    isTabbingBackOut.value = true\n  },\n  onFocusableItemAdd: () => {\n    focusableItemsCount.value++\n  },\n  onFocusableItemRemove: () => {\n    focusableItemsCount.value--\n  },\n})\n</script>\n\n<template>\n  <CollectionSlot>\n    <Primitive\n      :tabindex=\"isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0\"\n      :data-orientation=\"orientation\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :dir=\"dir\"\n      style=\"outline: none\"\n      @mousedown=\"isClickFocus = true\"\n      @mouseup=\"handleMouseUp\"\n      @focus=\"handleFocus\"\n      @blur=\"isTabbingBackOut = false\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionSlot>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RovingFocusItemProps extends PrimitiveProps {\n  tabStopId?: string\n  /**\n   * When `false`, item will not be focusable.\n   * @defaultValue `true`\n   */\n  focusable?: boolean\n  /** When `true`, item will be initially focused. */\n  active?: boolean\n  /** When `true`, shift + arrow key will allow focusing on next/previous item. */\n  allowShiftKey?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, onUnmounted } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { Primitive } from '@/Primitive'\nimport { useId } from '@/shared'\nimport { injectRovingFocusGroupContext } from './RovingFocusGroup.vue'\nimport { focusFirst, getFocusIntent, wrapArray } from './utils'\n\nconst props = withDefaults(defineProps<RovingFocusItemProps>(), {\n  focusable: true,\n  as: 'span',\n})\n\nconst context = injectRovingFocusGroupContext()\nconst randomId = useId()\nconst id = computed(() => props.tabStopId || randomId)\nconst isCurrentTabStop = computed(\n  () => context.currentTabStopId.value === id.value,\n)\n\nconst { getItems, CollectionItem } = useCollection()\n\nonMounted(() => {\n  if (props.focusable)\n    context.onFocusableItemAdd()\n})\nonUnmounted(() => {\n  if (props.focusable)\n    context.onFocusableItemRemove()\n})\n\nfunction handleKeydown(event: KeyboardEvent) {\n  if (event.key === 'Tab' && event.shiftKey) {\n    context.onItemShiftTab()\n    return\n  }\n\n  if (event.target !== event.currentTarget)\n    return\n\n  const focusIntent = getFocusIntent(\n    event,\n    context.orientation.value,\n    context.dir.value,\n  )\n\n  if (focusIntent !== undefined) {\n    if (event.metaKey || event.ctrlKey || event.altKey || (props.allowShiftKey ? false : event.shiftKey))\n      return\n    event.preventDefault()\n    let candidateNodes = [...getItems().map(i => i.ref).filter(i => i.dataset.disabled !== '')]\n\n    if (focusIntent === 'last') {\n      candidateNodes.reverse()\n    }\n    else if (focusIntent === 'prev' || focusIntent === 'next') {\n      if (focusIntent === 'prev')\n        candidateNodes.reverse()\n      const currentIndex = candidateNodes.indexOf(\n        event.currentTarget as HTMLElement,\n      )\n\n      candidateNodes = context.loop.value\n        ? wrapArray(candidateNodes, currentIndex + 1)\n        : candidateNodes.slice(currentIndex + 1)\n    }\n\n    nextTick(() => focusFirst(candidateNodes))\n  }\n}\n</script>\n\n<template>\n  <CollectionItem>\n    <Primitive\n      :tabindex=\"isCurrentTabStop ? 0 : -1\"\n      :data-orientation=\"context.orientation.value\"\n      :data-active=\"active ? '' : undefined\"\n      :data-disabled=\"!focusable ? '' : undefined\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      @mousedown=\"\n        (event: MouseEvent) => {\n          // We prevent focusing non-focusable items on `mousedown`.\n          // Even though the item has tabIndex={-1}, that only means take it out of the tab order.\n          if (!focusable) event.preventDefault();\n          // Safari doesn't focus a button when clicked so we run our logic on mousedown also\n          else context.onItemFocus(id);\n        }\n      \"\n      @focus=\"context.onItemFocus(id)\"\n      @keydown=\"handleKeydown\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionItem>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RovingFocusItemProps extends PrimitiveProps {\n  tabStopId?: string\n  /**\n   * When `false`, item will not be focusable.\n   * @defaultValue `true`\n   */\n  focusable?: boolean\n  /** When `true`, item will be initially focused. */\n  active?: boolean\n  /** When `true`, shift + arrow key will allow focusing on next/previous item. */\n  allowShiftKey?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, onUnmounted } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { Primitive } from '@/Primitive'\nimport { useId } from '@/shared'\nimport { injectRovingFocusGroupContext } from './RovingFocusGroup.vue'\nimport { focusFirst, getFocusIntent, wrapArray } from './utils'\n\nconst props = withDefaults(defineProps<RovingFocusItemProps>(), {\n  focusable: true,\n  as: 'span',\n})\n\nconst context = injectRovingFocusGroupContext()\nconst randomId = useId()\nconst id = computed(() => props.tabStopId || randomId)\nconst isCurrentTabStop = computed(\n  () => context.currentTabStopId.value === id.value,\n)\n\nconst { getItems, CollectionItem } = useCollection()\n\nonMounted(() => {\n  if (props.focusable)\n    context.onFocusableItemAdd()\n})\nonUnmounted(() => {\n  if (props.focusable)\n    context.onFocusableItemRemove()\n})\n\nfunction handleKeydown(event: KeyboardEvent) {\n  if (event.key === 'Tab' && event.shiftKey) {\n    context.onItemShiftTab()\n    return\n  }\n\n  if (event.target !== event.currentTarget)\n    return\n\n  const focusIntent = getFocusIntent(\n    event,\n    context.orientation.value,\n    context.dir.value,\n  )\n\n  if (focusIntent !== undefined) {\n    if (event.metaKey || event.ctrlKey || event.altKey || (props.allowShiftKey ? false : event.shiftKey))\n      return\n    event.preventDefault()\n    let candidateNodes = [...getItems().map(i => i.ref).filter(i => i.dataset.disabled !== '')]\n\n    if (focusIntent === 'last') {\n      candidateNodes.reverse()\n    }\n    else if (focusIntent === 'prev' || focusIntent === 'next') {\n      if (focusIntent === 'prev')\n        candidateNodes.reverse()\n      const currentIndex = candidateNodes.indexOf(\n        event.currentTarget as HTMLElement,\n      )\n\n      candidateNodes = context.loop.value\n        ? wrapArray(candidateNodes, currentIndex + 1)\n        : candidateNodes.slice(currentIndex + 1)\n    }\n\n    nextTick(() => focusFirst(candidateNodes))\n  }\n}\n</script>\n\n<template>\n  <CollectionItem>\n    <Primitive\n      :tabindex=\"isCurrentTabStop ? 0 : -1\"\n      :data-orientation=\"context.orientation.value\"\n      :data-active=\"active ? '' : undefined\"\n      :data-disabled=\"!focusable ? '' : undefined\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      @mousedown=\"\n        (event: MouseEvent) => {\n          // We prevent focusing non-focusable items on `mousedown`.\n          // Even though the item has tabIndex={-1}, that only means take it out of the tab order.\n          if (!focusable) event.preventDefault();\n          // Safari doesn't focus a button when clicked so we run our logic on mousedown also\n          else context.onItemFocus(id);\n        }\n      \"\n      @focus=\"context.onItemFocus(id)\"\n      @keydown=\"handleKeydown\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionItem>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { RovingFocusGroupProps } from '@/RovingFocus'\nimport type { AcceptableValue, FormFieldProps } from '@/shared/types'\nimport { useVModel } from '@vueuse/core'\nimport { computed, toRefs } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { createContext, useDirection, useFormControl } from '@/shared'\n\nexport interface CheckboxGroupRootProps<T = AcceptableValue> extends Pick<RovingFocusGroupProps, 'as' | 'asChild' | 'dir' | 'orientation' | 'loop'>, FormFieldProps {\n  /** The value of the checkbox when it is initially rendered. Use when you do not need to control its value. */\n  defaultValue?: T[]\n  /** The controlled value of the checkbox. Can be binded with v-model. */\n  modelValue?: T[]\n  /** When `false`, navigating through the items using arrow keys will be disabled. */\n  rovingFocus?: boolean\n  /** When `true`, prevents the user from interacting with the checkboxes */\n  disabled?: boolean\n}\n\nexport type CheckboxGroupRootEmits<T = AcceptableValue> = {\n  /** Event handler called when the value of the checkbox changes. */\n  'update:modelValue': [value: T[]]\n}\n\ninterface CheckboxGroupRootContext {\n  modelValue: Ref<AcceptableValue[]>\n  rovingFocus: Ref<boolean>\n  disabled: Ref<boolean>\n}\n\nexport const [injectCheckboxGroupRootContext, provideCheckboxGroupRootContext]\n  = createContext<CheckboxGroupRootContext>('CheckboxGroupRoot')\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableValue = AcceptableValue\">\nimport { RovingFocusGroup } from '@/RovingFocus'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\n\nconst props = withDefaults(defineProps<CheckboxGroupRootProps<T>>(), {\n  rovingFocus: true,\n})\nconst emits = defineEmits<CheckboxGroupRootEmits<T>>()\n\nconst { disabled, rovingFocus, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\nconst isFormControl = useFormControl(currentElement)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? [],\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<T[]>\n\nconst rovingFocusProps = computed(() => {\n  return rovingFocus.value ? { loop: props.loop, dir: dir.value, orientation: props.orientation } : {}\n})\n\nprovideCheckboxGroupRootContext({\n  modelValue,\n  rovingFocus,\n  disabled,\n})\n</script>\n\n<template>\n  <component\n    :is=\"rovingFocus ? RovingFocusGroup : Primitive\"\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    v-bind=\"rovingFocusProps\"\n  >\n    <slot />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name\"\n      :name=\"name\"\n      :value=\"modelValue\"\n      :required=\"required\"\n    />\n  </component>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { RovingFocusGroupProps } from '@/RovingFocus'\nimport type { AcceptableValue, FormFieldProps } from '@/shared/types'\nimport { useVModel } from '@vueuse/core'\nimport { computed, toRefs } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { createContext, useDirection, useFormControl } from '@/shared'\n\nexport interface CheckboxGroupRootProps<T = AcceptableValue> extends Pick<RovingFocusGroupProps, 'as' | 'asChild' | 'dir' | 'orientation' | 'loop'>, FormFieldProps {\n  /** The value of the checkbox when it is initially rendered. Use when you do not need to control its value. */\n  defaultValue?: T[]\n  /** The controlled value of the checkbox. Can be binded with v-model. */\n  modelValue?: T[]\n  /** When `false`, navigating through the items using arrow keys will be disabled. */\n  rovingFocus?: boolean\n  /** When `true`, prevents the user from interacting with the checkboxes */\n  disabled?: boolean\n}\n\nexport type CheckboxGroupRootEmits<T = AcceptableValue> = {\n  /** Event handler called when the value of the checkbox changes. */\n  'update:modelValue': [value: T[]]\n}\n\ninterface CheckboxGroupRootContext {\n  modelValue: Ref<AcceptableValue[]>\n  rovingFocus: Ref<boolean>\n  disabled: Ref<boolean>\n}\n\nexport const [injectCheckboxGroupRootContext, provideCheckboxGroupRootContext]\n  = createContext<CheckboxGroupRootContext>('CheckboxGroupRoot')\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableValue = AcceptableValue\">\nimport { RovingFocusGroup } from '@/RovingFocus'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\n\nconst props = withDefaults(defineProps<CheckboxGroupRootProps<T>>(), {\n  rovingFocus: true,\n})\nconst emits = defineEmits<CheckboxGroupRootEmits<T>>()\n\nconst { disabled, rovingFocus, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\nconst isFormControl = useFormControl(currentElement)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? [],\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<T[]>\n\nconst rovingFocusProps = computed(() => {\n  return rovingFocus.value ? { loop: props.loop, dir: dir.value, orientation: props.orientation } : {}\n})\n\nprovideCheckboxGroupRootContext({\n  modelValue,\n  rovingFocus,\n  disabled,\n})\n</script>\n\n<template>\n  <component\n    :is=\"rovingFocus ? RovingFocusGroup : Primitive\"\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    v-bind=\"rovingFocusProps\"\n  >\n    <slot />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name\"\n      :name=\"name\"\n      :value=\"modelValue\"\n      :required=\"required\"\n    />\n  </component>\n</template>\n","export type CheckedState = boolean | 'indeterminate'\n\nexport function isIndeterminate(checked?: CheckedState): checked is 'indeterminate' {\n  return checked === 'indeterminate'\n}\n\nexport function getState(checked: CheckedState) {\n  return isIndeterminate(checked) ? 'indeterminate' : checked ? 'checked' : 'unchecked'\n}\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { CheckedState } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { AcceptableValue, FormFieldProps } from '@/shared/types'\nimport { useVModel } from '@vueuse/core'\nimport { createContext, isNullish, isValueEqualOrExist, useFormControl, useForwardExpose } from '@/shared'\nimport { injectCheckboxGroupRootContext } from './CheckboxGroupRoot.vue'\n\nexport interface CheckboxRootProps<T = boolean> extends PrimitiveProps, FormFieldProps {\n  /** The value of the checkbox when it is initially rendered. Use when you do not need to control its value. */\n  defaultValue?: T | 'indeterminate'\n  /** The controlled value of the checkbox. Can be binded with v-model. */\n  modelValue?: T | 'indeterminate' | null\n  /** When `true`, prevents the user from interacting with the checkbox */\n  disabled?: boolean\n  /**\n   * The value given as data when submitted with a `name`.\n   *  @defaultValue \"on\"\n   */\n  value?: AcceptableValue\n  /** Id of the element */\n  id?: string\n  /**\n   * The value used when the checkbox is checked. Defaults to `true`.\n   */\n  trueValue?: T\n  /**\n   * The value used when the checkbox is unchecked. Defaults to `false`.\n   */\n  falseValue?: T\n}\n\nexport type CheckboxRootEmits<T = boolean> = {\n  /** Event handler called when the value of the checkbox changes. */\n  'update:modelValue': [value: T | 'indeterminate']\n}\n\ninterface CheckboxRootContext {\n  disabled: Ref<boolean>\n  state: Ref<CheckedState>\n}\n\nexport const [injectCheckboxRootContext, provideCheckboxRootContext]\n  = createContext<CheckboxRootContext>('CheckboxRoot')\n</script>\n\n<script setup lang=\"ts\" generic=\"T = boolean\">\nimport { isEqual } from 'ohash'\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusItem } from '@/RovingFocus'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\nimport { getState, isIndeterminate } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<CheckboxRootProps<T>>(), {\n  modelValue: undefined,\n  value: 'on',\n  as: 'button',\n  trueValue: (() => true) as unknown as undefined,\n  falseValue: (() => false) as unknown as undefined,\n})\nconst emits = defineEmits<CheckboxRootEmits<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current value */\n    modelValue: typeof modelValue.value\n    /** Current state */\n    state: typeof checkboxState.value\n  }) => any\n}>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst checkboxGroupContext = injectCheckboxGroupRootContext(null)\n\nconst modelValue = useVModel(props as any, 'modelValue', emits as any, {\n  defaultValue: props.defaultValue ?? props.falseValue,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<T | 'indeterminate'>\n\nconst disabled = computed(() => checkboxGroupContext?.disabled.value || props.disabled)\n\nconst isChecked = computed(() => isEqual(modelValue.value, props.trueValue))\n\nconst checkboxState = computed<CheckedState>(() => {\n  if (!isNullish(checkboxGroupContext?.modelValue.value)) {\n    return isValueEqualOrExist(checkboxGroupContext.modelValue.value, props.value)\n  }\n  else {\n    if (modelValue.value === 'indeterminate')\n      return 'indeterminate'\n    return isChecked.value\n  }\n})\n\nfunction handleClick() {\n  if (!isNullish(checkboxGroupContext?.modelValue.value)) {\n    const modelValueArray = [...(checkboxGroupContext.modelValue.value || [])]\n    if (isValueEqualOrExist(modelValueArray, props.value)) {\n      const index = modelValueArray.findIndex(i => isEqual(i, props.value))\n      modelValueArray.splice(index, 1)\n    }\n    else {\n      modelValueArray.push(props.value)\n    }\n    checkboxGroupContext.modelValue.value = modelValueArray\n  }\n  else {\n    if (modelValue.value === 'indeterminate') {\n      modelValue.value = props.trueValue as T\n    }\n    else {\n      modelValue.value = isChecked.value ? props.falseValue as T : props.trueValue as T\n    }\n  }\n}\n\nconst isFormControl = useFormControl(currentElement)\nconst ariaLabel = computed(() => props.id && currentElement.value\n  ? (document.querySelector(`[for=\"${props.id}\"]`) as HTMLLabelElement)?.innerText\n  : undefined)\n\nprovideCheckboxRootContext({\n  disabled,\n  state: checkboxState,\n})\n</script>\n\n<template>\n  <component\n    v-bind=\"$attrs\"\n    :is=\"checkboxGroupContext?.rovingFocus.value ? RovingFocusItem : Primitive\"\n    :id=\"id\"\n    :ref=\"forwardRef\"\n    role=\"checkbox\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :aria-checked=\"isIndeterminate(checkboxState) ? 'mixed' : checkboxState\"\n    :aria-required=\"required\"\n    :aria-label=\"$attrs['aria-label'] || ariaLabel\"\n    :data-state=\"getState(checkboxState)\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :disabled=\"disabled\"\n    :focusable=\"checkboxGroupContext?.rovingFocus.value ? !disabled : undefined\"\n    @keydown.enter.prevent=\"() => {\n      // According to WAI ARIA, Checkboxes don't activate on enter keypress\n    }\"\n    @click=\"handleClick\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :state=\"checkboxState\"\n    />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name && !checkboxGroupContext\"\n      type=\"checkbox\"\n      :checked=\"!!checkboxState\"\n      :name=\"name\"\n      :value=\"value\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n    />\n  </component>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { CheckedState } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { AcceptableValue, FormFieldProps } from '@/shared/types'\nimport { useVModel } from '@vueuse/core'\nimport { createContext, isNullish, isValueEqualOrExist, useFormControl, useForwardExpose } from '@/shared'\nimport { injectCheckboxGroupRootContext } from './CheckboxGroupRoot.vue'\n\nexport interface CheckboxRootProps<T = boolean> extends PrimitiveProps, FormFieldProps {\n  /** The value of the checkbox when it is initially rendered. Use when you do not need to control its value. */\n  defaultValue?: T | 'indeterminate'\n  /** The controlled value of the checkbox. Can be binded with v-model. */\n  modelValue?: T | 'indeterminate' | null\n  /** When `true`, prevents the user from interacting with the checkbox */\n  disabled?: boolean\n  /**\n   * The value given as data when submitted with a `name`.\n   *  @defaultValue \"on\"\n   */\n  value?: AcceptableValue\n  /** Id of the element */\n  id?: string\n  /**\n   * The value used when the checkbox is checked. Defaults to `true`.\n   */\n  trueValue?: T\n  /**\n   * The value used when the checkbox is unchecked. Defaults to `false`.\n   */\n  falseValue?: T\n}\n\nexport type CheckboxRootEmits<T = boolean> = {\n  /** Event handler called when the value of the checkbox changes. */\n  'update:modelValue': [value: T | 'indeterminate']\n}\n\ninterface CheckboxRootContext {\n  disabled: Ref<boolean>\n  state: Ref<CheckedState>\n}\n\nexport const [injectCheckboxRootContext, provideCheckboxRootContext]\n  = createContext<CheckboxRootContext>('CheckboxRoot')\n</script>\n\n<script setup lang=\"ts\" generic=\"T = boolean\">\nimport { isEqual } from 'ohash'\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusItem } from '@/RovingFocus'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\nimport { getState, isIndeterminate } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<CheckboxRootProps<T>>(), {\n  modelValue: undefined,\n  value: 'on',\n  as: 'button',\n  trueValue: (() => true) as unknown as undefined,\n  falseValue: (() => false) as unknown as undefined,\n})\nconst emits = defineEmits<CheckboxRootEmits<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current value */\n    modelValue: typeof modelValue.value\n    /** Current state */\n    state: typeof checkboxState.value\n  }) => any\n}>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst checkboxGroupContext = injectCheckboxGroupRootContext(null)\n\nconst modelValue = useVModel(props as any, 'modelValue', emits as any, {\n  defaultValue: props.defaultValue ?? props.falseValue,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<T | 'indeterminate'>\n\nconst disabled = computed(() => checkboxGroupContext?.disabled.value || props.disabled)\n\nconst isChecked = computed(() => isEqual(modelValue.value, props.trueValue))\n\nconst checkboxState = computed<CheckedState>(() => {\n  if (!isNullish(checkboxGroupContext?.modelValue.value)) {\n    return isValueEqualOrExist(checkboxGroupContext.modelValue.value, props.value)\n  }\n  else {\n    if (modelValue.value === 'indeterminate')\n      return 'indeterminate'\n    return isChecked.value\n  }\n})\n\nfunction handleClick() {\n  if (!isNullish(checkboxGroupContext?.modelValue.value)) {\n    const modelValueArray = [...(checkboxGroupContext.modelValue.value || [])]\n    if (isValueEqualOrExist(modelValueArray, props.value)) {\n      const index = modelValueArray.findIndex(i => isEqual(i, props.value))\n      modelValueArray.splice(index, 1)\n    }\n    else {\n      modelValueArray.push(props.value)\n    }\n    checkboxGroupContext.modelValue.value = modelValueArray\n  }\n  else {\n    if (modelValue.value === 'indeterminate') {\n      modelValue.value = props.trueValue as T\n    }\n    else {\n      modelValue.value = isChecked.value ? props.falseValue as T : props.trueValue as T\n    }\n  }\n}\n\nconst isFormControl = useFormControl(currentElement)\nconst ariaLabel = computed(() => props.id && currentElement.value\n  ? (document.querySelector(`[for=\"${props.id}\"]`) as HTMLLabelElement)?.innerText\n  : undefined)\n\nprovideCheckboxRootContext({\n  disabled,\n  state: checkboxState,\n})\n</script>\n\n<template>\n  <component\n    v-bind=\"$attrs\"\n    :is=\"checkboxGroupContext?.rovingFocus.value ? RovingFocusItem : Primitive\"\n    :id=\"id\"\n    :ref=\"forwardRef\"\n    role=\"checkbox\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :aria-checked=\"isIndeterminate(checkboxState) ? 'mixed' : checkboxState\"\n    :aria-required=\"required\"\n    :aria-label=\"$attrs['aria-label'] || ariaLabel\"\n    :data-state=\"getState(checkboxState)\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :disabled=\"disabled\"\n    :focusable=\"checkboxGroupContext?.rovingFocus.value ? !disabled : undefined\"\n    @keydown.enter.prevent=\"() => {\n      // According to WAI ARIA, Checkboxes don't activate on enter keypress\n    }\"\n    @click=\"handleClick\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :state=\"checkboxState\"\n    />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name && !checkboxGroupContext\"\n      type=\"checkbox\"\n      :checked=\"!!checkboxState\"\n      :name=\"name\"\n      :value=\"value\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n    />\n  </component>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface CheckboxIndicatorProps extends PrimitiveProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { Primitive } from '@/Primitive'\nimport { injectCheckboxRootContext } from './CheckboxRoot.vue'\nimport { getState, isIndeterminate } from './utils'\n\nwithDefaults(defineProps<CheckboxIndicatorProps>(), {\n  as: 'span',\n})\nconst { forwardRef } = useForwardExpose()\n\nconst rootContext = injectCheckboxRootContext()\n</script>\n\n<template>\n  <Presence\n    :present=\"forceMount || isIndeterminate(rootContext.state.value) || rootContext.state.value === true\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :data-state=\"getState(rootContext.state.value)\"\n      :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n      :style=\"{ pointerEvents: 'none' }\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      v-bind=\"$attrs\"\n    >\n      <slot />\n    </Primitive>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface CheckboxIndicatorProps extends PrimitiveProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { Primitive } from '@/Primitive'\nimport { injectCheckboxRootContext } from './CheckboxRoot.vue'\nimport { getState, isIndeterminate } from './utils'\n\nwithDefaults(defineProps<CheckboxIndicatorProps>(), {\n  as: 'span',\n})\nconst { forwardRef } = useForwardExpose()\n\nconst rootContext = injectCheckboxRootContext()\n</script>\n\n<template>\n  <Presence\n    :present=\"forceMount || isIndeterminate(rootContext.state.value) || rootContext.state.value === true\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :data-state=\"getState(rootContext.state.value)\"\n      :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n      :style=\"{ pointerEvents: 'none' }\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      v-bind=\"$attrs\"\n    >\n      <slot />\n    </Primitive>\n  </Presence>\n</template>\n","import type { Color, ColorFormat, HSBColor, HSLColor, RGBColor } from './types'\n\n/**\n * Converts a Color object to a string representation.\n */\nexport function colorToString(color: Color, format: ColorFormat = 'hex'): string {\n  switch (format) {\n    case 'hex':\n      return colorToHex(color)\n    case 'rgb':\n      return colorToRgb(color)\n    case 'hsl':\n      return colorToHsl(color)\n    case 'hsb':\n      return colorToHsb(color)\n    default:\n      throw new Error(`Unknown format: ${format}`)\n  }\n}\n\n/**\n * Converts any color to hex string.\n */\nexport function colorToHex(color: Color): string {\n  const rgb = color.space === 'rgb' ? color : convertToRgb(color)\n  const toHex = (n: number) => Math.round(n).toString(16).padStart(2, '0')\n\n  if (rgb.alpha < 1) {\n    const alpha = Math.round(rgb.alpha * 255).toString(16).padStart(2, '0')\n    return `#${toHex(rgb.r)}${toHex(rgb.g)}${toHex(rgb.b)}${alpha}`\n  }\n\n  return `#${toHex(rgb.r)}${toHex(rgb.g)}${toHex(rgb.b)}`\n}\n\n/**\n * Converts any color to rgb() string.\n */\nexport function colorToRgb(color: Color): string {\n  const rgb = color.space === 'rgb' ? color : convertToRgb(color)\n  const { r, g, b, alpha } = rgb\n\n  if (alpha < 1) {\n    return `rgba(${Math.round(r)}, ${Math.round(g)}, ${Math.round(b)}, ${alpha})`\n  }\n  return `rgb(${Math.round(r)}, ${Math.round(g)}, ${Math.round(b)})`\n}\n\n/**\n * Converts any color to hsl() string.\n */\nexport function colorToHsl(color: Color): string {\n  const hsl = color.space === 'hsl' ? color : convertToHsl(color)\n  const { h, s, l, alpha } = hsl\n\n  if (alpha < 1) {\n    return `hsla(${Math.round(h)}, ${Math.round(s)}%, ${Math.round(l)}%, ${alpha})`\n  }\n  return `hsl(${Math.round(h)}, ${Math.round(s)}%, ${Math.round(l)}%)`\n}\n\n/**\n * Converts any color to hsb() string.\n */\nexport function colorToHsb(color: Color): string {\n  const hsb = color.space === 'hsb' ? color : convertToHsb(color)\n  const { h, s, b, alpha } = hsb\n\n  if (alpha < 1) {\n    return `hsba(${Math.round(h)}, ${Math.round(s)}%, ${Math.round(b)}%, ${alpha})`\n  }\n  return `hsb(${Math.round(h)}, ${Math.round(s)}%, ${Math.round(b)}%)`\n}\n\n/**\n * Converts any color to RGB color space.\n */\nexport function convertToRgb(color: Color): RGBColor {\n  if (color.space === 'rgb') {\n    return color\n  }\n  if (color.space === 'hsl') {\n    return hslToRgb(color)\n  }\n  if (color.space === 'hsb') {\n    return hsbToRgb(color)\n  }\n  throw new Error(`Unknown color space: ${(color as Color).space}`)\n}\n\n/**\n * Converts any color to HSL color space.\n */\nexport function convertToHsl(color: Color): HSLColor {\n  if (color.space === 'hsl') {\n    return color\n  }\n  return rgbToHsl(convertToRgb(color))\n}\n\n/**\n * Converts any color to HSB color space.\n */\nexport function convertToHsb(color: Color): HSBColor {\n  if (color.space === 'hsb') {\n    return color\n  }\n  return rgbToHsb(convertToRgb(color))\n}\n\n/**\n * Converts RGB to HSL.\n */\nfunction rgbToHsl(rgb: RGBColor): HSLColor {\n  const r = rgb.r / 255\n  const g = rgb.g / 255\n  const b = rgb.b / 255\n\n  const max = Math.max(r, g, b)\n  const min = Math.min(r, g, b)\n  let h = 0\n  let s = 0\n  const l = (max + min) / 2\n\n  if (max !== min) {\n    const d = max - min\n    s = l > 0.5 ? d / (2 - max - min) : d / (max + min)\n    switch (max) {\n      case r:\n        h = (g - b) / d + (g < b ? 6 : 0)\n        break\n      case g:\n        h = (b - r) / d + 2\n        break\n      case b:\n        h = (r - g) / d + 4\n        break\n    }\n    h /= 6\n  }\n\n  return {\n    space: 'hsl',\n    h: h * 360,\n    s: s * 100,\n    l: l * 100,\n    alpha: rgb.alpha,\n  }\n}\n\n/**\n * Converts HSL to RGB.\n */\nfunction hslToRgb(hsl: HSLColor): RGBColor {\n  const h = hsl.h / 360\n  const s = hsl.s / 100\n  const l = hsl.l / 100\n\n  let r: number, g: number, b: number\n\n  if (s === 0) {\n    r = g = b = l\n  }\n  else {\n    const hue2rgb = (p: number, q: number, t: number) => {\n      if (t < 0)\n        t += 1\n      if (t > 1)\n        t -= 1\n      if (t < 1 / 6)\n        return p + (q - p) * 6 * t\n      if (t < 1 / 2)\n        return q\n      if (t < 2 / 3)\n        return p + (q - p) * (2 / 3 - t) * 6\n      return p\n    }\n\n    const q = l < 0.5 ? l * (1 + s) : l + s - l * s\n    const p = 2 * l - q\n    r = hue2rgb(p, q, h + 1 / 3)\n    g = hue2rgb(p, q, h)\n    b = hue2rgb(p, q, h - 1 / 3)\n  }\n\n  return {\n    space: 'rgb',\n    r: r * 255,\n    g: g * 255,\n    b: b * 255,\n    alpha: hsl.alpha,\n  }\n}\n\n/**\n * Converts RGB to HSB.\n */\nfunction rgbToHsb(rgb: RGBColor): HSBColor {\n  const r = rgb.r / 255\n  const g = rgb.g / 255\n  const b = rgb.b / 255\n\n  const max = Math.max(r, g, b)\n  const min = Math.min(r, g, b)\n  const d = max - min\n\n  let h = 0\n  const s = max === 0 ? 0 : d / max\n  const v = max\n\n  if (max !== min) {\n    switch (max) {\n      case r:\n        h = (g - b) / d + (g < b ? 6 : 0)\n        break\n      case g:\n        h = (b - r) / d + 2\n        break\n      case b:\n        h = (r - g) / d + 4\n        break\n    }\n    h /= 6\n  }\n\n  return {\n    space: 'hsb',\n    h: h * 360,\n    s: s * 100,\n    b: v * 100,\n    alpha: rgb.alpha,\n  }\n}\n\n/**\n * Converts HSB to RGB.\n */\nfunction hsbToRgb(hsb: HSBColor): RGBColor {\n  const h = hsb.h / 360\n  const s = hsb.s / 100\n  const v = hsb.b / 100\n\n  let r = 0\n  let g = 0\n  let b = 0\n\n  const i = Math.floor(h * 6)\n  const f = h * 6 - i\n  const p = v * (1 - s)\n  const q = v * (1 - f * s)\n  const t = v * (1 - (1 - f) * s)\n\n  switch (i % 6) {\n    case 0:\n      r = v\n      g = t\n      b = p\n      break\n    case 1:\n      r = q\n      g = v\n      b = p\n      break\n    case 2:\n      r = p\n      g = v\n      b = t\n      break\n    case 3:\n      r = p\n      g = q\n      b = v\n      break\n    case 4:\n      r = t\n      g = p\n      b = v\n      break\n    case 5:\n      r = v\n      g = p\n      b = q\n      break\n  }\n\n  return {\n    space: 'rgb',\n    r: r * 255,\n    g: g * 255,\n    b: b * 255,\n    alpha: hsb.alpha,\n  }\n}\n","import type { ChannelRange, Color, ColorChannel, ColorSpace, HSBColor, HSLColor, RGBColor } from './types'\nimport { convertToHsb, convertToHsl, convertToRgb } from './convert'\n\n/**\n * Gets the range (min, max, step) for a color channel.\n */\nexport function getChannelRange(channel: ColorChannel): ChannelRange {\n  switch (channel) {\n    case 'hue':\n      return { min: 0, max: 360, step: 1 }\n    case 'saturation':\n    case 'lightness':\n    case 'brightness':\n    case 'alpha':\n      return { min: 0, max: 100, step: 1 }\n    case 'red':\n    case 'green':\n    case 'blue':\n      return { min: 0, max: 255, step: 1 }\n    default:\n      throw new Error(`Unknown channel: ${channel}`)\n  }\n}\n\n/**\n * Gets the display name for a channel.\n */\nexport function getChannelName(channel: ColorChannel): string {\n  const names: Record<ColorChannel, string> = {\n    red: 'Red',\n    green: 'Green',\n    blue: 'Blue',\n    hue: 'Hue',\n    saturation: 'Saturation',\n    lightness: 'Lightness',\n    brightness: 'Brightness',\n    alpha: 'Alpha',\n  }\n  return names[channel] ?? channel\n}\n\n/**\n * Gets the value of a specific channel from a color.\n * Avoids conversion if the color is already in the target color space.\n */\nexport function getChannelValue(color: Color, channel: ColorChannel): number {\n  switch (channel) {\n    case 'red':\n      return color.space === 'rgb' ? (color as RGBColor).r : convertToRgb(color).r\n    case 'green':\n      return color.space === 'rgb' ? (color as RGBColor).g : convertToRgb(color).g\n    case 'blue':\n      return color.space === 'rgb' ? (color as RGBColor).b : convertToRgb(color).b\n    case 'hue':\n      return color.space === 'hsl' ? (color as HSLColor).h : convertToHsl(color).h\n    case 'saturation':\n      if (color.space === 'hsl')\n        return (color as HSLColor).s\n      if (color.space === 'hsb')\n        return (color as HSBColor).s\n      return convertToHsl(color).s\n    case 'lightness':\n      return color.space === 'hsl' ? (color as HSLColor).l : convertToHsl(color).l\n    case 'brightness':\n      return color.space === 'hsb' ? (color as HSBColor).b : convertToHsb(color).b\n    case 'alpha':\n      return color.alpha * 100\n    default:\n      throw new Error(`Unknown channel: ${channel}`)\n  }\n}\n\n/**\n * Sets a channel value on a color, returning a new color.\n * The returned color maintains the original color space.\n */\nexport function setChannelValue(color: Color, channel: ColorChannel, value: number): Color {\n  const range = getChannelRange(channel)\n  const clamped = Math.max(range.min, Math.min(range.max, value))\n\n  // Alpha is handled the same across all spaces\n  if (channel === 'alpha') {\n    return { ...color, alpha: clamped / 100 } as Color\n  }\n\n  // For RGB channels, convert to RGB, set, then convert back\n  if (channel === 'red' || channel === 'green' || channel === 'blue') {\n    const rgb = convertToRgb(color)\n    const newRgb: RGBColor = {\n      ...rgb,\n      [channel === 'red' ? 'r' : channel === 'green' ? 'g' : 'b']: clamped,\n    }\n    return convertFromRgb(newRgb, color.space)\n  }\n\n  // For HSL channels\n  if (channel === 'hue' || channel === 'lightness') {\n    const hsl = convertToHsl(color)\n    const newHsl: HSLColor = {\n      ...hsl,\n      [channel === 'hue' ? 'h' : 'l']: clamped,\n    }\n    return convertFromHsl(newHsl, color.space)\n  }\n\n  // For saturation, respect the color's native space (HSB vs HSL)\n  if (channel === 'saturation') {\n    if (color.space === 'hsb') {\n      const hsb = convertToHsb(color)\n      const newHsb: HSBColor = { ...hsb, s: clamped }\n      return convertFromHsb(newHsb, color.space)\n    }\n    const hsl = convertToHsl(color)\n    const newHsl: HSLColor = { ...hsl, s: clamped }\n    return convertFromHsl(newHsl, color.space)\n  }\n\n  // For brightness (HSB-only)\n  if (channel === 'brightness') {\n    const hsb = convertToHsb(color)\n    const newHsb: HSBColor = { ...hsb, b: clamped }\n    return convertFromHsb(newHsb, color.space)\n  }\n\n  throw new Error(`Unknown channel: ${channel}`)\n}\n\n/**\n * Sets multiple channel values at once, preserving exact values.\n * Useful when updating 2D color areas where both channels change simultaneously.\n */\nexport function setChannelValues(\n  color: Color,\n  channels: Array<{ channel: ColorChannel, value: number }>,\n): Color {\n  if (channels.length === 0)\n    return color\n  if (channels.length === 1) {\n    return setChannelValue(color, channels[0].channel, channels[0].value)\n  }\n\n  // Determine the target color space based on all channels\n  const channelNames = channels.map(c => c.channel)\n  const hasBrightness = channelNames.includes('brightness')\n  const hasLightness = channelNames.includes('lightness')\n  const hasRgb = channelNames.some(c => c === 'red' || c === 'green' || c === 'blue')\n\n  let workingColor: Color\n\n  if (hasRgb) {\n    workingColor = convertToRgb(color)\n  }\n  else if (hasBrightness) {\n    // HSB mode\n    workingColor = convertToHsb(color)\n  }\n  else if (hasLightness) {\n    // HSL mode\n    workingColor = convertToHsl(color)\n  }\n  else {\n    // Default to HSL for hue/saturation\n    workingColor = convertToHsl(color)\n  }\n\n  // Apply all channel values\n  for (const { channel, value } of channels) {\n    const range = getChannelRange(channel)\n    const clamped = Math.max(range.min, Math.min(range.max, value))\n\n    if (channel === 'alpha') {\n      workingColor = { ...workingColor, alpha: clamped / 100 }\n    }\n    else if (workingColor.space === 'rgb' && (channel === 'red' || channel === 'green' || channel === 'blue')) {\n      const key = channel === 'red' ? 'r' : channel === 'green' ? 'g' : 'b'\n      workingColor = { ...workingColor, [key]: clamped } as RGBColor\n    }\n    else if (workingColor.space === 'hsl' && (channel === 'hue' || channel === 'saturation' || channel === 'lightness')) {\n      const key = channel === 'hue' ? 'h' : channel === 'saturation' ? 's' : 'l'\n      workingColor = { ...workingColor, [key]: clamped } as HSLColor\n    }\n    else if (workingColor.space === 'hsb' && (channel === 'hue' || channel === 'saturation' || channel === 'brightness')) {\n      const key = channel === 'hue' ? 'h' : channel === 'saturation' ? 's' : 'b'\n      workingColor = { ...workingColor, [key]: clamped } as HSBColor\n    }\n  }\n\n  // For color areas, keep the working color space to preserve precision\n  // Only convert back if we're in single-channel mode (channels.length === 1)\n  // In multi-channel mode (like 2D color area), the working color space is more appropriate\n  if (channels.length === 1 && workingColor.space !== color.space) {\n    if (color.space === 'rgb')\n      return convertToRgb(workingColor)\n    if (color.space === 'hsl')\n      return convertToHsl(workingColor)\n    if (color.space === 'hsb')\n      return convertToHsb(workingColor)\n  }\n\n  return workingColor\n}\n\n/**\n * Converts an RGB color to a specific color space.\n */\nfunction convertFromRgb(rgb: RGBColor, targetSpace: ColorSpace): Color {\n  if (targetSpace === 'rgb') {\n    return rgb\n  }\n  if (targetSpace === 'hsl') {\n    return rgbToHsl(rgb)\n  }\n  if (targetSpace === 'hsb') {\n    return rgbToHsb(rgb)\n  }\n  throw new Error(`Unknown color space: ${targetSpace}`)\n}\n\n/**\n * Converts an HSL color to a specific color space.\n */\nfunction convertFromHsl(hsl: HSLColor, targetSpace: ColorSpace): Color {\n  if (targetSpace === 'hsl') {\n    return hsl\n  }\n  const rgb = hslToRgb(hsl)\n  if (targetSpace === 'rgb') {\n    return rgb\n  }\n  if (targetSpace === 'hsb') {\n    return rgbToHsb(rgb)\n  }\n  throw new Error(`Unknown color space: ${targetSpace}`)\n}\n\n/**\n * Converts an HSB color to a specific color space.\n */\nfunction convertFromHsb(hsb: HSBColor, targetSpace: ColorSpace): Color {\n  if (targetSpace === 'hsb') {\n    return hsb\n  }\n  const rgb = hsbToRgb(hsb)\n  if (targetSpace === 'rgb') {\n    return rgb\n  }\n  if (targetSpace === 'hsl') {\n    return rgbToHsl(rgb)\n  }\n  throw new Error(`Unknown color space: ${targetSpace}`)\n}\n\n// Conversion helpers (duplicated from convert.ts to avoid circular deps)\nfunction rgbToHsl(rgb: RGBColor): HSLColor {\n  const r = rgb.r / 255\n  const g = rgb.g / 255\n  const b = rgb.b / 255\n\n  const max = Math.max(r, g, b)\n  const min = Math.min(r, g, b)\n  let h = 0\n  let s = 0\n  const l = (max + min) / 2\n\n  if (max !== min) {\n    const d = max - min\n    s = l > 0.5 ? d / (2 - max - min) : d / (max + min)\n    switch (max) {\n      case r:\n        h = (g - b) / d + (g < b ? 6 : 0)\n        break\n      case g:\n        h = (b - r) / d + 2\n        break\n      case b:\n        h = (r - g) / d + 4\n        break\n    }\n    h /= 6\n  }\n\n  return {\n    space: 'hsl',\n    h: h * 360,\n    s: s * 100,\n    l: l * 100,\n    alpha: rgb.alpha,\n  }\n}\n\nfunction hslToRgb(hsl: HSLColor): RGBColor {\n  const h = hsl.h / 360\n  const s = hsl.s / 100\n  const l = hsl.l / 100\n\n  let r: number, g: number, b: number\n\n  if (s === 0) {\n    r = g = b = l\n  }\n  else {\n    const hue2rgb = (p: number, q: number, t: number) => {\n      if (t < 0)\n        t += 1\n      if (t > 1)\n        t -= 1\n      if (t < 1 / 6)\n        return p + (q - p) * 6 * t\n      if (t < 1 / 2)\n        return q\n      if (t < 2 / 3)\n        return p + (q - p) * (2 / 3 - t) * 6\n      return p\n    }\n\n    const q = l < 0.5 ? l * (1 + s) : l + s - l * s\n    const p = 2 * l - q\n    r = hue2rgb(p, q, h + 1 / 3)\n    g = hue2rgb(p, q, h)\n    b = hue2rgb(p, q, h - 1 / 3)\n  }\n\n  return {\n    space: 'rgb',\n    r: r * 255,\n    g: g * 255,\n    b: b * 255,\n    alpha: hsl.alpha,\n  }\n}\n\nfunction rgbToHsb(rgb: RGBColor): HSBColor {\n  const r = rgb.r / 255\n  const g = rgb.g / 255\n  const b = rgb.b / 255\n\n  const max = Math.max(r, g, b)\n  const min = Math.min(r, g, b)\n  const d = max - min\n\n  let h = 0\n  const s = max === 0 ? 0 : d / max\n  const v = max\n\n  if (max !== min) {\n    switch (max) {\n      case r:\n        h = (g - b) / d + (g < b ? 6 : 0)\n        break\n      case g:\n        h = (b - r) / d + 2\n        break\n      case b:\n        h = (r - g) / d + 4\n        break\n    }\n    h /= 6\n  }\n\n  return {\n    space: 'hsb',\n    h: h * 360,\n    s: s * 100,\n    b: v * 100,\n    alpha: rgb.alpha,\n  }\n}\n\nfunction hsbToRgb(hsb: HSBColor): RGBColor {\n  const h = hsb.h / 360\n  const s = hsb.s / 100\n  const v = hsb.b / 100\n\n  let r = 0\n  let g = 0\n  let b = 0\n\n  const i = Math.floor(h * 6)\n  const f = h * 6 - i\n  const p = v * (1 - s)\n  const q = v * (1 - f * s)\n  const t = v * (1 - (1 - f) * s)\n\n  switch (i % 6) {\n    case 0:\n      r = v\n      g = t\n      b = p\n      break\n    case 1:\n      r = q\n      g = v\n      b = p\n      break\n    case 2:\n      r = p\n      g = v\n      b = t\n      break\n    case 3:\n      r = p\n      g = q\n      b = v\n      break\n    case 4:\n      r = t\n      g = p\n      b = v\n      break\n    case 5:\n      r = v\n      g = p\n      b = q\n      break\n  }\n\n  return {\n    space: 'rgb',\n    r: r * 255,\n    g: g * 255,\n    b: b * 255,\n    alpha: hsb.alpha,\n  }\n}\n","import type { Color, ColorChannel, ColorSpace, RGBColor } from './types'\nimport { colorToString, convertToHsb, convertToHsl, convertToRgb } from './convert'\n\n/**\n * Generates a CSS gradient for a color slider track.\n */\nexport function getSliderGradient(\n  color: Color,\n  channel: ColorChannel,\n  colorSpace: ColorSpace = color.space as ColorSpace,\n): string {\n  const hsl = convertToHsl(color)\n  const hsb = convertToHsb(color)\n\n  switch (channel) {\n    case 'hue':\n      return getHueGradient()\n    case 'saturation':\n      return getSaturationGradient(hsl, colorSpace)\n    case 'lightness':\n      return getLightnessGradient(hsl)\n    case 'brightness':\n      return getBrightnessGradient(hsb)\n    case 'red':\n      return getRedGradient(color)\n    case 'green':\n      return getGreenGradient(color)\n    case 'blue':\n      return getBlueGradient(color)\n    case 'alpha':\n      return getAlphaGradient(color)\n    default:\n      return ''\n  }\n}\n\n/**\n * Generates a CSS gradient for a color area (2D picker).\n */\nexport function getAreaGradient(\n  color: Color,\n  xChannel: ColorChannel,\n  yChannel: ColorChannel,\n  colorSpace: ColorSpace = color.space as ColorSpace,\n): { background: string, gradientX: string, gradientY: string } {\n  const hsl = convertToHsl(color)\n  const hsb = convertToHsb(color)\n\n  // Determine which gradient layers to apply based on channels\n  const gradientX = getChannelGradientForArea(color, xChannel, colorSpace, 'x')\n  const gradientY = getChannelGradientForArea(color, yChannel, colorSpace, 'y')\n\n  // Background is the color with both channels at max\n  const bgColor = getAreaBackgroundColor(color, xChannel, yChannel, colorSpace)\n\n  return {\n    background: bgColor,\n    gradientX,\n    gradientY,\n  }\n}\n\nfunction getHueGradient(): string {\n  return 'linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)'\n}\n\nfunction getSaturationGradient(hsl: { h: number, s: number, l: number, alpha: number }, colorSpace: ColorSpace): string {\n  const start = colorToString({ space: 'hsl', h: hsl.h, s: 0, l: colorSpace === 'hsl' ? hsl.l : 50, alpha: 1 }, 'hsl')\n  const end = colorToString({ space: 'hsl', h: hsl.h, s: 100, l: colorSpace === 'hsl' ? hsl.l : 50, alpha: 1 }, 'hsl')\n  return `linear-gradient(to right, ${start}, ${end})`\n}\n\nfunction getLightnessGradient(hsl: { h: number, s: number, l: number, alpha: number }): string {\n  const start = colorToString({ space: 'hsl', h: hsl.h, s: hsl.s, l: 0, alpha: 1 }, 'hsl')\n  const mid = colorToString({ space: 'hsl', h: hsl.h, s: hsl.s, l: 50, alpha: 1 }, 'hsl')\n  const end = colorToString({ space: 'hsl', h: hsl.h, s: hsl.s, l: 100, alpha: 1 }, 'hsl')\n  return `linear-gradient(to right, ${start}, ${mid}, ${end})`\n}\n\nfunction getBrightnessGradient(hsb: { h: number, s: number, b: number, alpha: number }): string {\n  const start = colorToString({ space: 'hsb', h: hsb.h, s: hsb.s, b: 0, alpha: 1 }, 'rgb')\n  const end = colorToString({ space: 'hsb', h: hsb.h, s: hsb.s, b: 100, alpha: 1 }, 'rgb')\n  return `linear-gradient(to right, ${start}, ${end})`\n}\n\nfunction getRedGradient(color: Color): string {\n  const { g, b, alpha } = color.space === 'rgb' ? color : { g: 128, b: 128, alpha: 1 }\n  const start = colorToString({ space: 'rgb', r: 0, g, b, alpha: 1 }, 'rgb')\n  const end = colorToString({ space: 'rgb', r: 255, g, b, alpha: 1 }, 'rgb')\n  return `linear-gradient(to right, ${start}, ${end})`\n}\n\nfunction getGreenGradient(color: Color): string {\n  const { r, b, alpha } = color.space === 'rgb' ? color : { r: 128, b: 128, alpha: 1 }\n  const start = colorToString({ space: 'rgb', r, g: 0, b, alpha: 1 }, 'rgb')\n  const end = colorToString({ space: 'rgb', r, g: 255, b, alpha: 1 }, 'rgb')\n  return `linear-gradient(to right, ${start}, ${end})`\n}\n\nfunction getBlueGradient(color: Color): string {\n  const { r, g, alpha } = color.space === 'rgb' ? color : { r: 128, g: 128, alpha: 1 }\n  const start = colorToString({ space: 'rgb', r, g, b: 0, alpha: 1 }, 'rgb')\n  const end = colorToString({ space: 'rgb', r, g, b: 255, alpha: 1 }, 'rgb')\n  return `linear-gradient(to right, ${start}, ${end})`\n}\n\n// Checkerboard pattern used behind alpha gradients to visualize transparency\nconst CHECKERBOARD_LAYERS = [\n  'linear-gradient(45deg, #ccc 25%, transparent 25%)',\n  'linear-gradient(-45deg, #ccc 25%, transparent 25%)',\n  'linear-gradient(45deg, transparent 75%, #ccc 75%)',\n  'linear-gradient(-45deg, transparent 75%, #ccc 75%)',\n].join(', ')\n\nfunction getAlphaGradient(color: Color): string {\n  const { r, g, b } = color.space === 'rgb' ? color : convertToRgb(color)\n  const solidRgb = `rgb(${Math.round(r)}, ${Math.round(g)}, ${Math.round(b)})`\n  return `linear-gradient(to right, transparent, ${solidRgb}), ${CHECKERBOARD_LAYERS}`\n}\n\nfunction getChannelGradientForArea(\n  color: Color,\n  channel: ColorChannel,\n  colorSpace: ColorSpace,\n  axis: 'x' | 'y',\n): string {\n  const direction = axis === 'x' ? 'to right' : 'to top'\n  const hsl = convertToHsl(color)\n  const hsb = convertToHsb(color)\n\n  switch (channel) {\n    case 'saturation': {\n      if (colorSpace === 'hsb') {\n        // For HSB: White to transparent (overlay on pure hue)\n        // Left side (0% sat) = white, Right side (100% sat) = transparent (shows pure hue)\n        return `linear-gradient(${direction}, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))`\n      }\n      // For HSL: White to full color\n      const fullColor = colorToString({ space: 'hsl', h: hsl.h, s: 100, l: 50, alpha: 1 }, 'rgb')\n      return `linear-gradient(${direction}, #ffffff, ${fullColor})`\n    }\n    case 'lightness': {\n      // White -> color -> black\n      const mid = colorToString({ space: 'hsl', h: hsl.h, s: hsl.s, l: 50, alpha: 1 }, 'rgb')\n      return `linear-gradient(${direction}, #000000, ${mid}, #ffffff)`\n    }\n    case 'brightness': {\n      // For HSB: Transparent to black (overlay on pure hue)\n      // Top (100% brightness) = transparent (shows pure hue), Bottom (0% brightness) = black\n      return `linear-gradient(${direction}, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1))`\n    }\n    default:\n      return ''\n  }\n}\n\nfunction getAreaBackgroundColor(\n  color: Color,\n  xChannel: ColorChannel,\n  yChannel: ColorChannel,\n  colorSpace: ColorSpace,\n): string {\n  const hsl = convertToHsl(color)\n  const hsb = convertToHsb(color)\n\n  // For HSL saturation/lightness area, show pure hue\n  if (colorSpace === 'hsl' && xChannel === 'saturation' && yChannel === 'lightness') {\n    return colorToString({ space: 'hsl', h: hsl.h, s: 100, l: 50, alpha: 1 }, 'rgb')\n  }\n\n  // For HSB saturation/brightness area, show pure hue\n  if (colorSpace === 'hsb' && xChannel === 'saturation' && yChannel === 'brightness') {\n    return colorToString({ space: 'hsb', h: hsb.h, s: 100, b: 100, alpha: 1 }, 'rgb')\n  }\n\n  // Default to white\n  return '#ffffff'\n}\n\n/**\n * Gets the CSS background style for a color area.\n */\nexport function getAreaBackgroundStyle(\n  color: Color,\n  xChannel: ColorChannel,\n  yChannel: ColorChannel,\n  colorSpace: ColorSpace = color.space as ColorSpace,\n): Record<string, string> {\n  const hsl = convertToHsl(color)\n  const hsb = convertToHsb(color)\n\n  // Hue-based color picker (Hue/Saturation, Hue/Lightness, Hue/Brightness)\n  // Shows full rainbow spectrum horizontally\n  if (xChannel === 'hue') {\n    // Full hue gradient as background (rainbow spectrum)\n    const hueGradient = 'linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)'\n\n    if (yChannel === 'saturation') {\n      // Vertical: gray at bottom (0% sat) fading to transparent at top (100% sat shows hue)\n      // No blend mode needed — transparent stacking is correct\n      const desatColor = colorToString({ space: 'hsl', h: hsl.h, s: 0, l: hsl.l, alpha: 1 }, 'rgb')\n      return {\n        backgroundImage: `linear-gradient(to bottom, transparent, ${desatColor}), ${hueGradient}`,\n      }\n    }\n\n    if (yChannel === 'lightness') {\n      // Vertical: black at bottom (L=0) → transparent at middle (L=50, shows hue) → white at top (L=100)\n      return {\n        backgroundImage: `linear-gradient(to top, #000000, transparent, #ffffff), ${hueGradient}`,\n      }\n    }\n\n    if (yChannel === 'brightness') {\n      // Vertical: black at bottom (B=0) → transparent at top (B=100, shows hue)\n      return {\n        backgroundImage: `linear-gradient(to top, #000000, transparent), ${hueGradient}`,\n      }\n    }\n  }\n\n  // Classic color picker gradients for saturation-based pickers\n  if (xChannel === 'saturation' && (yChannel === 'lightness' || yChannel === 'brightness')) {\n    if (colorSpace === 'hsl') {\n      // HSL: Base is pure hue at 50% lightness\n      // Saturation x-axis: gray (S=0) at left fading to transparent (shows pure hue at S=100)\n      // Lightness y-axis: black at bottom (L=0), transparent at middle (L=50), white at top (L=100)\n      const hueColor = colorToString({ space: 'hsl', h: hsl.h, s: 100, l: 50, alpha: 1 }, 'rgb')\n      const grayColor = colorToString({ space: 'hsl', h: hsl.h, s: 0, l: 50, alpha: 1 }, 'rgb')\n      const satGradient = `linear-gradient(to right, ${grayColor}, transparent)`\n      const lightGradient = `linear-gradient(to top, #000000, transparent, #ffffff)`\n\n      return {\n        backgroundColor: hueColor,\n        backgroundImage: `${lightGradient}, ${satGradient}`,\n      }\n    }\n\n    if (colorSpace === 'hsb') {\n      // HSB: Base is pure hue (full sat, full brightness)\n      // Top edge: white (0% sat) → pure hue (100% sat)\n      // Bottom edge: always black (0% brightness)\n      const hueColor = colorToString({ space: 'hsb', h: hsb.h, s: 100, b: 100, alpha: 1 }, 'rgb')\n      // White to transparent (left to right)\n      const satGradient = `linear-gradient(to right, #ffffff, transparent)`\n      // Black gradient from bottom up\n      const brightGradient = `linear-gradient(to top, #000000, transparent)`\n\n      return {\n        backgroundColor: hueColor,\n        backgroundImage: `${brightGradient}, ${satGradient}`,\n      }\n    }\n  }\n\n  // RGB color picker (Red/Green, Red/Blue, Green/Blue)\n  // Uses screen blend mode to combine gradients additively (like React Spectrum)\n  // Formula: 1 - (1 - a) * (1 - b), effectively adds RGB values\n  if (colorSpace === 'rgb'\n    && (xChannel === 'red' || xChannel === 'green' || xChannel === 'blue')\n    && (yChannel === 'red' || yChannel === 'green' || yChannel === 'blue')) {\n    const rgb = convertToRgb(color)\n\n    // Get the constant channel (z-channel - the one NOT x or y)\n    const allChannels = ['red', 'green', 'blue'] as const\n    const varyingChannels = [xChannel, yChannel]\n    const constantChannel = allChannels.find(c => !varyingChannels.includes(c))!\n    const constantValue = rgb[constantChannel === 'red' ? 'r' : constantChannel === 'green' ? 'g' : 'b']\n\n    // Create the three layers for screen blend mode:\n    // 1. X gradient: black to full-X-color\n    // 2. Y gradient: black to full-Y-color\n    // 3. Background: black with Z channel set\n\n    // X gradient: black (0,0,0) → full X (255,0,0) for red, etc.\n    const xColorStart: RGBColor = { space: 'rgb', r: 0, g: 0, b: 0, alpha: 1 }\n    const xColorEnd: RGBColor = {\n      space: 'rgb',\n      r: xChannel === 'red' ? 255 : 0,\n      g: xChannel === 'green' ? 255 : 0,\n      b: xChannel === 'blue' ? 255 : 0,\n      alpha: 1,\n    }\n    const xGradient = `linear-gradient(to right, ${colorToString(xColorStart, 'rgb')}, ${colorToString(xColorEnd, 'rgb')})`\n\n    // Y gradient: black (0,0,0) → full Y (0,255,0) for green, etc.\n    const yColorEnd: RGBColor = {\n      space: 'rgb',\n      r: yChannel === 'red' ? 255 : 0,\n      g: yChannel === 'green' ? 255 : 0,\n      b: yChannel === 'blue' ? 255 : 0,\n      alpha: 1,\n    }\n    const yGradient = `linear-gradient(to top, ${colorToString(xColorStart, 'rgb')}, ${colorToString(yColorEnd, 'rgb')})`\n\n    // Background: black with constant Z channel value\n    const bgColor: RGBColor = {\n      space: 'rgb',\n      r: constantChannel === 'red' ? constantValue : 0,\n      g: constantChannel === 'green' ? constantValue : 0,\n      b: constantChannel === 'blue' ? constantValue : 0,\n      alpha: 1,\n    }\n\n    return {\n      backgroundColor: colorToString(bgColor, 'rgb'),\n      backgroundImage: `${yGradient}, ${xGradient}`,\n      backgroundBlendMode: 'screen',\n    }\n  }\n\n  // Fallback for other combinations\n  const { background, gradientX, gradientY } = getAreaGradient(color, xChannel, yChannel, colorSpace)\n  const gradients: string[] = []\n  if (gradientY)\n    gradients.push(gradientY)\n  if (gradientX)\n    gradients.push(gradientX)\n\n  return {\n    backgroundColor: background,\n    backgroundImage: gradients.join(', '),\n  }\n}\n\n/**\n * Gets the CSS background for a slider track.\n */\nexport function getSliderBackgroundStyle(\n  color: Color,\n  channel: ColorChannel,\n  colorSpace: ColorSpace = color.space as ColorSpace,\n): Record<string, string> {\n  const gradient = getSliderGradient(color, channel, colorSpace)\n\n  if (channel === 'alpha') {\n    return {\n      background: gradient,\n      backgroundSize: '100% 100%, 8px 8px, 8px 8px, 8px 8px, 8px 8px',\n      backgroundPosition: '0 0, 0 0, 0 4px, 4px -4px, -4px 0px',\n    }\n  }\n\n  return {\n    background: gradient,\n  }\n}\n","import type { Color, HSBColor, HSLColor, RGBColor } from './types'\n\nconst HEX3_RE = /^[0-9A-F]{3}$/i\nconst HEX6_RE = /^[0-9A-F]{6}$/i\nconst HEX8_RE = /^[0-9A-F]{8}$/i\nconst RGB_RE = /rgba?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*(?:,\\s*([\\d.]+)\\s*)?\\)/\nconst HSL_RE = /hsla?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)%\\s*,\\s*([\\d.]+)%\\s*(?:,\\s*([\\d.]+)\\s*)?\\)/\nconst HSB_RE = /hsb[av]?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)%?\\s*,\\s*([\\d.]+)%?\\s*(?:,\\s*([\\d.]+)\\s*)?\\)/\n\n/**\n * Parses a color string into a Color object.\n * Supports hex (#rrggbb, #rgb), rgb(), hsl(), and hsb()/hsv() formats.\n */\nexport function parseColor(value: string): Color {\n  const trimmed = value.trim().toLowerCase()\n\n  // Hex format\n  if (trimmed.startsWith('#')) {\n    return parseHex(trimmed)\n  }\n\n  // rgb() format\n  if (trimmed.startsWith('rgb')) {\n    return parseRgb(trimmed)\n  }\n\n  // hsl() format\n  if (trimmed.startsWith('hsl')) {\n    return parseHsl(trimmed)\n  }\n\n  // hsb() or hsv() format\n  if (trimmed.startsWith('hsb') || trimmed.startsWith('hsv')) {\n    return parseHsb(trimmed)\n  }\n\n  throw new Error(`Unable to parse color: ${value}`)\n}\n\nfunction parseHex(hex: string): RGBColor {\n  let normalized = hex.slice(1)\n\n  // Validate hex format (3, 6, or 8 hex digits)\n  if (!HEX3_RE.test(normalized) && !HEX6_RE.test(normalized) && !HEX8_RE.test(normalized)) {\n    throw new Error(`Invalid hex color: ${hex}. Expected format: #RGB, #RRGGBB, or #RRGGBBAA`)\n  }\n\n  // Expand shorthand (e.g., #f00 -> #ff0000)\n  if (normalized.length === 3) {\n    normalized = normalized.split('').map(c => c + c).join('')\n  }\n\n  // Handle 6-digit hex\n  if (normalized.length === 6) {\n    const bigint = parseInt(normalized, 16)\n    return {\n      space: 'rgb',\n      r: (bigint >> 16) & 255,\n      g: (bigint >> 8) & 255,\n      b: bigint & 255,\n      alpha: 1,\n    }\n  }\n\n  // Handle 8-digit hex (with alpha)\n  if (normalized.length === 8) {\n    const bigint = parseInt(normalized, 16)\n    return {\n      space: 'rgb',\n      r: (bigint >> 24) & 255,\n      g: (bigint >> 16) & 255,\n      b: (bigint >> 8) & 255,\n      alpha: (bigint & 255) / 255,\n    }\n  }\n\n  throw new Error(`Invalid hex color: ${hex}`)\n}\n\nfunction parseRgb(rgb: string): RGBColor {\n  const match = rgb.match(RGB_RE)\n  if (!match) {\n    throw new Error(`Invalid RGB color: ${rgb}`)\n  }\n\n  return {\n    space: 'rgb',\n    r: parseFloat(match[1]),\n    g: parseFloat(match[2]),\n    b: parseFloat(match[3]),\n    alpha: match[4] ? parseFloat(match[4]) : 1,\n  }\n}\n\nfunction parseHsl(hsl: string): HSLColor {\n  const match = hsl.match(HSL_RE)\n  if (!match) {\n    throw new Error(`Invalid HSL color: ${hsl}`)\n  }\n\n  return {\n    space: 'hsl',\n    h: parseFloat(match[1]),\n    s: parseFloat(match[2]),\n    l: parseFloat(match[3]),\n    alpha: match[4] ? parseFloat(match[4]) : 1,\n  }\n}\n\nfunction parseHsb(hsb: string): HSBColor {\n  const match = hsb.match(HSB_RE)\n  if (!match) {\n    throw new Error(`Invalid HSB color: ${hsb}`)\n  }\n\n  return {\n    space: 'hsb',\n    h: parseFloat(match[1]),\n    s: parseFloat(match[2]),\n    b: parseFloat(match[3]),\n    alpha: match[4] ? parseFloat(match[4]) : 1,\n  }\n}\n\n/**\n * Normalizes a value to a Color object.\n * If already a Color, returns it. If a string, parses it.\n */\nexport function normalizeColor(value: string | Color): Color {\n  if (typeof value === 'string') {\n    return parseColor(value)\n  }\n  return value\n}\n\n/**\n * Checks if a string is a valid color.\n */\nexport function isValidColor(value: string): boolean {\n  try {\n    parseColor(value)\n    return true\n  }\n  catch {\n    return false\n  }\n}\n","/**\n * Converts a hex color string to RGB (Red, Green, Blue).\n * @param hex Hex color string (e.g., \"#ff5733\" or \"#f53\")\n * @returns An object containing red, green, and blue values (0-255).\n */\nconst HASH_PREFIX_RE = /^#/\nconst HEX6_RE = /^[0-9A-F]{6}$/i\nconst HEX3_RE = /^[0-9A-F]{3}$/i\n\nexport function hexToRGB(hex: string): { r: number, g: number, b: number } {\n  hex = hex.replace(HASH_PREFIX_RE, '')\n\n  // Validate hex format (3 or 6 hex digits)\n  if (!HEX6_RE.test(hex) && !HEX3_RE.test(hex)) {\n    throw new Error(`Invalid hex color: ${hex}. Expected format: #RGB or #RRGGBB`)\n  }\n\n  // Handle shorthand hex (e.g., \"#FFF\" -> \"#FFFFFF\")\n  if (hex.length === 3) {\n    hex = hex.split('').map(c => c + c).join('')\n  }\n\n  const bigint = parseInt(hex, 16)\n  const r = (bigint >> 16) & 255\n  const g = (bigint >> 8) & 255\n  const b = bigint & 255\n  return { r, g, b }\n}\n\n/**\n * Converts a hex color string to HSL (Hue, Saturation, Lightness).\n * @param hex Hex color string (e.g., \"#ff5733\")\n * @returns An object containing hue (0-360), saturation (0-100), and lightness (0-100) values.\n */\nexport function hexToHSL(hex: string): { h: number, s: number, l: number } {\n  let { r, g, b } = hexToRGB(hex)\n\n  r /= 255\n  g /= 255\n  b /= 255\n\n  const max = Math.max(r, g, b)\n  const min = Math.min(r, g, b)\n  let h: number\n  let s: number\n  let l: number = (max + min) / 2\n\n  if (max === min) {\n    h = s = 0 // achromatic\n    l *= 100 // Scale l to 0-100 for consistency with chromatic case\n  }\n  else {\n    const d = max - min\n    s = l > 0.5 ? d / (2 - max - min) : d / (max + min)\n    if (max === r) {\n      h = (g - b) / d + (g < b ? 6 : 0)\n    }\n    else if (max === g) {\n      h = (b - r) / d + 2\n    }\n    else {\n      h = (r - g) / d + 4\n    }\n    h /= 6\n    h *= 360\n    s *= 100\n    l *= 100\n  }\n\n  return { h, s, l }\n}\n\n/**\n * Converts a hex color string to a human-readable color name.\n * @param hex Hex color string (e.g., \"#ff5733\")\n * @returns A human-readable color name based on the hue, saturation, and lightness.\n */\nexport function getColorName(hex: string) {\n  const { h, s, l } = hexToHSL(hex)\n\n  // Handle achromatic colors (low saturation)\n  // Using 0-100 scale for all comparisons\n  if (s < 10) {\n    if (l < 10)\n      return 'black'\n    if (l > 95)\n      return 'white'\n    if (l < 20)\n      return 'very dark gray'\n    if (l < 35)\n      return 'dark gray'\n    if (l < 65)\n      return 'gray'\n    if (l < 80)\n      return 'light gray'\n    return 'very light gray'\n  }\n\n  // Determine base color by hue\n  let baseName\n  if (h < 15 || h >= 345)\n    baseName = 'red'\n  else if (h < 45)\n    baseName = 'orange'\n  else if (h < 75)\n    baseName = 'yellow'\n  else if (h < 105)\n    baseName = 'yellow-green'\n  else if (h < 135)\n    baseName = 'green'\n  else if (h < 165)\n    baseName = 'green-cyan'\n  else if (h < 195)\n    baseName = 'cyan'\n  else if (h < 225)\n    baseName = 'blue'\n  else if (h < 255)\n    baseName = 'blue-violet'\n  else if (h < 285)\n    baseName = 'violet'\n  else if (h < 315)\n    baseName = 'magenta'\n  else baseName = 'red-magenta'\n\n  // Add descriptors based on saturation and lightness\n  // Using 0-100 scale for all comparisons\n  const descriptors = []\n  if (s > 80)\n    descriptors.push('vibrant')\n  else if (s < 30)\n    descriptors.push('muted')\n\n  if (l > 80)\n    descriptors.push('light')\n  else if (l < 30)\n    descriptors.push('dark')\n\n  return descriptors.length > 0\n    ? `${descriptors.join(' ')} ${baseName}`\n    : baseName\n}\n\nexport function getColorContrast(hex: string): 'light' | 'dark' {\n  const { r, g, b } = hexToRGB(hex)\n  const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255\n  return luminance > 0.5 ? 'dark' : 'light'\n}\n","<script lang=\"ts\">\nimport type { ComputedRef, CSSProperties, Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Color, ColorChannel, ColorSpace } from '@/shared/color'\nimport type { FormFieldProps } from '@/shared/types'\nimport { createContext, useFormControl, useForwardExpose } from '@/shared'\n\nexport interface ColorAreaRootProps extends PrimitiveProps, FormFieldProps {\n  /** The color value (controlled). Can be a hex string or Color object. */\n  modelValue?: string | Color\n  /** The default color value (uncontrolled). */\n  defaultValue?: string | Color\n  /** The color space to operate in. */\n  colorSpace?: ColorSpace\n  /** Color channel for the horizontal (x) axis. */\n  xChannel?: ColorChannel\n  /** Color channel for the vertical (y) axis. */\n  yChannel?: ColorChannel\n  /** When `true`, prevents the user from interacting with the area. */\n  disabled?: boolean\n  /** The name of the x channel input element for form submission. */\n  xName?: string\n  /** The name of the y channel input element for form submission. */\n  yName?: string\n}\n\nexport type ColorAreaRootEmits = {\n  'update:modelValue': [value: string]\n  'update:color': [value: Color]\n  'change': [value: string]\n  'changeEnd': [value: string]\n}\n\nexport interface ColorAreaRootContext {\n  color: Ref<Color>\n  xValue: Ref<number>\n  yValue: Ref<number>\n  xChannel: Ref<ColorChannel>\n  yChannel: Ref<ColorChannel>\n  colorSpace: Ref<ColorSpace>\n  disabled: Ref<boolean>\n  xRange: ComputedRef<{ min: number, max: number, step: number }>\n  yRange: ComputedRef<{ min: number, max: number, step: number }>\n  thumbRef: Ref<HTMLElement | undefined>\n  updateValues: (x: number, y: number) => void\n  commitValues: () => void\n}\n\nexport const [injectColorAreaRootContext, provideColorAreaRootContext]\n  = createContext<ColorAreaRootContext>('ColorAreaRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, nextTick, ref, toRefs, watch } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport {\n  colorToString,\n  convertToHsb,\n  convertToHsl,\n  getAreaBackgroundStyle,\n  getChannelRange,\n  getChannelValue,\n  normalizeColor,\n  setChannelValues,\n} from '@/shared/color'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\n\nconst props = withDefaults(defineProps<ColorAreaRootProps>(), {\n  colorSpace: 'hsl',\n  xChannel: 'hue',\n  yChannel: 'saturation',\n  disabled: false,\n  defaultValue: '#ff0000',\n  as: 'div',\n})\n\nconst emits = defineEmits<ColorAreaRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** CSS styles for the color area background gradient */\n    style: CSSProperties\n  }) => any\n}>()\n\nconst { colorSpace, xChannel, yChannel, disabled } = toRefs(props)\nconst { forwardRef, currentElement } = useForwardExpose()\nconst isFormControl = useFormControl(currentElement)\n\n// Normalize the model value to a Color object\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n})\n\n// The actual color object for rendering\nconst color = computed({\n  get: () => normalizeColor(modelValue.value ?? '#000000'),\n  set: (newColor: Color) => {\n    const hexString = colorToString(newColor, 'hex')\n    modelValue.value = hexString\n    emits('update:color', newColor)\n  },\n})\n\n// Get channel ranges\nconst xRange = computed(() => getChannelRange(xChannel.value))\nconst yRange = computed(() => getChannelRange(yChannel.value))\n\n// Store exact channel values as refs to avoid floating-point drift\n// Initialize from the color value (rounded to nearest integer)\nconst xValue = ref(Math.round(getChannelValue(color.value, xChannel.value)))\nconst yValue = ref(Math.round(getChannelValue(color.value, yChannel.value)))\n\n// Store the hue separately to preserve it when saturation is 0 (grayscale)\nconst hueValue = ref(colorSpace.value === 'hsl'\n  ? convertToHsl(color.value).h\n  : colorSpace.value === 'hsb'\n    ? convertToHsb(color.value).h\n    : 0)\n\n// Track when we're in the middle of an update to prevent circular sync\nlet isUpdating = false\n\n// Sync channel values when color changes externally\nwatch(() => color.value, (newColor) => {\n  // Skip if we just triggered this update ourselves\n  if (isUpdating)\n    return\n\n  const newX = Math.round(getChannelValue(newColor, xChannel.value))\n  const newY = Math.round(getChannelValue(newColor, yChannel.value))\n\n  // Only update if the rounded value meaningfully changed.\n  // During drag, xValue/yValue store exact floats (e.g. 80.45).\n  // External updates (e.g. hue slider) should not snap these to integers.\n  if (Math.round(xValue.value) !== newX)\n    xValue.value = newX\n  if (Math.round(yValue.value) !== newY)\n    yValue.value = newY\n\n  // Update hue if saturation is not 0 (to preserve hue for grayscale colors)\n  if (colorSpace.value === 'hsl') {\n    const hsl = convertToHsl(newColor)\n    if (hsl.s > 0)\n      hueValue.value = hsl.h\n  }\n  else if (colorSpace.value === 'hsb') {\n    const hsb = convertToHsb(newColor)\n    if (hsb.s > 0)\n      hueValue.value = hsb.h\n  }\n}, { immediate: true })\n\n// Background styles for the color area\n// Use preserved hue to ensure background doesn't change when saturation is 0\nconst areaStyles = computed(() => {\n  // Create a color with the preserved hue for background computation\n  let bgColor = color.value\n  if (colorSpace.value === 'hsl' || colorSpace.value === 'hsb') {\n    if (colorSpace.value === 'hsl') {\n      bgColor = { space: 'hsl', h: hueValue.value, s: 100, l: 50, alpha: 1 }\n    }\n    else {\n      bgColor = { space: 'hsb', h: hueValue.value, s: 100, b: 100, alpha: 1 }\n    }\n  }\n  return getAreaBackgroundStyle(bgColor, xChannel.value, yChannel.value, colorSpace.value)\n})\n\nfunction updateValues(x: number, y: number) {\n  const clampedX = Math.max(xRange.value.min, Math.min(xRange.value.max, x))\n  const clampedY = Math.max(yRange.value.min, Math.min(yRange.value.max, y))\n\n  // Update exact values\n  xValue.value = clampedX\n  yValue.value = clampedY\n\n  // Prevent watch from syncing back to xValue/yValue\n  isUpdating = true\n\n  // Update color from exact values (with preserved hue)\n  const channels: Array<{ channel: ColorChannel, value: number }> = [\n    { channel: xChannel.value, value: clampedX },\n    { channel: yChannel.value, value: clampedY },\n  ]\n\n  // Preserve hue only when it is NOT directly controlled by an axis\n  const usesHueAxis = xChannel.value === 'hue' || yChannel.value === 'hue'\n  if (!usesHueAxis && (colorSpace.value === 'hsl' || colorSpace.value === 'hsb')) {\n    channels.push({ channel: 'hue', value: hueValue.value })\n  }\n\n  color.value = setChannelValues(color.value, channels)\n\n  // Re-enable watch sync after Vue has processed the update\n  nextTick(() => {\n    isUpdating = false\n  })\n}\n\nfunction commitValues() {\n  emits('changeEnd', colorToString(color.value, 'hex'))\n}\n\nconst thumbRef = ref<HTMLElement>()\n\nprovideColorAreaRootContext({\n  color: computed(() => color.value) as Ref<Color>,\n  xValue,\n  yValue,\n  xChannel,\n  yChannel,\n  colorSpace,\n  disabled,\n  xRange,\n  yRange,\n  thumbRef,\n  updateValues,\n  commitValues,\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"group\"\n    :aria-disabled=\"disabled ? 'true' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n  >\n    <slot :style=\"areaStyles\" />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && xName\"\n      type=\"text\"\n      :value=\"xValue\"\n      :name=\"xName\"\n      :disabled=\"disabled\"\n    />\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && yName\"\n      type=\"text\"\n      :value=\"yValue\"\n      :name=\"yName\"\n      :disabled=\"disabled\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, CSSProperties, Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Color, ColorChannel, ColorSpace } from '@/shared/color'\nimport type { FormFieldProps } from '@/shared/types'\nimport { createContext, useFormControl, useForwardExpose } from '@/shared'\n\nexport interface ColorAreaRootProps extends PrimitiveProps, FormFieldProps {\n  /** The color value (controlled). Can be a hex string or Color object. */\n  modelValue?: string | Color\n  /** The default color value (uncontrolled). */\n  defaultValue?: string | Color\n  /** The color space to operate in. */\n  colorSpace?: ColorSpace\n  /** Color channel for the horizontal (x) axis. */\n  xChannel?: ColorChannel\n  /** Color channel for the vertical (y) axis. */\n  yChannel?: ColorChannel\n  /** When `true`, prevents the user from interacting with the area. */\n  disabled?: boolean\n  /** The name of the x channel input element for form submission. */\n  xName?: string\n  /** The name of the y channel input element for form submission. */\n  yName?: string\n}\n\nexport type ColorAreaRootEmits = {\n  'update:modelValue': [value: string]\n  'update:color': [value: Color]\n  'change': [value: string]\n  'changeEnd': [value: string]\n}\n\nexport interface ColorAreaRootContext {\n  color: Ref<Color>\n  xValue: Ref<number>\n  yValue: Ref<number>\n  xChannel: Ref<ColorChannel>\n  yChannel: Ref<ColorChannel>\n  colorSpace: Ref<ColorSpace>\n  disabled: Ref<boolean>\n  xRange: ComputedRef<{ min: number, max: number, step: number }>\n  yRange: ComputedRef<{ min: number, max: number, step: number }>\n  thumbRef: Ref<HTMLElement | undefined>\n  updateValues: (x: number, y: number) => void\n  commitValues: () => void\n}\n\nexport const [injectColorAreaRootContext, provideColorAreaRootContext]\n  = createContext<ColorAreaRootContext>('ColorAreaRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, nextTick, ref, toRefs, watch } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport {\n  colorToString,\n  convertToHsb,\n  convertToHsl,\n  getAreaBackgroundStyle,\n  getChannelRange,\n  getChannelValue,\n  normalizeColor,\n  setChannelValues,\n} from '@/shared/color'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\n\nconst props = withDefaults(defineProps<ColorAreaRootProps>(), {\n  colorSpace: 'hsl',\n  xChannel: 'hue',\n  yChannel: 'saturation',\n  disabled: false,\n  defaultValue: '#ff0000',\n  as: 'div',\n})\n\nconst emits = defineEmits<ColorAreaRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** CSS styles for the color area background gradient */\n    style: CSSProperties\n  }) => any\n}>()\n\nconst { colorSpace, xChannel, yChannel, disabled } = toRefs(props)\nconst { forwardRef, currentElement } = useForwardExpose()\nconst isFormControl = useFormControl(currentElement)\n\n// Normalize the model value to a Color object\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n})\n\n// The actual color object for rendering\nconst color = computed({\n  get: () => normalizeColor(modelValue.value ?? '#000000'),\n  set: (newColor: Color) => {\n    const hexString = colorToString(newColor, 'hex')\n    modelValue.value = hexString\n    emits('update:color', newColor)\n  },\n})\n\n// Get channel ranges\nconst xRange = computed(() => getChannelRange(xChannel.value))\nconst yRange = computed(() => getChannelRange(yChannel.value))\n\n// Store exact channel values as refs to avoid floating-point drift\n// Initialize from the color value (rounded to nearest integer)\nconst xValue = ref(Math.round(getChannelValue(color.value, xChannel.value)))\nconst yValue = ref(Math.round(getChannelValue(color.value, yChannel.value)))\n\n// Store the hue separately to preserve it when saturation is 0 (grayscale)\nconst hueValue = ref(colorSpace.value === 'hsl'\n  ? convertToHsl(color.value).h\n  : colorSpace.value === 'hsb'\n    ? convertToHsb(color.value).h\n    : 0)\n\n// Track when we're in the middle of an update to prevent circular sync\nlet isUpdating = false\n\n// Sync channel values when color changes externally\nwatch(() => color.value, (newColor) => {\n  // Skip if we just triggered this update ourselves\n  if (isUpdating)\n    return\n\n  const newX = Math.round(getChannelValue(newColor, xChannel.value))\n  const newY = Math.round(getChannelValue(newColor, yChannel.value))\n\n  // Only update if the rounded value meaningfully changed.\n  // During drag, xValue/yValue store exact floats (e.g. 80.45).\n  // External updates (e.g. hue slider) should not snap these to integers.\n  if (Math.round(xValue.value) !== newX)\n    xValue.value = newX\n  if (Math.round(yValue.value) !== newY)\n    yValue.value = newY\n\n  // Update hue if saturation is not 0 (to preserve hue for grayscale colors)\n  if (colorSpace.value === 'hsl') {\n    const hsl = convertToHsl(newColor)\n    if (hsl.s > 0)\n      hueValue.value = hsl.h\n  }\n  else if (colorSpace.value === 'hsb') {\n    const hsb = convertToHsb(newColor)\n    if (hsb.s > 0)\n      hueValue.value = hsb.h\n  }\n}, { immediate: true })\n\n// Background styles for the color area\n// Use preserved hue to ensure background doesn't change when saturation is 0\nconst areaStyles = computed(() => {\n  // Create a color with the preserved hue for background computation\n  let bgColor = color.value\n  if (colorSpace.value === 'hsl' || colorSpace.value === 'hsb') {\n    if (colorSpace.value === 'hsl') {\n      bgColor = { space: 'hsl', h: hueValue.value, s: 100, l: 50, alpha: 1 }\n    }\n    else {\n      bgColor = { space: 'hsb', h: hueValue.value, s: 100, b: 100, alpha: 1 }\n    }\n  }\n  return getAreaBackgroundStyle(bgColor, xChannel.value, yChannel.value, colorSpace.value)\n})\n\nfunction updateValues(x: number, y: number) {\n  const clampedX = Math.max(xRange.value.min, Math.min(xRange.value.max, x))\n  const clampedY = Math.max(yRange.value.min, Math.min(yRange.value.max, y))\n\n  // Update exact values\n  xValue.value = clampedX\n  yValue.value = clampedY\n\n  // Prevent watch from syncing back to xValue/yValue\n  isUpdating = true\n\n  // Update color from exact values (with preserved hue)\n  const channels: Array<{ channel: ColorChannel, value: number }> = [\n    { channel: xChannel.value, value: clampedX },\n    { channel: yChannel.value, value: clampedY },\n  ]\n\n  // Preserve hue only when it is NOT directly controlled by an axis\n  const usesHueAxis = xChannel.value === 'hue' || yChannel.value === 'hue'\n  if (!usesHueAxis && (colorSpace.value === 'hsl' || colorSpace.value === 'hsb')) {\n    channels.push({ channel: 'hue', value: hueValue.value })\n  }\n\n  color.value = setChannelValues(color.value, channels)\n\n  // Re-enable watch sync after Vue has processed the update\n  nextTick(() => {\n    isUpdating = false\n  })\n}\n\nfunction commitValues() {\n  emits('changeEnd', colorToString(color.value, 'hex'))\n}\n\nconst thumbRef = ref<HTMLElement>()\n\nprovideColorAreaRootContext({\n  color: computed(() => color.value) as Ref<Color>,\n  xValue,\n  yValue,\n  xChannel,\n  yChannel,\n  colorSpace,\n  disabled,\n  xRange,\n  yRange,\n  thumbRef,\n  updateValues,\n  commitValues,\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"group\"\n    :aria-disabled=\"disabled ? 'true' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n  >\n    <slot :style=\"areaStyles\" />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && xName\"\n      type=\"text\"\n      :value=\"xValue\"\n      :name=\"xName\"\n      :disabled=\"disabled\"\n    />\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && yName\"\n      type=\"text\"\n      :value=\"yValue\"\n      :name=\"yName\"\n      :disabled=\"disabled\"\n    />\n  </Primitive>\n</template>\n","import { clamp } from '@/shared'\n\n// https://github.com/tmcw-up-for-adoption/simple-linear-scale/blob/master/index.js\nexport function linearScale(input: readonly [number, number], output: readonly [number, number]) {\n  return (value: number) => {\n    if (input[0] === input[1] || output[0] === output[1])\n      return output[0]\n    const ratio = (output[1] - output[0]) / (input[1] - input[0])\n    return output[0] + ratio * (value - input[0])\n  }\n}\n\nexport function convertValueToPercentage(value: number, min: number, max: number) {\n  if (max === min)\n    return 0\n  const maxSteps = max - min\n  const percentPerStep = 100 / maxSteps\n  const percentage = percentPerStep * (value - min)\n  return clamp(percentage, 0, 100)\n}\n\nexport function getThumbPosition(percentage: number): string {\n  return `${percentage}%`\n}\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ColorAreaAreaProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { injectColorAreaRootContext } from './ColorAreaRoot.vue'\nimport { linearScale } from './utils'\n\nconst props = withDefaults(defineProps<ColorAreaAreaProps>(), {\n  as: 'div',\n})\n\nconst rootContext = injectColorAreaRootContext()\nconst { primitiveElement, currentElement: areaElement } = usePrimitiveElement()\n\nconst isDragging = ref(false)\n\n// Convert pointer position to channel values\nfunction getValuesFromPointer(event: PointerEvent) {\n  const rect = areaElement.value!.getBoundingClientRect()\n\n  const xInput: [number, number] = [0, rect.width]\n  const xOutput: [number, number] = [rootContext.xRange.value.min, rootContext.xRange.value.max]\n  const xScale = linearScale(xInput, xOutput)\n  const xValue = xScale(event.clientX - rect.left)\n\n  // Y is inverted (top is max, bottom is min for most channels)\n  const yInput: [number, number] = [0, rect.height]\n  const yOutput: [number, number] = [rootContext.yRange.value.max, rootContext.yRange.value.min]\n  const yScale = linearScale(yInput, yOutput)\n  const yValue = yScale(event.clientY - rect.top)\n\n  return { x: xValue, y: yValue }\n}\n\nfunction handlePointerDown(event: PointerEvent) {\n  if (rootContext.disabled.value)\n    return\n\n  const target = event.target as HTMLElement\n  target.setPointerCapture(event.pointerId)\n  event.preventDefault()\n\n  isDragging.value = true\n  const { x, y } = getValuesFromPointer(event)\n  rootContext.updateValues(x, y)\n\n  // Focus the thumb when dragging starts\n  rootContext.thumbRef.value?.focus()\n}\n\nfunction handlePointerMove(event: PointerEvent) {\n  if (!isDragging.value || rootContext.disabled.value)\n    return\n\n  const target = event.target as HTMLElement\n  if (target.hasPointerCapture(event.pointerId)) {\n    const { x, y } = getValuesFromPointer(event)\n    rootContext.updateValues(x, y)\n  }\n}\n\nfunction handlePointerUp(event: PointerEvent) {\n  if (!isDragging.value)\n    return\n\n  const target = event.target as HTMLElement\n  target.releasePointerCapture(event.pointerId)\n  isDragging.value = false\n  rootContext.commitValues()\n}\n\n// Keyboard navigation\nfunction handleKeyDown(event: KeyboardEvent) {\n  if (rootContext.disabled.value)\n    return\n\n  const stepMultiplier = event.shiftKey ? 10 : 1\n  const xStepSize = rootContext.xRange.value.step * stepMultiplier\n  const yStepSize = rootContext.yRange.value.step * stepMultiplier\n\n  let xDelta = 0\n  let yDelta = 0\n\n  switch (event.key) {\n    case 'ArrowLeft':\n      xDelta = -xStepSize\n      break\n    case 'ArrowRight':\n      xDelta = xStepSize\n      break\n    case 'ArrowUp':\n      yDelta = yStepSize\n      break\n    case 'ArrowDown':\n      yDelta = -yStepSize\n      break\n    case 'PageUp':\n      yDelta = yStepSize * 10\n      break\n    case 'PageDown':\n      yDelta = -yStepSize * 10\n      break\n    case 'Home':\n      xDelta = -xStepSize * 10\n      break\n    case 'End':\n      xDelta = xStepSize * 10\n      break\n    default:\n      return\n  }\n\n  event.preventDefault()\n  rootContext.updateValues(\n    rootContext.xValue.value + xDelta,\n    rootContext.yValue.value + yDelta,\n  )\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    role=\"application\"\n    aria-roledescription=\"Color picker\"\n    :aria-disabled=\"rootContext.disabled.value ? 'true' : undefined\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n    :style=\"{\n      touchAction: 'none',\n    }\"\n    @keydown=\"handleKeyDown\"\n    @pointerdown=\"handlePointerDown\"\n    @pointermove=\"handlePointerMove\"\n    @pointerup=\"handlePointerUp\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ColorAreaAreaProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { injectColorAreaRootContext } from './ColorAreaRoot.vue'\nimport { linearScale } from './utils'\n\nconst props = withDefaults(defineProps<ColorAreaAreaProps>(), {\n  as: 'div',\n})\n\nconst rootContext = injectColorAreaRootContext()\nconst { primitiveElement, currentElement: areaElement } = usePrimitiveElement()\n\nconst isDragging = ref(false)\n\n// Convert pointer position to channel values\nfunction getValuesFromPointer(event: PointerEvent) {\n  const rect = areaElement.value!.getBoundingClientRect()\n\n  const xInput: [number, number] = [0, rect.width]\n  const xOutput: [number, number] = [rootContext.xRange.value.min, rootContext.xRange.value.max]\n  const xScale = linearScale(xInput, xOutput)\n  const xValue = xScale(event.clientX - rect.left)\n\n  // Y is inverted (top is max, bottom is min for most channels)\n  const yInput: [number, number] = [0, rect.height]\n  const yOutput: [number, number] = [rootContext.yRange.value.max, rootContext.yRange.value.min]\n  const yScale = linearScale(yInput, yOutput)\n  const yValue = yScale(event.clientY - rect.top)\n\n  return { x: xValue, y: yValue }\n}\n\nfunction handlePointerDown(event: PointerEvent) {\n  if (rootContext.disabled.value)\n    return\n\n  const target = event.target as HTMLElement\n  target.setPointerCapture(event.pointerId)\n  event.preventDefault()\n\n  isDragging.value = true\n  const { x, y } = getValuesFromPointer(event)\n  rootContext.updateValues(x, y)\n\n  // Focus the thumb when dragging starts\n  rootContext.thumbRef.value?.focus()\n}\n\nfunction handlePointerMove(event: PointerEvent) {\n  if (!isDragging.value || rootContext.disabled.value)\n    return\n\n  const target = event.target as HTMLElement\n  if (target.hasPointerCapture(event.pointerId)) {\n    const { x, y } = getValuesFromPointer(event)\n    rootContext.updateValues(x, y)\n  }\n}\n\nfunction handlePointerUp(event: PointerEvent) {\n  if (!isDragging.value)\n    return\n\n  const target = event.target as HTMLElement\n  target.releasePointerCapture(event.pointerId)\n  isDragging.value = false\n  rootContext.commitValues()\n}\n\n// Keyboard navigation\nfunction handleKeyDown(event: KeyboardEvent) {\n  if (rootContext.disabled.value)\n    return\n\n  const stepMultiplier = event.shiftKey ? 10 : 1\n  const xStepSize = rootContext.xRange.value.step * stepMultiplier\n  const yStepSize = rootContext.yRange.value.step * stepMultiplier\n\n  let xDelta = 0\n  let yDelta = 0\n\n  switch (event.key) {\n    case 'ArrowLeft':\n      xDelta = -xStepSize\n      break\n    case 'ArrowRight':\n      xDelta = xStepSize\n      break\n    case 'ArrowUp':\n      yDelta = yStepSize\n      break\n    case 'ArrowDown':\n      yDelta = -yStepSize\n      break\n    case 'PageUp':\n      yDelta = yStepSize * 10\n      break\n    case 'PageDown':\n      yDelta = -yStepSize * 10\n      break\n    case 'Home':\n      xDelta = -xStepSize * 10\n      break\n    case 'End':\n      xDelta = xStepSize * 10\n      break\n    default:\n      return\n  }\n\n  event.preventDefault()\n  rootContext.updateValues(\n    rootContext.xValue.value + xDelta,\n    rootContext.yValue.value + yDelta,\n  )\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    role=\"application\"\n    aria-roledescription=\"Color picker\"\n    :aria-disabled=\"rootContext.disabled.value ? 'true' : undefined\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n    :style=\"{\n      touchAction: 'none',\n    }\"\n    @keydown=\"handleKeyDown\"\n    @pointerdown=\"handlePointerDown\"\n    @pointermove=\"handlePointerMove\"\n    @pointerup=\"handlePointerUp\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ColorAreaThumbProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { getChannelName } from '@/shared/color'\nimport { injectColorAreaRootContext } from './ColorAreaRoot.vue'\nimport { convertValueToPercentage } from './utils'\n\nconst props = withDefaults(defineProps<ColorAreaThumbProps>(), {\n  as: 'span',\n})\n\nconst rootContext = injectColorAreaRootContext()\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nonMounted(() => {\n  rootContext.thumbRef.value = currentElement.value\n})\n\nconst xPercent = computed(() =>\n  convertValueToPercentage(\n    rootContext.xValue.value,\n    rootContext.xRange.value.min,\n    rootContext.xRange.value.max,\n  ),\n)\n\nconst yPercent = computed(() =>\n  convertValueToPercentage(\n    rootContext.yValue.value,\n    rootContext.yRange.value.min,\n    rootContext.yRange.value.max,\n  ),\n)\n\nconst ariaLabel = computed(() => {\n  return `${getChannelName(rootContext.xChannel.value)}, ${getChannelName(rootContext.yChannel.value)}`\n})\n\nconst ariaValueText = computed(() => {\n  return `${getChannelName(rootContext.xChannel.value)} ${Math.round(rootContext.xValue.value)}, ${getChannelName(rootContext.yChannel.value)} ${Math.round(rootContext.yValue.value)}`\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    role=\"slider\"\n    :tabindex=\"rootContext.disabled.value ? undefined : 0\"\n    :aria-label=\"ariaLabel\"\n    aria-roledescription=\"Color thumb\"\n    :aria-valuemin=\"rootContext.xRange.value.min\"\n    :aria-valuemax=\"rootContext.xRange.value.max\"\n    :aria-valuenow=\"rootContext.xValue.value\"\n    :aria-valuetext=\"ariaValueText\"\n    aria-orientation=\"horizontal\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :style=\"{\n      position: 'absolute',\n      left: `${xPercent}%`,\n      top: `${100 - yPercent}%`,\n      transform: 'translate(-50%, -50%)',\n      touchAction: 'none',\n    }\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ColorAreaThumbProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { getChannelName } from '@/shared/color'\nimport { injectColorAreaRootContext } from './ColorAreaRoot.vue'\nimport { convertValueToPercentage } from './utils'\n\nconst props = withDefaults(defineProps<ColorAreaThumbProps>(), {\n  as: 'span',\n})\n\nconst rootContext = injectColorAreaRootContext()\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nonMounted(() => {\n  rootContext.thumbRef.value = currentElement.value\n})\n\nconst xPercent = computed(() =>\n  convertValueToPercentage(\n    rootContext.xValue.value,\n    rootContext.xRange.value.min,\n    rootContext.xRange.value.max,\n  ),\n)\n\nconst yPercent = computed(() =>\n  convertValueToPercentage(\n    rootContext.yValue.value,\n    rootContext.yRange.value.min,\n    rootContext.yRange.value.max,\n  ),\n)\n\nconst ariaLabel = computed(() => {\n  return `${getChannelName(rootContext.xChannel.value)}, ${getChannelName(rootContext.yChannel.value)}`\n})\n\nconst ariaValueText = computed(() => {\n  return `${getChannelName(rootContext.xChannel.value)} ${Math.round(rootContext.xValue.value)}, ${getChannelName(rootContext.yChannel.value)} ${Math.round(rootContext.yValue.value)}`\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    role=\"slider\"\n    :tabindex=\"rootContext.disabled.value ? undefined : 0\"\n    :aria-label=\"ariaLabel\"\n    aria-roledescription=\"Color thumb\"\n    :aria-valuemin=\"rootContext.xRange.value.min\"\n    :aria-valuemax=\"rootContext.xRange.value.max\"\n    :aria-valuenow=\"rootContext.xValue.value\"\n    :aria-valuetext=\"ariaValueText\"\n    aria-orientation=\"horizontal\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :style=\"{\n      position: 'absolute',\n      left: `${xPercent}%`,\n      top: `${100 - yPercent}%`,\n      transform: 'translate(-50%, -50%)',\n      touchAction: 'none',\n    }\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Color, ColorChannel, ColorSpace } from '@/shared/color'\nimport type { FormFieldProps } from '@/shared/types'\nimport { createContext, useFormControl, useForwardExpose, useLocale } from '@/shared'\n\nexport interface ColorFieldRootProps extends PrimitiveProps, FormFieldProps {\n  /** The color value (controlled). Can be a hex string or Color object. */\n  modelValue?: string | Color\n  /** The default color value (uncontrolled). */\n  defaultValue?: string | Color\n  /** The color space to operate in when displaying a channel. */\n  colorSpace?: ColorSpace\n  /** The color channel to display. If not provided, displays hex value. */\n  channel?: ColorChannel\n  /** Placeholder text when the field is empty. */\n  placeholder?: string\n  /** When `true`, prevents the user from interacting with the field. */\n  disabled?: boolean\n  /** When `true`, the field is read-only. */\n  readonly?: boolean\n  /** When `true`, prevents the value from changing on wheel scroll. */\n  disableWheelChange?: boolean\n  /** The locale to use for number formatting. */\n  locale?: string\n  /** Custom step value for increment/decrement. Defaults to channel step or 1 for hex. */\n  step?: number\n}\n\nexport type ColorFieldRootEmits = {\n  'update:modelValue': [value: string]\n  'update:color': [value: Color]\n}\n\nexport interface ColorFieldRootContext {\n  color: Ref<Color>\n  inputValue: Ref<string>\n  channel: Ref<ColorChannel | undefined>\n  colorSpace: Ref<ColorSpace>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  disableWheelChange: Ref<boolean>\n  placeholder: Ref<string | undefined>\n  updateValue: (value: string) => void\n  commit: () => void\n  increment: () => void\n  decrement: () => void\n  incrementToMax: () => void\n  decrementToMin: () => void\n  incrementPage: () => void\n  decrementPage: () => void\n  handleWheel: (event: WheelEvent) => void\n}\n\nexport const [injectColorFieldRootContext, provideColorFieldRootContext]\n  = createContext<ColorFieldRootContext>('ColorFieldRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref, toRefs, watch } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport {\n  colorToString,\n  convertToRgb,\n  getChannelRange,\n  getChannelValue,\n  isValidColor,\n  normalizeColor,\n  parseColor,\n  setChannelValue,\n} from '@/shared/color'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\n\nconst props = withDefaults(defineProps<ColorFieldRootProps>(), {\n  colorSpace: 'hsl',\n  disabled: false,\n  readonly: false,\n  disableWheelChange: false,\n  defaultValue: '#000000',\n  as: 'div',\n})\n\nconst emits = defineEmits<ColorFieldRootEmits>()\n\nconst { colorSpace, channel, disabled, readonly, disableWheelChange, placeholder, locale: propLocale, step: stepProp } = toRefs(props)\nconst { forwardRef, currentElement } = useForwardExpose()\nconst isFormControl = useFormControl(currentElement)\nconst locale = useLocale(propLocale)\n\n// Normalize the model value\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst color = computed({\n  get: () => normalizeColor(modelValue.value ?? '#000000'),\n  set: (newColor: Color) => {\n    const hexString = colorToString(newColor, 'hex')\n    modelValue.value = hexString\n    emits('update:color', newColor)\n  },\n})\n\n// Input value for the text field\nconst inputValue = ref('')\nconst isEditing = ref(false)\n\n// Update input value when color changes (unless user is editing)\nwatch(() => color.value, (newColor) => {\n  if (!isEditing.value) {\n    inputValue.value = formatValue(newColor)\n  }\n}, { immediate: true })\n\nfunction formatValue(c: Color): string {\n  if (channel.value) {\n    const value = getChannelValue(c, channel.value)\n    if (channel.value === 'alpha') {\n      return String(Math.round(value))\n    }\n    return String(Math.round(value))\n  }\n  // Hex mode\n  return colorToString(c, 'hex')\n}\n\n// The effective step size\nconst MIN_HEX_INT = 0x000000\nconst MAX_HEX_INT = 0xFFFFFF\nconst PAGE_STEP_MULTIPLIER = 10\n\nfunction getStep(): number {\n  if (stepProp.value != null)\n    return stepProp.value\n  if (channel.value)\n    return getChannelRange(channel.value).step\n  // Hex mode: step by 1 in the integer space (like react-spectrum)\n  return 1\n}\n\nfunction updateValue(value: string) {\n  inputValue.value = value\n}\n\nfunction commit() {\n  isEditing.value = false\n\n  if (channel.value) {\n    // Channel mode - parse as number\n    const numValue = parseFloat(inputValue.value)\n    if (!isNaN(numValue)) {\n      const range = getChannelRange(channel.value)\n      const clamped = Math.max(range.min, Math.min(range.max, numValue))\n      color.value = setChannelValue(color.value, channel.value, clamped)\n    }\n    // Reset to formatted value\n    inputValue.value = formatValue(color.value)\n  }\n  else {\n    // Hex mode - parse as color\n    const trimmed = inputValue.value.trim()\n    if (isValidColor(trimmed)) {\n      color.value = parseColor(trimmed)\n    }\n    // Reset to formatted value\n    inputValue.value = formatValue(color.value)\n  }\n}\n\nfunction addHexValue(delta: number) {\n  const intDelta = Math.trunc(delta)\n  const hexInt = color.value.space === 'rgb'\n    ? ((Math.round((color.value as any).r) << 16) | (Math.round((color.value as any).g) << 8) | Math.round((color.value as any).b))\n    : (() => {\n        const rgb = convertToRgb(color.value)\n        return (Math.round(rgb.r) << 16) | (Math.round(rgb.g) << 8) | Math.round(rgb.b)\n      })()\n  const clamped = Math.min(Math.max(hexInt + intDelta, MIN_HEX_INT), MAX_HEX_INT)\n  const hex = `#${clamped.toString(16).padStart(6, '0')}`\n  color.value = parseColor(hex)\n  inputValue.value = formatValue(color.value)\n}\n\nfunction increment() {\n  if (disabled.value || readonly.value)\n    return\n  const step = getStep()\n  if (channel.value) {\n    const currentValue = getChannelValue(color.value, channel.value)\n    color.value = setChannelValue(color.value, channel.value, currentValue + step)\n    inputValue.value = formatValue(color.value)\n  }\n  else {\n    addHexValue(step)\n  }\n}\n\nfunction decrement() {\n  if (disabled.value || readonly.value)\n    return\n  const step = getStep()\n  if (channel.value) {\n    const currentValue = getChannelValue(color.value, channel.value)\n    color.value = setChannelValue(color.value, channel.value, currentValue - step)\n    inputValue.value = formatValue(color.value)\n  }\n  else {\n    addHexValue(-step)\n  }\n}\n\nfunction incrementPage() {\n  if (disabled.value || readonly.value)\n    return\n  const step = getStep() * PAGE_STEP_MULTIPLIER\n  if (channel.value) {\n    const currentValue = getChannelValue(color.value, channel.value)\n    color.value = setChannelValue(color.value, channel.value, currentValue + step)\n    inputValue.value = formatValue(color.value)\n  }\n  else {\n    addHexValue(step)\n  }\n}\n\nfunction decrementPage() {\n  if (disabled.value || readonly.value)\n    return\n  const step = getStep() * PAGE_STEP_MULTIPLIER\n  if (channel.value) {\n    const currentValue = getChannelValue(color.value, channel.value)\n    color.value = setChannelValue(color.value, channel.value, currentValue - step)\n    inputValue.value = formatValue(color.value)\n  }\n  else {\n    addHexValue(-step)\n  }\n}\n\nfunction incrementToMax() {\n  if (disabled.value || readonly.value)\n    return\n  if (channel.value) {\n    const range = getChannelRange(channel.value)\n    color.value = setChannelValue(color.value, channel.value, range.max)\n    inputValue.value = formatValue(color.value)\n  }\n  else {\n    addHexValue(MAX_HEX_INT)\n  }\n}\n\nfunction decrementToMin() {\n  if (disabled.value || readonly.value)\n    return\n  if (channel.value) {\n    const range = getChannelRange(channel.value)\n    color.value = setChannelValue(color.value, channel.value, range.min)\n    inputValue.value = formatValue(color.value)\n  }\n  else {\n    addHexValue(-MAX_HEX_INT)\n  }\n}\n\nfunction handleWheel(event: WheelEvent) {\n  if (disableWheelChange.value || disabled.value || readonly.value)\n    return\n\n  event.preventDefault()\n\n  if (event.deltaY > 0)\n    decrement()\n  else\n    increment()\n}\n\nprovideColorFieldRootContext({\n  color: computed(() => color.value) as Ref<Color>,\n  inputValue,\n  channel,\n  colorSpace,\n  disabled,\n  readonly,\n  disableWheelChange,\n  placeholder,\n  updateValue,\n  commit,\n  increment,\n  decrement,\n  incrementToMax,\n  decrementToMin,\n  incrementPage,\n  decrementPage,\n  handleWheel,\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"group\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-readonly=\"readonly ? '' : undefined\"\n  >\n    <slot />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name\"\n      type=\"text\"\n      :value=\"colorToString(color, 'hex')\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Color, ColorChannel, ColorSpace } from '@/shared/color'\nimport type { FormFieldProps } from '@/shared/types'\nimport { createContext, useFormControl, useForwardExpose, useLocale } from '@/shared'\n\nexport interface ColorFieldRootProps extends PrimitiveProps, FormFieldProps {\n  /** The color value (controlled). Can be a hex string or Color object. */\n  modelValue?: string | Color\n  /** The default color value (uncontrolled). */\n  defaultValue?: string | Color\n  /** The color space to operate in when displaying a channel. */\n  colorSpace?: ColorSpace\n  /** The color channel to display. If not provided, displays hex value. */\n  channel?: ColorChannel\n  /** Placeholder text when the field is empty. */\n  placeholder?: string\n  /** When `true`, prevents the user from interacting with the field. */\n  disabled?: boolean\n  /** When `true`, the field is read-only. */\n  readonly?: boolean\n  /** When `true`, prevents the value from changing on wheel scroll. */\n  disableWheelChange?: boolean\n  /** The locale to use for number formatting. */\n  locale?: string\n  /** Custom step value for increment/decrement. Defaults to channel step or 1 for hex. */\n  step?: number\n}\n\nexport type ColorFieldRootEmits = {\n  'update:modelValue': [value: string]\n  'update:color': [value: Color]\n}\n\nexport interface ColorFieldRootContext {\n  color: Ref<Color>\n  inputValue: Ref<string>\n  channel: Ref<ColorChannel | undefined>\n  colorSpace: Ref<ColorSpace>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  disableWheelChange: Ref<boolean>\n  placeholder: Ref<string | undefined>\n  updateValue: (value: string) => void\n  commit: () => void\n  increment: () => void\n  decrement: () => void\n  incrementToMax: () => void\n  decrementToMin: () => void\n  incrementPage: () => void\n  decrementPage: () => void\n  handleWheel: (event: WheelEvent) => void\n}\n\nexport const [injectColorFieldRootContext, provideColorFieldRootContext]\n  = createContext<ColorFieldRootContext>('ColorFieldRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref, toRefs, watch } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport {\n  colorToString,\n  convertToRgb,\n  getChannelRange,\n  getChannelValue,\n  isValidColor,\n  normalizeColor,\n  parseColor,\n  setChannelValue,\n} from '@/shared/color'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\n\nconst props = withDefaults(defineProps<ColorFieldRootProps>(), {\n  colorSpace: 'hsl',\n  disabled: false,\n  readonly: false,\n  disableWheelChange: false,\n  defaultValue: '#000000',\n  as: 'div',\n})\n\nconst emits = defineEmits<ColorFieldRootEmits>()\n\nconst { colorSpace, channel, disabled, readonly, disableWheelChange, placeholder, locale: propLocale, step: stepProp } = toRefs(props)\nconst { forwardRef, currentElement } = useForwardExpose()\nconst isFormControl = useFormControl(currentElement)\nconst locale = useLocale(propLocale)\n\n// Normalize the model value\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst color = computed({\n  get: () => normalizeColor(modelValue.value ?? '#000000'),\n  set: (newColor: Color) => {\n    const hexString = colorToString(newColor, 'hex')\n    modelValue.value = hexString\n    emits('update:color', newColor)\n  },\n})\n\n// Input value for the text field\nconst inputValue = ref('')\nconst isEditing = ref(false)\n\n// Update input value when color changes (unless user is editing)\nwatch(() => color.value, (newColor) => {\n  if (!isEditing.value) {\n    inputValue.value = formatValue(newColor)\n  }\n}, { immediate: true })\n\nfunction formatValue(c: Color): string {\n  if (channel.value) {\n    const value = getChannelValue(c, channel.value)\n    if (channel.value === 'alpha') {\n      return String(Math.round(value))\n    }\n    return String(Math.round(value))\n  }\n  // Hex mode\n  return colorToString(c, 'hex')\n}\n\n// The effective step size\nconst MIN_HEX_INT = 0x000000\nconst MAX_HEX_INT = 0xFFFFFF\nconst PAGE_STEP_MULTIPLIER = 10\n\nfunction getStep(): number {\n  if (stepProp.value != null)\n    return stepProp.value\n  if (channel.value)\n    return getChannelRange(channel.value).step\n  // Hex mode: step by 1 in the integer space (like react-spectrum)\n  return 1\n}\n\nfunction updateValue(value: string) {\n  inputValue.value = value\n}\n\nfunction commit() {\n  isEditing.value = false\n\n  if (channel.value) {\n    // Channel mode - parse as number\n    const numValue = parseFloat(inputValue.value)\n    if (!isNaN(numValue)) {\n      const range = getChannelRange(channel.value)\n      const clamped = Math.max(range.min, Math.min(range.max, numValue))\n      color.value = setChannelValue(color.value, channel.value, clamped)\n    }\n    // Reset to formatted value\n    inputValue.value = formatValue(color.value)\n  }\n  else {\n    // Hex mode - parse as color\n    const trimmed = inputValue.value.trim()\n    if (isValidColor(trimmed)) {\n      color.value = parseColor(trimmed)\n    }\n    // Reset to formatted value\n    inputValue.value = formatValue(color.value)\n  }\n}\n\nfunction addHexValue(delta: number) {\n  const intDelta = Math.trunc(delta)\n  const hexInt = color.value.space === 'rgb'\n    ? ((Math.round((color.value as any).r) << 16) | (Math.round((color.value as any).g) << 8) | Math.round((color.value as any).b))\n    : (() => {\n        const rgb = convertToRgb(color.value)\n        return (Math.round(rgb.r) << 16) | (Math.round(rgb.g) << 8) | Math.round(rgb.b)\n      })()\n  const clamped = Math.min(Math.max(hexInt + intDelta, MIN_HEX_INT), MAX_HEX_INT)\n  const hex = `#${clamped.toString(16).padStart(6, '0')}`\n  color.value = parseColor(hex)\n  inputValue.value = formatValue(color.value)\n}\n\nfunction increment() {\n  if (disabled.value || readonly.value)\n    return\n  const step = getStep()\n  if (channel.value) {\n    const currentValue = getChannelValue(color.value, channel.value)\n    color.value = setChannelValue(color.value, channel.value, currentValue + step)\n    inputValue.value = formatValue(color.value)\n  }\n  else {\n    addHexValue(step)\n  }\n}\n\nfunction decrement() {\n  if (disabled.value || readonly.value)\n    return\n  const step = getStep()\n  if (channel.value) {\n    const currentValue = getChannelValue(color.value, channel.value)\n    color.value = setChannelValue(color.value, channel.value, currentValue - step)\n    inputValue.value = formatValue(color.value)\n  }\n  else {\n    addHexValue(-step)\n  }\n}\n\nfunction incrementPage() {\n  if (disabled.value || readonly.value)\n    return\n  const step = getStep() * PAGE_STEP_MULTIPLIER\n  if (channel.value) {\n    const currentValue = getChannelValue(color.value, channel.value)\n    color.value = setChannelValue(color.value, channel.value, currentValue + step)\n    inputValue.value = formatValue(color.value)\n  }\n  else {\n    addHexValue(step)\n  }\n}\n\nfunction decrementPage() {\n  if (disabled.value || readonly.value)\n    return\n  const step = getStep() * PAGE_STEP_MULTIPLIER\n  if (channel.value) {\n    const currentValue = getChannelValue(color.value, channel.value)\n    color.value = setChannelValue(color.value, channel.value, currentValue - step)\n    inputValue.value = formatValue(color.value)\n  }\n  else {\n    addHexValue(-step)\n  }\n}\n\nfunction incrementToMax() {\n  if (disabled.value || readonly.value)\n    return\n  if (channel.value) {\n    const range = getChannelRange(channel.value)\n    color.value = setChannelValue(color.value, channel.value, range.max)\n    inputValue.value = formatValue(color.value)\n  }\n  else {\n    addHexValue(MAX_HEX_INT)\n  }\n}\n\nfunction decrementToMin() {\n  if (disabled.value || readonly.value)\n    return\n  if (channel.value) {\n    const range = getChannelRange(channel.value)\n    color.value = setChannelValue(color.value, channel.value, range.min)\n    inputValue.value = formatValue(color.value)\n  }\n  else {\n    addHexValue(-MAX_HEX_INT)\n  }\n}\n\nfunction handleWheel(event: WheelEvent) {\n  if (disableWheelChange.value || disabled.value || readonly.value)\n    return\n\n  event.preventDefault()\n\n  if (event.deltaY > 0)\n    decrement()\n  else\n    increment()\n}\n\nprovideColorFieldRootContext({\n  color: computed(() => color.value) as Ref<Color>,\n  inputValue,\n  channel,\n  colorSpace,\n  disabled,\n  readonly,\n  disableWheelChange,\n  placeholder,\n  updateValue,\n  commit,\n  increment,\n  decrement,\n  incrementToMax,\n  decrementToMin,\n  incrementPage,\n  decrementPage,\n  handleWheel,\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"group\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-readonly=\"readonly ? '' : undefined\"\n  >\n    <slot />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name\"\n      type=\"text\"\n      :value=\"colorToString(color, 'hex')\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nconst ALLOWED_INPUT_RE = /[\\d.-]/\n\nexport interface ColorFieldInputProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useComposing } from '@/shared'\nimport { injectColorFieldRootContext } from './ColorFieldRoot.vue'\n\nconst props = withDefaults(defineProps<ColorFieldInputProps>(), {\n  as: 'input',\n})\n\nconst rootContext = injectColorFieldRootContext()\n\nconst isFocused = ref(false)\nconst { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing()\n\nconst inputType = computed(() => {\n  return rootContext.channel.value ? 'text' : 'text'\n})\n\nconst inputMode = computed(() => {\n  return rootContext.channel.value ? 'numeric' : 'text'\n})\n\nfunction handleInput(event: Event) {\n  const target = event.target as HTMLInputElement\n  rootContext.updateValue(target.value)\n}\n\nfunction handleBlur() {\n  isFocused.value = false\n  rootContext.commit()\n}\n\nfunction handleFocus() {\n  isFocused.value = true\n}\n\nfunction handleWheel(event: WheelEvent) {\n  if (!isFocused.value)\n    return\n  rootContext.handleWheel(event)\n}\n\nfunction handleKeydown(event: KeyboardEvent) {\n  // Don't step/commit mid-composition, keys are used for IME candidate navigation and commit.\n  // `isComposing` stays true until the tick after `compositionend`, so the commit keydown\n  // (which can report `event.isComposing === false`) is still skipped.\n  if (isComposing.value || event.isComposing)\n    return\n  switch (event.key) {\n    case 'ArrowUp':\n      event.preventDefault()\n      rootContext.increment()\n      break\n    case 'ArrowDown':\n      event.preventDefault()\n      rootContext.decrement()\n      break\n    case 'PageUp':\n      event.preventDefault()\n      rootContext.incrementPage()\n      break\n    case 'PageDown':\n      event.preventDefault()\n      rootContext.decrementPage()\n      break\n    case 'Home':\n      event.preventDefault()\n      rootContext.decrementToMin()\n      break\n    case 'End':\n      event.preventDefault()\n      rootContext.incrementToMax()\n      break\n    case 'Enter':\n      event.preventDefault()\n      rootContext.commit()\n      break\n  }\n}\n\n// Handle numeric key validation for channel mode\nfunction handleBeforeInput(event: InputEvent) {\n  if (event.isComposing)\n    return\n  if (!rootContext.channel.value)\n    return // No validation for hex mode\n\n  const target = event.target as HTMLInputElement\n  const data = event.data\n\n  // Allow numbers, decimal point, minus sign\n  if (data && !ALLOWED_INPUT_RE.test(data)) {\n    event.preventDefault()\n    return\n  }\n\n  // Check the resulting value would be valid\n  const nextValue = target.value.slice(0, target.selectionStart ?? undefined)\n    + (data ?? '')\n    + target.value.slice(target.selectionEnd ?? undefined)\n\n  // Allow empty or partial values while typing\n  if (nextValue === '-' || nextValue === '.' || nextValue === '-.')\n    return\n\n  const numValue = parseFloat(nextValue)\n  if (isNaN(numValue)) {\n    event.preventDefault()\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :type=\"inputType\"\n    :inputmode=\"inputMode\"\n    :value=\"rootContext.inputValue.value\"\n    :placeholder=\"rootContext.placeholder.value\"\n    :disabled=\"rootContext.disabled.value\"\n    :readonly=\"rootContext.readonly.value\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n    :data-readonly=\"rootContext.readonly.value ? '' : undefined\"\n    :aria-invalid=\"!rootContext.channel.value ? undefined : undefined\"\n    @input=\"handleInput\"\n    @blur=\"handleBlur\"\n    @focus=\"handleFocus\"\n    @keydown=\"handleKeydown\"\n    @wheel=\"handleWheel\"\n    @beforeinput=\"handleBeforeInput\"\n    @compositionstart=\"handleCompositionStart\"\n    @compositionend=\"handleCompositionEnd\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nconst ALLOWED_INPUT_RE = /[\\d.-]/\n\nexport interface ColorFieldInputProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useComposing } from '@/shared'\nimport { injectColorFieldRootContext } from './ColorFieldRoot.vue'\n\nconst props = withDefaults(defineProps<ColorFieldInputProps>(), {\n  as: 'input',\n})\n\nconst rootContext = injectColorFieldRootContext()\n\nconst isFocused = ref(false)\nconst { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing()\n\nconst inputType = computed(() => {\n  return rootContext.channel.value ? 'text' : 'text'\n})\n\nconst inputMode = computed(() => {\n  return rootContext.channel.value ? 'numeric' : 'text'\n})\n\nfunction handleInput(event: Event) {\n  const target = event.target as HTMLInputElement\n  rootContext.updateValue(target.value)\n}\n\nfunction handleBlur() {\n  isFocused.value = false\n  rootContext.commit()\n}\n\nfunction handleFocus() {\n  isFocused.value = true\n}\n\nfunction handleWheel(event: WheelEvent) {\n  if (!isFocused.value)\n    return\n  rootContext.handleWheel(event)\n}\n\nfunction handleKeydown(event: KeyboardEvent) {\n  // Don't step/commit mid-composition, keys are used for IME candidate navigation and commit.\n  // `isComposing` stays true until the tick after `compositionend`, so the commit keydown\n  // (which can report `event.isComposing === false`) is still skipped.\n  if (isComposing.value || event.isComposing)\n    return\n  switch (event.key) {\n    case 'ArrowUp':\n      event.preventDefault()\n      rootContext.increment()\n      break\n    case 'ArrowDown':\n      event.preventDefault()\n      rootContext.decrement()\n      break\n    case 'PageUp':\n      event.preventDefault()\n      rootContext.incrementPage()\n      break\n    case 'PageDown':\n      event.preventDefault()\n      rootContext.decrementPage()\n      break\n    case 'Home':\n      event.preventDefault()\n      rootContext.decrementToMin()\n      break\n    case 'End':\n      event.preventDefault()\n      rootContext.incrementToMax()\n      break\n    case 'Enter':\n      event.preventDefault()\n      rootContext.commit()\n      break\n  }\n}\n\n// Handle numeric key validation for channel mode\nfunction handleBeforeInput(event: InputEvent) {\n  if (event.isComposing)\n    return\n  if (!rootContext.channel.value)\n    return // No validation for hex mode\n\n  const target = event.target as HTMLInputElement\n  const data = event.data\n\n  // Allow numbers, decimal point, minus sign\n  if (data && !ALLOWED_INPUT_RE.test(data)) {\n    event.preventDefault()\n    return\n  }\n\n  // Check the resulting value would be valid\n  const nextValue = target.value.slice(0, target.selectionStart ?? undefined)\n    + (data ?? '')\n    + target.value.slice(target.selectionEnd ?? undefined)\n\n  // Allow empty or partial values while typing\n  if (nextValue === '-' || nextValue === '.' || nextValue === '-.')\n    return\n\n  const numValue = parseFloat(nextValue)\n  if (isNaN(numValue)) {\n    event.preventDefault()\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :type=\"inputType\"\n    :inputmode=\"inputMode\"\n    :value=\"rootContext.inputValue.value\"\n    :placeholder=\"rootContext.placeholder.value\"\n    :disabled=\"rootContext.disabled.value\"\n    :readonly=\"rootContext.readonly.value\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n    :data-readonly=\"rootContext.readonly.value ? '' : undefined\"\n    :aria-invalid=\"!rootContext.channel.value ? undefined : undefined\"\n    @input=\"handleInput\"\n    @blur=\"handleBlur\"\n    @focus=\"handleFocus\"\n    @keydown=\"handleKeydown\"\n    @wheel=\"handleWheel\"\n    @beforeinput=\"handleBeforeInput\"\n    @compositionstart=\"handleCompositionStart\"\n    @compositionend=\"handleCompositionEnd\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","import type { ComputedRef } from 'vue'\nimport { clamp, createContext } from '@/shared'\n\nexport interface SliderOrientationPrivateProps {\n  min: number\n  max: number\n  inverted: boolean\n}\n\nexport type SliderOrientationPrivateEmits = {\n  slideEnd: []\n  slideStart: [value: number]\n  slideMove: [value: number]\n  homeKeyDown: [event: KeyboardEvent]\n  endKeyDown: [event: KeyboardEvent]\n  stepKeyDown: [event: KeyboardEvent, direction: number]\n}\n\nexport function getNextSortedValues(prevValues: number[] = [], nextValue: number, atIndex: number) {\n  const nextValues = [...prevValues]\n  nextValues[atIndex] = nextValue\n  return nextValues.sort((a, b) => a - b)\n}\n\nexport function convertValueToPercentage(value: number, min: number, max: number) {\n  const maxSteps = max - min\n  const percentPerStep = 100 / maxSteps\n  const percentage = percentPerStep * (value - min)\n  return clamp(percentage, 0, 100)\n}\n\n/**\n * Returns a label for each thumb when there are two or more thumbs\n */\nexport function getLabel(index: number, totalValues: number) {\n  if (totalValues > 2)\n    return `Value ${index + 1} of ${totalValues}`\n\n  else if (totalValues === 2)\n    return ['Minimum', 'Maximum'][index]\n\n  else\n    return undefined\n}\n\n/**\n * Given a `values` array and a `nextValue`, determine which value in\n * the array is closest to `nextValue` and return its index.\n *\n * @example\n * // returns 1\n * getClosestValueIndex([10, 30], 25);\n */\nexport function getClosestValueIndex(values: number[], nextValue: number) {\n  if (values.length === 1)\n    return 0\n  const distances = values.map(value => Math.abs(value - nextValue))\n  const closestDistance = Math.min(...distances)\n  return distances.indexOf(closestDistance)\n}\n\n/**\n * Offsets the thumb centre point while sliding to ensure it remains\n * within the bounds of the slider when reaching the edges\n */\nexport function getThumbInBoundsOffset(width: number, left: number, direction: number) {\n  const halfWidth = width / 2\n  const halfPercent = 50\n  const offset = linearScale([0, halfPercent], [0, halfWidth])\n  return (halfWidth - offset(left) * direction) * direction\n}\n\n/**\n * Gets an array of steps between each value.\n *\n * @example\n * // returns [1, 9]\n * getStepsBetweenValues([10, 11, 20]);\n */\nexport function getStepsBetweenValues(values: number[]) {\n  return values.slice(0, -1).map((value, index) => values[index + 1] - value)\n}\n\n/**\n * Verifies the minimum steps between all values is greater than or equal\n * to the expected minimum steps.\n *\n * @example\n * // returns false\n * hasMinStepsBetweenValues([1,2,3], 2);\n *\n * @example\n * // returns true\n * hasMinStepsBetweenValues([1,2,3], 1);\n */\nexport function hasMinStepsBetweenValues(values: number[], minStepsBetweenValues: number) {\n  if (minStepsBetweenValues > 0) {\n    const stepsBetweenValues = getStepsBetweenValues(values)\n    const actualMinStepsBetweenValues = Math.min(...stepsBetweenValues)\n    return actualMinStepsBetweenValues >= minStepsBetweenValues\n  }\n  return true\n}\n\n// https://github.com/tmcw-up-for-adoption/simple-linear-scale/blob/master/index.js\nexport function linearScale(input: readonly [number, number], output: readonly [number, number]) {\n  return (value: number) => {\n    if (input[0] === input[1] || output[0] === output[1])\n      return output[0]\n    const ratio = (output[1] - output[0]) / (input[1] - input[0])\n    return output[0] + ratio * (value - input[0])\n  }\n}\n\nexport function getDecimalCount(value: number) {\n  return (String(value).split('.')[1] || '').length\n}\n\nexport function roundValue(value: number, decimalCount: number) {\n  const rounder = 10 ** decimalCount\n  return Math.round(value * rounder) / rounder\n}\n\nexport type Direction = 'ltr' | 'rtl'\n\nexport const PAGE_KEYS = ['PageUp', 'PageDown']\nexport const ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']\n\ntype SlideDirection = 'from-left' | 'from-right' | 'from-bottom' | 'from-top'\nexport const BACK_KEYS: Record<SlideDirection, string[]> = {\n  'from-left': ['Home', 'PageDown', 'ArrowDown', 'ArrowLeft'],\n  'from-right': ['Home', 'PageDown', 'ArrowDown', 'ArrowRight'],\n  'from-bottom': ['Home', 'PageDown', 'ArrowDown', 'ArrowLeft'],\n  'from-top': ['Home', 'PageUp', 'ArrowUp', 'ArrowLeft'],\n}\n\ntype Side = 'top' | 'right' | 'bottom' | 'left'\ninterface SliderOrientation {\n  startEdge: ComputedRef<Side>\n  endEdge: ComputedRef<Side>\n  direction: ComputedRef<1 | -1>\n  size: 'width' | 'height'\n}\n\nexport const [injectSliderOrientationContext, provideSliderOrientationContext]\n  = createContext<SliderOrientation>(['SliderVertical', 'SliderHorizontal'])\n","<script setup lang=\"ts\">\nimport type { Direction, SliderOrientationPrivateEmits, SliderOrientationPrivateProps } from './utils'\nimport { computed, ref, toRefs } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport SliderImpl from './SliderImpl.vue'\nimport { injectSliderRootContext } from './SliderRoot.vue'\nimport { BACK_KEYS, linearScale, provideSliderOrientationContext } from './utils'\n\ninterface SliderHorizontalProps extends SliderOrientationPrivateProps {\n  dir?: Direction\n}\n\nconst props = defineProps<SliderHorizontalProps>()\nconst emits = defineEmits<SliderOrientationPrivateEmits>()\nconst { max, min, dir, inverted } = toRefs(props)\n\nconst { forwardRef, currentElement: sliderElement } = useForwardExpose()\nconst rootContext = injectSliderRootContext()\n\nconst offsetPosition = ref<number>()\nconst rectRef = ref<DOMRect>()\nconst isSlidingFromLeft = computed(() => (dir?.value !== 'rtl' && !inverted.value) || (dir?.value !== 'ltr' && inverted.value))\n\nfunction getValueFromPointerEvent(event: PointerEvent, slideStart?: boolean) {\n  const rect = rectRef.value || sliderElement.value!.getBoundingClientRect()\n\n  // Get the currently active thumb element\n  const thumb = [...rootContext.thumbElements.value][rootContext.valueIndexToChangeRef.value]\n  const thumbWidth = rootContext.thumbAlignment.value === 'contain' ? thumb.clientWidth : 0\n\n  // Calculate offset for dragging, but only when needed\n  if (!offsetPosition.value && !slideStart && rootContext.thumbAlignment.value === 'contain') {\n    offsetPosition.value = event.clientX - thumb.getBoundingClientRect().left\n  }\n\n  // Define the input range (slider track width minus thumb width)\n  const input: [number, number] = [0, rect.width - thumbWidth]\n  const output: [number, number] = isSlidingFromLeft.value ? [min.value, max.value] : [max.value, min.value]\n  const value = linearScale(input, output)\n\n  rectRef.value = rect\n  const position = slideStart\n    ? event.clientX - rect.left - thumbWidth / 2\n    : event.clientX - rect.left - (offsetPosition.value ?? 0)\n\n  return value(position)\n}\n\nconst startEdge = computed(() => isSlidingFromLeft.value ? 'left' : 'right')\nconst endEdge = computed(() => isSlidingFromLeft.value ? 'right' : 'left')\nconst direction = computed(() => isSlidingFromLeft.value ? 1 : -1)\n\nprovideSliderOrientationContext({\n  startEdge,\n  endEdge,\n  direction,\n  size: 'width',\n})\n</script>\n\n<template>\n  <SliderImpl\n    :ref=\"forwardRef\"\n    :dir=\"dir\"\n    data-orientation=\"horizontal\"\n    :style=\"{\n      ['--reka-slider-thumb-transform' as any]:\n        !isSlidingFromLeft && rootContext.thumbAlignment.value === 'overflow' ? 'translateX(50%)' : 'translateX(-50%)',\n    }\"\n    @slide-start=\"(event) => {\n      const value = getValueFromPointerEvent(event, true);\n      emits('slideStart', value)\n    }\"\n    @slide-move=\"(event) => {\n      const value = getValueFromPointerEvent(event);\n      emits('slideMove', value)\n    }\"\n    @slide-end=\"() => {\n      rectRef = undefined;\n      offsetPosition = undefined\n      emits('slideEnd')\n    }\"\n    @step-key-down=\"(event) => {\n      const slideDirection = isSlidingFromLeft ? 'from-left' : 'from-right';\n      const isBackKey = BACK_KEYS[slideDirection].includes(event.key);\n      emits('stepKeyDown', event, isBackKey ? -1 : 1)\n    }\"\n    @end-key-down=\"emits('endKeyDown', $event)\"\n    @home-key-down=\"emits('homeKeyDown', $event)\"\n  >\n    <slot />\n  </SliderImpl>\n</template>\n","<script setup lang=\"ts\">\nimport type { Direction, SliderOrientationPrivateEmits, SliderOrientationPrivateProps } from './utils'\nimport { computed, ref, toRefs } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport SliderImpl from './SliderImpl.vue'\nimport { injectSliderRootContext } from './SliderRoot.vue'\nimport { BACK_KEYS, linearScale, provideSliderOrientationContext } from './utils'\n\ninterface SliderHorizontalProps extends SliderOrientationPrivateProps {\n  dir?: Direction\n}\n\nconst props = defineProps<SliderHorizontalProps>()\nconst emits = defineEmits<SliderOrientationPrivateEmits>()\nconst { max, min, dir, inverted } = toRefs(props)\n\nconst { forwardRef, currentElement: sliderElement } = useForwardExpose()\nconst rootContext = injectSliderRootContext()\n\nconst offsetPosition = ref<number>()\nconst rectRef = ref<DOMRect>()\nconst isSlidingFromLeft = computed(() => (dir?.value !== 'rtl' && !inverted.value) || (dir?.value !== 'ltr' && inverted.value))\n\nfunction getValueFromPointerEvent(event: PointerEvent, slideStart?: boolean) {\n  const rect = rectRef.value || sliderElement.value!.getBoundingClientRect()\n\n  // Get the currently active thumb element\n  const thumb = [...rootContext.thumbElements.value][rootContext.valueIndexToChangeRef.value]\n  const thumbWidth = rootContext.thumbAlignment.value === 'contain' ? thumb.clientWidth : 0\n\n  // Calculate offset for dragging, but only when needed\n  if (!offsetPosition.value && !slideStart && rootContext.thumbAlignment.value === 'contain') {\n    offsetPosition.value = event.clientX - thumb.getBoundingClientRect().left\n  }\n\n  // Define the input range (slider track width minus thumb width)\n  const input: [number, number] = [0, rect.width - thumbWidth]\n  const output: [number, number] = isSlidingFromLeft.value ? [min.value, max.value] : [max.value, min.value]\n  const value = linearScale(input, output)\n\n  rectRef.value = rect\n  const position = slideStart\n    ? event.clientX - rect.left - thumbWidth / 2\n    : event.clientX - rect.left - (offsetPosition.value ?? 0)\n\n  return value(position)\n}\n\nconst startEdge = computed(() => isSlidingFromLeft.value ? 'left' : 'right')\nconst endEdge = computed(() => isSlidingFromLeft.value ? 'right' : 'left')\nconst direction = computed(() => isSlidingFromLeft.value ? 1 : -1)\n\nprovideSliderOrientationContext({\n  startEdge,\n  endEdge,\n  direction,\n  size: 'width',\n})\n</script>\n\n<template>\n  <SliderImpl\n    :ref=\"forwardRef\"\n    :dir=\"dir\"\n    data-orientation=\"horizontal\"\n    :style=\"{\n      ['--reka-slider-thumb-transform' as any]:\n        !isSlidingFromLeft && rootContext.thumbAlignment.value === 'overflow' ? 'translateX(50%)' : 'translateX(-50%)',\n    }\"\n    @slide-start=\"(event) => {\n      const value = getValueFromPointerEvent(event, true);\n      emits('slideStart', value)\n    }\"\n    @slide-move=\"(event) => {\n      const value = getValueFromPointerEvent(event);\n      emits('slideMove', value)\n    }\"\n    @slide-end=\"() => {\n      rectRef = undefined;\n      offsetPosition = undefined\n      emits('slideEnd')\n    }\"\n    @step-key-down=\"(event) => {\n      const slideDirection = isSlidingFromLeft ? 'from-left' : 'from-right';\n      const isBackKey = BACK_KEYS[slideDirection].includes(event.key);\n      emits('stepKeyDown', event, isBackKey ? -1 : 1)\n    }\"\n    @end-key-down=\"emits('endKeyDown', $event)\"\n    @home-key-down=\"emits('homeKeyDown', $event)\"\n  >\n    <slot />\n  </SliderImpl>\n</template>\n","<script setup lang=\"ts\">\nimport type { SliderOrientationPrivateEmits, SliderOrientationPrivateProps } from './utils'\nimport { computed, ref, toRefs } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport SliderImpl from './SliderImpl.vue'\nimport { injectSliderRootContext } from './SliderRoot.vue'\nimport { BACK_KEYS, linearScale, provideSliderOrientationContext } from './utils'\n\ninterface SliderVerticalProps extends SliderOrientationPrivateProps {}\nconst props = defineProps<SliderVerticalProps>()\nconst emits = defineEmits<SliderOrientationPrivateEmits>()\nconst { max, min, inverted } = toRefs(props)\n\nconst rootContext = injectSliderRootContext()\nconst { forwardRef, currentElement: sliderElement } = useForwardExpose()\n\nconst offsetPosition = ref<number>()\nconst rectRef = ref<DOMRect>()\nconst isSlidingFromBottom = computed(() => !inverted.value)\n\nfunction getValueFromPointerEvent(event: PointerEvent, slideStart?: boolean) {\n  const rect = rectRef.value || sliderElement.value!.getBoundingClientRect()\n\n  // Get the currently active thumb element\n  const thumb = [...rootContext.thumbElements.value][rootContext.valueIndexToChangeRef.value]\n  const thumbHeight = rootContext.thumbAlignment.value === 'contain' ? thumb.clientHeight : 0\n\n  // Calculate offset for dragging, but only when needed\n  if (!offsetPosition.value && !slideStart && rootContext.thumbAlignment.value === 'contain') {\n    offsetPosition.value = event.clientY - thumb.getBoundingClientRect().top\n  }\n\n  // Define the input range (slider track width minus thumb width)\n  const input: [number, number] = [0, rect.height - thumbHeight]\n  const output: [number, number] = isSlidingFromBottom.value ? [max.value, min.value] : [min.value, max.value]\n  const value = linearScale(input, output)\n\n  const position = slideStart\n    ? event.clientY - rect.top - thumbHeight / 2\n    : event.clientY - rect.top - (offsetPosition.value ?? 0)\n\n  rectRef.value = rect\n  return value(position)\n}\n\nconst startEdge = computed(() => isSlidingFromBottom.value ? 'bottom' : 'top')\nconst endEdge = computed(() => isSlidingFromBottom.value ? 'top' : 'bottom')\nconst direction = computed(() => isSlidingFromBottom.value ? 1 : -1)\n\nprovideSliderOrientationContext({\n  startEdge,\n  endEdge,\n  direction,\n  size: 'height',\n})\n</script>\n\n<template>\n  <SliderImpl\n    :ref=\"forwardRef\"\n    data-orientation=\"vertical\"\n    :style=\"{\n      ['--reka-slider-thumb-transform' as any]:\n        !isSlidingFromBottom && rootContext.thumbAlignment.value === 'overflow' ? 'translateY(-50%)' : 'translateY(50%)',\n    }\"\n    @slide-start=\"(event) => {\n      const value = getValueFromPointerEvent(event, true);\n      emits('slideStart', value)\n    }\"\n    @slide-move=\"(event) => {\n      const value = getValueFromPointerEvent(event);\n      emits('slideMove', value)\n    }\"\n    @slide-end=\"() => {\n      rectRef = undefined;\n      offsetPosition = undefined\n      emits('slideEnd')\n    }\"\n    @step-key-down=\"(event) => {\n      const slideDirection = isSlidingFromBottom ? 'from-bottom' : 'from-top';\n      const isBackKey = BACK_KEYS[slideDirection].includes(event.key);\n      emits('stepKeyDown', event, isBackKey ? -1 : 1)\n    }\"\n    @end-key-down=\"emits('endKeyDown', $event)\"\n    @home-key-down=\"emits('homeKeyDown', $event)\"\n  >\n    <slot />\n  </SliderImpl>\n</template>\n","<script setup lang=\"ts\">\nimport type { SliderOrientationPrivateEmits, SliderOrientationPrivateProps } from './utils'\nimport { computed, ref, toRefs } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport SliderImpl from './SliderImpl.vue'\nimport { injectSliderRootContext } from './SliderRoot.vue'\nimport { BACK_KEYS, linearScale, provideSliderOrientationContext } from './utils'\n\ninterface SliderVerticalProps extends SliderOrientationPrivateProps {}\nconst props = defineProps<SliderVerticalProps>()\nconst emits = defineEmits<SliderOrientationPrivateEmits>()\nconst { max, min, inverted } = toRefs(props)\n\nconst rootContext = injectSliderRootContext()\nconst { forwardRef, currentElement: sliderElement } = useForwardExpose()\n\nconst offsetPosition = ref<number>()\nconst rectRef = ref<DOMRect>()\nconst isSlidingFromBottom = computed(() => !inverted.value)\n\nfunction getValueFromPointerEvent(event: PointerEvent, slideStart?: boolean) {\n  const rect = rectRef.value || sliderElement.value!.getBoundingClientRect()\n\n  // Get the currently active thumb element\n  const thumb = [...rootContext.thumbElements.value][rootContext.valueIndexToChangeRef.value]\n  const thumbHeight = rootContext.thumbAlignment.value === 'contain' ? thumb.clientHeight : 0\n\n  // Calculate offset for dragging, but only when needed\n  if (!offsetPosition.value && !slideStart && rootContext.thumbAlignment.value === 'contain') {\n    offsetPosition.value = event.clientY - thumb.getBoundingClientRect().top\n  }\n\n  // Define the input range (slider track width minus thumb width)\n  const input: [number, number] = [0, rect.height - thumbHeight]\n  const output: [number, number] = isSlidingFromBottom.value ? [max.value, min.value] : [min.value, max.value]\n  const value = linearScale(input, output)\n\n  const position = slideStart\n    ? event.clientY - rect.top - thumbHeight / 2\n    : event.clientY - rect.top - (offsetPosition.value ?? 0)\n\n  rectRef.value = rect\n  return value(position)\n}\n\nconst startEdge = computed(() => isSlidingFromBottom.value ? 'bottom' : 'top')\nconst endEdge = computed(() => isSlidingFromBottom.value ? 'top' : 'bottom')\nconst direction = computed(() => isSlidingFromBottom.value ? 1 : -1)\n\nprovideSliderOrientationContext({\n  startEdge,\n  endEdge,\n  direction,\n  size: 'height',\n})\n</script>\n\n<template>\n  <SliderImpl\n    :ref=\"forwardRef\"\n    data-orientation=\"vertical\"\n    :style=\"{\n      ['--reka-slider-thumb-transform' as any]:\n        !isSlidingFromBottom && rootContext.thumbAlignment.value === 'overflow' ? 'translateY(-50%)' : 'translateY(50%)',\n    }\"\n    @slide-start=\"(event) => {\n      const value = getValueFromPointerEvent(event, true);\n      emits('slideStart', value)\n    }\"\n    @slide-move=\"(event) => {\n      const value = getValueFromPointerEvent(event);\n      emits('slideMove', value)\n    }\"\n    @slide-end=\"() => {\n      rectRef = undefined;\n      offsetPosition = undefined\n      emits('slideEnd')\n    }\"\n    @step-key-down=\"(event) => {\n      const slideDirection = isSlidingFromBottom ? 'from-bottom' : 'from-top';\n      const isBackKey = BACK_KEYS[slideDirection].includes(event.key);\n      emits('stepKeyDown', event, isBackKey ? -1 : 1)\n    }\"\n    @end-key-down=\"emits('endKeyDown', $event)\"\n    @home-key-down=\"emits('homeKeyDown', $event)\"\n  >\n    <slot />\n  </SliderImpl>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { DataOrientation, Direction, FormFieldProps } from '../shared/types'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useCollection } from '@/Collection'\nimport { clamp, createContext, useDirection, useFormControl, useForwardExpose } from '@/shared'\n\ntype ThumbAlignment = 'contain' | 'overflow'\n\nexport interface SliderRootProps extends PrimitiveProps, FormFieldProps {\n  /** The value of the slider when initially rendered. Use when you do not need to control the state of the slider. */\n  defaultValue?: number[]\n  /** The controlled value of the slider. Can be bind as `v-model`. */\n  modelValue?: number[] | null\n  /** When `true`, prevents the user from interacting with the slider. */\n  disabled?: boolean\n  /** The orientation of the slider. */\n  orientation?: DataOrientation\n  /** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** Whether the slider is visually inverted. */\n  inverted?: boolean\n  /** The minimum value for the range. */\n  min?: number\n  /** The maximum value for the range. */\n  max?: number\n  /** The stepping interval. */\n  step?: number\n  /** The minimum permitted steps between multiple thumbs. */\n  minStepsBetweenThumbs?: number\n  /**\n   * The alignment of the slider thumb.\n   * - `contain`: thumbs will be contained within the bounds of the track.\n   * - `overflow`: thumbs will not be bound by the track. No extra offset will be added.\n   * @defaultValue 'contain'\n   */\n  thumbAlignment?: ThumbAlignment\n}\n\nexport type SliderRootEmits = {\n  /**\n   * Event handler called when the slider value changes\n   */\n  'update:modelValue': [payload: number[] | undefined]\n  /**\n   * Event handler called when the value changes at the end of an interaction.\n   *\n   * Useful when you only need to capture a final value e.g. to update a backend service.\n   */\n  'valueCommit': [payload: number[]]\n}\n\nexport interface SliderRootContext {\n  orientation: Ref<DataOrientation>\n  disabled: Ref<boolean>\n  min: Ref<number>\n  max: Ref<number>\n  modelValue?: Readonly<Ref<number[] | null | undefined>>\n  currentModelValue: ComputedRef<number[]>\n  valueIndexToChangeRef: Ref<number>\n  thumbElements: Ref<HTMLElement[]>\n  thumbAlignment: Ref<ThumbAlignment>\n}\n\nexport const [injectSliderRootContext, provideSliderRootContext]\n  = createContext<SliderRootContext>('SliderRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref, toRaw, toRefs } from 'vue'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\nimport SliderHorizontal from './SliderHorizontal.vue'\nimport SliderVertical from './SliderVertical.vue'\nimport { ARROW_KEYS, getClosestValueIndex, getDecimalCount, getNextSortedValues, hasMinStepsBetweenValues, PAGE_KEYS, roundValue } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<SliderRootProps>(), {\n  min: 0,\n  max: 100,\n  step: 1,\n  orientation: 'horizontal',\n  disabled: false,\n  minStepsBetweenThumbs: 0,\n  defaultValue: () => [0],\n  inverted: false,\n  thumbAlignment: 'contain',\n  as: 'span',\n})\nconst emits = defineEmits<SliderRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current slider values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { min, max, step, minStepsBetweenThumbs, orientation, disabled, thumbAlignment, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\nconst { forwardRef, currentElement } = useForwardExpose()\nconst isFormControl = useFormControl(currentElement)\n\nconst { CollectionSlot } = useCollection({ isProvider: true })\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<number[] | null>\n\nconst currentModelValue = computed(() => Array.isArray(modelValue.value) ? [...modelValue.value] : [])\n\nconst valueIndexToChangeRef = ref(0)\nconst valuesBeforeSlideStartRef = ref(currentModelValue.value)\n\nfunction handleSlideStart(value: number) {\n  const closestIndex = getClosestValueIndex(currentModelValue.value, value)\n  updateValues(value, closestIndex)\n}\n\nfunction handleSlideMove(value: number) {\n  updateValues(value, valueIndexToChangeRef.value)\n}\n\nfunction handleSlideEnd() {\n  const prevValue = valuesBeforeSlideStartRef.value[valueIndexToChangeRef.value]\n  const nextValue = currentModelValue.value[valueIndexToChangeRef.value]\n  const hasChanged = nextValue !== prevValue\n  if (hasChanged)\n    emits('valueCommit', toRaw(currentModelValue.value))\n}\n\nfunction updateValues(value: number, atIndex: number, { commit } = { commit: false }) {\n  const decimalCount = getDecimalCount(step.value)\n  const snapToStep = roundValue(Math.round((value - min.value) / step.value) * step.value + min.value, decimalCount)\n  const nextValue = clamp(snapToStep, min.value, max.value)\n\n  const nextValues = getNextSortedValues(currentModelValue.value, nextValue, atIndex)\n\n  if (hasMinStepsBetweenValues(nextValues, minStepsBetweenThumbs.value * step.value)) {\n    valueIndexToChangeRef.value = nextValues.indexOf(nextValue)\n    const hasChanged = String(nextValues) !== String(modelValue.value)\n    if (hasChanged && commit)\n      emits('valueCommit', nextValues)\n\n    if (hasChanged) {\n      thumbElements.value[valueIndexToChangeRef.value]?.focus()\n      modelValue.value = nextValues\n    }\n  }\n}\n\nconst thumbElements = ref<HTMLElement[]>([])\nprovideSliderRootContext({\n  modelValue,\n  currentModelValue,\n  valueIndexToChangeRef,\n  thumbElements,\n  orientation,\n  min,\n  max,\n  disabled,\n  thumbAlignment,\n})\n</script>\n\n<template>\n  <CollectionSlot>\n    <component\n      :is=\"orientation === 'horizontal' ? SliderHorizontal : SliderVertical\"\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      :min=\"min\"\n      :max=\"max\"\n      :dir=\"dir\"\n      :inverted=\"inverted\"\n      :aria-disabled=\"disabled\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      @pointerdown=\"() => {\n        if (!disabled) valuesBeforeSlideStartRef = currentModelValue\n      }\"\n      @slide-start=\"!disabled && handleSlideStart($event)\"\n      @slide-move=\"!disabled && handleSlideMove($event)\"\n      @slide-end=\"!disabled && handleSlideEnd()\"\n      @home-key-down=\"!disabled && updateValues(min, 0, { commit: true })\"\n      @end-key-down=\"!disabled && updateValues(max, currentModelValue.length - 1, { commit: true })\"\n      @step-key-down=\"(event, direction) => {\n        if (!disabled) {\n          const isPageKey = PAGE_KEYS.includes(event.key);\n          const isSkipKey = isPageKey || (event.shiftKey && ARROW_KEYS.includes(event.key));\n          const multiplier = isSkipKey ? 10 : 1;\n          const atIndex = valueIndexToChangeRef;\n          const value = currentModelValue[atIndex];\n          const stepInDirection = step * multiplier * direction;\n          updateValues(value + stepInDirection, atIndex, { commit: true });\n        }\n      }\"\n    >\n      <slot :model-value=\"modelValue\" />\n\n      <VisuallyHiddenInput\n        v-if=\"isFormControl && name\"\n        type=\"number\"\n        :value=\"modelValue\"\n        :name=\"name\"\n        :required=\"required\"\n        :disabled=\"disabled\"\n        :step=\"step\"\n      />\n    </component>\n  </CollectionSlot>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { DataOrientation, Direction, FormFieldProps } from '../shared/types'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useCollection } from '@/Collection'\nimport { clamp, createContext, useDirection, useFormControl, useForwardExpose } from '@/shared'\n\ntype ThumbAlignment = 'contain' | 'overflow'\n\nexport interface SliderRootProps extends PrimitiveProps, FormFieldProps {\n  /** The value of the slider when initially rendered. Use when you do not need to control the state of the slider. */\n  defaultValue?: number[]\n  /** The controlled value of the slider. Can be bind as `v-model`. */\n  modelValue?: number[] | null\n  /** When `true`, prevents the user from interacting with the slider. */\n  disabled?: boolean\n  /** The orientation of the slider. */\n  orientation?: DataOrientation\n  /** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** Whether the slider is visually inverted. */\n  inverted?: boolean\n  /** The minimum value for the range. */\n  min?: number\n  /** The maximum value for the range. */\n  max?: number\n  /** The stepping interval. */\n  step?: number\n  /** The minimum permitted steps between multiple thumbs. */\n  minStepsBetweenThumbs?: number\n  /**\n   * The alignment of the slider thumb.\n   * - `contain`: thumbs will be contained within the bounds of the track.\n   * - `overflow`: thumbs will not be bound by the track. No extra offset will be added.\n   * @defaultValue 'contain'\n   */\n  thumbAlignment?: ThumbAlignment\n}\n\nexport type SliderRootEmits = {\n  /**\n   * Event handler called when the slider value changes\n   */\n  'update:modelValue': [payload: number[] | undefined]\n  /**\n   * Event handler called when the value changes at the end of an interaction.\n   *\n   * Useful when you only need to capture a final value e.g. to update a backend service.\n   */\n  'valueCommit': [payload: number[]]\n}\n\nexport interface SliderRootContext {\n  orientation: Ref<DataOrientation>\n  disabled: Ref<boolean>\n  min: Ref<number>\n  max: Ref<number>\n  modelValue?: Readonly<Ref<number[] | null | undefined>>\n  currentModelValue: ComputedRef<number[]>\n  valueIndexToChangeRef: Ref<number>\n  thumbElements: Ref<HTMLElement[]>\n  thumbAlignment: Ref<ThumbAlignment>\n}\n\nexport const [injectSliderRootContext, provideSliderRootContext]\n  = createContext<SliderRootContext>('SliderRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref, toRaw, toRefs } from 'vue'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\nimport SliderHorizontal from './SliderHorizontal.vue'\nimport SliderVertical from './SliderVertical.vue'\nimport { ARROW_KEYS, getClosestValueIndex, getDecimalCount, getNextSortedValues, hasMinStepsBetweenValues, PAGE_KEYS, roundValue } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<SliderRootProps>(), {\n  min: 0,\n  max: 100,\n  step: 1,\n  orientation: 'horizontal',\n  disabled: false,\n  minStepsBetweenThumbs: 0,\n  defaultValue: () => [0],\n  inverted: false,\n  thumbAlignment: 'contain',\n  as: 'span',\n})\nconst emits = defineEmits<SliderRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current slider values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { min, max, step, minStepsBetweenThumbs, orientation, disabled, thumbAlignment, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\nconst { forwardRef, currentElement } = useForwardExpose()\nconst isFormControl = useFormControl(currentElement)\n\nconst { CollectionSlot } = useCollection({ isProvider: true })\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<number[] | null>\n\nconst currentModelValue = computed(() => Array.isArray(modelValue.value) ? [...modelValue.value] : [])\n\nconst valueIndexToChangeRef = ref(0)\nconst valuesBeforeSlideStartRef = ref(currentModelValue.value)\n\nfunction handleSlideStart(value: number) {\n  const closestIndex = getClosestValueIndex(currentModelValue.value, value)\n  updateValues(value, closestIndex)\n}\n\nfunction handleSlideMove(value: number) {\n  updateValues(value, valueIndexToChangeRef.value)\n}\n\nfunction handleSlideEnd() {\n  const prevValue = valuesBeforeSlideStartRef.value[valueIndexToChangeRef.value]\n  const nextValue = currentModelValue.value[valueIndexToChangeRef.value]\n  const hasChanged = nextValue !== prevValue\n  if (hasChanged)\n    emits('valueCommit', toRaw(currentModelValue.value))\n}\n\nfunction updateValues(value: number, atIndex: number, { commit } = { commit: false }) {\n  const decimalCount = getDecimalCount(step.value)\n  const snapToStep = roundValue(Math.round((value - min.value) / step.value) * step.value + min.value, decimalCount)\n  const nextValue = clamp(snapToStep, min.value, max.value)\n\n  const nextValues = getNextSortedValues(currentModelValue.value, nextValue, atIndex)\n\n  if (hasMinStepsBetweenValues(nextValues, minStepsBetweenThumbs.value * step.value)) {\n    valueIndexToChangeRef.value = nextValues.indexOf(nextValue)\n    const hasChanged = String(nextValues) !== String(modelValue.value)\n    if (hasChanged && commit)\n      emits('valueCommit', nextValues)\n\n    if (hasChanged) {\n      thumbElements.value[valueIndexToChangeRef.value]?.focus()\n      modelValue.value = nextValues\n    }\n  }\n}\n\nconst thumbElements = ref<HTMLElement[]>([])\nprovideSliderRootContext({\n  modelValue,\n  currentModelValue,\n  valueIndexToChangeRef,\n  thumbElements,\n  orientation,\n  min,\n  max,\n  disabled,\n  thumbAlignment,\n})\n</script>\n\n<template>\n  <CollectionSlot>\n    <component\n      :is=\"orientation === 'horizontal' ? SliderHorizontal : SliderVertical\"\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      :min=\"min\"\n      :max=\"max\"\n      :dir=\"dir\"\n      :inverted=\"inverted\"\n      :aria-disabled=\"disabled\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      @pointerdown=\"() => {\n        if (!disabled) valuesBeforeSlideStartRef = currentModelValue\n      }\"\n      @slide-start=\"!disabled && handleSlideStart($event)\"\n      @slide-move=\"!disabled && handleSlideMove($event)\"\n      @slide-end=\"!disabled && handleSlideEnd()\"\n      @home-key-down=\"!disabled && updateValues(min, 0, { commit: true })\"\n      @end-key-down=\"!disabled && updateValues(max, currentModelValue.length - 1, { commit: true })\"\n      @step-key-down=\"(event, direction) => {\n        if (!disabled) {\n          const isPageKey = PAGE_KEYS.includes(event.key);\n          const isSkipKey = isPageKey || (event.shiftKey && ARROW_KEYS.includes(event.key));\n          const multiplier = isSkipKey ? 10 : 1;\n          const atIndex = valueIndexToChangeRef;\n          const value = currentModelValue[atIndex];\n          const stepInDirection = step * multiplier * direction;\n          updateValues(value + stepInDirection, atIndex, { commit: true });\n        }\n      }\"\n    >\n      <slot :model-value=\"modelValue\" />\n\n      <VisuallyHiddenInput\n        v-if=\"isFormControl && name\"\n        type=\"number\"\n        :value=\"modelValue\"\n        :name=\"name\"\n        :required=\"required\"\n        :disabled=\"disabled\"\n        :step=\"step\"\n      />\n    </component>\n  </CollectionSlot>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport type SliderImplEmits = {\n  slideStart: [event: PointerEvent]\n  slideMove: [event: PointerEvent]\n  slideEnd: [event: PointerEvent]\n  homeKeyDown: [event: KeyboardEvent]\n  endKeyDown: [event: KeyboardEvent]\n  stepKeyDown: [event: KeyboardEvent]\n}\n\nexport interface SliderImplProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectSliderRootContext } from './SliderRoot.vue'\nimport { ARROW_KEYS, PAGE_KEYS } from './utils'\n\nconst props = withDefaults(defineProps<SliderImplProps>(), {\n  as: 'span',\n})\nconst emits = defineEmits<SliderImplEmits>()\nconst rootContext = injectSliderRootContext()\n</script>\n\n<template>\n  <Primitive\n    data-slider-impl\n    v-bind=\"props\"\n    @keydown=\"(event: KeyboardEvent) => {\n      if (event.key === 'Home') {\n        emits('homeKeyDown', event)\n        // Prevent scrolling to page start\n        event.preventDefault();\n      }\n      else if (event.key === 'End') {\n        emits('endKeyDown', event)\n        // Prevent scrolling to page end\n        event.preventDefault();\n      }\n      else if (PAGE_KEYS.concat(ARROW_KEYS).includes(event.key)) {\n        emits('stepKeyDown', event)\n        // Prevent scrolling for directional key presses\n        event.preventDefault();\n      }\n    }\"\n    @pointerdown=\"(event: PointerEvent) => {\n      const target = event.target as HTMLElement;\n      target.setPointerCapture(event.pointerId);\n      // Prevent browser focus behaviour because we focus a thumb manually when values change.\n      event.preventDefault();\n      // Touch devices have a delay before focusing so won't focus if touch immediately moves\n      // away from target (sliding). We want thumb to focus regardless.\n      if (rootContext.thumbElements.value.includes(target)) {\n        target.focus();\n      }\n      else {\n        emits('slideStart', event)\n      }\n    }\"\n    @pointermove=\"(event: PointerEvent) => {\n      const target = event.target as HTMLElement;\n      if (target.hasPointerCapture(event.pointerId)) emits('slideMove', event);\n    }\"\n    @pointerup=\"(event: PointerEvent) => {\n      const target = event.target as HTMLElement;\n      if (target.hasPointerCapture(event.pointerId)) {\n        target.releasePointerCapture(event.pointerId);\n        emits('slideEnd', event)\n      }\n    }\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport type SliderImplEmits = {\n  slideStart: [event: PointerEvent]\n  slideMove: [event: PointerEvent]\n  slideEnd: [event: PointerEvent]\n  homeKeyDown: [event: KeyboardEvent]\n  endKeyDown: [event: KeyboardEvent]\n  stepKeyDown: [event: KeyboardEvent]\n}\n\nexport interface SliderImplProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectSliderRootContext } from './SliderRoot.vue'\nimport { ARROW_KEYS, PAGE_KEYS } from './utils'\n\nconst props = withDefaults(defineProps<SliderImplProps>(), {\n  as: 'span',\n})\nconst emits = defineEmits<SliderImplEmits>()\nconst rootContext = injectSliderRootContext()\n</script>\n\n<template>\n  <Primitive\n    data-slider-impl\n    v-bind=\"props\"\n    @keydown=\"(event: KeyboardEvent) => {\n      if (event.key === 'Home') {\n        emits('homeKeyDown', event)\n        // Prevent scrolling to page start\n        event.preventDefault();\n      }\n      else if (event.key === 'End') {\n        emits('endKeyDown', event)\n        // Prevent scrolling to page end\n        event.preventDefault();\n      }\n      else if (PAGE_KEYS.concat(ARROW_KEYS).includes(event.key)) {\n        emits('stepKeyDown', event)\n        // Prevent scrolling for directional key presses\n        event.preventDefault();\n      }\n    }\"\n    @pointerdown=\"(event: PointerEvent) => {\n      const target = event.target as HTMLElement;\n      target.setPointerCapture(event.pointerId);\n      // Prevent browser focus behaviour because we focus a thumb manually when values change.\n      event.preventDefault();\n      // Touch devices have a delay before focusing so won't focus if touch immediately moves\n      // away from target (sliding). We want thumb to focus regardless.\n      if (rootContext.thumbElements.value.includes(target)) {\n        target.focus();\n      }\n      else {\n        emits('slideStart', event)\n      }\n    }\"\n    @pointermove=\"(event: PointerEvent) => {\n      const target = event.target as HTMLElement;\n      if (target.hasPointerCapture(event.pointerId)) emits('slideMove', event);\n    }\"\n    @pointerup=\"(event: PointerEvent) => {\n      const target = event.target as HTMLElement;\n      if (target.hasPointerCapture(event.pointerId)) {\n        target.releasePointerCapture(event.pointerId);\n        emits('slideEnd', event)\n      }\n    }\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface SliderRangeProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectSliderRootContext } from './SliderRoot.vue'\nimport { convertValueToPercentage, injectSliderOrientationContext } from './utils'\n\nwithDefaults(defineProps<SliderRangeProps>(), { as: 'span' })\nconst rootContext = injectSliderRootContext()\nconst orientation = injectSliderOrientationContext()\n\nuseForwardExpose()\nconst percentages = computed(() => rootContext.currentModelValue.value.map(value =>\n  convertValueToPercentage(value, rootContext.min.value, rootContext.max.value),\n))\n\nconst offsetStart = computed(() => rootContext.currentModelValue.value.length > 1 ? Math.min(...percentages.value!) : 0)\nconst offsetEnd = computed(() => 100 - Math.max(...percentages.value, 0))\n</script>\n\n<template>\n  <Primitive\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n    :data-orientation=\"rootContext.orientation.value\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :style=\"{\n      [orientation!.startEdge.value]: `${offsetStart}%`,\n      [orientation!.endEdge.value]: `${offsetEnd}%`,\n    }\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface SliderRangeProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectSliderRootContext } from './SliderRoot.vue'\nimport { convertValueToPercentage, injectSliderOrientationContext } from './utils'\n\nwithDefaults(defineProps<SliderRangeProps>(), { as: 'span' })\nconst rootContext = injectSliderRootContext()\nconst orientation = injectSliderOrientationContext()\n\nuseForwardExpose()\nconst percentages = computed(() => rootContext.currentModelValue.value.map(value =>\n  convertValueToPercentage(value, rootContext.min.value, rootContext.max.value),\n))\n\nconst offsetStart = computed(() => rootContext.currentModelValue.value.length > 1 ? Math.min(...percentages.value!) : 0)\nconst offsetEnd = computed(() => 100 - Math.max(...percentages.value, 0))\n</script>\n\n<template>\n  <Primitive\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n    :data-orientation=\"rootContext.orientation.value\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :style=\"{\n      [orientation!.startEdge.value]: `${offsetStart}%`,\n      [orientation!.endEdge.value]: `${offsetEnd}%`,\n    }\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface SliderThumbImplProps extends PrimitiveProps {\n  index: number\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useMounted } from '@vueuse/core'\nimport { computed, onMounted, onUnmounted } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose, useSize } from '@/shared'\nimport { injectSliderRootContext } from './SliderRoot.vue'\nimport { convertValueToPercentage, getLabel, getThumbInBoundsOffset, injectSliderOrientationContext } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<SliderThumbImplProps>()\n\nconst rootContext = injectSliderRootContext()\nconst orientation = injectSliderOrientationContext()\n\nconst { forwardRef, currentElement: thumbElement } = useForwardExpose()\nconst { CollectionItem } = useCollection()\n\nconst value = computed(() => rootContext.modelValue?.value?.[props.index])\nconst percent = computed(() => value.value === undefined ? 0 : convertValueToPercentage(value.value, rootContext.min.value ?? 0, rootContext.max.value ?? 100))\nconst label = computed(() => getLabel(props.index, rootContext.modelValue?.value?.length ?? 0))\nconst size = useSize(thumbElement)\nconst orientationSize = computed(() => size[orientation!.size].value)\nconst thumbInBoundsOffset = computed(() => {\n  if (rootContext.thumbAlignment.value === 'overflow' || !orientationSize.value) {\n    return 0\n  }\n  else {\n    return getThumbInBoundsOffset(orientationSize.value, percent.value, orientation!.direction.value)\n  }\n})\n\nconst isMounted = useMounted()\nonMounted(() => {\n  rootContext.thumbElements.value.push(thumbElement.value)\n})\nonUnmounted(() => {\n  const i = rootContext.thumbElements.value.findIndex(i => i === thumbElement.value) ?? -1\n  rootContext.thumbElements.value.splice(i, 1)\n})\n</script>\n\n<template>\n  <CollectionItem>\n    <Primitive\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      role=\"slider\"\n      :tabindex=\"rootContext.disabled.value ? undefined : 0\"\n      :aria-label=\"$attrs['aria-label'] || label\"\n      :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n      :data-orientation=\"rootContext.orientation.value\"\n      :aria-valuenow=\"value\"\n      :aria-valuemin=\"rootContext.min.value\"\n      :aria-valuemax=\"rootContext.max.value\"\n      :aria-orientation=\"rootContext.orientation.value\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      :style=\"{\n        transform: 'var(--reka-slider-thumb-transform)',\n        position: 'absolute',\n        [orientation!.startEdge.value]: `calc(${percent}% + ${thumbInBoundsOffset}px)`,\n        /**\n         * There will be no value on initial render while we work out the index so we hide thumbs\n         * without a value, otherwise SSR will render them in the wrong position before they\n         * snap into the correct position during hydration which would be visually jarring for\n         * slower connections.\n         */\n        display: !isMounted && value === undefined ? 'none' : undefined,\n      }\"\n      @focus=\"() => {\n        rootContext.valueIndexToChangeRef.value = index\n      }\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionItem>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface SliderThumbImplProps extends PrimitiveProps {\n  index: number\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useMounted } from '@vueuse/core'\nimport { computed, onMounted, onUnmounted } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose, useSize } from '@/shared'\nimport { injectSliderRootContext } from './SliderRoot.vue'\nimport { convertValueToPercentage, getLabel, getThumbInBoundsOffset, injectSliderOrientationContext } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<SliderThumbImplProps>()\n\nconst rootContext = injectSliderRootContext()\nconst orientation = injectSliderOrientationContext()\n\nconst { forwardRef, currentElement: thumbElement } = useForwardExpose()\nconst { CollectionItem } = useCollection()\n\nconst value = computed(() => rootContext.modelValue?.value?.[props.index])\nconst percent = computed(() => value.value === undefined ? 0 : convertValueToPercentage(value.value, rootContext.min.value ?? 0, rootContext.max.value ?? 100))\nconst label = computed(() => getLabel(props.index, rootContext.modelValue?.value?.length ?? 0))\nconst size = useSize(thumbElement)\nconst orientationSize = computed(() => size[orientation!.size].value)\nconst thumbInBoundsOffset = computed(() => {\n  if (rootContext.thumbAlignment.value === 'overflow' || !orientationSize.value) {\n    return 0\n  }\n  else {\n    return getThumbInBoundsOffset(orientationSize.value, percent.value, orientation!.direction.value)\n  }\n})\n\nconst isMounted = useMounted()\nonMounted(() => {\n  rootContext.thumbElements.value.push(thumbElement.value)\n})\nonUnmounted(() => {\n  const i = rootContext.thumbElements.value.findIndex(i => i === thumbElement.value) ?? -1\n  rootContext.thumbElements.value.splice(i, 1)\n})\n</script>\n\n<template>\n  <CollectionItem>\n    <Primitive\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      role=\"slider\"\n      :tabindex=\"rootContext.disabled.value ? undefined : 0\"\n      :aria-label=\"$attrs['aria-label'] || label\"\n      :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n      :data-orientation=\"rootContext.orientation.value\"\n      :aria-valuenow=\"value\"\n      :aria-valuemin=\"rootContext.min.value\"\n      :aria-valuemax=\"rootContext.max.value\"\n      :aria-orientation=\"rootContext.orientation.value\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      :style=\"{\n        transform: 'var(--reka-slider-thumb-transform)',\n        position: 'absolute',\n        [orientation!.startEdge.value]: `calc(${percent}% + ${thumbInBoundsOffset}px)`,\n        /**\n         * There will be no value on initial render while we work out the index so we hide thumbs\n         * without a value, otherwise SSR will render them in the wrong position before they\n         * snap into the correct position during hydration which would be visually jarring for\n         * slower connections.\n         */\n        display: !isMounted && value === undefined ? 'none' : undefined,\n      }\"\n      @focus=\"() => {\n        rootContext.valueIndexToChangeRef.value = index\n      }\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionItem>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface SliderThumbProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { useCollection } from '@/Collection'\nimport SliderThumbImpl from './SliderThumbImpl.vue'\n\nconst props = withDefaults(defineProps<SliderThumbProps>(), {\n  as: 'span',\n})\nconst { getItems } = useCollection()\n\nconst { forwardRef, currentElement: thumbElement } = useForwardExpose()\n\nconst index = computed(() => thumbElement.value ? getItems(true).findIndex(i => i.ref === thumbElement.value) : -1)\n</script>\n\n<template>\n  <SliderThumbImpl\n    :ref=\"forwardRef\"\n    v-bind=\"props\"\n    :index=\"index\"\n  >\n    <slot />\n  </SliderThumbImpl>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface SliderThumbProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { useCollection } from '@/Collection'\nimport SliderThumbImpl from './SliderThumbImpl.vue'\n\nconst props = withDefaults(defineProps<SliderThumbProps>(), {\n  as: 'span',\n})\nconst { getItems } = useCollection()\n\nconst { forwardRef, currentElement: thumbElement } = useForwardExpose()\n\nconst index = computed(() => thumbElement.value ? getItems(true).findIndex(i => i.ref === thumbElement.value) : -1)\n</script>\n\n<template>\n  <SliderThumbImpl\n    :ref=\"forwardRef\"\n    v-bind=\"props\"\n    :index=\"index\"\n  >\n    <slot />\n  </SliderThumbImpl>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface SliderTrackProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectSliderRootContext } from './SliderRoot.vue'\n\nwithDefaults(defineProps<SliderTrackProps>(), { as: 'span' })\n\nconst rootContext = injectSliderRootContext()\n\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n    :data-orientation=\"rootContext.orientation.value\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface SliderTrackProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectSliderRootContext } from './SliderRoot.vue'\n\nwithDefaults(defineProps<SliderTrackProps>(), { as: 'span' })\n\nconst rootContext = injectSliderRootContext()\n\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n    :data-orientation=\"rootContext.orientation.value\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Color, ColorChannel, ColorChannel as ColorChannelType, ColorSpace } from '@/shared/color'\nimport type { DataOrientation, Direction, FormFieldProps } from '@/shared/types'\nimport { createContext, useDirection, useFormControl, useForwardExpose } from '@/shared'\n\nexport interface ColorSliderRootProps extends PrimitiveProps, FormFieldProps {\n  /** The color value (controlled). Can be a hex string or Color object. */\n  modelValue?: string | Color\n  /** The default color value (uncontrolled). */\n  defaultValue?: string | Color\n  /** The color space to operate in. */\n  colorSpace?: ColorSpace\n  /** The color channel that this slider manipulates. */\n  channel: ColorChannel\n  /** The orientation of the slider. */\n  orientation?: DataOrientation\n  /** The reading direction of the slider. */\n  dir?: Direction\n  /** Whether the slider is visually inverted. */\n  inverted?: boolean\n  /** When `true`, prevents the user from interacting with the slider. */\n  disabled?: boolean\n  /** Custom step value for increment/decrement. Defaults to the channel's natural step. */\n  step?: number\n}\n\nexport type ColorSliderRootEmits = {\n  'update:modelValue': [value: string | Color]\n  'update:color': [value: Color]\n  'change': [value: string]\n  'changeEnd': [value: string]\n}\n\nexport interface ColorSliderRootContext {\n  color: Ref<Color>\n  channelValue: ComputedRef<number>\n  channel: Ref<ColorChannel>\n  colorSpace: Ref<ColorSpace>\n  orientation: Ref<DataOrientation>\n  disabled: Ref<boolean>\n  inverted: Ref<boolean>\n  min: ComputedRef<number>\n  max: ComputedRef<number>\n  step: ComputedRef<number>\n}\n\nexport const [injectColorSliderRootContext, provideColorSliderRootContext]\n  = createContext<ColorSliderRootContext>('ColorSliderRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref, toRefs, watch } from 'vue'\nimport { colorToString, convertToHsb, convertToHsl, convertToRgb, getChannelRange, getChannelValue, normalizeColor, setChannelValue } from '@/shared/color'\nimport { SliderRoot } from '@/Slider'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<ColorSliderRootProps>(), {\n  colorSpace: 'hsl',\n  orientation: 'horizontal',\n  disabled: false,\n  inverted: false,\n  defaultValue: '#000000',\n  as: 'span',\n})\n\nconst emits = defineEmits<ColorSliderRootEmits>()\n\nconst { orientation, disabled, inverted, dir: propDir, channel, colorSpace, step: stepProp } = toRefs(props)\nconst dir = useDirection(propDir)\nconst { forwardRef, currentElement } = useForwardExpose()\nconst isFormControl = useFormControl(currentElement)\n\n// Normalize the model value to a Color object\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n})\n\n// Convert a color to the native color space for the given channel.\n// This ensures setChannelValue/getChannelValue operate without cross-space round-trips.\nfunction toNativeSpace(color: Color, ch: ColorChannelType, space: ColorSpace): Color {\n  switch (ch) {\n    case 'hue':\n    case 'lightness':\n      return convertToHsl(color)\n    case 'saturation':\n      return space === 'hsb' ? convertToHsb(color) : convertToHsl(color)\n    case 'brightness':\n      return convertToHsb(color)\n    case 'red':\n    case 'green':\n    case 'blue':\n      return convertToRgb(color)\n    case 'alpha':\n      return color\n    default:\n      return color\n  }\n}\n\n// Internal color ref that preserves color space precision.\n// Convert to the channel's native space to avoid cross-space round-trips during drag.\nconst internalColor = ref<Color>(toNativeSpace(normalizeColor(modelValue.value ?? props.defaultValue ?? '#000000'), channel.value, colorSpace.value))\n\n// Check if a color is achromatic (hue information is lost in hex round-trips)\nfunction isAchromatic(color: Color): boolean {\n  const hsl = convertToHsl(color)\n  return hsl.s === 0 || hsl.l === 0 || hsl.l >= 100\n}\n\n// Sync internal color from external modelValue changes (e.g. parent updates)\nwatch(() => modelValue.value, (newVal) => {\n  if (newVal == null)\n    return\n  const parsed = normalizeColor(newVal)\n  const currentHex = colorToString(internalColor.value, 'hex')\n  const newHex = colorToString(parsed, 'hex')\n  // Only update if the external value actually changed (avoid overwriting\n  // precision during our own drag updates)\n  if (currentHex !== newHex) {\n    const nativeColor = toNativeSpace(parsed, channel.value, colorSpace.value)\n    const currentChannelVal = getChannelValue(internalColor.value, channel.value)\n    const newChannelVal = getChannelValue(nativeColor, channel.value)\n\n    // Preserve this slider's channel value when:\n    // 1. Color is achromatic (hue completely lost in hex round-trip)\n    // 2. Channel value diff is within 2% of range (8-bit RGB quantization drift)\n    // We still update the rest of the color so the track gradient stays correct.\n    const range = channelRange.value.max - channelRange.value.min\n    const shouldPreserve = (channel.value === 'hue' && isAchromatic(parsed))\n      || Math.abs(currentChannelVal - newChannelVal) < range * 0.02\n\n    if (shouldPreserve) {\n      internalColor.value = setChannelValue(nativeColor, channel.value, currentChannelVal)\n    }\n    else {\n      internalColor.value = nativeColor\n    }\n  }\n})\n\nconst color = computed({\n  get: () => internalColor.value,\n  set: (newColor: Color) => {\n    internalColor.value = newColor\n    const hexString = colorToString(newColor, 'hex')\n    modelValue.value = hexString\n    emits('update:color', newColor)\n  },\n})\n\n// Get channel range\nconst channelRange = computed(() => getChannelRange(channel.value))\nconst min = computed(() => channelRange.value.min)\nconst max = computed(() => channelRange.value.max)\nconst step = computed(() => stepProp.value ?? channelRange.value.step)\n\n// Current channel value\nconst channelValue = computed(() => getChannelValue(color.value, channel.value))\n\n// Convert channel value to array format for SliderRoot\nconst sliderValue = computed({\n  get: () => [channelValue.value],\n  set: (newValue: number[]) => {\n    const clamped = Math.max(min.value, Math.min(max.value, newValue[0]))\n    const newColor = setChannelValue(color.value, channel.value, clamped)\n    color.value = newColor\n    emits('change', colorToString(newColor, 'hex'))\n  },\n})\n\nfunction handleValueCommit(values: number[]) {\n  emits('changeEnd', colorToString(color.value, 'hex'))\n}\n\nprovideColorSliderRootContext({\n  color: computed(() => color.value) as Ref<Color>,\n  channelValue,\n  channel,\n  colorSpace,\n  orientation,\n  disabled,\n  inverted,\n  min,\n  max,\n  step,\n})\n</script>\n\n<template>\n  <SliderRoot\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n    v-model=\"sliderValue\"\n    :orientation=\"orientation\"\n    :dir=\"dir\"\n    :disabled=\"disabled\"\n    :inverted=\"inverted\"\n    :min=\"min\"\n    :max=\"max\"\n    :step=\"step\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    @value-commit=\"handleValueCommit\"\n  >\n    <slot />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name\"\n      type=\"text\"\n      :value=\"colorToString(color, 'hex')\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n    />\n  </SliderRoot>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Color, ColorChannel, ColorChannel as ColorChannelType, ColorSpace } from '@/shared/color'\nimport type { DataOrientation, Direction, FormFieldProps } from '@/shared/types'\nimport { createContext, useDirection, useFormControl, useForwardExpose } from '@/shared'\n\nexport interface ColorSliderRootProps extends PrimitiveProps, FormFieldProps {\n  /** The color value (controlled). Can be a hex string or Color object. */\n  modelValue?: string | Color\n  /** The default color value (uncontrolled). */\n  defaultValue?: string | Color\n  /** The color space to operate in. */\n  colorSpace?: ColorSpace\n  /** The color channel that this slider manipulates. */\n  channel: ColorChannel\n  /** The orientation of the slider. */\n  orientation?: DataOrientation\n  /** The reading direction of the slider. */\n  dir?: Direction\n  /** Whether the slider is visually inverted. */\n  inverted?: boolean\n  /** When `true`, prevents the user from interacting with the slider. */\n  disabled?: boolean\n  /** Custom step value for increment/decrement. Defaults to the channel's natural step. */\n  step?: number\n}\n\nexport type ColorSliderRootEmits = {\n  'update:modelValue': [value: string | Color]\n  'update:color': [value: Color]\n  'change': [value: string]\n  'changeEnd': [value: string]\n}\n\nexport interface ColorSliderRootContext {\n  color: Ref<Color>\n  channelValue: ComputedRef<number>\n  channel: Ref<ColorChannel>\n  colorSpace: Ref<ColorSpace>\n  orientation: Ref<DataOrientation>\n  disabled: Ref<boolean>\n  inverted: Ref<boolean>\n  min: ComputedRef<number>\n  max: ComputedRef<number>\n  step: ComputedRef<number>\n}\n\nexport const [injectColorSliderRootContext, provideColorSliderRootContext]\n  = createContext<ColorSliderRootContext>('ColorSliderRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref, toRefs, watch } from 'vue'\nimport { colorToString, convertToHsb, convertToHsl, convertToRgb, getChannelRange, getChannelValue, normalizeColor, setChannelValue } from '@/shared/color'\nimport { SliderRoot } from '@/Slider'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<ColorSliderRootProps>(), {\n  colorSpace: 'hsl',\n  orientation: 'horizontal',\n  disabled: false,\n  inverted: false,\n  defaultValue: '#000000',\n  as: 'span',\n})\n\nconst emits = defineEmits<ColorSliderRootEmits>()\n\nconst { orientation, disabled, inverted, dir: propDir, channel, colorSpace, step: stepProp } = toRefs(props)\nconst dir = useDirection(propDir)\nconst { forwardRef, currentElement } = useForwardExpose()\nconst isFormControl = useFormControl(currentElement)\n\n// Normalize the model value to a Color object\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n})\n\n// Convert a color to the native color space for the given channel.\n// This ensures setChannelValue/getChannelValue operate without cross-space round-trips.\nfunction toNativeSpace(color: Color, ch: ColorChannelType, space: ColorSpace): Color {\n  switch (ch) {\n    case 'hue':\n    case 'lightness':\n      return convertToHsl(color)\n    case 'saturation':\n      return space === 'hsb' ? convertToHsb(color) : convertToHsl(color)\n    case 'brightness':\n      return convertToHsb(color)\n    case 'red':\n    case 'green':\n    case 'blue':\n      return convertToRgb(color)\n    case 'alpha':\n      return color\n    default:\n      return color\n  }\n}\n\n// Internal color ref that preserves color space precision.\n// Convert to the channel's native space to avoid cross-space round-trips during drag.\nconst internalColor = ref<Color>(toNativeSpace(normalizeColor(modelValue.value ?? props.defaultValue ?? '#000000'), channel.value, colorSpace.value))\n\n// Check if a color is achromatic (hue information is lost in hex round-trips)\nfunction isAchromatic(color: Color): boolean {\n  const hsl = convertToHsl(color)\n  return hsl.s === 0 || hsl.l === 0 || hsl.l >= 100\n}\n\n// Sync internal color from external modelValue changes (e.g. parent updates)\nwatch(() => modelValue.value, (newVal) => {\n  if (newVal == null)\n    return\n  const parsed = normalizeColor(newVal)\n  const currentHex = colorToString(internalColor.value, 'hex')\n  const newHex = colorToString(parsed, 'hex')\n  // Only update if the external value actually changed (avoid overwriting\n  // precision during our own drag updates)\n  if (currentHex !== newHex) {\n    const nativeColor = toNativeSpace(parsed, channel.value, colorSpace.value)\n    const currentChannelVal = getChannelValue(internalColor.value, channel.value)\n    const newChannelVal = getChannelValue(nativeColor, channel.value)\n\n    // Preserve this slider's channel value when:\n    // 1. Color is achromatic (hue completely lost in hex round-trip)\n    // 2. Channel value diff is within 2% of range (8-bit RGB quantization drift)\n    // We still update the rest of the color so the track gradient stays correct.\n    const range = channelRange.value.max - channelRange.value.min\n    const shouldPreserve = (channel.value === 'hue' && isAchromatic(parsed))\n      || Math.abs(currentChannelVal - newChannelVal) < range * 0.02\n\n    if (shouldPreserve) {\n      internalColor.value = setChannelValue(nativeColor, channel.value, currentChannelVal)\n    }\n    else {\n      internalColor.value = nativeColor\n    }\n  }\n})\n\nconst color = computed({\n  get: () => internalColor.value,\n  set: (newColor: Color) => {\n    internalColor.value = newColor\n    const hexString = colorToString(newColor, 'hex')\n    modelValue.value = hexString\n    emits('update:color', newColor)\n  },\n})\n\n// Get channel range\nconst channelRange = computed(() => getChannelRange(channel.value))\nconst min = computed(() => channelRange.value.min)\nconst max = computed(() => channelRange.value.max)\nconst step = computed(() => stepProp.value ?? channelRange.value.step)\n\n// Current channel value\nconst channelValue = computed(() => getChannelValue(color.value, channel.value))\n\n// Convert channel value to array format for SliderRoot\nconst sliderValue = computed({\n  get: () => [channelValue.value],\n  set: (newValue: number[]) => {\n    const clamped = Math.max(min.value, Math.min(max.value, newValue[0]))\n    const newColor = setChannelValue(color.value, channel.value, clamped)\n    color.value = newColor\n    emits('change', colorToString(newColor, 'hex'))\n  },\n})\n\nfunction handleValueCommit(values: number[]) {\n  emits('changeEnd', colorToString(color.value, 'hex'))\n}\n\nprovideColorSliderRootContext({\n  color: computed(() => color.value) as Ref<Color>,\n  channelValue,\n  channel,\n  colorSpace,\n  orientation,\n  disabled,\n  inverted,\n  min,\n  max,\n  step,\n})\n</script>\n\n<template>\n  <SliderRoot\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n    v-model=\"sliderValue\"\n    :orientation=\"orientation\"\n    :dir=\"dir\"\n    :disabled=\"disabled\"\n    :inverted=\"inverted\"\n    :min=\"min\"\n    :max=\"max\"\n    :step=\"step\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    @value-commit=\"handleValueCommit\"\n  >\n    <slot />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name\"\n      type=\"text\"\n      :value=\"colorToString(color, 'hex')\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n    />\n  </SliderRoot>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ColorSliderThumbProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { getChannelName } from '@/shared/color'\nimport { SliderThumb } from '@/Slider'\nimport { injectColorSliderRootContext } from './ColorSliderRoot.vue'\n\nconst props = withDefaults(defineProps<ColorSliderThumbProps>(), {\n  as: 'span',\n})\n\ndefineSlots<{\n  default?: (props: {\n    /** The display name of the current channel */\n    channelName: string\n    /** The current numeric value of the channel */\n    channelValue: number\n  }) => any\n}>()\n\nconst rootContext = injectColorSliderRootContext()\n\nconst ariaLabel = computed(() => {\n  return getChannelName(rootContext.channel.value)\n})\n\nconst ariaValueText = computed(() => {\n  const value = rootContext.channelValue.value\n  const channel = rootContext.channel.value\n  if (channel === 'alpha') {\n    return `${Math.round(value)}%`\n  }\n  return String(Math.round(value))\n})\n</script>\n\n<template>\n  <SliderThumb\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-label=\"ariaLabel\"\n    :aria-valuetext=\"ariaValueText\"\n  >\n    <slot\n      :channel-name=\"ariaLabel\"\n      :channel-value=\"rootContext.channelValue.value\"\n    />\n  </SliderThumb>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ColorSliderThumbProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { getChannelName } from '@/shared/color'\nimport { SliderThumb } from '@/Slider'\nimport { injectColorSliderRootContext } from './ColorSliderRoot.vue'\n\nconst props = withDefaults(defineProps<ColorSliderThumbProps>(), {\n  as: 'span',\n})\n\ndefineSlots<{\n  default?: (props: {\n    /** The display name of the current channel */\n    channelName: string\n    /** The current numeric value of the channel */\n    channelValue: number\n  }) => any\n}>()\n\nconst rootContext = injectColorSliderRootContext()\n\nconst ariaLabel = computed(() => {\n  return getChannelName(rootContext.channel.value)\n})\n\nconst ariaValueText = computed(() => {\n  const value = rootContext.channelValue.value\n  const channel = rootContext.channel.value\n  if (channel === 'alpha') {\n    return `${Math.round(value)}%`\n  }\n  return String(Math.round(value))\n})\n</script>\n\n<template>\n  <SliderThumb\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-label=\"ariaLabel\"\n    :aria-valuetext=\"ariaValueText\"\n  >\n    <slot\n      :channel-name=\"ariaLabel\"\n      :channel-value=\"rootContext.channelValue.value\"\n    />\n  </SliderThumb>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ColorSliderTrackProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { getSliderBackgroundStyle } from '@/shared/color'\nimport { SliderTrack } from '@/Slider'\nimport { injectColorSliderRootContext } from './ColorSliderRoot.vue'\n\nconst props = withDefaults(defineProps<ColorSliderTrackProps>(), {\n  as: 'span',\n})\n\nconst rootContext = injectColorSliderRootContext()\n\nconst backgroundStyle = computed(() => {\n  return getSliderBackgroundStyle(\n    rootContext.color.value,\n    rootContext.channel.value,\n    rootContext.colorSpace.value,\n  )\n})\n</script>\n\n<template>\n  <SliderTrack\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :style=\"backgroundStyle\"\n  >\n    <slot />\n  </SliderTrack>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ColorSliderTrackProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { getSliderBackgroundStyle } from '@/shared/color'\nimport { SliderTrack } from '@/Slider'\nimport { injectColorSliderRootContext } from './ColorSliderRoot.vue'\n\nconst props = withDefaults(defineProps<ColorSliderTrackProps>(), {\n  as: 'span',\n})\n\nconst rootContext = injectColorSliderRootContext()\n\nconst backgroundStyle = computed(() => {\n  return getSliderBackgroundStyle(\n    rootContext.color.value,\n    rootContext.channel.value,\n    rootContext.colorSpace.value,\n  )\n})\n</script>\n\n<template>\n  <SliderTrack\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :style=\"backgroundStyle\"\n  >\n    <slot />\n  </SliderTrack>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Color } from '@/shared/color'\n\nexport interface ColorSwatchProps extends PrimitiveProps {\n  /**\n   * The color to display in the swatch as a hex string or Color object.\n   * Example: `#16a372`, `#ff5733`, or `{ space: 'hsl', h: 120, s: 100, l: 50, alpha: 1 }`.\n   */\n  color?: string | Color\n  /**\n   * Optional accessible label for the color. If omitted, the color name will be derived from the color value.\n   */\n  label?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { colorToString, getColorContrast, getColorName, normalizeColor } from '@/shared/color'\n\nconst props = withDefaults(defineProps<ColorSwatchProps>(), { as: 'div', color: '' })\n\nconst colorString = computed(() => {\n  if (!props.color)\n    return ''\n  if (typeof props.color === 'string') {\n    return props.color\n  }\n  return colorToString(props.color, 'hex')\n})\n\nconst colorObj = computed(() => {\n  if (!props.color)\n    return null\n  try {\n    return normalizeColor(props.color)\n  }\n  catch {\n    return null\n  }\n})\n\nconst alpha = computed(() => colorObj.value?.alpha ?? 0)\nconst isNoColor = computed(() => !props.color || alpha.value <= 0)\n\nconst label = computed(() => {\n  if (props.label)\n    return props.label\n\n  // Match React Aria: transparent colors get \"transparent\" label\n  if (!colorObj.value || colorObj.value.alpha === 0)\n    return 'transparent'\n\n  try {\n    return getColorName(colorString.value)\n  }\n  catch {\n    return colorString.value || 'transparent'\n  }\n})\n\nconst colorContrast = computed(() => {\n  try {\n    return getColorContrast(colorString.value)\n  }\n  catch {\n    if (import.meta.env.DEV) {\n      console.warn(`WARNING: Unable to resolve contrast color for \"${colorString.value}\".\n           Please check that the color provided is a valid hex color.`)\n    }\n    return undefined\n  }\n})\n</script>\n\n<template>\n  <Primitive\n    role=\"img\"\n    :aria-label=\"label\"\n    aria-roledescription=\"color swatch\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :data-color-contrast=\"colorContrast\"\n    :data-no-color=\"isNoColor ? '' : undefined\"\n    :style=\"{\n      '--reka-color-swatch-color': colorString,\n      '--reka-color-swatch-alpha': String(alpha),\n    }\"\n  >\n    <slot\n      :color=\"colorString\"\n      :alpha=\"alpha\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Color } from '@/shared/color'\n\nexport interface ColorSwatchProps extends PrimitiveProps {\n  /**\n   * The color to display in the swatch as a hex string or Color object.\n   * Example: `#16a372`, `#ff5733`, or `{ space: 'hsl', h: 120, s: 100, l: 50, alpha: 1 }`.\n   */\n  color?: string | Color\n  /**\n   * Optional accessible label for the color. If omitted, the color name will be derived from the color value.\n   */\n  label?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { colorToString, getColorContrast, getColorName, normalizeColor } from '@/shared/color'\n\nconst props = withDefaults(defineProps<ColorSwatchProps>(), { as: 'div', color: '' })\n\nconst colorString = computed(() => {\n  if (!props.color)\n    return ''\n  if (typeof props.color === 'string') {\n    return props.color\n  }\n  return colorToString(props.color, 'hex')\n})\n\nconst colorObj = computed(() => {\n  if (!props.color)\n    return null\n  try {\n    return normalizeColor(props.color)\n  }\n  catch {\n    return null\n  }\n})\n\nconst alpha = computed(() => colorObj.value?.alpha ?? 0)\nconst isNoColor = computed(() => !props.color || alpha.value <= 0)\n\nconst label = computed(() => {\n  if (props.label)\n    return props.label\n\n  // Match React Aria: transparent colors get \"transparent\" label\n  if (!colorObj.value || colorObj.value.alpha === 0)\n    return 'transparent'\n\n  try {\n    return getColorName(colorString.value)\n  }\n  catch {\n    return colorString.value || 'transparent'\n  }\n})\n\nconst colorContrast = computed(() => {\n  try {\n    return getColorContrast(colorString.value)\n  }\n  catch {\n    if (import.meta.env.DEV) {\n      console.warn(`WARNING: Unable to resolve contrast color for \"${colorString.value}\".\n           Please check that the color provided is a valid hex color.`)\n    }\n    return undefined\n  }\n})\n</script>\n\n<template>\n  <Primitive\n    role=\"img\"\n    :aria-label=\"label\"\n    aria-roledescription=\"color swatch\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :data-color-contrast=\"colorContrast\"\n    :data-no-color=\"isNoColor ? '' : undefined\"\n    :style=\"{\n      '--reka-color-swatch-color': colorString,\n      '--reka-color-swatch-alpha': String(alpha),\n    }\"\n  >\n    <slot\n      :color=\"colorString\"\n      :alpha=\"alpha\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { ListboxItemEmits, ListboxItemProps } from '@/Listbox'\nimport { createContext, useForwardPropsEmits } from '@/shared'\n\nexport interface ColorSwatchPickerItemProps extends ListboxItemProps {\n/**\n * The color to display in the swatch as a hex string.\n * Example: `#16a372` or `#ff5733`.\n */\n  value: string\n}\n\nexport type ColorSwatchPickerItemEmits = ListboxItemEmits\n\nexport interface ColorSwatchPickerItemContext {\n  color: Ref<string>\n}\n\nexport const [injectColorSwatchPickerItemContext, provideColorSwatchPickerItemContext]\n  = createContext<ColorSwatchPickerItemContext>('ColorSwatchPickerItem', 'ColorSwatchPickerItemContext')\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, toRefs } from 'vue'\nimport { ListboxItem } from '@/Listbox'\nimport { getColorName } from '@/shared/color'\n\nconst props = defineProps<ColorSwatchPickerItemProps>()\n\nconst emits = defineEmits<ColorSwatchPickerItemEmits>()\n\nconst { value } = toRefs(props)\n\nconst forwarded = useForwardPropsEmits(props, emits)\n\nconst colorLabel = computed(() => {\n  try {\n    return getColorName(value.value)\n  }\n  catch {\n    return value.value\n  }\n})\n\nprovideColorSwatchPickerItemContext({\n  color: value,\n})\n</script>\n\n<template>\n  <ListboxItem\n    v-bind=\"forwarded\"\n    :aria-label=\"colorLabel\"\n    :data-color=\"value\"\n    :style=\"{ '--reka-color-swatch-picker-item-color': value }\"\n  >\n    <slot />\n  </ListboxItem>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { ListboxItemEmits, ListboxItemProps } from '@/Listbox'\nimport { createContext, useForwardPropsEmits } from '@/shared'\n\nexport interface ColorSwatchPickerItemProps extends ListboxItemProps {\n/**\n * The color to display in the swatch as a hex string.\n * Example: `#16a372` or `#ff5733`.\n */\n  value: string\n}\n\nexport type ColorSwatchPickerItemEmits = ListboxItemEmits\n\nexport interface ColorSwatchPickerItemContext {\n  color: Ref<string>\n}\n\nexport const [injectColorSwatchPickerItemContext, provideColorSwatchPickerItemContext]\n  = createContext<ColorSwatchPickerItemContext>('ColorSwatchPickerItem', 'ColorSwatchPickerItemContext')\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, toRefs } from 'vue'\nimport { ListboxItem } from '@/Listbox'\nimport { getColorName } from '@/shared/color'\n\nconst props = defineProps<ColorSwatchPickerItemProps>()\n\nconst emits = defineEmits<ColorSwatchPickerItemEmits>()\n\nconst { value } = toRefs(props)\n\nconst forwarded = useForwardPropsEmits(props, emits)\n\nconst colorLabel = computed(() => {\n  try {\n    return getColorName(value.value)\n  }\n  catch {\n    return value.value\n  }\n})\n\nprovideColorSwatchPickerItemContext({\n  color: value,\n})\n</script>\n\n<template>\n  <ListboxItem\n    v-bind=\"forwarded\"\n    :aria-label=\"colorLabel\"\n    :data-color=\"value\"\n    :style=\"{ '--reka-color-swatch-picker-item-color': value }\"\n  >\n    <slot />\n  </ListboxItem>\n</template>\n","<script lang=\"ts\">\nimport type { ListboxItemIndicatorProps } from '@/Listbox'\n\nexport interface ColorSwatchPickerItemIndicatorProps extends ListboxItemIndicatorProps { }\n</script>\n\n<script setup lang=\"ts\">\nimport { ListboxItemIndicator } from '@/Listbox'\n\nconst props = defineProps<ColorSwatchPickerItemIndicatorProps>()\n</script>\n\n<template>\n  <ListboxItemIndicator v-bind=\"props\">\n    <slot />\n  </ListboxItemIndicator>\n</template>\n","<script lang=\"ts\">\nimport type { ListboxItemIndicatorProps } from '@/Listbox'\n\nexport interface ColorSwatchPickerItemIndicatorProps extends ListboxItemIndicatorProps { }\n</script>\n\n<script setup lang=\"ts\">\nimport { ListboxItemIndicator } from '@/Listbox'\n\nconst props = defineProps<ColorSwatchPickerItemIndicatorProps>()\n</script>\n\n<template>\n  <ListboxItemIndicator v-bind=\"props\">\n    <slot />\n  </ListboxItemIndicator>\n</template>\n","<script lang=\"ts\">\nimport type { ColorSwatchProps } from '@/ColorSwatch/ColorSwatch.vue'\n\nexport interface ColorSwatchPickerItemSwatchProps extends Omit<ColorSwatchProps, 'color'> { }\n</script>\n\n<script setup lang=\"ts\">\nimport { ColorSwatch } from '@/ColorSwatch'\nimport { injectColorSwatchPickerItemContext } from './ColorSwatchPickerItem.vue'\n\nconst props = defineProps<ColorSwatchPickerItemSwatchProps>()\n\nconst colorSwatchPickerItemContext = injectColorSwatchPickerItemContext()\n</script>\n\n<template>\n  <ColorSwatch\n    v-bind=\"props\"\n    :color=\"colorSwatchPickerItemContext.color.value\"\n  />\n</template>\n","<script lang=\"ts\">\nimport type { ColorSwatchProps } from '@/ColorSwatch/ColorSwatch.vue'\n\nexport interface ColorSwatchPickerItemSwatchProps extends Omit<ColorSwatchProps, 'color'> { }\n</script>\n\n<script setup lang=\"ts\">\nimport { ColorSwatch } from '@/ColorSwatch'\nimport { injectColorSwatchPickerItemContext } from './ColorSwatchPickerItem.vue'\n\nconst props = defineProps<ColorSwatchPickerItemSwatchProps>()\n\nconst colorSwatchPickerItemContext = injectColorSwatchPickerItemContext()\n</script>\n\n<template>\n  <ColorSwatch\n    v-bind=\"props\"\n    :color=\"colorSwatchPickerItemContext.color.value\"\n  />\n</template>\n","<script lang=\"ts\">\nimport type { ListboxRootEmits, ListboxRootProps } from '@/Listbox'\nimport { useVModel } from '@vueuse/core'\nimport { useForwardPropsEmits } from '@/shared'\n\nexport interface ColorSwatchPickerRootProps extends Omit<ListboxRootProps, 'by'> {\n  defaultValue?: string | string[]\n  modelValue?: string | string[]\n}\n\nexport type ColorSwatchPickerRootEmits = ListboxRootEmits\n</script>\n\n<script setup lang=\"ts\">\nimport { ListboxContent, ListboxRoot } from '@/Listbox'\n\nconst props = withDefaults(defineProps<ColorSwatchPickerRootProps>(), {\n  as: 'div',\n  defaultValue: undefined,\n  dir: 'ltr',\n  disabled: false,\n  loop: false,\n  orientation: 'horizontal',\n})\n\nconst emits = defineEmits<ColorSwatchPickerRootEmits>()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? (props.multiple ? [] : ''),\n  // Cast required for VueUse's passive option type; enables passive sync when modelValue is undefined\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst forwarded = useForwardPropsEmits(props, emits)\n</script>\n\n<template>\n  <ListboxRoot\n    v-bind=\"forwarded\"\n    v-model=\"modelValue\"\n    as-child\n  >\n    <ListboxContent\n      :as-child=\"asChild\"\n      :as=\"as\"\n    >\n      <slot :model-value=\"modelValue\" />\n    </ListboxContent>\n  </ListboxRoot>\n</template>\n","<script lang=\"ts\">\nimport type { ListboxRootEmits, ListboxRootProps } from '@/Listbox'\nimport { useVModel } from '@vueuse/core'\nimport { useForwardPropsEmits } from '@/shared'\n\nexport interface ColorSwatchPickerRootProps extends Omit<ListboxRootProps, 'by'> {\n  defaultValue?: string | string[]\n  modelValue?: string | string[]\n}\n\nexport type ColorSwatchPickerRootEmits = ListboxRootEmits\n</script>\n\n<script setup lang=\"ts\">\nimport { ListboxContent, ListboxRoot } from '@/Listbox'\n\nconst props = withDefaults(defineProps<ColorSwatchPickerRootProps>(), {\n  as: 'div',\n  defaultValue: undefined,\n  dir: 'ltr',\n  disabled: false,\n  loop: false,\n  orientation: 'horizontal',\n})\n\nconst emits = defineEmits<ColorSwatchPickerRootEmits>()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? (props.multiple ? [] : ''),\n  // Cast required for VueUse's passive option type; enables passive sync when modelValue is undefined\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst forwarded = useForwardPropsEmits(props, emits)\n</script>\n\n<template>\n  <ListboxRoot\n    v-bind=\"forwarded\"\n    v-model=\"modelValue\"\n    as-child\n  >\n    <ListboxContent\n      :as-child=\"asChild\"\n      :as=\"as\"\n    >\n      <slot :model-value=\"modelValue\" />\n    </ListboxContent>\n  </ListboxRoot>\n</template>\n","<script setup lang=\"ts\">\nimport type { PopperAnchorProps } from '@/Popper'\nimport { PopperAnchor } from '@/Popper'\n\ninterface MenuAnchorProps extends PopperAnchorProps {}\n\nconst props = defineProps<MenuAnchorProps>()\n</script>\n\n<template>\n  <PopperAnchor v-bind=\"props\">\n    <slot />\n  </PopperAnchor>\n</template>\n","<script setup lang=\"ts\">\nimport type { PopperAnchorProps } from '@/Popper'\nimport { PopperAnchor } from '@/Popper'\n\ninterface MenuAnchorProps extends PopperAnchorProps {}\n\nconst props = defineProps<MenuAnchorProps>()\n</script>\n\n<template>\n  <PopperAnchor v-bind=\"props\">\n    <slot />\n  </PopperAnchor>\n</template>\n","<script lang=\"ts\">\nimport type { PopperArrowProps } from '@/Popper'\n\nexport interface MenuArrowProps extends PopperArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { PopperArrow } from '@/Popper'\n\nconst props = defineProps<MenuArrowProps>()\n</script>\n\n<template>\n  <PopperArrow v-bind=\"props\">\n    <slot />\n  </PopperArrow>\n</template>\n","<script lang=\"ts\">\nimport type { PopperArrowProps } from '@/Popper'\n\nexport interface MenuArrowProps extends PopperArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { PopperArrow } from '@/Popper'\n\nconst props = defineProps<MenuArrowProps>()\n</script>\n\n<template>\n  <PopperArrow v-bind=\"props\">\n    <slot />\n  </PopperArrow>\n</template>\n","import { createSharedComposable, useEventListener } from '@vueuse/core'\nimport { onMounted, ref } from 'vue'\n\nfunction useIsUsingKeyboardImpl() {\n  const isUsingKeyboard = ref(false)\n\n  onMounted(() => {\n    // Capture phase ensures we set the boolean before any side effects execute\n    // in response to the key or pointer event as they might depend on this value.\n    useEventListener('keydown', () => {\n      isUsingKeyboard.value = true\n    }, { capture: true, passive: true })\n\n    useEventListener(['pointerdown', 'pointermove'], () => {\n      isUsingKeyboard.value = false\n    }, { capture: true, passive: true })\n  })\n\n  return isUsingKeyboard\n}\n\nexport const useIsUsingKeyboard = createSharedComposable(useIsUsingKeyboardImpl)\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { Direction } from './utils'\nimport { createContext, useDirection } from '@/shared'\nimport { useIsUsingKeyboard } from '@/shared/useIsUsingKeyboard'\n\nexport interface MenuContext {\n  open: Ref<boolean>\n  onOpenChange: (open: boolean) => void\n  content: Ref<HTMLElement | undefined>\n  onContentChange: (content: HTMLElement | undefined) => void\n}\n\nexport interface MenuRootContext {\n  onClose: () => void\n  dir: Ref<Direction>\n  isUsingKeyboardRef: Ref<boolean>\n  modal: Ref<boolean>\n}\n\nexport interface MenuProps {\n  /** The controlled open state of the menu. Can be used as `v-model:open`. */\n  open?: boolean\n  /**\n   * The reading direction of the combobox when applicable.\n   *\n   * If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode.\n   */\n  dir?: Direction\n  /**\n   * The modality of the dropdown menu.\n   *\n   * When set to `true`, interaction with outside elements will be disabled and only menu content will be visible to screen readers.\n   */\n  modal?: boolean\n}\n\nexport type MenuEmits = {\n  'update:open': [payload: boolean]\n}\n\nexport const [injectMenuContext, provideMenuContext]\n  = createContext<MenuContext>(['MenuRoot', 'MenuSub'], 'MenuContext')\n\nexport const [injectMenuRootContext, provideMenuRootContext]\n  = createContext<MenuRootContext>('MenuRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport {\n  ref,\n  toRefs,\n} from 'vue'\nimport { PopperRoot } from '@/Popper'\n\nconst props = withDefaults(defineProps<MenuProps>(), {\n  open: false,\n  modal: true,\n})\nconst emits = defineEmits<MenuEmits>()\nconst { modal, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\n\nconst open = useVModel(props, 'open', emits)\n\nconst content = ref<HTMLElement>()\nconst isUsingKeyboardRef = useIsUsingKeyboard()\n\nprovideMenuContext({\n  open,\n  onOpenChange: (value) => {\n    open.value = value\n  },\n  content,\n  onContentChange: (element) => {\n    content.value = element\n  },\n})\n\nprovideMenuRootContext({\n  onClose: () => {\n    open.value = false\n  },\n  isUsingKeyboardRef,\n  dir,\n  modal,\n})\n</script>\n\n<template>\n  <PopperRoot>\n    <slot />\n  </PopperRoot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { Direction } from './utils'\nimport { createContext, useDirection } from '@/shared'\nimport { useIsUsingKeyboard } from '@/shared/useIsUsingKeyboard'\n\nexport interface MenuContext {\n  open: Ref<boolean>\n  onOpenChange: (open: boolean) => void\n  content: Ref<HTMLElement | undefined>\n  onContentChange: (content: HTMLElement | undefined) => void\n}\n\nexport interface MenuRootContext {\n  onClose: () => void\n  dir: Ref<Direction>\n  isUsingKeyboardRef: Ref<boolean>\n  modal: Ref<boolean>\n}\n\nexport interface MenuProps {\n  /** The controlled open state of the menu. Can be used as `v-model:open`. */\n  open?: boolean\n  /**\n   * The reading direction of the combobox when applicable.\n   *\n   * If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode.\n   */\n  dir?: Direction\n  /**\n   * The modality of the dropdown menu.\n   *\n   * When set to `true`, interaction with outside elements will be disabled and only menu content will be visible to screen readers.\n   */\n  modal?: boolean\n}\n\nexport type MenuEmits = {\n  'update:open': [payload: boolean]\n}\n\nexport const [injectMenuContext, provideMenuContext]\n  = createContext<MenuContext>(['MenuRoot', 'MenuSub'], 'MenuContext')\n\nexport const [injectMenuRootContext, provideMenuRootContext]\n  = createContext<MenuRootContext>('MenuRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport {\n  ref,\n  toRefs,\n} from 'vue'\nimport { PopperRoot } from '@/Popper'\n\nconst props = withDefaults(defineProps<MenuProps>(), {\n  open: false,\n  modal: true,\n})\nconst emits = defineEmits<MenuEmits>()\nconst { modal, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\n\nconst open = useVModel(props, 'open', emits)\n\nconst content = ref<HTMLElement>()\nconst isUsingKeyboardRef = useIsUsingKeyboard()\n\nprovideMenuContext({\n  open,\n  onOpenChange: (value) => {\n    open.value = value\n  },\n  content,\n  onContentChange: (element) => {\n    content.value = element\n  },\n})\n\nprovideMenuRootContext({\n  onClose: () => {\n    open.value = false\n  },\n  isUsingKeyboardRef,\n  dir,\n  modal,\n})\n</script>\n\n<template>\n  <PopperRoot>\n    <slot />\n  </PopperRoot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type {\n  GraceIntent,\n  Side,\n} from './utils'\nimport type {\n  DismissableLayerEmits,\n  DismissableLayerProps,\n} from '@/DismissableLayer'\nimport type { FocusScopeProps } from '@/FocusScope'\nimport type { PopperContentProps } from '@/Popper'\nimport type { RovingFocusGroupEmits } from '@/RovingFocus'\n\nimport {\n  createContext,\n  getActiveElement,\n  useArrowNavigation,\n  useFocusGuards,\n  useForwardExpose,\n  useTypeahead,\n} from '@/shared'\nimport { useBodyScrollLock } from '@/shared/useBodyScrollLock'\n\nexport interface MenuContentContext {\n  onItemEnter: (event: PointerEvent) => boolean\n  onItemLeave: (event: PointerEvent) => boolean\n  onTriggerLeave: (event: PointerEvent) => boolean\n  searchRef: Ref<string>\n  highlightedElement: Ref<HTMLElement | undefined>\n  onKeydownNavigation: (event: KeyboardEvent) => void\n  onKeydownEnter: (event: KeyboardEvent) => void\n  filterElement: Ref<HTMLElement | undefined>\n  onFilterElementChange: (el: HTMLElement | undefined) => void\n  activeSubmenuContext: Ref<{ onOpenChange: (open: boolean) => void, trigger: Ref<HTMLElement | undefined> } | undefined>\n  pointerGraceTimerRef: Ref<number>\n  onPointerGraceIntentChange: (intent: GraceIntent | null) => void\n}\n\nexport const [injectMenuContentContext, provideMenuContentContext]\n  = createContext<MenuContentContext>('MenuContent')\n\nexport interface MenuContentImplPrivateProps {\n  /**\n   * When `true`, hover/focus/click interactions will be disabled on elements outside\n   * the `DismissableLayer`. Users will need to click twice on outside elements to\n   * interact with them: once to close the `DismissableLayer`, and again to trigger the element.\n   */\n  disableOutsidePointerEvents?: DismissableLayerProps['disableOutsidePointerEvents']\n  /**\n   * Whether scrolling outside the `MenuContent` should be prevented\n   * @defaultValue false\n   */\n  disableOutsideScroll?: boolean\n\n  /**\n   * Whether focus should be trapped within the `MenuContent`\n   * @defaultValue also\n   */\n  trapFocus?: FocusScopeProps['trapped']\n}\n\nexport type MenuContentImplEmits = DismissableLayerEmits & Omit<RovingFocusGroupEmits, 'update:currentTabStopId'> & {\n  openAutoFocus: [event: Event]\n  /**\n   * Event handler called when auto-focusing on close.\n   * Can be prevented.\n   */\n  closeAutoFocus: [event: Event]\n}\n\ntype MenuContentImplPrivateEmits = MenuContentImplEmits & {\n  /**\n   * Handler called when the `DismissableLayer` should be dismissed\n   */\n  dismiss: []\n}\n\nexport interface MenuContentImplProps\n  extends MenuContentImplPrivateProps,\n  Omit<PopperContentProps, 'dir'> {\n  /**\n   * When `true`, keyboard navigation will loop from last item to first, and vice versa.\n   * @defaultValue false\n   */\n  loop?: boolean\n}\n\nexport interface MenuRootContentTypeProps\n  extends Omit<MenuContentImplProps, 'disableOutsidePointerEvents' | 'disableOutsideScroll' | 'trapFocus'> {}\n</script>\n\n<script setup lang=\"ts\">\nimport {\n  onUnmounted,\n  ref,\n  toRefs,\n  watch,\n} from 'vue'\nimport { DismissableLayer } from '@/DismissableLayer'\nimport { FocusScope } from '@/FocusScope'\nimport {\n  PopperContent,\n  PopperContentPropsDefaultValue,\n} from '@/Popper'\nimport { RovingFocusGroup } from '@/RovingFocus'\nimport { injectMenuContext, injectMenuRootContext } from './MenuRoot.vue'\nimport {\n  FIRST_LAST_KEYS,\n  focusFirst,\n  getOpenState,\n  isMouseEvent,\n  isPointerInGraceArea,\n  LAST_KEYS,\n} from './utils'\n\nconst props = withDefaults(defineProps<MenuContentImplProps>(), {\n  ...PopperContentPropsDefaultValue,\n})\nconst emits = defineEmits<MenuContentImplPrivateEmits>()\nconst menuContext = injectMenuContext()\nconst rootContext = injectMenuRootContext()\n\nconst { trapFocus, disableOutsidePointerEvents, loop } = toRefs(props)\n\nuseFocusGuards()\nuseBodyScrollLock(disableOutsidePointerEvents.value)\n\nconst searchRef = ref('')\nconst timerRef = ref(0)\nconst pointerGraceTimerRef = ref(0)\nconst pointerGraceIntentRef = ref<GraceIntent | null>(null)\nconst pointerDirRef = ref<Side>('right')\nconst lastPointerXRef = ref(0)\nconst currentItemId = ref<string | null>(null)\n\nconst rovingFocusGroupRef = ref<InstanceType<typeof RovingFocusGroup>>()\nconst { forwardRef, currentElement: contentElement } = useForwardExpose()\nconst { handleTypeaheadSearch } = useTypeahead()\n\nconst highlightedElement = ref<HTMLElement>()\n\nfunction onKeydownNavigation(event: KeyboardEvent) {\n  const el = useArrowNavigation(\n    event,\n    (highlightedElement.value || getActiveElement()) as HTMLElement,\n    contentElement.value,\n    {\n      loop: loop.value,\n      arrowKeyOptions: 'vertical',\n      dir: rootContext?.dir.value,\n      focus: false,\n      attributeName: '[data-reka-collection-item]:not([data-disabled])',\n    },\n  )\n  if (el) {\n    highlightedElement.value = el\n    el.scrollIntoView({ block: 'nearest' })\n  }\n}\n\nfunction onKeydownEnter() {\n  if (highlightedElement.value) {\n    highlightedElement.value.click()\n  }\n}\n\nconst filterElement = ref<HTMLElement>()\nconst activeSubmenuContext = ref<{ onOpenChange: (open: boolean) => void, trigger: Ref<HTMLElement | undefined> }>()\n\nwatch(highlightedElement, (el) => {\n  if (activeSubmenuContext.value && (el === undefined || el !== activeSubmenuContext.value.trigger.value)) {\n    activeSubmenuContext.value.onOpenChange(false)\n    activeSubmenuContext.value = undefined\n  }\n})\n\nwatch(contentElement, (el) => {\n  menuContext!.onContentChange(el)\n})\n\nonUnmounted(() => {\n  window.clearTimeout(timerRef.value)\n})\n\nfunction isPointerMovingToSubmenu(event: PointerEvent) {\n  const isMovingTowards\n    = pointerDirRef.value === pointerGraceIntentRef.value?.side\n\n  return (\n    isMovingTowards\n    && isPointerInGraceArea(event, pointerGraceIntentRef.value?.area)\n  )\n}\n\nasync function handleMountAutoFocus(event: Event) {\n  emits('openAutoFocus', event)\n  if (event.defaultPrevented)\n    return\n  // when opening, explicitly focus the content area only and leave\n  // `onEntryFocus` in  control of focusing first item\n  event.preventDefault()\n  contentElement.value?.focus({\n    preventScroll: true,\n  })\n}\n\nfunction handleKeyDown(event: KeyboardEvent) {\n  if (event.defaultPrevented)\n    return\n  // submenu key events bubble through portals. We only care about keys in this menu.\n  const target = event.target as HTMLElement\n  const isKeyDownInside\n    = target.closest('[data-reka-menu-content]') === event.currentTarget\n  const isKeyDownInTextField = ['input', 'textarea'].includes(target.tagName.toLowerCase())\n  const isModifierKey = event.ctrlKey || event.altKey || event.metaKey\n  const isCharacterKey = event.key.length === 1\n\n  const el = useArrowNavigation(\n    event,\n    getActiveElement() as HTMLElement,\n    contentElement.value,\n    {\n      loop: loop.value,\n      arrowKeyOptions: 'vertical',\n      dir: rootContext?.dir.value,\n      focus: true,\n      attributeName: '[data-reka-collection-item]:not([data-disabled])',\n    },\n  )\n  if (el)\n    return el?.focus()\n\n  // prevent \"Space\" taken account into handleTypeahead\n  if (event.code === 'Space')\n    return\n\n  const collectionItems = rovingFocusGroupRef.value?.getItems() ?? []\n\n  if (isKeyDownInside) {\n    // menus should not be navigated using tab key so we prevent it\n    if (event.key === 'Tab')\n      event.preventDefault()\n    if (!isModifierKey && isCharacterKey && !isKeyDownInTextField)\n      handleTypeaheadSearch(event.key, collectionItems)\n  }\n\n  // focus first/last item based on key pressed\n  if (event.target !== contentElement.value)\n    return\n  if (!FIRST_LAST_KEYS.includes(event.key))\n    return\n  event.preventDefault()\n  const candidateNodes = [...collectionItems.map(item => item.ref)]\n  if (LAST_KEYS.includes(event.key))\n    candidateNodes.reverse()\n  focusFirst(candidateNodes)\n}\n\nfunction handleBlur(event: FocusEvent) {\n  // clear search buffer when leaving the menu\n  // @ts-expect-error the provided currentTarget and target should be HTMLElement\n  if (!event?.currentTarget?.contains?.(event.target)) {\n    window.clearTimeout(timerRef.value)\n    searchRef.value = ''\n  }\n}\n\nfunction handlePointerMove(event: PointerEvent) {\n  if (!isMouseEvent(event))\n    return\n  const target = event.target as HTMLElement\n  const pointerXHasChanged = lastPointerXRef.value !== event.clientX\n\n  // We don't use `event.movementX` for this check because Safari will\n  // always return `0` on a pointer event.\n  if (\n    (event?.currentTarget as HTMLElement)?.contains(target)\n    && pointerXHasChanged\n  ) {\n    const newDir = event.clientX > lastPointerXRef.value ? 'right' : 'left'\n    pointerDirRef.value = newDir\n    lastPointerXRef.value = event.clientX\n  }\n}\n\nfunction handlePointerEnter(event: PointerEvent) {\n  if (!isMouseEvent(event))\n    return\n  // When hovering over a menu content (main or sub), focus its filter element if it exists\n  if (filterElement.value) {\n    filterElement.value.focus()\n  }\n}\n\nprovideMenuContentContext({\n  onItemEnter: (event) => {\n    // event.preventDefault() we can't prevent pointerMove event\n    if (isPointerMovingToSubmenu(event))\n      return true\n    else\n      return false\n  },\n  onItemLeave: (event) => {\n    if (isPointerMovingToSubmenu(event))\n      return true\n\n    const isInputFocused = ['INPUT', 'TEXTAREA'].includes(getActiveElement()?.tagName || '')\n    if (!isInputFocused)\n      contentElement.value?.focus()\n\n    currentItemId.value = null\n    return false\n  },\n  onTriggerLeave: (event) => {\n    // event.preventDefault() we can't prevent pointerLeave event\n    if (isPointerMovingToSubmenu(event))\n      return true\n    else\n      return false\n  },\n  searchRef,\n  highlightedElement,\n  onKeydownNavigation,\n  onKeydownEnter,\n  filterElement,\n  onFilterElementChange: (el) => {\n    filterElement.value = el\n  },\n  activeSubmenuContext,\n  pointerGraceTimerRef,\n  onPointerGraceIntentChange: (intent) => {\n    pointerGraceIntentRef.value = intent\n  },\n})\n</script>\n\n<template>\n  <FocusScope\n    as-child\n    :trapped=\"trapFocus\"\n    @mount-auto-focus=\"handleMountAutoFocus\"\n    @unmount-auto-focus=\"emits('closeAutoFocus', $event)\"\n  >\n    <DismissableLayer\n      as-child\n      :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n      @escape-key-down=\"emits('escapeKeyDown', $event)\"\n      @pointer-down-outside=\"emits('pointerDownOutside', $event)\"\n      @focus-outside=\"emits('focusOutside', $event)\"\n      @interact-outside=\"emits('interactOutside', $event)\"\n      @dismiss=\"emits('dismiss')\"\n    >\n      <RovingFocusGroup\n        ref=\"rovingFocusGroupRef\"\n        v-model:current-tab-stop-id=\"currentItemId\"\n        as-child\n        orientation=\"vertical\"\n        :dir=\"rootContext.dir.value\"\n        :loop=\"loop\"\n        @entry-focus=\"(event) => {\n          emits('entryFocus', event)\n          // only focus first item when using keyboard\n          if (!rootContext.isUsingKeyboardRef.value) event.preventDefault();\n        }\"\n      >\n        <PopperContent\n          :ref=\"forwardRef\"\n          role=\"menu\"\n          :as=\"as\"\n          :as-child=\"asChild\"\n          aria-orientation=\"vertical\"\n          data-reka-menu-content\n          :data-state=\"getOpenState(menuContext.open.value)\"\n          :dir=\"rootContext.dir.value\"\n          :side=\"side\"\n          :side-offset=\"sideOffset\"\n          :align=\"align\"\n          :align-offset=\"alignOffset\"\n          :avoid-collisions=\"avoidCollisions\"\n          :collision-boundary=\"collisionBoundary\"\n          :collision-padding=\"collisionPadding\"\n          :arrow-padding=\"arrowPadding\"\n          :prioritize-position=\"prioritizePosition\"\n          :position-strategy=\"positionStrategy\"\n          :update-position-strategy=\"updatePositionStrategy\"\n          :sticky=\"sticky\"\n          :hide-when-detached=\"hideWhenDetached\"\n          :reference=\"reference\"\n          @keydown=\"handleKeyDown\"\n          @blur=\"handleBlur\"\n          @pointermove=\"handlePointerMove\"\n          @pointerenter=\"handlePointerEnter\"\n        >\n          <slot />\n        </PopperContent>\n      </RovingFocusGroup>\n    </DismissableLayer>\n  </FocusScope>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type {\n  GraceIntent,\n  Side,\n} from './utils'\nimport type {\n  DismissableLayerEmits,\n  DismissableLayerProps,\n} from '@/DismissableLayer'\nimport type { FocusScopeProps } from '@/FocusScope'\nimport type { PopperContentProps } from '@/Popper'\nimport type { RovingFocusGroupEmits } from '@/RovingFocus'\n\nimport {\n  createContext,\n  getActiveElement,\n  useArrowNavigation,\n  useFocusGuards,\n  useForwardExpose,\n  useTypeahead,\n} from '@/shared'\nimport { useBodyScrollLock } from '@/shared/useBodyScrollLock'\n\nexport interface MenuContentContext {\n  onItemEnter: (event: PointerEvent) => boolean\n  onItemLeave: (event: PointerEvent) => boolean\n  onTriggerLeave: (event: PointerEvent) => boolean\n  searchRef: Ref<string>\n  highlightedElement: Ref<HTMLElement | undefined>\n  onKeydownNavigation: (event: KeyboardEvent) => void\n  onKeydownEnter: (event: KeyboardEvent) => void\n  filterElement: Ref<HTMLElement | undefined>\n  onFilterElementChange: (el: HTMLElement | undefined) => void\n  activeSubmenuContext: Ref<{ onOpenChange: (open: boolean) => void, trigger: Ref<HTMLElement | undefined> } | undefined>\n  pointerGraceTimerRef: Ref<number>\n  onPointerGraceIntentChange: (intent: GraceIntent | null) => void\n}\n\nexport const [injectMenuContentContext, provideMenuContentContext]\n  = createContext<MenuContentContext>('MenuContent')\n\nexport interface MenuContentImplPrivateProps {\n  /**\n   * When `true`, hover/focus/click interactions will be disabled on elements outside\n   * the `DismissableLayer`. Users will need to click twice on outside elements to\n   * interact with them: once to close the `DismissableLayer`, and again to trigger the element.\n   */\n  disableOutsidePointerEvents?: DismissableLayerProps['disableOutsidePointerEvents']\n  /**\n   * Whether scrolling outside the `MenuContent` should be prevented\n   * @defaultValue false\n   */\n  disableOutsideScroll?: boolean\n\n  /**\n   * Whether focus should be trapped within the `MenuContent`\n   * @defaultValue also\n   */\n  trapFocus?: FocusScopeProps['trapped']\n}\n\nexport type MenuContentImplEmits = DismissableLayerEmits & Omit<RovingFocusGroupEmits, 'update:currentTabStopId'> & {\n  openAutoFocus: [event: Event]\n  /**\n   * Event handler called when auto-focusing on close.\n   * Can be prevented.\n   */\n  closeAutoFocus: [event: Event]\n}\n\ntype MenuContentImplPrivateEmits = MenuContentImplEmits & {\n  /**\n   * Handler called when the `DismissableLayer` should be dismissed\n   */\n  dismiss: []\n}\n\nexport interface MenuContentImplProps\n  extends MenuContentImplPrivateProps,\n  Omit<PopperContentProps, 'dir'> {\n  /**\n   * When `true`, keyboard navigation will loop from last item to first, and vice versa.\n   * @defaultValue false\n   */\n  loop?: boolean\n}\n\nexport interface MenuRootContentTypeProps\n  extends Omit<MenuContentImplProps, 'disableOutsidePointerEvents' | 'disableOutsideScroll' | 'trapFocus'> {}\n</script>\n\n<script setup lang=\"ts\">\nimport {\n  onUnmounted,\n  ref,\n  toRefs,\n  watch,\n} from 'vue'\nimport { DismissableLayer } from '@/DismissableLayer'\nimport { FocusScope } from '@/FocusScope'\nimport {\n  PopperContent,\n  PopperContentPropsDefaultValue,\n} from '@/Popper'\nimport { RovingFocusGroup } from '@/RovingFocus'\nimport { injectMenuContext, injectMenuRootContext } from './MenuRoot.vue'\nimport {\n  FIRST_LAST_KEYS,\n  focusFirst,\n  getOpenState,\n  isMouseEvent,\n  isPointerInGraceArea,\n  LAST_KEYS,\n} from './utils'\n\nconst props = withDefaults(defineProps<MenuContentImplProps>(), {\n  ...PopperContentPropsDefaultValue,\n})\nconst emits = defineEmits<MenuContentImplPrivateEmits>()\nconst menuContext = injectMenuContext()\nconst rootContext = injectMenuRootContext()\n\nconst { trapFocus, disableOutsidePointerEvents, loop } = toRefs(props)\n\nuseFocusGuards()\nuseBodyScrollLock(disableOutsidePointerEvents.value)\n\nconst searchRef = ref('')\nconst timerRef = ref(0)\nconst pointerGraceTimerRef = ref(0)\nconst pointerGraceIntentRef = ref<GraceIntent | null>(null)\nconst pointerDirRef = ref<Side>('right')\nconst lastPointerXRef = ref(0)\nconst currentItemId = ref<string | null>(null)\n\nconst rovingFocusGroupRef = ref<InstanceType<typeof RovingFocusGroup>>()\nconst { forwardRef, currentElement: contentElement } = useForwardExpose()\nconst { handleTypeaheadSearch } = useTypeahead()\n\nconst highlightedElement = ref<HTMLElement>()\n\nfunction onKeydownNavigation(event: KeyboardEvent) {\n  const el = useArrowNavigation(\n    event,\n    (highlightedElement.value || getActiveElement()) as HTMLElement,\n    contentElement.value,\n    {\n      loop: loop.value,\n      arrowKeyOptions: 'vertical',\n      dir: rootContext?.dir.value,\n      focus: false,\n      attributeName: '[data-reka-collection-item]:not([data-disabled])',\n    },\n  )\n  if (el) {\n    highlightedElement.value = el\n    el.scrollIntoView({ block: 'nearest' })\n  }\n}\n\nfunction onKeydownEnter() {\n  if (highlightedElement.value) {\n    highlightedElement.value.click()\n  }\n}\n\nconst filterElement = ref<HTMLElement>()\nconst activeSubmenuContext = ref<{ onOpenChange: (open: boolean) => void, trigger: Ref<HTMLElement | undefined> }>()\n\nwatch(highlightedElement, (el) => {\n  if (activeSubmenuContext.value && (el === undefined || el !== activeSubmenuContext.value.trigger.value)) {\n    activeSubmenuContext.value.onOpenChange(false)\n    activeSubmenuContext.value = undefined\n  }\n})\n\nwatch(contentElement, (el) => {\n  menuContext!.onContentChange(el)\n})\n\nonUnmounted(() => {\n  window.clearTimeout(timerRef.value)\n})\n\nfunction isPointerMovingToSubmenu(event: PointerEvent) {\n  const isMovingTowards\n    = pointerDirRef.value === pointerGraceIntentRef.value?.side\n\n  return (\n    isMovingTowards\n    && isPointerInGraceArea(event, pointerGraceIntentRef.value?.area)\n  )\n}\n\nasync function handleMountAutoFocus(event: Event) {\n  emits('openAutoFocus', event)\n  if (event.defaultPrevented)\n    return\n  // when opening, explicitly focus the content area only and leave\n  // `onEntryFocus` in  control of focusing first item\n  event.preventDefault()\n  contentElement.value?.focus({\n    preventScroll: true,\n  })\n}\n\nfunction handleKeyDown(event: KeyboardEvent) {\n  if (event.defaultPrevented)\n    return\n  // submenu key events bubble through portals. We only care about keys in this menu.\n  const target = event.target as HTMLElement\n  const isKeyDownInside\n    = target.closest('[data-reka-menu-content]') === event.currentTarget\n  const isKeyDownInTextField = ['input', 'textarea'].includes(target.tagName.toLowerCase())\n  const isModifierKey = event.ctrlKey || event.altKey || event.metaKey\n  const isCharacterKey = event.key.length === 1\n\n  const el = useArrowNavigation(\n    event,\n    getActiveElement() as HTMLElement,\n    contentElement.value,\n    {\n      loop: loop.value,\n      arrowKeyOptions: 'vertical',\n      dir: rootContext?.dir.value,\n      focus: true,\n      attributeName: '[data-reka-collection-item]:not([data-disabled])',\n    },\n  )\n  if (el)\n    return el?.focus()\n\n  // prevent \"Space\" taken account into handleTypeahead\n  if (event.code === 'Space')\n    return\n\n  const collectionItems = rovingFocusGroupRef.value?.getItems() ?? []\n\n  if (isKeyDownInside) {\n    // menus should not be navigated using tab key so we prevent it\n    if (event.key === 'Tab')\n      event.preventDefault()\n    if (!isModifierKey && isCharacterKey && !isKeyDownInTextField)\n      handleTypeaheadSearch(event.key, collectionItems)\n  }\n\n  // focus first/last item based on key pressed\n  if (event.target !== contentElement.value)\n    return\n  if (!FIRST_LAST_KEYS.includes(event.key))\n    return\n  event.preventDefault()\n  const candidateNodes = [...collectionItems.map(item => item.ref)]\n  if (LAST_KEYS.includes(event.key))\n    candidateNodes.reverse()\n  focusFirst(candidateNodes)\n}\n\nfunction handleBlur(event: FocusEvent) {\n  // clear search buffer when leaving the menu\n  // @ts-expect-error the provided currentTarget and target should be HTMLElement\n  if (!event?.currentTarget?.contains?.(event.target)) {\n    window.clearTimeout(timerRef.value)\n    searchRef.value = ''\n  }\n}\n\nfunction handlePointerMove(event: PointerEvent) {\n  if (!isMouseEvent(event))\n    return\n  const target = event.target as HTMLElement\n  const pointerXHasChanged = lastPointerXRef.value !== event.clientX\n\n  // We don't use `event.movementX` for this check because Safari will\n  // always return `0` on a pointer event.\n  if (\n    (event?.currentTarget as HTMLElement)?.contains(target)\n    && pointerXHasChanged\n  ) {\n    const newDir = event.clientX > lastPointerXRef.value ? 'right' : 'left'\n    pointerDirRef.value = newDir\n    lastPointerXRef.value = event.clientX\n  }\n}\n\nfunction handlePointerEnter(event: PointerEvent) {\n  if (!isMouseEvent(event))\n    return\n  // When hovering over a menu content (main or sub), focus its filter element if it exists\n  if (filterElement.value) {\n    filterElement.value.focus()\n  }\n}\n\nprovideMenuContentContext({\n  onItemEnter: (event) => {\n    // event.preventDefault() we can't prevent pointerMove event\n    if (isPointerMovingToSubmenu(event))\n      return true\n    else\n      return false\n  },\n  onItemLeave: (event) => {\n    if (isPointerMovingToSubmenu(event))\n      return true\n\n    const isInputFocused = ['INPUT', 'TEXTAREA'].includes(getActiveElement()?.tagName || '')\n    if (!isInputFocused)\n      contentElement.value?.focus()\n\n    currentItemId.value = null\n    return false\n  },\n  onTriggerLeave: (event) => {\n    // event.preventDefault() we can't prevent pointerLeave event\n    if (isPointerMovingToSubmenu(event))\n      return true\n    else\n      return false\n  },\n  searchRef,\n  highlightedElement,\n  onKeydownNavigation,\n  onKeydownEnter,\n  filterElement,\n  onFilterElementChange: (el) => {\n    filterElement.value = el\n  },\n  activeSubmenuContext,\n  pointerGraceTimerRef,\n  onPointerGraceIntentChange: (intent) => {\n    pointerGraceIntentRef.value = intent\n  },\n})\n</script>\n\n<template>\n  <FocusScope\n    as-child\n    :trapped=\"trapFocus\"\n    @mount-auto-focus=\"handleMountAutoFocus\"\n    @unmount-auto-focus=\"emits('closeAutoFocus', $event)\"\n  >\n    <DismissableLayer\n      as-child\n      :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n      @escape-key-down=\"emits('escapeKeyDown', $event)\"\n      @pointer-down-outside=\"emits('pointerDownOutside', $event)\"\n      @focus-outside=\"emits('focusOutside', $event)\"\n      @interact-outside=\"emits('interactOutside', $event)\"\n      @dismiss=\"emits('dismiss')\"\n    >\n      <RovingFocusGroup\n        ref=\"rovingFocusGroupRef\"\n        v-model:current-tab-stop-id=\"currentItemId\"\n        as-child\n        orientation=\"vertical\"\n        :dir=\"rootContext.dir.value\"\n        :loop=\"loop\"\n        @entry-focus=\"(event) => {\n          emits('entryFocus', event)\n          // only focus first item when using keyboard\n          if (!rootContext.isUsingKeyboardRef.value) event.preventDefault();\n        }\"\n      >\n        <PopperContent\n          :ref=\"forwardRef\"\n          role=\"menu\"\n          :as=\"as\"\n          :as-child=\"asChild\"\n          aria-orientation=\"vertical\"\n          data-reka-menu-content\n          :data-state=\"getOpenState(menuContext.open.value)\"\n          :dir=\"rootContext.dir.value\"\n          :side=\"side\"\n          :side-offset=\"sideOffset\"\n          :align=\"align\"\n          :align-offset=\"alignOffset\"\n          :avoid-collisions=\"avoidCollisions\"\n          :collision-boundary=\"collisionBoundary\"\n          :collision-padding=\"collisionPadding\"\n          :arrow-padding=\"arrowPadding\"\n          :prioritize-position=\"prioritizePosition\"\n          :position-strategy=\"positionStrategy\"\n          :update-position-strategy=\"updatePositionStrategy\"\n          :sticky=\"sticky\"\n          :hide-when-detached=\"hideWhenDetached\"\n          :reference=\"reference\"\n          @keydown=\"handleKeyDown\"\n          @blur=\"handleBlur\"\n          @pointermove=\"handlePointerMove\"\n          @pointerenter=\"handlePointerEnter\"\n        >\n          <slot />\n        </PopperContent>\n      </RovingFocusGroup>\n    </DismissableLayer>\n  </FocusScope>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MenuItemImplProps extends PrimitiveProps {\n  /** When `true`, prevents the user from interacting with the item. */\n  disabled?: boolean\n  /**\n   * Optional text used for typeahead purposes. By default the typeahead behavior will use the `.textContent` of the item. <br>\n   *  Use this when the content is complex, or you have non-textual content inside.\n   */\n  textValue?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref } from 'vue'\nimport { useCollection } from '@/Collection'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { getActiveElement, useForwardExpose } from '@/shared'\nimport { injectMenuContentContext } from './MenuContentImpl.vue'\nimport { isMouseEvent } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<MenuItemImplProps>()\n\nconst contentContext = injectMenuContentContext()\nconst { forwardRef, currentElement } = useForwardExpose()\nconst { CollectionItem } = useCollection()\n\nconst isFocused = ref(false)\nconst isHighlighted = computed(() => isFocused.value || (currentElement.value != null && contentContext.highlightedElement.value === currentElement.value))\n\nasync function handlePointerMove(event: PointerEvent) {\n  if (event.defaultPrevented || !isMouseEvent(event))\n    return\n  if (props.disabled) {\n    contentContext.onItemLeave(event)\n  }\n  else {\n    const defaultPrevented = contentContext.onItemEnter(event)\n    if (!defaultPrevented) {\n      const item = event.currentTarget as HTMLElement\n      contentContext.highlightedElement.value = item\n      const isInputFocused = ['INPUT', 'TEXTAREA'].includes(getActiveElement()?.tagName || '')\n      if (!isInputFocused)\n        item.focus({ preventScroll: true })\n    }\n  }\n}\n\nasync function handlePointerLeave(event: PointerEvent) {\n  await nextTick()\n  if (event.defaultPrevented)\n    return\n  if (!isMouseEvent(event))\n    return\n\n  // If the highlight was already claimed by another element (e.g. the pointer moved\n  // directly onto another item, whose synchronous `pointermove` ran before this\n  // `nextTick` resolved), this leave is stale and must not reset focus/roving state.\n  if (contentContext.highlightedElement.value !== currentElement.value)\n    return\n\n  const isMovingToSubmenu = contentContext.onItemLeave(event)\n  if (!isMovingToSubmenu && contentContext.highlightedElement.value === currentElement.value)\n    contentContext.highlightedElement.value = undefined\n}\n</script>\n\n<template>\n  <CollectionItem :value=\"{ textValue }\">\n    <Primitive\n      :ref=\"forwardRef\"\n      role=\"menuitem\"\n      tabindex=\"-1\"\n      v-bind=\"$attrs\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :aria-disabled=\"disabled || undefined\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :data-highlighted=\"isHighlighted ? '' : undefined\"\n      @pointermove=\"handlePointerMove\"\n      @pointerleave=\"handlePointerLeave\"\n      @focus=\"\n        async (event: FocusEvent) => {\n          await nextTick();\n          if (event.defaultPrevented || disabled) return;\n          isFocused = true;\n          contentContext.highlightedElement.value = event.currentTarget as HTMLElement\n        }\n      \"\n      @blur=\"\n        async (event: FocusEvent) => {\n          await nextTick();\n          if (event.defaultPrevented) return;\n          isFocused = false;\n        }\n      \"\n    >\n      <slot />\n    </Primitive>\n  </CollectionItem>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MenuItemImplProps extends PrimitiveProps {\n  /** When `true`, prevents the user from interacting with the item. */\n  disabled?: boolean\n  /**\n   * Optional text used for typeahead purposes. By default the typeahead behavior will use the `.textContent` of the item. <br>\n   *  Use this when the content is complex, or you have non-textual content inside.\n   */\n  textValue?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref } from 'vue'\nimport { useCollection } from '@/Collection'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { getActiveElement, useForwardExpose } from '@/shared'\nimport { injectMenuContentContext } from './MenuContentImpl.vue'\nimport { isMouseEvent } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<MenuItemImplProps>()\n\nconst contentContext = injectMenuContentContext()\nconst { forwardRef, currentElement } = useForwardExpose()\nconst { CollectionItem } = useCollection()\n\nconst isFocused = ref(false)\nconst isHighlighted = computed(() => isFocused.value || (currentElement.value != null && contentContext.highlightedElement.value === currentElement.value))\n\nasync function handlePointerMove(event: PointerEvent) {\n  if (event.defaultPrevented || !isMouseEvent(event))\n    return\n  if (props.disabled) {\n    contentContext.onItemLeave(event)\n  }\n  else {\n    const defaultPrevented = contentContext.onItemEnter(event)\n    if (!defaultPrevented) {\n      const item = event.currentTarget as HTMLElement\n      contentContext.highlightedElement.value = item\n      const isInputFocused = ['INPUT', 'TEXTAREA'].includes(getActiveElement()?.tagName || '')\n      if (!isInputFocused)\n        item.focus({ preventScroll: true })\n    }\n  }\n}\n\nasync function handlePointerLeave(event: PointerEvent) {\n  await nextTick()\n  if (event.defaultPrevented)\n    return\n  if (!isMouseEvent(event))\n    return\n\n  // If the highlight was already claimed by another element (e.g. the pointer moved\n  // directly onto another item, whose synchronous `pointermove` ran before this\n  // `nextTick` resolved), this leave is stale and must not reset focus/roving state.\n  if (contentContext.highlightedElement.value !== currentElement.value)\n    return\n\n  const isMovingToSubmenu = contentContext.onItemLeave(event)\n  if (!isMovingToSubmenu && contentContext.highlightedElement.value === currentElement.value)\n    contentContext.highlightedElement.value = undefined\n}\n</script>\n\n<template>\n  <CollectionItem :value=\"{ textValue }\">\n    <Primitive\n      :ref=\"forwardRef\"\n      role=\"menuitem\"\n      tabindex=\"-1\"\n      v-bind=\"$attrs\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :aria-disabled=\"disabled || undefined\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :data-highlighted=\"isHighlighted ? '' : undefined\"\n      @pointermove=\"handlePointerMove\"\n      @pointerleave=\"handlePointerLeave\"\n      @focus=\"\n        async (event: FocusEvent) => {\n          await nextTick();\n          if (event.defaultPrevented || disabled) return;\n          isFocused = true;\n          contentContext.highlightedElement.value = event.currentTarget as HTMLElement\n        }\n      \"\n      @blur=\"\n        async (event: FocusEvent) => {\n          await nextTick();\n          if (event.defaultPrevented) return;\n          isFocused = false;\n        }\n      \"\n    >\n      <slot />\n    </Primitive>\n  </CollectionItem>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemImplProps } from './MenuItemImpl.vue'\nimport { useForwardExpose } from '@/shared'\n\nexport type MenuItemEmits = {\n  /**\n   * Event handler called when the user selects an item (via mouse or keyboard). <br>\n   *  Calling `event.preventDefault` in this handler will prevent the menu from closing when selecting that item.\n   */\n  select: [event: Event]\n}\n\nexport interface MenuItemProps extends MenuItemImplProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { nextTick, ref } from 'vue'\nimport { injectMenuContentContext } from './MenuContentImpl.vue'\nimport MenuItemImpl from './MenuItemImpl.vue'\nimport { injectMenuRootContext } from './MenuRoot.vue'\nimport { ITEM_SELECT, SELECTION_KEYS } from './utils'\n\nconst props = defineProps<MenuItemProps>()\nconst emits = defineEmits<MenuItemEmits>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst rootContext = injectMenuRootContext()\nconst contentContext = injectMenuContentContext()\n\nconst isPointerDownRef = ref(false)\n\nasync function handleSelect() {\n  const menuItem = currentElement.value\n  if (!props.disabled && menuItem) {\n    const itemSelectEvent = new CustomEvent(ITEM_SELECT, {\n      bubbles: true,\n      cancelable: true,\n    })\n    emits('select', itemSelectEvent)\n    // let select event finish\n    await nextTick()\n    if (itemSelectEvent.defaultPrevented)\n      isPointerDownRef.value = false\n    else rootContext.onClose()\n  }\n}\n</script>\n\n<template>\n  <MenuItemImpl\n    v-bind=\"props\"\n    :ref=\"forwardRef\"\n    @click=\"handleSelect\"\n    @pointerdown=\"\n      () => {\n        isPointerDownRef = true;\n      }\n    \"\n    @pointerup=\"\n      async (event: PointerEvent) => {\n        await nextTick();\n        if (event.defaultPrevented) return;\n        // Pointer down can move to a different menu item which should activate it on pointer up.\n        // We dispatch a click for selection to allow composition with click based triggers and to\n        // prevent Firefox from getting stuck in text selection mode when the menu closes.\n        if (!isPointerDownRef) (event.currentTarget as HTMLElement)?.click();\n      }\n    \"\n    @keydown=\"\n      async (event: KeyboardEvent) => {\n        const isTypingAhead = contentContext.searchRef.value !== '';\n        if (disabled || (isTypingAhead && event.key === ' ')) return;\n        if (SELECTION_KEYS.includes(event.key)) {\n          (event.currentTarget as HTMLElement)?.click();\n          /**\n           * We prevent default browser behaviour for selection keys as they should trigger\n           * a selection only:\n           * - prevents space from scrolling the page.\n           * - if keydown causes focus to move, prevents keydown from firing on the new target.\n           */\n          event.preventDefault();\n        }\n      }\n    \"\n  >\n    <slot />\n  </MenuItemImpl>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemImplProps } from './MenuItemImpl.vue'\nimport { useForwardExpose } from '@/shared'\n\nexport type MenuItemEmits = {\n  /**\n   * Event handler called when the user selects an item (via mouse or keyboard). <br>\n   *  Calling `event.preventDefault` in this handler will prevent the menu from closing when selecting that item.\n   */\n  select: [event: Event]\n}\n\nexport interface MenuItemProps extends MenuItemImplProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { nextTick, ref } from 'vue'\nimport { injectMenuContentContext } from './MenuContentImpl.vue'\nimport MenuItemImpl from './MenuItemImpl.vue'\nimport { injectMenuRootContext } from './MenuRoot.vue'\nimport { ITEM_SELECT, SELECTION_KEYS } from './utils'\n\nconst props = defineProps<MenuItemProps>()\nconst emits = defineEmits<MenuItemEmits>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst rootContext = injectMenuRootContext()\nconst contentContext = injectMenuContentContext()\n\nconst isPointerDownRef = ref(false)\n\nasync function handleSelect() {\n  const menuItem = currentElement.value\n  if (!props.disabled && menuItem) {\n    const itemSelectEvent = new CustomEvent(ITEM_SELECT, {\n      bubbles: true,\n      cancelable: true,\n    })\n    emits('select', itemSelectEvent)\n    // let select event finish\n    await nextTick()\n    if (itemSelectEvent.defaultPrevented)\n      isPointerDownRef.value = false\n    else rootContext.onClose()\n  }\n}\n</script>\n\n<template>\n  <MenuItemImpl\n    v-bind=\"props\"\n    :ref=\"forwardRef\"\n    @click=\"handleSelect\"\n    @pointerdown=\"\n      () => {\n        isPointerDownRef = true;\n      }\n    \"\n    @pointerup=\"\n      async (event: PointerEvent) => {\n        await nextTick();\n        if (event.defaultPrevented) return;\n        // Pointer down can move to a different menu item which should activate it on pointer up.\n        // We dispatch a click for selection to allow composition with click based triggers and to\n        // prevent Firefox from getting stuck in text selection mode when the menu closes.\n        if (!isPointerDownRef) (event.currentTarget as HTMLElement)?.click();\n      }\n    \"\n    @keydown=\"\n      async (event: KeyboardEvent) => {\n        const isTypingAhead = contentContext.searchRef.value !== '';\n        if (disabled || (isTypingAhead && event.key === ' ')) return;\n        if (SELECTION_KEYS.includes(event.key)) {\n          (event.currentTarget as HTMLElement)?.click();\n          /**\n           * We prevent default browser behaviour for selection keys as they should trigger\n           * a selection only:\n           * - prevents space from scrolling the page.\n           * - if keydown causes focus to move, prevents keydown from firing on the new target.\n           */\n          event.preventDefault();\n        }\n      }\n    \"\n  >\n    <slot />\n  </MenuItemImpl>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { CheckedState } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext } from '@/shared'\n\ninterface MenuItemIndicatorContext {\n  modelValue: Ref<CheckedState>\n}\n\nexport interface MenuItemIndicatorProps extends PrimitiveProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n\nexport const [injectMenuItemIndicatorContext, provideMenuItemIndicatorContext]\n  = createContext<MenuItemIndicatorContext>(\n    ['MenuCheckboxItem', 'MenuRadioItem'],\n    'MenuItemIndicatorContext',\n  )\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { Presence } from '@/Presence'\nimport { Primitive } from '@/Primitive'\nimport { getCheckedState, isIndeterminate } from './utils'\n\nwithDefaults(defineProps<MenuItemIndicatorProps>(), {\n  as: 'span',\n})\n\nconst indicatorContext = injectMenuItemIndicatorContext({\n  modelValue: ref(false),\n})\n</script>\n\n<template>\n  <Presence\n    :present=\"\n      forceMount\n        || isIndeterminate(indicatorContext.modelValue.value)\n        || indicatorContext.modelValue.value === true\n    \"\n  >\n    <Primitive\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :data-state=\"getCheckedState(indicatorContext.modelValue.value)\"\n    >\n      <slot />\n    </Primitive>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { CheckedState } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext } from '@/shared'\n\ninterface MenuItemIndicatorContext {\n  modelValue: Ref<CheckedState>\n}\n\nexport interface MenuItemIndicatorProps extends PrimitiveProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n\nexport const [injectMenuItemIndicatorContext, provideMenuItemIndicatorContext]\n  = createContext<MenuItemIndicatorContext>(\n    ['MenuCheckboxItem', 'MenuRadioItem'],\n    'MenuItemIndicatorContext',\n  )\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { Presence } from '@/Presence'\nimport { Primitive } from '@/Primitive'\nimport { getCheckedState, isIndeterminate } from './utils'\n\nwithDefaults(defineProps<MenuItemIndicatorProps>(), {\n  as: 'span',\n})\n\nconst indicatorContext = injectMenuItemIndicatorContext({\n  modelValue: ref(false),\n})\n</script>\n\n<template>\n  <Presence\n    :present=\"\n      forceMount\n        || isIndeterminate(indicatorContext.modelValue.value)\n        || indicatorContext.modelValue.value === true\n    \"\n  >\n    <Primitive\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :data-state=\"getCheckedState(indicatorContext.modelValue.value)\"\n    >\n      <slot />\n    </Primitive>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuItemEmits,\n  MenuItemProps,\n} from './MenuItem.vue'\nimport type { CheckedState } from './utils'\nimport { useForwardProps } from '@/shared'\n\nexport type MenuCheckboxItemEmits = MenuItemEmits & {\n  /** Event handler called when the checked state changes. */\n  'update:modelValue': [payload: boolean]\n}\n\nexport interface MenuCheckboxItemProps extends MenuItemProps {\n  /** The controlled checked state of the item. Can be used as `v-model`. */\n  modelValue?: CheckedState\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { reactiveOmit, useVModel } from '@vueuse/core'\nimport MenuItem from './MenuItem.vue'\nimport { provideMenuItemIndicatorContext } from './MenuItemIndicator.vue'\nimport { getCheckedState, isIndeterminate } from './utils'\n\nconst props = withDefaults(defineProps<MenuCheckboxItemProps>(), {\n  modelValue: false,\n})\nconst emits = defineEmits<MenuCheckboxItemEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current modelValue state */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst delegatedProps = reactiveOmit(props, ['modelValue'])\nconst forwarded = useForwardProps(delegatedProps)\n\nconst modelValue = useVModel(props, 'modelValue', emits)\n\nprovideMenuItemIndicatorContext({ modelValue })\n</script>\n\n<template>\n  <MenuItem\n    role=\"menuitemcheckbox\"\n    v-bind=\"forwarded\"\n    :aria-checked=\"isIndeterminate(modelValue) ? 'mixed' : modelValue\"\n    :data-state=\"getCheckedState(modelValue)\"\n    @select=\"\n      async (event) => {\n        emits('select', event);\n        if (isIndeterminate(modelValue)) {\n          modelValue = true;\n        }\n        else {\n          modelValue = !modelValue;\n        }\n      }\n    \"\n  >\n    <slot :model-value=\"modelValue\" />\n  </MenuItem>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuItemEmits,\n  MenuItemProps,\n} from './MenuItem.vue'\nimport type { CheckedState } from './utils'\nimport { useForwardProps } from '@/shared'\n\nexport type MenuCheckboxItemEmits = MenuItemEmits & {\n  /** Event handler called when the checked state changes. */\n  'update:modelValue': [payload: boolean]\n}\n\nexport interface MenuCheckboxItemProps extends MenuItemProps {\n  /** The controlled checked state of the item. Can be used as `v-model`. */\n  modelValue?: CheckedState\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { reactiveOmit, useVModel } from '@vueuse/core'\nimport MenuItem from './MenuItem.vue'\nimport { provideMenuItemIndicatorContext } from './MenuItemIndicator.vue'\nimport { getCheckedState, isIndeterminate } from './utils'\n\nconst props = withDefaults(defineProps<MenuCheckboxItemProps>(), {\n  modelValue: false,\n})\nconst emits = defineEmits<MenuCheckboxItemEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current modelValue state */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst delegatedProps = reactiveOmit(props, ['modelValue'])\nconst forwarded = useForwardProps(delegatedProps)\n\nconst modelValue = useVModel(props, 'modelValue', emits)\n\nprovideMenuItemIndicatorContext({ modelValue })\n</script>\n\n<template>\n  <MenuItem\n    role=\"menuitemcheckbox\"\n    v-bind=\"forwarded\"\n    :aria-checked=\"isIndeterminate(modelValue) ? 'mixed' : modelValue\"\n    :data-state=\"getCheckedState(modelValue)\"\n    @select=\"\n      async (event) => {\n        emits('select', event);\n        if (isIndeterminate(modelValue)) {\n          modelValue = true;\n        }\n        else {\n          modelValue = !modelValue;\n        }\n      }\n    \"\n  >\n    <slot :model-value=\"modelValue\" />\n  </MenuItem>\n</template>\n","<script setup lang=\"ts\">\nimport type { MenuContentImplEmits, MenuRootContentTypeProps } from './MenuContentImpl.vue'\nimport { useForwardExpose, useForwardPropsEmits, useHideOthers } from '@/shared'\nimport MenuContentImpl from './MenuContentImpl.vue'\nimport { injectMenuContext } from './MenuRoot.vue'\n\nconst props = defineProps<MenuRootContentModalProps>()\nconst emits = defineEmits<MenuRootContentModalEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\n\nconst menuContext = injectMenuContext()\n\ninterface MenuRootContentModalProps extends MenuRootContentTypeProps {}\ntype MenuRootContentModalEmits = MenuContentImplEmits\n\nconst { forwardRef, currentElement } = useForwardExpose()\nuseHideOthers(currentElement)\n</script>\n\n<template>\n  <MenuContentImpl\n    v-bind=\"forwarded\"\n    :ref=\"forwardRef\"\n    :trap-focus=\"menuContext.open.value\"\n    :disable-outside-pointer-events=\"menuContext.open.value\"\n    :disable-outside-scroll=\"true\"\n    @dismiss=\"menuContext.onOpenChange(false)\"\n    @focus-outside.prevent=\"emits('focusOutside', $event)\"\n  >\n    <slot />\n  </MenuContentImpl>\n</template>\n","<script setup lang=\"ts\">\nimport type { MenuContentImplEmits, MenuRootContentTypeProps } from './MenuContentImpl.vue'\nimport { useForwardExpose, useForwardPropsEmits, useHideOthers } from '@/shared'\nimport MenuContentImpl from './MenuContentImpl.vue'\nimport { injectMenuContext } from './MenuRoot.vue'\n\nconst props = defineProps<MenuRootContentModalProps>()\nconst emits = defineEmits<MenuRootContentModalEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\n\nconst menuContext = injectMenuContext()\n\ninterface MenuRootContentModalProps extends MenuRootContentTypeProps {}\ntype MenuRootContentModalEmits = MenuContentImplEmits\n\nconst { forwardRef, currentElement } = useForwardExpose()\nuseHideOthers(currentElement)\n</script>\n\n<template>\n  <MenuContentImpl\n    v-bind=\"forwarded\"\n    :ref=\"forwardRef\"\n    :trap-focus=\"menuContext.open.value\"\n    :disable-outside-pointer-events=\"menuContext.open.value\"\n    :disable-outside-scroll=\"true\"\n    @dismiss=\"menuContext.onOpenChange(false)\"\n    @focus-outside.prevent=\"emits('focusOutside', $event)\"\n  >\n    <slot />\n  </MenuContentImpl>\n</template>\n","<script setup lang=\"ts\">\nimport type { MenuContentImplEmits, MenuRootContentTypeProps } from './MenuContentImpl.vue'\nimport { useForwardPropsEmits } from '@/shared'\nimport MenuContentImpl from './MenuContentImpl.vue'\nimport { injectMenuContext } from './MenuRoot.vue'\n\nconst props = defineProps<MenuRootContentNonModalProps>()\nconst emits = defineEmits<MenuRootContentModalEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\n\nconst menuContext = injectMenuContext()\n\ninterface MenuRootContentNonModalProps extends MenuRootContentTypeProps {}\ntype MenuRootContentModalEmits = MenuContentImplEmits\n</script>\n\n<template>\n  <MenuContentImpl\n    v-bind=\"forwarded\"\n    :trap-focus=\"false\"\n    :disable-outside-pointer-events=\"false\"\n    :disable-outside-scroll=\"false\"\n    @dismiss=\"menuContext.onOpenChange(false)\"\n  >\n    <slot />\n  </MenuContentImpl>\n</template>\n","<script setup lang=\"ts\">\nimport type { MenuContentImplEmits, MenuRootContentTypeProps } from './MenuContentImpl.vue'\nimport { useForwardPropsEmits } from '@/shared'\nimport MenuContentImpl from './MenuContentImpl.vue'\nimport { injectMenuContext } from './MenuRoot.vue'\n\nconst props = defineProps<MenuRootContentNonModalProps>()\nconst emits = defineEmits<MenuRootContentModalEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\n\nconst menuContext = injectMenuContext()\n\ninterface MenuRootContentNonModalProps extends MenuRootContentTypeProps {}\ntype MenuRootContentModalEmits = MenuContentImplEmits\n</script>\n\n<template>\n  <MenuContentImpl\n    v-bind=\"forwarded\"\n    :trap-focus=\"false\"\n    :disable-outside-pointer-events=\"false\"\n    :disable-outside-scroll=\"false\"\n    @dismiss=\"menuContext.onOpenChange(false)\"\n  >\n    <slot />\n  </MenuContentImpl>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuContentImplEmits,\n  MenuRootContentTypeProps,\n} from './MenuContentImpl.vue'\n\nexport type MenuContentEmits = Omit<MenuContentImplEmits, 'entryFocus' | 'openAutoFocus'>\n\nexport interface MenuContentProps extends MenuRootContentTypeProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { useForwardPropsEmits } from '@/shared'\nimport { injectMenuContext, injectMenuRootContext } from './MenuRoot.vue'\nimport MenuRootContentModal from './MenuRootContentModal.vue'\nimport MenuRootContentNonModal from './MenuRootContentNonModal.vue'\n\nconst props = defineProps<MenuContentProps>()\nconst emits = defineEmits<MenuContentImplEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\n\nconst menuContext = injectMenuContext()\nconst rootContext = injectMenuRootContext()\n</script>\n\n<template>\n  <Presence :present=\"forceMount || menuContext.open.value\">\n    <MenuRootContentModal\n      v-if=\"rootContext.modal.value\"\n      v-bind=\"{ ...$attrs, ...forwarded }\"\n    >\n      <slot />\n    </MenuRootContentModal>\n    <MenuRootContentNonModal\n      v-else\n      v-bind=\"{ ...$attrs, ...forwarded }\"\n    >\n      <slot />\n    </MenuRootContentNonModal>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuContentImplEmits,\n  MenuRootContentTypeProps,\n} from './MenuContentImpl.vue'\n\nexport type MenuContentEmits = Omit<MenuContentImplEmits, 'entryFocus' | 'openAutoFocus'>\n\nexport interface MenuContentProps extends MenuRootContentTypeProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { useForwardPropsEmits } from '@/shared'\nimport { injectMenuContext, injectMenuRootContext } from './MenuRoot.vue'\nimport MenuRootContentModal from './MenuRootContentModal.vue'\nimport MenuRootContentNonModal from './MenuRootContentNonModal.vue'\n\nconst props = defineProps<MenuContentProps>()\nconst emits = defineEmits<MenuContentImplEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\n\nconst menuContext = injectMenuContext()\nconst rootContext = injectMenuRootContext()\n</script>\n\n<template>\n  <Presence :present=\"forceMount || menuContext.open.value\">\n    <MenuRootContentModal\n      v-if=\"rootContext.modal.value\"\n      v-bind=\"{ ...$attrs, ...forwarded }\"\n    >\n      <slot />\n    </MenuRootContentModal>\n    <MenuRootContentNonModal\n      v-else\n      v-bind=\"{ ...$attrs, ...forwarded }\"\n    >\n      <slot />\n    </MenuRootContentNonModal>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useId } from '@/shared'\n\nexport interface MenuGroupProps extends PrimitiveProps {}\n\ninterface MenuGroupContext {\n  id: string\n}\n\nexport const [injectMenuGroupContext, provideMenuGroupContext]\n  = createContext<MenuGroupContext>('MenuGroup')\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<MenuGroupProps>()\n\nconst id = useId(undefined, 'reka-menu-group')\nprovideMenuGroupContext({ id })\n</script>\n\n<template>\n  <Primitive\n    role=\"group\"\n    v-bind=\"props\"\n    :aria-labelledby=\"id\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useId } from '@/shared'\n\nexport interface MenuGroupProps extends PrimitiveProps {}\n\ninterface MenuGroupContext {\n  id: string\n}\n\nexport const [injectMenuGroupContext, provideMenuGroupContext]\n  = createContext<MenuGroupContext>('MenuGroup')\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<MenuGroupProps>()\n\nconst id = useId(undefined, 'reka-menu-group')\nprovideMenuGroupContext({ id })\n</script>\n\n<template>\n  <Primitive\n    role=\"group\"\n    v-bind=\"props\"\n    :aria-labelledby=\"id\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { injectMenuGroupContext } from './MenuGroup.vue'\n\nexport interface MenuLabelProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MenuLabelProps>(), {\n  as: 'div',\n})\n\nconst groupContext = injectMenuGroupContext({ id: '' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"groupContext.id || undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { injectMenuGroupContext } from './MenuGroup.vue'\n\nexport interface MenuLabelProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MenuLabelProps>(), {\n  as: 'div',\n})\n\nconst groupContext = injectMenuGroupContext({ id: '' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"groupContext.id || undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface MenuPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<MenuPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface MenuPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<MenuPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { MenuGroupProps } from './MenuGroup.vue'\nimport type { AcceptableValue } from '@/shared/types'\nimport { createContext, useForwardProps } from '@/shared'\n\ninterface MenuRadioGroupContext {\n  modelValue: Ref<AcceptableValue>\n  onValueChange: (payload: AcceptableValue) => void\n}\n\nexport interface MenuRadioGroupProps extends MenuGroupProps {\n  /** The value of the selected item in the group. */\n  modelValue?: AcceptableValue\n}\n\nexport type MenuRadioGroupEmits = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [payload: AcceptableValue]\n}\n\nexport const [injectMenuRadioGroupContext, provideMenuRadioGroupContext]\n  = createContext<MenuRadioGroupContext>('MenuRadioGroup')\n</script>\n\n<script setup lang=\"ts\">\nimport { reactiveOmit, useVModel } from '@vueuse/core'\nimport MenuGroup from './MenuGroup.vue'\n\nconst props = withDefaults(defineProps<MenuRadioGroupProps>(), {\n  modelValue: '',\n})\nconst emits = defineEmits<MenuRadioGroupEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst delegatedProps = reactiveOmit(props, ['modelValue'])\nconst forwarded = useForwardProps(delegatedProps)\n\nconst modelValue = useVModel(props, 'modelValue', emits)\n\nprovideMenuRadioGroupContext({\n  modelValue,\n  onValueChange: (payload) => {\n    modelValue.value = payload\n  },\n})\n</script>\n\n<template>\n  <MenuGroup v-bind=\"forwarded\">\n    <slot :model-value=\"modelValue\" />\n  </MenuGroup>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { MenuGroupProps } from './MenuGroup.vue'\nimport type { AcceptableValue } from '@/shared/types'\nimport { createContext, useForwardProps } from '@/shared'\n\ninterface MenuRadioGroupContext {\n  modelValue: Ref<AcceptableValue>\n  onValueChange: (payload: AcceptableValue) => void\n}\n\nexport interface MenuRadioGroupProps extends MenuGroupProps {\n  /** The value of the selected item in the group. */\n  modelValue?: AcceptableValue\n}\n\nexport type MenuRadioGroupEmits = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [payload: AcceptableValue]\n}\n\nexport const [injectMenuRadioGroupContext, provideMenuRadioGroupContext]\n  = createContext<MenuRadioGroupContext>('MenuRadioGroup')\n</script>\n\n<script setup lang=\"ts\">\nimport { reactiveOmit, useVModel } from '@vueuse/core'\nimport MenuGroup from './MenuGroup.vue'\n\nconst props = withDefaults(defineProps<MenuRadioGroupProps>(), {\n  modelValue: '',\n})\nconst emits = defineEmits<MenuRadioGroupEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst delegatedProps = reactiveOmit(props, ['modelValue'])\nconst forwarded = useForwardProps(delegatedProps)\n\nconst modelValue = useVModel(props, 'modelValue', emits)\n\nprovideMenuRadioGroupContext({\n  modelValue,\n  onValueChange: (payload) => {\n    modelValue.value = payload\n  },\n})\n</script>\n\n<template>\n  <MenuGroup v-bind=\"forwarded\">\n    <slot :model-value=\"modelValue\" />\n  </MenuGroup>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuItemEmits,\n  MenuItemProps,\n} from './MenuItem.vue'\nimport type { AcceptableValue } from '@/shared/types'\nimport { reactiveOmit } from '@vueuse/shared'\nimport { useForwardProps } from '@/shared'\n\nexport type MenuRadioItemEmits = MenuItemEmits\n\nexport interface MenuRadioItemProps extends MenuItemProps {\n  /** The unique value of the item. */\n  value: AcceptableValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, toRefs } from 'vue'\nimport MenuItem from './MenuItem.vue'\nimport { provideMenuItemIndicatorContext } from './MenuItemIndicator.vue'\nimport { injectMenuRadioGroupContext } from './MenuRadioGroup.vue'\nimport { getCheckedState } from './utils'\n\nconst props = defineProps<MenuRadioItemProps>()\nconst emits = defineEmits<MenuRadioItemEmits>()\n\nconst delegatedProps = reactiveOmit(props, ['value'])\nconst forwarded = useForwardProps(delegatedProps)\n\nconst { value } = toRefs(props)\nconst radioGroupContext = injectMenuRadioGroupContext()\nconst modelValue = computed(\n  () => radioGroupContext.modelValue.value === value?.value,\n)\n\nprovideMenuItemIndicatorContext({ modelValue })\n</script>\n\n<template>\n  <MenuItem\n    role=\"menuitemradio\"\n    v-bind=\"forwarded\"\n    :aria-checked=\"modelValue\"\n    :data-state=\"getCheckedState(modelValue)\"\n    @select=\"\n      async (event) => {\n        emits('select', event);\n        radioGroupContext.onValueChange(value);\n      }\n    \"\n  >\n    <slot />\n  </MenuItem>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuItemEmits,\n  MenuItemProps,\n} from './MenuItem.vue'\nimport type { AcceptableValue } from '@/shared/types'\nimport { reactiveOmit } from '@vueuse/shared'\nimport { useForwardProps } from '@/shared'\n\nexport type MenuRadioItemEmits = MenuItemEmits\n\nexport interface MenuRadioItemProps extends MenuItemProps {\n  /** The unique value of the item. */\n  value: AcceptableValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, toRefs } from 'vue'\nimport MenuItem from './MenuItem.vue'\nimport { provideMenuItemIndicatorContext } from './MenuItemIndicator.vue'\nimport { injectMenuRadioGroupContext } from './MenuRadioGroup.vue'\nimport { getCheckedState } from './utils'\n\nconst props = defineProps<MenuRadioItemProps>()\nconst emits = defineEmits<MenuRadioItemEmits>()\n\nconst delegatedProps = reactiveOmit(props, ['value'])\nconst forwarded = useForwardProps(delegatedProps)\n\nconst { value } = toRefs(props)\nconst radioGroupContext = injectMenuRadioGroupContext()\nconst modelValue = computed(\n  () => radioGroupContext.modelValue.value === value?.value,\n)\n\nprovideMenuItemIndicatorContext({ modelValue })\n</script>\n\n<template>\n  <MenuItem\n    role=\"menuitemradio\"\n    v-bind=\"forwarded\"\n    :aria-checked=\"modelValue\"\n    :data-state=\"getCheckedState(modelValue)\"\n    @select=\"\n      async (event) => {\n        emits('select', event);\n        radioGroupContext.onValueChange(value);\n      }\n    \"\n  >\n    <slot />\n  </MenuItem>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MenuSeparatorProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<MenuSeparatorProps>()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    role=\"separator\"\n    aria-orientation=\"horizontal\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MenuSeparatorProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<MenuSeparatorProps>()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    role=\"separator\"\n    aria-orientation=\"horizontal\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { MenuContext } from './MenuRoot.vue'\nimport { createContext } from '@/shared'\n\nexport interface MenuSubContext {\n  contentId: string\n  triggerId: string\n  trigger: Ref<HTMLElement | undefined>\n  onTriggerChange: (trigger: HTMLElement | undefined) => void\n  parentMenuContext?: MenuContext\n}\n\nexport const [injectMenuSubContext, provideMenuSubContext]\n  = createContext<MenuSubContext>('MenuSub')\n\nexport interface MenuSubProps {\n  /** The controlled open state of the menu. Can be used as `v-model:open`. */\n  open?: boolean\n}\n\nexport type MenuSubEmits = {\n  /** Event handler called when the open state of the submenu changes. */\n  'update:open': [payload: boolean]\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport {\n  ref,\n  watchEffect,\n} from 'vue'\nimport { PopperRoot } from '@/Popper'\nimport { injectMenuContext, provideMenuContext } from './MenuRoot.vue'\n\nconst props = withDefaults(defineProps<MenuSubProps>(), {\n  open: undefined,\n})\nconst emits = defineEmits<MenuSubEmits>()\n\nconst open = useVModel(props, 'open', emits, {\n  defaultValue: false,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst parentMenuContext = injectMenuContext()\nconst trigger = ref<HTMLElement>()\nconst content = ref<HTMLElement>()\n\n// Prevent the parent menu from reopening with open submenus.\nwatchEffect((cleanupFn) => {\n  if (parentMenuContext?.open.value === false)\n    open.value = false\n  cleanupFn(() => (open.value = false))\n})\n\nprovideMenuContext({\n  open,\n  onOpenChange: (value) => {\n    open.value = value\n  },\n  content,\n  onContentChange: (element) => {\n    content.value = element\n  },\n})\n\nprovideMenuSubContext({\n  triggerId: '',\n  contentId: '',\n  trigger,\n  onTriggerChange: (element) => {\n    trigger.value = element\n  },\n})\n</script>\n\n<template>\n  <PopperRoot>\n    <slot />\n  </PopperRoot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { MenuContext } from './MenuRoot.vue'\nimport { createContext } from '@/shared'\n\nexport interface MenuSubContext {\n  contentId: string\n  triggerId: string\n  trigger: Ref<HTMLElement | undefined>\n  onTriggerChange: (trigger: HTMLElement | undefined) => void\n  parentMenuContext?: MenuContext\n}\n\nexport const [injectMenuSubContext, provideMenuSubContext]\n  = createContext<MenuSubContext>('MenuSub')\n\nexport interface MenuSubProps {\n  /** The controlled open state of the menu. Can be used as `v-model:open`. */\n  open?: boolean\n}\n\nexport type MenuSubEmits = {\n  /** Event handler called when the open state of the submenu changes. */\n  'update:open': [payload: boolean]\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport {\n  ref,\n  watchEffect,\n} from 'vue'\nimport { PopperRoot } from '@/Popper'\nimport { injectMenuContext, provideMenuContext } from './MenuRoot.vue'\n\nconst props = withDefaults(defineProps<MenuSubProps>(), {\n  open: undefined,\n})\nconst emits = defineEmits<MenuSubEmits>()\n\nconst open = useVModel(props, 'open', emits, {\n  defaultValue: false,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst parentMenuContext = injectMenuContext()\nconst trigger = ref<HTMLElement>()\nconst content = ref<HTMLElement>()\n\n// Prevent the parent menu from reopening with open submenus.\nwatchEffect((cleanupFn) => {\n  if (parentMenuContext?.open.value === false)\n    open.value = false\n  cleanupFn(() => (open.value = false))\n})\n\nprovideMenuContext({\n  open,\n  onOpenChange: (value) => {\n    open.value = value\n  },\n  content,\n  onContentChange: (element) => {\n    content.value = element\n  },\n})\n\nprovideMenuSubContext({\n  triggerId: '',\n  contentId: '',\n  trigger,\n  onTriggerChange: (element) => {\n    trigger.value = element\n  },\n})\n</script>\n\n<template>\n  <PopperRoot>\n    <slot />\n  </PopperRoot>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuContentImplEmits,\n  MenuContentImplProps,\n} from './MenuContentImpl.vue'\n\nexport type MenuSubContentEmits = MenuContentImplEmits\n\n// reference: https://github.com/radix-ui/primitives/blob/main/packages/react/menu/src/Menu.tsx#L1152\nexport interface MenuSubContentProps extends Omit<MenuContentImplProps, 'disableOutsidePointerEvents' | 'disableOutsideScroll' | 'trapFocus' | 'side' | 'align'> {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { useForwardExpose, useForwardPropsEmits, useId } from '@/shared'\nimport MenuContentImpl, { injectMenuContentContext } from './MenuContentImpl.vue'\nimport { injectMenuContext, injectMenuRootContext } from './MenuRoot.vue'\nimport { injectMenuSubContext } from './MenuSub.vue'\nimport { SUB_CLOSE_KEYS } from './utils'\n\nconst props = withDefaults(defineProps<MenuSubContentProps>(), {\n  prioritizePosition: true,\n})\nconst emits = defineEmits<MenuSubContentEmits>()\n\nconst forwarded = useForwardPropsEmits(props, emits)\n\nconst menuContext = injectMenuContext()\nconst rootContext = injectMenuRootContext()\nconst menuSubContext = injectMenuSubContext()\nconst parentContentContext = injectMenuContentContext()\n\nconst { forwardRef, currentElement: subContentElement } = useForwardExpose()\n\nmenuSubContext.contentId ||= useId(undefined, 'reka-menu-sub-content')\n</script>\n\n<template>\n  <Presence :present=\"forceMount || menuContext.open.value\">\n    <MenuContentImpl\n      v-bind=\"forwarded\"\n      :id=\"menuSubContext.contentId\"\n      :ref=\"forwardRef\"\n      :aria-labelledby=\"menuSubContext.triggerId\"\n      align=\"start\"\n      :side=\"rootContext.dir.value === 'rtl' ? 'left' : 'right'\"\n      :disable-outside-pointer-events=\"false\"\n      :disable-outside-scroll=\"false\"\n      :trap-focus=\"false\"\n      @open-auto-focus.prevent=\"(event) => {\n        // when opening a submenu, focus content for keyboard users only\n        if (rootContext.isUsingKeyboardRef.value) subContentElement?.focus();\n      }\"\n      @close-auto-focus.prevent\n      @focus-outside=\"\n        (event) => {\n          if (event.defaultPrevented) return;\n          // We prevent closing when the trigger is focused to avoid triggering a re-open animation\n          // on pointer interaction.\n          // Also check if focus is moving to the parent content's filter to avoid closing when\n          // hovering between submenu and parent menu\n          const isMovingToParentContent = parentContentContext.filterElement.value?.contains(event.target as Node);\n          if (event.target !== menuSubContext.trigger.value && !isMovingToParentContent)\n            menuContext.onOpenChange(false);\n        }\n      \"\n      @escape-key-down=\"\n        (event) => {\n          rootContext.onClose();\n          // ensure pressing escape in submenu doesn't escape full screen mode\n          event.preventDefault();\n        }\n      \"\n      @keydown=\"(event: KeyboardEvent) => {\n        // Submenu key events bubble through portals. We only care about keys in this menu.\n        const isKeyDownInside = (event.currentTarget as HTMLElement)?.contains(event.target as HTMLElement);\n        const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir.value].includes(event.key);\n        if (isKeyDownInside && isCloseKey) {\n          menuContext.onOpenChange(false);\n          // We focus manually because we prevented it in `onCloseAutoFocus`\n          if (parentContentContext.filterElement.value) {\n            parentContentContext.filterElement.value.focus();\n            parentContentContext.highlightedElement.value = menuSubContext.trigger.value;\n            menuSubContext.trigger.value?.scrollIntoView({ block: 'nearest' });\n          }\n          else {\n            menuSubContext.trigger.value?.focus();\n          }\n          // prevent window from scrolling\n          event.preventDefault();\n        }\n      }\"\n    >\n      <slot />\n    </MenuContentImpl>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuContentImplEmits,\n  MenuContentImplProps,\n} from './MenuContentImpl.vue'\n\nexport type MenuSubContentEmits = MenuContentImplEmits\n\n// reference: https://github.com/radix-ui/primitives/blob/main/packages/react/menu/src/Menu.tsx#L1152\nexport interface MenuSubContentProps extends Omit<MenuContentImplProps, 'disableOutsidePointerEvents' | 'disableOutsideScroll' | 'trapFocus' | 'side' | 'align'> {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { useForwardExpose, useForwardPropsEmits, useId } from '@/shared'\nimport MenuContentImpl, { injectMenuContentContext } from './MenuContentImpl.vue'\nimport { injectMenuContext, injectMenuRootContext } from './MenuRoot.vue'\nimport { injectMenuSubContext } from './MenuSub.vue'\nimport { SUB_CLOSE_KEYS } from './utils'\n\nconst props = withDefaults(defineProps<MenuSubContentProps>(), {\n  prioritizePosition: true,\n})\nconst emits = defineEmits<MenuSubContentEmits>()\n\nconst forwarded = useForwardPropsEmits(props, emits)\n\nconst menuContext = injectMenuContext()\nconst rootContext = injectMenuRootContext()\nconst menuSubContext = injectMenuSubContext()\nconst parentContentContext = injectMenuContentContext()\n\nconst { forwardRef, currentElement: subContentElement } = useForwardExpose()\n\nmenuSubContext.contentId ||= useId(undefined, 'reka-menu-sub-content')\n</script>\n\n<template>\n  <Presence :present=\"forceMount || menuContext.open.value\">\n    <MenuContentImpl\n      v-bind=\"forwarded\"\n      :id=\"menuSubContext.contentId\"\n      :ref=\"forwardRef\"\n      :aria-labelledby=\"menuSubContext.triggerId\"\n      align=\"start\"\n      :side=\"rootContext.dir.value === 'rtl' ? 'left' : 'right'\"\n      :disable-outside-pointer-events=\"false\"\n      :disable-outside-scroll=\"false\"\n      :trap-focus=\"false\"\n      @open-auto-focus.prevent=\"(event) => {\n        // when opening a submenu, focus content for keyboard users only\n        if (rootContext.isUsingKeyboardRef.value) subContentElement?.focus();\n      }\"\n      @close-auto-focus.prevent\n      @focus-outside=\"\n        (event) => {\n          if (event.defaultPrevented) return;\n          // We prevent closing when the trigger is focused to avoid triggering a re-open animation\n          // on pointer interaction.\n          // Also check if focus is moving to the parent content's filter to avoid closing when\n          // hovering between submenu and parent menu\n          const isMovingToParentContent = parentContentContext.filterElement.value?.contains(event.target as Node);\n          if (event.target !== menuSubContext.trigger.value && !isMovingToParentContent)\n            menuContext.onOpenChange(false);\n        }\n      \"\n      @escape-key-down=\"\n        (event) => {\n          rootContext.onClose();\n          // ensure pressing escape in submenu doesn't escape full screen mode\n          event.preventDefault();\n        }\n      \"\n      @keydown=\"(event: KeyboardEvent) => {\n        // Submenu key events bubble through portals. We only care about keys in this menu.\n        const isKeyDownInside = (event.currentTarget as HTMLElement)?.contains(event.target as HTMLElement);\n        const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir.value].includes(event.key);\n        if (isKeyDownInside && isCloseKey) {\n          menuContext.onOpenChange(false);\n          // We focus manually because we prevented it in `onCloseAutoFocus`\n          if (parentContentContext.filterElement.value) {\n            parentContentContext.filterElement.value.focus();\n            parentContentContext.highlightedElement.value = menuSubContext.trigger.value;\n            menuSubContext.trigger.value?.scrollIntoView({ block: 'nearest' });\n          }\n          else {\n            menuSubContext.trigger.value?.focus();\n          }\n          // prevent window from scrolling\n          event.preventDefault();\n        }\n      }\"\n    >\n      <slot />\n    </MenuContentImpl>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemImplProps } from './MenuItemImpl.vue'\nimport type { Side } from './utils'\n\nexport interface MenuSubTriggerProps extends MenuItemImplProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ComponentPublicInstance } from 'vue'\nimport { nextTick, onUnmounted, ref, watch } from 'vue'\nimport { useId } from '@/shared'\nimport MenuAnchor from './MenuAnchor.vue'\nimport { injectMenuContentContext } from './MenuContentImpl.vue'\nimport MenuItemImpl from './MenuItemImpl.vue'\nimport { injectMenuContext, injectMenuRootContext } from './MenuRoot.vue'\nimport { injectMenuSubContext } from './MenuSub.vue'\nimport { getOpenState, isMouseEvent, SUB_OPEN_KEYS } from './utils'\n\nconst props = defineProps<MenuSubTriggerProps>()\n\nconst menuContext = injectMenuContext()\nconst rootContext = injectMenuRootContext()\nconst subContext = injectMenuSubContext()\nconst contentContext = injectMenuContentContext()\n\nwatch(menuContext.open, (open) => {\n  if (open) {\n    contentContext.activeSubmenuContext.value = {\n      onOpenChange: menuContext.onOpenChange,\n      trigger: subContext.trigger,\n    }\n  }\n  else if (contentContext.activeSubmenuContext.value?.trigger.value === subContext.trigger.value) {\n    contentContext.activeSubmenuContext.value = undefined\n  }\n})\n\nconst openTimerRef = ref<number | null>(null)\n\nsubContext.triggerId ||= useId(undefined, 'reka-menu-sub-trigger')\n\nfunction clearOpenTimer() {\n  if (openTimerRef.value)\n    window.clearTimeout(openTimerRef.value)\n  openTimerRef.value = null\n}\n\nonUnmounted(() => {\n  clearOpenTimer()\n})\n\nfunction handlePointerMove(event: PointerEvent) {\n  if (!isMouseEvent(event))\n    return\n  const defaultPrevented = contentContext.onItemEnter(event)\n  if (defaultPrevented)\n    return\n\n  if (!props.disabled && !menuContext.open.value && !openTimerRef.value) {\n    contentContext.onPointerGraceIntentChange(null)\n    openTimerRef.value = window.setTimeout(() => {\n      menuContext.onOpenChange(true)\n      clearOpenTimer()\n    }, 100)\n  }\n}\n\nasync function handlePointerLeave(event: PointerEvent) {\n  if (!isMouseEvent(event))\n    return\n  clearOpenTimer()\n\n  const contentRect = menuContext.content.value?.getBoundingClientRect()\n  if (contentRect?.width) {\n    // TODO (Radix UI): make sure to update this when we change positioning logic\n    // https://github.com/radix-ui/primitives/blob/main/packages/react/menu/src/Menu.tsx#L1088\n    const side = menuContext.content.value?.dataset.side as Side\n\n    const rightSide = side === 'right'\n    const bleed = rightSide ? -5 : +5\n    const contentNearEdge = contentRect[rightSide ? 'left' : 'right']\n    const contentFarEdge = contentRect[rightSide ? 'right' : 'left']\n\n    contentContext.onPointerGraceIntentChange({\n      area: [\n        // Apply a bleed on clientX to ensure that our exit point is\n        // consistently within polygon bounds\n        { x: event.clientX + bleed, y: event.clientY },\n        { x: contentNearEdge, y: contentRect.top },\n        { x: contentFarEdge, y: contentRect.top },\n        { x: contentFarEdge, y: contentRect.bottom },\n        { x: contentNearEdge, y: contentRect.bottom },\n      ],\n      side,\n    })\n\n    window.clearTimeout(contentContext.pointerGraceTimerRef.value)\n    contentContext.pointerGraceTimerRef.value = window.setTimeout(\n      () => contentContext.onPointerGraceIntentChange(null),\n      300,\n    )\n  }\n  else {\n    const defaultPrevented = contentContext.onTriggerLeave(event)\n    if (defaultPrevented)\n      return\n\n    // There's 100ms where the user may leave an item before the submenu was opened.\n    contentContext.onPointerGraceIntentChange(null)\n  }\n}\n\nasync function handleKeyDown(event: KeyboardEvent) {\n  const isTypingAhead = contentContext.searchRef.value !== ''\n  if (props.disabled || (isTypingAhead && event.key === ' '))\n    return\n  if (SUB_OPEN_KEYS[rootContext.dir.value].includes(event.key)) {\n    menuContext.onOpenChange(true)\n\n    await nextTick()\n    // The trigger may hold focus if opened via pointer interaction\n    // so we ensure content is given focus again when switching to keyboard.\n    menuContext.content.value?.focus()\n    // prevent window from scrolling\n    event.preventDefault()\n  }\n}\n</script>\n\n<template>\n  <MenuAnchor as-child>\n    <MenuItemImpl\n      v-bind=\"props\"\n      :id=\"subContext.triggerId\"\n      :ref=\"\n        (vnode: Element | ComponentPublicInstance | null) => {\n          if (!vnode) return undefined\n          // @ts-ignore\n          subContext?.onTriggerChange(vnode?.$el);\n          return undefined\n        }\n      \"\n      aria-haspopup=\"menu\"\n      :aria-expanded=\"menuContext.open.value\"\n      :aria-controls=\"subContext.contentId\"\n      :data-state=\"getOpenState(menuContext.open.value)\"\n      @click=\"\n        async (event: MouseEvent) => {\n          if (props.disabled || event.defaultPrevented) return;\n          /**\n           * We manually focus because iOS Safari doesn't always focus on click (e.g. buttons)\n           * and we rely heavily on `onFocusOutside` for submenus to close when switching\n           * between separate submenus.\n           */\n          (event.currentTarget as HTMLElement)?.focus();\n          if (!menuContext.open.value) menuContext.onOpenChange(true);\n        }\n      \"\n      @pointermove=\"handlePointerMove\"\n      @pointerleave=\"handlePointerLeave\"\n      @keydown=\"handleKeyDown\"\n    >\n      <slot />\n    </MenuItemImpl>\n  </MenuAnchor>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemImplProps } from './MenuItemImpl.vue'\nimport type { Side } from './utils'\n\nexport interface MenuSubTriggerProps extends MenuItemImplProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ComponentPublicInstance } from 'vue'\nimport { nextTick, onUnmounted, ref, watch } from 'vue'\nimport { useId } from '@/shared'\nimport MenuAnchor from './MenuAnchor.vue'\nimport { injectMenuContentContext } from './MenuContentImpl.vue'\nimport MenuItemImpl from './MenuItemImpl.vue'\nimport { injectMenuContext, injectMenuRootContext } from './MenuRoot.vue'\nimport { injectMenuSubContext } from './MenuSub.vue'\nimport { getOpenState, isMouseEvent, SUB_OPEN_KEYS } from './utils'\n\nconst props = defineProps<MenuSubTriggerProps>()\n\nconst menuContext = injectMenuContext()\nconst rootContext = injectMenuRootContext()\nconst subContext = injectMenuSubContext()\nconst contentContext = injectMenuContentContext()\n\nwatch(menuContext.open, (open) => {\n  if (open) {\n    contentContext.activeSubmenuContext.value = {\n      onOpenChange: menuContext.onOpenChange,\n      trigger: subContext.trigger,\n    }\n  }\n  else if (contentContext.activeSubmenuContext.value?.trigger.value === subContext.trigger.value) {\n    contentContext.activeSubmenuContext.value = undefined\n  }\n})\n\nconst openTimerRef = ref<number | null>(null)\n\nsubContext.triggerId ||= useId(undefined, 'reka-menu-sub-trigger')\n\nfunction clearOpenTimer() {\n  if (openTimerRef.value)\n    window.clearTimeout(openTimerRef.value)\n  openTimerRef.value = null\n}\n\nonUnmounted(() => {\n  clearOpenTimer()\n})\n\nfunction handlePointerMove(event: PointerEvent) {\n  if (!isMouseEvent(event))\n    return\n  const defaultPrevented = contentContext.onItemEnter(event)\n  if (defaultPrevented)\n    return\n\n  if (!props.disabled && !menuContext.open.value && !openTimerRef.value) {\n    contentContext.onPointerGraceIntentChange(null)\n    openTimerRef.value = window.setTimeout(() => {\n      menuContext.onOpenChange(true)\n      clearOpenTimer()\n    }, 100)\n  }\n}\n\nasync function handlePointerLeave(event: PointerEvent) {\n  if (!isMouseEvent(event))\n    return\n  clearOpenTimer()\n\n  const contentRect = menuContext.content.value?.getBoundingClientRect()\n  if (contentRect?.width) {\n    // TODO (Radix UI): make sure to update this when we change positioning logic\n    // https://github.com/radix-ui/primitives/blob/main/packages/react/menu/src/Menu.tsx#L1088\n    const side = menuContext.content.value?.dataset.side as Side\n\n    const rightSide = side === 'right'\n    const bleed = rightSide ? -5 : +5\n    const contentNearEdge = contentRect[rightSide ? 'left' : 'right']\n    const contentFarEdge = contentRect[rightSide ? 'right' : 'left']\n\n    contentContext.onPointerGraceIntentChange({\n      area: [\n        // Apply a bleed on clientX to ensure that our exit point is\n        // consistently within polygon bounds\n        { x: event.clientX + bleed, y: event.clientY },\n        { x: contentNearEdge, y: contentRect.top },\n        { x: contentFarEdge, y: contentRect.top },\n        { x: contentFarEdge, y: contentRect.bottom },\n        { x: contentNearEdge, y: contentRect.bottom },\n      ],\n      side,\n    })\n\n    window.clearTimeout(contentContext.pointerGraceTimerRef.value)\n    contentContext.pointerGraceTimerRef.value = window.setTimeout(\n      () => contentContext.onPointerGraceIntentChange(null),\n      300,\n    )\n  }\n  else {\n    const defaultPrevented = contentContext.onTriggerLeave(event)\n    if (defaultPrevented)\n      return\n\n    // There's 100ms where the user may leave an item before the submenu was opened.\n    contentContext.onPointerGraceIntentChange(null)\n  }\n}\n\nasync function handleKeyDown(event: KeyboardEvent) {\n  const isTypingAhead = contentContext.searchRef.value !== ''\n  if (props.disabled || (isTypingAhead && event.key === ' '))\n    return\n  if (SUB_OPEN_KEYS[rootContext.dir.value].includes(event.key)) {\n    menuContext.onOpenChange(true)\n\n    await nextTick()\n    // The trigger may hold focus if opened via pointer interaction\n    // so we ensure content is given focus again when switching to keyboard.\n    menuContext.content.value?.focus()\n    // prevent window from scrolling\n    event.preventDefault()\n  }\n}\n</script>\n\n<template>\n  <MenuAnchor as-child>\n    <MenuItemImpl\n      v-bind=\"props\"\n      :id=\"subContext.triggerId\"\n      :ref=\"\n        (vnode: Element | ComponentPublicInstance | null) => {\n          if (!vnode) return undefined\n          // @ts-ignore\n          subContext?.onTriggerChange(vnode?.$el);\n          return undefined\n        }\n      \"\n      aria-haspopup=\"menu\"\n      :aria-expanded=\"menuContext.open.value\"\n      :aria-controls=\"subContext.contentId\"\n      :data-state=\"getOpenState(menuContext.open.value)\"\n      @click=\"\n        async (event: MouseEvent) => {\n          if (props.disabled || event.defaultPrevented) return;\n          /**\n           * We manually focus because iOS Safari doesn't always focus on click (e.g. buttons)\n           * and we rely heavily on `onFocusOutside` for submenus to close when switching\n           * between separate submenus.\n           */\n          (event.currentTarget as HTMLElement)?.focus();\n          if (!menuContext.open.value) menuContext.onOpenChange(true);\n        }\n      \"\n      @pointermove=\"handlePointerMove\"\n      @pointerleave=\"handlePointerLeave\"\n      @keydown=\"handleKeyDown\"\n    >\n      <slot />\n    </MenuItemImpl>\n  </MenuAnchor>\n</template>\n","<script lang=\"ts\">\nimport type { MenuArrowProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ContextMenuArrowProps extends MenuArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuArrow } from '@/Menu'\n\nconst props = withDefaults(defineProps<ContextMenuArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\n\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuArrow v-bind=\"props\">\n    <slot />\n  </MenuArrow>\n</template>\n","<script lang=\"ts\">\nimport type { MenuArrowProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ContextMenuArrowProps extends MenuArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuArrow } from '@/Menu'\n\nconst props = withDefaults(defineProps<ContextMenuArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\n\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuArrow v-bind=\"props\">\n    <slot />\n  </MenuArrow>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuCheckboxItemEmits,\n  MenuCheckboxItemProps,\n} from '@/Menu'\n\nexport type ContextMenuCheckboxItemEmits = MenuCheckboxItemEmits\n\nexport interface ContextMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuCheckboxItem } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<ContextMenuCheckboxItemProps>()\nconst emits = defineEmits<ContextMenuCheckboxItemEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuCheckboxItem v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuCheckboxItem>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuCheckboxItemEmits,\n  MenuCheckboxItemProps,\n} from '@/Menu'\n\nexport type ContextMenuCheckboxItemEmits = MenuCheckboxItemEmits\n\nexport interface ContextMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuCheckboxItem } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<ContextMenuCheckboxItemProps>()\nconst emits = defineEmits<ContextMenuCheckboxItemEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuCheckboxItem v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuCheckboxItem>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { MenuEmits, MenuProps } from '@/Menu'\nimport type { Direction } from '@/shared/types'\nimport { createContext, useDirection, useForwardExpose } from '@/shared'\n\ntype ContextMenuRootContext = {\n  open: Ref<boolean>\n  onOpenChange: (open: boolean) => void\n  modal: Ref<boolean>\n  dir: Ref<Direction>\n  triggerElement: Ref<HTMLElement | undefined>\n  pressOpenDelay: Ref<number>\n}\n\nexport interface ContextMenuRootProps extends Omit<MenuProps, 'open'> {\n  /**\n   * The duration from when the trigger is pressed until the menu opens.\n   *\n   * @defaultValue 700\n   */\n  pressOpenDelay?: number\n}\nexport type ContextMenuRootEmits = MenuEmits\n\nexport const [injectContextMenuRootContext, provideContextMenuRootContext]\n  = createContext<ContextMenuRootContext>('ContextMenuRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { ref, toRefs, watch } from 'vue'\nimport { MenuRoot } from '@/Menu'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<ContextMenuRootProps>(), {\n  modal: true,\n  pressOpenDelay: 700,\n})\nconst emits = defineEmits<ContextMenuRootEmits>()\nconst { dir: propDir, modal, pressOpenDelay } = toRefs(props)\nuseForwardExpose()\nconst dir = useDirection(propDir)\n\nconst open = ref(false)\nconst triggerElement = ref<HTMLElement>()\n\nprovideContextMenuRootContext({\n  open,\n  onOpenChange: (value: boolean) => {\n    open.value = value\n  },\n  dir,\n  modal,\n  triggerElement,\n  pressOpenDelay,\n})\n\nwatch(open, (value) => {\n  emits('update:open', value)\n})\n</script>\n\n<template>\n  <MenuRoot\n    v-model:open=\"open\"\n    :dir=\"dir\"\n    :modal=\"modal\"\n  >\n    <slot />\n  </MenuRoot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { MenuEmits, MenuProps } from '@/Menu'\nimport type { Direction } from '@/shared/types'\nimport { createContext, useDirection, useForwardExpose } from '@/shared'\n\ntype ContextMenuRootContext = {\n  open: Ref<boolean>\n  onOpenChange: (open: boolean) => void\n  modal: Ref<boolean>\n  dir: Ref<Direction>\n  triggerElement: Ref<HTMLElement | undefined>\n  pressOpenDelay: Ref<number>\n}\n\nexport interface ContextMenuRootProps extends Omit<MenuProps, 'open'> {\n  /**\n   * The duration from when the trigger is pressed until the menu opens.\n   *\n   * @defaultValue 700\n   */\n  pressOpenDelay?: number\n}\nexport type ContextMenuRootEmits = MenuEmits\n\nexport const [injectContextMenuRootContext, provideContextMenuRootContext]\n  = createContext<ContextMenuRootContext>('ContextMenuRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { ref, toRefs, watch } from 'vue'\nimport { MenuRoot } from '@/Menu'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<ContextMenuRootProps>(), {\n  modal: true,\n  pressOpenDelay: 700,\n})\nconst emits = defineEmits<ContextMenuRootEmits>()\nconst { dir: propDir, modal, pressOpenDelay } = toRefs(props)\nuseForwardExpose()\nconst dir = useDirection(propDir)\n\nconst open = ref(false)\nconst triggerElement = ref<HTMLElement>()\n\nprovideContextMenuRootContext({\n  open,\n  onOpenChange: (value: boolean) => {\n    open.value = value\n  },\n  dir,\n  modal,\n  triggerElement,\n  pressOpenDelay,\n})\n\nwatch(open, (value) => {\n  emits('update:open', value)\n})\n</script>\n\n<template>\n  <MenuRoot\n    v-model:open=\"open\"\n    :dir=\"dir\"\n    :modal=\"modal\"\n  >\n    <slot />\n  </MenuRoot>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuContentEmits,\n  MenuContentProps,\n} from '@/Menu'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\n\nexport type ContextMenuContentEmits = MenuContentEmits\n\nexport interface ContextMenuContentProps\n  extends Omit<\n    MenuContentProps,\n    | 'side'\n    | 'sideOffset'\n    | 'align'\n    | 'arrowPadding'\n    | 'updatePositionStrategy'\n  > {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { MenuContent } from '@/Menu'\nimport { injectContextMenuRootContext } from './ContextMenuRoot.vue'\n\nconst props = withDefaults(defineProps<ContextMenuContentProps>(), {\n  alignOffset: 0,\n  avoidCollisions: true,\n  collisionBoundary: () => [],\n  collisionPadding: 0,\n  sticky: 'partial',\n  hideWhenDetached: false,\n})\nconst emits = defineEmits<ContextMenuContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\n\nuseForwardExpose()\nconst rootContext = injectContextMenuRootContext()\nconst hasInteractedOutside = ref(false)\n</script>\n\n<template>\n  <MenuContent\n    v-bind=\"forwarded\"\n    side=\"right\"\n    :side-offset=\"2\"\n    align=\"start\"\n    update-position-strategy=\"always\"\n    :style=\"{\n      '--reka-context-menu-content-transform-origin':\n        'var(--reka-popper-transform-origin)',\n      '--reka-context-menu-content-available-width':\n        'var(--reka-popper-available-width)',\n      '--reka-context-menu-content-available-height':\n        'var(--reka-popper-available-height)',\n      '--reka-context-menu-trigger-width': 'var(--reka-popper-anchor-width)',\n      '--reka-context-menu-trigger-height':\n        'var(--reka-popper-anchor-height)',\n    }\"\n    @close-auto-focus=\"\n      (event) => {\n        if (!event.defaultPrevented && hasInteractedOutside) {\n          event.preventDefault();\n        }\n        hasInteractedOutside = false;\n      }\n    \"\n    @interact-outside=\"\n      (event) => {\n        const originalEvent = event.detail.originalEvent as PointerEvent\n        // Prevent closing when right click (button=2) with the trigger element\n        if (originalEvent.button === 2 && event.target === rootContext.triggerElement.value) {\n          event.preventDefault()\n        }\n        if (!event.defaultPrevented && !rootContext.modal.value)\n          hasInteractedOutside = true;\n      }\n    \"\n  >\n    <slot />\n  </MenuContent>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuContentEmits,\n  MenuContentProps,\n} from '@/Menu'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\n\nexport type ContextMenuContentEmits = MenuContentEmits\n\nexport interface ContextMenuContentProps\n  extends Omit<\n    MenuContentProps,\n    | 'side'\n    | 'sideOffset'\n    | 'align'\n    | 'arrowPadding'\n    | 'updatePositionStrategy'\n  > {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { MenuContent } from '@/Menu'\nimport { injectContextMenuRootContext } from './ContextMenuRoot.vue'\n\nconst props = withDefaults(defineProps<ContextMenuContentProps>(), {\n  alignOffset: 0,\n  avoidCollisions: true,\n  collisionBoundary: () => [],\n  collisionPadding: 0,\n  sticky: 'partial',\n  hideWhenDetached: false,\n})\nconst emits = defineEmits<ContextMenuContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\n\nuseForwardExpose()\nconst rootContext = injectContextMenuRootContext()\nconst hasInteractedOutside = ref(false)\n</script>\n\n<template>\n  <MenuContent\n    v-bind=\"forwarded\"\n    side=\"right\"\n    :side-offset=\"2\"\n    align=\"start\"\n    update-position-strategy=\"always\"\n    :style=\"{\n      '--reka-context-menu-content-transform-origin':\n        'var(--reka-popper-transform-origin)',\n      '--reka-context-menu-content-available-width':\n        'var(--reka-popper-available-width)',\n      '--reka-context-menu-content-available-height':\n        'var(--reka-popper-available-height)',\n      '--reka-context-menu-trigger-width': 'var(--reka-popper-anchor-width)',\n      '--reka-context-menu-trigger-height':\n        'var(--reka-popper-anchor-height)',\n    }\"\n    @close-auto-focus=\"\n      (event) => {\n        if (!event.defaultPrevented && hasInteractedOutside) {\n          event.preventDefault();\n        }\n        hasInteractedOutside = false;\n      }\n    \"\n    @interact-outside=\"\n      (event) => {\n        const originalEvent = event.detail.originalEvent as PointerEvent\n        // Prevent closing when right click (button=2) with the trigger element\n        if (originalEvent.button === 2 && event.target === rootContext.triggerElement.value) {\n          event.preventDefault()\n        }\n        if (!event.defaultPrevented && !rootContext.modal.value)\n          hasInteractedOutside = true;\n      }\n    \"\n  >\n    <slot />\n  </MenuContent>\n</template>\n","<script lang=\"ts\">\nimport type { MenuGroupProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ContextMenuGroupProps extends MenuGroupProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuGroup } from '@/Menu'\n\nconst props = defineProps<ContextMenuGroupProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuGroup v-bind=\"props\">\n    <slot />\n  </MenuGroup>\n</template>\n","<script lang=\"ts\">\nimport type { MenuGroupProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ContextMenuGroupProps extends MenuGroupProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuGroup } from '@/Menu'\n\nconst props = defineProps<ContextMenuGroupProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuGroup v-bind=\"props\">\n    <slot />\n  </MenuGroup>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemEmits, MenuItemProps } from '@/Menu'\n\nexport type ContextMenuItemEmits = MenuItemEmits\n\nexport interface ContextMenuItemProps extends MenuItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuItem } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<MenuItemProps>()\nconst emits = defineEmits<MenuItemEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuItem v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuItem>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemEmits, MenuItemProps } from '@/Menu'\n\nexport type ContextMenuItemEmits = MenuItemEmits\n\nexport interface ContextMenuItemProps extends MenuItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuItem } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<MenuItemProps>()\nconst emits = defineEmits<MenuItemEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuItem v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuItem>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemIndicatorProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ContextMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuItemIndicator } from '@/Menu'\n\nconst props = defineProps<ContextMenuItemIndicatorProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuItemIndicator v-bind=\"props\">\n    <slot />\n  </MenuItemIndicator>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemIndicatorProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ContextMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuItemIndicator } from '@/Menu'\n\nconst props = defineProps<ContextMenuItemIndicatorProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuItemIndicator v-bind=\"props\">\n    <slot />\n  </MenuItemIndicator>\n</template>\n","<script lang=\"ts\">\nimport type { MenuLabelProps } from '@/Menu'\n\nexport interface ContextMenuLabelProps extends MenuLabelProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuLabel } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nconst props = defineProps<ContextMenuLabelProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuLabel v-bind=\"props\">\n    <slot />\n  </MenuLabel>\n</template>\n","<script lang=\"ts\">\nimport type { MenuLabelProps } from '@/Menu'\n\nexport interface ContextMenuLabelProps extends MenuLabelProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuLabel } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nconst props = defineProps<ContextMenuLabelProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuLabel v-bind=\"props\">\n    <slot />\n  </MenuLabel>\n</template>\n","<script setup lang=\"ts\">\nimport type { MenuPortalProps } from '@/Menu'\nimport { MenuPortal } from '@/Menu'\n\nexport interface ContextMenuPortalProps extends MenuPortalProps {}\nconst props = defineProps<ContextMenuPortalProps>()\n</script>\n\n<template>\n  <MenuPortal v-bind=\"props\">\n    <slot />\n  </MenuPortal>\n</template>\n","<script setup lang=\"ts\">\nimport type { MenuPortalProps } from '@/Menu'\nimport { MenuPortal } from '@/Menu'\n\nexport interface ContextMenuPortalProps extends MenuPortalProps {}\nconst props = defineProps<ContextMenuPortalProps>()\n</script>\n\n<template>\n  <MenuPortal v-bind=\"props\">\n    <slot />\n  </MenuPortal>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuRadioGroupEmits,\n  MenuRadioGroupProps,\n} from '@/Menu'\n\nexport type ContextMenuRadioGroupEmits = MenuRadioGroupEmits\n\nexport interface ContextMenuRadioGroupProps extends MenuRadioGroupProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuRadioGroup } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<ContextMenuRadioGroupProps>()\nconst emits = defineEmits<ContextMenuRadioGroupEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuRadioGroup v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuRadioGroup>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuRadioGroupEmits,\n  MenuRadioGroupProps,\n} from '@/Menu'\n\nexport type ContextMenuRadioGroupEmits = MenuRadioGroupEmits\n\nexport interface ContextMenuRadioGroupProps extends MenuRadioGroupProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuRadioGroup } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<ContextMenuRadioGroupProps>()\nconst emits = defineEmits<ContextMenuRadioGroupEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuRadioGroup v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuRadioGroup>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuItemEmits,\n  MenuRadioItemProps,\n} from '@/Menu'\n\nexport type ContextMenuRadioItemEmits = MenuItemEmits\n\nexport interface ContextMenuRadioItemProps extends MenuRadioItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuRadioItem } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<ContextMenuRadioItemProps>()\nconst emits = defineEmits<ContextMenuRadioItemEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuRadioItem v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuRadioItem>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuItemEmits,\n  MenuRadioItemProps,\n} from '@/Menu'\n\nexport type ContextMenuRadioItemEmits = MenuItemEmits\n\nexport interface ContextMenuRadioItemProps extends MenuRadioItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuRadioItem } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<ContextMenuRadioItemProps>()\nconst emits = defineEmits<ContextMenuRadioItemEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuRadioItem v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuRadioItem>\n</template>\n","<script lang=\"ts\">\nimport type { MenuSeparatorProps } from '@/Menu'\n\nexport interface ContextMenuSeparatorProps extends MenuSeparatorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSeparator } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nconst props = defineProps<ContextMenuSeparatorProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSeparator v-bind=\"props\">\n    <slot />\n  </MenuSeparator>\n</template>\n","<script lang=\"ts\">\nimport type { MenuSeparatorProps } from '@/Menu'\n\nexport interface ContextMenuSeparatorProps extends MenuSeparatorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSeparator } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nconst props = defineProps<ContextMenuSeparatorProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSeparator v-bind=\"props\">\n    <slot />\n  </MenuSeparator>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { MenuSubEmits, MenuSubProps } from '@/Menu'\n\nexport type ContextMenuSubEmits = MenuSubEmits\nexport interface ContextMenuSubProps extends MenuSubProps {\n  /** The open state of the submenu when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { MenuSub } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nconst props = withDefaults(defineProps<ContextMenuSubProps>(), {\n  open: undefined,\n})\nconst emit = defineEmits<ContextMenuSubEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nuseForwardExpose()\n\nconst open = useVModel(props, 'open', emit, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n</script>\n\n<template>\n  <MenuSub v-model:open=\"open\">\n    <slot :open=\"open\" />\n  </MenuSub>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { MenuSubEmits, MenuSubProps } from '@/Menu'\n\nexport type ContextMenuSubEmits = MenuSubEmits\nexport interface ContextMenuSubProps extends MenuSubProps {\n  /** The open state of the submenu when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { MenuSub } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nconst props = withDefaults(defineProps<ContextMenuSubProps>(), {\n  open: undefined,\n})\nconst emit = defineEmits<ContextMenuSubEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nuseForwardExpose()\n\nconst open = useVModel(props, 'open', emit, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n</script>\n\n<template>\n  <MenuSub v-model:open=\"open\">\n    <slot :open=\"open\" />\n  </MenuSub>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuSubContentEmits,\n  MenuSubContentProps,\n} from '@/Menu'\n\nexport type ContextMenuSubContentEmits = MenuSubContentEmits\nexport interface ContextMenuSubContentProps extends MenuSubContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSubContent } from '@/Menu'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\n\nconst props = defineProps<ContextMenuSubContentProps>()\n\nconst emits = defineEmits<ContextMenuSubContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSubContent\n    v-bind=\"forwarded\"\n    :style=\"{\n      '--reka-context-menu-content-transform-origin':\n        'var(--reka-popper-transform-origin)',\n      '--reka-context-menu-content-available-width':\n        'var(--reka-popper-available-width)',\n      '--reka-context-menu-content-available-height':\n        'var(--reka-popper-available-height)',\n      '--reka-context-menu-trigger-width': 'var(--reka-popper-anchor-width)',\n      '--reka-context-menu-trigger-height':\n        'var(--reka-popper-anchor-height)',\n    }\"\n  >\n    <slot />\n  </MenuSubContent>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuSubContentEmits,\n  MenuSubContentProps,\n} from '@/Menu'\n\nexport type ContextMenuSubContentEmits = MenuSubContentEmits\nexport interface ContextMenuSubContentProps extends MenuSubContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSubContent } from '@/Menu'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\n\nconst props = defineProps<ContextMenuSubContentProps>()\n\nconst emits = defineEmits<ContextMenuSubContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSubContent\n    v-bind=\"forwarded\"\n    :style=\"{\n      '--reka-context-menu-content-transform-origin':\n        'var(--reka-popper-transform-origin)',\n      '--reka-context-menu-content-available-width':\n        'var(--reka-popper-available-width)',\n      '--reka-context-menu-content-available-height':\n        'var(--reka-popper-available-height)',\n      '--reka-context-menu-trigger-width': 'var(--reka-popper-anchor-width)',\n      '--reka-context-menu-trigger-height':\n        'var(--reka-popper-anchor-height)',\n    }\"\n  >\n    <slot />\n  </MenuSubContent>\n</template>\n","<script lang=\"ts\">\nimport type { MenuSubTriggerProps } from '@/Menu'\n\nexport interface ContextMenuSubTriggerProps extends MenuSubTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSubTrigger } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nconst props = defineProps<ContextMenuSubTriggerProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSubTrigger v-bind=\"props\">\n    <slot />\n  </MenuSubTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { MenuSubTriggerProps } from '@/Menu'\n\nexport interface ContextMenuSubTriggerProps extends MenuSubTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSubTrigger } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nconst props = defineProps<ContextMenuSubTriggerProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSubTrigger v-bind=\"props\">\n    <slot />\n  </MenuSubTrigger>\n</template>\n","export function isTouchOrPen(event: PointerEvent) {\n  return event.pointerType !== 'mouse'\n}\n","<script lang=\"ts\">\nimport type { Point } from '@/Menu/utils'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ContextMenuTriggerProps extends PrimitiveProps {\n  /**\n   * When `true`, the context menu would not open when right-clicking.\n   *\n   * Note that this will also restore the native context menu.\n   */\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, ref, toRefs } from 'vue'\nimport { MenuAnchor } from '@/Menu'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectContextMenuRootContext } from './ContextMenuRoot.vue'\nimport { isTouchOrPen } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<ContextMenuTriggerProps>(), {\n  as: 'span',\n  disabled: false,\n})\nconst { disabled } = toRefs(props)\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst rootContext = injectContextMenuRootContext()\nconst point = ref<Point>({ x: 0, y: 0 })\nconst virtualEl = computed(() => ({\n  getBoundingClientRect: () =>\n    ({\n      width: 0,\n      height: 0,\n      left: point.value.x,\n      right: point.value.x,\n      top: point.value.y,\n      bottom: point.value.y,\n      ...point.value,\n    } as DOMRect),\n}))\n\nconst longPressTimer = ref(0)\nfunction clearLongPress() {\n  window.clearTimeout(longPressTimer.value)\n}\n\nfunction handleOpen(event: MouseEvent | PointerEvent) {\n  point.value = { x: event.clientX, y: event.clientY }\n  rootContext.onOpenChange(true)\n}\n\nasync function handleContextMenu(event: PointerEvent) {\n  if (!disabled.value) {\n    await nextTick()\n    if (!event.defaultPrevented) {\n      clearLongPress()\n      handleOpen(event)\n      event.preventDefault()\n    }\n  }\n}\n\nasync function handlePointerDown(event: PointerEvent) {\n  if (!disabled.value) {\n    await nextTick()\n\n    if (isTouchOrPen(event) && !event.defaultPrevented) {\n      // clear the long press here in case there's multiple touch points\n      clearLongPress()\n      longPressTimer.value = window.setTimeout(handleOpen, rootContext.pressOpenDelay.value, event)\n    }\n  }\n}\n\nasync function handlePointerEvent(event: PointerEvent) {\n  if (!disabled.value) {\n    await nextTick()\n    if (isTouchOrPen(event) && !event.defaultPrevented)\n      clearLongPress()\n  }\n}\n\nonMounted(() => {\n  if (currentElement.value) {\n    rootContext.triggerElement.value = currentElement.value\n  }\n})\n</script>\n\n<template>\n  <MenuAnchor\n    as=\"template\"\n    :reference=\"virtualEl\"\n  />\n\n  <Primitive\n    :ref=\"forwardRef\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :style=\"{\n      WebkitTouchCallout: 'none',\n      pointerEvents: 'auto',\n    }\"\n    v-bind=\"$attrs\"\n    @contextmenu=\"handleContextMenu\"\n    @pointerdown=\"handlePointerDown\"\n    @pointermove=\"handlePointerEvent\"\n    @pointercancel=\"handlePointerEvent\"\n    @pointerup=\"handlePointerEvent\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Point } from '@/Menu/utils'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ContextMenuTriggerProps extends PrimitiveProps {\n  /**\n   * When `true`, the context menu would not open when right-clicking.\n   *\n   * Note that this will also restore the native context menu.\n   */\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, ref, toRefs } from 'vue'\nimport { MenuAnchor } from '@/Menu'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectContextMenuRootContext } from './ContextMenuRoot.vue'\nimport { isTouchOrPen } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<ContextMenuTriggerProps>(), {\n  as: 'span',\n  disabled: false,\n})\nconst { disabled } = toRefs(props)\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst rootContext = injectContextMenuRootContext()\nconst point = ref<Point>({ x: 0, y: 0 })\nconst virtualEl = computed(() => ({\n  getBoundingClientRect: () =>\n    ({\n      width: 0,\n      height: 0,\n      left: point.value.x,\n      right: point.value.x,\n      top: point.value.y,\n      bottom: point.value.y,\n      ...point.value,\n    } as DOMRect),\n}))\n\nconst longPressTimer = ref(0)\nfunction clearLongPress() {\n  window.clearTimeout(longPressTimer.value)\n}\n\nfunction handleOpen(event: MouseEvent | PointerEvent) {\n  point.value = { x: event.clientX, y: event.clientY }\n  rootContext.onOpenChange(true)\n}\n\nasync function handleContextMenu(event: PointerEvent) {\n  if (!disabled.value) {\n    await nextTick()\n    if (!event.defaultPrevented) {\n      clearLongPress()\n      handleOpen(event)\n      event.preventDefault()\n    }\n  }\n}\n\nasync function handlePointerDown(event: PointerEvent) {\n  if (!disabled.value) {\n    await nextTick()\n\n    if (isTouchOrPen(event) && !event.defaultPrevented) {\n      // clear the long press here in case there's multiple touch points\n      clearLongPress()\n      longPressTimer.value = window.setTimeout(handleOpen, rootContext.pressOpenDelay.value, event)\n    }\n  }\n}\n\nasync function handlePointerEvent(event: PointerEvent) {\n  if (!disabled.value) {\n    await nextTick()\n    if (isTouchOrPen(event) && !event.defaultPrevented)\n      clearLongPress()\n  }\n}\n\nonMounted(() => {\n  if (currentElement.value) {\n    rootContext.triggerElement.value = currentElement.value\n  }\n})\n</script>\n\n<template>\n  <MenuAnchor\n    as=\"template\"\n    :reference=\"virtualEl\"\n  />\n\n  <Primitive\n    :ref=\"forwardRef\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :style=\"{\n      WebkitTouchCallout: 'none',\n      pointerEvents: 'auto',\n    }\"\n    v-bind=\"$attrs\"\n    @contextmenu=\"handleContextMenu\"\n    @pointerdown=\"handlePointerDown\"\n    @pointermove=\"handlePointerEvent\"\n    @pointercancel=\"handlePointerEvent\"\n    @pointerup=\"handlePointerEvent\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Matcher } from '@/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { DateStep, Formatter } from '@/shared'\nimport type { Granularity, HourCycle, SegmentPart, SegmentValueObj } from '@/shared/date'\nimport type { Direction, FormFieldProps } from '@/shared/types'\nimport { hasTime, isBefore } from '@/date'\nimport { createContext, isNullish, useDateFormatter, useDirection, useKbd, useLocale } from '@/shared'\nimport {\n  createContent,\n  getDefaultDate,\n  getInputType,\n  getSegmentElements,\n  initializeSegmentValues,\n  isSegmentNavigationKey,\n  normalizeDateStep,\n  normalizeHourCycle,\n  normalizeInputValue,\n  syncSegmentValues,\n} from '@/shared/date'\n\ntype DateFieldRootContext = {\n  locale: Ref<string>\n  modelValue: Ref<DateValue | undefined>\n  placeholder: Ref<DateValue>\n  isDateUnavailable?: Matcher\n  isInvalid: Ref<boolean>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  formatter: Formatter\n  hourCycle: HourCycle\n  step: Ref<DateStep>\n  segmentValues: Ref<SegmentValueObj>\n  segmentContents: Ref<{ part: SegmentPart, value: string }[]>\n  elements: Ref<Set<HTMLElement>>\n  focusNext: () => void\n  setFocusedElement: (el: HTMLElement) => void\n}\n\nexport interface DateFieldRootProps extends PrimitiveProps, FormFieldProps {\n  /** The default value for the calendar */\n  defaultValue?: DateValue\n  /** The default placeholder date */\n  defaultPlaceholder?: DateValue\n  /** The placeholder date, which is used to determine what month to display when no date is selected. This updates as the user navigates the calendar and can be used to programmatically control the calendar view */\n  placeholder?: DateValue\n  /** The controlled value of the field. Can be bound as `v-model`. */\n  modelValue?: DateValue | null\n  /** The hour cycle used for formatting times. Defaults to the local preference */\n  hourCycle?: HourCycle\n  /** The stepping interval for the time fields. Defaults to `1`. */\n  step?: DateStep\n  /** The granularity to use for formatting times. Defaults to day if a CalendarDate is provided, otherwise defaults to minute. The field will render segments for each part of the date up to and including the specified granularity */\n  granularity?: Granularity\n  /** Whether or not to hide the time zone segment of the field */\n  hideTimeZone?: boolean\n  /** The maximum date that can be selected */\n  maxValue?: DateValue\n  /** The minimum date that can be selected */\n  minValue?: DateValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** Whether or not the date field is disabled */\n  disabled?: boolean\n  /** Whether or not the date field is readonly */\n  readonly?: boolean\n  /** A function that returns whether or not a date is unavailable */\n  isDateUnavailable?: Matcher\n  /** Id of the element */\n  id?: string\n  /** The reading direction of the date field when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n}\n\nexport type DateFieldRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateValue | undefined]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n}\n\nexport const [injectDateFieldRootContext, provideDateFieldRootContext]\n  = createContext<DateFieldRootContext>('DateFieldRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, nextTick, onMounted, ref, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { VisuallyHidden } from '@/VisuallyHidden'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<DateFieldRootProps>(), {\n  defaultValue: undefined,\n  disabled: false,\n  readonly: false,\n  placeholder: undefined,\n  isDateUnavailable: undefined,\n})\nconst emits = defineEmits<DateFieldRootEmits>()\ndefineSlots<{\n  default?: (props: {\n    /** The current date of the field */\n    modelValue: DateValue | undefined\n    /** The date field segment contents */\n    segments: { part: SegmentPart, value: string }[]\n    /** Value if the input is invalid */\n    isInvalid: boolean\n  }) => any\n}>()\n\nconst { disabled, readonly, isDateUnavailable: propsIsDateUnavailable, granularity, defaultValue, dir: propDir, locale: propLocale } = toRefs(props)\nconst locale = useLocale(propLocale)\nconst dir = useDirection(propDir)\n\nconst formatter = useDateFormatter(locale.value, {\n  hourCycle: normalizeHourCycle(props.hourCycle),\n})\nconst { primitiveElement, currentElement: parentElement }\n  = usePrimitiveElement()\nconst segmentElements = ref<Set<HTMLElement>>(new Set())\n\nonMounted(() => {\n  getSegmentElements(parentElement.value).forEach(item => segmentElements.value.add(item as HTMLElement))\n})\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: defaultValue.value,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateValue>\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  granularity: granularity.value,\n  defaultValue: modelValue.value,\n  locale: props.locale,\n})\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nconst step = computed(() => normalizeDateStep(props))\n\nconst inferredGranularity = computed(() => {\n  if (props.granularity)\n    return !hasTime(placeholder.value) ? 'day' : props.granularity\n\n  return hasTime(placeholder.value) ? 'minute' : 'day'\n})\n\nconst isInvalid = computed(() => {\n  if (!modelValue.value)\n    return false\n\n  if (propsIsDateUnavailable.value?.(modelValue.value))\n    return true\n\n  if (props.minValue && isBefore(modelValue.value, props.minValue))\n    return true\n\n  if (props.maxValue && isBefore(props.maxValue, modelValue.value))\n    return true\n\n  return false\n})\n\nconst initialSegments = initializeSegmentValues(inferredGranularity.value)\n\nconst segmentValues = ref<SegmentValueObj>(modelValue.value ? { ...syncSegmentValues({ value: modelValue.value, formatter }) } : { ...initialSegments })\n\nconst allSegmentContent = computed(() => createContent({\n  granularity: inferredGranularity.value,\n  dateRef: placeholder.value,\n  formatter,\n  hideTimeZone: props.hideTimeZone,\n  hourCycle: props.hourCycle,\n  segmentValues: segmentValues.value,\n  locale,\n}))\n\nconst segmentContents = computed(() => allSegmentContent.value.arr)\n\nconst editableSegmentContents = computed(() => segmentContents.value.filter(({ part }) => part !== 'literal'))\n\nwatch(locale, (value) => {\n  if (formatter.getLocale() !== value) {\n    formatter.setLocale(value)\n    // Locale changed, so we need to clear the segment elements and re-get them (different order)\n    // Get the focusable elements again on the next tick\n    nextTick(() => {\n      segmentElements.value.clear()\n      getSegmentElements(parentElement.value).forEach(item => segmentElements.value.add(item as HTMLElement))\n    })\n  }\n})\n\nwatch(modelValue, (_modelValue) => {\n  if (!isNullish(_modelValue) && placeholder.value.compare(_modelValue) !== 0) {\n    placeholder.value = _modelValue.copy()\n  }\n})\n\nwatch([modelValue, locale], ([_modelValue]) => {\n  if (!isNullish(_modelValue)) {\n    segmentValues.value = { ...syncSegmentValues({ value: _modelValue, formatter }) }\n  }\n  // If segment has null value, means that user modified it, thus do not reset the segmentValues\n  else if (Object.values(segmentValues.value).every(value => value !== null) && isNullish(_modelValue)) {\n    segmentValues.value = { ...initialSegments }\n  }\n})\n\nconst currentFocusedElement = ref<HTMLElement | null>(null)\n\nconst currentSegmentIndex = computed(() =>\n  Array.from(segmentElements.value).findIndex(el =>\n    el.getAttribute('data-reka-date-field-segment')\n    === currentFocusedElement.value?.getAttribute('data-reka-date-field-segment')))\n\nconst nextFocusableSegment = computed(() => {\n  const sign = dir.value === 'rtl' ? -1 : 1\n  const nextCondition = sign < 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1\n  if (nextCondition)\n    return null\n  const segmentToFocus = Array.from(segmentElements.value)[currentSegmentIndex.value + sign]\n  return segmentToFocus\n})\n\nconst prevFocusableSegment = computed(() => {\n  const sign = dir.value === 'rtl' ? -1 : 1\n  const prevCondition = sign > 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1\n  if (prevCondition)\n    return null\n\n  const segmentToFocus = Array.from(segmentElements.value)[currentSegmentIndex.value - sign]\n  return segmentToFocus\n})\n\nconst inputType = computed(() => getInputType(inferredGranularity.value))\nconst inputValue = computed(() => normalizeInputValue(modelValue.value, inferredGranularity.value))\nconst inputMaxValue = computed(() => props.maxValue ? normalizeInputValue(props.maxValue, inferredGranularity.value) : undefined)\nconst inputMinValue = computed(() => props.minValue ? normalizeInputValue(props.minValue, inferredGranularity.value) : undefined)\n\nconst kbd = useKbd()\n\nfunction handleKeydown(e: KeyboardEvent) {\n  // Don't navigate between segments mid-composition, arrow keys are used for IME candidate navigation\n  if (e.isComposing)\n    return\n  if (!isSegmentNavigationKey(e.key))\n    return\n  if (e.key === kbd.ARROW_LEFT)\n    prevFocusableSegment.value?.focus()\n  if (e.key === kbd.ARROW_RIGHT)\n    nextFocusableSegment.value?.focus()\n}\n\nfunction setFocusedElement(el: HTMLElement) {\n  currentFocusedElement.value = el\n}\n\nprovideDateFieldRootContext({\n  isDateUnavailable: propsIsDateUnavailable.value,\n  locale,\n  modelValue,\n  placeholder,\n  disabled,\n  formatter,\n  hourCycle: props.hourCycle,\n  step,\n  readonly,\n  segmentValues,\n  isInvalid,\n  segmentContents: editableSegmentContents,\n  elements: segmentElements,\n  setFocusedElement,\n  focusNext() {\n    nextFocusableSegment.value?.focus()\n  },\n})\n\ndefineExpose({\n  /** Helper to set the focused element inside the DateField */\n  setFocusedElement,\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    ref=\"primitiveElement\"\n    role=\"group\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n    @keydown.left.right=\"handleKeydown\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :segments=\"segmentContents\"\n      :is-invalid=\"isInvalid\"\n    />\n\n    <VisuallyHidden\n      :id=\"id\"\n      as=\"input\"\n      :type=\"inputType\"\n      feature=\"focusable\"\n      tabindex=\"-1\"\n      :value=\"inputValue\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n      :max=\"inputMaxValue\"\n      :min=\"inputMinValue\"\n      @focus=\"Array.from(segmentElements)?.[0]?.focus()\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Matcher } from '@/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { DateStep, Formatter } from '@/shared'\nimport type { Granularity, HourCycle, SegmentPart, SegmentValueObj } from '@/shared/date'\nimport type { Direction, FormFieldProps } from '@/shared/types'\nimport { hasTime, isBefore } from '@/date'\nimport { createContext, isNullish, useDateFormatter, useDirection, useKbd, useLocale } from '@/shared'\nimport {\n  createContent,\n  getDefaultDate,\n  getInputType,\n  getSegmentElements,\n  initializeSegmentValues,\n  isSegmentNavigationKey,\n  normalizeDateStep,\n  normalizeHourCycle,\n  normalizeInputValue,\n  syncSegmentValues,\n} from '@/shared/date'\n\ntype DateFieldRootContext = {\n  locale: Ref<string>\n  modelValue: Ref<DateValue | undefined>\n  placeholder: Ref<DateValue>\n  isDateUnavailable?: Matcher\n  isInvalid: Ref<boolean>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  formatter: Formatter\n  hourCycle: HourCycle\n  step: Ref<DateStep>\n  segmentValues: Ref<SegmentValueObj>\n  segmentContents: Ref<{ part: SegmentPart, value: string }[]>\n  elements: Ref<Set<HTMLElement>>\n  focusNext: () => void\n  setFocusedElement: (el: HTMLElement) => void\n}\n\nexport interface DateFieldRootProps extends PrimitiveProps, FormFieldProps {\n  /** The default value for the calendar */\n  defaultValue?: DateValue\n  /** The default placeholder date */\n  defaultPlaceholder?: DateValue\n  /** The placeholder date, which is used to determine what month to display when no date is selected. This updates as the user navigates the calendar and can be used to programmatically control the calendar view */\n  placeholder?: DateValue\n  /** The controlled value of the field. Can be bound as `v-model`. */\n  modelValue?: DateValue | null\n  /** The hour cycle used for formatting times. Defaults to the local preference */\n  hourCycle?: HourCycle\n  /** The stepping interval for the time fields. Defaults to `1`. */\n  step?: DateStep\n  /** The granularity to use for formatting times. Defaults to day if a CalendarDate is provided, otherwise defaults to minute. The field will render segments for each part of the date up to and including the specified granularity */\n  granularity?: Granularity\n  /** Whether or not to hide the time zone segment of the field */\n  hideTimeZone?: boolean\n  /** The maximum date that can be selected */\n  maxValue?: DateValue\n  /** The minimum date that can be selected */\n  minValue?: DateValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** Whether or not the date field is disabled */\n  disabled?: boolean\n  /** Whether or not the date field is readonly */\n  readonly?: boolean\n  /** A function that returns whether or not a date is unavailable */\n  isDateUnavailable?: Matcher\n  /** Id of the element */\n  id?: string\n  /** The reading direction of the date field when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n}\n\nexport type DateFieldRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateValue | undefined]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n}\n\nexport const [injectDateFieldRootContext, provideDateFieldRootContext]\n  = createContext<DateFieldRootContext>('DateFieldRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, nextTick, onMounted, ref, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { VisuallyHidden } from '@/VisuallyHidden'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<DateFieldRootProps>(), {\n  defaultValue: undefined,\n  disabled: false,\n  readonly: false,\n  placeholder: undefined,\n  isDateUnavailable: undefined,\n})\nconst emits = defineEmits<DateFieldRootEmits>()\ndefineSlots<{\n  default?: (props: {\n    /** The current date of the field */\n    modelValue: DateValue | undefined\n    /** The date field segment contents */\n    segments: { part: SegmentPart, value: string }[]\n    /** Value if the input is invalid */\n    isInvalid: boolean\n  }) => any\n}>()\n\nconst { disabled, readonly, isDateUnavailable: propsIsDateUnavailable, granularity, defaultValue, dir: propDir, locale: propLocale } = toRefs(props)\nconst locale = useLocale(propLocale)\nconst dir = useDirection(propDir)\n\nconst formatter = useDateFormatter(locale.value, {\n  hourCycle: normalizeHourCycle(props.hourCycle),\n})\nconst { primitiveElement, currentElement: parentElement }\n  = usePrimitiveElement()\nconst segmentElements = ref<Set<HTMLElement>>(new Set())\n\nonMounted(() => {\n  getSegmentElements(parentElement.value).forEach(item => segmentElements.value.add(item as HTMLElement))\n})\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: defaultValue.value,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateValue>\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  granularity: granularity.value,\n  defaultValue: modelValue.value,\n  locale: props.locale,\n})\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nconst step = computed(() => normalizeDateStep(props))\n\nconst inferredGranularity = computed(() => {\n  if (props.granularity)\n    return !hasTime(placeholder.value) ? 'day' : props.granularity\n\n  return hasTime(placeholder.value) ? 'minute' : 'day'\n})\n\nconst isInvalid = computed(() => {\n  if (!modelValue.value)\n    return false\n\n  if (propsIsDateUnavailable.value?.(modelValue.value))\n    return true\n\n  if (props.minValue && isBefore(modelValue.value, props.minValue))\n    return true\n\n  if (props.maxValue && isBefore(props.maxValue, modelValue.value))\n    return true\n\n  return false\n})\n\nconst initialSegments = initializeSegmentValues(inferredGranularity.value)\n\nconst segmentValues = ref<SegmentValueObj>(modelValue.value ? { ...syncSegmentValues({ value: modelValue.value, formatter }) } : { ...initialSegments })\n\nconst allSegmentContent = computed(() => createContent({\n  granularity: inferredGranularity.value,\n  dateRef: placeholder.value,\n  formatter,\n  hideTimeZone: props.hideTimeZone,\n  hourCycle: props.hourCycle,\n  segmentValues: segmentValues.value,\n  locale,\n}))\n\nconst segmentContents = computed(() => allSegmentContent.value.arr)\n\nconst editableSegmentContents = computed(() => segmentContents.value.filter(({ part }) => part !== 'literal'))\n\nwatch(locale, (value) => {\n  if (formatter.getLocale() !== value) {\n    formatter.setLocale(value)\n    // Locale changed, so we need to clear the segment elements and re-get them (different order)\n    // Get the focusable elements again on the next tick\n    nextTick(() => {\n      segmentElements.value.clear()\n      getSegmentElements(parentElement.value).forEach(item => segmentElements.value.add(item as HTMLElement))\n    })\n  }\n})\n\nwatch(modelValue, (_modelValue) => {\n  if (!isNullish(_modelValue) && placeholder.value.compare(_modelValue) !== 0) {\n    placeholder.value = _modelValue.copy()\n  }\n})\n\nwatch([modelValue, locale], ([_modelValue]) => {\n  if (!isNullish(_modelValue)) {\n    segmentValues.value = { ...syncSegmentValues({ value: _modelValue, formatter }) }\n  }\n  // If segment has null value, means that user modified it, thus do not reset the segmentValues\n  else if (Object.values(segmentValues.value).every(value => value !== null) && isNullish(_modelValue)) {\n    segmentValues.value = { ...initialSegments }\n  }\n})\n\nconst currentFocusedElement = ref<HTMLElement | null>(null)\n\nconst currentSegmentIndex = computed(() =>\n  Array.from(segmentElements.value).findIndex(el =>\n    el.getAttribute('data-reka-date-field-segment')\n    === currentFocusedElement.value?.getAttribute('data-reka-date-field-segment')))\n\nconst nextFocusableSegment = computed(() => {\n  const sign = dir.value === 'rtl' ? -1 : 1\n  const nextCondition = sign < 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1\n  if (nextCondition)\n    return null\n  const segmentToFocus = Array.from(segmentElements.value)[currentSegmentIndex.value + sign]\n  return segmentToFocus\n})\n\nconst prevFocusableSegment = computed(() => {\n  const sign = dir.value === 'rtl' ? -1 : 1\n  const prevCondition = sign > 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1\n  if (prevCondition)\n    return null\n\n  const segmentToFocus = Array.from(segmentElements.value)[currentSegmentIndex.value - sign]\n  return segmentToFocus\n})\n\nconst inputType = computed(() => getInputType(inferredGranularity.value))\nconst inputValue = computed(() => normalizeInputValue(modelValue.value, inferredGranularity.value))\nconst inputMaxValue = computed(() => props.maxValue ? normalizeInputValue(props.maxValue, inferredGranularity.value) : undefined)\nconst inputMinValue = computed(() => props.minValue ? normalizeInputValue(props.minValue, inferredGranularity.value) : undefined)\n\nconst kbd = useKbd()\n\nfunction handleKeydown(e: KeyboardEvent) {\n  // Don't navigate between segments mid-composition, arrow keys are used for IME candidate navigation\n  if (e.isComposing)\n    return\n  if (!isSegmentNavigationKey(e.key))\n    return\n  if (e.key === kbd.ARROW_LEFT)\n    prevFocusableSegment.value?.focus()\n  if (e.key === kbd.ARROW_RIGHT)\n    nextFocusableSegment.value?.focus()\n}\n\nfunction setFocusedElement(el: HTMLElement) {\n  currentFocusedElement.value = el\n}\n\nprovideDateFieldRootContext({\n  isDateUnavailable: propsIsDateUnavailable.value,\n  locale,\n  modelValue,\n  placeholder,\n  disabled,\n  formatter,\n  hourCycle: props.hourCycle,\n  step,\n  readonly,\n  segmentValues,\n  isInvalid,\n  segmentContents: editableSegmentContents,\n  elements: segmentElements,\n  setFocusedElement,\n  focusNext() {\n    nextFocusableSegment.value?.focus()\n  },\n})\n\ndefineExpose({\n  /** Helper to set the focused element inside the DateField */\n  setFocusedElement,\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    ref=\"primitiveElement\"\n    role=\"group\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n    @keydown.left.right=\"handleKeydown\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :segments=\"segmentContents\"\n      :is-invalid=\"isInvalid\"\n    />\n\n    <VisuallyHidden\n      :id=\"id\"\n      as=\"input\"\n      :type=\"inputType\"\n      feature=\"focusable\"\n      tabindex=\"-1\"\n      :value=\"inputValue\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n      :max=\"inputMaxValue\"\n      :min=\"inputMinValue\"\n      @focus=\"Array.from(segmentElements)?.[0]?.focus()\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { SegmentPart } from '@/shared/date'\nimport { computed, ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useDateField } from '@/shared/date/useDateField'\nimport { injectDateFieldRootContext } from './DateFieldRoot.vue'\n\nexport interface DateFieldInputProps extends PrimitiveProps {\n  /** The part of the date to render */\n  part: SegmentPart\n}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateFieldInputProps>()\n\nconst rootContext = injectDateFieldRootContext()\n\nconst hasLeftFocus = ref(true)\nconst lastKeyZero = ref(false)\n\nconst {\n  handleSegmentClick,\n  handleSegmentKeydown,\n  handleSegmentBeforeInput,\n  handleSegmentCompositionStart,\n  handleSegmentCompositionEnd,\n  attributes,\n} = useDateField({\n  hasLeftFocus,\n  lastKeyZero,\n  placeholder: rootContext.placeholder,\n  hourCycle: rootContext.hourCycle,\n  step: rootContext.step,\n  segmentValues: rootContext.segmentValues,\n  formatter: rootContext.formatter,\n  part: props.part,\n  disabled: rootContext.disabled,\n  readonly: rootContext.readonly,\n  focusNext: rootContext.focusNext,\n  modelValue: rootContext.modelValue,\n})\n\nconst disabled = computed(() => rootContext.disabled.value)\nconst readonly = computed(() => rootContext.readonly.value)\nconst isInvalid = computed(() => rootContext.isInvalid.value)\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    v-bind=\"attributes\"\n    :contenteditable=\"disabled || readonly ? false : part !== 'literal'\"\n    :data-reka-date-field-segment=\"part\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :aria-readonly=\"readonly ? true : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :aria-invalid=\"isInvalid ? true : undefined\"\n    v-on=\"part !== 'literal' ? {\n      mousedown: handleSegmentClick,\n      keydown: handleSegmentKeydown,\n      beforeinput: handleSegmentBeforeInput,\n      compositionstart: handleSegmentCompositionStart,\n      compositionend: handleSegmentCompositionEnd,\n      focusout: () => { hasLeftFocus = true },\n      focusin: (e: FocusEvent) => {\n        rootContext.setFocusedElement(e.target as HTMLElement)\n      },\n    } : {}\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { SegmentPart } from '@/shared/date'\nimport { computed, ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useDateField } from '@/shared/date/useDateField'\nimport { injectDateFieldRootContext } from './DateFieldRoot.vue'\n\nexport interface DateFieldInputProps extends PrimitiveProps {\n  /** The part of the date to render */\n  part: SegmentPart\n}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateFieldInputProps>()\n\nconst rootContext = injectDateFieldRootContext()\n\nconst hasLeftFocus = ref(true)\nconst lastKeyZero = ref(false)\n\nconst {\n  handleSegmentClick,\n  handleSegmentKeydown,\n  handleSegmentBeforeInput,\n  handleSegmentCompositionStart,\n  handleSegmentCompositionEnd,\n  attributes,\n} = useDateField({\n  hasLeftFocus,\n  lastKeyZero,\n  placeholder: rootContext.placeholder,\n  hourCycle: rootContext.hourCycle,\n  step: rootContext.step,\n  segmentValues: rootContext.segmentValues,\n  formatter: rootContext.formatter,\n  part: props.part,\n  disabled: rootContext.disabled,\n  readonly: rootContext.readonly,\n  focusNext: rootContext.focusNext,\n  modelValue: rootContext.modelValue,\n})\n\nconst disabled = computed(() => rootContext.disabled.value)\nconst readonly = computed(() => rootContext.readonly.value)\nconst isInvalid = computed(() => rootContext.isInvalid.value)\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    v-bind=\"attributes\"\n    :contenteditable=\"disabled || readonly ? false : part !== 'literal'\"\n    :data-reka-date-field-segment=\"part\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :aria-readonly=\"readonly ? true : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :aria-invalid=\"isInvalid ? true : undefined\"\n    v-on=\"part !== 'literal' ? {\n      mousedown: handleSegmentClick,\n      keydown: handleSegmentKeydown,\n      beforeinput: handleSegmentBeforeInput,\n      compositionstart: handleSegmentCompositionStart,\n      compositionend: handleSegmentCompositionEnd,\n      focusout: () => { hasLeftFocus = true },\n      focusin: (e: FocusEvent) => {\n        rootContext.setFocusedElement(e.target as HTMLElement)\n      },\n    } : {}\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport { createContext } from '@/shared'\n\nexport interface PopoverRootProps {\n  /**\n   * The open state of the popover when it is initially rendered. Use when you do not need to control its open state.\n   */\n  defaultOpen?: boolean\n  /**\n   * The controlled open state of the popover.\n   */\n  open?: boolean\n  /**\n   * The modality of the popover. When set to true, interaction with outside elements will be disabled and only popover content will be visible to screen readers.\n   *\n   * @defaultValue false\n   */\n  modal?: boolean\n}\nexport type PopoverRootEmits = {\n  /**\n   * Event handler called when the open state of the popover changes.\n   */\n  'update:open': [value: boolean]\n}\n\nexport interface PopoverRootContext {\n  triggerElement: Ref<HTMLElement | undefined>\n  triggerId: string\n  contentId: string\n  open: Ref<boolean>\n  modal: Ref<boolean>\n  onOpenChange: (value: boolean) => void\n  onOpenToggle: () => void\n  hasCustomAnchor: Ref<boolean>\n}\n\nexport const [injectPopoverRootContext, providePopoverRootContext]\n  = createContext<PopoverRootContext>('PopoverRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { ref, toRefs } from 'vue'\nimport { PopperRoot } from '@/Popper'\n\nconst props = withDefaults(defineProps<PopoverRootProps>(), {\n  defaultOpen: false,\n  open: undefined,\n  modal: false,\n})\nconst emit = defineEmits<PopoverRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n    /** Close the popover */\n    close: () => void\n  }) => any\n}>()\n\nconst { modal } = toRefs(props)\n\nconst open = useVModel(props, 'open', emit, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst triggerElement = ref<HTMLElement>()\nconst hasCustomAnchor = ref(false)\n\nprovidePopoverRootContext({\n  contentId: '',\n  triggerId: '',\n  modal,\n  open,\n  onOpenChange: (value) => {\n    open.value = value\n  },\n  onOpenToggle: () => {\n    open.value = !open.value\n  },\n  triggerElement,\n  hasCustomAnchor,\n})\n</script>\n\n<template>\n  <PopperRoot>\n    <slot\n      :open=\"open\"\n      :close=\"() => open = false\"\n    />\n  </PopperRoot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport { createContext } from '@/shared'\n\nexport interface PopoverRootProps {\n  /**\n   * The open state of the popover when it is initially rendered. Use when you do not need to control its open state.\n   */\n  defaultOpen?: boolean\n  /**\n   * The controlled open state of the popover.\n   */\n  open?: boolean\n  /**\n   * The modality of the popover. When set to true, interaction with outside elements will be disabled and only popover content will be visible to screen readers.\n   *\n   * @defaultValue false\n   */\n  modal?: boolean\n}\nexport type PopoverRootEmits = {\n  /**\n   * Event handler called when the open state of the popover changes.\n   */\n  'update:open': [value: boolean]\n}\n\nexport interface PopoverRootContext {\n  triggerElement: Ref<HTMLElement | undefined>\n  triggerId: string\n  contentId: string\n  open: Ref<boolean>\n  modal: Ref<boolean>\n  onOpenChange: (value: boolean) => void\n  onOpenToggle: () => void\n  hasCustomAnchor: Ref<boolean>\n}\n\nexport const [injectPopoverRootContext, providePopoverRootContext]\n  = createContext<PopoverRootContext>('PopoverRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { ref, toRefs } from 'vue'\nimport { PopperRoot } from '@/Popper'\n\nconst props = withDefaults(defineProps<PopoverRootProps>(), {\n  defaultOpen: false,\n  open: undefined,\n  modal: false,\n})\nconst emit = defineEmits<PopoverRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n    /** Close the popover */\n    close: () => void\n  }) => any\n}>()\n\nconst { modal } = toRefs(props)\n\nconst open = useVModel(props, 'open', emit, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst triggerElement = ref<HTMLElement>()\nconst hasCustomAnchor = ref(false)\n\nprovidePopoverRootContext({\n  contentId: '',\n  triggerId: '',\n  modal,\n  open,\n  onOpenChange: (value) => {\n    open.value = value\n  },\n  onOpenToggle: () => {\n    open.value = !open.value\n  },\n  triggerElement,\n  hasCustomAnchor,\n})\n</script>\n\n<template>\n  <PopperRoot>\n    <slot\n      :open=\"open\"\n      :close=\"() => open = false\"\n    />\n  </PopperRoot>\n</template>\n","<script lang=\"ts\">\nimport type { PopperAnchorProps } from '@/Popper'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PopoverAnchorProps extends PopperAnchorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { onBeforeMount, onUnmounted } from 'vue'\nimport { PopperAnchor } from '@/Popper'\nimport { injectPopoverRootContext } from './PopoverRoot.vue'\n\nconst props = defineProps<PopoverAnchorProps>()\n\nuseForwardExpose()\nconst rootContext = injectPopoverRootContext()\n\nonBeforeMount(() => {\n  rootContext.hasCustomAnchor.value = true\n})\nonUnmounted(() => {\n  rootContext.hasCustomAnchor.value = false\n})\n</script>\n\n<template>\n  <PopperAnchor v-bind=\"props\">\n    <slot />\n  </PopperAnchor>\n</template>\n","<script lang=\"ts\">\nimport type { PopperAnchorProps } from '@/Popper'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PopoverAnchorProps extends PopperAnchorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { onBeforeMount, onUnmounted } from 'vue'\nimport { PopperAnchor } from '@/Popper'\nimport { injectPopoverRootContext } from './PopoverRoot.vue'\n\nconst props = defineProps<PopoverAnchorProps>()\n\nuseForwardExpose()\nconst rootContext = injectPopoverRootContext()\n\nonBeforeMount(() => {\n  rootContext.hasCustomAnchor.value = true\n})\nonUnmounted(() => {\n  rootContext.hasCustomAnchor.value = false\n})\n</script>\n\n<template>\n  <PopperAnchor v-bind=\"props\">\n    <slot />\n  </PopperAnchor>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverAnchorProps } from '..'\nimport { PopoverAnchor } from '..'\n\nexport interface DatePickerAnchorProps extends PopoverAnchorProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerAnchorProps>()\n</script>\n\n<template>\n  <PopoverAnchor v-bind=\"props\">\n    <slot />\n  </PopoverAnchor>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverAnchorProps } from '..'\nimport { PopoverAnchor } from '..'\n\nexport interface DatePickerAnchorProps extends PopoverAnchorProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerAnchorProps>()\n</script>\n\n<template>\n  <PopoverAnchor v-bind=\"props\">\n    <slot />\n  </PopoverAnchor>\n</template>\n","<script lang=\"ts\">\nimport type { PopperArrowProps } from '@/Popper'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PopoverArrowProps extends PopperArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { PopperArrow } from '@/Popper'\n\nconst props = withDefaults(defineProps<PopoverArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\nuseForwardExpose()\n</script>\n\n<template>\n  <PopperArrow v-bind=\"props\">\n    <slot />\n  </PopperArrow>\n</template>\n","<script lang=\"ts\">\nimport type { PopperArrowProps } from '@/Popper'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PopoverArrowProps extends PopperArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { PopperArrow } from '@/Popper'\n\nconst props = withDefaults(defineProps<PopoverArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\nuseForwardExpose()\n</script>\n\n<template>\n  <PopperArrow v-bind=\"props\">\n    <slot />\n  </PopperArrow>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverArrowProps } from '..'\nimport { PopoverArrow } from '..'\n\nexport interface DatePickerArrowProps extends PopoverArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerArrowProps>()\n</script>\n\n<template>\n  <PopoverArrow v-bind=\"props\">\n    <slot />\n  </PopoverArrow>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverArrowProps } from '..'\nimport { PopoverArrow } from '..'\n\nexport interface DatePickerArrowProps extends PopoverArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerArrowProps>()\n</script>\n\n<template>\n  <PopoverArrow v-bind=\"props\">\n    <slot />\n  </PopoverArrow>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\n\nimport type { Ref } from 'vue'\nimport type { CalendarRootProps, DateFieldRoot, DateFieldRootProps, PopoverRootEmits, PopoverRootProps } from '..'\nimport type { Matcher, WeekDayFormat, WeekStartsOn } from '@/date'\nimport type { DateStep, Granularity, HourCycle } from '@/shared/date'\nimport type { Direction } from '@/shared/types'\nimport { computed, ref, toRefs, watch } from 'vue'\nimport { getWeekStartsOn } from '@/date'\nimport { createContext, useDirection, useLocale } from '@/shared'\nimport { getDefaultDate } from '@/shared/date'\nimport { PopoverRoot } from '..'\n\ntype DatePickerRootContext = {\n  id: Ref<string | undefined>\n  name: Ref<string | undefined>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n  hourCycle: Ref<HourCycle | undefined>\n  granularity: Ref<Granularity | undefined>\n  hideTimeZone: Ref<boolean>\n  required: Ref<boolean>\n  locale: Ref<string>\n  dateFieldRef: Ref<InstanceType<typeof DateFieldRoot> | undefined>\n  modelValue: Ref<DateValue | undefined>\n  placeholder: Ref<DateValue>\n  pagedNavigation: Ref<boolean>\n  preventDeselect: Ref<boolean>\n  weekStartsOn: Ref<WeekStartsOn>\n  weekdayFormat: Ref<WeekDayFormat>\n  fixedWeeks: Ref<boolean>\n  numberOfMonths: Ref<number>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  isDateDisabled?: Matcher\n  isDateUnavailable?: Matcher\n  defaultOpen: Ref<boolean>\n  open: Ref<boolean>\n  modal: Ref<boolean>\n  onDateChange: (date: DateValue | undefined) => void\n  onPlaceholderChange: (date: DateValue) => void\n  dir: Ref<Direction>\n  step: Ref<DateStep | undefined>\n  closeOnSelect: Ref<boolean>\n}\n\nexport type DatePickerRootProps = Omit<DateFieldRootProps, 'as' | 'asChild'> & PopoverRootProps & Pick<CalendarRootProps, 'isDateDisabled' | 'pagedNavigation' | 'weekStartsOn' | 'weekdayFormat' | 'fixedWeeks' | 'numberOfMonths' | 'preventDeselect'> & {\n  /** Whether or not to close the popover on date select */\n  closeOnSelect?: boolean\n}\n\nexport type DatePickerRootEmits = PopoverRootEmits & {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateValue | undefined]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n}\n\nexport const [injectDatePickerRootContext, provideDatePickerRootContext]\n  = createContext<DatePickerRootContext>('DatePickerRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\n\ndefineOptions({\n  inheritAttrs: false,\n})\nconst props = withDefaults(defineProps<DatePickerRootProps>(), {\n  defaultValue: undefined,\n  defaultOpen: false,\n  open: undefined,\n  modal: false,\n  pagedNavigation: false,\n  preventDeselect: false,\n  weekdayFormat: 'narrow',\n  fixedWeeks: false,\n  numberOfMonths: 1,\n  disabled: false,\n  readonly: false,\n  placeholder: undefined,\n  isDateDisabled: undefined,\n  isDateUnavailable: undefined,\n  closeOnSelect: false,\n})\nconst emits = defineEmits<DatePickerRootEmits>()\nconst {\n  locale: propLocale,\n  disabled,\n  readonly,\n  pagedNavigation,\n  weekdayFormat,\n  fixedWeeks,\n  numberOfMonths,\n  preventDeselect,\n  isDateDisabled: propsIsDateDisabled,\n  isDateUnavailable: propsIsDateUnavailable,\n  defaultOpen,\n  modal,\n  id,\n  name,\n  required,\n  minValue,\n  maxValue,\n  granularity,\n  hideTimeZone,\n  hourCycle,\n  defaultValue,\n  dir: propDir,\n  step,\n  closeOnSelect,\n} = toRefs(props)\n\nconst dir = useDirection(propDir)\nconst locale = useLocale(propLocale)\nconst weekStartsOn = computed(() => props.weekStartsOn ?? getWeekStartsOn(locale.value))\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: defaultValue.value,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateValue | undefined>\n\nconst defaultDate = computed(() => getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  granularity: props.granularity,\n  defaultValue: modelValue.value,\n  locale: locale.value,\n}))\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.value.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nconst open = useVModel(props, 'open', emits, {\n  defaultValue: defaultOpen.value,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst dateFieldRef = ref<InstanceType<typeof DateFieldRoot> | undefined>()\n\n/**\n * Reset time fields on DateValue instances that support time granularity.\n */\nfunction resetTime(date: DateValue) {\n  if (!('hour' in date))\n    return date\n\n  return date.set({ hour: 0, minute: 0, second: 0, millisecond: 0 })\n}\n\nwatch(modelValue, (value) => {\n  if (value && value.compare(placeholder.value) !== 0) {\n    placeholder.value = value.copy()\n  }\n  else if (!value && 'hour' in placeholder.value) {\n    placeholder.value = resetTime(placeholder.value)\n  }\n  if (closeOnSelect.value) {\n    open.value = false\n  }\n})\n\nprovideDatePickerRootContext({\n  isDateUnavailable: propsIsDateUnavailable.value,\n  isDateDisabled: propsIsDateDisabled.value,\n  locale,\n  disabled,\n  pagedNavigation,\n  weekStartsOn,\n  weekdayFormat,\n  fixedWeeks,\n  numberOfMonths,\n  readonly,\n  preventDeselect,\n  modelValue,\n  placeholder,\n  defaultOpen,\n  modal,\n  open,\n  id,\n  name,\n  required,\n  minValue,\n  maxValue,\n  granularity,\n  hideTimeZone,\n  hourCycle,\n  dateFieldRef,\n  dir,\n  step,\n  onDateChange(date: DateValue | undefined) {\n    if (!date) {\n      modelValue.value = undefined\n    }\n    else if (!modelValue.value) {\n      modelValue.value = date.copy()\n    }\n    else if (!preventDeselect.value && date && modelValue.value.compare(date) === 0) {\n      modelValue.value = undefined\n    }\n    else {\n      modelValue.value = date.copy()\n    }\n  },\n  onPlaceholderChange(date: DateValue) {\n    placeholder.value = date.copy()\n  },\n  closeOnSelect,\n})\n</script>\n\n<template>\n  <PopoverRoot\n    v-model:open=\"open\"\n    :default-open=\"defaultOpen\"\n    :modal=\"modal\"\n  >\n    <slot />\n  </PopoverRoot>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\n\nimport type { Ref } from 'vue'\nimport type { CalendarRootProps, DateFieldRoot, DateFieldRootProps, PopoverRootEmits, PopoverRootProps } from '..'\nimport type { Matcher, WeekDayFormat, WeekStartsOn } from '@/date'\nimport type { DateStep, Granularity, HourCycle } from '@/shared/date'\nimport type { Direction } from '@/shared/types'\nimport { computed, ref, toRefs, watch } from 'vue'\nimport { getWeekStartsOn } from '@/date'\nimport { createContext, useDirection, useLocale } from '@/shared'\nimport { getDefaultDate } from '@/shared/date'\nimport { PopoverRoot } from '..'\n\ntype DatePickerRootContext = {\n  id: Ref<string | undefined>\n  name: Ref<string | undefined>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n  hourCycle: Ref<HourCycle | undefined>\n  granularity: Ref<Granularity | undefined>\n  hideTimeZone: Ref<boolean>\n  required: Ref<boolean>\n  locale: Ref<string>\n  dateFieldRef: Ref<InstanceType<typeof DateFieldRoot> | undefined>\n  modelValue: Ref<DateValue | undefined>\n  placeholder: Ref<DateValue>\n  pagedNavigation: Ref<boolean>\n  preventDeselect: Ref<boolean>\n  weekStartsOn: Ref<WeekStartsOn>\n  weekdayFormat: Ref<WeekDayFormat>\n  fixedWeeks: Ref<boolean>\n  numberOfMonths: Ref<number>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  isDateDisabled?: Matcher\n  isDateUnavailable?: Matcher\n  defaultOpen: Ref<boolean>\n  open: Ref<boolean>\n  modal: Ref<boolean>\n  onDateChange: (date: DateValue | undefined) => void\n  onPlaceholderChange: (date: DateValue) => void\n  dir: Ref<Direction>\n  step: Ref<DateStep | undefined>\n  closeOnSelect: Ref<boolean>\n}\n\nexport type DatePickerRootProps = Omit<DateFieldRootProps, 'as' | 'asChild'> & PopoverRootProps & Pick<CalendarRootProps, 'isDateDisabled' | 'pagedNavigation' | 'weekStartsOn' | 'weekdayFormat' | 'fixedWeeks' | 'numberOfMonths' | 'preventDeselect'> & {\n  /** Whether or not to close the popover on date select */\n  closeOnSelect?: boolean\n}\n\nexport type DatePickerRootEmits = PopoverRootEmits & {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateValue | undefined]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n}\n\nexport const [injectDatePickerRootContext, provideDatePickerRootContext]\n  = createContext<DatePickerRootContext>('DatePickerRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\n\ndefineOptions({\n  inheritAttrs: false,\n})\nconst props = withDefaults(defineProps<DatePickerRootProps>(), {\n  defaultValue: undefined,\n  defaultOpen: false,\n  open: undefined,\n  modal: false,\n  pagedNavigation: false,\n  preventDeselect: false,\n  weekdayFormat: 'narrow',\n  fixedWeeks: false,\n  numberOfMonths: 1,\n  disabled: false,\n  readonly: false,\n  placeholder: undefined,\n  isDateDisabled: undefined,\n  isDateUnavailable: undefined,\n  closeOnSelect: false,\n})\nconst emits = defineEmits<DatePickerRootEmits>()\nconst {\n  locale: propLocale,\n  disabled,\n  readonly,\n  pagedNavigation,\n  weekdayFormat,\n  fixedWeeks,\n  numberOfMonths,\n  preventDeselect,\n  isDateDisabled: propsIsDateDisabled,\n  isDateUnavailable: propsIsDateUnavailable,\n  defaultOpen,\n  modal,\n  id,\n  name,\n  required,\n  minValue,\n  maxValue,\n  granularity,\n  hideTimeZone,\n  hourCycle,\n  defaultValue,\n  dir: propDir,\n  step,\n  closeOnSelect,\n} = toRefs(props)\n\nconst dir = useDirection(propDir)\nconst locale = useLocale(propLocale)\nconst weekStartsOn = computed(() => props.weekStartsOn ?? getWeekStartsOn(locale.value))\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: defaultValue.value,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateValue | undefined>\n\nconst defaultDate = computed(() => getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  granularity: props.granularity,\n  defaultValue: modelValue.value,\n  locale: locale.value,\n}))\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.value.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nconst open = useVModel(props, 'open', emits, {\n  defaultValue: defaultOpen.value,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst dateFieldRef = ref<InstanceType<typeof DateFieldRoot> | undefined>()\n\n/**\n * Reset time fields on DateValue instances that support time granularity.\n */\nfunction resetTime(date: DateValue) {\n  if (!('hour' in date))\n    return date\n\n  return date.set({ hour: 0, minute: 0, second: 0, millisecond: 0 })\n}\n\nwatch(modelValue, (value) => {\n  if (value && value.compare(placeholder.value) !== 0) {\n    placeholder.value = value.copy()\n  }\n  else if (!value && 'hour' in placeholder.value) {\n    placeholder.value = resetTime(placeholder.value)\n  }\n  if (closeOnSelect.value) {\n    open.value = false\n  }\n})\n\nprovideDatePickerRootContext({\n  isDateUnavailable: propsIsDateUnavailable.value,\n  isDateDisabled: propsIsDateDisabled.value,\n  locale,\n  disabled,\n  pagedNavigation,\n  weekStartsOn,\n  weekdayFormat,\n  fixedWeeks,\n  numberOfMonths,\n  readonly,\n  preventDeselect,\n  modelValue,\n  placeholder,\n  defaultOpen,\n  modal,\n  open,\n  id,\n  name,\n  required,\n  minValue,\n  maxValue,\n  granularity,\n  hideTimeZone,\n  hourCycle,\n  dateFieldRef,\n  dir,\n  step,\n  onDateChange(date: DateValue | undefined) {\n    if (!date) {\n      modelValue.value = undefined\n    }\n    else if (!modelValue.value) {\n      modelValue.value = date.copy()\n    }\n    else if (!preventDeselect.value && date && modelValue.value.compare(date) === 0) {\n      modelValue.value = undefined\n    }\n    else {\n      modelValue.value = date.copy()\n    }\n  },\n  onPlaceholderChange(date: DateValue) {\n    placeholder.value = date.copy()\n  },\n  closeOnSelect,\n})\n</script>\n\n<template>\n  <PopoverRoot\n    v-model:open=\"open\"\n    :default-open=\"defaultOpen\"\n    :modal=\"modal\"\n  >\n    <slot />\n  </PopoverRoot>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport { isEqualDay } from '@internationalized/date'\nimport { CalendarRoot } from '..'\nimport { injectDatePickerRootContext } from './DatePickerRoot.vue'\n</script>\n\n<script setup lang=\"ts\">\nconst rootContext = injectDatePickerRootContext()\n</script>\n\n<template>\n  <CalendarRoot\n    v-slot=\"{ weekDays, grid, date, weekStartsOn, locale, fixedWeeks }\"\n    v-bind=\"{\n      isDateDisabled: rootContext.isDateDisabled,\n      isDateUnavailable: rootContext.isDateUnavailable,\n      minValue: rootContext.minValue.value,\n      maxValue: rootContext.maxValue.value,\n      locale: rootContext.locale.value,\n      disabled: rootContext.disabled.value,\n      pagedNavigation: rootContext.pagedNavigation.value,\n      weekStartsOn: rootContext.weekStartsOn.value,\n      weekdayFormat: rootContext.weekdayFormat.value,\n      fixedWeeks: rootContext.fixedWeeks.value,\n      numberOfMonths: rootContext.numberOfMonths.value,\n      readonly: rootContext.readonly.value,\n      preventDeselect: rootContext.preventDeselect.value,\n      dir: rootContext.dir.value,\n    }\"\n    :model-value=\"rootContext.modelValue.value\"\n    :placeholder=\"rootContext.placeholder.value\"\n    :multiple=\"false\"\n    @update:model-value=\"(date: DateValue | undefined) => {\n      if (date && rootContext.modelValue.value && isEqualDay(date, rootContext.modelValue.value)) return\n      rootContext.onDateChange(date)\n    }\"\n    @update:placeholder=\"(date: DateValue) => {\n      if (isEqualDay(date, rootContext.placeholder.value)) return\n      rootContext.onPlaceholderChange(date)\n    }\"\n  >\n    <slot\n      :date=\"date\"\n      :grid=\"grid\"\n      :week-days=\"weekDays\"\n      :week-starts-on=\"weekStartsOn\"\n      :locale=\"locale\"\n      :fixed-weeks=\"fixedWeeks\"\n    />\n  </CalendarRoot>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport { isEqualDay } from '@internationalized/date'\nimport { CalendarRoot } from '..'\nimport { injectDatePickerRootContext } from './DatePickerRoot.vue'\n</script>\n\n<script setup lang=\"ts\">\nconst rootContext = injectDatePickerRootContext()\n</script>\n\n<template>\n  <CalendarRoot\n    v-slot=\"{ weekDays, grid, date, weekStartsOn, locale, fixedWeeks }\"\n    v-bind=\"{\n      isDateDisabled: rootContext.isDateDisabled,\n      isDateUnavailable: rootContext.isDateUnavailable,\n      minValue: rootContext.minValue.value,\n      maxValue: rootContext.maxValue.value,\n      locale: rootContext.locale.value,\n      disabled: rootContext.disabled.value,\n      pagedNavigation: rootContext.pagedNavigation.value,\n      weekStartsOn: rootContext.weekStartsOn.value,\n      weekdayFormat: rootContext.weekdayFormat.value,\n      fixedWeeks: rootContext.fixedWeeks.value,\n      numberOfMonths: rootContext.numberOfMonths.value,\n      readonly: rootContext.readonly.value,\n      preventDeselect: rootContext.preventDeselect.value,\n      dir: rootContext.dir.value,\n    }\"\n    :model-value=\"rootContext.modelValue.value\"\n    :placeholder=\"rootContext.placeholder.value\"\n    :multiple=\"false\"\n    @update:model-value=\"(date: DateValue | undefined) => {\n      if (date && rootContext.modelValue.value && isEqualDay(date, rootContext.modelValue.value)) return\n      rootContext.onDateChange(date)\n    }\"\n    @update:placeholder=\"(date: DateValue) => {\n      if (isEqualDay(date, rootContext.placeholder.value)) return\n      rootContext.onPlaceholderChange(date)\n    }\"\n  >\n    <slot\n      :date=\"date\"\n      :grid=\"grid\"\n      :week-days=\"weekDays\"\n      :week-starts-on=\"weekStartsOn\"\n      :locale=\"locale\"\n      :fixed-weeks=\"fixedWeeks\"\n    />\n  </CalendarRoot>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarCellProps } from '..'\nimport { CalendarCell } from '..'\n\nexport interface DatePickerCellProps extends CalendarCellProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerCellProps>()\n</script>\n\n<template>\n  <CalendarCell v-bind=\"props\">\n    <slot />\n  </CalendarCell>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarCellProps } from '..'\nimport { CalendarCell } from '..'\n\nexport interface DatePickerCellProps extends CalendarCellProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerCellProps>()\n</script>\n\n<template>\n  <CalendarCell v-bind=\"props\">\n    <slot />\n  </CalendarCell>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarCellTriggerProps } from '..'\nimport type { CalendarCellTriggerSlot } from '@/Calendar/CalendarCellTrigger.vue'\nimport { CalendarCellTrigger } from '..'\n\nexport interface DatePickerCellTriggerProps extends CalendarCellTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerCellTriggerProps>()\ndefineSlots<CalendarCellTriggerSlot>()\n</script>\n\n<template>\n  <CalendarCellTrigger\n    v-slot=\"slotProps\"\n    v-bind=\"props\"\n  >\n    <slot v-bind=\"slotProps\" />\n  </CalendarCellTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarCellTriggerProps } from '..'\nimport type { CalendarCellTriggerSlot } from '@/Calendar/CalendarCellTrigger.vue'\nimport { CalendarCellTrigger } from '..'\n\nexport interface DatePickerCellTriggerProps extends CalendarCellTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerCellTriggerProps>()\ndefineSlots<CalendarCellTriggerSlot>()\n</script>\n\n<template>\n  <CalendarCellTrigger\n    v-slot=\"slotProps\"\n    v-bind=\"props\"\n  >\n    <slot v-bind=\"slotProps\" />\n  </CalendarCellTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PopoverCloseProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport {\n  injectPopoverRootContext,\n} from './PopoverRoot.vue'\n\nconst props = withDefaults(defineProps<PopoverCloseProps>(), {\n  as: 'button',\n})\n\nuseForwardExpose()\nconst rootContext = injectPopoverRootContext()\n</script>\n\n<template>\n  <Primitive\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :as=\"as\"\n    :as-child=\"props.asChild\"\n    @click=\"rootContext.onOpenChange(false)\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PopoverCloseProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport {\n  injectPopoverRootContext,\n} from './PopoverRoot.vue'\n\nconst props = withDefaults(defineProps<PopoverCloseProps>(), {\n  as: 'button',\n})\n\nuseForwardExpose()\nconst rootContext = injectPopoverRootContext()\n</script>\n\n<template>\n  <Primitive\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :as=\"as\"\n    :as-child=\"props.asChild\"\n    @click=\"rootContext.onOpenChange(false)\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverCloseProps } from '..'\nimport { PopoverClose } from '..'\n\nexport interface DatePickerCloseProps extends PopoverCloseProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerCloseProps>()\n</script>\n\n<template>\n  <PopoverClose v-bind=\"props\">\n    <slot />\n  </PopoverClose>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverCloseProps } from '..'\nimport { PopoverClose } from '..'\n\nexport interface DatePickerCloseProps extends PopoverCloseProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerCloseProps>()\n</script>\n\n<template>\n  <PopoverClose v-bind=\"props\">\n    <slot />\n  </PopoverClose>\n</template>\n","<script lang=\"ts\">\nimport type {\n  DismissableLayerEmits,\n  DismissableLayerProps,\n} from '@/DismissableLayer'\nimport type { FocusScopeProps } from '@/FocusScope'\nimport type { PopperContentProps } from '@/Popper'\nimport { reactiveOmit } from '@vueuse/shared'\n\nexport type PopoverContentImplEmits = DismissableLayerEmits & {\n  /**\n   * Event handler called when auto-focusing on open.\n   * Can be prevented.\n   */\n  openAutoFocus: [event: Event]\n  /**\n   * Event handler called when auto-focusing on close.\n   * Can be prevented.\n   */\n  closeAutoFocus: [event: Event]\n}\n\nexport interface PopoverContentImplProps extends PopperContentProps, DismissableLayerProps {}\n\ninterface PopoverContentImplPrivateProps extends PopoverContentImplProps {\n  /**\n   * Whether focus should be trapped within the `MenuContent`\n   * @defaultValue false\n   */\n  trapFocus?: FocusScopeProps['trapped']\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { DismissableLayer } from '@/DismissableLayer'\nimport { FocusScope } from '@/FocusScope'\nimport { PopperContent } from '@/Popper'\nimport { useFocusGuards, useForwardExpose, useForwardProps } from '@/shared'\nimport { injectPopoverRootContext } from './PopoverRoot.vue'\n\nconst props = defineProps<PopoverContentImplPrivateProps>()\nconst emits = defineEmits<PopoverContentImplEmits>()\n\nconst forwarded = useForwardProps(reactiveOmit(props, 'trapFocus', 'disableOutsidePointerEvents'))\nconst { forwardRef } = useForwardExpose()\n\nconst rootContext = injectPopoverRootContext()\nuseFocusGuards()\n</script>\n\n<template>\n  <FocusScope\n    as-child\n    loop\n    :trapped=\"trapFocus\"\n    @mount-auto-focus=\"emits('openAutoFocus', $event)\"\n    @unmount-auto-focus=\"emits('closeAutoFocus', $event)\"\n  >\n    <DismissableLayer\n      as-child\n      :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n      @pointer-down-outside=\"emits('pointerDownOutside', $event)\"\n      @interact-outside=\"emits('interactOutside', $event)\"\n      @escape-key-down=\"emits('escapeKeyDown', $event)\"\n      @focus-outside=\"emits('focusOutside', $event)\"\n      @dismiss=\"rootContext.onOpenChange(false)\"\n    >\n      <PopperContent\n        v-bind=\"forwarded\"\n        :id=\"rootContext.contentId\"\n        :ref=\"forwardRef\"\n        :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n        :aria-labelledby=\"rootContext.triggerId\"\n        :style=\"{\n          '--reka-popover-content-transform-origin':\n            'var(--reka-popper-transform-origin)',\n          '--reka-popover-content-available-width':\n            'var(--reka-popper-available-width)',\n          '--reka-popover-content-available-height':\n            'var(--reka-popper-available-height)',\n          '--reka-popover-trigger-width': 'var(--reka-popper-anchor-width)',\n          '--reka-popover-trigger-height': 'var(--reka-popper-anchor-height)',\n        }\"\n        role=\"dialog\"\n      >\n        <slot />\n      </PopperContent>\n    </DismissableLayer>\n  </FocusScope>\n</template>\n","<script lang=\"ts\">\nimport type {\n  DismissableLayerEmits,\n  DismissableLayerProps,\n} from '@/DismissableLayer'\nimport type { FocusScopeProps } from '@/FocusScope'\nimport type { PopperContentProps } from '@/Popper'\nimport { reactiveOmit } from '@vueuse/shared'\n\nexport type PopoverContentImplEmits = DismissableLayerEmits & {\n  /**\n   * Event handler called when auto-focusing on open.\n   * Can be prevented.\n   */\n  openAutoFocus: [event: Event]\n  /**\n   * Event handler called when auto-focusing on close.\n   * Can be prevented.\n   */\n  closeAutoFocus: [event: Event]\n}\n\nexport interface PopoverContentImplProps extends PopperContentProps, DismissableLayerProps {}\n\ninterface PopoverContentImplPrivateProps extends PopoverContentImplProps {\n  /**\n   * Whether focus should be trapped within the `MenuContent`\n   * @defaultValue false\n   */\n  trapFocus?: FocusScopeProps['trapped']\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { DismissableLayer } from '@/DismissableLayer'\nimport { FocusScope } from '@/FocusScope'\nimport { PopperContent } from '@/Popper'\nimport { useFocusGuards, useForwardExpose, useForwardProps } from '@/shared'\nimport { injectPopoverRootContext } from './PopoverRoot.vue'\n\nconst props = defineProps<PopoverContentImplPrivateProps>()\nconst emits = defineEmits<PopoverContentImplEmits>()\n\nconst forwarded = useForwardProps(reactiveOmit(props, 'trapFocus', 'disableOutsidePointerEvents'))\nconst { forwardRef } = useForwardExpose()\n\nconst rootContext = injectPopoverRootContext()\nuseFocusGuards()\n</script>\n\n<template>\n  <FocusScope\n    as-child\n    loop\n    :trapped=\"trapFocus\"\n    @mount-auto-focus=\"emits('openAutoFocus', $event)\"\n    @unmount-auto-focus=\"emits('closeAutoFocus', $event)\"\n  >\n    <DismissableLayer\n      as-child\n      :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n      @pointer-down-outside=\"emits('pointerDownOutside', $event)\"\n      @interact-outside=\"emits('interactOutside', $event)\"\n      @escape-key-down=\"emits('escapeKeyDown', $event)\"\n      @focus-outside=\"emits('focusOutside', $event)\"\n      @dismiss=\"rootContext.onOpenChange(false)\"\n    >\n      <PopperContent\n        v-bind=\"forwarded\"\n        :id=\"rootContext.contentId\"\n        :ref=\"forwardRef\"\n        :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n        :aria-labelledby=\"rootContext.triggerId\"\n        :style=\"{\n          '--reka-popover-content-transform-origin':\n            'var(--reka-popper-transform-origin)',\n          '--reka-popover-content-available-width':\n            'var(--reka-popper-available-width)',\n          '--reka-popover-content-available-height':\n            'var(--reka-popper-available-height)',\n          '--reka-popover-trigger-width': 'var(--reka-popper-anchor-width)',\n          '--reka-popover-trigger-height': 'var(--reka-popper-anchor-height)',\n        }\"\n        role=\"dialog\"\n      >\n        <slot />\n      </PopperContent>\n    </DismissableLayer>\n  </FocusScope>\n</template>\n","<script setup lang=\"ts\">\nimport type { PopoverContentImplEmits, PopoverContentImplProps } from './PopoverContentImpl.vue'\nimport { ref } from 'vue'\nimport { useForwardExpose, useForwardPropsEmits, useHideOthers } from '@/shared'\nimport { useBodyScrollLock } from '@/shared/useBodyScrollLock'\nimport PopoverContentImpl from './PopoverContentImpl.vue'\nimport { injectPopoverRootContext } from './PopoverRoot.vue'\n\nconst props = defineProps<PopoverContentImplProps>()\nconst emits = defineEmits<PopoverContentImplEmits>()\nconst rootContext = injectPopoverRootContext()\nconst isRightClickOutsideRef = ref(false)\n\nuseBodyScrollLock(true)\n\nconst forwarded = useForwardPropsEmits(props, emits)\n\nconst { forwardRef, currentElement } = useForwardExpose()\nuseHideOthers(currentElement)\n</script>\n\n<template>\n  <PopoverContentImpl\n    v-bind=\"forwarded\"\n    :ref=\"forwardRef\"\n    :trap-focus=\"rootContext.open.value\"\n    disable-outside-pointer-events\n    @close-auto-focus.prevent=\"\n      (event) => {\n        emits('closeAutoFocus', event);\n\n        if (!isRightClickOutsideRef) rootContext.triggerElement.value?.focus();\n      }\n    \"\n    @pointer-down-outside=\"\n      (event) => {\n        emits('pointerDownOutside', event);\n\n        const originalEvent = event.detail.originalEvent;\n        const ctrlLeftClick\n          = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n        const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n        isRightClickOutsideRef = isRightClick;\n      }\n    \"\n    @focus-outside.prevent\n  >\n    <slot />\n  </PopoverContentImpl>\n</template>\n","<script setup lang=\"ts\">\nimport type { PopoverContentImplEmits, PopoverContentImplProps } from './PopoverContentImpl.vue'\nimport { ref } from 'vue'\nimport { useForwardExpose, useForwardPropsEmits, useHideOthers } from '@/shared'\nimport { useBodyScrollLock } from '@/shared/useBodyScrollLock'\nimport PopoverContentImpl from './PopoverContentImpl.vue'\nimport { injectPopoverRootContext } from './PopoverRoot.vue'\n\nconst props = defineProps<PopoverContentImplProps>()\nconst emits = defineEmits<PopoverContentImplEmits>()\nconst rootContext = injectPopoverRootContext()\nconst isRightClickOutsideRef = ref(false)\n\nuseBodyScrollLock(true)\n\nconst forwarded = useForwardPropsEmits(props, emits)\n\nconst { forwardRef, currentElement } = useForwardExpose()\nuseHideOthers(currentElement)\n</script>\n\n<template>\n  <PopoverContentImpl\n    v-bind=\"forwarded\"\n    :ref=\"forwardRef\"\n    :trap-focus=\"rootContext.open.value\"\n    disable-outside-pointer-events\n    @close-auto-focus.prevent=\"\n      (event) => {\n        emits('closeAutoFocus', event);\n\n        if (!isRightClickOutsideRef) rootContext.triggerElement.value?.focus();\n      }\n    \"\n    @pointer-down-outside=\"\n      (event) => {\n        emits('pointerDownOutside', event);\n\n        const originalEvent = event.detail.originalEvent;\n        const ctrlLeftClick\n          = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n        const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n        isRightClickOutsideRef = isRightClick;\n      }\n    \"\n    @focus-outside.prevent\n  >\n    <slot />\n  </PopoverContentImpl>\n</template>\n","<script setup lang=\"ts\">\nimport type { PopoverContentImplEmits, PopoverContentImplProps } from './PopoverContentImpl.vue'\nimport { ref } from 'vue'\nimport { useForwardPropsEmits } from '@/shared'\nimport PopoverContentImpl from './PopoverContentImpl.vue'\nimport { injectPopoverRootContext } from './PopoverRoot.vue'\n\nconst props = defineProps<PopoverContentImplProps>()\nconst emits = defineEmits<PopoverContentImplEmits>()\nconst rootContext = injectPopoverRootContext()\nconst hasInteractedOutsideRef = ref(false)\nconst hasPointerDownOutsideRef = ref(false)\n\nconst forwarded = useForwardPropsEmits(props, emits)\n</script>\n\n<template>\n  <PopoverContentImpl\n    v-bind=\"forwarded\"\n    :trap-focus=\"false\"\n    :disable-outside-pointer-events=\"false\"\n    @close-auto-focus=\"\n      (event) => {\n        emits('closeAutoFocus', event);\n\n        if (!event.defaultPrevented) {\n          if (!hasInteractedOutsideRef) rootContext.triggerElement.value?.focus();\n          // Always prevent auto focus because we either focus manually or want user agent focus\n          event.preventDefault();\n        }\n\n        hasInteractedOutsideRef = false;\n        hasPointerDownOutsideRef = false;\n      }\n    \"\n    @interact-outside=\"\n      async (event) => {\n        emits('interactOutside', event);\n\n        if (!event.defaultPrevented) {\n          hasInteractedOutsideRef = true;\n          if (event.detail.originalEvent.type === 'pointerdown') {\n            hasPointerDownOutsideRef = true;\n          }\n        }\n\n        // Prevent dismissing when clicking the trigger.\n        // As the trigger is already setup to close, without doing so would\n        // cause it to close and immediately open.\n        const target = event.target as HTMLElement;\n        const targetIsTrigger = rootContext.triggerElement.value?.contains(target);\n        if (targetIsTrigger) event.preventDefault();\n\n        // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n        // we will get the pointer down outside event on the trigger, but then a subsequent\n        // focus outside event on the container, we ignore any focus outside event when we've\n        // already had a pointer down outside event.\n        if (\n          event.detail.originalEvent.type === 'focusin'\n          && hasPointerDownOutsideRef\n        ) {\n          event.preventDefault();\n        }\n      }\n    \"\n  >\n    <slot />\n  </PopoverContentImpl>\n</template>\n","<script setup lang=\"ts\">\nimport type { PopoverContentImplEmits, PopoverContentImplProps } from './PopoverContentImpl.vue'\nimport { ref } from 'vue'\nimport { useForwardPropsEmits } from '@/shared'\nimport PopoverContentImpl from './PopoverContentImpl.vue'\nimport { injectPopoverRootContext } from './PopoverRoot.vue'\n\nconst props = defineProps<PopoverContentImplProps>()\nconst emits = defineEmits<PopoverContentImplEmits>()\nconst rootContext = injectPopoverRootContext()\nconst hasInteractedOutsideRef = ref(false)\nconst hasPointerDownOutsideRef = ref(false)\n\nconst forwarded = useForwardPropsEmits(props, emits)\n</script>\n\n<template>\n  <PopoverContentImpl\n    v-bind=\"forwarded\"\n    :trap-focus=\"false\"\n    :disable-outside-pointer-events=\"false\"\n    @close-auto-focus=\"\n      (event) => {\n        emits('closeAutoFocus', event);\n\n        if (!event.defaultPrevented) {\n          if (!hasInteractedOutsideRef) rootContext.triggerElement.value?.focus();\n          // Always prevent auto focus because we either focus manually or want user agent focus\n          event.preventDefault();\n        }\n\n        hasInteractedOutsideRef = false;\n        hasPointerDownOutsideRef = false;\n      }\n    \"\n    @interact-outside=\"\n      async (event) => {\n        emits('interactOutside', event);\n\n        if (!event.defaultPrevented) {\n          hasInteractedOutsideRef = true;\n          if (event.detail.originalEvent.type === 'pointerdown') {\n            hasPointerDownOutsideRef = true;\n          }\n        }\n\n        // Prevent dismissing when clicking the trigger.\n        // As the trigger is already setup to close, without doing so would\n        // cause it to close and immediately open.\n        const target = event.target as HTMLElement;\n        const targetIsTrigger = rootContext.triggerElement.value?.contains(target);\n        if (targetIsTrigger) event.preventDefault();\n\n        // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n        // we will get the pointer down outside event on the trigger, but then a subsequent\n        // focus outside event on the container, we ignore any focus outside event when we've\n        // already had a pointer down outside event.\n        if (\n          event.detail.originalEvent.type === 'focusin'\n          && hasPointerDownOutsideRef\n        ) {\n          event.preventDefault();\n        }\n      }\n    \"\n  >\n    <slot />\n  </PopoverContentImpl>\n</template>\n","<script lang=\"ts\">\nimport type {\n  PopoverContentImplEmits,\n  PopoverContentImplProps,\n} from './PopoverContentImpl.vue'\n\nexport type PopoverContentEmits = PopoverContentImplEmits\n\nexport interface PopoverContentProps extends PopoverContentImplProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { useForwardExpose, useForwardPropsEmits, useId } from '@/shared'\nimport PopoverContentModal from './PopoverContentModal.vue'\nimport PopoverContentNonModal from './PopoverContentNonModal.vue'\nimport { injectPopoverRootContext } from './PopoverRoot.vue'\n\nconst props = defineProps<PopoverContentProps>()\nconst emits = defineEmits<PopoverContentEmits>()\n\nconst rootContext = injectPopoverRootContext()\n\nconst forwarded = useForwardPropsEmits(props, emits)\nconst { forwardRef } = useForwardExpose()\n\nrootContext.contentId ||= useId(undefined, 'reka-popover-content')\n</script>\n\n<template>\n  <Presence :present=\"forceMount || rootContext.open.value\">\n    <PopoverContentModal\n      v-if=\"rootContext.modal.value\"\n      v-bind=\"forwarded\"\n      :ref=\"forwardRef\"\n    >\n      <slot />\n    </PopoverContentModal>\n    <PopoverContentNonModal\n      v-else\n      v-bind=\"forwarded\"\n      :ref=\"forwardRef\"\n    >\n      <slot />\n    </PopoverContentNonModal>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type {\n  PopoverContentImplEmits,\n  PopoverContentImplProps,\n} from './PopoverContentImpl.vue'\n\nexport type PopoverContentEmits = PopoverContentImplEmits\n\nexport interface PopoverContentProps extends PopoverContentImplProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { useForwardExpose, useForwardPropsEmits, useId } from '@/shared'\nimport PopoverContentModal from './PopoverContentModal.vue'\nimport PopoverContentNonModal from './PopoverContentNonModal.vue'\nimport { injectPopoverRootContext } from './PopoverRoot.vue'\n\nconst props = defineProps<PopoverContentProps>()\nconst emits = defineEmits<PopoverContentEmits>()\n\nconst rootContext = injectPopoverRootContext()\n\nconst forwarded = useForwardPropsEmits(props, emits)\nconst { forwardRef } = useForwardExpose()\n\nrootContext.contentId ||= useId(undefined, 'reka-popover-content')\n</script>\n\n<template>\n  <Presence :present=\"forceMount || rootContext.open.value\">\n    <PopoverContentModal\n      v-if=\"rootContext.modal.value\"\n      v-bind=\"forwarded\"\n      :ref=\"forwardRef\"\n    >\n      <slot />\n    </PopoverContentModal>\n    <PopoverContentNonModal\n      v-else\n      v-bind=\"forwarded\"\n      :ref=\"forwardRef\"\n    >\n      <slot />\n    </PopoverContentNonModal>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface PopoverPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<PopoverPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface PopoverPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<PopoverPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverContentEmits, PopoverContentProps, PopoverPortalProps } from '..'\nimport { computed } from 'vue'\nimport { handleCalendarInitialFocus } from '@/shared/date'\nimport { PopoverContent, PopoverPortal, useForwardPropsEmits } from '..'\n\nexport interface DatePickerContentProps extends PopoverContentProps {\n  /**\n   * Props to control the portal wrapped around the content.\n   */\n  portal?: PopoverPortalProps\n}\nexport interface DatePickerContentEmits extends PopoverContentEmits {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerContentProps>()\nconst emits = defineEmits<DatePickerContentEmits>()\n\nconst propsToForward = computed(() => ({\n  ...props,\n  portal: undefined,\n}))\nconst forwarded = useForwardPropsEmits(propsToForward, emits)\n</script>\n\n<template>\n  <PopoverPortal v-bind=\"portal\">\n    <PopoverContent\n      v-bind=\"{ ...forwarded, ...$attrs }\"\n      @open-auto-focus=\"event => {\n        emits('openAutoFocus', event)\n\n        if (!event.defaultPrevented && event.target) {\n          handleCalendarInitialFocus(event.target as HTMLElement)\n          event.preventDefault()\n        }\n      }\"\n    >\n      <slot />\n    </PopoverContent>\n  </PopoverPortal>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverContentEmits, PopoverContentProps, PopoverPortalProps } from '..'\nimport { computed } from 'vue'\nimport { handleCalendarInitialFocus } from '@/shared/date'\nimport { PopoverContent, PopoverPortal, useForwardPropsEmits } from '..'\n\nexport interface DatePickerContentProps extends PopoverContentProps {\n  /**\n   * Props to control the portal wrapped around the content.\n   */\n  portal?: PopoverPortalProps\n}\nexport interface DatePickerContentEmits extends PopoverContentEmits {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerContentProps>()\nconst emits = defineEmits<DatePickerContentEmits>()\n\nconst propsToForward = computed(() => ({\n  ...props,\n  portal: undefined,\n}))\nconst forwarded = useForwardPropsEmits(propsToForward, emits)\n</script>\n\n<template>\n  <PopoverPortal v-bind=\"portal\">\n    <PopoverContent\n      v-bind=\"{ ...forwarded, ...$attrs }\"\n      @open-auto-focus=\"event => {\n        emits('openAutoFocus', event)\n\n        if (!event.defaultPrevented && event.target) {\n          handleCalendarInitialFocus(event.target as HTMLElement)\n          event.preventDefault()\n        }\n      }\"\n    >\n      <slot />\n    </PopoverContent>\n  </PopoverPortal>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport { DateFieldRoot } from '..'\nimport { injectDatePickerRootContext } from './DatePickerRoot.vue'\n</script>\n\n<script setup lang=\"ts\">\nconst rootContext = injectDatePickerRootContext()\n</script>\n\n<template>\n  <DateFieldRoot\n    v-slot=\"{ segments, modelValue }\"\n    :ref=\"rootContext.dateFieldRef\"\n    :model-value=\"rootContext.modelValue.value\"\n    :placeholder=\"rootContext.placeholder.value\"\n    v-bind=\"{\n      id: rootContext.id.value,\n      name: rootContext.name.value,\n      disabled: rootContext.disabled.value,\n      minValue: rootContext.minValue.value,\n      maxValue: rootContext.maxValue.value,\n      readonly: rootContext.readonly.value,\n      hourCycle: rootContext.hourCycle.value,\n      granularity: rootContext.granularity.value,\n      hideTimeZone: rootContext.hideTimeZone.value,\n      locale: rootContext.locale.value,\n      isDateUnavailable: rootContext.isDateUnavailable,\n      required: rootContext.required.value,\n      dir: rootContext.dir.value,\n      step: rootContext.step.value,\n    }\"\n    @update:model-value=\"(date: DateValue | undefined) => {\n      if (date && rootContext.modelValue.value && date.compare(rootContext.modelValue.value) === 0) return\n      rootContext.onDateChange(date)\n    }\"\n    @update:placeholder=\"(date: DateValue) => {\n      if (date.compare(rootContext.placeholder.value) === 0) return\n      rootContext.onPlaceholderChange(date)\n    }\"\n  >\n    <slot\n      :segments=\"segments\"\n      :model-value=\"modelValue\"\n    />\n  </DateFieldRoot>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport { DateFieldRoot } from '..'\nimport { injectDatePickerRootContext } from './DatePickerRoot.vue'\n</script>\n\n<script setup lang=\"ts\">\nconst rootContext = injectDatePickerRootContext()\n</script>\n\n<template>\n  <DateFieldRoot\n    v-slot=\"{ segments, modelValue }\"\n    :ref=\"rootContext.dateFieldRef\"\n    :model-value=\"rootContext.modelValue.value\"\n    :placeholder=\"rootContext.placeholder.value\"\n    v-bind=\"{\n      id: rootContext.id.value,\n      name: rootContext.name.value,\n      disabled: rootContext.disabled.value,\n      minValue: rootContext.minValue.value,\n      maxValue: rootContext.maxValue.value,\n      readonly: rootContext.readonly.value,\n      hourCycle: rootContext.hourCycle.value,\n      granularity: rootContext.granularity.value,\n      hideTimeZone: rootContext.hideTimeZone.value,\n      locale: rootContext.locale.value,\n      isDateUnavailable: rootContext.isDateUnavailable,\n      required: rootContext.required.value,\n      dir: rootContext.dir.value,\n      step: rootContext.step.value,\n    }\"\n    @update:model-value=\"(date: DateValue | undefined) => {\n      if (date && rootContext.modelValue.value && date.compare(rootContext.modelValue.value) === 0) return\n      rootContext.onDateChange(date)\n    }\"\n    @update:placeholder=\"(date: DateValue) => {\n      if (date.compare(rootContext.placeholder.value) === 0) return\n      rootContext.onPlaceholderChange(date)\n    }\"\n  >\n    <slot\n      :segments=\"segments\"\n      :model-value=\"modelValue\"\n    />\n  </DateFieldRoot>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarGridProps } from '..'\nimport { CalendarGrid } from '..'\n\nexport interface DatePickerGridProps extends CalendarGridProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerGridProps>()\n</script>\n\n<template>\n  <CalendarGrid v-bind=\"props\">\n    <slot />\n  </CalendarGrid>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarGridProps } from '..'\nimport { CalendarGrid } from '..'\n\nexport interface DatePickerGridProps extends CalendarGridProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerGridProps>()\n</script>\n\n<template>\n  <CalendarGrid v-bind=\"props\">\n    <slot />\n  </CalendarGrid>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarGridBodyProps } from '..'\nimport { CalendarGridBody } from '..'\n\nexport interface DatePickerGridBodyProps extends CalendarGridBodyProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerGridBodyProps>()\n</script>\n\n<template>\n  <CalendarGridBody v-bind=\"props\">\n    <slot />\n  </CalendarGridBody>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarGridBodyProps } from '..'\nimport { CalendarGridBody } from '..'\n\nexport interface DatePickerGridBodyProps extends CalendarGridBodyProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerGridBodyProps>()\n</script>\n\n<template>\n  <CalendarGridBody v-bind=\"props\">\n    <slot />\n  </CalendarGridBody>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarGridHeadProps } from '..'\nimport { CalendarGridHead } from '..'\n\nexport interface DatePickerGridHeadProps extends CalendarGridHeadProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerGridHeadProps>()\n</script>\n\n<template>\n  <CalendarGridHead v-bind=\"props\">\n    <slot />\n  </CalendarGridHead>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarGridHeadProps } from '..'\nimport { CalendarGridHead } from '..'\n\nexport interface DatePickerGridHeadProps extends CalendarGridHeadProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerGridHeadProps>()\n</script>\n\n<template>\n  <CalendarGridHead v-bind=\"props\">\n    <slot />\n  </CalendarGridHead>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarGridRowProps } from '..'\nimport { CalendarGridRow } from '..'\n\nexport interface DatePickerGridRowProps extends CalendarGridRowProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerGridRowProps>()\n</script>\n\n<template>\n  <CalendarGridRow v-bind=\"props\">\n    <slot />\n  </CalendarGridRow>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarGridRowProps } from '..'\nimport { CalendarGridRow } from '..'\n\nexport interface DatePickerGridRowProps extends CalendarGridRowProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerGridRowProps>()\n</script>\n\n<template>\n  <CalendarGridRow v-bind=\"props\">\n    <slot />\n  </CalendarGridRow>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarHeadCellProps } from '..'\nimport { CalendarHeadCell } from '..'\n\nexport interface DatePickerHeadCellProps extends CalendarHeadCellProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerHeadCellProps>()\n</script>\n\n<template>\n  <CalendarHeadCell v-bind=\"props\">\n    <slot />\n  </CalendarHeadCell>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarHeadCellProps } from '..'\nimport { CalendarHeadCell } from '..'\n\nexport interface DatePickerHeadCellProps extends CalendarHeadCellProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerHeadCellProps>()\n</script>\n\n<template>\n  <CalendarHeadCell v-bind=\"props\">\n    <slot />\n  </CalendarHeadCell>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarHeaderProps } from '..'\nimport { CalendarHeader } from '..'\n\nexport interface DatePickerHeaderProps extends CalendarHeaderProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerHeaderProps>()\n</script>\n\n<template>\n  <CalendarHeader v-bind=\"props\">\n    <slot />\n  </CalendarHeader>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarHeaderProps } from '..'\nimport { CalendarHeader } from '..'\n\nexport interface DatePickerHeaderProps extends CalendarHeaderProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerHeaderProps>()\n</script>\n\n<template>\n  <CalendarHeader v-bind=\"props\">\n    <slot />\n  </CalendarHeader>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarHeadingProps } from '..'\nimport { CalendarHeading } from '..'\n\nexport interface DatePickerHeadingProps extends CalendarHeadingProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerHeadingProps>()\ndefineSlots<{\n  default?: (props: {\n    /** Current month and year */\n    headingValue: string\n  }) => any\n}>()\n</script>\n\n<template>\n  <CalendarHeading\n    v-slot=\"{ headingValue }\"\n    v-bind=\"props\"\n  >\n    <slot :heading-value=\"headingValue\">\n      {{ headingValue }}\n    </slot>\n  </CalendarHeading>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarHeadingProps } from '..'\nimport { CalendarHeading } from '..'\n\nexport interface DatePickerHeadingProps extends CalendarHeadingProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerHeadingProps>()\ndefineSlots<{\n  default?: (props: {\n    /** Current month and year */\n    headingValue: string\n  }) => any\n}>()\n</script>\n\n<template>\n  <CalendarHeading\n    v-slot=\"{ headingValue }\"\n    v-bind=\"props\"\n  >\n    <slot :heading-value=\"headingValue\">\n      {{ headingValue }}\n    </slot>\n  </CalendarHeading>\n</template>\n","<script lang=\"ts\">\nimport type { DateFieldInputProps } from '..'\nimport { DateFieldInput } from '..'\n\nexport interface DatePickerInputProps extends DateFieldInputProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerInputProps>()\n</script>\n\n<template>\n  <DateFieldInput v-bind=\"props\">\n    <slot />\n  </DateFieldInput>\n</template>\n","<script lang=\"ts\">\nimport type { DateFieldInputProps } from '..'\nimport { DateFieldInput } from '..'\n\nexport interface DatePickerInputProps extends DateFieldInputProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerInputProps>()\n</script>\n\n<template>\n  <DateFieldInput v-bind=\"props\">\n    <slot />\n  </DateFieldInput>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarNextProps } from '..'\nimport type { CalendarNextSlot } from '@/Calendar/CalendarNext.vue'\nimport { CalendarNext } from '..'\n\nexport interface DatePickerNextProps extends CalendarNextProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerNextProps>()\n\ndefineSlots<CalendarNextSlot>()\n</script>\n\n<template>\n  <CalendarNext\n    v-slot=\"slotProps\"\n    v-bind=\"props\"\n  >\n    <slot v-bind=\"slotProps\" />\n  </CalendarNext>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarNextProps } from '..'\nimport type { CalendarNextSlot } from '@/Calendar/CalendarNext.vue'\nimport { CalendarNext } from '..'\n\nexport interface DatePickerNextProps extends CalendarNextProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerNextProps>()\n\ndefineSlots<CalendarNextSlot>()\n</script>\n\n<template>\n  <CalendarNext\n    v-slot=\"slotProps\"\n    v-bind=\"props\"\n  >\n    <slot v-bind=\"slotProps\" />\n  </CalendarNext>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarPrevProps } from '..'\nimport type { CalendarPrevSlot } from '@/Calendar/CalendarPrev.vue'\nimport { CalendarPrev } from '..'\n\nexport interface DatePickerPrevProps extends CalendarPrevProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerPrevProps>()\ndefineSlots<CalendarPrevSlot>()\n</script>\n\n<template>\n  <CalendarPrev\n    v-slot=\"slotProps\"\n    v-bind=\"props\"\n  >\n    <slot v-bind=\"slotProps\" />\n  </CalendarPrev>\n</template>\n","<script lang=\"ts\">\nimport type { CalendarPrevProps } from '..'\nimport type { CalendarPrevSlot } from '@/Calendar/CalendarPrev.vue'\nimport { CalendarPrev } from '..'\n\nexport interface DatePickerPrevProps extends CalendarPrevProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerPrevProps>()\ndefineSlots<CalendarPrevSlot>()\n</script>\n\n<template>\n  <CalendarPrev\n    v-slot=\"slotProps\"\n    v-bind=\"props\"\n  >\n    <slot v-bind=\"slotProps\" />\n  </CalendarPrev>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose, useId } from '@/shared'\n\nexport interface PopoverTriggerProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted } from 'vue'\nimport { PopperAnchor } from '@/Popper'\nimport { Primitive } from '@/Primitive'\nimport { injectPopoverRootContext } from './PopoverRoot.vue'\n\nconst props = withDefaults(defineProps<PopoverTriggerProps>(), {\n  as: 'button',\n})\n\nconst rootContext = injectPopoverRootContext()\n\nconst { forwardRef, currentElement: triggerElement } = useForwardExpose()\n\nrootContext.triggerId ||= useId(undefined, 'reka-popover-trigger')\nonMounted(() => {\n  rootContext.triggerElement.value = triggerElement.value\n})\n</script>\n\n<template>\n  <component\n    :is=\"rootContext.hasCustomAnchor.value ? Primitive : PopperAnchor\"\n    as-child\n  >\n    <Primitive\n      :id=\"rootContext.triggerId\"\n      :ref=\"forwardRef\"\n      :type=\"as === 'button' ? 'button' : undefined\"\n      aria-haspopup=\"dialog\"\n      :aria-expanded=\"rootContext.open.value\"\n      :aria-controls=\"rootContext.contentId\"\n      :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n      :as=\"as\"\n      :as-child=\"props.asChild\"\n      @click=\"rootContext.onOpenToggle\"\n    >\n      <slot />\n    </Primitive>\n  </component>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose, useId } from '@/shared'\n\nexport interface PopoverTriggerProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted } from 'vue'\nimport { PopperAnchor } from '@/Popper'\nimport { Primitive } from '@/Primitive'\nimport { injectPopoverRootContext } from './PopoverRoot.vue'\n\nconst props = withDefaults(defineProps<PopoverTriggerProps>(), {\n  as: 'button',\n})\n\nconst rootContext = injectPopoverRootContext()\n\nconst { forwardRef, currentElement: triggerElement } = useForwardExpose()\n\nrootContext.triggerId ||= useId(undefined, 'reka-popover-trigger')\nonMounted(() => {\n  rootContext.triggerElement.value = triggerElement.value\n})\n</script>\n\n<template>\n  <component\n    :is=\"rootContext.hasCustomAnchor.value ? Primitive : PopperAnchor\"\n    as-child\n  >\n    <Primitive\n      :id=\"rootContext.triggerId\"\n      :ref=\"forwardRef\"\n      :type=\"as === 'button' ? 'button' : undefined\"\n      aria-haspopup=\"dialog\"\n      :aria-expanded=\"rootContext.open.value\"\n      :aria-controls=\"rootContext.contentId\"\n      :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n      :as=\"as\"\n      :as-child=\"props.asChild\"\n      @click=\"rootContext.onOpenToggle\"\n    >\n      <slot />\n    </Primitive>\n  </component>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverTriggerProps } from '..'\nimport { PopoverTrigger } from '..'\nimport { injectDatePickerRootContext } from './DatePickerRoot.vue'\n\nexport interface DatePickerTriggerProps extends PopoverTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerTriggerProps>()\nconst rootContext = injectDatePickerRootContext()\n</script>\n\n<template>\n  <PopoverTrigger\n    data-reka-date-field-segment=\"trigger\"\n    v-bind=\"props\"\n    :disabled=\"rootContext.disabled.value\"\n    @focusin=\"(e: FocusEvent) => {\n      rootContext.dateFieldRef.value?.setFocusedElement(e.target as HTMLElement)\n    }\"\n  >\n    <slot />\n  </PopoverTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverTriggerProps } from '..'\nimport { PopoverTrigger } from '..'\nimport { injectDatePickerRootContext } from './DatePickerRoot.vue'\n\nexport interface DatePickerTriggerProps extends PopoverTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DatePickerTriggerProps>()\nconst rootContext = injectDatePickerRootContext()\n</script>\n\n<template>\n  <PopoverTrigger\n    data-reka-date-field-segment=\"trigger\"\n    v-bind=\"props\"\n    :disabled=\"rootContext.disabled.value\"\n    @focusin=\"(e: FocusEvent) => {\n      rootContext.dateFieldRef.value?.setFocusedElement(e.target as HTMLElement)\n    }\"\n  >\n    <slot />\n  </PopoverTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\n\nimport type { Ref } from 'vue'\nimport type { Matcher } from '@/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Formatter } from '@/shared'\nimport type { DateRange, DateStep, Granularity, HourCycle, SegmentPart, SegmentValueObj } from '@/shared/date'\nimport type { Direction, FormFieldProps } from '@/shared/types'\nimport {\n  areAllDaysBetweenValid,\n  hasTime,\n  isBefore,\n  isBeforeOrSame,\n} from '@/date'\nimport { createContext, useDateFormatter, useDirection, useKbd, useLocale } from '@/shared'\nimport {\n  createContent,\n  getDefaultDate,\n  getSegmentElements,\n  initializeSegmentValues,\n  isSegmentNavigationKey,\n  normalizeDateStep,\n  normalizeHourCycle,\n\n  syncSegmentValues,\n} from '@/shared/date'\n\nexport type DateRangeType = 'start' | 'end'\n\ntype DateRangeFieldRootContext = {\n  locale: Ref<string>\n  startValue: Ref<DateValue | undefined>\n  endValue: Ref<DateValue | undefined>\n  placeholder: Ref<DateValue>\n  isDateUnavailable?: Matcher\n  isInvalid: Ref<boolean>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  formatter: Formatter\n  hourCycle: HourCycle\n  step: Ref<DateStep>\n  segmentValues: Record<DateRangeType, Ref<SegmentValueObj>>\n  segmentContents: Ref<{ start: { part: SegmentPart, value: string }[], end: { part: SegmentPart, value: string }[] }>\n  elements: Ref<Set<HTMLElement>>\n  focusNext: () => void\n  setFocusedElement: (el: HTMLElement) => void\n}\n\nexport interface DateRangeFieldRootProps extends PrimitiveProps, FormFieldProps {\n  /** The default value for the calendar */\n  defaultValue?: DateRange\n  /** The default placeholder date */\n  defaultPlaceholder?: DateValue\n  /** The placeholder date, which is used to determine what month to display when no date is selected. This updates as the user navigates the calendar and can be used to programmatically control the calendar view */\n  placeholder?: DateValue\n  /** The controlled value of the field. Can be bound as `v-model`. */\n  modelValue?: DateRange | null\n  /** The hour cycle used for formatting times. Defaults to the local preference */\n  hourCycle?: HourCycle\n  /** The stepping interval for the time fields. Defaults to `1`. */\n  step?: DateStep\n  /** The granularity to use for formatting times. Defaults to day if a CalendarDate is provided, otherwise defaults to minute. The field will render segments for each part of the date up to and including the specified granularity */\n  granularity?: Granularity\n  /** Whether or not to hide the time zone segment of the field */\n  hideTimeZone?: boolean\n  /** The maximum date that can be selected */\n  maxValue?: DateValue\n  /** The minimum date that can be selected */\n  minValue?: DateValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** Whether or not the date field is disabled */\n  disabled?: boolean\n  /** Whether or not the date field is readonly */\n  readonly?: boolean\n  /** A function that returns whether or not a date is unavailable */\n  isDateUnavailable?: Matcher\n  /** Id of the element */\n  id?: string\n  /** The reading direction of the date field when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n}\n\nexport type DateRangeFieldRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateRange]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n}\n\nexport const [injectDateRangeFieldRootContext, provideDateRangeFieldRootContext]\n  = createContext<DateRangeFieldRootContext>('DateRangeFieldRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, nextTick, onMounted, ref, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { VisuallyHidden } from '@/VisuallyHidden'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<DateRangeFieldRootProps>(), {\n  defaultValue: undefined,\n  disabled: false,\n  readonly: false,\n  placeholder: undefined,\n  isDateUnavailable: undefined,\n})\nconst emits = defineEmits<DateRangeFieldRootEmits>()\ndefineSlots<{\n  default?: (props: {\n    /** The current date range of the field */\n    modelValue: DateRange | null\n    /** The date field segment contents */\n    segments: { start: { part: SegmentPart, value: string }[], end: { part: SegmentPart, value: string }[] }\n    /** Value if the input is invalid */\n    isInvalid: boolean\n  }) => any\n}>()\nconst { disabled, readonly, isDateUnavailable: propsIsDateUnavailable, dir: propDir, locale: propLocale } = toRefs(props)\nconst locale = useLocale(propLocale)\nconst dir = useDirection(propDir)\n\nconst formatter = useDateFormatter(locale.value, {\n  hourCycle: normalizeHourCycle(props.hourCycle),\n})\nconst { primitiveElement, currentElement: parentElement }\n  = usePrimitiveElement()\nconst segmentElements = ref<Set<HTMLElement>>(new Set())\n\nonMounted(() => {\n  getSegmentElements(parentElement.value).forEach(item => segmentElements.value.add(item as HTMLElement))\n})\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? { start: undefined, end: undefined },\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateRange | null>\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  granularity: props.granularity,\n  defaultValue: modelValue.value?.start,\n  locale: props.locale,\n})\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nconst step = computed(() => normalizeDateStep(props))\n\nconst inferredGranularity = computed(() => {\n  if (props.granularity)\n    return !hasTime(placeholder.value) ? 'day' : props.granularity\n\n  return hasTime(placeholder.value) ? 'minute' : 'day'\n})\n\nconst isStartInvalid = computed(() => {\n  if (!modelValue.value?.start)\n    return false\n\n  if (propsIsDateUnavailable.value?.(modelValue.value.start))\n    return true\n\n  if (props.minValue && isBefore(modelValue.value.start, props.minValue))\n    return true\n\n  if (props.maxValue && isBefore(props.maxValue, modelValue.value.start))\n    return true\n\n  return false\n})\n\nconst isEndInvalid = computed(() => {\n  if (!modelValue.value?.end)\n    return false\n\n  if (propsIsDateUnavailable.value?.(modelValue.value.end))\n    return true\n\n  if (props.minValue && isBefore(modelValue.value.end, props.minValue))\n    return true\n\n  if (props.maxValue && isBefore(props.maxValue, modelValue.value.end))\n    return true\n\n  return false\n})\n\nconst isInvalid = computed(() => {\n  if (isStartInvalid.value || isEndInvalid.value)\n    return true\n\n  if (!modelValue.value?.start || !modelValue.value?.end)\n    return false\n\n  if (!isBeforeOrSame(modelValue.value.start, modelValue.value.end))\n    return true\n\n  if (propsIsDateUnavailable.value !== undefined) {\n    const allValid = areAllDaysBetweenValid(\n      modelValue.value.start,\n      modelValue.value.end,\n      propsIsDateUnavailable.value,\n      undefined,\n    )\n    if (!allValid)\n      return true\n  }\n  return false\n})\n\nconst initialSegments = initializeSegmentValues(inferredGranularity.value)\n\nconst startSegmentValues = ref<SegmentValueObj>(modelValue.value?.start ? { ...syncSegmentValues({ value: modelValue.value.start, formatter }) } : { ...initialSegments })\nconst endSegmentValues = ref<SegmentValueObj>(modelValue.value?.end ? { ...syncSegmentValues({ value: modelValue.value.end, formatter }) } : { ...initialSegments })\n\nconst startSegmentContent = computed(() => createContent({\n  granularity: inferredGranularity.value,\n  dateRef: placeholder.value,\n  formatter,\n  hideTimeZone: props.hideTimeZone,\n  hourCycle: props.hourCycle,\n  segmentValues: startSegmentValues.value,\n  locale,\n}))\n\nconst endSegmentContent = computed(() => createContent({\n  granularity: inferredGranularity.value,\n  dateRef: placeholder.value,\n  formatter,\n  hideTimeZone: props.hideTimeZone,\n  hourCycle: props.hourCycle,\n  segmentValues: endSegmentValues.value,\n  locale,\n}))\n\nconst segmentContents = computed(() => ({\n  start: startSegmentContent.value.arr,\n  end: endSegmentContent.value.arr,\n}))\n\nconst editableSegmentContents = computed(() => ({ start: segmentContents.value.start.filter(({ part }) => part !== 'literal'), end: segmentContents.value.end.filter(({ part }) => part !== 'literal') }))\n\nconst startValue = ref(modelValue.value?.start?.copy()) as Ref<DateValue | undefined>\nconst endValue = ref(modelValue.value?.end?.copy()) as Ref<DateValue | undefined>\n\nwatch([startValue, endValue], ([_startValue, _endValue]) => {\n  modelValue.value = { start: _startValue?.copy(), end: _endValue?.copy() }\n})\n\nwatch(modelValue, (_modelValue) => {\n  const isStartChanged = _modelValue?.start && startValue.value\n    ? _modelValue.start.compare(startValue.value) !== 0\n    : _modelValue?.start !== startValue.value\n  if (isStartChanged) {\n    startValue.value = _modelValue?.start?.copy()\n  }\n\n  const isEndChanged = _modelValue?.end && endValue.value\n    ? _modelValue.end.compare(endValue.value) !== 0\n    : _modelValue?.end !== endValue.value\n  if (isEndChanged) {\n    endValue.value = _modelValue?.end?.copy()\n  }\n})\n\nwatch([startValue, locale], ([_startValue]) => {\n  if (_startValue !== undefined) {\n    startSegmentValues.value = { ...syncSegmentValues({ value: _startValue, formatter }) }\n  }\n  // If segment has null value, means that user modified it, thus do not reset the segmentValues\n  else if (Object.values(startSegmentValues.value).every(value => value !== null) && _startValue === undefined) {\n    startSegmentValues.value = { ...initialSegments }\n  }\n})\n\nwatch(locale, (value) => {\n  if (formatter.getLocale() !== value) {\n    formatter.setLocale(value)\n    // Locale changed, so we need to clear the segment elements and re-get them (different order)\n    // Get the focusable elements again on the next tick\n    nextTick(() => {\n      segmentElements.value.clear()\n      getSegmentElements(parentElement.value).forEach(item => segmentElements.value.add(item as HTMLElement))\n    })\n  }\n})\n\nwatch(modelValue, (_modelValue) => {\n  if (_modelValue && _modelValue.start !== undefined && placeholder.value.compare(_modelValue.start) !== 0)\n    placeholder.value = _modelValue.start.copy()\n})\n\nwatch([endValue, locale], ([_endValue]) => {\n  if (_endValue !== undefined) {\n    endSegmentValues.value = { ...syncSegmentValues({ value: _endValue, formatter }) }\n  }\n  // If segment has null value, means that user modified it, thus do not reset the segmentValues\n  else if (Object.values(endSegmentValues.value).every(value => value !== null) && _endValue === undefined) {\n    endSegmentValues.value = { ...initialSegments }\n  }\n})\n\nconst currentFocusedElement = ref<HTMLElement | null>(null)\n\nconst currentSegmentIndex = computed(() => Array.from(segmentElements.value).findIndex(el =>\n  el.getAttribute('data-reka-date-field-segment') === currentFocusedElement.value?.getAttribute('data-reka-date-field-segment')\n  && el.getAttribute('data-reka-date-range-field-segment-type') === currentFocusedElement.value?.getAttribute('data-reka-date-range-field-segment-type')))\n\nconst nextFocusableSegment = computed(() => {\n  const sign = dir.value === 'rtl' ? -1 : 1\n  const nextCondition = sign < 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1\n  if (nextCondition)\n    return null\n  const segmentToFocus = Array.from(segmentElements.value)[currentSegmentIndex.value + sign]\n  return segmentToFocus\n})\n\nconst prevFocusableSegment = computed(() => {\n  const sign = dir.value === 'rtl' ? -1 : 1\n  const prevCondition = sign > 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1\n  if (prevCondition)\n    return null\n\n  const segmentToFocus = Array.from(segmentElements.value)[currentSegmentIndex.value - sign]\n  return segmentToFocus\n})\n\nconst kbd = useKbd()\n\nfunction handleKeydown(e: KeyboardEvent) {\n  // Don't navigate between segments mid-composition, arrow keys are used for IME candidate navigation\n  if (e.isComposing)\n    return\n  if (!isSegmentNavigationKey(e.key))\n    return\n  if (e.key === kbd.ARROW_LEFT)\n    prevFocusableSegment.value?.focus()\n  if (e.key === kbd.ARROW_RIGHT)\n    nextFocusableSegment.value?.focus()\n}\n\nfunction setFocusedElement(el: HTMLElement) {\n  currentFocusedElement.value = el\n}\n\nprovideDateRangeFieldRootContext({\n  isDateUnavailable: propsIsDateUnavailable.value,\n  locale,\n  startValue,\n  endValue,\n  placeholder,\n  disabled,\n  formatter,\n  hourCycle: props.hourCycle,\n  step,\n  readonly,\n  segmentValues: { start: startSegmentValues, end: endSegmentValues },\n  isInvalid,\n  segmentContents: editableSegmentContents,\n  elements: segmentElements,\n  setFocusedElement,\n  focusNext() {\n    nextFocusableSegment.value?.focus()\n  },\n})\n\ndefineExpose({\n  setFocusedElement,\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    ref=\"primitiveElement\"\n    role=\"group\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n    @keydown.left.right=\"handleKeydown\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :segments=\"segmentContents\"\n      :is-invalid=\"isInvalid\"\n    />\n\n    <VisuallyHidden\n      :id=\"id\"\n      as=\"input\"\n      feature=\"focusable\"\n      tabindex=\"-1\"\n      :value=\"`${modelValue?.start?.toString()} - ${modelValue?.end?.toString()}`\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n      @focus=\"Array.from(segmentElements)?.[0]?.focus()\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\n\nimport type { Ref } from 'vue'\nimport type { Matcher } from '@/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Formatter } from '@/shared'\nimport type { DateRange, DateStep, Granularity, HourCycle, SegmentPart, SegmentValueObj } from '@/shared/date'\nimport type { Direction, FormFieldProps } from '@/shared/types'\nimport {\n  areAllDaysBetweenValid,\n  hasTime,\n  isBefore,\n  isBeforeOrSame,\n} from '@/date'\nimport { createContext, useDateFormatter, useDirection, useKbd, useLocale } from '@/shared'\nimport {\n  createContent,\n  getDefaultDate,\n  getSegmentElements,\n  initializeSegmentValues,\n  isSegmentNavigationKey,\n  normalizeDateStep,\n  normalizeHourCycle,\n\n  syncSegmentValues,\n} from '@/shared/date'\n\nexport type DateRangeType = 'start' | 'end'\n\ntype DateRangeFieldRootContext = {\n  locale: Ref<string>\n  startValue: Ref<DateValue | undefined>\n  endValue: Ref<DateValue | undefined>\n  placeholder: Ref<DateValue>\n  isDateUnavailable?: Matcher\n  isInvalid: Ref<boolean>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  formatter: Formatter\n  hourCycle: HourCycle\n  step: Ref<DateStep>\n  segmentValues: Record<DateRangeType, Ref<SegmentValueObj>>\n  segmentContents: Ref<{ start: { part: SegmentPart, value: string }[], end: { part: SegmentPart, value: string }[] }>\n  elements: Ref<Set<HTMLElement>>\n  focusNext: () => void\n  setFocusedElement: (el: HTMLElement) => void\n}\n\nexport interface DateRangeFieldRootProps extends PrimitiveProps, FormFieldProps {\n  /** The default value for the calendar */\n  defaultValue?: DateRange\n  /** The default placeholder date */\n  defaultPlaceholder?: DateValue\n  /** The placeholder date, which is used to determine what month to display when no date is selected. This updates as the user navigates the calendar and can be used to programmatically control the calendar view */\n  placeholder?: DateValue\n  /** The controlled value of the field. Can be bound as `v-model`. */\n  modelValue?: DateRange | null\n  /** The hour cycle used for formatting times. Defaults to the local preference */\n  hourCycle?: HourCycle\n  /** The stepping interval for the time fields. Defaults to `1`. */\n  step?: DateStep\n  /** The granularity to use for formatting times. Defaults to day if a CalendarDate is provided, otherwise defaults to minute. The field will render segments for each part of the date up to and including the specified granularity */\n  granularity?: Granularity\n  /** Whether or not to hide the time zone segment of the field */\n  hideTimeZone?: boolean\n  /** The maximum date that can be selected */\n  maxValue?: DateValue\n  /** The minimum date that can be selected */\n  minValue?: DateValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** Whether or not the date field is disabled */\n  disabled?: boolean\n  /** Whether or not the date field is readonly */\n  readonly?: boolean\n  /** A function that returns whether or not a date is unavailable */\n  isDateUnavailable?: Matcher\n  /** Id of the element */\n  id?: string\n  /** The reading direction of the date field when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n}\n\nexport type DateRangeFieldRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateRange]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n}\n\nexport const [injectDateRangeFieldRootContext, provideDateRangeFieldRootContext]\n  = createContext<DateRangeFieldRootContext>('DateRangeFieldRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, nextTick, onMounted, ref, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { VisuallyHidden } from '@/VisuallyHidden'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<DateRangeFieldRootProps>(), {\n  defaultValue: undefined,\n  disabled: false,\n  readonly: false,\n  placeholder: undefined,\n  isDateUnavailable: undefined,\n})\nconst emits = defineEmits<DateRangeFieldRootEmits>()\ndefineSlots<{\n  default?: (props: {\n    /** The current date range of the field */\n    modelValue: DateRange | null\n    /** The date field segment contents */\n    segments: { start: { part: SegmentPart, value: string }[], end: { part: SegmentPart, value: string }[] }\n    /** Value if the input is invalid */\n    isInvalid: boolean\n  }) => any\n}>()\nconst { disabled, readonly, isDateUnavailable: propsIsDateUnavailable, dir: propDir, locale: propLocale } = toRefs(props)\nconst locale = useLocale(propLocale)\nconst dir = useDirection(propDir)\n\nconst formatter = useDateFormatter(locale.value, {\n  hourCycle: normalizeHourCycle(props.hourCycle),\n})\nconst { primitiveElement, currentElement: parentElement }\n  = usePrimitiveElement()\nconst segmentElements = ref<Set<HTMLElement>>(new Set())\n\nonMounted(() => {\n  getSegmentElements(parentElement.value).forEach(item => segmentElements.value.add(item as HTMLElement))\n})\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? { start: undefined, end: undefined },\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateRange | null>\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  granularity: props.granularity,\n  defaultValue: modelValue.value?.start,\n  locale: props.locale,\n})\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nconst step = computed(() => normalizeDateStep(props))\n\nconst inferredGranularity = computed(() => {\n  if (props.granularity)\n    return !hasTime(placeholder.value) ? 'day' : props.granularity\n\n  return hasTime(placeholder.value) ? 'minute' : 'day'\n})\n\nconst isStartInvalid = computed(() => {\n  if (!modelValue.value?.start)\n    return false\n\n  if (propsIsDateUnavailable.value?.(modelValue.value.start))\n    return true\n\n  if (props.minValue && isBefore(modelValue.value.start, props.minValue))\n    return true\n\n  if (props.maxValue && isBefore(props.maxValue, modelValue.value.start))\n    return true\n\n  return false\n})\n\nconst isEndInvalid = computed(() => {\n  if (!modelValue.value?.end)\n    return false\n\n  if (propsIsDateUnavailable.value?.(modelValue.value.end))\n    return true\n\n  if (props.minValue && isBefore(modelValue.value.end, props.minValue))\n    return true\n\n  if (props.maxValue && isBefore(props.maxValue, modelValue.value.end))\n    return true\n\n  return false\n})\n\nconst isInvalid = computed(() => {\n  if (isStartInvalid.value || isEndInvalid.value)\n    return true\n\n  if (!modelValue.value?.start || !modelValue.value?.end)\n    return false\n\n  if (!isBeforeOrSame(modelValue.value.start, modelValue.value.end))\n    return true\n\n  if (propsIsDateUnavailable.value !== undefined) {\n    const allValid = areAllDaysBetweenValid(\n      modelValue.value.start,\n      modelValue.value.end,\n      propsIsDateUnavailable.value,\n      undefined,\n    )\n    if (!allValid)\n      return true\n  }\n  return false\n})\n\nconst initialSegments = initializeSegmentValues(inferredGranularity.value)\n\nconst startSegmentValues = ref<SegmentValueObj>(modelValue.value?.start ? { ...syncSegmentValues({ value: modelValue.value.start, formatter }) } : { ...initialSegments })\nconst endSegmentValues = ref<SegmentValueObj>(modelValue.value?.end ? { ...syncSegmentValues({ value: modelValue.value.end, formatter }) } : { ...initialSegments })\n\nconst startSegmentContent = computed(() => createContent({\n  granularity: inferredGranularity.value,\n  dateRef: placeholder.value,\n  formatter,\n  hideTimeZone: props.hideTimeZone,\n  hourCycle: props.hourCycle,\n  segmentValues: startSegmentValues.value,\n  locale,\n}))\n\nconst endSegmentContent = computed(() => createContent({\n  granularity: inferredGranularity.value,\n  dateRef: placeholder.value,\n  formatter,\n  hideTimeZone: props.hideTimeZone,\n  hourCycle: props.hourCycle,\n  segmentValues: endSegmentValues.value,\n  locale,\n}))\n\nconst segmentContents = computed(() => ({\n  start: startSegmentContent.value.arr,\n  end: endSegmentContent.value.arr,\n}))\n\nconst editableSegmentContents = computed(() => ({ start: segmentContents.value.start.filter(({ part }) => part !== 'literal'), end: segmentContents.value.end.filter(({ part }) => part !== 'literal') }))\n\nconst startValue = ref(modelValue.value?.start?.copy()) as Ref<DateValue | undefined>\nconst endValue = ref(modelValue.value?.end?.copy()) as Ref<DateValue | undefined>\n\nwatch([startValue, endValue], ([_startValue, _endValue]) => {\n  modelValue.value = { start: _startValue?.copy(), end: _endValue?.copy() }\n})\n\nwatch(modelValue, (_modelValue) => {\n  const isStartChanged = _modelValue?.start && startValue.value\n    ? _modelValue.start.compare(startValue.value) !== 0\n    : _modelValue?.start !== startValue.value\n  if (isStartChanged) {\n    startValue.value = _modelValue?.start?.copy()\n  }\n\n  const isEndChanged = _modelValue?.end && endValue.value\n    ? _modelValue.end.compare(endValue.value) !== 0\n    : _modelValue?.end !== endValue.value\n  if (isEndChanged) {\n    endValue.value = _modelValue?.end?.copy()\n  }\n})\n\nwatch([startValue, locale], ([_startValue]) => {\n  if (_startValue !== undefined) {\n    startSegmentValues.value = { ...syncSegmentValues({ value: _startValue, formatter }) }\n  }\n  // If segment has null value, means that user modified it, thus do not reset the segmentValues\n  else if (Object.values(startSegmentValues.value).every(value => value !== null) && _startValue === undefined) {\n    startSegmentValues.value = { ...initialSegments }\n  }\n})\n\nwatch(locale, (value) => {\n  if (formatter.getLocale() !== value) {\n    formatter.setLocale(value)\n    // Locale changed, so we need to clear the segment elements and re-get them (different order)\n    // Get the focusable elements again on the next tick\n    nextTick(() => {\n      segmentElements.value.clear()\n      getSegmentElements(parentElement.value).forEach(item => segmentElements.value.add(item as HTMLElement))\n    })\n  }\n})\n\nwatch(modelValue, (_modelValue) => {\n  if (_modelValue && _modelValue.start !== undefined && placeholder.value.compare(_modelValue.start) !== 0)\n    placeholder.value = _modelValue.start.copy()\n})\n\nwatch([endValue, locale], ([_endValue]) => {\n  if (_endValue !== undefined) {\n    endSegmentValues.value = { ...syncSegmentValues({ value: _endValue, formatter }) }\n  }\n  // If segment has null value, means that user modified it, thus do not reset the segmentValues\n  else if (Object.values(endSegmentValues.value).every(value => value !== null) && _endValue === undefined) {\n    endSegmentValues.value = { ...initialSegments }\n  }\n})\n\nconst currentFocusedElement = ref<HTMLElement | null>(null)\n\nconst currentSegmentIndex = computed(() => Array.from(segmentElements.value).findIndex(el =>\n  el.getAttribute('data-reka-date-field-segment') === currentFocusedElement.value?.getAttribute('data-reka-date-field-segment')\n  && el.getAttribute('data-reka-date-range-field-segment-type') === currentFocusedElement.value?.getAttribute('data-reka-date-range-field-segment-type')))\n\nconst nextFocusableSegment = computed(() => {\n  const sign = dir.value === 'rtl' ? -1 : 1\n  const nextCondition = sign < 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1\n  if (nextCondition)\n    return null\n  const segmentToFocus = Array.from(segmentElements.value)[currentSegmentIndex.value + sign]\n  return segmentToFocus\n})\n\nconst prevFocusableSegment = computed(() => {\n  const sign = dir.value === 'rtl' ? -1 : 1\n  const prevCondition = sign > 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1\n  if (prevCondition)\n    return null\n\n  const segmentToFocus = Array.from(segmentElements.value)[currentSegmentIndex.value - sign]\n  return segmentToFocus\n})\n\nconst kbd = useKbd()\n\nfunction handleKeydown(e: KeyboardEvent) {\n  // Don't navigate between segments mid-composition, arrow keys are used for IME candidate navigation\n  if (e.isComposing)\n    return\n  if (!isSegmentNavigationKey(e.key))\n    return\n  if (e.key === kbd.ARROW_LEFT)\n    prevFocusableSegment.value?.focus()\n  if (e.key === kbd.ARROW_RIGHT)\n    nextFocusableSegment.value?.focus()\n}\n\nfunction setFocusedElement(el: HTMLElement) {\n  currentFocusedElement.value = el\n}\n\nprovideDateRangeFieldRootContext({\n  isDateUnavailable: propsIsDateUnavailable.value,\n  locale,\n  startValue,\n  endValue,\n  placeholder,\n  disabled,\n  formatter,\n  hourCycle: props.hourCycle,\n  step,\n  readonly,\n  segmentValues: { start: startSegmentValues, end: endSegmentValues },\n  isInvalid,\n  segmentContents: editableSegmentContents,\n  elements: segmentElements,\n  setFocusedElement,\n  focusNext() {\n    nextFocusableSegment.value?.focus()\n  },\n})\n\ndefineExpose({\n  setFocusedElement,\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    ref=\"primitiveElement\"\n    role=\"group\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n    @keydown.left.right=\"handleKeydown\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :segments=\"segmentContents\"\n      :is-invalid=\"isInvalid\"\n    />\n\n    <VisuallyHidden\n      :id=\"id\"\n      as=\"input\"\n      feature=\"focusable\"\n      tabindex=\"-1\"\n      :value=\"`${modelValue?.start?.toString()} - ${modelValue?.end?.toString()}`\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n      @focus=\"Array.from(segmentElements)?.[0]?.focus()\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateRangeType } from './DateRangeFieldRoot.vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { SegmentPart } from '@/shared/date'\nimport { computed, ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useDateField } from '@/shared/date/useDateField'\nimport { injectDateRangeFieldRootContext } from './DateRangeFieldRoot.vue'\n\nexport interface DateRangeFieldInputProps extends PrimitiveProps {\n  /** The part of the date to render */\n  part: SegmentPart\n  /** The type of field to render (start or end) */\n  type: DateRangeType\n}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangeFieldInputProps>()\n\nconst rootContext = injectDateRangeFieldRootContext()\n\nconst hasLeftFocus = ref(true)\nconst lastKeyZero = ref(false)\n\nconst {\n  handleSegmentClick,\n  handleSegmentKeydown,\n  handleSegmentBeforeInput,\n  handleSegmentCompositionStart,\n  handleSegmentCompositionEnd,\n  attributes,\n} = useDateField({\n  hasLeftFocus,\n  lastKeyZero,\n  placeholder: rootContext.placeholder,\n  hourCycle: rootContext.hourCycle,\n  step: rootContext.step,\n  segmentValues: rootContext.segmentValues[props.type],\n  formatter: rootContext.formatter,\n  part: props.part,\n  disabled: rootContext.disabled,\n  readonly: rootContext.readonly,\n  focusNext: rootContext.focusNext,\n  modelValue: props.type === 'start' ? rootContext.startValue : rootContext.endValue,\n})\n\nconst disabled = computed(() => rootContext.disabled.value)\nconst readonly = computed(() => rootContext.readonly.value)\nconst isInvalid = computed(() => rootContext.isInvalid.value)\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    v-bind=\"attributes\"\n    :contenteditable=\"disabled || readonly ? false : part !== 'literal'\"\n    :data-reka-date-field-segment=\"part\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :aria-readonly=\"readonly ? true : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-reka-date-range-field-segment-type=\"type\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :aria-invalid=\"isInvalid ? true : undefined\"\n    v-on=\"part !== 'literal' ? {\n      mousedown: handleSegmentClick,\n      keydown: handleSegmentKeydown,\n      beforeinput: handleSegmentBeforeInput,\n      compositionstart: handleSegmentCompositionStart,\n      compositionend: handleSegmentCompositionEnd,\n      focusout: () => { hasLeftFocus = true },\n      focusin: (e: FocusEvent) => {\n        rootContext.setFocusedElement(e.target as HTMLElement)\n      },\n    } : {}\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateRangeType } from './DateRangeFieldRoot.vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { SegmentPart } from '@/shared/date'\nimport { computed, ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useDateField } from '@/shared/date/useDateField'\nimport { injectDateRangeFieldRootContext } from './DateRangeFieldRoot.vue'\n\nexport interface DateRangeFieldInputProps extends PrimitiveProps {\n  /** The part of the date to render */\n  part: SegmentPart\n  /** The type of field to render (start or end) */\n  type: DateRangeType\n}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangeFieldInputProps>()\n\nconst rootContext = injectDateRangeFieldRootContext()\n\nconst hasLeftFocus = ref(true)\nconst lastKeyZero = ref(false)\n\nconst {\n  handleSegmentClick,\n  handleSegmentKeydown,\n  handleSegmentBeforeInput,\n  handleSegmentCompositionStart,\n  handleSegmentCompositionEnd,\n  attributes,\n} = useDateField({\n  hasLeftFocus,\n  lastKeyZero,\n  placeholder: rootContext.placeholder,\n  hourCycle: rootContext.hourCycle,\n  step: rootContext.step,\n  segmentValues: rootContext.segmentValues[props.type],\n  formatter: rootContext.formatter,\n  part: props.part,\n  disabled: rootContext.disabled,\n  readonly: rootContext.readonly,\n  focusNext: rootContext.focusNext,\n  modelValue: props.type === 'start' ? rootContext.startValue : rootContext.endValue,\n})\n\nconst disabled = computed(() => rootContext.disabled.value)\nconst readonly = computed(() => rootContext.readonly.value)\nconst isInvalid = computed(() => rootContext.isInvalid.value)\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    v-bind=\"attributes\"\n    :contenteditable=\"disabled || readonly ? false : part !== 'literal'\"\n    :data-reka-date-field-segment=\"part\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :aria-readonly=\"readonly ? true : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-reka-date-range-field-segment-type=\"type\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :aria-invalid=\"isInvalid ? true : undefined\"\n    v-on=\"part !== 'literal' ? {\n      mousedown: handleSegmentClick,\n      keydown: handleSegmentKeydown,\n      beforeinput: handleSegmentBeforeInput,\n      compositionstart: handleSegmentCompositionStart,\n      compositionend: handleSegmentCompositionEnd,\n      focusout: () => { hasLeftFocus = true },\n      focusin: (e: FocusEvent) => {\n        rootContext.setFocusedElement(e.target as HTMLElement)\n      },\n    } : {}\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverAnchorProps } from '..'\nimport { PopoverAnchor } from '..'\n\nexport interface DateRangePickerAnchorProps extends PopoverAnchorProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerAnchorProps>()\n</script>\n\n<template>\n  <PopoverAnchor v-bind=\"props\">\n    <slot />\n  </PopoverAnchor>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverAnchorProps } from '..'\nimport { PopoverAnchor } from '..'\n\nexport interface DateRangePickerAnchorProps extends PopoverAnchorProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerAnchorProps>()\n</script>\n\n<template>\n  <PopoverAnchor v-bind=\"props\">\n    <slot />\n  </PopoverAnchor>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverArrowProps } from '..'\nimport { PopoverArrow } from '..'\n\nexport interface DateRangePickerArrowProps extends PopoverArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerArrowProps>()\n</script>\n\n<template>\n  <PopoverArrow v-bind=\"props\">\n    <slot />\n  </PopoverArrow>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverArrowProps } from '..'\nimport { PopoverArrow } from '..'\n\nexport interface DateRangePickerArrowProps extends PopoverArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerArrowProps>()\n</script>\n\n<template>\n  <PopoverArrow v-bind=\"props\">\n    <slot />\n  </PopoverArrow>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\n\nimport type { Ref } from 'vue'\nimport type { DateRangeFieldRoot, DateRangeFieldRootProps, PopoverRootEmits, PopoverRootProps, RangeCalendarRootProps } from '..'\nimport type { Matcher, WeekDayFormat, WeekStartsOn } from '@/date'\nimport type { DateRange, DateStep, Granularity, HourCycle } from '@/shared/date'\n\nimport type { Direction } from '@/shared/types'\nimport { getWeekStartsOn } from '@/date'\nimport { createContext, useDirection, useLocale } from '@/shared'\nimport { getDefaultDate } from '@/shared/date'\nimport { PopoverRoot } from '..'\n\ntype DateRangePickerRootContext = {\n  id: Ref<string | undefined>\n  name: Ref<string | undefined>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n  hourCycle: Ref<HourCycle | undefined>\n  granularity: Ref<Granularity | undefined>\n  hideTimeZone: Ref<boolean>\n  required: Ref<boolean>\n  locale: Ref<string>\n  dateFieldRef: Ref<InstanceType<typeof DateRangeFieldRoot> | undefined>\n  modelValue: Ref<{ start: DateValue | undefined, end: DateValue | undefined }>\n  placeholder: Ref<DateValue>\n  pagedNavigation: Ref<boolean>\n  preventDeselect: Ref<boolean>\n  weekStartsOn: Ref<WeekStartsOn>\n  weekdayFormat: Ref<WeekDayFormat>\n  fixedWeeks: Ref<boolean>\n  numberOfMonths: Ref<number>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  isDateDisabled?: Matcher\n  isDateUnavailable?: Matcher\n  isDateHighlightable?: Matcher\n  defaultOpen: Ref<boolean>\n  open: Ref<boolean>\n  modal: Ref<boolean>\n  onDateChange: (date: DateRange) => void\n  onPlaceholderChange: (date: DateValue) => void\n  onStartValueChange: (date: DateValue | undefined) => void\n  dir: Ref<Direction>\n  allowNonContiguousRanges: Ref<boolean>\n  fixedDate: Ref<'start' | 'end' | undefined>\n  maximumDays?: Ref<number | undefined>\n  step: Ref<DateStep | undefined>\n  closeOnSelect?: Ref<boolean>\n}\n\nexport type DateRangePickerRootProps = Omit<DateRangeFieldRootProps, 'as' | 'asChild'> & PopoverRootProps & Pick<RangeCalendarRootProps, 'isDateDisabled' | 'pagedNavigation' | 'weekStartsOn' | 'weekdayFormat' | 'fixedWeeks' | 'numberOfMonths' | 'preventDeselect' | 'isDateUnavailable' | 'isDateHighlightable' | 'allowNonContiguousRanges' | 'fixedDate' | 'maximumDays'> & {\n  /** Whether or not to close the popover on range select */\n  closeOnSelect?: boolean\n}\n\nexport type DateRangePickerRootEmits = PopoverRootEmits & {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateRange]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n  /** Event handler called whenever the start value changes */\n  'update:startValue': [date: DateValue | undefined]\n}\n\nexport const [injectDateRangePickerRootContext, provideDateRangePickerRootContext]\n  = createContext<DateRangePickerRootContext>('DateRangePickerRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref, toRefs, watch } from 'vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\nconst props = withDefaults(defineProps<DateRangePickerRootProps>(), {\n  defaultValue: () => ({ start: undefined, end: undefined }),\n  defaultOpen: false,\n  open: undefined,\n  modal: false,\n  pagedNavigation: false,\n  preventDeselect: false,\n  weekdayFormat: 'narrow',\n  fixedWeeks: false,\n  numberOfMonths: 1,\n  disabled: false,\n  readonly: false,\n  placeholder: undefined,\n  isDateDisabled: undefined,\n  isDateUnavailable: undefined,\n  isDateHighlightable: undefined,\n  allowNonContiguousRanges: false,\n  maximumDays: undefined,\n  closeOnSelect: false,\n})\nconst emits = defineEmits<DateRangePickerRootEmits>()\nconst {\n  locale: propLocale,\n  disabled,\n  readonly,\n  pagedNavigation,\n  weekdayFormat,\n  fixedWeeks,\n  numberOfMonths,\n  preventDeselect,\n  isDateDisabled: propsIsDateDisabled,\n  isDateUnavailable: propsIsDateUnavailable,\n  isDateHighlightable: propsIsDateHighlightable,\n  defaultOpen,\n  modal,\n  id,\n  name,\n  required,\n  minValue,\n  maxValue,\n  granularity,\n  hideTimeZone,\n  hourCycle,\n  dir: propsDir,\n  allowNonContiguousRanges,\n  fixedDate,\n  maximumDays,\n  step,\n  closeOnSelect,\n} = toRefs(props)\n\nconst dir = useDirection(propsDir)\nconst locale = useLocale(propLocale)\nconst weekStartsOn = computed(() => props.weekStartsOn ?? getWeekStartsOn(locale.value))\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? { start: undefined, end: undefined },\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateRange>\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  granularity: props.granularity,\n  defaultValue: modelValue.value?.start,\n  locale: locale.value,\n})\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nconst open = useVModel(props, 'open', emits, {\n  defaultValue: defaultOpen.value,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst dateFieldRef = ref<InstanceType<typeof DateRangeFieldRoot> | undefined>()\n\nwatch(modelValue, (value) => {\n  if (value && value.start && value.start.compare(placeholder.value) !== 0) {\n    placeholder.value = value.start.copy()\n  }\n\n  if (value.start && value.end) {\n    if (closeOnSelect.value) {\n      open.value = false\n    }\n  }\n})\n\nprovideDateRangePickerRootContext({\n  allowNonContiguousRanges,\n  isDateUnavailable: propsIsDateUnavailable.value,\n  isDateDisabled: propsIsDateDisabled.value,\n  isDateHighlightable: propsIsDateHighlightable.value,\n  locale,\n  disabled,\n  pagedNavigation,\n  weekStartsOn,\n  weekdayFormat,\n  fixedWeeks,\n  numberOfMonths,\n  readonly,\n  preventDeselect,\n  modelValue,\n  placeholder,\n  defaultOpen,\n  modal,\n  open,\n  id,\n  name,\n  required,\n  minValue,\n  maxValue,\n  granularity,\n  hideTimeZone,\n  hourCycle,\n  dateFieldRef,\n  dir,\n  fixedDate,\n  maximumDays,\n  step,\n  onStartValueChange(date: DateValue | undefined) {\n    emits('update:startValue', date)\n  },\n  onDateChange(date: DateRange) {\n    modelValue.value = { start: date.start?.copy(), end: date.end?.copy() }\n  },\n  onPlaceholderChange(date: DateValue) {\n    placeholder.value = date.copy()\n  },\n  closeOnSelect,\n})\n</script>\n\n<template>\n  <PopoverRoot\n    v-model:open=\"open\"\n    :default-open=\"defaultOpen\"\n    :modal=\"modal\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :open=\"open\"\n    />\n  </PopoverRoot>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\n\nimport type { Ref } from 'vue'\nimport type { DateRangeFieldRoot, DateRangeFieldRootProps, PopoverRootEmits, PopoverRootProps, RangeCalendarRootProps } from '..'\nimport type { Matcher, WeekDayFormat, WeekStartsOn } from '@/date'\nimport type { DateRange, DateStep, Granularity, HourCycle } from '@/shared/date'\n\nimport type { Direction } from '@/shared/types'\nimport { getWeekStartsOn } from '@/date'\nimport { createContext, useDirection, useLocale } from '@/shared'\nimport { getDefaultDate } from '@/shared/date'\nimport { PopoverRoot } from '..'\n\ntype DateRangePickerRootContext = {\n  id: Ref<string | undefined>\n  name: Ref<string | undefined>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n  hourCycle: Ref<HourCycle | undefined>\n  granularity: Ref<Granularity | undefined>\n  hideTimeZone: Ref<boolean>\n  required: Ref<boolean>\n  locale: Ref<string>\n  dateFieldRef: Ref<InstanceType<typeof DateRangeFieldRoot> | undefined>\n  modelValue: Ref<{ start: DateValue | undefined, end: DateValue | undefined }>\n  placeholder: Ref<DateValue>\n  pagedNavigation: Ref<boolean>\n  preventDeselect: Ref<boolean>\n  weekStartsOn: Ref<WeekStartsOn>\n  weekdayFormat: Ref<WeekDayFormat>\n  fixedWeeks: Ref<boolean>\n  numberOfMonths: Ref<number>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  isDateDisabled?: Matcher\n  isDateUnavailable?: Matcher\n  isDateHighlightable?: Matcher\n  defaultOpen: Ref<boolean>\n  open: Ref<boolean>\n  modal: Ref<boolean>\n  onDateChange: (date: DateRange) => void\n  onPlaceholderChange: (date: DateValue) => void\n  onStartValueChange: (date: DateValue | undefined) => void\n  dir: Ref<Direction>\n  allowNonContiguousRanges: Ref<boolean>\n  fixedDate: Ref<'start' | 'end' | undefined>\n  maximumDays?: Ref<number | undefined>\n  step: Ref<DateStep | undefined>\n  closeOnSelect?: Ref<boolean>\n}\n\nexport type DateRangePickerRootProps = Omit<DateRangeFieldRootProps, 'as' | 'asChild'> & PopoverRootProps & Pick<RangeCalendarRootProps, 'isDateDisabled' | 'pagedNavigation' | 'weekStartsOn' | 'weekdayFormat' | 'fixedWeeks' | 'numberOfMonths' | 'preventDeselect' | 'isDateUnavailable' | 'isDateHighlightable' | 'allowNonContiguousRanges' | 'fixedDate' | 'maximumDays'> & {\n  /** Whether or not to close the popover on range select */\n  closeOnSelect?: boolean\n}\n\nexport type DateRangePickerRootEmits = PopoverRootEmits & {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateRange]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n  /** Event handler called whenever the start value changes */\n  'update:startValue': [date: DateValue | undefined]\n}\n\nexport const [injectDateRangePickerRootContext, provideDateRangePickerRootContext]\n  = createContext<DateRangePickerRootContext>('DateRangePickerRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref, toRefs, watch } from 'vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\nconst props = withDefaults(defineProps<DateRangePickerRootProps>(), {\n  defaultValue: () => ({ start: undefined, end: undefined }),\n  defaultOpen: false,\n  open: undefined,\n  modal: false,\n  pagedNavigation: false,\n  preventDeselect: false,\n  weekdayFormat: 'narrow',\n  fixedWeeks: false,\n  numberOfMonths: 1,\n  disabled: false,\n  readonly: false,\n  placeholder: undefined,\n  isDateDisabled: undefined,\n  isDateUnavailable: undefined,\n  isDateHighlightable: undefined,\n  allowNonContiguousRanges: false,\n  maximumDays: undefined,\n  closeOnSelect: false,\n})\nconst emits = defineEmits<DateRangePickerRootEmits>()\nconst {\n  locale: propLocale,\n  disabled,\n  readonly,\n  pagedNavigation,\n  weekdayFormat,\n  fixedWeeks,\n  numberOfMonths,\n  preventDeselect,\n  isDateDisabled: propsIsDateDisabled,\n  isDateUnavailable: propsIsDateUnavailable,\n  isDateHighlightable: propsIsDateHighlightable,\n  defaultOpen,\n  modal,\n  id,\n  name,\n  required,\n  minValue,\n  maxValue,\n  granularity,\n  hideTimeZone,\n  hourCycle,\n  dir: propsDir,\n  allowNonContiguousRanges,\n  fixedDate,\n  maximumDays,\n  step,\n  closeOnSelect,\n} = toRefs(props)\n\nconst dir = useDirection(propsDir)\nconst locale = useLocale(propLocale)\nconst weekStartsOn = computed(() => props.weekStartsOn ?? getWeekStartsOn(locale.value))\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? { start: undefined, end: undefined },\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateRange>\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  granularity: props.granularity,\n  defaultValue: modelValue.value?.start,\n  locale: locale.value,\n})\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nconst open = useVModel(props, 'open', emits, {\n  defaultValue: defaultOpen.value,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst dateFieldRef = ref<InstanceType<typeof DateRangeFieldRoot> | undefined>()\n\nwatch(modelValue, (value) => {\n  if (value && value.start && value.start.compare(placeholder.value) !== 0) {\n    placeholder.value = value.start.copy()\n  }\n\n  if (value.start && value.end) {\n    if (closeOnSelect.value) {\n      open.value = false\n    }\n  }\n})\n\nprovideDateRangePickerRootContext({\n  allowNonContiguousRanges,\n  isDateUnavailable: propsIsDateUnavailable.value,\n  isDateDisabled: propsIsDateDisabled.value,\n  isDateHighlightable: propsIsDateHighlightable.value,\n  locale,\n  disabled,\n  pagedNavigation,\n  weekStartsOn,\n  weekdayFormat,\n  fixedWeeks,\n  numberOfMonths,\n  readonly,\n  preventDeselect,\n  modelValue,\n  placeholder,\n  defaultOpen,\n  modal,\n  open,\n  id,\n  name,\n  required,\n  minValue,\n  maxValue,\n  granularity,\n  hideTimeZone,\n  hourCycle,\n  dateFieldRef,\n  dir,\n  fixedDate,\n  maximumDays,\n  step,\n  onStartValueChange(date: DateValue | undefined) {\n    emits('update:startValue', date)\n  },\n  onDateChange(date: DateRange) {\n    modelValue.value = { start: date.start?.copy(), end: date.end?.copy() }\n  },\n  onPlaceholderChange(date: DateValue) {\n    placeholder.value = date.copy()\n  },\n  closeOnSelect,\n})\n</script>\n\n<template>\n  <PopoverRoot\n    v-model:open=\"open\"\n    :default-open=\"defaultOpen\"\n    :modal=\"modal\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :open=\"open\"\n    />\n  </PopoverRoot>\n</template>\n","/*\n  * Adapted from https://github.com/melt-ui/melt-ui/blob/develop/src/lib/builders/range-calendar/create.ts\n*/\n\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Matcher } from '@/date'\nimport { isSameDay } from '@internationalized/date'\nimport { computed } from 'vue'\nimport { areAllDaysBetweenValid, getDaysBetween, isBefore, isBetween } from '@/date'\n\nexport type UseRangeCalendarProps = {\n  start: Ref<DateValue | undefined>\n  end: Ref<DateValue | undefined>\n  isDateDisabled: Matcher\n  isDateUnavailable: Matcher\n  isDateHighlightable?: Matcher\n  focusedValue: Ref<DateValue | undefined>\n  allowNonContiguousRanges: Ref<boolean>\n  fixedDate: Ref<'start' | 'end' | undefined>\n  maximumDays?: Ref<number | undefined>\n}\n\nexport function useRangeCalendarState(props: UseRangeCalendarProps) {\n  const isStartInvalid = computed(() => {\n    if (!props.start.value)\n      return false\n    if (props.isDateDisabled(props.start.value))\n      return true\n    return false\n  })\n\n  const isEndInvalid = computed(() => {\n    if (!props.end.value)\n      return false\n    if (props.isDateDisabled(props.end.value))\n      return true\n    return false\n  })\n\n  const isInvalid = computed(\n    () => {\n      if (isStartInvalid.value || isEndInvalid.value)\n        return true\n      if (props.start.value && props.end.value && isBefore(props.end.value, props.start.value))\n        return true\n      return false\n    },\n  )\n\n  const isSelectionStart = (date: DateValue) => {\n    if (!props.start.value)\n      return false\n    return isSameDay(props.start.value, date)\n  }\n\n  const isSelectionEnd = (date: DateValue) => {\n    if (!props.end.value)\n      return false\n    return isSameDay(props.end.value, date)\n  }\n\n  const isSelected = (date: DateValue) => {\n    if (props.start.value && isSameDay(props.start.value, date))\n      return true\n    if (props.end.value && isSameDay(props.end.value, date))\n      return true\n    if (props.end.value && props.start.value)\n      return isBetween(date, props.start.value, props.end.value)\n\n    return false\n  }\n\n  const rangeIsDateDisabled = (date: DateValue) => {\n    if (props.isDateDisabled(date))\n      return true\n\n    if (props.maximumDays?.value) {\n      if (props.start.value && props.end.value) {\n        if (props.fixedDate.value) {\n          const diff = getDaysBetween(props.start.value, props.end.value).length\n          if (diff <= props.maximumDays.value) {\n            const daysLeft = props.maximumDays.value - diff - 1\n            const startLimit = props.start.value.subtract({ days: daysLeft })\n            const endLimit = props.end.value.add({ days: daysLeft })\n            return !isBetween(date, startLimit, endLimit)\n          }\n        }\n        return false\n      }\n      if (props.start.value) {\n        const maxDate = props.start.value.add({ days: props.maximumDays.value })\n        const minDate = props.start.value.subtract({ days: props.maximumDays.value })\n        return !isBetween(date, minDate, maxDate)\n      }\n    }\n\n    return false\n  }\n\n  const isDateHighlightable = (date: DateValue) => {\n    if (props.isDateHighlightable?.(date))\n      return true\n    return false\n  }\n\n  const highlightedRange = computed(() => {\n    if (props.start.value && props.end.value && !props.fixedDate.value)\n      return null\n    if (!props.start.value || !props.focusedValue.value)\n      return null\n\n    const isStartBeforeFocused = isBefore(props.start.value, props.focusedValue.value)\n    const start = isStartBeforeFocused ? props.start.value : props.focusedValue.value\n    const end = isStartBeforeFocused ? props.focusedValue.value : props.start.value\n\n    if (isSameDay(start, end)) {\n      return {\n        start,\n        end,\n      }\n    }\n\n    if (props.maximumDays?.value && !props.end.value) {\n      const maximumDays = props.maximumDays.value\n      const anchor = props.start.value\n      const focused = props.focusedValue.value\n\n      if (!isBefore(focused, anchor))\n        return { start: anchor, end: anchor.add({ days: maximumDays - 1 }) }\n\n      return { start: anchor.subtract({ days: maximumDays - 1 }), end: anchor }\n    }\n\n    const isValid = areAllDaysBetweenValid(start, end, props.allowNonContiguousRanges.value ? () => false : props.isDateUnavailable, rangeIsDateDisabled, props.isDateHighlightable)\n    if (isValid) {\n      return {\n        start,\n        end,\n      }\n    }\n    return null\n  })\n\n  const isHighlightedStart = (date: DateValue) => {\n    if (!highlightedRange.value || !highlightedRange.value.start)\n      return false\n    return isSameDay(highlightedRange.value.start, date)\n  }\n\n  const isHighlightedEnd = (date: DateValue) => {\n    if (!highlightedRange.value || !highlightedRange.value.end)\n      return false\n    return isSameDay(highlightedRange.value.end, date)\n  }\n\n  const hasSelectedDate = computed(() => {\n    return !!(props.start.value || props.end.value)\n  })\n\n  const isStartDateDisabled = computed(() => {\n    return !!(props.start.value && props.isDateDisabled(props.start.value))\n  })\n\n  const isEndDateDisabled = computed(() => {\n    return !!(props.end.value && props.isDateDisabled(props.end.value))\n  })\n\n  const isSelectedDisabled = computed(() => {\n    const hasStart = !!props.start.value\n    const hasEnd = !!props.end.value\n    if (!hasStart && !hasEnd)\n      return false\n    if (hasStart && hasEnd)\n      return isStartDateDisabled.value && isEndDateDisabled.value\n    return (hasStart && isStartDateDisabled.value) || (hasEnd && isEndDateDisabled.value)\n  })\n\n  const selectedFocusableDate = computed(() => {\n    if (props.start.value && !isStartDateDisabled.value)\n      return props.start.value\n    if (props.end.value && !isEndDateDisabled.value)\n      return props.end.value\n    return undefined\n  })\n\n  return {\n    isInvalid,\n    isSelected,\n    isDateHighlightable,\n    highlightedRange,\n    isSelectionStart,\n    isSelectionEnd,\n    isHighlightedStart,\n    isHighlightedEnd,\n    isDateDisabled: rangeIsDateDisabled,\n    hasSelectedDate,\n    isSelectedDisabled,\n    selectedFocusableDate,\n  }\n}\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Grid, Matcher, WeekDayFormat, WeekStartsOn } from '@/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Formatter } from '@/shared'\nimport type { DateRange } from '@/shared/date'\nimport type { Direction } from '@/shared/types'\nimport { isEqualDay } from '@internationalized/date'\nimport { useCalendar } from '@/Calendar/useCalendar'\nimport { getWeekStartsOn, isBefore } from '@/date'\nimport {\n  createContext,\n  useDirection,\n  useKbd,\n  useLocale,\n} from '@/shared'\nimport { getDefaultDate, handleCalendarInitialFocus } from '@/shared/date'\nimport { useRangeCalendarState } from './useRangeCalendar'\n\ntype RangeCalendarRootContext = {\n  modelValue: Ref<DateRange>\n  startValue: Ref<DateValue | undefined>\n  endValue: Ref<DateValue | undefined>\n  locale: Ref<string>\n  placeholder: Ref<DateValue>\n  pagedNavigation: Ref<boolean>\n  preventDeselect: Ref<boolean>\n  grid: Ref<Grid<DateValue>[]>\n  weekDays: Ref<string[]>\n  weekStartsOn: Ref<WeekStartsOn>\n  weekdayFormat: Ref<WeekDayFormat>\n  fixedWeeks: Ref<boolean>\n  numberOfMonths: Ref<number>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  initialFocus: Ref<boolean>\n  onPlaceholderChange: (date: DateValue) => void\n  fullCalendarLabel: Ref<string>\n  parentElement: Ref<HTMLElement | undefined>\n  headingValue: Ref<string>\n  isInvalid: Ref<boolean>\n  isDateDisabled: Matcher\n  isDateUnavailable?: Matcher\n  isDateHighlightable?: Matcher\n  isOutsideVisibleView: (date: DateValue) => boolean\n  allowNonContiguousRanges: Ref<boolean>\n  highlightedRange: Ref<{ start: DateValue, end: DateValue } | null>\n  focusedValue: Ref<DateValue | undefined>\n  lastPressedDateValue: Ref<DateValue | undefined>\n  isSelected: (date: DateValue) => boolean\n  isSelectionEnd: (date: DateValue) => boolean\n  isSelectionStart: (date: DateValue) => boolean\n  isHighlightedStart: (date: DateValue) => boolean\n  isHighlightedEnd: (date: DateValue) => boolean\n  prevPage: (prevPageFunc?: (date: DateValue) => DateValue) => void\n  nextPage: (nextPageFunc?: (date: DateValue) => DateValue) => void\n  isNextButtonDisabled: (\n    nextPageFunc?: (date: DateValue) => DateValue,\n  ) => boolean\n  isPrevButtonDisabled: (\n    prevPageFunc?: (date: DateValue) => DateValue,\n  ) => boolean\n  formatter: Formatter\n  dir: Ref<Direction>\n  disableDaysOutsideCurrentView: Ref<boolean>\n  fixedDate: Ref<'start' | 'end' | undefined>\n  maximumDays: Ref<number | undefined>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n  isPlaceholderFocusable: Ref<boolean>\n  firstFocusableDate: Ref<DateValue | undefined>\n  hasSelectedDate: Ref<boolean>\n  isSelectedDisabled: Ref<boolean>\n  selectedFocusableDate: Ref<DateValue | undefined>\n}\n\nexport interface RangeCalendarRootProps extends PrimitiveProps {\n  /** The default placeholder date */\n  defaultPlaceholder?: DateValue\n  /** The default value for the calendar */\n  defaultValue?: DateRange\n  /** The controlled selected date range of the calendar. Can be bound as `v-model`. */\n  modelValue?: DateRange | null\n  /** The placeholder date, which is used to determine what month to display when no date is selected. This updates as the user navigates the calendar and can be used to programmatically control the calendar view */\n  placeholder?: DateValue\n  /** When combined with `isDateUnavailable`, determines whether non-contiguous ranges, i.e. ranges containing unavailable dates, may be selected. */\n  allowNonContiguousRanges?: boolean\n  /** This property causes the previous and next buttons to navigate by the number of months displayed at once, rather than one month */\n  pagedNavigation?: boolean\n  /** Whether or not to prevent the user from deselecting a date without selecting another date first */\n  preventDeselect?: boolean\n  /** The maximum number of days that can be selected in a range */\n  maximumDays?: number\n  /** The day of the week to start the calendar on */\n  weekStartsOn?: WeekStartsOn\n  /** The format to use for the weekday strings provided via the weekdays slot prop */\n  weekdayFormat?: WeekDayFormat\n  /** The accessible label for the calendar */\n  calendarLabel?: string\n  /** Whether or not to always display 6 weeks in the calendar */\n  fixedWeeks?: boolean\n  /** The maximum date that can be selected */\n  maxValue?: DateValue\n  /** The minimum date that can be selected */\n  minValue?: DateValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** The number of months to display at once */\n  numberOfMonths?: number\n  /** Whether or not the calendar is disabled */\n  disabled?: boolean\n  /** Whether or not the calendar is readonly */\n  readonly?: boolean\n  /** If true, the calendar will focus the selected day, today, or the first day of the month depending on what is visible when the calendar is mounted */\n  initialFocus?: boolean\n  /** A function that returns whether or not a date is disabled */\n  isDateDisabled?: Matcher\n  /** A function that returns whether or not a date is unavailable */\n  isDateUnavailable?: Matcher\n  /** A function that returns whether or not a date is hightable */\n  isDateHighlightable?: Matcher\n  /** The reading direction of the calendar when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** A function that returns the next page of the calendar. It receives the current placeholder as an argument inside the component. */\n  nextPage?: (placeholder: DateValue) => DateValue\n  /** A function that returns the previous page of the calendar. It receives the current placeholder as an argument inside the component. */\n  prevPage?: (placeholder: DateValue) => DateValue\n  /** Whether or not to disable days outside the current view. */\n  disableDaysOutsideCurrentView?: boolean\n  /** Which part of the range should be fixed */\n  fixedDate?: 'start' | 'end'\n\n}\n\nexport type RangeCalendarRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateRange]\n  /** Event handler called whenever there is a new validModel */\n  'update:validModelValue': [date: DateRange]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n  /** Event handler called whenever the start value changes */\n  'update:startValue': [date: DateValue | undefined]\n}\n\nexport const [injectRangeCalendarRootContext, provideRangeCalendarRootContext]\n  = createContext<RangeCalendarRootContext>('RangeCalendarRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useEventListener, useVModel } from '@vueuse/core'\nimport { computed, onMounted, ref, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<RangeCalendarRootProps>(), {\n  defaultValue: () => ({ start: undefined, end: undefined }),\n  as: 'div',\n  pagedNavigation: false,\n  preventDeselect: false,\n  weekdayFormat: 'narrow',\n  fixedWeeks: false,\n  numberOfMonths: 1,\n  disabled: false,\n  readonly: false,\n  initialFocus: false,\n  placeholder: undefined,\n  isDateDisabled: undefined,\n  isDateUnavailable: undefined,\n  isDateHighlightable: undefined,\n  allowNonContiguousRanges: false,\n  maximumDays: undefined,\n  disableDaysOutsideCurrentView: false,\n\n})\nconst emits = defineEmits<RangeCalendarRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** The current date of the placeholder */\n    date: DateValue\n    /** The grid of dates */\n    grid: Grid<DateValue>[]\n    /** The days of the week */\n    weekDays: string[]\n    /** The start of the week */\n    weekStartsOn: WeekStartsOn\n    /** The calendar locale */\n    locale: string\n    /** Whether or not to always display 6 weeks in the calendar */\n    fixedWeeks: boolean\n    /** The current date range */\n    modelValue: DateRange\n  }) => any\n}>()\n\nconst {\n  disabled,\n  readonly,\n  initialFocus,\n  pagedNavigation,\n  weekdayFormat,\n  fixedWeeks,\n  numberOfMonths,\n  preventDeselect,\n  isDateUnavailable: propsIsDateUnavailable,\n  isDateHighlightable: propsIsDateHighlightable,\n  isDateDisabled: propsIsDateDisabled,\n  calendarLabel,\n  maxValue,\n  minValue,\n  dir: propDir,\n  locale: propLocale,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n  allowNonContiguousRanges,\n  disableDaysOutsideCurrentView,\n  fixedDate,\n  maximumDays,\n} = toRefs(props)\n\nconst { primitiveElement, currentElement: parentElement }\n  = usePrimitiveElement()\nconst dir = useDirection(propDir)\nconst locale = useLocale(propLocale)\nconst weekStartsOn = computed(() => props.weekStartsOn ?? getWeekStartsOn(locale.value))\n\nconst lastPressedDateValue = ref() as Ref<DateValue | undefined>\nconst focusedValue = ref() as Ref<DateValue | undefined>\nconst isEditing = ref(false)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? { start: undefined, end: undefined },\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateRange | null>\n\nconst normalizeRange = (value?: DateRange | null): DateRange => value ?? { start: undefined, end: undefined }\nconst normalizedModelValue = computed(() => normalizeRange(modelValue.value))\n\nconst validModelValue = ref(normalizeRange(modelValue.value)) as Ref<DateRange>\n\nwatch(validModelValue, (value) => {\n  emits('update:validModelValue', value)\n})\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  defaultValue: normalizeRange(modelValue.value).start,\n  locale: props.locale,\n})\n\nconst startValue = ref(normalizeRange(modelValue.value).start) as Ref<\n  DateValue | undefined\n>\nconst endValue = ref(normalizeRange(modelValue.value).end) as Ref<DateValue | undefined>\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nfunction onPlaceholderChange(value: DateValue) {\n  placeholder.value = value.copy()\n}\n\nconst {\n  fullCalendarLabel,\n  headingValue,\n  isDateDisabled,\n  isDateUnavailable,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  grid,\n  weekdays,\n  isOutsideVisibleView,\n  nextPage,\n  prevPage,\n  formatter,\n  isPlaceholderFocusable,\n  firstFocusableDate,\n} = useCalendar({\n  locale,\n  placeholder,\n  weekStartsOn,\n  fixedWeeks,\n  numberOfMonths,\n  minValue,\n  maxValue,\n  disabled,\n  weekdayFormat,\n  pagedNavigation,\n  isDateDisabled: propsIsDateDisabled.value,\n  isDateUnavailable: propsIsDateUnavailable.value,\n  calendarLabel,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n})\n\nconst {\n  isInvalid,\n  isSelected,\n  isDateHighlightable,\n  highlightedRange,\n  isSelectionStart,\n  isSelectionEnd,\n  isHighlightedStart,\n  isHighlightedEnd,\n  isDateDisabled: rangeIsDateDisabled,\n  hasSelectedDate,\n  isSelectedDisabled,\n  selectedFocusableDate,\n} = useRangeCalendarState({\n  start: startValue,\n  end: endValue,\n  isDateDisabled,\n  isDateUnavailable,\n  isDateHighlightable: propsIsDateHighlightable.value,\n  focusedValue,\n  allowNonContiguousRanges,\n  fixedDate,\n  maximumDays,\n})\n\nwatch(modelValue, (_modelValue) => {\n  const next = normalizeRange(_modelValue)\n\n  const isStartSynced = (!next.start && !startValue.value)\n    || (!!next.start && !!startValue.value && isEqualDay(next.start, startValue.value))\n\n  if (!isStartSynced) {\n    startValue.value = next.start?.copy?.()\n  }\n\n  const isEndSynced = (!next.end && !endValue.value)\n    || (!!next.end && !!endValue.value && isEqualDay(next.end, endValue.value))\n\n  if (!isEndSynced) {\n    endValue.value = next.end?.copy?.()\n  }\n})\n\nwatch(startValue, (_startValue) => {\n  if (_startValue && !isEqualDay(_startValue, placeholder.value))\n    onPlaceholderChange(_startValue)\n\n  emits('update:startValue', _startValue)\n})\n\nwatch([startValue, endValue], ([_startValue, _endValue]) => {\n  const value = modelValue.value\n\n  if (\n    value\n    && value.start\n    && value.end\n    && _startValue\n    && _endValue\n    && isEqualDay(value.start, _startValue)\n    && isEqualDay(value.end, _endValue)\n  ) {\n    return\n  }\n\n  isEditing.value = true\n  if (_endValue && _startValue) {\n    const nextValue = isBefore(_endValue, _startValue)\n      ? { start: _endValue.copy(), end: _startValue.copy() }\n      : { start: _startValue.copy(), end: _endValue.copy() }\n\n    modelValue.value = { start: nextValue.start, end: nextValue.end }\n    isEditing.value = false\n    validModelValue.value = { start: nextValue.start.copy(), end: nextValue.end.copy() }\n  }\n  else {\n    modelValue.value = _startValue\n      ? { start: _startValue.copy(), end: undefined }\n      : { start: _endValue?.copy(), end: undefined }\n  }\n})\n\nconst kbd = useKbd()\nuseEventListener(parentElement, 'keydown', (ev) => {\n  if (ev.key === kbd.ESCAPE && isEditing.value) {\n    // Abort start and end selection\n    startValue.value = validModelValue.value.start?.copy()\n    endValue.value = validModelValue.value.end?.copy()\n  }\n})\n\nprovideRangeCalendarRootContext({\n  isDateUnavailable,\n  isDateHighlightable,\n  startValue,\n  endValue,\n  formatter,\n  modelValue: normalizedModelValue,\n  placeholder,\n  disabled,\n  initialFocus,\n  pagedNavigation,\n  grid,\n  weekDays: weekdays,\n  weekStartsOn,\n  weekdayFormat,\n  fixedWeeks,\n  numberOfMonths,\n  readonly,\n  preventDeselect,\n  fullCalendarLabel,\n  headingValue,\n  isInvalid,\n  isDateDisabled: rangeIsDateDisabled,\n  allowNonContiguousRanges,\n  highlightedRange,\n  focusedValue,\n  lastPressedDateValue,\n  isSelected,\n  isSelectionEnd,\n  isSelectionStart,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  isOutsideVisibleView,\n  nextPage,\n  prevPage,\n  parentElement,\n  onPlaceholderChange,\n  locale,\n  dir,\n  isHighlightedStart,\n  isHighlightedEnd,\n  disableDaysOutsideCurrentView,\n  fixedDate,\n  maximumDays,\n  minValue,\n  maxValue,\n  isPlaceholderFocusable,\n  firstFocusableDate,\n  hasSelectedDate,\n  isSelectedDisabled,\n  selectedFocusableDate,\n})\n\nonMounted(() => {\n  if (initialFocus.value)\n    handleCalendarInitialFocus(parentElement.value)\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-label=\"fullCalendarLabel\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n  >\n    <div\n      style=\"\n        border: 0px;\n        clip: rect(0px, 0px, 0px, 0px);\n        clip-path: inset(50%);\n        height: 1px;\n        margin: -1px;\n        overflow: hidden;\n        padding: 0px;\n        position: absolute;\n        white-space: nowrap;\n        width: 1px;\n      \"\n    >\n      <div\n        role=\"heading\"\n        aria-level=\"2\"\n      >\n        {{ fullCalendarLabel }}\n      </div>\n    </div>\n\n    <slot\n      :date=\"placeholder\"\n      :grid=\"grid\"\n      :week-days=\"weekdays\"\n      :week-starts-on=\"weekStartsOn\"\n      :locale=\"locale\"\n      :fixed-weeks=\"fixedWeeks\"\n      :model-value=\"normalizedModelValue\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Grid, Matcher, WeekDayFormat, WeekStartsOn } from '@/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Formatter } from '@/shared'\nimport type { DateRange } from '@/shared/date'\nimport type { Direction } from '@/shared/types'\nimport { isEqualDay } from '@internationalized/date'\nimport { useCalendar } from '@/Calendar/useCalendar'\nimport { getWeekStartsOn, isBefore } from '@/date'\nimport {\n  createContext,\n  useDirection,\n  useKbd,\n  useLocale,\n} from '@/shared'\nimport { getDefaultDate, handleCalendarInitialFocus } from '@/shared/date'\nimport { useRangeCalendarState } from './useRangeCalendar'\n\ntype RangeCalendarRootContext = {\n  modelValue: Ref<DateRange>\n  startValue: Ref<DateValue | undefined>\n  endValue: Ref<DateValue | undefined>\n  locale: Ref<string>\n  placeholder: Ref<DateValue>\n  pagedNavigation: Ref<boolean>\n  preventDeselect: Ref<boolean>\n  grid: Ref<Grid<DateValue>[]>\n  weekDays: Ref<string[]>\n  weekStartsOn: Ref<WeekStartsOn>\n  weekdayFormat: Ref<WeekDayFormat>\n  fixedWeeks: Ref<boolean>\n  numberOfMonths: Ref<number>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  initialFocus: Ref<boolean>\n  onPlaceholderChange: (date: DateValue) => void\n  fullCalendarLabel: Ref<string>\n  parentElement: Ref<HTMLElement | undefined>\n  headingValue: Ref<string>\n  isInvalid: Ref<boolean>\n  isDateDisabled: Matcher\n  isDateUnavailable?: Matcher\n  isDateHighlightable?: Matcher\n  isOutsideVisibleView: (date: DateValue) => boolean\n  allowNonContiguousRanges: Ref<boolean>\n  highlightedRange: Ref<{ start: DateValue, end: DateValue } | null>\n  focusedValue: Ref<DateValue | undefined>\n  lastPressedDateValue: Ref<DateValue | undefined>\n  isSelected: (date: DateValue) => boolean\n  isSelectionEnd: (date: DateValue) => boolean\n  isSelectionStart: (date: DateValue) => boolean\n  isHighlightedStart: (date: DateValue) => boolean\n  isHighlightedEnd: (date: DateValue) => boolean\n  prevPage: (prevPageFunc?: (date: DateValue) => DateValue) => void\n  nextPage: (nextPageFunc?: (date: DateValue) => DateValue) => void\n  isNextButtonDisabled: (\n    nextPageFunc?: (date: DateValue) => DateValue,\n  ) => boolean\n  isPrevButtonDisabled: (\n    prevPageFunc?: (date: DateValue) => DateValue,\n  ) => boolean\n  formatter: Formatter\n  dir: Ref<Direction>\n  disableDaysOutsideCurrentView: Ref<boolean>\n  fixedDate: Ref<'start' | 'end' | undefined>\n  maximumDays: Ref<number | undefined>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n  isPlaceholderFocusable: Ref<boolean>\n  firstFocusableDate: Ref<DateValue | undefined>\n  hasSelectedDate: Ref<boolean>\n  isSelectedDisabled: Ref<boolean>\n  selectedFocusableDate: Ref<DateValue | undefined>\n}\n\nexport interface RangeCalendarRootProps extends PrimitiveProps {\n  /** The default placeholder date */\n  defaultPlaceholder?: DateValue\n  /** The default value for the calendar */\n  defaultValue?: DateRange\n  /** The controlled selected date range of the calendar. Can be bound as `v-model`. */\n  modelValue?: DateRange | null\n  /** The placeholder date, which is used to determine what month to display when no date is selected. This updates as the user navigates the calendar and can be used to programmatically control the calendar view */\n  placeholder?: DateValue\n  /** When combined with `isDateUnavailable`, determines whether non-contiguous ranges, i.e. ranges containing unavailable dates, may be selected. */\n  allowNonContiguousRanges?: boolean\n  /** This property causes the previous and next buttons to navigate by the number of months displayed at once, rather than one month */\n  pagedNavigation?: boolean\n  /** Whether or not to prevent the user from deselecting a date without selecting another date first */\n  preventDeselect?: boolean\n  /** The maximum number of days that can be selected in a range */\n  maximumDays?: number\n  /** The day of the week to start the calendar on */\n  weekStartsOn?: WeekStartsOn\n  /** The format to use for the weekday strings provided via the weekdays slot prop */\n  weekdayFormat?: WeekDayFormat\n  /** The accessible label for the calendar */\n  calendarLabel?: string\n  /** Whether or not to always display 6 weeks in the calendar */\n  fixedWeeks?: boolean\n  /** The maximum date that can be selected */\n  maxValue?: DateValue\n  /** The minimum date that can be selected */\n  minValue?: DateValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** The number of months to display at once */\n  numberOfMonths?: number\n  /** Whether or not the calendar is disabled */\n  disabled?: boolean\n  /** Whether or not the calendar is readonly */\n  readonly?: boolean\n  /** If true, the calendar will focus the selected day, today, or the first day of the month depending on what is visible when the calendar is mounted */\n  initialFocus?: boolean\n  /** A function that returns whether or not a date is disabled */\n  isDateDisabled?: Matcher\n  /** A function that returns whether or not a date is unavailable */\n  isDateUnavailable?: Matcher\n  /** A function that returns whether or not a date is hightable */\n  isDateHighlightable?: Matcher\n  /** The reading direction of the calendar when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** A function that returns the next page of the calendar. It receives the current placeholder as an argument inside the component. */\n  nextPage?: (placeholder: DateValue) => DateValue\n  /** A function that returns the previous page of the calendar. It receives the current placeholder as an argument inside the component. */\n  prevPage?: (placeholder: DateValue) => DateValue\n  /** Whether or not to disable days outside the current view. */\n  disableDaysOutsideCurrentView?: boolean\n  /** Which part of the range should be fixed */\n  fixedDate?: 'start' | 'end'\n\n}\n\nexport type RangeCalendarRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateRange]\n  /** Event handler called whenever there is a new validModel */\n  'update:validModelValue': [date: DateRange]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n  /** Event handler called whenever the start value changes */\n  'update:startValue': [date: DateValue | undefined]\n}\n\nexport const [injectRangeCalendarRootContext, provideRangeCalendarRootContext]\n  = createContext<RangeCalendarRootContext>('RangeCalendarRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useEventListener, useVModel } from '@vueuse/core'\nimport { computed, onMounted, ref, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<RangeCalendarRootProps>(), {\n  defaultValue: () => ({ start: undefined, end: undefined }),\n  as: 'div',\n  pagedNavigation: false,\n  preventDeselect: false,\n  weekdayFormat: 'narrow',\n  fixedWeeks: false,\n  numberOfMonths: 1,\n  disabled: false,\n  readonly: false,\n  initialFocus: false,\n  placeholder: undefined,\n  isDateDisabled: undefined,\n  isDateUnavailable: undefined,\n  isDateHighlightable: undefined,\n  allowNonContiguousRanges: false,\n  maximumDays: undefined,\n  disableDaysOutsideCurrentView: false,\n\n})\nconst emits = defineEmits<RangeCalendarRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** The current date of the placeholder */\n    date: DateValue\n    /** The grid of dates */\n    grid: Grid<DateValue>[]\n    /** The days of the week */\n    weekDays: string[]\n    /** The start of the week */\n    weekStartsOn: WeekStartsOn\n    /** The calendar locale */\n    locale: string\n    /** Whether or not to always display 6 weeks in the calendar */\n    fixedWeeks: boolean\n    /** The current date range */\n    modelValue: DateRange\n  }) => any\n}>()\n\nconst {\n  disabled,\n  readonly,\n  initialFocus,\n  pagedNavigation,\n  weekdayFormat,\n  fixedWeeks,\n  numberOfMonths,\n  preventDeselect,\n  isDateUnavailable: propsIsDateUnavailable,\n  isDateHighlightable: propsIsDateHighlightable,\n  isDateDisabled: propsIsDateDisabled,\n  calendarLabel,\n  maxValue,\n  minValue,\n  dir: propDir,\n  locale: propLocale,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n  allowNonContiguousRanges,\n  disableDaysOutsideCurrentView,\n  fixedDate,\n  maximumDays,\n} = toRefs(props)\n\nconst { primitiveElement, currentElement: parentElement }\n  = usePrimitiveElement()\nconst dir = useDirection(propDir)\nconst locale = useLocale(propLocale)\nconst weekStartsOn = computed(() => props.weekStartsOn ?? getWeekStartsOn(locale.value))\n\nconst lastPressedDateValue = ref() as Ref<DateValue | undefined>\nconst focusedValue = ref() as Ref<DateValue | undefined>\nconst isEditing = ref(false)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? { start: undefined, end: undefined },\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateRange | null>\n\nconst normalizeRange = (value?: DateRange | null): DateRange => value ?? { start: undefined, end: undefined }\nconst normalizedModelValue = computed(() => normalizeRange(modelValue.value))\n\nconst validModelValue = ref(normalizeRange(modelValue.value)) as Ref<DateRange>\n\nwatch(validModelValue, (value) => {\n  emits('update:validModelValue', value)\n})\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  defaultValue: normalizeRange(modelValue.value).start,\n  locale: props.locale,\n})\n\nconst startValue = ref(normalizeRange(modelValue.value).start) as Ref<\n  DateValue | undefined\n>\nconst endValue = ref(normalizeRange(modelValue.value).end) as Ref<DateValue | undefined>\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nfunction onPlaceholderChange(value: DateValue) {\n  placeholder.value = value.copy()\n}\n\nconst {\n  fullCalendarLabel,\n  headingValue,\n  isDateDisabled,\n  isDateUnavailable,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  grid,\n  weekdays,\n  isOutsideVisibleView,\n  nextPage,\n  prevPage,\n  formatter,\n  isPlaceholderFocusable,\n  firstFocusableDate,\n} = useCalendar({\n  locale,\n  placeholder,\n  weekStartsOn,\n  fixedWeeks,\n  numberOfMonths,\n  minValue,\n  maxValue,\n  disabled,\n  weekdayFormat,\n  pagedNavigation,\n  isDateDisabled: propsIsDateDisabled.value,\n  isDateUnavailable: propsIsDateUnavailable.value,\n  calendarLabel,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n})\n\nconst {\n  isInvalid,\n  isSelected,\n  isDateHighlightable,\n  highlightedRange,\n  isSelectionStart,\n  isSelectionEnd,\n  isHighlightedStart,\n  isHighlightedEnd,\n  isDateDisabled: rangeIsDateDisabled,\n  hasSelectedDate,\n  isSelectedDisabled,\n  selectedFocusableDate,\n} = useRangeCalendarState({\n  start: startValue,\n  end: endValue,\n  isDateDisabled,\n  isDateUnavailable,\n  isDateHighlightable: propsIsDateHighlightable.value,\n  focusedValue,\n  allowNonContiguousRanges,\n  fixedDate,\n  maximumDays,\n})\n\nwatch(modelValue, (_modelValue) => {\n  const next = normalizeRange(_modelValue)\n\n  const isStartSynced = (!next.start && !startValue.value)\n    || (!!next.start && !!startValue.value && isEqualDay(next.start, startValue.value))\n\n  if (!isStartSynced) {\n    startValue.value = next.start?.copy?.()\n  }\n\n  const isEndSynced = (!next.end && !endValue.value)\n    || (!!next.end && !!endValue.value && isEqualDay(next.end, endValue.value))\n\n  if (!isEndSynced) {\n    endValue.value = next.end?.copy?.()\n  }\n})\n\nwatch(startValue, (_startValue) => {\n  if (_startValue && !isEqualDay(_startValue, placeholder.value))\n    onPlaceholderChange(_startValue)\n\n  emits('update:startValue', _startValue)\n})\n\nwatch([startValue, endValue], ([_startValue, _endValue]) => {\n  const value = modelValue.value\n\n  if (\n    value\n    && value.start\n    && value.end\n    && _startValue\n    && _endValue\n    && isEqualDay(value.start, _startValue)\n    && isEqualDay(value.end, _endValue)\n  ) {\n    return\n  }\n\n  isEditing.value = true\n  if (_endValue && _startValue) {\n    const nextValue = isBefore(_endValue, _startValue)\n      ? { start: _endValue.copy(), end: _startValue.copy() }\n      : { start: _startValue.copy(), end: _endValue.copy() }\n\n    modelValue.value = { start: nextValue.start, end: nextValue.end }\n    isEditing.value = false\n    validModelValue.value = { start: nextValue.start.copy(), end: nextValue.end.copy() }\n  }\n  else {\n    modelValue.value = _startValue\n      ? { start: _startValue.copy(), end: undefined }\n      : { start: _endValue?.copy(), end: undefined }\n  }\n})\n\nconst kbd = useKbd()\nuseEventListener(parentElement, 'keydown', (ev) => {\n  if (ev.key === kbd.ESCAPE && isEditing.value) {\n    // Abort start and end selection\n    startValue.value = validModelValue.value.start?.copy()\n    endValue.value = validModelValue.value.end?.copy()\n  }\n})\n\nprovideRangeCalendarRootContext({\n  isDateUnavailable,\n  isDateHighlightable,\n  startValue,\n  endValue,\n  formatter,\n  modelValue: normalizedModelValue,\n  placeholder,\n  disabled,\n  initialFocus,\n  pagedNavigation,\n  grid,\n  weekDays: weekdays,\n  weekStartsOn,\n  weekdayFormat,\n  fixedWeeks,\n  numberOfMonths,\n  readonly,\n  preventDeselect,\n  fullCalendarLabel,\n  headingValue,\n  isInvalid,\n  isDateDisabled: rangeIsDateDisabled,\n  allowNonContiguousRanges,\n  highlightedRange,\n  focusedValue,\n  lastPressedDateValue,\n  isSelected,\n  isSelectionEnd,\n  isSelectionStart,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  isOutsideVisibleView,\n  nextPage,\n  prevPage,\n  parentElement,\n  onPlaceholderChange,\n  locale,\n  dir,\n  isHighlightedStart,\n  isHighlightedEnd,\n  disableDaysOutsideCurrentView,\n  fixedDate,\n  maximumDays,\n  minValue,\n  maxValue,\n  isPlaceholderFocusable,\n  firstFocusableDate,\n  hasSelectedDate,\n  isSelectedDisabled,\n  selectedFocusableDate,\n})\n\nonMounted(() => {\n  if (initialFocus.value)\n    handleCalendarInitialFocus(parentElement.value)\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-label=\"fullCalendarLabel\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n  >\n    <div\n      style=\"\n        border: 0px;\n        clip: rect(0px, 0px, 0px, 0px);\n        clip-path: inset(50%);\n        height: 1px;\n        margin: -1px;\n        overflow: hidden;\n        padding: 0px;\n        position: absolute;\n        white-space: nowrap;\n        width: 1px;\n      \"\n    >\n      <div\n        role=\"heading\"\n        aria-level=\"2\"\n      >\n        {{ fullCalendarLabel }}\n      </div>\n    </div>\n\n    <slot\n      :date=\"placeholder\"\n      :grid=\"grid\"\n      :week-days=\"weekdays\"\n      :week-starts-on=\"weekStartsOn\"\n      :locale=\"locale\"\n      :fixed-weeks=\"fixedWeeks\"\n      :model-value=\"normalizedModelValue\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport { isEqualDay } from '@internationalized/date'\nimport { RangeCalendarRoot } from '..'\nimport { injectDateRangePickerRootContext } from './DateRangePickerRoot.vue'\n</script>\n\n<script setup lang=\"ts\">\nconst rootContext = injectDateRangePickerRootContext()\n</script>\n\n<template>\n  <RangeCalendarRoot\n    v-slot=\"{ weekDays, grid, date, weekStartsOn, locale, fixedWeeks }\"\n    v-bind=\"{\n      allowNonContiguousRanges: rootContext.allowNonContiguousRanges.value,\n      isDateDisabled: rootContext.isDateDisabled,\n      isDateUnavailable: rootContext.isDateUnavailable,\n      isDateHighlightable: rootContext.isDateHighlightable,\n      locale: rootContext.locale.value,\n      disabled: rootContext.disabled.value,\n      pagedNavigation: rootContext.pagedNavigation.value,\n      weekStartsOn: rootContext.weekStartsOn.value,\n      weekdayFormat: rootContext.weekdayFormat.value,\n      fixedWeeks: rootContext.fixedWeeks.value,\n      numberOfMonths: rootContext.numberOfMonths.value,\n      readonly: rootContext.readonly.value,\n      preventDeselect: rootContext.preventDeselect.value,\n      minValue: rootContext.minValue.value,\n      maxValue: rootContext.maxValue.value,\n      dir: rootContext.dir.value,\n      fixedDate: rootContext.fixedDate.value,\n      maximumDays: rootContext.maximumDays?.value,\n    }\"\n    :model-value=\"rootContext.modelValue.value\"\n    :placeholder=\"rootContext.placeholder.value\"\n    @update:start-value=\"(date) => {\n      rootContext.onStartValueChange(date)\n    }\"\n    @update:model-value=\"(date) => {\n      if (date.start && rootContext.modelValue.value?.start && date.end && rootContext.modelValue.value?.end && isEqualDay(date.start, rootContext.modelValue.value?.start) && isEqualDay(date.end, rootContext.modelValue.value?.end)) return\n      rootContext.onDateChange(date)\n    }\"\n    @update:placeholder=\"(date) => {\n      if (isEqualDay(date, rootContext.placeholder.value)) return\n      rootContext.onPlaceholderChange(date)\n    }\"\n  >\n    <slot\n      :date=\"date\"\n      :grid=\"grid\"\n      :week-days=\"weekDays\"\n      :week-starts-on=\"weekStartsOn\"\n      :locale=\"locale\"\n      :fixed-weeks=\"fixedWeeks\"\n    />\n  </RangeCalendarRoot>\n</template>\n","<script lang=\"ts\">\nimport { isEqualDay } from '@internationalized/date'\nimport { RangeCalendarRoot } from '..'\nimport { injectDateRangePickerRootContext } from './DateRangePickerRoot.vue'\n</script>\n\n<script setup lang=\"ts\">\nconst rootContext = injectDateRangePickerRootContext()\n</script>\n\n<template>\n  <RangeCalendarRoot\n    v-slot=\"{ weekDays, grid, date, weekStartsOn, locale, fixedWeeks }\"\n    v-bind=\"{\n      allowNonContiguousRanges: rootContext.allowNonContiguousRanges.value,\n      isDateDisabled: rootContext.isDateDisabled,\n      isDateUnavailable: rootContext.isDateUnavailable,\n      isDateHighlightable: rootContext.isDateHighlightable,\n      locale: rootContext.locale.value,\n      disabled: rootContext.disabled.value,\n      pagedNavigation: rootContext.pagedNavigation.value,\n      weekStartsOn: rootContext.weekStartsOn.value,\n      weekdayFormat: rootContext.weekdayFormat.value,\n      fixedWeeks: rootContext.fixedWeeks.value,\n      numberOfMonths: rootContext.numberOfMonths.value,\n      readonly: rootContext.readonly.value,\n      preventDeselect: rootContext.preventDeselect.value,\n      minValue: rootContext.minValue.value,\n      maxValue: rootContext.maxValue.value,\n      dir: rootContext.dir.value,\n      fixedDate: rootContext.fixedDate.value,\n      maximumDays: rootContext.maximumDays?.value,\n    }\"\n    :model-value=\"rootContext.modelValue.value\"\n    :placeholder=\"rootContext.placeholder.value\"\n    @update:start-value=\"(date) => {\n      rootContext.onStartValueChange(date)\n    }\"\n    @update:model-value=\"(date) => {\n      if (date.start && rootContext.modelValue.value?.start && date.end && rootContext.modelValue.value?.end && isEqualDay(date.start, rootContext.modelValue.value?.start) && isEqualDay(date.end, rootContext.modelValue.value?.end)) return\n      rootContext.onDateChange(date)\n    }\"\n    @update:placeholder=\"(date) => {\n      if (isEqualDay(date, rootContext.placeholder.value)) return\n      rootContext.onPlaceholderChange(date)\n    }\"\n  >\n    <slot\n      :date=\"date\"\n      :grid=\"grid\"\n      :week-days=\"weekDays\"\n      :week-starts-on=\"weekStartsOn\"\n      :locale=\"locale\"\n      :fixed-weeks=\"fixedWeeks\"\n    />\n  </RangeCalendarRoot>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarCellProps extends PrimitiveProps {\n  date: DateValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectRangeCalendarRootContext } from './RangeCalendarRoot.vue'\n\nwithDefaults(defineProps<RangeCalendarCellProps>(), { as: 'td' })\nconst rootContext = injectRangeCalendarRootContext()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"gridcell\"\n    :aria-selected=\"rootContext.isSelected(date) ? true : undefined\"\n    :aria-disabled=\"rootContext.isDateDisabled(date) || rootContext.isDateUnavailable?.(date) || rootContext.disableDaysOutsideCurrentView.value\"\n    :data-disabled=\"rootContext.isDateDisabled(date) || rootContext.disableDaysOutsideCurrentView.value ? '' : undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarCellProps extends PrimitiveProps {\n  date: DateValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectRangeCalendarRootContext } from './RangeCalendarRoot.vue'\n\nwithDefaults(defineProps<RangeCalendarCellProps>(), { as: 'td' })\nconst rootContext = injectRangeCalendarRootContext()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"gridcell\"\n    :aria-selected=\"rootContext.isSelected(date) ? true : undefined\"\n    :aria-disabled=\"rootContext.isDateDisabled(date) || rootContext.isDateUnavailable?.(date) || rootContext.disableDaysOutsideCurrentView.value\"\n    :data-disabled=\"rootContext.isDateDisabled(date) || rootContext.disableDaysOutsideCurrentView.value ? '' : undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarCellProps } from '..'\nimport { RangeCalendarCell } from '..'\n\nexport interface DateRangePickerCellProps extends RangeCalendarCellProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerCellProps>()\n</script>\n\n<template>\n  <RangeCalendarCell v-bind=\"props\">\n    <slot />\n  </RangeCalendarCell>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarCellProps } from '..'\nimport { RangeCalendarCell } from '..'\n\nexport interface DateRangePickerCellProps extends RangeCalendarCellProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerCellProps>()\n</script>\n\n<template>\n  <RangeCalendarCell v-bind=\"props\">\n    <slot />\n  </RangeCalendarCell>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport {\n\n  getLocalTimeZone,\n  isSameDay,\n  isSameMonth,\n  isToday,\n} from '@internationalized/date'\nimport { computed, nextTick } from 'vue'\nimport { isBetweenInclusive, toDate } from '@/date'\nimport { useKbd } from '@/shared'\n\nexport interface RangeCalendarCellTriggerProps extends PrimitiveProps {\n  day: DateValue\n  month: DateValue\n}\n\nexport interface RangeCalendarCellTriggerSlot {\n  default?: (props: {\n    /** Current day */\n    dayValue: string\n    /** Current disable state */\n    disabled: boolean\n    /** Current selected state */\n    selected: boolean\n    /** Current today state */\n    today: boolean\n    /** Current outside view state */\n    outsideView: boolean\n    /** Current outside visible view state */\n    outsideVisibleView: boolean\n    /** Current unavailable state */\n    unavailable: boolean\n    /** Current highlighted state */\n    highlighted: boolean\n    /** Current highlighted start state */\n    highlightedStart: boolean\n    /** Current highlighted end state */\n    highlightedEnd: boolean\n    /** Current selection start state */\n    selectionStart: boolean\n    /** Current selection end state */\n    selectionEnd: boolean\n\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { injectRangeCalendarRootContext } from './RangeCalendarRoot.vue'\n\nconst props = withDefaults(defineProps<RangeCalendarCellTriggerProps>(), { as: 'div' })\ndefineSlots<RangeCalendarCellTriggerSlot>()\n\nconst rootContext = injectRangeCalendarRootContext()\n\nconst kbd = useKbd()\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nconst labelText = computed(() => rootContext.formatter.custom(toDate(props.day), {\n  weekday: 'long',\n  month: 'long',\n  day: 'numeric',\n  year: 'numeric',\n}))\n\nconst isUnavailable = computed(() => rootContext.isDateUnavailable?.(props.day) ?? false)\nconst isSelectedDate = computed(() => rootContext.isSelected(props.day))\nconst isSelectionStart = computed(() => rootContext.isSelectionStart(props.day))\nconst isSelectionEnd = computed(() => rootContext.isSelectionEnd(props.day))\nconst isHighlightStart = computed(() => rootContext.isHighlightedStart(props.day))\nconst isHighlightEnd = computed(() => rootContext.isHighlightedEnd(props.day))\nconst isHighlighted = computed(() => rootContext.highlightedRange.value\n  ? isBetweenInclusive(props.day, rootContext.highlightedRange.value.start, rootContext.highlightedRange.value.end)\n  : false)\nconst allowNonContiguousRanges = computed(() => rootContext.allowNonContiguousRanges.value)\n\nconst isDateToday = computed(() => {\n  return isToday(props.day, getLocalTimeZone())\n})\nconst isOutsideView = computed(() => {\n  return !isSameMonth(props.day, props.month)\n})\nconst isOutsideVisibleView = computed(() =>\n  rootContext.isOutsideVisibleView(props.day),\n)\n\nconst isDisabled = computed(() => rootContext.isDateDisabled(props.day) || (rootContext.disableDaysOutsideCurrentView.value && isOutsideView.value))\n\nconst dayValue = computed(() => props.day.day.toLocaleString(rootContext.locale.value))\n\nconst isFocusedDate = computed(() => {\n  if (isOutsideView.value || isDisabled.value)\n    return false\n  if (!rootContext.disabled.value && rootContext.isPlaceholderFocusable.value && isSameDay(props.day, rootContext.placeholder.value))\n    return true\n  if (!rootContext.disabled.value && rootContext.selectedFocusableDate.value && !rootContext.isPlaceholderFocusable.value)\n    return isSameDay(props.day, rootContext.selectedFocusableDate.value)\n  if (!rootContext.disabled.value && (!rootContext.hasSelectedDate.value || rootContext.isSelectedDisabled.value) && !rootContext.isPlaceholderFocusable.value)\n    return rootContext.firstFocusableDate.value && isSameDay(props.day, rootContext.firstFocusableDate.value)\n  return false\n})\n\nfunction changeDate(e: MouseEvent | KeyboardEvent, date: DateValue) {\n  if (rootContext.readonly.value)\n    return\n  if (rootContext.isDateDisabled(date) || rootContext.isDateUnavailable?.(date))\n    return\n\n  if (rootContext.startValue.value && rootContext.highlightedRange.value === null) {\n    if (isSameDay(date, rootContext.startValue.value) && !rootContext.preventDeselect.value && !rootContext.endValue.value) {\n      rootContext.startValue.value = undefined\n      rootContext.onPlaceholderChange(date)\n      rootContext.lastPressedDateValue.value = date.copy()\n      return\n    }\n    else if (!rootContext.endValue.value) {\n      e.preventDefault()\n      if (rootContext.lastPressedDateValue.value && isSameDay(rootContext.lastPressedDateValue.value, date))\n        rootContext.startValue.value = date.copy()\n      rootContext.lastPressedDateValue.value = date.copy()\n      return\n    }\n  }\n\n  rootContext.lastPressedDateValue.value = date.copy()\n\n  if (\n    rootContext.startValue.value\n    && rootContext.endValue.value\n    && isSameDay(rootContext.startValue.value, rootContext.endValue.value)\n    && isSameDay(rootContext.startValue.value, date)\n    && !rootContext.preventDeselect.value\n  ) {\n    rootContext.startValue.value = undefined\n    rootContext.endValue.value = undefined\n    rootContext.onPlaceholderChange(date)\n    return\n  }\n\n  if (!rootContext.startValue.value) {\n    rootContext.startValue.value = date.copy()\n  }\n  else if (!rootContext.endValue.value) {\n    rootContext.endValue.value = date.copy()\n  }\n  else if (rootContext.endValue.value && rootContext.startValue.value) {\n    if (!rootContext.fixedDate.value) {\n      rootContext.endValue.value = undefined\n      rootContext.startValue.value = date.copy()\n    }\n    else if (rootContext.fixedDate.value === 'start') {\n      if (date.compare(rootContext.startValue.value) < 0) {\n        rootContext.startValue.value = date.copy()\n      }\n      else {\n        rootContext.endValue.value = date.copy()\n      }\n    }\n    else if (rootContext.fixedDate.value === 'end') {\n      if (date.compare(rootContext.endValue.value) > 0) {\n        rootContext.endValue.value = date.copy()\n      }\n      else {\n        rootContext.startValue.value = date.copy()\n      }\n    }\n  }\n}\n\nfunction handleClick(e: MouseEvent) {\n  if (isDisabled.value)\n    return\n  changeDate(e, props.day)\n}\n\nfunction handleFocus() {\n  if (isDisabled.value || rootContext.isDateUnavailable?.(props.day))\n    return\n  rootContext.focusedValue.value = props.day.copy()\n}\n\nfunction handleArrowKey(e: KeyboardEvent) {\n  if (isDisabled.value)\n    return\n  e.preventDefault()\n  e.stopPropagation()\n  const parentElement = rootContext.parentElement.value!\n  const indexIncrementation = 7\n  const sign = rootContext.dir.value === 'rtl' ? -1 : 1\n  switch (e.code) {\n    case kbd.ARROW_RIGHT:\n      shiftFocus(props.day, sign)\n      break\n    case kbd.ARROW_LEFT:\n      shiftFocus(props.day, -sign)\n      break\n    case kbd.ARROW_UP:\n      shiftFocus(props.day, -indexIncrementation)\n      break\n    case kbd.ARROW_DOWN:\n      shiftFocus(props.day, indexIncrementation)\n      break\n    case kbd.ENTER:\n    case kbd.SPACE_CODE:\n      changeDate(e, props.day)\n  }\n\n  function shiftFocus(day: DateValue, add: number) {\n    const candidateDayValue = day.add({ days: add })\n\n    if ((rootContext.minValue.value && candidateDayValue.compare(rootContext.minValue.value) < 0) || (rootContext.maxValue.value && candidateDayValue.compare(rootContext.maxValue.value) > 0))\n      return\n\n    const candidateDay = parentElement.querySelector<HTMLElement>(`[data-value='${candidateDayValue.toString()}']:not([data-outside-view])`)\n    // If the date is not found it means we must change the page\n    if (!candidateDay) {\n      if (add > 0) {\n        if (rootContext.isNextButtonDisabled())\n          return\n        rootContext.nextPage()\n      }\n      else {\n        if (rootContext.isPrevButtonDisabled())\n          return\n        rootContext.prevPage()\n      }\n      nextTick(() => {\n        shiftFocus(day, add)\n      })\n      return\n    }\n\n    if (candidateDay && candidateDay.hasAttribute('data-disabled')) {\n      return shiftFocus(candidateDayValue, add)\n    }\n    rootContext.onPlaceholderChange(candidateDayValue)\n    candidateDay?.focus()\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"button\"\n    :aria-label=\"labelText\"\n    data-reka-calendar-cell-trigger\n    :aria-pressed=\"isSelectedDate && (allowNonContiguousRanges || !isUnavailable) ? true : undefined\"\n    :aria-disabled=\"isDisabled || isUnavailable ? true : undefined\"\n    :data-highlighted=\"isHighlighted && (allowNonContiguousRanges || !isUnavailable) ? '' : undefined\"\n    :data-selection-start=\"isSelectionStart ? true : undefined\"\n    :data-selection-end=\"isSelectionEnd ? true : undefined\"\n    :data-highlighted-start=\"isHighlightStart ? true : undefined\"\n    :data-highlighted-end=\"isHighlightEnd ? true : undefined\"\n    :data-selected=\"isSelectedDate && (allowNonContiguousRanges || !isUnavailable) ? true : undefined\"\n    :data-outside-visible-view=\"isOutsideVisibleView ? '' : undefined\"\n    :data-value=\"day.toString()\"\n    :data-disabled=\"isDisabled ? '' : undefined\"\n    :data-unavailable=\"isUnavailable ? '' : undefined\"\n    :data-today=\"isDateToday ? '' : undefined\"\n    :data-outside-view=\"isOutsideView ? '' : undefined\"\n    :data-focused=\"isFocusedDate ? '' : undefined\"\n    :tabindex=\"isFocusedDate ? 0 : isOutsideView || isDisabled ? undefined : -1\"\n    @click=\"handleClick\"\n    @focusin=\"handleFocus\"\n    @mouseenter=\"handleFocus\"\n    @keydown.up.down.left.right.enter.space=\"handleArrowKey\"\n  >\n    <slot\n      :day-value=\"dayValue\"\n      :disabled=\"isDisabled\"\n      :today=\"isDateToday\"\n      :selected=\"isSelectedDate\"\n      :outside-view=\"isOutsideView\"\n      :outside-visible-view=\"isOutsideVisibleView\"\n      :unavailable=\"isUnavailable\"\n      :highlighted=\"isHighlighted && (allowNonContiguousRanges || !isUnavailable)\"\n      :highlighted-start=\"isHighlightStart\"\n      :highlighted-end=\"isHighlightEnd\"\n      :selection-start=\"isSelectionStart\"\n      :selection-end=\"isSelectionEnd\"\n    >\n      {{ dayValue }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport {\n\n  getLocalTimeZone,\n  isSameDay,\n  isSameMonth,\n  isToday,\n} from '@internationalized/date'\nimport { computed, nextTick } from 'vue'\nimport { isBetweenInclusive, toDate } from '@/date'\nimport { useKbd } from '@/shared'\n\nexport interface RangeCalendarCellTriggerProps extends PrimitiveProps {\n  day: DateValue\n  month: DateValue\n}\n\nexport interface RangeCalendarCellTriggerSlot {\n  default?: (props: {\n    /** Current day */\n    dayValue: string\n    /** Current disable state */\n    disabled: boolean\n    /** Current selected state */\n    selected: boolean\n    /** Current today state */\n    today: boolean\n    /** Current outside view state */\n    outsideView: boolean\n    /** Current outside visible view state */\n    outsideVisibleView: boolean\n    /** Current unavailable state */\n    unavailable: boolean\n    /** Current highlighted state */\n    highlighted: boolean\n    /** Current highlighted start state */\n    highlightedStart: boolean\n    /** Current highlighted end state */\n    highlightedEnd: boolean\n    /** Current selection start state */\n    selectionStart: boolean\n    /** Current selection end state */\n    selectionEnd: boolean\n\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { injectRangeCalendarRootContext } from './RangeCalendarRoot.vue'\n\nconst props = withDefaults(defineProps<RangeCalendarCellTriggerProps>(), { as: 'div' })\ndefineSlots<RangeCalendarCellTriggerSlot>()\n\nconst rootContext = injectRangeCalendarRootContext()\n\nconst kbd = useKbd()\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nconst labelText = computed(() => rootContext.formatter.custom(toDate(props.day), {\n  weekday: 'long',\n  month: 'long',\n  day: 'numeric',\n  year: 'numeric',\n}))\n\nconst isUnavailable = computed(() => rootContext.isDateUnavailable?.(props.day) ?? false)\nconst isSelectedDate = computed(() => rootContext.isSelected(props.day))\nconst isSelectionStart = computed(() => rootContext.isSelectionStart(props.day))\nconst isSelectionEnd = computed(() => rootContext.isSelectionEnd(props.day))\nconst isHighlightStart = computed(() => rootContext.isHighlightedStart(props.day))\nconst isHighlightEnd = computed(() => rootContext.isHighlightedEnd(props.day))\nconst isHighlighted = computed(() => rootContext.highlightedRange.value\n  ? isBetweenInclusive(props.day, rootContext.highlightedRange.value.start, rootContext.highlightedRange.value.end)\n  : false)\nconst allowNonContiguousRanges = computed(() => rootContext.allowNonContiguousRanges.value)\n\nconst isDateToday = computed(() => {\n  return isToday(props.day, getLocalTimeZone())\n})\nconst isOutsideView = computed(() => {\n  return !isSameMonth(props.day, props.month)\n})\nconst isOutsideVisibleView = computed(() =>\n  rootContext.isOutsideVisibleView(props.day),\n)\n\nconst isDisabled = computed(() => rootContext.isDateDisabled(props.day) || (rootContext.disableDaysOutsideCurrentView.value && isOutsideView.value))\n\nconst dayValue = computed(() => props.day.day.toLocaleString(rootContext.locale.value))\n\nconst isFocusedDate = computed(() => {\n  if (isOutsideView.value || isDisabled.value)\n    return false\n  if (!rootContext.disabled.value && rootContext.isPlaceholderFocusable.value && isSameDay(props.day, rootContext.placeholder.value))\n    return true\n  if (!rootContext.disabled.value && rootContext.selectedFocusableDate.value && !rootContext.isPlaceholderFocusable.value)\n    return isSameDay(props.day, rootContext.selectedFocusableDate.value)\n  if (!rootContext.disabled.value && (!rootContext.hasSelectedDate.value || rootContext.isSelectedDisabled.value) && !rootContext.isPlaceholderFocusable.value)\n    return rootContext.firstFocusableDate.value && isSameDay(props.day, rootContext.firstFocusableDate.value)\n  return false\n})\n\nfunction changeDate(e: MouseEvent | KeyboardEvent, date: DateValue) {\n  if (rootContext.readonly.value)\n    return\n  if (rootContext.isDateDisabled(date) || rootContext.isDateUnavailable?.(date))\n    return\n\n  if (rootContext.startValue.value && rootContext.highlightedRange.value === null) {\n    if (isSameDay(date, rootContext.startValue.value) && !rootContext.preventDeselect.value && !rootContext.endValue.value) {\n      rootContext.startValue.value = undefined\n      rootContext.onPlaceholderChange(date)\n      rootContext.lastPressedDateValue.value = date.copy()\n      return\n    }\n    else if (!rootContext.endValue.value) {\n      e.preventDefault()\n      if (rootContext.lastPressedDateValue.value && isSameDay(rootContext.lastPressedDateValue.value, date))\n        rootContext.startValue.value = date.copy()\n      rootContext.lastPressedDateValue.value = date.copy()\n      return\n    }\n  }\n\n  rootContext.lastPressedDateValue.value = date.copy()\n\n  if (\n    rootContext.startValue.value\n    && rootContext.endValue.value\n    && isSameDay(rootContext.startValue.value, rootContext.endValue.value)\n    && isSameDay(rootContext.startValue.value, date)\n    && !rootContext.preventDeselect.value\n  ) {\n    rootContext.startValue.value = undefined\n    rootContext.endValue.value = undefined\n    rootContext.onPlaceholderChange(date)\n    return\n  }\n\n  if (!rootContext.startValue.value) {\n    rootContext.startValue.value = date.copy()\n  }\n  else if (!rootContext.endValue.value) {\n    rootContext.endValue.value = date.copy()\n  }\n  else if (rootContext.endValue.value && rootContext.startValue.value) {\n    if (!rootContext.fixedDate.value) {\n      rootContext.endValue.value = undefined\n      rootContext.startValue.value = date.copy()\n    }\n    else if (rootContext.fixedDate.value === 'start') {\n      if (date.compare(rootContext.startValue.value) < 0) {\n        rootContext.startValue.value = date.copy()\n      }\n      else {\n        rootContext.endValue.value = date.copy()\n      }\n    }\n    else if (rootContext.fixedDate.value === 'end') {\n      if (date.compare(rootContext.endValue.value) > 0) {\n        rootContext.endValue.value = date.copy()\n      }\n      else {\n        rootContext.startValue.value = date.copy()\n      }\n    }\n  }\n}\n\nfunction handleClick(e: MouseEvent) {\n  if (isDisabled.value)\n    return\n  changeDate(e, props.day)\n}\n\nfunction handleFocus() {\n  if (isDisabled.value || rootContext.isDateUnavailable?.(props.day))\n    return\n  rootContext.focusedValue.value = props.day.copy()\n}\n\nfunction handleArrowKey(e: KeyboardEvent) {\n  if (isDisabled.value)\n    return\n  e.preventDefault()\n  e.stopPropagation()\n  const parentElement = rootContext.parentElement.value!\n  const indexIncrementation = 7\n  const sign = rootContext.dir.value === 'rtl' ? -1 : 1\n  switch (e.code) {\n    case kbd.ARROW_RIGHT:\n      shiftFocus(props.day, sign)\n      break\n    case kbd.ARROW_LEFT:\n      shiftFocus(props.day, -sign)\n      break\n    case kbd.ARROW_UP:\n      shiftFocus(props.day, -indexIncrementation)\n      break\n    case kbd.ARROW_DOWN:\n      shiftFocus(props.day, indexIncrementation)\n      break\n    case kbd.ENTER:\n    case kbd.SPACE_CODE:\n      changeDate(e, props.day)\n  }\n\n  function shiftFocus(day: DateValue, add: number) {\n    const candidateDayValue = day.add({ days: add })\n\n    if ((rootContext.minValue.value && candidateDayValue.compare(rootContext.minValue.value) < 0) || (rootContext.maxValue.value && candidateDayValue.compare(rootContext.maxValue.value) > 0))\n      return\n\n    const candidateDay = parentElement.querySelector<HTMLElement>(`[data-value='${candidateDayValue.toString()}']:not([data-outside-view])`)\n    // If the date is not found it means we must change the page\n    if (!candidateDay) {\n      if (add > 0) {\n        if (rootContext.isNextButtonDisabled())\n          return\n        rootContext.nextPage()\n      }\n      else {\n        if (rootContext.isPrevButtonDisabled())\n          return\n        rootContext.prevPage()\n      }\n      nextTick(() => {\n        shiftFocus(day, add)\n      })\n      return\n    }\n\n    if (candidateDay && candidateDay.hasAttribute('data-disabled')) {\n      return shiftFocus(candidateDayValue, add)\n    }\n    rootContext.onPlaceholderChange(candidateDayValue)\n    candidateDay?.focus()\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"button\"\n    :aria-label=\"labelText\"\n    data-reka-calendar-cell-trigger\n    :aria-pressed=\"isSelectedDate && (allowNonContiguousRanges || !isUnavailable) ? true : undefined\"\n    :aria-disabled=\"isDisabled || isUnavailable ? true : undefined\"\n    :data-highlighted=\"isHighlighted && (allowNonContiguousRanges || !isUnavailable) ? '' : undefined\"\n    :data-selection-start=\"isSelectionStart ? true : undefined\"\n    :data-selection-end=\"isSelectionEnd ? true : undefined\"\n    :data-highlighted-start=\"isHighlightStart ? true : undefined\"\n    :data-highlighted-end=\"isHighlightEnd ? true : undefined\"\n    :data-selected=\"isSelectedDate && (allowNonContiguousRanges || !isUnavailable) ? true : undefined\"\n    :data-outside-visible-view=\"isOutsideVisibleView ? '' : undefined\"\n    :data-value=\"day.toString()\"\n    :data-disabled=\"isDisabled ? '' : undefined\"\n    :data-unavailable=\"isUnavailable ? '' : undefined\"\n    :data-today=\"isDateToday ? '' : undefined\"\n    :data-outside-view=\"isOutsideView ? '' : undefined\"\n    :data-focused=\"isFocusedDate ? '' : undefined\"\n    :tabindex=\"isFocusedDate ? 0 : isOutsideView || isDisabled ? undefined : -1\"\n    @click=\"handleClick\"\n    @focusin=\"handleFocus\"\n    @mouseenter=\"handleFocus\"\n    @keydown.up.down.left.right.enter.space=\"handleArrowKey\"\n  >\n    <slot\n      :day-value=\"dayValue\"\n      :disabled=\"isDisabled\"\n      :today=\"isDateToday\"\n      :selected=\"isSelectedDate\"\n      :outside-view=\"isOutsideView\"\n      :outside-visible-view=\"isOutsideVisibleView\"\n      :unavailable=\"isUnavailable\"\n      :highlighted=\"isHighlighted && (allowNonContiguousRanges || !isUnavailable)\"\n      :highlighted-start=\"isHighlightStart\"\n      :highlighted-end=\"isHighlightEnd\"\n      :selection-start=\"isSelectionStart\"\n      :selection-end=\"isSelectionEnd\"\n    >\n      {{ dayValue }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarCellTriggerProps, RangeCalendarCellTriggerSlot } from '@/RangeCalendar/RangeCalendarCellTrigger.vue'\nimport { RangeCalendarCellTrigger } from '..'\n\nexport interface DateRangePickerCellTriggerProps extends RangeCalendarCellTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerCellTriggerProps>()\n\ndefineSlots<RangeCalendarCellTriggerSlot>()\n</script>\n\n<template>\n  <RangeCalendarCellTrigger\n    v-slot=\"slotProps\"\n    v-bind=\"props\"\n  >\n    <slot v-bind=\"slotProps\" />\n  </RangeCalendarCellTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarCellTriggerProps, RangeCalendarCellTriggerSlot } from '@/RangeCalendar/RangeCalendarCellTrigger.vue'\nimport { RangeCalendarCellTrigger } from '..'\n\nexport interface DateRangePickerCellTriggerProps extends RangeCalendarCellTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerCellTriggerProps>()\n\ndefineSlots<RangeCalendarCellTriggerSlot>()\n</script>\n\n<template>\n  <RangeCalendarCellTrigger\n    v-slot=\"slotProps\"\n    v-bind=\"props\"\n  >\n    <slot v-bind=\"slotProps\" />\n  </RangeCalendarCellTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverCloseProps } from '..'\nimport { PopoverClose } from '..'\n\nexport interface DateRangePickerCloseProps extends PopoverCloseProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerCloseProps>()\n</script>\n\n<template>\n  <PopoverClose v-bind=\"props\">\n    <slot />\n  </PopoverClose>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverCloseProps } from '..'\nimport { PopoverClose } from '..'\n\nexport interface DateRangePickerCloseProps extends PopoverCloseProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerCloseProps>()\n</script>\n\n<template>\n  <PopoverClose v-bind=\"props\">\n    <slot />\n  </PopoverClose>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverContentEmits, PopoverContentProps, PopoverPortalProps } from '..'\nimport { computed } from 'vue'\nimport { handleCalendarInitialFocus } from '@/shared/date'\nimport { PopoverContent, PopoverPortal, useForwardPropsEmits } from '..'\n\nexport interface DateRangePickerContentProps extends PopoverContentProps {\n  /**\n   * Props to control the portal wrapped around the content.\n   */\n  portal?: PopoverPortalProps\n}\nexport interface DateRangePickerContentEmits extends PopoverContentEmits {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerContentProps>()\nconst emits = defineEmits<DateRangePickerContentEmits>()\n\nconst propsToForward = computed(() => ({\n  ...props,\n  portal: undefined,\n}))\nconst forwarded = useForwardPropsEmits(propsToForward, emits)\n</script>\n\n<template>\n  <PopoverPortal v-bind=\"portal\">\n    <PopoverContent\n      v-bind=\"{ ...forwarded, ...$attrs }\"\n      @open-auto-focus=\"event => {\n        emits('openAutoFocus', event)\n\n        if (!event.defaultPrevented && event.target) {\n          handleCalendarInitialFocus(event.target as HTMLElement)\n          event.preventDefault()\n        }\n      }\"\n    >\n      <slot />\n    </PopoverContent>\n  </PopoverPortal>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverContentEmits, PopoverContentProps, PopoverPortalProps } from '..'\nimport { computed } from 'vue'\nimport { handleCalendarInitialFocus } from '@/shared/date'\nimport { PopoverContent, PopoverPortal, useForwardPropsEmits } from '..'\n\nexport interface DateRangePickerContentProps extends PopoverContentProps {\n  /**\n   * Props to control the portal wrapped around the content.\n   */\n  portal?: PopoverPortalProps\n}\nexport interface DateRangePickerContentEmits extends PopoverContentEmits {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerContentProps>()\nconst emits = defineEmits<DateRangePickerContentEmits>()\n\nconst propsToForward = computed(() => ({\n  ...props,\n  portal: undefined,\n}))\nconst forwarded = useForwardPropsEmits(propsToForward, emits)\n</script>\n\n<template>\n  <PopoverPortal v-bind=\"portal\">\n    <PopoverContent\n      v-bind=\"{ ...forwarded, ...$attrs }\"\n      @open-auto-focus=\"event => {\n        emits('openAutoFocus', event)\n\n        if (!event.defaultPrevented && event.target) {\n          handleCalendarInitialFocus(event.target as HTMLElement)\n          event.preventDefault()\n        }\n      }\"\n    >\n      <slot />\n    </PopoverContent>\n  </PopoverPortal>\n</template>\n","<script lang=\"ts\">\nimport { isEqualDay } from '@internationalized/date'\nimport { DateRangeFieldRoot } from '..'\nimport { injectDateRangePickerRootContext } from './DateRangePickerRoot.vue'\n</script>\n\n<script setup lang=\"ts\">\nconst rootContext = injectDateRangePickerRootContext()\n</script>\n\n<template>\n  <DateRangeFieldRoot\n    v-slot=\"{ segments, modelValue }\"\n    :ref=\"rootContext.dateFieldRef\"\n    :model-value=\"rootContext.modelValue.value\"\n    :placeholder=\"rootContext.placeholder.value\"\n    v-bind=\"{\n      id: rootContext.id.value,\n      name: rootContext.name.value,\n      disabled: rootContext.disabled.value,\n      minValue: rootContext.minValue.value,\n      maxValue: rootContext.maxValue.value,\n      readonly: rootContext.readonly.value,\n      hourCycle: rootContext.hourCycle.value,\n      granularity: rootContext.granularity.value,\n      hideTimeZone: rootContext.hideTimeZone.value,\n      locale: rootContext.locale.value,\n      isDateUnavailable: rootContext.isDateUnavailable,\n      required: rootContext.required.value,\n      dir: rootContext.dir.value,\n      step: rootContext.step.value,\n    }\"\n    @update:model-value=\"(date) => {\n      if (date.start && rootContext.modelValue.value.start && date.end && rootContext.modelValue.value.end && date.start.compare(rootContext.modelValue.value.start) === 0 && date.end.compare(rootContext.modelValue.value.end) === 0) return\n      rootContext.onDateChange(date)\n    }\"\n    @update:placeholder=\"(date) => {\n      if (isEqualDay(date, rootContext.placeholder.value) && date.compare(rootContext.placeholder.value) === 0) return\n      rootContext.onPlaceholderChange(date)\n    }\"\n  >\n    <slot\n      :segments=\"segments\"\n      :model-value=\"modelValue\"\n    />\n  </DateRangeFieldRoot>\n</template>\n","<script lang=\"ts\">\nimport { isEqualDay } from '@internationalized/date'\nimport { DateRangeFieldRoot } from '..'\nimport { injectDateRangePickerRootContext } from './DateRangePickerRoot.vue'\n</script>\n\n<script setup lang=\"ts\">\nconst rootContext = injectDateRangePickerRootContext()\n</script>\n\n<template>\n  <DateRangeFieldRoot\n    v-slot=\"{ segments, modelValue }\"\n    :ref=\"rootContext.dateFieldRef\"\n    :model-value=\"rootContext.modelValue.value\"\n    :placeholder=\"rootContext.placeholder.value\"\n    v-bind=\"{\n      id: rootContext.id.value,\n      name: rootContext.name.value,\n      disabled: rootContext.disabled.value,\n      minValue: rootContext.minValue.value,\n      maxValue: rootContext.maxValue.value,\n      readonly: rootContext.readonly.value,\n      hourCycle: rootContext.hourCycle.value,\n      granularity: rootContext.granularity.value,\n      hideTimeZone: rootContext.hideTimeZone.value,\n      locale: rootContext.locale.value,\n      isDateUnavailable: rootContext.isDateUnavailable,\n      required: rootContext.required.value,\n      dir: rootContext.dir.value,\n      step: rootContext.step.value,\n    }\"\n    @update:model-value=\"(date) => {\n      if (date.start && rootContext.modelValue.value.start && date.end && rootContext.modelValue.value.end && date.start.compare(rootContext.modelValue.value.start) === 0 && date.end.compare(rootContext.modelValue.value.end) === 0) return\n      rootContext.onDateChange(date)\n    }\"\n    @update:placeholder=\"(date) => {\n      if (isEqualDay(date, rootContext.placeholder.value) && date.compare(rootContext.placeholder.value) === 0) return\n      rootContext.onPlaceholderChange(date)\n    }\"\n  >\n    <slot\n      :segments=\"segments\"\n      :model-value=\"modelValue\"\n    />\n  </DateRangeFieldRoot>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarGridProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectRangeCalendarRootContext } from './RangeCalendarRoot.vue'\n\nconst props = withDefaults(defineProps<RangeCalendarGridProps>(), { as: 'table' })\n\nconst rootContext = injectRangeCalendarRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value ? true : undefined)\nconst readonly = computed(() => rootContext.readonly.value ? true : undefined)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    tabindex=\"-1\"\n    role=\"application\"\n    :aria-readonly=\"readonly\"\n    :aria-disabled=\"disabled\"\n    :data-readonly=\"readonly && ''\"\n    :data-disabled=\"disabled && ''\"\n    @mouseleave=\"rootContext.focusedValue.value = undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarGridProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectRangeCalendarRootContext } from './RangeCalendarRoot.vue'\n\nconst props = withDefaults(defineProps<RangeCalendarGridProps>(), { as: 'table' })\n\nconst rootContext = injectRangeCalendarRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value ? true : undefined)\nconst readonly = computed(() => rootContext.readonly.value ? true : undefined)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    tabindex=\"-1\"\n    role=\"application\"\n    :aria-readonly=\"readonly\"\n    :aria-disabled=\"disabled\"\n    :data-readonly=\"readonly && ''\"\n    :data-disabled=\"disabled && ''\"\n    @mouseleave=\"rootContext.focusedValue.value = undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarGridProps } from '..'\nimport { RangeCalendarGrid } from '..'\n\nexport interface DateRangePickerGridProps extends RangeCalendarGridProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerGridProps>()\n</script>\n\n<template>\n  <RangeCalendarGrid v-bind=\"props\">\n    <slot />\n  </RangeCalendarGrid>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarGridProps } from '..'\nimport { RangeCalendarGrid } from '..'\n\nexport interface DateRangePickerGridProps extends RangeCalendarGridProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerGridProps>()\n</script>\n\n<template>\n  <RangeCalendarGrid v-bind=\"props\">\n    <slot />\n  </RangeCalendarGrid>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarGridBodyProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<RangeCalendarGridBodyProps>(), { as: 'tbody' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarGridBodyProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<RangeCalendarGridBodyProps>(), { as: 'tbody' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarGridBodyProps } from '..'\nimport { RangeCalendarGridBody } from '..'\n\nexport interface DateRangePickerGridBodyProps extends RangeCalendarGridBodyProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerGridBodyProps>()\n</script>\n\n<template>\n  <RangeCalendarGridBody v-bind=\"props\">\n    <slot />\n  </RangeCalendarGridBody>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarGridBodyProps } from '..'\nimport { RangeCalendarGridBody } from '..'\n\nexport interface DateRangePickerGridBodyProps extends RangeCalendarGridBodyProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerGridBodyProps>()\n</script>\n\n<template>\n  <RangeCalendarGridBody v-bind=\"props\">\n    <slot />\n  </RangeCalendarGridBody>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarGridHeadProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<RangeCalendarGridHeadProps>(), { as: 'thead' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-hidden=\"true\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarGridHeadProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<RangeCalendarGridHeadProps>(), { as: 'thead' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-hidden=\"true\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarGridHeadProps } from '..'\nimport { RangeCalendarGridHead } from '..'\n\nexport interface DateRangePickerGridHeadProps extends RangeCalendarGridHeadProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerGridHeadProps>()\n</script>\n\n<template>\n  <RangeCalendarGridHead v-bind=\"props\">\n    <slot />\n  </RangeCalendarGridHead>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarGridHeadProps } from '..'\nimport { RangeCalendarGridHead } from '..'\n\nexport interface DateRangePickerGridHeadProps extends RangeCalendarGridHeadProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerGridHeadProps>()\n</script>\n\n<template>\n  <RangeCalendarGridHead v-bind=\"props\">\n    <slot />\n  </RangeCalendarGridHead>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarGridRowProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<RangeCalendarGridRowProps>(), { as: 'tr' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarGridRowProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<RangeCalendarGridRowProps>(), { as: 'tr' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarGridRowProps } from '..'\nimport { RangeCalendarGridRow } from '..'\n\nexport interface DateRangePickerGridRowProps extends RangeCalendarGridRowProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerGridRowProps>()\n</script>\n\n<template>\n  <RangeCalendarGridRow v-bind=\"props\">\n    <slot />\n  </RangeCalendarGridRow>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarGridRowProps } from '..'\nimport { RangeCalendarGridRow } from '..'\n\nexport interface DateRangePickerGridRowProps extends RangeCalendarGridRowProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerGridRowProps>()\n</script>\n\n<template>\n  <RangeCalendarGridRow v-bind=\"props\">\n    <slot />\n  </RangeCalendarGridRow>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarHeadCellProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<RangeCalendarHeadCellProps>(), { as: 'th' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarHeadCellProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<RangeCalendarHeadCellProps>(), { as: 'th' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarHeadCellProps } from '..'\nimport { RangeCalendarHeadCell } from '..'\n\nexport interface DateRangePickerHeadCellProps extends RangeCalendarHeadCellProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerHeadCellProps>()\n</script>\n\n<template>\n  <RangeCalendarHeadCell v-bind=\"props\">\n    <slot />\n  </RangeCalendarHeadCell>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarHeadCellProps } from '..'\nimport { RangeCalendarHeadCell } from '..'\n\nexport interface DateRangePickerHeadCellProps extends RangeCalendarHeadCellProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerHeadCellProps>()\n</script>\n\n<template>\n  <RangeCalendarHeadCell v-bind=\"props\">\n    <slot />\n  </RangeCalendarHeadCell>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarHeaderProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<RangeCalendarHeaderProps>(), { as: 'div' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarHeaderProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<RangeCalendarHeaderProps>(), { as: 'div' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarHeaderProps } from '..'\nimport { RangeCalendarHeader } from '..'\n\nexport interface DateRangePickerHeaderProps extends RangeCalendarHeaderProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerHeaderProps>()\n</script>\n\n<template>\n  <RangeCalendarHeader v-bind=\"props\">\n    <slot />\n  </RangeCalendarHeader>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarHeaderProps } from '..'\nimport { RangeCalendarHeader } from '..'\n\nexport interface DateRangePickerHeaderProps extends RangeCalendarHeaderProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerHeaderProps>()\n</script>\n\n<template>\n  <RangeCalendarHeader v-bind=\"props\">\n    <slot />\n  </RangeCalendarHeader>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarHeadingProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectRangeCalendarRootContext } from './RangeCalendarRoot.vue'\n\nconst props = withDefaults(defineProps<RangeCalendarHeadingProps>(), { as: 'div' })\ndefineSlots<{\n  default?: (props: {\n    /** Current month and year */\n    headingValue: string\n  }) => any\n}>()\nconst rootContext = injectRangeCalendarRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n  >\n    <slot :heading-value=\"rootContext.headingValue.value\">\n      {{ rootContext.headingValue.value }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarHeadingProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectRangeCalendarRootContext } from './RangeCalendarRoot.vue'\n\nconst props = withDefaults(defineProps<RangeCalendarHeadingProps>(), { as: 'div' })\ndefineSlots<{\n  default?: (props: {\n    /** Current month and year */\n    headingValue: string\n  }) => any\n}>()\nconst rootContext = injectRangeCalendarRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n  >\n    <slot :heading-value=\"rootContext.headingValue.value\">\n      {{ rootContext.headingValue.value }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarHeadingProps } from '..'\nimport { RangeCalendarHeading } from '..'\n\nexport interface DateRangePickerHeadingProps extends RangeCalendarHeadingProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerHeadingProps>()\ndefineSlots<{\n  default?: (props: {\n    /** Current month and year */\n    headingValue: string\n  }) => any\n}>()\n</script>\n\n<template>\n  <RangeCalendarHeading\n    v-slot=\"{ headingValue }\"\n    v-bind=\"props\"\n  >\n    <slot :heading-value=\"headingValue\">\n      {{ headingValue }}\n    </slot>\n  </RangeCalendarHeading>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarHeadingProps } from '..'\nimport { RangeCalendarHeading } from '..'\n\nexport interface DateRangePickerHeadingProps extends RangeCalendarHeadingProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerHeadingProps>()\ndefineSlots<{\n  default?: (props: {\n    /** Current month and year */\n    headingValue: string\n  }) => any\n}>()\n</script>\n\n<template>\n  <RangeCalendarHeading\n    v-slot=\"{ headingValue }\"\n    v-bind=\"props\"\n  >\n    <slot :heading-value=\"headingValue\">\n      {{ headingValue }}\n    </slot>\n  </RangeCalendarHeading>\n</template>\n","<script lang=\"ts\">\nimport type { DateRangeFieldInputProps } from '..'\nimport { DateRangeFieldInput } from '..'\n\nexport interface DateRangePickerInputProps extends DateRangeFieldInputProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerInputProps>()\n</script>\n\n<template>\n  <DateRangeFieldInput v-bind=\"props\">\n    <slot />\n  </DateRangeFieldInput>\n</template>\n","<script lang=\"ts\">\nimport type { DateRangeFieldInputProps } from '..'\nimport { DateRangeFieldInput } from '..'\n\nexport interface DateRangePickerInputProps extends DateRangeFieldInputProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerInputProps>()\n</script>\n\n<template>\n  <DateRangeFieldInput v-bind=\"props\">\n    <slot />\n  </DateRangeFieldInput>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarNextProps extends PrimitiveProps {\n  /** The function to be used for the next page. Overwrites the `nextPage` function set on the `RangeCalendarRoot`. */\n  nextPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface RangeCalendarNextSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectRangeCalendarRootContext } from './RangeCalendarRoot.vue'\n\nconst props = withDefaults(defineProps<RangeCalendarNextProps>(), { as: 'button' })\ndefineSlots<RangeCalendarNextSlot>()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isNextButtonDisabled(props.nextPage))\n\nconst rootContext = injectRangeCalendarRootContext()\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.nextPage(props.nextPage)\n}\n</script>\n\n<template>\n  <Primitive\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    aria-label=\"Next page\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Next page\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarNextProps extends PrimitiveProps {\n  /** The function to be used for the next page. Overwrites the `nextPage` function set on the `RangeCalendarRoot`. */\n  nextPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface RangeCalendarNextSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectRangeCalendarRootContext } from './RangeCalendarRoot.vue'\n\nconst props = withDefaults(defineProps<RangeCalendarNextProps>(), { as: 'button' })\ndefineSlots<RangeCalendarNextSlot>()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isNextButtonDisabled(props.nextPage))\n\nconst rootContext = injectRangeCalendarRootContext()\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.nextPage(props.nextPage)\n}\n</script>\n\n<template>\n  <Primitive\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    aria-label=\"Next page\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Next page\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarNextProps } from '..'\nimport type { RangeCalendarNextSlot } from '@/RangeCalendar/RangeCalendarNext.vue'\nimport { RangeCalendarNext } from '..'\n\nexport interface DateRangePickerNextProps extends RangeCalendarNextProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerNextProps>()\ndefineSlots<RangeCalendarNextSlot>()\n</script>\n\n<template>\n  <RangeCalendarNext\n    v-slot=\"slotProps \"\n    v-bind=\"props\"\n  >\n    <slot v-bind=\"slotProps\" />\n  </RangeCalendarNext>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarNextProps } from '..'\nimport type { RangeCalendarNextSlot } from '@/RangeCalendar/RangeCalendarNext.vue'\nimport { RangeCalendarNext } from '..'\n\nexport interface DateRangePickerNextProps extends RangeCalendarNextProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerNextProps>()\ndefineSlots<RangeCalendarNextSlot>()\n</script>\n\n<template>\n  <RangeCalendarNext\n    v-slot=\"slotProps \"\n    v-bind=\"props\"\n  >\n    <slot v-bind=\"slotProps\" />\n  </RangeCalendarNext>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarPrevProps extends PrimitiveProps {\n  /** The function to be used for the prev page. Overwrites the `prevPage` function set on the `RangeCalendarRoot`. */\n  prevPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface RangeCalendarPrevSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectRangeCalendarRootContext } from './RangeCalendarRoot.vue'\n\nconst props = withDefaults(defineProps<RangeCalendarPrevProps>(), { as: 'button' })\ndefineSlots<RangeCalendarPrevSlot>()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isPrevButtonDisabled(props.prevPage))\n\nconst rootContext = injectRangeCalendarRootContext()\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.prevPage(props.prevPage)\n}\n</script>\n\n<template>\n  <Primitive\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    aria-label=\"Previous page\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Prev page\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface RangeCalendarPrevProps extends PrimitiveProps {\n  /** The function to be used for the prev page. Overwrites the `prevPage` function set on the `RangeCalendarRoot`. */\n  prevPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface RangeCalendarPrevSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectRangeCalendarRootContext } from './RangeCalendarRoot.vue'\n\nconst props = withDefaults(defineProps<RangeCalendarPrevProps>(), { as: 'button' })\ndefineSlots<RangeCalendarPrevSlot>()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isPrevButtonDisabled(props.prevPage))\n\nconst rootContext = injectRangeCalendarRootContext()\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.prevPage(props.prevPage)\n}\n</script>\n\n<template>\n  <Primitive\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    aria-label=\"Previous page\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Prev page\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarPrevProps } from '..'\nimport type { RangeCalendarPrevSlot } from '@/RangeCalendar/RangeCalendarPrev.vue'\nimport { RangeCalendarPrev } from '..'\n\nexport interface DateRangePickerPrevProps extends RangeCalendarPrevProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerPrevProps>()\ndefineSlots<RangeCalendarPrevSlot>()\n</script>\n\n<template>\n  <RangeCalendarPrev\n    v-slot=\"slotProps \"\n    v-bind=\"props\"\n  >\n    <slot v-bind=\"slotProps\" />\n  </RangeCalendarPrev>\n</template>\n","<script lang=\"ts\">\nimport type { RangeCalendarPrevProps } from '..'\nimport type { RangeCalendarPrevSlot } from '@/RangeCalendar/RangeCalendarPrev.vue'\nimport { RangeCalendarPrev } from '..'\n\nexport interface DateRangePickerPrevProps extends RangeCalendarPrevProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerPrevProps>()\ndefineSlots<RangeCalendarPrevSlot>()\n</script>\n\n<template>\n  <RangeCalendarPrev\n    v-slot=\"slotProps \"\n    v-bind=\"props\"\n  >\n    <slot v-bind=\"slotProps\" />\n  </RangeCalendarPrev>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverTriggerProps } from '..'\nimport { PopoverTrigger } from '..'\nimport { injectDateRangePickerRootContext } from './DateRangePickerRoot.vue'\n\nexport interface DateRangePickerTriggerProps extends PopoverTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerTriggerProps>()\nconst rootContext = injectDateRangePickerRootContext()\n</script>\n\n<template>\n  <PopoverTrigger\n    data-reka-date-field-segment=\"trigger\"\n    v-bind=\"props\"\n    :disabled=\"rootContext.disabled.value\"\n    @focusin=\"(e: FocusEvent) => {\n      rootContext.dateFieldRef.value?.setFocusedElement(e.target as HTMLElement)\n    }\"\n  >\n    <slot />\n  </PopoverTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { PopoverTriggerProps } from '..'\nimport { PopoverTrigger } from '..'\nimport { injectDateRangePickerRootContext } from './DateRangePickerRoot.vue'\n\nexport interface DateRangePickerTriggerProps extends PopoverTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<DateRangePickerTriggerProps>()\nconst rootContext = injectDateRangePickerRootContext()\n</script>\n\n<template>\n  <PopoverTrigger\n    data-reka-date-field-segment=\"trigger\"\n    v-bind=\"props\"\n    :disabled=\"rootContext.disabled.value\"\n    @focusin=\"(e: FocusEvent) => {\n      rootContext.dateFieldRef.value?.setFocusedElement(e.target as HTMLElement)\n    }\"\n  >\n    <slot />\n  </PopoverTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { MenuArrowProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DropdownMenuArrowProps extends MenuArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuArrow } from '@/Menu'\n\nconst props = withDefaults(defineProps<DropdownMenuArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuArrow v-bind=\"props\">\n    <slot />\n  </MenuArrow>\n</template>\n","<script lang=\"ts\">\nimport type { MenuArrowProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DropdownMenuArrowProps extends MenuArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuArrow } from '@/Menu'\n\nconst props = withDefaults(defineProps<DropdownMenuArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuArrow v-bind=\"props\">\n    <slot />\n  </MenuArrow>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuCheckboxItemEmits,\n  MenuCheckboxItemProps,\n} from '@/Menu'\n\nexport type DropdownMenuCheckboxItemEmits = MenuCheckboxItemEmits\n\nexport interface DropdownMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuCheckboxItem } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<DropdownMenuCheckboxItemProps>()\nconst emits = defineEmits<DropdownMenuCheckboxItemEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuCheckboxItem v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuCheckboxItem>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuCheckboxItemEmits,\n  MenuCheckboxItemProps,\n} from '@/Menu'\n\nexport type DropdownMenuCheckboxItemEmits = MenuCheckboxItemEmits\n\nexport interface DropdownMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuCheckboxItem } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<DropdownMenuCheckboxItemProps>()\nconst emits = defineEmits<DropdownMenuCheckboxItemEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuCheckboxItem v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuCheckboxItem>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { Direction } from '../shared/types'\nimport type { MenuEmits, MenuProps } from '@/Menu'\nimport { createContext, useDirection, useForwardExpose } from '@/shared'\n\nexport interface DropdownMenuRootProps extends MenuProps {\n  /** The open state of the dropdown menu when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n}\nexport type DropdownMenuRootEmits = MenuEmits\n\nexport interface DropdownMenuRootContext {\n  open: Readonly<Ref<boolean>>\n  onOpenChange: (open: boolean) => void\n  onOpenToggle: () => void\n  triggerId: string\n  triggerElement: Ref<HTMLElement | undefined>\n  contentId: string\n  modal: Ref<boolean>\n  dir: Ref<Direction>\n}\n\nexport const [injectDropdownMenuRootContext, provideDropdownMenuRootContext]\n  = createContext<DropdownMenuRootContext>('DropdownMenuRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { ref, toRefs } from 'vue'\nimport { MenuRoot } from '@/Menu'\n\nconst props = withDefaults(defineProps<DropdownMenuRootProps>(), {\n  modal: true,\n  open: undefined,\n})\nconst emit = defineEmits<DropdownMenuRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nuseForwardExpose()\nconst open = useVModel(props, 'open', emit, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst triggerElement = ref<HTMLElement>()\n\nconst { modal, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\nprovideDropdownMenuRootContext({\n  open,\n  onOpenChange: (value) => {\n    open.value = value\n  },\n  onOpenToggle: () => {\n    open.value = !open.value\n  },\n  triggerId: '',\n  triggerElement,\n  contentId: '',\n  modal,\n  dir,\n})\n</script>\n\n<template>\n  <MenuRoot\n    v-model:open=\"open\"\n    :dir=\"dir\"\n    :modal=\"modal\"\n  >\n    <slot :open=\"open\" />\n  </MenuRoot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { Direction } from '../shared/types'\nimport type { MenuEmits, MenuProps } from '@/Menu'\nimport { createContext, useDirection, useForwardExpose } from '@/shared'\n\nexport interface DropdownMenuRootProps extends MenuProps {\n  /** The open state of the dropdown menu when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n}\nexport type DropdownMenuRootEmits = MenuEmits\n\nexport interface DropdownMenuRootContext {\n  open: Readonly<Ref<boolean>>\n  onOpenChange: (open: boolean) => void\n  onOpenToggle: () => void\n  triggerId: string\n  triggerElement: Ref<HTMLElement | undefined>\n  contentId: string\n  modal: Ref<boolean>\n  dir: Ref<Direction>\n}\n\nexport const [injectDropdownMenuRootContext, provideDropdownMenuRootContext]\n  = createContext<DropdownMenuRootContext>('DropdownMenuRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { ref, toRefs } from 'vue'\nimport { MenuRoot } from '@/Menu'\n\nconst props = withDefaults(defineProps<DropdownMenuRootProps>(), {\n  modal: true,\n  open: undefined,\n})\nconst emit = defineEmits<DropdownMenuRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nuseForwardExpose()\nconst open = useVModel(props, 'open', emit, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst triggerElement = ref<HTMLElement>()\n\nconst { modal, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\nprovideDropdownMenuRootContext({\n  open,\n  onOpenChange: (value) => {\n    open.value = value\n  },\n  onOpenToggle: () => {\n    open.value = !open.value\n  },\n  triggerId: '',\n  triggerElement,\n  contentId: '',\n  modal,\n  dir,\n})\n</script>\n\n<template>\n  <MenuRoot\n    v-model:open=\"open\"\n    :dir=\"dir\"\n    :modal=\"modal\"\n  >\n    <slot :open=\"open\" />\n  </MenuRoot>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuContentEmits,\n  MenuContentProps,\n} from '@/Menu'\n\nexport type DropdownMenuContentEmits = MenuContentEmits\n\nexport interface DropdownMenuContentProps extends MenuContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { MenuContent } from '@/Menu'\nimport { useForwardExpose, useForwardPropsEmits, useId } from '@/shared'\nimport { injectDropdownMenuRootContext } from './DropdownMenuRoot.vue'\n\nconst props = defineProps<DropdownMenuContentProps>()\nconst emits = defineEmits<DropdownMenuContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\nuseForwardExpose()\n\nconst rootContext = injectDropdownMenuRootContext()\n\nconst hasInteractedOutsideRef = ref(false)\n\nfunction handleCloseAutoFocus(event: Event) {\n  if (event.defaultPrevented)\n    return\n  if (!hasInteractedOutsideRef.value) {\n    setTimeout(() => {\n      rootContext.triggerElement.value?.focus()\n    }, 0)\n  }\n  hasInteractedOutsideRef.value = false\n\n  // Always prevent auto focus because we either focus manually or want user agent focus\n  event.preventDefault()\n}\n\nrootContext.contentId ||= useId(undefined, 'reka-dropdown-menu-content')\n</script>\n\n<template>\n  <MenuContent\n    v-bind=\"forwarded\"\n    :id=\"rootContext.contentId\"\n    :aria-labelledby=\"rootContext?.triggerId\"\n    :style=\"{\n      '--reka-dropdown-menu-content-transform-origin':\n        'var(--reka-popper-transform-origin)',\n      '--reka-dropdown-menu-content-available-width':\n        'var(--reka-popper-available-width)',\n      '--reka-dropdown-menu-content-available-height':\n        'var(--reka-popper-available-height)',\n      '--reka-dropdown-menu-trigger-width': 'var(--reka-popper-anchor-width)',\n      '--reka-dropdown-menu-trigger-height':\n        'var(--reka-popper-anchor-height)',\n    }\"\n    @close-auto-focus=\"handleCloseAutoFocus\"\n    @interact-outside=\"(event) => {\n      if (event.defaultPrevented) return\n\n      const originalEvent = event.detail.originalEvent as PointerEvent;\n      const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n      const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n      if (!rootContext.modal.value || isRightClick) hasInteractedOutsideRef = true;\n      if (rootContext.triggerElement.value?.contains(event.target as HTMLElement)) event.preventDefault()\n    }\"\n  >\n    <slot />\n  </MenuContent>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuContentEmits,\n  MenuContentProps,\n} from '@/Menu'\n\nexport type DropdownMenuContentEmits = MenuContentEmits\n\nexport interface DropdownMenuContentProps extends MenuContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { MenuContent } from '@/Menu'\nimport { useForwardExpose, useForwardPropsEmits, useId } from '@/shared'\nimport { injectDropdownMenuRootContext } from './DropdownMenuRoot.vue'\n\nconst props = defineProps<DropdownMenuContentProps>()\nconst emits = defineEmits<DropdownMenuContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\nuseForwardExpose()\n\nconst rootContext = injectDropdownMenuRootContext()\n\nconst hasInteractedOutsideRef = ref(false)\n\nfunction handleCloseAutoFocus(event: Event) {\n  if (event.defaultPrevented)\n    return\n  if (!hasInteractedOutsideRef.value) {\n    setTimeout(() => {\n      rootContext.triggerElement.value?.focus()\n    }, 0)\n  }\n  hasInteractedOutsideRef.value = false\n\n  // Always prevent auto focus because we either focus manually or want user agent focus\n  event.preventDefault()\n}\n\nrootContext.contentId ||= useId(undefined, 'reka-dropdown-menu-content')\n</script>\n\n<template>\n  <MenuContent\n    v-bind=\"forwarded\"\n    :id=\"rootContext.contentId\"\n    :aria-labelledby=\"rootContext?.triggerId\"\n    :style=\"{\n      '--reka-dropdown-menu-content-transform-origin':\n        'var(--reka-popper-transform-origin)',\n      '--reka-dropdown-menu-content-available-width':\n        'var(--reka-popper-available-width)',\n      '--reka-dropdown-menu-content-available-height':\n        'var(--reka-popper-available-height)',\n      '--reka-dropdown-menu-trigger-width': 'var(--reka-popper-anchor-width)',\n      '--reka-dropdown-menu-trigger-height':\n        'var(--reka-popper-anchor-height)',\n    }\"\n    @close-auto-focus=\"handleCloseAutoFocus\"\n    @interact-outside=\"(event) => {\n      if (event.defaultPrevented) return\n\n      const originalEvent = event.detail.originalEvent as PointerEvent;\n      const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n      const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n      if (!rootContext.modal.value || isRightClick) hasInteractedOutsideRef = true;\n      if (rootContext.triggerElement.value?.contains(event.target as HTMLElement)) event.preventDefault()\n    }\"\n  >\n    <slot />\n  </MenuContent>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useVModel } from '@vueuse/core'\nimport { computed, onMounted, onUnmounted, ref, watch, watchSyncEffect } from 'vue'\nimport { injectMenuContentContext } from '@/Menu/MenuContentImpl.vue'\nimport { injectMenuRootContext } from '@/Menu/MenuRoot.vue'\nimport { injectMenuSubContext } from '@/Menu/MenuSub.vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { useComposing } from '@/shared'\n\nexport interface DropdownMenuFilterProps extends PrimitiveProps {\n  /** The controlled value of the filter. Can be binded with v-model. */\n  modelValue?: string\n  /** Focus on element when mounted. */\n  autoFocus?: boolean\n  /** When `true`, prevents the user from interacting with item */\n  disabled?: boolean\n}\n\nexport type DropdownMenuFilterEmits = {\n  'update:modelValue': [string]\n}\n</script>\n\n<script setup lang=\"ts\">\nconst props = withDefaults(defineProps<DropdownMenuFilterProps>(), {\n  as: 'input',\n})\nconst emits = defineEmits<DropdownMenuFilterEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: '',\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst rootContext = injectMenuRootContext()\nconst contentContext = injectMenuContentContext()\nconst subContext = injectMenuSubContext(null)\n\n// Keep searchRef in sync with modelValue changes\nwatch(modelValue, (v) => { contentContext.searchRef.value = v ?? '' }, { immediate: true })\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\nconst disabled = computed(() => props.disabled || false)\n\nconst activedescendant = ref<string | undefined>()\nwatchSyncEffect(() => activedescendant.value = contentContext.highlightedElement.value?.id)\n\nonMounted(() => {\n  contentContext.onFilterElementChange(currentElement.value)\n  setTimeout(() => {\n    // make sure all DOM was flush then only capture the focus\n    if (props.autoFocus) {\n      const isSubmenu = !!subContext\n      if (!isSubmenu || rootContext.isUsingKeyboardRef.value)\n        currentElement.value?.focus()\n    }\n  }, 1)\n})\n\nonUnmounted(() => {\n  contentContext.onFilterElementChange(undefined)\n  // Clean up search when unmounting\n  contentContext.searchRef.value = ''\n})\n\nconst { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing((event) => {\n  const el = event.target as HTMLInputElement\n  if (el) {\n    modelValue.value = el.value\n    contentContext.searchRef.value = el.value\n  }\n})\n\nfunction handleInput(event: InputEvent) {\n  if (disabled.value)\n    return\n  if (isComposing.value)\n    return\n  const target = event.target as HTMLInputElement\n  modelValue.value = target.value\n  contentContext.searchRef.value = target.value\n}\n\nfunction handleKeyDown(event: KeyboardEvent) {\n  if (disabled.value)\n    return\n  // During composition the keys belong to the IME (candidate navigation/commit).\n  // Stop them from bubbling to the menu content's keydown handler (which would\n  // navigate/typeahead) without calling preventDefault, so the IME still works.\n  if (isComposing.value) {\n    event.stopPropagation()\n    return\n  }\n  if (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) {\n    event.preventDefault()\n    contentContext.onKeydownNavigation(event)\n  }\n  else if (event.key === 'Enter') {\n    event.preventDefault()\n    contentContext.onKeydownEnter(event)\n  }\n  // Prevent Escape from bubbling to avoid closing the menu when clearing the filter\n  else if (event.key === 'Escape' && modelValue.value) {\n    event.stopPropagation()\n    modelValue.value = ''\n    contentContext.searchRef.value = ''\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :value=\"modelValue\"\n    :disabled=\"disabled ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :aria-activedescendant=\"activedescendant\"\n    type=\"text\"\n    role=\"searchbox\"\n    @input=\"handleInput\"\n    @keydown=\"handleKeyDown\"\n    @compositionstart=\"handleCompositionStart\"\n    @compositionend=\"handleCompositionEnd\"\n  >\n    <slot :model-value=\"modelValue\" />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useVModel } from '@vueuse/core'\nimport { computed, onMounted, onUnmounted, ref, watch, watchSyncEffect } from 'vue'\nimport { injectMenuContentContext } from '@/Menu/MenuContentImpl.vue'\nimport { injectMenuRootContext } from '@/Menu/MenuRoot.vue'\nimport { injectMenuSubContext } from '@/Menu/MenuSub.vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { useComposing } from '@/shared'\n\nexport interface DropdownMenuFilterProps extends PrimitiveProps {\n  /** The controlled value of the filter. Can be binded with v-model. */\n  modelValue?: string\n  /** Focus on element when mounted. */\n  autoFocus?: boolean\n  /** When `true`, prevents the user from interacting with item */\n  disabled?: boolean\n}\n\nexport type DropdownMenuFilterEmits = {\n  'update:modelValue': [string]\n}\n</script>\n\n<script setup lang=\"ts\">\nconst props = withDefaults(defineProps<DropdownMenuFilterProps>(), {\n  as: 'input',\n})\nconst emits = defineEmits<DropdownMenuFilterEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: '',\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst rootContext = injectMenuRootContext()\nconst contentContext = injectMenuContentContext()\nconst subContext = injectMenuSubContext(null)\n\n// Keep searchRef in sync with modelValue changes\nwatch(modelValue, (v) => { contentContext.searchRef.value = v ?? '' }, { immediate: true })\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\nconst disabled = computed(() => props.disabled || false)\n\nconst activedescendant = ref<string | undefined>()\nwatchSyncEffect(() => activedescendant.value = contentContext.highlightedElement.value?.id)\n\nonMounted(() => {\n  contentContext.onFilterElementChange(currentElement.value)\n  setTimeout(() => {\n    // make sure all DOM was flush then only capture the focus\n    if (props.autoFocus) {\n      const isSubmenu = !!subContext\n      if (!isSubmenu || rootContext.isUsingKeyboardRef.value)\n        currentElement.value?.focus()\n    }\n  }, 1)\n})\n\nonUnmounted(() => {\n  contentContext.onFilterElementChange(undefined)\n  // Clean up search when unmounting\n  contentContext.searchRef.value = ''\n})\n\nconst { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing((event) => {\n  const el = event.target as HTMLInputElement\n  if (el) {\n    modelValue.value = el.value\n    contentContext.searchRef.value = el.value\n  }\n})\n\nfunction handleInput(event: InputEvent) {\n  if (disabled.value)\n    return\n  if (isComposing.value)\n    return\n  const target = event.target as HTMLInputElement\n  modelValue.value = target.value\n  contentContext.searchRef.value = target.value\n}\n\nfunction handleKeyDown(event: KeyboardEvent) {\n  if (disabled.value)\n    return\n  // During composition the keys belong to the IME (candidate navigation/commit).\n  // Stop them from bubbling to the menu content's keydown handler (which would\n  // navigate/typeahead) without calling preventDefault, so the IME still works.\n  if (isComposing.value) {\n    event.stopPropagation()\n    return\n  }\n  if (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) {\n    event.preventDefault()\n    contentContext.onKeydownNavigation(event)\n  }\n  else if (event.key === 'Enter') {\n    event.preventDefault()\n    contentContext.onKeydownEnter(event)\n  }\n  // Prevent Escape from bubbling to avoid closing the menu when clearing the filter\n  else if (event.key === 'Escape' && modelValue.value) {\n    event.stopPropagation()\n    modelValue.value = ''\n    contentContext.searchRef.value = ''\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :value=\"modelValue\"\n    :disabled=\"disabled ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :aria-activedescendant=\"activedescendant\"\n    type=\"text\"\n    role=\"searchbox\"\n    @input=\"handleInput\"\n    @keydown=\"handleKeyDown\"\n    @compositionstart=\"handleCompositionStart\"\n    @compositionend=\"handleCompositionEnd\"\n  >\n    <slot :model-value=\"modelValue\" />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { MenuGroupProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DropdownMenuGroupProps extends MenuGroupProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuGroup } from '@/Menu'\n\nconst props = defineProps<DropdownMenuGroupProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuGroup v-bind=\"props\">\n    <slot />\n  </MenuGroup>\n</template>\n","<script lang=\"ts\">\nimport type { MenuGroupProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DropdownMenuGroupProps extends MenuGroupProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuGroup } from '@/Menu'\n\nconst props = defineProps<DropdownMenuGroupProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuGroup v-bind=\"props\">\n    <slot />\n  </MenuGroup>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemEmits, MenuItemProps } from '@/Menu'\n\nexport type DropdownMenuItemEmits = MenuItemEmits\n\nexport interface DropdownMenuItemProps extends MenuItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuItem } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<DropdownMenuItemProps>()\nconst emits = defineEmits<DropdownMenuItemEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuItem v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuItem>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemEmits, MenuItemProps } from '@/Menu'\n\nexport type DropdownMenuItemEmits = MenuItemEmits\n\nexport interface DropdownMenuItemProps extends MenuItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuItem } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<DropdownMenuItemProps>()\nconst emits = defineEmits<DropdownMenuItemEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuItem v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuItem>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemIndicatorProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DropdownMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuItemIndicator } from '@/Menu'\n\nconst props = defineProps<DropdownMenuItemIndicatorProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuItemIndicator v-bind=\"props\">\n    <slot />\n  </MenuItemIndicator>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemIndicatorProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DropdownMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuItemIndicator } from '@/Menu'\n\nconst props = defineProps<DropdownMenuItemIndicatorProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuItemIndicator v-bind=\"props\">\n    <slot />\n  </MenuItemIndicator>\n</template>\n","<script lang=\"ts\">\nimport type { MenuLabelProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DropdownMenuLabelProps extends MenuLabelProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuLabel } from '@/Menu'\n\nconst props = defineProps<DropdownMenuLabelProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuLabel v-bind=\"props\">\n    <slot />\n  </MenuLabel>\n</template>\n","<script lang=\"ts\">\nimport type { MenuLabelProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DropdownMenuLabelProps extends MenuLabelProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuLabel } from '@/Menu'\n\nconst props = defineProps<DropdownMenuLabelProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuLabel v-bind=\"props\">\n    <slot />\n  </MenuLabel>\n</template>\n","<script lang=\"ts\">\nimport type { MenuPortalProps } from '@/Menu'\n\nexport interface DropdownMenuPortalProps extends MenuPortalProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuPortal } from '@/Menu'\n\nconst props = defineProps<DropdownMenuPortalProps>()\n</script>\n\n<template>\n  <MenuPortal v-bind=\"props\">\n    <slot />\n  </MenuPortal>\n</template>\n","<script lang=\"ts\">\nimport type { MenuPortalProps } from '@/Menu'\n\nexport interface DropdownMenuPortalProps extends MenuPortalProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuPortal } from '@/Menu'\n\nconst props = defineProps<DropdownMenuPortalProps>()\n</script>\n\n<template>\n  <MenuPortal v-bind=\"props\">\n    <slot />\n  </MenuPortal>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuRadioGroupEmits,\n  MenuRadioGroupProps,\n} from '@/Menu'\n\nexport type DropdownMenuRadioGroupEmits = MenuRadioGroupEmits\n\nexport interface DropdownMenuRadioGroupProps extends MenuRadioGroupProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuRadioGroup } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<MenuRadioGroupProps>()\nconst emits = defineEmits<MenuRadioGroupEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuRadioGroup v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuRadioGroup>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuRadioGroupEmits,\n  MenuRadioGroupProps,\n} from '@/Menu'\n\nexport type DropdownMenuRadioGroupEmits = MenuRadioGroupEmits\n\nexport interface DropdownMenuRadioGroupProps extends MenuRadioGroupProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuRadioGroup } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<MenuRadioGroupProps>()\nconst emits = defineEmits<MenuRadioGroupEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuRadioGroup v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuRadioGroup>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuRadioItemEmits,\n  MenuRadioItemProps,\n} from '@/Menu'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\n\nexport type DropdownMenuRadioItemEmits = MenuRadioItemEmits\n\nexport interface DropdownMenuRadioItemProps extends MenuRadioItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuRadioItem } from '@/Menu'\n\nconst props = defineProps<DropdownMenuRadioItemProps>()\nconst emits = defineEmits<DropdownMenuRadioItemEmits>()\n\nconst forwarded = useForwardPropsEmits(props, emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuRadioItem v-bind=\"forwarded\">\n    <slot />\n  </MenuRadioItem>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuRadioItemEmits,\n  MenuRadioItemProps,\n} from '@/Menu'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\n\nexport type DropdownMenuRadioItemEmits = MenuRadioItemEmits\n\nexport interface DropdownMenuRadioItemProps extends MenuRadioItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuRadioItem } from '@/Menu'\n\nconst props = defineProps<DropdownMenuRadioItemProps>()\nconst emits = defineEmits<DropdownMenuRadioItemEmits>()\n\nconst forwarded = useForwardPropsEmits(props, emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuRadioItem v-bind=\"forwarded\">\n    <slot />\n  </MenuRadioItem>\n</template>\n","<script lang=\"ts\">\nimport type { MenuSeparatorProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DropdownMenuSeparatorProps extends MenuSeparatorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSeparator } from '@/Menu'\n\nconst props = defineProps<DropdownMenuSeparatorProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSeparator v-bind=\"props\">\n    <slot />\n  </MenuSeparator>\n</template>\n","<script lang=\"ts\">\nimport type { MenuSeparatorProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DropdownMenuSeparatorProps extends MenuSeparatorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSeparator } from '@/Menu'\n\nconst props = defineProps<DropdownMenuSeparatorProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSeparator v-bind=\"props\">\n    <slot />\n  </MenuSeparator>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { MenuSubEmits, MenuSubProps } from '@/Menu'\n\nexport type DropdownMenuSubEmits = MenuSubEmits\nexport interface DropdownMenuSubProps extends MenuSubProps {\n  /** The open state of the dropdown menu when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { MenuSub } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nconst props = withDefaults(defineProps<DropdownMenuSubProps>(), {\n  open: undefined,\n})\nconst emit = defineEmits<DropdownMenuSubEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nconst open = useVModel(props, 'open', emit, {\n  passive: (props.open === undefined) as false,\n  defaultValue: props.defaultOpen ?? false,\n}) as Ref<boolean>\n\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSub v-model:open=\"open\">\n    <slot :open=\"open\" />\n  </MenuSub>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { MenuSubEmits, MenuSubProps } from '@/Menu'\n\nexport type DropdownMenuSubEmits = MenuSubEmits\nexport interface DropdownMenuSubProps extends MenuSubProps {\n  /** The open state of the dropdown menu when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { MenuSub } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nconst props = withDefaults(defineProps<DropdownMenuSubProps>(), {\n  open: undefined,\n})\nconst emit = defineEmits<DropdownMenuSubEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nconst open = useVModel(props, 'open', emit, {\n  passive: (props.open === undefined) as false,\n  defaultValue: props.defaultOpen ?? false,\n}) as Ref<boolean>\n\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSub v-model:open=\"open\">\n    <slot :open=\"open\" />\n  </MenuSub>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuSubContentEmits,\n  MenuSubContentProps,\n} from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport type DropdownMenuSubContentEmits = MenuSubContentEmits\n\nexport interface DropdownMenuSubContentProps extends MenuSubContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSubContent } from '@/Menu'\nimport { useForwardPropsEmits } from '..'\n\nconst props = defineProps<DropdownMenuSubContentProps>()\nconst emits = defineEmits<DropdownMenuSubContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSubContent\n    v-bind=\"forwarded\"\n    :style=\"{\n      '--reka-dropdown-menu-content-transform-origin':\n        'var(--reka-popper-transform-origin)',\n      '--reka-dropdown-menu-content-available-width':\n        'var(--reka-popper-available-width)',\n      '--reka-dropdown-menu-content-available-height':\n        'var(--reka-popper-available-height)',\n      '--reka-dropdown-menu-trigger-width': 'var(--reka-popper-anchor-width)',\n      '--reka-dropdown-menu-trigger-height':\n        'var(--reka-popper-anchor-height)',\n    }\"\n  >\n    <slot />\n  </MenuSubContent>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuSubContentEmits,\n  MenuSubContentProps,\n} from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport type DropdownMenuSubContentEmits = MenuSubContentEmits\n\nexport interface DropdownMenuSubContentProps extends MenuSubContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSubContent } from '@/Menu'\nimport { useForwardPropsEmits } from '..'\n\nconst props = defineProps<DropdownMenuSubContentProps>()\nconst emits = defineEmits<DropdownMenuSubContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSubContent\n    v-bind=\"forwarded\"\n    :style=\"{\n      '--reka-dropdown-menu-content-transform-origin':\n        'var(--reka-popper-transform-origin)',\n      '--reka-dropdown-menu-content-available-width':\n        'var(--reka-popper-available-width)',\n      '--reka-dropdown-menu-content-available-height':\n        'var(--reka-popper-available-height)',\n      '--reka-dropdown-menu-trigger-width': 'var(--reka-popper-anchor-width)',\n      '--reka-dropdown-menu-trigger-height':\n        'var(--reka-popper-anchor-height)',\n    }\"\n  >\n    <slot />\n  </MenuSubContent>\n</template>\n","<script lang=\"ts\">\nimport type { MenuSubTriggerProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DropdownMenuSubTriggerProps extends MenuSubTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSubTrigger } from '@/Menu'\n\nconst props = defineProps<DropdownMenuSubTriggerProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSubTrigger v-bind=\"props\">\n    <slot />\n  </MenuSubTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { MenuSubTriggerProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface DropdownMenuSubTriggerProps extends MenuSubTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSubTrigger } from '@/Menu'\n\nconst props = defineProps<DropdownMenuSubTriggerProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSubTrigger v-bind=\"props\">\n    <slot />\n  </MenuSubTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose, useId } from '@/shared'\n\nexport interface DropdownMenuTriggerProps extends PrimitiveProps {\n  /** When `true`, prevents the user from interacting with item */\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { nextTick, onMounted } from 'vue'\nimport { MenuAnchor } from '@/Menu'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { injectDropdownMenuRootContext } from './DropdownMenuRoot.vue'\n\nconst props = withDefaults(defineProps<DropdownMenuTriggerProps>(), {\n  as: 'button',\n})\n\nconst rootContext = injectDropdownMenuRootContext()\n\nconst { forwardRef, currentElement: triggerElement } = useForwardExpose()\n\nonMounted(() => {\n  rootContext.triggerElement = triggerElement\n})\n\nrootContext.triggerId ||= useId(undefined, 'reka-dropdown-menu-trigger')\n</script>\n\n<template>\n  <MenuAnchor as-child>\n    <Primitive\n      :id=\"rootContext.triggerId\"\n      :ref=\"forwardRef\"\n      :type=\"as === 'button' ? 'button' : undefined\"\n      :as-child=\"props.asChild\"\n      :as=\"as\"\n      aria-haspopup=\"menu\"\n      :aria-expanded=\"rootContext.open.value\"\n      :aria-controls=\"rootContext.open.value ? rootContext.contentId : undefined\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :disabled=\"disabled\"\n      :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n      @click=\"\n        async (event: MouseEvent) => {\n          // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n          // but not when the control key is pressed (avoiding MacOS right click)\n          if (!disabled && event.button === 0 && event.ctrlKey === false) {\n            rootContext?.onOpenToggle();\n            await nextTick()\n            // prevent trigger focusing when opening\n            // this allows the content to be given focus without competition\n            if (rootContext.open.value) event.preventDefault();\n          }\n        }\n      \"\n      @keydown.enter.space.arrow-down=\"\n        (event: KeyboardEvent) => {\n          if (disabled) return;\n          if (['Enter', ' '].includes(event.key)) rootContext.onOpenToggle();\n          if (event.key === 'ArrowDown') rootContext.onOpenChange(true);\n          // prevent keydown from scrolling window / first focused item to execute\n          // that keydown (inadvertently closing the menu)\n          if (['Enter', ' ', 'ArrowDown'].includes(event.key))\n            event.preventDefault();\n        }\n      \"\n    >\n      <slot />\n    </Primitive>\n  </MenuAnchor>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose, useId } from '@/shared'\n\nexport interface DropdownMenuTriggerProps extends PrimitiveProps {\n  /** When `true`, prevents the user from interacting with item */\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { nextTick, onMounted } from 'vue'\nimport { MenuAnchor } from '@/Menu'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { injectDropdownMenuRootContext } from './DropdownMenuRoot.vue'\n\nconst props = withDefaults(defineProps<DropdownMenuTriggerProps>(), {\n  as: 'button',\n})\n\nconst rootContext = injectDropdownMenuRootContext()\n\nconst { forwardRef, currentElement: triggerElement } = useForwardExpose()\n\nonMounted(() => {\n  rootContext.triggerElement = triggerElement\n})\n\nrootContext.triggerId ||= useId(undefined, 'reka-dropdown-menu-trigger')\n</script>\n\n<template>\n  <MenuAnchor as-child>\n    <Primitive\n      :id=\"rootContext.triggerId\"\n      :ref=\"forwardRef\"\n      :type=\"as === 'button' ? 'button' : undefined\"\n      :as-child=\"props.asChild\"\n      :as=\"as\"\n      aria-haspopup=\"menu\"\n      :aria-expanded=\"rootContext.open.value\"\n      :aria-controls=\"rootContext.open.value ? rootContext.contentId : undefined\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :disabled=\"disabled\"\n      :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n      @click=\"\n        async (event: MouseEvent) => {\n          // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n          // but not when the control key is pressed (avoiding MacOS right click)\n          if (!disabled && event.button === 0 && event.ctrlKey === false) {\n            rootContext?.onOpenToggle();\n            await nextTick()\n            // prevent trigger focusing when opening\n            // this allows the content to be given focus without competition\n            if (rootContext.open.value) event.preventDefault();\n          }\n        }\n      \"\n      @keydown.enter.space.arrow-down=\"\n        (event: KeyboardEvent) => {\n          if (disabled) return;\n          if (['Enter', ' '].includes(event.key)) rootContext.onOpenToggle();\n          if (event.key === 'ArrowDown') rootContext.onOpenChange(true);\n          // prevent keydown from scrolling window / first focused item to execute\n          // that keydown (inadvertently closing the menu)\n          if (['Enter', ' ', 'ArrowDown'].includes(event.key))\n            event.preventDefault();\n        }\n      \"\n    >\n      <slot />\n    </Primitive>\n  </MenuAnchor>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Direction, FormFieldProps } from '@/shared/types'\nimport { useFocusOutside, usePointerDownOutside } from '@/DismissableLayer'\nimport { createContext, useDirection, useFormControl } from '@/shared'\n\ntype ActivationMode = 'focus' | 'dblclick' | 'none'\ntype SubmitMode = 'blur' | 'enter' | 'none' | 'both'\n\ntype EditableRootContext = {\n  id: Ref<string | undefined>\n  name: Ref<string | undefined>\n  maxLength: Ref<number | undefined>\n  disabled: Ref<boolean>\n  modelValue: Ref<string | null | undefined>\n  inputValue: Ref<string | null | undefined>\n  placeholder: Ref<{ edit: string, preview: string }>\n  isEditing: Ref<boolean>\n  submitMode: Ref<SubmitMode>\n  activationMode: Ref<ActivationMode>\n  selectOnFocus: Ref<boolean>\n  edit: () => void\n  cancel: () => void\n  submit: () => void\n  inputRef: Ref<HTMLInputElement | undefined>\n  startWithEditMode: Ref<boolean>\n  isEmpty: Ref<boolean>\n  readonly: Ref<boolean>\n  autoResize: Ref<boolean>\n}\n\nexport interface EditableRootProps extends PrimitiveProps, FormFieldProps {\n  /** The default value of the editable field */\n  defaultValue?: string\n  /** The value of the editable field */\n  modelValue?: string | null\n  /** The placeholder for the editable field */\n  placeholder?: string | { edit: string, preview: string }\n  /** The reading direction of the calendar when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** Whether the editable field is disabled */\n  disabled?: boolean\n  /** Whether the editable field is read-only */\n  readonly?: boolean\n  /** The activation event of the editable field */\n  activationMode?: ActivationMode\n  /** Whether to select the text in the input when it is focused. */\n  selectOnFocus?: boolean\n  /** The submit event of the editable field */\n  submitMode?: SubmitMode\n  /** Whether to start with the edit mode active */\n  startWithEditMode?: boolean\n  /** The maximum number of characters allowed */\n  maxLength?: number\n  /** Whether the editable field should auto resize */\n  autoResize?: boolean\n  /** The id of the field */\n  id?: string\n}\n\nexport type EditableRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [value: string]\n  /** Event handler called when a value is submitted */\n  'submit': [value: string | null | undefined]\n  /** Event handler called when the editable field changes state */\n  'update:state': [state: 'edit' | 'submit' | 'cancel']\n}\n\nexport const [injectEditableRootContext, provideEditableRootContext]\n  = createContext<EditableRootContext>('EditableRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport type { Ref } from 'vue'\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<EditableRootProps>(), {\n  as: 'div',\n  disabled: false,\n  submitMode: 'blur',\n  activationMode: 'focus',\n  selectOnFocus: false,\n  placeholder: 'Enter text...',\n  autoResize: false,\n  required: false,\n})\n\nconst emits = defineEmits<EditableRootEmits>()\ndefineSlots<{\n  default?: (props: {\n    /** Whether the editable field is in edit mode */\n    isEditing: boolean\n    /** The value of the editable field */\n    modelValue: typeof modelValue.value\n    /** Whether the editable field is empty */\n    isEmpty: boolean\n    /** Function to submit the value of the editable */\n    submit: () => void\n    /** Function to cancel the value of the editable */\n    cancel: () => void\n    /** Function to set the editable in edit mode */\n    edit: () => void\n  }) => any\n}>()\n\nconst {\n  id,\n  name,\n  defaultValue,\n  startWithEditMode,\n  placeholder: propPlaceholder,\n  maxLength,\n  disabled,\n  dir: propDir,\n  submitMode,\n  activationMode,\n  selectOnFocus,\n  readonly,\n  autoResize,\n  required,\n} = toRefs(props)\n\nconst inputRef = ref<HTMLInputElement | undefined>()\nconst dir = useDirection(propDir)\nconst isEditing = ref(startWithEditMode.value ?? false)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: defaultValue.value ?? '',\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nconst isFormControl = useFormControl(currentElement)\n\nconst placeholder = computed(() => {\n  return typeof propPlaceholder.value === 'string' ? { edit: propPlaceholder.value, preview: propPlaceholder.value } : propPlaceholder.value\n})\n\nconst inputValue = ref(modelValue.value)\n\nwatch(() => modelValue.value, () => {\n  inputValue.value = modelValue.value\n}, { immediate: true, deep: true })\n\nfunction cancel() {\n  isEditing.value = false\n  emits('update:state', 'cancel')\n}\n\nfunction edit() {\n  isEditing.value = true\n  inputValue.value = modelValue.value\n\n  emits('update:state', 'edit')\n}\n\nfunction submit() {\n  modelValue.value = inputValue.value\n  isEditing.value = false\n\n  emits('update:state', 'submit')\n  emits('submit', inputValue.value)\n}\n\nfunction handleDismiss() {\n  if (isEditing.value) {\n    if (submitMode.value === 'blur' || submitMode.value === 'both')\n      submit()\n    else\n      cancel()\n  }\n}\n\nconst pointerDownOutside = usePointerDownOutside(() => handleDismiss(), currentElement, isEditing)\nconst focusOutside = useFocusOutside(() => handleDismiss(), currentElement, isEditing)\n\nconst isEmpty = computed(() => modelValue.value === '')\n\ndefineExpose({\n  /** Function to submit the value of the editable */\n  submit,\n  /** Function to cancel the value of the editable */\n  cancel,\n  /** Function to set the editable in edit mode */\n  edit,\n})\n\nprovideEditableRootContext({\n  id,\n  name,\n  disabled,\n  isEditing,\n  maxLength,\n  modelValue,\n  inputValue,\n  placeholder,\n  edit,\n  cancel,\n  submit,\n  activationMode,\n  submitMode,\n  selectOnFocus,\n  inputRef,\n  startWithEditMode,\n  isEmpty,\n  readonly,\n  autoResize,\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :dir=\"dir\"\n    data-dismissable-layer\n    @focus.capture=\"focusOutside.onFocusCapture\"\n    @blur.capture=\"focusOutside.onBlurCapture\"\n    @pointerdown.capture=\"pointerDownOutside.onPointerDownCapture\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :is-editing=\"isEditing\"\n      :is-empty=\"isEmpty\"\n      :submit=\"submit\"\n      :cancel=\"cancel\"\n      :edit=\"edit\"\n    />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name\"\n      type=\"text\"\n      :value=\"modelValue\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Direction, FormFieldProps } from '@/shared/types'\nimport { useFocusOutside, usePointerDownOutside } from '@/DismissableLayer'\nimport { createContext, useDirection, useFormControl } from '@/shared'\n\ntype ActivationMode = 'focus' | 'dblclick' | 'none'\ntype SubmitMode = 'blur' | 'enter' | 'none' | 'both'\n\ntype EditableRootContext = {\n  id: Ref<string | undefined>\n  name: Ref<string | undefined>\n  maxLength: Ref<number | undefined>\n  disabled: Ref<boolean>\n  modelValue: Ref<string | null | undefined>\n  inputValue: Ref<string | null | undefined>\n  placeholder: Ref<{ edit: string, preview: string }>\n  isEditing: Ref<boolean>\n  submitMode: Ref<SubmitMode>\n  activationMode: Ref<ActivationMode>\n  selectOnFocus: Ref<boolean>\n  edit: () => void\n  cancel: () => void\n  submit: () => void\n  inputRef: Ref<HTMLInputElement | undefined>\n  startWithEditMode: Ref<boolean>\n  isEmpty: Ref<boolean>\n  readonly: Ref<boolean>\n  autoResize: Ref<boolean>\n}\n\nexport interface EditableRootProps extends PrimitiveProps, FormFieldProps {\n  /** The default value of the editable field */\n  defaultValue?: string\n  /** The value of the editable field */\n  modelValue?: string | null\n  /** The placeholder for the editable field */\n  placeholder?: string | { edit: string, preview: string }\n  /** The reading direction of the calendar when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** Whether the editable field is disabled */\n  disabled?: boolean\n  /** Whether the editable field is read-only */\n  readonly?: boolean\n  /** The activation event of the editable field */\n  activationMode?: ActivationMode\n  /** Whether to select the text in the input when it is focused. */\n  selectOnFocus?: boolean\n  /** The submit event of the editable field */\n  submitMode?: SubmitMode\n  /** Whether to start with the edit mode active */\n  startWithEditMode?: boolean\n  /** The maximum number of characters allowed */\n  maxLength?: number\n  /** Whether the editable field should auto resize */\n  autoResize?: boolean\n  /** The id of the field */\n  id?: string\n}\n\nexport type EditableRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [value: string]\n  /** Event handler called when a value is submitted */\n  'submit': [value: string | null | undefined]\n  /** Event handler called when the editable field changes state */\n  'update:state': [state: 'edit' | 'submit' | 'cancel']\n}\n\nexport const [injectEditableRootContext, provideEditableRootContext]\n  = createContext<EditableRootContext>('EditableRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport type { Ref } from 'vue'\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<EditableRootProps>(), {\n  as: 'div',\n  disabled: false,\n  submitMode: 'blur',\n  activationMode: 'focus',\n  selectOnFocus: false,\n  placeholder: 'Enter text...',\n  autoResize: false,\n  required: false,\n})\n\nconst emits = defineEmits<EditableRootEmits>()\ndefineSlots<{\n  default?: (props: {\n    /** Whether the editable field is in edit mode */\n    isEditing: boolean\n    /** The value of the editable field */\n    modelValue: typeof modelValue.value\n    /** Whether the editable field is empty */\n    isEmpty: boolean\n    /** Function to submit the value of the editable */\n    submit: () => void\n    /** Function to cancel the value of the editable */\n    cancel: () => void\n    /** Function to set the editable in edit mode */\n    edit: () => void\n  }) => any\n}>()\n\nconst {\n  id,\n  name,\n  defaultValue,\n  startWithEditMode,\n  placeholder: propPlaceholder,\n  maxLength,\n  disabled,\n  dir: propDir,\n  submitMode,\n  activationMode,\n  selectOnFocus,\n  readonly,\n  autoResize,\n  required,\n} = toRefs(props)\n\nconst inputRef = ref<HTMLInputElement | undefined>()\nconst dir = useDirection(propDir)\nconst isEditing = ref(startWithEditMode.value ?? false)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: defaultValue.value ?? '',\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nconst isFormControl = useFormControl(currentElement)\n\nconst placeholder = computed(() => {\n  return typeof propPlaceholder.value === 'string' ? { edit: propPlaceholder.value, preview: propPlaceholder.value } : propPlaceholder.value\n})\n\nconst inputValue = ref(modelValue.value)\n\nwatch(() => modelValue.value, () => {\n  inputValue.value = modelValue.value\n}, { immediate: true, deep: true })\n\nfunction cancel() {\n  isEditing.value = false\n  emits('update:state', 'cancel')\n}\n\nfunction edit() {\n  isEditing.value = true\n  inputValue.value = modelValue.value\n\n  emits('update:state', 'edit')\n}\n\nfunction submit() {\n  modelValue.value = inputValue.value\n  isEditing.value = false\n\n  emits('update:state', 'submit')\n  emits('submit', inputValue.value)\n}\n\nfunction handleDismiss() {\n  if (isEditing.value) {\n    if (submitMode.value === 'blur' || submitMode.value === 'both')\n      submit()\n    else\n      cancel()\n  }\n}\n\nconst pointerDownOutside = usePointerDownOutside(() => handleDismiss(), currentElement, isEditing)\nconst focusOutside = useFocusOutside(() => handleDismiss(), currentElement, isEditing)\n\nconst isEmpty = computed(() => modelValue.value === '')\n\ndefineExpose({\n  /** Function to submit the value of the editable */\n  submit,\n  /** Function to cancel the value of the editable */\n  cancel,\n  /** Function to set the editable in edit mode */\n  edit,\n})\n\nprovideEditableRootContext({\n  id,\n  name,\n  disabled,\n  isEditing,\n  maxLength,\n  modelValue,\n  inputValue,\n  placeholder,\n  edit,\n  cancel,\n  submit,\n  activationMode,\n  submitMode,\n  selectOnFocus,\n  inputRef,\n  startWithEditMode,\n  isEmpty,\n  readonly,\n  autoResize,\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :dir=\"dir\"\n    data-dismissable-layer\n    @focus.capture=\"focusOutside.onFocusCapture\"\n    @blur.capture=\"focusOutside.onBlurCapture\"\n    @pointerdown.capture=\"pointerDownOutside.onPointerDownCapture\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :is-editing=\"isEditing\"\n      :is-empty=\"isEmpty\"\n      :submit=\"submit\"\n      :cancel=\"cancel\"\n      :edit=\"edit\"\n    />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name\"\n      type=\"text\"\n      :value=\"modelValue\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { injectEditableRootContext } from './EditableRoot.vue'\n\nexport interface EditableAreaProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<EditableAreaProps>(), { as: 'div' })\n\nconst context = injectEditableRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :data-placeholder-shown=\"context.isEditing.value ? undefined : ''\"\n    :data-focus=\"context.isEditing.value ? '' : undefined\"\n    :data-focused=\"context.isEditing.value ? '' : undefined\"\n    :data-empty=\"context.isEmpty.value ? '' : undefined\"\n    :data-readonly=\"context.readonly.value ? '' : undefined\"\n    :data-disabled=\"context.disabled.value ? '' : undefined\"\n    :style=\"context.autoResize.value ? { display: 'inline-grid' } : undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { injectEditableRootContext } from './EditableRoot.vue'\n\nexport interface EditableAreaProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<EditableAreaProps>(), { as: 'div' })\n\nconst context = injectEditableRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :data-placeholder-shown=\"context.isEditing.value ? undefined : ''\"\n    :data-focus=\"context.isEditing.value ? '' : undefined\"\n    :data-focused=\"context.isEditing.value ? '' : undefined\"\n    :data-empty=\"context.isEmpty.value ? '' : undefined\"\n    :data-readonly=\"context.readonly.value ? '' : undefined\"\n    :data-disabled=\"context.disabled.value ? '' : undefined\"\n    :style=\"context.autoResize.value ? { display: 'inline-grid' } : undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface EditableCancelTriggerProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectEditableRootContext } from './EditableRoot.vue'\n\nconst props = withDefaults(defineProps<EditableCancelTriggerProps>(), { as: 'button' })\n\nconst context = injectEditableRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-label=\"cancel\"\n    :aria-disabled=\"context.disabled.value ? '' : undefined\"\n    :data-disabled=\"context.disabled.value ? '' : undefined\"\n    :disabled=\"context.disabled.value\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :hidden=\"context.isEditing.value ? undefined : ''\"\n    @click=\"context.cancel\"\n  >\n    <slot>Cancel</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface EditableCancelTriggerProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectEditableRootContext } from './EditableRoot.vue'\n\nconst props = withDefaults(defineProps<EditableCancelTriggerProps>(), { as: 'button' })\n\nconst context = injectEditableRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-label=\"cancel\"\n    :aria-disabled=\"context.disabled.value ? '' : undefined\"\n    :data-disabled=\"context.disabled.value ? '' : undefined\"\n    :disabled=\"context.disabled.value\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :hidden=\"context.isEditing.value ? undefined : ''\"\n    @click=\"context.cancel\"\n  >\n    <slot>Cancel</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface EditableEditTriggerProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectEditableRootContext } from './EditableRoot.vue'\n\nconst props = withDefaults(defineProps<EditableEditTriggerProps>(), { as: 'button' })\n\nconst context = injectEditableRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-label=\"edit\"\n    :aria-disabled=\"context.disabled.value ? '' : undefined\"\n    :data-disabled=\"context.disabled.value ? '' : undefined\"\n    :disabled=\"context.disabled.value\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :hidden=\"context.isEditing.value ? '' : undefined\"\n    @click=\"context.edit\"\n  >\n    <slot>Edit</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface EditableEditTriggerProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectEditableRootContext } from './EditableRoot.vue'\n\nconst props = withDefaults(defineProps<EditableEditTriggerProps>(), { as: 'button' })\n\nconst context = injectEditableRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-label=\"edit\"\n    :aria-disabled=\"context.disabled.value ? '' : undefined\"\n    :data-disabled=\"context.disabled.value ? '' : undefined\"\n    :disabled=\"context.disabled.value\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :hidden=\"context.isEditing.value ? '' : undefined\"\n    @click=\"context.edit\"\n  >\n    <slot>Edit</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nexport interface EditableInputProps extends PrimitiveProps {\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, watch } from 'vue'\nimport { useKbd } from '@/shared'\nimport { injectEditableRootContext } from './EditableRoot.vue'\n\nconst props = withDefaults(defineProps<EditableInputProps>(), {\n  as: 'input',\n})\n\nconst kbd = useKbd()\n\nconst context = injectEditableRootContext()\n\nconst disabled = computed(() => context.disabled.value)\n\nconst placeholder = computed(() => context.placeholder.value?.edit)\n\nconst { primitiveElement, currentElement: inputRef } = usePrimitiveElement()\n\nonMounted(() => {\n  context.inputRef.value = inputRef.value as HTMLInputElement\n  if (context.startWithEditMode.value) {\n    context.inputRef.value?.focus({ preventScroll: true })\n    if (context.selectOnFocus.value)\n      context.inputRef.value?.select()\n  }\n})\n\nwatch(context.isEditing, (value) => {\n  if (value) {\n    nextTick(() => {\n      context.inputRef.value?.focus({ preventScroll: true })\n      if (context.selectOnFocus.value)\n        context.inputRef.value?.select()\n    })\n  }\n})\n\nfunction handleSubmitKeyDown(event: KeyboardEvent) {\n  if ((context.submitMode.value === 'enter' || context.submitMode.value === 'both') && event.key === kbd.ENTER && !event.shiftKey && !event.metaKey && !event.isComposing)\n    context.submit()\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    v-bind=\"props\"\n    :value=\"context.inputValue.value\"\n    :placeholder=\"placeholder\"\n    :disabled=\"disabled\"\n    :maxlength=\"context.maxLength.value\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-readonly=\"context.readonly.value ? '' : undefined\"\n    :readonly=\"context.readonly.value\"\n    aria-label=\"editable input\"\n    :hidden=\"context.autoResize.value ? undefined : !context.isEditing.value\"\n    :style=\"context.autoResize.value ? { all: 'unset', gridArea: '1 / 1 / auto / auto', visibility: !context.isEditing.value ? 'hidden' : undefined } : undefined\"\n    @input=\"context.inputValue.value = $event.target.value\"\n    @keydown.enter.space=\"handleSubmitKeyDown\"\n    @keydown.esc=\"context.cancel\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nexport interface EditableInputProps extends PrimitiveProps {\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, watch } from 'vue'\nimport { useKbd } from '@/shared'\nimport { injectEditableRootContext } from './EditableRoot.vue'\n\nconst props = withDefaults(defineProps<EditableInputProps>(), {\n  as: 'input',\n})\n\nconst kbd = useKbd()\n\nconst context = injectEditableRootContext()\n\nconst disabled = computed(() => context.disabled.value)\n\nconst placeholder = computed(() => context.placeholder.value?.edit)\n\nconst { primitiveElement, currentElement: inputRef } = usePrimitiveElement()\n\nonMounted(() => {\n  context.inputRef.value = inputRef.value as HTMLInputElement\n  if (context.startWithEditMode.value) {\n    context.inputRef.value?.focus({ preventScroll: true })\n    if (context.selectOnFocus.value)\n      context.inputRef.value?.select()\n  }\n})\n\nwatch(context.isEditing, (value) => {\n  if (value) {\n    nextTick(() => {\n      context.inputRef.value?.focus({ preventScroll: true })\n      if (context.selectOnFocus.value)\n        context.inputRef.value?.select()\n    })\n  }\n})\n\nfunction handleSubmitKeyDown(event: KeyboardEvent) {\n  if ((context.submitMode.value === 'enter' || context.submitMode.value === 'both') && event.key === kbd.ENTER && !event.shiftKey && !event.metaKey && !event.isComposing)\n    context.submit()\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    v-bind=\"props\"\n    :value=\"context.inputValue.value\"\n    :placeholder=\"placeholder\"\n    :disabled=\"disabled\"\n    :maxlength=\"context.maxLength.value\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-readonly=\"context.readonly.value ? '' : undefined\"\n    :readonly=\"context.readonly.value\"\n    aria-label=\"editable input\"\n    :hidden=\"context.autoResize.value ? undefined : !context.isEditing.value\"\n    :style=\"context.autoResize.value ? { all: 'unset', gridArea: '1 / 1 / auto / auto', visibility: !context.isEditing.value ? 'hidden' : undefined } : undefined\"\n    @input=\"context.inputValue.value = $event.target.value\"\n    @keydown.enter.space=\"handleSubmitKeyDown\"\n    @keydown.esc=\"context.cancel\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed } from 'vue'\nimport { injectEditableRootContext } from './EditableRoot.vue'\n\nexport interface EditablePreviewProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<EditablePreviewProps>(), { as: 'span' })\n\nconst context = injectEditableRootContext()\n\nconst placeholder = computed(() => context.placeholder.value?.preview)\n\nfunction handleFocus() {\n  if (context.activationMode.value === 'focus')\n    context.edit()\n}\nfunction handleDoubleClick() {\n  if (context.activationMode.value === 'dblclick')\n    context.edit()\n}\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    tabindex=\"0\"\n    :data-placeholder-shown=\"context.isEditing.value ? undefined : ''\"\n    :hidden=\"context.autoResize.value ? undefined : context.isEditing.value\"\n    :style=\"context.autoResize.value ? {\n      whiteSpace: 'pre',\n      userSelect: 'none',\n      gridArea: '1 / 1 / auto / auto',\n      visibility: context.isEditing.value ? 'hidden' : undefined,\n      overflow: 'hidden',\n      textOverflow: 'ellipsis',\n    } : undefined\"\n    @focusin=\"handleFocus\"\n    @dblclick=\"handleDoubleClick\"\n  >\n    <slot>\n      {{ context.modelValue.value || placeholder }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed } from 'vue'\nimport { injectEditableRootContext } from './EditableRoot.vue'\n\nexport interface EditablePreviewProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<EditablePreviewProps>(), { as: 'span' })\n\nconst context = injectEditableRootContext()\n\nconst placeholder = computed(() => context.placeholder.value?.preview)\n\nfunction handleFocus() {\n  if (context.activationMode.value === 'focus')\n    context.edit()\n}\nfunction handleDoubleClick() {\n  if (context.activationMode.value === 'dblclick')\n    context.edit()\n}\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    tabindex=\"0\"\n    :data-placeholder-shown=\"context.isEditing.value ? undefined : ''\"\n    :hidden=\"context.autoResize.value ? undefined : context.isEditing.value\"\n    :style=\"context.autoResize.value ? {\n      whiteSpace: 'pre',\n      userSelect: 'none',\n      gridArea: '1 / 1 / auto / auto',\n      visibility: context.isEditing.value ? 'hidden' : undefined,\n      overflow: 'hidden',\n      textOverflow: 'ellipsis',\n    } : undefined\"\n    @focusin=\"handleFocus\"\n    @dblclick=\"handleDoubleClick\"\n  >\n    <slot>\n      {{ context.modelValue.value || placeholder }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface EditableSubmitTriggerProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectEditableRootContext } from './EditableRoot.vue'\n\nconst props = withDefaults(defineProps<EditableSubmitTriggerProps>(), { as: 'button' })\n\nconst context = injectEditableRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-label=\"submit\"\n    :aria-disabled=\"context.disabled.value ? '' : undefined\"\n    :data-disabled=\"context.disabled.value ? '' : undefined\"\n    :disabled=\"context.disabled.value\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :hidden=\"context.isEditing.value ? undefined : ''\"\n    @click=\"context.submit\"\n  >\n    <slot>Submit</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface EditableSubmitTriggerProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectEditableRootContext } from './EditableRoot.vue'\n\nconst props = withDefaults(defineProps<EditableSubmitTriggerProps>(), { as: 'button' })\n\nconst context = injectEditableRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-label=\"submit\"\n    :aria-disabled=\"context.disabled.value ? '' : undefined\"\n    :data-disabled=\"context.disabled.value ? '' : undefined\"\n    :disabled=\"context.disabled.value\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :hidden=\"context.isEditing.value ? undefined : ''\"\n    @click=\"context.submit\"\n  >\n    <slot>Submit</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PopperArrowProps } from '@/Popper'\nimport { useForwardExpose } from '@/shared'\n\nexport interface HoverCardArrowProps extends PopperArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { PopperArrow } from '@/Popper'\n\nconst props = withDefaults(defineProps<HoverCardArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\nuseForwardExpose()\n</script>\n\n<template>\n  <PopperArrow v-bind=\"props\">\n    <slot />\n  </PopperArrow>\n</template>\n","<script lang=\"ts\">\nimport type { PopperArrowProps } from '@/Popper'\nimport { useForwardExpose } from '@/shared'\n\nexport interface HoverCardArrowProps extends PopperArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { PopperArrow } from '@/Popper'\n\nconst props = withDefaults(defineProps<HoverCardArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\nuseForwardExpose()\n</script>\n\n<template>\n  <PopperArrow v-bind=\"props\">\n    <slot />\n  </PopperArrow>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport { createContext, useForwardExpose } from '@/shared'\n\nexport interface HoverCardRootProps {\n  /** The open state of the hover card when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n  /** The controlled open state of the hover card. Can be binded as `v-model:open`. */\n  open?: boolean\n  /** The duration from when the mouse enters the trigger until the hover card opens. */\n  openDelay?: number\n  /** The duration from when the mouse leaves the trigger or content until the hover card closes. */\n  closeDelay?: number\n}\nexport type HoverCardRootEmits = {\n  /** Event handler called when the open state of the hover card changes. */\n  'update:open': [value: boolean]\n}\n\nexport interface HoverCardRootContext {\n  open: Ref<boolean>\n  onOpenChange: (open: boolean) => void\n  onOpen: () => void\n  onClose: () => void\n  onDismiss: () => void\n  hasSelectionRef: Ref<boolean>\n  isPointerDownOnContentRef: Ref<boolean>\n  isPointerInTransitRef: Ref<boolean>\n  triggerElement: Ref<HTMLElement | undefined>\n}\n\nexport const [injectHoverCardRootContext, provideHoverCardRootContext]\n  = createContext<HoverCardRootContext>('HoverCardRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { ref, toRefs } from 'vue'\nimport { PopperRoot } from '@/Popper'\n\nconst props = withDefaults(defineProps<HoverCardRootProps>(), {\n  defaultOpen: false,\n  open: undefined,\n  openDelay: 700,\n  closeDelay: 300,\n})\nconst emit = defineEmits<HoverCardRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nconst { openDelay, closeDelay } = toRefs(props)\n\nuseForwardExpose()\nconst open = useVModel(props, 'open', emit, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst openTimerRef = ref(0)\nconst closeTimerRef = ref(0)\nconst hasSelectionRef = ref(false)\nconst isPointerDownOnContentRef = ref(false)\nconst isPointerInTransitRef = ref(false)\nconst triggerElement = ref<HTMLElement>()\n\nfunction handleOpen() {\n  clearTimeout(closeTimerRef.value)\n  openTimerRef.value = window.setTimeout(() => open.value = true, openDelay.value)\n}\n\nfunction handleClose() {\n  clearTimeout(openTimerRef.value)\n  if (!hasSelectionRef.value && !isPointerDownOnContentRef.value)\n    closeTimerRef.value = window.setTimeout(() => open.value = false, closeDelay.value)\n}\n\nfunction handleDismiss() {\n  open.value = false\n}\n\nprovideHoverCardRootContext({\n  open,\n  onOpenChange(value) {\n    open.value = value\n  },\n  onOpen: handleOpen,\n  onClose: handleClose,\n  onDismiss: handleDismiss,\n  hasSelectionRef,\n  isPointerDownOnContentRef,\n  isPointerInTransitRef,\n  triggerElement,\n})\n</script>\n\n<template>\n  <PopperRoot>\n    <slot :open=\"open\" />\n  </PopperRoot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport { createContext, useForwardExpose } from '@/shared'\n\nexport interface HoverCardRootProps {\n  /** The open state of the hover card when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n  /** The controlled open state of the hover card. Can be binded as `v-model:open`. */\n  open?: boolean\n  /** The duration from when the mouse enters the trigger until the hover card opens. */\n  openDelay?: number\n  /** The duration from when the mouse leaves the trigger or content until the hover card closes. */\n  closeDelay?: number\n}\nexport type HoverCardRootEmits = {\n  /** Event handler called when the open state of the hover card changes. */\n  'update:open': [value: boolean]\n}\n\nexport interface HoverCardRootContext {\n  open: Ref<boolean>\n  onOpenChange: (open: boolean) => void\n  onOpen: () => void\n  onClose: () => void\n  onDismiss: () => void\n  hasSelectionRef: Ref<boolean>\n  isPointerDownOnContentRef: Ref<boolean>\n  isPointerInTransitRef: Ref<boolean>\n  triggerElement: Ref<HTMLElement | undefined>\n}\n\nexport const [injectHoverCardRootContext, provideHoverCardRootContext]\n  = createContext<HoverCardRootContext>('HoverCardRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { ref, toRefs } from 'vue'\nimport { PopperRoot } from '@/Popper'\n\nconst props = withDefaults(defineProps<HoverCardRootProps>(), {\n  defaultOpen: false,\n  open: undefined,\n  openDelay: 700,\n  closeDelay: 300,\n})\nconst emit = defineEmits<HoverCardRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nconst { openDelay, closeDelay } = toRefs(props)\n\nuseForwardExpose()\nconst open = useVModel(props, 'open', emit, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst openTimerRef = ref(0)\nconst closeTimerRef = ref(0)\nconst hasSelectionRef = ref(false)\nconst isPointerDownOnContentRef = ref(false)\nconst isPointerInTransitRef = ref(false)\nconst triggerElement = ref<HTMLElement>()\n\nfunction handleOpen() {\n  clearTimeout(closeTimerRef.value)\n  openTimerRef.value = window.setTimeout(() => open.value = true, openDelay.value)\n}\n\nfunction handleClose() {\n  clearTimeout(openTimerRef.value)\n  if (!hasSelectionRef.value && !isPointerDownOnContentRef.value)\n    closeTimerRef.value = window.setTimeout(() => open.value = false, closeDelay.value)\n}\n\nfunction handleDismiss() {\n  open.value = false\n}\n\nprovideHoverCardRootContext({\n  open,\n  onOpenChange(value) {\n    open.value = value\n  },\n  onOpen: handleOpen,\n  onClose: handleClose,\n  onDismiss: handleDismiss,\n  hasSelectionRef,\n  isPointerDownOnContentRef,\n  isPointerInTransitRef,\n  triggerElement,\n})\n</script>\n\n<template>\n  <PopperRoot>\n    <slot :open=\"open\" />\n  </PopperRoot>\n</template>\n","export function excludeTouch(eventHandler: () => void) {\n  return (event: PointerEvent) => event.pointerType === 'touch' ? undefined : eventHandler()\n}\n\n/**\n * Returns a list of nodes that can be in the tab sequence.\n * @see: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n */\nexport function getTabbableNodes(container: HTMLElement) {\n  const nodes: HTMLElement[] = []\n  const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n    acceptNode: (node: any) => {\n      // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n      // runtime's understanding of tabbability, so this automatically accounts\n      // for any kind of element that could be tabbed to.\n      return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP\n    },\n  })\n  while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement)\n  return nodes\n}\n","<script lang=\"ts\">\nimport type { DismissableLayerEmits } from '@/DismissableLayer'\nimport type { PopperContentProps } from '@/Popper'\nimport { syncRef } from '@vueuse/shared'\nimport { useForwardExpose, useGraceArea } from '@/shared'\n\nexport type HoverCardContentImplEmits = DismissableLayerEmits\nexport interface HoverCardContentImplProps extends PopperContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useEventListener } from '@vueuse/core'\nimport { nextTick, onMounted, onUnmounted, ref, watchEffect } from 'vue'\nimport { DismissableLayer } from '@/DismissableLayer'\nimport { PopperContent } from '@/Popper'\nimport { useForwardProps } from '..'\nimport { injectHoverCardRootContext } from './HoverCardRoot.vue'\nimport { getTabbableNodes } from './utils'\n\nconst props = defineProps<HoverCardContentImplProps>()\nconst emits = defineEmits<HoverCardContentImplEmits>()\nconst forwarded = useForwardProps(props)\n\nconst { forwardRef, currentElement: contentElement } = useForwardExpose()\nconst rootContext = injectHoverCardRootContext()\nconst { isPointerInTransit, onPointerExit } = useGraceArea(rootContext.triggerElement, contentElement)\n\nsyncRef(rootContext.isPointerInTransitRef, isPointerInTransit, { direction: 'rtl' })\n\nonPointerExit(() => {\n  rootContext.onClose()\n})\n\nconst containSelection = ref(false)\n\nlet originalBodyUserSelect: string\nwatchEffect((cleanupFn) => {\n  if (containSelection.value) {\n    const body = document.body\n\n    // Safari requires prefix\n    originalBodyUserSelect = body.style.userSelect || body.style.webkitUserSelect\n\n    body.style.userSelect = 'none'\n    body.style.webkitUserSelect = 'none'\n\n    cleanupFn(() => {\n      body.style.userSelect = originalBodyUserSelect\n      body.style.webkitUserSelect = originalBodyUserSelect\n    })\n  }\n})\n\nfunction handlePointerUp() {\n  containSelection.value = false\n  rootContext.isPointerDownOnContentRef.value = false\n\n  // Delay a frame to ensure we always access the latest selection\n  nextTick(() => {\n    const hasSelection = document.getSelection()?.toString() !== ''\n    if (hasSelection)\n      rootContext.hasSelectionRef.value = true\n  })\n}\nonMounted(() => {\n  if (contentElement.value) {\n    document.addEventListener('pointerup', handlePointerUp)\n\n    const tabbables = getTabbableNodes(contentElement.value)\n    tabbables.forEach(tabbable => tabbable.setAttribute('tabindex', '-1'))\n  }\n\n  useEventListener(window, 'scroll', (event: Event) => {\n    const target = event.target as HTMLElement\n    if (target?.contains(rootContext.triggerElement.value!))\n      rootContext.onDismiss()\n  }, { capture: true })\n})\n\nonUnmounted(() => {\n  document.removeEventListener('pointerup', handlePointerUp)\n  rootContext.hasSelectionRef.value = false\n  rootContext.isPointerDownOnContentRef.value = false\n})\n</script>\n\n<template>\n  <DismissableLayer\n    as-child\n    :disable-outside-pointer-events=\"false\"\n    @escape-key-down=\"emits('escapeKeyDown', $event)\"\n    @pointer-down-outside=\"emits('pointerDownOutside', $event)\"\n    @focus-outside.prevent=\"emits('focusOutside', $event)\"\n    @dismiss=\"rootContext.onDismiss\"\n  >\n    <PopperContent\n      v-bind=\"{ ...forwarded, ...$attrs }\"\n      :ref=\"forwardRef\"\n      :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n      :style=\"{\n        'userSelect': containSelection ? 'text' : undefined,\n        // Safari requires prefix\n        'WebkitUserSelect': containSelection ? 'text' : undefined,\n        // re-namespace exposed content custom properties\n        '--reka-hover-card-content-transform-origin': 'var(--reka-popper-transform-origin)',\n        '--reka-hover-card-content-available-width': 'var(--reka-popper-available-width)',\n        '--reka-hover-card-content-available-height': 'var(--reka-popper-available-height)',\n        '--reka-hover-card-trigger-width': 'var(--reka-popper-anchor-width)',\n        '--reka-hover-card-trigger-height': 'var(--reka-popper-anchor-height)',\n      }\"\n      @pointerdown=\"(event: PointerEvent) => {\n        // Contain selection to current layer\n        if ((event.currentTarget as HTMLElement).contains(event.target as HTMLElement)) {\n          containSelection = true\n        }\n        rootContext.hasSelectionRef.value = false;\n        rootContext.isPointerDownOnContentRef.value = true;\n      }\"\n    >\n      <slot />\n    </PopperContent>\n  </DismissableLayer>\n</template>\n","<script lang=\"ts\">\nimport type { DismissableLayerEmits } from '@/DismissableLayer'\nimport type { PopperContentProps } from '@/Popper'\nimport { syncRef } from '@vueuse/shared'\nimport { useForwardExpose, useGraceArea } from '@/shared'\n\nexport type HoverCardContentImplEmits = DismissableLayerEmits\nexport interface HoverCardContentImplProps extends PopperContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useEventListener } from '@vueuse/core'\nimport { nextTick, onMounted, onUnmounted, ref, watchEffect } from 'vue'\nimport { DismissableLayer } from '@/DismissableLayer'\nimport { PopperContent } from '@/Popper'\nimport { useForwardProps } from '..'\nimport { injectHoverCardRootContext } from './HoverCardRoot.vue'\nimport { getTabbableNodes } from './utils'\n\nconst props = defineProps<HoverCardContentImplProps>()\nconst emits = defineEmits<HoverCardContentImplEmits>()\nconst forwarded = useForwardProps(props)\n\nconst { forwardRef, currentElement: contentElement } = useForwardExpose()\nconst rootContext = injectHoverCardRootContext()\nconst { isPointerInTransit, onPointerExit } = useGraceArea(rootContext.triggerElement, contentElement)\n\nsyncRef(rootContext.isPointerInTransitRef, isPointerInTransit, { direction: 'rtl' })\n\nonPointerExit(() => {\n  rootContext.onClose()\n})\n\nconst containSelection = ref(false)\n\nlet originalBodyUserSelect: string\nwatchEffect((cleanupFn) => {\n  if (containSelection.value) {\n    const body = document.body\n\n    // Safari requires prefix\n    originalBodyUserSelect = body.style.userSelect || body.style.webkitUserSelect\n\n    body.style.userSelect = 'none'\n    body.style.webkitUserSelect = 'none'\n\n    cleanupFn(() => {\n      body.style.userSelect = originalBodyUserSelect\n      body.style.webkitUserSelect = originalBodyUserSelect\n    })\n  }\n})\n\nfunction handlePointerUp() {\n  containSelection.value = false\n  rootContext.isPointerDownOnContentRef.value = false\n\n  // Delay a frame to ensure we always access the latest selection\n  nextTick(() => {\n    const hasSelection = document.getSelection()?.toString() !== ''\n    if (hasSelection)\n      rootContext.hasSelectionRef.value = true\n  })\n}\nonMounted(() => {\n  if (contentElement.value) {\n    document.addEventListener('pointerup', handlePointerUp)\n\n    const tabbables = getTabbableNodes(contentElement.value)\n    tabbables.forEach(tabbable => tabbable.setAttribute('tabindex', '-1'))\n  }\n\n  useEventListener(window, 'scroll', (event: Event) => {\n    const target = event.target as HTMLElement\n    if (target?.contains(rootContext.triggerElement.value!))\n      rootContext.onDismiss()\n  }, { capture: true })\n})\n\nonUnmounted(() => {\n  document.removeEventListener('pointerup', handlePointerUp)\n  rootContext.hasSelectionRef.value = false\n  rootContext.isPointerDownOnContentRef.value = false\n})\n</script>\n\n<template>\n  <DismissableLayer\n    as-child\n    :disable-outside-pointer-events=\"false\"\n    @escape-key-down=\"emits('escapeKeyDown', $event)\"\n    @pointer-down-outside=\"emits('pointerDownOutside', $event)\"\n    @focus-outside.prevent=\"emits('focusOutside', $event)\"\n    @dismiss=\"rootContext.onDismiss\"\n  >\n    <PopperContent\n      v-bind=\"{ ...forwarded, ...$attrs }\"\n      :ref=\"forwardRef\"\n      :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n      :style=\"{\n        'userSelect': containSelection ? 'text' : undefined,\n        // Safari requires prefix\n        'WebkitUserSelect': containSelection ? 'text' : undefined,\n        // re-namespace exposed content custom properties\n        '--reka-hover-card-content-transform-origin': 'var(--reka-popper-transform-origin)',\n        '--reka-hover-card-content-available-width': 'var(--reka-popper-available-width)',\n        '--reka-hover-card-content-available-height': 'var(--reka-popper-available-height)',\n        '--reka-hover-card-trigger-width': 'var(--reka-popper-anchor-width)',\n        '--reka-hover-card-trigger-height': 'var(--reka-popper-anchor-height)',\n      }\"\n      @pointerdown=\"(event: PointerEvent) => {\n        // Contain selection to current layer\n        if ((event.currentTarget as HTMLElement).contains(event.target as HTMLElement)) {\n          containSelection = true\n        }\n        rootContext.hasSelectionRef.value = false;\n        rootContext.isPointerDownOnContentRef.value = true;\n      }\"\n    >\n      <slot />\n    </PopperContent>\n  </DismissableLayer>\n</template>\n","<script lang=\"ts\">\nimport type { HoverCardContentImplEmits, HoverCardContentImplProps } from './HoverCardContentImpl.vue'\n\nexport type HoverCardContentEmits = HoverCardContentImplEmits\n\nexport interface HoverCardContentProps extends HoverCardContentImplProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\nimport HoverCardContentImpl from './HoverCardContentImpl.vue'\nimport { injectHoverCardRootContext } from './HoverCardRoot.vue'\nimport { excludeTouch } from './utils'\n\nconst props = defineProps<HoverCardContentProps>()\nconst emits = defineEmits<HoverCardContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\nconst { forwardRef } = useForwardExpose()\n\nconst rootContext = injectHoverCardRootContext()\n</script>\n\n<template>\n  <Presence\n    :present=\"forceMount || rootContext.open.value\"\n  >\n    <HoverCardContentImpl\n      v-bind=\"forwarded\"\n      :ref=\"forwardRef\"\n      @pointerenter=\"excludeTouch(rootContext.onOpen)($event)\"\n    >\n      <slot />\n    </HoverCardContentImpl>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { HoverCardContentImplEmits, HoverCardContentImplProps } from './HoverCardContentImpl.vue'\n\nexport type HoverCardContentEmits = HoverCardContentImplEmits\n\nexport interface HoverCardContentProps extends HoverCardContentImplProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\nimport HoverCardContentImpl from './HoverCardContentImpl.vue'\nimport { injectHoverCardRootContext } from './HoverCardRoot.vue'\nimport { excludeTouch } from './utils'\n\nconst props = defineProps<HoverCardContentProps>()\nconst emits = defineEmits<HoverCardContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\nconst { forwardRef } = useForwardExpose()\n\nconst rootContext = injectHoverCardRootContext()\n</script>\n\n<template>\n  <Presence\n    :present=\"forceMount || rootContext.open.value\"\n  >\n    <HoverCardContentImpl\n      v-bind=\"forwarded\"\n      :ref=\"forwardRef\"\n      @pointerenter=\"excludeTouch(rootContext.onOpen)($event)\"\n    >\n      <slot />\n    </HoverCardContentImpl>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface HoverCardPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<HoverCardPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface HoverCardPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<HoverCardPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nexport interface HoverCardTriggerProps extends PopperAnchorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { PopperAnchorProps } from '@/Popper'\nimport { PopperAnchor } from '@/Popper'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectHoverCardRootContext } from './HoverCardRoot.vue'\nimport { excludeTouch } from './utils'\n\nwithDefaults(defineProps<HoverCardTriggerProps>(), {\n  as: 'a',\n})\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst rootContext = injectHoverCardRootContext()\nrootContext.triggerElement = currentElement\n\nfunction handleLeave() {\n  setTimeout(() => {\n    if (!rootContext.isPointerInTransitRef.value && !rootContext.open.value) {\n      rootContext.onClose()\n    }\n  }, 0)\n}\n</script>\n\n<template>\n  <PopperAnchor\n    as-child\n    :reference=\"reference\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n      data-grace-area-trigger\n      @pointerenter=\"excludeTouch(rootContext.onOpen)($event)\"\n      @pointerleave=\"excludeTouch(handleLeave)($event)\"\n      @focus=\"rootContext.onOpen()\"\n      @blur=\"rootContext.onClose()\"\n    >\n      <slot />\n    </Primitive>\n  </PopperAnchor>\n</template>\n","<script lang=\"ts\">\nexport interface HoverCardTriggerProps extends PopperAnchorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { PopperAnchorProps } from '@/Popper'\nimport { PopperAnchor } from '@/Popper'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectHoverCardRootContext } from './HoverCardRoot.vue'\nimport { excludeTouch } from './utils'\n\nwithDefaults(defineProps<HoverCardTriggerProps>(), {\n  as: 'a',\n})\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst rootContext = injectHoverCardRootContext()\nrootContext.triggerElement = currentElement\n\nfunction handleLeave() {\n  setTimeout(() => {\n    if (!rootContext.isPointerInTransitRef.value && !rootContext.open.value) {\n      rootContext.onClose()\n    }\n  }, 0)\n}\n</script>\n\n<template>\n  <PopperAnchor\n    as-child\n    :reference=\"reference\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n      data-grace-area-trigger\n      @pointerenter=\"excludeTouch(rootContext.onOpen)($event)\"\n      @pointerleave=\"excludeTouch(handleLeave)($event)\"\n      @focus=\"rootContext.onOpen()\"\n      @blur=\"rootContext.onClose()\"\n    >\n      <slot />\n    </Primitive>\n  </PopperAnchor>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface LabelProps extends PrimitiveProps {\n  /** The id of the element the label is associated with. */\n  for?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<LabelProps>(), {\n  as: 'label',\n})\n\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    @mousedown=\"(event: MouseEvent) => {\n      // prevent text selection when double clicking label\n      if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n    }\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface LabelProps extends PrimitiveProps {\n  /** The id of the element the label is associated with. */\n  for?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<LabelProps>(), {\n  as: 'label',\n})\n\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    @mousedown=\"(event: MouseEvent) => {\n      // prevent text selection when double clicking label\n      if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n    }\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { MenuArrowProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface MenubarArrowProps extends MenuArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuArrow } from '@/Menu'\n\nconst props = withDefaults(defineProps<MenubarArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuArrow v-bind=\"props\">\n    <slot />\n  </MenuArrow>\n</template>\n","<script lang=\"ts\">\nimport type { MenuArrowProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface MenubarArrowProps extends MenuArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuArrow } from '@/Menu'\n\nconst props = withDefaults(defineProps<MenubarArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuArrow v-bind=\"props\">\n    <slot />\n  </MenuArrow>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuCheckboxItemEmits,\n  MenuCheckboxItemProps,\n} from '@/Menu'\n\nexport type MenubarCheckboxItemEmits = MenuCheckboxItemEmits\n\nexport interface MenubarCheckboxItemProps extends MenuCheckboxItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuCheckboxItem } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<MenubarCheckboxItemProps>()\nconst emits = defineEmits<MenubarCheckboxItemEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuCheckboxItem v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuCheckboxItem>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuCheckboxItemEmits,\n  MenuCheckboxItemProps,\n} from '@/Menu'\n\nexport type MenubarCheckboxItemEmits = MenuCheckboxItemEmits\n\nexport interface MenubarCheckboxItemProps extends MenuCheckboxItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuCheckboxItem } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<MenubarCheckboxItemProps>()\nconst emits = defineEmits<MenubarCheckboxItemEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuCheckboxItem v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuCheckboxItem>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { Direction } from '../shared/types'\nimport { useCollection } from '@/Collection'\nimport { createContext, useDirection, useForwardExpose } from '@/shared'\n\nexport interface MenubarRootProps {\n  /** The controlled value of the menu to open. Can be used as `v-model`. */\n  modelValue?: string\n  /** The value of the menu that should be open when initially rendered. Use when you do not need to control the value state. */\n  defaultValue?: string\n  /**\n   * The reading direction of the combobox when applicable.\n   *\n   *  If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode.\n   */\n  dir?: Direction\n  /** When `true`, keyboard navigation will loop from last item to first, and vice versa. */\n  loop?: boolean\n}\nexport type MenubarRootEmits = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [value: boolean]\n}\n\nexport interface MenubarRootContext {\n  modelValue: Ref<string>\n  dir: Ref<Direction>\n  loop: Ref<boolean>\n  onMenuOpen: (value: string) => void\n  onMenuClose: () => void\n  onMenuToggle: (value: string) => void\n}\n\nexport const [injectMenubarRootContext, provideMenubarRootContext]\n  = createContext<MenubarRootContext>('MenubarRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { ref, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusGroup } from '@/RovingFocus'\n\nconst props = withDefaults(defineProps<MenubarRootProps>(), {\n  loop: false,\n})\nconst emit = defineEmits<MenubarRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { forwardRef } = useForwardExpose()\nconst { CollectionSlot } = useCollection({ key: 'Menubar', isProvider: true })\n\nconst modelValue = useVModel(props, 'modelValue', emit, {\n  defaultValue: props.defaultValue ?? '',\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<string>\n\nconst currentTabStopId = ref<string | null>(null)\n\nconst { dir: propDir, loop } = toRefs(props)\nconst dir = useDirection(propDir)\nprovideMenubarRootContext({\n  modelValue,\n  dir,\n  loop,\n  onMenuOpen: (value) => {\n    modelValue.value = value\n    currentTabStopId.value = value\n  },\n  onMenuClose: () => {\n    modelValue.value = ''\n  },\n  onMenuToggle: (value) => {\n    modelValue.value = modelValue.value ? '' : value\n    // `openMenuOpen` and `onMenuToggle` are called exclusively so we\n    // need to update the id in either case.\n    currentTabStopId.value = value\n  },\n})\n</script>\n\n<template>\n  <CollectionSlot>\n    <RovingFocusGroup\n      v-model:current-tab-stop-id=\"currentTabStopId\"\n      orientation=\"horizontal\"\n      :loop=\"loop\"\n      :dir=\"dir\"\n      as-child\n    >\n      <Primitive\n        :ref=\"forwardRef\"\n        role=\"menubar\"\n      >\n        <slot :model-value=\"modelValue\" />\n      </Primitive>\n    </RovingFocusGroup>\n  </CollectionSlot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { Direction } from '../shared/types'\nimport { useCollection } from '@/Collection'\nimport { createContext, useDirection, useForwardExpose } from '@/shared'\n\nexport interface MenubarRootProps {\n  /** The controlled value of the menu to open. Can be used as `v-model`. */\n  modelValue?: string\n  /** The value of the menu that should be open when initially rendered. Use when you do not need to control the value state. */\n  defaultValue?: string\n  /**\n   * The reading direction of the combobox when applicable.\n   *\n   *  If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode.\n   */\n  dir?: Direction\n  /** When `true`, keyboard navigation will loop from last item to first, and vice versa. */\n  loop?: boolean\n}\nexport type MenubarRootEmits = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [value: boolean]\n}\n\nexport interface MenubarRootContext {\n  modelValue: Ref<string>\n  dir: Ref<Direction>\n  loop: Ref<boolean>\n  onMenuOpen: (value: string) => void\n  onMenuClose: () => void\n  onMenuToggle: (value: string) => void\n}\n\nexport const [injectMenubarRootContext, provideMenubarRootContext]\n  = createContext<MenubarRootContext>('MenubarRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { ref, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusGroup } from '@/RovingFocus'\n\nconst props = withDefaults(defineProps<MenubarRootProps>(), {\n  loop: false,\n})\nconst emit = defineEmits<MenubarRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { forwardRef } = useForwardExpose()\nconst { CollectionSlot } = useCollection({ key: 'Menubar', isProvider: true })\n\nconst modelValue = useVModel(props, 'modelValue', emit, {\n  defaultValue: props.defaultValue ?? '',\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<string>\n\nconst currentTabStopId = ref<string | null>(null)\n\nconst { dir: propDir, loop } = toRefs(props)\nconst dir = useDirection(propDir)\nprovideMenubarRootContext({\n  modelValue,\n  dir,\n  loop,\n  onMenuOpen: (value) => {\n    modelValue.value = value\n    currentTabStopId.value = value\n  },\n  onMenuClose: () => {\n    modelValue.value = ''\n  },\n  onMenuToggle: (value) => {\n    modelValue.value = modelValue.value ? '' : value\n    // `openMenuOpen` and `onMenuToggle` are called exclusively so we\n    // need to update the id in either case.\n    currentTabStopId.value = value\n  },\n})\n</script>\n\n<template>\n  <CollectionSlot>\n    <RovingFocusGroup\n      v-model:current-tab-stop-id=\"currentTabStopId\"\n      orientation=\"horizontal\"\n      :loop=\"loop\"\n      :dir=\"dir\"\n      as-child\n    >\n      <Primitive\n        :ref=\"forwardRef\"\n        role=\"menubar\"\n      >\n        <slot :model-value=\"modelValue\" />\n      </Primitive>\n    </RovingFocusGroup>\n  </CollectionSlot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport { createContext, useForwardExpose, useId } from '@/shared'\n\nexport interface MenubarMenuProps {\n  /**\n   * A unique value that associates the item with an active value when the navigation menu is controlled.\n   *\n   * This prop is managed automatically when uncontrolled.\n   */\n  value?: string\n}\n\ntype MenubarMenuContext = {\n  value: string\n  triggerId: string\n  triggerElement: Ref<HTMLElement | undefined>\n  contentId: string\n  wasKeyboardTriggerOpenRef: Ref<boolean>\n}\n\nexport const [injectMenubarMenuContext, provideMenubarMenuContext]\n  = createContext<MenubarMenuContext>('MenubarMenu')\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue'\nimport { MenuRoot } from '@/Menu'\nimport { injectMenubarRootContext } from './MenubarRoot.vue'\n\nconst props = defineProps<MenubarMenuProps>()\n\nconst value = useId(props.value)\nconst rootContext = injectMenubarRootContext()\nuseForwardExpose()\n\nconst triggerElement = ref<HTMLElement>()\nconst wasKeyboardTriggerOpenRef = ref(false)\n\nconst open = computed(() => rootContext.modelValue.value === value)\n\nwatch(open, () => {\n  if (!open.value)\n    wasKeyboardTriggerOpenRef.value = false\n})\n\nprovideMenubarMenuContext({\n  value,\n  triggerElement,\n  triggerId: value,\n  contentId: '',\n  wasKeyboardTriggerOpenRef,\n})\n</script>\n\n<template>\n  <MenuRoot\n    :open=\"open\"\n    :modal=\"false\"\n    :dir=\"rootContext.dir.value\"\n    @update:open=\"\n      (value) => {\n        // Menu only calls `@update:open` when dismissing so we\n        // want to close our MenuBar based on the same events.\n        if (!value) rootContext.onMenuClose();\n      }\n    \"\n  >\n    <slot />\n  </MenuRoot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport { createContext, useForwardExpose, useId } from '@/shared'\n\nexport interface MenubarMenuProps {\n  /**\n   * A unique value that associates the item with an active value when the navigation menu is controlled.\n   *\n   * This prop is managed automatically when uncontrolled.\n   */\n  value?: string\n}\n\ntype MenubarMenuContext = {\n  value: string\n  triggerId: string\n  triggerElement: Ref<HTMLElement | undefined>\n  contentId: string\n  wasKeyboardTriggerOpenRef: Ref<boolean>\n}\n\nexport const [injectMenubarMenuContext, provideMenubarMenuContext]\n  = createContext<MenubarMenuContext>('MenubarMenu')\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue'\nimport { MenuRoot } from '@/Menu'\nimport { injectMenubarRootContext } from './MenubarRoot.vue'\n\nconst props = defineProps<MenubarMenuProps>()\n\nconst value = useId(props.value)\nconst rootContext = injectMenubarRootContext()\nuseForwardExpose()\n\nconst triggerElement = ref<HTMLElement>()\nconst wasKeyboardTriggerOpenRef = ref(false)\n\nconst open = computed(() => rootContext.modelValue.value === value)\n\nwatch(open, () => {\n  if (!open.value)\n    wasKeyboardTriggerOpenRef.value = false\n})\n\nprovideMenubarMenuContext({\n  value,\n  triggerElement,\n  triggerId: value,\n  contentId: '',\n  wasKeyboardTriggerOpenRef,\n})\n</script>\n\n<template>\n  <MenuRoot\n    :open=\"open\"\n    :modal=\"false\"\n    :dir=\"rootContext.dir.value\"\n    @update:open=\"\n      (value) => {\n        // Menu only calls `@update:open` when dismissing so we\n        // want to close our MenuBar based on the same events.\n        if (!value) rootContext.onMenuClose();\n      }\n    \"\n  >\n    <slot />\n  </MenuRoot>\n</template>\n","<script lang=\"ts\">\nimport type { MenuContentEmits, MenuContentProps } from '@/Menu'\nimport { useCollection } from '@/Collection'\n\nexport type MenubarContentEmits = MenuContentEmits\n\nexport interface MenubarContentProps extends MenuContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { MenuContent } from '@/Menu'\nimport { useForwardExpose, useForwardPropsEmits, useId } from '@/shared'\nimport { wrapArray } from '@/shared/useTypeahead'\nimport { injectMenubarMenuContext } from './MenubarMenu.vue'\nimport { injectMenubarRootContext } from './MenubarRoot.vue'\n\nconst props = withDefaults(defineProps<MenubarContentProps>(), {\n  align: 'start',\n})\nconst emits = defineEmits<MenubarContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\nuseForwardExpose()\n\nconst rootContext = injectMenubarRootContext()\nconst menuContext = injectMenubarMenuContext()\n\nmenuContext.contentId ||= useId(undefined, 'reka-menubar-content')\n\nconst { getItems } = useCollection({ key: 'Menubar' })\n\nconst hasInteractedOutsideRef = ref(false)\n\nfunction handleArrowNavigation(event: KeyboardEvent) {\n  const target = event.target as HTMLElement\n  const targetIsSubTrigger = target.hasAttribute(\n    'data-reka-menubar-subtrigger',\n  )\n\n  const prevMenuKey = rootContext.dir.value === 'rtl' ? 'ArrowRight' : 'ArrowLeft'\n  const isPrevKey = prevMenuKey === event.key\n  const isNextKey = !isPrevKey\n\n  // Prevent navigation when we're opening a submenu\n  if (isNextKey && targetIsSubTrigger)\n    return\n\n  let candidateValues = getItems().filter(i => i.ref.dataset.disabled !== '').map(i => i.ref.dataset.value)\n  if (isPrevKey)\n    candidateValues.reverse()\n\n  const currentIndex = candidateValues.indexOf(menuContext.value)\n\n  candidateValues = rootContext.loop.value\n    ? wrapArray(candidateValues, currentIndex + 1)\n    : candidateValues.slice(currentIndex + 1)\n\n  const [nextValue] = candidateValues\n  if (nextValue)\n    rootContext.onMenuOpen(nextValue)\n}\n</script>\n\n<template>\n  <MenuContent\n    v-bind=\"forwarded\"\n    :id=\"menuContext.contentId\"\n    data-reka-menubar-content=\"\"\n    :aria-labelledby=\"menuContext.triggerId\"\n    :style=\"{\n      '--reka-menubar-content-transform-origin':\n        'var(--reka-popper-transform-origin)',\n      '--reka-menubar-content-available-width':\n        'var(--reka-popper-available-width)',\n      '--reka-menubar-content-available-height':\n        'var(--reka-popper-available-height)',\n      '--reka-menubar-trigger-width': 'var(--reka-popper-anchor-width)',\n      '--reka-menubar-trigger-height': 'var(--reka-popper-anchor-height)',\n    }\"\n    @close-auto-focus=\"(event) => {\n      const menubarOpen = Boolean(rootContext.modelValue.value);\n      if (!menubarOpen && !hasInteractedOutsideRef) {\n        menuContext.triggerElement.value?.focus();\n      }\n\n      hasInteractedOutsideRef = false;\n      // Always prevent auto focus because we either focus manually or want user agent focus\n      event.preventDefault();\n    }\"\n    @focus-outside=\"(event) => {\n      const target = event.target as HTMLElement;\n      const isMenubarTrigger = getItems().filter(i => i.ref.dataset.disabled !== '').some((i) => i.ref.contains(target));\n      if (isMenubarTrigger) event.preventDefault();\n    }\"\n    @interact-outside=\"\n      (event) => {\n        hasInteractedOutsideRef = true;\n      }\n    \"\n    @entry-focus=\"(event) => {\n      if (!menuContext.wasKeyboardTriggerOpenRef.value) event.preventDefault()\n    }\"\n    @keydown.arrow-right.arrow-left=\"handleArrowNavigation\"\n  >\n    <slot />\n  </MenuContent>\n</template>\n","<script lang=\"ts\">\nimport type { MenuContentEmits, MenuContentProps } from '@/Menu'\nimport { useCollection } from '@/Collection'\n\nexport type MenubarContentEmits = MenuContentEmits\n\nexport interface MenubarContentProps extends MenuContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { MenuContent } from '@/Menu'\nimport { useForwardExpose, useForwardPropsEmits, useId } from '@/shared'\nimport { wrapArray } from '@/shared/useTypeahead'\nimport { injectMenubarMenuContext } from './MenubarMenu.vue'\nimport { injectMenubarRootContext } from './MenubarRoot.vue'\n\nconst props = withDefaults(defineProps<MenubarContentProps>(), {\n  align: 'start',\n})\nconst emits = defineEmits<MenubarContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\nuseForwardExpose()\n\nconst rootContext = injectMenubarRootContext()\nconst menuContext = injectMenubarMenuContext()\n\nmenuContext.contentId ||= useId(undefined, 'reka-menubar-content')\n\nconst { getItems } = useCollection({ key: 'Menubar' })\n\nconst hasInteractedOutsideRef = ref(false)\n\nfunction handleArrowNavigation(event: KeyboardEvent) {\n  const target = event.target as HTMLElement\n  const targetIsSubTrigger = target.hasAttribute(\n    'data-reka-menubar-subtrigger',\n  )\n\n  const prevMenuKey = rootContext.dir.value === 'rtl' ? 'ArrowRight' : 'ArrowLeft'\n  const isPrevKey = prevMenuKey === event.key\n  const isNextKey = !isPrevKey\n\n  // Prevent navigation when we're opening a submenu\n  if (isNextKey && targetIsSubTrigger)\n    return\n\n  let candidateValues = getItems().filter(i => i.ref.dataset.disabled !== '').map(i => i.ref.dataset.value)\n  if (isPrevKey)\n    candidateValues.reverse()\n\n  const currentIndex = candidateValues.indexOf(menuContext.value)\n\n  candidateValues = rootContext.loop.value\n    ? wrapArray(candidateValues, currentIndex + 1)\n    : candidateValues.slice(currentIndex + 1)\n\n  const [nextValue] = candidateValues\n  if (nextValue)\n    rootContext.onMenuOpen(nextValue)\n}\n</script>\n\n<template>\n  <MenuContent\n    v-bind=\"forwarded\"\n    :id=\"menuContext.contentId\"\n    data-reka-menubar-content=\"\"\n    :aria-labelledby=\"menuContext.triggerId\"\n    :style=\"{\n      '--reka-menubar-content-transform-origin':\n        'var(--reka-popper-transform-origin)',\n      '--reka-menubar-content-available-width':\n        'var(--reka-popper-available-width)',\n      '--reka-menubar-content-available-height':\n        'var(--reka-popper-available-height)',\n      '--reka-menubar-trigger-width': 'var(--reka-popper-anchor-width)',\n      '--reka-menubar-trigger-height': 'var(--reka-popper-anchor-height)',\n    }\"\n    @close-auto-focus=\"(event) => {\n      const menubarOpen = Boolean(rootContext.modelValue.value);\n      if (!menubarOpen && !hasInteractedOutsideRef) {\n        menuContext.triggerElement.value?.focus();\n      }\n\n      hasInteractedOutsideRef = false;\n      // Always prevent auto focus because we either focus manually or want user agent focus\n      event.preventDefault();\n    }\"\n    @focus-outside=\"(event) => {\n      const target = event.target as HTMLElement;\n      const isMenubarTrigger = getItems().filter(i => i.ref.dataset.disabled !== '').some((i) => i.ref.contains(target));\n      if (isMenubarTrigger) event.preventDefault();\n    }\"\n    @interact-outside=\"\n      (event) => {\n        hasInteractedOutsideRef = true;\n      }\n    \"\n    @entry-focus=\"(event) => {\n      if (!menuContext.wasKeyboardTriggerOpenRef.value) event.preventDefault()\n    }\"\n    @keydown.arrow-right.arrow-left=\"handleArrowNavigation\"\n  >\n    <slot />\n  </MenuContent>\n</template>\n","<script lang=\"ts\">\nimport type { MenuGroupProps } from '@/Menu'\n\nexport interface MenubarGroupProps extends MenuGroupProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuGroup } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nconst props = defineProps<MenubarGroupProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuGroup v-bind=\"props\">\n    <slot />\n  </MenuGroup>\n</template>\n","<script lang=\"ts\">\nimport type { MenuGroupProps } from '@/Menu'\n\nexport interface MenubarGroupProps extends MenuGroupProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuGroup } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nconst props = defineProps<MenubarGroupProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuGroup v-bind=\"props\">\n    <slot />\n  </MenuGroup>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemEmits, MenuItemProps } from '@/Menu'\n\nexport type MenubarItemEmits = MenuItemEmits\n\nexport interface MenubarItemProps extends MenuItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuItem } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<MenubarItemProps>()\nconst emits = defineEmits<MenubarItemEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuItem v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuItem>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemEmits, MenuItemProps } from '@/Menu'\n\nexport type MenubarItemEmits = MenuItemEmits\n\nexport interface MenubarItemProps extends MenuItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuItem } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<MenubarItemProps>()\nconst emits = defineEmits<MenubarItemEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuItem v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuItem>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemIndicatorProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface MenubarItemIndicatorProps extends MenuItemIndicatorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuItemIndicator } from '@/Menu'\n\nconst props = defineProps<MenubarItemIndicatorProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuItemIndicator v-bind=\"props\">\n    <slot />\n  </MenuItemIndicator>\n</template>\n","<script lang=\"ts\">\nimport type { MenuItemIndicatorProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface MenubarItemIndicatorProps extends MenuItemIndicatorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuItemIndicator } from '@/Menu'\n\nconst props = defineProps<MenubarItemIndicatorProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuItemIndicator v-bind=\"props\">\n    <slot />\n  </MenuItemIndicator>\n</template>\n","<script lang=\"ts\">\nimport type { MenuLabelProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface MenubarLabelProps extends MenuLabelProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuLabel } from '@/Menu'\n\nconst props = defineProps<MenubarLabelProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuLabel v-bind=\"props\">\n    <slot />\n  </MenuLabel>\n</template>\n","<script lang=\"ts\">\nimport type { MenuLabelProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface MenubarLabelProps extends MenuLabelProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuLabel } from '@/Menu'\n\nconst props = defineProps<MenubarLabelProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuLabel v-bind=\"props\">\n    <slot />\n  </MenuLabel>\n</template>\n","<script lang=\"ts\">\nimport type { MenuPortalProps } from '@/Menu'\n\nexport interface MenubarPortalProps extends MenuPortalProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuPortal } from '@/Menu'\n\nconst props = defineProps<MenubarPortalProps>()\n</script>\n\n<template>\n  <MenuPortal v-bind=\"props\">\n    <slot />\n  </MenuPortal>\n</template>\n","<script lang=\"ts\">\nimport type { MenuPortalProps } from '@/Menu'\n\nexport interface MenubarPortalProps extends MenuPortalProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuPortal } from '@/Menu'\n\nconst props = defineProps<MenubarPortalProps>()\n</script>\n\n<template>\n  <MenuPortal v-bind=\"props\">\n    <slot />\n  </MenuPortal>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuRadioGroupEmits,\n  MenuRadioGroupProps,\n} from '@/Menu'\n\nexport type MenubarRadioGroupEmits = MenuRadioGroupEmits\n\nexport interface MenubarRadioGroupProps extends MenuRadioGroupProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuRadioGroup } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<MenubarRadioGroupProps>()\nconst emits = defineEmits<MenubarRadioGroupEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuRadioGroup v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuRadioGroup>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuRadioGroupEmits,\n  MenuRadioGroupProps,\n} from '@/Menu'\n\nexport type MenubarRadioGroupEmits = MenuRadioGroupEmits\n\nexport interface MenubarRadioGroupProps extends MenuRadioGroupProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuRadioGroup } from '@/Menu'\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\n\nconst props = defineProps<MenubarRadioGroupProps>()\nconst emits = defineEmits<MenubarRadioGroupEmits>()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuRadioGroup v-bind=\"{ ...props, ...emitsAsProps }\">\n    <slot />\n  </MenuRadioGroup>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuRadioItemEmits,\n  MenuRadioItemProps,\n} from '@/Menu'\n\nexport type MenubarRadioItemEmits = MenuRadioItemEmits\n\nexport interface MenubarRadioItemProps extends MenuRadioItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuRadioItem } from '@/Menu'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\n\nconst props = defineProps<MenuRadioItemProps>()\nconst emits = defineEmits<MenuRadioItemEmits>()\n\nconst forwarded = useForwardPropsEmits(props, emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuRadioItem v-bind=\"forwarded\">\n    <slot />\n  </MenuRadioItem>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuRadioItemEmits,\n  MenuRadioItemProps,\n} from '@/Menu'\n\nexport type MenubarRadioItemEmits = MenuRadioItemEmits\n\nexport interface MenubarRadioItemProps extends MenuRadioItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuRadioItem } from '@/Menu'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\n\nconst props = defineProps<MenuRadioItemProps>()\nconst emits = defineEmits<MenuRadioItemEmits>()\n\nconst forwarded = useForwardPropsEmits(props, emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuRadioItem v-bind=\"forwarded\">\n    <slot />\n  </MenuRadioItem>\n</template>\n","<script lang=\"ts\">\nimport type { MenuSeparatorProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface MenubarSeparatorProps extends MenuSeparatorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSeparator } from '@/Menu'\n\nconst props = defineProps<MenubarSeparatorProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSeparator v-bind=\"props\">\n    <slot />\n  </MenuSeparator>\n</template>\n","<script lang=\"ts\">\nimport type { MenuSeparatorProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface MenubarSeparatorProps extends MenuSeparatorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSeparator } from '@/Menu'\n\nconst props = defineProps<MenubarSeparatorProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSeparator v-bind=\"props\">\n    <slot />\n  </MenuSeparator>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { MenuSubEmits, MenuSubProps } from '@/Menu'\n\nexport type MenubarSubEmits = MenuSubEmits\nexport interface MenubarSubProps extends MenuSubProps {\n  /** The open state of the submenu when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { MenuSub } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nconst props = withDefaults(defineProps<MenubarSubProps>(), {\n  open: undefined,\n})\nconst emit = defineEmits<MenubarSubEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nuseForwardExpose()\nconst open = useVModel(props, 'open', emit, {\n  defaultValue: props.defaultOpen ?? false,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n</script>\n\n<template>\n  <MenuSub v-model:open=\"open\">\n    <slot :open=\"open\" />\n  </MenuSub>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { MenuSubEmits, MenuSubProps } from '@/Menu'\n\nexport type MenubarSubEmits = MenuSubEmits\nexport interface MenubarSubProps extends MenuSubProps {\n  /** The open state of the submenu when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { MenuSub } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nconst props = withDefaults(defineProps<MenubarSubProps>(), {\n  open: undefined,\n})\nconst emit = defineEmits<MenubarSubEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nuseForwardExpose()\nconst open = useVModel(props, 'open', emit, {\n  defaultValue: props.defaultOpen ?? false,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n</script>\n\n<template>\n  <MenuSub v-model:open=\"open\">\n    <slot :open=\"open\" />\n  </MenuSub>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuSubContentEmits,\n  MenuSubContentProps,\n} from '@/Menu'\nimport { useCollection } from '@/Collection'\n\nexport type MenubarSubContentEmits = MenuSubContentEmits\n\nexport interface MenubarSubContentProps extends MenuSubContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSubContent } from '@/Menu'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\nimport { wrapArray } from '@/shared/useTypeahead'\nimport { injectMenubarMenuContext } from './MenubarMenu.vue'\nimport { injectMenubarRootContext } from './MenubarRoot.vue'\n\nconst props = defineProps<MenubarSubContentProps>()\nconst emits = defineEmits<MenubarSubContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\nuseForwardExpose()\n\nconst { getItems } = useCollection({ key: 'Menubar' })\n\nconst rootContext = injectMenubarRootContext()\nconst menuContext = injectMenubarMenuContext()\n\nfunction handleArrowNavigation(event: KeyboardEvent) {\n  const target = event.target as HTMLElement\n  const targetIsSubTrigger = target.hasAttribute(\n    'data-reka-menubar-subtrigger',\n  )\n\n  // Prevent navigation when we're opening a submenu\n  if (targetIsSubTrigger)\n    return\n\n  let candidateValues = getItems().filter(i => i.ref.dataset.disabled !== '').map(i => i.ref.dataset.value)\n  const currentIndex = candidateValues.indexOf(menuContext.value)\n\n  candidateValues = rootContext.loop.value\n    ? wrapArray(candidateValues, currentIndex + 1)\n    : candidateValues.slice(currentIndex + 1)\n\n  const [nextValue] = candidateValues\n  if (nextValue)\n    rootContext.onMenuOpen(nextValue)\n}\n</script>\n\n<template>\n  <MenuSubContent\n    v-bind=\"forwarded\"\n    data-reka-menubar-content=\"\"\n    :style=\"{\n      '--reka-menubar-content-transform-origin':\n        'var(--reka-popper-transform-origin)',\n      '--reka-menubar-content-available-width':\n        'var(--reka-popper-available-width)',\n      '--reka-menubar-content-available-height':\n        'var(--reka-popper-available-height)',\n      '--reka-menubar-trigger-width': 'var(--reka-popper-anchor-width)',\n      '--reka-menubar-trigger-height': 'var(--reka-popper-anchor-height)',\n    }\"\n    @keydown.arrow-right=\"handleArrowNavigation\"\n  >\n    <slot />\n  </MenuSubContent>\n</template>\n","<script lang=\"ts\">\nimport type {\n  MenuSubContentEmits,\n  MenuSubContentProps,\n} from '@/Menu'\nimport { useCollection } from '@/Collection'\n\nexport type MenubarSubContentEmits = MenuSubContentEmits\n\nexport interface MenubarSubContentProps extends MenuSubContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSubContent } from '@/Menu'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\nimport { wrapArray } from '@/shared/useTypeahead'\nimport { injectMenubarMenuContext } from './MenubarMenu.vue'\nimport { injectMenubarRootContext } from './MenubarRoot.vue'\n\nconst props = defineProps<MenubarSubContentProps>()\nconst emits = defineEmits<MenubarSubContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\nuseForwardExpose()\n\nconst { getItems } = useCollection({ key: 'Menubar' })\n\nconst rootContext = injectMenubarRootContext()\nconst menuContext = injectMenubarMenuContext()\n\nfunction handleArrowNavigation(event: KeyboardEvent) {\n  const target = event.target as HTMLElement\n  const targetIsSubTrigger = target.hasAttribute(\n    'data-reka-menubar-subtrigger',\n  )\n\n  // Prevent navigation when we're opening a submenu\n  if (targetIsSubTrigger)\n    return\n\n  let candidateValues = getItems().filter(i => i.ref.dataset.disabled !== '').map(i => i.ref.dataset.value)\n  const currentIndex = candidateValues.indexOf(menuContext.value)\n\n  candidateValues = rootContext.loop.value\n    ? wrapArray(candidateValues, currentIndex + 1)\n    : candidateValues.slice(currentIndex + 1)\n\n  const [nextValue] = candidateValues\n  if (nextValue)\n    rootContext.onMenuOpen(nextValue)\n}\n</script>\n\n<template>\n  <MenuSubContent\n    v-bind=\"forwarded\"\n    data-reka-menubar-content=\"\"\n    :style=\"{\n      '--reka-menubar-content-transform-origin':\n        'var(--reka-popper-transform-origin)',\n      '--reka-menubar-content-available-width':\n        'var(--reka-popper-available-width)',\n      '--reka-menubar-content-available-height':\n        'var(--reka-popper-available-height)',\n      '--reka-menubar-trigger-width': 'var(--reka-popper-anchor-width)',\n      '--reka-menubar-trigger-height': 'var(--reka-popper-anchor-height)',\n    }\"\n    @keydown.arrow-right=\"handleArrowNavigation\"\n  >\n    <slot />\n  </MenuSubContent>\n</template>\n","<script lang=\"ts\">\nimport type { MenuSubTriggerProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface MenubarSubTriggerProps extends MenuSubTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSubTrigger } from '@/Menu'\n\nconst props = defineProps<MenubarSubTriggerProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSubTrigger\n    v-bind=\"props\"\n    data-reka-menubar-subtrigger=\"\"\n  >\n    <slot />\n  </MenuSubTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { MenuSubTriggerProps } from '@/Menu'\nimport { useForwardExpose } from '@/shared'\n\nexport interface MenubarSubTriggerProps extends MenuSubTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { MenuSubTrigger } from '@/Menu'\n\nconst props = defineProps<MenubarSubTriggerProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <MenuSubTrigger\n    v-bind=\"props\"\n    data-reka-menubar-subtrigger=\"\"\n  >\n    <slot />\n  </MenuSubTrigger>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useCollection } from '@/Collection'\nimport { useForwardExpose } from '@/shared'\n\nexport interface MenubarTriggerProps extends PrimitiveProps {\n  /** When `true`, prevents the user from interacting with item */\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, ref } from 'vue'\nimport { MenuAnchor } from '@/Menu'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { RovingFocusItem } from '@/RovingFocus'\nimport { injectMenubarMenuContext } from './MenubarMenu.vue'\nimport { injectMenubarRootContext } from './MenubarRoot.vue'\n\nwithDefaults(defineProps<MenubarTriggerProps>(), {\n  as: 'button',\n})\nconst rootContext = injectMenubarRootContext()\nconst menuContext = injectMenubarMenuContext()\n\nconst { forwardRef, currentElement: triggerElement } = useForwardExpose()\nconst { CollectionItem } = useCollection({ key: 'Menubar' })\n\nconst isFocused = ref(false)\n\nconst open = computed(() => rootContext.modelValue.value === menuContext.value)\n\nonMounted(() => {\n  menuContext.triggerElement = triggerElement\n})\n</script>\n\n<template>\n  <RovingFocusItem\n    as-child\n    :focusable=\"!disabled\"\n    :tab-stop-id=\"menuContext.value\"\n  >\n    <CollectionItem>\n      <MenuAnchor as-child>\n        <Primitive\n          :id=\"menuContext.triggerId\"\n          :ref=\"forwardRef\"\n          :as=\"as\"\n          :as-child=\"asChild\"\n          :type=\"as === 'button' ? 'button' : undefined\"\n          role=\"menuitem\"\n          aria-haspopup=\"menu\"\n          :aria-expanded=\"open\"\n          :aria-controls=\"open ? menuContext.contentId : undefined\"\n          :data-highlighted=\"isFocused ? '' : undefined\"\n          :data-state=\"open ? 'open' : 'closed'\"\n          :data-disabled=\"disabled ? '' : undefined\"\n          :disabled=\"disabled\"\n          :data-value=\"menuContext.value\"\n          @pointerdown=\"(event: PointerEvent) => {\n            // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n            // but not when the control key is pressed (avoiding MacOS right click)\n            if (!disabled && event.button === 0 && event.ctrlKey === false) {\n              rootContext.onMenuOpen(menuContext.value);\n              // prevent trigger focusing when opening\n              // this allows the content to be given focus without competition\n              if (!open) event.preventDefault();\n            }\n          }\"\n          @pointerenter=\"() => {\n            const menubarOpen = Boolean(rootContext.modelValue.value);\n            if (menubarOpen && !open) {\n              rootContext.onMenuOpen(menuContext.value);\n              triggerElement?.focus()\n            }\n          }\"\n          @keydown.enter.space.arrow-down=\"(event: KeyboardEvent) => {\n            if (disabled) return;\n            if (['Enter', ' '].includes(event.key)) rootContext.onMenuToggle(menuContext.value);\n            if (event.key === 'ArrowDown') rootContext.onMenuOpen(menuContext.value);\n            // prevent keydown from scrolling window / first focused item to execute\n            // that keydown (inadvertently closing the menu)\n            if (['Enter', ' ', 'ArrowDown'].includes(event.key)) {\n              menuContext.wasKeyboardTriggerOpenRef.value = true;\n              event.preventDefault();\n            }\n          }\"\n          @focus=\"isFocused = true\"\n          @blur=\"isFocused = false\"\n        >\n          <slot />\n        </Primitive>\n      </MenuAnchor>\n    </CollectionItem>\n  </RovingFocusItem>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useCollection } from '@/Collection'\nimport { useForwardExpose } from '@/shared'\n\nexport interface MenubarTriggerProps extends PrimitiveProps {\n  /** When `true`, prevents the user from interacting with item */\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, ref } from 'vue'\nimport { MenuAnchor } from '@/Menu'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { RovingFocusItem } from '@/RovingFocus'\nimport { injectMenubarMenuContext } from './MenubarMenu.vue'\nimport { injectMenubarRootContext } from './MenubarRoot.vue'\n\nwithDefaults(defineProps<MenubarTriggerProps>(), {\n  as: 'button',\n})\nconst rootContext = injectMenubarRootContext()\nconst menuContext = injectMenubarMenuContext()\n\nconst { forwardRef, currentElement: triggerElement } = useForwardExpose()\nconst { CollectionItem } = useCollection({ key: 'Menubar' })\n\nconst isFocused = ref(false)\n\nconst open = computed(() => rootContext.modelValue.value === menuContext.value)\n\nonMounted(() => {\n  menuContext.triggerElement = triggerElement\n})\n</script>\n\n<template>\n  <RovingFocusItem\n    as-child\n    :focusable=\"!disabled\"\n    :tab-stop-id=\"menuContext.value\"\n  >\n    <CollectionItem>\n      <MenuAnchor as-child>\n        <Primitive\n          :id=\"menuContext.triggerId\"\n          :ref=\"forwardRef\"\n          :as=\"as\"\n          :as-child=\"asChild\"\n          :type=\"as === 'button' ? 'button' : undefined\"\n          role=\"menuitem\"\n          aria-haspopup=\"menu\"\n          :aria-expanded=\"open\"\n          :aria-controls=\"open ? menuContext.contentId : undefined\"\n          :data-highlighted=\"isFocused ? '' : undefined\"\n          :data-state=\"open ? 'open' : 'closed'\"\n          :data-disabled=\"disabled ? '' : undefined\"\n          :disabled=\"disabled\"\n          :data-value=\"menuContext.value\"\n          @pointerdown=\"(event: PointerEvent) => {\n            // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n            // but not when the control key is pressed (avoiding MacOS right click)\n            if (!disabled && event.button === 0 && event.ctrlKey === false) {\n              rootContext.onMenuOpen(menuContext.value);\n              // prevent trigger focusing when opening\n              // this allows the content to be given focus without competition\n              if (!open) event.preventDefault();\n            }\n          }\"\n          @pointerenter=\"() => {\n            const menubarOpen = Boolean(rootContext.modelValue.value);\n            if (menubarOpen && !open) {\n              rootContext.onMenuOpen(menuContext.value);\n              triggerElement?.focus()\n            }\n          }\"\n          @keydown.enter.space.arrow-down=\"(event: KeyboardEvent) => {\n            if (disabled) return;\n            if (['Enter', ' '].includes(event.key)) rootContext.onMenuToggle(menuContext.value);\n            if (event.key === 'ArrowDown') rootContext.onMenuOpen(menuContext.value);\n            // prevent keydown from scrolling window / first focused item to execute\n            // that keydown (inadvertently closing the menu)\n            if (['Enter', ' ', 'ArrowDown'].includes(event.key)) {\n              menuContext.wasKeyboardTriggerOpenRef.value = true;\n              event.preventDefault();\n            }\n          }\"\n          @focus=\"isFocused = true\"\n          @blur=\"isFocused = false\"\n        >\n          <slot />\n        </Primitive>\n      </MenuAnchor>\n    </CollectionItem>\n  </RovingFocusItem>\n</template>\n","import type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Grid, Matcher } from '@/date'\nimport type { DateFormatterOptions } from '@/shared/useDateFormatter'\nimport { endOfMonth } from '@internationalized/date'\nimport { computed, ref, watch } from 'vue'\nimport { createMonthGrid, isAfter, isBefore, isSameYearMonth, toDate } from '@/date'\nimport { useDateFormatter } from '@/shared'\n\nexport type UseMonthPickerProps = {\n  locale: Ref<string>\n  placeholder: Ref<DateValue>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n  disabled: Ref<boolean>\n  isMonthDisabled?: Matcher | Ref<Matcher | undefined>\n  isMonthUnavailable?: Matcher | Ref<Matcher | undefined>\n  calendarLabel: Ref<string | undefined>\n  nextPage: Ref<((placeholder: DateValue) => DateValue) | undefined>\n  prevPage: Ref<((placeholder: DateValue) => DateValue) | undefined>\n}\n\nexport type UseMonthPickerStateProps = {\n  isMonthDisabled: Matcher\n  isMonthUnavailable: Matcher\n  date: Ref<DateValue | DateValue[] | undefined>\n}\n\nexport function useMonthPickerState(props: UseMonthPickerStateProps) {\n  function isMonthSelected(dateObj: DateValue) {\n    if (Array.isArray(props.date.value))\n      return props.date.value.some(d => isSameYearMonth(d, dateObj))\n    else if (!props.date.value)\n      return false\n    else\n      return isSameYearMonth(props.date.value, dateObj)\n  }\n\n  const isInvalid = computed(() => {\n    if (Array.isArray(props.date.value)) {\n      if (!props.date.value.length)\n        return false\n      for (const dateObj of props.date.value) {\n        if (props.isMonthDisabled?.(dateObj))\n          return true\n        if (props.isMonthUnavailable?.(dateObj))\n          return true\n      }\n    }\n    else {\n      if (!props.date.value)\n        return false\n      if (props.isMonthDisabled?.(props.date.value))\n        return true\n      if (props.isMonthUnavailable?.(props.date.value))\n        return true\n    }\n    return false\n  })\n\n  return { isMonthSelected, isInvalid }\n}\n\nexport function useMonthPicker(props: UseMonthPickerProps) {\n  const formatter = useDateFormatter(props.locale.value)\n\n  const resolveMatcher = (matcher?: Matcher | Ref<Matcher | undefined>) =>\n    typeof matcher === 'function' ? matcher : matcher?.value\n\n  const headingFormatOptions = computed(() => {\n    const options: DateFormatterOptions = {\n      calendar: props.placeholder.value.calendar.identifier,\n    }\n\n    if (props.placeholder.value.calendar.identifier === 'gregory' && props.placeholder.value.era === 'BC')\n      options.era = 'short'\n\n    return options\n  })\n\n  const grid = ref<Grid<DateValue>>(createMonthGrid({ dateObj: props.placeholder.value })) as Ref<Grid<DateValue>>\n\n  function isMonthDisabled(dateObj: DateValue) {\n    if (resolveMatcher(props.isMonthDisabled)?.(dateObj) || props.disabled.value)\n      return true\n    if (props.maxValue.value && isAfter(dateObj.set({ day: 1 }), props.maxValue.value))\n      return true\n    if (props.minValue.value && isBefore(endOfMonth(dateObj), props.minValue.value))\n      return true\n    return false\n  }\n\n  const isMonthUnavailable = (date: DateValue) => {\n    if (resolveMatcher(props.isMonthUnavailable)?.(date))\n      return true\n    return false\n  }\n\n  const isNextButtonDisabled = (nextPageFunc?: (date: DateValue) => DateValue) => {\n    if (!props.maxValue.value)\n      return false\n    if (props.disabled.value)\n      return true\n\n    const currentDate = grid.value.value\n    if (nextPageFunc || props.nextPage.value) {\n      const nextDate = (nextPageFunc || props.nextPage.value)!(currentDate)\n      return isAfter(nextDate.set({ month: 1, day: 1 }), props.maxValue.value)\n    }\n\n    const nextYear = currentDate.add({ years: 1 }).set({ month: 1, day: 1 })\n    return isAfter(nextYear, props.maxValue.value)\n  }\n\n  const isPrevButtonDisabled = (prevPageFunc?: (date: DateValue) => DateValue) => {\n    if (!props.minValue.value)\n      return false\n    if (props.disabled.value)\n      return true\n\n    const currentDate = grid.value.value\n    if (prevPageFunc || props.prevPage.value) {\n      const prevDate = (prevPageFunc || props.prevPage.value)!(currentDate)\n      return isBefore(endOfMonth(prevDate.set({ month: 12 })), props.minValue.value)\n    }\n\n    const prevYear = currentDate.subtract({ years: 1 }).set({ month: 12, day: 31 })\n    return isBefore(prevYear, props.minValue.value)\n  }\n\n  const nextPage = (nextPageFunc?: (date: DateValue) => DateValue) => {\n    const currentDate = grid.value.value\n\n    if (nextPageFunc || props.nextPage.value) {\n      const newDate = (nextPageFunc || props.nextPage.value)!(currentDate)\n      grid.value = createMonthGrid({ dateObj: newDate })\n      props.placeholder.value = newDate.set({ month: props.placeholder.value.month, day: props.placeholder.value.day })\n      return\n    }\n\n    const newDate = currentDate.add({ years: 1 })\n    grid.value = createMonthGrid({ dateObj: newDate })\n    props.placeholder.value = newDate.set({ month: props.placeholder.value.month, day: props.placeholder.value.day })\n  }\n\n  const prevPage = (prevPageFunc?: (date: DateValue) => DateValue) => {\n    const currentDate = grid.value.value\n\n    if (prevPageFunc || props.prevPage.value) {\n      const newDate = (prevPageFunc || props.prevPage.value)!(currentDate)\n      grid.value = createMonthGrid({ dateObj: newDate })\n      props.placeholder.value = newDate.set({ month: props.placeholder.value.month, day: props.placeholder.value.day })\n      return\n    }\n\n    const newDate = currentDate.subtract({ years: 1 })\n    grid.value = createMonthGrid({ dateObj: newDate })\n    props.placeholder.value = newDate.set({ month: props.placeholder.value.month, day: props.placeholder.value.day })\n  }\n\n  watch(props.placeholder, (value) => {\n    if (value.year === grid.value.value.year)\n      return\n    grid.value = createMonthGrid({ dateObj: value })\n  })\n\n  watch(props.locale, () => {\n    formatter.setLocale(props.locale.value)\n    grid.value = createMonthGrid({ dateObj: props.placeholder.value })\n  })\n\n  const headingValue = computed(() => {\n    if (props.locale.value !== formatter.getLocale())\n      formatter.setLocale(props.locale.value)\n\n    return formatter.fullYear(toDate(grid.value.value), headingFormatOptions.value)\n  })\n\n  const fullCalendarLabel = computed(() => `${props.calendarLabel.value ?? 'Month Picker'}, ${headingValue.value}`)\n\n  return {\n    isMonthDisabled,\n    isMonthUnavailable,\n    isNextButtonDisabled,\n    isPrevButtonDisabled,\n    grid,\n    formatter,\n    nextPage,\n    prevPage,\n    headingValue,\n    fullCalendarLabel,\n  }\n}\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Grid, Matcher } from '@/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Formatter } from '@/shared'\nimport type { Direction } from '@/shared/types'\nimport { isSameYearMonth } from '@/date'\nimport { createContext, useDirection, useId, useLocale } from '@/shared'\nimport { getDefaultDate, handleCalendarInitialFocus } from '@/shared/date'\nimport { useMonthPicker, useMonthPickerState } from './useMonthPicker'\n\ntype MonthPickerRootContext = {\n  locale: Ref<string>\n  modelValue: Ref<DateValue | DateValue[] | undefined>\n  placeholder: Ref<DateValue>\n  multiple: Ref<boolean>\n  preventDeselect: Ref<boolean>\n  grid: Ref<Grid<DateValue>>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  initialFocus: Ref<boolean>\n  onMonthChange: (date: DateValue) => void\n  onPlaceholderChange: (date: DateValue) => void\n  fullCalendarLabel: Ref<string>\n  parentElement: Ref<HTMLElement | undefined>\n  headingValue: Ref<string>\n  headingId: string\n  isInvalid: Ref<boolean>\n  isMonthDisabled: Matcher\n  isMonthSelected: Matcher\n  isMonthUnavailable?: Matcher\n  prevPage: (prevPageFunc?: (date: DateValue) => DateValue) => void\n  nextPage: (nextPageFunc?: (date: DateValue) => DateValue) => void\n  isNextButtonDisabled: (nextPageFunc?: (date: DateValue) => DateValue) => boolean\n  isPrevButtonDisabled: (prevPageFunc?: (date: DateValue) => DateValue) => boolean\n  formatter: Formatter\n  dir: Ref<Direction>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n}\n\nexport interface MonthPickerRootProps extends PrimitiveProps {\n  /** The default value for the month picker */\n  defaultValue?: DateValue\n  /** The default placeholder date */\n  defaultPlaceholder?: DateValue\n  /** The placeholder date, which is used to determine what year to display when no date is selected */\n  placeholder?: DateValue\n  /** Whether or not to prevent the user from deselecting a date without selecting another date first */\n  preventDeselect?: boolean\n  /** The accessible label for the month picker */\n  calendarLabel?: string\n  /** The maximum date that can be selected */\n  maxValue?: DateValue\n  /** The minimum date that can be selected */\n  minValue?: DateValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** Whether the month picker is disabled */\n  disabled?: boolean\n  /** Whether the month picker is readonly */\n  readonly?: boolean\n  /** If true, the month picker will focus the selected month, today, or the first month of the year on mount */\n  initialFocus?: boolean\n  /** A function that returns whether or not a month is disabled */\n  isMonthDisabled?: Matcher\n  /** A function that returns whether or not a month is unavailable */\n  isMonthUnavailable?: Matcher\n  /** The reading direction of the calendar when applicable. If omitted, inherits globally from `ConfigProvider` or assumes LTR. */\n  dir?: Direction\n  /** A function that returns the next page of the month picker. Receives the current placeholder as an argument. */\n  nextPage?: (placeholder: DateValue) => DateValue\n  /** A function that returns the previous page of the month picker. Receives the current placeholder as an argument. */\n  prevPage?: (placeholder: DateValue) => DateValue\n  /** The controlled selected month value of the month picker. Can be bound as `v-model`. */\n  modelValue?: DateValue | DateValue[] | null\n  /** Whether multiple months can be selected */\n  multiple?: boolean\n}\n\nexport type MonthPickerRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateValue | DateValue[] | undefined]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n}\n\nexport const [injectMonthPickerRootContext, provideMonthPickerRootContext]\n  = createContext<MonthPickerRootContext>('MonthPickerRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { onMounted, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MonthPickerRootProps>(), {\n  defaultValue: undefined,\n  as: 'div',\n  preventDeselect: false,\n  multiple: false,\n  disabled: false,\n  readonly: false,\n  initialFocus: false,\n  placeholder: undefined,\n  isMonthDisabled: undefined,\n  isMonthUnavailable: undefined,\n})\nconst emits = defineEmits<MonthPickerRootEmits>()\ndefineSlots<{\n  default?: (props: {\n    /** The current date of the placeholder */\n    date: DateValue\n    /** The grid of months */\n    grid: Grid<DateValue>\n    /** The month picker locale */\n    locale: string\n    /** The current selected value */\n    modelValue: DateValue | DateValue[] | undefined\n  }) => any\n}>()\n\nconst {\n  disabled,\n  readonly,\n  initialFocus,\n  multiple,\n  minValue,\n  maxValue,\n  preventDeselect,\n  isMonthDisabled: propsIsMonthDisabled,\n  isMonthUnavailable: propsIsMonthUnavailable,\n  calendarLabel,\n  defaultValue,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n  dir: propDir,\n  locale: propLocale,\n} = toRefs(props)\n\nconst { primitiveElement, currentElement: parentElement } = usePrimitiveElement()\nconst locale = useLocale(propLocale)\nconst dir = useDirection(propDir)\nconst headingId = useId(undefined, 'reka-month-picker-heading')\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: defaultValue.value,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateValue | DateValue[] | undefined>\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  defaultValue: modelValue.value,\n  locale: props.locale,\n})\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nfunction onPlaceholderChange(value: DateValue) {\n  placeholder.value = value.copy()\n}\n\nconst {\n  fullCalendarLabel,\n  headingValue,\n  isMonthDisabled,\n  isMonthUnavailable,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  nextPage,\n  prevPage,\n  formatter,\n  grid,\n} = useMonthPicker({\n  locale,\n  placeholder,\n  minValue,\n  maxValue,\n  disabled,\n  isMonthDisabled: propsIsMonthDisabled,\n  isMonthUnavailable: propsIsMonthUnavailable,\n  calendarLabel,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n})\n\nconst { isInvalid, isMonthSelected } = useMonthPickerState({\n  date: modelValue,\n  isMonthDisabled,\n  isMonthUnavailable,\n})\n\nwatch(modelValue, (_modelValue) => {\n  if (Array.isArray(_modelValue) && _modelValue.length) {\n    const lastValue = _modelValue.at(-1)\n    if (lastValue && !isSameYearMonth(placeholder.value, lastValue))\n      onPlaceholderChange(lastValue)\n  }\n  else if (!Array.isArray(_modelValue) && _modelValue && !isSameYearMonth(placeholder.value, _modelValue)) {\n    onPlaceholderChange(_modelValue)\n  }\n})\n\nfunction resolveMonthValue(value: DateValue, reference?: DateValue) {\n  if (!reference)\n    return value.copy()\n  return value.copy().set({ day: reference.day })\n}\n\nfunction onMonthChange(value: DateValue) {\n  if (!multiple.value) {\n    if (!modelValue.value) {\n      modelValue.value = resolveMonthValue(value, placeholder.value)\n      return\n    }\n\n    if (!preventDeselect.value && isSameYearMonth(modelValue.value as DateValue, value)) {\n      placeholder.value = resolveMonthValue(value, modelValue.value as DateValue)\n      modelValue.value = undefined\n    }\n    else {\n      modelValue.value = resolveMonthValue(value, modelValue.value as DateValue)\n    }\n  }\n  else if (!modelValue.value) {\n    modelValue.value = [resolveMonthValue(value, placeholder.value)]\n  }\n  else {\n    const modelValueArray = Array.isArray(modelValue.value)\n      ? modelValue.value\n      : [modelValue.value]\n\n    const index = modelValueArray.findIndex(date => isSameYearMonth(date, value))\n    if (index === -1) {\n      modelValue.value = [...modelValueArray, resolveMonthValue(value, placeholder.value)]\n    }\n    else if (!preventDeselect.value) {\n      const next = modelValueArray.filter(date => !isSameYearMonth(date, value))\n      if (!next.length) {\n        placeholder.value = resolveMonthValue(value, modelValueArray[index])\n        modelValue.value = undefined\n        return\n      }\n      modelValue.value = next.map(date => date.copy())\n    }\n  }\n}\n\nonMounted(() => {\n  if (initialFocus.value)\n    handleCalendarInitialFocus(parentElement.value)\n})\n\nprovideMonthPickerRootContext({\n  isMonthUnavailable,\n  dir,\n  isMonthDisabled,\n  locale,\n  formatter,\n  modelValue,\n  placeholder,\n  disabled,\n  initialFocus,\n  grid,\n  multiple,\n  readonly,\n  preventDeselect,\n  fullCalendarLabel,\n  headingValue,\n  headingId,\n  isInvalid,\n  isMonthSelected,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  nextPage,\n  prevPage,\n  parentElement,\n  onPlaceholderChange,\n  onMonthChange,\n  minValue,\n  maxValue,\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-label=\"fullCalendarLabel\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n  >\n    <slot\n      :date=\"placeholder\"\n      :grid=\"grid\"\n      :locale=\"locale\"\n      :model-value=\"modelValue\"\n    />\n    <div\n      style=\"border: 0px; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; white-space: nowrap; width: 1px;\"\n    >\n      <div\n        role=\"heading\"\n        aria-level=\"2\"\n      >\n        {{ fullCalendarLabel }}\n      </div>\n    </div>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Grid, Matcher } from '@/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Formatter } from '@/shared'\nimport type { Direction } from '@/shared/types'\nimport { isSameYearMonth } from '@/date'\nimport { createContext, useDirection, useId, useLocale } from '@/shared'\nimport { getDefaultDate, handleCalendarInitialFocus } from '@/shared/date'\nimport { useMonthPicker, useMonthPickerState } from './useMonthPicker'\n\ntype MonthPickerRootContext = {\n  locale: Ref<string>\n  modelValue: Ref<DateValue | DateValue[] | undefined>\n  placeholder: Ref<DateValue>\n  multiple: Ref<boolean>\n  preventDeselect: Ref<boolean>\n  grid: Ref<Grid<DateValue>>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  initialFocus: Ref<boolean>\n  onMonthChange: (date: DateValue) => void\n  onPlaceholderChange: (date: DateValue) => void\n  fullCalendarLabel: Ref<string>\n  parentElement: Ref<HTMLElement | undefined>\n  headingValue: Ref<string>\n  headingId: string\n  isInvalid: Ref<boolean>\n  isMonthDisabled: Matcher\n  isMonthSelected: Matcher\n  isMonthUnavailable?: Matcher\n  prevPage: (prevPageFunc?: (date: DateValue) => DateValue) => void\n  nextPage: (nextPageFunc?: (date: DateValue) => DateValue) => void\n  isNextButtonDisabled: (nextPageFunc?: (date: DateValue) => DateValue) => boolean\n  isPrevButtonDisabled: (prevPageFunc?: (date: DateValue) => DateValue) => boolean\n  formatter: Formatter\n  dir: Ref<Direction>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n}\n\nexport interface MonthPickerRootProps extends PrimitiveProps {\n  /** The default value for the month picker */\n  defaultValue?: DateValue\n  /** The default placeholder date */\n  defaultPlaceholder?: DateValue\n  /** The placeholder date, which is used to determine what year to display when no date is selected */\n  placeholder?: DateValue\n  /** Whether or not to prevent the user from deselecting a date without selecting another date first */\n  preventDeselect?: boolean\n  /** The accessible label for the month picker */\n  calendarLabel?: string\n  /** The maximum date that can be selected */\n  maxValue?: DateValue\n  /** The minimum date that can be selected */\n  minValue?: DateValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** Whether the month picker is disabled */\n  disabled?: boolean\n  /** Whether the month picker is readonly */\n  readonly?: boolean\n  /** If true, the month picker will focus the selected month, today, or the first month of the year on mount */\n  initialFocus?: boolean\n  /** A function that returns whether or not a month is disabled */\n  isMonthDisabled?: Matcher\n  /** A function that returns whether or not a month is unavailable */\n  isMonthUnavailable?: Matcher\n  /** The reading direction of the calendar when applicable. If omitted, inherits globally from `ConfigProvider` or assumes LTR. */\n  dir?: Direction\n  /** A function that returns the next page of the month picker. Receives the current placeholder as an argument. */\n  nextPage?: (placeholder: DateValue) => DateValue\n  /** A function that returns the previous page of the month picker. Receives the current placeholder as an argument. */\n  prevPage?: (placeholder: DateValue) => DateValue\n  /** The controlled selected month value of the month picker. Can be bound as `v-model`. */\n  modelValue?: DateValue | DateValue[] | null\n  /** Whether multiple months can be selected */\n  multiple?: boolean\n}\n\nexport type MonthPickerRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateValue | DateValue[] | undefined]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n}\n\nexport const [injectMonthPickerRootContext, provideMonthPickerRootContext]\n  = createContext<MonthPickerRootContext>('MonthPickerRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { onMounted, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MonthPickerRootProps>(), {\n  defaultValue: undefined,\n  as: 'div',\n  preventDeselect: false,\n  multiple: false,\n  disabled: false,\n  readonly: false,\n  initialFocus: false,\n  placeholder: undefined,\n  isMonthDisabled: undefined,\n  isMonthUnavailable: undefined,\n})\nconst emits = defineEmits<MonthPickerRootEmits>()\ndefineSlots<{\n  default?: (props: {\n    /** The current date of the placeholder */\n    date: DateValue\n    /** The grid of months */\n    grid: Grid<DateValue>\n    /** The month picker locale */\n    locale: string\n    /** The current selected value */\n    modelValue: DateValue | DateValue[] | undefined\n  }) => any\n}>()\n\nconst {\n  disabled,\n  readonly,\n  initialFocus,\n  multiple,\n  minValue,\n  maxValue,\n  preventDeselect,\n  isMonthDisabled: propsIsMonthDisabled,\n  isMonthUnavailable: propsIsMonthUnavailable,\n  calendarLabel,\n  defaultValue,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n  dir: propDir,\n  locale: propLocale,\n} = toRefs(props)\n\nconst { primitiveElement, currentElement: parentElement } = usePrimitiveElement()\nconst locale = useLocale(propLocale)\nconst dir = useDirection(propDir)\nconst headingId = useId(undefined, 'reka-month-picker-heading')\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: defaultValue.value,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateValue | DateValue[] | undefined>\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  defaultValue: modelValue.value,\n  locale: props.locale,\n})\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nfunction onPlaceholderChange(value: DateValue) {\n  placeholder.value = value.copy()\n}\n\nconst {\n  fullCalendarLabel,\n  headingValue,\n  isMonthDisabled,\n  isMonthUnavailable,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  nextPage,\n  prevPage,\n  formatter,\n  grid,\n} = useMonthPicker({\n  locale,\n  placeholder,\n  minValue,\n  maxValue,\n  disabled,\n  isMonthDisabled: propsIsMonthDisabled,\n  isMonthUnavailable: propsIsMonthUnavailable,\n  calendarLabel,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n})\n\nconst { isInvalid, isMonthSelected } = useMonthPickerState({\n  date: modelValue,\n  isMonthDisabled,\n  isMonthUnavailable,\n})\n\nwatch(modelValue, (_modelValue) => {\n  if (Array.isArray(_modelValue) && _modelValue.length) {\n    const lastValue = _modelValue.at(-1)\n    if (lastValue && !isSameYearMonth(placeholder.value, lastValue))\n      onPlaceholderChange(lastValue)\n  }\n  else if (!Array.isArray(_modelValue) && _modelValue && !isSameYearMonth(placeholder.value, _modelValue)) {\n    onPlaceholderChange(_modelValue)\n  }\n})\n\nfunction resolveMonthValue(value: DateValue, reference?: DateValue) {\n  if (!reference)\n    return value.copy()\n  return value.copy().set({ day: reference.day })\n}\n\nfunction onMonthChange(value: DateValue) {\n  if (!multiple.value) {\n    if (!modelValue.value) {\n      modelValue.value = resolveMonthValue(value, placeholder.value)\n      return\n    }\n\n    if (!preventDeselect.value && isSameYearMonth(modelValue.value as DateValue, value)) {\n      placeholder.value = resolveMonthValue(value, modelValue.value as DateValue)\n      modelValue.value = undefined\n    }\n    else {\n      modelValue.value = resolveMonthValue(value, modelValue.value as DateValue)\n    }\n  }\n  else if (!modelValue.value) {\n    modelValue.value = [resolveMonthValue(value, placeholder.value)]\n  }\n  else {\n    const modelValueArray = Array.isArray(modelValue.value)\n      ? modelValue.value\n      : [modelValue.value]\n\n    const index = modelValueArray.findIndex(date => isSameYearMonth(date, value))\n    if (index === -1) {\n      modelValue.value = [...modelValueArray, resolveMonthValue(value, placeholder.value)]\n    }\n    else if (!preventDeselect.value) {\n      const next = modelValueArray.filter(date => !isSameYearMonth(date, value))\n      if (!next.length) {\n        placeholder.value = resolveMonthValue(value, modelValueArray[index])\n        modelValue.value = undefined\n        return\n      }\n      modelValue.value = next.map(date => date.copy())\n    }\n  }\n}\n\nonMounted(() => {\n  if (initialFocus.value)\n    handleCalendarInitialFocus(parentElement.value)\n})\n\nprovideMonthPickerRootContext({\n  isMonthUnavailable,\n  dir,\n  isMonthDisabled,\n  locale,\n  formatter,\n  modelValue,\n  placeholder,\n  disabled,\n  initialFocus,\n  grid,\n  multiple,\n  readonly,\n  preventDeselect,\n  fullCalendarLabel,\n  headingValue,\n  headingId,\n  isInvalid,\n  isMonthSelected,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  nextPage,\n  prevPage,\n  parentElement,\n  onPlaceholderChange,\n  onMonthChange,\n  minValue,\n  maxValue,\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-label=\"fullCalendarLabel\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n  >\n    <slot\n      :date=\"placeholder\"\n      :grid=\"grid\"\n      :locale=\"locale\"\n      :model-value=\"modelValue\"\n    />\n    <div\n      style=\"border: 0px; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; white-space: nowrap; width: 1px;\"\n    >\n      <div\n        role=\"heading\"\n        aria-level=\"2\"\n      >\n        {{ fullCalendarLabel }}\n      </div>\n    </div>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthPickerCellProps extends PrimitiveProps {\n  /** The date value for the cell */\n  date: DateValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectMonthPickerRootContext } from './MonthPickerRoot.vue'\n\nwithDefaults(defineProps<MonthPickerCellProps>(), { as: 'td' })\nconst rootContext = injectMonthPickerRootContext()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"gridcell\"\n    :aria-selected=\"rootContext.isMonthSelected(date) ? true : undefined\"\n    :aria-disabled=\"rootContext.isMonthDisabled(date) || rootContext.isMonthUnavailable?.(date)\"\n    :data-disabled=\"rootContext.isMonthDisabled(date) ? '' : undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthPickerCellProps extends PrimitiveProps {\n  /** The date value for the cell */\n  date: DateValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectMonthPickerRootContext } from './MonthPickerRoot.vue'\n\nwithDefaults(defineProps<MonthPickerCellProps>(), { as: 'td' })\nconst rootContext = injectMonthPickerRootContext()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"gridcell\"\n    :aria-selected=\"rootContext.isMonthSelected(date) ? true : undefined\"\n    :aria-disabled=\"rootContext.isMonthDisabled(date) || rootContext.isMonthUnavailable?.(date)\"\n    :data-disabled=\"rootContext.isMonthDisabled(date) ? '' : undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { endOfMonth, getLocalTimeZone, toCalendar, today } from '@internationalized/date'\nimport { computed, nextTick } from 'vue'\nimport { isSameYearMonth, toDate } from '@/date'\nimport { useKbd } from '@/shared'\n\nexport interface MonthPickerCellTriggerProps extends PrimitiveProps {\n  /** The date value provided to the cell trigger */\n  month: DateValue\n}\n\nexport interface MonthPickerCellTriggerSlot {\n  default?: (props: {\n    /** Current month value (short name) */\n    monthValue: string\n    /** Current disable state */\n    disabled: boolean\n    /** Current selected state */\n    selected: boolean\n    /** Current month/year is today state */\n    today: boolean\n    /** Current unavailable state */\n    unavailable: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { injectMonthPickerRootContext } from './MonthPickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthPickerCellTriggerProps>(), { as: 'div' })\n\ndefineSlots<MonthPickerCellTriggerSlot>()\n\nconst kbd = useKbd()\nconst rootContext = injectMonthPickerRootContext()\n\nconst { primitiveElement } = usePrimitiveElement()\n\nconst shortMonthValue = computed(() => {\n  rootContext.locale.value\n  return rootContext.formatter.custom(toDate(props.month), { month: 'short' })\n})\n\nconst labelText = computed(() => {\n  rootContext.locale.value\n  return rootContext.formatter.custom(toDate(props.month), {\n    month: 'long',\n    year: 'numeric',\n  })\n})\n\nconst isUnavailable = computed(() => rootContext.isMonthUnavailable?.(props.month) ?? false)\n\nconst isCurrentMonth = computed(() => {\n  const todayDate = toCalendar(today(getLocalTimeZone()), props.month.calendar)\n  return isSameYearMonth(props.month, todayDate)\n})\n\nconst isDisabled = computed(() => rootContext.isMonthDisabled(props.month))\n\nconst isFocusedMonth = computed(() => {\n  return !rootContext.disabled.value && isSameYearMonth(props.month, rootContext.placeholder.value)\n})\n\nconst isSelectedMonth = computed(() => rootContext.isMonthSelected(props.month))\n\nfunction changeMonth(date: DateValue) {\n  if (rootContext.readonly.value)\n    return\n  if (rootContext.isMonthDisabled(date) || rootContext.isMonthUnavailable?.(date))\n    return\n\n  rootContext.onMonthChange(date)\n}\n\nfunction handleClick() {\n  if (isDisabled.value)\n    return\n  changeMonth(props.month)\n}\n\nfunction handleArrowKey(e: KeyboardEvent) {\n  if (isDisabled.value)\n    return\n  e.preventDefault()\n  e.stopPropagation()\n  const parentElement = rootContext.parentElement.value!\n  const sign = rootContext.dir.value === 'rtl' ? -1 : 1\n\n  switch (e.code) {\n    case kbd.ARROW_RIGHT:\n      shiftFocus(props.month, sign)\n      break\n    case kbd.ARROW_LEFT:\n      shiftFocus(props.month, -sign)\n      break\n    case kbd.ARROW_UP:\n      shiftFocus(props.month, -4)\n      break\n    case kbd.ARROW_DOWN:\n      shiftFocus(props.month, 4)\n      break\n    case kbd.PAGE_UP:\n      shiftFocusYear(-1)\n      break\n    case kbd.PAGE_DOWN:\n      shiftFocusYear(1)\n      break\n    case kbd.ENTER:\n    case kbd.SPACE_CODE:\n      changeMonth(props.month)\n  }\n\n  function shiftFocus(currentMonth: DateValue, add: number, depth = 0) {\n    if (depth > 48)\n      return\n    const candidateMonthValue = currentMonth.add({ months: add })\n\n    if ((rootContext.minValue.value && endOfMonth(candidateMonthValue).compare(rootContext.minValue.value) < 0)\n      || (rootContext.maxValue.value && candidateMonthValue.set({ day: 1 }).compare(rootContext.maxValue.value) > 0)) {\n      return\n    }\n\n    const candidateMonth = parentElement.querySelector<HTMLElement>(`[data-value='${candidateMonthValue.toString()}']`)\n\n    if (!candidateMonth) {\n      if (add > 0) {\n        if (rootContext.isNextButtonDisabled())\n          return\n        rootContext.nextPage()\n      }\n      else {\n        if (rootContext.isPrevButtonDisabled())\n          return\n        rootContext.prevPage()\n      }\n      nextTick(() => {\n        shiftFocus(currentMonth, add, depth + 1)\n      })\n      return\n    }\n\n    if (candidateMonth && candidateMonth.hasAttribute('data-disabled'))\n      return shiftFocus(candidateMonthValue, add, depth + 1)\n\n    rootContext.onPlaceholderChange(candidateMonthValue)\n    candidateMonth?.focus()\n  }\n\n  function shiftFocusYear(years: number) {\n    const candidateMonthValue = props.month.add({ years })\n\n    if ((rootContext.minValue.value && endOfMonth(candidateMonthValue).compare(rootContext.minValue.value) < 0)\n      || (rootContext.maxValue.value && candidateMonthValue.set({ day: 1 }).compare(rootContext.maxValue.value) > 0)) {\n      return\n    }\n\n    if (years > 0) {\n      if (rootContext.isNextButtonDisabled())\n        return\n      rootContext.nextPage()\n    }\n    else {\n      if (rootContext.isPrevButtonDisabled())\n        return\n      rootContext.prevPage()\n    }\n\n    nextTick(() => {\n      const candidateMonth = parentElement.querySelector<HTMLElement>(`[data-value='${candidateMonthValue.toString()}']`)\n      if (candidateMonth && !candidateMonth.hasAttribute('data-disabled')) {\n        rootContext.onPlaceholderChange(candidateMonthValue)\n        candidateMonth?.focus()\n      }\n    })\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    role=\"button\"\n    :aria-label=\"labelText\"\n    data-reka-month-picker-cell-trigger\n    :aria-disabled=\"isDisabled || isUnavailable ? true : undefined\"\n    :data-selected=\"isSelectedMonth ? true : undefined\"\n    :data-value=\"month.toString()\"\n    :data-disabled=\"isDisabled ? '' : undefined\"\n    :data-unavailable=\"isUnavailable ? '' : undefined\"\n    :data-today=\"isCurrentMonth ? '' : undefined\"\n    :data-focused=\"isFocusedMonth ? '' : undefined\"\n    :tabindex=\"isFocusedMonth ? 0 : isDisabled ? undefined : -1\"\n    @click=\"handleClick\"\n    @keydown.up.down.left.right.space.enter.page-up.page-down=\"handleArrowKey\"\n    @keydown.enter.prevent\n  >\n    <slot\n      :month-value=\"shortMonthValue\"\n      :disabled=\"isDisabled\"\n      :today=\"isCurrentMonth\"\n      :selected=\"isSelectedMonth\"\n      :unavailable=\"isUnavailable\"\n    >\n      {{ shortMonthValue }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { endOfMonth, getLocalTimeZone, toCalendar, today } from '@internationalized/date'\nimport { computed, nextTick } from 'vue'\nimport { isSameYearMonth, toDate } from '@/date'\nimport { useKbd } from '@/shared'\n\nexport interface MonthPickerCellTriggerProps extends PrimitiveProps {\n  /** The date value provided to the cell trigger */\n  month: DateValue\n}\n\nexport interface MonthPickerCellTriggerSlot {\n  default?: (props: {\n    /** Current month value (short name) */\n    monthValue: string\n    /** Current disable state */\n    disabled: boolean\n    /** Current selected state */\n    selected: boolean\n    /** Current month/year is today state */\n    today: boolean\n    /** Current unavailable state */\n    unavailable: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { injectMonthPickerRootContext } from './MonthPickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthPickerCellTriggerProps>(), { as: 'div' })\n\ndefineSlots<MonthPickerCellTriggerSlot>()\n\nconst kbd = useKbd()\nconst rootContext = injectMonthPickerRootContext()\n\nconst { primitiveElement } = usePrimitiveElement()\n\nconst shortMonthValue = computed(() => {\n  rootContext.locale.value\n  return rootContext.formatter.custom(toDate(props.month), { month: 'short' })\n})\n\nconst labelText = computed(() => {\n  rootContext.locale.value\n  return rootContext.formatter.custom(toDate(props.month), {\n    month: 'long',\n    year: 'numeric',\n  })\n})\n\nconst isUnavailable = computed(() => rootContext.isMonthUnavailable?.(props.month) ?? false)\n\nconst isCurrentMonth = computed(() => {\n  const todayDate = toCalendar(today(getLocalTimeZone()), props.month.calendar)\n  return isSameYearMonth(props.month, todayDate)\n})\n\nconst isDisabled = computed(() => rootContext.isMonthDisabled(props.month))\n\nconst isFocusedMonth = computed(() => {\n  return !rootContext.disabled.value && isSameYearMonth(props.month, rootContext.placeholder.value)\n})\n\nconst isSelectedMonth = computed(() => rootContext.isMonthSelected(props.month))\n\nfunction changeMonth(date: DateValue) {\n  if (rootContext.readonly.value)\n    return\n  if (rootContext.isMonthDisabled(date) || rootContext.isMonthUnavailable?.(date))\n    return\n\n  rootContext.onMonthChange(date)\n}\n\nfunction handleClick() {\n  if (isDisabled.value)\n    return\n  changeMonth(props.month)\n}\n\nfunction handleArrowKey(e: KeyboardEvent) {\n  if (isDisabled.value)\n    return\n  e.preventDefault()\n  e.stopPropagation()\n  const parentElement = rootContext.parentElement.value!\n  const sign = rootContext.dir.value === 'rtl' ? -1 : 1\n\n  switch (e.code) {\n    case kbd.ARROW_RIGHT:\n      shiftFocus(props.month, sign)\n      break\n    case kbd.ARROW_LEFT:\n      shiftFocus(props.month, -sign)\n      break\n    case kbd.ARROW_UP:\n      shiftFocus(props.month, -4)\n      break\n    case kbd.ARROW_DOWN:\n      shiftFocus(props.month, 4)\n      break\n    case kbd.PAGE_UP:\n      shiftFocusYear(-1)\n      break\n    case kbd.PAGE_DOWN:\n      shiftFocusYear(1)\n      break\n    case kbd.ENTER:\n    case kbd.SPACE_CODE:\n      changeMonth(props.month)\n  }\n\n  function shiftFocus(currentMonth: DateValue, add: number, depth = 0) {\n    if (depth > 48)\n      return\n    const candidateMonthValue = currentMonth.add({ months: add })\n\n    if ((rootContext.minValue.value && endOfMonth(candidateMonthValue).compare(rootContext.minValue.value) < 0)\n      || (rootContext.maxValue.value && candidateMonthValue.set({ day: 1 }).compare(rootContext.maxValue.value) > 0)) {\n      return\n    }\n\n    const candidateMonth = parentElement.querySelector<HTMLElement>(`[data-value='${candidateMonthValue.toString()}']`)\n\n    if (!candidateMonth) {\n      if (add > 0) {\n        if (rootContext.isNextButtonDisabled())\n          return\n        rootContext.nextPage()\n      }\n      else {\n        if (rootContext.isPrevButtonDisabled())\n          return\n        rootContext.prevPage()\n      }\n      nextTick(() => {\n        shiftFocus(currentMonth, add, depth + 1)\n      })\n      return\n    }\n\n    if (candidateMonth && candidateMonth.hasAttribute('data-disabled'))\n      return shiftFocus(candidateMonthValue, add, depth + 1)\n\n    rootContext.onPlaceholderChange(candidateMonthValue)\n    candidateMonth?.focus()\n  }\n\n  function shiftFocusYear(years: number) {\n    const candidateMonthValue = props.month.add({ years })\n\n    if ((rootContext.minValue.value && endOfMonth(candidateMonthValue).compare(rootContext.minValue.value) < 0)\n      || (rootContext.maxValue.value && candidateMonthValue.set({ day: 1 }).compare(rootContext.maxValue.value) > 0)) {\n      return\n    }\n\n    if (years > 0) {\n      if (rootContext.isNextButtonDisabled())\n        return\n      rootContext.nextPage()\n    }\n    else {\n      if (rootContext.isPrevButtonDisabled())\n        return\n      rootContext.prevPage()\n    }\n\n    nextTick(() => {\n      const candidateMonth = parentElement.querySelector<HTMLElement>(`[data-value='${candidateMonthValue.toString()}']`)\n      if (candidateMonth && !candidateMonth.hasAttribute('data-disabled')) {\n        rootContext.onPlaceholderChange(candidateMonthValue)\n        candidateMonth?.focus()\n      }\n    })\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    role=\"button\"\n    :aria-label=\"labelText\"\n    data-reka-month-picker-cell-trigger\n    :aria-disabled=\"isDisabled || isUnavailable ? true : undefined\"\n    :data-selected=\"isSelectedMonth ? true : undefined\"\n    :data-value=\"month.toString()\"\n    :data-disabled=\"isDisabled ? '' : undefined\"\n    :data-unavailable=\"isUnavailable ? '' : undefined\"\n    :data-today=\"isCurrentMonth ? '' : undefined\"\n    :data-focused=\"isFocusedMonth ? '' : undefined\"\n    :tabindex=\"isFocusedMonth ? 0 : isDisabled ? undefined : -1\"\n    @click=\"handleClick\"\n    @keydown.up.down.left.right.space.enter.page-up.page-down=\"handleArrowKey\"\n    @keydown.enter.prevent\n  >\n    <slot\n      :month-value=\"shortMonthValue\"\n      :disabled=\"isDisabled\"\n      :today=\"isCurrentMonth\"\n      :selected=\"isSelectedMonth\"\n      :unavailable=\"isUnavailable\"\n    >\n      {{ shortMonthValue }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthPickerGridProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectMonthPickerRootContext } from './MonthPickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthPickerGridProps>(), { as: 'table' })\n\nconst rootContext = injectMonthPickerRootContext()\nconst disabled = computed(() => rootContext.disabled.value ? true : undefined)\nconst readonly = computed(() => rootContext.readonly.value ? true : undefined)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    tabindex=\"-1\"\n    role=\"application\"\n    :aria-labelledby=\"rootContext.headingId\"\n    :aria-readonly=\"readonly\"\n    :aria-disabled=\"disabled\"\n    :data-readonly=\"readonly && ''\"\n    :data-disabled=\"disabled && ''\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthPickerGridProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectMonthPickerRootContext } from './MonthPickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthPickerGridProps>(), { as: 'table' })\n\nconst rootContext = injectMonthPickerRootContext()\nconst disabled = computed(() => rootContext.disabled.value ? true : undefined)\nconst readonly = computed(() => rootContext.readonly.value ? true : undefined)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    tabindex=\"-1\"\n    role=\"application\"\n    :aria-labelledby=\"rootContext.headingId\"\n    :aria-readonly=\"readonly\"\n    :aria-disabled=\"disabled\"\n    :data-readonly=\"readonly && ''\"\n    :data-disabled=\"disabled && ''\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthPickerGridBodyProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MonthPickerGridBodyProps>(), { as: 'tbody' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthPickerGridBodyProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MonthPickerGridBodyProps>(), { as: 'tbody' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthPickerGridRowProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MonthPickerGridRowProps>(), { as: 'tr' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    role=\"row\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthPickerGridRowProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MonthPickerGridRowProps>(), { as: 'tr' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    role=\"row\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthPickerHeaderProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MonthPickerHeaderProps>(), { as: 'div' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthPickerHeaderProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MonthPickerHeaderProps>(), { as: 'div' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthPickerHeadingProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectMonthPickerRootContext } from './MonthPickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthPickerHeadingProps>(), { as: 'div' })\n\ndefineSlots<{\n  default?: (props: {\n    /** Current year heading */\n    headingValue: string\n  }) => any\n}>()\n\nconst rootContext = injectMonthPickerRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"rootContext.headingId\"\n    role=\"heading\"\n    aria-level=\"2\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n  >\n    <slot :heading-value=\"rootContext.headingValue.value\">\n      {{ rootContext.headingValue.value }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthPickerHeadingProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectMonthPickerRootContext } from './MonthPickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthPickerHeadingProps>(), { as: 'div' })\n\ndefineSlots<{\n  default?: (props: {\n    /** Current year heading */\n    headingValue: string\n  }) => any\n}>()\n\nconst rootContext = injectMonthPickerRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"rootContext.headingId\"\n    role=\"heading\"\n    aria-level=\"2\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n  >\n    <slot :heading-value=\"rootContext.headingValue.value\">\n      {{ rootContext.headingValue.value }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthPickerNextProps extends PrimitiveProps {\n  /** The function to be used for the next page. Overwrites the `nextPage` function set on the `MonthPickerRoot`. */\n  nextPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface MonthPickerNextSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectMonthPickerRootContext } from './MonthPickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthPickerNextProps>(), { as: 'button' })\ndefineSlots<MonthPickerNextSlot>()\n\nconst rootContext = injectMonthPickerRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isNextButtonDisabled(props.nextPage))\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.nextPage(props.nextPage)\n}\n</script>\n\n<template>\n  <Primitive\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    aria-label=\"Next year\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Next year\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthPickerNextProps extends PrimitiveProps {\n  /** The function to be used for the next page. Overwrites the `nextPage` function set on the `MonthPickerRoot`. */\n  nextPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface MonthPickerNextSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectMonthPickerRootContext } from './MonthPickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthPickerNextProps>(), { as: 'button' })\ndefineSlots<MonthPickerNextSlot>()\n\nconst rootContext = injectMonthPickerRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isNextButtonDisabled(props.nextPage))\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.nextPage(props.nextPage)\n}\n</script>\n\n<template>\n  <Primitive\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    aria-label=\"Next year\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Next year\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthPickerPrevProps extends PrimitiveProps {\n  /** The function to be used for the prev page. Overwrites the `prevPage` function set on the `MonthPickerRoot`. */\n  prevPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface MonthPickerPrevSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectMonthPickerRootContext } from './MonthPickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthPickerPrevProps>(), { as: 'button' })\ndefineSlots<MonthPickerPrevSlot>()\n\nconst rootContext = injectMonthPickerRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isPrevButtonDisabled(props.prevPage))\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.prevPage(props.prevPage)\n}\n</script>\n\n<template>\n  <Primitive\n    aria-label=\"Previous year\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Prev year\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthPickerPrevProps extends PrimitiveProps {\n  /** The function to be used for the prev page. Overwrites the `prevPage` function set on the `MonthPickerRoot`. */\n  prevPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface MonthPickerPrevSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectMonthPickerRootContext } from './MonthPickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthPickerPrevProps>(), { as: 'button' })\ndefineSlots<MonthPickerPrevSlot>()\n\nconst rootContext = injectMonthPickerRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isPrevButtonDisabled(props.prevPage))\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.prevPage(props.prevPage)\n}\n</script>\n\n<template>\n  <Primitive\n    aria-label=\"Previous year\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Prev year\n    </slot>\n  </Primitive>\n</template>\n","import type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Matcher } from '@/date'\nimport { computed } from 'vue'\nimport { areAllMonthsBetweenValid, compareYearMonth, getMonthsBetween, isSameYearMonth } from '@/date'\n\nexport type UseRangeMonthPickerProps = {\n  start: Ref<DateValue | undefined>\n  end: Ref<DateValue | undefined>\n  isMonthDisabled: Matcher\n  isMonthUnavailable: Matcher\n  focusedValue: Ref<DateValue | undefined>\n  allowNonContiguousRanges: Ref<boolean>\n  fixedDate: Ref<'start' | 'end' | undefined>\n  maximumMonths?: Ref<number | undefined>\n}\n\nexport function useRangeMonthPickerState(props: UseRangeMonthPickerProps) {\n  const isStartInvalid = computed(() => {\n    if (!props.start.value)\n      return false\n    if (props.isMonthDisabled(props.start.value))\n      return true\n    return false\n  })\n\n  const isEndInvalid = computed(() => {\n    if (!props.end.value)\n      return false\n    if (props.isMonthDisabled(props.end.value))\n      return true\n    return false\n  })\n\n  const isInvalid = computed(() => {\n    if (isStartInvalid.value || isEndInvalid.value)\n      return true\n    if (props.start.value && props.end.value && compareYearMonth(props.end.value, props.start.value) < 0)\n      return true\n    return false\n  })\n\n  const isSelectionStart = (date: DateValue) => {\n    if (!props.start.value)\n      return false\n    return isSameYearMonth(props.start.value, date)\n  }\n\n  const isSelectionEnd = (date: DateValue) => {\n    if (!props.end.value)\n      return false\n    return isSameYearMonth(props.end.value, date)\n  }\n\n  const isSelected = (date: DateValue) => {\n    if (props.start.value && isSameYearMonth(props.start.value, date))\n      return true\n    if (props.end.value && isSameYearMonth(props.end.value, date))\n      return true\n    if (props.end.value && props.start.value) {\n      return compareYearMonth(date, props.start.value) > 0 && compareYearMonth(date, props.end.value) < 0\n    }\n    return false\n  }\n\n  const rangeIsMonthDisabled = (date: DateValue) => {\n    if (props.isMonthDisabled(date))\n      return true\n\n    if (props.maximumMonths?.value) {\n      const maximumMonths = props.maximumMonths.value\n\n      if (props.start.value && props.end.value) {\n        if (props.fixedDate.value) {\n          const diff = getMonthsBetween(props.start.value, props.end.value)\n          if (diff <= maximumMonths) {\n            const monthsLeft = maximumMonths - diff\n            const startLimit = props.start.value.subtract({ months: monthsLeft })\n            const endLimit = props.end.value.add({ months: monthsLeft })\n            return compareYearMonth(date, startLimit) < 0 || compareYearMonth(date, endLimit) > 0\n          }\n\n          const fixedValue = props.fixedDate.value === 'start' ? props.start.value : props.end.value\n          const maxDate = fixedValue.add({ months: maximumMonths - 1 })\n          const minDate = fixedValue.subtract({ months: maximumMonths - 1 })\n          return compareYearMonth(date, minDate) < 0 || compareYearMonth(date, maxDate) > 0\n        }\n        return false\n      }\n      if (props.start.value) {\n        const maxDate = props.start.value.add({ months: maximumMonths - 1 })\n        const minDate = props.start.value.subtract({ months: maximumMonths - 1 })\n        return compareYearMonth(date, minDate) < 0 || compareYearMonth(date, maxDate) > 0\n      }\n    }\n\n    return false\n  }\n\n  const highlightedRange = computed(() => {\n    if (props.start.value && props.end.value && !props.fixedDate.value)\n      return null\n    if (!props.start.value || !props.focusedValue.value)\n      return null\n\n    const isStartBeforeFocused = compareYearMonth(props.start.value, props.focusedValue.value) < 0\n    const start = isStartBeforeFocused ? props.start.value : props.focusedValue.value\n    const end = isStartBeforeFocused ? props.focusedValue.value : props.start.value\n\n    if (isSameYearMonth(start, end)) {\n      return { start, end }\n    }\n\n    if (props.maximumMonths?.value && !props.end.value) {\n      const maximumMonths = props.maximumMonths.value\n      const anchor = props.start.value\n      const focused = props.focusedValue.value\n\n      if (compareYearMonth(focused, anchor) >= 0) {\n        const maxEnd = anchor.add({ months: maximumMonths - 1 })\n        const cappedEnd = compareYearMonth(focused, maxEnd) > 0 ? maxEnd : focused\n        return { start: anchor, end: cappedEnd }\n      }\n      else {\n        const minStart = anchor.subtract({ months: maximumMonths - 1 })\n        const cappedStart = compareYearMonth(focused, minStart) < 0 ? minStart : focused\n        return { start: cappedStart, end: anchor }\n      }\n    }\n\n    const isValid = areAllMonthsBetweenValid(\n      start,\n      end,\n      props.allowNonContiguousRanges.value ? () => false : props.isMonthUnavailable,\n      rangeIsMonthDisabled,\n    )\n    if (isValid)\n      return { start, end }\n\n    return null\n  })\n\n  const isHighlightedStart = (date: DateValue) => {\n    if (!highlightedRange.value?.start)\n      return false\n    return isSameYearMonth(highlightedRange.value.start, date)\n  }\n\n  const isHighlightedEnd = (date: DateValue) => {\n    if (!highlightedRange.value?.end)\n      return false\n    return isSameYearMonth(highlightedRange.value.end, date)\n  }\n\n  return {\n    isInvalid,\n    isSelected,\n    highlightedRange,\n    isSelectionStart,\n    isSelectionEnd,\n    isHighlightedStart,\n    isHighlightedEnd,\n    isMonthDisabled: rangeIsMonthDisabled,\n  }\n}\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Grid, Matcher } from '@/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Formatter } from '@/shared'\nimport type { DateRange } from '@/shared/date'\nimport type { Direction } from '@/shared/types'\nimport { compareYearMonth, isSameYearMonth } from '@/date'\nimport { useMonthPicker } from '@/MonthPicker/useMonthPicker'\nimport { createContext, useDirection, useId, useKbd, useLocale } from '@/shared'\nimport { getDefaultDate, handleCalendarInitialFocus } from '@/shared/date'\nimport { useRangeMonthPickerState } from './useRangeMonthPicker'\n\ntype MonthRangePickerRootContext = {\n  modelValue: Ref<DateRange>\n  startValue: Ref<DateValue | undefined>\n  endValue: Ref<DateValue | undefined>\n  locale: Ref<string>\n  placeholder: Ref<DateValue>\n  preventDeselect: Ref<boolean>\n  grid: Ref<Grid<DateValue>>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  initialFocus: Ref<boolean>\n  onPlaceholderChange: (date: DateValue) => void\n  fullCalendarLabel: Ref<string>\n  parentElement: Ref<HTMLElement | undefined>\n  headingValue: Ref<string>\n  headingId: string\n  isInvalid: Ref<boolean>\n  isMonthDisabled: Matcher\n  isMonthUnavailable?: Matcher\n  allowNonContiguousRanges: Ref<boolean>\n  highlightedRange: Ref<{ start: DateValue, end: DateValue } | null>\n  focusedValue: Ref<DateValue | undefined>\n  lastPressedDateValue: Ref<DateValue | undefined>\n  isSelected: (date: DateValue) => boolean\n  isSelectionEnd: (date: DateValue) => boolean\n  isSelectionStart: (date: DateValue) => boolean\n  isHighlightedStart: (date: DateValue) => boolean\n  isHighlightedEnd: (date: DateValue) => boolean\n  prevPage: (prevPageFunc?: (date: DateValue) => DateValue) => void\n  nextPage: (nextPageFunc?: (date: DateValue) => DateValue) => void\n  isNextButtonDisabled: (nextPageFunc?: (date: DateValue) => DateValue) => boolean\n  isPrevButtonDisabled: (prevPageFunc?: (date: DateValue) => DateValue) => boolean\n  formatter: Formatter\n  dir: Ref<Direction>\n  fixedDate: Ref<'start' | 'end' | undefined>\n  maximumMonths: Ref<number | undefined>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n}\n\nexport interface MonthRangePickerRootProps extends PrimitiveProps {\n  /** The default placeholder date */\n  defaultPlaceholder?: DateValue\n  /** The default value for the calendar */\n  defaultValue?: DateRange\n  /** The controlled selected month range of the month range picker. Can be bound as `v-model`. */\n  modelValue?: DateRange | null\n  /** The placeholder date, which is used to determine what year to display when no date is selected. */\n  placeholder?: DateValue\n  /** When combined with `isMonthUnavailable`, determines whether non-contiguous ranges may be selected. */\n  allowNonContiguousRanges?: boolean\n  /** Whether or not to prevent the user from deselecting a date without selecting another date first */\n  preventDeselect?: boolean\n  /** The maximum number of months that can be selected in a range */\n  maximumMonths?: number\n  /** The accessible label for the calendar */\n  calendarLabel?: string\n  /** The maximum date that can be selected */\n  maxValue?: DateValue\n  /** The minimum date that can be selected */\n  minValue?: DateValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** Whether or not the calendar is disabled */\n  disabled?: boolean\n  /** Whether or not the calendar is readonly */\n  readonly?: boolean\n  /** If true, the calendar will focus the selected month on mount */\n  initialFocus?: boolean\n  /** A function that returns whether or not a month is disabled */\n  isMonthDisabled?: Matcher\n  /** A function that returns whether or not a month is unavailable */\n  isMonthUnavailable?: Matcher\n  /** The reading direction of the calendar when applicable. */\n  dir?: Direction\n  /** A function that returns the next page of the calendar. */\n  nextPage?: (placeholder: DateValue) => DateValue\n  /** A function that returns the previous page of the calendar. */\n  prevPage?: (placeholder: DateValue) => DateValue\n  /** Which part of the range should be fixed */\n  fixedDate?: 'start' | 'end'\n}\n\nexport type MonthRangePickerRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateRange]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n  /** Event handler called whenever the start value changes */\n  'update:startValue': [date: DateValue | undefined]\n}\n\nexport const [injectMonthRangePickerRootContext, provideMonthRangePickerRootContext]\n  = createContext<MonthRangePickerRootContext>('MonthRangePickerRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useEventListener, useVModel } from '@vueuse/core'\nimport { computed, onMounted, ref, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MonthRangePickerRootProps>(), {\n  defaultValue: () => ({ start: undefined, end: undefined }),\n  as: 'div',\n  preventDeselect: false,\n  disabled: false,\n  readonly: false,\n  initialFocus: false,\n  placeholder: undefined,\n  isMonthDisabled: undefined,\n  isMonthUnavailable: undefined,\n  allowNonContiguousRanges: false,\n  maximumMonths: undefined,\n})\nconst emits = defineEmits<MonthRangePickerRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** The current date of the placeholder */\n    date: DateValue\n    /** The grid of months */\n    grid: Grid<DateValue>\n    /** The calendar locale */\n    locale: string\n    /** The current date range */\n    modelValue: DateRange\n  }) => any\n}>()\n\nconst {\n  disabled,\n  readonly,\n  initialFocus,\n  preventDeselect,\n  isMonthUnavailable: propsIsMonthUnavailable,\n  isMonthDisabled: propsIsMonthDisabled,\n  calendarLabel,\n  maxValue,\n  minValue,\n  dir: propDir,\n  locale: propLocale,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n  allowNonContiguousRanges,\n  fixedDate,\n  maximumMonths,\n} = toRefs(props)\n\nconst { primitiveElement, currentElement: parentElement } = usePrimitiveElement()\nconst dir = useDirection(propDir)\nconst locale = useLocale(propLocale)\nconst headingId = useId(undefined, 'reka-month-range-picker-heading')\n\nconst lastPressedDateValue = ref() as Ref<DateValue | undefined>\nconst focusedValue = ref() as Ref<DateValue | undefined>\nconst isEditing = ref(false)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? { start: undefined, end: undefined },\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateRange | null>\n\nconst normalizeRange = (value?: DateRange | null): DateRange => value ?? { start: undefined, end: undefined }\nconst normalizedModelValue = computed(() => normalizeRange(modelValue.value))\n\nconst validModelValue = ref(normalizeRange(modelValue.value)) as Ref<DateRange>\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  defaultValue: normalizeRange(modelValue.value).start,\n  locale: props.locale,\n})\n\nconst startValue = ref(normalizeRange(modelValue.value).start) as Ref<DateValue | undefined>\nconst endValue = ref(normalizeRange(modelValue.value).end) as Ref<DateValue | undefined>\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nfunction onPlaceholderChange(value: DateValue) {\n  placeholder.value = value.copy()\n}\n\nconst {\n  fullCalendarLabel,\n  headingValue,\n  isMonthDisabled,\n  isMonthUnavailable,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  grid,\n  nextPage,\n  prevPage,\n  formatter,\n} = useMonthPicker({\n  locale,\n  placeholder,\n  minValue,\n  maxValue,\n  disabled,\n  isMonthDisabled: propsIsMonthDisabled,\n  isMonthUnavailable: propsIsMonthUnavailable,\n  calendarLabel,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n})\n\nconst {\n  isInvalid,\n  isSelected,\n  highlightedRange,\n  isSelectionStart,\n  isSelectionEnd,\n  isHighlightedStart,\n  isHighlightedEnd,\n  isMonthDisabled: rangeIsMonthDisabled,\n} = useRangeMonthPickerState({\n  start: startValue,\n  end: endValue,\n  isMonthDisabled,\n  isMonthUnavailable,\n  focusedValue,\n  allowNonContiguousRanges,\n  fixedDate,\n  maximumMonths,\n})\n\nwatch(modelValue, (_modelValue) => {\n  const next = normalizeRange(_modelValue)\n\n  const isStartSynced = (!next.start && !startValue.value)\n    || (!!next.start && !!startValue.value && isSameYearMonth(next.start, startValue.value))\n\n  if (!isStartSynced) {\n    startValue.value = next.start?.copy?.()\n  }\n\n  const isEndSynced = (!next.end && !endValue.value)\n    || (!!next.end && !!endValue.value && isSameYearMonth(next.end, endValue.value))\n\n  if (!isEndSynced) {\n    endValue.value = next.end?.copy?.()\n  }\n\n  if (next.start && next.end) {\n    validModelValue.value = {\n      start: next.start.copy(),\n      end: next.end.copy(),\n    }\n  }\n})\n\nwatch(startValue, (_startValue) => {\n  if (_startValue && !isSameYearMonth(_startValue, placeholder.value))\n    onPlaceholderChange(_startValue)\n\n  emits('update:startValue', _startValue)\n})\n\nwatch([startValue, endValue], ([_startValue, _endValue]) => {\n  const value = modelValue.value\n\n  if (\n    value\n    && value.start\n    && value.end\n    && _startValue\n    && _endValue\n    && isSameYearMonth(value.start, _startValue)\n    && isSameYearMonth(value.end, _endValue)\n  ) {\n    return\n  }\n\n  isEditing.value = true\n  if (_endValue && _startValue) {\n    const nextValue = compareYearMonth(_endValue, _startValue) < 0\n      ? { start: _endValue.copy(), end: _startValue.copy() }\n      : { start: _startValue.copy(), end: _endValue.copy() }\n\n    modelValue.value = { start: nextValue.start, end: nextValue.end }\n    isEditing.value = false\n    validModelValue.value = { start: nextValue.start.copy(), end: nextValue.end.copy() }\n  }\n  else {\n    modelValue.value = _startValue\n      ? { start: _startValue.copy(), end: undefined }\n      : { start: _endValue?.copy(), end: undefined }\n  }\n})\n\nconst kbd = useKbd()\nuseEventListener(parentElement, 'keydown', (ev) => {\n  if (ev.key === kbd.ESCAPE && isEditing.value) {\n    startValue.value = validModelValue.value.start?.copy()\n    endValue.value = validModelValue.value.end?.copy()\n  }\n})\n\nprovideMonthRangePickerRootContext({\n  isMonthUnavailable,\n  startValue,\n  endValue,\n  formatter,\n  modelValue: normalizedModelValue,\n  placeholder,\n  disabled,\n  initialFocus,\n  grid,\n  readonly,\n  preventDeselect,\n  fullCalendarLabel,\n  headingValue,\n  headingId,\n  isInvalid,\n  isMonthDisabled: rangeIsMonthDisabled,\n  allowNonContiguousRanges,\n  highlightedRange,\n  focusedValue,\n  lastPressedDateValue,\n  isSelected,\n  isSelectionEnd,\n  isSelectionStart,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  nextPage,\n  prevPage,\n  parentElement,\n  onPlaceholderChange,\n  locale,\n  dir,\n  isHighlightedStart,\n  isHighlightedEnd,\n  fixedDate,\n  maximumMonths,\n  minValue,\n  maxValue,\n})\n\nonMounted(() => {\n  if (initialFocus.value)\n    handleCalendarInitialFocus(parentElement.value)\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-label=\"fullCalendarLabel\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n  >\n    <div\n      style=\"border: 0px; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; white-space: nowrap; width: 1px;\"\n    >\n      <div\n        role=\"heading\"\n        aria-level=\"2\"\n      >\n        {{ fullCalendarLabel }}\n      </div>\n    </div>\n\n    <slot\n      :date=\"placeholder\"\n      :grid=\"grid\"\n      :locale=\"locale\"\n      :model-value=\"normalizedModelValue\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Grid, Matcher } from '@/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Formatter } from '@/shared'\nimport type { DateRange } from '@/shared/date'\nimport type { Direction } from '@/shared/types'\nimport { compareYearMonth, isSameYearMonth } from '@/date'\nimport { useMonthPicker } from '@/MonthPicker/useMonthPicker'\nimport { createContext, useDirection, useId, useKbd, useLocale } from '@/shared'\nimport { getDefaultDate, handleCalendarInitialFocus } from '@/shared/date'\nimport { useRangeMonthPickerState } from './useRangeMonthPicker'\n\ntype MonthRangePickerRootContext = {\n  modelValue: Ref<DateRange>\n  startValue: Ref<DateValue | undefined>\n  endValue: Ref<DateValue | undefined>\n  locale: Ref<string>\n  placeholder: Ref<DateValue>\n  preventDeselect: Ref<boolean>\n  grid: Ref<Grid<DateValue>>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  initialFocus: Ref<boolean>\n  onPlaceholderChange: (date: DateValue) => void\n  fullCalendarLabel: Ref<string>\n  parentElement: Ref<HTMLElement | undefined>\n  headingValue: Ref<string>\n  headingId: string\n  isInvalid: Ref<boolean>\n  isMonthDisabled: Matcher\n  isMonthUnavailable?: Matcher\n  allowNonContiguousRanges: Ref<boolean>\n  highlightedRange: Ref<{ start: DateValue, end: DateValue } | null>\n  focusedValue: Ref<DateValue | undefined>\n  lastPressedDateValue: Ref<DateValue | undefined>\n  isSelected: (date: DateValue) => boolean\n  isSelectionEnd: (date: DateValue) => boolean\n  isSelectionStart: (date: DateValue) => boolean\n  isHighlightedStart: (date: DateValue) => boolean\n  isHighlightedEnd: (date: DateValue) => boolean\n  prevPage: (prevPageFunc?: (date: DateValue) => DateValue) => void\n  nextPage: (nextPageFunc?: (date: DateValue) => DateValue) => void\n  isNextButtonDisabled: (nextPageFunc?: (date: DateValue) => DateValue) => boolean\n  isPrevButtonDisabled: (prevPageFunc?: (date: DateValue) => DateValue) => boolean\n  formatter: Formatter\n  dir: Ref<Direction>\n  fixedDate: Ref<'start' | 'end' | undefined>\n  maximumMonths: Ref<number | undefined>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n}\n\nexport interface MonthRangePickerRootProps extends PrimitiveProps {\n  /** The default placeholder date */\n  defaultPlaceholder?: DateValue\n  /** The default value for the calendar */\n  defaultValue?: DateRange\n  /** The controlled selected month range of the month range picker. Can be bound as `v-model`. */\n  modelValue?: DateRange | null\n  /** The placeholder date, which is used to determine what year to display when no date is selected. */\n  placeholder?: DateValue\n  /** When combined with `isMonthUnavailable`, determines whether non-contiguous ranges may be selected. */\n  allowNonContiguousRanges?: boolean\n  /** Whether or not to prevent the user from deselecting a date without selecting another date first */\n  preventDeselect?: boolean\n  /** The maximum number of months that can be selected in a range */\n  maximumMonths?: number\n  /** The accessible label for the calendar */\n  calendarLabel?: string\n  /** The maximum date that can be selected */\n  maxValue?: DateValue\n  /** The minimum date that can be selected */\n  minValue?: DateValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** Whether or not the calendar is disabled */\n  disabled?: boolean\n  /** Whether or not the calendar is readonly */\n  readonly?: boolean\n  /** If true, the calendar will focus the selected month on mount */\n  initialFocus?: boolean\n  /** A function that returns whether or not a month is disabled */\n  isMonthDisabled?: Matcher\n  /** A function that returns whether or not a month is unavailable */\n  isMonthUnavailable?: Matcher\n  /** The reading direction of the calendar when applicable. */\n  dir?: Direction\n  /** A function that returns the next page of the calendar. */\n  nextPage?: (placeholder: DateValue) => DateValue\n  /** A function that returns the previous page of the calendar. */\n  prevPage?: (placeholder: DateValue) => DateValue\n  /** Which part of the range should be fixed */\n  fixedDate?: 'start' | 'end'\n}\n\nexport type MonthRangePickerRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateRange]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n  /** Event handler called whenever the start value changes */\n  'update:startValue': [date: DateValue | undefined]\n}\n\nexport const [injectMonthRangePickerRootContext, provideMonthRangePickerRootContext]\n  = createContext<MonthRangePickerRootContext>('MonthRangePickerRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useEventListener, useVModel } from '@vueuse/core'\nimport { computed, onMounted, ref, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MonthRangePickerRootProps>(), {\n  defaultValue: () => ({ start: undefined, end: undefined }),\n  as: 'div',\n  preventDeselect: false,\n  disabled: false,\n  readonly: false,\n  initialFocus: false,\n  placeholder: undefined,\n  isMonthDisabled: undefined,\n  isMonthUnavailable: undefined,\n  allowNonContiguousRanges: false,\n  maximumMonths: undefined,\n})\nconst emits = defineEmits<MonthRangePickerRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** The current date of the placeholder */\n    date: DateValue\n    /** The grid of months */\n    grid: Grid<DateValue>\n    /** The calendar locale */\n    locale: string\n    /** The current date range */\n    modelValue: DateRange\n  }) => any\n}>()\n\nconst {\n  disabled,\n  readonly,\n  initialFocus,\n  preventDeselect,\n  isMonthUnavailable: propsIsMonthUnavailable,\n  isMonthDisabled: propsIsMonthDisabled,\n  calendarLabel,\n  maxValue,\n  minValue,\n  dir: propDir,\n  locale: propLocale,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n  allowNonContiguousRanges,\n  fixedDate,\n  maximumMonths,\n} = toRefs(props)\n\nconst { primitiveElement, currentElement: parentElement } = usePrimitiveElement()\nconst dir = useDirection(propDir)\nconst locale = useLocale(propLocale)\nconst headingId = useId(undefined, 'reka-month-range-picker-heading')\n\nconst lastPressedDateValue = ref() as Ref<DateValue | undefined>\nconst focusedValue = ref() as Ref<DateValue | undefined>\nconst isEditing = ref(false)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? { start: undefined, end: undefined },\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateRange | null>\n\nconst normalizeRange = (value?: DateRange | null): DateRange => value ?? { start: undefined, end: undefined }\nconst normalizedModelValue = computed(() => normalizeRange(modelValue.value))\n\nconst validModelValue = ref(normalizeRange(modelValue.value)) as Ref<DateRange>\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  defaultValue: normalizeRange(modelValue.value).start,\n  locale: props.locale,\n})\n\nconst startValue = ref(normalizeRange(modelValue.value).start) as Ref<DateValue | undefined>\nconst endValue = ref(normalizeRange(modelValue.value).end) as Ref<DateValue | undefined>\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nfunction onPlaceholderChange(value: DateValue) {\n  placeholder.value = value.copy()\n}\n\nconst {\n  fullCalendarLabel,\n  headingValue,\n  isMonthDisabled,\n  isMonthUnavailable,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  grid,\n  nextPage,\n  prevPage,\n  formatter,\n} = useMonthPicker({\n  locale,\n  placeholder,\n  minValue,\n  maxValue,\n  disabled,\n  isMonthDisabled: propsIsMonthDisabled,\n  isMonthUnavailable: propsIsMonthUnavailable,\n  calendarLabel,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n})\n\nconst {\n  isInvalid,\n  isSelected,\n  highlightedRange,\n  isSelectionStart,\n  isSelectionEnd,\n  isHighlightedStart,\n  isHighlightedEnd,\n  isMonthDisabled: rangeIsMonthDisabled,\n} = useRangeMonthPickerState({\n  start: startValue,\n  end: endValue,\n  isMonthDisabled,\n  isMonthUnavailable,\n  focusedValue,\n  allowNonContiguousRanges,\n  fixedDate,\n  maximumMonths,\n})\n\nwatch(modelValue, (_modelValue) => {\n  const next = normalizeRange(_modelValue)\n\n  const isStartSynced = (!next.start && !startValue.value)\n    || (!!next.start && !!startValue.value && isSameYearMonth(next.start, startValue.value))\n\n  if (!isStartSynced) {\n    startValue.value = next.start?.copy?.()\n  }\n\n  const isEndSynced = (!next.end && !endValue.value)\n    || (!!next.end && !!endValue.value && isSameYearMonth(next.end, endValue.value))\n\n  if (!isEndSynced) {\n    endValue.value = next.end?.copy?.()\n  }\n\n  if (next.start && next.end) {\n    validModelValue.value = {\n      start: next.start.copy(),\n      end: next.end.copy(),\n    }\n  }\n})\n\nwatch(startValue, (_startValue) => {\n  if (_startValue && !isSameYearMonth(_startValue, placeholder.value))\n    onPlaceholderChange(_startValue)\n\n  emits('update:startValue', _startValue)\n})\n\nwatch([startValue, endValue], ([_startValue, _endValue]) => {\n  const value = modelValue.value\n\n  if (\n    value\n    && value.start\n    && value.end\n    && _startValue\n    && _endValue\n    && isSameYearMonth(value.start, _startValue)\n    && isSameYearMonth(value.end, _endValue)\n  ) {\n    return\n  }\n\n  isEditing.value = true\n  if (_endValue && _startValue) {\n    const nextValue = compareYearMonth(_endValue, _startValue) < 0\n      ? { start: _endValue.copy(), end: _startValue.copy() }\n      : { start: _startValue.copy(), end: _endValue.copy() }\n\n    modelValue.value = { start: nextValue.start, end: nextValue.end }\n    isEditing.value = false\n    validModelValue.value = { start: nextValue.start.copy(), end: nextValue.end.copy() }\n  }\n  else {\n    modelValue.value = _startValue\n      ? { start: _startValue.copy(), end: undefined }\n      : { start: _endValue?.copy(), end: undefined }\n  }\n})\n\nconst kbd = useKbd()\nuseEventListener(parentElement, 'keydown', (ev) => {\n  if (ev.key === kbd.ESCAPE && isEditing.value) {\n    startValue.value = validModelValue.value.start?.copy()\n    endValue.value = validModelValue.value.end?.copy()\n  }\n})\n\nprovideMonthRangePickerRootContext({\n  isMonthUnavailable,\n  startValue,\n  endValue,\n  formatter,\n  modelValue: normalizedModelValue,\n  placeholder,\n  disabled,\n  initialFocus,\n  grid,\n  readonly,\n  preventDeselect,\n  fullCalendarLabel,\n  headingValue,\n  headingId,\n  isInvalid,\n  isMonthDisabled: rangeIsMonthDisabled,\n  allowNonContiguousRanges,\n  highlightedRange,\n  focusedValue,\n  lastPressedDateValue,\n  isSelected,\n  isSelectionEnd,\n  isSelectionStart,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  nextPage,\n  prevPage,\n  parentElement,\n  onPlaceholderChange,\n  locale,\n  dir,\n  isHighlightedStart,\n  isHighlightedEnd,\n  fixedDate,\n  maximumMonths,\n  minValue,\n  maxValue,\n})\n\nonMounted(() => {\n  if (initialFocus.value)\n    handleCalendarInitialFocus(parentElement.value)\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-label=\"fullCalendarLabel\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n  >\n    <div\n      style=\"border: 0px; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; white-space: nowrap; width: 1px;\"\n    >\n      <div\n        role=\"heading\"\n        aria-level=\"2\"\n      >\n        {{ fullCalendarLabel }}\n      </div>\n    </div>\n\n    <slot\n      :date=\"placeholder\"\n      :grid=\"grid\"\n      :locale=\"locale\"\n      :model-value=\"normalizedModelValue\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthRangePickerCellProps extends PrimitiveProps {\n  /** The date value for the cell */\n  date: DateValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectMonthRangePickerRootContext } from './MonthRangePickerRoot.vue'\n\nwithDefaults(defineProps<MonthRangePickerCellProps>(), { as: 'td' })\nconst rootContext = injectMonthRangePickerRootContext()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"gridcell\"\n    :aria-selected=\"rootContext.isSelected(date) ? true : undefined\"\n    :aria-disabled=\"rootContext.isMonthDisabled(date) || rootContext.isMonthUnavailable?.(date)\"\n    :data-disabled=\"rootContext.isMonthDisabled(date) ? '' : undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthRangePickerCellProps extends PrimitiveProps {\n  /** The date value for the cell */\n  date: DateValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectMonthRangePickerRootContext } from './MonthRangePickerRoot.vue'\n\nwithDefaults(defineProps<MonthRangePickerCellProps>(), { as: 'td' })\nconst rootContext = injectMonthRangePickerRootContext()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"gridcell\"\n    :aria-selected=\"rootContext.isSelected(date) ? true : undefined\"\n    :aria-disabled=\"rootContext.isMonthDisabled(date) || rootContext.isMonthUnavailable?.(date)\"\n    :data-disabled=\"rootContext.isMonthDisabled(date) ? '' : undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { endOfMonth, getLocalTimeZone, toCalendar, today } from '@internationalized/date'\nimport { computed, nextTick } from 'vue'\nimport { isMonthBetweenInclusive, isSameYearMonth, toDate } from '@/date'\nimport { useKbd } from '@/shared'\n\nexport interface MonthRangePickerCellTriggerProps extends PrimitiveProps {\n  /** The date value provided to the cell trigger */\n  month: DateValue\n}\n\nexport interface MonthRangePickerCellTriggerSlot {\n  default?: (props: {\n    /** Current month value (short name) */\n    monthValue: string\n    /** Current disable state */\n    disabled: boolean\n    /** Current selected state */\n    selected: boolean\n    /** Current month is today's month state */\n    today: boolean\n    /** Current unavailable state */\n    unavailable: boolean\n    /** Current highlighted state */\n    highlighted: boolean\n    /** Current highlighted start state */\n    highlightedStart: boolean\n    /** Current highlighted end state */\n    highlightedEnd: boolean\n    /** Current selection start state */\n    selectionStart: boolean\n    /** Current selection end state */\n    selectionEnd: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { injectMonthRangePickerRootContext } from './MonthRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthRangePickerCellTriggerProps>(), { as: 'div' })\n\ndefineSlots<MonthRangePickerCellTriggerSlot>()\n\nconst kbd = useKbd()\nconst rootContext = injectMonthRangePickerRootContext()\n\nconst { primitiveElement } = usePrimitiveElement()\n\nconst shortMonthValue = computed(() => {\n  rootContext.locale.value\n  return rootContext.formatter.custom(toDate(props.month), { month: 'short' })\n})\n\nconst labelText = computed(() => {\n  rootContext.locale.value\n  return rootContext.formatter.custom(toDate(props.month), { month: 'long', year: 'numeric' })\n})\n\nconst isUnavailable = computed(() => rootContext.isMonthUnavailable?.(props.month) ?? false)\n\nconst isCurrentMonth = computed(() => {\n  const todayDate = toCalendar(today(getLocalTimeZone()), props.month.calendar)\n  return isSameYearMonth(props.month, todayDate)\n})\n\nconst isDisabled = computed(() => rootContext.isMonthDisabled(props.month))\n\nconst isFocusedMonth = computed(() => {\n  return !rootContext.disabled.value && isSameYearMonth(props.month, rootContext.placeholder.value)\n})\n\nconst isSelectedMonth = computed(() => rootContext.isSelected(props.month))\nconst isSelectionStart = computed(() => rootContext.isSelectionStart(props.month))\nconst isSelectionEnd = computed(() => rootContext.isSelectionEnd(props.month))\nconst isHighlightStart = computed(() => rootContext.isHighlightedStart(props.month))\nconst isHighlightEnd = computed(() => rootContext.isHighlightedEnd(props.month))\nconst isHighlighted = computed(() => rootContext.highlightedRange.value\n  ? isMonthBetweenInclusive(props.month, rootContext.highlightedRange.value.start, rootContext.highlightedRange.value.end)\n  : false)\nconst allowNonContiguousRanges = computed(() => rootContext.allowNonContiguousRanges.value)\n\nfunction changeMonth(e: MouseEvent | KeyboardEvent, date: DateValue) {\n  if (rootContext.readonly.value)\n    return\n  if (rootContext.isMonthDisabled(date) || rootContext.isMonthUnavailable?.(date))\n    return\n\n  if (rootContext.startValue.value && rootContext.highlightedRange.value === null) {\n    if (isSameYearMonth(date, rootContext.startValue.value) && !rootContext.preventDeselect.value && !rootContext.endValue.value) {\n      rootContext.startValue.value = undefined\n      rootContext.onPlaceholderChange(date)\n      rootContext.lastPressedDateValue.value = date.copy()\n      return\n    }\n    else if (!rootContext.endValue.value) {\n      e.preventDefault()\n      if (rootContext.lastPressedDateValue.value && isSameYearMonth(rootContext.lastPressedDateValue.value, date))\n        rootContext.startValue.value = date.copy()\n      rootContext.lastPressedDateValue.value = date.copy()\n      return\n    }\n  }\n\n  rootContext.lastPressedDateValue.value = date.copy()\n\n  if (\n    rootContext.startValue.value\n    && rootContext.endValue.value\n    && isSameYearMonth(rootContext.startValue.value, rootContext.endValue.value)\n    && isSameYearMonth(rootContext.startValue.value, date)\n    && !rootContext.preventDeselect.value\n  ) {\n    rootContext.startValue.value = undefined\n    rootContext.endValue.value = undefined\n    rootContext.onPlaceholderChange(date)\n    return\n  }\n\n  if (!rootContext.startValue.value) {\n    rootContext.startValue.value = date.copy()\n  }\n  else if (!rootContext.endValue.value) {\n    rootContext.endValue.value = date.copy()\n  }\n  else if (rootContext.endValue.value && rootContext.startValue.value) {\n    if (!rootContext.fixedDate.value) {\n      rootContext.endValue.value = undefined\n      rootContext.startValue.value = date.copy()\n    }\n    else if (rootContext.fixedDate.value === 'start') {\n      if (date.compare(rootContext.startValue.value) < 0) {\n        rootContext.startValue.value = date.copy()\n      }\n      else {\n        rootContext.endValue.value = date.copy()\n      }\n    }\n    else if (rootContext.fixedDate.value === 'end') {\n      if (date.compare(rootContext.endValue.value) > 0) {\n        rootContext.endValue.value = date.copy()\n      }\n      else {\n        rootContext.startValue.value = date.copy()\n      }\n    }\n  }\n}\n\nfunction handleClick(e: MouseEvent) {\n  if (isDisabled.value)\n    return\n  changeMonth(e, props.month)\n}\n\nfunction handleFocus() {\n  if (isDisabled.value || rootContext.isMonthUnavailable?.(props.month))\n    return\n  rootContext.focusedValue.value = props.month.copy()\n}\n\nfunction handleArrowKey(e: KeyboardEvent) {\n  if (isDisabled.value)\n    return\n  e.preventDefault()\n  e.stopPropagation()\n  const parentElement = rootContext.parentElement.value!\n  const sign = rootContext.dir.value === 'rtl' ? -1 : 1\n\n  switch (e.code) {\n    case kbd.ARROW_RIGHT:\n      shiftFocus(props.month, sign)\n      break\n    case kbd.ARROW_LEFT:\n      shiftFocus(props.month, -sign)\n      break\n    case kbd.ARROW_UP:\n      shiftFocus(props.month, -4)\n      break\n    case kbd.ARROW_DOWN:\n      shiftFocus(props.month, 4)\n      break\n    case kbd.PAGE_UP:\n      shiftFocusYear(-1)\n      break\n    case kbd.PAGE_DOWN:\n      shiftFocusYear(1)\n      break\n    case kbd.ENTER:\n    case kbd.SPACE_CODE:\n      changeMonth(e, props.month)\n  }\n\n  function shiftFocus(currentMonth: DateValue, add: number, depth = 0) {\n    if (depth > 48)\n      return\n    const candidateMonthValue = currentMonth.add({ months: add })\n\n    if ((rootContext.minValue.value && endOfMonth(candidateMonthValue).compare(rootContext.minValue.value) < 0)\n      || (rootContext.maxValue.value && candidateMonthValue.set({ day: 1 }).compare(rootContext.maxValue.value) > 0)) {\n      return\n    }\n\n    const candidateMonth = parentElement.querySelector<HTMLElement>(`[data-value='${candidateMonthValue.toString()}']`)\n\n    if (!candidateMonth) {\n      if (add > 0) {\n        if (rootContext.isNextButtonDisabled())\n          return\n        rootContext.nextPage()\n      }\n      else {\n        if (rootContext.isPrevButtonDisabled())\n          return\n        rootContext.prevPage()\n      }\n      nextTick(() => {\n        shiftFocus(currentMonth, add, depth + 1)\n      })\n      return\n    }\n\n    if (candidateMonth && candidateMonth.hasAttribute('data-disabled'))\n      return shiftFocus(candidateMonthValue, add, depth + 1)\n\n    rootContext.onPlaceholderChange(candidateMonthValue)\n    candidateMonth?.focus()\n  }\n\n  function shiftFocusYear(years: number) {\n    const candidateMonthValue = props.month.add({ years })\n\n    if ((rootContext.minValue.value && endOfMonth(candidateMonthValue).compare(rootContext.minValue.value) < 0)\n      || (rootContext.maxValue.value && candidateMonthValue.set({ day: 1 }).compare(rootContext.maxValue.value) > 0)) {\n      return\n    }\n\n    if (years > 0) {\n      if (rootContext.isNextButtonDisabled())\n        return\n      rootContext.nextPage()\n    }\n    else {\n      if (rootContext.isPrevButtonDisabled())\n        return\n      rootContext.prevPage()\n    }\n\n    nextTick(() => {\n      const candidateMonth = parentElement.querySelector<HTMLElement>(`[data-value='${candidateMonthValue.toString()}']`)\n      if (candidateMonth && !candidateMonth.hasAttribute('data-disabled')) {\n        rootContext.onPlaceholderChange(candidateMonthValue)\n        candidateMonth?.focus()\n        return\n      }\n\n      shiftFocus(candidateMonthValue, years > 0 ? 1 : -1, 1)\n    })\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    role=\"button\"\n    :aria-label=\"labelText\"\n    data-reka-month-range-picker-cell-trigger\n    :aria-pressed=\"isSelectedMonth && (allowNonContiguousRanges || !isUnavailable) ? true : undefined\"\n    :aria-disabled=\"isDisabled || isUnavailable ? true : undefined\"\n    :data-highlighted=\"isHighlighted && (allowNonContiguousRanges || !isUnavailable) ? '' : undefined\"\n    :data-selection-start=\"isSelectionStart ? true : undefined\"\n    :data-selection-end=\"isSelectionEnd ? true : undefined\"\n    :data-highlighted-start=\"isHighlightStart ? true : undefined\"\n    :data-highlighted-end=\"isHighlightEnd ? true : undefined\"\n    :data-selected=\"isSelectedMonth && (allowNonContiguousRanges || !isUnavailable) ? true : undefined\"\n    :data-value=\"month.toString()\"\n    :data-disabled=\"isDisabled ? '' : undefined\"\n    :data-unavailable=\"isUnavailable ? '' : undefined\"\n    :data-today=\"isCurrentMonth ? '' : undefined\"\n    :data-focused=\"isFocusedMonth ? '' : undefined\"\n    :tabindex=\"isFocusedMonth ? 0 : isDisabled ? undefined : -1\"\n    @click=\"handleClick\"\n    @focusin=\"handleFocus\"\n    @mouseenter=\"handleFocus\"\n    @keydown.up.down.left.right.space.enter.page-up.page-down=\"handleArrowKey\"\n    @keydown.enter.prevent\n  >\n    <slot\n      :month-value=\"shortMonthValue\"\n      :disabled=\"isDisabled\"\n      :today=\"isCurrentMonth\"\n      :selected=\"isSelectedMonth\"\n      :unavailable=\"isUnavailable\"\n      :highlighted=\"isHighlighted && (allowNonContiguousRanges || !isUnavailable)\"\n      :highlighted-start=\"isHighlightStart\"\n      :highlighted-end=\"isHighlightEnd\"\n      :selection-start=\"isSelectionStart\"\n      :selection-end=\"isSelectionEnd\"\n    >\n      {{ shortMonthValue }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { endOfMonth, getLocalTimeZone, toCalendar, today } from '@internationalized/date'\nimport { computed, nextTick } from 'vue'\nimport { isMonthBetweenInclusive, isSameYearMonth, toDate } from '@/date'\nimport { useKbd } from '@/shared'\n\nexport interface MonthRangePickerCellTriggerProps extends PrimitiveProps {\n  /** The date value provided to the cell trigger */\n  month: DateValue\n}\n\nexport interface MonthRangePickerCellTriggerSlot {\n  default?: (props: {\n    /** Current month value (short name) */\n    monthValue: string\n    /** Current disable state */\n    disabled: boolean\n    /** Current selected state */\n    selected: boolean\n    /** Current month is today's month state */\n    today: boolean\n    /** Current unavailable state */\n    unavailable: boolean\n    /** Current highlighted state */\n    highlighted: boolean\n    /** Current highlighted start state */\n    highlightedStart: boolean\n    /** Current highlighted end state */\n    highlightedEnd: boolean\n    /** Current selection start state */\n    selectionStart: boolean\n    /** Current selection end state */\n    selectionEnd: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { injectMonthRangePickerRootContext } from './MonthRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthRangePickerCellTriggerProps>(), { as: 'div' })\n\ndefineSlots<MonthRangePickerCellTriggerSlot>()\n\nconst kbd = useKbd()\nconst rootContext = injectMonthRangePickerRootContext()\n\nconst { primitiveElement } = usePrimitiveElement()\n\nconst shortMonthValue = computed(() => {\n  rootContext.locale.value\n  return rootContext.formatter.custom(toDate(props.month), { month: 'short' })\n})\n\nconst labelText = computed(() => {\n  rootContext.locale.value\n  return rootContext.formatter.custom(toDate(props.month), { month: 'long', year: 'numeric' })\n})\n\nconst isUnavailable = computed(() => rootContext.isMonthUnavailable?.(props.month) ?? false)\n\nconst isCurrentMonth = computed(() => {\n  const todayDate = toCalendar(today(getLocalTimeZone()), props.month.calendar)\n  return isSameYearMonth(props.month, todayDate)\n})\n\nconst isDisabled = computed(() => rootContext.isMonthDisabled(props.month))\n\nconst isFocusedMonth = computed(() => {\n  return !rootContext.disabled.value && isSameYearMonth(props.month, rootContext.placeholder.value)\n})\n\nconst isSelectedMonth = computed(() => rootContext.isSelected(props.month))\nconst isSelectionStart = computed(() => rootContext.isSelectionStart(props.month))\nconst isSelectionEnd = computed(() => rootContext.isSelectionEnd(props.month))\nconst isHighlightStart = computed(() => rootContext.isHighlightedStart(props.month))\nconst isHighlightEnd = computed(() => rootContext.isHighlightedEnd(props.month))\nconst isHighlighted = computed(() => rootContext.highlightedRange.value\n  ? isMonthBetweenInclusive(props.month, rootContext.highlightedRange.value.start, rootContext.highlightedRange.value.end)\n  : false)\nconst allowNonContiguousRanges = computed(() => rootContext.allowNonContiguousRanges.value)\n\nfunction changeMonth(e: MouseEvent | KeyboardEvent, date: DateValue) {\n  if (rootContext.readonly.value)\n    return\n  if (rootContext.isMonthDisabled(date) || rootContext.isMonthUnavailable?.(date))\n    return\n\n  if (rootContext.startValue.value && rootContext.highlightedRange.value === null) {\n    if (isSameYearMonth(date, rootContext.startValue.value) && !rootContext.preventDeselect.value && !rootContext.endValue.value) {\n      rootContext.startValue.value = undefined\n      rootContext.onPlaceholderChange(date)\n      rootContext.lastPressedDateValue.value = date.copy()\n      return\n    }\n    else if (!rootContext.endValue.value) {\n      e.preventDefault()\n      if (rootContext.lastPressedDateValue.value && isSameYearMonth(rootContext.lastPressedDateValue.value, date))\n        rootContext.startValue.value = date.copy()\n      rootContext.lastPressedDateValue.value = date.copy()\n      return\n    }\n  }\n\n  rootContext.lastPressedDateValue.value = date.copy()\n\n  if (\n    rootContext.startValue.value\n    && rootContext.endValue.value\n    && isSameYearMonth(rootContext.startValue.value, rootContext.endValue.value)\n    && isSameYearMonth(rootContext.startValue.value, date)\n    && !rootContext.preventDeselect.value\n  ) {\n    rootContext.startValue.value = undefined\n    rootContext.endValue.value = undefined\n    rootContext.onPlaceholderChange(date)\n    return\n  }\n\n  if (!rootContext.startValue.value) {\n    rootContext.startValue.value = date.copy()\n  }\n  else if (!rootContext.endValue.value) {\n    rootContext.endValue.value = date.copy()\n  }\n  else if (rootContext.endValue.value && rootContext.startValue.value) {\n    if (!rootContext.fixedDate.value) {\n      rootContext.endValue.value = undefined\n      rootContext.startValue.value = date.copy()\n    }\n    else if (rootContext.fixedDate.value === 'start') {\n      if (date.compare(rootContext.startValue.value) < 0) {\n        rootContext.startValue.value = date.copy()\n      }\n      else {\n        rootContext.endValue.value = date.copy()\n      }\n    }\n    else if (rootContext.fixedDate.value === 'end') {\n      if (date.compare(rootContext.endValue.value) > 0) {\n        rootContext.endValue.value = date.copy()\n      }\n      else {\n        rootContext.startValue.value = date.copy()\n      }\n    }\n  }\n}\n\nfunction handleClick(e: MouseEvent) {\n  if (isDisabled.value)\n    return\n  changeMonth(e, props.month)\n}\n\nfunction handleFocus() {\n  if (isDisabled.value || rootContext.isMonthUnavailable?.(props.month))\n    return\n  rootContext.focusedValue.value = props.month.copy()\n}\n\nfunction handleArrowKey(e: KeyboardEvent) {\n  if (isDisabled.value)\n    return\n  e.preventDefault()\n  e.stopPropagation()\n  const parentElement = rootContext.parentElement.value!\n  const sign = rootContext.dir.value === 'rtl' ? -1 : 1\n\n  switch (e.code) {\n    case kbd.ARROW_RIGHT:\n      shiftFocus(props.month, sign)\n      break\n    case kbd.ARROW_LEFT:\n      shiftFocus(props.month, -sign)\n      break\n    case kbd.ARROW_UP:\n      shiftFocus(props.month, -4)\n      break\n    case kbd.ARROW_DOWN:\n      shiftFocus(props.month, 4)\n      break\n    case kbd.PAGE_UP:\n      shiftFocusYear(-1)\n      break\n    case kbd.PAGE_DOWN:\n      shiftFocusYear(1)\n      break\n    case kbd.ENTER:\n    case kbd.SPACE_CODE:\n      changeMonth(e, props.month)\n  }\n\n  function shiftFocus(currentMonth: DateValue, add: number, depth = 0) {\n    if (depth > 48)\n      return\n    const candidateMonthValue = currentMonth.add({ months: add })\n\n    if ((rootContext.minValue.value && endOfMonth(candidateMonthValue).compare(rootContext.minValue.value) < 0)\n      || (rootContext.maxValue.value && candidateMonthValue.set({ day: 1 }).compare(rootContext.maxValue.value) > 0)) {\n      return\n    }\n\n    const candidateMonth = parentElement.querySelector<HTMLElement>(`[data-value='${candidateMonthValue.toString()}']`)\n\n    if (!candidateMonth) {\n      if (add > 0) {\n        if (rootContext.isNextButtonDisabled())\n          return\n        rootContext.nextPage()\n      }\n      else {\n        if (rootContext.isPrevButtonDisabled())\n          return\n        rootContext.prevPage()\n      }\n      nextTick(() => {\n        shiftFocus(currentMonth, add, depth + 1)\n      })\n      return\n    }\n\n    if (candidateMonth && candidateMonth.hasAttribute('data-disabled'))\n      return shiftFocus(candidateMonthValue, add, depth + 1)\n\n    rootContext.onPlaceholderChange(candidateMonthValue)\n    candidateMonth?.focus()\n  }\n\n  function shiftFocusYear(years: number) {\n    const candidateMonthValue = props.month.add({ years })\n\n    if ((rootContext.minValue.value && endOfMonth(candidateMonthValue).compare(rootContext.minValue.value) < 0)\n      || (rootContext.maxValue.value && candidateMonthValue.set({ day: 1 }).compare(rootContext.maxValue.value) > 0)) {\n      return\n    }\n\n    if (years > 0) {\n      if (rootContext.isNextButtonDisabled())\n        return\n      rootContext.nextPage()\n    }\n    else {\n      if (rootContext.isPrevButtonDisabled())\n        return\n      rootContext.prevPage()\n    }\n\n    nextTick(() => {\n      const candidateMonth = parentElement.querySelector<HTMLElement>(`[data-value='${candidateMonthValue.toString()}']`)\n      if (candidateMonth && !candidateMonth.hasAttribute('data-disabled')) {\n        rootContext.onPlaceholderChange(candidateMonthValue)\n        candidateMonth?.focus()\n        return\n      }\n\n      shiftFocus(candidateMonthValue, years > 0 ? 1 : -1, 1)\n    })\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    role=\"button\"\n    :aria-label=\"labelText\"\n    data-reka-month-range-picker-cell-trigger\n    :aria-pressed=\"isSelectedMonth && (allowNonContiguousRanges || !isUnavailable) ? true : undefined\"\n    :aria-disabled=\"isDisabled || isUnavailable ? true : undefined\"\n    :data-highlighted=\"isHighlighted && (allowNonContiguousRanges || !isUnavailable) ? '' : undefined\"\n    :data-selection-start=\"isSelectionStart ? true : undefined\"\n    :data-selection-end=\"isSelectionEnd ? true : undefined\"\n    :data-highlighted-start=\"isHighlightStart ? true : undefined\"\n    :data-highlighted-end=\"isHighlightEnd ? true : undefined\"\n    :data-selected=\"isSelectedMonth && (allowNonContiguousRanges || !isUnavailable) ? true : undefined\"\n    :data-value=\"month.toString()\"\n    :data-disabled=\"isDisabled ? '' : undefined\"\n    :data-unavailable=\"isUnavailable ? '' : undefined\"\n    :data-today=\"isCurrentMonth ? '' : undefined\"\n    :data-focused=\"isFocusedMonth ? '' : undefined\"\n    :tabindex=\"isFocusedMonth ? 0 : isDisabled ? undefined : -1\"\n    @click=\"handleClick\"\n    @focusin=\"handleFocus\"\n    @mouseenter=\"handleFocus\"\n    @keydown.up.down.left.right.space.enter.page-up.page-down=\"handleArrowKey\"\n    @keydown.enter.prevent\n  >\n    <slot\n      :month-value=\"shortMonthValue\"\n      :disabled=\"isDisabled\"\n      :today=\"isCurrentMonth\"\n      :selected=\"isSelectedMonth\"\n      :unavailable=\"isUnavailable\"\n      :highlighted=\"isHighlighted && (allowNonContiguousRanges || !isUnavailable)\"\n      :highlighted-start=\"isHighlightStart\"\n      :highlighted-end=\"isHighlightEnd\"\n      :selection-start=\"isSelectionStart\"\n      :selection-end=\"isSelectionEnd\"\n    >\n      {{ shortMonthValue }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthRangePickerGridProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectMonthRangePickerRootContext } from './MonthRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthRangePickerGridProps>(), { as: 'table' })\n\nconst rootContext = injectMonthRangePickerRootContext()\nconst disabled = computed(() => rootContext.disabled.value ? true : undefined)\nconst readonly = computed(() => rootContext.readonly.value ? true : undefined)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    tabindex=\"-1\"\n    role=\"application\"\n    :aria-labelledby=\"rootContext.headingId\"\n    :aria-readonly=\"readonly\"\n    :aria-disabled=\"disabled\"\n    :data-readonly=\"readonly && ''\"\n    :data-disabled=\"disabled && ''\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthRangePickerGridProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectMonthRangePickerRootContext } from './MonthRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthRangePickerGridProps>(), { as: 'table' })\n\nconst rootContext = injectMonthRangePickerRootContext()\nconst disabled = computed(() => rootContext.disabled.value ? true : undefined)\nconst readonly = computed(() => rootContext.readonly.value ? true : undefined)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    tabindex=\"-1\"\n    role=\"application\"\n    :aria-labelledby=\"rootContext.headingId\"\n    :aria-readonly=\"readonly\"\n    :aria-disabled=\"disabled\"\n    :data-readonly=\"readonly && ''\"\n    :data-disabled=\"disabled && ''\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthRangePickerGridBodyProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MonthRangePickerGridBodyProps>(), { as: 'tbody' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthRangePickerGridBodyProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MonthRangePickerGridBodyProps>(), { as: 'tbody' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthRangePickerGridRowProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MonthRangePickerGridRowProps>(), { as: 'tr' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    role=\"row\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthRangePickerGridRowProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MonthRangePickerGridRowProps>(), { as: 'tr' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    role=\"row\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthRangePickerHeaderProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MonthRangePickerHeaderProps>(), { as: 'div' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthRangePickerHeaderProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<MonthRangePickerHeaderProps>(), { as: 'div' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthRangePickerHeadingProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectMonthRangePickerRootContext } from './MonthRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthRangePickerHeadingProps>(), { as: 'div' })\n\ndefineSlots<{\n  default?: (props: {\n    /** Current year heading */\n    headingValue: string\n  }) => any\n}>()\n\nconst rootContext = injectMonthRangePickerRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"rootContext.headingId\"\n    role=\"heading\"\n    aria-level=\"2\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n  >\n    <slot :heading-value=\"rootContext.headingValue.value\">\n      {{ rootContext.headingValue.value }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthRangePickerHeadingProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectMonthRangePickerRootContext } from './MonthRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthRangePickerHeadingProps>(), { as: 'div' })\n\ndefineSlots<{\n  default?: (props: {\n    /** Current year heading */\n    headingValue: string\n  }) => any\n}>()\n\nconst rootContext = injectMonthRangePickerRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"rootContext.headingId\"\n    role=\"heading\"\n    aria-level=\"2\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n  >\n    <slot :heading-value=\"rootContext.headingValue.value\">\n      {{ rootContext.headingValue.value }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthRangePickerNextProps extends PrimitiveProps {\n  /** The function to be used for the next page. Overwrites the `nextPage` function set on the Root. */\n  nextPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface MonthRangePickerNextSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectMonthRangePickerRootContext } from './MonthRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthRangePickerNextProps>(), { as: 'button' })\ndefineSlots<MonthRangePickerNextSlot>()\n\nconst rootContext = injectMonthRangePickerRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isNextButtonDisabled(props.nextPage))\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.nextPage(props.nextPage)\n}\n</script>\n\n<template>\n  <Primitive\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    aria-label=\"Next year\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Next year\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthRangePickerNextProps extends PrimitiveProps {\n  /** The function to be used for the next page. Overwrites the `nextPage` function set on the Root. */\n  nextPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface MonthRangePickerNextSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectMonthRangePickerRootContext } from './MonthRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthRangePickerNextProps>(), { as: 'button' })\ndefineSlots<MonthRangePickerNextSlot>()\n\nconst rootContext = injectMonthRangePickerRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isNextButtonDisabled(props.nextPage))\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.nextPage(props.nextPage)\n}\n</script>\n\n<template>\n  <Primitive\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    aria-label=\"Next year\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Next year\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthRangePickerPrevProps extends PrimitiveProps {\n  /** The function to be used for the prev page. Overwrites the `prevPage` function set on the Root. */\n  prevPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface MonthRangePickerPrevSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectMonthRangePickerRootContext } from './MonthRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthRangePickerPrevProps>(), { as: 'button' })\ndefineSlots<MonthRangePickerPrevSlot>()\n\nconst rootContext = injectMonthRangePickerRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isPrevButtonDisabled(props.prevPage))\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.prevPage(props.prevPage)\n}\n</script>\n\n<template>\n  <Primitive\n    aria-label=\"Previous year\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Prev year\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface MonthRangePickerPrevProps extends PrimitiveProps {\n  /** The function to be used for the prev page. Overwrites the `prevPage` function set on the Root. */\n  prevPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface MonthRangePickerPrevSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectMonthRangePickerRootContext } from './MonthRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<MonthRangePickerPrevProps>(), { as: 'button' })\ndefineSlots<MonthRangePickerPrevSlot>()\n\nconst rootContext = injectMonthRangePickerRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isPrevButtonDisabled(props.prevPage))\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.prevPage(props.prevPage)\n}\n</script>\n\n<template>\n  <Primitive\n    aria-label=\"Previous year\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Prev year\n    </slot>\n  </Primitive>\n</template>\n","import { getActiveElement } from '@/shared'\n\nexport type Orientation = 'vertical' | 'horizontal'\nexport type Direction = 'ltr' | 'rtl'\n\nexport function getOpenState(open: boolean) {\n  return open ? 'open' : 'closed'\n}\n\nexport function makeTriggerId(baseId: string, value: string) {\n  return `${baseId}-trigger-${value}`\n}\n\nexport function makeContentId(baseId: string, value: string) {\n  return `${baseId}-content-${value}`\n}\n\nexport const LINK_SELECT = 'navigationMenu.linkSelect'\nexport const EVENT_ROOT_CONTENT_DISMISS = 'navigationMenu.rootContentDismiss'\n\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */\nexport function getTabbableCandidates(container: HTMLElement) {\n  const nodes: HTMLElement[] = []\n  const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n    acceptNode: (node: any) => {\n      const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden'\n      if (node.disabled || node.hidden || isHiddenInput)\n        return NodeFilter.FILTER_SKIP\n      // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n      // runtime's understanding of tabbability, so this automatically accounts\n      // for any kind of element that could be tabbed to.\n      return node.tabIndex >= 0\n        ? NodeFilter.FILTER_ACCEPT\n        : NodeFilter.FILTER_SKIP\n    },\n  })\n  while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement)\n  // we do not take into account the order of nodes with positive `tabIndex` as it\n  // hinders accessibility to have tab order different from visual order.\n  return nodes\n}\n\nexport function focusFirst(candidates: HTMLElement[]) {\n  const previouslyFocusedElement = getActiveElement()\n  return candidates.some((candidate) => {\n    // if focus is already where we want to go, we don't want to keep going through the candidates\n    if (candidate === previouslyFocusedElement)\n      return true\n    candidate.focus()\n    return getActiveElement() !== previouslyFocusedElement\n  })\n}\n\nexport function removeFromTabOrder(candidates: HTMLElement[]) {\n  candidates.forEach((candidate) => {\n    candidate.dataset.tabindex = candidate.getAttribute('tabindex') || ''\n    candidate.setAttribute('tabindex', '-1')\n  })\n  return () => {\n    candidates.forEach((candidate) => {\n      const prevTabIndex = candidate.dataset.tabindex as string\n      candidate.setAttribute('tabindex', prevTabIndex)\n    })\n  }\n}\n\nexport function whenMouse<E extends PointerEvent>(handler: (event?: E) => void) {\n  return (event: E) => (event.pointerType === 'mouse' ? handler(event) : undefined)\n}\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\n\nimport type { Direction, Orientation } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useCollection } from '@/Collection'\nimport { createContext, useDirection, useForwardExpose, useId } from '@/shared'\nimport { EVENT_ROOT_CONTENT_DISMISS } from './utils'\n\nexport interface NavigationMenuRootProps extends PrimitiveProps {\n  /** The controlled value of the menu item to activate. Can be used as `v-model`. */\n  modelValue?: string\n  /**\n   * The value of the menu item that should be active when initially rendered.\n   *\n   * Use when you do not need to control the value state.\n   */\n  defaultValue?: string\n  /**\n   * The reading direction of the combobox when applicable.\n   *\n   *  If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode.\n   */\n  dir?: Direction\n  /** The orientation of the menu. */\n  orientation?: Orientation\n  /**\n   * The duration from when the pointer enters the trigger until the tooltip gets opened.\n   * @defaultValue 200\n   */\n  delayDuration?: number\n  /**\n   * How much time a user has to enter another trigger without incurring a delay again.\n   * @defaultValue 300\n   */\n  skipDelayDuration?: number\n\n  /**\n   * If `true`, menu cannot be open by click on trigger\n   * @defaultValue false\n   */\n  disableClickTrigger?: boolean\n  /**\n   * If `true`, menu cannot be open by hover on trigger\n   * @defaultValue false\n   */\n  disableHoverTrigger?: boolean\n  /**\n   * If `true`, menu will not close during pointer leave event\n   * @defaultValue false\n   */\n  disablePointerLeaveClose?: boolean\n\n  /**\n   * When `true`, the element will be unmounted on closed state.\n   *\n   * @defaultValue `true`\n   */\n  unmountOnHide?: boolean\n}\nexport type NavigationMenuRootEmits = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [value: string]\n}\n\nexport interface NavigationMenuContext {\n  isRootMenu: boolean\n  modelValue: Ref<string>\n  previousValue: Ref<string>\n  baseId: string\n  dir: Ref<Direction>\n  orientation: Orientation\n  disableClickTrigger: Ref<boolean>\n  disableHoverTrigger: Ref<boolean>\n  unmountOnHide: Ref<boolean>\n  rootNavigationMenu: Ref<HTMLElement | undefined>\n  activeTrigger: Ref<HTMLElement | undefined>\n  indicatorTrack: Ref<HTMLElement | undefined>\n  onIndicatorTrackChange: (indicatorTrack: HTMLElement | undefined) => void\n  viewport: Ref<HTMLElement | undefined>\n  onViewportChange: (viewport: HTMLElement | undefined) => void\n  onTriggerEnter: (itemValue: string) => void\n  onTriggerLeave: () => void\n  onContentEnter: (itemValue: string) => void\n  onContentLeave: () => void\n  onItemSelect: (itemValue: string) => void\n  onItemDismiss: () => void\n}\n\nexport const [injectNavigationMenuContext, provideNavigationMenuContext]\n  = createContext<NavigationMenuContext>(['NavigationMenuRoot', 'NavigationMenuSub'], 'NavigationMenuContext')\n</script>\n\n<script setup lang=\"ts\">\nimport { refAutoReset, useDebounceFn, useEventListener, useVModel } from '@vueuse/core'\nimport {\n  computed,\n  ref,\n  toRefs,\n  watchEffect,\n} from 'vue'\nimport {\n  Primitive,\n} from '@/Primitive'\n\nconst props = withDefaults(defineProps<NavigationMenuRootProps>(), {\n  modelValue: undefined,\n  delayDuration: 200,\n  skipDelayDuration: 300,\n  orientation: 'horizontal',\n  disableClickTrigger: false,\n  disableHoverTrigger: false,\n  unmountOnHide: true,\n  as: 'nav',\n})\nconst emits = defineEmits<NavigationMenuRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? '',\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<string>\nconst previousValue = ref('')\n\nconst { forwardRef, currentElement: rootNavigationMenu } = useForwardExpose()\n\nconst indicatorTrack = ref<HTMLElement>()\nconst viewport = ref<HTMLElement>()\nconst activeTrigger = ref<HTMLElement>()\n\nconst { getItems, CollectionSlot } = useCollection({ key: 'NavigationMenu', isProvider: true })\n\nconst { delayDuration, skipDelayDuration, dir: propDir, disableClickTrigger, disableHoverTrigger, unmountOnHide } = toRefs(props)\nconst dir = useDirection(propDir)\n\nconst isDelaySkipped = refAutoReset(false, skipDelayDuration)\nconst skipNextClose = ref(false)\nconst computedDelay = computed(() => {\n  const isOpen = modelValue.value !== ''\n  if (isOpen || isDelaySkipped.value)\n    return 150 // 150ms for user to switch trigger or move into content view\n  else return delayDuration.value\n})\n\nconst debouncedFn = useDebounceFn((val?: string) => {\n  // passing `undefined` meant to reset the debounce timer\n  if (typeof val === 'string') {\n    if (val === '' && skipNextClose.value) {\n      skipNextClose.value = false\n      return\n    }\n    previousValue.value = modelValue.value\n    modelValue.value = val\n    if (val === '')\n      isDelaySkipped.value = true\n  }\n}, computedDelay)\n\nwatchEffect(() => {\n  if (!modelValue.value)\n    return\n\n  const items = getItems().map(i => i.ref)\n  activeTrigger.value = items.find(item =>\n    item.id.includes(modelValue.value),\n  )\n})\n\nuseEventListener(rootNavigationMenu, EVENT_ROOT_CONTENT_DISMISS, onItemDismiss)\n\nprovideNavigationMenuContext({\n  isRootMenu: true,\n  modelValue,\n  previousValue,\n  baseId: useId(undefined, 'reka-navigation-menu'),\n  disableClickTrigger,\n  disableHoverTrigger,\n  dir,\n  unmountOnHide,\n  orientation: props.orientation,\n  rootNavigationMenu,\n  indicatorTrack,\n  activeTrigger,\n  onIndicatorTrackChange: (val) => {\n    indicatorTrack.value = val\n  },\n  viewport,\n  onViewportChange: (val) => {\n    viewport.value = val\n  },\n  onTriggerEnter: (val) => {\n    if (modelValue.value !== '') {\n      skipNextClose.value = true\n      previousValue.value = modelValue.value\n      modelValue.value = val\n    }\n    else {\n      debouncedFn(val)\n    }\n  },\n  onTriggerLeave: () => {\n    skipNextClose.value = false\n    debouncedFn('')\n  },\n  onContentEnter: () => {\n    debouncedFn()\n  },\n  onContentLeave: () => {\n    if (!props.disablePointerLeaveClose) {\n      skipNextClose.value = false\n      debouncedFn('')\n    }\n  },\n  onItemSelect: (val) => {\n    // When selecting item we trigger update immediately\n    previousValue.value = modelValue.value\n    modelValue.value = val\n  },\n  onItemDismiss,\n})\n\nfunction onItemDismiss() {\n  previousValue.value = modelValue.value\n  modelValue.value = ''\n}\n</script>\n\n<template>\n  <CollectionSlot>\n    <Primitive\n      :ref=\"forwardRef\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :data-orientation=\"orientation\"\n      :dir=\"dir\"\n      data-reka-navigation-menu\n    >\n      <slot :model-value=\"modelValue\" />\n    </Primitive>\n  </CollectionSlot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\n\nimport type { Direction, Orientation } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useCollection } from '@/Collection'\nimport { createContext, useDirection, useForwardExpose, useId } from '@/shared'\nimport { EVENT_ROOT_CONTENT_DISMISS } from './utils'\n\nexport interface NavigationMenuRootProps extends PrimitiveProps {\n  /** The controlled value of the menu item to activate. Can be used as `v-model`. */\n  modelValue?: string\n  /**\n   * The value of the menu item that should be active when initially rendered.\n   *\n   * Use when you do not need to control the value state.\n   */\n  defaultValue?: string\n  /**\n   * The reading direction of the combobox when applicable.\n   *\n   *  If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode.\n   */\n  dir?: Direction\n  /** The orientation of the menu. */\n  orientation?: Orientation\n  /**\n   * The duration from when the pointer enters the trigger until the tooltip gets opened.\n   * @defaultValue 200\n   */\n  delayDuration?: number\n  /**\n   * How much time a user has to enter another trigger without incurring a delay again.\n   * @defaultValue 300\n   */\n  skipDelayDuration?: number\n\n  /**\n   * If `true`, menu cannot be open by click on trigger\n   * @defaultValue false\n   */\n  disableClickTrigger?: boolean\n  /**\n   * If `true`, menu cannot be open by hover on trigger\n   * @defaultValue false\n   */\n  disableHoverTrigger?: boolean\n  /**\n   * If `true`, menu will not close during pointer leave event\n   * @defaultValue false\n   */\n  disablePointerLeaveClose?: boolean\n\n  /**\n   * When `true`, the element will be unmounted on closed state.\n   *\n   * @defaultValue `true`\n   */\n  unmountOnHide?: boolean\n}\nexport type NavigationMenuRootEmits = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [value: string]\n}\n\nexport interface NavigationMenuContext {\n  isRootMenu: boolean\n  modelValue: Ref<string>\n  previousValue: Ref<string>\n  baseId: string\n  dir: Ref<Direction>\n  orientation: Orientation\n  disableClickTrigger: Ref<boolean>\n  disableHoverTrigger: Ref<boolean>\n  unmountOnHide: Ref<boolean>\n  rootNavigationMenu: Ref<HTMLElement | undefined>\n  activeTrigger: Ref<HTMLElement | undefined>\n  indicatorTrack: Ref<HTMLElement | undefined>\n  onIndicatorTrackChange: (indicatorTrack: HTMLElement | undefined) => void\n  viewport: Ref<HTMLElement | undefined>\n  onViewportChange: (viewport: HTMLElement | undefined) => void\n  onTriggerEnter: (itemValue: string) => void\n  onTriggerLeave: () => void\n  onContentEnter: (itemValue: string) => void\n  onContentLeave: () => void\n  onItemSelect: (itemValue: string) => void\n  onItemDismiss: () => void\n}\n\nexport const [injectNavigationMenuContext, provideNavigationMenuContext]\n  = createContext<NavigationMenuContext>(['NavigationMenuRoot', 'NavigationMenuSub'], 'NavigationMenuContext')\n</script>\n\n<script setup lang=\"ts\">\nimport { refAutoReset, useDebounceFn, useEventListener, useVModel } from '@vueuse/core'\nimport {\n  computed,\n  ref,\n  toRefs,\n  watchEffect,\n} from 'vue'\nimport {\n  Primitive,\n} from '@/Primitive'\n\nconst props = withDefaults(defineProps<NavigationMenuRootProps>(), {\n  modelValue: undefined,\n  delayDuration: 200,\n  skipDelayDuration: 300,\n  orientation: 'horizontal',\n  disableClickTrigger: false,\n  disableHoverTrigger: false,\n  unmountOnHide: true,\n  as: 'nav',\n})\nconst emits = defineEmits<NavigationMenuRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? '',\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<string>\nconst previousValue = ref('')\n\nconst { forwardRef, currentElement: rootNavigationMenu } = useForwardExpose()\n\nconst indicatorTrack = ref<HTMLElement>()\nconst viewport = ref<HTMLElement>()\nconst activeTrigger = ref<HTMLElement>()\n\nconst { getItems, CollectionSlot } = useCollection({ key: 'NavigationMenu', isProvider: true })\n\nconst { delayDuration, skipDelayDuration, dir: propDir, disableClickTrigger, disableHoverTrigger, unmountOnHide } = toRefs(props)\nconst dir = useDirection(propDir)\n\nconst isDelaySkipped = refAutoReset(false, skipDelayDuration)\nconst skipNextClose = ref(false)\nconst computedDelay = computed(() => {\n  const isOpen = modelValue.value !== ''\n  if (isOpen || isDelaySkipped.value)\n    return 150 // 150ms for user to switch trigger or move into content view\n  else return delayDuration.value\n})\n\nconst debouncedFn = useDebounceFn((val?: string) => {\n  // passing `undefined` meant to reset the debounce timer\n  if (typeof val === 'string') {\n    if (val === '' && skipNextClose.value) {\n      skipNextClose.value = false\n      return\n    }\n    previousValue.value = modelValue.value\n    modelValue.value = val\n    if (val === '')\n      isDelaySkipped.value = true\n  }\n}, computedDelay)\n\nwatchEffect(() => {\n  if (!modelValue.value)\n    return\n\n  const items = getItems().map(i => i.ref)\n  activeTrigger.value = items.find(item =>\n    item.id.includes(modelValue.value),\n  )\n})\n\nuseEventListener(rootNavigationMenu, EVENT_ROOT_CONTENT_DISMISS, onItemDismiss)\n\nprovideNavigationMenuContext({\n  isRootMenu: true,\n  modelValue,\n  previousValue,\n  baseId: useId(undefined, 'reka-navigation-menu'),\n  disableClickTrigger,\n  disableHoverTrigger,\n  dir,\n  unmountOnHide,\n  orientation: props.orientation,\n  rootNavigationMenu,\n  indicatorTrack,\n  activeTrigger,\n  onIndicatorTrackChange: (val) => {\n    indicatorTrack.value = val\n  },\n  viewport,\n  onViewportChange: (val) => {\n    viewport.value = val\n  },\n  onTriggerEnter: (val) => {\n    if (modelValue.value !== '') {\n      skipNextClose.value = true\n      previousValue.value = modelValue.value\n      modelValue.value = val\n    }\n    else {\n      debouncedFn(val)\n    }\n  },\n  onTriggerLeave: () => {\n    skipNextClose.value = false\n    debouncedFn('')\n  },\n  onContentEnter: () => {\n    debouncedFn()\n  },\n  onContentLeave: () => {\n    if (!props.disablePointerLeaveClose) {\n      skipNextClose.value = false\n      debouncedFn('')\n    }\n  },\n  onItemSelect: (val) => {\n    // When selecting item we trigger update immediately\n    previousValue.value = modelValue.value\n    modelValue.value = val\n  },\n  onItemDismiss,\n})\n\nfunction onItemDismiss() {\n  previousValue.value = modelValue.value\n  modelValue.value = ''\n}\n</script>\n\n<template>\n  <CollectionSlot>\n    <Primitive\n      :ref=\"forwardRef\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :data-orientation=\"orientation\"\n      :dir=\"dir\"\n      data-reka-navigation-menu\n    >\n      <slot :model-value=\"modelValue\" />\n    </Primitive>\n  </CollectionSlot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useCollection } from '@/Collection'\nimport { createContext, getActiveElement, useArrowNavigation, useForwardExpose, useId } from '@/shared'\n\nexport interface NavigationMenuItemProps extends PrimitiveProps {\n  /**\n   * A unique value that associates the item with an active value when the navigation menu is controlled.\n   *\n   *  This prop is managed automatically when uncontrolled.\n   */\n  value?: string\n}\n\nexport type NavigationMenuItemContext = {\n  value: string\n  contentId: string\n  triggerRef: Ref<HTMLElement | undefined>\n  focusProxyRef: Ref<HTMLElement | undefined>\n  wasEscapeCloseRef: Ref<boolean>\n  onEntryKeyDown: () => void\n  onFocusProxyEnter: (side: 'start' | 'end') => void\n  onContentFocusOutside: () => void\n  onRootContentClose: () => void\n}\n\nexport const [injectNavigationMenuItemContext, provideNavigationMenuItemContext]\n  = createContext<NavigationMenuItemContext>('NavigationMenuItem')\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectNavigationMenuContext } from './NavigationMenuRoot.vue'\nimport {\n  focusFirst,\n  getTabbableCandidates,\n  makeContentId,\n  removeFromTabOrder,\n} from './utils'\n\nconst props = withDefaults(defineProps<NavigationMenuItemProps>(), {\n  as: 'li',\n})\n\nuseForwardExpose()\nconst { getItems } = useCollection({ key: 'NavigationMenu' })\n\nconst context = injectNavigationMenuContext()\n\nconst value = useId(props.value)\nconst triggerRef = ref<HTMLElement>()\nconst focusProxyRef = ref<HTMLElement>()\n\nconst contentId = makeContentId(context.baseId, value)\n\nlet restoreContentTabOrderRef: () => void = () => ({})\n\nconst wasEscapeCloseRef = ref(false)\nasync function handleContentEntry(side = 'start') {\n  const el = document.getElementById(contentId)\n  if (el) {\n    restoreContentTabOrderRef()\n    const candidates = getTabbableCandidates(el)\n    if (candidates.length)\n      focusFirst(side === 'start' ? candidates : candidates.reverse())\n  }\n}\n\nfunction handleContentExit() {\n  const el = document.getElementById(contentId)\n  if (el) {\n    const candidates = getTabbableCandidates(el)\n    if (candidates.length)\n      restoreContentTabOrderRef = removeFromTabOrder(candidates)\n  }\n}\n\nprovideNavigationMenuItemContext({\n  value,\n  contentId,\n  triggerRef,\n  focusProxyRef,\n  wasEscapeCloseRef,\n  onEntryKeyDown: handleContentEntry,\n  onFocusProxyEnter: handleContentEntry,\n  onContentFocusOutside: handleContentExit,\n  onRootContentClose: handleContentExit,\n})\n\nfunction handleClose() {\n  context.onItemDismiss()\n  triggerRef.value?.focus()\n}\n\nfunction handleKeydown(ev: KeyboardEvent) {\n  const currentFocus = getActiveElement() as HTMLElement\n  if (ev.keyCode === 32 || ev.key === 'Enter') {\n    if (context.modelValue.value === value) {\n      handleClose()\n      ev.preventDefault()\n      return\n    }\n    else {\n      (ev.target as HTMLElement).click()\n      ev.preventDefault()\n      return\n    }\n  }\n\n  const itemsArray = getItems().filter(i =>\n    i.ref.parentElement?.hasAttribute('data-menu-item'),\n  ).map(i => i.ref)\n\n  // prevent triggering when the focus is on link\n  if (!itemsArray.includes(currentFocus))\n    return\n\n  const newSelectedElement = useArrowNavigation(ev, currentFocus, undefined, {\n    itemsArray,\n    loop: false,\n  })\n\n  if (newSelectedElement)\n    newSelectedElement?.focus()\n\n  ev.preventDefault()\n  ev.stopPropagation()\n}\n</script>\n\n<template>\n  <Primitive\n    :as-child=\"asChild\"\n    :as=\"as\"\n    data-menu-item\n    @keydown.up.down.left.right.home.end.space=\"handleKeydown\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useCollection } from '@/Collection'\nimport { createContext, getActiveElement, useArrowNavigation, useForwardExpose, useId } from '@/shared'\n\nexport interface NavigationMenuItemProps extends PrimitiveProps {\n  /**\n   * A unique value that associates the item with an active value when the navigation menu is controlled.\n   *\n   *  This prop is managed automatically when uncontrolled.\n   */\n  value?: string\n}\n\nexport type NavigationMenuItemContext = {\n  value: string\n  contentId: string\n  triggerRef: Ref<HTMLElement | undefined>\n  focusProxyRef: Ref<HTMLElement | undefined>\n  wasEscapeCloseRef: Ref<boolean>\n  onEntryKeyDown: () => void\n  onFocusProxyEnter: (side: 'start' | 'end') => void\n  onContentFocusOutside: () => void\n  onRootContentClose: () => void\n}\n\nexport const [injectNavigationMenuItemContext, provideNavigationMenuItemContext]\n  = createContext<NavigationMenuItemContext>('NavigationMenuItem')\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectNavigationMenuContext } from './NavigationMenuRoot.vue'\nimport {\n  focusFirst,\n  getTabbableCandidates,\n  makeContentId,\n  removeFromTabOrder,\n} from './utils'\n\nconst props = withDefaults(defineProps<NavigationMenuItemProps>(), {\n  as: 'li',\n})\n\nuseForwardExpose()\nconst { getItems } = useCollection({ key: 'NavigationMenu' })\n\nconst context = injectNavigationMenuContext()\n\nconst value = useId(props.value)\nconst triggerRef = ref<HTMLElement>()\nconst focusProxyRef = ref<HTMLElement>()\n\nconst contentId = makeContentId(context.baseId, value)\n\nlet restoreContentTabOrderRef: () => void = () => ({})\n\nconst wasEscapeCloseRef = ref(false)\nasync function handleContentEntry(side = 'start') {\n  const el = document.getElementById(contentId)\n  if (el) {\n    restoreContentTabOrderRef()\n    const candidates = getTabbableCandidates(el)\n    if (candidates.length)\n      focusFirst(side === 'start' ? candidates : candidates.reverse())\n  }\n}\n\nfunction handleContentExit() {\n  const el = document.getElementById(contentId)\n  if (el) {\n    const candidates = getTabbableCandidates(el)\n    if (candidates.length)\n      restoreContentTabOrderRef = removeFromTabOrder(candidates)\n  }\n}\n\nprovideNavigationMenuItemContext({\n  value,\n  contentId,\n  triggerRef,\n  focusProxyRef,\n  wasEscapeCloseRef,\n  onEntryKeyDown: handleContentEntry,\n  onFocusProxyEnter: handleContentEntry,\n  onContentFocusOutside: handleContentExit,\n  onRootContentClose: handleContentExit,\n})\n\nfunction handleClose() {\n  context.onItemDismiss()\n  triggerRef.value?.focus()\n}\n\nfunction handleKeydown(ev: KeyboardEvent) {\n  const currentFocus = getActiveElement() as HTMLElement\n  if (ev.keyCode === 32 || ev.key === 'Enter') {\n    if (context.modelValue.value === value) {\n      handleClose()\n      ev.preventDefault()\n      return\n    }\n    else {\n      (ev.target as HTMLElement).click()\n      ev.preventDefault()\n      return\n    }\n  }\n\n  const itemsArray = getItems().filter(i =>\n    i.ref.parentElement?.hasAttribute('data-menu-item'),\n  ).map(i => i.ref)\n\n  // prevent triggering when the focus is on link\n  if (!itemsArray.includes(currentFocus))\n    return\n\n  const newSelectedElement = useArrowNavigation(ev, currentFocus, undefined, {\n    itemsArray,\n    loop: false,\n  })\n\n  if (newSelectedElement)\n    newSelectedElement?.focus()\n\n  ev.preventDefault()\n  ev.stopPropagation()\n}\n</script>\n\n<template>\n  <Primitive\n    :as-child=\"asChild\"\n    :as=\"as\"\n    data-menu-item\n    @keydown.up.down.left.right.home.end.space=\"handleKeydown\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type {\n  DismissableLayerEmits,\n  DismissableLayerProps,\n  FocusOutsideEvent,\n} from '@/DismissableLayer'\nimport type { PointerDownOutsideEvent } from '@/DismissableLayer/utils'\nimport { useCollection } from '@/Collection'\n\ntype MotionAttribute = 'to-start' | 'to-end' | 'from-start' | 'from-end'\n\nexport type NavigationMenuContentImplEmits = DismissableLayerEmits\n\nexport interface NavigationMenuContentImplProps extends DismissableLayerProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watchEffect } from 'vue'\nimport { DismissableLayer } from '@/DismissableLayer'\nimport { getActiveElement, useArrowNavigation, useForwardExpose } from '@/shared'\nimport { injectNavigationMenuItemContext } from './NavigationMenuItem.vue'\nimport { injectNavigationMenuContext } from './NavigationMenuRoot.vue'\nimport {\n  EVENT_ROOT_CONTENT_DISMISS,\n  focusFirst,\n  getOpenState,\n  getTabbableCandidates,\n  makeContentId,\n  makeTriggerId,\n} from './utils'\n\nconst props = defineProps<NavigationMenuContentImplProps>()\nconst emits = defineEmits<NavigationMenuContentImplEmits>()\n\nconst { getItems } = useCollection({ key: 'NavigationMenu' })\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst menuContext = injectNavigationMenuContext()\nconst itemContext = injectNavigationMenuItemContext()\n\nconst triggerId = makeTriggerId(menuContext.baseId, itemContext.value)\nconst contentId = makeContentId(menuContext.baseId, itemContext.value)\n\nconst prevMotionAttributeRef = ref<MotionAttribute | null>(null)\nconst motionAttribute = computed(() => {\n  const values = getItems().map(i => i.ref.id.split('trigger-')[1])\n  if (menuContext.dir.value === 'rtl')\n    values.reverse()\n  const index = values.indexOf(menuContext.modelValue.value)\n  const prevIndex = values.indexOf(menuContext.previousValue.value)\n  const isSelected = itemContext.value === menuContext.modelValue.value\n  const wasSelected = prevIndex === values.indexOf(itemContext.value)\n\n  // We only want to update selected and the last selected content\n  // this avoids animations being interrupted outside of that range\n  if (!isSelected && !wasSelected)\n    return prevMotionAttributeRef.value\n\n  const attribute = (() => {\n    // Don't provide a direction on the initial open\n    if (index !== prevIndex) {\n      // If we're moving to this item from another\n      if (isSelected && prevIndex !== -1)\n        return index > prevIndex ? 'from-end' : 'from-start'\n      // If we're leaving this item for another\n      if (wasSelected && index !== -1)\n        return index > prevIndex ? 'to-start' : 'to-end'\n    }\n    // Otherwise we're entering from closed or leaving the list\n    // entirely and should not animate in any direction\n    return null\n  })()\n\n  // eslint-disable-next-line vue/no-side-effects-in-computed-properties\n  prevMotionAttributeRef.value = attribute\n  return attribute\n})\n\nfunction handleFocusOutside(ev: FocusOutsideEvent) {\n  emits('focusOutside', ev)\n  emits('interactOutside', ev)\n\n  const target = ev.detail.originalEvent.target as HTMLElement\n  if (target.hasAttribute('data-navigation-menu-trigger'))\n    ev.preventDefault()\n\n  if (!ev.defaultPrevented) {\n    itemContext.onContentFocusOutside()\n\n    const target = ev.target as HTMLElement\n    // Only dismiss content when focus moves outside of the menu\n    if (menuContext.rootNavigationMenu?.value?.contains(target))\n      ev.preventDefault()\n  }\n}\n\nfunction handlePointerDownOutside(ev: PointerDownOutsideEvent) {\n  emits('pointerDownOutside', ev)\n\n  if (!ev.defaultPrevented) {\n    const target = ev.target as HTMLElement\n    const isTrigger = getItems().some(i =>\n      i.ref.contains(target),\n    )\n    const isRootViewport\n      = menuContext.isRootMenu && menuContext.viewport.value?.contains(target)\n\n    if (isTrigger || isRootViewport || !menuContext.isRootMenu)\n      ev.preventDefault()\n  }\n}\n\nwatchEffect((cleanupFn) => {\n  const content = currentElement.value\n  if (menuContext.isRootMenu && content) {\n    // Bubble dismiss to the root content node and focus its trigger\n    const handleClose = () => {\n      menuContext.onItemDismiss()\n      itemContext.onRootContentClose()\n      if (content.contains(getActiveElement()))\n        itemContext.triggerRef.value?.focus()\n    }\n    content.addEventListener(EVENT_ROOT_CONTENT_DISMISS, handleClose)\n\n    cleanupFn(() =>\n      content.removeEventListener(EVENT_ROOT_CONTENT_DISMISS, handleClose),\n    )\n  }\n})\n\nfunction handleEscapeKeyDown(ev: KeyboardEvent) {\n  emits('escapeKeyDown', ev)\n\n  if (!ev.defaultPrevented) {\n    menuContext.onItemDismiss()\n    itemContext.triggerRef?.value?.focus()\n    itemContext.wasEscapeCloseRef.value = true\n  }\n}\n\nfunction handleKeydown(ev: KeyboardEvent) {\n  // prevent parent menu triggering keydown event\n  if ((ev.target as HTMLElement).closest('[data-reka-navigation-menu]') !== menuContext.rootNavigationMenu.value)\n    return\n\n  const isMetaKey = ev.altKey || ev.ctrlKey || ev.metaKey\n  const isTabKey = ev.key === 'Tab' && !isMetaKey\n  const candidates = getTabbableCandidates(ev.currentTarget as HTMLElement)\n\n  if (isTabKey) {\n    const focusedElement = getActiveElement()\n    const index = candidates.findIndex(\n      candidate => candidate === focusedElement,\n    )\n    const isMovingBackwards = ev.shiftKey\n    const nextCandidates = isMovingBackwards\n      ? candidates.slice(0, index).reverse()\n      : candidates.slice(index + 1, candidates.length)\n\n    if (focusFirst(nextCandidates)) {\n      // prevent browser tab keydown because we've handled focus\n      ev.preventDefault()\n    }\n    else {\n      // If we can't focus that means we're at the edges\n      // so focus the proxy and let browser handle\n      // tab/shift+tab keypress on the proxy instead\n      itemContext.focusProxyRef.value?.focus()\n      return\n    }\n  }\n\n  const newSelectedElement = useArrowNavigation(\n    ev,\n    getActiveElement() as HTMLElement,\n    undefined,\n    { itemsArray: candidates, loop: false, enableIgnoredElement: true },\n  )\n  newSelectedElement?.focus()\n}\n\nfunction handleDismiss() {\n  if (menuContext.modelValue.value !== itemContext.value)\n    return\n\n  const rootContentDismissEvent = new Event(EVENT_ROOT_CONTENT_DISMISS, {\n    bubbles: true,\n    cancelable: true,\n  })\n  currentElement.value?.dispatchEvent(rootContentDismissEvent)\n}\n</script>\n\n<template>\n  <DismissableLayer\n    :id=\"contentId\"\n    :ref=\"forwardRef\"\n    :aria-labelledby=\"triggerId\"\n    :data-motion=\"motionAttribute\"\n    :data-state=\"getOpenState(menuContext.modelValue.value === itemContext.value)\"\n    :data-orientation=\"menuContext.orientation\"\n    v-bind=\"props\"\n    @keydown=\"handleKeydown\"\n    @escape-key-down=\"handleEscapeKeyDown\"\n    @pointer-down-outside=\"handlePointerDownOutside\"\n    @focus-outside=\"handleFocusOutside\"\n    @dismiss=\"handleDismiss\"\n  >\n    <slot />\n  </DismissableLayer>\n</template>\n","<script lang=\"ts\">\nimport type {\n  DismissableLayerEmits,\n  DismissableLayerProps,\n  FocusOutsideEvent,\n} from '@/DismissableLayer'\nimport type { PointerDownOutsideEvent } from '@/DismissableLayer/utils'\nimport { useCollection } from '@/Collection'\n\ntype MotionAttribute = 'to-start' | 'to-end' | 'from-start' | 'from-end'\n\nexport type NavigationMenuContentImplEmits = DismissableLayerEmits\n\nexport interface NavigationMenuContentImplProps extends DismissableLayerProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watchEffect } from 'vue'\nimport { DismissableLayer } from '@/DismissableLayer'\nimport { getActiveElement, useArrowNavigation, useForwardExpose } from '@/shared'\nimport { injectNavigationMenuItemContext } from './NavigationMenuItem.vue'\nimport { injectNavigationMenuContext } from './NavigationMenuRoot.vue'\nimport {\n  EVENT_ROOT_CONTENT_DISMISS,\n  focusFirst,\n  getOpenState,\n  getTabbableCandidates,\n  makeContentId,\n  makeTriggerId,\n} from './utils'\n\nconst props = defineProps<NavigationMenuContentImplProps>()\nconst emits = defineEmits<NavigationMenuContentImplEmits>()\n\nconst { getItems } = useCollection({ key: 'NavigationMenu' })\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst menuContext = injectNavigationMenuContext()\nconst itemContext = injectNavigationMenuItemContext()\n\nconst triggerId = makeTriggerId(menuContext.baseId, itemContext.value)\nconst contentId = makeContentId(menuContext.baseId, itemContext.value)\n\nconst prevMotionAttributeRef = ref<MotionAttribute | null>(null)\nconst motionAttribute = computed(() => {\n  const values = getItems().map(i => i.ref.id.split('trigger-')[1])\n  if (menuContext.dir.value === 'rtl')\n    values.reverse()\n  const index = values.indexOf(menuContext.modelValue.value)\n  const prevIndex = values.indexOf(menuContext.previousValue.value)\n  const isSelected = itemContext.value === menuContext.modelValue.value\n  const wasSelected = prevIndex === values.indexOf(itemContext.value)\n\n  // We only want to update selected and the last selected content\n  // this avoids animations being interrupted outside of that range\n  if (!isSelected && !wasSelected)\n    return prevMotionAttributeRef.value\n\n  const attribute = (() => {\n    // Don't provide a direction on the initial open\n    if (index !== prevIndex) {\n      // If we're moving to this item from another\n      if (isSelected && prevIndex !== -1)\n        return index > prevIndex ? 'from-end' : 'from-start'\n      // If we're leaving this item for another\n      if (wasSelected && index !== -1)\n        return index > prevIndex ? 'to-start' : 'to-end'\n    }\n    // Otherwise we're entering from closed or leaving the list\n    // entirely and should not animate in any direction\n    return null\n  })()\n\n  // eslint-disable-next-line vue/no-side-effects-in-computed-properties\n  prevMotionAttributeRef.value = attribute\n  return attribute\n})\n\nfunction handleFocusOutside(ev: FocusOutsideEvent) {\n  emits('focusOutside', ev)\n  emits('interactOutside', ev)\n\n  const target = ev.detail.originalEvent.target as HTMLElement\n  if (target.hasAttribute('data-navigation-menu-trigger'))\n    ev.preventDefault()\n\n  if (!ev.defaultPrevented) {\n    itemContext.onContentFocusOutside()\n\n    const target = ev.target as HTMLElement\n    // Only dismiss content when focus moves outside of the menu\n    if (menuContext.rootNavigationMenu?.value?.contains(target))\n      ev.preventDefault()\n  }\n}\n\nfunction handlePointerDownOutside(ev: PointerDownOutsideEvent) {\n  emits('pointerDownOutside', ev)\n\n  if (!ev.defaultPrevented) {\n    const target = ev.target as HTMLElement\n    const isTrigger = getItems().some(i =>\n      i.ref.contains(target),\n    )\n    const isRootViewport\n      = menuContext.isRootMenu && menuContext.viewport.value?.contains(target)\n\n    if (isTrigger || isRootViewport || !menuContext.isRootMenu)\n      ev.preventDefault()\n  }\n}\n\nwatchEffect((cleanupFn) => {\n  const content = currentElement.value\n  if (menuContext.isRootMenu && content) {\n    // Bubble dismiss to the root content node and focus its trigger\n    const handleClose = () => {\n      menuContext.onItemDismiss()\n      itemContext.onRootContentClose()\n      if (content.contains(getActiveElement()))\n        itemContext.triggerRef.value?.focus()\n    }\n    content.addEventListener(EVENT_ROOT_CONTENT_DISMISS, handleClose)\n\n    cleanupFn(() =>\n      content.removeEventListener(EVENT_ROOT_CONTENT_DISMISS, handleClose),\n    )\n  }\n})\n\nfunction handleEscapeKeyDown(ev: KeyboardEvent) {\n  emits('escapeKeyDown', ev)\n\n  if (!ev.defaultPrevented) {\n    menuContext.onItemDismiss()\n    itemContext.triggerRef?.value?.focus()\n    itemContext.wasEscapeCloseRef.value = true\n  }\n}\n\nfunction handleKeydown(ev: KeyboardEvent) {\n  // prevent parent menu triggering keydown event\n  if ((ev.target as HTMLElement).closest('[data-reka-navigation-menu]') !== menuContext.rootNavigationMenu.value)\n    return\n\n  const isMetaKey = ev.altKey || ev.ctrlKey || ev.metaKey\n  const isTabKey = ev.key === 'Tab' && !isMetaKey\n  const candidates = getTabbableCandidates(ev.currentTarget as HTMLElement)\n\n  if (isTabKey) {\n    const focusedElement = getActiveElement()\n    const index = candidates.findIndex(\n      candidate => candidate === focusedElement,\n    )\n    const isMovingBackwards = ev.shiftKey\n    const nextCandidates = isMovingBackwards\n      ? candidates.slice(0, index).reverse()\n      : candidates.slice(index + 1, candidates.length)\n\n    if (focusFirst(nextCandidates)) {\n      // prevent browser tab keydown because we've handled focus\n      ev.preventDefault()\n    }\n    else {\n      // If we can't focus that means we're at the edges\n      // so focus the proxy and let browser handle\n      // tab/shift+tab keypress on the proxy instead\n      itemContext.focusProxyRef.value?.focus()\n      return\n    }\n  }\n\n  const newSelectedElement = useArrowNavigation(\n    ev,\n    getActiveElement() as HTMLElement,\n    undefined,\n    { itemsArray: candidates, loop: false, enableIgnoredElement: true },\n  )\n  newSelectedElement?.focus()\n}\n\nfunction handleDismiss() {\n  if (menuContext.modelValue.value !== itemContext.value)\n    return\n\n  const rootContentDismissEvent = new Event(EVENT_ROOT_CONTENT_DISMISS, {\n    bubbles: true,\n    cancelable: true,\n  })\n  currentElement.value?.dispatchEvent(rootContentDismissEvent)\n}\n</script>\n\n<template>\n  <DismissableLayer\n    :id=\"contentId\"\n    :ref=\"forwardRef\"\n    :aria-labelledby=\"triggerId\"\n    :data-motion=\"motionAttribute\"\n    :data-state=\"getOpenState(menuContext.modelValue.value === itemContext.value)\"\n    :data-orientation=\"menuContext.orientation\"\n    v-bind=\"props\"\n    @keydown=\"handleKeydown\"\n    @escape-key-down=\"handleEscapeKeyDown\"\n    @pointer-down-outside=\"handlePointerDownOutside\"\n    @focus-outside=\"handleFocusOutside\"\n    @dismiss=\"handleDismiss\"\n  >\n    <slot />\n  </DismissableLayer>\n</template>\n","<script lang=\"ts\">\nimport type { NavigationMenuContentImplEmits, NavigationMenuContentImplProps } from './NavigationMenuContentImpl.vue'\n\nexport type NavigationMenuContentEmits = NavigationMenuContentImplEmits\n\nexport interface NavigationMenuContentProps extends NavigationMenuContentImplProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { isClient, reactiveOmit } from '@vueuse/shared'\nimport { computed } from 'vue'\nimport { Presence } from '@/Presence'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\nimport NavigationMenuContentImpl from './NavigationMenuContentImpl.vue'\nimport { injectNavigationMenuItemContext } from './NavigationMenuItem.vue'\nimport { injectNavigationMenuContext } from './NavigationMenuRoot.vue'\nimport { getOpenState, whenMouse } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<NavigationMenuContentProps>()\nconst emits = defineEmits<NavigationMenuContentEmits>()\n\nconst forwarded = useForwardPropsEmits(reactiveOmit(props, 'forceMount'), emits)\nconst { forwardRef } = useForwardExpose()\n\nconst menuContext = injectNavigationMenuContext()\nconst itemContext = injectNavigationMenuItemContext()\n\nconst open = computed(() => itemContext.value === menuContext.modelValue.value)\n\n// We persist the last active content value as the viewport may be animating out\n// and we want the content to remain mounted for the lifecycle of the viewport.\nconst isLastActiveValue = computed(() => {\n  if (menuContext.viewport.value) {\n    if (!menuContext.modelValue.value && menuContext.previousValue.value)\n      return (menuContext.previousValue.value === itemContext.value)\n  }\n  return false\n})\n</script>\n\n<template>\n  <Teleport\n    :to=\"isClient && menuContext.viewport.value ? menuContext.viewport.value : 'body'\"\n    :disabled=\"isClient && menuContext.viewport.value ? !menuContext.viewport.value : true\"\n  >\n    <Presence\n      v-slot=\"{ present }\"\n      :present=\"forceMount || open || isLastActiveValue\"\n      :force-mount=\"!menuContext.unmountOnHide.value\"\n    >\n      <NavigationMenuContentImpl\n        :ref=\"forwardRef\"\n        :data-state=\"getOpenState(open)\"\n        :style=\"{\n          pointerEvents: !open && menuContext.isRootMenu ? 'none' : undefined,\n        }\"\n        v-bind=\"{ ...$attrs, ...forwarded }\"\n        :hidden=\"!present\"\n        @pointerenter=\"menuContext.onContentEnter(itemContext.value)\"\n        @pointerleave=\"whenMouse(() => menuContext.onContentLeave())($event)\"\n        @pointer-down-outside=\"emits('pointerDownOutside', $event)\"\n        @focus-outside=\"emits('focusOutside', $event)\"\n        @interact-outside=\"emits('interactOutside', $event)\"\n      >\n        <slot />\n      </NavigationMenuContentImpl>\n    </Presence>\n  </Teleport>\n</template>\n","<script lang=\"ts\">\nimport type { NavigationMenuContentImplEmits, NavigationMenuContentImplProps } from './NavigationMenuContentImpl.vue'\n\nexport type NavigationMenuContentEmits = NavigationMenuContentImplEmits\n\nexport interface NavigationMenuContentProps extends NavigationMenuContentImplProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { isClient, reactiveOmit } from '@vueuse/shared'\nimport { computed } from 'vue'\nimport { Presence } from '@/Presence'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\nimport NavigationMenuContentImpl from './NavigationMenuContentImpl.vue'\nimport { injectNavigationMenuItemContext } from './NavigationMenuItem.vue'\nimport { injectNavigationMenuContext } from './NavigationMenuRoot.vue'\nimport { getOpenState, whenMouse } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<NavigationMenuContentProps>()\nconst emits = defineEmits<NavigationMenuContentEmits>()\n\nconst forwarded = useForwardPropsEmits(reactiveOmit(props, 'forceMount'), emits)\nconst { forwardRef } = useForwardExpose()\n\nconst menuContext = injectNavigationMenuContext()\nconst itemContext = injectNavigationMenuItemContext()\n\nconst open = computed(() => itemContext.value === menuContext.modelValue.value)\n\n// We persist the last active content value as the viewport may be animating out\n// and we want the content to remain mounted for the lifecycle of the viewport.\nconst isLastActiveValue = computed(() => {\n  if (menuContext.viewport.value) {\n    if (!menuContext.modelValue.value && menuContext.previousValue.value)\n      return (menuContext.previousValue.value === itemContext.value)\n  }\n  return false\n})\n</script>\n\n<template>\n  <Teleport\n    :to=\"isClient && menuContext.viewport.value ? menuContext.viewport.value : 'body'\"\n    :disabled=\"isClient && menuContext.viewport.value ? !menuContext.viewport.value : true\"\n  >\n    <Presence\n      v-slot=\"{ present }\"\n      :present=\"forceMount || open || isLastActiveValue\"\n      :force-mount=\"!menuContext.unmountOnHide.value\"\n    >\n      <NavigationMenuContentImpl\n        :ref=\"forwardRef\"\n        :data-state=\"getOpenState(open)\"\n        :style=\"{\n          pointerEvents: !open && menuContext.isRootMenu ? 'none' : undefined,\n        }\"\n        v-bind=\"{ ...$attrs, ...forwarded }\"\n        :hidden=\"!present\"\n        @pointerenter=\"menuContext.onContentEnter(itemContext.value)\"\n        @pointerleave=\"whenMouse(() => menuContext.onContentLeave())($event)\"\n        @pointer-down-outside=\"emits('pointerDownOutside', $event)\"\n        @focus-outside=\"emits('focusOutside', $event)\"\n        @interact-outside=\"emits('interactOutside', $event)\"\n      >\n        <slot />\n      </NavigationMenuContentImpl>\n    </Presence>\n  </Teleport>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface NavigationMenuIndicatorProps extends PrimitiveProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useResizeObserver } from '@vueuse/core'\nimport { computed, ref, watchEffect } from 'vue'\nimport { Presence } from '@/Presence'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectNavigationMenuContext } from './NavigationMenuRoot.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<NavigationMenuIndicatorProps>()\n\nconst { forwardRef } = useForwardExpose()\nconst menuContext = injectNavigationMenuContext()\n\nconst indicatorStyle = ref<{ size: number, position: number }>()\nconst isHorizontal = computed(() => menuContext.orientation === 'horizontal')\nconst isVisible = computed(() => !!menuContext.modelValue.value)\nconst { activeTrigger } = menuContext\n\nfunction handlePositionChange() {\n  if (!activeTrigger.value) {\n    return\n  }\n\n  indicatorStyle.value = {\n    size: isHorizontal.value\n      ? activeTrigger.value.offsetWidth\n      : activeTrigger.value.offsetHeight,\n    position: isHorizontal.value\n      ? activeTrigger.value.offsetLeft\n      : activeTrigger.value.offsetTop,\n  }\n}\n\nwatchEffect(() => {\n  if (!menuContext.modelValue.value) {\n    return\n  }\n  handlePositionChange()\n})\n\nuseResizeObserver(activeTrigger, handlePositionChange)\nuseResizeObserver(menuContext.indicatorTrack, handlePositionChange)\n</script>\n\n<template>\n  <Teleport\n    v-if=\"menuContext.indicatorTrack.value\"\n    :to=\"menuContext.indicatorTrack.value\"\n  >\n    <Presence :present=\"forceMount || isVisible\">\n      <Primitive\n        :ref=\"forwardRef\"\n        aria-hidden=\"true\"\n        :data-state=\"isVisible ? 'visible' : 'hidden'\"\n        :data-orientation=\"menuContext.orientation\"\n        :as-child=\"props.asChild\"\n        :as=\"as\"\n        :style=\"{\n          ...(indicatorStyle ? {\n            '--reka-navigation-menu-indicator-size': `${indicatorStyle.size}px`,\n            '--reka-navigation-menu-indicator-position': `${indicatorStyle.position}px`,\n          } : {}),\n        }\"\n        v-bind=\"$attrs\"\n      >\n        <slot />\n      </Primitive>\n    </Presence>\n  </Teleport>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface NavigationMenuIndicatorProps extends PrimitiveProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useResizeObserver } from '@vueuse/core'\nimport { computed, ref, watchEffect } from 'vue'\nimport { Presence } from '@/Presence'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectNavigationMenuContext } from './NavigationMenuRoot.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<NavigationMenuIndicatorProps>()\n\nconst { forwardRef } = useForwardExpose()\nconst menuContext = injectNavigationMenuContext()\n\nconst indicatorStyle = ref<{ size: number, position: number }>()\nconst isHorizontal = computed(() => menuContext.orientation === 'horizontal')\nconst isVisible = computed(() => !!menuContext.modelValue.value)\nconst { activeTrigger } = menuContext\n\nfunction handlePositionChange() {\n  if (!activeTrigger.value) {\n    return\n  }\n\n  indicatorStyle.value = {\n    size: isHorizontal.value\n      ? activeTrigger.value.offsetWidth\n      : activeTrigger.value.offsetHeight,\n    position: isHorizontal.value\n      ? activeTrigger.value.offsetLeft\n      : activeTrigger.value.offsetTop,\n  }\n}\n\nwatchEffect(() => {\n  if (!menuContext.modelValue.value) {\n    return\n  }\n  handlePositionChange()\n})\n\nuseResizeObserver(activeTrigger, handlePositionChange)\nuseResizeObserver(menuContext.indicatorTrack, handlePositionChange)\n</script>\n\n<template>\n  <Teleport\n    v-if=\"menuContext.indicatorTrack.value\"\n    :to=\"menuContext.indicatorTrack.value\"\n  >\n    <Presence :present=\"forceMount || isVisible\">\n      <Primitive\n        :ref=\"forwardRef\"\n        aria-hidden=\"true\"\n        :data-state=\"isVisible ? 'visible' : 'hidden'\"\n        :data-orientation=\"menuContext.orientation\"\n        :as-child=\"props.asChild\"\n        :as=\"as\"\n        :style=\"{\n          ...(indicatorStyle ? {\n            '--reka-navigation-menu-indicator-size': `${indicatorStyle.size}px`,\n            '--reka-navigation-menu-indicator-position': `${indicatorStyle.position}px`,\n          } : {}),\n        }\"\n        v-bind=\"$attrs\"\n      >\n        <slot />\n      </Primitive>\n    </Presence>\n  </Teleport>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useCollection } from '@/Collection'\nimport { useForwardExpose } from '@/shared'\n\nexport type NavigationMenuLinkEmits = {\n  /**\n   * Event handler called when the user selects a link (via mouse or keyboard).\n   *\n   * Calling `event.preventDefault` in this handler will prevent the navigation menu from closing when selecting that link.\n   */\n  select: [payload: CustomEvent<{ originalEvent: Event }>]\n}\nexport interface NavigationMenuLinkProps extends PrimitiveProps {\n  /** Used to identify the link as the currently active page. */\n  active?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { EVENT_ROOT_CONTENT_DISMISS, LINK_SELECT } from './utils'\n\nconst props = withDefaults(defineProps<NavigationMenuLinkProps>(), {\n  as: 'a',\n})\n\nconst emits = defineEmits<NavigationMenuLinkEmits>()\n\nconst { CollectionItem } = useCollection({ key: 'NavigationMenu' })\nuseForwardExpose()\n\nasync function handleClick(ev: MouseEvent) {\n  const linkSelectEvent = new CustomEvent(LINK_SELECT, {\n    bubbles: true,\n    cancelable: true,\n    detail: {\n      originalEvent: ev,\n    },\n  })\n  emits('select', linkSelectEvent)\n\n  if (!linkSelectEvent.defaultPrevented && !ev.metaKey) {\n    const rootContentDismissEvent = new CustomEvent(\n      EVENT_ROOT_CONTENT_DISMISS,\n      {\n        bubbles: true,\n        cancelable: true,\n      },\n    )\n    ev.target?.dispatchEvent(rootContentDismissEvent)\n  }\n}\n</script>\n\n<template>\n  <CollectionItem>\n    <Primitive\n      :as=\"as\"\n      :data-active=\"active ? '' : undefined\"\n      :aria-current=\"active ? 'page' : undefined\"\n      :as-child=\"props.asChild\"\n      @click=\"handleClick\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionItem>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useCollection } from '@/Collection'\nimport { useForwardExpose } from '@/shared'\n\nexport type NavigationMenuLinkEmits = {\n  /**\n   * Event handler called when the user selects a link (via mouse or keyboard).\n   *\n   * Calling `event.preventDefault` in this handler will prevent the navigation menu from closing when selecting that link.\n   */\n  select: [payload: CustomEvent<{ originalEvent: Event }>]\n}\nexport interface NavigationMenuLinkProps extends PrimitiveProps {\n  /** Used to identify the link as the currently active page. */\n  active?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { EVENT_ROOT_CONTENT_DISMISS, LINK_SELECT } from './utils'\n\nconst props = withDefaults(defineProps<NavigationMenuLinkProps>(), {\n  as: 'a',\n})\n\nconst emits = defineEmits<NavigationMenuLinkEmits>()\n\nconst { CollectionItem } = useCollection({ key: 'NavigationMenu' })\nuseForwardExpose()\n\nasync function handleClick(ev: MouseEvent) {\n  const linkSelectEvent = new CustomEvent(LINK_SELECT, {\n    bubbles: true,\n    cancelable: true,\n    detail: {\n      originalEvent: ev,\n    },\n  })\n  emits('select', linkSelectEvent)\n\n  if (!linkSelectEvent.defaultPrevented && !ev.metaKey) {\n    const rootContentDismissEvent = new CustomEvent(\n      EVENT_ROOT_CONTENT_DISMISS,\n      {\n        bubbles: true,\n        cancelable: true,\n      },\n    )\n    ev.target?.dispatchEvent(rootContentDismissEvent)\n  }\n}\n</script>\n\n<template>\n  <CollectionItem>\n    <Primitive\n      :as=\"as\"\n      :data-active=\"active ? '' : undefined\"\n      :aria-current=\"active ? 'page' : undefined\"\n      :as-child=\"props.asChild\"\n      @click=\"handleClick\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionItem>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface NavigationMenuListProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted } from 'vue'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { injectNavigationMenuContext } from './NavigationMenuRoot.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<NavigationMenuListProps>(), {\n  as: 'ul',\n})\n\nconst menuContext = injectNavigationMenuContext()\nconst { forwardRef, currentElement } = useForwardExpose()\n\nonMounted(() => {\n  menuContext.onIndicatorTrackChange(currentElement.value)\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    style=\"position: relative\"\n  >\n    <Primitive\n      v-bind=\"$attrs\"\n      :as-child=\"props.asChild\"\n      :as=\"as\"\n      :data-orientation=\"menuContext.orientation\"\n    >\n      <slot />\n    </Primitive>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface NavigationMenuListProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted } from 'vue'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { injectNavigationMenuContext } from './NavigationMenuRoot.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<NavigationMenuListProps>(), {\n  as: 'ul',\n})\n\nconst menuContext = injectNavigationMenuContext()\nconst { forwardRef, currentElement } = useForwardExpose()\n\nonMounted(() => {\n  menuContext.onIndicatorTrackChange(currentElement.value)\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    style=\"position: relative\"\n  >\n    <Primitive\n      v-bind=\"$attrs\"\n      :as-child=\"props.asChild\"\n      :as=\"as\"\n      :data-orientation=\"menuContext.orientation\"\n    >\n      <slot />\n    </Primitive>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { Orientation } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useCollection } from '@/Collection'\n\nexport type NavigationMenuSubEmits = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [value: string]\n}\n\nexport interface NavigationMenuSubProps extends PrimitiveProps {\n  /** The controlled value of the sub menu item to activate. Can be used as `v-model`. */\n  modelValue?: string\n  /**\n   * The value of the menu item that should be active when initially rendered.\n   *\n   * Use when you do not need to control the value state.\n   */\n  defaultValue?: string\n  /** The orientation of the menu. */\n  orientation?: Orientation\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { ref, watchEffect } from 'vue'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectNavigationMenuContext, provideNavigationMenuContext } from './NavigationMenuRoot.vue'\n\nconst props = withDefaults(defineProps<NavigationMenuSubProps>(), {\n  orientation: 'horizontal',\n})\nconst emits = defineEmits<NavigationMenuSubEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? '',\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<string>\nconst previousValue = ref('')\n\nconst menuContext = injectNavigationMenuContext()\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst indicatorTrack = ref<HTMLElement>()\nconst viewport = ref<HTMLElement>()\nconst activeTrigger = ref<HTMLElement>()\n\nconst { getItems, CollectionSlot } = useCollection({ key: 'NavigationMenu', isProvider: true })\n\nwatchEffect(() => {\n  if (!modelValue.value)\n    return\n\n  const items = getItems().map(i => i.ref)\n  activeTrigger.value = items.find(item =>\n    item.id.includes(modelValue.value),\n  )\n})\n\nprovideNavigationMenuContext({\n  ...menuContext,\n  isRootMenu: false,\n  modelValue,\n  previousValue,\n  activeTrigger,\n  orientation: props.orientation,\n  rootNavigationMenu: currentElement,\n  indicatorTrack,\n  onIndicatorTrackChange: (val) => {\n    indicatorTrack.value = val\n  },\n  viewport,\n  onViewportChange: (val) => {\n    viewport.value = val\n  },\n\n  onTriggerEnter: (val) => {\n    modelValue.value = val\n  },\n  onTriggerLeave: () => {\n    // do nothing for submenu\n  },\n  onContentEnter: () => {\n    // do nothing for submenu\n  },\n  onContentLeave: () => {\n    // do nothing for submenu\n  },\n  onItemSelect: (val) => {\n    modelValue.value = val\n  },\n  onItemDismiss: () => {\n    modelValue.value = ''\n  },\n})\n</script>\n\n<template>\n  <CollectionSlot>\n    <Primitive\n      :ref=\"forwardRef\"\n      :data-orientation=\"orientation\"\n      :as-child=\"props.asChild\"\n      :as=\"as\"\n      data-reka-navigation-menu\n    >\n      <slot :model-value=\"modelValue\" />\n    </Primitive>\n  </CollectionSlot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { Orientation } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useCollection } from '@/Collection'\n\nexport type NavigationMenuSubEmits = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [value: string]\n}\n\nexport interface NavigationMenuSubProps extends PrimitiveProps {\n  /** The controlled value of the sub menu item to activate. Can be used as `v-model`. */\n  modelValue?: string\n  /**\n   * The value of the menu item that should be active when initially rendered.\n   *\n   * Use when you do not need to control the value state.\n   */\n  defaultValue?: string\n  /** The orientation of the menu. */\n  orientation?: Orientation\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { ref, watchEffect } from 'vue'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectNavigationMenuContext, provideNavigationMenuContext } from './NavigationMenuRoot.vue'\n\nconst props = withDefaults(defineProps<NavigationMenuSubProps>(), {\n  orientation: 'horizontal',\n})\nconst emits = defineEmits<NavigationMenuSubEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? '',\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<string>\nconst previousValue = ref('')\n\nconst menuContext = injectNavigationMenuContext()\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst indicatorTrack = ref<HTMLElement>()\nconst viewport = ref<HTMLElement>()\nconst activeTrigger = ref<HTMLElement>()\n\nconst { getItems, CollectionSlot } = useCollection({ key: 'NavigationMenu', isProvider: true })\n\nwatchEffect(() => {\n  if (!modelValue.value)\n    return\n\n  const items = getItems().map(i => i.ref)\n  activeTrigger.value = items.find(item =>\n    item.id.includes(modelValue.value),\n  )\n})\n\nprovideNavigationMenuContext({\n  ...menuContext,\n  isRootMenu: false,\n  modelValue,\n  previousValue,\n  activeTrigger,\n  orientation: props.orientation,\n  rootNavigationMenu: currentElement,\n  indicatorTrack,\n  onIndicatorTrackChange: (val) => {\n    indicatorTrack.value = val\n  },\n  viewport,\n  onViewportChange: (val) => {\n    viewport.value = val\n  },\n\n  onTriggerEnter: (val) => {\n    modelValue.value = val\n  },\n  onTriggerLeave: () => {\n    // do nothing for submenu\n  },\n  onContentEnter: () => {\n    // do nothing for submenu\n  },\n  onContentLeave: () => {\n    // do nothing for submenu\n  },\n  onItemSelect: (val) => {\n    modelValue.value = val\n  },\n  onItemDismiss: () => {\n    modelValue.value = ''\n  },\n})\n</script>\n\n<template>\n  <CollectionSlot>\n    <Primitive\n      :ref=\"forwardRef\"\n      :data-orientation=\"orientation\"\n      :as-child=\"props.asChild\"\n      :as=\"as\"\n      data-reka-navigation-menu\n    >\n      <slot :model-value=\"modelValue\" />\n    </Primitive>\n  </CollectionSlot>\n</template>\n","<script lang=\"ts\">\nimport type { ComponentPublicInstance } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useCollection } from '@/Collection'\nimport { useForwardExpose } from '@/shared'\n\nexport interface NavigationMenuTriggerProps extends PrimitiveProps {\n  /** When `true`, prevents the user from interacting with item */\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { refAutoReset, unrefElement } from '@vueuse/core'\nimport { computed, onMounted, ref } from 'vue'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { VisuallyHidden } from '@/VisuallyHidden'\nimport { injectNavigationMenuItemContext } from './NavigationMenuItem.vue'\nimport { injectNavigationMenuContext } from './NavigationMenuRoot.vue'\nimport { getOpenState, makeContentId, makeTriggerId } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<NavigationMenuTriggerProps>(), {\n  as: 'button',\n})\n\nconst menuContext = injectNavigationMenuContext()\nconst itemContext = injectNavigationMenuItemContext()\n\nconst { CollectionItem } = useCollection({ key: 'NavigationMenu' })\nconst { forwardRef, currentElement: triggerElement } = useForwardExpose()\nconst triggerId = ref('')\nconst contentId = ref('')\n\nconst hasPointerMoveOpenedRef = refAutoReset(false, 300)\nconst wasClickCloseRef = ref(false)\n\nconst open = computed(() => itemContext.value === menuContext.modelValue.value)\n\nonMounted(() => {\n  itemContext.triggerRef = triggerElement\n  triggerId.value = makeTriggerId(menuContext.baseId, itemContext.value)\n  contentId.value = makeContentId(menuContext.baseId, itemContext.value)\n})\n\nfunction handlePointerEnter() {\n  if (menuContext.disableHoverTrigger.value)\n    return\n\n  wasClickCloseRef.value = false\n  itemContext.wasEscapeCloseRef.value = false\n}\n\nfunction handlePointerMove(ev: PointerEvent) {\n  if (menuContext.disableHoverTrigger.value)\n    return\n\n  if (ev.pointerType === 'mouse') {\n    if (\n      props.disabled\n      || wasClickCloseRef.value\n      || itemContext.wasEscapeCloseRef.value\n      || hasPointerMoveOpenedRef.value\n    ) {\n      return\n    }\n\n    menuContext.onTriggerEnter(itemContext.value)\n    hasPointerMoveOpenedRef.value = true\n  }\n}\n\nfunction handlePointerLeave(ev: PointerEvent) {\n  if (menuContext.disableHoverTrigger.value)\n    return\n\n  if (ev.pointerType === 'mouse') {\n    if (props.disabled)\n      return\n    menuContext.onTriggerLeave()\n    hasPointerMoveOpenedRef.value = false\n  }\n}\n\nfunction handleClick(event: MouseEvent | PointerEvent) {\n  if (\n    (!('pointerType' in event) || event.pointerType === 'mouse')\n    && menuContext.disableClickTrigger.value\n  ) {\n    return\n  }\n\n  // if open via pointermove, we prevent click event\n  if (hasPointerMoveOpenedRef.value)\n    return\n\n  if (open.value)\n    menuContext.onItemSelect('')\n  else menuContext.onItemSelect(itemContext.value)\n\n  wasClickCloseRef.value = open.value\n}\n\nfunction handleKeydown(ev: KeyboardEvent) {\n  const verticalEntryKey = menuContext.dir.value === 'rtl' ? 'ArrowLeft' : 'ArrowRight'\n  const entryKey = { horizontal: 'ArrowDown', vertical: verticalEntryKey }[\n    menuContext.orientation\n  ]\n  if (open.value && ev.key === entryKey) {\n    itemContext.onEntryKeyDown()\n    // Prevent FocusGroupItem from handling the event\n    ev.preventDefault()\n    ev.stopPropagation()\n  }\n}\n\nfunction setFocusProxyRef(node: Element | ComponentPublicInstance | null) {\n  if (!node)\n    return undefined\n  // @ts-expect-error unrefElement expect MaybeRef, but also support Vnode\n  itemContext.focusProxyRef.value = unrefElement(node)\n  return undefined\n}\n\nfunction handleVisuallyHiddenFocus(ev: FocusEvent) {\n  const content = document.getElementById(itemContext.contentId)\n  const prevFocusedElement = ev.relatedTarget as HTMLElement | null\n\n  const wasTriggerFocused = prevFocusedElement === triggerElement.value\n  const wasFocusFromContent = content?.contains(prevFocusedElement)\n\n  if (wasTriggerFocused || !wasFocusFromContent)\n    itemContext.onFocusProxyEnter(wasTriggerFocused ? 'start' : 'end')\n}\n</script>\n\n<template>\n  <CollectionItem>\n    <Primitive\n      :id=\"triggerId\"\n      :ref=\"forwardRef\"\n      :disabled=\"disabled\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :data-state=\"getOpenState(open)\"\n      data-navigation-menu-trigger\n      :aria-expanded=\"open\"\n      :aria-controls=\"contentId\"\n      :as-child=\"props.asChild\"\n      :as=\"as\"\n      v-bind=\"$attrs\"\n      @pointerenter=\"handlePointerEnter\"\n      @pointermove=\"handlePointerMove\"\n      @pointerleave=\"handlePointerLeave\"\n      @click=\"handleClick\"\n      @keydown=\"handleKeydown\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionItem>\n\n  <template v-if=\"open\">\n    <VisuallyHidden\n      :ref=\"setFocusProxyRef\"\n      aria-hidden=\"true\"\n      :tabindex=\"0\"\n      @focus=\"handleVisuallyHiddenFocus\"\n    />\n    <span\n      v-if=\"menuContext.viewport\"\n      :aria-owns=\"contentId\"\n    />\n  </template>\n</template>\n","<script lang=\"ts\">\nimport type { ComponentPublicInstance } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useCollection } from '@/Collection'\nimport { useForwardExpose } from '@/shared'\n\nexport interface NavigationMenuTriggerProps extends PrimitiveProps {\n  /** When `true`, prevents the user from interacting with item */\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { refAutoReset, unrefElement } from '@vueuse/core'\nimport { computed, onMounted, ref } from 'vue'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { VisuallyHidden } from '@/VisuallyHidden'\nimport { injectNavigationMenuItemContext } from './NavigationMenuItem.vue'\nimport { injectNavigationMenuContext } from './NavigationMenuRoot.vue'\nimport { getOpenState, makeContentId, makeTriggerId } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<NavigationMenuTriggerProps>(), {\n  as: 'button',\n})\n\nconst menuContext = injectNavigationMenuContext()\nconst itemContext = injectNavigationMenuItemContext()\n\nconst { CollectionItem } = useCollection({ key: 'NavigationMenu' })\nconst { forwardRef, currentElement: triggerElement } = useForwardExpose()\nconst triggerId = ref('')\nconst contentId = ref('')\n\nconst hasPointerMoveOpenedRef = refAutoReset(false, 300)\nconst wasClickCloseRef = ref(false)\n\nconst open = computed(() => itemContext.value === menuContext.modelValue.value)\n\nonMounted(() => {\n  itemContext.triggerRef = triggerElement\n  triggerId.value = makeTriggerId(menuContext.baseId, itemContext.value)\n  contentId.value = makeContentId(menuContext.baseId, itemContext.value)\n})\n\nfunction handlePointerEnter() {\n  if (menuContext.disableHoverTrigger.value)\n    return\n\n  wasClickCloseRef.value = false\n  itemContext.wasEscapeCloseRef.value = false\n}\n\nfunction handlePointerMove(ev: PointerEvent) {\n  if (menuContext.disableHoverTrigger.value)\n    return\n\n  if (ev.pointerType === 'mouse') {\n    if (\n      props.disabled\n      || wasClickCloseRef.value\n      || itemContext.wasEscapeCloseRef.value\n      || hasPointerMoveOpenedRef.value\n    ) {\n      return\n    }\n\n    menuContext.onTriggerEnter(itemContext.value)\n    hasPointerMoveOpenedRef.value = true\n  }\n}\n\nfunction handlePointerLeave(ev: PointerEvent) {\n  if (menuContext.disableHoverTrigger.value)\n    return\n\n  if (ev.pointerType === 'mouse') {\n    if (props.disabled)\n      return\n    menuContext.onTriggerLeave()\n    hasPointerMoveOpenedRef.value = false\n  }\n}\n\nfunction handleClick(event: MouseEvent | PointerEvent) {\n  if (\n    (!('pointerType' in event) || event.pointerType === 'mouse')\n    && menuContext.disableClickTrigger.value\n  ) {\n    return\n  }\n\n  // if open via pointermove, we prevent click event\n  if (hasPointerMoveOpenedRef.value)\n    return\n\n  if (open.value)\n    menuContext.onItemSelect('')\n  else menuContext.onItemSelect(itemContext.value)\n\n  wasClickCloseRef.value = open.value\n}\n\nfunction handleKeydown(ev: KeyboardEvent) {\n  const verticalEntryKey = menuContext.dir.value === 'rtl' ? 'ArrowLeft' : 'ArrowRight'\n  const entryKey = { horizontal: 'ArrowDown', vertical: verticalEntryKey }[\n    menuContext.orientation\n  ]\n  if (open.value && ev.key === entryKey) {\n    itemContext.onEntryKeyDown()\n    // Prevent FocusGroupItem from handling the event\n    ev.preventDefault()\n    ev.stopPropagation()\n  }\n}\n\nfunction setFocusProxyRef(node: Element | ComponentPublicInstance | null) {\n  if (!node)\n    return undefined\n  // @ts-expect-error unrefElement expect MaybeRef, but also support Vnode\n  itemContext.focusProxyRef.value = unrefElement(node)\n  return undefined\n}\n\nfunction handleVisuallyHiddenFocus(ev: FocusEvent) {\n  const content = document.getElementById(itemContext.contentId)\n  const prevFocusedElement = ev.relatedTarget as HTMLElement | null\n\n  const wasTriggerFocused = prevFocusedElement === triggerElement.value\n  const wasFocusFromContent = content?.contains(prevFocusedElement)\n\n  if (wasTriggerFocused || !wasFocusFromContent)\n    itemContext.onFocusProxyEnter(wasTriggerFocused ? 'start' : 'end')\n}\n</script>\n\n<template>\n  <CollectionItem>\n    <Primitive\n      :id=\"triggerId\"\n      :ref=\"forwardRef\"\n      :disabled=\"disabled\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :data-state=\"getOpenState(open)\"\n      data-navigation-menu-trigger\n      :aria-expanded=\"open\"\n      :aria-controls=\"contentId\"\n      :as-child=\"props.asChild\"\n      :as=\"as\"\n      v-bind=\"$attrs\"\n      @pointerenter=\"handlePointerEnter\"\n      @pointermove=\"handlePointerMove\"\n      @pointerleave=\"handlePointerLeave\"\n      @click=\"handleClick\"\n      @keydown=\"handleKeydown\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionItem>\n\n  <template v-if=\"open\">\n    <VisuallyHidden\n      :ref=\"setFocusProxyRef\"\n      aria-hidden=\"true\"\n      :tabindex=\"0\"\n      @focus=\"handleVisuallyHiddenFocus\"\n    />\n    <span\n      v-if=\"menuContext.viewport\"\n      :aria-owns=\"contentId\"\n    />\n  </template>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface NavigationMenuViewportProps extends PrimitiveProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n  /**\n   * Placement of the viewport for css variables `(--reka-navigation-menu-viewport-left, --reka-navigation-menu-viewport-top)`.\n   * @defaultValue 'center'\n   */\n  align?: 'start' | 'center' | 'end'\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useResizeObserver } from '@vueuse/core'\nimport { computed, nextTick, ref, watch } from 'vue'\nimport { Presence } from '@/Presence'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { injectNavigationMenuContext } from './NavigationMenuRoot.vue'\nimport { getOpenState, whenMouse } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<NavigationMenuViewportProps>(), {\n  align: 'center',\n})\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst menuContext = injectNavigationMenuContext()\nconst { activeTrigger, rootNavigationMenu, modelValue } = menuContext\n\nconst size = ref<{ width: number, height: number }>()\nconst position = ref<{ left: number, top: number }>()\n\nconst open = computed(() => !!menuContext.modelValue.value)\n\nwatch(currentElement, () => {\n  menuContext.onViewportChange(currentElement.value)\n})\n\nconst content = ref<HTMLElement>()\n\nwatch([modelValue, open], () => {\n  nextTick(() => {\n    if (!currentElement.value)\n      return\n\n    requestAnimationFrame(() => {\n      const el = (currentElement.value as HTMLElement)?.querySelector('[data-state=open]') as HTMLElement | undefined\n      content.value = el\n    })\n  })\n}, { immediate: true })\n\nfunction updatePosition() {\n  if (content.value && activeTrigger.value && rootNavigationMenu.value) {\n    const bodyWidth = document.documentElement.offsetWidth\n    const bodyHeight = document.documentElement.offsetHeight\n    const rootRect = rootNavigationMenu.value.getBoundingClientRect()\n    const rect = activeTrigger.value.getBoundingClientRect()\n    const { offsetWidth, offsetHeight } = content.value\n\n    // Find the beginning of the position of the menu item\n    const startPositionLeft = rect.left - rootRect.left\n    const startPositionTop = rect.top - rootRect.top\n\n    // Aligning to specified alignment\n    let posLeft = null\n    let posTop = null\n    switch (props.align) {\n      case 'start':\n        posLeft = startPositionLeft\n        posTop = startPositionTop\n        break\n      case 'end':\n        posLeft = startPositionLeft - offsetWidth + rect.width\n        posTop = startPositionTop - offsetHeight + rect.height\n        break\n      default:\n        // center\n        posLeft = startPositionLeft - offsetWidth / 2 + rect.width / 2\n        posTop = startPositionTop - offsetHeight / 2 + rect.height / 2\n    }\n\n    const screenOffset = 10\n\n    // Do not let go of the left side of the screen\n    if (posLeft + rootRect.left < screenOffset) {\n      posLeft = screenOffset - rootRect.left\n    }\n\n    // Now also check the right side of the screen\n    const rightOffset = posLeft + rootRect.left + offsetWidth\n    if (rightOffset > bodyWidth - screenOffset) {\n      posLeft -= rightOffset - bodyWidth + screenOffset\n\n      // Recheck the left side of the screen\n      if (posLeft < screenOffset - rootRect.left) {\n        // Just set the menu to the full width of the screen\n        posLeft = screenOffset - rootRect.left\n      }\n    }\n\n    // Do not let go of the top side of the screen\n    if (posTop + rootRect.top < screenOffset) {\n      posTop = screenOffset - rootRect.top\n    }\n\n    // Now also check the bottom side of the screen\n    const bottomOffset = posTop + rootRect.top + offsetHeight\n    if (bottomOffset > bodyHeight - screenOffset) {\n      posTop -= bottomOffset - bodyHeight + screenOffset\n\n      // Recheck the top side of the screen\n      if (posTop < screenOffset - rootRect.top) {\n        // Just set the menu to the full height of the screen\n        posTop = screenOffset - rootRect.top\n      }\n    }\n\n    // Possible blurring font with decimal values\n    posLeft = Math.round(posLeft)\n    posTop = Math.round(posTop)\n\n    position.value = {\n      left: posLeft,\n      top: posTop,\n    }\n  }\n}\n\nuseResizeObserver(content, () => {\n  if (content.value) {\n    size.value = {\n      width: content.value.offsetWidth,\n      height: content.value.offsetHeight,\n    }\n    updatePosition()\n  }\n})\n\nuseResizeObserver([globalThis.document?.body, rootNavigationMenu], () => {\n  updatePosition()\n})\n</script>\n\n<template>\n  <Presence\n    v-slot=\"{ present }\"\n    :present=\"forceMount || open\"\n    :force-mount=\"!menuContext.unmountOnHide.value\"\n    @after-leave=\"() => {\n      size = undefined\n      position = undefined\n    }\"\n  >\n    <Primitive\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :data-state=\"getOpenState(open)\"\n      :data-orientation=\"menuContext.orientation\"\n      :style=\"{\n        // Prevent interaction when animating out\n        pointerEvents: !open && menuContext.isRootMenu ? 'none' : undefined,\n        ['--reka-navigation-menu-viewport-width']: size ? `${size?.width}px` : undefined,\n        ['--reka-navigation-menu-viewport-height']: size ? `${size?.height}px` : undefined,\n        ['--reka-navigation-menu-viewport-left']: position ? `${position?.left}px` : undefined,\n        ['--reka-navigation-menu-viewport-top']: position ? `${position?.top}px` : undefined,\n      }\"\n      :hidden=\"!present\"\n      @pointerenter=\"menuContext.onContentEnter(menuContext.modelValue.value)\"\n      @pointerleave=\"whenMouse(() => menuContext.onContentLeave())($event)\"\n    >\n      <slot />\n    </Primitive>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface NavigationMenuViewportProps extends PrimitiveProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n  /**\n   * Placement of the viewport for css variables `(--reka-navigation-menu-viewport-left, --reka-navigation-menu-viewport-top)`.\n   * @defaultValue 'center'\n   */\n  align?: 'start' | 'center' | 'end'\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useResizeObserver } from '@vueuse/core'\nimport { computed, nextTick, ref, watch } from 'vue'\nimport { Presence } from '@/Presence'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { injectNavigationMenuContext } from './NavigationMenuRoot.vue'\nimport { getOpenState, whenMouse } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<NavigationMenuViewportProps>(), {\n  align: 'center',\n})\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst menuContext = injectNavigationMenuContext()\nconst { activeTrigger, rootNavigationMenu, modelValue } = menuContext\n\nconst size = ref<{ width: number, height: number }>()\nconst position = ref<{ left: number, top: number }>()\n\nconst open = computed(() => !!menuContext.modelValue.value)\n\nwatch(currentElement, () => {\n  menuContext.onViewportChange(currentElement.value)\n})\n\nconst content = ref<HTMLElement>()\n\nwatch([modelValue, open], () => {\n  nextTick(() => {\n    if (!currentElement.value)\n      return\n\n    requestAnimationFrame(() => {\n      const el = (currentElement.value as HTMLElement)?.querySelector('[data-state=open]') as HTMLElement | undefined\n      content.value = el\n    })\n  })\n}, { immediate: true })\n\nfunction updatePosition() {\n  if (content.value && activeTrigger.value && rootNavigationMenu.value) {\n    const bodyWidth = document.documentElement.offsetWidth\n    const bodyHeight = document.documentElement.offsetHeight\n    const rootRect = rootNavigationMenu.value.getBoundingClientRect()\n    const rect = activeTrigger.value.getBoundingClientRect()\n    const { offsetWidth, offsetHeight } = content.value\n\n    // Find the beginning of the position of the menu item\n    const startPositionLeft = rect.left - rootRect.left\n    const startPositionTop = rect.top - rootRect.top\n\n    // Aligning to specified alignment\n    let posLeft = null\n    let posTop = null\n    switch (props.align) {\n      case 'start':\n        posLeft = startPositionLeft\n        posTop = startPositionTop\n        break\n      case 'end':\n        posLeft = startPositionLeft - offsetWidth + rect.width\n        posTop = startPositionTop - offsetHeight + rect.height\n        break\n      default:\n        // center\n        posLeft = startPositionLeft - offsetWidth / 2 + rect.width / 2\n        posTop = startPositionTop - offsetHeight / 2 + rect.height / 2\n    }\n\n    const screenOffset = 10\n\n    // Do not let go of the left side of the screen\n    if (posLeft + rootRect.left < screenOffset) {\n      posLeft = screenOffset - rootRect.left\n    }\n\n    // Now also check the right side of the screen\n    const rightOffset = posLeft + rootRect.left + offsetWidth\n    if (rightOffset > bodyWidth - screenOffset) {\n      posLeft -= rightOffset - bodyWidth + screenOffset\n\n      // Recheck the left side of the screen\n      if (posLeft < screenOffset - rootRect.left) {\n        // Just set the menu to the full width of the screen\n        posLeft = screenOffset - rootRect.left\n      }\n    }\n\n    // Do not let go of the top side of the screen\n    if (posTop + rootRect.top < screenOffset) {\n      posTop = screenOffset - rootRect.top\n    }\n\n    // Now also check the bottom side of the screen\n    const bottomOffset = posTop + rootRect.top + offsetHeight\n    if (bottomOffset > bodyHeight - screenOffset) {\n      posTop -= bottomOffset - bodyHeight + screenOffset\n\n      // Recheck the top side of the screen\n      if (posTop < screenOffset - rootRect.top) {\n        // Just set the menu to the full height of the screen\n        posTop = screenOffset - rootRect.top\n      }\n    }\n\n    // Possible blurring font with decimal values\n    posLeft = Math.round(posLeft)\n    posTop = Math.round(posTop)\n\n    position.value = {\n      left: posLeft,\n      top: posTop,\n    }\n  }\n}\n\nuseResizeObserver(content, () => {\n  if (content.value) {\n    size.value = {\n      width: content.value.offsetWidth,\n      height: content.value.offsetHeight,\n    }\n    updatePosition()\n  }\n})\n\nuseResizeObserver([globalThis.document?.body, rootNavigationMenu], () => {\n  updatePosition()\n})\n</script>\n\n<template>\n  <Presence\n    v-slot=\"{ present }\"\n    :present=\"forceMount || open\"\n    :force-mount=\"!menuContext.unmountOnHide.value\"\n    @after-leave=\"() => {\n      size = undefined\n      position = undefined\n    }\"\n  >\n    <Primitive\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :data-state=\"getOpenState(open)\"\n      :data-orientation=\"menuContext.orientation\"\n      :style=\"{\n        // Prevent interaction when animating out\n        pointerEvents: !open && menuContext.isRootMenu ? 'none' : undefined,\n        ['--reka-navigation-menu-viewport-width']: size ? `${size?.width}px` : undefined,\n        ['--reka-navigation-menu-viewport-height']: size ? `${size?.height}px` : undefined,\n        ['--reka-navigation-menu-viewport-left']: position ? `${position?.left}px` : undefined,\n        ['--reka-navigation-menu-viewport-top']: position ? `${position?.top}px` : undefined,\n      }\"\n      :hidden=\"!present\"\n      @pointerenter=\"menuContext.onContentEnter(menuContext.modelValue.value)\"\n      @pointerleave=\"whenMouse(() => menuContext.onContentLeave())($event)\"\n    >\n      <slot />\n    </Primitive>\n  </Presence>\n</template>\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nlet formatterCache = new Map<string, Intl.NumberFormat>();\n\nlet supportsSignDisplay = false;\ntry {\n  supportsSignDisplay =\n    new Intl.NumberFormat('de-DE', {signDisplay: 'exceptZero'}).resolvedOptions().signDisplay ===\n    'exceptZero';\n  // eslint-disable-next-line no-empty\n} catch {}\n\nlet supportsUnit = false;\ntry {\n  supportsUnit =\n    new Intl.NumberFormat('de-DE', {style: 'unit', unit: 'degree'}).resolvedOptions().style ===\n    'unit';\n  // eslint-disable-next-line no-empty\n} catch {}\n\n// Polyfill for units since Safari doesn't support them yet. See https://bugs.webkit.org/show_bug.cgi?id=215438.\n// Currently only polyfilling the unit degree in narrow format for ColorSlider in our supported locales.\n// Values were determined by switching to each locale manually in Chrome.\nconst UNITS = {\n  degree: {\n    narrow: {\n      default: '°',\n      'ja-JP': ' 度',\n      'zh-TW': '度',\n      'sl-SI': ' °'\n      // Arabic?? But Safari already doesn't use Arabic digits so might be ok...\n      // https://bugs.webkit.org/show_bug.cgi?id=218139\n    }\n  }\n};\n\nexport interface NumberFormatOptions extends Intl.NumberFormatOptions {\n  /** Overrides default numbering system for the current locale. */\n  numberingSystem?: string;\n}\n\ninterface NumberRangeFormatPart extends Intl.NumberFormatPart {\n  source: 'startRange' | 'endRange' | 'shared';\n}\n\n/**\n * A wrapper around Intl.NumberFormat providing additional options, polyfills, and caching for\n * performance.\n */\nexport class NumberFormatter implements Intl.NumberFormat {\n  private numberFormatter: Intl.NumberFormat;\n  private options: NumberFormatOptions;\n\n  constructor(locale: string, options: NumberFormatOptions = {}) {\n    this.numberFormatter = getCachedNumberFormatter(locale, options);\n    this.options = options;\n  }\n\n  /**\n   * Formats a number value as a string, according to the locale and options provided to the\n   * constructor.\n   */\n  format(value: number): string {\n    let res = '';\n    if (!supportsSignDisplay && this.options.signDisplay != null) {\n      res = numberFormatSignDisplayPolyfill(this.numberFormatter, this.options.signDisplay, value);\n    } else {\n      res = this.numberFormatter.format(value);\n    }\n\n    if (this.options.style === 'unit' && !supportsUnit) {\n      let {unit, unitDisplay = 'short', locale} = this.resolvedOptions();\n      if (!unit) {\n        return res;\n      }\n      let values = UNITS[unit]?.[unitDisplay];\n      res += values[locale] || values.default;\n    }\n\n    return res;\n  }\n\n  /** Formats a number to an array of parts such as separators, digits, punctuation, and more. */\n  formatToParts(value: number): Intl.NumberFormatPart[] {\n    // TODO: implement signDisplay for formatToParts\n    return this.numberFormatter.formatToParts(value);\n  }\n\n  /** Formats a number range as a string. */\n  formatRange(start: number, end: number): string {\n    if (typeof this.numberFormatter.formatRange === 'function') {\n      return this.numberFormatter.formatRange(start, end);\n    }\n\n    if (end < start) {\n      throw new RangeError('End date must be >= start date');\n    }\n\n    // Very basic fallback for old browsers.\n    return `${this.format(start)} – ${this.format(end)}`;\n  }\n\n  /** Formats a number range as an array of parts. */\n  formatRangeToParts(start: number, end: number): NumberRangeFormatPart[] {\n    if (typeof this.numberFormatter.formatRangeToParts === 'function') {\n      return this.numberFormatter.formatRangeToParts(start, end);\n    }\n\n    if (end < start) {\n      throw new RangeError('End date must be >= start date');\n    }\n\n    let startParts = this.numberFormatter.formatToParts(start);\n    let endParts = this.numberFormatter.formatToParts(end);\n    return [\n      ...startParts.map(p => ({...p, source: 'startRange'}) as NumberRangeFormatPart),\n      {type: 'literal', value: ' – ', source: 'shared'},\n      ...endParts.map(p => ({...p, source: 'endRange'}) as NumberRangeFormatPart)\n    ];\n  }\n\n  /** Returns the resolved formatting options based on the values passed to the constructor. */\n  resolvedOptions(): Intl.ResolvedNumberFormatOptions {\n    let options = this.numberFormatter.resolvedOptions();\n    if (!supportsSignDisplay && this.options.signDisplay != null) {\n      options = {...options, signDisplay: this.options.signDisplay};\n    }\n\n    if (!supportsUnit && this.options.style === 'unit') {\n      options = {\n        ...options,\n        style: 'unit',\n        unit: this.options.unit,\n        unitDisplay: this.options.unitDisplay\n      };\n    }\n\n    return options;\n  }\n}\n\nfunction getCachedNumberFormatter(\n  locale: string,\n  options: NumberFormatOptions = {}\n): Intl.NumberFormat {\n  let {numberingSystem} = options;\n  if (numberingSystem && locale.includes('-nu-')) {\n    if (!locale.includes('-u-')) {\n      locale += '-u-';\n    }\n    locale += `-nu-${numberingSystem}`;\n  }\n\n  if (options.style === 'unit' && !supportsUnit) {\n    let {unit, unitDisplay = 'short'} = options;\n    if (!unit) {\n      throw new Error('unit option must be provided with style: \"unit\"');\n    }\n    if (!UNITS[unit]?.[unitDisplay]) {\n      throw new Error(`Unsupported unit ${unit} with unitDisplay = ${unitDisplay}`);\n    }\n    options = {...options, style: 'decimal'};\n  }\n\n  let cacheKey =\n    locale +\n    (options\n      ? Object.entries(options)\n          .sort((a, b) => (a[0] < b[0] ? -1 : 1))\n          .join()\n      : '');\n  if (formatterCache.has(cacheKey)) {\n    return formatterCache.get(cacheKey)!;\n  }\n\n  let numberFormatter = new Intl.NumberFormat(locale, options);\n  formatterCache.set(cacheKey, numberFormatter);\n  return numberFormatter;\n}\n\n/** @private - Exported for tests */\nexport function numberFormatSignDisplayPolyfill(\n  numberFormat: Intl.NumberFormat,\n  signDisplay: string,\n  num: number\n): string {\n  if (signDisplay === 'auto') {\n    return numberFormat.format(num);\n  } else if (signDisplay === 'never') {\n    return numberFormat.format(Math.abs(num));\n  } else {\n    let needsPositiveSign = false;\n    if (signDisplay === 'always') {\n      needsPositiveSign = num > 0 || Object.is(num, 0);\n    } else if (signDisplay === 'exceptZero') {\n      if (Object.is(num, -0) || Object.is(num, 0)) {\n        num = Math.abs(num);\n      } else {\n        needsPositiveSign = num > 0;\n      }\n    }\n\n    if (needsPositiveSign) {\n      let negative = numberFormat.format(-num);\n      let noSign = numberFormat.format(num);\n      // ignore RTL/LTR marker character\n      let minus = negative.replace(noSign, '').replace(/\\u200e|\\u061C/, '');\n      if ([...minus].length !== 1) {\n        console.warn('@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case');\n      }\n      let positive = negative.replace(noSign, '!!!').replace(minus, '+').replace('!!!', noSign);\n      return positive;\n    } else {\n      return numberFormat.format(num);\n    }\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {NumberFormatter} from './NumberFormatter';\n\ninterface Symbols {\n  minusSign?: string;\n  plusSign?: string;\n  decimal?: string;\n  group?: string;\n  literals: RegExp;\n  numeral: RegExp;\n  numerals: string[];\n  index: (v: string) => string;\n  noNumeralUnits: Array<{unit: string; value: number}>;\n}\n\nconst CURRENCY_SIGN_REGEX = new RegExp('^.*\\\\(.*\\\\).*$');\nconst NUMBERING_SYSTEMS = ['latn', 'arab', 'hanidec', 'deva', 'beng', 'fullwide'];\n\n/**\n * A NumberParser can be used to perform locale-aware parsing of numbers from Unicode strings,\n * as well as validation of partial user input. It automatically detects the numbering system\n * used in the input, and supports parsing decimals, percentages, currency values, and units\n * according to the locale.\n */\nexport class NumberParser {\n  private locale: string;\n  private options: Intl.NumberFormatOptions;\n\n  constructor(locale: string, options: Intl.NumberFormatOptions = {}) {\n    this.locale = locale;\n    this.options = options;\n  }\n\n  /**\n   * Parses the given string to a number. Returns NaN if a valid number could not be parsed.\n   */\n  parse(value: string): number {\n    return getNumberParserImpl(this.locale, this.options, value).parse(value);\n  }\n\n  /**\n   * Returns whether the given string could potentially be a valid number. This should be used to\n   * validate user input as the user types. If a `minValue` or `maxValue` is provided, the validity\n   * of the minus/plus sign characters can be checked.\n   */\n  isValidPartialNumber(value: string, minValue?: number, maxValue?: number): boolean {\n    return getNumberParserImpl(this.locale, this.options, value).isValidPartialNumber(\n      value,\n      minValue,\n      maxValue\n    );\n  }\n\n  /**\n   * Returns a numbering system for which the given string is valid in the current locale.\n   * If no numbering system could be detected, the default numbering system for the current\n   * locale is returned.\n   */\n  getNumberingSystem(value: string): string {\n    return getNumberParserImpl(this.locale, this.options, value).options.numberingSystem;\n  }\n}\n\nconst numberParserCache = new Map<string, NumberParserImpl>();\nfunction getNumberParserImpl(locale: string, options: Intl.NumberFormatOptions, value: string) {\n  // First try the default numbering system for the provided locale\n  let defaultParser = getCachedNumberParser(locale, options);\n\n  // If that doesn't match, and the locale doesn't include a hard coded numbering system,\n  // try each of the other supported numbering systems until we find one that matches.\n  if (!locale.includes('-nu-') && !defaultParser.isValidPartialNumber(value)) {\n    for (let numberingSystem of NUMBERING_SYSTEMS) {\n      if (numberingSystem !== defaultParser.options.numberingSystem) {\n        let parser = getCachedNumberParser(\n          locale + (locale.includes('-u-') ? '-nu-' : '-u-nu-') + numberingSystem,\n          options\n        );\n        if (parser.isValidPartialNumber(value)) {\n          return parser;\n        }\n      }\n    }\n  }\n\n  return defaultParser;\n}\n\nfunction getCachedNumberParser(locale: string, options: Intl.NumberFormatOptions) {\n  let cacheKey =\n    locale +\n    (options\n      ? Object.entries(options)\n          .sort((a, b) => (a[0] < b[0] ? -1 : 1))\n          .join()\n      : '');\n  let parser = numberParserCache.get(cacheKey);\n  if (!parser) {\n    parser = new NumberParserImpl(locale, options);\n    numberParserCache.set(cacheKey, parser);\n  }\n\n  return parser;\n}\n\n// The actual number parser implementation. Instances of this class are cached\n// based on the locale, options, and detected numbering system.\nclass NumberParserImpl {\n  formatter: Intl.NumberFormat;\n  options: Intl.ResolvedNumberFormatOptions;\n  symbols: Symbols;\n  locale: string;\n\n  constructor(locale: string, options: Intl.NumberFormatOptions = {}) {\n    this.locale = locale;\n    // see https://tc39.es/ecma402/#sec-setnfdigitoptions, when using roundingIncrement, the maximumFractionDigits and minimumFractionDigits must be equal\n    // by default, they are 0 and 3 respectively, so we set them to 0 if neither are set\n    if (options.roundingIncrement !== 1 && options.roundingIncrement != null) {\n      if (options.maximumFractionDigits == null && options.minimumFractionDigits == null) {\n        options.maximumFractionDigits = 0;\n        options.minimumFractionDigits = 0;\n      } else if (options.maximumFractionDigits == null) {\n        options.maximumFractionDigits = options.minimumFractionDigits;\n      } else if (options.minimumFractionDigits == null) {\n        options.minimumFractionDigits = options.maximumFractionDigits;\n      }\n      // if both are specified, let the normal Range Error be thrown\n    }\n    this.formatter = new Intl.NumberFormat(locale, options);\n    this.options = this.formatter.resolvedOptions();\n    this.symbols = getSymbols(locale, this.formatter, this.options, options);\n    if (\n      this.options.style === 'percent' &&\n      ((this.options.minimumFractionDigits ?? 0) > 18 ||\n        (this.options.maximumFractionDigits ?? 0) > 18)\n    ) {\n      console.warn(\n        'NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.'\n      );\n    }\n  }\n\n  parse(value: string) {\n    let isGroupSymbolAllowed = this.formatter.resolvedOptions().useGrouping;\n    // to parse the number, we need to remove anything that isn't actually part of the number, for example we want '-10.40' not '-10.40 USD'\n    let fullySanitizedValue = this.sanitize(value);\n\n    // Return NaN if there is a group symbol but useGrouping is false\n    if (\n      !isGroupSymbolAllowed &&\n      this.symbols.group &&\n      fullySanitizedValue.includes(this.symbols.group)\n    ) {\n      return NaN;\n    } else if (this.symbols.group) {\n      fullySanitizedValue = fullySanitizedValue.replaceAll(this.symbols.group!, '');\n    }\n\n    if (this.symbols.decimal) {\n      fullySanitizedValue = fullySanitizedValue.replace(this.symbols.decimal!, '.');\n    }\n    if (this.symbols.minusSign) {\n      fullySanitizedValue = fullySanitizedValue.replace(this.symbols.minusSign!, '-');\n    }\n    fullySanitizedValue = fullySanitizedValue.replace(this.symbols.numeral, this.symbols.index);\n\n    if (this.options.style === 'percent') {\n      // javascript is bad at dividing by 100 and maintaining the same significant figures, so perform it on the string before parsing\n      let isNegative = fullySanitizedValue.indexOf('-');\n      fullySanitizedValue = fullySanitizedValue.replace('-', '');\n      fullySanitizedValue = fullySanitizedValue.replace('+', '');\n      let index = fullySanitizedValue.indexOf('.');\n      if (index === -1) {\n        index = fullySanitizedValue.length;\n      }\n      fullySanitizedValue = fullySanitizedValue.replace('.', '');\n      if (index - 2 === 0) {\n        fullySanitizedValue = `0.${fullySanitizedValue}`;\n      } else if (index - 2 === -1) {\n        fullySanitizedValue = `0.0${fullySanitizedValue}`;\n      } else if (index - 2 === -2) {\n        fullySanitizedValue = '0.00';\n      } else {\n        fullySanitizedValue = `${fullySanitizedValue.slice(0, index - 2)}.${fullySanitizedValue.slice(index - 2)}`;\n      }\n      if (isNegative > -1) {\n        fullySanitizedValue = `-${fullySanitizedValue}`;\n      }\n    }\n\n    let newValue = fullySanitizedValue ? +fullySanitizedValue : NaN;\n    if (isNaN(newValue)) {\n      return NaN;\n    }\n\n    if (this.options.style === 'percent') {\n      // extra step for rounding percents to what our formatter would output\n      let options = {\n        ...this.options,\n        style: 'decimal' as const,\n        minimumFractionDigits: Math.min((this.options.minimumFractionDigits ?? 0) + 2, 20),\n        maximumFractionDigits: Math.min((this.options.maximumFractionDigits ?? 0) + 2, 20)\n      };\n      return new NumberParser(this.locale, options).parse(\n        new NumberFormatter(this.locale, options).format(newValue)\n      );\n    }\n\n    // accounting will always be stripped to a positive number, so if it's accounting and has a () around everything, then we need to make it negative again\n    if (this.options.currencySign === 'accounting' && CURRENCY_SIGN_REGEX.test(value)) {\n      newValue = -1 * newValue;\n    }\n    return newValue;\n  }\n\n  sanitize(value: string) {\n    let isGroupSymbolAllowed = this.formatter.resolvedOptions().useGrouping;\n    // If the value is only a unit and it matches one of the formatted numbers where the value is part of the unit and doesn't have any numerals, then\n    // return the known value for that case.\n    if (\n      this.symbols.noNumeralUnits.length > 0 &&\n      this.symbols.noNumeralUnits.find(obj => obj.unit === value)\n    ) {\n      return this.symbols.noNumeralUnits.find(obj => obj.unit === value)!.value.toString();\n    }\n\n    value = value.replace(this.symbols.literals, '');\n\n    // Replace the ASCII minus sign with the minus sign used in the current locale\n    // so that both are allowed in case the user's keyboard doesn't have the locale's minus sign.\n    if (this.symbols.minusSign) {\n      value = value.replace('-', this.symbols.minusSign);\n    }\n\n    // In arab numeral system, their decimal character is 1643, but most keyboards don't type that\n    // instead they use the , (44) character or apparently the (1548) character.\n    if (this.options.numberingSystem === 'arab') {\n      if (this.symbols.decimal) {\n        value = replaceAll(value, ',', this.symbols.decimal);\n        value = replaceAll(value, String.fromCharCode(1548), this.symbols.decimal);\n      }\n      if (this.symbols.group && isGroupSymbolAllowed) {\n        value = replaceAll(value, '.', this.symbols.group);\n      }\n    }\n\n    // In some locale styles, such as swiss currency, the group character can be a special single quote\n    // that keyboards don't typically have. This expands the character to include the easier to type single quote.\n    if (this.symbols.group === '’' && value.includes(\"'\") && isGroupSymbolAllowed) {\n      value = replaceAll(value, \"'\", this.symbols.group);\n    }\n\n    // On newer ICU versions, the special single quote has been normalized, so we need to backport.\n    if (this.symbols.group === \"'\" && value.includes('’') && isGroupSymbolAllowed) {\n      value = replaceAll(value, '’', this.symbols.group);\n    }\n\n    // fr-FR group character is narrow non-breaking space, char code 8239 (U+202F), but that's not a key on the french keyboard,\n    // so allow space and non-breaking space as a group char as well\n    if (this.options.locale === 'fr-FR' && this.symbols.group && isGroupSymbolAllowed) {\n      value = replaceAll(value, ' ', this.symbols.group);\n      value = replaceAll(value, /\\u00A0/g, this.symbols.group);\n    }\n\n    return value;\n  }\n\n  isValidPartialNumber(\n    value: string,\n    minValue: number = -Infinity,\n    maxValue: number = Infinity\n  ): boolean {\n    let isGroupSymbolAllowed = this.formatter.resolvedOptions().useGrouping;\n    value = this.sanitize(value);\n\n    // Remove minus or plus sign, which must be at the start of the string.\n    if (this.symbols.minusSign && value.startsWith(this.symbols.minusSign) && minValue < 0) {\n      value = value.slice(this.symbols.minusSign.length);\n    } else if (this.symbols.plusSign && value.startsWith(this.symbols.plusSign) && maxValue > 0) {\n      value = value.slice(this.symbols.plusSign.length);\n    }\n\n    // Numbers that can't have any decimal values fail if a decimal character is typed\n    if (\n      this.symbols.decimal &&\n      value.indexOf(this.symbols.decimal) > -1 &&\n      this.options.maximumFractionDigits === 0\n    ) {\n      return false;\n    }\n\n    // Remove numerals, groups, and decimals\n    if (this.symbols.group && isGroupSymbolAllowed) {\n      value = replaceAll(value, this.symbols.group, '');\n    }\n    value = value.replace(this.symbols.numeral, '');\n    if (this.symbols.decimal) {\n      value = value.replace(this.symbols.decimal, '');\n    }\n\n    // The number is valid if there are no remaining characters\n    return value.length === 0;\n  }\n}\n\nconst nonLiteralParts = new Set([\n  'decimal',\n  'fraction',\n  'integer',\n  'minusSign',\n  'plusSign',\n  'group'\n]);\n\n// This list is derived from https://www.unicode.org/cldr/charts/49/supplemental/language_plural_rules.html#comparison and includes\n// all unique numbers which we need to check in order to determine all the plural forms for a given locale.\n// Run scripts/generateAllPlurals.mjs to generate this list.\nconst pluralNumbers = [0, 4, 2, 1, 11, 20, 3, 7, 100, 21, 0.1, 1.1];\n\nfunction getSymbols(\n  locale: string,\n  formatter: Intl.NumberFormat,\n  intlOptions: Intl.ResolvedNumberFormatOptions,\n  originalOptions: Intl.NumberFormatOptions\n): Symbols {\n  // formatter needs access to all decimal places in order to generate the correct literal strings for the plural set\n  let symbolFormatter = new Intl.NumberFormat(locale, {\n    ...intlOptions,\n    // Resets so we get the full range of symbols\n    minimumSignificantDigits: 1,\n    maximumSignificantDigits: 21,\n    roundingIncrement: 1,\n    roundingPriority: 'auto',\n    roundingMode: 'halfExpand',\n    useGrouping: true\n  });\n  // Note: some locale's don't add a group symbol until there is a ten thousands place\n  let allParts = symbolFormatter.formatToParts(-10000.111);\n  let posAllParts = symbolFormatter.formatToParts(10000.111);\n  let pluralParts = pluralNumbers.map(n => symbolFormatter.formatToParts(n));\n  // if the plural parts include a unit but no integer or fraction, then we need to add the unit to the special set\n  let noNumeralUnits = pluralParts\n    .map((p, i) => {\n      let unit = p.find(p => p.type === 'unit');\n      if (unit && !p.some(p => p.type === 'integer' || p.type === 'fraction')) {\n        return {unit: unit.value, value: pluralNumbers[i]};\n      }\n      return null;\n    })\n    .filter(p => !!p);\n\n  let minusSign = allParts.find(p => p.type === 'minusSign')?.value ?? '-';\n  let plusSign = posAllParts.find(p => p.type === 'plusSign')?.value;\n\n  // Safari does not support the signDisplay option, but our number parser polyfills it.\n  // If no plus sign was returned, but the original options contained signDisplay, default to the '+' character.\n  if (\n    !plusSign &&\n    (originalOptions?.signDisplay === 'exceptZero' || originalOptions?.signDisplay === 'always')\n  ) {\n    plusSign = '+';\n  }\n\n  // If maximumSignificantDigits is 1 (the minimum) then we won't get decimal characters out of the above formatters\n  // Percent also defaults to 0 fractionDigits, so we need to make a new one that isn't percent to get an accurate decimal\n  let decimalParts = new Intl.NumberFormat(locale, {\n    ...intlOptions,\n    minimumFractionDigits: 2,\n    maximumFractionDigits: 2\n  }).formatToParts(0.001);\n\n  let decimal = decimalParts.find(p => p.type === 'decimal')?.value;\n  let group = allParts.find(p => p.type === 'group')?.value;\n\n  // this set is also for a regex, it's all literals that might be in the string we want to eventually parse that\n  // don't contribute to the numerical value\n  let allPartsLiterals = allParts\n    .filter(p => !nonLiteralParts.has(p.type))\n    .map(p => escapeRegex(p.value));\n  let pluralPartsLiterals = pluralParts.flatMap(p =>\n    p.filter(p => !nonLiteralParts.has(p.type)).map(p => escapeRegex(p.value))\n  );\n  let sortedLiterals = [...new Set([...allPartsLiterals, ...pluralPartsLiterals])].sort(\n    (a, b) => b.length - a.length\n  );\n\n  // Match both whitespace and formatting characters\n  let literals =\n    sortedLiterals.length === 0\n      ? new RegExp('\\\\p{White_Space}|\\\\p{Cf}', 'gu')\n      : new RegExp(`${sortedLiterals.join('|')}|\\\\p{White_Space}|\\\\p{Cf}`, 'gu');\n\n  // These are for replacing non-latn characters with the latn equivalent\n  let numerals = [\n    ...new Intl.NumberFormat(intlOptions.locale, {useGrouping: false}).format(9876543210)\n  ].reverse();\n  let indexes = new Map(numerals.map((d, i) => [d, i]));\n  let numeral = new RegExp(`[${numerals.join('')}]`, 'g');\n  let index = d => String(indexes.get(d));\n\n  return {minusSign, plusSign, decimal, group, literals, numeral, numerals, index, noNumeralUnits};\n}\n\nfunction replaceAll(str: string, find: string | RegExp, replace: string) {\n  if (str.replaceAll) {\n    return str.replaceAll(find, replace);\n  }\n\n  return str.split(find).join(replace);\n}\n\nfunction escapeRegex(string: string) {\n  return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n","import type { MaybeComputedElementRef } from '@vueuse/core'\nimport type { Ref } from 'vue'\nimport { NumberFormatter, NumberParser } from '@internationalized/number'\nimport { unrefElement, useEventListener } from '@vueuse/core'\nimport { createEventHook, isClient, reactiveComputed } from '@vueuse/shared'\nimport { computed, ref } from 'vue'\n\nexport function usePressedHold(options: { target?: MaybeComputedElementRef, disabled: Ref<boolean> }) {\n  const { disabled } = options\n  const timeout = ref<number>()\n  const triggerHook = createEventHook()\n  const resetTimeout = () => window.clearTimeout(timeout.value)\n\n  const onIncrementPressStart = (delay: number) => {\n    resetTimeout()\n    if (disabled.value)\n      return\n\n    triggerHook.trigger()\n\n    timeout.value = window.setTimeout(() => {\n      onIncrementPressStart(60)\n    }, delay)\n  }\n\n  const handlePressStart = () => {\n    onIncrementPressStart(400)\n  }\n\n  const handlePressEnd = () => {\n    resetTimeout()\n  }\n\n  // Handle press event, modified version of useMousePressed\n  const isPressed = ref(false)\n  const target = computed(() => unrefElement(options.target))\n\n  const onPressStart = (event: PointerEvent) => {\n    // Only handle left clicks, and ignore events that bubbled through portals.\n    if (event.button !== 0 || isPressed.value)\n      return\n\n    event.preventDefault()\n    isPressed.value = true\n    handlePressStart()\n  }\n\n  const onPressRelease = () => {\n    isPressed.value = false\n    handlePressEnd()\n  }\n\n  if (isClient) {\n    useEventListener(target || window, 'pointerdown', onPressStart)\n    useEventListener(window, 'pointerup', onPressRelease)\n    useEventListener(window, 'pointercancel', onPressRelease)\n  }\n\n  return {\n    isPressed,\n    onTrigger: triggerHook.on,\n  }\n}\n\nexport function useNumberFormatter(locale: Ref<string>, options: Ref<Intl.NumberFormatOptions | undefined> = ref({})) {\n  return reactiveComputed(() => new NumberFormatter(locale.value, options.value))\n}\n\nexport function useNumberParser(locale: Ref<string>, options: Ref<Intl.NumberFormatOptions | undefined> = ref({})) {\n  return reactiveComputed(() => new NumberParser(locale.value, options.value))\n}\n\nexport function handleDecimalOperation(operator: '-' | '+', value1: number, value2: number): number {\n  let result = operator === '+' ? value1 + value2 : value1 - value2\n\n  // Check if we have decimals\n  if (value1 % 1 !== 0 || value2 % 1 !== 0) {\n    const value1Decimal = value1.toString().split('.')\n    const value2Decimal = value2.toString().split('.')\n    const value1DecimalLength = (value1Decimal[1] && value1Decimal[1].length) || 0\n    const value2DecimalLength = (value2Decimal[1] && value2Decimal[1].length) || 0\n    const multiplier = 10 ** Math.max(value1DecimalLength, value2DecimalLength)\n\n    // Transform the decimals to integers based on the precision\n    value1 = Math.round(value1 * multiplier)\n    value2 = Math.round(value2 * multiplier)\n\n    // Perform the operation on integers values to make sure we don't get a fancy decimal value\n    result = operator === '+' ? value1 + value2 : value1 - value2\n\n    // Transform the integer result back to decimal\n    result /= multiplier\n  }\n\n  return result\n}\n","<script lang=\"ts\">\nimport type { HTMLAttributes, Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { FormFieldProps } from '@/shared/types'\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref, toRefs } from 'vue'\nimport { clamp, createContext, isNullish, snapValueToStep, useFormControl, useLocale } from '@/shared'\n\nexport interface NumberFieldRootProps extends PrimitiveProps, FormFieldProps {\n  defaultValue?: number\n  modelValue?: number | null\n  /** The smallest value allowed for the input. */\n  min?: number\n  /** The largest value allowed for the input. */\n  max?: number\n  /** The amount that the input value changes with each increment or decrement \"tick\". */\n  step?: number\n  /** When `false`, prevents the value from snapping to the nearest increment of the step value */\n  stepSnapping?: boolean\n  /** When `true`, the input will be focused when the value changes. */\n  focusOnChange?: boolean\n  /** Formatting options for the value displayed in the number field. This also affects what characters are allowed to be typed by the user. */\n  formatOptions?: Intl.NumberFormatOptions\n  /** The locale to use for formatting and currencies */\n  locale?: string\n  /** When `true`, prevents the user from interacting with the Number Field. */\n  disabled?: boolean\n  /** When `true`, the Number Field is read-only. */\n  readonly?: boolean\n  /** When `true`, prevents the value from changing on wheel scroll. */\n  disableWheelChange?: boolean\n  /** When `true`, inverts the direction of the wheel change. */\n  invertWheelChange?: boolean\n  /** Id of the element */\n  id?: string\n}\n\nexport type NumberFieldRootEmits = {\n  'update:modelValue': [val: number]\n}\n\ninterface NumberFieldRootContext {\n  modelValue: Ref<number | undefined>\n  handleIncrease: (multiplier?: number) => void\n  handleDecrease: (multiplier?: number) => void\n  handleMinMaxValue: (type: 'min' | 'max') => void\n  inputEl: Ref<HTMLInputElement | undefined>\n  onInputElement: (el: HTMLInputElement) => void\n  inputMode: Ref<HTMLAttributes['inputmode']>\n  textValue: Ref<string>\n  validate: (val: string) => boolean\n  applyInputValue: (val: string) => void\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  disableWheelChange: Ref<boolean>\n  invertWheelChange: Ref<boolean>\n  max: Ref<number | undefined>\n  min: Ref<number | undefined>\n  isDecreaseDisabled: Ref<boolean>\n  isIncreaseDisabled: Ref<boolean>\n  id: Ref<string | undefined>\n}\n\nexport const [injectNumberFieldRootContext, provideNumberFieldRootContext] = createContext<NumberFieldRootContext>('NumberFieldRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\nimport { handleDecimalOperation, useNumberFormatter, useNumberParser } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<NumberFieldRootProps>(), {\n  as: 'div',\n  defaultValue: undefined,\n  step: 1,\n  stepSnapping: true,\n  focusOnChange: true,\n})\nconst emits = defineEmits<NumberFieldRootEmits>()\nconst { disabled, readonly, disableWheelChange, invertWheelChange, min, max, step, stepSnapping, formatOptions, id, locale: propLocale } = toRefs(props)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<number | undefined>\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nconst locale = useLocale(propLocale)\nconst isFormControl = useFormControl(currentElement)\nconst inputEl = ref<HTMLInputElement>()\n\nconst isDecreaseDisabled = computed(() => (\n  !isNullish(modelValue.value) && (\n    clampInputValue(modelValue.value) === min.value\n    || (min.value && !isNaN(modelValue.value)\n    )\n      ? (handleDecimalOperation('-', modelValue.value, step.value) < min.value)\n      : false)),\n)\nconst isIncreaseDisabled = computed(() => (\n  !isNullish(modelValue.value) && (\n    clampInputValue(modelValue.value) === max.value\n    || (max.value && !isNaN(modelValue.value)\n    )\n      ? (handleDecimalOperation('+', modelValue.value, step.value) > max.value)\n      : false)),\n)\n\nfunction handleChangingValue(type: 'increase' | 'decrease', multiplier = 1) {\n  if (props.focusOnChange) {\n    inputEl.value?.focus()\n  }\n  if (props.disabled || props.readonly)\n    return\n  const currentInputValue = numberParser.parse(inputEl.value?.value ?? '')\n  if (isNaN(currentInputValue)) {\n    modelValue.value = min.value ?? 0\n  }\n  else {\n    if (type === 'increase')\n      modelValue.value = clampInputValue(currentInputValue + ((step.value ?? 1) * multiplier))\n    else\n      modelValue.value = clampInputValue(currentInputValue - ((step.value ?? 1) * multiplier))\n  }\n}\n\nfunction handleIncrease(multiplier = 1) {\n  handleChangingValue('increase', multiplier)\n}\nfunction handleDecrease(multiplier = 1) {\n  handleChangingValue('decrease', multiplier)\n}\n\nfunction handleMinMaxValue(type: 'min' | 'max') {\n  if (type === 'min' && min.value !== undefined)\n    modelValue.value = clampInputValue(min.value)\n  else if (type === 'max' && max.value !== undefined)\n    modelValue.value = clampInputValue(max.value)\n}\n\n// Formatter\nconst numberFormatter = useNumberFormatter(locale, formatOptions)\nconst numberParser = useNumberParser(locale, formatOptions)\n\nconst inputMode = computed<HTMLAttributes['inputmode']>(() => {\n  // The inputMode attribute influences the software keyboard that is shown on touch devices.\n  // Browsers and operating systems are quite inconsistent about what keys are available, however.\n  // We choose between numeric and decimal based on whether we allow negative and fractional numbers,\n  // and based on testing on various devices to determine what keys are available in each inputMode.\n  const hasDecimals = numberFormatter.resolvedOptions().maximumFractionDigits! > 0\n\n  return hasDecimals ? 'decimal' : 'numeric'\n})\n// Replace negative textValue formatted using currencySign: 'accounting'\n// with a textValue that can be announced using a minus sign.\nconst textValueFormatter = useNumberFormatter(locale, formatOptions)\nconst textValue = computed(() => isNullish(modelValue.value) || isNaN(modelValue.value) ? '' : textValueFormatter.format(modelValue.value))\n\nfunction validate(val: string) {\n  return numberParser.isValidPartialNumber(val, min.value, max.value)\n}\n\nfunction setInputValue(val: string) {\n  if (inputEl.value)\n    inputEl.value.value = val\n}\n\nfunction clampInputValue(val: number) {\n  // Clamp to min and max, round to the nearest step, and round to specified number of digits\n  let clampedValue: number\n  if (step.value === undefined || isNaN(step.value) || !stepSnapping.value)\n    clampedValue = clamp(val, min.value, max.value)\n  else\n    clampedValue = snapValueToStep(val, min.value, max.value, step.value)\n\n  clampedValue = numberParser.parse(numberFormatter.format(clampedValue))\n  return clampedValue\n}\n\nfunction applyInputValue(val: string) {\n  const parsedValue = numberParser.parse(val)\n  modelValue.value = isNaN(parsedValue) ? undefined : clampInputValue(parsedValue)\n  // Set to empty state if input value is empty\n  if (!val.length)\n    return setInputValue(val)\n\n  // if it failed to parse, then reset input to formatted version of current number\n  if (isNaN(parsedValue))\n    return setInputValue(textValue.value)\n\n  return setInputValue(textValue.value)\n}\n\nprovideNumberFieldRootContext({\n  modelValue,\n  handleDecrease,\n  handleIncrease,\n  handleMinMaxValue,\n  inputMode,\n  inputEl,\n  onInputElement: el => inputEl.value = el,\n  textValue,\n  readonly,\n  validate,\n  applyInputValue,\n  disabled,\n  disableWheelChange,\n  invertWheelChange,\n  max,\n  min,\n  isDecreaseDisabled,\n  isIncreaseDisabled,\n  id,\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    ref=\"primitiveElement\"\n    role=\"group\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-readonly=\"readonly ? '' : undefined\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :text-value=\"textValue\"\n      :readonly=\"readonly\"\n    />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name\"\n      type=\"text\"\n      :value=\"modelValue\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :readonly=\"readonly\"\n      :required=\"required\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { HTMLAttributes, Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { FormFieldProps } from '@/shared/types'\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref, toRefs } from 'vue'\nimport { clamp, createContext, isNullish, snapValueToStep, useFormControl, useLocale } from '@/shared'\n\nexport interface NumberFieldRootProps extends PrimitiveProps, FormFieldProps {\n  defaultValue?: number\n  modelValue?: number | null\n  /** The smallest value allowed for the input. */\n  min?: number\n  /** The largest value allowed for the input. */\n  max?: number\n  /** The amount that the input value changes with each increment or decrement \"tick\". */\n  step?: number\n  /** When `false`, prevents the value from snapping to the nearest increment of the step value */\n  stepSnapping?: boolean\n  /** When `true`, the input will be focused when the value changes. */\n  focusOnChange?: boolean\n  /** Formatting options for the value displayed in the number field. This also affects what characters are allowed to be typed by the user. */\n  formatOptions?: Intl.NumberFormatOptions\n  /** The locale to use for formatting and currencies */\n  locale?: string\n  /** When `true`, prevents the user from interacting with the Number Field. */\n  disabled?: boolean\n  /** When `true`, the Number Field is read-only. */\n  readonly?: boolean\n  /** When `true`, prevents the value from changing on wheel scroll. */\n  disableWheelChange?: boolean\n  /** When `true`, inverts the direction of the wheel change. */\n  invertWheelChange?: boolean\n  /** Id of the element */\n  id?: string\n}\n\nexport type NumberFieldRootEmits = {\n  'update:modelValue': [val: number]\n}\n\ninterface NumberFieldRootContext {\n  modelValue: Ref<number | undefined>\n  handleIncrease: (multiplier?: number) => void\n  handleDecrease: (multiplier?: number) => void\n  handleMinMaxValue: (type: 'min' | 'max') => void\n  inputEl: Ref<HTMLInputElement | undefined>\n  onInputElement: (el: HTMLInputElement) => void\n  inputMode: Ref<HTMLAttributes['inputmode']>\n  textValue: Ref<string>\n  validate: (val: string) => boolean\n  applyInputValue: (val: string) => void\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  disableWheelChange: Ref<boolean>\n  invertWheelChange: Ref<boolean>\n  max: Ref<number | undefined>\n  min: Ref<number | undefined>\n  isDecreaseDisabled: Ref<boolean>\n  isIncreaseDisabled: Ref<boolean>\n  id: Ref<string | undefined>\n}\n\nexport const [injectNumberFieldRootContext, provideNumberFieldRootContext] = createContext<NumberFieldRootContext>('NumberFieldRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\nimport { handleDecimalOperation, useNumberFormatter, useNumberParser } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<NumberFieldRootProps>(), {\n  as: 'div',\n  defaultValue: undefined,\n  step: 1,\n  stepSnapping: true,\n  focusOnChange: true,\n})\nconst emits = defineEmits<NumberFieldRootEmits>()\nconst { disabled, readonly, disableWheelChange, invertWheelChange, min, max, step, stepSnapping, formatOptions, id, locale: propLocale } = toRefs(props)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<number | undefined>\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nconst locale = useLocale(propLocale)\nconst isFormControl = useFormControl(currentElement)\nconst inputEl = ref<HTMLInputElement>()\n\nconst isDecreaseDisabled = computed(() => (\n  !isNullish(modelValue.value) && (\n    clampInputValue(modelValue.value) === min.value\n    || (min.value && !isNaN(modelValue.value)\n    )\n      ? (handleDecimalOperation('-', modelValue.value, step.value) < min.value)\n      : false)),\n)\nconst isIncreaseDisabled = computed(() => (\n  !isNullish(modelValue.value) && (\n    clampInputValue(modelValue.value) === max.value\n    || (max.value && !isNaN(modelValue.value)\n    )\n      ? (handleDecimalOperation('+', modelValue.value, step.value) > max.value)\n      : false)),\n)\n\nfunction handleChangingValue(type: 'increase' | 'decrease', multiplier = 1) {\n  if (props.focusOnChange) {\n    inputEl.value?.focus()\n  }\n  if (props.disabled || props.readonly)\n    return\n  const currentInputValue = numberParser.parse(inputEl.value?.value ?? '')\n  if (isNaN(currentInputValue)) {\n    modelValue.value = min.value ?? 0\n  }\n  else {\n    if (type === 'increase')\n      modelValue.value = clampInputValue(currentInputValue + ((step.value ?? 1) * multiplier))\n    else\n      modelValue.value = clampInputValue(currentInputValue - ((step.value ?? 1) * multiplier))\n  }\n}\n\nfunction handleIncrease(multiplier = 1) {\n  handleChangingValue('increase', multiplier)\n}\nfunction handleDecrease(multiplier = 1) {\n  handleChangingValue('decrease', multiplier)\n}\n\nfunction handleMinMaxValue(type: 'min' | 'max') {\n  if (type === 'min' && min.value !== undefined)\n    modelValue.value = clampInputValue(min.value)\n  else if (type === 'max' && max.value !== undefined)\n    modelValue.value = clampInputValue(max.value)\n}\n\n// Formatter\nconst numberFormatter = useNumberFormatter(locale, formatOptions)\nconst numberParser = useNumberParser(locale, formatOptions)\n\nconst inputMode = computed<HTMLAttributes['inputmode']>(() => {\n  // The inputMode attribute influences the software keyboard that is shown on touch devices.\n  // Browsers and operating systems are quite inconsistent about what keys are available, however.\n  // We choose between numeric and decimal based on whether we allow negative and fractional numbers,\n  // and based on testing on various devices to determine what keys are available in each inputMode.\n  const hasDecimals = numberFormatter.resolvedOptions().maximumFractionDigits! > 0\n\n  return hasDecimals ? 'decimal' : 'numeric'\n})\n// Replace negative textValue formatted using currencySign: 'accounting'\n// with a textValue that can be announced using a minus sign.\nconst textValueFormatter = useNumberFormatter(locale, formatOptions)\nconst textValue = computed(() => isNullish(modelValue.value) || isNaN(modelValue.value) ? '' : textValueFormatter.format(modelValue.value))\n\nfunction validate(val: string) {\n  return numberParser.isValidPartialNumber(val, min.value, max.value)\n}\n\nfunction setInputValue(val: string) {\n  if (inputEl.value)\n    inputEl.value.value = val\n}\n\nfunction clampInputValue(val: number) {\n  // Clamp to min and max, round to the nearest step, and round to specified number of digits\n  let clampedValue: number\n  if (step.value === undefined || isNaN(step.value) || !stepSnapping.value)\n    clampedValue = clamp(val, min.value, max.value)\n  else\n    clampedValue = snapValueToStep(val, min.value, max.value, step.value)\n\n  clampedValue = numberParser.parse(numberFormatter.format(clampedValue))\n  return clampedValue\n}\n\nfunction applyInputValue(val: string) {\n  const parsedValue = numberParser.parse(val)\n  modelValue.value = isNaN(parsedValue) ? undefined : clampInputValue(parsedValue)\n  // Set to empty state if input value is empty\n  if (!val.length)\n    return setInputValue(val)\n\n  // if it failed to parse, then reset input to formatted version of current number\n  if (isNaN(parsedValue))\n    return setInputValue(textValue.value)\n\n  return setInputValue(textValue.value)\n}\n\nprovideNumberFieldRootContext({\n  modelValue,\n  handleDecrease,\n  handleIncrease,\n  handleMinMaxValue,\n  inputMode,\n  inputEl,\n  onInputElement: el => inputEl.value = el,\n  textValue,\n  readonly,\n  validate,\n  applyInputValue,\n  disabled,\n  disableWheelChange,\n  invertWheelChange,\n  max,\n  min,\n  isDecreaseDisabled,\n  isIncreaseDisabled,\n  id,\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    ref=\"primitiveElement\"\n    role=\"group\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-readonly=\"readonly ? '' : undefined\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :text-value=\"textValue\"\n      :readonly=\"readonly\"\n    />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name\"\n      type=\"text\"\n      :value=\"modelValue\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :readonly=\"readonly\"\n      :required=\"required\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed } from 'vue'\nimport { injectNumberFieldRootContext } from './NumberFieldRoot.vue'\nimport { usePressedHold } from './utils'\n\nexport interface NumberFieldDecrementProps extends PrimitiveProps {\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<NumberFieldDecrementProps>(), {\n  as: 'button',\n})\n\nconst rootContext = injectNumberFieldRootContext()\nconst isDisabled = computed(() => rootContext.disabled?.value || rootContext.readonly.value || props.disabled || rootContext.isDecreaseDisabled.value)\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\nconst { isPressed, onTrigger } = usePressedHold({ target: currentElement, disabled: isDisabled })\n\nonTrigger(() => {\n  rootContext.handleDecrease()\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    ref=\"primitiveElement\"\n    tabindex=\"-1\"\n    aria-label=\"Decrease\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :style=\"{\n      userSelect: isPressed ? 'none' : undefined,\n    }\"\n    :disabled=\"isDisabled ? '' : undefined\"\n    :data-disabled=\"isDisabled ? '' : undefined\"\n    :data-pressed=\"isPressed ? 'true' : undefined\"\n    @contextmenu.prevent\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed } from 'vue'\nimport { injectNumberFieldRootContext } from './NumberFieldRoot.vue'\nimport { usePressedHold } from './utils'\n\nexport interface NumberFieldDecrementProps extends PrimitiveProps {\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<NumberFieldDecrementProps>(), {\n  as: 'button',\n})\n\nconst rootContext = injectNumberFieldRootContext()\nconst isDisabled = computed(() => rootContext.disabled?.value || rootContext.readonly.value || props.disabled || rootContext.isDecreaseDisabled.value)\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\nconst { isPressed, onTrigger } = usePressedHold({ target: currentElement, disabled: isDisabled })\n\nonTrigger(() => {\n  rootContext.handleDecrease()\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    ref=\"primitiveElement\"\n    tabindex=\"-1\"\n    aria-label=\"Decrease\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :style=\"{\n      userSelect: isPressed ? 'none' : undefined,\n    }\"\n    :disabled=\"isDisabled ? '' : undefined\"\n    :data-disabled=\"isDisabled ? '' : undefined\"\n    :data-pressed=\"isPressed ? 'true' : undefined\"\n    @contextmenu.prevent\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed } from 'vue'\nimport { injectNumberFieldRootContext } from './NumberFieldRoot.vue'\nimport { usePressedHold } from './utils'\n\nexport interface NumberFieldIncrementProps extends PrimitiveProps {\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<NumberFieldIncrementProps>(), {\n  as: 'button',\n})\n\nconst rootContext = injectNumberFieldRootContext()\nconst isDisabled = computed(() => rootContext.disabled?.value || rootContext.readonly.value || props.disabled || rootContext.isIncreaseDisabled.value)\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\nconst { isPressed, onTrigger } = usePressedHold({ target: currentElement, disabled: isDisabled })\n\nonTrigger(() => {\n  rootContext.handleIncrease()\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    ref=\"primitiveElement\"\n    tabindex=\"-1\"\n    aria-label=\"Increase\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :style=\"{\n      userSelect: isPressed ? 'none' : undefined,\n    }\"\n    :disabled=\"isDisabled ? '' : undefined\"\n    :data-disabled=\"isDisabled ? '' : undefined\"\n    :data-pressed=\"isPressed ? 'true' : undefined\"\n    @contextmenu.prevent\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed } from 'vue'\nimport { injectNumberFieldRootContext } from './NumberFieldRoot.vue'\nimport { usePressedHold } from './utils'\n\nexport interface NumberFieldIncrementProps extends PrimitiveProps {\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<NumberFieldIncrementProps>(), {\n  as: 'button',\n})\n\nconst rootContext = injectNumberFieldRootContext()\nconst isDisabled = computed(() => rootContext.disabled?.value || rootContext.readonly.value || props.disabled || rootContext.isIncreaseDisabled.value)\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\nconst { isPressed, onTrigger } = usePressedHold({ target: currentElement, disabled: isDisabled })\n\nonTrigger(() => {\n  rootContext.handleIncrease()\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    ref=\"primitiveElement\"\n    tabindex=\"-1\"\n    aria-label=\"Increase\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :style=\"{\n      userSelect: isPressed ? 'none' : undefined,\n    }\"\n    :disabled=\"isDisabled ? '' : undefined\"\n    :data-disabled=\"isDisabled ? '' : undefined\"\n    :data-pressed=\"isPressed ? 'true' : undefined\"\n    @contextmenu.prevent\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { onMounted, ref, watch } from 'vue'\nimport { getActiveElement, useComposing, useKbd } from '@/shared'\nimport { injectNumberFieldRootContext } from './NumberFieldRoot.vue'\n\nexport interface NumberFieldInputProps extends PrimitiveProps {\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<NumberFieldInputProps>(), {\n  as: 'input',\n})\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\nconst rootContext = injectNumberFieldRootContext()\nconst kbd = useKbd()\nconst { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing()\n\nfunction handleKeydown(event: KeyboardEvent) {\n  // Don't step/apply mid-composition, keys are used for IME candidate navigation and commit.\n  // `isComposing` stays true until the tick after `compositionend`, so the commit keydown\n  // (which can report `event.isComposing === false`) is still skipped.\n  if (isComposing.value || event.isComposing)\n    return\n\n  switch (event.key) {\n    case kbd.ARROW_UP:\n      event.preventDefault()\n      rootContext.handleIncrease()\n      break\n    case kbd.ARROW_DOWN:\n      event.preventDefault()\n      rootContext.handleDecrease()\n      break\n    case kbd.PAGE_UP:\n      event.preventDefault()\n      rootContext.handleIncrease(10)\n      break\n    case kbd.PAGE_DOWN:\n      event.preventDefault()\n      rootContext.handleDecrease(10)\n      break\n    case kbd.HOME:\n      event.preventDefault()\n      rootContext.handleMinMaxValue('min')\n      break\n    case kbd.END:\n      event.preventDefault()\n      rootContext.handleMinMaxValue('max')\n      break\n    case kbd.ENTER:\n      rootContext.applyInputValue((event.target as HTMLInputElement)?.value)\n      break\n  }\n}\n\nfunction handleWheelEvent(event: WheelEvent) {\n  if (rootContext.disableWheelChange.value)\n    return\n\n  // only handle when in focus\n  if (event.target !== getActiveElement())\n    return\n\n  // if on a trackpad, users can scroll in both X and Y at once, check the magnitude of the change\n  // if it's mostly in the X direction, then just return, the user probably doesn't mean to inc/dec\n  // this isn't perfect, events come in fast with small deltas and a part of the scroll may give a false indication\n  // especially if the user is scrolling near 45deg\n  if (Math.abs(event.deltaY) <= Math.abs(event.deltaX))\n    return\n\n  event.preventDefault()\n  if (event.deltaY > 0)\n    rootContext.invertWheelChange.value ? rootContext.handleDecrease() : rootContext.handleIncrease()\n  else if (event.deltaY < 0)\n    rootContext.invertWheelChange.value ? rootContext.handleIncrease() : rootContext.handleDecrease()\n}\n\nonMounted(() => {\n  rootContext.onInputElement(currentElement.value as HTMLInputElement)\n})\n\nconst inputValue = ref(rootContext.textValue.value)\nwatch(() => rootContext.textValue.value, () => {\n  inputValue.value = rootContext.textValue.value\n}, { immediate: true, deep: true })\n\nfunction handleChange() {\n  requestAnimationFrame(() => {\n    inputValue.value = rootContext.textValue.value\n  })\n}\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"rootContext.id.value\"\n    ref=\"primitiveElement\"\n    :value=\"inputValue\"\n    role=\"spinbutton\"\n    type=\"text\"\n    tabindex=\"0\"\n    :inputmode=\"rootContext.inputMode.value\"\n    :disabled=\"rootContext.disabled.value ? '' : undefined\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n    :readonly=\"rootContext.readonly.value ? '' : undefined\"\n    :data-readonly=\"rootContext.readonly.value ? '' : undefined\"\n    autocomplete=\"off\"\n    autocorrect=\"off\"\n    spellcheck=\"false\"\n    aria-roledescription=\"Number field\"\n    :aria-valuenow=\"rootContext.modelValue.value\"\n    :aria-valuemin=\"rootContext.min.value\"\n    :aria-valuemax=\"rootContext.max.value\"\n    @keydown=\"handleKeydown\"\n    @wheel=\"handleWheelEvent\"\n    @beforeinput=\"(event: InputEvent) => {\n      if (event.isComposing) return\n      const target = event.target as HTMLInputElement\n      let nextValue\n        = target.value.slice(0, target.selectionStart ?? undefined)\n          + (event.data ?? '')\n          + target.value.slice(target.selectionEnd ?? undefined);\n\n      // validate\n      if (!rootContext.validate(nextValue))\n        event.preventDefault()\n    }\"\n    @input=\"(event: InputEvent) => {\n      const target = event.target as HTMLInputElement\n      inputValue = target.value\n    }\"\n    @change=\"handleChange\"\n    @blur=\"rootContext.applyInputValue($event.target?.value)\"\n    @compositionstart=\"handleCompositionStart\"\n    @compositionend=\"handleCompositionEnd\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { onMounted, ref, watch } from 'vue'\nimport { getActiveElement, useComposing, useKbd } from '@/shared'\nimport { injectNumberFieldRootContext } from './NumberFieldRoot.vue'\n\nexport interface NumberFieldInputProps extends PrimitiveProps {\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<NumberFieldInputProps>(), {\n  as: 'input',\n})\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\nconst rootContext = injectNumberFieldRootContext()\nconst kbd = useKbd()\nconst { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing()\n\nfunction handleKeydown(event: KeyboardEvent) {\n  // Don't step/apply mid-composition, keys are used for IME candidate navigation and commit.\n  // `isComposing` stays true until the tick after `compositionend`, so the commit keydown\n  // (which can report `event.isComposing === false`) is still skipped.\n  if (isComposing.value || event.isComposing)\n    return\n\n  switch (event.key) {\n    case kbd.ARROW_UP:\n      event.preventDefault()\n      rootContext.handleIncrease()\n      break\n    case kbd.ARROW_DOWN:\n      event.preventDefault()\n      rootContext.handleDecrease()\n      break\n    case kbd.PAGE_UP:\n      event.preventDefault()\n      rootContext.handleIncrease(10)\n      break\n    case kbd.PAGE_DOWN:\n      event.preventDefault()\n      rootContext.handleDecrease(10)\n      break\n    case kbd.HOME:\n      event.preventDefault()\n      rootContext.handleMinMaxValue('min')\n      break\n    case kbd.END:\n      event.preventDefault()\n      rootContext.handleMinMaxValue('max')\n      break\n    case kbd.ENTER:\n      rootContext.applyInputValue((event.target as HTMLInputElement)?.value)\n      break\n  }\n}\n\nfunction handleWheelEvent(event: WheelEvent) {\n  if (rootContext.disableWheelChange.value)\n    return\n\n  // only handle when in focus\n  if (event.target !== getActiveElement())\n    return\n\n  // if on a trackpad, users can scroll in both X and Y at once, check the magnitude of the change\n  // if it's mostly in the X direction, then just return, the user probably doesn't mean to inc/dec\n  // this isn't perfect, events come in fast with small deltas and a part of the scroll may give a false indication\n  // especially if the user is scrolling near 45deg\n  if (Math.abs(event.deltaY) <= Math.abs(event.deltaX))\n    return\n\n  event.preventDefault()\n  if (event.deltaY > 0)\n    rootContext.invertWheelChange.value ? rootContext.handleDecrease() : rootContext.handleIncrease()\n  else if (event.deltaY < 0)\n    rootContext.invertWheelChange.value ? rootContext.handleIncrease() : rootContext.handleDecrease()\n}\n\nonMounted(() => {\n  rootContext.onInputElement(currentElement.value as HTMLInputElement)\n})\n\nconst inputValue = ref(rootContext.textValue.value)\nwatch(() => rootContext.textValue.value, () => {\n  inputValue.value = rootContext.textValue.value\n}, { immediate: true, deep: true })\n\nfunction handleChange() {\n  requestAnimationFrame(() => {\n    inputValue.value = rootContext.textValue.value\n  })\n}\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"rootContext.id.value\"\n    ref=\"primitiveElement\"\n    :value=\"inputValue\"\n    role=\"spinbutton\"\n    type=\"text\"\n    tabindex=\"0\"\n    :inputmode=\"rootContext.inputMode.value\"\n    :disabled=\"rootContext.disabled.value ? '' : undefined\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n    :readonly=\"rootContext.readonly.value ? '' : undefined\"\n    :data-readonly=\"rootContext.readonly.value ? '' : undefined\"\n    autocomplete=\"off\"\n    autocorrect=\"off\"\n    spellcheck=\"false\"\n    aria-roledescription=\"Number field\"\n    :aria-valuenow=\"rootContext.modelValue.value\"\n    :aria-valuemin=\"rootContext.min.value\"\n    :aria-valuemax=\"rootContext.max.value\"\n    @keydown=\"handleKeydown\"\n    @wheel=\"handleWheelEvent\"\n    @beforeinput=\"(event: InputEvent) => {\n      if (event.isComposing) return\n      const target = event.target as HTMLInputElement\n      let nextValue\n        = target.value.slice(0, target.selectionStart ?? undefined)\n          + (event.data ?? '')\n          + target.value.slice(target.selectionEnd ?? undefined);\n\n      // validate\n      if (!rootContext.validate(nextValue))\n        event.preventDefault()\n    }\"\n    @input=\"(event: InputEvent) => {\n      const target = event.target as HTMLInputElement\n      inputValue = target.value\n    }\"\n    @change=\"handleChange\"\n    @blur=\"rootContext.applyInputValue($event.target?.value)\"\n    @compositionstart=\"handleCompositionStart\"\n    @compositionend=\"handleCompositionEnd\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PaginationEllipsisProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<PaginationEllipsisProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    data-type=\"ellipsis\"\n  >\n    <slot>&#8230;</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PaginationEllipsisProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<PaginationEllipsisProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    data-type=\"ellipsis\"\n  >\n    <slot>&#8230;</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useForwardExpose } from '@/shared'\n\ntype PaginationRootContext = {\n  page: Ref<number>\n  onPageChange: (value: number) => void\n  pageCount: Ref<number>\n  siblingCount: Ref<number>\n  disabled: Ref<boolean>\n  showEdges: Ref<boolean>\n}\n\nexport interface PaginationRootProps extends PrimitiveProps {\n  /** The controlled value of the current page. Can be binded as `v-model:page`. */\n  page?: number\n  /**\n   * The value of the page that should be active when initially rendered.\n   *\n   * Use when you do not need to control the value state.\n   */\n  defaultPage?: number\n  /** Number of items per page */\n  itemsPerPage: number\n  /** Number of items in your list */\n  total?: number\n  /** Number of sibling should be shown around the current page */\n  siblingCount?: number\n  /** When `true`, prevents the user from interacting with item */\n  disabled?: boolean\n  /** When `true`, always show first page, last page, and ellipsis */\n  showEdges?: boolean\n}\n\nexport type PaginationRootEmits = {\n  /** Event handler called when the page value changes */\n  'update:page': [value: number]\n}\n\nexport const [injectPaginationRootContext, providePaginationRootContext]\n  = createContext<PaginationRootContext>('PaginationRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<PaginationRootProps>(), {\n  as: 'nav',\n  total: 0,\n  siblingCount: 2,\n  defaultPage: 1,\n  showEdges: false,\n})\nconst emits = defineEmits<PaginationRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current page state */\n    page: typeof page.value\n    /** Number of pages */\n    pageCount: typeof pageCount.value\n  }) => any\n}>()\n\nconst { siblingCount, disabled, showEdges } = toRefs(props)\n\nuseForwardExpose()\nconst page = useVModel(props, 'page', emits, {\n  defaultValue: props.defaultPage,\n  passive: (props.page === undefined) as false,\n}) as Ref<number>\n\nconst pageCount = computed(() => Math.max(1, Math.ceil(props.total / (props.itemsPerPage || 1))))\n\nprovidePaginationRootContext({\n  page,\n  onPageChange(value) {\n    page.value = value\n  },\n  pageCount,\n  siblingCount,\n  disabled,\n  showEdges,\n})\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n  >\n    <slot\n      :page=\"page\"\n      :page-count=\"pageCount\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useForwardExpose } from '@/shared'\n\ntype PaginationRootContext = {\n  page: Ref<number>\n  onPageChange: (value: number) => void\n  pageCount: Ref<number>\n  siblingCount: Ref<number>\n  disabled: Ref<boolean>\n  showEdges: Ref<boolean>\n}\n\nexport interface PaginationRootProps extends PrimitiveProps {\n  /** The controlled value of the current page. Can be binded as `v-model:page`. */\n  page?: number\n  /**\n   * The value of the page that should be active when initially rendered.\n   *\n   * Use when you do not need to control the value state.\n   */\n  defaultPage?: number\n  /** Number of items per page */\n  itemsPerPage: number\n  /** Number of items in your list */\n  total?: number\n  /** Number of sibling should be shown around the current page */\n  siblingCount?: number\n  /** When `true`, prevents the user from interacting with item */\n  disabled?: boolean\n  /** When `true`, always show first page, last page, and ellipsis */\n  showEdges?: boolean\n}\n\nexport type PaginationRootEmits = {\n  /** Event handler called when the page value changes */\n  'update:page': [value: number]\n}\n\nexport const [injectPaginationRootContext, providePaginationRootContext]\n  = createContext<PaginationRootContext>('PaginationRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<PaginationRootProps>(), {\n  as: 'nav',\n  total: 0,\n  siblingCount: 2,\n  defaultPage: 1,\n  showEdges: false,\n})\nconst emits = defineEmits<PaginationRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current page state */\n    page: typeof page.value\n    /** Number of pages */\n    pageCount: typeof pageCount.value\n  }) => any\n}>()\n\nconst { siblingCount, disabled, showEdges } = toRefs(props)\n\nuseForwardExpose()\nconst page = useVModel(props, 'page', emits, {\n  defaultValue: props.defaultPage,\n  passive: (props.page === undefined) as false,\n}) as Ref<number>\n\nconst pageCount = computed(() => Math.max(1, Math.ceil(props.total / (props.itemsPerPage || 1))))\n\nprovidePaginationRootContext({\n  page,\n  onPageChange(value) {\n    page.value = value\n  },\n  pageCount,\n  siblingCount,\n  disabled,\n  showEdges,\n})\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n  >\n    <slot\n      :page=\"page\"\n      :page-count=\"pageCount\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PaginationFirstProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectPaginationRootContext } from './PaginationRoot.vue'\n\nconst props = withDefaults(defineProps<PaginationFirstProps>(), { as: 'button' })\n\nconst rootContext = injectPaginationRootContext()\nuseForwardExpose()\n\nconst disabled = computed((): boolean => rootContext.page.value === 1 || rootContext.disabled.value)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-label=\"First Page\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :disabled\n    @click=\"!disabled && rootContext.onPageChange(1)\"\n  >\n    <slot>First page</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PaginationFirstProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectPaginationRootContext } from './PaginationRoot.vue'\n\nconst props = withDefaults(defineProps<PaginationFirstProps>(), { as: 'button' })\n\nconst rootContext = injectPaginationRootContext()\nuseForwardExpose()\n\nconst disabled = computed((): boolean => rootContext.page.value === 1 || rootContext.disabled.value)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-label=\"First Page\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :disabled\n    @click=\"!disabled && rootContext.onPageChange(1)\"\n  >\n    <slot>First page</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PaginationLastProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectPaginationRootContext } from './PaginationRoot.vue'\n\nconst props = withDefaults(defineProps<PaginationLastProps>(), { as: 'button' })\n\nconst rootContext = injectPaginationRootContext()\nuseForwardExpose()\n\nconst disabled = computed((): boolean => rootContext.page.value === rootContext.pageCount.value || rootContext.disabled.value)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-label=\"Last Page\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :disabled\n    @click=\"!disabled && rootContext.onPageChange(rootContext.pageCount.value)\"\n  >\n    <slot>Last page</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PaginationLastProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectPaginationRootContext } from './PaginationRoot.vue'\n\nconst props = withDefaults(defineProps<PaginationLastProps>(), { as: 'button' })\n\nconst rootContext = injectPaginationRootContext()\nuseForwardExpose()\n\nconst disabled = computed((): boolean => rootContext.page.value === rootContext.pageCount.value || rootContext.disabled.value)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-label=\"Last Page\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :disabled\n    @click=\"!disabled && rootContext.onPageChange(rootContext.pageCount.value)\"\n  >\n    <slot>Last page</slot>\n  </Primitive>\n</template>\n","// reference https://github.com/chakra-ui/zag/blob/main/packages/machines/pagination/src/pagination.utils.ts\n\ntype Pages = Array<{ type: 'ellipsis' } | { type: 'page', value: number }>\n\nfunction range(start: number, end: number) {\n  const length = end - start + 1\n  return Array.from({ length }, (_, idx) => idx + start)\n}\n\nexport function transform(items: (string | number)[]): Pages {\n  return items.map((value) => {\n    if (typeof value === 'number')\n      return { type: 'page', value }\n    return { type: 'ellipsis' }\n  })\n}\n\nconst ELLIPSIS = 'ellipsis'\n\nexport function getRange(currentPage: number, pageCount: number, siblingCount: number, showEdges: boolean) {\n  const firstPageIndex = 1\n  const lastPageIndex = pageCount\n\n  const leftSiblingIndex = Math.max(currentPage - siblingCount, firstPageIndex)\n  const rightSiblingIndex = Math.min(currentPage + siblingCount, lastPageIndex)\n\n  if (showEdges) {\n    /**\n     * `2 * siblingCount + 5` explanation:\n     * 2 * siblingCount for left/right siblings\n     * 5 for 2x left/right ellipsis, 2x first/last page + 1x current page\n     *\n     * For some page counts (e.g. totalPages: 8, siblingCount: 2),\n     * calculated max page is higher than total pages,\n     * so we need to take the minimum of both.\n     */\n    const totalPageNumbers = Math.min(2 * siblingCount + 5, pageCount)\n\n    const itemCount = totalPageNumbers - 2 // 2 stands for one ellipsis and either first or last page\n\n    const showLeftEllipsis\n      // default condition\n      = leftSiblingIndex > firstPageIndex + 2\n      // if the current page is towards the end of the list\n        && Math.abs(lastPageIndex - itemCount - firstPageIndex + 1) > 2\n      // if the current page is towards the middle of the list\n        && Math.abs(leftSiblingIndex - firstPageIndex) > 2\n\n    const showRightEllipsis\n      // default condition\n      = rightSiblingIndex < lastPageIndex - 2\n      // if the current page is towards the start of the list\n        && Math.abs(lastPageIndex - itemCount) > 2\n      // if the current page is towards the middle of the list\n        && Math.abs(lastPageIndex - rightSiblingIndex) > 2\n\n    if (!showLeftEllipsis && showRightEllipsis) {\n      const leftRange = range(1, itemCount)\n\n      return [...leftRange, ELLIPSIS, lastPageIndex]\n    }\n\n    if (showLeftEllipsis && !showRightEllipsis) {\n      const rightRange = range(lastPageIndex - itemCount + 1, lastPageIndex)\n\n      return [firstPageIndex, ELLIPSIS, ...rightRange]\n    }\n\n    if (showLeftEllipsis && showRightEllipsis) {\n      const middleRange = range(leftSiblingIndex, rightSiblingIndex)\n\n      return [firstPageIndex, ELLIPSIS, ...middleRange, ELLIPSIS, lastPageIndex]\n    }\n\n    const fullRange = range(firstPageIndex, lastPageIndex)\n    return fullRange\n  }\n  else {\n    const itemCount = siblingCount * 2 + 1\n\n    if (pageCount < itemCount)\n      return range(1, lastPageIndex)\n\n    else if (currentPage <= (siblingCount + 1))\n      return range(firstPageIndex, itemCount)\n\n    else if ((pageCount - currentPage) <= siblingCount)\n      return range(pageCount - itemCount + 1, lastPageIndex)\n\n    else\n      return range(leftSiblingIndex, rightSiblingIndex)\n  }\n}\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PaginationListProps extends PrimitiveProps { }\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectPaginationRootContext } from './PaginationRoot.vue'\nimport { getRange, transform } from './utils'\n\nconst props = defineProps<PaginationListProps>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Pages item */\n    items: typeof transformedRange.value\n  }) => any\n}>()\n\nuseForwardExpose()\nconst rootContext = injectPaginationRootContext()\n\nconst transformedRange = computed(() => {\n  return transform(\n    getRange(\n      rootContext.page.value,\n      rootContext.pageCount.value,\n      rootContext.siblingCount.value,\n      rootContext.showEdges.value,\n    ),\n  )\n})\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot :items=\"transformedRange\" />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PaginationListProps extends PrimitiveProps { }\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectPaginationRootContext } from './PaginationRoot.vue'\nimport { getRange, transform } from './utils'\n\nconst props = defineProps<PaginationListProps>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Pages item */\n    items: typeof transformedRange.value\n  }) => any\n}>()\n\nuseForwardExpose()\nconst rootContext = injectPaginationRootContext()\n\nconst transformedRange = computed(() => {\n  return transform(\n    getRange(\n      rootContext.page.value,\n      rootContext.pageCount.value,\n      rootContext.siblingCount.value,\n      rootContext.showEdges.value,\n    ),\n  )\n})\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot :items=\"transformedRange\" />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PaginationListItemProps extends PrimitiveProps {\n  /** Value for the page */\n  value: number\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectPaginationRootContext } from './PaginationRoot.vue'\n\nconst props = withDefaults(defineProps<PaginationListItemProps>(), { as: 'button' })\nuseForwardExpose()\n\nconst rootContext = injectPaginationRootContext()\nconst isSelected = computed(() => rootContext.page.value === props.value)\n\nconst disabled = computed((): boolean => rootContext.disabled.value)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    data-type=\"page\"\n    :aria-label=\"`Page ${value}`\"\n    :aria-current=\"isSelected ? 'page' : undefined\"\n    :data-selected=\"isSelected ? 'true' : undefined\"\n    :disabled\n    :type=\"as === 'button' ? 'button' : undefined\"\n    @click=\"!disabled && rootContext.onPageChange(value)\"\n  >\n    <slot>{{ value }}</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PaginationListItemProps extends PrimitiveProps {\n  /** Value for the page */\n  value: number\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectPaginationRootContext } from './PaginationRoot.vue'\n\nconst props = withDefaults(defineProps<PaginationListItemProps>(), { as: 'button' })\nuseForwardExpose()\n\nconst rootContext = injectPaginationRootContext()\nconst isSelected = computed(() => rootContext.page.value === props.value)\n\nconst disabled = computed((): boolean => rootContext.disabled.value)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    data-type=\"page\"\n    :aria-label=\"`Page ${value}`\"\n    :aria-current=\"isSelected ? 'page' : undefined\"\n    :data-selected=\"isSelected ? 'true' : undefined\"\n    :disabled\n    :type=\"as === 'button' ? 'button' : undefined\"\n    @click=\"!disabled && rootContext.onPageChange(value)\"\n  >\n    <slot>{{ value }}</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PaginationNextProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectPaginationRootContext } from './PaginationRoot.vue'\n\nconst props = withDefaults(defineProps<PaginationNextProps>(), { as: 'button' })\n\nuseForwardExpose()\nconst rootContext = injectPaginationRootContext()\n\nconst disabled = computed((): boolean => rootContext.page.value === rootContext.pageCount.value || rootContext.disabled.value)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-label=\"Next Page\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :disabled\n    @click=\"!disabled && rootContext.onPageChange(rootContext.page.value + 1)\"\n  >\n    <slot>Next page</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PaginationNextProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectPaginationRootContext } from './PaginationRoot.vue'\n\nconst props = withDefaults(defineProps<PaginationNextProps>(), { as: 'button' })\n\nuseForwardExpose()\nconst rootContext = injectPaginationRootContext()\n\nconst disabled = computed((): boolean => rootContext.page.value === rootContext.pageCount.value || rootContext.disabled.value)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-label=\"Next Page\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :disabled\n    @click=\"!disabled && rootContext.onPageChange(rootContext.page.value + 1)\"\n  >\n    <slot>Next page</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PaginationPrevProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectPaginationRootContext } from './PaginationRoot.vue'\n\nconst props = withDefaults(defineProps<PaginationPrevProps>(), { as: 'button' })\n\nuseForwardExpose()\nconst rootContext = injectPaginationRootContext()\n\nconst disabled = computed((): boolean => rootContext.page.value === 1 || rootContext.disabled.value)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-label=\"Previous Page\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :disabled\n    @click=\"!disabled && rootContext.onPageChange(rootContext.page.value - 1)\"\n  >\n    <slot>Prev page</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface PaginationPrevProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectPaginationRootContext } from './PaginationRoot.vue'\n\nconst props = withDefaults(defineProps<PaginationPrevProps>(), { as: 'button' })\n\nuseForwardExpose()\nconst rootContext = injectPaginationRootContext()\n\nconst disabled = computed((): boolean => rootContext.page.value === 1 || rootContext.disabled.value)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    aria-label=\"Previous Page\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :disabled\n    @click=\"!disabled && rootContext.onPageChange(rootContext.page.value - 1)\"\n  >\n    <slot>Prev page</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Direction, FormFieldProps } from '@/shared/types'\nimport { computed, ref, toRefs, watch } from 'vue'\nimport { createContext, useDirection, useForwardExpose } from '@/shared'\nimport VisuallyHiddenInput from '@/VisuallyHidden/VisuallyHiddenInput.vue'\n\nexport type PinInputType = 'text' | 'number'\n\n// Using this type to avoid mixed arrays (string | number)[].\n// The value type can be number[] only when the type is explicitly set to 'number'\nexport type PinInputValue<Type extends PinInputType> = [Type] extends ['number'] ? number[] : string[]\n\n// provide the mixed arrays because the `type` is dynamic in the context\nexport type PinInputContextValue<Type extends PinInputType = 'text'>\n  = Type extends 'number'\n    ? Type extends 'string'\n      ? string[] | number[]\n      : number[]\n    : string[]\n\nexport type PinInputRootEmits<Type extends PinInputType = 'text'> = {\n  'update:modelValue': [value: PinInputValue<Type>]\n  'complete': [value: PinInputValue<Type>]\n}\n\nexport interface PinInputRootProps<Type extends PinInputType = 'text'> extends PrimitiveProps, FormFieldProps {\n  /** The controlled checked state of the pin input. Can be binded as `v-model`. */\n  modelValue?: PinInputValue<Type> | null\n  /** The default value of the pin inputs when it is initially rendered. Use when you do not need to control its checked state. */\n  defaultValue?: PinInputValue<Type>\n  /** The placeholder character to use for empty pin-inputs. */\n  placeholder?: string\n  /** When `true`, pin inputs will be treated as password. */\n  mask?: boolean\n  /** When `true`, mobile devices will autodetect the OTP from messages or clipboard, and enable the autocomplete field. */\n  otp?: boolean\n  /** Input type for the inputs. */\n  type?: Type\n  /** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** When `true`, prevents the user from interacting with the pin input */\n  disabled?: boolean\n  /** Id of the element */\n  id?: string\n}\n\nexport interface PinInputRootContext<Type extends PinInputType = 'text'> {\n  modelValue: Ref<PinInputContextValue<Type>>\n  currentModelValue: ComputedRef<PinInputContextValue<Type>>\n  mask: Ref<boolean>\n  otp: Ref<boolean>\n  placeholder: Ref<string>\n  type: Ref<PinInputType>\n  dir: Ref<Direction>\n  disabled: Ref<boolean>\n  isCompleted: ComputedRef<boolean>\n  inputElements?: Ref<Set<HTMLInputElement>>\n  onInputElementChange: (el: HTMLInputElement) => void\n  isNumericMode: ComputedRef<boolean>\n}\n\nexport const [injectPinInputRootContext, providePinInputRootContext]\n  = createContext<PinInputRootContext<PinInputType>>('PinInputRoot')\n</script>\n\n<script setup lang=\"ts\" generic=\"Type extends PinInputType\">\nimport { useVModel } from '@vueuse/core'\nimport { Primitive } from '@/Primitive'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<PinInputRootProps<Type>>(), {\n  placeholder: '',\n  type: 'text' as any,\n})\nconst emits = defineEmits<PinInputRootEmits<Type>>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { mask, otp, placeholder, type, disabled, dir: propDir } = toRefs(props)\nconst { forwardRef } = useForwardExpose()\nconst dir = useDirection(propDir)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? [] as any,\n  passive: true,\n  deep: true,\n}) as Ref<PinInputValue<Type>>\n\nconst currentModelValue = computed(() => Array.isArray(modelValue.value) ? [...modelValue.value] : [])\n\nconst inputElements = ref<Set<HTMLInputElement>>(new Set())\nfunction onInputElementChange(el: HTMLInputElement) {\n  inputElements.value.add(el)\n}\n\nconst isNumericMode = computed(() => props.type === 'number')\nconst isCompleted = computed(() => {\n  const modelValues = currentModelValue.value.filter(i => !!i || (isNumericMode.value && i === 0))\n  return modelValues.length === inputElements.value.size\n})\n\nwatch(modelValue, () => {\n  if (isCompleted.value)\n    emits('complete', modelValue.value)\n}, { deep: true })\n\nprovidePinInputRootContext({\n  modelValue,\n  currentModelValue: currentModelValue as ComputedRef<PinInputValue<Type>>,\n  mask,\n  otp,\n  placeholder,\n  type,\n  dir,\n  disabled,\n  isCompleted,\n  inputElements,\n  onInputElementChange,\n  isNumericMode,\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n    :dir=\"dir\"\n    :data-complete=\"isCompleted ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n  >\n    <slot :model-value=\"modelValue\" />\n\n    <VisuallyHiddenInput\n      :id=\"id\"\n      as=\"input\"\n      feature=\"focusable\"\n      tabindex=\"-1\"\n      :value=\"currentModelValue.join('')\"\n      :name=\"name ?? ''\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n      @focus=\"Array.from(inputElements)?.[0]?.focus()\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Direction, FormFieldProps } from '@/shared/types'\nimport { computed, ref, toRefs, watch } from 'vue'\nimport { createContext, useDirection, useForwardExpose } from '@/shared'\nimport VisuallyHiddenInput from '@/VisuallyHidden/VisuallyHiddenInput.vue'\n\nexport type PinInputType = 'text' | 'number'\n\n// Using this type to avoid mixed arrays (string | number)[].\n// The value type can be number[] only when the type is explicitly set to 'number'\nexport type PinInputValue<Type extends PinInputType> = [Type] extends ['number'] ? number[] : string[]\n\n// provide the mixed arrays because the `type` is dynamic in the context\nexport type PinInputContextValue<Type extends PinInputType = 'text'>\n  = Type extends 'number'\n    ? Type extends 'string'\n      ? string[] | number[]\n      : number[]\n    : string[]\n\nexport type PinInputRootEmits<Type extends PinInputType = 'text'> = {\n  'update:modelValue': [value: PinInputValue<Type>]\n  'complete': [value: PinInputValue<Type>]\n}\n\nexport interface PinInputRootProps<Type extends PinInputType = 'text'> extends PrimitiveProps, FormFieldProps {\n  /** The controlled checked state of the pin input. Can be binded as `v-model`. */\n  modelValue?: PinInputValue<Type> | null\n  /** The default value of the pin inputs when it is initially rendered. Use when you do not need to control its checked state. */\n  defaultValue?: PinInputValue<Type>\n  /** The placeholder character to use for empty pin-inputs. */\n  placeholder?: string\n  /** When `true`, pin inputs will be treated as password. */\n  mask?: boolean\n  /** When `true`, mobile devices will autodetect the OTP from messages or clipboard, and enable the autocomplete field. */\n  otp?: boolean\n  /** Input type for the inputs. */\n  type?: Type\n  /** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** When `true`, prevents the user from interacting with the pin input */\n  disabled?: boolean\n  /** Id of the element */\n  id?: string\n}\n\nexport interface PinInputRootContext<Type extends PinInputType = 'text'> {\n  modelValue: Ref<PinInputContextValue<Type>>\n  currentModelValue: ComputedRef<PinInputContextValue<Type>>\n  mask: Ref<boolean>\n  otp: Ref<boolean>\n  placeholder: Ref<string>\n  type: Ref<PinInputType>\n  dir: Ref<Direction>\n  disabled: Ref<boolean>\n  isCompleted: ComputedRef<boolean>\n  inputElements?: Ref<Set<HTMLInputElement>>\n  onInputElementChange: (el: HTMLInputElement) => void\n  isNumericMode: ComputedRef<boolean>\n}\n\nexport const [injectPinInputRootContext, providePinInputRootContext]\n  = createContext<PinInputRootContext<PinInputType>>('PinInputRoot')\n</script>\n\n<script setup lang=\"ts\" generic=\"Type extends PinInputType\">\nimport { useVModel } from '@vueuse/core'\nimport { Primitive } from '@/Primitive'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<PinInputRootProps<Type>>(), {\n  placeholder: '',\n  type: 'text' as any,\n})\nconst emits = defineEmits<PinInputRootEmits<Type>>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { mask, otp, placeholder, type, disabled, dir: propDir } = toRefs(props)\nconst { forwardRef } = useForwardExpose()\nconst dir = useDirection(propDir)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? [] as any,\n  passive: true,\n  deep: true,\n}) as Ref<PinInputValue<Type>>\n\nconst currentModelValue = computed(() => Array.isArray(modelValue.value) ? [...modelValue.value] : [])\n\nconst inputElements = ref<Set<HTMLInputElement>>(new Set())\nfunction onInputElementChange(el: HTMLInputElement) {\n  inputElements.value.add(el)\n}\n\nconst isNumericMode = computed(() => props.type === 'number')\nconst isCompleted = computed(() => {\n  const modelValues = currentModelValue.value.filter(i => !!i || (isNumericMode.value && i === 0))\n  return modelValues.length === inputElements.value.size\n})\n\nwatch(modelValue, () => {\n  if (isCompleted.value)\n    emits('complete', modelValue.value)\n}, { deep: true })\n\nprovidePinInputRootContext({\n  modelValue,\n  currentModelValue: currentModelValue as ComputedRef<PinInputValue<Type>>,\n  mask,\n  otp,\n  placeholder,\n  type,\n  dir,\n  disabled,\n  isCompleted,\n  inputElements,\n  onInputElementChange,\n  isNumericMode,\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n    :dir=\"dir\"\n    :data-complete=\"isCompleted ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n  >\n    <slot :model-value=\"modelValue\" />\n\n    <VisuallyHiddenInput\n      :id=\"id\"\n      as=\"input\"\n      feature=\"focusable\"\n      tabindex=\"-1\"\n      :value=\"currentModelValue.join('')\"\n      :name=\"name ?? ''\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n      @focus=\"Array.from(inputElements)?.[0]?.focus()\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PinInputContextValue } from './PinInputRoot.vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { getActiveElement, useArrowNavigation, useComposing } from '@/shared'\nimport { injectPinInputRootContext } from './PinInputRoot.vue'\n\nexport interface PinInputInputProps extends PrimitiveProps {\n  /** Position of the value this input binds to. */\n  index: number\n  /** When `true`, prevents the user from interacting with the pin input */\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, onUnmounted, watch } from 'vue'\n\nconst props = withDefaults(defineProps<PinInputInputProps>(), {\n  as: 'input',\n})\n\nconst context = injectPinInputRootContext()\nconst inputElements = computed(() => [...context.inputElements!.value])\nconst currentValue = computed(() => context.currentModelValue.value[props.index])\n\nconst disabled = computed(() => props.disabled || context.disabled.value)\nconst isOtpMode = computed(() => context.otp.value)\nconst isPasswordMode = computed(() => context.mask.value)\n\nconst NUMBER_REG = /^\\d*$/\nconst NON_NUMBER_REG = /\\D/g\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nconst { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing((event) => {\n  const target = event.target as HTMLInputElement\n  const value = event.data || target.value\n\n  if (context.isNumericMode.value) {\n    const filtered = value.replace(NON_NUMBER_REG, '')\n    if (!filtered) {\n      target.value = ''\n      return\n    }\n    if (filtered.length > 1) {\n      handleMultipleCharacter(filtered)\n      return\n    }\n    target.value = filtered\n    updateModelValueAt(props.index, filtered)\n    const nextEl = inputElements.value[props.index + 1]\n    if (nextEl)\n      nextEl.focus()\n    return\n  }\n\n  if (value.length > 1) {\n    handleMultipleCharacter(value)\n    return\n  }\n\n  target.value = value\n  updateModelValueAt(props.index, value)\n\n  const nextEl = inputElements.value[props.index + 1]\n  if (nextEl)\n    nextEl.focus()\n})\n\nfunction handleInput(event: InputEvent) {\n  if (isComposing.value || event.isComposing)\n    return\n  const target = event.target as HTMLInputElement\n\n  if ((event.data?.length ?? 0) > 1) {\n    handleMultipleCharacter(target.value)\n    return\n  }\n\n  if (context.isNumericMode.value && !NUMBER_REG.test(target.value)) {\n    target.value = target.value.replace(NON_NUMBER_REG, '')\n    return\n  }\n\n  target.value = event.data || target.value.slice(-1)\n  updateModelValueAt(props.index, target.value)\n\n  const nextEl = inputElements.value[props.index + 1]\n  if (nextEl)\n    nextEl.focus()\n}\n\nfunction updatePlaceholder() {\n  nextTick(() => {\n    const target = currentElement.value as HTMLInputElement\n    if (!target) {\n      return\n    }\n    if (!target.value && target === getActiveElement()) {\n      target.placeholder = ''\n    }\n    else {\n      target.placeholder = context.placeholder.value\n    }\n  })\n}\n\nfunction handleKeydown(event: KeyboardEvent) {\n  // Don't move between inputs mid-composition, arrow keys are used for IME candidate navigation\n  if (isComposing.value || event.isComposing)\n    return\n  useArrowNavigation(event, getActiveElement() as HTMLElement, undefined, {\n    itemsArray: inputElements.value,\n    focus: true,\n    loop: false,\n    arrowKeyOptions: 'horizontal',\n    dir: context.dir.value,\n  })\n}\n\nfunction handleBackspace(event: KeyboardEvent) {\n  event.preventDefault()\n  const target = event.target as HTMLInputElement\n  const value = target.value\n\n  if (value) {\n    updateModelValueAt(props.index, '')\n  }\n  else {\n    const prevEl = inputElements.value[props.index - 1]\n    if (prevEl) {\n      prevEl.focus()\n      updateModelValueAt(props.index - 1, '')\n    }\n  }\n}\n\nfunction handleDelete(event: KeyboardEvent) {\n  if (event.key === 'Delete') {\n    event.preventDefault()\n    updateModelValueAt(props.index, '')\n  }\n}\n\nfunction handleFocus(event: FocusEvent) {\n  // In OTP mode, inputs should be filled one by one without skipping middle inputs\n  if (context.otp.value) {\n    const firstEmptyInputIdx = inputElements.value.findIndex((_, idx) =>\n      context.currentModelValue.value[idx] === ''\n      || context.currentModelValue.value[idx] === undefined,\n    )\n    if (firstEmptyInputIdx !== -1 && firstEmptyInputIdx < props.index) {\n      inputElements.value[firstEmptyInputIdx].focus()\n      return\n    }\n  }\n\n  const target = event.target as HTMLInputElement\n  target.setSelectionRange(1, 1)\n  updatePlaceholder()\n}\n\nfunction handleBlur(event: FocusEvent) {\n  updatePlaceholder()\n}\n\nfunction handlePaste(event: ClipboardEvent) {\n  event.preventDefault()\n  const clipboardData = event.clipboardData\n  if (!clipboardData)\n    return\n\n  const rawValues = clipboardData.getData('text')\n  const values = context.isNumericMode.value\n    ? rawValues.replace(NON_NUMBER_REG, '')\n    : rawValues\n  handleMultipleCharacter(values)\n}\n\nfunction handleMultipleCharacter(values: string) {\n  const tempModelValue = [...context.currentModelValue.value] as typeof context.currentModelValue.value\n  const initialIndex = values.length >= inputElements.value.length ? 0 : props.index\n  const lastIndex = Math.min(initialIndex + values.length, inputElements.value.length)\n  for (let i = initialIndex; i < lastIndex; i++) {\n    const input = inputElements.value[i]\n    const value = values[i - initialIndex]\n    if (context.isNumericMode.value) {\n      const num = Number.parseInt(value)\n      if (Number.isNaN(num))\n        continue\n      tempModelValue[i] = num\n    }\n    else {\n      tempModelValue[i] = value\n    }\n    input.focus()\n  }\n  context.modelValue.value = tempModelValue\n  inputElements.value[lastIndex]?.focus()\n}\n\nfunction removeTrailingEmptyStrings(input: PinInputContextValue<typeof context.type.value>) {\n  let i = input.length - 1\n\n  while (i >= 0 && input[i] === '') {\n    input.pop()\n    i--\n  }\n\n  return input\n}\n\nfunction updateModelValueAt(index: number, value: string) {\n  const tempModelValue = [...context.currentModelValue.value] as typeof context.currentModelValue.value\n\n  if (context.isNumericMode.value) {\n    const num = +value\n\n    if (value === '' || isNaN(num)) {\n      delete tempModelValue[index]\n    }\n    else {\n      tempModelValue[index] = num\n    }\n  }\n  else {\n    tempModelValue[index] = value\n  }\n\n  context.modelValue.value = removeTrailingEmptyStrings(tempModelValue)\n}\n\nwatch(currentValue, updatePlaceholder)\n\nonMounted(() => {\n  context.onInputElementChange(currentElement.value as HTMLInputElement)\n})\nonUnmounted(() => {\n  context.inputElements?.value.delete(currentElement.value as HTMLInputElement)\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    autocapitalize=\"none\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :autocomplete=\"isOtpMode ? 'one-time-code' : 'false'\"\n    :type=\"isPasswordMode ? 'password' : 'text'\"\n    :inputmode=\"context.isNumericMode.value ? 'numeric' : 'text'\"\n    :pattern=\"context.isNumericMode.value ? '[0-9]*' : undefined\"\n    :placeholder=\"context.placeholder.value\"\n    :value=\"currentValue\"\n    :disabled=\"disabled\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-complete=\"context.isCompleted.value ? '' : undefined\"\n    :aria-label=\"`pin input ${index + 1} of ${inputElements.length}`\"\n    @input=\"handleInput($event as InputEvent)\"\n    @keydown.left.right.up.down.home.end=\"handleKeydown\"\n    @keydown.backspace=\"handleBackspace\"\n    @keydown.delete=\"handleDelete\"\n    @focus=\"handleFocus\"\n    @blur=\"handleBlur\"\n    @paste=\"handlePaste\"\n    @compositionstart=\"handleCompositionStart\"\n    @compositionend=\"handleCompositionEnd\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PinInputContextValue } from './PinInputRoot.vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { getActiveElement, useArrowNavigation, useComposing } from '@/shared'\nimport { injectPinInputRootContext } from './PinInputRoot.vue'\n\nexport interface PinInputInputProps extends PrimitiveProps {\n  /** Position of the value this input binds to. */\n  index: number\n  /** When `true`, prevents the user from interacting with the pin input */\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, onUnmounted, watch } from 'vue'\n\nconst props = withDefaults(defineProps<PinInputInputProps>(), {\n  as: 'input',\n})\n\nconst context = injectPinInputRootContext()\nconst inputElements = computed(() => [...context.inputElements!.value])\nconst currentValue = computed(() => context.currentModelValue.value[props.index])\n\nconst disabled = computed(() => props.disabled || context.disabled.value)\nconst isOtpMode = computed(() => context.otp.value)\nconst isPasswordMode = computed(() => context.mask.value)\n\nconst NUMBER_REG = /^\\d*$/\nconst NON_NUMBER_REG = /\\D/g\n\nconst { primitiveElement, currentElement } = usePrimitiveElement()\n\nconst { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing((event) => {\n  const target = event.target as HTMLInputElement\n  const value = event.data || target.value\n\n  if (context.isNumericMode.value) {\n    const filtered = value.replace(NON_NUMBER_REG, '')\n    if (!filtered) {\n      target.value = ''\n      return\n    }\n    if (filtered.length > 1) {\n      handleMultipleCharacter(filtered)\n      return\n    }\n    target.value = filtered\n    updateModelValueAt(props.index, filtered)\n    const nextEl = inputElements.value[props.index + 1]\n    if (nextEl)\n      nextEl.focus()\n    return\n  }\n\n  if (value.length > 1) {\n    handleMultipleCharacter(value)\n    return\n  }\n\n  target.value = value\n  updateModelValueAt(props.index, value)\n\n  const nextEl = inputElements.value[props.index + 1]\n  if (nextEl)\n    nextEl.focus()\n})\n\nfunction handleInput(event: InputEvent) {\n  if (isComposing.value || event.isComposing)\n    return\n  const target = event.target as HTMLInputElement\n\n  if ((event.data?.length ?? 0) > 1) {\n    handleMultipleCharacter(target.value)\n    return\n  }\n\n  if (context.isNumericMode.value && !NUMBER_REG.test(target.value)) {\n    target.value = target.value.replace(NON_NUMBER_REG, '')\n    return\n  }\n\n  target.value = event.data || target.value.slice(-1)\n  updateModelValueAt(props.index, target.value)\n\n  const nextEl = inputElements.value[props.index + 1]\n  if (nextEl)\n    nextEl.focus()\n}\n\nfunction updatePlaceholder() {\n  nextTick(() => {\n    const target = currentElement.value as HTMLInputElement\n    if (!target) {\n      return\n    }\n    if (!target.value && target === getActiveElement()) {\n      target.placeholder = ''\n    }\n    else {\n      target.placeholder = context.placeholder.value\n    }\n  })\n}\n\nfunction handleKeydown(event: KeyboardEvent) {\n  // Don't move between inputs mid-composition, arrow keys are used for IME candidate navigation\n  if (isComposing.value || event.isComposing)\n    return\n  useArrowNavigation(event, getActiveElement() as HTMLElement, undefined, {\n    itemsArray: inputElements.value,\n    focus: true,\n    loop: false,\n    arrowKeyOptions: 'horizontal',\n    dir: context.dir.value,\n  })\n}\n\nfunction handleBackspace(event: KeyboardEvent) {\n  event.preventDefault()\n  const target = event.target as HTMLInputElement\n  const value = target.value\n\n  if (value) {\n    updateModelValueAt(props.index, '')\n  }\n  else {\n    const prevEl = inputElements.value[props.index - 1]\n    if (prevEl) {\n      prevEl.focus()\n      updateModelValueAt(props.index - 1, '')\n    }\n  }\n}\n\nfunction handleDelete(event: KeyboardEvent) {\n  if (event.key === 'Delete') {\n    event.preventDefault()\n    updateModelValueAt(props.index, '')\n  }\n}\n\nfunction handleFocus(event: FocusEvent) {\n  // In OTP mode, inputs should be filled one by one without skipping middle inputs\n  if (context.otp.value) {\n    const firstEmptyInputIdx = inputElements.value.findIndex((_, idx) =>\n      context.currentModelValue.value[idx] === ''\n      || context.currentModelValue.value[idx] === undefined,\n    )\n    if (firstEmptyInputIdx !== -1 && firstEmptyInputIdx < props.index) {\n      inputElements.value[firstEmptyInputIdx].focus()\n      return\n    }\n  }\n\n  const target = event.target as HTMLInputElement\n  target.setSelectionRange(1, 1)\n  updatePlaceholder()\n}\n\nfunction handleBlur(event: FocusEvent) {\n  updatePlaceholder()\n}\n\nfunction handlePaste(event: ClipboardEvent) {\n  event.preventDefault()\n  const clipboardData = event.clipboardData\n  if (!clipboardData)\n    return\n\n  const rawValues = clipboardData.getData('text')\n  const values = context.isNumericMode.value\n    ? rawValues.replace(NON_NUMBER_REG, '')\n    : rawValues\n  handleMultipleCharacter(values)\n}\n\nfunction handleMultipleCharacter(values: string) {\n  const tempModelValue = [...context.currentModelValue.value] as typeof context.currentModelValue.value\n  const initialIndex = values.length >= inputElements.value.length ? 0 : props.index\n  const lastIndex = Math.min(initialIndex + values.length, inputElements.value.length)\n  for (let i = initialIndex; i < lastIndex; i++) {\n    const input = inputElements.value[i]\n    const value = values[i - initialIndex]\n    if (context.isNumericMode.value) {\n      const num = Number.parseInt(value)\n      if (Number.isNaN(num))\n        continue\n      tempModelValue[i] = num\n    }\n    else {\n      tempModelValue[i] = value\n    }\n    input.focus()\n  }\n  context.modelValue.value = tempModelValue\n  inputElements.value[lastIndex]?.focus()\n}\n\nfunction removeTrailingEmptyStrings(input: PinInputContextValue<typeof context.type.value>) {\n  let i = input.length - 1\n\n  while (i >= 0 && input[i] === '') {\n    input.pop()\n    i--\n  }\n\n  return input\n}\n\nfunction updateModelValueAt(index: number, value: string) {\n  const tempModelValue = [...context.currentModelValue.value] as typeof context.currentModelValue.value\n\n  if (context.isNumericMode.value) {\n    const num = +value\n\n    if (value === '' || isNaN(num)) {\n      delete tempModelValue[index]\n    }\n    else {\n      tempModelValue[index] = num\n    }\n  }\n  else {\n    tempModelValue[index] = value\n  }\n\n  context.modelValue.value = removeTrailingEmptyStrings(tempModelValue)\n}\n\nwatch(currentValue, updatePlaceholder)\n\nonMounted(() => {\n  context.onInputElementChange(currentElement.value as HTMLInputElement)\n})\nonUnmounted(() => {\n  context.inputElements?.value.delete(currentElement.value as HTMLInputElement)\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    autocapitalize=\"none\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :autocomplete=\"isOtpMode ? 'one-time-code' : 'false'\"\n    :type=\"isPasswordMode ? 'password' : 'text'\"\n    :inputmode=\"context.isNumericMode.value ? 'numeric' : 'text'\"\n    :pattern=\"context.isNumericMode.value ? '[0-9]*' : undefined\"\n    :placeholder=\"context.placeholder.value\"\n    :value=\"currentValue\"\n    :disabled=\"disabled\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-complete=\"context.isCompleted.value ? '' : undefined\"\n    :aria-label=\"`pin input ${index + 1} of ${inputElements.length}`\"\n    @input=\"handleInput($event as InputEvent)\"\n    @keydown.left.right.up.down.home.end=\"handleKeydown\"\n    @keydown.backspace=\"handleBackspace\"\n    @keydown.delete=\"handleDelete\"\n    @focus=\"handleFocus\"\n    @blur=\"handleBlur\"\n    @paste=\"handlePaste\"\n    @compositionstart=\"handleCompositionStart\"\n    @compositionend=\"handleCompositionEnd\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, isNullish, useForwardExpose } from '@/shared'\n\nexport type ProgressRootEmits = {\n  /** Event handler called when the progress value changes */\n  'update:modelValue': [value: string[] | undefined]\n  /** Event handler called when the max value changes */\n  'update:max': [value: number]\n}\n\nexport interface ProgressRootProps extends PrimitiveProps {\n  /** The progress value. Can be bind as `v-model`. */\n  modelValue?: number | null\n  /** The maximum progress value. */\n  max?: number\n  /**\n   * A function to get the accessible label text in a human-readable format.\n   *\n   *  If not provided, the value label will be read as the numeric value as a percentage of the max value.\n   */\n  getValueLabel?: (value: number | null | undefined, max: number) => string | undefined\n  /**\n   * A function to get the accessible value text representing the current value in a human-readable format.\n   */\n  getValueText?: (value: number | null | undefined, max: number) => string | undefined\n}\n\nconst DEFAULT_MAX = 100\n\ninterface ProgressRootContext {\n  modelValue?: Readonly<Ref<ProgressRootProps['modelValue']>>\n  max: Readonly<Ref<number>>\n  progressState: ComputedRef<ProgressState>\n}\n\nexport const [injectProgressRootContext, provideProgressRootContext]\n  = createContext<ProgressRootContext>('ProgressRoot')\n\nexport type ProgressState = 'indeterminate' | 'loading' | 'complete'\n\nconst isNumber = (v: any): v is number => typeof v === 'number'\n\nfunction validateValue(value: any, max: number): number | null {\n  const isValidValueError\n    = isNullish(value)\n      || (isNumber(value) && !Number.isNaN(value) && value <= max && value >= 0)\n\n  if (isValidValueError)\n    return value as null\n\n  console.error(`Invalid prop \\`value\\` of value \\`${value}\\` supplied to \\`ProgressRoot\\`. The \\`value\\` prop must be:\n  - a positive number\n  - less than the value passed to \\`max\\` (or ${DEFAULT_MAX} if no \\`max\\` prop is set)\n  - \\`null\\`  or \\`undefined\\` if the progress is indeterminate.\n\nDefaulting to \\`null\\`.`)\n  return null\n}\n\nfunction validateMax(max: number): number {\n  const isValidMaxError = isNumber(max) && !Number.isNaN(max) && max > 0\n\n  if (isValidMaxError)\n    return max\n\n  console.error(\n    `Invalid prop \\`max\\` of value \\`${max}\\` supplied to \\`ProgressRoot\\`. Only numbers greater than 0 are valid max values. Defaulting to \\`${DEFAULT_MAX}\\`.`,\n  )\n  return DEFAULT_MAX\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, nextTick, watch } from 'vue'\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<ProgressRootProps>(), {\n  max: DEFAULT_MAX,\n  getValueLabel: (value: number | null | undefined, max: number) =>\n    isNumber(value) ? `${Math.round((value / max) * DEFAULT_MAX)}%` : undefined,\n})\n\nconst emit = defineEmits<ProgressRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nuseForwardExpose()\nconst modelValue = useVModel(props, 'modelValue', emit, {\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst max = useVModel(props, 'max', emit, {\n  passive: (props.max === undefined) as false,\n})\n\n// ------- Watch for correct values -------\nwatch(\n  () => modelValue.value,\n  async (value) => {\n    const correctedValue = validateValue(value, props.max)\n    if (correctedValue !== value) {\n      await nextTick()\n      modelValue.value = correctedValue\n    }\n  },\n  { immediate: true },\n)\n\nwatch(\n  () => props.max,\n  (newMax) => {\n    const correctedMax = validateMax(props.max)\n    if (correctedMax !== newMax)\n      max.value = correctedMax\n  },\n  { immediate: true },\n)\n// ------- End of watch for correct values -------\n\nconst progressState = computed<ProgressState>(() => {\n  if (isNullish(modelValue.value))\n    return 'indeterminate'\n  if (modelValue.value === max.value)\n    return 'complete'\n  return 'loading'\n})\n\nprovideProgressRootContext({\n  modelValue,\n  max,\n  progressState,\n})\n</script>\n\n<template>\n  <Primitive\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :aria-valuemax=\"max\"\n    :aria-valuemin=\"0\"\n    :aria-valuenow=\"isNumber(modelValue) ? modelValue : undefined\"\n    :aria-valuetext=\"getValueText?.(modelValue, max)\"\n    :aria-label=\"getValueLabel(modelValue, max)\"\n    role=\"progressbar\"\n    :data-state=\"progressState\"\n    :data-value=\"modelValue ?? undefined\"\n    :data-max=\"max\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, isNullish, useForwardExpose } from '@/shared'\n\nexport type ProgressRootEmits = {\n  /** Event handler called when the progress value changes */\n  'update:modelValue': [value: string[] | undefined]\n  /** Event handler called when the max value changes */\n  'update:max': [value: number]\n}\n\nexport interface ProgressRootProps extends PrimitiveProps {\n  /** The progress value. Can be bind as `v-model`. */\n  modelValue?: number | null\n  /** The maximum progress value. */\n  max?: number\n  /**\n   * A function to get the accessible label text in a human-readable format.\n   *\n   *  If not provided, the value label will be read as the numeric value as a percentage of the max value.\n   */\n  getValueLabel?: (value: number | null | undefined, max: number) => string | undefined\n  /**\n   * A function to get the accessible value text representing the current value in a human-readable format.\n   */\n  getValueText?: (value: number | null | undefined, max: number) => string | undefined\n}\n\nconst DEFAULT_MAX = 100\n\ninterface ProgressRootContext {\n  modelValue?: Readonly<Ref<ProgressRootProps['modelValue']>>\n  max: Readonly<Ref<number>>\n  progressState: ComputedRef<ProgressState>\n}\n\nexport const [injectProgressRootContext, provideProgressRootContext]\n  = createContext<ProgressRootContext>('ProgressRoot')\n\nexport type ProgressState = 'indeterminate' | 'loading' | 'complete'\n\nconst isNumber = (v: any): v is number => typeof v === 'number'\n\nfunction validateValue(value: any, max: number): number | null {\n  const isValidValueError\n    = isNullish(value)\n      || (isNumber(value) && !Number.isNaN(value) && value <= max && value >= 0)\n\n  if (isValidValueError)\n    return value as null\n\n  console.error(`Invalid prop \\`value\\` of value \\`${value}\\` supplied to \\`ProgressRoot\\`. The \\`value\\` prop must be:\n  - a positive number\n  - less than the value passed to \\`max\\` (or ${DEFAULT_MAX} if no \\`max\\` prop is set)\n  - \\`null\\`  or \\`undefined\\` if the progress is indeterminate.\n\nDefaulting to \\`null\\`.`)\n  return null\n}\n\nfunction validateMax(max: number): number {\n  const isValidMaxError = isNumber(max) && !Number.isNaN(max) && max > 0\n\n  if (isValidMaxError)\n    return max\n\n  console.error(\n    `Invalid prop \\`max\\` of value \\`${max}\\` supplied to \\`ProgressRoot\\`. Only numbers greater than 0 are valid max values. Defaulting to \\`${DEFAULT_MAX}\\`.`,\n  )\n  return DEFAULT_MAX\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, nextTick, watch } from 'vue'\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<ProgressRootProps>(), {\n  max: DEFAULT_MAX,\n  getValueLabel: (value: number | null | undefined, max: number) =>\n    isNumber(value) ? `${Math.round((value / max) * DEFAULT_MAX)}%` : undefined,\n})\n\nconst emit = defineEmits<ProgressRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nuseForwardExpose()\nconst modelValue = useVModel(props, 'modelValue', emit, {\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst max = useVModel(props, 'max', emit, {\n  passive: (props.max === undefined) as false,\n})\n\n// ------- Watch for correct values -------\nwatch(\n  () => modelValue.value,\n  async (value) => {\n    const correctedValue = validateValue(value, props.max)\n    if (correctedValue !== value) {\n      await nextTick()\n      modelValue.value = correctedValue\n    }\n  },\n  { immediate: true },\n)\n\nwatch(\n  () => props.max,\n  (newMax) => {\n    const correctedMax = validateMax(props.max)\n    if (correctedMax !== newMax)\n      max.value = correctedMax\n  },\n  { immediate: true },\n)\n// ------- End of watch for correct values -------\n\nconst progressState = computed<ProgressState>(() => {\n  if (isNullish(modelValue.value))\n    return 'indeterminate'\n  if (modelValue.value === max.value)\n    return 'complete'\n  return 'loading'\n})\n\nprovideProgressRootContext({\n  modelValue,\n  max,\n  progressState,\n})\n</script>\n\n<template>\n  <Primitive\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :aria-valuemax=\"max\"\n    :aria-valuemin=\"0\"\n    :aria-valuenow=\"isNumber(modelValue) ? modelValue : undefined\"\n    :aria-valuetext=\"getValueText?.(modelValue, max)\"\n    :aria-label=\"getValueLabel(modelValue, max)\"\n    role=\"progressbar\"\n    :data-state=\"progressState\"\n    :data-value=\"modelValue ?? undefined\"\n    :data-max=\"max\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ProgressIndicatorProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectProgressRootContext } from './ProgressRoot.vue'\n\nconst props = defineProps<ProgressIndicatorProps>()\n\nconst rootContext = injectProgressRootContext()\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :data-state=\"rootContext.progressState.value\"\n    :data-value=\"rootContext.modelValue?.value ?? undefined\"\n    :data-max=\"rootContext.max.value\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ProgressIndicatorProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectProgressRootContext } from './ProgressRoot.vue'\n\nconst props = defineProps<ProgressIndicatorProps>()\n\nconst rootContext = injectProgressRootContext()\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :data-state=\"rootContext.progressState.value\"\n    :data-value=\"rootContext.modelValue?.value ?? undefined\"\n    :data-max=\"rootContext.max.value\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","import type { AcceptableValue } from '@/shared/types'\nimport { handleAndDispatchCustomEvent } from '@/shared'\n\nexport type SelectEvent = CustomEvent<{ originalEvent: MouseEvent, value?: AcceptableValue }>\nexport const RADIO_SELECT = 'radio.select'\n\nexport function handleSelect(event: MouseEvent, value: AcceptableValue | undefined, callback: (event: SelectEvent) => void) {\n  const eventDetail = { originalEvent: event, value }\n  handleAndDispatchCustomEvent(RADIO_SELECT, callback, eventDetail)\n}\n","<script lang=\"ts\">\nimport type { SelectEvent } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { AcceptableValue, FormFieldProps } from '@/shared/types'\n\nexport type RadioEmits = {\n  'update:checked': [value: boolean]\n  'select': [SelectEvent]\n}\n\nexport interface RadioProps extends PrimitiveProps, FormFieldProps {\n  id?: string\n  /** The value given as data when submitted with a `name`. */\n  value?: AcceptableValue\n  /** When `true`, prevents the user from interacting with the radio item. */\n  disabled?: boolean\n  checked?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useFormControl, useForwardExpose } from '@/shared'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\nimport { handleSelect } from './utils'\n\nconst props = withDefaults(defineProps<RadioProps>(), {\n  disabled: false,\n  checked: undefined,\n  as: 'button',\n})\nconst emits = defineEmits<RadioEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current checked state */\n    checked: typeof checked.value\n  }) => any\n}>()\n\nconst checked = useVModel(props, 'checked', emits, {\n  passive: (props.checked === undefined) as false,\n})\n\nconst { value } = toRefs(props)\nconst { forwardRef, currentElement: triggerElement } = useForwardExpose()\nconst isFormControl = useFormControl(triggerElement)\n\nconst ariaLabel = computed(() => props.id && triggerElement.value ? (document.querySelector(`[for=\"${props.id}\"]`) as HTMLLabelElement)?.innerText ?? props.value : undefined)\n\nfunction handleClick(event: MouseEvent) {\n  if (props.disabled)\n    return\n\n  handleSelect(event, props.value, (ev) => {\n    emits('select', ev)\n    if (ev?.defaultPrevented)\n      return\n\n    checked.value = true\n    if (isFormControl.value) {\n    // if radio is in a form, stop propagation from the button so that we only propagate\n    // one click event (from the input). We propagate changes from an input so that native\n    // form validation works and form events reflect radio updates.\n      ev.stopPropagation()\n    }\n  })\n}\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    :id=\"id\"\n    :ref=\"forwardRef\"\n    role=\"radio\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :as=\"as\"\n    :aria-checked=\"checked\"\n    :aria-label=\"ariaLabel\"\n    :as-child=\"asChild\"\n    :disabled=\"disabled ? '' : undefined\"\n    :data-state=\"checked ? 'checked' : 'unchecked'\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :value=\"value\"\n    :required=\"required\"\n    :name=\"name\"\n    @click.stop=\"handleClick\"\n  >\n    <slot :checked=\"checked\" />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name\"\n      type=\"radio\"\n      tabindex=\"-1\"\n      :value=\"value\"\n      :checked=\"!!checked\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { SelectEvent } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { AcceptableValue, FormFieldProps } from '@/shared/types'\n\nexport type RadioEmits = {\n  'update:checked': [value: boolean]\n  'select': [SelectEvent]\n}\n\nexport interface RadioProps extends PrimitiveProps, FormFieldProps {\n  id?: string\n  /** The value given as data when submitted with a `name`. */\n  value?: AcceptableValue\n  /** When `true`, prevents the user from interacting with the radio item. */\n  disabled?: boolean\n  checked?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useFormControl, useForwardExpose } from '@/shared'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\nimport { handleSelect } from './utils'\n\nconst props = withDefaults(defineProps<RadioProps>(), {\n  disabled: false,\n  checked: undefined,\n  as: 'button',\n})\nconst emits = defineEmits<RadioEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current checked state */\n    checked: typeof checked.value\n  }) => any\n}>()\n\nconst checked = useVModel(props, 'checked', emits, {\n  passive: (props.checked === undefined) as false,\n})\n\nconst { value } = toRefs(props)\nconst { forwardRef, currentElement: triggerElement } = useForwardExpose()\nconst isFormControl = useFormControl(triggerElement)\n\nconst ariaLabel = computed(() => props.id && triggerElement.value ? (document.querySelector(`[for=\"${props.id}\"]`) as HTMLLabelElement)?.innerText ?? props.value : undefined)\n\nfunction handleClick(event: MouseEvent) {\n  if (props.disabled)\n    return\n\n  handleSelect(event, props.value, (ev) => {\n    emits('select', ev)\n    if (ev?.defaultPrevented)\n      return\n\n    checked.value = true\n    if (isFormControl.value) {\n    // if radio is in a form, stop propagation from the button so that we only propagate\n    // one click event (from the input). We propagate changes from an input so that native\n    // form validation works and form events reflect radio updates.\n      ev.stopPropagation()\n    }\n  })\n}\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    :id=\"id\"\n    :ref=\"forwardRef\"\n    role=\"radio\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :as=\"as\"\n    :aria-checked=\"checked\"\n    :aria-label=\"ariaLabel\"\n    :as-child=\"asChild\"\n    :disabled=\"disabled ? '' : undefined\"\n    :data-state=\"checked ? 'checked' : 'unchecked'\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :value=\"value\"\n    :required=\"required\"\n    :name=\"name\"\n    @click.stop=\"handleClick\"\n  >\n    <slot :checked=\"checked\" />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name\"\n      type=\"radio\"\n      tabindex=\"-1\"\n      :value=\"value\"\n      :checked=\"!!checked\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { AcceptableValue, DataOrientation, Direction, FormFieldProps } from '@/shared/types'\nimport { createContext, useDirection, useFormControl, useForwardExpose } from '@/shared'\n\nexport interface RadioGroupRootProps extends PrimitiveProps, FormFieldProps {\n  /** The controlled value of the radio item to check. Can be binded as `v-model`. */\n  modelValue?: AcceptableValue\n  /**\n   * The value of the radio item that should be checked when initially rendered.\n   *\n   * Use when you do not need to control the state of the radio items.\n   */\n  defaultValue?: AcceptableValue\n  /** When `true`, prevents the user from interacting with radio items. */\n  disabled?: boolean\n  /** The orientation of the component. */\n  orientation?: DataOrientation\n  /** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** When `true`, keyboard navigation will loop from last item to first, and vice versa. */\n  loop?: boolean\n}\nexport type RadioGroupRootEmits = {\n  /** Event handler called when the radio group value changes */\n  'update:modelValue': [payload: AcceptableValue]\n}\n\ninterface RadioGroupRootContext {\n  modelValue?: Readonly<Ref<AcceptableValue | undefined>>\n  changeModelValue: (value?: AcceptableValue) => void\n  disabled: Ref<boolean>\n  loop: Ref<boolean>\n  orientation: Ref<DataOrientation | undefined>\n  name?: string\n  required: Ref<boolean>\n}\n\nexport const [injectRadioGroupRootContext, provideRadioGroupRootContext]\n  = createContext<RadioGroupRootContext>('RadioGroupRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusGroup } from '@/RovingFocus'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\n\nconst props = withDefaults(defineProps<RadioGroupRootProps>(), {\n  disabled: false,\n  required: false,\n  orientation: undefined,\n  loop: true,\n})\n\nconst emits = defineEmits<RadioGroupRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst { disabled, loop, orientation, name, required, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\nconst isFormControl = useFormControl(currentElement)\n\nprovideRadioGroupRootContext({\n  modelValue,\n  changeModelValue: (value) => {\n    modelValue.value = value\n  },\n  disabled,\n  loop,\n  orientation,\n  name: name?.value,\n  required,\n})\n</script>\n\n<template>\n  <RovingFocusGroup\n    as-child\n    :orientation=\"orientation\"\n    :dir=\"dir\"\n    :loop=\"loop\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      role=\"radiogroup\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      :aria-orientation=\"orientation\"\n      :aria-required=\"required\"\n      :dir=\"dir\"\n    >\n      <slot :model-value=\"modelValue\" />\n\n      <VisuallyHiddenInput\n        v-if=\"isFormControl && name\"\n        :required=\"required\"\n        :disabled=\"disabled\"\n        :value=\"modelValue\"\n        :name=\"name\"\n      />\n    </Primitive>\n  </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { AcceptableValue, DataOrientation, Direction, FormFieldProps } from '@/shared/types'\nimport { createContext, useDirection, useFormControl, useForwardExpose } from '@/shared'\n\nexport interface RadioGroupRootProps extends PrimitiveProps, FormFieldProps {\n  /** The controlled value of the radio item to check. Can be binded as `v-model`. */\n  modelValue?: AcceptableValue\n  /**\n   * The value of the radio item that should be checked when initially rendered.\n   *\n   * Use when you do not need to control the state of the radio items.\n   */\n  defaultValue?: AcceptableValue\n  /** When `true`, prevents the user from interacting with radio items. */\n  disabled?: boolean\n  /** The orientation of the component. */\n  orientation?: DataOrientation\n  /** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** When `true`, keyboard navigation will loop from last item to first, and vice versa. */\n  loop?: boolean\n}\nexport type RadioGroupRootEmits = {\n  /** Event handler called when the radio group value changes */\n  'update:modelValue': [payload: AcceptableValue]\n}\n\ninterface RadioGroupRootContext {\n  modelValue?: Readonly<Ref<AcceptableValue | undefined>>\n  changeModelValue: (value?: AcceptableValue) => void\n  disabled: Ref<boolean>\n  loop: Ref<boolean>\n  orientation: Ref<DataOrientation | undefined>\n  name?: string\n  required: Ref<boolean>\n}\n\nexport const [injectRadioGroupRootContext, provideRadioGroupRootContext]\n  = createContext<RadioGroupRootContext>('RadioGroupRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusGroup } from '@/RovingFocus'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\n\nconst props = withDefaults(defineProps<RadioGroupRootProps>(), {\n  disabled: false,\n  required: false,\n  orientation: undefined,\n  loop: true,\n})\n\nconst emits = defineEmits<RadioGroupRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst { disabled, loop, orientation, name, required, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\nconst isFormControl = useFormControl(currentElement)\n\nprovideRadioGroupRootContext({\n  modelValue,\n  changeModelValue: (value) => {\n    modelValue.value = value\n  },\n  disabled,\n  loop,\n  orientation,\n  name: name?.value,\n  required,\n})\n</script>\n\n<template>\n  <RovingFocusGroup\n    as-child\n    :orientation=\"orientation\"\n    :dir=\"dir\"\n    :loop=\"loop\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      role=\"radiogroup\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      :aria-orientation=\"orientation\"\n      :aria-required=\"required\"\n      :dir=\"dir\"\n    >\n      <slot :model-value=\"modelValue\" />\n\n      <VisuallyHiddenInput\n        v-if=\"isFormControl && name\"\n        :required=\"required\"\n        :disabled=\"disabled\"\n        :value=\"modelValue\"\n        :name=\"name\"\n      />\n    </Primitive>\n  </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef } from 'vue'\nimport type { RadioProps } from './Radio.vue'\nimport type { SelectEvent } from './utils'\nimport { createContext, useForwardExpose } from '@/shared'\n\nexport interface RadioGroupItemProps extends Omit<RadioProps, 'checked'> {}\nexport type RadioGroupItemEmits = {\n  select: [event: SelectEvent]\n}\n\ninterface RadioGroupItemContext {\n  disabled: ComputedRef<boolean>\n  checked: ComputedRef<boolean>\n}\n\nexport const [injectRadioGroupItemContext, provideRadiogroupItemContext]\n  = createContext<RadioGroupItemContext>('RadioGroupItem')\n</script>\n\n<script setup lang=\"ts\">\nimport { useEventListener } from '@vueuse/core'\nimport { isEqual } from 'ohash'\nimport { computed, ref } from 'vue'\nimport { RovingFocusItem } from '@/RovingFocus'\nimport Radio from './Radio.vue'\nimport { injectRadioGroupRootContext } from './RadioGroupRoot.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<RadioGroupItemProps>(), {\n  disabled: false,\n  as: 'button',\n})\n\nconst emits = defineEmits<RadioGroupItemEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current checked state */\n    checked: typeof checked.value\n    /** Required state */\n    required: typeof required.value\n    /** Disabled state */\n    disabled: typeof disabled.value\n  }) => any\n}>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst rootContext = injectRadioGroupRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || props.disabled)\nconst required = computed(() => rootContext.required.value || props.required)\nconst checked = computed(() => isEqual(rootContext.modelValue?.value, props.value))\n\nprovideRadiogroupItemContext({ disabled, checked })\n\nconst isArrowKeyPressed = ref(false)\nconst ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']\n\nuseEventListener('keydown', (event) => {\n  if (ARROW_KEYS.includes(event.key))\n    isArrowKeyPressed.value = true\n})\nuseEventListener('keyup', () => {\n  isArrowKeyPressed.value = false\n})\n\nfunction handleFocus() {\n  setTimeout(() => {\n    /**\n     * Our `RovingFocusGroup` will focus the radio when navigating with arrow keys\n     * and we need to 'check' it in that case. We click it to 'check' it (instead\n     * of updating `context.value`) so that the radio change event fires.\n     */\n    if (isArrowKeyPressed.value)\n      currentElement.value?.click()\n  }, 0)\n}\n</script>\n\n<template>\n  <RovingFocusItem\n    :checked=\"checked\"\n    :disabled=\"disabled\"\n    as-child\n    :focusable=\"!disabled\"\n    :active=\"checked\"\n  >\n    <Radio\n      v-bind=\"{ ...$attrs, ...props }\"\n      :ref=\"forwardRef\"\n      :checked=\"checked\"\n      :required=\"required\"\n      :disabled=\"disabled\"\n      @update:checked=\"rootContext.changeModelValue(value)\"\n      @select=\"emits('select', $event)\"\n      @keydown.enter.prevent\n      @focus=\"handleFocus\"\n    >\n      <slot\n        :checked=\"checked\"\n        :required=\"required\"\n        :disabled=\"disabled\"\n      />\n    </Radio>\n  </RovingFocusItem>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef } from 'vue'\nimport type { RadioProps } from './Radio.vue'\nimport type { SelectEvent } from './utils'\nimport { createContext, useForwardExpose } from '@/shared'\n\nexport interface RadioGroupItemProps extends Omit<RadioProps, 'checked'> {}\nexport type RadioGroupItemEmits = {\n  select: [event: SelectEvent]\n}\n\ninterface RadioGroupItemContext {\n  disabled: ComputedRef<boolean>\n  checked: ComputedRef<boolean>\n}\n\nexport const [injectRadioGroupItemContext, provideRadiogroupItemContext]\n  = createContext<RadioGroupItemContext>('RadioGroupItem')\n</script>\n\n<script setup lang=\"ts\">\nimport { useEventListener } from '@vueuse/core'\nimport { isEqual } from 'ohash'\nimport { computed, ref } from 'vue'\nimport { RovingFocusItem } from '@/RovingFocus'\nimport Radio from './Radio.vue'\nimport { injectRadioGroupRootContext } from './RadioGroupRoot.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<RadioGroupItemProps>(), {\n  disabled: false,\n  as: 'button',\n})\n\nconst emits = defineEmits<RadioGroupItemEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current checked state */\n    checked: typeof checked.value\n    /** Required state */\n    required: typeof required.value\n    /** Disabled state */\n    disabled: typeof disabled.value\n  }) => any\n}>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst rootContext = injectRadioGroupRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || props.disabled)\nconst required = computed(() => rootContext.required.value || props.required)\nconst checked = computed(() => isEqual(rootContext.modelValue?.value, props.value))\n\nprovideRadiogroupItemContext({ disabled, checked })\n\nconst isArrowKeyPressed = ref(false)\nconst ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']\n\nuseEventListener('keydown', (event) => {\n  if (ARROW_KEYS.includes(event.key))\n    isArrowKeyPressed.value = true\n})\nuseEventListener('keyup', () => {\n  isArrowKeyPressed.value = false\n})\n\nfunction handleFocus() {\n  setTimeout(() => {\n    /**\n     * Our `RovingFocusGroup` will focus the radio when navigating with arrow keys\n     * and we need to 'check' it in that case. We click it to 'check' it (instead\n     * of updating `context.value`) so that the radio change event fires.\n     */\n    if (isArrowKeyPressed.value)\n      currentElement.value?.click()\n  }, 0)\n}\n</script>\n\n<template>\n  <RovingFocusItem\n    :checked=\"checked\"\n    :disabled=\"disabled\"\n    as-child\n    :focusable=\"!disabled\"\n    :active=\"checked\"\n  >\n    <Radio\n      v-bind=\"{ ...$attrs, ...props }\"\n      :ref=\"forwardRef\"\n      :checked=\"checked\"\n      :required=\"required\"\n      :disabled=\"disabled\"\n      @update:checked=\"rootContext.changeModelValue(value)\"\n      @select=\"emits('select', $event)\"\n      @keydown.enter.prevent\n      @focus=\"handleFocus\"\n    >\n      <slot\n        :checked=\"checked\"\n        :required=\"required\"\n        :disabled=\"disabled\"\n      />\n    </Radio>\n  </RovingFocusItem>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface RadioGroupIndicatorProps extends PrimitiveProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { Primitive } from '@/Primitive'\nimport { injectRadioGroupItemContext } from './RadioGroupItem.vue'\n\nwithDefaults(defineProps<RadioGroupIndicatorProps>(), {\n  as: 'span',\n})\n\nconst { forwardRef } = useForwardExpose()\nconst itemContext = injectRadioGroupItemContext()\n</script>\n\n<template>\n  <Presence\n    :present=\"forceMount || itemContext.checked.value\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :data-state=\"itemContext.checked.value ? 'checked' : 'unchecked'\"\n      :data-disabled=\"itemContext.disabled.value ? '' : undefined\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      v-bind=\"$attrs\"\n    >\n      <slot />\n    </Primitive>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface RadioGroupIndicatorProps extends PrimitiveProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { Primitive } from '@/Primitive'\nimport { injectRadioGroupItemContext } from './RadioGroupItem.vue'\n\nwithDefaults(defineProps<RadioGroupIndicatorProps>(), {\n  as: 'span',\n})\n\nconst { forwardRef } = useForwardExpose()\nconst itemContext = injectRadioGroupItemContext()\n</script>\n\n<template>\n  <Presence\n    :present=\"forceMount || itemContext.checked.value\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :data-state=\"itemContext.checked.value ? 'checked' : 'unchecked'\"\n      :data-disabled=\"itemContext.disabled.value ? '' : undefined\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      v-bind=\"$attrs\"\n    >\n      <slot />\n    </Primitive>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { Direction, ScrollType } from './types'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useDirection, useForwardExpose } from '@/shared'\n\nexport interface ScrollAreaRootContext {\n  type: Ref<ScrollType>\n  dir: Ref<Direction>\n  scrollHideDelay: Ref<number>\n  scrollArea: Ref<HTMLElement | undefined>\n  viewport: Ref<HTMLElement | undefined>\n  onViewportChange: (viewport: HTMLElement | null) => void\n  content: Ref<HTMLElement | undefined>\n  onContentChange: (content: HTMLElement) => void\n  scrollbarX: Ref<HTMLElement | undefined>\n  onScrollbarXChange: (scrollbar: HTMLElement | null) => void\n  scrollbarXEnabled: Ref<boolean>\n  onScrollbarXEnabledChange: (rendered: boolean) => void\n  scrollbarY: Ref<HTMLElement | undefined>\n  onScrollbarYChange: (scrollbar: HTMLElement | null) => void\n  scrollbarYEnabled: Ref<boolean>\n  onScrollbarYEnabledChange: (rendered: boolean) => void\n  onCornerWidthChange: (width: number) => void\n  onCornerHeightChange: (height: number) => void\n}\n\nexport const [injectScrollAreaRootContext, provideScrollAreaRootContext]\n  = createContext<ScrollAreaRootContext>('ScrollAreaRoot')\n\nexport interface ScrollAreaRootProps extends PrimitiveProps {\n  /**\n   * Describes the nature of scrollbar visibility, similar to how the scrollbar preferences in MacOS control visibility of native scrollbars.\n   *\n   * `auto` - means that scrollbars are visible when content is overflowing on the corresponding orientation. <br>\n   * `always` - means that scrollbars are always visible regardless of whether the content is overflowing.<br>\n   * `scroll` - means that scrollbars are visible when the user is scrolling along its corresponding orientation.<br>\n   * `hover` - when the user is scrolling along its corresponding orientation and when the user is hovering over the scroll area.<br>\n   * `glimpse` - a hybrid approach that briefly shows scrollbars when the user enters the scroll area, then hides them until further interaction.\n   */\n  type?: ScrollType\n  /** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** If type is set to either `scroll` or `hover`, this prop determines the length of time, in milliseconds, <br> before the scrollbars are hidden after the user stops interacting with scrollbars. */\n  scrollHideDelay?: number\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { ref, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<ScrollAreaRootProps>(), {\n  type: 'hover',\n  scrollHideDelay: 600,\n})\n\nconst cornerWidth = ref(0)\nconst cornerHeight = ref(0)\nconst viewport = ref<HTMLElement>()\nconst content = ref<HTMLElement>()\nconst scrollbarX = ref<HTMLElement>()\nconst scrollbarY = ref<HTMLElement>()\nconst scrollbarXEnabled = ref(false)\nconst scrollbarYEnabled = ref(false)\n\nconst { type, dir: propDir, scrollHideDelay } = toRefs(props)\nconst dir = useDirection(propDir)\n\nfunction scrollTop() {\n  viewport.value?.scrollTo({\n    top: 0,\n  })\n}\nfunction scrollTopLeft() {\n  viewport.value?.scrollTo({\n    top: 0,\n    left: 0,\n  })\n}\n\ndefineExpose({\n  /** Viewport element within ScrollArea */\n  viewport,\n  /** Scroll viewport to top */\n  scrollTop,\n  /** Scroll viewport to top-left */\n  scrollTopLeft,\n})\n\nconst { forwardRef, currentElement: scrollArea } = useForwardExpose()\n\nprovideScrollAreaRootContext({\n  type,\n  dir,\n  scrollHideDelay,\n  scrollArea,\n  viewport,\n  onViewportChange: (el) => {\n    viewport.value = el || undefined\n  },\n  content,\n  onContentChange: (el) => {\n    content.value = el\n  },\n  scrollbarX,\n  scrollbarXEnabled,\n  scrollbarY,\n  scrollbarYEnabled,\n  onScrollbarXChange: (scrollbar) => {\n    scrollbarX.value = scrollbar || undefined\n  },\n  onScrollbarYChange: (scrollbar) => {\n    scrollbarY.value = scrollbar || undefined\n  },\n  onScrollbarXEnabledChange: (rendered) => {\n    scrollbarXEnabled.value = rendered\n  },\n  onScrollbarYEnabledChange: (rendered) => {\n    scrollbarYEnabled.value = rendered\n  },\n  onCornerWidthChange: (width) => {\n    cornerWidth.value = width\n  },\n  onCornerHeightChange: (height) => {\n    cornerHeight.value = height\n  },\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as-child=\"props.asChild\"\n    :as=\"as\"\n    :dir=\"dir\"\n    :style=\"{\n      position: 'relative',\n      // Pass corner sizes as CSS vars to reduce re-renders of context consumers\n      ['--reka-scroll-area-corner-width' as any]: `${cornerWidth}px`,\n      ['--reka-scroll-area-corner-height' as any]: `${cornerHeight}px`,\n    }\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { Direction, ScrollType } from './types'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useDirection, useForwardExpose } from '@/shared'\n\nexport interface ScrollAreaRootContext {\n  type: Ref<ScrollType>\n  dir: Ref<Direction>\n  scrollHideDelay: Ref<number>\n  scrollArea: Ref<HTMLElement | undefined>\n  viewport: Ref<HTMLElement | undefined>\n  onViewportChange: (viewport: HTMLElement | null) => void\n  content: Ref<HTMLElement | undefined>\n  onContentChange: (content: HTMLElement) => void\n  scrollbarX: Ref<HTMLElement | undefined>\n  onScrollbarXChange: (scrollbar: HTMLElement | null) => void\n  scrollbarXEnabled: Ref<boolean>\n  onScrollbarXEnabledChange: (rendered: boolean) => void\n  scrollbarY: Ref<HTMLElement | undefined>\n  onScrollbarYChange: (scrollbar: HTMLElement | null) => void\n  scrollbarYEnabled: Ref<boolean>\n  onScrollbarYEnabledChange: (rendered: boolean) => void\n  onCornerWidthChange: (width: number) => void\n  onCornerHeightChange: (height: number) => void\n}\n\nexport const [injectScrollAreaRootContext, provideScrollAreaRootContext]\n  = createContext<ScrollAreaRootContext>('ScrollAreaRoot')\n\nexport interface ScrollAreaRootProps extends PrimitiveProps {\n  /**\n   * Describes the nature of scrollbar visibility, similar to how the scrollbar preferences in MacOS control visibility of native scrollbars.\n   *\n   * `auto` - means that scrollbars are visible when content is overflowing on the corresponding orientation. <br>\n   * `always` - means that scrollbars are always visible regardless of whether the content is overflowing.<br>\n   * `scroll` - means that scrollbars are visible when the user is scrolling along its corresponding orientation.<br>\n   * `hover` - when the user is scrolling along its corresponding orientation and when the user is hovering over the scroll area.<br>\n   * `glimpse` - a hybrid approach that briefly shows scrollbars when the user enters the scroll area, then hides them until further interaction.\n   */\n  type?: ScrollType\n  /** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** If type is set to either `scroll` or `hover`, this prop determines the length of time, in milliseconds, <br> before the scrollbars are hidden after the user stops interacting with scrollbars. */\n  scrollHideDelay?: number\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { ref, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<ScrollAreaRootProps>(), {\n  type: 'hover',\n  scrollHideDelay: 600,\n})\n\nconst cornerWidth = ref(0)\nconst cornerHeight = ref(0)\nconst viewport = ref<HTMLElement>()\nconst content = ref<HTMLElement>()\nconst scrollbarX = ref<HTMLElement>()\nconst scrollbarY = ref<HTMLElement>()\nconst scrollbarXEnabled = ref(false)\nconst scrollbarYEnabled = ref(false)\n\nconst { type, dir: propDir, scrollHideDelay } = toRefs(props)\nconst dir = useDirection(propDir)\n\nfunction scrollTop() {\n  viewport.value?.scrollTo({\n    top: 0,\n  })\n}\nfunction scrollTopLeft() {\n  viewport.value?.scrollTo({\n    top: 0,\n    left: 0,\n  })\n}\n\ndefineExpose({\n  /** Viewport element within ScrollArea */\n  viewport,\n  /** Scroll viewport to top */\n  scrollTop,\n  /** Scroll viewport to top-left */\n  scrollTopLeft,\n})\n\nconst { forwardRef, currentElement: scrollArea } = useForwardExpose()\n\nprovideScrollAreaRootContext({\n  type,\n  dir,\n  scrollHideDelay,\n  scrollArea,\n  viewport,\n  onViewportChange: (el) => {\n    viewport.value = el || undefined\n  },\n  content,\n  onContentChange: (el) => {\n    content.value = el\n  },\n  scrollbarX,\n  scrollbarXEnabled,\n  scrollbarY,\n  scrollbarYEnabled,\n  onScrollbarXChange: (scrollbar) => {\n    scrollbarX.value = scrollbar || undefined\n  },\n  onScrollbarYChange: (scrollbar) => {\n    scrollbarY.value = scrollbar || undefined\n  },\n  onScrollbarXEnabledChange: (rendered) => {\n    scrollbarXEnabled.value = rendered\n  },\n  onScrollbarYEnabledChange: (rendered) => {\n    scrollbarYEnabled.value = rendered\n  },\n  onCornerWidthChange: (width) => {\n    cornerWidth.value = width\n  },\n  onCornerHeightChange: (height) => {\n    cornerHeight.value = height\n  },\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as-child=\"props.asChild\"\n    :as=\"as\"\n    :dir=\"dir\"\n    :style=\"{\n      position: 'relative',\n      // Pass corner sizes as CSS vars to reduce re-renders of context consumers\n      ['--reka-scroll-area-corner-width' as any]: `${cornerWidth}px`,\n      ['--reka-scroll-area-corner-height' as any]: `${cornerHeight}px`,\n    }\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script setup lang=\"ts\">\nimport { useResizeObserver } from '@vueuse/core'\nimport { computed, ref, watch } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\n\nconst rootContext = injectScrollAreaRootContext()\n\nconst width = ref(0)\nconst height = ref(0)\n\nconst hasSize = computed(() => !!width.value && !!height.value)\n\nfunction setCornerHeight() {\n  const offsetHeight = rootContext.scrollbarX.value?.offsetHeight || 0\n  rootContext.onCornerHeightChange(offsetHeight)\n  height.value = offsetHeight\n}\nfunction setCornerWidth() {\n  const offsetWidth = rootContext.scrollbarY.value?.offsetWidth || 0\n  rootContext.onCornerWidthChange(offsetWidth)\n  width.value = offsetWidth\n}\n\nuseResizeObserver(rootContext.scrollbarX.value, setCornerHeight)\nuseResizeObserver(rootContext.scrollbarY.value, setCornerWidth)\n\n// because we are not remounting the component, useResizeObserver doesn't trigger, thus using watcher here\nwatch(() => rootContext.scrollbarX.value, setCornerHeight)\nwatch(() => rootContext.scrollbarY.value, setCornerWidth)\n</script>\n\n<template>\n  <Primitive\n    v-if=\"hasSize\"\n    :style=\"{\n      width: `${width}px`,\n      height: `${height}px`,\n      position: 'absolute',\n      right: rootContext.dir.value === 'ltr' ? 0 : undefined,\n      left: rootContext.dir.value === 'rtl' ? 0 : undefined,\n      bottom: 0,\n    }\"\n    v-bind=\"$parent?.$props\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script setup lang=\"ts\">\nimport { useResizeObserver } from '@vueuse/core'\nimport { computed, ref, watch } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\n\nconst rootContext = injectScrollAreaRootContext()\n\nconst width = ref(0)\nconst height = ref(0)\n\nconst hasSize = computed(() => !!width.value && !!height.value)\n\nfunction setCornerHeight() {\n  const offsetHeight = rootContext.scrollbarX.value?.offsetHeight || 0\n  rootContext.onCornerHeightChange(offsetHeight)\n  height.value = offsetHeight\n}\nfunction setCornerWidth() {\n  const offsetWidth = rootContext.scrollbarY.value?.offsetWidth || 0\n  rootContext.onCornerWidthChange(offsetWidth)\n  width.value = offsetWidth\n}\n\nuseResizeObserver(rootContext.scrollbarX.value, setCornerHeight)\nuseResizeObserver(rootContext.scrollbarY.value, setCornerWidth)\n\n// because we are not remounting the component, useResizeObserver doesn't trigger, thus using watcher here\nwatch(() => rootContext.scrollbarX.value, setCornerHeight)\nwatch(() => rootContext.scrollbarY.value, setCornerWidth)\n</script>\n\n<template>\n  <Primitive\n    v-if=\"hasSize\"\n    :style=\"{\n      width: `${width}px`,\n      height: `${height}px`,\n      position: 'absolute',\n      right: rootContext.dir.value === 'ltr' ? 0 : undefined,\n      left: rootContext.dir.value === 'rtl' ? 0 : undefined,\n      bottom: 0,\n    }\"\n    v-bind=\"$parent?.$props\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ScrollAreaCornerProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport ScrollAreaCornerImpl from './ScrollAreaCornerImpl.vue'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\n\nconst props = defineProps<ScrollAreaCornerProps>()\n\nconst { forwardRef } = useForwardExpose()\nconst rootContext = injectScrollAreaRootContext()\n\nconst hasBothScrollbarsVisible = computed(\n  () => !!rootContext.scrollbarX.value && !!rootContext.scrollbarY.value,\n)\nconst hasCorner = computed(\n  () => rootContext.type.value !== 'scroll' && hasBothScrollbarsVisible.value,\n)\n</script>\n\n<template>\n  <ScrollAreaCornerImpl\n    v-if=\"hasCorner\"\n    v-bind=\"props\"\n    :ref=\"forwardRef\"\n  >\n    <slot />\n  </ScrollAreaCornerImpl>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ScrollAreaCornerProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport ScrollAreaCornerImpl from './ScrollAreaCornerImpl.vue'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\n\nconst props = defineProps<ScrollAreaCornerProps>()\n\nconst { forwardRef } = useForwardExpose()\nconst rootContext = injectScrollAreaRootContext()\n\nconst hasBothScrollbarsVisible = computed(\n  () => !!rootContext.scrollbarX.value && !!rootContext.scrollbarY.value,\n)\nconst hasCorner = computed(\n  () => rootContext.type.value !== 'scroll' && hasBothScrollbarsVisible.value,\n)\n</script>\n\n<template>\n  <ScrollAreaCornerImpl\n    v-if=\"hasCorner\"\n    v-bind=\"props\"\n    :ref=\"forwardRef\"\n  >\n    <slot />\n  </ScrollAreaCornerImpl>\n</template>\n","import type { Direction, Sizes } from './types'\nimport { clamp } from '@/shared'\n\n// https://github.com/tmcw-up-for-adoption/simple-linear-scale/blob/master/index.js\nfunction linearScale(\n  input: readonly [number, number],\n  output: readonly [number, number],\n) {\n  return (value: number) => {\n    if (input[0] === input[1] || output[0] === output[1])\n      return output[0]\n    const ratio = (output[1] - output[0]) / (input[1] - input[0])\n    return output[0] + ratio * (value - input[0])\n  }\n}\n\nexport function getThumbSize(sizes: Sizes) {\n  const ratio = getThumbRatio(sizes.viewport, sizes.content)\n  const scrollbarPadding\n    = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd\n  const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio\n  // minimum of 18 matches macOS minimum\n  return Math.max(thumbSize, 18)\n}\n\nexport function getThumbRatio(viewportSize: number, contentSize: number) {\n  const ratio = viewportSize / contentSize\n  return Number.isNaN(ratio) ? 0 : ratio\n}\n\n// Custom scroll handler to avoid scroll-linked effects\n// https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Scroll-linked_effects\nexport function addUnlinkedScrollListener(\n  node: HTMLElement,\n  handler = () => {},\n) {\n  let prevPosition = { left: node.scrollLeft, top: node.scrollTop }\n  let rAF = 0;\n  (function loop() {\n    const position = { left: node.scrollLeft, top: node.scrollTop }\n    const isHorizontalScroll = prevPosition.left !== position.left\n    const isVerticalScroll = prevPosition.top !== position.top\n    if (isHorizontalScroll || isVerticalScroll)\n      handler()\n    prevPosition = position\n    rAF = window.requestAnimationFrame(loop)\n  })()\n  return () => window.cancelAnimationFrame(rAF)\n}\n\nexport function getThumbOffsetFromScroll(\n  scrollPos: number,\n  sizes: Sizes,\n  dir: Direction = 'ltr',\n) {\n  const thumbSizePx = getThumbSize(sizes)\n  const scrollbarPadding\n    = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd\n  const scrollbar = sizes.scrollbar.size - scrollbarPadding\n  const maxScrollPos = sizes.content - sizes.viewport\n  const maxThumbPos = scrollbar - thumbSizePx\n  const scrollClampRange\n    = dir === 'ltr' ? [0, maxScrollPos] : [maxScrollPos * -1, 0]\n  const scrollWithoutMomentum = clamp(\n    scrollPos,\n    scrollClampRange[0],\n    scrollClampRange[1],\n  )\n  const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos])\n  return interpolate(scrollWithoutMomentum)\n}\n\nexport function toInt(value?: string) {\n  return value ? Number.parseInt(value, 10) : 0\n}\n\nexport function getScrollPositionFromPointer(\n  pointerPos: number,\n  pointerOffset: number,\n  sizes: Sizes,\n  dir: Direction = 'ltr',\n) {\n  const thumbSizePx = getThumbSize(sizes)\n  const thumbCenter = thumbSizePx / 2\n  const offset = pointerOffset || thumbCenter\n  const thumbOffsetFromEnd = thumbSizePx - offset\n  const minPointerPos = sizes.scrollbar.paddingStart + offset\n  const maxPointerPos\n    = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd\n  const maxScrollPos = sizes.content - sizes.viewport\n  const scrollRange\n    = dir === 'ltr' ? [0, maxScrollPos] : [maxScrollPos * -1, 0]\n  const interpolate = linearScale(\n    [minPointerPos, maxPointerPos],\n    scrollRange as [number, number],\n  )\n  return interpolate(pointerPos)\n}\n\nexport function isScrollingWithinScrollbarBounds(\n  scrollPos: number,\n  maxScrollPos: number,\n) {\n  return scrollPos > 0 && scrollPos < maxScrollPos\n}\n","<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport ScrollAreaScrollbarImpl from './ScrollAreaScrollbarImpl.vue'\nimport { injectScrollAreaScrollbarVisibleContext } from './ScrollAreaScrollbarVisible.vue'\nimport { getThumbSize } from './utils'\n\nconst rootContext = injectScrollAreaRootContext()\nconst scrollbarVisibleContext = injectScrollAreaScrollbarVisibleContext()\n\nconst { forwardRef, currentElement: scrollbarElement } = useForwardExpose()\n\nonMounted(() => {\n  if (scrollbarElement.value)\n    rootContext.onScrollbarXChange(scrollbarElement.value)\n})\n// Clear the registration on unmount so consumers (e.g. ScrollAreaCorner) don't\n// hold a stale reference once the scrollbar is removed (e.g. between hover cycles).\nonUnmounted(() => {\n  rootContext.onScrollbarXChange(null)\n})\nconst sizes = computed(() => scrollbarVisibleContext.sizes.value)\n</script>\n\n<template>\n  <ScrollAreaScrollbarImpl\n    :ref=\"forwardRef\"\n    :is-horizontal=\"true\"\n    data-orientation=\"horizontal\"\n    :style=\"{\n      bottom: 0,\n      left: rootContext.dir.value === 'rtl' ? 'var(--reka-scroll-area-corner-width)' : 0,\n      right: rootContext.dir.value === 'ltr' ? 'var(--reka-scroll-area-corner-width)' : 0,\n      ['--reka-scroll-area-thumb-width' as any]: sizes ? `${getThumbSize(sizes)}px` : undefined,\n    }\"\n    @on-drag-scroll=\"scrollbarVisibleContext.onDragScroll($event.x)\"\n  >\n    <slot />\n  </ScrollAreaScrollbarImpl>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport ScrollAreaScrollbarImpl from './ScrollAreaScrollbarImpl.vue'\nimport { injectScrollAreaScrollbarVisibleContext } from './ScrollAreaScrollbarVisible.vue'\nimport { getThumbSize } from './utils'\n\nconst rootContext = injectScrollAreaRootContext()\nconst scrollbarVisibleContext = injectScrollAreaScrollbarVisibleContext()\n\nconst { forwardRef, currentElement: scrollbarElement } = useForwardExpose()\n\nonMounted(() => {\n  if (scrollbarElement.value)\n    rootContext.onScrollbarXChange(scrollbarElement.value)\n})\n// Clear the registration on unmount so consumers (e.g. ScrollAreaCorner) don't\n// hold a stale reference once the scrollbar is removed (e.g. between hover cycles).\nonUnmounted(() => {\n  rootContext.onScrollbarXChange(null)\n})\nconst sizes = computed(() => scrollbarVisibleContext.sizes.value)\n</script>\n\n<template>\n  <ScrollAreaScrollbarImpl\n    :ref=\"forwardRef\"\n    :is-horizontal=\"true\"\n    data-orientation=\"horizontal\"\n    :style=\"{\n      bottom: 0,\n      left: rootContext.dir.value === 'rtl' ? 'var(--reka-scroll-area-corner-width)' : 0,\n      right: rootContext.dir.value === 'ltr' ? 'var(--reka-scroll-area-corner-width)' : 0,\n      ['--reka-scroll-area-thumb-width' as any]: sizes ? `${getThumbSize(sizes)}px` : undefined,\n    }\"\n    @on-drag-scroll=\"scrollbarVisibleContext.onDragScroll($event.x)\"\n  >\n    <slot />\n  </ScrollAreaScrollbarImpl>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport ScrollAreaScrollbarImpl from './ScrollAreaScrollbarImpl.vue'\nimport { injectScrollAreaScrollbarVisibleContext } from './ScrollAreaScrollbarVisible.vue'\nimport { getThumbSize } from './utils'\n\nconst rootContext = injectScrollAreaRootContext()\nconst scrollbarVisibleContext = injectScrollAreaScrollbarVisibleContext()\n\nconst { forwardRef, currentElement: scrollbarElement } = useForwardExpose()\n\nonMounted(() => {\n  if (scrollbarElement.value)\n    rootContext.onScrollbarYChange(scrollbarElement.value)\n})\n// Clear the registration on unmount so consumers (e.g. ScrollAreaCorner) don't\n// hold a stale reference once the scrollbar is removed (e.g. between hover cycles).\nonUnmounted(() => {\n  rootContext.onScrollbarYChange(null)\n})\n\nconst sizes = computed(() => scrollbarVisibleContext.sizes.value)\n</script>\n\n<template>\n  <ScrollAreaScrollbarImpl\n    :ref=\"forwardRef\"\n    :is-horizontal=\"false\"\n    data-orientation=\"vertical\"\n    :style=\"{\n      top: 0,\n      right: rootContext.dir.value === 'ltr' ? 0 : undefined,\n      left: rootContext.dir.value === 'rtl' ? 0 : undefined,\n      bottom: 'var(--reka-scroll-area-corner-height)',\n      ['--reka-scroll-area-thumb-height' as any]: sizes ? `${getThumbSize(sizes)}px` : undefined,\n    }\"\n    @on-drag-scroll=\"scrollbarVisibleContext.onDragScroll($event.y)\"\n  >\n    <slot />\n  </ScrollAreaScrollbarImpl>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport ScrollAreaScrollbarImpl from './ScrollAreaScrollbarImpl.vue'\nimport { injectScrollAreaScrollbarVisibleContext } from './ScrollAreaScrollbarVisible.vue'\nimport { getThumbSize } from './utils'\n\nconst rootContext = injectScrollAreaRootContext()\nconst scrollbarVisibleContext = injectScrollAreaScrollbarVisibleContext()\n\nconst { forwardRef, currentElement: scrollbarElement } = useForwardExpose()\n\nonMounted(() => {\n  if (scrollbarElement.value)\n    rootContext.onScrollbarYChange(scrollbarElement.value)\n})\n// Clear the registration on unmount so consumers (e.g. ScrollAreaCorner) don't\n// hold a stale reference once the scrollbar is removed (e.g. between hover cycles).\nonUnmounted(() => {\n  rootContext.onScrollbarYChange(null)\n})\n\nconst sizes = computed(() => scrollbarVisibleContext.sizes.value)\n</script>\n\n<template>\n  <ScrollAreaScrollbarImpl\n    :ref=\"forwardRef\"\n    :is-horizontal=\"false\"\n    data-orientation=\"vertical\"\n    :style=\"{\n      top: 0,\n      right: rootContext.dir.value === 'ltr' ? 0 : undefined,\n      left: rootContext.dir.value === 'rtl' ? 0 : undefined,\n      bottom: 'var(--reka-scroll-area-corner-height)',\n      ['--reka-scroll-area-thumb-height' as any]: sizes ? `${getThumbSize(sizes)}px` : undefined,\n    }\"\n    @on-drag-scroll=\"scrollbarVisibleContext.onDragScroll($event.y)\"\n  >\n    <slot />\n  </ScrollAreaScrollbarImpl>\n</template>\n","<script lang=\"ts\">\nexport interface ScrollAreaScrollbarAutoProps {\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useDebounceFn, useResizeObserver } from '@vueuse/core'\nimport { onMounted, ref } from 'vue'\nimport { Presence } from '@/Presence'\nimport { useForwardExpose } from '@/shared'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport { injectScrollAreaScrollbarContext } from './ScrollAreaScrollbar.vue'\nimport ScrollAreaScrollbarVisible from './ScrollAreaScrollbarVisible.vue'\n\ndefineProps<ScrollAreaScrollbarAutoProps>()\n\nconst rootContext = injectScrollAreaRootContext()\nconst scrollbarContext = injectScrollAreaScrollbarContext()\n\nconst { forwardRef } = useForwardExpose()\n\nconst visible = ref(false)\n\nconst handleResize = useDebounceFn(() => {\n  if (rootContext.viewport.value) {\n    const isOverflowX\n      = rootContext.viewport.value.offsetWidth\n        < rootContext.viewport.value.scrollWidth\n    const isOverflowY\n      = rootContext.viewport.value.offsetHeight\n        < rootContext.viewport.value.scrollHeight\n\n    visible.value = scrollbarContext.isHorizontal.value\n      ? isOverflowX\n      : isOverflowY\n  }\n}, 10)\n\nonMounted(() => handleResize())\n\nuseResizeObserver(rootContext.viewport, handleResize)\nuseResizeObserver(rootContext.content, handleResize)\n</script>\n\n<template>\n  <Presence :present=\"forceMount || visible\">\n    <ScrollAreaScrollbarVisible\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      :data-state=\"visible ? 'visible' : 'hidden'\"\n    >\n      <slot />\n    </ScrollAreaScrollbarVisible>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nexport interface ScrollAreaScrollbarAutoProps {\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useDebounceFn, useResizeObserver } from '@vueuse/core'\nimport { onMounted, ref } from 'vue'\nimport { Presence } from '@/Presence'\nimport { useForwardExpose } from '@/shared'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport { injectScrollAreaScrollbarContext } from './ScrollAreaScrollbar.vue'\nimport ScrollAreaScrollbarVisible from './ScrollAreaScrollbarVisible.vue'\n\ndefineProps<ScrollAreaScrollbarAutoProps>()\n\nconst rootContext = injectScrollAreaRootContext()\nconst scrollbarContext = injectScrollAreaScrollbarContext()\n\nconst { forwardRef } = useForwardExpose()\n\nconst visible = ref(false)\n\nconst handleResize = useDebounceFn(() => {\n  if (rootContext.viewport.value) {\n    const isOverflowX\n      = rootContext.viewport.value.offsetWidth\n        < rootContext.viewport.value.scrollWidth\n    const isOverflowY\n      = rootContext.viewport.value.offsetHeight\n        < rootContext.viewport.value.scrollHeight\n\n    visible.value = scrollbarContext.isHorizontal.value\n      ? isOverflowX\n      : isOverflowY\n  }\n}, 10)\n\nonMounted(() => handleResize())\n\nuseResizeObserver(rootContext.viewport, handleResize)\nuseResizeObserver(rootContext.content, handleResize)\n</script>\n\n<template>\n  <Presence :present=\"forceMount || visible\">\n    <ScrollAreaScrollbarVisible\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      :data-state=\"visible ? 'visible' : 'hidden'\"\n    >\n      <slot />\n    </ScrollAreaScrollbarVisible>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { ScrollAreaScrollbarAutoProps } from './ScrollAreaScrollbarAuto.vue'\n\nexport interface ScrollAreaScrollbarGlimpseProps extends ScrollAreaScrollbarAutoProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useDebounceFn } from '@vueuse/core'\nimport { computed, onMounted, onUnmounted, watchEffect } from 'vue'\nimport { Presence } from '@/Presence'\nimport { useForwardExpose } from '@/shared'\nimport { useStateMachine } from '../shared/useStateMachine'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport { injectScrollAreaScrollbarContext } from './ScrollAreaScrollbar.vue'\nimport ScrollAreaScrollbarAuto from './ScrollAreaScrollbarAuto.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\ndefineProps<ScrollAreaScrollbarGlimpseProps>()\n\nconst rootContext = injectScrollAreaRootContext()\nconst scrollbarContext = injectScrollAreaScrollbarContext()\n\nconst { forwardRef } = useForwardExpose()\n\nconst { state, dispatch } = useStateMachine('hidden', {\n  hidden: {\n    POINTER_ENTER: 'glimpse',\n    SCROLL: 'scrolling',\n  },\n  glimpse: {\n    HIDE: 'hidden',\n    POINTER_LEAVE: 'hidden',\n    SCROLL: 'scrolling',\n    POINTER_ENTER: 'glimpse',\n  },\n  scrolling: {\n    SCROLL_END: 'idle',\n    POINTER_ENTER: 'interacting',\n  },\n  interacting: {\n    SCROLL: 'interacting',\n    POINTER_LEAVE: 'idle',\n  },\n  idle: {\n    HIDE: 'hidden',\n    SCROLL: 'scrolling',\n    POINTER_ENTER: 'interacting',\n  },\n})\n\nconst visible = computed(() => state.value !== 'hidden')\n\nfunction handlePointerEnter() {\n  dispatch('POINTER_ENTER')\n}\n\nfunction handlePointerLeave() {\n  dispatch('POINTER_LEAVE')\n}\n\nconst debounceScrollEnd = useDebounceFn(() => dispatch('SCROLL_END'), 100)\n\nwatchEffect((onCleanup) => {\n  if (state.value === 'glimpse') {\n    const timeId = window.setTimeout(dispatch, rootContext.scrollHideDelay.value, 'HIDE')\n\n    onCleanup(() => {\n      window.clearTimeout(timeId)\n    })\n  }\n})\n\nwatchEffect((onCleanup) => {\n  if (state.value === 'idle') {\n    const timeId = window.setTimeout(dispatch, rootContext.scrollHideDelay.value, 'HIDE')\n\n    onCleanup(() => {\n      window.clearTimeout(timeId)\n    })\n  }\n})\n\nwatchEffect((onCleanup) => {\n  const viewport = rootContext.viewport.value\n  const scrollDirection = scrollbarContext.isHorizontal.value\n    ? 'scrollLeft'\n    : 'scrollTop'\n\n  if (viewport) {\n    let prevScrollPos = viewport[scrollDirection]\n    const handleScroll = () => {\n      const scrollPos = viewport[scrollDirection]\n      const hasScrollInDirectionChanged = prevScrollPos !== scrollPos\n      if (hasScrollInDirectionChanged) {\n        dispatch('SCROLL')\n        debounceScrollEnd()\n      }\n      prevScrollPos = scrollPos\n    }\n    viewport.addEventListener('scroll', handleScroll)\n\n    onCleanup(() => {\n      viewport.removeEventListener('scroll', handleScroll)\n    })\n  }\n})\n\nonMounted(() => {\n  const scrollArea = rootContext.scrollArea.value\n\n  if (scrollArea) {\n    scrollArea.addEventListener('pointerenter', handlePointerEnter)\n    scrollArea.addEventListener('pointerleave', handlePointerLeave)\n  }\n})\n\nonUnmounted(() => {\n  const scrollArea = rootContext.scrollArea.value\n  if (scrollArea) {\n    scrollArea.removeEventListener('pointerenter', handlePointerEnter)\n    scrollArea.removeEventListener('pointerleave', handlePointerLeave)\n  }\n})\n</script>\n\n<template>\n  <Presence :present=\"forceMount || visible\">\n    <ScrollAreaScrollbarAuto\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      :data-state=\"visible ? 'visible' : 'hidden'\"\n    >\n      <slot />\n    </ScrollAreaScrollbarAuto>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { ScrollAreaScrollbarAutoProps } from './ScrollAreaScrollbarAuto.vue'\n\nexport interface ScrollAreaScrollbarGlimpseProps extends ScrollAreaScrollbarAutoProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useDebounceFn } from '@vueuse/core'\nimport { computed, onMounted, onUnmounted, watchEffect } from 'vue'\nimport { Presence } from '@/Presence'\nimport { useForwardExpose } from '@/shared'\nimport { useStateMachine } from '../shared/useStateMachine'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport { injectScrollAreaScrollbarContext } from './ScrollAreaScrollbar.vue'\nimport ScrollAreaScrollbarAuto from './ScrollAreaScrollbarAuto.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\ndefineProps<ScrollAreaScrollbarGlimpseProps>()\n\nconst rootContext = injectScrollAreaRootContext()\nconst scrollbarContext = injectScrollAreaScrollbarContext()\n\nconst { forwardRef } = useForwardExpose()\n\nconst { state, dispatch } = useStateMachine('hidden', {\n  hidden: {\n    POINTER_ENTER: 'glimpse',\n    SCROLL: 'scrolling',\n  },\n  glimpse: {\n    HIDE: 'hidden',\n    POINTER_LEAVE: 'hidden',\n    SCROLL: 'scrolling',\n    POINTER_ENTER: 'glimpse',\n  },\n  scrolling: {\n    SCROLL_END: 'idle',\n    POINTER_ENTER: 'interacting',\n  },\n  interacting: {\n    SCROLL: 'interacting',\n    POINTER_LEAVE: 'idle',\n  },\n  idle: {\n    HIDE: 'hidden',\n    SCROLL: 'scrolling',\n    POINTER_ENTER: 'interacting',\n  },\n})\n\nconst visible = computed(() => state.value !== 'hidden')\n\nfunction handlePointerEnter() {\n  dispatch('POINTER_ENTER')\n}\n\nfunction handlePointerLeave() {\n  dispatch('POINTER_LEAVE')\n}\n\nconst debounceScrollEnd = useDebounceFn(() => dispatch('SCROLL_END'), 100)\n\nwatchEffect((onCleanup) => {\n  if (state.value === 'glimpse') {\n    const timeId = window.setTimeout(dispatch, rootContext.scrollHideDelay.value, 'HIDE')\n\n    onCleanup(() => {\n      window.clearTimeout(timeId)\n    })\n  }\n})\n\nwatchEffect((onCleanup) => {\n  if (state.value === 'idle') {\n    const timeId = window.setTimeout(dispatch, rootContext.scrollHideDelay.value, 'HIDE')\n\n    onCleanup(() => {\n      window.clearTimeout(timeId)\n    })\n  }\n})\n\nwatchEffect((onCleanup) => {\n  const viewport = rootContext.viewport.value\n  const scrollDirection = scrollbarContext.isHorizontal.value\n    ? 'scrollLeft'\n    : 'scrollTop'\n\n  if (viewport) {\n    let prevScrollPos = viewport[scrollDirection]\n    const handleScroll = () => {\n      const scrollPos = viewport[scrollDirection]\n      const hasScrollInDirectionChanged = prevScrollPos !== scrollPos\n      if (hasScrollInDirectionChanged) {\n        dispatch('SCROLL')\n        debounceScrollEnd()\n      }\n      prevScrollPos = scrollPos\n    }\n    viewport.addEventListener('scroll', handleScroll)\n\n    onCleanup(() => {\n      viewport.removeEventListener('scroll', handleScroll)\n    })\n  }\n})\n\nonMounted(() => {\n  const scrollArea = rootContext.scrollArea.value\n\n  if (scrollArea) {\n    scrollArea.addEventListener('pointerenter', handlePointerEnter)\n    scrollArea.addEventListener('pointerleave', handlePointerLeave)\n  }\n})\n\nonUnmounted(() => {\n  const scrollArea = rootContext.scrollArea.value\n  if (scrollArea) {\n    scrollArea.removeEventListener('pointerenter', handlePointerEnter)\n    scrollArea.removeEventListener('pointerleave', handlePointerLeave)\n  }\n})\n</script>\n\n<template>\n  <Presence :present=\"forceMount || visible\">\n    <ScrollAreaScrollbarAuto\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      :data-state=\"visible ? 'visible' : 'hidden'\"\n    >\n      <slot />\n    </ScrollAreaScrollbarAuto>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { ScrollAreaScrollbarAutoProps } from './ScrollAreaScrollbarAuto.vue'\n\nexport interface ScrollAreaScrollbarHoverProps extends ScrollAreaScrollbarAutoProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted, onUnmounted, ref } from 'vue'\nimport { Presence } from '@/Presence'\nimport { useForwardExpose } from '@/shared'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport ScrollAreaScrollbarAuto from './ScrollAreaScrollbarAuto.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\ndefineProps<ScrollAreaScrollbarHoverProps>()\n\nconst rootContext = injectScrollAreaRootContext()\n\nconst { forwardRef } = useForwardExpose()\n\nlet timeout: ReturnType<typeof setTimeout> | undefined | number\nconst visible = ref(false)\n\nfunction handlePointerEnter() {\n  window.clearTimeout(timeout)\n  visible.value = true\n}\nfunction handlePointerLeave() {\n  timeout = window.setTimeout(() => {\n    visible.value = false\n  }, rootContext.scrollHideDelay.value)\n}\n\nonMounted(() => {\n  const scrollArea = rootContext.scrollArea.value\n\n  if (scrollArea) {\n    scrollArea.addEventListener('pointerenter', handlePointerEnter)\n    scrollArea.addEventListener('pointerleave', handlePointerLeave)\n  }\n})\n\nonUnmounted(() => {\n  const scrollArea = rootContext.scrollArea.value\n  if (scrollArea) {\n    window.clearTimeout(timeout)\n    scrollArea.removeEventListener('pointerenter', handlePointerEnter)\n    scrollArea.removeEventListener('pointerleave', handlePointerLeave)\n  }\n})\n</script>\n\n<template>\n  <Presence :present=\"forceMount || visible\">\n    <ScrollAreaScrollbarAuto\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      :data-state=\"visible ? 'visible' : 'hidden'\"\n    >\n      <slot />\n    </ScrollAreaScrollbarAuto>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { ScrollAreaScrollbarAutoProps } from './ScrollAreaScrollbarAuto.vue'\n\nexport interface ScrollAreaScrollbarHoverProps extends ScrollAreaScrollbarAutoProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted, onUnmounted, ref } from 'vue'\nimport { Presence } from '@/Presence'\nimport { useForwardExpose } from '@/shared'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport ScrollAreaScrollbarAuto from './ScrollAreaScrollbarAuto.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\ndefineProps<ScrollAreaScrollbarHoverProps>()\n\nconst rootContext = injectScrollAreaRootContext()\n\nconst { forwardRef } = useForwardExpose()\n\nlet timeout: ReturnType<typeof setTimeout> | undefined | number\nconst visible = ref(false)\n\nfunction handlePointerEnter() {\n  window.clearTimeout(timeout)\n  visible.value = true\n}\nfunction handlePointerLeave() {\n  timeout = window.setTimeout(() => {\n    visible.value = false\n  }, rootContext.scrollHideDelay.value)\n}\n\nonMounted(() => {\n  const scrollArea = rootContext.scrollArea.value\n\n  if (scrollArea) {\n    scrollArea.addEventListener('pointerenter', handlePointerEnter)\n    scrollArea.addEventListener('pointerleave', handlePointerLeave)\n  }\n})\n\nonUnmounted(() => {\n  const scrollArea = rootContext.scrollArea.value\n  if (scrollArea) {\n    window.clearTimeout(timeout)\n    scrollArea.removeEventListener('pointerenter', handlePointerEnter)\n    scrollArea.removeEventListener('pointerleave', handlePointerLeave)\n  }\n})\n</script>\n\n<template>\n  <Presence :present=\"forceMount || visible\">\n    <ScrollAreaScrollbarAuto\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      :data-state=\"visible ? 'visible' : 'hidden'\"\n    >\n      <slot />\n    </ScrollAreaScrollbarAuto>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nexport interface ScrollAreaScrollbarScrollProps {\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useDebounceFn } from '@vueuse/core'\nimport { computed, watchEffect } from 'vue'\nimport { Presence } from '@/Presence'\nimport { useForwardExpose } from '@/shared'\nimport { useStateMachine } from '../shared/useStateMachine'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport { injectScrollAreaScrollbarContext } from './ScrollAreaScrollbar.vue'\nimport ScrollAreaScrollbarVisible from './ScrollAreaScrollbarVisible.vue'\n\ndefineProps<ScrollAreaScrollbarScrollProps>()\n\nconst rootContext = injectScrollAreaRootContext()\nconst scrollbarContext = injectScrollAreaScrollbarContext()\n\nconst { forwardRef } = useForwardExpose()\n\nconst { state, dispatch } = useStateMachine('hidden', {\n  hidden: {\n    SCROLL: 'scrolling',\n  },\n  scrolling: {\n    SCROLL_END: 'idle',\n    POINTER_ENTER: 'interacting',\n  },\n  interacting: {\n    SCROLL: 'interacting',\n    POINTER_LEAVE: 'idle',\n  },\n  idle: {\n    HIDE: 'hidden',\n    SCROLL: 'scrolling',\n    POINTER_ENTER: 'interacting',\n  },\n})\n\nconst visible = computed(() => state.value !== 'hidden')\n\nwatchEffect((onCleanup) => {\n  if (state.value === 'idle') {\n    const timeId = window.setTimeout(dispatch, rootContext.scrollHideDelay.value, 'HIDE')\n\n    onCleanup(() => {\n      window.clearTimeout(timeId)\n    })\n  }\n})\n\nconst debounceScrollEnd = useDebounceFn(() => dispatch('SCROLL_END'), 100)\n\nwatchEffect((onCleanup) => {\n  const viewport = rootContext.viewport.value\n  const scrollDirection = scrollbarContext.isHorizontal.value\n    ? 'scrollLeft'\n    : 'scrollTop'\n\n  if (viewport) {\n    let prevScrollPos = viewport[scrollDirection]\n    const handleScroll = () => {\n      const scrollPos = viewport[scrollDirection]\n      const hasScrollInDirectionChanged = prevScrollPos !== scrollPos\n      if (hasScrollInDirectionChanged) {\n        dispatch('SCROLL')\n        debounceScrollEnd()\n      }\n      prevScrollPos = scrollPos\n    }\n    viewport.addEventListener('scroll', handleScroll)\n\n    onCleanup(() => {\n      viewport.removeEventListener('scroll', handleScroll)\n    })\n  }\n})\n</script>\n\n<template>\n  <Presence :present=\"forceMount || visible\">\n    <ScrollAreaScrollbarVisible\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      :data-state=\"visible ? 'visible' : 'hidden'\"\n    >\n      <slot />\n    </ScrollAreaScrollbarVisible>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nexport interface ScrollAreaScrollbarScrollProps {\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useDebounceFn } from '@vueuse/core'\nimport { computed, watchEffect } from 'vue'\nimport { Presence } from '@/Presence'\nimport { useForwardExpose } from '@/shared'\nimport { useStateMachine } from '../shared/useStateMachine'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport { injectScrollAreaScrollbarContext } from './ScrollAreaScrollbar.vue'\nimport ScrollAreaScrollbarVisible from './ScrollAreaScrollbarVisible.vue'\n\ndefineProps<ScrollAreaScrollbarScrollProps>()\n\nconst rootContext = injectScrollAreaRootContext()\nconst scrollbarContext = injectScrollAreaScrollbarContext()\n\nconst { forwardRef } = useForwardExpose()\n\nconst { state, dispatch } = useStateMachine('hidden', {\n  hidden: {\n    SCROLL: 'scrolling',\n  },\n  scrolling: {\n    SCROLL_END: 'idle',\n    POINTER_ENTER: 'interacting',\n  },\n  interacting: {\n    SCROLL: 'interacting',\n    POINTER_LEAVE: 'idle',\n  },\n  idle: {\n    HIDE: 'hidden',\n    SCROLL: 'scrolling',\n    POINTER_ENTER: 'interacting',\n  },\n})\n\nconst visible = computed(() => state.value !== 'hidden')\n\nwatchEffect((onCleanup) => {\n  if (state.value === 'idle') {\n    const timeId = window.setTimeout(dispatch, rootContext.scrollHideDelay.value, 'HIDE')\n\n    onCleanup(() => {\n      window.clearTimeout(timeId)\n    })\n  }\n})\n\nconst debounceScrollEnd = useDebounceFn(() => dispatch('SCROLL_END'), 100)\n\nwatchEffect((onCleanup) => {\n  const viewport = rootContext.viewport.value\n  const scrollDirection = scrollbarContext.isHorizontal.value\n    ? 'scrollLeft'\n    : 'scrollTop'\n\n  if (viewport) {\n    let prevScrollPos = viewport[scrollDirection]\n    const handleScroll = () => {\n      const scrollPos = viewport[scrollDirection]\n      const hasScrollInDirectionChanged = prevScrollPos !== scrollPos\n      if (hasScrollInDirectionChanged) {\n        dispatch('SCROLL')\n        debounceScrollEnd()\n      }\n      prevScrollPos = scrollPos\n    }\n    viewport.addEventListener('scroll', handleScroll)\n\n    onCleanup(() => {\n      viewport.removeEventListener('scroll', handleScroll)\n    })\n  }\n})\n</script>\n\n<template>\n  <Presence :present=\"forceMount || visible\">\n    <ScrollAreaScrollbarVisible\n      v-bind=\"$attrs\"\n      :ref=\"forwardRef\"\n      :data-state=\"visible ? 'visible' : 'hidden'\"\n    >\n      <slot />\n    </ScrollAreaScrollbarVisible>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useForwardExpose } from '@/shared'\n\nexport interface ScrollAreaScrollbarProps extends PrimitiveProps {\n  /** The orientation of the scrollbar */\n  orientation?: 'vertical' | 'horizontal'\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n\nexport interface ScrollAreaScrollbarContext {\n  as: Ref<PrimitiveProps['as']>\n  orientation: Ref<'vertical' | 'horizontal'>\n  forceMount?: Ref<boolean>\n  isHorizontal: Ref<boolean>\n  asChild: Ref<boolean>\n}\n\nexport const [injectScrollAreaScrollbarContext, provideScrollAreaScrollbarContext]\n  = createContext<ScrollAreaScrollbarContext>('ScrollAreaScrollbar')\n</script>\n\n<script setup lang=\"ts\">\nimport {\n  computed,\n  onUnmounted,\n  toRefs,\n  watch,\n} from 'vue'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport ScrollAreaScrollbarAuto from './ScrollAreaScrollbarAuto.vue'\nimport ScrollAreaScrollbarGlimpse from './ScrollAreaScrollbarGlimpse.vue'\nimport ScrollAreaScrollbarHover from './ScrollAreaScrollbarHover.vue'\nimport ScrollAreaScrollbarScroll from './ScrollAreaScrollbarScroll.vue'\nimport ScrollAreaScrollbarVisible from './ScrollAreaScrollbarVisible.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<ScrollAreaScrollbarProps>(), {\n  orientation: 'vertical',\n  as: 'div',\n})\n\nconst { forwardRef } = useForwardExpose()\nconst rootContext = injectScrollAreaRootContext()\n\nconst isHorizontal = computed(() => props.orientation === 'horizontal')\n\nwatch(\n  isHorizontal,\n  () => {\n    if (isHorizontal.value)\n      rootContext.onScrollbarXEnabledChange(true)\n    else rootContext.onScrollbarYEnabledChange(true)\n  },\n  { immediate: true },\n)\n\nonUnmounted(() => {\n  rootContext.onScrollbarXEnabledChange(false)\n  rootContext.onScrollbarYEnabledChange(false)\n})\n\nconst { orientation, forceMount, asChild, as } = toRefs(props)\nprovideScrollAreaScrollbarContext({\n  orientation,\n  forceMount,\n  isHorizontal,\n  as,\n  asChild,\n})\n</script>\n\n<template>\n  <ScrollAreaScrollbarHover\n    v-if=\"rootContext.type.value === 'hover'\"\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n    :force-mount=\"forceMount\"\n  >\n    <slot />\n  </ScrollAreaScrollbarHover>\n  <ScrollAreaScrollbarScroll\n    v-else-if=\"rootContext.type.value === 'scroll'\"\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n    :force-mount=\"forceMount\"\n  >\n    <slot />\n  </ScrollAreaScrollbarScroll>\n  <ScrollAreaScrollbarGlimpse\n    v-else-if=\"rootContext.type.value === 'glimpse'\"\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n    :force-mount=\"forceMount\"\n  >\n    <slot />\n  </ScrollAreaScrollbarGlimpse>\n  <ScrollAreaScrollbarAuto\n    v-else-if=\"rootContext.type.value === 'auto'\"\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n    :force-mount=\"forceMount\"\n  >\n    <slot />\n  </ScrollAreaScrollbarAuto>\n  <ScrollAreaScrollbarVisible\n    v-else-if=\"rootContext.type.value === 'always'\"\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n    data-state=\"visible\"\n  >\n    <slot />\n  </ScrollAreaScrollbarVisible>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useForwardExpose } from '@/shared'\n\nexport interface ScrollAreaScrollbarProps extends PrimitiveProps {\n  /** The orientation of the scrollbar */\n  orientation?: 'vertical' | 'horizontal'\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n\nexport interface ScrollAreaScrollbarContext {\n  as: Ref<PrimitiveProps['as']>\n  orientation: Ref<'vertical' | 'horizontal'>\n  forceMount?: Ref<boolean>\n  isHorizontal: Ref<boolean>\n  asChild: Ref<boolean>\n}\n\nexport const [injectScrollAreaScrollbarContext, provideScrollAreaScrollbarContext]\n  = createContext<ScrollAreaScrollbarContext>('ScrollAreaScrollbar')\n</script>\n\n<script setup lang=\"ts\">\nimport {\n  computed,\n  onUnmounted,\n  toRefs,\n  watch,\n} from 'vue'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport ScrollAreaScrollbarAuto from './ScrollAreaScrollbarAuto.vue'\nimport ScrollAreaScrollbarGlimpse from './ScrollAreaScrollbarGlimpse.vue'\nimport ScrollAreaScrollbarHover from './ScrollAreaScrollbarHover.vue'\nimport ScrollAreaScrollbarScroll from './ScrollAreaScrollbarScroll.vue'\nimport ScrollAreaScrollbarVisible from './ScrollAreaScrollbarVisible.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<ScrollAreaScrollbarProps>(), {\n  orientation: 'vertical',\n  as: 'div',\n})\n\nconst { forwardRef } = useForwardExpose()\nconst rootContext = injectScrollAreaRootContext()\n\nconst isHorizontal = computed(() => props.orientation === 'horizontal')\n\nwatch(\n  isHorizontal,\n  () => {\n    if (isHorizontal.value)\n      rootContext.onScrollbarXEnabledChange(true)\n    else rootContext.onScrollbarYEnabledChange(true)\n  },\n  { immediate: true },\n)\n\nonUnmounted(() => {\n  rootContext.onScrollbarXEnabledChange(false)\n  rootContext.onScrollbarYEnabledChange(false)\n})\n\nconst { orientation, forceMount, asChild, as } = toRefs(props)\nprovideScrollAreaScrollbarContext({\n  orientation,\n  forceMount,\n  isHorizontal,\n  as,\n  asChild,\n})\n</script>\n\n<template>\n  <ScrollAreaScrollbarHover\n    v-if=\"rootContext.type.value === 'hover'\"\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n    :force-mount=\"forceMount\"\n  >\n    <slot />\n  </ScrollAreaScrollbarHover>\n  <ScrollAreaScrollbarScroll\n    v-else-if=\"rootContext.type.value === 'scroll'\"\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n    :force-mount=\"forceMount\"\n  >\n    <slot />\n  </ScrollAreaScrollbarScroll>\n  <ScrollAreaScrollbarGlimpse\n    v-else-if=\"rootContext.type.value === 'glimpse'\"\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n    :force-mount=\"forceMount\"\n  >\n    <slot />\n  </ScrollAreaScrollbarGlimpse>\n  <ScrollAreaScrollbarAuto\n    v-else-if=\"rootContext.type.value === 'auto'\"\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n    :force-mount=\"forceMount\"\n  >\n    <slot />\n  </ScrollAreaScrollbarAuto>\n  <ScrollAreaScrollbarVisible\n    v-else-if=\"rootContext.type.value === 'always'\"\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n    data-state=\"visible\"\n  >\n    <slot />\n  </ScrollAreaScrollbarVisible>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { Direction, Sizes } from './types'\nimport { createContext, useForwardExpose } from '@/shared'\n\nexport interface ScrollAreaScrollbarVisibleContext {\n  sizes: Ref<Sizes>\n  hasThumb: Ref<boolean>\n  handleWheelScroll: (event: WheelEvent, payload: number) => void\n  handleThumbDown: (\n    event: MouseEvent,\n    payload: { x: number, y: number },\n  ) => void\n  handleThumbUp: (event: MouseEvent) => void\n  handleSizeChange: (payload: Sizes) => void\n  onThumbPositionChange: () => void\n  onDragScroll: (payload: number) => void\n  onThumbChange: (element: HTMLElement) => void\n}\n\nexport const [injectScrollAreaScrollbarVisibleContext, provideScrollAreaScrollbarVisibleContext]\n  = createContext<ScrollAreaScrollbarVisibleContext>('ScrollAreaScrollbarVisible')\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from 'vue'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport { injectScrollAreaScrollbarContext } from './ScrollAreaScrollbar.vue'\nimport ScrollAreaScrollbarX from './ScrollAreaScrollbarX.vue'\nimport ScrollAreaScrollbarY from './ScrollAreaScrollbarY.vue'\nimport {\n  getScrollPositionFromPointer,\n  getThumbOffsetFromScroll,\n  getThumbRatio,\n  isScrollingWithinScrollbarBounds,\n} from './utils'\n\nconst rootContext = injectScrollAreaRootContext()\nconst scrollbarContext = injectScrollAreaScrollbarContext()\nconst { forwardRef } = useForwardExpose()\n\nconst sizes = ref<Sizes>({\n  content: 0,\n  viewport: 0,\n  scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 },\n})\n\nconst hasThumb = computed(() => {\n  const thumbRatio = getThumbRatio(sizes.value.viewport, sizes.value.content)\n  return Boolean(thumbRatio > 0 && thumbRatio < 1)\n})\n\nconst thumbRef = ref<HTMLElement>()\nconst pointerOffset = ref(0)\n\nfunction handleWheelScroll(event: WheelEvent, payload: number) {\n  if (isShowingScrollbarX.value) {\n    const scrollPos = rootContext.viewport.value!.scrollLeft + event.deltaY\n\n    rootContext.viewport.value!.scrollLeft = scrollPos\n    // prevent window scroll when wheeling on scrollbar\n    if (isScrollingWithinScrollbarBounds(scrollPos, payload))\n      event.preventDefault()\n  }\n  else {\n    const scrollPos = rootContext.viewport.value!.scrollTop + event.deltaY\n\n    rootContext.viewport.value!.scrollTop = scrollPos\n    // prevent window scroll when wheeling on scrollbar\n    if (isScrollingWithinScrollbarBounds(scrollPos, payload))\n      event.preventDefault()\n  }\n}\n\nfunction handleThumbDown(event: MouseEvent, payload: { x: number, y: number }) {\n  if (isShowingScrollbarX.value)\n    pointerOffset.value = payload.x\n  else pointerOffset.value = payload.y\n}\nfunction handleThumbUp(event: MouseEvent) {\n  pointerOffset.value = 0\n}\n\nfunction handleSizeChange(payload: Sizes) {\n  sizes.value = payload\n}\n\nfunction getScrollPosition(pointerPos: number, dir?: Direction) {\n  return getScrollPositionFromPointer(\n    pointerPos,\n    pointerOffset.value,\n    sizes.value,\n    dir,\n  )\n}\n\nconst isShowingScrollbarX = computed(\n  () => scrollbarContext.isHorizontal.value,\n)\n\nfunction onDragScroll(payload: number) {\n  if (isShowingScrollbarX.value) {\n    rootContext.viewport.value!.scrollLeft = getScrollPosition(\n      payload,\n      rootContext.dir.value,\n    )\n  }\n  else {\n    rootContext.viewport.value!.scrollTop = getScrollPosition(payload)\n  }\n}\n\nfunction onThumbPositionChange() {\n  if (isShowingScrollbarX.value) {\n    if (rootContext.viewport.value && thumbRef.value) {\n      const scrollPos = rootContext.viewport.value.scrollLeft\n      const offset = getThumbOffsetFromScroll(\n        scrollPos,\n        sizes.value,\n        rootContext.dir.value,\n      )\n      thumbRef.value.style.transform = `translate3d(${offset}px, 0, 0)`\n    }\n  }\n  else {\n    if (rootContext.viewport.value && thumbRef.value) {\n      const scrollPos = rootContext.viewport.value.scrollTop\n      const offset = getThumbOffsetFromScroll(scrollPos, sizes.value)\n      thumbRef.value.style.transform = `translate3d(0, ${offset}px, 0)`\n    }\n  }\n}\nfunction onThumbChange(element: HTMLElement) {\n  thumbRef.value = element\n}\n\nprovideScrollAreaScrollbarVisibleContext({\n  sizes,\n  hasThumb,\n  handleWheelScroll,\n  handleThumbDown,\n  handleThumbUp,\n  handleSizeChange,\n  onThumbPositionChange,\n  onThumbChange,\n  onDragScroll,\n})\n</script>\n\n<template>\n  <ScrollAreaScrollbarX\n    v-if=\"isShowingScrollbarX\"\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n  >\n    <slot />\n  </ScrollAreaScrollbarX>\n  <ScrollAreaScrollbarY\n    v-else\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n  >\n    <slot />\n  </ScrollAreaScrollbarY>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { Direction, Sizes } from './types'\nimport { createContext, useForwardExpose } from '@/shared'\n\nexport interface ScrollAreaScrollbarVisibleContext {\n  sizes: Ref<Sizes>\n  hasThumb: Ref<boolean>\n  handleWheelScroll: (event: WheelEvent, payload: number) => void\n  handleThumbDown: (\n    event: MouseEvent,\n    payload: { x: number, y: number },\n  ) => void\n  handleThumbUp: (event: MouseEvent) => void\n  handleSizeChange: (payload: Sizes) => void\n  onThumbPositionChange: () => void\n  onDragScroll: (payload: number) => void\n  onThumbChange: (element: HTMLElement) => void\n}\n\nexport const [injectScrollAreaScrollbarVisibleContext, provideScrollAreaScrollbarVisibleContext]\n  = createContext<ScrollAreaScrollbarVisibleContext>('ScrollAreaScrollbarVisible')\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from 'vue'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport { injectScrollAreaScrollbarContext } from './ScrollAreaScrollbar.vue'\nimport ScrollAreaScrollbarX from './ScrollAreaScrollbarX.vue'\nimport ScrollAreaScrollbarY from './ScrollAreaScrollbarY.vue'\nimport {\n  getScrollPositionFromPointer,\n  getThumbOffsetFromScroll,\n  getThumbRatio,\n  isScrollingWithinScrollbarBounds,\n} from './utils'\n\nconst rootContext = injectScrollAreaRootContext()\nconst scrollbarContext = injectScrollAreaScrollbarContext()\nconst { forwardRef } = useForwardExpose()\n\nconst sizes = ref<Sizes>({\n  content: 0,\n  viewport: 0,\n  scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 },\n})\n\nconst hasThumb = computed(() => {\n  const thumbRatio = getThumbRatio(sizes.value.viewport, sizes.value.content)\n  return Boolean(thumbRatio > 0 && thumbRatio < 1)\n})\n\nconst thumbRef = ref<HTMLElement>()\nconst pointerOffset = ref(0)\n\nfunction handleWheelScroll(event: WheelEvent, payload: number) {\n  if (isShowingScrollbarX.value) {\n    const scrollPos = rootContext.viewport.value!.scrollLeft + event.deltaY\n\n    rootContext.viewport.value!.scrollLeft = scrollPos\n    // prevent window scroll when wheeling on scrollbar\n    if (isScrollingWithinScrollbarBounds(scrollPos, payload))\n      event.preventDefault()\n  }\n  else {\n    const scrollPos = rootContext.viewport.value!.scrollTop + event.deltaY\n\n    rootContext.viewport.value!.scrollTop = scrollPos\n    // prevent window scroll when wheeling on scrollbar\n    if (isScrollingWithinScrollbarBounds(scrollPos, payload))\n      event.preventDefault()\n  }\n}\n\nfunction handleThumbDown(event: MouseEvent, payload: { x: number, y: number }) {\n  if (isShowingScrollbarX.value)\n    pointerOffset.value = payload.x\n  else pointerOffset.value = payload.y\n}\nfunction handleThumbUp(event: MouseEvent) {\n  pointerOffset.value = 0\n}\n\nfunction handleSizeChange(payload: Sizes) {\n  sizes.value = payload\n}\n\nfunction getScrollPosition(pointerPos: number, dir?: Direction) {\n  return getScrollPositionFromPointer(\n    pointerPos,\n    pointerOffset.value,\n    sizes.value,\n    dir,\n  )\n}\n\nconst isShowingScrollbarX = computed(\n  () => scrollbarContext.isHorizontal.value,\n)\n\nfunction onDragScroll(payload: number) {\n  if (isShowingScrollbarX.value) {\n    rootContext.viewport.value!.scrollLeft = getScrollPosition(\n      payload,\n      rootContext.dir.value,\n    )\n  }\n  else {\n    rootContext.viewport.value!.scrollTop = getScrollPosition(payload)\n  }\n}\n\nfunction onThumbPositionChange() {\n  if (isShowingScrollbarX.value) {\n    if (rootContext.viewport.value && thumbRef.value) {\n      const scrollPos = rootContext.viewport.value.scrollLeft\n      const offset = getThumbOffsetFromScroll(\n        scrollPos,\n        sizes.value,\n        rootContext.dir.value,\n      )\n      thumbRef.value.style.transform = `translate3d(${offset}px, 0, 0)`\n    }\n  }\n  else {\n    if (rootContext.viewport.value && thumbRef.value) {\n      const scrollPos = rootContext.viewport.value.scrollTop\n      const offset = getThumbOffsetFromScroll(scrollPos, sizes.value)\n      thumbRef.value.style.transform = `translate3d(0, ${offset}px, 0)`\n    }\n  }\n}\nfunction onThumbChange(element: HTMLElement) {\n  thumbRef.value = element\n}\n\nprovideScrollAreaScrollbarVisibleContext({\n  sizes,\n  hasThumb,\n  handleWheelScroll,\n  handleThumbDown,\n  handleThumbUp,\n  handleSizeChange,\n  onThumbPositionChange,\n  onThumbChange,\n  onDragScroll,\n})\n</script>\n\n<template>\n  <ScrollAreaScrollbarX\n    v-if=\"isShowingScrollbarX\"\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n  >\n    <slot />\n  </ScrollAreaScrollbarX>\n  <ScrollAreaScrollbarY\n    v-else\n    v-bind=\"$attrs\"\n    :ref=\"forwardRef\"\n  >\n    <slot />\n  </ScrollAreaScrollbarY>\n</template>\n","<script lang=\"ts\">\ntype ScrollbarAreaScrollbarImplEmits = {\n  onDragScroll: [payload: { x: number, y: number }]\n  onWheelScroll: [payload: { x: number, y: number }]\n  onThumbPointerDown: [payload: { x: number, y: number }]\n}\n\nexport interface ScrollAreaScrollbarImplProps {\n  isHorizontal: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useResizeObserver } from '@vueuse/core'\nimport { onMounted, onUnmounted, ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport { injectScrollAreaScrollbarContext } from './ScrollAreaScrollbar.vue'\nimport { injectScrollAreaScrollbarVisibleContext } from './ScrollAreaScrollbarVisible.vue'\nimport { toInt } from './utils'\n\nconst props = defineProps<ScrollAreaScrollbarImplProps>()\nconst emit = defineEmits<ScrollbarAreaScrollbarImplEmits>()\nconst rootContext = injectScrollAreaRootContext()\nconst scrollbarVisibleContext = injectScrollAreaScrollbarVisibleContext()\nconst scrollbarContext = injectScrollAreaScrollbarContext()\n\nconst { forwardRef, currentElement: scrollbar } = useForwardExpose()\nconst prevWebkitUserSelectRef = ref('')\nconst rectRef = ref<DOMRect>()\n\nfunction handleDragScroll(event: MouseEvent) {\n  if (rectRef.value) {\n    const x = event.clientX - rectRef.value?.left\n    const y = event.clientY - rectRef.value?.top\n    emit('onDragScroll', { x, y })\n  }\n}\n\nfunction handlePointerDown(event: PointerEvent) {\n  const mainPointer = 0\n  if (event.button === mainPointer) {\n    const element = event.target as HTMLElement\n    element.setPointerCapture(event.pointerId)\n    rectRef.value = scrollbar.value!.getBoundingClientRect()\n\n    // pointer capture doesn't prevent text selection in Safari\n    // so we remove text selection manually when scrolling\n    prevWebkitUserSelectRef.value = document.body.style.webkitUserSelect\n    document.body.style.webkitUserSelect = 'none'\n    if (rootContext.viewport)\n      rootContext.viewport.value!.style.scrollBehavior = 'auto'\n\n    handleDragScroll(event)\n  }\n}\n\nfunction handlePointerMove(event: PointerEvent) {\n  handleDragScroll(event)\n}\n\nfunction handlePointerUp(event: PointerEvent) {\n  const element = event.target as HTMLElement\n  if (element.hasPointerCapture(event.pointerId))\n    element.releasePointerCapture(event.pointerId)\n\n  document.body.style.webkitUserSelect = prevWebkitUserSelectRef.value\n  if (rootContext.viewport)\n    rootContext.viewport.value!.style.scrollBehavior = ''\n\n  rectRef.value = undefined\n}\n\nfunction handleWheel(event: WheelEvent) {\n  const element = event.target as HTMLElement\n  const isScrollbarWheel = scrollbar.value?.contains(element)\n  const maxScrollPos\n    = scrollbarVisibleContext.sizes.value.content\n      - scrollbarVisibleContext.sizes.value.viewport\n  if (isScrollbarWheel)\n    scrollbarVisibleContext.handleWheelScroll(event, maxScrollPos)\n}\n\nonMounted(() => {\n  document.addEventListener('wheel', handleWheel, { passive: false })\n})\nonUnmounted(() => {\n  document.removeEventListener('wheel', handleWheel)\n})\n\nfunction handleSizeChange() {\n  if (!scrollbar.value)\n    return\n  if (props.isHorizontal) {\n    scrollbarVisibleContext.handleSizeChange({\n      content: rootContext.viewport.value?.scrollWidth ?? 0,\n      viewport: rootContext.viewport.value?.offsetWidth ?? 0,\n      scrollbar: {\n        size: scrollbar.value.clientWidth ?? 0,\n        paddingStart: toInt(getComputedStyle(scrollbar.value).paddingLeft),\n        paddingEnd: toInt(getComputedStyle(scrollbar.value).paddingRight),\n      },\n    })\n  }\n  else {\n    scrollbarVisibleContext.handleSizeChange({\n      content: rootContext.viewport.value?.scrollHeight ?? 0,\n      viewport: rootContext.viewport.value?.offsetHeight ?? 0,\n      scrollbar: {\n        size: scrollbar.value?.clientHeight ?? 0,\n        paddingStart: toInt(getComputedStyle(scrollbar.value!).paddingTop),\n        paddingEnd: toInt(getComputedStyle(scrollbar.value!).paddingBottom),\n      },\n    })\n  }\n\n  scrollbarVisibleContext.onThumbPositionChange()\n}\n\nuseResizeObserver(scrollbar, handleSizeChange)\nuseResizeObserver(rootContext.content, handleSizeChange)\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    style=\"position: absolute\"\n    data-scrollbarimpl\n    :as=\"scrollbarContext.as.value\"\n    :as-child=\"scrollbarContext.asChild.value\"\n    @pointerdown=\"handlePointerDown\"\n    @pointermove=\"handlePointerMove\"\n    @pointerup=\"handlePointerUp\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\ntype ScrollbarAreaScrollbarImplEmits = {\n  onDragScroll: [payload: { x: number, y: number }]\n  onWheelScroll: [payload: { x: number, y: number }]\n  onThumbPointerDown: [payload: { x: number, y: number }]\n}\n\nexport interface ScrollAreaScrollbarImplProps {\n  isHorizontal: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useResizeObserver } from '@vueuse/core'\nimport { onMounted, onUnmounted, ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport { injectScrollAreaScrollbarContext } from './ScrollAreaScrollbar.vue'\nimport { injectScrollAreaScrollbarVisibleContext } from './ScrollAreaScrollbarVisible.vue'\nimport { toInt } from './utils'\n\nconst props = defineProps<ScrollAreaScrollbarImplProps>()\nconst emit = defineEmits<ScrollbarAreaScrollbarImplEmits>()\nconst rootContext = injectScrollAreaRootContext()\nconst scrollbarVisibleContext = injectScrollAreaScrollbarVisibleContext()\nconst scrollbarContext = injectScrollAreaScrollbarContext()\n\nconst { forwardRef, currentElement: scrollbar } = useForwardExpose()\nconst prevWebkitUserSelectRef = ref('')\nconst rectRef = ref<DOMRect>()\n\nfunction handleDragScroll(event: MouseEvent) {\n  if (rectRef.value) {\n    const x = event.clientX - rectRef.value?.left\n    const y = event.clientY - rectRef.value?.top\n    emit('onDragScroll', { x, y })\n  }\n}\n\nfunction handlePointerDown(event: PointerEvent) {\n  const mainPointer = 0\n  if (event.button === mainPointer) {\n    const element = event.target as HTMLElement\n    element.setPointerCapture(event.pointerId)\n    rectRef.value = scrollbar.value!.getBoundingClientRect()\n\n    // pointer capture doesn't prevent text selection in Safari\n    // so we remove text selection manually when scrolling\n    prevWebkitUserSelectRef.value = document.body.style.webkitUserSelect\n    document.body.style.webkitUserSelect = 'none'\n    if (rootContext.viewport)\n      rootContext.viewport.value!.style.scrollBehavior = 'auto'\n\n    handleDragScroll(event)\n  }\n}\n\nfunction handlePointerMove(event: PointerEvent) {\n  handleDragScroll(event)\n}\n\nfunction handlePointerUp(event: PointerEvent) {\n  const element = event.target as HTMLElement\n  if (element.hasPointerCapture(event.pointerId))\n    element.releasePointerCapture(event.pointerId)\n\n  document.body.style.webkitUserSelect = prevWebkitUserSelectRef.value\n  if (rootContext.viewport)\n    rootContext.viewport.value!.style.scrollBehavior = ''\n\n  rectRef.value = undefined\n}\n\nfunction handleWheel(event: WheelEvent) {\n  const element = event.target as HTMLElement\n  const isScrollbarWheel = scrollbar.value?.contains(element)\n  const maxScrollPos\n    = scrollbarVisibleContext.sizes.value.content\n      - scrollbarVisibleContext.sizes.value.viewport\n  if (isScrollbarWheel)\n    scrollbarVisibleContext.handleWheelScroll(event, maxScrollPos)\n}\n\nonMounted(() => {\n  document.addEventListener('wheel', handleWheel, { passive: false })\n})\nonUnmounted(() => {\n  document.removeEventListener('wheel', handleWheel)\n})\n\nfunction handleSizeChange() {\n  if (!scrollbar.value)\n    return\n  if (props.isHorizontal) {\n    scrollbarVisibleContext.handleSizeChange({\n      content: rootContext.viewport.value?.scrollWidth ?? 0,\n      viewport: rootContext.viewport.value?.offsetWidth ?? 0,\n      scrollbar: {\n        size: scrollbar.value.clientWidth ?? 0,\n        paddingStart: toInt(getComputedStyle(scrollbar.value).paddingLeft),\n        paddingEnd: toInt(getComputedStyle(scrollbar.value).paddingRight),\n      },\n    })\n  }\n  else {\n    scrollbarVisibleContext.handleSizeChange({\n      content: rootContext.viewport.value?.scrollHeight ?? 0,\n      viewport: rootContext.viewport.value?.offsetHeight ?? 0,\n      scrollbar: {\n        size: scrollbar.value?.clientHeight ?? 0,\n        paddingStart: toInt(getComputedStyle(scrollbar.value!).paddingTop),\n        paddingEnd: toInt(getComputedStyle(scrollbar.value!).paddingBottom),\n      },\n    })\n  }\n\n  scrollbarVisibleContext.onThumbPositionChange()\n}\n\nuseResizeObserver(scrollbar, handleSizeChange)\nuseResizeObserver(rootContext.content, handleSizeChange)\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    style=\"position: absolute\"\n    data-scrollbarimpl\n    :as=\"scrollbarContext.as.value\"\n    :as-child=\"scrollbarContext.asChild.value\"\n    @pointerdown=\"handlePointerDown\"\n    @pointermove=\"handlePointerMove\"\n    @pointerup=\"handlePointerUp\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ScrollAreaThumbProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { watchOnce } from '@vueuse/core'\nimport { computed, onUnmounted, ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport { injectScrollAreaScrollbarVisibleContext } from './ScrollAreaScrollbarVisible.vue'\nimport { addUnlinkedScrollListener } from './utils'\n\nconst props = defineProps<ScrollAreaThumbProps>()\n\nconst rootContext = injectScrollAreaRootContext()\nconst scrollbarContextVisible = injectScrollAreaScrollbarVisibleContext()\n\nfunction handlePointerDown(event: MouseEvent) {\n  const thumb = event.target as HTMLElement\n  const thumbRect = thumb.getBoundingClientRect()\n  const x = event.clientX - thumbRect.left\n  const y = event.clientY - thumbRect.top\n  scrollbarContextVisible.handleThumbDown(event, { x, y })\n}\n\nfunction handlePointerUp(event: MouseEvent) {\n  scrollbarContextVisible.handleThumbUp(event)\n}\n\nconst { forwardRef, currentElement: thumbElement } = useForwardExpose()\nconst removeUnlinkedScrollListenerRef = ref<() => void>()\nconst viewport = computed(() => rootContext.viewport.value)\n\nfunction handleScroll() {\n  if (!removeUnlinkedScrollListenerRef.value) {\n    const listener = addUnlinkedScrollListener(\n      viewport.value!,\n      scrollbarContextVisible.onThumbPositionChange,\n    )\n    removeUnlinkedScrollListenerRef.value = listener\n    scrollbarContextVisible.onThumbPositionChange()\n  }\n}\n\nconst sizes = computed(() => scrollbarContextVisible.sizes.value)\n\nwatchOnce(sizes, () => {\n  scrollbarContextVisible.onThumbChange(thumbElement.value!)\n  if (viewport.value) {\n    /**\n     * We only bind to native scroll event so we know when scroll starts and ends.\n     * When scroll starts we start a requestAnimationFrame loop that checks for\n     * changes to scroll position. That rAF loop triggers our thumb position change\n     * when relevant to avoid scroll-linked effects. We cancel the loop when scroll ends.\n     * https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Scroll-linked_effects\n     */\n    scrollbarContextVisible.onThumbPositionChange()\n    viewport.value.addEventListener('scroll', handleScroll)\n  }\n})\n\nonUnmounted(() => {\n  viewport.value!.removeEventListener('scroll', handleScroll)\n  rootContext.viewport.value?.removeEventListener('scroll', handleScroll)\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :data-state=\"scrollbarContextVisible.hasThumb ? 'visible' : 'hidden'\"\n    :style=\"{\n      width: 'var(--reka-scroll-area-thumb-width)',\n      height: 'var(--reka-scroll-area-thumb-height)',\n    }\"\n    :as-child=\"props.asChild\"\n    :as=\"as\"\n    @pointerdown=\"handlePointerDown\"\n    @pointerup=\"handlePointerUp\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ScrollAreaThumbProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { watchOnce } from '@vueuse/core'\nimport { computed, onUnmounted, ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\nimport { injectScrollAreaScrollbarVisibleContext } from './ScrollAreaScrollbarVisible.vue'\nimport { addUnlinkedScrollListener } from './utils'\n\nconst props = defineProps<ScrollAreaThumbProps>()\n\nconst rootContext = injectScrollAreaRootContext()\nconst scrollbarContextVisible = injectScrollAreaScrollbarVisibleContext()\n\nfunction handlePointerDown(event: MouseEvent) {\n  const thumb = event.target as HTMLElement\n  const thumbRect = thumb.getBoundingClientRect()\n  const x = event.clientX - thumbRect.left\n  const y = event.clientY - thumbRect.top\n  scrollbarContextVisible.handleThumbDown(event, { x, y })\n}\n\nfunction handlePointerUp(event: MouseEvent) {\n  scrollbarContextVisible.handleThumbUp(event)\n}\n\nconst { forwardRef, currentElement: thumbElement } = useForwardExpose()\nconst removeUnlinkedScrollListenerRef = ref<() => void>()\nconst viewport = computed(() => rootContext.viewport.value)\n\nfunction handleScroll() {\n  if (!removeUnlinkedScrollListenerRef.value) {\n    const listener = addUnlinkedScrollListener(\n      viewport.value!,\n      scrollbarContextVisible.onThumbPositionChange,\n    )\n    removeUnlinkedScrollListenerRef.value = listener\n    scrollbarContextVisible.onThumbPositionChange()\n  }\n}\n\nconst sizes = computed(() => scrollbarContextVisible.sizes.value)\n\nwatchOnce(sizes, () => {\n  scrollbarContextVisible.onThumbChange(thumbElement.value!)\n  if (viewport.value) {\n    /**\n     * We only bind to native scroll event so we know when scroll starts and ends.\n     * When scroll starts we start a requestAnimationFrame loop that checks for\n     * changes to scroll position. That rAF loop triggers our thumb position change\n     * when relevant to avoid scroll-linked effects. We cancel the loop when scroll ends.\n     * https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Scroll-linked_effects\n     */\n    scrollbarContextVisible.onThumbPositionChange()\n    viewport.value.addEventListener('scroll', handleScroll)\n  }\n})\n\nonUnmounted(() => {\n  viewport.value!.removeEventListener('scroll', handleScroll)\n  rootContext.viewport.value?.removeEventListener('scroll', handleScroll)\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :data-state=\"scrollbarContextVisible.hasThumb ? 'visible' : 'hidden'\"\n    :style=\"{\n      width: 'var(--reka-scroll-area-thumb-width)',\n      height: 'var(--reka-scroll-area-thumb-height)',\n    }\"\n    :as-child=\"props.asChild\"\n    :as=\"as\"\n    @pointerdown=\"handlePointerDown\"\n    @pointerup=\"handlePointerUp\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { useNonce } from '@/shared/useNonce'\n\nexport interface ScrollAreaViewportProps extends PrimitiveProps {\n  /**\n   * Will add `nonce` attribute to the style tag which can be used by Content Security Policy. <br> If omitted, inherits globally from `ConfigProvider`.\n   */\n  nonce?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted, ref, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<ScrollAreaViewportProps>()\n\nconst { nonce: propNonce } = toRefs(props)\nconst nonce = useNonce(propNonce)\n\nconst rootContext = injectScrollAreaRootContext()\n\nconst viewportElement = ref<HTMLElement>()\n\nonMounted(() => {\n  rootContext.onViewportChange(viewportElement.value!)\n  rootContext.onContentChange(contentElement.value!)\n})\n\ndefineExpose({\n  viewportElement,\n})\nconst { forwardRef, currentElement: contentElement } = useForwardExpose()\n</script>\n\n<template>\n  <div\n    ref=\"viewportElement\"\n    data-reka-scroll-area-viewport=\"\"\n    :style=\"{\n      /**\n       * We don't support `visible` because the intention is to have at least one scrollbar\n       * if this component is used and `visible` will behave like `auto` in that case\n       * https://developer.mozilla.org/en-US/docs/Web/CSS/overflowed#description\n       *\n       * We don't handle `auto` because the intention is for the native implementation\n       * to be hidden if using this component. We just want to ensure the node is scrollable\n       * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent\n       * the browser from having to work out whether to render native scrollbars or not,\n       * we tell it to with the intention of hiding them in CSS.\n       */\n      overflowX: rootContext.scrollbarXEnabled.value ? 'scroll' : 'hidden',\n      overflowY: rootContext.scrollbarYEnabled.value ? 'scroll' : 'hidden',\n    }\"\n    v-bind=\"$attrs\"\n    :tabindex=\"0\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :style=\"{\n        /**\n         * When horizontal scrollbar is visible: this element should be at least\n         * as wide as its children for size calculations to work correctly.\n         *\n         * When horizontal scrollbar is NOT visible: this element's width should\n         * be constrained by the parent container to enable `text-overflow: ellipsis`\n         */\n        minWidth: rootContext.scrollbarXEnabled.value ? 'fit-content' : undefined,\n      }\"\n      :as-child=\"props.asChild\"\n      :as=\"as\"\n    >\n      <slot />\n    </Primitive>\n  </div>\n  <Primitive\n    as=\"style\"\n    :nonce=\"nonce\"\n  >\n    /* Hide scrollbars cross-browser and enable momentum scroll for touch\n    devices */\n    [data-reka-scroll-area-viewport] {\n    scrollbar-width:none;\n    -ms-overflow-style:none;\n    -webkit-overflow-scrolling:touch;\n    }\n\n    [data-reka-scroll-area-viewport]::-webkit-scrollbar {\n    display:none;\n    }\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { useNonce } from '@/shared/useNonce'\n\nexport interface ScrollAreaViewportProps extends PrimitiveProps {\n  /**\n   * Will add `nonce` attribute to the style tag which can be used by Content Security Policy. <br> If omitted, inherits globally from `ConfigProvider`.\n   */\n  nonce?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted, ref, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectScrollAreaRootContext } from './ScrollAreaRoot.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<ScrollAreaViewportProps>()\n\nconst { nonce: propNonce } = toRefs(props)\nconst nonce = useNonce(propNonce)\n\nconst rootContext = injectScrollAreaRootContext()\n\nconst viewportElement = ref<HTMLElement>()\n\nonMounted(() => {\n  rootContext.onViewportChange(viewportElement.value!)\n  rootContext.onContentChange(contentElement.value!)\n})\n\ndefineExpose({\n  viewportElement,\n})\nconst { forwardRef, currentElement: contentElement } = useForwardExpose()\n</script>\n\n<template>\n  <div\n    ref=\"viewportElement\"\n    data-reka-scroll-area-viewport=\"\"\n    :style=\"{\n      /**\n       * We don't support `visible` because the intention is to have at least one scrollbar\n       * if this component is used and `visible` will behave like `auto` in that case\n       * https://developer.mozilla.org/en-US/docs/Web/CSS/overflowed#description\n       *\n       * We don't handle `auto` because the intention is for the native implementation\n       * to be hidden if using this component. We just want to ensure the node is scrollable\n       * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent\n       * the browser from having to work out whether to render native scrollbars or not,\n       * we tell it to with the intention of hiding them in CSS.\n       */\n      overflowX: rootContext.scrollbarXEnabled.value ? 'scroll' : 'hidden',\n      overflowY: rootContext.scrollbarYEnabled.value ? 'scroll' : 'hidden',\n    }\"\n    v-bind=\"$attrs\"\n    :tabindex=\"0\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :style=\"{\n        /**\n         * When horizontal scrollbar is visible: this element should be at least\n         * as wide as its children for size calculations to work correctly.\n         *\n         * When horizontal scrollbar is NOT visible: this element's width should\n         * be constrained by the parent container to enable `text-overflow: ellipsis`\n         */\n        minWidth: rootContext.scrollbarXEnabled.value ? 'fit-content' : undefined,\n      }\"\n      :as-child=\"props.asChild\"\n      :as=\"as\"\n    >\n      <slot />\n    </Primitive>\n  </div>\n  <Primitive\n    as=\"style\"\n    :nonce=\"nonce\"\n  >\n    /* Hide scrollbars cross-browser and enable momentum scroll for touch\n    devices */\n    [data-reka-scroll-area-viewport] {\n    scrollbar-width:none;\n    -ms-overflow-style:none;\n    -webkit-overflow-scrolling:touch;\n    }\n\n    [data-reka-scroll-area-viewport]::-webkit-scrollbar {\n    display:none;\n    }\n  </Primitive>\n</template>\n","import type { AcceptableValue } from '@/shared/types'\nimport { isEqual } from 'ohash'\n\nexport const OPEN_KEYS = [' ', 'Enter', 'ArrowUp', 'ArrowDown']\nexport const SELECTION_KEYS = [' ', 'Enter']\nexport const CONTENT_MARGIN = 10\n\nexport function valueComparator<T>(value: T | T[] | undefined, currentValue: T, comparator?: string | ((a: T, b: T) => boolean)) {\n  if (value === undefined)\n    return false\n  else if (Array.isArray(value))\n    return value.some(val => compare(val, currentValue, comparator))\n  else\n    return compare(value, currentValue, comparator)\n}\n\nexport function compare<T>(value?: T, currentValue?: T, comparator?: string | ((a: T, b: T) => boolean)) {\n  if (value === undefined || currentValue === undefined)\n    return false\n\n  if (typeof value === 'string')\n    return value === currentValue\n\n  if (typeof comparator === 'function')\n    return comparator(value, currentValue)\n\n  if (typeof comparator === 'string')\n    return value?.[comparator as keyof T] === currentValue?.[comparator as keyof T]\n\n  return isEqual(value, currentValue)\n}\n\nexport function shouldShowPlaceholder(value?: AcceptableValue | AcceptableValue[]): boolean {\n  return value === undefined || value === null || value === '' || (Array.isArray(value) && value.length === 0)\n}\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { AcceptableValue, Direction, FormFieldProps } from '@/shared/types'\nimport { useCollection } from '@/Collection'\nimport { createContext, isNullish, useDirection, useFormControl } from '@/shared'\nimport { compare, valueComparator } from './utils'\n\nexport interface SelectRootProps<T = AcceptableValue> extends FormFieldProps {\n  /** The controlled open state of the Select. Can be bind as `v-model:open`. */\n  open?: boolean\n  /** The open state of the select when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n  /** The value of the select when initially rendered. Use when you do not need to control the state of the Select */\n  defaultValue?: T | Array<T>\n  /** The controlled value of the Select. Can be bind as `v-model`. */\n  modelValue?: T | Array<T>\n  /** Use this to compare objects by a particular field, or pass your own comparison function for complete control over how objects are compared. */\n  by?: string | ((a: T, b: T) => boolean)\n  /** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** Whether multiple options can be selected or not. */\n  multiple?: boolean\n  /** Native html input `autocomplete` attribute. */\n  autocomplete?: string\n  /** When `true`, prevents the user from interacting with Select */\n  disabled?: boolean\n}\n\nexport type SelectRootEmits<T = AcceptableValue> = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [value: T]\n  /** Event handler called when the open state of the context menu changes. */\n  'update:open': [value: boolean]\n}\n\nexport interface SelectRootContext<T> {\n  triggerElement: Ref<HTMLElement | undefined>\n  onTriggerChange: (node: HTMLElement | undefined) => void\n  valueElement: Ref<HTMLElement | undefined>\n  onValueElementChange: (node: HTMLElement) => void\n  contentId: string\n  modelValue: Ref<T | Array<T> | undefined>\n  onValueChange: (value: T) => void\n  open: Ref<boolean>\n  multiple: Ref<boolean>\n  required?: Ref<boolean>\n  by?: string | ((a: T, b: T) => boolean)\n  onOpenChange: (open: boolean) => void\n  dir: Ref<Direction>\n  triggerPointerDownPosRef: Ref<{ x: number, y: number } | null>\n  isEmptyModelValue: Ref<boolean>\n  disabled?: Ref<boolean>\n\n  optionsSet: Ref<Set<SelectOption>>\n  onOptionAdd: (option: SelectOption) => void\n  onOptionRemove: (option: SelectOption) => void\n}\n\nexport const [injectSelectRootContext, provideSelectRootContext]\n  = createContext<SelectRootContext<AcceptableValue>>('SelectRoot')\n\ninterface SelectOption { value: any, disabled?: boolean, textContent: string }\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableValue = AcceptableValue\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref, toRefs } from 'vue'\nimport { PopperRoot } from '@/Popper'\nimport BubbleSelect from './BubbleSelect.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<SelectRootProps<T>>(), {\n  modelValue: undefined,\n  open: undefined,\n})\nconst emits = defineEmits<SelectRootEmits<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nconst { required, disabled, multiple, dir: propDir } = toRefs(props)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  // @ts-expect-error Missing infer for AcceptableValue\n  defaultValue: props.defaultValue ?? (multiple.value ? [] : undefined),\n  passive: (props.modelValue === undefined) as false,\n  deep: true,\n}) as Ref<T | T[] | undefined>\n\nconst open = useVModel(props, 'open', emits, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst triggerElement = ref<HTMLElement>()\nconst valueElement = ref<HTMLElement>()\nconst triggerPointerDownPosRef = ref({\n  x: 0,\n  y: 0,\n})\n\nconst isEmptyModelValue = computed(() => {\n  if (multiple.value && Array.isArray(modelValue.value))\n    return modelValue.value?.length === 0\n  else\n    return isNullish(modelValue.value)\n})\n\nuseCollection({ isProvider: true })\nconst dir = useDirection(propDir)\n\nconst isFormControl = useFormControl(triggerElement)\nconst optionsSet = ref<Set<SelectOption>>(new Set())\n\n// The native `select` only associates the correct default value if the corresponding\n// `option` is rendered as a child **at the same time** as itself.\n// Because it might take a few renders for our items to gather the information to build\n// the native `option`(s), we generate a key on the `select` to make sure Vue re-builds it\n// each time the options change.\nconst nativeSelectKey = computed(() => {\n  return Array.from(optionsSet.value)\n    .map(option => option.value)\n    .join(';')\n})\n\nfunction handleValueChange(value: T) {\n  if (multiple.value) {\n    const array = Array.isArray(modelValue.value) ? [...modelValue.value] : []\n    const index = array.findIndex(i => compare(i, value, props.by))\n    index === -1 ? array.push(value) : array.splice(index, 1)\n    modelValue.value = [...array]\n  }\n  else {\n    modelValue.value = value\n  }\n}\n\nfunction getOption(value: SelectOption['value']) {\n  return Array.from(optionsSet.value)\n    .find(option => valueComparator(value, option.value, props.by))\n}\n\nprovideSelectRootContext({\n  triggerElement,\n  onTriggerChange: (node) => {\n    triggerElement.value = node\n  },\n  valueElement,\n  onValueElementChange: (node) => {\n    valueElement.value = node\n  },\n  contentId: '',\n  modelValue,\n  // @ts-expect-error Missing infer for AcceptableValue\n  onValueChange: handleValueChange,\n  // @ts-expect-error Missing infer for AcceptableValue\n  by: props.by,\n  open,\n  multiple,\n  required,\n  onOpenChange: (value) => {\n    open.value = value\n  },\n  dir,\n  triggerPointerDownPosRef,\n  disabled,\n  isEmptyModelValue,\n\n  optionsSet,\n  onOptionAdd: (option) => {\n    const existingOption = getOption(option.value)\n    if (existingOption) {\n      optionsSet.value.delete(existingOption)\n    }\n\n    optionsSet.value.add(option)\n  },\n  onOptionRemove: (option) => {\n    const existingOption = getOption(option.value)\n    if (existingOption) {\n      optionsSet.value.delete(existingOption)\n    }\n  },\n})\n</script>\n\n<template>\n  <PopperRoot>\n    <slot\n      :model-value=\"modelValue\"\n      :open=\"open\"\n    />\n\n    <BubbleSelect\n      v-if=\"isFormControl && name\"\n      :key=\"nativeSelectKey\"\n      aria-hidden=\"true\"\n      tabindex=\"-1\"\n      :multiple=\"multiple\"\n      :required=\"required\"\n      :name=\"name\"\n      :autocomplete=\"autocomplete\"\n      :disabled=\"disabled\"\n      :value=\"modelValue\"\n    >\n      <option\n        v-if=\"isNullish(modelValue)\"\n        value=\"\"\n      />\n      <option\n        v-for=\"option in Array.from(optionsSet)\"\n        :key=\"option.value ?? ''\"\n        v-bind=\"option\"\n      />\n    </BubbleSelect>\n  </PopperRoot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { AcceptableValue, Direction, FormFieldProps } from '@/shared/types'\nimport { useCollection } from '@/Collection'\nimport { createContext, isNullish, useDirection, useFormControl } from '@/shared'\nimport { compare, valueComparator } from './utils'\n\nexport interface SelectRootProps<T = AcceptableValue> extends FormFieldProps {\n  /** The controlled open state of the Select. Can be bind as `v-model:open`. */\n  open?: boolean\n  /** The open state of the select when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n  /** The value of the select when initially rendered. Use when you do not need to control the state of the Select */\n  defaultValue?: T | Array<T>\n  /** The controlled value of the Select. Can be bind as `v-model`. */\n  modelValue?: T | Array<T>\n  /** Use this to compare objects by a particular field, or pass your own comparison function for complete control over how objects are compared. */\n  by?: string | ((a: T, b: T) => boolean)\n  /** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** Whether multiple options can be selected or not. */\n  multiple?: boolean\n  /** Native html input `autocomplete` attribute. */\n  autocomplete?: string\n  /** When `true`, prevents the user from interacting with Select */\n  disabled?: boolean\n}\n\nexport type SelectRootEmits<T = AcceptableValue> = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [value: T]\n  /** Event handler called when the open state of the context menu changes. */\n  'update:open': [value: boolean]\n}\n\nexport interface SelectRootContext<T> {\n  triggerElement: Ref<HTMLElement | undefined>\n  onTriggerChange: (node: HTMLElement | undefined) => void\n  valueElement: Ref<HTMLElement | undefined>\n  onValueElementChange: (node: HTMLElement) => void\n  contentId: string\n  modelValue: Ref<T | Array<T> | undefined>\n  onValueChange: (value: T) => void\n  open: Ref<boolean>\n  multiple: Ref<boolean>\n  required?: Ref<boolean>\n  by?: string | ((a: T, b: T) => boolean)\n  onOpenChange: (open: boolean) => void\n  dir: Ref<Direction>\n  triggerPointerDownPosRef: Ref<{ x: number, y: number } | null>\n  isEmptyModelValue: Ref<boolean>\n  disabled?: Ref<boolean>\n\n  optionsSet: Ref<Set<SelectOption>>\n  onOptionAdd: (option: SelectOption) => void\n  onOptionRemove: (option: SelectOption) => void\n}\n\nexport const [injectSelectRootContext, provideSelectRootContext]\n  = createContext<SelectRootContext<AcceptableValue>>('SelectRoot')\n\ninterface SelectOption { value: any, disabled?: boolean, textContent: string }\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableValue = AcceptableValue\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref, toRefs } from 'vue'\nimport { PopperRoot } from '@/Popper'\nimport BubbleSelect from './BubbleSelect.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<SelectRootProps<T>>(), {\n  modelValue: undefined,\n  open: undefined,\n})\nconst emits = defineEmits<SelectRootEmits<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nconst { required, disabled, multiple, dir: propDir } = toRefs(props)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  // @ts-expect-error Missing infer for AcceptableValue\n  defaultValue: props.defaultValue ?? (multiple.value ? [] : undefined),\n  passive: (props.modelValue === undefined) as false,\n  deep: true,\n}) as Ref<T | T[] | undefined>\n\nconst open = useVModel(props, 'open', emits, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nconst triggerElement = ref<HTMLElement>()\nconst valueElement = ref<HTMLElement>()\nconst triggerPointerDownPosRef = ref({\n  x: 0,\n  y: 0,\n})\n\nconst isEmptyModelValue = computed(() => {\n  if (multiple.value && Array.isArray(modelValue.value))\n    return modelValue.value?.length === 0\n  else\n    return isNullish(modelValue.value)\n})\n\nuseCollection({ isProvider: true })\nconst dir = useDirection(propDir)\n\nconst isFormControl = useFormControl(triggerElement)\nconst optionsSet = ref<Set<SelectOption>>(new Set())\n\n// The native `select` only associates the correct default value if the corresponding\n// `option` is rendered as a child **at the same time** as itself.\n// Because it might take a few renders for our items to gather the information to build\n// the native `option`(s), we generate a key on the `select` to make sure Vue re-builds it\n// each time the options change.\nconst nativeSelectKey = computed(() => {\n  return Array.from(optionsSet.value)\n    .map(option => option.value)\n    .join(';')\n})\n\nfunction handleValueChange(value: T) {\n  if (multiple.value) {\n    const array = Array.isArray(modelValue.value) ? [...modelValue.value] : []\n    const index = array.findIndex(i => compare(i, value, props.by))\n    index === -1 ? array.push(value) : array.splice(index, 1)\n    modelValue.value = [...array]\n  }\n  else {\n    modelValue.value = value\n  }\n}\n\nfunction getOption(value: SelectOption['value']) {\n  return Array.from(optionsSet.value)\n    .find(option => valueComparator(value, option.value, props.by))\n}\n\nprovideSelectRootContext({\n  triggerElement,\n  onTriggerChange: (node) => {\n    triggerElement.value = node\n  },\n  valueElement,\n  onValueElementChange: (node) => {\n    valueElement.value = node\n  },\n  contentId: '',\n  modelValue,\n  // @ts-expect-error Missing infer for AcceptableValue\n  onValueChange: handleValueChange,\n  // @ts-expect-error Missing infer for AcceptableValue\n  by: props.by,\n  open,\n  multiple,\n  required,\n  onOpenChange: (value) => {\n    open.value = value\n  },\n  dir,\n  triggerPointerDownPosRef,\n  disabled,\n  isEmptyModelValue,\n\n  optionsSet,\n  onOptionAdd: (option) => {\n    const existingOption = getOption(option.value)\n    if (existingOption) {\n      optionsSet.value.delete(existingOption)\n    }\n\n    optionsSet.value.add(option)\n  },\n  onOptionRemove: (option) => {\n    const existingOption = getOption(option.value)\n    if (existingOption) {\n      optionsSet.value.delete(existingOption)\n    }\n  },\n})\n</script>\n\n<template>\n  <PopperRoot>\n    <slot\n      :model-value=\"modelValue\"\n      :open=\"open\"\n    />\n\n    <BubbleSelect\n      v-if=\"isFormControl && name\"\n      :key=\"nativeSelectKey\"\n      aria-hidden=\"true\"\n      tabindex=\"-1\"\n      :multiple=\"multiple\"\n      :required=\"required\"\n      :name=\"name\"\n      :autocomplete=\"autocomplete\"\n      :disabled=\"disabled\"\n      :value=\"modelValue\"\n    >\n      <option\n        v-if=\"isNullish(modelValue)\"\n        value=\"\"\n      />\n      <option\n        v-for=\"option in Array.from(optionsSet)\"\n        :key=\"option.value ?? ''\"\n        v-bind=\"option\"\n      />\n    </BubbleSelect>\n  </PopperRoot>\n</template>\n","<script setup lang=\"ts\">\nimport { ref, watch } from 'vue'\nimport { VisuallyHidden } from '@/VisuallyHidden'\nimport { injectSelectRootContext } from './SelectRoot.vue'\n\ninterface BubbleSelectProps {\n  autocomplete?: string\n  autofocus?: boolean\n  disabled?: boolean\n  form?: string\n  multiple?: boolean\n  name?: string\n  required?: boolean\n  size?: number\n  value?: any\n}\n\nconst props = defineProps<BubbleSelectProps>()\nconst selectElement = ref<HTMLElement>()\nconst rootContext = injectSelectRootContext()\n\n// This would bubble \"change\" event to form, with the target as Select element.\nwatch(() => props.value, (cur, prev) => {\n  const selectProto = window.HTMLSelectElement.prototype\n  const descriptor = Object.getOwnPropertyDescriptor(\n    selectProto,\n    'value',\n  ) as PropertyDescriptor\n  const setValue = descriptor.set\n  if (cur !== prev && setValue && selectElement.value) {\n    const event = new Event('change', { bubbles: true })\n    setValue.call(selectElement.value, cur)\n    selectElement.value.dispatchEvent(event)\n  }\n})\n\n/**\n * Form autofill will trigger an `input` event on the `select` element.\n * We listen to that event and update our internal state to support it.\n */\nfunction handleInput(event: Event) {\n  rootContext.onValueChange((event.target as HTMLSelectElement).value)\n}\n\n/**\n * We purposefully use a `select` here to support form autofill as much\n * as possible.\n *\n * We purposefully do not add the `value` attribute here to allow the value\n * to be set programmatically and bubble to any parent form `onChange` event.\n *\n * We use `VisuallyHidden` rather than `display: \"none\"` because Safari autofill\n * won't work otherwise.\n */\n</script>\n\n<template>\n  <VisuallyHidden as-child>\n    <select\n      ref=\"selectElement\"\n      v-bind=\"props\"\n      @input=\"handleInput\"\n    >\n      <slot />\n    </select>\n  </VisuallyHidden>\n</template>\n","<script setup lang=\"ts\">\nimport { ref, watch } from 'vue'\nimport { VisuallyHidden } from '@/VisuallyHidden'\nimport { injectSelectRootContext } from './SelectRoot.vue'\n\ninterface BubbleSelectProps {\n  autocomplete?: string\n  autofocus?: boolean\n  disabled?: boolean\n  form?: string\n  multiple?: boolean\n  name?: string\n  required?: boolean\n  size?: number\n  value?: any\n}\n\nconst props = defineProps<BubbleSelectProps>()\nconst selectElement = ref<HTMLElement>()\nconst rootContext = injectSelectRootContext()\n\n// This would bubble \"change\" event to form, with the target as Select element.\nwatch(() => props.value, (cur, prev) => {\n  const selectProto = window.HTMLSelectElement.prototype\n  const descriptor = Object.getOwnPropertyDescriptor(\n    selectProto,\n    'value',\n  ) as PropertyDescriptor\n  const setValue = descriptor.set\n  if (cur !== prev && setValue && selectElement.value) {\n    const event = new Event('change', { bubbles: true })\n    setValue.call(selectElement.value, cur)\n    selectElement.value.dispatchEvent(event)\n  }\n})\n\n/**\n * Form autofill will trigger an `input` event on the `select` element.\n * We listen to that event and update our internal state to support it.\n */\nfunction handleInput(event: Event) {\n  rootContext.onValueChange((event.target as HTMLSelectElement).value)\n}\n\n/**\n * We purposefully use a `select` here to support form autofill as much\n * as possible.\n *\n * We purposefully do not add the `value` attribute here to allow the value\n * to be set programmatically and bubble to any parent form `onChange` event.\n *\n * We use `VisuallyHidden` rather than `display: \"none\"` because Safari autofill\n * won't work otherwise.\n */\n</script>\n\n<template>\n  <VisuallyHidden as-child>\n    <select\n      ref=\"selectElement\"\n      v-bind=\"props\"\n      @input=\"handleInput\"\n    >\n      <slot />\n    </select>\n  </VisuallyHidden>\n</template>\n","<script lang=\"ts\">\nimport type { PopperContentProps } from '@/Popper'\n\nexport interface SelectPopperPositionProps extends PopperContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { PopperContent } from '@/Popper'\nimport { useForwardProps } from '..'\nimport { CONTENT_MARGIN } from './utils'\n\nconst props = withDefaults(defineProps<SelectPopperPositionProps>(), {\n  align: 'start',\n  collisionPadding: CONTENT_MARGIN,\n})\nconst forwarded = useForwardProps(props)\n</script>\n\n<template>\n  <PopperContent\n    v-bind=\"forwarded\"\n    :style=\"{\n      // Ensure border-box for floating-ui calculations\n      'boxSizing': 'border-box',\n      '--reka-select-content-transform-origin':\n        'var(--reka-popper-transform-origin)',\n      '--reka-select-content-available-width':\n        'var(--reka-popper-available-width)',\n      '--reka-select-content-available-height':\n        'var(--reka-popper-available-height)',\n      '--reka-select-trigger-width': 'var(--reka-popper-anchor-width)',\n      '--reka-select-trigger-height': 'var(--reka-popper-anchor-height)',\n    }\"\n  >\n    <slot />\n  </PopperContent>\n</template>\n","<script lang=\"ts\">\nimport type { PopperContentProps } from '@/Popper'\n\nexport interface SelectPopperPositionProps extends PopperContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { PopperContent } from '@/Popper'\nimport { useForwardProps } from '..'\nimport { CONTENT_MARGIN } from './utils'\n\nconst props = withDefaults(defineProps<SelectPopperPositionProps>(), {\n  align: 'start',\n  collisionPadding: CONTENT_MARGIN,\n})\nconst forwarded = useForwardProps(props)\n</script>\n\n<template>\n  <PopperContent\n    v-bind=\"forwarded\"\n    :style=\"{\n      // Ensure border-box for floating-ui calculations\n      'boxSizing': 'border-box',\n      '--reka-select-content-transform-origin':\n        'var(--reka-popper-transform-origin)',\n      '--reka-select-content-available-width':\n        'var(--reka-popper-available-width)',\n      '--reka-select-content-available-height':\n        'var(--reka-popper-available-height)',\n      '--reka-select-trigger-width': 'var(--reka-popper-anchor-width)',\n      '--reka-select-trigger-height': 'var(--reka-popper-anchor-height)',\n    }\"\n  >\n    <slot />\n  </PopperContent>\n</template>\n","<script lang=\"ts\">\nimport type {\n  ComponentPublicInstance,\n  Ref,\n} from 'vue'\nimport type { DismissableLayerProps, PointerDownOutsideEvent } from '@/DismissableLayer'\nimport type { PopperContentProps } from '@/Popper'\nimport type { AcceptableValue } from '@/shared/types'\nimport { useCollection } from '@/Collection'\nimport {\n  createContext,\n  useFocusGuards,\n  useForwardProps,\n  useHideOthers,\n  useTypeahead,\n} from '@/shared'\nimport { useBodyScrollLock } from '@/shared/useBodyScrollLock'\nimport { valueComparator } from './utils'\n\nexport interface SelectContentContext {\n  content?: Ref<HTMLElement | undefined>\n  viewport?: Ref<HTMLElement | undefined>\n  onViewportChange: (node: HTMLElement | undefined) => void\n  itemRefCallback: (\n    node: HTMLElement | undefined,\n    value: AcceptableValue,\n    disabled: boolean,\n  ) => void\n  selectedItem?: Ref<HTMLElement | undefined>\n  onItemLeave?: () => void\n  itemTextRefCallback: (\n    node: HTMLElement | undefined,\n    value: AcceptableValue,\n    disabled: boolean,\n  ) => void\n  focusSelectedItem?: () => void\n  selectedItemText?: Ref<HTMLElement | undefined>\n  position?: 'item-aligned' | 'popper'\n  isPositioned?: Ref<boolean>\n  searchRef?: Ref<string>\n}\n\nexport const SelectContentDefaultContextValue: SelectContentContext = {\n  onViewportChange: () => {},\n  itemTextRefCallback: () => {},\n  itemRefCallback: () => {},\n}\n\nexport type SelectContentImplEmits = {\n  closeAutoFocus: [event: Event]\n  /**\n   * Event handler called when the escape key is down.\n   * Can be prevented.\n   */\n  escapeKeyDown: [event: KeyboardEvent]\n  /**\n   * Event handler called when a `pointerdown` event happens outside of the `DismissableLayer`.\n   * Can be prevented.\n   */\n  pointerDownOutside: [event: PointerDownOutsideEvent]\n}\n\nexport interface SelectContentImplProps extends PopperContentProps, DismissableLayerProps {\n  /**\n   *  The positioning mode to use\n   *\n   *  `item-aligned (default)` - behaves similarly to a native MacOS menu by positioning content relative to the active item. <br>\n   *  `popper` - positions content in the same way as our other primitives, for example `Popover` or `DropdownMenu`.\n   */\n  position?: 'item-aligned' | 'popper'\n  /**\n   * The document.body will be lock, and scrolling will be disabled.\n   *\n   * @defaultValue true\n   */\n  bodyLock?: boolean\n}\n\nexport const [injectSelectContentContext, provideSelectContentContext]\n  = createContext<SelectContentContext>('SelectContent')\n</script>\n\n<script setup lang=\"ts\">\nimport { unrefElement } from '@vueuse/core'\nimport {\n  computed,\n  ref,\n  watch,\n  watchEffect,\n} from 'vue'\nimport { DismissableLayer } from '@/DismissableLayer'\nimport { FocusScope } from '@/FocusScope'\nimport { focusFirst } from '@/Menu/utils'\nimport SelectItemAlignedPosition from './SelectItemAlignedPosition.vue'\nimport SelectPopperPosition from './SelectPopperPosition.vue'\nimport { injectSelectRootContext } from './SelectRoot.vue'\n\nconst props = withDefaults(defineProps<SelectContentImplProps>(), {\n  align: 'start',\n  position: 'item-aligned',\n  bodyLock: true,\n  disableOutsidePointerEvents: true,\n})\nconst emits = defineEmits<SelectContentImplEmits>()\n\nconst rootContext = injectSelectRootContext()\n\nuseFocusGuards()\nuseBodyScrollLock(props.bodyLock)\nconst { CollectionSlot, getItems } = useCollection()\n\nconst content = ref<HTMLElement>()\nuseHideOthers(content)\n\nconst { search, handleTypeaheadSearch } = useTypeahead()\n\nconst viewport = ref<HTMLElement>()\nconst selectedItem = ref<HTMLElement>()\nconst selectedItemText = ref<HTMLElement>()\nconst isPositioned = ref(false)\nconst firstValidItemFoundRef = ref(false)\nconst firstSelectedItemInArrayFoundRef = ref(false)\n\nfunction focusSelectedItem() {\n  if (selectedItem.value && content.value)\n    focusFirst([selectedItem.value, content.value])\n}\n\nwatch(isPositioned, () => {\n  focusSelectedItem()\n})\n\n// prevent selecting items on `pointerup` in some cases after opening from `pointerdown`\n// and close on `pointerup` outside.\nconst { onOpenChange, triggerPointerDownPosRef } = rootContext\nwatchEffect((cleanupFn) => {\n  if (!content.value)\n    return\n  let pointerMoveDelta = { x: 0, y: 0 }\n\n  const handlePointerMove = (event: PointerEvent) => {\n    pointerMoveDelta = {\n      x: Math.abs(\n        Math.round(event.pageX) - (triggerPointerDownPosRef.value?.x ?? 0),\n      ),\n      y: Math.abs(\n        Math.round(event.pageY) - (triggerPointerDownPosRef.value?.y ?? 0),\n      ),\n    }\n  }\n  const handlePointerUp = (event: PointerEvent) => {\n    // Prevent options from being untappable on touch devices\n    // https://github.com/unovue/reka-ui/issues/804\n    if (event.pointerType === 'touch')\n      return\n\n    // If the pointer hasn't moved by a certain threshold then we prevent selecting item on `pointerup`.\n    if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) {\n      event.preventDefault()\n    }\n    else {\n      // otherwise, if the event was outside the content, close.\n      if (!content.value?.contains(event.target as HTMLElement))\n        onOpenChange(false)\n    }\n    document.removeEventListener('pointermove', handlePointerMove)\n    triggerPointerDownPosRef.value = null\n  }\n\n  if (triggerPointerDownPosRef.value !== null) {\n    document.addEventListener('pointermove', handlePointerMove)\n    document.addEventListener('pointerup', handlePointerUp, {\n      capture: true,\n      once: true,\n    })\n  }\n\n  cleanupFn(() => {\n    document.removeEventListener('pointermove', handlePointerMove)\n    document.removeEventListener('pointerup', handlePointerUp, {\n      capture: true,\n    })\n  })\n})\n\nfunction handleKeyDown(event: KeyboardEvent) {\n  const isModifierKey = event.ctrlKey || event.altKey || event.metaKey\n\n  // select should not be navigated using tab key so we prevent it\n  if (event.key === 'Tab')\n    event.preventDefault()\n\n  if (!isModifierKey && event.key.length === 1)\n    handleTypeaheadSearch(event.key, getItems())\n\n  if (['ArrowUp', 'ArrowDown', 'Home', 'End'].includes(event.key)) {\n    const collectionItems = getItems().map(i => i.ref)\n    let candidateNodes = [...collectionItems]\n\n    if (['ArrowUp', 'End'].includes(event.key))\n      candidateNodes = candidateNodes.slice().reverse()\n\n    if (['ArrowUp', 'ArrowDown'].includes(event.key)) {\n      const currentElement = event.target as HTMLElement\n      const currentIndex = candidateNodes.indexOf(currentElement)\n      candidateNodes = candidateNodes.slice(currentIndex + 1)\n    }\n    setTimeout(() => focusFirst(candidateNodes))\n    event.preventDefault()\n  }\n}\n\nconst pickedProps = computed(() => {\n  if (props.position === 'popper')\n    return props\n  else return {}\n})\n\nconst forwardedProps = useForwardProps(pickedProps.value)\n\nprovideSelectContentContext({\n  content,\n  viewport,\n  onViewportChange: (node) => {\n    viewport.value = node\n  },\n  itemRefCallback: (node, value, disabled) => {\n    const isFirstValidItem = !firstValidItemFoundRef.value && !disabled\n    const isSelectedItem = valueComparator(rootContext.modelValue.value, value, rootContext.by)\n\n    if (rootContext.multiple.value) {\n      if (firstSelectedItemInArrayFoundRef.value) {\n        return\n      }\n      if (isSelectedItem || isFirstValidItem) {\n        selectedItem.value = node\n\n        // make sure to keep the first item highlighted when `multiple`\n        if (isSelectedItem) {\n          firstSelectedItemInArrayFoundRef.value = true\n        }\n      }\n    }\n    else {\n      if (isSelectedItem || isFirstValidItem) {\n        selectedItem.value = node\n      }\n    }\n\n    if (isFirstValidItem) {\n      firstValidItemFoundRef.value = true\n    }\n  },\n  selectedItem,\n  selectedItemText,\n  onItemLeave: () => {\n    content.value?.focus()\n  },\n  itemTextRefCallback: (node, value, disabled) => {\n    const isFirstValidItem = !firstValidItemFoundRef.value && !disabled\n    const isSelectedItem = valueComparator(rootContext.modelValue.value, value, rootContext.by)\n\n    if (isSelectedItem || isFirstValidItem)\n      selectedItemText.value = node\n  },\n  focusSelectedItem,\n  position: props.position,\n  isPositioned,\n  searchRef: search,\n})\n</script>\n\n<template>\n  <CollectionSlot>\n    <FocusScope\n      as-child\n      @mount-auto-focus.prevent\n      @unmount-auto-focus=\"\n        (event) => {\n          emits('closeAutoFocus', event);\n          if (event.defaultPrevented) return;\n          rootContext.triggerElement.value?.focus({ preventScroll: true });\n          event.preventDefault();\n        }\n      \"\n    >\n      <DismissableLayer\n        as-child\n        :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n        @focus-outside.prevent\n        @dismiss=\"rootContext.onOpenChange(false)\"\n        @escape-key-down=\"emits('escapeKeyDown', $event)\"\n        @pointer-down-outside=\"emits('pointerDownOutside', $event)\"\n      >\n        <component\n          :is=\"\n            position === 'popper'\n              ? SelectPopperPosition\n              : SelectItemAlignedPosition\n          \"\n          v-bind=\"{ ...$attrs, ...forwardedProps }\"\n          :id=\"rootContext.contentId\"\n          :ref=\"\n            (vnode: Element | ComponentPublicInstance | null) => {\n              if (!vnode) return undefined\n              const el = unrefElement(vnode as ComponentPublicInstance) as HTMLElement | undefined\n              // special case for PopperContent\n              if (el?.hasAttribute('data-reka-popper-content-wrapper'))\n                content = el.firstElementChild as HTMLElement\n              else\n                content = el\n              return undefined\n            }\n          \"\n          role=\"listbox\"\n          :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n          :dir=\"rootContext.dir.value\"\n          :style=\"{\n            // flex layout so we can place the scroll buttons properly\n            display: 'flex',\n            flexDirection: 'column',\n            // reset the outline by default as the content MAY get focused\n            outline: 'none',\n          }\"\n          @contextmenu.prevent\n          @placed=\"isPositioned = true\"\n          @keydown=\"(handleKeyDown as any)\"\n        >\n          <slot />\n        </component>\n      </DismissableLayer>\n    </FocusScope>\n  </CollectionSlot>\n</template>\n","<script lang=\"ts\">\nimport type {\n  ComponentPublicInstance,\n  Ref,\n} from 'vue'\nimport type { DismissableLayerProps, PointerDownOutsideEvent } from '@/DismissableLayer'\nimport type { PopperContentProps } from '@/Popper'\nimport type { AcceptableValue } from '@/shared/types'\nimport { useCollection } from '@/Collection'\nimport {\n  createContext,\n  useFocusGuards,\n  useForwardProps,\n  useHideOthers,\n  useTypeahead,\n} from '@/shared'\nimport { useBodyScrollLock } from '@/shared/useBodyScrollLock'\nimport { valueComparator } from './utils'\n\nexport interface SelectContentContext {\n  content?: Ref<HTMLElement | undefined>\n  viewport?: Ref<HTMLElement | undefined>\n  onViewportChange: (node: HTMLElement | undefined) => void\n  itemRefCallback: (\n    node: HTMLElement | undefined,\n    value: AcceptableValue,\n    disabled: boolean,\n  ) => void\n  selectedItem?: Ref<HTMLElement | undefined>\n  onItemLeave?: () => void\n  itemTextRefCallback: (\n    node: HTMLElement | undefined,\n    value: AcceptableValue,\n    disabled: boolean,\n  ) => void\n  focusSelectedItem?: () => void\n  selectedItemText?: Ref<HTMLElement | undefined>\n  position?: 'item-aligned' | 'popper'\n  isPositioned?: Ref<boolean>\n  searchRef?: Ref<string>\n}\n\nexport const SelectContentDefaultContextValue: SelectContentContext = {\n  onViewportChange: () => {},\n  itemTextRefCallback: () => {},\n  itemRefCallback: () => {},\n}\n\nexport type SelectContentImplEmits = {\n  closeAutoFocus: [event: Event]\n  /**\n   * Event handler called when the escape key is down.\n   * Can be prevented.\n   */\n  escapeKeyDown: [event: KeyboardEvent]\n  /**\n   * Event handler called when a `pointerdown` event happens outside of the `DismissableLayer`.\n   * Can be prevented.\n   */\n  pointerDownOutside: [event: PointerDownOutsideEvent]\n}\n\nexport interface SelectContentImplProps extends PopperContentProps, DismissableLayerProps {\n  /**\n   *  The positioning mode to use\n   *\n   *  `item-aligned (default)` - behaves similarly to a native MacOS menu by positioning content relative to the active item. <br>\n   *  `popper` - positions content in the same way as our other primitives, for example `Popover` or `DropdownMenu`.\n   */\n  position?: 'item-aligned' | 'popper'\n  /**\n   * The document.body will be lock, and scrolling will be disabled.\n   *\n   * @defaultValue true\n   */\n  bodyLock?: boolean\n}\n\nexport const [injectSelectContentContext, provideSelectContentContext]\n  = createContext<SelectContentContext>('SelectContent')\n</script>\n\n<script setup lang=\"ts\">\nimport { unrefElement } from '@vueuse/core'\nimport {\n  computed,\n  ref,\n  watch,\n  watchEffect,\n} from 'vue'\nimport { DismissableLayer } from '@/DismissableLayer'\nimport { FocusScope } from '@/FocusScope'\nimport { focusFirst } from '@/Menu/utils'\nimport SelectItemAlignedPosition from './SelectItemAlignedPosition.vue'\nimport SelectPopperPosition from './SelectPopperPosition.vue'\nimport { injectSelectRootContext } from './SelectRoot.vue'\n\nconst props = withDefaults(defineProps<SelectContentImplProps>(), {\n  align: 'start',\n  position: 'item-aligned',\n  bodyLock: true,\n  disableOutsidePointerEvents: true,\n})\nconst emits = defineEmits<SelectContentImplEmits>()\n\nconst rootContext = injectSelectRootContext()\n\nuseFocusGuards()\nuseBodyScrollLock(props.bodyLock)\nconst { CollectionSlot, getItems } = useCollection()\n\nconst content = ref<HTMLElement>()\nuseHideOthers(content)\n\nconst { search, handleTypeaheadSearch } = useTypeahead()\n\nconst viewport = ref<HTMLElement>()\nconst selectedItem = ref<HTMLElement>()\nconst selectedItemText = ref<HTMLElement>()\nconst isPositioned = ref(false)\nconst firstValidItemFoundRef = ref(false)\nconst firstSelectedItemInArrayFoundRef = ref(false)\n\nfunction focusSelectedItem() {\n  if (selectedItem.value && content.value)\n    focusFirst([selectedItem.value, content.value])\n}\n\nwatch(isPositioned, () => {\n  focusSelectedItem()\n})\n\n// prevent selecting items on `pointerup` in some cases after opening from `pointerdown`\n// and close on `pointerup` outside.\nconst { onOpenChange, triggerPointerDownPosRef } = rootContext\nwatchEffect((cleanupFn) => {\n  if (!content.value)\n    return\n  let pointerMoveDelta = { x: 0, y: 0 }\n\n  const handlePointerMove = (event: PointerEvent) => {\n    pointerMoveDelta = {\n      x: Math.abs(\n        Math.round(event.pageX) - (triggerPointerDownPosRef.value?.x ?? 0),\n      ),\n      y: Math.abs(\n        Math.round(event.pageY) - (triggerPointerDownPosRef.value?.y ?? 0),\n      ),\n    }\n  }\n  const handlePointerUp = (event: PointerEvent) => {\n    // Prevent options from being untappable on touch devices\n    // https://github.com/unovue/reka-ui/issues/804\n    if (event.pointerType === 'touch')\n      return\n\n    // If the pointer hasn't moved by a certain threshold then we prevent selecting item on `pointerup`.\n    if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) {\n      event.preventDefault()\n    }\n    else {\n      // otherwise, if the event was outside the content, close.\n      if (!content.value?.contains(event.target as HTMLElement))\n        onOpenChange(false)\n    }\n    document.removeEventListener('pointermove', handlePointerMove)\n    triggerPointerDownPosRef.value = null\n  }\n\n  if (triggerPointerDownPosRef.value !== null) {\n    document.addEventListener('pointermove', handlePointerMove)\n    document.addEventListener('pointerup', handlePointerUp, {\n      capture: true,\n      once: true,\n    })\n  }\n\n  cleanupFn(() => {\n    document.removeEventListener('pointermove', handlePointerMove)\n    document.removeEventListener('pointerup', handlePointerUp, {\n      capture: true,\n    })\n  })\n})\n\nfunction handleKeyDown(event: KeyboardEvent) {\n  const isModifierKey = event.ctrlKey || event.altKey || event.metaKey\n\n  // select should not be navigated using tab key so we prevent it\n  if (event.key === 'Tab')\n    event.preventDefault()\n\n  if (!isModifierKey && event.key.length === 1)\n    handleTypeaheadSearch(event.key, getItems())\n\n  if (['ArrowUp', 'ArrowDown', 'Home', 'End'].includes(event.key)) {\n    const collectionItems = getItems().map(i => i.ref)\n    let candidateNodes = [...collectionItems]\n\n    if (['ArrowUp', 'End'].includes(event.key))\n      candidateNodes = candidateNodes.slice().reverse()\n\n    if (['ArrowUp', 'ArrowDown'].includes(event.key)) {\n      const currentElement = event.target as HTMLElement\n      const currentIndex = candidateNodes.indexOf(currentElement)\n      candidateNodes = candidateNodes.slice(currentIndex + 1)\n    }\n    setTimeout(() => focusFirst(candidateNodes))\n    event.preventDefault()\n  }\n}\n\nconst pickedProps = computed(() => {\n  if (props.position === 'popper')\n    return props\n  else return {}\n})\n\nconst forwardedProps = useForwardProps(pickedProps.value)\n\nprovideSelectContentContext({\n  content,\n  viewport,\n  onViewportChange: (node) => {\n    viewport.value = node\n  },\n  itemRefCallback: (node, value, disabled) => {\n    const isFirstValidItem = !firstValidItemFoundRef.value && !disabled\n    const isSelectedItem = valueComparator(rootContext.modelValue.value, value, rootContext.by)\n\n    if (rootContext.multiple.value) {\n      if (firstSelectedItemInArrayFoundRef.value) {\n        return\n      }\n      if (isSelectedItem || isFirstValidItem) {\n        selectedItem.value = node\n\n        // make sure to keep the first item highlighted when `multiple`\n        if (isSelectedItem) {\n          firstSelectedItemInArrayFoundRef.value = true\n        }\n      }\n    }\n    else {\n      if (isSelectedItem || isFirstValidItem) {\n        selectedItem.value = node\n      }\n    }\n\n    if (isFirstValidItem) {\n      firstValidItemFoundRef.value = true\n    }\n  },\n  selectedItem,\n  selectedItemText,\n  onItemLeave: () => {\n    content.value?.focus()\n  },\n  itemTextRefCallback: (node, value, disabled) => {\n    const isFirstValidItem = !firstValidItemFoundRef.value && !disabled\n    const isSelectedItem = valueComparator(rootContext.modelValue.value, value, rootContext.by)\n\n    if (isSelectedItem || isFirstValidItem)\n      selectedItemText.value = node\n  },\n  focusSelectedItem,\n  position: props.position,\n  isPositioned,\n  searchRef: search,\n})\n</script>\n\n<template>\n  <CollectionSlot>\n    <FocusScope\n      as-child\n      @mount-auto-focus.prevent\n      @unmount-auto-focus=\"\n        (event) => {\n          emits('closeAutoFocus', event);\n          if (event.defaultPrevented) return;\n          rootContext.triggerElement.value?.focus({ preventScroll: true });\n          event.preventDefault();\n        }\n      \"\n    >\n      <DismissableLayer\n        as-child\n        :disable-outside-pointer-events=\"disableOutsidePointerEvents\"\n        @focus-outside.prevent\n        @dismiss=\"rootContext.onOpenChange(false)\"\n        @escape-key-down=\"emits('escapeKeyDown', $event)\"\n        @pointer-down-outside=\"emits('pointerDownOutside', $event)\"\n      >\n        <component\n          :is=\"\n            position === 'popper'\n              ? SelectPopperPosition\n              : SelectItemAlignedPosition\n          \"\n          v-bind=\"{ ...$attrs, ...forwardedProps }\"\n          :id=\"rootContext.contentId\"\n          :ref=\"\n            (vnode: Element | ComponentPublicInstance | null) => {\n              if (!vnode) return undefined\n              const el = unrefElement(vnode as ComponentPublicInstance) as HTMLElement | undefined\n              // special case for PopperContent\n              if (el?.hasAttribute('data-reka-popper-content-wrapper'))\n                content = el.firstElementChild as HTMLElement\n              else\n                content = el\n              return undefined\n            }\n          \"\n          role=\"listbox\"\n          :data-state=\"rootContext.open.value ? 'open' : 'closed'\"\n          :dir=\"rootContext.dir.value\"\n          :style=\"{\n            // flex layout so we can place the scroll buttons properly\n            display: 'flex',\n            flexDirection: 'column',\n            // reset the outline by default as the content MAY get focused\n            outline: 'none',\n          }\"\n          @contextmenu.prevent\n          @placed=\"isPositioned = true\"\n          @keydown=\"(handleKeyDown as any)\"\n        >\n          <slot />\n        </component>\n      </DismissableLayer>\n    </FocusScope>\n  </CollectionSlot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useResizeObserver } from '@vueuse/core'\nimport { useCollection } from '@/Collection'\nimport { clamp, createContext, useForwardExpose } from '@/shared'\n\ninterface SelectItemAlignedPositionContext {\n  contentWrapper?: Ref<HTMLElement | undefined>\n  shouldExpandOnScrollRef?: Ref<boolean>\n  onScrollButtonChange: (node: HTMLElement | undefined) => void\n}\n\nexport interface SelectItemAlignedPositionProps extends PrimitiveProps {}\n\nexport const [injectSelectItemAlignedPositionContext, provideSelectItemAlignedPositionContext]\n  = createContext<SelectItemAlignedPositionContext>('SelectItemAlignedPosition')\n</script>\n\n<script setup lang=\"ts\">\nimport { nextTick, onMounted, ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectSelectContentContext } from './SelectContentImpl.vue'\nimport { injectSelectRootContext } from './SelectRoot.vue'\nimport { CONTENT_MARGIN } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<SelectItemAlignedPositionProps>()\nconst emits = defineEmits<{\n  placed: []\n}>()\n\nconst { getItems } = useCollection()\nconst rootContext = injectSelectRootContext()\nconst contentContext = injectSelectContentContext()\n\nconst shouldExpandOnScrollRef = ref(false)\nconst shouldRepositionRef = ref(true)\n\nconst contentWrapperElement = ref<HTMLElement>()\nconst { forwardRef, currentElement: contentElement } = useForwardExpose()\n\nconst { viewport, selectedItem, selectedItemText, focusSelectedItem }\n  = contentContext!\n\nfunction position() {\n  if (\n    rootContext.triggerElement.value\n    && rootContext.valueElement.value\n    && contentWrapperElement.value\n    && contentElement.value\n    && viewport?.value\n    && selectedItem?.value\n    && selectedItemText?.value\n  ) {\n    const triggerRect = rootContext.triggerElement.value.getBoundingClientRect()\n\n    // -----------------------------------------------------------------------------------------\n    //  Horizontal positioning\n    // -----------------------------------------------------------------------------------------\n    const contentRect = contentElement.value.getBoundingClientRect()\n    const valueNodeRect = rootContext.valueElement.value.getBoundingClientRect()\n    const itemTextRect = selectedItemText.value.getBoundingClientRect()\n\n    if (rootContext.dir.value !== 'rtl') {\n      const itemTextOffset = itemTextRect.left - contentRect.left\n      const left = valueNodeRect.left - itemTextOffset\n      const leftDelta = triggerRect.left - left\n      const minContentWidth = triggerRect.width + leftDelta\n      const contentWidth = Math.max(minContentWidth, contentRect.width)\n      const rightEdge = window.innerWidth - CONTENT_MARGIN\n      const clampedLeft = clamp(left, CONTENT_MARGIN, Math.max(CONTENT_MARGIN, rightEdge - contentWidth))\n\n      contentWrapperElement.value.style.minWidth = `${minContentWidth}px`\n      contentWrapperElement.value.style.left = `${clampedLeft}px`\n    }\n    else {\n      const itemTextOffset = contentRect.right - itemTextRect.right\n      const right = window.innerWidth - valueNodeRect.right - itemTextOffset\n      const rightDelta = window.innerWidth - triggerRect.right - right\n      const minContentWidth = triggerRect.width + rightDelta\n      const contentWidth = Math.max(minContentWidth, contentRect.width)\n      const leftEdge = window.innerWidth - CONTENT_MARGIN\n      const clampedRight = clamp(\n        right,\n        CONTENT_MARGIN,\n        Math.max(CONTENT_MARGIN, leftEdge - contentWidth),\n      )\n\n      contentWrapperElement.value.style.minWidth = `${minContentWidth}px`\n      contentWrapperElement.value.style.right = `${clampedRight}px`\n    }\n\n    // -----------------------------------------------------------------------------------------\n    // Vertical positioning\n    // -----------------------------------------------------------------------------------------\n    const items = getItems().map(i => i.ref)\n    const availableHeight = window.innerHeight - CONTENT_MARGIN * 2\n    const itemsHeight = viewport.value.scrollHeight\n\n    const contentStyles = window.getComputedStyle(contentElement.value)\n    const contentBorderTopWidth = Number.parseInt(\n      contentStyles.borderTopWidth,\n      10,\n    )\n    const contentPaddingTop = Number.parseInt(contentStyles.paddingTop, 10)\n    const contentBorderBottomWidth = Number.parseInt(\n      contentStyles.borderBottomWidth,\n      10,\n    )\n    const contentPaddingBottom = Number.parseInt(\n      contentStyles.paddingBottom,\n      10,\n    )\n\n    const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth\n    const minContentHeight = Math.min(\n      selectedItem.value.offsetHeight * 5,\n      fullContentHeight,\n    )\n\n    const viewportStyles = window.getComputedStyle(viewport.value)\n    const viewportPaddingTop = Number.parseInt(viewportStyles.paddingTop, 10)\n    const viewportPaddingBottom = Number.parseInt(\n      viewportStyles.paddingBottom,\n      10,\n    )\n\n    const topEdgeToTriggerMiddle\n      = triggerRect.top + triggerRect.height / 2 - CONTENT_MARGIN\n    const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle\n\n    const selectedItemHalfHeight = selectedItem.value.offsetHeight / 2\n    const itemOffsetMiddle\n      = selectedItem.value.offsetTop + selectedItemHalfHeight\n    const contentTopToItemMiddle\n      = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle\n    const itemMiddleToContentBottom\n      = fullContentHeight - contentTopToItemMiddle\n\n    const willAlignWithoutTopOverflow\n      = contentTopToItemMiddle <= topEdgeToTriggerMiddle\n\n    if (willAlignWithoutTopOverflow) {\n      const isLastItem = selectedItem.value === items.at(-1)\n      contentWrapperElement.value.style.bottom = `${0}px`\n      const viewportOffsetBottom\n        = contentElement.value.clientHeight\n          - viewport.value.offsetTop\n          - viewport.value.offsetHeight\n      const clampedTriggerMiddleToBottomEdge = Math.max(\n        triggerMiddleToBottomEdge,\n        selectedItemHalfHeight\n        // viewport might have padding bottom, include it to avoid a scrollable viewport\n        + (isLastItem ? viewportPaddingBottom : 0)\n        + viewportOffsetBottom\n        + contentBorderBottomWidth,\n      )\n      const height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge\n      contentWrapperElement.value.style.height = `${height}px`\n    }\n    else {\n      const isFirstItem = selectedItem.value === items[0]\n      contentWrapperElement.value.style.top = `${0}px`\n      const clampedTopEdgeToTriggerMiddle = Math.max(\n        topEdgeToTriggerMiddle,\n        contentBorderTopWidth\n        + viewport.value.offsetTop\n        // viewport might have padding top, include it to avoid a scrollable viewport\n        + (isFirstItem ? viewportPaddingTop : 0)\n        + selectedItemHalfHeight,\n      )\n      const height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom\n      contentWrapperElement.value.style.height = `${height}px`\n      viewport.value.scrollTop\n        = contentTopToItemMiddle\n          - topEdgeToTriggerMiddle\n          + viewport.value.offsetTop\n    }\n\n    contentWrapperElement.value.style.margin = `${CONTENT_MARGIN}px 0`\n    contentWrapperElement.value.style.minHeight = `${minContentHeight}px`\n    contentWrapperElement.value.style.maxHeight = `${availableHeight}px`\n    // -----------------------------------------------------------------------------------------\n\n    emits('placed')\n\n    // we don't want the initial scroll position adjustment to trigger \"expand on scroll\"\n    // so we explicitly turn it on only after they've registered.\n    requestAnimationFrame(() => (shouldExpandOnScrollRef.value = true))\n  }\n}\n\n// copy z-index from content to wrapper\nconst contentZIndex = ref('')\n\nonMounted(async () => {\n  await nextTick()\n  position()\n  if (contentElement.value)\n    contentZIndex.value = window.getComputedStyle(contentElement.value).zIndex\n})\n\n// When the viewport becomes scrollable at the top, the scroll up button will mount.\n// Because it is part of the normal flow, it will push down the viewport, thus throwing our\n// trigger => selectedItem alignment off by the amount the viewport was pushed down.\n// We wait for this to happen and then re-run the positining logic one more time to account for it.\nfunction handleScrollButtonChange(node: HTMLElement | undefined) {\n  if (node && shouldRepositionRef.value === true) {\n    position()\n    focusSelectedItem?.()\n    shouldRepositionRef.value = false\n  }\n}\n\n// Resize and position when trigger element changes\nuseResizeObserver(rootContext.triggerElement, () => {\n  position()\n})\n\nprovideSelectItemAlignedPositionContext({\n  contentWrapper: contentWrapperElement,\n  shouldExpandOnScrollRef,\n  onScrollButtonChange: handleScrollButtonChange,\n})\n</script>\n\n<template>\n  <div\n    ref=\"contentWrapperElement\"\n    :style=\"{\n      display: 'flex',\n      flexDirection: 'column',\n      position: 'fixed',\n      zIndex: contentZIndex,\n    }\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :style=\"{\n        // When we get the height of the content, it includes borders. If we were to set\n        // the height without having `boxSizing: 'border-box'` it would be too big.\n        boxSizing: 'border-box',\n        // We need to ensure the content doesn't get taller than the wrapper\n        maxHeight: '100%',\n      }\"\n      v-bind=\"{ ...$attrs, ...props }\"\n    >\n      <slot />\n    </Primitive>\n  </div>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useResizeObserver } from '@vueuse/core'\nimport { useCollection } from '@/Collection'\nimport { clamp, createContext, useForwardExpose } from '@/shared'\n\ninterface SelectItemAlignedPositionContext {\n  contentWrapper?: Ref<HTMLElement | undefined>\n  shouldExpandOnScrollRef?: Ref<boolean>\n  onScrollButtonChange: (node: HTMLElement | undefined) => void\n}\n\nexport interface SelectItemAlignedPositionProps extends PrimitiveProps {}\n\nexport const [injectSelectItemAlignedPositionContext, provideSelectItemAlignedPositionContext]\n  = createContext<SelectItemAlignedPositionContext>('SelectItemAlignedPosition')\n</script>\n\n<script setup lang=\"ts\">\nimport { nextTick, onMounted, ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectSelectContentContext } from './SelectContentImpl.vue'\nimport { injectSelectRootContext } from './SelectRoot.vue'\nimport { CONTENT_MARGIN } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<SelectItemAlignedPositionProps>()\nconst emits = defineEmits<{\n  placed: []\n}>()\n\nconst { getItems } = useCollection()\nconst rootContext = injectSelectRootContext()\nconst contentContext = injectSelectContentContext()\n\nconst shouldExpandOnScrollRef = ref(false)\nconst shouldRepositionRef = ref(true)\n\nconst contentWrapperElement = ref<HTMLElement>()\nconst { forwardRef, currentElement: contentElement } = useForwardExpose()\n\nconst { viewport, selectedItem, selectedItemText, focusSelectedItem }\n  = contentContext!\n\nfunction position() {\n  if (\n    rootContext.triggerElement.value\n    && rootContext.valueElement.value\n    && contentWrapperElement.value\n    && contentElement.value\n    && viewport?.value\n    && selectedItem?.value\n    && selectedItemText?.value\n  ) {\n    const triggerRect = rootContext.triggerElement.value.getBoundingClientRect()\n\n    // -----------------------------------------------------------------------------------------\n    //  Horizontal positioning\n    // -----------------------------------------------------------------------------------------\n    const contentRect = contentElement.value.getBoundingClientRect()\n    const valueNodeRect = rootContext.valueElement.value.getBoundingClientRect()\n    const itemTextRect = selectedItemText.value.getBoundingClientRect()\n\n    if (rootContext.dir.value !== 'rtl') {\n      const itemTextOffset = itemTextRect.left - contentRect.left\n      const left = valueNodeRect.left - itemTextOffset\n      const leftDelta = triggerRect.left - left\n      const minContentWidth = triggerRect.width + leftDelta\n      const contentWidth = Math.max(minContentWidth, contentRect.width)\n      const rightEdge = window.innerWidth - CONTENT_MARGIN\n      const clampedLeft = clamp(left, CONTENT_MARGIN, Math.max(CONTENT_MARGIN, rightEdge - contentWidth))\n\n      contentWrapperElement.value.style.minWidth = `${minContentWidth}px`\n      contentWrapperElement.value.style.left = `${clampedLeft}px`\n    }\n    else {\n      const itemTextOffset = contentRect.right - itemTextRect.right\n      const right = window.innerWidth - valueNodeRect.right - itemTextOffset\n      const rightDelta = window.innerWidth - triggerRect.right - right\n      const minContentWidth = triggerRect.width + rightDelta\n      const contentWidth = Math.max(minContentWidth, contentRect.width)\n      const leftEdge = window.innerWidth - CONTENT_MARGIN\n      const clampedRight = clamp(\n        right,\n        CONTENT_MARGIN,\n        Math.max(CONTENT_MARGIN, leftEdge - contentWidth),\n      )\n\n      contentWrapperElement.value.style.minWidth = `${minContentWidth}px`\n      contentWrapperElement.value.style.right = `${clampedRight}px`\n    }\n\n    // -----------------------------------------------------------------------------------------\n    // Vertical positioning\n    // -----------------------------------------------------------------------------------------\n    const items = getItems().map(i => i.ref)\n    const availableHeight = window.innerHeight - CONTENT_MARGIN * 2\n    const itemsHeight = viewport.value.scrollHeight\n\n    const contentStyles = window.getComputedStyle(contentElement.value)\n    const contentBorderTopWidth = Number.parseInt(\n      contentStyles.borderTopWidth,\n      10,\n    )\n    const contentPaddingTop = Number.parseInt(contentStyles.paddingTop, 10)\n    const contentBorderBottomWidth = Number.parseInt(\n      contentStyles.borderBottomWidth,\n      10,\n    )\n    const contentPaddingBottom = Number.parseInt(\n      contentStyles.paddingBottom,\n      10,\n    )\n\n    const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth\n    const minContentHeight = Math.min(\n      selectedItem.value.offsetHeight * 5,\n      fullContentHeight,\n    )\n\n    const viewportStyles = window.getComputedStyle(viewport.value)\n    const viewportPaddingTop = Number.parseInt(viewportStyles.paddingTop, 10)\n    const viewportPaddingBottom = Number.parseInt(\n      viewportStyles.paddingBottom,\n      10,\n    )\n\n    const topEdgeToTriggerMiddle\n      = triggerRect.top + triggerRect.height / 2 - CONTENT_MARGIN\n    const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle\n\n    const selectedItemHalfHeight = selectedItem.value.offsetHeight / 2\n    const itemOffsetMiddle\n      = selectedItem.value.offsetTop + selectedItemHalfHeight\n    const contentTopToItemMiddle\n      = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle\n    const itemMiddleToContentBottom\n      = fullContentHeight - contentTopToItemMiddle\n\n    const willAlignWithoutTopOverflow\n      = contentTopToItemMiddle <= topEdgeToTriggerMiddle\n\n    if (willAlignWithoutTopOverflow) {\n      const isLastItem = selectedItem.value === items.at(-1)\n      contentWrapperElement.value.style.bottom = `${0}px`\n      const viewportOffsetBottom\n        = contentElement.value.clientHeight\n          - viewport.value.offsetTop\n          - viewport.value.offsetHeight\n      const clampedTriggerMiddleToBottomEdge = Math.max(\n        triggerMiddleToBottomEdge,\n        selectedItemHalfHeight\n        // viewport might have padding bottom, include it to avoid a scrollable viewport\n        + (isLastItem ? viewportPaddingBottom : 0)\n        + viewportOffsetBottom\n        + contentBorderBottomWidth,\n      )\n      const height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge\n      contentWrapperElement.value.style.height = `${height}px`\n    }\n    else {\n      const isFirstItem = selectedItem.value === items[0]\n      contentWrapperElement.value.style.top = `${0}px`\n      const clampedTopEdgeToTriggerMiddle = Math.max(\n        topEdgeToTriggerMiddle,\n        contentBorderTopWidth\n        + viewport.value.offsetTop\n        // viewport might have padding top, include it to avoid a scrollable viewport\n        + (isFirstItem ? viewportPaddingTop : 0)\n        + selectedItemHalfHeight,\n      )\n      const height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom\n      contentWrapperElement.value.style.height = `${height}px`\n      viewport.value.scrollTop\n        = contentTopToItemMiddle\n          - topEdgeToTriggerMiddle\n          + viewport.value.offsetTop\n    }\n\n    contentWrapperElement.value.style.margin = `${CONTENT_MARGIN}px 0`\n    contentWrapperElement.value.style.minHeight = `${minContentHeight}px`\n    contentWrapperElement.value.style.maxHeight = `${availableHeight}px`\n    // -----------------------------------------------------------------------------------------\n\n    emits('placed')\n\n    // we don't want the initial scroll position adjustment to trigger \"expand on scroll\"\n    // so we explicitly turn it on only after they've registered.\n    requestAnimationFrame(() => (shouldExpandOnScrollRef.value = true))\n  }\n}\n\n// copy z-index from content to wrapper\nconst contentZIndex = ref('')\n\nonMounted(async () => {\n  await nextTick()\n  position()\n  if (contentElement.value)\n    contentZIndex.value = window.getComputedStyle(contentElement.value).zIndex\n})\n\n// When the viewport becomes scrollable at the top, the scroll up button will mount.\n// Because it is part of the normal flow, it will push down the viewport, thus throwing our\n// trigger => selectedItem alignment off by the amount the viewport was pushed down.\n// We wait for this to happen and then re-run the positining logic one more time to account for it.\nfunction handleScrollButtonChange(node: HTMLElement | undefined) {\n  if (node && shouldRepositionRef.value === true) {\n    position()\n    focusSelectedItem?.()\n    shouldRepositionRef.value = false\n  }\n}\n\n// Resize and position when trigger element changes\nuseResizeObserver(rootContext.triggerElement, () => {\n  position()\n})\n\nprovideSelectItemAlignedPositionContext({\n  contentWrapper: contentWrapperElement,\n  shouldExpandOnScrollRef,\n  onScrollButtonChange: handleScrollButtonChange,\n})\n</script>\n\n<template>\n  <div\n    ref=\"contentWrapperElement\"\n    :style=\"{\n      display: 'flex',\n      flexDirection: 'column',\n      position: 'fixed',\n      zIndex: contentZIndex,\n    }\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :style=\"{\n        // When we get the height of the content, it includes borders. If we were to set\n        // the height without having `boxSizing: 'border-box'` it would be too big.\n        boxSizing: 'border-box',\n        // We need to ensure the content doesn't get taller than the wrapper\n        maxHeight: '100%',\n      }\"\n      v-bind=\"{ ...$attrs, ...props }\"\n    >\n      <slot />\n    </Primitive>\n  </div>\n</template>\n","<script lang=\"ts\">\nimport type { PopperArrowProps } from '@/Popper'\n\nexport interface SelectArrowProps extends PopperArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { PopperArrow } from '@/Popper'\nimport { injectSelectContentContext, SelectContentDefaultContextValue } from './SelectContentImpl.vue'\n\nconst props = withDefaults(defineProps<SelectArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\nconst contentContext = injectSelectContentContext(SelectContentDefaultContextValue)\n</script>\n\n<template>\n  <PopperArrow\n    v-if=\"contentContext.position === 'popper'\"\n    v-bind=\"props\"\n  >\n    <slot />\n  </PopperArrow>\n</template>\n","<script lang=\"ts\">\nimport type { PopperArrowProps } from '@/Popper'\n\nexport interface SelectArrowProps extends PopperArrowProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { PopperArrow } from '@/Popper'\nimport { injectSelectContentContext, SelectContentDefaultContextValue } from './SelectContentImpl.vue'\n\nconst props = withDefaults(defineProps<SelectArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\nconst contentContext = injectSelectContentContext(SelectContentDefaultContextValue)\n</script>\n\n<template>\n  <PopperArrow\n    v-if=\"contentContext.position === 'popper'\"\n    v-bind=\"props\"\n  >\n    <slot />\n  </PopperArrow>\n</template>\n","<script setup lang=\"ts\">\nimport type { SelectRootContext } from './SelectRoot.vue'\nimport type { AcceptableValue } from '@/shared/types'\nimport { provideSelectContentContext, SelectContentDefaultContextValue } from './SelectContentImpl.vue'\nimport { provideSelectRootContext } from './SelectRoot.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<{\n  context: SelectRootContext<AcceptableValue>\n}>()\n\nprovideSelectRootContext(props.context)\nprovideSelectContentContext(SelectContentDefaultContextValue)\n</script>\n\n<template>\n  <slot />\n</template>\n","<script setup lang=\"ts\">\nimport type { SelectRootContext } from './SelectRoot.vue'\nimport type { AcceptableValue } from '@/shared/types'\nimport { provideSelectContentContext, SelectContentDefaultContextValue } from './SelectContentImpl.vue'\nimport { provideSelectRootContext } from './SelectRoot.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<{\n  context: SelectRootContext<AcceptableValue>\n}>()\n\nprovideSelectRootContext(props.context)\nprovideSelectContentContext(SelectContentDefaultContextValue)\n</script>\n\n<template>\n  <slot />\n</template>\n","<script lang=\"ts\">\nimport type {\n  SelectContentImplEmits,\n  SelectContentImplProps,\n} from './SelectContentImpl.vue'\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\n\nexport type SelectContentEmits = SelectContentImplEmits\n\nexport interface SelectContentProps extends SelectContentImplProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { useForwardPropsEmits } from '@/shared'\nimport SelectContentImpl from './SelectContentImpl.vue'\nimport SelectProvider from './SelectProvider.vue'\nimport { injectSelectRootContext } from './SelectRoot.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<SelectContentProps>()\n\nconst emits = defineEmits<SelectContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\n\nconst rootContext = injectSelectRootContext()\n\nconst fragment = ref<DocumentFragment>()\nonMounted(() => {\n  fragment.value = new DocumentFragment()\n})\n\nconst presenceRef = ref<InstanceType<typeof Presence>>()\n\nconst present = computed(() => props.forceMount || rootContext.open.value)\nconst renderPresence = ref(present.value)\n\nlet renderPresenceTimeout: ReturnType<typeof setTimeout> | undefined\n\nfunction clearRenderPresenceTimeout() {\n  if (renderPresenceTimeout) {\n    clearTimeout(renderPresenceTimeout)\n    renderPresenceTimeout = undefined\n  }\n}\n\nwatch(present, (_value, _oldValue, onCleanup) => {\n  // Toggle render presence after a delay (nextTick is not enough)\n  // to allow children to re-render with the latest state.\n  // Otherwise, they would remain in the old state during the transition,\n  // which would prevent the animation that depend on state (e.g., data-[state=closed])\n  // from being applied accurately.\n  // @see https://github.com/unovue/reka-ui/issues/1865\n  clearRenderPresenceTimeout()\n  renderPresenceTimeout = setTimeout(() => {\n    renderPresence.value = present.value\n    renderPresenceTimeout = undefined\n  })\n  onCleanup(clearRenderPresenceTimeout)\n})\n\nonUnmounted(clearRenderPresenceTimeout)\n</script>\n\n<template>\n  <Presence\n    v-if=\"present || renderPresence || presenceRef?.present\"\n    ref=\"presenceRef\"\n    :present=\"present\"\n  >\n    <SelectContentImpl v-bind=\"{ ...forwarded, ...$attrs }\">\n      <slot />\n    </SelectContentImpl>\n  </Presence>\n\n  <div v-else-if=\"fragment\">\n    <Teleport :to=\"fragment\">\n      <SelectProvider :context=\"rootContext\">\n        <slot />\n      </SelectProvider>\n    </Teleport>\n  </div>\n</template>\n","<script lang=\"ts\">\nimport type {\n  SelectContentImplEmits,\n  SelectContentImplProps,\n} from './SelectContentImpl.vue'\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\n\nexport type SelectContentEmits = SelectContentImplEmits\n\nexport interface SelectContentProps extends SelectContentImplProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { useForwardPropsEmits } from '@/shared'\nimport SelectContentImpl from './SelectContentImpl.vue'\nimport SelectProvider from './SelectProvider.vue'\nimport { injectSelectRootContext } from './SelectRoot.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = defineProps<SelectContentProps>()\n\nconst emits = defineEmits<SelectContentEmits>()\nconst forwarded = useForwardPropsEmits(props, emits)\n\nconst rootContext = injectSelectRootContext()\n\nconst fragment = ref<DocumentFragment>()\nonMounted(() => {\n  fragment.value = new DocumentFragment()\n})\n\nconst presenceRef = ref<InstanceType<typeof Presence>>()\n\nconst present = computed(() => props.forceMount || rootContext.open.value)\nconst renderPresence = ref(present.value)\n\nlet renderPresenceTimeout: ReturnType<typeof setTimeout> | undefined\n\nfunction clearRenderPresenceTimeout() {\n  if (renderPresenceTimeout) {\n    clearTimeout(renderPresenceTimeout)\n    renderPresenceTimeout = undefined\n  }\n}\n\nwatch(present, (_value, _oldValue, onCleanup) => {\n  // Toggle render presence after a delay (nextTick is not enough)\n  // to allow children to re-render with the latest state.\n  // Otherwise, they would remain in the old state during the transition,\n  // which would prevent the animation that depend on state (e.g., data-[state=closed])\n  // from being applied accurately.\n  // @see https://github.com/unovue/reka-ui/issues/1865\n  clearRenderPresenceTimeout()\n  renderPresenceTimeout = setTimeout(() => {\n    renderPresence.value = present.value\n    renderPresenceTimeout = undefined\n  })\n  onCleanup(clearRenderPresenceTimeout)\n})\n\nonUnmounted(clearRenderPresenceTimeout)\n</script>\n\n<template>\n  <Presence\n    v-if=\"present || renderPresence || presenceRef?.present\"\n    ref=\"presenceRef\"\n    :present=\"present\"\n  >\n    <SelectContentImpl v-bind=\"{ ...forwarded, ...$attrs }\">\n      <slot />\n    </SelectContentImpl>\n  </Presence>\n\n  <div v-else-if=\"fragment\">\n    <Teleport :to=\"fragment\">\n      <SelectProvider :context=\"rootContext\">\n        <slot />\n      </SelectProvider>\n    </Teleport>\n  </div>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useId } from '@/shared'\n\nexport interface SelectGroupProps extends PrimitiveProps {}\n\ninterface SelectGroupContext {\n  id: string\n}\n\nexport const [injectSelectGroupContext, provideSelectGroupContext]\n  = createContext<SelectGroupContext>('SelectGroup')\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<SelectGroupProps>()\n\nconst id = useId(undefined, 'reka-select-group')\nprovideSelectGroupContext({ id })\n</script>\n\n<template>\n  <Primitive\n    role=\"group\"\n    v-bind=\"props\"\n    :aria-labelledby=\"id\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useId } from '@/shared'\n\nexport interface SelectGroupProps extends PrimitiveProps {}\n\ninterface SelectGroupContext {\n  id: string\n}\n\nexport const [injectSelectGroupContext, provideSelectGroupContext]\n  = createContext<SelectGroupContext>('SelectGroup')\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<SelectGroupProps>()\n\nconst id = useId(undefined, 'reka-select-group')\nprovideSelectGroupContext({ id })\n</script>\n\n<template>\n  <Primitive\n    role=\"group\"\n    v-bind=\"props\"\n    :aria-labelledby=\"id\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface SelectIconProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nwithDefaults(defineProps<SelectIconProps>(), {\n  as: 'span',\n})\n</script>\n\n<template>\n  <Primitive\n    aria-hidden=\"true\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n  >\n    <slot>▼</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface SelectIconProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nwithDefaults(defineProps<SelectIconProps>(), {\n  as: 'span',\n})\n</script>\n\n<template>\n  <Primitive\n    aria-hidden=\"true\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n  >\n    <slot>▼</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { AcceptableValue } from '@/shared/types'\nimport { useCollection } from '@/Collection'\nimport { createContext, getActiveElement, handleAndDispatchCustomEvent, useForwardExpose, useId } from '@/shared'\n\ninterface SelectItemContext<T = AcceptableValue> {\n  value: T\n  textId: string\n  disabled: Ref<boolean>\n  isSelected: Ref<boolean>\n  onItemTextChange: (node: HTMLElement | undefined) => void\n}\n\nexport const [injectSelectItemContext, provideSelectItemContext]\n  = createContext<SelectItemContext>('SelectItem')\n\nexport type SelectEvent<T> = CustomEvent<{ originalEvent: PointerEvent | KeyboardEvent, value?: T }>\n\nexport type SelectItemEmits<T = AcceptableValue> = {\n  /** Event handler called when the selecting item. <br> It can be prevented by calling `event.preventDefault`. */\n  select: [event: SelectEvent<T>]\n}\n\nexport interface SelectItemProps<T = AcceptableValue> extends PrimitiveProps {\n  /** The value given as data when submitted with a `name`. */\n  value: T\n  /** When `true`, prevents the user from interacting with the item. */\n  disabled?: boolean\n  /**\n   * Optional text used for typeahead purposes.\n   *\n   * By default the typeahead behavior will use the `.textContent` of the `SelectItemText` part.\n   *\n   * Use this when the content is complex, or you have non-textual content inside.\n   */\n  textValue?: string\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableValue = AcceptableValue\">\nimport {\n  computed,\n  nextTick,\n  onMounted,\n  ref,\n  toRefs,\n} from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectSelectContentContext } from './SelectContentImpl.vue'\nimport { injectSelectRootContext } from './SelectRoot.vue'\nimport { SELECTION_KEYS, valueComparator } from './utils'\n\nconst props = defineProps<SelectItemProps>()\nconst emits = defineEmits<SelectItemEmits<T>>()\nconst { disabled } = toRefs(props)\n\nconst rootContext = injectSelectRootContext()\nconst contentContext = injectSelectContentContext()\nconst { forwardRef, currentElement } = useForwardExpose()\nconst { CollectionItem } = useCollection()\n\nconst isSelected = computed(() => valueComparator(rootContext.modelValue?.value, props.value, rootContext.by))\nconst isFocused = ref(false)\nconst textValue = ref(props.textValue ?? '')\nconst textId = useId(undefined, 'reka-select-item-text')\n\nconst SELECT_SELECT = 'select.select'\n\nasync function handleSelectCustomEvent(ev: PointerEvent | KeyboardEvent) {\n  if (ev.defaultPrevented)\n    return\n\n  const eventDetail = { originalEvent: ev, value: props.value as T }\n  handleAndDispatchCustomEvent(SELECT_SELECT, handleSelect, eventDetail)\n}\n\nasync function handleSelect(ev: SelectEvent<T>) {\n  await nextTick()\n  emits('select', ev)\n  if (ev.defaultPrevented)\n    return\n\n  if (!disabled.value) {\n    rootContext.onValueChange(props.value)\n    if (!rootContext.multiple.value)\n      rootContext.onOpenChange(false)\n  }\n}\n\nasync function handlePointerMove(event: PointerEvent) {\n  await nextTick()\n  if (event.defaultPrevented)\n    return\n  if (disabled.value) {\n    contentContext.onItemLeave?.()\n  }\n  else {\n    // even though safari doesn't support this option, it's acceptable\n    // as it only means it might scroll a few pixels when using the pointer.\n    (event.currentTarget as HTMLElement | null)?.focus({ preventScroll: true })\n  }\n}\n\nasync function handlePointerLeave(event: PointerEvent) {\n  await nextTick()\n  if (event.defaultPrevented)\n    return\n  if (event.currentTarget === getActiveElement())\n    contentContext.onItemLeave?.()\n}\n\nasync function handleKeyDown(event: KeyboardEvent) {\n  await nextTick()\n  if (event.defaultPrevented)\n    return\n  const isTypingAhead = contentContext.searchRef?.value !== ''\n  if (isTypingAhead && event.key === ' ')\n    return\n  if (SELECTION_KEYS.includes(event.key))\n    handleSelectCustomEvent(event)\n  // prevent page scroll if using the space key to select an item\n  if (event.key === ' ')\n    event.preventDefault()\n}\n\nif (props.value === '') {\n  throw new Error(\n    'A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.',\n  )\n}\n\nonMounted(() => {\n  if (!currentElement.value)\n    return\n  contentContext.itemRefCallback(\n    currentElement.value,\n    props.value,\n    props.disabled,\n  )\n})\n\nprovideSelectItemContext({\n  value: props.value,\n  disabled,\n  textId,\n  isSelected,\n  onItemTextChange: (node) => {\n    textValue.value = ((textValue.value || node?.textContent) ?? '').trim()\n  },\n})\n</script>\n\n<template>\n  <CollectionItem :value=\"{ textValue }\">\n    <Primitive\n      :ref=\"forwardRef\"\n      role=\"option\"\n      :aria-labelledby=\"textId\"\n      :data-highlighted=\"isFocused ? '' : undefined\"\n      :aria-selected=\"isSelected\"\n      :data-state=\"isSelected ? 'checked' : 'unchecked'\"\n      :aria-disabled=\"disabled || undefined\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :tabindex=\"disabled ? undefined : -1\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      @focus=\"isFocused = true\"\n      @blur=\"isFocused = false\"\n      @pointerup=\"handleSelectCustomEvent\"\n      @pointerdown=\"(event: PointerEvent) => {\n        (event.currentTarget as HTMLElement).focus({ preventScroll: true })\n      }\"\n      @touchend.prevent.stop\n      @pointermove=\"handlePointerMove\"\n      @pointerleave=\"handlePointerLeave\"\n      @keydown=\"handleKeyDown\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionItem>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { AcceptableValue } from '@/shared/types'\nimport { useCollection } from '@/Collection'\nimport { createContext, getActiveElement, handleAndDispatchCustomEvent, useForwardExpose, useId } from '@/shared'\n\ninterface SelectItemContext<T = AcceptableValue> {\n  value: T\n  textId: string\n  disabled: Ref<boolean>\n  isSelected: Ref<boolean>\n  onItemTextChange: (node: HTMLElement | undefined) => void\n}\n\nexport const [injectSelectItemContext, provideSelectItemContext]\n  = createContext<SelectItemContext>('SelectItem')\n\nexport type SelectEvent<T> = CustomEvent<{ originalEvent: PointerEvent | KeyboardEvent, value?: T }>\n\nexport type SelectItemEmits<T = AcceptableValue> = {\n  /** Event handler called when the selecting item. <br> It can be prevented by calling `event.preventDefault`. */\n  select: [event: SelectEvent<T>]\n}\n\nexport interface SelectItemProps<T = AcceptableValue> extends PrimitiveProps {\n  /** The value given as data when submitted with a `name`. */\n  value: T\n  /** When `true`, prevents the user from interacting with the item. */\n  disabled?: boolean\n  /**\n   * Optional text used for typeahead purposes.\n   *\n   * By default the typeahead behavior will use the `.textContent` of the `SelectItemText` part.\n   *\n   * Use this when the content is complex, or you have non-textual content inside.\n   */\n  textValue?: string\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableValue = AcceptableValue\">\nimport {\n  computed,\n  nextTick,\n  onMounted,\n  ref,\n  toRefs,\n} from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectSelectContentContext } from './SelectContentImpl.vue'\nimport { injectSelectRootContext } from './SelectRoot.vue'\nimport { SELECTION_KEYS, valueComparator } from './utils'\n\nconst props = defineProps<SelectItemProps>()\nconst emits = defineEmits<SelectItemEmits<T>>()\nconst { disabled } = toRefs(props)\n\nconst rootContext = injectSelectRootContext()\nconst contentContext = injectSelectContentContext()\nconst { forwardRef, currentElement } = useForwardExpose()\nconst { CollectionItem } = useCollection()\n\nconst isSelected = computed(() => valueComparator(rootContext.modelValue?.value, props.value, rootContext.by))\nconst isFocused = ref(false)\nconst textValue = ref(props.textValue ?? '')\nconst textId = useId(undefined, 'reka-select-item-text')\n\nconst SELECT_SELECT = 'select.select'\n\nasync function handleSelectCustomEvent(ev: PointerEvent | KeyboardEvent) {\n  if (ev.defaultPrevented)\n    return\n\n  const eventDetail = { originalEvent: ev, value: props.value as T }\n  handleAndDispatchCustomEvent(SELECT_SELECT, handleSelect, eventDetail)\n}\n\nasync function handleSelect(ev: SelectEvent<T>) {\n  await nextTick()\n  emits('select', ev)\n  if (ev.defaultPrevented)\n    return\n\n  if (!disabled.value) {\n    rootContext.onValueChange(props.value)\n    if (!rootContext.multiple.value)\n      rootContext.onOpenChange(false)\n  }\n}\n\nasync function handlePointerMove(event: PointerEvent) {\n  await nextTick()\n  if (event.defaultPrevented)\n    return\n  if (disabled.value) {\n    contentContext.onItemLeave?.()\n  }\n  else {\n    // even though safari doesn't support this option, it's acceptable\n    // as it only means it might scroll a few pixels when using the pointer.\n    (event.currentTarget as HTMLElement | null)?.focus({ preventScroll: true })\n  }\n}\n\nasync function handlePointerLeave(event: PointerEvent) {\n  await nextTick()\n  if (event.defaultPrevented)\n    return\n  if (event.currentTarget === getActiveElement())\n    contentContext.onItemLeave?.()\n}\n\nasync function handleKeyDown(event: KeyboardEvent) {\n  await nextTick()\n  if (event.defaultPrevented)\n    return\n  const isTypingAhead = contentContext.searchRef?.value !== ''\n  if (isTypingAhead && event.key === ' ')\n    return\n  if (SELECTION_KEYS.includes(event.key))\n    handleSelectCustomEvent(event)\n  // prevent page scroll if using the space key to select an item\n  if (event.key === ' ')\n    event.preventDefault()\n}\n\nif (props.value === '') {\n  throw new Error(\n    'A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.',\n  )\n}\n\nonMounted(() => {\n  if (!currentElement.value)\n    return\n  contentContext.itemRefCallback(\n    currentElement.value,\n    props.value,\n    props.disabled,\n  )\n})\n\nprovideSelectItemContext({\n  value: props.value,\n  disabled,\n  textId,\n  isSelected,\n  onItemTextChange: (node) => {\n    textValue.value = ((textValue.value || node?.textContent) ?? '').trim()\n  },\n})\n</script>\n\n<template>\n  <CollectionItem :value=\"{ textValue }\">\n    <Primitive\n      :ref=\"forwardRef\"\n      role=\"option\"\n      :aria-labelledby=\"textId\"\n      :data-highlighted=\"isFocused ? '' : undefined\"\n      :aria-selected=\"isSelected\"\n      :data-state=\"isSelected ? 'checked' : 'unchecked'\"\n      :aria-disabled=\"disabled || undefined\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :tabindex=\"disabled ? undefined : -1\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      @focus=\"isFocused = true\"\n      @blur=\"isFocused = false\"\n      @pointerup=\"handleSelectCustomEvent\"\n      @pointerdown=\"(event: PointerEvent) => {\n        (event.currentTarget as HTMLElement).focus({ preventScroll: true })\n      }\"\n      @touchend.prevent.stop\n      @pointermove=\"handlePointerMove\"\n      @pointerleave=\"handlePointerLeave\"\n      @keydown=\"handleKeyDown\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionItem>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface SelectItemIndicatorProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectSelectItemContext } from './SelectItem.vue'\n\nconst props = withDefaults(defineProps<SelectItemIndicatorProps>(), {\n  as: 'span',\n})\n\nconst itemContext = injectSelectItemContext()\n</script>\n\n<template>\n  <Primitive\n    v-if=\"itemContext.isSelected.value\"\n    aria-hidden=\"true\"\n    v-bind=\"props\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface SelectItemIndicatorProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectSelectItemContext } from './SelectItem.vue'\n\nconst props = withDefaults(defineProps<SelectItemIndicatorProps>(), {\n  as: 'span',\n})\n\nconst itemContext = injectSelectItemContext()\n</script>\n\n<template>\n  <Primitive\n    v-if=\"itemContext.isSelected.value\"\n    aria-hidden=\"true\"\n    v-bind=\"props\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectSelectRootContext } from './SelectRoot.vue'\n\nexport interface SelectItemTextProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectSelectContentContext } from './SelectContentImpl.vue'\nimport { injectSelectItemContext } from './SelectItem.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<SelectItemTextProps>(), {\n  as: 'span',\n})\n\nconst rootContext = injectSelectRootContext()\nconst contentContext = injectSelectContentContext()\nconst itemContext = injectSelectItemContext()\n\nconst { forwardRef, currentElement: itemTextElement } = useForwardExpose()\n\nconst optionProps = computed(() => {\n  return {\n    value: itemContext.value,\n    disabled: itemContext.disabled.value,\n    textContent: itemTextElement.value?.textContent ?? itemContext.value?.toString() ?? '',\n  }\n})\n\nonMounted(() => {\n  if (!itemTextElement.value)\n    return\n  itemContext.onItemTextChange(itemTextElement.value)\n  contentContext.itemTextRefCallback(\n    itemTextElement.value,\n    itemContext.value,\n    itemContext.disabled.value,\n  )\n  rootContext.onOptionAdd(optionProps.value)\n})\n\nonUnmounted(() => {\n  rootContext.onOptionRemove(optionProps.value)\n})\n</script>\n\n<template>\n  <Primitive\n    :id=\"itemContext.textId\"\n    :ref=\"forwardRef\"\n    v-bind=\"{ ...props, ...$attrs }\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectSelectRootContext } from './SelectRoot.vue'\n\nexport interface SelectItemTextProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectSelectContentContext } from './SelectContentImpl.vue'\nimport { injectSelectItemContext } from './SelectItem.vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<SelectItemTextProps>(), {\n  as: 'span',\n})\n\nconst rootContext = injectSelectRootContext()\nconst contentContext = injectSelectContentContext()\nconst itemContext = injectSelectItemContext()\n\nconst { forwardRef, currentElement: itemTextElement } = useForwardExpose()\n\nconst optionProps = computed(() => {\n  return {\n    value: itemContext.value,\n    disabled: itemContext.disabled.value,\n    textContent: itemTextElement.value?.textContent ?? itemContext.value?.toString() ?? '',\n  }\n})\n\nonMounted(() => {\n  if (!itemTextElement.value)\n    return\n  itemContext.onItemTextChange(itemTextElement.value)\n  contentContext.itemTextRefCallback(\n    itemTextElement.value,\n    itemContext.value,\n    itemContext.disabled.value,\n  )\n  rootContext.onOptionAdd(optionProps.value)\n})\n\nonUnmounted(() => {\n  rootContext.onOptionRemove(optionProps.value)\n})\n</script>\n\n<template>\n  <Primitive\n    :id=\"itemContext.textId\"\n    :ref=\"forwardRef\"\n    v-bind=\"{ ...props, ...$attrs }\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface SelectLabelProps extends PrimitiveProps {\n  for?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectSelectGroupContext } from './SelectGroup.vue'\n\nconst props = withDefaults(defineProps<SelectLabelProps>(), {\n  as: 'div',\n})\n\nconst groupContext = injectSelectGroupContext({ id: '' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"groupContext.id\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface SelectLabelProps extends PrimitiveProps {\n  for?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectSelectGroupContext } from './SelectGroup.vue'\n\nconst props = withDefaults(defineProps<SelectLabelProps>(), {\n  as: 'div',\n})\n\nconst groupContext = injectSelectGroupContext({ id: '' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"groupContext.id\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface SelectPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<SelectPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface SelectPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<SelectPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script setup lang=\"ts\">\nimport { onBeforeUnmount, ref, watchEffect } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { Primitive } from '@/Primitive'\nimport { getActiveElement } from '@/shared'\nimport { injectSelectContentContext } from './SelectContentImpl.vue'\n\nexport type SelectScrollButtonImplEmits = {\n  autoScroll: []\n}\n\nconst emits = defineEmits<SelectScrollButtonImplEmits>()\nconst { getItems } = useCollection()\n\nconst contentContext = injectSelectContentContext()\nconst autoScrollTimerRef = ref<number | null>(null)\n\nfunction clearAutoScrollTimer() {\n  if (autoScrollTimerRef.value !== null) {\n    window.clearInterval(autoScrollTimerRef.value)\n    autoScrollTimerRef.value = null\n  }\n}\n\nwatchEffect(() => {\n  const activeItem = getItems().map(i => i.ref).find(\n    item => item === getActiveElement(),\n  )\n  activeItem?.scrollIntoView({ block: 'nearest' })\n})\n\nfunction handlePointerDown() {\n  if (autoScrollTimerRef.value === null) {\n    autoScrollTimerRef.value = window.setInterval(() => {\n      emits('autoScroll')\n    }, 50)\n  }\n}\n\nfunction handlePointerMove() {\n  contentContext.onItemLeave?.()\n  if (autoScrollTimerRef.value === null) {\n    autoScrollTimerRef.value = window.setInterval(() => {\n      emits('autoScroll')\n    }, 50)\n  }\n}\n\nonBeforeUnmount(() => clearAutoScrollTimer())\n</script>\n\n<template>\n  <Primitive\n    aria-hidden=\"true\"\n    :style=\"{\n      flexShrink: 0,\n    }\"\n    v-bind=\"$parent?.$props\"\n    @pointerdown=\"handlePointerDown\"\n    @pointermove=\"handlePointerMove\"\n    @pointerleave=\"\n      () => {\n        clearAutoScrollTimer();\n      }\n    \"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script setup lang=\"ts\">\nimport { onBeforeUnmount, ref, watchEffect } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { Primitive } from '@/Primitive'\nimport { getActiveElement } from '@/shared'\nimport { injectSelectContentContext } from './SelectContentImpl.vue'\n\nexport type SelectScrollButtonImplEmits = {\n  autoScroll: []\n}\n\nconst emits = defineEmits<SelectScrollButtonImplEmits>()\nconst { getItems } = useCollection()\n\nconst contentContext = injectSelectContentContext()\nconst autoScrollTimerRef = ref<number | null>(null)\n\nfunction clearAutoScrollTimer() {\n  if (autoScrollTimerRef.value !== null) {\n    window.clearInterval(autoScrollTimerRef.value)\n    autoScrollTimerRef.value = null\n  }\n}\n\nwatchEffect(() => {\n  const activeItem = getItems().map(i => i.ref).find(\n    item => item === getActiveElement(),\n  )\n  activeItem?.scrollIntoView({ block: 'nearest' })\n})\n\nfunction handlePointerDown() {\n  if (autoScrollTimerRef.value === null) {\n    autoScrollTimerRef.value = window.setInterval(() => {\n      emits('autoScroll')\n    }, 50)\n  }\n}\n\nfunction handlePointerMove() {\n  contentContext.onItemLeave?.()\n  if (autoScrollTimerRef.value === null) {\n    autoScrollTimerRef.value = window.setInterval(() => {\n      emits('autoScroll')\n    }, 50)\n  }\n}\n\nonBeforeUnmount(() => clearAutoScrollTimer())\n</script>\n\n<template>\n  <Primitive\n    aria-hidden=\"true\"\n    :style=\"{\n      flexShrink: 0,\n    }\"\n    v-bind=\"$parent?.$props\"\n    @pointerdown=\"handlePointerDown\"\n    @pointermove=\"handlePointerMove\"\n    @pointerleave=\"\n      () => {\n        clearAutoScrollTimer();\n      }\n    \"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface SelectScrollDownButtonProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ref, watch, watchEffect } from 'vue'\nimport { injectSelectContentContext } from './SelectContentImpl.vue'\nimport { injectSelectItemAlignedPositionContext } from './SelectItemAlignedPosition.vue'\nimport SelectScrollButtonImpl from './SelectScrollButtonImpl.vue'\n\ndefineProps<SelectScrollDownButtonProps>()\n\nconst contentContext = injectSelectContentContext()\nconst alignedPositionContext\n  = contentContext.position === 'item-aligned'\n    ? injectSelectItemAlignedPositionContext()\n    : undefined\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst canScrollDown = ref(false)\n\nwatchEffect((cleanupFn) => {\n  if (contentContext.viewport?.value && contentContext.isPositioned?.value) {\n    const viewport = contentContext.viewport.value\n\n    function handleScroll() {\n      const maxScroll = viewport.scrollHeight - viewport.clientHeight\n      // we use Math.ceil here because if the UI is zoomed-in\n      // `scrollTop` is not always reported as an integer\n      canScrollDown.value = Math.ceil(viewport.scrollTop) < maxScroll\n    }\n    handleScroll()\n    viewport.addEventListener('scroll', handleScroll)\n\n    cleanupFn(() => viewport.removeEventListener('scroll', handleScroll))\n  }\n})\n\nwatch(currentElement, () => {\n  if (currentElement.value)\n    alignedPositionContext?.onScrollButtonChange(currentElement.value)\n})\n</script>\n\n<template>\n  <SelectScrollButtonImpl\n    v-if=\"canScrollDown\"\n    :ref=\"forwardRef\"\n    @auto-scroll=\"\n      () => {\n        const { viewport, selectedItem } = contentContext;\n        if (viewport?.value && selectedItem?.value) {\n          viewport.value.scrollTop = viewport.value.scrollTop + selectedItem.value.offsetHeight;\n        }\n      }\n    \"\n  >\n    <slot />\n  </SelectScrollButtonImpl>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface SelectScrollDownButtonProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ref, watch, watchEffect } from 'vue'\nimport { injectSelectContentContext } from './SelectContentImpl.vue'\nimport { injectSelectItemAlignedPositionContext } from './SelectItemAlignedPosition.vue'\nimport SelectScrollButtonImpl from './SelectScrollButtonImpl.vue'\n\ndefineProps<SelectScrollDownButtonProps>()\n\nconst contentContext = injectSelectContentContext()\nconst alignedPositionContext\n  = contentContext.position === 'item-aligned'\n    ? injectSelectItemAlignedPositionContext()\n    : undefined\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst canScrollDown = ref(false)\n\nwatchEffect((cleanupFn) => {\n  if (contentContext.viewport?.value && contentContext.isPositioned?.value) {\n    const viewport = contentContext.viewport.value\n\n    function handleScroll() {\n      const maxScroll = viewport.scrollHeight - viewport.clientHeight\n      // we use Math.ceil here because if the UI is zoomed-in\n      // `scrollTop` is not always reported as an integer\n      canScrollDown.value = Math.ceil(viewport.scrollTop) < maxScroll\n    }\n    handleScroll()\n    viewport.addEventListener('scroll', handleScroll)\n\n    cleanupFn(() => viewport.removeEventListener('scroll', handleScroll))\n  }\n})\n\nwatch(currentElement, () => {\n  if (currentElement.value)\n    alignedPositionContext?.onScrollButtonChange(currentElement.value)\n})\n</script>\n\n<template>\n  <SelectScrollButtonImpl\n    v-if=\"canScrollDown\"\n    :ref=\"forwardRef\"\n    @auto-scroll=\"\n      () => {\n        const { viewport, selectedItem } = contentContext;\n        if (viewport?.value && selectedItem?.value) {\n          viewport.value.scrollTop = viewport.value.scrollTop + selectedItem.value.offsetHeight;\n        }\n      }\n    \"\n  >\n    <slot />\n  </SelectScrollButtonImpl>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface SelectScrollUpButtonProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ref, watch, watchEffect } from 'vue'\nimport { injectSelectContentContext } from './SelectContentImpl.vue'\nimport { injectSelectItemAlignedPositionContext } from './SelectItemAlignedPosition.vue'\nimport SelectScrollButtonImpl from './SelectScrollButtonImpl.vue'\n\ndefineProps<SelectScrollUpButtonProps>()\n\nconst contentContext = injectSelectContentContext()\nconst alignedPositionContext\n  = contentContext.position === 'item-aligned'\n    ? injectSelectItemAlignedPositionContext()\n    : undefined\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst canScrollUp = ref(false)\n\nwatchEffect((cleanupFn) => {\n  if (contentContext.viewport?.value && contentContext.isPositioned?.value) {\n    const viewport = contentContext.viewport.value\n\n    function handleScroll() {\n      canScrollUp.value = viewport.scrollTop > 0\n    }\n    handleScroll()\n    viewport.addEventListener('scroll', handleScroll)\n\n    cleanupFn(() => viewport.removeEventListener('scroll', handleScroll))\n  }\n})\n\nwatch(currentElement, () => {\n  if (currentElement.value)\n    alignedPositionContext?.onScrollButtonChange(currentElement.value)\n})\n</script>\n\n<template>\n  <SelectScrollButtonImpl\n    v-if=\"canScrollUp\"\n    :ref=\"forwardRef\"\n    @auto-scroll=\"() => {\n      const { viewport, selectedItem } = contentContext;\n      if (viewport?.value && selectedItem?.value) {\n        viewport.value.scrollTop = viewport.value.scrollTop - selectedItem.value.offsetHeight;\n      }\n    }\"\n  >\n    <slot />\n  </SelectScrollButtonImpl>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface SelectScrollUpButtonProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ref, watch, watchEffect } from 'vue'\nimport { injectSelectContentContext } from './SelectContentImpl.vue'\nimport { injectSelectItemAlignedPositionContext } from './SelectItemAlignedPosition.vue'\nimport SelectScrollButtonImpl from './SelectScrollButtonImpl.vue'\n\ndefineProps<SelectScrollUpButtonProps>()\n\nconst contentContext = injectSelectContentContext()\nconst alignedPositionContext\n  = contentContext.position === 'item-aligned'\n    ? injectSelectItemAlignedPositionContext()\n    : undefined\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst canScrollUp = ref(false)\n\nwatchEffect((cleanupFn) => {\n  if (contentContext.viewport?.value && contentContext.isPositioned?.value) {\n    const viewport = contentContext.viewport.value\n\n    function handleScroll() {\n      canScrollUp.value = viewport.scrollTop > 0\n    }\n    handleScroll()\n    viewport.addEventListener('scroll', handleScroll)\n\n    cleanupFn(() => viewport.removeEventListener('scroll', handleScroll))\n  }\n})\n\nwatch(currentElement, () => {\n  if (currentElement.value)\n    alignedPositionContext?.onScrollButtonChange(currentElement.value)\n})\n</script>\n\n<template>\n  <SelectScrollButtonImpl\n    v-if=\"canScrollUp\"\n    :ref=\"forwardRef\"\n    @auto-scroll=\"() => {\n      const { viewport, selectedItem } = contentContext;\n      if (viewport?.value && selectedItem?.value) {\n        viewport.value.scrollTop = viewport.value.scrollTop - selectedItem.value.offsetHeight;\n      }\n    }\"\n  >\n    <slot />\n  </SelectScrollButtonImpl>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface SelectSeparatorProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<SelectSeparatorProps>()\n</script>\n\n<template>\n  <Primitive\n    aria-hidden=\"true\"\n    v-bind=\"props\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface SelectSeparatorProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<SelectSeparatorProps>()\n</script>\n\n<template>\n  <Primitive\n    aria-hidden=\"true\"\n    v-bind=\"props\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport { useCollection } from '@/Collection'\n\nexport interface SelectTriggerProps extends PopperAnchorProps {\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport type { PopperAnchorProps } from '@/Popper'\nimport { computed, onMounted } from 'vue'\nimport { PopperAnchor } from '@/Popper'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose, useId, useTypeahead } from '@/shared'\nimport {\n  injectSelectRootContext,\n} from './SelectRoot.vue'\nimport { OPEN_KEYS, shouldShowPlaceholder } from './utils'\n\nconst props = withDefaults(defineProps<SelectTriggerProps>(), {\n  as: 'button',\n})\nconst rootContext = injectSelectRootContext()\nconst { forwardRef, currentElement: triggerElement } = useForwardExpose()\n\nconst isDisabled = computed(() => rootContext.disabled?.value || props.disabled)\n\nrootContext.contentId ||= useId(undefined, 'reka-select-content')\nonMounted(() => {\n  rootContext.onTriggerChange(triggerElement.value)\n})\n\nconst { getItems } = useCollection()\nconst { search, handleTypeaheadSearch, resetTypeahead } = useTypeahead()\nfunction handleOpen() {\n  if (!isDisabled.value) {\n    rootContext.onOpenChange(true)\n    // reset typeahead when we open\n    resetTypeahead()\n  }\n}\n\nfunction handlePointerOpen(event: PointerEvent) {\n  handleOpen()\n  rootContext.triggerPointerDownPosRef.value = {\n    x: Math.round(event.pageX),\n    y: Math.round(event.pageY),\n  }\n}\n</script>\n\n<template>\n  <PopperAnchor\n    as-child\n    :reference=\"reference\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      role=\"combobox\"\n      :type=\"as === 'button' ? 'button' : undefined\"\n      :aria-controls=\"rootContext.contentId\"\n      :aria-expanded=\"rootContext.open.value || false\"\n      :aria-required=\"rootContext.required?.value\"\n      aria-autocomplete=\"none\"\n      :disabled=\"isDisabled\"\n      :dir=\"rootContext?.dir.value\"\n      :data-state=\"rootContext?.open.value ? 'open' : 'closed'\"\n      :data-disabled=\"isDisabled ? '' : undefined\"\n      :data-placeholder=\"shouldShowPlaceholder(rootContext.modelValue?.value) ? '' : undefined\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      @click=\"\n        (event: MouseEvent) => {\n          // Whilst browsers generally have no issue focusing the trigger when clicking\n          // on a label, Safari seems to struggle with the fact that there's no `onClick`.\n          // We force `focus` in this case. Note: this doesn't create any other side-effect\n          // because we are preventing default in `onPointerDown` so effectively\n          // this only runs for a label 'click'\n          (event?.currentTarget as HTMLElement)?.focus();\n        }\n      \"\n      @pointerdown=\"\n        (event: PointerEvent) => {\n          // Prevent opening on touch down.\n          // https://github.com/unovue/reka-ui/issues/804\n          if (event.pointerType === 'touch')\n            return event.preventDefault();\n\n          // prevent implicit pointer capture\n          // https://www.w3.org/TR/pointerevents3/#implicit-pointer-capture\n          const target = event.target as HTMLElement;\n          if (target.hasPointerCapture(event.pointerId)) {\n            target.releasePointerCapture(event.pointerId);\n          }\n\n          // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n          // but not when the control key is pressed (avoiding MacOS right click)\n          if (event.button === 0 && event.ctrlKey === false) {\n            handlePointerOpen(event)\n            // prevent trigger from stealing focus from the active item after opening.\n            event.preventDefault();\n          }\n        }\n      \"\n      @pointerup.prevent=\"\n        (event: PointerEvent) => {\n          // Only open on pointer up when using touch devices\n          // https://github.com/unovue/reka-ui/issues/804\n          if (event.pointerType === 'touch')\n            handlePointerOpen(event)\n        }\n      \"\n      @keydown=\"\n        (event: KeyboardEvent) => {\n          const isTypingAhead = search !== '';\n          const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n          if (!isModifierKey && event.key.length === 1)\n            if (isTypingAhead && event.key === ' ') return;\n\n          handleTypeaheadSearch(event.key, getItems());\n          if (OPEN_KEYS.includes(event.key)) {\n            handleOpen();\n            event.preventDefault();\n          }\n        }\n      \"\n    >\n      <slot />\n    </Primitive>\n  </PopperAnchor>\n</template>\n","<script lang=\"ts\">\nimport { useCollection } from '@/Collection'\n\nexport interface SelectTriggerProps extends PopperAnchorProps {\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport type { PopperAnchorProps } from '@/Popper'\nimport { computed, onMounted } from 'vue'\nimport { PopperAnchor } from '@/Popper'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose, useId, useTypeahead } from '@/shared'\nimport {\n  injectSelectRootContext,\n} from './SelectRoot.vue'\nimport { OPEN_KEYS, shouldShowPlaceholder } from './utils'\n\nconst props = withDefaults(defineProps<SelectTriggerProps>(), {\n  as: 'button',\n})\nconst rootContext = injectSelectRootContext()\nconst { forwardRef, currentElement: triggerElement } = useForwardExpose()\n\nconst isDisabled = computed(() => rootContext.disabled?.value || props.disabled)\n\nrootContext.contentId ||= useId(undefined, 'reka-select-content')\nonMounted(() => {\n  rootContext.onTriggerChange(triggerElement.value)\n})\n\nconst { getItems } = useCollection()\nconst { search, handleTypeaheadSearch, resetTypeahead } = useTypeahead()\nfunction handleOpen() {\n  if (!isDisabled.value) {\n    rootContext.onOpenChange(true)\n    // reset typeahead when we open\n    resetTypeahead()\n  }\n}\n\nfunction handlePointerOpen(event: PointerEvent) {\n  handleOpen()\n  rootContext.triggerPointerDownPosRef.value = {\n    x: Math.round(event.pageX),\n    y: Math.round(event.pageY),\n  }\n}\n</script>\n\n<template>\n  <PopperAnchor\n    as-child\n    :reference=\"reference\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      role=\"combobox\"\n      :type=\"as === 'button' ? 'button' : undefined\"\n      :aria-controls=\"rootContext.contentId\"\n      :aria-expanded=\"rootContext.open.value || false\"\n      :aria-required=\"rootContext.required?.value\"\n      aria-autocomplete=\"none\"\n      :disabled=\"isDisabled\"\n      :dir=\"rootContext?.dir.value\"\n      :data-state=\"rootContext?.open.value ? 'open' : 'closed'\"\n      :data-disabled=\"isDisabled ? '' : undefined\"\n      :data-placeholder=\"shouldShowPlaceholder(rootContext.modelValue?.value) ? '' : undefined\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      @click=\"\n        (event: MouseEvent) => {\n          // Whilst browsers generally have no issue focusing the trigger when clicking\n          // on a label, Safari seems to struggle with the fact that there's no `onClick`.\n          // We force `focus` in this case. Note: this doesn't create any other side-effect\n          // because we are preventing default in `onPointerDown` so effectively\n          // this only runs for a label 'click'\n          (event?.currentTarget as HTMLElement)?.focus();\n        }\n      \"\n      @pointerdown=\"\n        (event: PointerEvent) => {\n          // Prevent opening on touch down.\n          // https://github.com/unovue/reka-ui/issues/804\n          if (event.pointerType === 'touch')\n            return event.preventDefault();\n\n          // prevent implicit pointer capture\n          // https://www.w3.org/TR/pointerevents3/#implicit-pointer-capture\n          const target = event.target as HTMLElement;\n          if (target.hasPointerCapture(event.pointerId)) {\n            target.releasePointerCapture(event.pointerId);\n          }\n\n          // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n          // but not when the control key is pressed (avoiding MacOS right click)\n          if (event.button === 0 && event.ctrlKey === false) {\n            handlePointerOpen(event)\n            // prevent trigger from stealing focus from the active item after opening.\n            event.preventDefault();\n          }\n        }\n      \"\n      @pointerup.prevent=\"\n        (event: PointerEvent) => {\n          // Only open on pointer up when using touch devices\n          // https://github.com/unovue/reka-ui/issues/804\n          if (event.pointerType === 'touch')\n            handlePointerOpen(event)\n        }\n      \"\n      @keydown=\"\n        (event: KeyboardEvent) => {\n          const isTypingAhead = search !== '';\n          const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n          if (!isModifierKey && event.key.length === 1)\n            if (isTypingAhead && event.key === ' ') return;\n\n          handleTypeaheadSearch(event.key, getItems());\n          if (OPEN_KEYS.includes(event.key)) {\n            handleOpen();\n            event.preventDefault();\n          }\n        }\n      \"\n    >\n      <slot />\n    </Primitive>\n  </PopperAnchor>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { AcceptableValue } from '@/shared/types'\nimport { valueComparator } from './utils'\n\nexport interface SelectValueProps extends PrimitiveProps {\n  /** The content that will be rendered inside the `SelectValue` when no `value` or `defaultValue` is set. */\n  placeholder?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectSelectRootContext } from './SelectRoot.vue'\n\nconst props = withDefaults(defineProps<SelectValueProps>(), {\n  as: 'span',\n  placeholder: '',\n})\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst rootContext = injectSelectRootContext()\n\nonMounted(() => {\n  rootContext.valueElement = currentElement\n})\n\nconst selectedLabel = computed(() => {\n  let list: string[] = []\n  const options = Array.from(rootContext.optionsSet.value)\n  const getOption = (value?: AcceptableValue) => options.find(option => valueComparator(value, option.value, rootContext.by))\n  if (Array.isArray(rootContext.modelValue.value)) {\n    list = rootContext.modelValue.value.map(value => getOption(value)?.textContent ?? '')\n  }\n  else {\n    list = [getOption(rootContext.modelValue.value)?.textContent ?? '']\n  }\n  return list.filter(Boolean)\n})\n\nconst slotText = computed(() => {\n  return selectedLabel.value.length ? selectedLabel.value.join(', ') : props.placeholder\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :style=\"{ pointerEvents: 'none' }\"\n    :data-placeholder=\"selectedLabel.length ? undefined : props.placeholder\"\n  >\n    <slot\n      :selected-label=\"selectedLabel\"\n      :model-value=\"rootContext.modelValue.value\"\n    >\n      {{ slotText }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { AcceptableValue } from '@/shared/types'\nimport { valueComparator } from './utils'\n\nexport interface SelectValueProps extends PrimitiveProps {\n  /** The content that will be rendered inside the `SelectValue` when no `value` or `defaultValue` is set. */\n  placeholder?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectSelectRootContext } from './SelectRoot.vue'\n\nconst props = withDefaults(defineProps<SelectValueProps>(), {\n  as: 'span',\n  placeholder: '',\n})\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst rootContext = injectSelectRootContext()\n\nonMounted(() => {\n  rootContext.valueElement = currentElement\n})\n\nconst selectedLabel = computed(() => {\n  let list: string[] = []\n  const options = Array.from(rootContext.optionsSet.value)\n  const getOption = (value?: AcceptableValue) => options.find(option => valueComparator(value, option.value, rootContext.by))\n  if (Array.isArray(rootContext.modelValue.value)) {\n    list = rootContext.modelValue.value.map(value => getOption(value)?.textContent ?? '')\n  }\n  else {\n    list = [getOption(rootContext.modelValue.value)?.textContent ?? '']\n  }\n  return list.filter(Boolean)\n})\n\nconst slotText = computed(() => {\n  return selectedLabel.value.length ? selectedLabel.value.join(', ') : props.placeholder\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :style=\"{ pointerEvents: 'none' }\"\n    :data-placeholder=\"selectedLabel.length ? undefined : props.placeholder\"\n  >\n    <slot\n      :selected-label=\"selectedLabel\"\n      :model-value=\"rootContext.modelValue.value\"\n    >\n      {{ slotText }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { useNonce } from '@/shared/useNonce'\n\nexport interface SelectViewportProps extends PrimitiveProps {\n  /**\n   * Will add `nonce` attribute to the style tag which can be used by Content Security Policy. <br> If omitted, inherits globally from `ConfigProvider`.\n   */\n  nonce?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted, ref, toRefs } from 'vue'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { injectSelectContentContext } from './SelectContentImpl.vue'\nimport { injectSelectItemAlignedPositionContext } from './SelectItemAlignedPosition.vue'\nimport { CONTENT_MARGIN } from './utils'\n\nconst props = defineProps<SelectViewportProps>()\nconst { nonce: propNonce } = toRefs(props)\nconst nonce = useNonce(propNonce)\n\nconst contentContext = injectSelectContentContext()\nconst alignedPositionContext\n  = contentContext.position === 'item-aligned'\n    ? injectSelectItemAlignedPositionContext()\n    : undefined\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nonMounted(() => {\n  contentContext?.onViewportChange(currentElement.value)\n})\n\nconst prevScrollTopRef = ref(0)\n\nfunction handleScroll(event: WheelEvent) {\n  const viewport = event.currentTarget as HTMLElement\n  const { shouldExpandOnScrollRef, contentWrapper } = alignedPositionContext ?? {}\n  if (shouldExpandOnScrollRef?.value && contentWrapper?.value) {\n    const scrolledBy = Math.abs(prevScrollTopRef.value - viewport.scrollTop)\n    if (scrolledBy > 0) {\n      const availableHeight = window.innerHeight - CONTENT_MARGIN * 2\n      const cssMinHeight = Number.parseFloat(\n        contentWrapper.value.style.minHeight,\n      )\n      const cssHeight = Number.parseFloat(contentWrapper.value.style.height)\n      const prevHeight = Math.max(cssMinHeight, cssHeight)\n\n      if (prevHeight < availableHeight) {\n        const nextHeight = prevHeight + scrolledBy\n        const clampedNextHeight = Math.min(availableHeight, nextHeight)\n        const heightDiff = nextHeight - clampedNextHeight\n\n        contentWrapper.value.style.height = `${clampedNextHeight}px`\n        if (contentWrapper.value.style.bottom === '0px') {\n          viewport.scrollTop = heightDiff > 0 ? heightDiff : 0\n          // ensure the content stays pinned to the bottom\n          contentWrapper.value.style.justifyContent = 'flex-end'\n        }\n      }\n    }\n  }\n  prevScrollTopRef.value = viewport.scrollTop\n}\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    data-reka-select-viewport\n    role=\"presentation\"\n    v-bind=\"{ ...$attrs, ...props }\"\n    :style=\"{\n      // we use position: 'relative' here on the `viewport` so that when we call\n      // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport\n      // (independent of the scrollUpButton).\n      position: 'relative',\n      flex: 1,\n      overflow: 'hidden auto',\n    }\"\n    @scroll=\"handleScroll\"\n  >\n    <slot />\n  </Primitive>\n  <Primitive\n    as=\"style\"\n    :nonce=\"nonce\"\n  >\n    /* Hide scrollbars cross-browser and enable momentum scroll for touch\n    devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none;\n    -webkit-overflow-scrolling: touch; }\n    [data-reka-select-viewport]::-webkit-scrollbar { display: none; }\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { useNonce } from '@/shared/useNonce'\n\nexport interface SelectViewportProps extends PrimitiveProps {\n  /**\n   * Will add `nonce` attribute to the style tag which can be used by Content Security Policy. <br> If omitted, inherits globally from `ConfigProvider`.\n   */\n  nonce?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { onMounted, ref, toRefs } from 'vue'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { injectSelectContentContext } from './SelectContentImpl.vue'\nimport { injectSelectItemAlignedPositionContext } from './SelectItemAlignedPosition.vue'\nimport { CONTENT_MARGIN } from './utils'\n\nconst props = defineProps<SelectViewportProps>()\nconst { nonce: propNonce } = toRefs(props)\nconst nonce = useNonce(propNonce)\n\nconst contentContext = injectSelectContentContext()\nconst alignedPositionContext\n  = contentContext.position === 'item-aligned'\n    ? injectSelectItemAlignedPositionContext()\n    : undefined\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nonMounted(() => {\n  contentContext?.onViewportChange(currentElement.value)\n})\n\nconst prevScrollTopRef = ref(0)\n\nfunction handleScroll(event: WheelEvent) {\n  const viewport = event.currentTarget as HTMLElement\n  const { shouldExpandOnScrollRef, contentWrapper } = alignedPositionContext ?? {}\n  if (shouldExpandOnScrollRef?.value && contentWrapper?.value) {\n    const scrolledBy = Math.abs(prevScrollTopRef.value - viewport.scrollTop)\n    if (scrolledBy > 0) {\n      const availableHeight = window.innerHeight - CONTENT_MARGIN * 2\n      const cssMinHeight = Number.parseFloat(\n        contentWrapper.value.style.minHeight,\n      )\n      const cssHeight = Number.parseFloat(contentWrapper.value.style.height)\n      const prevHeight = Math.max(cssMinHeight, cssHeight)\n\n      if (prevHeight < availableHeight) {\n        const nextHeight = prevHeight + scrolledBy\n        const clampedNextHeight = Math.min(availableHeight, nextHeight)\n        const heightDiff = nextHeight - clampedNextHeight\n\n        contentWrapper.value.style.height = `${clampedNextHeight}px`\n        if (contentWrapper.value.style.bottom === '0px') {\n          viewport.scrollTop = heightDiff > 0 ? heightDiff : 0\n          // ensure the content stays pinned to the bottom\n          contentWrapper.value.style.justifyContent = 'flex-end'\n        }\n      }\n    }\n  }\n  prevScrollTopRef.value = viewport.scrollTop\n}\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    data-reka-select-viewport\n    role=\"presentation\"\n    v-bind=\"{ ...$attrs, ...props }\"\n    :style=\"{\n      // we use position: 'relative' here on the `viewport` so that when we call\n      // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport\n      // (independent of the scrollUpButton).\n      position: 'relative',\n      flex: 1,\n      overflow: 'hidden auto',\n    }\"\n    @scroll=\"handleScroll\"\n  >\n    <slot />\n  </Primitive>\n  <Primitive\n    as=\"style\"\n    :nonce=\"nonce\"\n  >\n    /* Hide scrollbars cross-browser and enable momentum scroll for touch\n    devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none;\n    -webkit-overflow-scrolling: touch; }\n    [data-reka-select-viewport]::-webkit-scrollbar { display: none; }\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DataOrientation } from '../types'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface BaseSeparatorProps extends PrimitiveProps {\n  /**\n   * Orientation of the component.\n   *\n   * Either `vertical` or `horizontal`. Defaults to `horizontal`.\n   */\n  orientation?: DataOrientation\n  /**\n   * Whether or not the component is purely decorative. <br>When `true`, accessibility-related attributes\n   * are updated so that that the rendered element is removed from the accessibility tree.\n   */\n  decorative?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<BaseSeparatorProps>(), {\n  orientation: 'horizontal',\n})\n\nconst ORIENTATIONS = ['horizontal', 'vertical'] as const\nfunction isValidOrientation(orientation: any): orientation is DataOrientation {\n  return ORIENTATIONS.includes(orientation)\n}\n\nconst computedOrientation = computed(() =>\n  isValidOrientation(props.orientation) ? props.orientation : 'horizontal',\n)\n// `aria-orientation` defaults to `horizontal` so we only need it if `orientation` is vertical\nconst ariaOrientation = computed(() =>\n  computedOrientation.value === 'vertical' ? props.orientation : undefined,\n)\n\nconst semanticProps = computed(() =>\n  props.decorative\n    ? { role: 'none' }\n    : { 'aria-orientation': ariaOrientation.value, 'role': 'separator' },\n)\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :data-orientation=\"computedOrientation\"\n    v-bind=\"semanticProps\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DataOrientation } from '../types'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface BaseSeparatorProps extends PrimitiveProps {\n  /**\n   * Orientation of the component.\n   *\n   * Either `vertical` or `horizontal`. Defaults to `horizontal`.\n   */\n  orientation?: DataOrientation\n  /**\n   * Whether or not the component is purely decorative. <br>When `true`, accessibility-related attributes\n   * are updated so that that the rendered element is removed from the accessibility tree.\n   */\n  decorative?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<BaseSeparatorProps>(), {\n  orientation: 'horizontal',\n})\n\nconst ORIENTATIONS = ['horizontal', 'vertical'] as const\nfunction isValidOrientation(orientation: any): orientation is DataOrientation {\n  return ORIENTATIONS.includes(orientation)\n}\n\nconst computedOrientation = computed(() =>\n  isValidOrientation(props.orientation) ? props.orientation : 'horizontal',\n)\n// `aria-orientation` defaults to `horizontal` so we only need it if `orientation` is vertical\nconst ariaOrientation = computed(() =>\n  computedOrientation.value === 'vertical' ? props.orientation : undefined,\n)\n\nconst semanticProps = computed(() =>\n  props.decorative\n    ? { role: 'none' }\n    : { 'aria-orientation': ariaOrientation.value, 'role': 'separator' },\n)\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :data-orientation=\"computedOrientation\"\n    v-bind=\"semanticProps\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { BaseSeparatorProps } from '@/shared/component/BaseSeparator.vue'\n\nexport interface SeparatorProps extends BaseSeparatorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport BaseSeparator from '@/shared/component/BaseSeparator.vue'\n\nconst props = withDefaults(defineProps<SeparatorProps>(), {\n  orientation: 'horizontal',\n})\n</script>\n\n<template>\n  <BaseSeparator v-bind=\"props\">\n    <slot />\n  </BaseSeparator>\n</template>\n","<script lang=\"ts\">\nimport type { BaseSeparatorProps } from '@/shared/component/BaseSeparator.vue'\n\nexport interface SeparatorProps extends BaseSeparatorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport BaseSeparator from '@/shared/component/BaseSeparator.vue'\n\nconst props = withDefaults(defineProps<SeparatorProps>(), {\n  orientation: 'horizontal',\n})\n</script>\n\n<template>\n  <BaseSeparator v-bind=\"props\">\n    <slot />\n  </BaseSeparator>\n</template>\n","export function assert(\n  expectedCondition: any,\n  message = 'Assertion failed!',\n): asserts expectedCondition {\n  if (!expectedCondition) {\n    console.error(message)\n\n    throw new Error(message)\n  }\n}\n","import type { PanelData } from '../SplitterPanel.vue'\nimport { isBrowser } from '@/shared'\n\nexport function getPanelElement(\n  id: string,\n  scope: ParentNode | HTMLElement = document,\n): HTMLElement | null {\n  if (!isBrowser)\n    return null\n  const element = scope.querySelector(`[data-panel-id=\"${id}\"]`)\n  if (element)\n    return element as HTMLElement\n\n  return null\n}\n\nexport function getPanelElementsForGroup(\n  groupId: string,\n  scope: ParentNode | HTMLElement = document,\n): HTMLElement[] {\n  if (!isBrowser)\n    return []\n  return Array.from(\n    scope.querySelectorAll(`[data-panel][data-panel-group-id=\"${groupId}\"]`),\n  )\n}\n\nexport function getPanelGroupElement(\n  id: string,\n  rootElement: ParentNode | HTMLElement = document,\n): HTMLElement | null {\n  if (!isBrowser)\n    return null\n  // If the root element is the PanelGroup\n  if (\n    rootElement instanceof HTMLElement\n    && (rootElement as HTMLElement)?.dataset?.panelGroupId === id\n  ) {\n    return rootElement as HTMLElement\n  }\n\n  // Else query children\n  const element = rootElement.querySelector(\n    `[data-panel-group][data-panel-group-id=\"${id}\"]`,\n  )\n  if (element)\n    return element as HTMLElement\n\n  return null\n}\n\nexport function getResizeHandleElement(\n  id: string,\n  scope: ParentNode | HTMLElement = document,\n): HTMLElement | null {\n  if (!isBrowser)\n    return null\n  const element = scope.querySelector(`[data-panel-resize-handle-id=\"${id}\"]`)\n  if (element)\n    return element as HTMLElement\n\n  return null\n}\n\nexport function getResizeHandleElementIndex(\n  groupId: string,\n  id: string,\n  scope: ParentNode | HTMLElement = document,\n): number | null {\n  if (!isBrowser)\n    return null\n  const handles = getResizeHandleElementsForGroup(groupId, scope)\n  const index = handles.findIndex(\n    handle => handle.getAttribute('data-panel-resize-handle-id') === id,\n  )\n  return index ?? null\n}\n\nexport function getResizeHandleElementsForGroup(\n  groupId: string,\n  scope: ParentNode | HTMLElement = document,\n): HTMLElement[] {\n  if (!isBrowser)\n    return []\n  return Array.from(\n    scope.querySelectorAll(\n      `[data-panel-resize-handle-id][data-panel-group-id=\"${groupId}\"]`,\n    ),\n  )\n}\n\nexport function getResizeHandlePanelIds(\n  groupId: string,\n  handleId: string,\n  panelsArray: PanelData[],\n  scope: ParentNode | HTMLElement = document,\n): [idBefore: string | null, idAfter: string | null] {\n  const handle = getResizeHandleElement(handleId, scope)\n  const handles = getResizeHandleElementsForGroup(groupId, scope)\n  const index = handle ? handles.indexOf(handle) : -1\n\n  const idBefore: string | null = panelsArray[index]?.id ?? null\n  const idAfter: string | null = panelsArray[index + 1]?.id ?? null\n\n  return [idBefore, idAfter]\n}\n","import type { Direction, ResizeEvent } from './types'\n\nexport function isKeyDown(event: ResizeEvent): event is KeyboardEvent {\n  return event.type === 'keydown'\n}\n\nexport function isMouseEvent(event: ResizeEvent): event is MouseEvent {\n  return event.type.startsWith('mouse')\n}\n\nexport function isTouchEvent(event: ResizeEvent): event is TouchEvent {\n  return event.type.startsWith('touch')\n}\n\nexport function getResizeEventCoordinates(event: ResizeEvent) {\n  if (isMouseEvent(event)) {\n    return {\n      x: event.clientX,\n      y: event.clientY,\n    }\n  }\n  else if (isTouchEvent(event)) {\n    const touch = event.touches[0]\n    if (touch && touch.clientX && touch.clientY) {\n      return {\n        x: touch.clientX,\n        y: touch.clientY,\n      }\n    }\n  }\n\n  return {\n    x: Number.POSITIVE_INFINITY,\n    y: Number.POSITIVE_INFINITY,\n  }\n}\n\nexport function getResizeEventCursorPosition(\n  direction: Direction,\n  event: ResizeEvent,\n): number {\n  const isHorizontal = direction === 'horizontal'\n\n  const { x, y } = getResizeEventCoordinates(event)\n\n  return isHorizontal ? x : y\n}\n","import type { PanelData } from '../SplitterPanel.vue'\nimport type { Direction, DragState, ResizeEvent } from './types'\nimport { assert } from './assert'\nimport { getPanelGroupElement, getResizeHandleElement } from './dom'\nimport { getResizeEventCursorPosition, isKeyDown } from './events'\n\nexport function calculateDragOffsetPercentage(\n  event: ResizeEvent,\n  dragHandleId: string,\n  direction: Direction,\n  initialDragState: DragState,\n  panelGroupElement: HTMLElement,\n): number {\n  const isHorizontal = direction === 'horizontal'\n\n  const handleElement = getResizeHandleElement(dragHandleId, panelGroupElement)\n  assert(handleElement)\n\n  const groupId = handleElement.getAttribute('data-panel-group-id')\n  assert(groupId)\n\n  const { initialCursorPosition } = initialDragState\n\n  const cursorPosition = getResizeEventCursorPosition(direction, event)\n\n  const groupElement = getPanelGroupElement(groupId, panelGroupElement)\n  assert(groupElement)\n\n  const groupRect = groupElement.getBoundingClientRect()\n  const groupSizeInPixels = isHorizontal ? groupRect.width : groupRect.height\n\n  const offsetPixels = cursorPosition - initialCursorPosition\n  const offsetPercentage = (offsetPixels / groupSizeInPixels) * 100\n\n  return offsetPercentage\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/movementX\nexport function calculateDeltaPercentage(\n  event: ResizeEvent,\n  dragHandleId: string,\n  direction: Direction,\n  initialDragState: DragState | null,\n  keyboardResizeBy: number | null,\n  panelGroupElement: HTMLElement,\n): number {\n  if (isKeyDown(event)) {\n    const isHorizontal = direction === 'horizontal'\n\n    let delta = 0\n    if (event.shiftKey)\n      delta = 100\n    else\n      delta = keyboardResizeBy ?? 10\n\n    let movement = 0\n    switch (event.key) {\n      case 'ArrowDown':\n        movement = isHorizontal ? 0 : delta\n        break\n      case 'ArrowLeft':\n        movement = isHorizontal ? -delta : 0\n        break\n      case 'ArrowRight':\n        movement = isHorizontal ? delta : 0\n        break\n      case 'ArrowUp':\n        movement = isHorizontal ? 0 : -delta\n        break\n      case 'End':\n        movement = 100\n        break\n      case 'Home':\n        movement = -100\n        break\n    }\n\n    return movement\n  }\n  else {\n    if (initialDragState == null)\n      return 0\n\n    return calculateDragOffsetPercentage(\n      event,\n      dragHandleId,\n      direction,\n      initialDragState,\n      panelGroupElement,\n    )\n  }\n}\n\nexport function calculateAriaValues({\n  layout,\n  panelsArray,\n  pivotIndices,\n}: {\n  layout: number[]\n  panelsArray: PanelData[]\n  pivotIndices: number[]\n}) {\n  let currentMinSize = 0\n  let currentMaxSize = 100\n  let totalMinSize = 0\n  let totalMaxSize = 0\n\n  const firstIndex = pivotIndices[0]\n  assert(firstIndex != null)\n\n  // A panel's effective min/max sizes also need to account for other panel's sizes.\n  panelsArray.forEach((panelData, index) => {\n    const { constraints } = panelData\n    const { maxSize = 100, minSize = 0 } = constraints\n\n    if (index === firstIndex) {\n      currentMinSize = minSize\n      currentMaxSize = maxSize\n    }\n    else {\n      totalMinSize += minSize\n      totalMaxSize += maxSize\n    }\n  })\n\n  const valueMax = Math.min(currentMaxSize, 100 - totalMinSize)\n  const valueMin = Math.max(currentMinSize, 100 - totalMaxSize)\n\n  const valueNow = layout[firstIndex]\n\n  return {\n    valueMax,\n    valueMin,\n    valueNow,\n  }\n}\n\nexport function calculateUnsafeDefaultLayout({\n  panelDataArray,\n}: {\n  panelDataArray: PanelData[]\n}): number[] {\n  const layout: number[] = Array.from({ length: panelDataArray.length })\n\n  const panelConstraintsArray = panelDataArray.map(\n    panelData => panelData.constraints,\n  )\n\n  let numPanelsWithSizes = 0\n  let remainingSize = 100\n\n  // Distribute default sizes first\n  for (let index = 0; index < panelDataArray.length; index++) {\n    const panelConstraints = panelConstraintsArray[index]\n    assert(panelConstraints)\n    const { defaultSize } = panelConstraints\n\n    if (defaultSize != null) {\n      numPanelsWithSizes++\n      layout[index] = defaultSize\n      remainingSize -= defaultSize\n    }\n  }\n\n  // Remaining size should be distributed evenly between panels without default sizes\n  for (let index = 0; index < panelDataArray.length; index++) {\n    const panelConstraints = panelConstraintsArray[index]\n    assert(panelConstraints)\n    const { defaultSize } = panelConstraints\n\n    if (defaultSize != null)\n      continue\n\n    const numRemainingPanels = panelDataArray.length - numPanelsWithSizes\n    const size = remainingSize / numRemainingPanels\n\n    numPanelsWithSizes++\n    layout[index] = size\n    remainingSize -= size\n  }\n\n  return layout\n}\n","import { PRECISION } from './constants'\n\nexport function fuzzyCompareNumbers(\n  actual: number,\n  expected: number,\n  fractionDigits: number = PRECISION,\n): number {\n  actual = Number.parseFloat(actual.toFixed(fractionDigits))\n  expected = Number.parseFloat(expected.toFixed(fractionDigits))\n\n  const delta = actual - expected\n  if (delta === 0)\n    return 0\n  else\n    return delta > 0 ? 1 : -1\n}\n\nexport function fuzzyNumbersEqual(\n  actual: number,\n  expected: number,\n  fractionDigits?: number,\n): boolean {\n  return fuzzyCompareNumbers(actual, expected, fractionDigits) === 0\n}\n","import type { PanelData } from '../SplitterPanel.vue'\nimport { assert } from './assert'\nimport { fuzzyNumbersEqual } from './compare'\n\n// Layout should be pre-converted into percentages\nexport function callPanelCallbacks(\n  panelsArray: PanelData[],\n  layout: number[],\n  panelIdToLastNotifiedSizeMap: Record<string, number>,\n  groupSizeInPixels?: number | null,\n) {\n  layout.forEach((size, index) => {\n    const panelData = panelsArray[index]\n    assert(panelData)\n\n    const { callbacks, constraints, id: panelId } = panelData\n    const { collapsedSize = 0, collapsible, sizeUnit } = constraints\n\n    // Convert size to native units for px panels\n    let displaySize = size\n    if (sizeUnit === 'px' && groupSizeInPixels != null) {\n      displaySize = (size / 100) * groupSizeInPixels\n    }\n\n    const lastNotifiedSize = panelIdToLastNotifiedSizeMap[panelId]\n    if (lastNotifiedSize == null || !fuzzyNumbersEqual(displaySize, lastNotifiedSize)) {\n      panelIdToLastNotifiedSizeMap[panelId] = displaySize\n\n      const { onCollapse, onExpand, onResize } = callbacks\n\n      if (onResize)\n        onResize(displaySize, lastNotifiedSize)\n\n      if (collapsible && (onCollapse || onExpand)) {\n        if (\n          onExpand\n          && (lastNotifiedSize == null || fuzzyNumbersEqual(lastNotifiedSize, collapsedSize))\n          && !fuzzyNumbersEqual(displaySize, collapsedSize)\n        ) {\n          onExpand()\n        }\n\n        if (\n          onCollapse\n          && (lastNotifiedSize == null || !fuzzyNumbersEqual(lastNotifiedSize, collapsedSize))\n          && fuzzyNumbersEqual(displaySize, collapsedSize)\n        ) {\n          onCollapse()\n        }\n      }\n    }\n  })\n}\n","export default function debounce<T extends Function>(\n  callback: T,\n  durationMs = 10,\n) {\n  let timeoutId: NodeJS.Timeout | null = null\n\n  const callable = (...args: any) => {\n    if (timeoutId !== null)\n      clearTimeout(timeoutId)\n\n    timeoutId = setTimeout(() => {\n      callback(...args)\n    }, durationMs)\n  }\n\n  return callable as unknown as T\n}\n","import type { PanelConstraints } from '../SplitterPanel.vue'\nimport { assert } from './assert'\nimport { fuzzyCompareNumbers } from './compare'\nimport { PRECISION } from './constants'\n\n// Panel size must be in percentages; pixel values should be pre-converted\nexport function resizePanel({\n  panelConstraints: panelConstraintsArray,\n  panelIndex,\n  size,\n}: {\n  panelConstraints: PanelConstraints[]\n  panelIndex: number\n  size: number\n}) {\n  const panelConstraints = panelConstraintsArray[panelIndex]\n  assert(panelConstraints != null)\n\n  const { collapsedSize = 0, collapsible, maxSize = 100, minSize = 0 } = panelConstraints\n\n  if (fuzzyCompareNumbers(size, minSize) < 0) {\n    if (collapsible) {\n      // Collapsible panels should snap closed or open only once they cross the halfway point between collapsed and min size.\n      const halfwayPoint = (collapsedSize + minSize) / 2\n      if (fuzzyCompareNumbers(size, halfwayPoint) < 0)\n        size = collapsedSize\n      else\n        size = minSize\n    }\n    else {\n      size = minSize\n    }\n  }\n\n  size = Math.min(maxSize, size)\n  size = Number.parseFloat(size.toFixed(PRECISION))\n\n  return size\n}\n","/* eslint-disable no-lone-blocks */\nimport type { PanelConstraints } from '../SplitterPanel.vue'\nimport { assert } from './assert'\nimport { fuzzyCompareNumbers, fuzzyNumbersEqual } from './compare'\nimport { resizePanel } from './resizePanel'\n\nexport function compareLayouts(a: number[], b: number[]) {\n  if (a.length !== b.length) {\n    return false\n  }\n  else {\n    for (let index = 0; index < a.length; index++) {\n      if (a[index] !== b[index])\n        return false\n    }\n  }\n  return true\n}\n\n// All units must be in percentages; pixel values should be pre-converted\nexport function adjustLayoutByDelta({\n  delta,\n  layout: prevLayout,\n  panelConstraints: panelConstraintsArray,\n  pivotIndices,\n  trigger,\n}: {\n  delta: number\n  layout: number[]\n  panelConstraints: PanelConstraints[]\n  pivotIndices: number[]\n  trigger: 'imperative-api' | 'keyboard' | 'mouse-or-touch'\n}): number[] {\n  if (fuzzyNumbersEqual(delta, 0))\n    return prevLayout\n\n  const nextLayout = [...prevLayout]\n\n  const [firstPivotIndex, secondPivotIndex] = pivotIndices\n  assert(firstPivotIndex != null)\n  assert(secondPivotIndex != null)\n\n  let deltaApplied = 0\n\n  // const DEBUG = [];\n  // DEBUG.push(`adjustLayoutByDelta() ${prevLayout.join(\", \")}`);\n  // DEBUG.push(`  delta: ${delta}`);\n  // DEBUG.push(`  pivotIndices: ${pivotIndices.join(\", \")}`);\n  // DEBUG.push(`  trigger: ${trigger}`);\n  // DEBUG.push(\"\");\n\n  // A resizing panel affects the panels before or after it.\n  //\n  // A negative delta means the panel(s) immediately after the resize handle should grow/expand by decreasing its offset.\n  // Other panels may also need to shrink/contract (and shift) to make room, depending on the min weights.\n  //\n  // A positive delta means the panel(s) immediately before the resize handle should \"expand\".\n  // This is accomplished by shrinking/contracting (and shifting) one or more of the panels after the resize handle.\n\n  {\n    // If this is a resize triggered by a keyboard event, our logic for expanding/collapsing is different.\n    // We no longer check the halfway threshold because this may prevent the panel from expanding at all.\n    if (trigger === 'keyboard') {\n      {\n        // Check if we should expand a collapsed panel\n        const index = delta < 0 ? secondPivotIndex : firstPivotIndex\n        const panelConstraints = panelConstraintsArray[index]\n        assert(panelConstraints)\n\n        // DEBUG.push(`edge case check 1: ${index}`);\n        // DEBUG.push(`  -> collapsible? ${constraints.collapsible}`);\n        if (panelConstraints.collapsible) {\n          const prevSize = prevLayout[index]\n          assert(prevSize != null)\n\n          const panelConstraints = panelConstraintsArray[index]\n          assert(panelConstraints)\n          const { collapsedSize = 0, minSize = 0 } = panelConstraints\n\n          if (fuzzyNumbersEqual(prevSize, collapsedSize)) {\n            const localDelta = minSize - prevSize\n            // DEBUG.push(`  -> expand delta: ${localDelta}`);\n\n            if (fuzzyCompareNumbers(localDelta, Math.abs(delta)) > 0)\n              delta = delta < 0 ? 0 - localDelta : localDelta\n              // DEBUG.push(`  -> delta: ${delta}`);\n          }\n        }\n      }\n\n      {\n        // Check if we should collapse a panel at its minimum size\n        const index = delta < 0 ? firstPivotIndex : secondPivotIndex\n        const panelConstraints = panelConstraintsArray[index]\n        assert(panelConstraints)\n        const { collapsible } = panelConstraints\n\n        // DEBUG.push(`edge case check 2: ${index}`);\n        // DEBUG.push(`  -> collapsible? ${collapsible}`);\n        if (collapsible) {\n          const prevSize = prevLayout[index]\n          assert(prevSize != null)\n\n          const panelConstraints = panelConstraintsArray[index]\n          assert(panelConstraints)\n          const { collapsedSize = 0, minSize = 0 } = panelConstraints\n\n          if (fuzzyNumbersEqual(prevSize, minSize)) {\n            const localDelta = prevSize - collapsedSize\n            // DEBUG.push(`  -> expand delta: ${localDelta}`);\n\n            if (fuzzyCompareNumbers(localDelta, Math.abs(delta)) > 0)\n              delta = delta < 0 ? 0 - localDelta : localDelta\n              // DEBUG.push(`  -> delta: ${delta}`);\n          }\n        }\n      }\n    }\n    // DEBUG.push(\"\");\n  }\n\n  {\n    // Pre-calculate max available delta in the opposite direction of our pivot.\n    // This will be the maximum amount we're allowed to expand/contract the panels in the primary direction.\n    // If this amount is less than the requested delta, adjust the requested delta.\n    // If this amount is greater than the requested delta, that's useful information too–\n    // as an expanding panel might change from collapsed to min size.\n\n    const increment = delta < 0 ? 1 : -1\n\n    let index = delta < 0 ? secondPivotIndex : firstPivotIndex\n    let maxAvailableDelta = 0\n\n    // DEBUG.push(\"pre calc...\");\n    while (true) {\n      const prevSize = prevLayout[index]\n      assert(prevSize != null)\n\n      const maxSafeSize = resizePanel({\n        panelConstraints: panelConstraintsArray,\n        panelIndex: index,\n        size: 100,\n      })\n      const delta = maxSafeSize - prevSize\n      // DEBUG.push(`  ${index}: ${prevSize} -> ${maxSafeSize}`);\n\n      maxAvailableDelta += delta\n      index += increment\n\n      if (index < 0 || index >= panelConstraintsArray.length)\n        break\n    }\n\n    // DEBUG.push(`  -> max available delta: ${maxAvailableDelta}`);\n    const minAbsDelta = Math.min(Math.abs(delta), Math.abs(maxAvailableDelta))\n    delta = delta < 0 ? 0 - minAbsDelta : minAbsDelta\n    // DEBUG.push(`  -> adjusted delta: ${delta}`);\n    // DEBUG.push(\"\");\n  }\n\n  {\n    // Delta added to a panel needs to be subtracted from other panels (within the constraints that those panels allow).\n\n    const pivotIndex = delta < 0 ? firstPivotIndex : secondPivotIndex\n    let index = pivotIndex\n    while (index >= 0 && index < panelConstraintsArray.length) {\n      const deltaRemaining = Math.abs(delta) - Math.abs(deltaApplied)\n\n      const prevSize = prevLayout[index]\n      assert(prevSize != null)\n\n      const unsafeSize = prevSize - deltaRemaining\n      const safeSize = resizePanel({\n        panelConstraints: panelConstraintsArray,\n        panelIndex: index,\n        size: unsafeSize,\n      })\n\n      if (!fuzzyNumbersEqual(prevSize, safeSize)) {\n        deltaApplied += prevSize - safeSize\n\n        nextLayout[index] = safeSize\n\n        if (\n          deltaApplied\n            .toPrecision(3)\n            .localeCompare(Math.abs(delta).toPrecision(3), undefined, {\n              numeric: true,\n            }) >= 0\n        ) {\n          break\n        }\n      }\n\n      if (delta < 0)\n        index--\n      else\n        index++\n    }\n  }\n  // DEBUG.push(`after 1: ${nextLayout.join(\", \")}`);\n  // DEBUG.push(`  deltaApplied: ${deltaApplied}`);\n  // DEBUG.push(\"\");\n\n  // If we were unable to resize any of the panels panels, return the previous state.\n  // This will essentially bailout and ignore e.g. drags past a panel's boundaries\n  if (fuzzyNumbersEqual(deltaApplied, 0)) {\n    // console.log(DEBUG.join(\"\\n\"));\n    return prevLayout\n  }\n\n  {\n    // Now distribute the applied delta to the panels in the other direction\n    const pivotIndex = delta < 0 ? secondPivotIndex : firstPivotIndex\n\n    const prevSize = prevLayout[pivotIndex]\n    assert(prevSize != null)\n\n    const unsafeSize = prevSize + deltaApplied\n    const safeSize = resizePanel({\n      panelConstraints: panelConstraintsArray,\n      panelIndex: pivotIndex,\n      size: unsafeSize,\n    })\n\n    // Adjust the pivot panel before, but only by the amount that surrounding panels were able to shrink/contract.\n    nextLayout[pivotIndex] = safeSize\n\n    // Edge case where expanding or contracting one panel caused another one to change collapsed state\n    if (!fuzzyNumbersEqual(safeSize, unsafeSize)) {\n      let deltaRemaining = unsafeSize - safeSize\n\n      const pivotIndex = delta < 0 ? secondPivotIndex : firstPivotIndex\n      let index = pivotIndex\n      while (index >= 0 && index < panelConstraintsArray.length) {\n        const prevSize = nextLayout[index]\n        assert(prevSize != null)\n\n        const unsafeSize = prevSize + deltaRemaining\n        const safeSize = resizePanel({\n          panelConstraints: panelConstraintsArray,\n          panelIndex: index,\n          size: unsafeSize,\n        })\n\n        if (!fuzzyNumbersEqual(prevSize, safeSize)) {\n          deltaRemaining -= safeSize - prevSize\n\n          nextLayout[index] = safeSize\n        }\n\n        if (fuzzyNumbersEqual(deltaRemaining, 0))\n          break\n\n        if (delta > 0)\n          index--\n        else\n          index++\n      }\n    }\n  }\n  // DEBUG.push(`after 2: ${nextLayout.join(\", \")}`);\n  // DEBUG.push(`  deltaApplied: ${deltaApplied}`);\n  // DEBUG.push(\"\");\n\n  const totalSize = nextLayout.reduce((total, size) => size + total, 0)\n  // DEBUG.push(`total size: ${totalSize}`);\n  // console.log(DEBUG.join(\"\\n\"));\n\n  if (!fuzzyNumbersEqual(totalSize, 100))\n    return prevLayout\n\n  return nextLayout\n}\n","import { getResizeHandleElementIndex } from './dom'\n\nexport function determinePivotIndices(\n  groupId: string,\n  dragHandleId: string,\n  panelGroupElement: ParentNode,\n): [indexBefore: number, indexAfter: number] {\n  const index = getResizeHandleElementIndex(\n    groupId,\n    dragHandleId,\n    panelGroupElement,\n  )\n\n  return index != null ? [index, index + 1] : [-1, -1]\n}\n","export interface Rectangle {\n  x: number\n  y: number\n  width: number\n  height: number\n}\n\nexport function intersects(\n  rectOne: Rectangle,\n  rectTwo: Rectangle,\n  strict: boolean,\n): boolean {\n  if (strict) {\n    return (\n      rectOne.x < rectTwo.x + rectTwo.width\n      && rectOne.x + rectOne.width > rectTwo.x\n      && rectOne.y < rectTwo.y + rectTwo.height\n      && rectOne.y + rectOne.height > rectTwo.y\n    )\n  }\n  else {\n    return (\n      rectOne.x <= rectTwo.x + rectTwo.width\n      && rectOne.x + rectOne.width >= rectTwo.x\n      && rectOne.y <= rectTwo.y + rectTwo.height\n      && rectOne.y + rectOne.height >= rectTwo.y\n    )\n  }\n}\n\nexport function getIntersectingRectangle(\n  rectOne: Rectangle,\n  rectTwo: Rectangle,\n  strict: boolean,\n): Rectangle {\n  if (!intersects(rectOne, rectTwo, strict)) {\n    return {\n      x: 0,\n      y: 0,\n      width: 0,\n      height: 0,\n    }\n  }\n\n  return {\n    x: Math.max(rectOne.x, rectTwo.x),\n    y: Math.max(rectOne.y, rectTwo.y),\n    width:\n      Math.min(rectOne.x + rectOne.width, rectTwo.x + rectTwo.width)\n      - Math.max(rectOne.x, rectTwo.x),\n    height:\n      Math.min(rectOne.y + rectOne.height, rectTwo.y + rectTwo.height)\n      - Math.max(rectOne.y, rectTwo.y),\n  }\n}\n","// Forked from NPM stacking-order@2.0.0\n// Background at https://github.com/Rich-Harris/stacking-order/issues/3\n\nimport { assert } from './assert'\n\n/**\n * Determine which of two nodes appears in front of the other —\n * if `a` is in front, returns 1, otherwise returns -1\n * @param {HTMLElement} a\n * @param {HTMLElement} b\n */\nexport function compare(a: HTMLElement, b: HTMLElement): number {\n  if (a === b)\n    throw new Error('Cannot compare node with itself')\n\n  const ancestors = {\n    a: getAncestors(a),\n    b: getAncestors(b),\n  }\n\n  let common_ancestor\n\n  // remove shared ancestors\n  while (ancestors.a.at(-1) === ancestors.b.at(-1)) {\n    a = ancestors.a.pop() as HTMLElement\n    b = ancestors.b.pop() as HTMLElement\n\n    common_ancestor = a\n  }\n\n  assert(common_ancestor)\n\n  const z_indexes = {\n    a: getZIndex(findStackingContext(ancestors.a)),\n    b: getZIndex(findStackingContext(ancestors.b)),\n  }\n\n  if (z_indexes.a === z_indexes.b) {\n    const children = common_ancestor.childNodes\n\n    const furthest_ancestors = {\n      a: ancestors.a.at(-1),\n      b: ancestors.b.at(-1),\n    }\n\n    let i = children.length\n    while (i--) {\n      const child = children[i]\n      if (child === furthest_ancestors.a)\n        return 1\n      if (child === furthest_ancestors.b)\n        return -1\n    }\n  }\n\n  return Math.sign(z_indexes.a - z_indexes.b)\n}\n\nconst props\n  = /\\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\\b/\n\n/** @param {HTMLElement} node */\nfunction isFlexItem(node: HTMLElement) {\n  const display = getComputedStyle(getParent(node)).display\n  return display === 'flex' || display === 'inline-flex'\n}\n\n/** @param {HTMLElement} node */\nfunction createsStackingContext(node: HTMLElement) {\n  const style = getComputedStyle(node)\n\n  // https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context\n  if (style.position === 'fixed')\n    return true\n  // Forked to fix upstream bug https://github.com/Rich-Harris/stacking-order/issues/3\n  // if (\n  //   (style.zIndex !== \"auto\" && style.position !== \"static\") ||\n  //   isFlexItem(node)\n  // )\n  if (\n    style.zIndex !== 'auto'\n    && (style.position !== 'static' || isFlexItem(node))\n  ) {\n    return true\n  }\n  if (+style.opacity < 1)\n    return true\n  if ('transform' in style && style.transform !== 'none')\n    return true\n  if ('webkitTransform' in style && style.webkitTransform !== 'none')\n    return true\n  if ('mixBlendMode' in style && style.mixBlendMode !== 'normal')\n    return true\n  if ('filter' in style && style.filter !== 'none')\n    return true\n  if ('webkitFilter' in style && style.webkitFilter !== 'none')\n    return true\n  if ('isolation' in style && style.isolation === 'isolate')\n    return true\n  if (props.test(style.willChange))\n    return true\n  // @ts-expect-error non-standard styling https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-overflow-scrolling\n  if (style.webkitOverflowScrolling === 'touch')\n    return true\n\n  return false\n}\n\n/** @param {HTMLElement[]} nodes */\nfunction findStackingContext(nodes: HTMLElement[]) {\n  let i = nodes.length\n\n  while (i--) {\n    const node = nodes[i]\n    assert(node)\n    if (createsStackingContext(node))\n      return node\n  }\n\n  return null\n}\n\n/** @param {HTMLElement} node */\nfunction getZIndex(node: HTMLElement | null) {\n  return (node && Number(getComputedStyle(node).zIndex)) || 0\n}\n\n/** @param {HTMLElement} node */\nfunction getAncestors(node: HTMLElement) {\n  const ancestors = []\n\n  while (node) {\n    ancestors.push(node)\n    node = getParent(node)\n  }\n\n  return ancestors // [ node, ... <body>, <html>, document ]\n}\n\n/** @param {HTMLElement} node */\nfunction getParent(node: HTMLElement) {\n  // @ts-expect-error host should exist\n  return (node.parentNode instanceof DocumentFragment && node.parentNode?.host) || node.parentNode\n}\n","import type { Ref } from 'vue'\nimport type { Direction, ResizeEvent } from './types'\nimport { getResizeEventCoordinates } from './events'\nimport { intersects } from './rects'\nimport { compare } from './stackingOrder'\nimport { resetGlobalCursorStyle, setGlobalCursorStyle } from './style'\n\nexport type ResizeHandlerAction = 'down' | 'move' | 'up'\nexport type SetResizeHandlerState = (\n  action: ResizeHandlerAction,\n  isActive: boolean,\n  event: ResizeEvent,\n) => void\n\nexport type PointerHitAreaMargins = {\n  coarse: number\n  fine: number\n}\n\nexport type ResizeHandlerData = {\n  direction: Ref<Direction>\n  element: HTMLElement\n  hitAreaMargins: PointerHitAreaMargins\n  nonce: Ref<string | undefined>\n  setResizeHandlerState: SetResizeHandlerState\n}\n\nexport const EXCEEDED_HORIZONTAL_MIN = 0b0001\nexport const EXCEEDED_HORIZONTAL_MAX = 0b0010\nexport const EXCEEDED_VERTICAL_MIN = 0b0100\nexport const EXCEEDED_VERTICAL_MAX = 0b1000\n\nfunction getInputType(): 'coarse' | 'fine' | undefined {\n  if (typeof matchMedia === 'function')\n    return matchMedia('(pointer:coarse)').matches ? 'coarse' : 'fine'\n}\n\nconst isCoarsePointer = getInputType() === 'coarse'\n\nconst intersectingHandles: ResizeHandlerData[] = []\nlet isPointerDown = false\nconst ownerDocumentCounts: Map<Document, number> = new Map()\nconst panelConstraintFlags: Map<string, number> = new Map()\n\nconst registeredResizeHandlers = new Set<ResizeHandlerData>()\n\nexport function registerResizeHandle(\n  resizeHandleId: string,\n  element: HTMLElement,\n  direction: Ref<Direction>,\n  hitAreaMargins: PointerHitAreaMargins,\n  nonce: Ref<string | undefined>,\n  setResizeHandlerState: SetResizeHandlerState,\n) {\n  const { ownerDocument } = element\n\n  const data: ResizeHandlerData = {\n    direction,\n    element,\n    hitAreaMargins,\n    nonce,\n    setResizeHandlerState,\n  }\n\n  const count = ownerDocumentCounts.get(ownerDocument) ?? 0\n  ownerDocumentCounts.set(ownerDocument, count + 1)\n\n  registeredResizeHandlers.add(data)\n\n  updateListeners()\n\n  return function unregisterResizeHandle() {\n    panelConstraintFlags.delete(resizeHandleId)\n    registeredResizeHandlers.delete(data)\n\n    const count = ownerDocumentCounts.get(ownerDocument) ?? 1\n    ownerDocumentCounts.set(ownerDocument, count - 1)\n\n    updateListeners()\n    resetGlobalCursorStyle()\n\n    if (count === 1)\n      ownerDocumentCounts.delete(ownerDocument)\n  }\n}\n\nfunction handlePointerDown(event: ResizeEvent) {\n  const { target } = event\n  const { x, y } = getResizeEventCoordinates(event)\n\n  isPointerDown = true\n\n  recalculateIntersectingHandles({ target, x, y })\n  updateListeners()\n\n  if (intersectingHandles.length > 0) {\n    updateResizeHandlerStates('down', event)\n\n    event.preventDefault()\n  }\n}\n\nfunction handlePointerMove(event: ResizeEvent) {\n  const { x, y } = getResizeEventCoordinates(event)\n\n  if (!isPointerDown) {\n    const { target } = event\n\n    // Recalculate intersecting handles whenever the pointer moves, except if it has already been pressed\n    // at that point, the handles may not move with the pointer (depending on constraints)\n    // but the same set of active handles should be locked until the pointer is released\n    recalculateIntersectingHandles({ target, x, y })\n  }\n\n  updateResizeHandlerStates('move', event)\n\n  // Update cursor based on return value(s) from active handles\n  updateCursor()\n\n  if (intersectingHandles.length > 0)\n    event.preventDefault()\n}\n\nfunction handlePointerUp(event: ResizeEvent) {\n  const { target } = event\n  const { x, y } = getResizeEventCoordinates(event)\n\n  panelConstraintFlags.clear()\n  isPointerDown = false\n\n  if (intersectingHandles.length > 0)\n    event.preventDefault()\n\n  updateResizeHandlerStates('up', event)\n  recalculateIntersectingHandles({ target, x, y })\n  updateCursor()\n\n  updateListeners()\n}\n\nfunction recalculateIntersectingHandles({\n  target,\n  x,\n  y,\n}: {\n  target: EventTarget | null\n  x: number\n  y: number\n}) {\n  intersectingHandles.splice(0)\n\n  let targetElement: HTMLElement | null = null\n  if (target instanceof HTMLElement)\n    targetElement = target\n\n  registeredResizeHandlers.forEach((data) => {\n    const { element: dragHandleElement, hitAreaMargins } = data\n\n    const dragHandleRect = dragHandleElement.getBoundingClientRect()\n    const { bottom, left, right, top } = dragHandleRect\n\n    const margin = isCoarsePointer\n      ? hitAreaMargins.coarse\n      : hitAreaMargins.fine\n\n    const eventIntersects\n      = x >= left - margin\n        && x <= right + margin\n        && y >= top - margin\n        && y <= bottom + margin\n\n    if (eventIntersects) {\n      // TRICKY\n      // We listen for pointers events at the root in order to support hit area margins\n      // (determining when the pointer is close enough to an element to be considered a \"hit\")\n      // Clicking on an element \"above\" a handle (e.g. a modal) should prevent a hit though\n      // so at this point we need to compare stacking order of a potentially intersecting drag handle,\n      // and the element that was actually clicked/touched\n      if (\n        targetElement !== null\n        && dragHandleElement !== targetElement\n        && !dragHandleElement.contains(targetElement)\n        && !targetElement.contains(dragHandleElement)\n        // Calculating stacking order has a cost, so we should avoid it if possible\n        // That is why we only check potentially intersecting handles,\n        // and why we skip if the event target is within the handle's DOM\n        && compare(targetElement, dragHandleElement) > 0\n      ) {\n        // If the target is above the drag handle, then we also need to confirm they overlap\n        // If they are beside each other (e.g. a panel and its drag handle) then the handle is still interactive\n        //\n        // It's not enough to compare only the target\n        // The target might be a small element inside of a larger container\n        // (For example, a SPAN or a DIV inside of a larger modal dialog)\n        let currentElement: HTMLElement | null = targetElement\n        let didIntersect = false\n        while (currentElement) {\n          if (currentElement.contains(dragHandleElement)) {\n            break\n          }\n          else if (\n            intersects(\n              currentElement.getBoundingClientRect(),\n              dragHandleRect,\n              true,\n            )\n          ) {\n            didIntersect = true\n            break\n          }\n\n          currentElement = currentElement.parentElement\n        }\n\n        if (didIntersect)\n          return\n      }\n\n      intersectingHandles.push(data)\n    }\n  })\n}\n\nexport function reportConstraintsViolation(\n  resizeHandleId: string,\n  flag: number,\n) {\n  panelConstraintFlags.set(resizeHandleId, flag)\n}\n\nfunction updateCursor() {\n  let intersectsHorizontal = false\n  let intersectsVertical = false\n  let nonce: string | undefined\n\n  intersectingHandles.forEach((data) => {\n    const { direction, nonce: _nonce } = data\n\n    if (direction.value === 'horizontal')\n      intersectsHorizontal = true\n    else\n      intersectsVertical = true\n\n    nonce = _nonce.value\n  })\n\n  let constraintFlags = 0\n  panelConstraintFlags.forEach((flag) => {\n    constraintFlags |= flag\n  })\n\n  if (intersectsHorizontal && intersectsVertical)\n    setGlobalCursorStyle('intersection', constraintFlags, nonce)\n  else if (intersectsHorizontal)\n    setGlobalCursorStyle('horizontal', constraintFlags, nonce)\n  else if (intersectsVertical)\n    setGlobalCursorStyle('vertical', constraintFlags, nonce)\n  else\n    resetGlobalCursorStyle()\n}\n\nfunction updateListeners() {\n  ownerDocumentCounts.forEach((_, ownerDocument) => {\n    const { body } = ownerDocument\n\n    body.removeEventListener('contextmenu', handlePointerUp)\n    body.removeEventListener('mousedown', handlePointerDown)\n    body.removeEventListener('mouseleave', handlePointerMove)\n    body.removeEventListener('mousemove', handlePointerMove)\n    body.removeEventListener('touchmove', handlePointerMove)\n    body.removeEventListener('touchstart', handlePointerDown)\n  })\n\n  window.removeEventListener('mouseup', handlePointerUp)\n  window.removeEventListener('touchcancel', handlePointerUp)\n  window.removeEventListener('touchend', handlePointerUp)\n\n  if (registeredResizeHandlers.size > 0) {\n    if (isPointerDown) {\n      if (intersectingHandles.length > 0) {\n        ownerDocumentCounts.forEach((count, ownerDocument) => {\n          const { body } = ownerDocument\n\n          if (count > 0) {\n            body.addEventListener('contextmenu', handlePointerUp)\n            body.addEventListener('mouseleave', handlePointerMove)\n            body.addEventListener('mousemove', handlePointerMove)\n            body.addEventListener('touchmove', handlePointerMove, {\n              passive: false,\n            })\n          }\n        })\n      }\n\n      window.addEventListener('mouseup', handlePointerUp)\n      window.addEventListener('touchcancel', handlePointerUp)\n      window.addEventListener('touchend', handlePointerUp)\n    }\n    else {\n      ownerDocumentCounts.forEach((count, ownerDocument) => {\n        const { body } = ownerDocument\n\n        if (count > 0) {\n          body.addEventListener('mousedown', handlePointerDown)\n          body.addEventListener('mousemove', handlePointerMove)\n          body.addEventListener('touchmove', handlePointerMove, {\n            passive: false,\n          })\n          body.addEventListener('touchstart', handlePointerDown)\n        }\n      })\n    }\n  }\n}\n\nfunction updateResizeHandlerStates(\n  action: ResizeHandlerAction,\n  event: ResizeEvent,\n) {\n  registeredResizeHandlers.forEach((data) => {\n    const { setResizeHandlerState } = data\n\n    const isActive = intersectingHandles.includes(data)\n\n    setResizeHandlerState(action, isActive, event)\n  })\n}\n","import type { CSSProperties } from 'vue'\nimport type { PanelData } from '../SplitterPanel.vue'\nimport type { DragState } from './types'\nimport {\n  EXCEEDED_HORIZONTAL_MAX,\n  EXCEEDED_HORIZONTAL_MIN,\n  EXCEEDED_VERTICAL_MAX,\n  EXCEEDED_VERTICAL_MIN,\n} from './registry'\n\ntype CursorState = 'horizontal' | 'intersection' | 'vertical'\n\nlet currentCursorStyle: string | null = null\nlet styleElement: HTMLStyleElement | null = null\n\nexport function getCursorStyle(\n  state: CursorState,\n  constraintFlags: number,\n): string {\n  if (constraintFlags) {\n    const horizontalMin = (constraintFlags & EXCEEDED_HORIZONTAL_MIN) !== 0\n    const horizontalMax = (constraintFlags & EXCEEDED_HORIZONTAL_MAX) !== 0\n    const verticalMin = (constraintFlags & EXCEEDED_VERTICAL_MIN) !== 0\n    const verticalMax = (constraintFlags & EXCEEDED_VERTICAL_MAX) !== 0\n\n    if (horizontalMin) {\n      if (verticalMin)\n        return 'se-resize'\n      else if (verticalMax)\n        return 'ne-resize'\n      else\n        return 'e-resize'\n    }\n    else if (horizontalMax) {\n      if (verticalMin)\n        return 'sw-resize'\n      else if (verticalMax)\n        return 'nw-resize'\n      else\n        return 'w-resize'\n    }\n    else if (verticalMin) {\n      return 's-resize'\n    }\n    else if (verticalMax) {\n      return 'n-resize'\n    }\n  }\n\n  switch (state) {\n    case 'horizontal':\n      return 'ew-resize'\n    case 'intersection':\n      return 'move'\n    case 'vertical':\n      return 'ns-resize'\n  }\n}\n\nexport function resetGlobalCursorStyle() {\n  if (styleElement !== null) {\n    document.head.removeChild(styleElement)\n\n    currentCursorStyle = null\n    styleElement = null\n  }\n}\n\nexport function setGlobalCursorStyle(\n  state: CursorState,\n  constraintFlags: number,\n  nonce?: string,\n) {\n  const style = getCursorStyle(state, constraintFlags)\n\n  if (currentCursorStyle === style)\n    return\n\n  currentCursorStyle = style\n\n  if (styleElement === null) {\n    styleElement = document.createElement('style')\n    if (nonce)\n      styleElement.nonce = nonce\n    document.head.appendChild(styleElement)\n  }\n\n  styleElement.innerHTML = `*{cursor: ${style}!important;}`\n}\n\n// the % of the group's overall space this panel should occupy.\nexport function computePanelFlexBoxStyle({\n  defaultSize,\n  dragState,\n  layout,\n  panelData,\n  panelIndex,\n  precision = 3,\n}: {\n  defaultSize: number | undefined\n  layout: number[]\n  dragState: DragState | null\n  panelData: PanelData[]\n  panelIndex: number\n  precision?: number\n}): CSSProperties {\n  const size = layout[panelIndex]\n\n  let flexGrow\n  if (size == null) {\n    // Initial render (before panels have registered themselves)\n    // In order to support server rendering, fall back to default size if provided\n    flexGrow\n      = defaultSize !== undefined ? defaultSize.toPrecision(precision) : '1'\n  }\n  else if (panelData.length === 1) {\n    // Special case: Single panel group should always fill full width/height\n    flexGrow = '1'\n  }\n  else {\n    flexGrow = size.toPrecision(precision)\n  }\n\n  return {\n    flexBasis: 0,\n    flexGrow,\n    flexShrink: 1,\n\n    // Without this, Panel sizes may be unintentionally overridden by their content\n    overflow: 'hidden',\n\n    // Disable pointer events inside of a panel during resize\n    // This avoid edge cases like nested iframes\n    pointerEvents: dragState !== null ? 'none' : undefined,\n  }\n}\n","import type { PanelConstraints, PanelData } from '../SplitterPanel.vue'\n\nexport type SizeUnit = '%' | 'px'\n\ntype ConvertConstraintsToPercentOptions = {\n  panelDataArray: PanelData[]\n  groupSizeInPixels: number | null\n}\n\ntype ConvertValueOptions = {\n  sizeUnit: SizeUnit\n  groupSizeInPixels: number | null\n  value: number | undefined\n}\n\nfunction convertValueToPercent({ sizeUnit, groupSizeInPixels, value }: ConvertValueOptions): number | undefined {\n  if (value == null)\n    return value\n\n  if (sizeUnit === '%')\n    return value\n\n  if (groupSizeInPixels == null || groupSizeInPixels === 0)\n    return undefined\n\n  return (value / groupSizeInPixels) * 100\n}\n\nexport function convertPanelConstraintsToPercent({\n  panelDataArray,\n  groupSizeInPixels,\n}: ConvertConstraintsToPercentOptions): PanelConstraints[] | null {\n  const requiresMeasurement = panelDataArray.some(\n    panelData => (panelData.constraints.sizeUnit ?? '%') === 'px',\n  )\n\n  if (requiresMeasurement && (!groupSizeInPixels || Number.isNaN(groupSizeInPixels)))\n    return null\n\n  return panelDataArray.map((panelData) => {\n    const constraints = panelData.constraints\n    const sizeUnit = constraints.sizeUnit ?? '%'\n\n    const collapsedSize = convertValueToPercent({\n      groupSizeInPixels,\n      sizeUnit,\n      value: constraints.collapsedSize,\n    })\n\n    const defaultSize = convertValueToPercent({\n      groupSizeInPixels,\n      sizeUnit,\n      value: constraints.defaultSize,\n    })\n\n    const maxSize = convertValueToPercent({\n      groupSizeInPixels,\n      sizeUnit,\n      value: constraints.maxSize,\n    })\n\n    const minSize = convertValueToPercent({\n      groupSizeInPixels,\n      sizeUnit,\n      value: constraints.minSize,\n    })\n\n    return {\n      ...constraints,\n      collapsedSize: collapsedSize ?? constraints.collapsedSize ?? 0,\n      defaultSize,\n      maxSize: maxSize ?? 100,\n      minSize: minSize ?? 0,\n      sizeUnit: '%',\n    }\n  })\n}\n\ntype RecalculateLayoutOptions = {\n  layout: number[]\n  panelDataArray: PanelData[]\n  prevGroupSize: number | null\n  nextGroupSize: number | null\n}\n\nexport function hasPixelSizedPanel(panelDataArray: PanelData[]): boolean {\n  return panelDataArray.some(panelData => (panelData.constraints.sizeUnit ?? '%') === 'px')\n}\n\nexport function recalculateLayoutForPixelPanels({\n  layout,\n  panelDataArray,\n  prevGroupSize,\n  nextGroupSize,\n}: RecalculateLayoutOptions): number[] | null {\n  if (!hasPixelSizedPanel(panelDataArray)) {\n    return null\n  }\n\n  if (\n    prevGroupSize == null\n    || nextGroupSize == null\n    || prevGroupSize === 0\n    || nextGroupSize === 0\n    || Number.isNaN(prevGroupSize)\n    || Number.isNaN(nextGroupSize)\n  ) {\n    return null\n  }\n\n  const pixelPanelIndices = panelDataArray.reduce<number[]>((indices, panelData, index) => {\n    if ((panelData.constraints.sizeUnit ?? '%') === 'px')\n      indices.push(index)\n\n    return indices\n  }, [])\n\n  if (pixelPanelIndices.length === 0) {\n    return null\n  }\n\n  const pixelIndexSet = new Set(pixelPanelIndices)\n\n  const nextLayout = layout.map(size => size ?? 0)\n\n  const prevPercentForPixelPanels = pixelPanelIndices.reduce((sum, index) => sum + (layout[index] ?? 0), 0)\n\n  const nextPixelPercents = pixelPanelIndices.map((index) => {\n    const prevPercent = layout[index] ?? 0\n    const prevPixelSize = (prevPercent / 100) * prevGroupSize\n    return (prevPixelSize / nextGroupSize) * 100\n  })\n\n  const totalNextPixelPercent = nextPixelPercents.reduce((sum, value) => sum + value, 0)\n\n  const prevPercentForPercentPanels = layout.reduce((sum, size, index) => {\n    if (pixelIndexSet.has(index))\n      return sum\n\n    return sum + (size ?? 0)\n  }, 0)\n\n  const availableNextPercent = Math.max(0, 100 - totalNextPixelPercent)\n  const scaleFactor = prevPercentForPercentPanels > 0\n    ? availableNextPercent / prevPercentForPercentPanels\n    : 0\n\n  pixelPanelIndices.forEach((panelIndex, arrayIndex) => {\n    nextLayout[panelIndex] = nextPixelPercents[arrayIndex]\n  })\n\n  for (let index = 0; index < nextLayout.length; index++) {\n    if (pixelIndexSet.has(index))\n      continue\n\n    const prevSize = layout[index] ?? 0\n    nextLayout[index] = prevSize * scaleFactor\n  }\n\n  // Normalize to ensure percentages always sum to exactly 100.\n  // Floating-point arithmetic in the px→% conversions above can cause drift\n  // (e.g. 99.89% instead of 100%) that gets persisted to localStorage and\n  // triggers validation warnings on every subsequent page load.\n  const total = nextLayout.reduce((sum, size) => sum + size, 0)\n  if (total > 0 && Math.abs(total - 100) > 1e-9) {\n    const factor = 100 / total\n    for (let index = 0; index < nextLayout.length; index++) {\n      nextLayout[index] = (nextLayout[index] ?? 0) * factor\n    }\n  }\n\n  return nextLayout\n}\n","import type { PanelConstraints } from '../SplitterPanel.vue'\nimport { assert } from './assert'\nimport { fuzzyNumbersEqual } from './compare'\nimport { resizePanel } from './resizePanel'\n\n// All units must be in percentages; pixel values should be pre-converted\nexport function validatePanelGroupLayout({\n  layout: prevLayout,\n  panelConstraints,\n}: {\n  layout: number[]\n  panelConstraints: PanelConstraints[]\n}): number[] {\n  const nextLayout = [...prevLayout]\n  const nextLayoutTotalSize = nextLayout.reduce(\n    (accumulated, current) => accumulated + current,\n    0,\n  )\n\n  // Validate layout expectations\n  if (nextLayout.length !== panelConstraints.length) {\n    throw new Error(\n      `Invalid ${panelConstraints.length} panel layout: ${nextLayout\n        .map(size => `${size}%`)\n        .join(', ')}`,\n    )\n  }\n  else if (!fuzzyNumbersEqual(nextLayoutTotalSize, 100)) {\n    // This is not ideal so we should warn about it, but it may be recoverable in some cases\n    // (especially if the amount is small)\n\n    if (true) {\n      console.warn(\n        `WARNING: Invalid layout total size: ${nextLayout\n          .map(size => `${size}%`)\n          .join(', ')}. Layout normalization will be applied.`,\n      )\n    }\n    for (let index = 0; index < panelConstraints.length; index++) {\n      const unsafeSize = nextLayout[index]\n      assert(unsafeSize != null)\n      const safeSize = (100 / nextLayoutTotalSize) * unsafeSize\n      nextLayout[index] = safeSize\n    }\n  }\n\n  let remainingSize = 0\n\n  // First pass: Validate the proposed layout given each panel's constraints\n  for (let index = 0; index < panelConstraints.length; index++) {\n    const unsafeSize = nextLayout[index]\n    assert(unsafeSize != null)\n\n    const safeSize = resizePanel({\n      panelConstraints,\n      panelIndex: index,\n      size: unsafeSize,\n    })\n\n    if (unsafeSize !== safeSize) {\n      remainingSize += unsafeSize - safeSize\n\n      nextLayout[index] = safeSize\n    }\n  }\n\n  // If there is additional, left over space, assign it to any panel(s) that permits it\n  // (It's not worth taking multiple additional passes to evenly distribute)\n  if (!fuzzyNumbersEqual(remainingSize, 0)) {\n    for (let index = 0; index < panelConstraints.length; index++) {\n      const prevSize = nextLayout[index]\n      assert(prevSize != null)\n      const unsafeSize = prevSize + remainingSize\n      const safeSize = resizePanel({\n        panelConstraints,\n        panelIndex: index,\n        size: unsafeSize,\n      })\n\n      if (prevSize !== safeSize) {\n        remainingSize -= safeSize - prevSize\n        nextLayout[index] = safeSize\n\n        // Once we've used up the remainder, bail\n        if (fuzzyNumbersEqual(remainingSize, 0))\n          break\n      }\n    }\n  }\n\n  return nextLayout\n}\n\nexport function validatePanelConstraints({\n  panelConstraints: panelConstraintsArray,\n  panelId,\n  panelIndex,\n}: {\n  panelConstraints: PanelConstraints[]\n  panelId: string | undefined\n  panelIndex: number\n}): boolean {\n  if (import.meta.env.DEV) {\n    const warnings = []\n\n    const panelConstraints = panelConstraintsArray[panelIndex]\n    assert(panelConstraints)\n\n    const {\n      collapsedSize = 0,\n      collapsible = false,\n      defaultSize,\n      maxSize = 100,\n      minSize = 0,\n      sizeUnit = '%',\n    } = panelConstraints\n\n    if (minSize > maxSize) {\n      warnings.push(\n        `min size (${minSize}${sizeUnit}) should not be greater than max size (${maxSize}${sizeUnit})`,\n      )\n    }\n\n    if (defaultSize != null) {\n      if (defaultSize < 0) {\n        warnings.push('default size should not be less than 0')\n      }\n      else if (\n        defaultSize < minSize\n        && (!collapsible || defaultSize !== collapsedSize)\n      ) {\n        warnings.push('default size should not be less than min size')\n      }\n\n      if (sizeUnit === '%' && defaultSize > 100)\n        warnings.push('default size should not be greater than 100')\n      else if (defaultSize > maxSize)\n        warnings.push('default size should not be greater than max size')\n    }\n\n    if (collapsedSize > minSize)\n      warnings.push('collapsed size should not be greater than min size')\n\n    if (warnings.length > 0) {\n      const name = panelId != null ? `Panel \"${panelId}\"` : 'Panel'\n      console.warn(\n        `${name} has an invalid configuration:\\n\\n${warnings.join('\\n')}`,\n      )\n\n      return false\n    }\n  }\n\n  return true\n}\n","import type { Ref } from 'vue'\nimport type { PanelData } from '../../SplitterPanel.vue'\nimport { watchEffect } from 'vue'\nimport { assert } from '../assert'\nimport { calculateAriaValues } from '../calculate'\nimport { fuzzyNumbersEqual } from '../compare'\nimport { getPanelGroupElement, getResizeHandleElementsForGroup, getResizeHandlePanelIds } from '../dom'\nimport { adjustLayoutByDelta } from '../layout'\nimport { determinePivotIndices } from '../pivot'\n\n// https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/\n\nexport function useWindowSplitterPanelGroupBehavior({\n  eagerValuesRef,\n  groupId,\n  layout,\n  panelDataArray,\n  panelGroupElement,\n  setLayout,\n  getPanelDataWithPercentConstraints,\n}: {\n  eagerValuesRef: Ref<{\n    panelDataArray: PanelData[]\n  }>\n  groupId: string\n  layout: Ref<number[]>\n  panelDataArray: PanelData[]\n  panelGroupElement: Ref<ParentNode | null>\n  setLayout: (sizes: number[]) => void\n  getPanelDataWithPercentConstraints: (groupSizeOverride?: number | null) => PanelData[] | null\n}): void {\n  watchEffect((onCleanup) => {\n    const _panelGroupElement = panelGroupElement.value\n    if (!_panelGroupElement)\n      return\n\n    const panelDataArrayWithPercentConstraints = getPanelDataWithPercentConstraints()\n    if (!panelDataArrayWithPercentConstraints)\n      return\n\n    const resizeHandleElements = getResizeHandleElementsForGroup(\n      groupId,\n      _panelGroupElement,\n    )\n\n    for (let index = 0; index < panelDataArrayWithPercentConstraints.length - 1; index++) {\n      const { valueMax, valueMin, valueNow } = calculateAriaValues({\n        layout: layout.value,\n        panelsArray: panelDataArrayWithPercentConstraints,\n        pivotIndices: [index, index + 1],\n      })\n\n      const resizeHandleElement = resizeHandleElements[index]\n      if (resizeHandleElement == null) {\n        if (import.meta.env.DEV)\n          console.warn(`WARNING: Missing resize handle for PanelGroup \"${groupId}\"`)\n      }\n      else {\n        const panelData = panelDataArrayWithPercentConstraints[index]\n        assert(panelData)\n\n        resizeHandleElement.setAttribute('aria-controls', panelData.id)\n        resizeHandleElement.setAttribute(\n          'aria-valuemax',\n          `${Math.round(valueMax)}`,\n        )\n        resizeHandleElement.setAttribute(\n          'aria-valuemin',\n          `${Math.round(valueMin)}`,\n        )\n        resizeHandleElement.setAttribute(\n          'aria-valuenow',\n          valueNow != null ? `${Math.round(valueNow)}` : '',\n        )\n      }\n    }\n\n    onCleanup(() => {\n      resizeHandleElements.forEach((resizeHandleElement) => {\n        resizeHandleElement.removeAttribute('aria-controls')\n        resizeHandleElement.removeAttribute('aria-valuemax')\n        resizeHandleElement.removeAttribute('aria-valuemin')\n        resizeHandleElement.removeAttribute('aria-valuenow')\n      })\n    })\n  })\n\n  watchEffect((onCleanup) => {\n    const _panelGroupElement = panelGroupElement.value\n    if (!_panelGroupElement)\n      return\n\n    const eagerValues = eagerValuesRef.value\n    assert(eagerValues)\n\n    const panelDataArrayWithPercentConstraints = getPanelDataWithPercentConstraints()\n    if (!panelDataArrayWithPercentConstraints)\n      return\n\n    const { panelDataArray } = eagerValues\n    const groupElement = getPanelGroupElement(groupId, _panelGroupElement)\n    assert(groupElement != null, `No group found for id \"${groupId}\"`)\n\n    const handles = getResizeHandleElementsForGroup(groupId, _panelGroupElement)\n    assert(handles)\n\n    const cleanupFunctions = handles.map((handle) => {\n      const handleId = handle.getAttribute('data-panel-resize-handle-id')\n      assert(handleId)\n\n      const [idBefore, idAfter] = getResizeHandlePanelIds(\n        groupId,\n        handleId,\n        panelDataArray,\n        _panelGroupElement,\n      )\n      if (idBefore == null || idAfter == null)\n        return () => {}\n\n      const onKeyDown = (event: KeyboardEvent) => {\n        if (event.defaultPrevented)\n          return\n\n        switch (event.key) {\n          case 'Enter': {\n            event.preventDefault()\n\n            const index = panelDataArrayWithPercentConstraints.findIndex(\n              panelData => panelData.id === idBefore,\n            )\n            if (index >= 0) {\n              const panelData = panelDataArrayWithPercentConstraints[index]\n              assert(panelData)\n\n              const size = layout.value[index]\n\n              const {\n                collapsedSize = 0,\n                collapsible,\n                minSize = 0,\n              } = panelData.constraints\n\n              if (size != null && collapsible) {\n                const nextLayout = adjustLayoutByDelta({\n                  delta: fuzzyNumbersEqual(size, collapsedSize)\n                    ? minSize - collapsedSize\n                    : collapsedSize - size,\n                  layout: layout.value,\n                  panelConstraints: panelDataArrayWithPercentConstraints.map(\n                    panelData => panelData.constraints,\n                  ),\n                  pivotIndices: determinePivotIndices(\n                    groupId,\n                    handleId,\n                    _panelGroupElement,\n                  ),\n                  trigger: 'keyboard',\n                })\n                if (layout.value !== nextLayout)\n                  setLayout(nextLayout)\n              }\n            }\n            break\n          }\n        }\n      }\n\n      handle.addEventListener('keydown', onKeyDown)\n      return () => {\n        handle.removeEventListener('keydown', onKeyDown)\n      }\n    })\n\n    onCleanup(() => {\n      cleanupFunctions.forEach(cleanupFunction => cleanupFunction())\n    })\n  })\n}\n","import type { PanelGroupStorage } from '../SplitterGroup.vue'\nimport type { PanelData } from '../SplitterPanel.vue'\n\n// PanelGroup might be rendering in a server-side environment where localStorage is not available\n// or on a browser with cookies/storage disabled.\n// In either case, this function avoids accessing localStorage until needed,\n// and avoids throwing user-visible errors.\nexport function initializeDefaultStorage(storageObject: PanelGroupStorage) {\n  try {\n    if (typeof localStorage !== 'undefined') {\n      // Bypass this check for future calls\n      storageObject.getItem = (name: string) => {\n        return localStorage.getItem(name)\n      }\n      storageObject.setItem = (name: string, value: string) => {\n        localStorage.setItem(name, value)\n      }\n    }\n    else {\n      throw new TypeError('localStorage not supported in this environment')\n    }\n  }\n  catch (error) {\n    console.error(error)\n\n    storageObject.getItem = () => null\n    storageObject.setItem = () => {}\n  }\n}\n\nexport type PanelConfigurationState = {\n  expandToSizes: {\n    [panelId: string]: number\n  }\n  layout: number[]\n  sizeUnits?: {\n    [panelIndex: number]: 'px' | '%'\n  }\n}\n\nexport type SerializedPanelGroupState = {\n  [panelIds: string]: PanelConfigurationState\n}\n\nfunction getPanelGroupKey(autoSaveId: string): string {\n  return `reka:${autoSaveId}`\n}\n\n// Note that Panel ids might be user-provided (stable) or useId generated (non-deterministic)\n// so they should not be used as part of the serialization key.\n// Using the min/max size attributes should work well enough as a backup.\n// Pre-sorting by minSize allows remembering layouts even if panels are re-ordered/dragged.\nfunction getPanelKey(panels: PanelData[]): string {\n  return panels\n    .map((panel) => {\n      const { constraints, id, idIsFromProps, order } = panel\n      if (idIsFromProps) {\n        return id\n      }\n      else {\n        return order\n          ? `${order}:${JSON.stringify(constraints)}`\n          : JSON.stringify(constraints)\n      }\n    })\n    .sort((a, b) => a.localeCompare(b))\n    .join(',')\n}\n\nfunction loadSerializedPanelGroupState(\n  autoSaveId: string,\n  storage: PanelGroupStorage,\n): SerializedPanelGroupState | null {\n  try {\n    const panelGroupKey = getPanelGroupKey(autoSaveId)\n    const serialized = storage.getItem(panelGroupKey)\n    if (serialized) {\n      const parsed = JSON.parse(serialized)\n      if (typeof parsed === 'object' && parsed != null)\n        return parsed as SerializedPanelGroupState\n    }\n  }\n  catch (error) {}\n\n  return null\n}\n\nexport function loadPanelGroupState(\n  autoSaveId: string,\n  panels: PanelData[],\n  storage: PanelGroupStorage,\n): PanelConfigurationState | null {\n  const state = loadSerializedPanelGroupState(autoSaveId, storage) ?? {}\n  const panelKey = getPanelKey(panels)\n  return state[panelKey] ?? null\n}\n\nexport function savePanelGroupState(\n  autoSaveId: string,\n  panels: PanelData[],\n  panelSizesBeforeCollapse: Map<string, number>,\n  sizes: number[],\n  storage: PanelGroupStorage,\n): void {\n  const panelGroupKey = getPanelGroupKey(autoSaveId)\n  const panelKey = getPanelKey(panels)\n  const state = loadSerializedPanelGroupState(autoSaveId, storage) ?? {}\n\n  // Store the size units for each panel so we can restore them correctly\n  const sizeUnits: { [panelIndex: number]: 'px' | '%' } = {}\n  panels.forEach((panel, index) => {\n    const unit = panel.constraints.sizeUnit ?? '%'\n    if (unit === 'px') {\n      sizeUnits[index] = 'px'\n    }\n  })\n\n  state[panelKey] = {\n    expandToSizes: Object.fromEntries(panelSizesBeforeCollapse.entries()),\n    layout: sizes,\n    ...(Object.keys(sizeUnits).length > 0 && { sizeUnits }),\n  }\n\n  try {\n    storage.setItem(panelGroupKey, JSON.stringify(state))\n  }\n  catch (error) {\n    console.error(error)\n  }\n}\n","<script lang=\"ts\">\nimport type { CSSProperties, Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed, ref, toRefs, watch, watchEffect } from 'vue'\nimport { areEqual, createContext, useDirection, useForwardExpose, useId } from '@/shared'\nimport { useWindowSplitterPanelGroupBehavior } from './utils/composables/useWindowSplitterPanelGroupBehavior'\nimport {\n  initializeDefaultStorage,\n  loadPanelGroupState,\n  savePanelGroupState,\n} from './utils/storage'\n\nexport interface SplitterGroupProps extends PrimitiveProps {\n  /** Group id; falls back to `useId` when not provided. */\n  id?: string | null\n  /** Unique id used to auto-save group arrangement via `localStorage`. */\n  autoSaveId?: string | null\n  /** The group orientation of splitter. */\n  direction: Direction\n  /** Step size when arrow key was pressed. */\n  keyboardResizeBy?: number | null\n  /** Custom storage API; defaults to localStorage */\n  storage?: PanelGroupStorage\n}\n\nexport type SplitterGroupEmits = {\n  /** Event handler called when group layout changes */\n  layout: [val: number[]]\n}\n\nconst LOCAL_STORAGE_DEBOUNCE_INTERVAL = 100\n\nexport type PanelGroupStorage = {\n  getItem: (name: string) => string | null\n  setItem: (name: string, value: string) => void\n}\n\nconst defaultStorage: PanelGroupStorage = {\n  getItem: (name: string) => {\n    initializeDefaultStorage(defaultStorage)\n    return defaultStorage.getItem(name)\n  },\n  setItem: (name: string, value: string) => {\n    initializeDefaultStorage(defaultStorage)\n    defaultStorage.setItem(name, value)\n  },\n}\n\nexport type PanelGroupContext = {\n  direction: Ref<Direction>\n  dragState: DragState | null\n  groupId: string\n  reevaluatePanelConstraints: (panelData: PanelData, prevConstraints: PanelConstraints) => void\n  registerPanel: (panelData: PanelData) => void\n  registerResizeHandle: (dragHandleId: string) => ResizeHandler\n  resizePanel: (panelData: PanelData, size: number) => void\n  startDragging: (dragHandleId: string, event: ResizeEvent) => void\n  stopDragging: () => void\n  unregisterPanel: (panelData: PanelData) => void\n  panelGroupElement: Ref<ParentNode | null>\n\n  // Exposed function for child component\n  collapsePanel: (panelData: PanelData) => void\n  expandPanel: (panelData: PanelData) => void\n  isPanelCollapsed: (panelData: PanelData) => boolean\n  isPanelExpanded: (panelData: PanelData) => boolean\n  getPanelSize: (panelData: PanelData) => number\n  getPanelStyle: (panelData: PanelData, defaultSize: number | undefined) => CSSProperties\n}\n\nexport const [injectPanelGroupContext, providePanelGroupContext] = createContext<PanelGroupContext>('PanelGroup')\n</script>\n\n<script setup lang=\"ts\">\nimport type { PanelConstraints, PanelData } from './SplitterPanel.vue'\n\nimport type { Direction, DragState, ResizeEvent, ResizeHandler } from './utils/types'\nimport { Primitive } from '@/Primitive'\nimport { assert } from './utils/assert'\nimport { calculateDeltaPercentage, calculateUnsafeDefaultLayout } from './utils/calculate'\nimport { callPanelCallbacks } from './utils/callPanelCallbacks'\nimport { fuzzyCompareNumbers } from './utils/compare'\nimport debounce from './utils/debounce'\nimport { getResizeHandleElement } from './utils/dom'\nimport { getResizeEventCursorPosition, isKeyDown, isMouseEvent, isTouchEvent } from './utils/events'\nimport { adjustLayoutByDelta, compareLayouts } from './utils/layout'\nimport { determinePivotIndices } from './utils/pivot'\nimport {\n  EXCEEDED_HORIZONTAL_MAX,\n  EXCEEDED_HORIZONTAL_MIN,\n  EXCEEDED_VERTICAL_MAX,\n  EXCEEDED_VERTICAL_MIN,\n  reportConstraintsViolation,\n} from './utils/registry'\nimport { computePanelFlexBoxStyle } from './utils/style'\nimport { convertPanelConstraintsToPercent, hasPixelSizedPanel, recalculateLayoutForPixelPanels } from './utils/units'\nimport { validatePanelGroupLayout } from './utils/validation'\n\nconst props = withDefaults(defineProps<SplitterGroupProps>(), {\n  autoSaveId: null,\n  keyboardResizeBy: 10,\n  storage: () => defaultStorage,\n})\nconst emits = defineEmits<SplitterGroupEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current size of layout */\n    layout: typeof layout.value\n  }) => any\n}>()\n\nconst debounceMap: {\n  [key: string]: typeof savePanelGroupState\n} = {}\n\nconst { direction } = toRefs(props)\nconst groupId = useId(props.id, 'reka-splitter-group')\nconst dir = useDirection()\nconst { forwardRef, currentElement: panelGroupElementRef } = useForwardExpose()\n\nconst dragState = ref<DragState | null>(null)\nconst groupSizeInPixels = ref<number | null>(null)\nconst groupSizeAtLastLayoutInit = ref<number | null>(null)\nconst layout = ref<number[]>([])\nconst panelIdToLastNotifiedSizeMapRef = ref<Record<string, number>>({})\nconst panelSizeBeforeCollapseRef = ref<Map<string, number>>(new Map())\nconst prevDeltaRef = ref<number>(0)\n\nconst committedValuesRef = computed(() => ({\n  autoSaveId: props.autoSaveId,\n  direction: props.direction,\n  dragState: dragState.value,\n  id: groupId,\n  keyboardResizeBy: props.keyboardResizeBy,\n  storage: props.storage,\n}) satisfies {\n  autoSaveId: string | null\n  direction: Direction\n  dragState: DragState | null\n  id: string\n  keyboardResizeBy: number | null\n  storage: PanelGroupStorage\n})\n\nconst eagerValuesRef = ref<{\n  layout: number[]\n  panelDataArray: PanelData[]\n  panelDataArrayChanged: boolean\n}>({\n  layout: layout.value,\n  panelDataArray: [],\n  panelDataArrayChanged: false,\n})\n\nfunction getGroupSizeInPixels(): number | null {\n  if (groupSizeInPixels.value != null)\n    return groupSizeInPixels.value\n\n  const element = panelGroupElementRef.value\n  if (element && element instanceof HTMLElement) {\n    const rect = element.getBoundingClientRect()\n    const size = direction.value === 'horizontal' ? rect.width : rect.height\n\n    if (!Number.isNaN(size)) {\n      groupSizeInPixels.value = size\n      return size\n    }\n  }\n\n  return null\n}\n\nfunction getPanelConstraintsInPercent(groupSizeOverride?: number | null) {\n  const groupSize = groupSizeOverride ?? getGroupSizeInPixels()\n\n  return convertPanelConstraintsToPercent({\n    panelDataArray: eagerValuesRef.value.panelDataArray,\n    groupSizeInPixels: groupSize,\n  })\n}\n\nfunction getPanelDataWithPercentConstraints(groupSizeOverride?: number | null) {\n  const percentConstraints = getPanelConstraintsInPercent(groupSizeOverride)\n\n  if (!percentConstraints)\n    return null\n\n  return eagerValuesRef.value.panelDataArray.map((panelData, index) => ({\n    ...panelData,\n    constraints: percentConstraints[index],\n  }))\n}\n\nconst setLayout = (val: number[]) => layout.value = val\n\n/** Convert internal layout (always in %) to native units for each panel */\nfunction convertLayoutToNativeUnits(internalLayout: number[]): number[] {\n  const { panelDataArray } = eagerValuesRef.value\n  const groupSize = getGroupSizeInPixels()\n\n  return internalLayout.map((size, index) => {\n    const panelData = panelDataArray[index]\n    if (panelData && (panelData.constraints.sizeUnit ?? '%') === 'px' && groupSize != null) {\n      return (size / 100) * groupSize\n    }\n    return size\n  })\n}\n\nuseWindowSplitterPanelGroupBehavior({\n  eagerValuesRef,\n  groupId,\n  layout,\n  panelDataArray: eagerValuesRef.value.panelDataArray,\n  setLayout,\n  panelGroupElement: panelGroupElementRef,\n  getPanelDataWithPercentConstraints,\n})\n\nwatchEffect((onCleanup) => {\n  const element = panelGroupElementRef.value\n  if (!element)\n    return\n\n  if (typeof ResizeObserver !== 'function')\n    return\n\n  const resizeObserver = new ResizeObserver((entries) => {\n    const entry = entries[0]\n    if (!entry)\n      return\n\n    const { height, width } = entry.contentRect\n    const nextSize = direction.value === 'horizontal' ? width : height\n\n    if (!Number.isNaN(nextSize))\n      groupSizeInPixels.value = nextSize\n  })\n\n  if (element instanceof HTMLElement)\n    resizeObserver.observe(element)\n\n  onCleanup(() => resizeObserver.disconnect())\n})\n\nwatchEffect(() => {\n  const { panelDataArray } = eagerValuesRef.value\n  const { autoSaveId } = props\n  // If this panel has been configured to persist sizing information, save sizes to local storage.\n  if (autoSaveId) {\n    if (layout.value.length === 0 || layout.value.length !== panelDataArray.length)\n      return\n\n    let debouncedSave = debounceMap[autoSaveId]\n\n    // Limit the frequency of localStorage updates.\n    if (!debouncedSave) {\n      debouncedSave = debounce(\n        savePanelGroupState,\n        LOCAL_STORAGE_DEBOUNCE_INTERVAL,\n      )\n\n      debounceMap[autoSaveId] = debouncedSave\n    }\n\n    // Clone mutable data before passing to the debounced function,\n    // else we run the risk of saving an incorrect combination of mutable and immutable values to state.\n    const clonedPanelDataArray = [...panelDataArray]\n    const clonedPanelSizesBeforeCollapse = new Map(\n      panelSizeBeforeCollapseRef.value,\n    )\n\n    debouncedSave(\n      autoSaveId,\n      clonedPanelDataArray,\n      clonedPanelSizesBeforeCollapse,\n      layout.value,\n      props.storage,\n    )\n  }\n})\n\nfunction getPanelStyle(panelData: PanelData, defaultSize: number | undefined) {\n  const { panelDataArray } = eagerValuesRef.value\n\n  const panelIndex = findPanelDataIndex(panelDataArray, panelData)\n\n  return computePanelFlexBoxStyle({\n    defaultSize,\n    dragState: dragState.value,\n    layout: layout.value,\n    panelData: panelDataArray,\n    panelIndex,\n  })\n}\n\nfunction registerPanel(panelData: PanelData) {\n  const { panelDataArray } = eagerValuesRef.value\n\n  panelDataArray.push(panelData)\n  panelDataArray.sort((panelA, panelB) => {\n    const orderA = panelA.order\n    const orderB = panelB.order\n    if (orderA == null && orderB == null)\n      return 0\n    else if (orderA == null)\n      return -1\n    else if (orderB == null)\n      return 1\n    else\n      return orderA - orderB\n  })\n\n  eagerValuesRef.value.panelDataArrayChanged = true\n}\n\n// (Re)calculate group layout whenever panels are registered or unregistered.\n// useIsomorphicLayoutEffect\nwatch(() => eagerValuesRef.value.panelDataArrayChanged, () => {\n  if (eagerValuesRef.value.panelDataArrayChanged) {\n    eagerValuesRef.value.panelDataArrayChanged = false\n\n    const { autoSaveId, storage } = committedValuesRef.value\n    const { layout: prevLayout, panelDataArray } = eagerValuesRef.value\n\n    // If this panel has been configured to persist sizing information,\n    // default size should be restored from local storage if possible.\n    let unsafeLayout: number[] | null = null\n    if (autoSaveId) {\n      const state = loadPanelGroupState(autoSaveId, panelDataArray, storage)\n      if (state) {\n        panelSizeBeforeCollapseRef.value = new Map(\n          Object.entries(state.expandToSizes),\n        )\n        unsafeLayout = state.layout\n      }\n    }\n\n    if (unsafeLayout === null) {\n      const panelDataArrayWithPercentConstraints = getPanelDataWithPercentConstraints()\n      if (!panelDataArrayWithPercentConstraints)\n        return\n\n      unsafeLayout = calculateUnsafeDefaultLayout({\n        panelDataArray: panelDataArrayWithPercentConstraints,\n      })\n    }\n\n    const panelConstraints = getPanelConstraintsInPercent()\n    if (!panelConstraints)\n      return\n\n    // Validate even saved layouts in case something has changed since last render\n    // e.g. for pixel groups, this could be the size of the window\n    const nextLayout = validatePanelGroupLayout({\n      layout: unsafeLayout,\n      panelConstraints,\n    })\n\n    // Track the group size used for this initialization.\n    // Used to detect when a nested px group was measured with an unreliable (too small)\n    // container size before the outer group finished layout.\n    groupSizeAtLastLayoutInit.value = getGroupSizeInPixels()\n\n    if (!areEqual(prevLayout, nextLayout)) {\n      setLayout(nextLayout)\n\n      eagerValuesRef.value.layout = nextLayout\n      emits('layout', convertLayoutToNativeUnits(nextLayout))\n\n      callPanelCallbacks(\n        panelDataArray,\n        nextLayout,\n        panelIdToLastNotifiedSizeMapRef.value,\n        getGroupSizeInPixels(),\n      )\n    }\n  }\n})\n\nwatch(groupSizeInPixels, (nextSize, prevSize) => {\n  if (prevSize == null || nextSize == null)\n    return\n\n  const { layout: prevLayout, panelDataArray } = eagerValuesRef.value\n  if (prevLayout.length === 0)\n    return\n  if (!hasPixelSizedPanel(panelDataArray))\n    return\n\n  // Detect if the layout was initialized with an unreliably small container.\n  // This happens with nested SplitterGroups using sizeUnit=\"px\": the inner group's\n  // ResizeObserver fires before the outer group's flex layout completes, giving a\n  // near-zero container size (e.g. 3.45px). When the outer group finishes and the\n  // container grows to its real size (e.g. 923px), we must re-initialize rather\n  // than recalculate (which would \"preserve\" the garbage pixel sizes from 3.45px).\n  // We guard with initSize < 50 so that legitimately small-but-real containers\n  // (e.g. a sidebar at 60px) are not accidentally re-initialized on normal resizes.\n  const initSize = groupSizeAtLastLayoutInit.value\n  if (initSize != null && initSize > 0 && initSize < 50 && nextSize > initSize * 10) {\n    eagerValuesRef.value.panelDataArrayChanged = true\n    return\n  }\n\n  const recalculatedLayout = recalculateLayoutForPixelPanels({\n    layout: prevLayout,\n    panelDataArray,\n    prevGroupSize: prevSize,\n    nextGroupSize: nextSize,\n  })\n\n  if (!recalculatedLayout)\n    return\n\n  const panelConstraints = getPanelConstraintsInPercent(nextSize)\n  if (!panelConstraints)\n    return\n\n  const nextLayout = validatePanelGroupLayout({\n    layout: recalculatedLayout,\n    panelConstraints,\n  })\n\n  if (!compareLayouts(prevLayout, nextLayout)) {\n    setLayout(nextLayout)\n\n    eagerValuesRef.value.layout = nextLayout\n    emits('layout', convertLayoutToNativeUnits(nextLayout))\n\n    callPanelCallbacks(\n      panelDataArray,\n      nextLayout,\n      panelIdToLastNotifiedSizeMapRef.value,\n      getGroupSizeInPixels(),\n    )\n  }\n})\n\nfunction registerResizeHandle(dragHandleId: string) {\n  return function resizeHandler(event: ResizeEvent) {\n    event.preventDefault()\n    const panelGroupElement = panelGroupElementRef.value\n    if (!panelGroupElement)\n      return () => null\n\n    const { direction, dragState, id: groupId, keyboardResizeBy } = committedValuesRef.value\n    const { layout: prevLayout, panelDataArray } = eagerValuesRef.value\n\n    const { initialLayout } = dragState ?? {}\n\n    const pivotIndices = determinePivotIndices(\n      groupId,\n      dragHandleId,\n      panelGroupElement,\n    )\n\n    let delta = calculateDeltaPercentage(\n      event,\n      dragHandleId,\n      direction,\n      dragState,\n      keyboardResizeBy,\n      panelGroupElement,\n    )\n    if (delta === 0)\n      return\n\n    // Support RTL layouts\n    const isHorizontal = direction === 'horizontal'\n    if (dir.value === 'rtl' && isHorizontal)\n      delta = -delta\n\n    const panelConstraints = getPanelConstraintsInPercent()\n    if (!panelConstraints)\n      return\n\n    const nextLayout = adjustLayoutByDelta({\n      delta,\n      layout: initialLayout ?? prevLayout,\n      panelConstraints,\n      pivotIndices,\n      trigger: isKeyDown(event) ? 'keyboard' : 'mouse-or-touch',\n    })\n\n    const layoutChanged = !compareLayouts(prevLayout, nextLayout)\n\n    // Only update the cursor for layout changes triggered by touch/mouse events (not keyboard)\n    // Update the cursor even if the layout hasn't changed (we may need to show an invalid cursor state)\n    if (isMouseEvent(event) || isTouchEvent(event)) {\n      // Watch for multiple subsequent deltas; this might occur for tiny cursor movements.\n      // In this case, Panel sizes might not change–\n      // but updating cursor in this scenario would cause a flicker.\n      if (prevDeltaRef.value !== delta) {\n        prevDeltaRef.value = delta\n\n        if (!layoutChanged) {\n          // If the pointer has moved too far to resize the panel any further, note this so we can update the cursor.\n          // This mimics VS Code behavior.\n          if (isHorizontal) {\n            reportConstraintsViolation(\n              dragHandleId,\n              delta < 0 ? EXCEEDED_HORIZONTAL_MIN : EXCEEDED_HORIZONTAL_MAX,\n            )\n          }\n          else {\n            reportConstraintsViolation(\n              dragHandleId,\n              delta < 0 ? EXCEEDED_VERTICAL_MIN : EXCEEDED_VERTICAL_MAX,\n            )\n          }\n        }\n        else {\n          reportConstraintsViolation(dragHandleId, 0)\n        }\n      }\n    }\n\n    if (layoutChanged) {\n      setLayout(nextLayout)\n\n      eagerValuesRef.value.layout = nextLayout\n      emits('layout', convertLayoutToNativeUnits(nextLayout))\n\n      callPanelCallbacks(\n        panelDataArray,\n        nextLayout,\n        panelIdToLastNotifiedSizeMapRef.value,\n        getGroupSizeInPixels(),\n      )\n    }\n  }\n}\n\nfunction resizePanel(panelData: PanelData, unsafePanelSize: number) {\n  const { layout: prevLayout, panelDataArray } = eagerValuesRef.value\n\n  const panelConstraintsArray = getPanelConstraintsInPercent()\n  if (!panelConstraintsArray)\n    return\n\n  const panelIndex = findPanelDataIndex(panelDataArray, panelData)\n  const panelUnit = panelData.constraints.sizeUnit ?? '%'\n\n  // Convert px to percent if needed for internal calculation\n  let sizeInPercent = unsafePanelSize\n  if (panelUnit === 'px') {\n    const groupSize = getGroupSizeInPixels()\n    if (groupSize != null) {\n      sizeInPercent = (unsafePanelSize / groupSize) * 100\n    }\n  }\n\n  const { panelSize, pivotIndices } = panelDataHelper(\n    panelDataArray,\n    panelData,\n    prevLayout,\n    panelConstraintsArray,\n  )\n\n  assert(panelSize != null)\n\n  const isLastPanel = panelIndex === panelDataArray.length - 1\n  const delta = isLastPanel\n    ? panelSize - sizeInPercent\n    : sizeInPercent - panelSize\n\n  const nextLayout = adjustLayoutByDelta({\n    delta,\n    layout: prevLayout,\n    panelConstraints: panelConstraintsArray,\n    pivotIndices,\n    trigger: 'imperative-api',\n  })\n\n  if (!compareLayouts(prevLayout, nextLayout)) {\n    setLayout(nextLayout)\n\n    eagerValuesRef.value.layout = nextLayout\n    emits('layout', convertLayoutToNativeUnits(nextLayout))\n\n    callPanelCallbacks(\n      panelDataArray,\n      nextLayout,\n      panelIdToLastNotifiedSizeMapRef.value,\n      getGroupSizeInPixels(),\n    )\n  }\n}\n\nfunction reevaluatePanelConstraints(panelData: PanelData, prevConstraints: PanelConstraints) {\n  const { layout, panelDataArray } = eagerValuesRef.value\n  const index = findPanelDataIndex(panelDataArray, panelData)\n  panelDataArray[index] = panelData\n  eagerValuesRef.value.panelDataArrayChanged = true\n\n  const panelConstraintsArray = getPanelConstraintsInPercent()\n  if (!panelConstraintsArray)\n    return\n\n  const nextConstraints = panelConstraintsArray[index]\n  const { panelSize: prevPanelSize } = panelDataHelper(\n    panelDataArray,\n    panelData,\n    layout,\n    panelConstraintsArray,\n  )\n\n  if (prevPanelSize === null)\n    return\n\n  const nextCollapsedSize = nextConstraints?.collapsedSize ?? 0\n  const nextMaxSize = nextConstraints?.maxSize ?? 100\n  const nextMinSize = nextConstraints?.minSize ?? 0\n\n  if (nextConstraints?.collapsible && isPanelCollapsed(panelData)) {\n    if (prevPanelSize !== nextCollapsedSize)\n      resizePanel(panelData, nextCollapsedSize)\n  }\n  else if (prevPanelSize < nextMinSize) {\n    resizePanel(panelData, nextMinSize)\n  }\n  else if (prevPanelSize > nextMaxSize) {\n    resizePanel(panelData, nextMaxSize)\n  }\n}\n\nfunction startDragging(dragHandleId: string, event: ResizeEvent) {\n  const { direction } = committedValuesRef.value\n  const { layout } = eagerValuesRef.value\n  if (!panelGroupElementRef.value)\n    return\n\n  const handleElement = getResizeHandleElement(\n    dragHandleId,\n    panelGroupElementRef.value,\n  )\n  assert(handleElement)\n\n  const initialCursorPosition = getResizeEventCursorPosition(\n    direction,\n    event,\n  )\n\n  dragState.value = {\n    dragHandleId,\n    dragHandleRect: handleElement.getBoundingClientRect(),\n    initialCursorPosition,\n    initialLayout: layout,\n  }\n}\nfunction stopDragging() {\n  dragState.value = null\n}\n\nfunction unregisterPanel(panelData: PanelData) {\n  const { panelDataArray } = eagerValuesRef.value\n\n  const index = findPanelDataIndex(panelDataArray, panelData)\n  if (index >= 0) {\n    panelDataArray.splice(index, 1)\n\n    // TRICKY\n    // When a panel is removed from the group, we should delete the most recent prev-size entry for it.\n    // If we don't do this, then a conditionally rendered panel might not call onResize when it's re-mounted.\n    // Strict effects mode makes this tricky though because all panels will be registered, unregistered, then re-registered on mount.\n    delete panelIdToLastNotifiedSizeMapRef.value[panelData.id]\n\n    eagerValuesRef.value.panelDataArrayChanged = true\n  }\n}\n\nfunction collapsePanel(panelData: PanelData) {\n  const { layout: prevLayout, panelDataArray } = eagerValuesRef.value\n\n  if (panelData.constraints.collapsible) {\n    const panelConstraintsArray = getPanelConstraintsInPercent()\n    if (!panelConstraintsArray)\n      return\n\n    const {\n      collapsedSize = 0,\n      panelSize,\n      pivotIndices,\n    } = panelDataHelper(panelDataArray, panelData, prevLayout, panelConstraintsArray)\n\n    assert(\n      panelSize != null,\n      `Panel size not found for panel \"${panelData.id}\"`,\n    )\n\n    if (panelSize !== collapsedSize) {\n      // Store size before collapse;\n      // This is the size that gets restored if the expand() API is used.\n      const sizeUnit = panelData.constraints.sizeUnit ?? '%'\n      const groupSize = groupSizeInPixels.value ?? getGroupSizeInPixels()\n      const sizeBeforeCollapse = sizeUnit === 'px' && groupSize\n        ? (panelSize / 100) * groupSize\n        : panelSize\n\n      panelSizeBeforeCollapseRef.value.set(panelData.id, sizeBeforeCollapse)\n\n      const isLastPanel\n        = findPanelDataIndex(panelDataArray, panelData)\n          === panelDataArray.length - 1\n      const delta = isLastPanel\n        ? panelSize - collapsedSize\n        : collapsedSize - panelSize\n\n      const nextLayout = adjustLayoutByDelta({\n        delta,\n        layout: prevLayout,\n        panelConstraints: panelConstraintsArray,\n        pivotIndices,\n        trigger: 'imperative-api',\n      })\n\n      if (!compareLayouts(prevLayout, nextLayout)) {\n        setLayout(nextLayout)\n\n        eagerValuesRef.value.layout = nextLayout\n\n        emits('layout', convertLayoutToNativeUnits(nextLayout))\n\n        callPanelCallbacks(\n          panelDataArray,\n          nextLayout,\n          panelIdToLastNotifiedSizeMapRef.value,\n          getGroupSizeInPixels(),\n        )\n      }\n    }\n  }\n}\n\nfunction expandPanel(panelData: PanelData) {\n  const { layout: prevLayout, panelDataArray } = eagerValuesRef.value\n\n  if (panelData.constraints.collapsible) {\n    const panelConstraintsArray = getPanelConstraintsInPercent()\n    if (!panelConstraintsArray)\n      return\n\n    const {\n      collapsedSize = 0,\n      panelSize = 0,\n      minSize = 0,\n      pivotIndices,\n    } = panelDataHelper(panelDataArray, panelData, prevLayout, panelConstraintsArray)\n\n    if (fuzzyCompareNumbers(panelSize, collapsedSize) <= 0) {\n      // Restore this panel to the size it was before it was collapsed, if possible.\n      const prevPanelSize = panelSizeBeforeCollapseRef.value.get(\n        panelData.id,\n      )\n      const sizeUnit = panelData.constraints.sizeUnit ?? '%'\n      const groupSize = groupSizeInPixels.value ?? getGroupSizeInPixels()\n\n      const restoredSize\n        = sizeUnit === 'px' && groupSize\n          ? prevPanelSize != null\n            ? (prevPanelSize / groupSize) * 100\n            : null\n          : prevPanelSize\n\n      const baseSize\n        = restoredSize != null && restoredSize >= minSize\n          ? restoredSize\n          : minSize\n\n      const isLastPanel\n        = findPanelDataIndex(panelDataArray, panelData)\n          === panelDataArray.length - 1\n      const delta = isLastPanel ? panelSize - baseSize : baseSize - panelSize\n\n      const nextLayout = adjustLayoutByDelta({\n        delta,\n        layout: prevLayout,\n        panelConstraints: panelConstraintsArray,\n        pivotIndices,\n        trigger: 'imperative-api',\n      })\n\n      if (!compareLayouts(prevLayout, nextLayout)) {\n        setLayout(nextLayout)\n\n        eagerValuesRef.value.layout = nextLayout\n\n        emits('layout', convertLayoutToNativeUnits(nextLayout))\n\n        callPanelCallbacks(\n          panelDataArray,\n          nextLayout,\n          panelIdToLastNotifiedSizeMapRef.value,\n          getGroupSizeInPixels(),\n        )\n      }\n    }\n  }\n}\n\nfunction getPanelSize(panelData: PanelData) {\n  const { layout, panelDataArray } = eagerValuesRef.value\n\n  const { panelSize } = panelDataHelper(panelDataArray, panelData, layout)\n\n  assert(\n    panelSize != null,\n    `Panel size not found for panel \"${panelData.id}\"`,\n  )\n\n  // If the panel uses px units, convert from percent back to px\n  const panelUnit = panelData.constraints.sizeUnit ?? '%'\n  if (panelUnit === 'px') {\n    const groupSize = getGroupSizeInPixels()\n    if (groupSize != null) {\n      return (panelSize / 100) * groupSize\n    }\n  }\n\n  return panelSize\n}\n\nfunction isPanelCollapsed(panelData: PanelData) {\n  const { layout, panelDataArray } = eagerValuesRef.value\n\n  const panelConstraintsArray = getPanelConstraintsInPercent()\n\n  const {\n    collapsedSize = 0,\n    collapsible,\n    panelSize,\n  } = panelDataHelper(\n    panelDataArray,\n    panelData,\n    layout,\n    panelConstraintsArray ?? undefined,\n  )\n\n  if (!collapsible)\n    return false\n\n  // panelSize is undefined during ssr due to vue ssr reactivity limitation.\n  if (panelSize === undefined) {\n    const panelIndex = findPanelDataIndex(panelDataArray, panelData)\n    const constraints = panelConstraintsArray?.[panelIndex] ?? panelData.constraints\n    return constraints.defaultSize === constraints.collapsedSize\n  }\n  else {\n    return panelSize === collapsedSize\n  }\n}\n\nfunction isPanelExpanded(panelData: PanelData) {\n  const { layout, panelDataArray } = eagerValuesRef.value\n\n  const panelConstraintsArray = getPanelConstraintsInPercent()\n\n  const {\n    collapsedSize = 0,\n    collapsible,\n    panelSize,\n  } = panelDataHelper(\n    panelDataArray,\n    panelData,\n    layout,\n    panelConstraintsArray ?? undefined,\n  )\n\n  assert(\n    panelSize != null,\n    `Panel size not found for panel \"${panelData.id}\"`,\n  )\n\n  return !collapsible || panelSize > collapsedSize\n}\n\nprovidePanelGroupContext({\n  direction,\n  dragState: dragState.value,\n  groupId,\n  reevaluatePanelConstraints,\n  registerPanel,\n  registerResizeHandle,\n  resizePanel,\n  startDragging,\n  stopDragging,\n  unregisterPanel,\n  panelGroupElement: panelGroupElementRef,\n\n  collapsePanel,\n  expandPanel,\n  isPanelCollapsed,\n  isPanelExpanded,\n  getPanelSize,\n  getPanelStyle,\n})\n\nfunction findPanelDataIndex(panelDataArray: PanelData[], panelData: PanelData) {\n  return panelDataArray.findIndex(\n    prevPanelData =>\n      prevPanelData === panelData || prevPanelData.id === panelData.id,\n  )\n}\n\nfunction panelDataHelper(\n  panelDataArray: PanelData[],\n  panelData: PanelData,\n  layout: number[],\n  panelConstraints?: PanelConstraints[] | null,\n) {\n  const panelIndex = findPanelDataIndex(panelDataArray, panelData)\n\n  const isLastPanel = panelIndex === panelDataArray.length - 1\n  const pivotIndices = isLastPanel\n    ? [panelIndex - 1, panelIndex]\n    : [panelIndex, panelIndex + 1]\n\n  const constraints = panelConstraints ?? getPanelConstraintsInPercent()\n  const panelConstraintsFromGroup = constraints?.[panelIndex]\n\n  const panelSize = layout[panelIndex]\n\n  return {\n    ...(panelConstraintsFromGroup ?? panelData.constraints),\n    panelSize,\n    pivotIndices,\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :style=\"{\n      display: 'flex',\n      flexDirection: direction === 'horizontal' ? 'row' : 'column',\n      height: '100%',\n      overflow: 'hidden',\n      width: '100%',\n    }\"\n    data-panel-group=\"\"\n    :data-orientation=\"direction\"\n    :data-panel-group-id=\"groupId\"\n  >\n    <slot :layout=\"layout\" />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { CSSProperties, Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed, ref, toRefs, watch, watchEffect } from 'vue'\nimport { areEqual, createContext, useDirection, useForwardExpose, useId } from '@/shared'\nimport { useWindowSplitterPanelGroupBehavior } from './utils/composables/useWindowSplitterPanelGroupBehavior'\nimport {\n  initializeDefaultStorage,\n  loadPanelGroupState,\n  savePanelGroupState,\n} from './utils/storage'\n\nexport interface SplitterGroupProps extends PrimitiveProps {\n  /** Group id; falls back to `useId` when not provided. */\n  id?: string | null\n  /** Unique id used to auto-save group arrangement via `localStorage`. */\n  autoSaveId?: string | null\n  /** The group orientation of splitter. */\n  direction: Direction\n  /** Step size when arrow key was pressed. */\n  keyboardResizeBy?: number | null\n  /** Custom storage API; defaults to localStorage */\n  storage?: PanelGroupStorage\n}\n\nexport type SplitterGroupEmits = {\n  /** Event handler called when group layout changes */\n  layout: [val: number[]]\n}\n\nconst LOCAL_STORAGE_DEBOUNCE_INTERVAL = 100\n\nexport type PanelGroupStorage = {\n  getItem: (name: string) => string | null\n  setItem: (name: string, value: string) => void\n}\n\nconst defaultStorage: PanelGroupStorage = {\n  getItem: (name: string) => {\n    initializeDefaultStorage(defaultStorage)\n    return defaultStorage.getItem(name)\n  },\n  setItem: (name: string, value: string) => {\n    initializeDefaultStorage(defaultStorage)\n    defaultStorage.setItem(name, value)\n  },\n}\n\nexport type PanelGroupContext = {\n  direction: Ref<Direction>\n  dragState: DragState | null\n  groupId: string\n  reevaluatePanelConstraints: (panelData: PanelData, prevConstraints: PanelConstraints) => void\n  registerPanel: (panelData: PanelData) => void\n  registerResizeHandle: (dragHandleId: string) => ResizeHandler\n  resizePanel: (panelData: PanelData, size: number) => void\n  startDragging: (dragHandleId: string, event: ResizeEvent) => void\n  stopDragging: () => void\n  unregisterPanel: (panelData: PanelData) => void\n  panelGroupElement: Ref<ParentNode | null>\n\n  // Exposed function for child component\n  collapsePanel: (panelData: PanelData) => void\n  expandPanel: (panelData: PanelData) => void\n  isPanelCollapsed: (panelData: PanelData) => boolean\n  isPanelExpanded: (panelData: PanelData) => boolean\n  getPanelSize: (panelData: PanelData) => number\n  getPanelStyle: (panelData: PanelData, defaultSize: number | undefined) => CSSProperties\n}\n\nexport const [injectPanelGroupContext, providePanelGroupContext] = createContext<PanelGroupContext>('PanelGroup')\n</script>\n\n<script setup lang=\"ts\">\nimport type { PanelConstraints, PanelData } from './SplitterPanel.vue'\n\nimport type { Direction, DragState, ResizeEvent, ResizeHandler } from './utils/types'\nimport { Primitive } from '@/Primitive'\nimport { assert } from './utils/assert'\nimport { calculateDeltaPercentage, calculateUnsafeDefaultLayout } from './utils/calculate'\nimport { callPanelCallbacks } from './utils/callPanelCallbacks'\nimport { fuzzyCompareNumbers } from './utils/compare'\nimport debounce from './utils/debounce'\nimport { getResizeHandleElement } from './utils/dom'\nimport { getResizeEventCursorPosition, isKeyDown, isMouseEvent, isTouchEvent } from './utils/events'\nimport { adjustLayoutByDelta, compareLayouts } from './utils/layout'\nimport { determinePivotIndices } from './utils/pivot'\nimport {\n  EXCEEDED_HORIZONTAL_MAX,\n  EXCEEDED_HORIZONTAL_MIN,\n  EXCEEDED_VERTICAL_MAX,\n  EXCEEDED_VERTICAL_MIN,\n  reportConstraintsViolation,\n} from './utils/registry'\nimport { computePanelFlexBoxStyle } from './utils/style'\nimport { convertPanelConstraintsToPercent, hasPixelSizedPanel, recalculateLayoutForPixelPanels } from './utils/units'\nimport { validatePanelGroupLayout } from './utils/validation'\n\nconst props = withDefaults(defineProps<SplitterGroupProps>(), {\n  autoSaveId: null,\n  keyboardResizeBy: 10,\n  storage: () => defaultStorage,\n})\nconst emits = defineEmits<SplitterGroupEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current size of layout */\n    layout: typeof layout.value\n  }) => any\n}>()\n\nconst debounceMap: {\n  [key: string]: typeof savePanelGroupState\n} = {}\n\nconst { direction } = toRefs(props)\nconst groupId = useId(props.id, 'reka-splitter-group')\nconst dir = useDirection()\nconst { forwardRef, currentElement: panelGroupElementRef } = useForwardExpose()\n\nconst dragState = ref<DragState | null>(null)\nconst groupSizeInPixels = ref<number | null>(null)\nconst groupSizeAtLastLayoutInit = ref<number | null>(null)\nconst layout = ref<number[]>([])\nconst panelIdToLastNotifiedSizeMapRef = ref<Record<string, number>>({})\nconst panelSizeBeforeCollapseRef = ref<Map<string, number>>(new Map())\nconst prevDeltaRef = ref<number>(0)\n\nconst committedValuesRef = computed(() => ({\n  autoSaveId: props.autoSaveId,\n  direction: props.direction,\n  dragState: dragState.value,\n  id: groupId,\n  keyboardResizeBy: props.keyboardResizeBy,\n  storage: props.storage,\n}) satisfies {\n  autoSaveId: string | null\n  direction: Direction\n  dragState: DragState | null\n  id: string\n  keyboardResizeBy: number | null\n  storage: PanelGroupStorage\n})\n\nconst eagerValuesRef = ref<{\n  layout: number[]\n  panelDataArray: PanelData[]\n  panelDataArrayChanged: boolean\n}>({\n  layout: layout.value,\n  panelDataArray: [],\n  panelDataArrayChanged: false,\n})\n\nfunction getGroupSizeInPixels(): number | null {\n  if (groupSizeInPixels.value != null)\n    return groupSizeInPixels.value\n\n  const element = panelGroupElementRef.value\n  if (element && element instanceof HTMLElement) {\n    const rect = element.getBoundingClientRect()\n    const size = direction.value === 'horizontal' ? rect.width : rect.height\n\n    if (!Number.isNaN(size)) {\n      groupSizeInPixels.value = size\n      return size\n    }\n  }\n\n  return null\n}\n\nfunction getPanelConstraintsInPercent(groupSizeOverride?: number | null) {\n  const groupSize = groupSizeOverride ?? getGroupSizeInPixels()\n\n  return convertPanelConstraintsToPercent({\n    panelDataArray: eagerValuesRef.value.panelDataArray,\n    groupSizeInPixels: groupSize,\n  })\n}\n\nfunction getPanelDataWithPercentConstraints(groupSizeOverride?: number | null) {\n  const percentConstraints = getPanelConstraintsInPercent(groupSizeOverride)\n\n  if (!percentConstraints)\n    return null\n\n  return eagerValuesRef.value.panelDataArray.map((panelData, index) => ({\n    ...panelData,\n    constraints: percentConstraints[index],\n  }))\n}\n\nconst setLayout = (val: number[]) => layout.value = val\n\n/** Convert internal layout (always in %) to native units for each panel */\nfunction convertLayoutToNativeUnits(internalLayout: number[]): number[] {\n  const { panelDataArray } = eagerValuesRef.value\n  const groupSize = getGroupSizeInPixels()\n\n  return internalLayout.map((size, index) => {\n    const panelData = panelDataArray[index]\n    if (panelData && (panelData.constraints.sizeUnit ?? '%') === 'px' && groupSize != null) {\n      return (size / 100) * groupSize\n    }\n    return size\n  })\n}\n\nuseWindowSplitterPanelGroupBehavior({\n  eagerValuesRef,\n  groupId,\n  layout,\n  panelDataArray: eagerValuesRef.value.panelDataArray,\n  setLayout,\n  panelGroupElement: panelGroupElementRef,\n  getPanelDataWithPercentConstraints,\n})\n\nwatchEffect((onCleanup) => {\n  const element = panelGroupElementRef.value\n  if (!element)\n    return\n\n  if (typeof ResizeObserver !== 'function')\n    return\n\n  const resizeObserver = new ResizeObserver((entries) => {\n    const entry = entries[0]\n    if (!entry)\n      return\n\n    const { height, width } = entry.contentRect\n    const nextSize = direction.value === 'horizontal' ? width : height\n\n    if (!Number.isNaN(nextSize))\n      groupSizeInPixels.value = nextSize\n  })\n\n  if (element instanceof HTMLElement)\n    resizeObserver.observe(element)\n\n  onCleanup(() => resizeObserver.disconnect())\n})\n\nwatchEffect(() => {\n  const { panelDataArray } = eagerValuesRef.value\n  const { autoSaveId } = props\n  // If this panel has been configured to persist sizing information, save sizes to local storage.\n  if (autoSaveId) {\n    if (layout.value.length === 0 || layout.value.length !== panelDataArray.length)\n      return\n\n    let debouncedSave = debounceMap[autoSaveId]\n\n    // Limit the frequency of localStorage updates.\n    if (!debouncedSave) {\n      debouncedSave = debounce(\n        savePanelGroupState,\n        LOCAL_STORAGE_DEBOUNCE_INTERVAL,\n      )\n\n      debounceMap[autoSaveId] = debouncedSave\n    }\n\n    // Clone mutable data before passing to the debounced function,\n    // else we run the risk of saving an incorrect combination of mutable and immutable values to state.\n    const clonedPanelDataArray = [...panelDataArray]\n    const clonedPanelSizesBeforeCollapse = new Map(\n      panelSizeBeforeCollapseRef.value,\n    )\n\n    debouncedSave(\n      autoSaveId,\n      clonedPanelDataArray,\n      clonedPanelSizesBeforeCollapse,\n      layout.value,\n      props.storage,\n    )\n  }\n})\n\nfunction getPanelStyle(panelData: PanelData, defaultSize: number | undefined) {\n  const { panelDataArray } = eagerValuesRef.value\n\n  const panelIndex = findPanelDataIndex(panelDataArray, panelData)\n\n  return computePanelFlexBoxStyle({\n    defaultSize,\n    dragState: dragState.value,\n    layout: layout.value,\n    panelData: panelDataArray,\n    panelIndex,\n  })\n}\n\nfunction registerPanel(panelData: PanelData) {\n  const { panelDataArray } = eagerValuesRef.value\n\n  panelDataArray.push(panelData)\n  panelDataArray.sort((panelA, panelB) => {\n    const orderA = panelA.order\n    const orderB = panelB.order\n    if (orderA == null && orderB == null)\n      return 0\n    else if (orderA == null)\n      return -1\n    else if (orderB == null)\n      return 1\n    else\n      return orderA - orderB\n  })\n\n  eagerValuesRef.value.panelDataArrayChanged = true\n}\n\n// (Re)calculate group layout whenever panels are registered or unregistered.\n// useIsomorphicLayoutEffect\nwatch(() => eagerValuesRef.value.panelDataArrayChanged, () => {\n  if (eagerValuesRef.value.panelDataArrayChanged) {\n    eagerValuesRef.value.panelDataArrayChanged = false\n\n    const { autoSaveId, storage } = committedValuesRef.value\n    const { layout: prevLayout, panelDataArray } = eagerValuesRef.value\n\n    // If this panel has been configured to persist sizing information,\n    // default size should be restored from local storage if possible.\n    let unsafeLayout: number[] | null = null\n    if (autoSaveId) {\n      const state = loadPanelGroupState(autoSaveId, panelDataArray, storage)\n      if (state) {\n        panelSizeBeforeCollapseRef.value = new Map(\n          Object.entries(state.expandToSizes),\n        )\n        unsafeLayout = state.layout\n      }\n    }\n\n    if (unsafeLayout === null) {\n      const panelDataArrayWithPercentConstraints = getPanelDataWithPercentConstraints()\n      if (!panelDataArrayWithPercentConstraints)\n        return\n\n      unsafeLayout = calculateUnsafeDefaultLayout({\n        panelDataArray: panelDataArrayWithPercentConstraints,\n      })\n    }\n\n    const panelConstraints = getPanelConstraintsInPercent()\n    if (!panelConstraints)\n      return\n\n    // Validate even saved layouts in case something has changed since last render\n    // e.g. for pixel groups, this could be the size of the window\n    const nextLayout = validatePanelGroupLayout({\n      layout: unsafeLayout,\n      panelConstraints,\n    })\n\n    // Track the group size used for this initialization.\n    // Used to detect when a nested px group was measured with an unreliable (too small)\n    // container size before the outer group finished layout.\n    groupSizeAtLastLayoutInit.value = getGroupSizeInPixels()\n\n    if (!areEqual(prevLayout, nextLayout)) {\n      setLayout(nextLayout)\n\n      eagerValuesRef.value.layout = nextLayout\n      emits('layout', convertLayoutToNativeUnits(nextLayout))\n\n      callPanelCallbacks(\n        panelDataArray,\n        nextLayout,\n        panelIdToLastNotifiedSizeMapRef.value,\n        getGroupSizeInPixels(),\n      )\n    }\n  }\n})\n\nwatch(groupSizeInPixels, (nextSize, prevSize) => {\n  if (prevSize == null || nextSize == null)\n    return\n\n  const { layout: prevLayout, panelDataArray } = eagerValuesRef.value\n  if (prevLayout.length === 0)\n    return\n  if (!hasPixelSizedPanel(panelDataArray))\n    return\n\n  // Detect if the layout was initialized with an unreliably small container.\n  // This happens with nested SplitterGroups using sizeUnit=\"px\": the inner group's\n  // ResizeObserver fires before the outer group's flex layout completes, giving a\n  // near-zero container size (e.g. 3.45px). When the outer group finishes and the\n  // container grows to its real size (e.g. 923px), we must re-initialize rather\n  // than recalculate (which would \"preserve\" the garbage pixel sizes from 3.45px).\n  // We guard with initSize < 50 so that legitimately small-but-real containers\n  // (e.g. a sidebar at 60px) are not accidentally re-initialized on normal resizes.\n  const initSize = groupSizeAtLastLayoutInit.value\n  if (initSize != null && initSize > 0 && initSize < 50 && nextSize > initSize * 10) {\n    eagerValuesRef.value.panelDataArrayChanged = true\n    return\n  }\n\n  const recalculatedLayout = recalculateLayoutForPixelPanels({\n    layout: prevLayout,\n    panelDataArray,\n    prevGroupSize: prevSize,\n    nextGroupSize: nextSize,\n  })\n\n  if (!recalculatedLayout)\n    return\n\n  const panelConstraints = getPanelConstraintsInPercent(nextSize)\n  if (!panelConstraints)\n    return\n\n  const nextLayout = validatePanelGroupLayout({\n    layout: recalculatedLayout,\n    panelConstraints,\n  })\n\n  if (!compareLayouts(prevLayout, nextLayout)) {\n    setLayout(nextLayout)\n\n    eagerValuesRef.value.layout = nextLayout\n    emits('layout', convertLayoutToNativeUnits(nextLayout))\n\n    callPanelCallbacks(\n      panelDataArray,\n      nextLayout,\n      panelIdToLastNotifiedSizeMapRef.value,\n      getGroupSizeInPixels(),\n    )\n  }\n})\n\nfunction registerResizeHandle(dragHandleId: string) {\n  return function resizeHandler(event: ResizeEvent) {\n    event.preventDefault()\n    const panelGroupElement = panelGroupElementRef.value\n    if (!panelGroupElement)\n      return () => null\n\n    const { direction, dragState, id: groupId, keyboardResizeBy } = committedValuesRef.value\n    const { layout: prevLayout, panelDataArray } = eagerValuesRef.value\n\n    const { initialLayout } = dragState ?? {}\n\n    const pivotIndices = determinePivotIndices(\n      groupId,\n      dragHandleId,\n      panelGroupElement,\n    )\n\n    let delta = calculateDeltaPercentage(\n      event,\n      dragHandleId,\n      direction,\n      dragState,\n      keyboardResizeBy,\n      panelGroupElement,\n    )\n    if (delta === 0)\n      return\n\n    // Support RTL layouts\n    const isHorizontal = direction === 'horizontal'\n    if (dir.value === 'rtl' && isHorizontal)\n      delta = -delta\n\n    const panelConstraints = getPanelConstraintsInPercent()\n    if (!panelConstraints)\n      return\n\n    const nextLayout = adjustLayoutByDelta({\n      delta,\n      layout: initialLayout ?? prevLayout,\n      panelConstraints,\n      pivotIndices,\n      trigger: isKeyDown(event) ? 'keyboard' : 'mouse-or-touch',\n    })\n\n    const layoutChanged = !compareLayouts(prevLayout, nextLayout)\n\n    // Only update the cursor for layout changes triggered by touch/mouse events (not keyboard)\n    // Update the cursor even if the layout hasn't changed (we may need to show an invalid cursor state)\n    if (isMouseEvent(event) || isTouchEvent(event)) {\n      // Watch for multiple subsequent deltas; this might occur for tiny cursor movements.\n      // In this case, Panel sizes might not change–\n      // but updating cursor in this scenario would cause a flicker.\n      if (prevDeltaRef.value !== delta) {\n        prevDeltaRef.value = delta\n\n        if (!layoutChanged) {\n          // If the pointer has moved too far to resize the panel any further, note this so we can update the cursor.\n          // This mimics VS Code behavior.\n          if (isHorizontal) {\n            reportConstraintsViolation(\n              dragHandleId,\n              delta < 0 ? EXCEEDED_HORIZONTAL_MIN : EXCEEDED_HORIZONTAL_MAX,\n            )\n          }\n          else {\n            reportConstraintsViolation(\n              dragHandleId,\n              delta < 0 ? EXCEEDED_VERTICAL_MIN : EXCEEDED_VERTICAL_MAX,\n            )\n          }\n        }\n        else {\n          reportConstraintsViolation(dragHandleId, 0)\n        }\n      }\n    }\n\n    if (layoutChanged) {\n      setLayout(nextLayout)\n\n      eagerValuesRef.value.layout = nextLayout\n      emits('layout', convertLayoutToNativeUnits(nextLayout))\n\n      callPanelCallbacks(\n        panelDataArray,\n        nextLayout,\n        panelIdToLastNotifiedSizeMapRef.value,\n        getGroupSizeInPixels(),\n      )\n    }\n  }\n}\n\nfunction resizePanel(panelData: PanelData, unsafePanelSize: number) {\n  const { layout: prevLayout, panelDataArray } = eagerValuesRef.value\n\n  const panelConstraintsArray = getPanelConstraintsInPercent()\n  if (!panelConstraintsArray)\n    return\n\n  const panelIndex = findPanelDataIndex(panelDataArray, panelData)\n  const panelUnit = panelData.constraints.sizeUnit ?? '%'\n\n  // Convert px to percent if needed for internal calculation\n  let sizeInPercent = unsafePanelSize\n  if (panelUnit === 'px') {\n    const groupSize = getGroupSizeInPixels()\n    if (groupSize != null) {\n      sizeInPercent = (unsafePanelSize / groupSize) * 100\n    }\n  }\n\n  const { panelSize, pivotIndices } = panelDataHelper(\n    panelDataArray,\n    panelData,\n    prevLayout,\n    panelConstraintsArray,\n  )\n\n  assert(panelSize != null)\n\n  const isLastPanel = panelIndex === panelDataArray.length - 1\n  const delta = isLastPanel\n    ? panelSize - sizeInPercent\n    : sizeInPercent - panelSize\n\n  const nextLayout = adjustLayoutByDelta({\n    delta,\n    layout: prevLayout,\n    panelConstraints: panelConstraintsArray,\n    pivotIndices,\n    trigger: 'imperative-api',\n  })\n\n  if (!compareLayouts(prevLayout, nextLayout)) {\n    setLayout(nextLayout)\n\n    eagerValuesRef.value.layout = nextLayout\n    emits('layout', convertLayoutToNativeUnits(nextLayout))\n\n    callPanelCallbacks(\n      panelDataArray,\n      nextLayout,\n      panelIdToLastNotifiedSizeMapRef.value,\n      getGroupSizeInPixels(),\n    )\n  }\n}\n\nfunction reevaluatePanelConstraints(panelData: PanelData, prevConstraints: PanelConstraints) {\n  const { layout, panelDataArray } = eagerValuesRef.value\n  const index = findPanelDataIndex(panelDataArray, panelData)\n  panelDataArray[index] = panelData\n  eagerValuesRef.value.panelDataArrayChanged = true\n\n  const panelConstraintsArray = getPanelConstraintsInPercent()\n  if (!panelConstraintsArray)\n    return\n\n  const nextConstraints = panelConstraintsArray[index]\n  const { panelSize: prevPanelSize } = panelDataHelper(\n    panelDataArray,\n    panelData,\n    layout,\n    panelConstraintsArray,\n  )\n\n  if (prevPanelSize === null)\n    return\n\n  const nextCollapsedSize = nextConstraints?.collapsedSize ?? 0\n  const nextMaxSize = nextConstraints?.maxSize ?? 100\n  const nextMinSize = nextConstraints?.minSize ?? 0\n\n  if (nextConstraints?.collapsible && isPanelCollapsed(panelData)) {\n    if (prevPanelSize !== nextCollapsedSize)\n      resizePanel(panelData, nextCollapsedSize)\n  }\n  else if (prevPanelSize < nextMinSize) {\n    resizePanel(panelData, nextMinSize)\n  }\n  else if (prevPanelSize > nextMaxSize) {\n    resizePanel(panelData, nextMaxSize)\n  }\n}\n\nfunction startDragging(dragHandleId: string, event: ResizeEvent) {\n  const { direction } = committedValuesRef.value\n  const { layout } = eagerValuesRef.value\n  if (!panelGroupElementRef.value)\n    return\n\n  const handleElement = getResizeHandleElement(\n    dragHandleId,\n    panelGroupElementRef.value,\n  )\n  assert(handleElement)\n\n  const initialCursorPosition = getResizeEventCursorPosition(\n    direction,\n    event,\n  )\n\n  dragState.value = {\n    dragHandleId,\n    dragHandleRect: handleElement.getBoundingClientRect(),\n    initialCursorPosition,\n    initialLayout: layout,\n  }\n}\nfunction stopDragging() {\n  dragState.value = null\n}\n\nfunction unregisterPanel(panelData: PanelData) {\n  const { panelDataArray } = eagerValuesRef.value\n\n  const index = findPanelDataIndex(panelDataArray, panelData)\n  if (index >= 0) {\n    panelDataArray.splice(index, 1)\n\n    // TRICKY\n    // When a panel is removed from the group, we should delete the most recent prev-size entry for it.\n    // If we don't do this, then a conditionally rendered panel might not call onResize when it's re-mounted.\n    // Strict effects mode makes this tricky though because all panels will be registered, unregistered, then re-registered on mount.\n    delete panelIdToLastNotifiedSizeMapRef.value[panelData.id]\n\n    eagerValuesRef.value.panelDataArrayChanged = true\n  }\n}\n\nfunction collapsePanel(panelData: PanelData) {\n  const { layout: prevLayout, panelDataArray } = eagerValuesRef.value\n\n  if (panelData.constraints.collapsible) {\n    const panelConstraintsArray = getPanelConstraintsInPercent()\n    if (!panelConstraintsArray)\n      return\n\n    const {\n      collapsedSize = 0,\n      panelSize,\n      pivotIndices,\n    } = panelDataHelper(panelDataArray, panelData, prevLayout, panelConstraintsArray)\n\n    assert(\n      panelSize != null,\n      `Panel size not found for panel \"${panelData.id}\"`,\n    )\n\n    if (panelSize !== collapsedSize) {\n      // Store size before collapse;\n      // This is the size that gets restored if the expand() API is used.\n      const sizeUnit = panelData.constraints.sizeUnit ?? '%'\n      const groupSize = groupSizeInPixels.value ?? getGroupSizeInPixels()\n      const sizeBeforeCollapse = sizeUnit === 'px' && groupSize\n        ? (panelSize / 100) * groupSize\n        : panelSize\n\n      panelSizeBeforeCollapseRef.value.set(panelData.id, sizeBeforeCollapse)\n\n      const isLastPanel\n        = findPanelDataIndex(panelDataArray, panelData)\n          === panelDataArray.length - 1\n      const delta = isLastPanel\n        ? panelSize - collapsedSize\n        : collapsedSize - panelSize\n\n      const nextLayout = adjustLayoutByDelta({\n        delta,\n        layout: prevLayout,\n        panelConstraints: panelConstraintsArray,\n        pivotIndices,\n        trigger: 'imperative-api',\n      })\n\n      if (!compareLayouts(prevLayout, nextLayout)) {\n        setLayout(nextLayout)\n\n        eagerValuesRef.value.layout = nextLayout\n\n        emits('layout', convertLayoutToNativeUnits(nextLayout))\n\n        callPanelCallbacks(\n          panelDataArray,\n          nextLayout,\n          panelIdToLastNotifiedSizeMapRef.value,\n          getGroupSizeInPixels(),\n        )\n      }\n    }\n  }\n}\n\nfunction expandPanel(panelData: PanelData) {\n  const { layout: prevLayout, panelDataArray } = eagerValuesRef.value\n\n  if (panelData.constraints.collapsible) {\n    const panelConstraintsArray = getPanelConstraintsInPercent()\n    if (!panelConstraintsArray)\n      return\n\n    const {\n      collapsedSize = 0,\n      panelSize = 0,\n      minSize = 0,\n      pivotIndices,\n    } = panelDataHelper(panelDataArray, panelData, prevLayout, panelConstraintsArray)\n\n    if (fuzzyCompareNumbers(panelSize, collapsedSize) <= 0) {\n      // Restore this panel to the size it was before it was collapsed, if possible.\n      const prevPanelSize = panelSizeBeforeCollapseRef.value.get(\n        panelData.id,\n      )\n      const sizeUnit = panelData.constraints.sizeUnit ?? '%'\n      const groupSize = groupSizeInPixels.value ?? getGroupSizeInPixels()\n\n      const restoredSize\n        = sizeUnit === 'px' && groupSize\n          ? prevPanelSize != null\n            ? (prevPanelSize / groupSize) * 100\n            : null\n          : prevPanelSize\n\n      const baseSize\n        = restoredSize != null && restoredSize >= minSize\n          ? restoredSize\n          : minSize\n\n      const isLastPanel\n        = findPanelDataIndex(panelDataArray, panelData)\n          === panelDataArray.length - 1\n      const delta = isLastPanel ? panelSize - baseSize : baseSize - panelSize\n\n      const nextLayout = adjustLayoutByDelta({\n        delta,\n        layout: prevLayout,\n        panelConstraints: panelConstraintsArray,\n        pivotIndices,\n        trigger: 'imperative-api',\n      })\n\n      if (!compareLayouts(prevLayout, nextLayout)) {\n        setLayout(nextLayout)\n\n        eagerValuesRef.value.layout = nextLayout\n\n        emits('layout', convertLayoutToNativeUnits(nextLayout))\n\n        callPanelCallbacks(\n          panelDataArray,\n          nextLayout,\n          panelIdToLastNotifiedSizeMapRef.value,\n          getGroupSizeInPixels(),\n        )\n      }\n    }\n  }\n}\n\nfunction getPanelSize(panelData: PanelData) {\n  const { layout, panelDataArray } = eagerValuesRef.value\n\n  const { panelSize } = panelDataHelper(panelDataArray, panelData, layout)\n\n  assert(\n    panelSize != null,\n    `Panel size not found for panel \"${panelData.id}\"`,\n  )\n\n  // If the panel uses px units, convert from percent back to px\n  const panelUnit = panelData.constraints.sizeUnit ?? '%'\n  if (panelUnit === 'px') {\n    const groupSize = getGroupSizeInPixels()\n    if (groupSize != null) {\n      return (panelSize / 100) * groupSize\n    }\n  }\n\n  return panelSize\n}\n\nfunction isPanelCollapsed(panelData: PanelData) {\n  const { layout, panelDataArray } = eagerValuesRef.value\n\n  const panelConstraintsArray = getPanelConstraintsInPercent()\n\n  const {\n    collapsedSize = 0,\n    collapsible,\n    panelSize,\n  } = panelDataHelper(\n    panelDataArray,\n    panelData,\n    layout,\n    panelConstraintsArray ?? undefined,\n  )\n\n  if (!collapsible)\n    return false\n\n  // panelSize is undefined during ssr due to vue ssr reactivity limitation.\n  if (panelSize === undefined) {\n    const panelIndex = findPanelDataIndex(panelDataArray, panelData)\n    const constraints = panelConstraintsArray?.[panelIndex] ?? panelData.constraints\n    return constraints.defaultSize === constraints.collapsedSize\n  }\n  else {\n    return panelSize === collapsedSize\n  }\n}\n\nfunction isPanelExpanded(panelData: PanelData) {\n  const { layout, panelDataArray } = eagerValuesRef.value\n\n  const panelConstraintsArray = getPanelConstraintsInPercent()\n\n  const {\n    collapsedSize = 0,\n    collapsible,\n    panelSize,\n  } = panelDataHelper(\n    panelDataArray,\n    panelData,\n    layout,\n    panelConstraintsArray ?? undefined,\n  )\n\n  assert(\n    panelSize != null,\n    `Panel size not found for panel \"${panelData.id}\"`,\n  )\n\n  return !collapsible || panelSize > collapsedSize\n}\n\nprovidePanelGroupContext({\n  direction,\n  dragState: dragState.value,\n  groupId,\n  reevaluatePanelConstraints,\n  registerPanel,\n  registerResizeHandle,\n  resizePanel,\n  startDragging,\n  stopDragging,\n  unregisterPanel,\n  panelGroupElement: panelGroupElementRef,\n\n  collapsePanel,\n  expandPanel,\n  isPanelCollapsed,\n  isPanelExpanded,\n  getPanelSize,\n  getPanelStyle,\n})\n\nfunction findPanelDataIndex(panelDataArray: PanelData[], panelData: PanelData) {\n  return panelDataArray.findIndex(\n    prevPanelData =>\n      prevPanelData === panelData || prevPanelData.id === panelData.id,\n  )\n}\n\nfunction panelDataHelper(\n  panelDataArray: PanelData[],\n  panelData: PanelData,\n  layout: number[],\n  panelConstraints?: PanelConstraints[] | null,\n) {\n  const panelIndex = findPanelDataIndex(panelDataArray, panelData)\n\n  const isLastPanel = panelIndex === panelDataArray.length - 1\n  const pivotIndices = isLastPanel\n    ? [panelIndex - 1, panelIndex]\n    : [panelIndex, panelIndex + 1]\n\n  const constraints = panelConstraints ?? getPanelConstraintsInPercent()\n  const panelConstraintsFromGroup = constraints?.[panelIndex]\n\n  const panelSize = layout[panelIndex]\n\n  return {\n    ...(panelConstraintsFromGroup ?? panelData.constraints),\n    panelSize,\n    pivotIndices,\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :style=\"{\n      display: 'flex',\n      flexDirection: direction === 'horizontal' ? 'row' : 'column',\n      height: '100%',\n      overflow: 'hidden',\n      width: '100%',\n    }\"\n    data-panel-group=\"\"\n    :data-orientation=\"direction\"\n    :data-panel-group-id=\"groupId\"\n  >\n    <slot :layout=\"layout\" />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useId } from '@/shared'\nimport { PRECISION } from './utils/constants'\n\nexport interface SplitterPanelProps extends PrimitiveProps {\n  /** The size of panel when it is collapsed; interpreted using `sizeUnit`. */\n  collapsedSize?: number\n  /** Should panel collapse when resized beyond its `minSize`. When `true`, it will be collapsed to `collapsedSize`. */\n  collapsible?: boolean\n  /** Initial size of panel, interpreted using `sizeUnit` (percent by default). */\n  defaultSize?: number\n  /** Panel id (unique within group); falls back to `useId` when not provided */\n  id?: string\n  /** The maximum allowable size of panel, interpreted using `sizeUnit`; defaults to `100` (percent). */\n  maxSize?: number\n  /** The minimum allowable size of panel, interpreted using `sizeUnit`; defaults to `10` (percent). */\n  minSize?: number\n  /** The order of panel within group; required for groups with conditionally rendered panels */\n  order?: number\n  /** Unit used for sizing values; `%` by default, or `px` for fixed sizing. */\n  sizeUnit?: '%' | 'px'\n}\n\nexport type SplitterPanelEmits = {\n  /** Event handler called when panel is collapsed. */\n  collapse: []\n  /** Event handler called when panel is expanded. */\n  expand: []\n  /** Event handler called when panel is resized; size parameter is a numeric value between 1-100.  */\n  resize: [size: number, prevSize: number | undefined]\n}\n\nexport type PanelOnCollapse = () => void\nexport type PanelOnExpand = () => void\nexport type PanelOnResize = (\n  size: number,\n  prevSize: number | undefined,\n) => void\n\nexport type PanelCallbacks = {\n  onCollapse?: PanelOnCollapse\n  onExpand?: PanelOnExpand\n  onResize?: PanelOnResize\n}\n\nexport type PanelConstraints = {\n  collapsedSize?: number | undefined\n  collapsible?: boolean | undefined\n  defaultSize?: number | undefined\n  /** Panel id (unique within group); falls back to useId when not provided */\n  maxSize?: number | undefined\n  minSize?: number | undefined\n  sizeUnit?: '%' | 'px' | undefined\n}\n\nexport type PanelData = {\n  callbacks: PanelCallbacks\n  constraints: PanelConstraints\n  id: string\n  idIsFromProps: boolean\n  order: number | undefined\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted, watch } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectPanelGroupContext } from './SplitterGroup.vue'\n\nconst props = defineProps<SplitterPanelProps>()\nconst emits = defineEmits<SplitterPanelEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Is the panel collapsed */\n    isCollapsed: typeof isCollapsed.value\n    /** Is the panel expanded */\n    isExpanded: typeof isExpanded.value\n    /** If panel is `collapsible`, collapse it fully. */\n    collapse: typeof collapse\n    /** If panel is currently collapsed, expand it to its most recent size. */\n    expand: typeof expand\n    /** Resize panel to the specified percentage (1 - 100). */\n    resize: typeof resize\n  }) => any\n}>()\n\nconst panelGroupContext = injectPanelGroupContext()\nif (panelGroupContext === null) {\n  throw new Error(\n    'SplitterPanel components must be rendered within a SplitterGroup container',\n  )\n}\n\nconst { collapsePanel, expandPanel, getPanelSize, getPanelStyle, isPanelCollapsed, resizePanel, groupId, reevaluatePanelConstraints, registerPanel, unregisterPanel } = panelGroupContext\nconst panelId = useId(props.id, 'reka-splitter-panel')\n\nconst panelDataRef = computed(() => ({\n  callbacks: {\n    onCollapse: () => emits('collapse'),\n    onExpand: () => emits('expand'),\n    onResize: (...args) => emits('resize', ...args),\n  },\n  constraints: {\n    collapsedSize: props.collapsedSize && Number.parseFloat(props.collapsedSize.toFixed(PRECISION)),\n    collapsible: props.collapsible,\n    defaultSize: props.defaultSize,\n    /** Panel id (unique within group); falls back to useId when not provided */\n    /** Panel id (unique within group); falls back to useId when not provided */\n    maxSize: props.maxSize,\n    minSize: props.minSize,\n    sizeUnit: props.sizeUnit ?? '%',\n  },\n  id: panelId,\n  idIsFromProps: props.id !== undefined,\n  order: props.order,\n}) satisfies PanelData)\n\nwatch(() => panelDataRef.value.constraints, (constraints, prevConstraints) => {\n  // If constraints have changed, we should revisit panel sizes.\n  // This is uncommon but may happen if people are trying to implement pixel based constraints.\n  if (\n    prevConstraints.collapsedSize !== constraints.collapsedSize\n    || prevConstraints.collapsible !== constraints.collapsible\n    || prevConstraints.maxSize !== constraints.maxSize\n    || prevConstraints.minSize !== constraints.minSize\n    || prevConstraints.sizeUnit !== constraints.sizeUnit\n  ) {\n    reevaluatePanelConstraints(panelDataRef.value, prevConstraints)\n  }\n}, { deep: true })\n\nonMounted(() => {\n  registerPanel(panelDataRef.value)\n})\n\nonUnmounted(() => {\n  unregisterPanel(panelDataRef.value)\n})\n\nconst style = computed(() => getPanelStyle(panelDataRef.value, props.defaultSize))\n/** Panel id (unique within group); falls back to useId when not provided */\n\nconst isCollapsed = computed(() => isPanelCollapsed(panelDataRef.value))\nconst isExpanded = computed(() => !isCollapsed.value)\n\nfunction collapse() {\n  collapsePanel(panelDataRef.value)\n}\n\nfunction expand() {\n  expandPanel(panelDataRef.value)\n}\n\nfunction resize(size: number) {\n  resizePanel(panelDataRef.value, size)\n}\n\ndefineExpose({\n  /** If panel is `collapsible`, collapse it fully. */\n  collapse,\n  /** If panel is currently collapsed, expand it to its most recent size. */\n  expand,\n  /** Gets the current size of the panel (in the panel's sizeUnit: percentage for '%', pixels for 'px'). */\n  getSize() {\n    return getPanelSize(panelDataRef.value)\n  },\n  /** Resize panel to the specified size (in the panel's sizeUnit: percentage for '%', pixels for 'px'). */\n  resize,\n  /** Returns `true` if the panel is currently collapsed */\n  isCollapsed,\n  /** Returns `true` if the panel is currently not collapsed */\n  isExpanded,\n})\n</script>\n\n<template>\n  <Primitive\n    :id=\"panelId\"\n    :style=\"style\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    data-panel=\"\"\n    :data-panel-collapsible=\"collapsible || undefined\"\n    :data-panel-group-id=\"groupId\"\n    :data-panel-id=\"panelId\"\n    :data-panel-size=\" Number.parseFloat(`${style.flexGrow}`).toFixed(1)\"\n    :data-state=\"collapsible ? isCollapsed ? 'collapsed' : 'expanded' : undefined\"\n  >\n    <slot\n      :is-collapsed=\"isCollapsed\"\n      :is-expanded=\"isExpanded\"\n      :expand=\"expand\"\n      :collapse=\"collapse\"\n      :resize=\"resize\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useId } from '@/shared'\nimport { PRECISION } from './utils/constants'\n\nexport interface SplitterPanelProps extends PrimitiveProps {\n  /** The size of panel when it is collapsed; interpreted using `sizeUnit`. */\n  collapsedSize?: number\n  /** Should panel collapse when resized beyond its `minSize`. When `true`, it will be collapsed to `collapsedSize`. */\n  collapsible?: boolean\n  /** Initial size of panel, interpreted using `sizeUnit` (percent by default). */\n  defaultSize?: number\n  /** Panel id (unique within group); falls back to `useId` when not provided */\n  id?: string\n  /** The maximum allowable size of panel, interpreted using `sizeUnit`; defaults to `100` (percent). */\n  maxSize?: number\n  /** The minimum allowable size of panel, interpreted using `sizeUnit`; defaults to `10` (percent). */\n  minSize?: number\n  /** The order of panel within group; required for groups with conditionally rendered panels */\n  order?: number\n  /** Unit used for sizing values; `%` by default, or `px` for fixed sizing. */\n  sizeUnit?: '%' | 'px'\n}\n\nexport type SplitterPanelEmits = {\n  /** Event handler called when panel is collapsed. */\n  collapse: []\n  /** Event handler called when panel is expanded. */\n  expand: []\n  /** Event handler called when panel is resized; size parameter is a numeric value between 1-100.  */\n  resize: [size: number, prevSize: number | undefined]\n}\n\nexport type PanelOnCollapse = () => void\nexport type PanelOnExpand = () => void\nexport type PanelOnResize = (\n  size: number,\n  prevSize: number | undefined,\n) => void\n\nexport type PanelCallbacks = {\n  onCollapse?: PanelOnCollapse\n  onExpand?: PanelOnExpand\n  onResize?: PanelOnResize\n}\n\nexport type PanelConstraints = {\n  collapsedSize?: number | undefined\n  collapsible?: boolean | undefined\n  defaultSize?: number | undefined\n  /** Panel id (unique within group); falls back to useId when not provided */\n  maxSize?: number | undefined\n  minSize?: number | undefined\n  sizeUnit?: '%' | 'px' | undefined\n}\n\nexport type PanelData = {\n  callbacks: PanelCallbacks\n  constraints: PanelConstraints\n  id: string\n  idIsFromProps: boolean\n  order: number | undefined\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted, watch } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectPanelGroupContext } from './SplitterGroup.vue'\n\nconst props = defineProps<SplitterPanelProps>()\nconst emits = defineEmits<SplitterPanelEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Is the panel collapsed */\n    isCollapsed: typeof isCollapsed.value\n    /** Is the panel expanded */\n    isExpanded: typeof isExpanded.value\n    /** If panel is `collapsible`, collapse it fully. */\n    collapse: typeof collapse\n    /** If panel is currently collapsed, expand it to its most recent size. */\n    expand: typeof expand\n    /** Resize panel to the specified percentage (1 - 100). */\n    resize: typeof resize\n  }) => any\n}>()\n\nconst panelGroupContext = injectPanelGroupContext()\nif (panelGroupContext === null) {\n  throw new Error(\n    'SplitterPanel components must be rendered within a SplitterGroup container',\n  )\n}\n\nconst { collapsePanel, expandPanel, getPanelSize, getPanelStyle, isPanelCollapsed, resizePanel, groupId, reevaluatePanelConstraints, registerPanel, unregisterPanel } = panelGroupContext\nconst panelId = useId(props.id, 'reka-splitter-panel')\n\nconst panelDataRef = computed(() => ({\n  callbacks: {\n    onCollapse: () => emits('collapse'),\n    onExpand: () => emits('expand'),\n    onResize: (...args) => emits('resize', ...args),\n  },\n  constraints: {\n    collapsedSize: props.collapsedSize && Number.parseFloat(props.collapsedSize.toFixed(PRECISION)),\n    collapsible: props.collapsible,\n    defaultSize: props.defaultSize,\n    /** Panel id (unique within group); falls back to useId when not provided */\n    /** Panel id (unique within group); falls back to useId when not provided */\n    maxSize: props.maxSize,\n    minSize: props.minSize,\n    sizeUnit: props.sizeUnit ?? '%',\n  },\n  id: panelId,\n  idIsFromProps: props.id !== undefined,\n  order: props.order,\n}) satisfies PanelData)\n\nwatch(() => panelDataRef.value.constraints, (constraints, prevConstraints) => {\n  // If constraints have changed, we should revisit panel sizes.\n  // This is uncommon but may happen if people are trying to implement pixel based constraints.\n  if (\n    prevConstraints.collapsedSize !== constraints.collapsedSize\n    || prevConstraints.collapsible !== constraints.collapsible\n    || prevConstraints.maxSize !== constraints.maxSize\n    || prevConstraints.minSize !== constraints.minSize\n    || prevConstraints.sizeUnit !== constraints.sizeUnit\n  ) {\n    reevaluatePanelConstraints(panelDataRef.value, prevConstraints)\n  }\n}, { deep: true })\n\nonMounted(() => {\n  registerPanel(panelDataRef.value)\n})\n\nonUnmounted(() => {\n  unregisterPanel(panelDataRef.value)\n})\n\nconst style = computed(() => getPanelStyle(panelDataRef.value, props.defaultSize))\n/** Panel id (unique within group); falls back to useId when not provided */\n\nconst isCollapsed = computed(() => isPanelCollapsed(panelDataRef.value))\nconst isExpanded = computed(() => !isCollapsed.value)\n\nfunction collapse() {\n  collapsePanel(panelDataRef.value)\n}\n\nfunction expand() {\n  expandPanel(panelDataRef.value)\n}\n\nfunction resize(size: number) {\n  resizePanel(panelDataRef.value, size)\n}\n\ndefineExpose({\n  /** If panel is `collapsible`, collapse it fully. */\n  collapse,\n  /** If panel is currently collapsed, expand it to its most recent size. */\n  expand,\n  /** Gets the current size of the panel (in the panel's sizeUnit: percentage for '%', pixels for 'px'). */\n  getSize() {\n    return getPanelSize(panelDataRef.value)\n  },\n  /** Resize panel to the specified size (in the panel's sizeUnit: percentage for '%', pixels for 'px'). */\n  resize,\n  /** Returns `true` if the panel is currently collapsed */\n  isCollapsed,\n  /** Returns `true` if the panel is currently not collapsed */\n  isExpanded,\n})\n</script>\n\n<template>\n  <Primitive\n    :id=\"panelId\"\n    :style=\"style\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    data-panel=\"\"\n    :data-panel-collapsible=\"collapsible || undefined\"\n    :data-panel-group-id=\"groupId\"\n    :data-panel-id=\"panelId\"\n    :data-panel-size=\" Number.parseFloat(`${style.flexGrow}`).toFixed(1)\"\n    :data-state=\"collapsible ? isCollapsed ? 'collapsed' : 'expanded' : undefined\"\n  >\n    <slot\n      :is-collapsed=\"isCollapsed\"\n      :is-expanded=\"isExpanded\"\n      :expand=\"expand\"\n      :collapse=\"collapse\"\n      :resize=\"resize\"\n    />\n  </Primitive>\n</template>\n","import type { Ref } from 'vue'\nimport type { ResizeHandler } from '../types'\nimport { watchEffect } from 'vue'\nimport { assert } from '../assert'\nimport { getResizeHandleElement, getResizeHandleElementIndex, getResizeHandleElementsForGroup } from '../dom'\n\n// https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/\n\nexport function useWindowSplitterResizeHandlerBehavior({\n  disabled,\n  handleId,\n  resizeHandler,\n  panelGroupElement,\n}: {\n  disabled: Ref<boolean>\n  handleId: string\n  resizeHandler: Ref<ResizeHandler | null>\n  panelGroupElement: Ref<ParentNode | null>\n}): void {\n  watchEffect((onCleanup) => {\n    const _panelGroupElement = panelGroupElement.value\n    if (disabled.value || resizeHandler.value === null || _panelGroupElement === null)\n      return\n\n    const handleElement = getResizeHandleElement(handleId, _panelGroupElement)\n    if (handleElement == null)\n      return\n\n    const onKeyDown = (event: KeyboardEvent) => {\n      if (event.defaultPrevented)\n        return\n\n      switch (event.key) {\n        case 'ArrowDown':\n        case 'ArrowLeft':\n        case 'ArrowRight':\n        case 'ArrowUp':\n        case 'End':\n        case 'Home': {\n          event.preventDefault()\n\n          resizeHandler.value?.(event)\n          break\n        }\n        case 'F6': {\n          event.preventDefault()\n\n          const groupId = handleElement.getAttribute('data-panel-group-id')\n          assert(groupId)\n\n          const handles = getResizeHandleElementsForGroup(\n            groupId,\n            _panelGroupElement,\n          )\n          const index = getResizeHandleElementIndex(\n            groupId,\n            handleId,\n            _panelGroupElement,\n          )\n\n          assert(index !== null)\n\n          const nextIndex = event.shiftKey\n            ? index > 0\n              ? index - 1\n              : handles.length - 1\n            : index + 1 < handles.length\n              ? index + 1\n              : 0\n\n          const nextHandle = handles[nextIndex] as HTMLElement\n          nextHandle.focus()\n\n          break\n        }\n      }\n    }\n\n    handleElement.addEventListener('keydown', onKeyDown)\n    onCleanup(() => {\n      handleElement.removeEventListener('keydown', onKeyDown)\n    })\n  })\n}\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { ref, toRefs, watch, watchEffect } from 'vue'\nimport { useNonce } from '@/shared/useNonce'\nimport { useWindowSplitterResizeHandlerBehavior } from './utils/composables/useWindowSplitterBehavior'\n\nexport interface SplitterResizeHandleProps extends PrimitiveProps {\n  /** Resize handle id (unique within group); falls back to `useId` when not provided */\n  id?: string\n  /** Allow this much margin when determining resizable handle hit detection */\n  hitAreaMargins?: PointerHitAreaMargins\n  /** Tabindex for the handle */\n  tabindex?: number\n  /** Disable drag handle */\n  disabled?: boolean\n  /**\n   * Will add `nonce` attribute to the style tag which can be used by Content Security Policy. <br> If omitted, inherits globally from `ConfigProvider`.\n   */\n  nonce?: string\n}\n\nexport type PanelResizeHandleOnDragging = (isDragging: boolean) => void\nexport type ResizeHandlerState = 'drag' | 'hover' | 'inactive'\n\nexport type SplitterResizeHandleEmits = {\n  /** Event handler called when dragging the handler. */\n  dragging: [isDragging: boolean]\n}\n</script>\n\n<script setup lang=\"ts\">\nimport type { PointerHitAreaMargins, ResizeHandlerAction } from './utils/registry'\nimport type { ResizeEvent, ResizeHandler } from './utils/types'\nimport { Primitive } from '@/Primitive'\nimport { isBrowser, useForwardExpose, useId } from '@/shared'\nimport { injectPanelGroupContext } from './SplitterGroup.vue'\nimport { assert } from './utils/assert'\nimport { registerResizeHandle } from './utils/registry'\n\nconst props = withDefaults(defineProps<SplitterResizeHandleProps>(), {\n  tabindex: 0,\n})\nconst emits = defineEmits<SplitterResizeHandleEmits>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst { disabled } = toRefs(props)\n\nconst panelGroupContext = injectPanelGroupContext()\nif (panelGroupContext === null) {\n  throw new Error(\n    'PanelResizeHandle components must be rendered within a PanelGroup container',\n  )\n}\n\nconst {\n  direction,\n  groupId,\n  registerResizeHandle: registerResizeHandleWithParentGroup,\n  startDragging,\n  stopDragging,\n  panelGroupElement,\n} = panelGroupContext\n\nconst resizeHandleId = useId(props.id, 'reka-splitter-resize-handle')\nconst state = ref<ResizeHandlerState>('inactive')\nconst isFocused = ref(false)\nconst resizeHandler = ref<ResizeHandler | null>(null)\nconst { nonce: propNonce } = toRefs(props)\nconst nonce = useNonce(propNonce)\n\nwatch(disabled, () => {\n  if (!isBrowser)\n    return\n  if (disabled.value)\n    resizeHandler.value = null\n  else\n    resizeHandler.value = registerResizeHandleWithParentGroup(resizeHandleId)\n}, { immediate: true })\n\nwatchEffect((onCleanup) => {\n  if (disabled.value || resizeHandler.value === null)\n    return\n\n  const element = currentElement.value\n  if (!element)\n    return\n\n  assert(element)\n\n  const setResizeHandlerState = (\n    action: ResizeHandlerAction,\n    isActive: boolean,\n    event: ResizeEvent,\n  ) => {\n    if (isActive) {\n      switch (action) {\n        case 'down': {\n          state.value = 'drag'\n\n          startDragging(resizeHandleId, event)\n          emits('dragging', true)\n          break\n        }\n        case 'move': {\n          if (state.value !== 'drag')\n            state.value = 'hover'\n\n          resizeHandler.value?.(event)\n          break\n        }\n        case 'up': {\n          state.value = 'hover'\n\n          stopDragging()\n          emits('dragging', false)\n          break\n        }\n      }\n    }\n    else {\n      state.value = 'inactive'\n    }\n  }\n\n  onCleanup(registerResizeHandle(\n    resizeHandleId,\n    element,\n    direction,\n    {\n      // Coarse inputs (e.g. finger/touch)\n      coarse: props.hitAreaMargins?.coarse ?? 15,\n      // Fine inputs (e.g. mouse)\n      fine: props.hitAreaMargins?.fine ?? 5,\n    },\n    nonce,\n    setResizeHandlerState,\n  ))\n})\n\nuseWindowSplitterResizeHandlerBehavior({\n  disabled,\n  resizeHandler,\n  handleId: resizeHandleId,\n  panelGroupElement,\n})\n</script>\n\n<template>\n  <Primitive\n    :id=\"resizeHandleId\"\n    :ref=\"forwardRef\"\n    :style=\"{\n      touchAction: 'none',\n      userSelect: 'none',\n    }\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"separator\"\n    data-resize-handle=\"\"\n    :tabindex=\"tabindex\"\n    :data-state=\"state\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-orientation=\"direction\"\n    :data-panel-group-id=\"groupId\"\n    :data-resize-handle-active=\"state === 'drag' ? 'pointer' : isFocused ? 'keyboard' : undefined\"\n    :data-resize-handle-state=\"state\"\n    :data-panel-resize-handle-enabled=\"!disabled\"\n    :data-panel-resize-handle-id=\" resizeHandleId\"\n    @blur=\"isFocused = false\"\n    @focus=\"isFocused = false\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { ref, toRefs, watch, watchEffect } from 'vue'\nimport { useNonce } from '@/shared/useNonce'\nimport { useWindowSplitterResizeHandlerBehavior } from './utils/composables/useWindowSplitterBehavior'\n\nexport interface SplitterResizeHandleProps extends PrimitiveProps {\n  /** Resize handle id (unique within group); falls back to `useId` when not provided */\n  id?: string\n  /** Allow this much margin when determining resizable handle hit detection */\n  hitAreaMargins?: PointerHitAreaMargins\n  /** Tabindex for the handle */\n  tabindex?: number\n  /** Disable drag handle */\n  disabled?: boolean\n  /**\n   * Will add `nonce` attribute to the style tag which can be used by Content Security Policy. <br> If omitted, inherits globally from `ConfigProvider`.\n   */\n  nonce?: string\n}\n\nexport type PanelResizeHandleOnDragging = (isDragging: boolean) => void\nexport type ResizeHandlerState = 'drag' | 'hover' | 'inactive'\n\nexport type SplitterResizeHandleEmits = {\n  /** Event handler called when dragging the handler. */\n  dragging: [isDragging: boolean]\n}\n</script>\n\n<script setup lang=\"ts\">\nimport type { PointerHitAreaMargins, ResizeHandlerAction } from './utils/registry'\nimport type { ResizeEvent, ResizeHandler } from './utils/types'\nimport { Primitive } from '@/Primitive'\nimport { isBrowser, useForwardExpose, useId } from '@/shared'\nimport { injectPanelGroupContext } from './SplitterGroup.vue'\nimport { assert } from './utils/assert'\nimport { registerResizeHandle } from './utils/registry'\n\nconst props = withDefaults(defineProps<SplitterResizeHandleProps>(), {\n  tabindex: 0,\n})\nconst emits = defineEmits<SplitterResizeHandleEmits>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst { disabled } = toRefs(props)\n\nconst panelGroupContext = injectPanelGroupContext()\nif (panelGroupContext === null) {\n  throw new Error(\n    'PanelResizeHandle components must be rendered within a PanelGroup container',\n  )\n}\n\nconst {\n  direction,\n  groupId,\n  registerResizeHandle: registerResizeHandleWithParentGroup,\n  startDragging,\n  stopDragging,\n  panelGroupElement,\n} = panelGroupContext\n\nconst resizeHandleId = useId(props.id, 'reka-splitter-resize-handle')\nconst state = ref<ResizeHandlerState>('inactive')\nconst isFocused = ref(false)\nconst resizeHandler = ref<ResizeHandler | null>(null)\nconst { nonce: propNonce } = toRefs(props)\nconst nonce = useNonce(propNonce)\n\nwatch(disabled, () => {\n  if (!isBrowser)\n    return\n  if (disabled.value)\n    resizeHandler.value = null\n  else\n    resizeHandler.value = registerResizeHandleWithParentGroup(resizeHandleId)\n}, { immediate: true })\n\nwatchEffect((onCleanup) => {\n  if (disabled.value || resizeHandler.value === null)\n    return\n\n  const element = currentElement.value\n  if (!element)\n    return\n\n  assert(element)\n\n  const setResizeHandlerState = (\n    action: ResizeHandlerAction,\n    isActive: boolean,\n    event: ResizeEvent,\n  ) => {\n    if (isActive) {\n      switch (action) {\n        case 'down': {\n          state.value = 'drag'\n\n          startDragging(resizeHandleId, event)\n          emits('dragging', true)\n          break\n        }\n        case 'move': {\n          if (state.value !== 'drag')\n            state.value = 'hover'\n\n          resizeHandler.value?.(event)\n          break\n        }\n        case 'up': {\n          state.value = 'hover'\n\n          stopDragging()\n          emits('dragging', false)\n          break\n        }\n      }\n    }\n    else {\n      state.value = 'inactive'\n    }\n  }\n\n  onCleanup(registerResizeHandle(\n    resizeHandleId,\n    element,\n    direction,\n    {\n      // Coarse inputs (e.g. finger/touch)\n      coarse: props.hitAreaMargins?.coarse ?? 15,\n      // Fine inputs (e.g. mouse)\n      fine: props.hitAreaMargins?.fine ?? 5,\n    },\n    nonce,\n    setResizeHandlerState,\n  ))\n})\n\nuseWindowSplitterResizeHandlerBehavior({\n  disabled,\n  resizeHandler,\n  handleId: resizeHandleId,\n  panelGroupElement,\n})\n</script>\n\n<template>\n  <Primitive\n    :id=\"resizeHandleId\"\n    :ref=\"forwardRef\"\n    :style=\"{\n      touchAction: 'none',\n      userSelect: 'none',\n    }\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"separator\"\n    data-resize-handle=\"\"\n    :tabindex=\"tabindex\"\n    :data-state=\"state\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-orientation=\"direction\"\n    :data-panel-group-id=\"groupId\"\n    :data-resize-handle-active=\"state === 'drag' ? 'pointer' : isFocused ? 'keyboard' : undefined\"\n    :data-resize-handle-state=\"state\"\n    :data-panel-resize-handle-enabled=\"!disabled\"\n    :data-panel-resize-handle-id=\" resizeHandleId\"\n    @blur=\"isFocused = false\"\n    @focus=\"isFocused = false\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { DataOrientation, Direction } from '../shared/types'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useVModel } from '@vueuse/core'\nimport { computed, nextTick, ref, toRefs, watch } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { createContext, useDirection, useForwardExpose } from '@/shared'\n\nexport interface StepperRootContext {\n  modelValue: Ref<number | undefined>\n  changeModelValue: (value: number) => void\n  orientation: Ref<DataOrientation>\n  dir: Ref<Direction>\n  linear: Ref<boolean>\n  totalStepperItems: Ref<Set<HTMLElement>>\n}\n\nexport interface StepperRootProps extends PrimitiveProps {\n  /**\n   * The value of the step that should be active when initially rendered. Use when you do not need to control the state of the steps.\n   */\n  defaultValue?: number\n  /**\n   * The orientation the steps are laid out.\n   * Mainly so arrow navigation is done accordingly (left & right vs. up & down).\n   * @defaultValue horizontal\n   */\n  orientation?: DataOrientation\n  /**\n   * The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode.\n   */\n  dir?: Direction\n  /** The controlled value of the step to activate. Can be bound as `v-model`. */\n  modelValue?: number\n  /** Whether or not the steps must be completed in order. */\n  linear?: boolean\n}\nexport type StepperRootEmits = {\n  /** Event handler called when the value changes */\n  'update:modelValue': [payload: number | undefined]\n}\n\nexport const [injectStepperRootContext, provideStepperRootContext]\n  = createContext<StepperRootContext>('StepperRoot')\n</script>\n\n<script setup lang=\"ts\">\nconst props = withDefaults(defineProps<StepperRootProps>(), {\n  orientation: 'horizontal',\n  linear: true,\n  defaultValue: 1,\n})\nconst emits = defineEmits<StepperRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current step */\n    modelValue: number | undefined\n    /** Total number of steps */\n    totalSteps: number\n    /** Whether or not the next step is disabled */\n    isNextDisabled: boolean\n    /** Whether or not the previous step is disabled */\n    isPrevDisabled: boolean\n    /** Whether or not the first step is active */\n    isFirstStep: boolean\n    /** Whether or not the last step is active */\n    isLastStep: boolean\n    /** Go to a specific step */\n    goToStep: (step: number) => void\n    /** Go to the next step */\n    nextStep: () => void\n    /** Go to the previous step */\n    prevStep: () => void\n    /** Whether or not there is a next step */\n    hasNext: () => boolean\n    /** Whether or not there is a previous step */\n    hasPrev: () => boolean\n  }) => any\n}>()\n\nconst { dir: propDir, orientation: propOrientation, linear } = toRefs(props)\nconst dir = useDirection(propDir)\n\nconst totalStepperItems = ref<Set<HTMLElement>>(new Set())\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst totalStepperItemsArray = computed(() => Array.from(totalStepperItems.value))\n\nconst isFirstStep = computed(() => modelValue.value === 1)\nconst isLastStep = computed(() => modelValue.value === totalStepperItemsArray.value.length)\n\nconst totalSteps = computed(() => totalStepperItems.value.size)\n\nfunction goToStep(step: number) {\n  if (step > totalSteps.value)\n    return\n\n  if (step < 1)\n    return\n\n  if (totalStepperItems.value.size && !!totalStepperItemsArray.value[step] && !!totalStepperItemsArray.value[step].getAttribute('disabled'))\n    return\n\n  if (linear.value) {\n    if (step > (modelValue.value ?? 1) + 1)\n      return\n  }\n\n  modelValue.value = step\n}\n\nfunction nextStep() {\n  goToStep((modelValue.value ?? 1) + 1)\n}\n\nfunction prevStep() {\n  goToStep((modelValue.value ?? 1) - 1)\n}\n\nfunction hasNext() {\n  return (modelValue.value ?? 1) < totalSteps.value\n}\n\nfunction hasPrev() {\n  return (modelValue.value ?? 1) > 1\n}\n\nconst nextStepperItem = ref<HTMLElement | null>(null)\nconst prevStepperItem = ref<HTMLElement | null>(null)\nconst isNextDisabled = computed(() => nextStepperItem.value ? nextStepperItem.value.getAttribute('disabled') === '' : true)\nconst isPrevDisabled = computed(() => prevStepperItem.value ? prevStepperItem.value.getAttribute('disabled') === '' : true)\n\nwatch(modelValue, async () => {\n  await nextTick(() => {\n    nextStepperItem.value = totalStepperItemsArray.value.length && modelValue.value! < totalStepperItemsArray.value.length ? totalStepperItemsArray.value[modelValue.value!] : null\n    prevStepperItem.value = totalStepperItemsArray.value.length && modelValue.value! > 1 ? totalStepperItemsArray.value[modelValue.value! - 2] : null\n  })\n})\nwatch(totalStepperItemsArray, async () => {\n  await nextTick(() => {\n    nextStepperItem.value = totalStepperItemsArray.value.length && modelValue.value! < totalStepperItemsArray.value.length ? totalStepperItemsArray.value[modelValue.value!] : null\n    prevStepperItem.value = totalStepperItemsArray.value.length && modelValue.value! > 1 ? totalStepperItemsArray.value[modelValue.value! - 2] : null\n  })\n})\n\nprovideStepperRootContext({\n  modelValue,\n  changeModelValue: (value: number) => {\n    modelValue.value = value\n  },\n  orientation: propOrientation,\n  dir,\n  linear,\n  totalStepperItems,\n})\n\ndefineExpose({\n  goToStep,\n  nextStep,\n  prevStep,\n  modelValue,\n  totalSteps,\n  isNextDisabled,\n  isPrevDisabled,\n  isFirstStep,\n  isLastStep,\n  hasNext,\n  hasPrev,\n})\n\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    role=\"group\"\n    aria-label=\"progress\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :data-linear=\"linear ? '' : undefined\"\n    :data-orientation=\"orientation\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :total-steps=\"totalStepperItems.size\"\n      :is-next-disabled=\"isNextDisabled\"\n      :is-prev-disabled=\"isPrevDisabled\"\n      :is-first-step=\"isFirstStep\"\n      :is-last-step=\"isLastStep\"\n      :go-to-step=\"goToStep\"\n      :next-step=\"nextStep\"\n      :prev-step=\"prevStep\"\n      :has-next=\"hasNext\"\n      :has-prev=\"hasPrev\"\n    />\n\n    <div\n      aria-live=\"polite\"\n      aria-atomic=\"true\"\n      role=\"status\"\n      :style=\"{\n        transform: 'translateX(-100%)',\n        position: 'absolute',\n        pointerEvents: 'none',\n        opacity: 0,\n        margin: 0,\n      }\"\n    >\n      Step {{ modelValue }} of {{ totalStepperItems.size }}\n    </div>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { DataOrientation, Direction } from '../shared/types'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useVModel } from '@vueuse/core'\nimport { computed, nextTick, ref, toRefs, watch } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { createContext, useDirection, useForwardExpose } from '@/shared'\n\nexport interface StepperRootContext {\n  modelValue: Ref<number | undefined>\n  changeModelValue: (value: number) => void\n  orientation: Ref<DataOrientation>\n  dir: Ref<Direction>\n  linear: Ref<boolean>\n  totalStepperItems: Ref<Set<HTMLElement>>\n}\n\nexport interface StepperRootProps extends PrimitiveProps {\n  /**\n   * The value of the step that should be active when initially rendered. Use when you do not need to control the state of the steps.\n   */\n  defaultValue?: number\n  /**\n   * The orientation the steps are laid out.\n   * Mainly so arrow navigation is done accordingly (left & right vs. up & down).\n   * @defaultValue horizontal\n   */\n  orientation?: DataOrientation\n  /**\n   * The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode.\n   */\n  dir?: Direction\n  /** The controlled value of the step to activate. Can be bound as `v-model`. */\n  modelValue?: number\n  /** Whether or not the steps must be completed in order. */\n  linear?: boolean\n}\nexport type StepperRootEmits = {\n  /** Event handler called when the value changes */\n  'update:modelValue': [payload: number | undefined]\n}\n\nexport const [injectStepperRootContext, provideStepperRootContext]\n  = createContext<StepperRootContext>('StepperRoot')\n</script>\n\n<script setup lang=\"ts\">\nconst props = withDefaults(defineProps<StepperRootProps>(), {\n  orientation: 'horizontal',\n  linear: true,\n  defaultValue: 1,\n})\nconst emits = defineEmits<StepperRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current step */\n    modelValue: number | undefined\n    /** Total number of steps */\n    totalSteps: number\n    /** Whether or not the next step is disabled */\n    isNextDisabled: boolean\n    /** Whether or not the previous step is disabled */\n    isPrevDisabled: boolean\n    /** Whether or not the first step is active */\n    isFirstStep: boolean\n    /** Whether or not the last step is active */\n    isLastStep: boolean\n    /** Go to a specific step */\n    goToStep: (step: number) => void\n    /** Go to the next step */\n    nextStep: () => void\n    /** Go to the previous step */\n    prevStep: () => void\n    /** Whether or not there is a next step */\n    hasNext: () => boolean\n    /** Whether or not there is a previous step */\n    hasPrev: () => boolean\n  }) => any\n}>()\n\nconst { dir: propDir, orientation: propOrientation, linear } = toRefs(props)\nconst dir = useDirection(propDir)\n\nconst totalStepperItems = ref<Set<HTMLElement>>(new Set())\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst totalStepperItemsArray = computed(() => Array.from(totalStepperItems.value))\n\nconst isFirstStep = computed(() => modelValue.value === 1)\nconst isLastStep = computed(() => modelValue.value === totalStepperItemsArray.value.length)\n\nconst totalSteps = computed(() => totalStepperItems.value.size)\n\nfunction goToStep(step: number) {\n  if (step > totalSteps.value)\n    return\n\n  if (step < 1)\n    return\n\n  if (totalStepperItems.value.size && !!totalStepperItemsArray.value[step] && !!totalStepperItemsArray.value[step].getAttribute('disabled'))\n    return\n\n  if (linear.value) {\n    if (step > (modelValue.value ?? 1) + 1)\n      return\n  }\n\n  modelValue.value = step\n}\n\nfunction nextStep() {\n  goToStep((modelValue.value ?? 1) + 1)\n}\n\nfunction prevStep() {\n  goToStep((modelValue.value ?? 1) - 1)\n}\n\nfunction hasNext() {\n  return (modelValue.value ?? 1) < totalSteps.value\n}\n\nfunction hasPrev() {\n  return (modelValue.value ?? 1) > 1\n}\n\nconst nextStepperItem = ref<HTMLElement | null>(null)\nconst prevStepperItem = ref<HTMLElement | null>(null)\nconst isNextDisabled = computed(() => nextStepperItem.value ? nextStepperItem.value.getAttribute('disabled') === '' : true)\nconst isPrevDisabled = computed(() => prevStepperItem.value ? prevStepperItem.value.getAttribute('disabled') === '' : true)\n\nwatch(modelValue, async () => {\n  await nextTick(() => {\n    nextStepperItem.value = totalStepperItemsArray.value.length && modelValue.value! < totalStepperItemsArray.value.length ? totalStepperItemsArray.value[modelValue.value!] : null\n    prevStepperItem.value = totalStepperItemsArray.value.length && modelValue.value! > 1 ? totalStepperItemsArray.value[modelValue.value! - 2] : null\n  })\n})\nwatch(totalStepperItemsArray, async () => {\n  await nextTick(() => {\n    nextStepperItem.value = totalStepperItemsArray.value.length && modelValue.value! < totalStepperItemsArray.value.length ? totalStepperItemsArray.value[modelValue.value!] : null\n    prevStepperItem.value = totalStepperItemsArray.value.length && modelValue.value! > 1 ? totalStepperItemsArray.value[modelValue.value! - 2] : null\n  })\n})\n\nprovideStepperRootContext({\n  modelValue,\n  changeModelValue: (value: number) => {\n    modelValue.value = value\n  },\n  orientation: propOrientation,\n  dir,\n  linear,\n  totalStepperItems,\n})\n\ndefineExpose({\n  goToStep,\n  nextStep,\n  prevStep,\n  modelValue,\n  totalSteps,\n  isNextDisabled,\n  isPrevDisabled,\n  isFirstStep,\n  isLastStep,\n  hasNext,\n  hasPrev,\n})\n\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    role=\"group\"\n    aria-label=\"progress\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :data-linear=\"linear ? '' : undefined\"\n    :data-orientation=\"orientation\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :total-steps=\"totalStepperItems.size\"\n      :is-next-disabled=\"isNextDisabled\"\n      :is-prev-disabled=\"isPrevDisabled\"\n      :is-first-step=\"isFirstStep\"\n      :is-last-step=\"isLastStep\"\n      :go-to-step=\"goToStep\"\n      :next-step=\"nextStep\"\n      :prev-step=\"prevStep\"\n      :has-next=\"hasNext\"\n      :has-prev=\"hasPrev\"\n    />\n\n    <div\n      aria-live=\"polite\"\n      aria-atomic=\"true\"\n      role=\"status\"\n      :style=\"{\n        transform: 'translateX(-100%)',\n        position: 'absolute',\n        pointerEvents: 'none',\n        opacity: 0,\n        margin: 0,\n      }\"\n    >\n      Step {{ modelValue }} of {{ totalStepperItems.size }}\n    </div>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\n\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { createContext, useForwardExpose, useId } from '@/shared'\nimport { injectStepperRootContext } from './StepperRoot.vue'\n\nexport const [injectStepperItemContext, provideStepperItemContext] = createContext<StepperItemContext>('StepperItem')\n\nexport type StepperState = 'completed' | 'active' | 'inactive'\n\nexport interface StepperItemContext {\n  titleId: string\n  descriptionId: string\n  step: Ref<number>\n  state: Ref<StepperState>\n  disabled: Ref<boolean>\n  isFocusable: Ref<boolean>\n}\n\nexport interface StepperItemProps extends PrimitiveProps {\n  /** A unique value that associates the stepper item with an index */\n  step: number\n  /** When `true`, prevents the user from interacting with the step. */\n  disabled?: boolean\n  /** Shows whether the step is completed. */\n  completed?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nconst props = withDefaults(defineProps<StepperItemProps>(), {\n  completed: false,\n  disabled: false,\n})\n\ndefineSlots<{\n  default?: (props: {\n    /** The current state of the stepper item */\n    state: StepperState\n  }) => any\n}>()\n\nconst { disabled, step, completed } = toRefs(props)\n\nconst { forwardRef } = useForwardExpose()\n\nconst rootContext = injectStepperRootContext()\n\nconst titleId = useId(undefined, 'reka-stepper-item-title')\nconst descriptionId = useId(undefined, 'reka-stepper-item-description')\n\nconst itemState = computed(() => {\n  if (completed.value)\n    return 'completed'\n  if (rootContext.modelValue.value === step.value)\n    return 'active'\n  if (rootContext.modelValue.value! > step.value)\n    return 'completed'\n  return 'inactive'\n})\n\nconst isFocusable = computed(() => {\n  if (disabled.value)\n    return false\n  if (rootContext.linear.value)\n    return step.value <= rootContext.modelValue.value! || step.value === rootContext.modelValue.value! + 1\n\n  return true\n})\n\nprovideStepperItemContext({\n  titleId,\n  descriptionId,\n  state: itemState,\n  disabled,\n  step,\n  isFocusable,\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-current=\"itemState === 'active' ? 'true' : undefined\"\n    :data-state=\"itemState\"\n    :disabled=\"disabled || !isFocusable ? '' : undefined\"\n    :data-disabled=\"disabled || !isFocusable ? '' : undefined\"\n    :data-orientation=\"rootContext.orientation.value\"\n  >\n    <slot :state=\"itemState\" />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\n\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { createContext, useForwardExpose, useId } from '@/shared'\nimport { injectStepperRootContext } from './StepperRoot.vue'\n\nexport const [injectStepperItemContext, provideStepperItemContext] = createContext<StepperItemContext>('StepperItem')\n\nexport type StepperState = 'completed' | 'active' | 'inactive'\n\nexport interface StepperItemContext {\n  titleId: string\n  descriptionId: string\n  step: Ref<number>\n  state: Ref<StepperState>\n  disabled: Ref<boolean>\n  isFocusable: Ref<boolean>\n}\n\nexport interface StepperItemProps extends PrimitiveProps {\n  /** A unique value that associates the stepper item with an index */\n  step: number\n  /** When `true`, prevents the user from interacting with the step. */\n  disabled?: boolean\n  /** Shows whether the step is completed. */\n  completed?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nconst props = withDefaults(defineProps<StepperItemProps>(), {\n  completed: false,\n  disabled: false,\n})\n\ndefineSlots<{\n  default?: (props: {\n    /** The current state of the stepper item */\n    state: StepperState\n  }) => any\n}>()\n\nconst { disabled, step, completed } = toRefs(props)\n\nconst { forwardRef } = useForwardExpose()\n\nconst rootContext = injectStepperRootContext()\n\nconst titleId = useId(undefined, 'reka-stepper-item-title')\nconst descriptionId = useId(undefined, 'reka-stepper-item-description')\n\nconst itemState = computed(() => {\n  if (completed.value)\n    return 'completed'\n  if (rootContext.modelValue.value === step.value)\n    return 'active'\n  if (rootContext.modelValue.value! > step.value)\n    return 'completed'\n  return 'inactive'\n})\n\nconst isFocusable = computed(() => {\n  if (disabled.value)\n    return false\n  if (rootContext.linear.value)\n    return step.value <= rootContext.modelValue.value! || step.value === rootContext.modelValue.value! + 1\n\n  return true\n})\n\nprovideStepperItemContext({\n  titleId,\n  descriptionId,\n  state: itemState,\n  disabled,\n  step,\n  isFocusable,\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-current=\"itemState === 'active' ? 'true' : undefined\"\n    :data-state=\"itemState\"\n    :disabled=\"disabled || !isFocusable ? '' : undefined\"\n    :data-disabled=\"disabled || !isFocusable ? '' : undefined\"\n    :data-orientation=\"rootContext.orientation.value\"\n  >\n    <slot :state=\"itemState\" />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectStepperItemContext } from './StepperItem.vue'\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nexport interface StepperDescriptionProps extends PrimitiveProps { }\n\nconst props = withDefaults(defineProps<StepperDescriptionProps>(), { as: 'p' })\n\nuseForwardExpose()\nconst itemContext = injectStepperItemContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"itemContext.descriptionId\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectStepperItemContext } from './StepperItem.vue'\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nexport interface StepperDescriptionProps extends PrimitiveProps { }\n\nconst props = withDefaults(defineProps<StepperDescriptionProps>(), { as: 'p' })\n\nuseForwardExpose()\nconst itemContext = injectStepperItemContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"itemContext.descriptionId\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectStepperItemContext } from './StepperItem.vue'\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nexport interface StepperIndicatorProps extends PrimitiveProps { }\n\nconst props = defineProps<StepperIndicatorProps>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current step */\n    step: number\n  }) => any\n}>()\n\nconst itemContext = injectStepperItemContext()\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n  >\n    <slot :step=\"itemContext.step.value\">\n      Step {{ itemContext.step.value }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectStepperItemContext } from './StepperItem.vue'\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nexport interface StepperIndicatorProps extends PrimitiveProps { }\n\nconst props = defineProps<StepperIndicatorProps>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current step */\n    step: number\n  }) => any\n}>()\n\nconst itemContext = injectStepperItemContext()\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n  >\n    <slot :step=\"itemContext.step.value\">\n      Step {{ itemContext.step.value }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { SeparatorProps } from '@/Separator'\nimport { Separator } from '@/Separator'\nimport { useForwardExpose } from '@/shared'\nimport { injectStepperItemContext } from './StepperItem.vue'\nimport { injectStepperRootContext } from './StepperRoot.vue'\n</script>\n\n<script setup lang=\"ts\">\nexport interface StepperSeparatorProps extends SeparatorProps { }\n\nconst props = withDefaults(defineProps<StepperSeparatorProps>(), {})\n\nconst rootContext = injectStepperRootContext()\nconst itemContext = injectStepperItemContext()\n\nuseForwardExpose()\n</script>\n\n<template>\n  <Separator\n    v-bind=\"props\"\n    decorative\n    :orientation=\"rootContext.orientation.value\"\n    :data-state=\"itemContext.state.value\"\n  >\n    <slot />\n  </Separator>\n</template>\n","<script lang=\"ts\">\nimport type { SeparatorProps } from '@/Separator'\nimport { Separator } from '@/Separator'\nimport { useForwardExpose } from '@/shared'\nimport { injectStepperItemContext } from './StepperItem.vue'\nimport { injectStepperRootContext } from './StepperRoot.vue'\n</script>\n\n<script setup lang=\"ts\">\nexport interface StepperSeparatorProps extends SeparatorProps { }\n\nconst props = withDefaults(defineProps<StepperSeparatorProps>(), {})\n\nconst rootContext = injectStepperRootContext()\nconst itemContext = injectStepperItemContext()\n\nuseForwardExpose()\n</script>\n\n<template>\n  <Separator\n    v-bind=\"props\"\n    decorative\n    :orientation=\"rootContext.orientation.value\"\n    :data-state=\"itemContext.state.value\"\n  >\n    <slot />\n  </Separator>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectStepperItemContext } from './StepperItem.vue'\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nexport interface StepperTitleProps extends PrimitiveProps { }\n\nconst props = withDefaults(defineProps<StepperTitleProps>(), { as: 'h4' })\nconst itemContext = injectStepperItemContext()\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"itemContext.titleId\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectStepperItemContext } from './StepperItem.vue'\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nexport interface StepperTitleProps extends PrimitiveProps { }\n\nconst props = withDefaults(defineProps<StepperTitleProps>(), { as: 'h4' })\nconst itemContext = injectStepperItemContext()\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"itemContext.titleId\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed, onMounted, onUnmounted } from 'vue'\nimport { getActiveElement, useArrowNavigation, useForwardExpose, useKbd } from '@/shared'\n\nexport interface StepperTriggerProps extends PrimitiveProps {\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectStepperItemContext } from './StepperItem.vue'\nimport { injectStepperRootContext } from './StepperRoot.vue'\n\nwithDefaults(defineProps<StepperTriggerProps>(), {\n  as: 'button',\n})\n\nconst rootContext = injectStepperRootContext()\nconst itemContext = injectStepperItemContext()\n\nconst kbd = useKbd()\nconst stepperItems = computed(() => Array.from(rootContext.totalStepperItems.value))\n\nfunction handleMouseDown(event: MouseEvent) {\n  if (itemContext.disabled.value)\n    return\n  if (rootContext.linear.value) {\n    if (itemContext.step.value <= rootContext.modelValue.value! || itemContext.step.value === rootContext.modelValue.value! + 1) {\n      if (event.ctrlKey === false) {\n        rootContext.changeModelValue(itemContext.step.value)\n        return\n      }\n    }\n  }\n  else {\n    if (event.ctrlKey === false) {\n      rootContext.changeModelValue(itemContext.step.value)\n      return\n    }\n  }\n\n  // prevent focus to avoid accidental activation\n  event.preventDefault()\n}\n\nfunction handleKeyDown(event: KeyboardEvent) {\n  event.preventDefault()\n\n  if (itemContext.disabled.value)\n    return\n\n  if ((event.key === kbd.ENTER || event.key === kbd.SPACE) && !event.ctrlKey && !event.shiftKey)\n    rootContext.changeModelValue(itemContext.step.value)\n\n  if ([kbd.ARROW_LEFT, kbd.ARROW_RIGHT, kbd.ARROW_UP, kbd.ARROW_DOWN].includes(event.key)) {\n    useArrowNavigation(event, getActiveElement() as HTMLElement, undefined, {\n      itemsArray: stepperItems.value,\n      focus: true,\n      loop: false,\n      arrowKeyOptions: rootContext.orientation.value,\n      dir: rootContext.dir.value,\n    })\n  }\n}\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nonMounted(() => {\n  rootContext.totalStepperItems.value.add(currentElement.value)\n})\n\nonUnmounted(() => {\n  rootContext.totalStepperItems.value.delete(currentElement.value)\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :data-state=\"itemContext.state.value\"\n    :disabled=\"itemContext.disabled.value || !itemContext.isFocusable.value ? '' : undefined\"\n    :data-disabled=\"itemContext.disabled.value || !itemContext.isFocusable.value ? '' : undefined\"\n    :data-orientation=\"rootContext.orientation.value\"\n    :tabindex=\"itemContext.isFocusable.value ? 0 : -1\"\n    :aria-describedby=\"itemContext.descriptionId\"\n    :aria-labelledby=\"itemContext.titleId\"\n    @mousedown.left=\"handleMouseDown\"\n    @keydown.enter.space.left.right.up.down=\"handleKeyDown\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed, onMounted, onUnmounted } from 'vue'\nimport { getActiveElement, useArrowNavigation, useForwardExpose, useKbd } from '@/shared'\n\nexport interface StepperTriggerProps extends PrimitiveProps {\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectStepperItemContext } from './StepperItem.vue'\nimport { injectStepperRootContext } from './StepperRoot.vue'\n\nwithDefaults(defineProps<StepperTriggerProps>(), {\n  as: 'button',\n})\n\nconst rootContext = injectStepperRootContext()\nconst itemContext = injectStepperItemContext()\n\nconst kbd = useKbd()\nconst stepperItems = computed(() => Array.from(rootContext.totalStepperItems.value))\n\nfunction handleMouseDown(event: MouseEvent) {\n  if (itemContext.disabled.value)\n    return\n  if (rootContext.linear.value) {\n    if (itemContext.step.value <= rootContext.modelValue.value! || itemContext.step.value === rootContext.modelValue.value! + 1) {\n      if (event.ctrlKey === false) {\n        rootContext.changeModelValue(itemContext.step.value)\n        return\n      }\n    }\n  }\n  else {\n    if (event.ctrlKey === false) {\n      rootContext.changeModelValue(itemContext.step.value)\n      return\n    }\n  }\n\n  // prevent focus to avoid accidental activation\n  event.preventDefault()\n}\n\nfunction handleKeyDown(event: KeyboardEvent) {\n  event.preventDefault()\n\n  if (itemContext.disabled.value)\n    return\n\n  if ((event.key === kbd.ENTER || event.key === kbd.SPACE) && !event.ctrlKey && !event.shiftKey)\n    rootContext.changeModelValue(itemContext.step.value)\n\n  if ([kbd.ARROW_LEFT, kbd.ARROW_RIGHT, kbd.ARROW_UP, kbd.ARROW_DOWN].includes(event.key)) {\n    useArrowNavigation(event, getActiveElement() as HTMLElement, undefined, {\n      itemsArray: stepperItems.value,\n      focus: true,\n      loop: false,\n      arrowKeyOptions: rootContext.orientation.value,\n      dir: rootContext.dir.value,\n    })\n  }\n}\n\nconst { forwardRef, currentElement } = useForwardExpose()\n\nonMounted(() => {\n  rootContext.totalStepperItems.value.add(currentElement.value)\n})\n\nonUnmounted(() => {\n  rootContext.totalStepperItems.value.delete(currentElement.value)\n})\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :data-state=\"itemContext.state.value\"\n    :disabled=\"itemContext.disabled.value || !itemContext.isFocusable.value ? '' : undefined\"\n    :data-disabled=\"itemContext.disabled.value || !itemContext.isFocusable.value ? '' : undefined\"\n    :data-orientation=\"rootContext.orientation.value\"\n    :tabindex=\"itemContext.isFocusable.value ? 0 : -1\"\n    :aria-describedby=\"itemContext.descriptionId\"\n    :aria-labelledby=\"itemContext.titleId\"\n    @mousedown.left=\"handleMouseDown\"\n    @keydown.enter.space.left.right.up.down=\"handleKeyDown\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { FormFieldProps } from '@/shared/types'\nimport { createContext, useFormControl, useForwardExpose } from '@/shared'\n\nexport interface SwitchRootProps<T = boolean> extends PrimitiveProps, FormFieldProps {\n  /** The state of the switch when it is initially rendered. Use when you do not need to control its state. */\n  defaultValue?: T\n  /** The controlled state of the switch. Can be bind as `v-model`. */\n  modelValue?: T | null\n  /** When `true`, prevents the user from interacting with the switch. */\n  disabled?: boolean\n  id?: string\n  /** The value given as data when submitted with a `name`. */\n  value?: string\n  /**\n   * The value used when the switch is on. Defaults to `true`.\n   */\n  trueValue?: T\n  /**\n   * The value used when the switch is off. Defaults to `false`.\n   */\n  falseValue?: T\n}\n\nexport type SwitchRootEmits<T = boolean> = {\n  /** Event handler called when the value of the switch changes. */\n  'update:modelValue': [payload: T]\n}\n\nexport interface SwitchRootContext {\n  checked: ComputedRef<boolean>\n  toggleCheck: () => void\n  disabled: Ref<boolean>\n}\n\nexport const [injectSwitchRootContext, provideSwitchRootContext]\n  = createContext<SwitchRootContext>('SwitchRoot')\n</script>\n\n<script setup lang=\"ts\" generic=\"T = boolean\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\n\nconst props = withDefaults(defineProps<SwitchRootProps<T>>(), {\n  as: 'button',\n  modelValue: undefined,\n  value: 'on',\n  trueValue: (() => true) as unknown as undefined,\n  falseValue: (() => false) as unknown as undefined,\n})\nconst emit = defineEmits<SwitchRootEmits<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current value */\n    modelValue: typeof modelValue.value\n    /** Whether the switch is checked */\n    checked: typeof checked.value\n  }) => any\n}>()\n\nconst { disabled } = toRefs(props)\n\nconst modelValue = useVModel(props as any, 'modelValue', emit as any, {\n  defaultValue: props.defaultValue ?? props.falseValue,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<T>\n\nconst checked = computed(() => modelValue.value === props.trueValue)\n\nfunction toggleCheck() {\n  if (disabled.value)\n    return\n\n  modelValue.value = checked.value ? props.falseValue as T : props.trueValue as T\n}\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst isFormControl = useFormControl(currentElement)\nconst ariaLabel = computed(() => props.id && currentElement.value ? (document.querySelector(`[for=\"${props.id}\"]`) as HTMLLabelElement)?.innerText : undefined)\n\nprovideSwitchRootContext({\n  checked,\n  toggleCheck,\n  disabled,\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    :id=\"id\"\n    :ref=\"forwardRef\"\n    role=\"switch\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :value=\"value\"\n    :aria-label=\"$attrs['aria-label'] || ariaLabel\"\n    :aria-checked=\"checked\"\n    :aria-required=\"required\"\n    :data-state=\"checked ? 'checked' : 'unchecked'\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :disabled=\"disabled\"\n    @click=\"toggleCheck\"\n    @keydown.enter.prevent=\"toggleCheck\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :checked=\"checked\"\n    />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name\"\n      type=\"checkbox\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n      :value=\"value\"\n      :checked=\"checked\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { FormFieldProps } from '@/shared/types'\nimport { createContext, useFormControl, useForwardExpose } from '@/shared'\n\nexport interface SwitchRootProps<T = boolean> extends PrimitiveProps, FormFieldProps {\n  /** The state of the switch when it is initially rendered. Use when you do not need to control its state. */\n  defaultValue?: T\n  /** The controlled state of the switch. Can be bind as `v-model`. */\n  modelValue?: T | null\n  /** When `true`, prevents the user from interacting with the switch. */\n  disabled?: boolean\n  id?: string\n  /** The value given as data when submitted with a `name`. */\n  value?: string\n  /**\n   * The value used when the switch is on. Defaults to `true`.\n   */\n  trueValue?: T\n  /**\n   * The value used when the switch is off. Defaults to `false`.\n   */\n  falseValue?: T\n}\n\nexport type SwitchRootEmits<T = boolean> = {\n  /** Event handler called when the value of the switch changes. */\n  'update:modelValue': [payload: T]\n}\n\nexport interface SwitchRootContext {\n  checked: ComputedRef<boolean>\n  toggleCheck: () => void\n  disabled: Ref<boolean>\n}\n\nexport const [injectSwitchRootContext, provideSwitchRootContext]\n  = createContext<SwitchRootContext>('SwitchRoot')\n</script>\n\n<script setup lang=\"ts\" generic=\"T = boolean\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\n\nconst props = withDefaults(defineProps<SwitchRootProps<T>>(), {\n  as: 'button',\n  modelValue: undefined,\n  value: 'on',\n  trueValue: (() => true) as unknown as undefined,\n  falseValue: (() => false) as unknown as undefined,\n})\nconst emit = defineEmits<SwitchRootEmits<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current value */\n    modelValue: typeof modelValue.value\n    /** Whether the switch is checked */\n    checked: typeof checked.value\n  }) => any\n}>()\n\nconst { disabled } = toRefs(props)\n\nconst modelValue = useVModel(props as any, 'modelValue', emit as any, {\n  defaultValue: props.defaultValue ?? props.falseValue,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<T>\n\nconst checked = computed(() => modelValue.value === props.trueValue)\n\nfunction toggleCheck() {\n  if (disabled.value)\n    return\n\n  modelValue.value = checked.value ? props.falseValue as T : props.trueValue as T\n}\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst isFormControl = useFormControl(currentElement)\nconst ariaLabel = computed(() => props.id && currentElement.value ? (document.querySelector(`[for=\"${props.id}\"]`) as HTMLLabelElement)?.innerText : undefined)\n\nprovideSwitchRootContext({\n  checked,\n  toggleCheck,\n  disabled,\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    :id=\"id\"\n    :ref=\"forwardRef\"\n    role=\"switch\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :value=\"value\"\n    :aria-label=\"$attrs['aria-label'] || ariaLabel\"\n    :aria-checked=\"checked\"\n    :aria-required=\"required\"\n    :data-state=\"checked ? 'checked' : 'unchecked'\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n    :disabled=\"disabled\"\n    @click=\"toggleCheck\"\n    @keydown.enter.prevent=\"toggleCheck\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :checked=\"checked\"\n    />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name\"\n      type=\"checkbox\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n      :value=\"value\"\n      :checked=\"checked\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface SwitchThumbProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectSwitchRootContext } from './SwitchRoot.vue'\n\nwithDefaults(defineProps<SwitchThumbProps>(), { as: 'span' })\n\nconst rootContext = injectSwitchRootContext()\n\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    :data-state=\"rootContext.checked.value ? 'checked' : 'unchecked'\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface SwitchThumbProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectSwitchRootContext } from './SwitchRoot.vue'\n\nwithDefaults(defineProps<SwitchThumbProps>(), { as: 'span' })\n\nconst rootContext = injectSwitchRootContext()\n\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive\n    :data-state=\"rootContext.checked.value ? 'checked' : 'unchecked'\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { DataOrientation, Direction, StringOrNumber } from '../shared/types'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useVModel } from '@vueuse/core'\nimport { createContext, useDirection, useForwardExpose, useId } from '@/shared'\n\nexport interface TabsRootContext {\n  modelValue: Ref<StringOrNumber | undefined>\n  changeModelValue: (value: StringOrNumber) => void\n  orientation: Ref<DataOrientation>\n  dir: Ref<Direction>\n  unmountOnHide: Ref<boolean>\n  activationMode: 'automatic' | 'manual'\n  baseId: string\n  tabsList: Ref<HTMLElement | undefined>\n  contentIds: Ref<Set<StringOrNumber>>\n  registerContent: (value: StringOrNumber) => void\n  unregisterContent: (value: StringOrNumber) => void\n}\n\nexport interface TabsRootProps<T extends StringOrNumber = StringOrNumber> extends PrimitiveProps {\n  /**\n   * The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs\n   */\n  defaultValue?: T\n  /**\n   * The orientation the tabs are laid out.\n   * Mainly so arrow navigation is done accordingly (left & right vs. up & down)\n   * @defaultValue horizontal\n   */\n  orientation?: DataOrientation\n  /**\n   * The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode.\n   */\n  dir?: Direction\n  /**\n   * Whether a tab is activated automatically (on focus) or manually (on click).\n   * @defaultValue automatic\n   */\n  activationMode?: 'automatic' | 'manual'\n  /** The controlled value of the tab to activate. Can be bind as `v-model`. */\n  modelValue?: T\n  /**\n   * When `true`, the element will be unmounted on closed state.\n   *\n   * @defaultValue `true`\n   */\n  unmountOnHide?: boolean\n}\nexport type TabsRootEmits<T extends StringOrNumber = StringOrNumber> = {\n  /** Event handler called when the value changes */\n  'update:modelValue': [payload: T]\n}\n\nexport const [injectTabsRootContext, provideTabsRootContext]\n  = createContext<TabsRootContext>('TabsRoot')\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends StringOrNumber = StringOrNumber\">\nimport { ref, shallowRef, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<TabsRootProps<T>>(), {\n  orientation: 'horizontal',\n  activationMode: 'automatic',\n  unmountOnHide: true,\n})\nconst emits = defineEmits<TabsRootEmits<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { orientation, unmountOnHide, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\nuseForwardExpose()\n\nconst modelValue = useVModel<TabsRootProps<T>, 'modelValue', 'update:modelValue'>(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst tabsList = ref<HTMLElement>()\nconst contentIds = shallowRef<Set<StringOrNumber>>(new Set())\n\nprovideTabsRootContext({\n  modelValue,\n  changeModelValue: (value: StringOrNumber) => {\n    modelValue.value = value as T\n  },\n  orientation,\n  dir,\n  unmountOnHide,\n  activationMode: props.activationMode,\n  baseId: useId(undefined, 'reka-tabs'),\n  tabsList,\n  contentIds,\n  registerContent: (value: StringOrNumber) => {\n    contentIds.value = new Set([...contentIds.value, value])\n  },\n  unregisterContent: (value: StringOrNumber) => {\n    const newSet = new Set(contentIds.value)\n    newSet.delete(value)\n    contentIds.value = newSet\n  },\n})\n</script>\n\n<template>\n  <Primitive\n    :dir=\"dir\"\n    :data-orientation=\"orientation\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n  >\n    <slot :model-value=\"modelValue\" />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { DataOrientation, Direction, StringOrNumber } from '../shared/types'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useVModel } from '@vueuse/core'\nimport { createContext, useDirection, useForwardExpose, useId } from '@/shared'\n\nexport interface TabsRootContext {\n  modelValue: Ref<StringOrNumber | undefined>\n  changeModelValue: (value: StringOrNumber) => void\n  orientation: Ref<DataOrientation>\n  dir: Ref<Direction>\n  unmountOnHide: Ref<boolean>\n  activationMode: 'automatic' | 'manual'\n  baseId: string\n  tabsList: Ref<HTMLElement | undefined>\n  contentIds: Ref<Set<StringOrNumber>>\n  registerContent: (value: StringOrNumber) => void\n  unregisterContent: (value: StringOrNumber) => void\n}\n\nexport interface TabsRootProps<T extends StringOrNumber = StringOrNumber> extends PrimitiveProps {\n  /**\n   * The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs\n   */\n  defaultValue?: T\n  /**\n   * The orientation the tabs are laid out.\n   * Mainly so arrow navigation is done accordingly (left & right vs. up & down)\n   * @defaultValue horizontal\n   */\n  orientation?: DataOrientation\n  /**\n   * The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode.\n   */\n  dir?: Direction\n  /**\n   * Whether a tab is activated automatically (on focus) or manually (on click).\n   * @defaultValue automatic\n   */\n  activationMode?: 'automatic' | 'manual'\n  /** The controlled value of the tab to activate. Can be bind as `v-model`. */\n  modelValue?: T\n  /**\n   * When `true`, the element will be unmounted on closed state.\n   *\n   * @defaultValue `true`\n   */\n  unmountOnHide?: boolean\n}\nexport type TabsRootEmits<T extends StringOrNumber = StringOrNumber> = {\n  /** Event handler called when the value changes */\n  'update:modelValue': [payload: T]\n}\n\nexport const [injectTabsRootContext, provideTabsRootContext]\n  = createContext<TabsRootContext>('TabsRoot')\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends StringOrNumber = StringOrNumber\">\nimport { ref, shallowRef, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<TabsRootProps<T>>(), {\n  orientation: 'horizontal',\n  activationMode: 'automatic',\n  unmountOnHide: true,\n})\nconst emits = defineEmits<TabsRootEmits<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { orientation, unmountOnHide, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\nuseForwardExpose()\n\nconst modelValue = useVModel<TabsRootProps<T>, 'modelValue', 'update:modelValue'>(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n})\n\nconst tabsList = ref<HTMLElement>()\nconst contentIds = shallowRef<Set<StringOrNumber>>(new Set())\n\nprovideTabsRootContext({\n  modelValue,\n  changeModelValue: (value: StringOrNumber) => {\n    modelValue.value = value as T\n  },\n  orientation,\n  dir,\n  unmountOnHide,\n  activationMode: props.activationMode,\n  baseId: useId(undefined, 'reka-tabs'),\n  tabsList,\n  contentIds,\n  registerContent: (value: StringOrNumber) => {\n    contentIds.value = new Set([...contentIds.value, value])\n  },\n  unregisterContent: (value: StringOrNumber) => {\n    const newSet = new Set(contentIds.value)\n    newSet.delete(value)\n    contentIds.value = newSet\n  },\n})\n</script>\n\n<template>\n  <Primitive\n    :dir=\"dir\"\n    :data-orientation=\"orientation\"\n    :as-child=\"asChild\"\n    :as=\"as\"\n  >\n    <slot :model-value=\"modelValue\" />\n  </Primitive>\n</template>\n","import type { StringOrNumber } from '@/shared/types'\n\nexport function makeTriggerId(baseId: string, value: StringOrNumber) {\n  return `${baseId}-trigger-${value}`\n}\n\nexport function makeContentId(baseId: string, value: StringOrNumber) {\n  return `${baseId}-content-${value}`\n}\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { StringOrNumber } from '@/shared/types'\nimport { useForwardExpose } from '@/shared'\n\nexport interface TabsContentProps extends PrimitiveProps {\n  /** A unique value that associates the content with a trigger. */\n  value: StringOrNumber\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref } from 'vue'\nimport { Presence } from '@/Presence'\nimport { Primitive } from '@/Primitive'\nimport { injectTabsRootContext } from './TabsRoot.vue'\nimport { makeContentId, makeTriggerId } from './utils'\n\nconst props = defineProps<TabsContentProps>()\n\nconst { forwardRef } = useForwardExpose()\nconst rootContext = injectTabsRootContext()\nconst triggerId = computed(() => makeTriggerId(rootContext.baseId, props.value))\nconst contentId = computed(() => makeContentId(rootContext.baseId, props.value))\n\nconst isSelected = computed(() => props.value === rootContext.modelValue.value)\n\nconst isMountAnimationPreventedRef = ref(isSelected.value)\n\nonMounted(() => {\n  rootContext.registerContent(props.value)\n  requestAnimationFrame(() => {\n    isMountAnimationPreventedRef.value = false\n  })\n})\n\nonBeforeUnmount(() => {\n  rootContext.unregisterContent(props.value)\n})\n</script>\n\n<template>\n  <Presence\n    v-slot=\"{ present }\"\n    :present=\"forceMount || isSelected\"\n    force-mount\n  >\n    <Primitive\n      :id=\"contentId\"\n      :ref=\"forwardRef\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      role=\"tabpanel\"\n      :data-state=\"isSelected ? 'active' : 'inactive'\"\n      :data-orientation=\"rootContext.orientation.value\"\n      :aria-labelledby=\"triggerId\"\n      :hidden=\"!present\"\n      tabindex=\"0\"\n      :style=\"{\n        animationDuration: isMountAnimationPreventedRef ? '0s' : undefined,\n      }\"\n    >\n      <slot v-if=\"rootContext.unmountOnHide.value ? present : true\" />\n    </Primitive>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { StringOrNumber } from '@/shared/types'\nimport { useForwardExpose } from '@/shared'\n\nexport interface TabsContentProps extends PrimitiveProps {\n  /** A unique value that associates the content with a trigger. */\n  value: StringOrNumber\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref } from 'vue'\nimport { Presence } from '@/Presence'\nimport { Primitive } from '@/Primitive'\nimport { injectTabsRootContext } from './TabsRoot.vue'\nimport { makeContentId, makeTriggerId } from './utils'\n\nconst props = defineProps<TabsContentProps>()\n\nconst { forwardRef } = useForwardExpose()\nconst rootContext = injectTabsRootContext()\nconst triggerId = computed(() => makeTriggerId(rootContext.baseId, props.value))\nconst contentId = computed(() => makeContentId(rootContext.baseId, props.value))\n\nconst isSelected = computed(() => props.value === rootContext.modelValue.value)\n\nconst isMountAnimationPreventedRef = ref(isSelected.value)\n\nonMounted(() => {\n  rootContext.registerContent(props.value)\n  requestAnimationFrame(() => {\n    isMountAnimationPreventedRef.value = false\n  })\n})\n\nonBeforeUnmount(() => {\n  rootContext.unregisterContent(props.value)\n})\n</script>\n\n<template>\n  <Presence\n    v-slot=\"{ present }\"\n    :present=\"forceMount || isSelected\"\n    force-mount\n  >\n    <Primitive\n      :id=\"contentId\"\n      :ref=\"forwardRef\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      role=\"tabpanel\"\n      :data-state=\"isSelected ? 'active' : 'inactive'\"\n      :data-orientation=\"rootContext.orientation.value\"\n      :aria-labelledby=\"triggerId\"\n      :hidden=\"!present\"\n      tabindex=\"0\"\n      :style=\"{\n        animationDuration: isMountAnimationPreventedRef ? '0s' : undefined,\n      }\"\n    >\n      <slot v-if=\"rootContext.unmountOnHide.value ? present : true\" />\n    </Primitive>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed, ref, watch, watchPostEffect } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport { injectTabsRootContext } from './TabsRoot.vue'\n\nexport interface TabsIndicatorProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useMounted, useResizeObserver } from '@vueuse/core'\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<TabsIndicatorProps>()\nconst context = injectTabsRootContext()\ndefineExpose({\n  updateIndicatorStyle,\n})\nuseForwardExpose()\n\nconst isMounted = useMounted()\n\ninterface IndicatorStyle {\n  size: number | null\n  position: number | null\n}\nconst indicatorStyle = ref<IndicatorStyle>({\n  size: null,\n  position: null,\n})\nconst tabs = ref<Array<HTMLElement>>([])\n\nwatch(() => [context.modelValue.value, context?.dir.value], () => {\n  updateIndicatorStyle()\n}, { immediate: true, flush: 'post' })\n\nwatchPostEffect(() => {\n  tabs.value = Array.from(context.tabsList.value?.querySelectorAll<HTMLElement>('[role=\"tab\"]') || [])\n})\n\nuseResizeObserver(computed(() => [context.tabsList.value, ...tabs.value]), updateIndicatorStyle)\n\nfunction updateIndicatorStyle() {\n  const activeTab = context.tabsList.value?.querySelector<HTMLButtonElement>('[role=\"tab\"][data-state=\"active\"]')\n\n  if (!activeTab)\n    return\n\n  if (context.orientation.value === 'horizontal') {\n    indicatorStyle.value = {\n      size: activeTab.offsetWidth,\n      position: activeTab.offsetLeft,\n    }\n  }\n  else {\n    indicatorStyle.value = {\n      size: activeTab.offsetHeight,\n      position: activeTab.offsetTop,\n    }\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    v-if=\"isMounted && typeof indicatorStyle.size === 'number'\"\n    v-bind=\"props\"\n    :style=\"{\n      '--reka-tabs-indicator-size': `${indicatorStyle.size}px`,\n      '--reka-tabs-indicator-position': `${indicatorStyle.position}px`,\n    }\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed, ref, watch, watchPostEffect } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport { injectTabsRootContext } from './TabsRoot.vue'\n\nexport interface TabsIndicatorProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useMounted, useResizeObserver } from '@vueuse/core'\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<TabsIndicatorProps>()\nconst context = injectTabsRootContext()\ndefineExpose({\n  updateIndicatorStyle,\n})\nuseForwardExpose()\n\nconst isMounted = useMounted()\n\ninterface IndicatorStyle {\n  size: number | null\n  position: number | null\n}\nconst indicatorStyle = ref<IndicatorStyle>({\n  size: null,\n  position: null,\n})\nconst tabs = ref<Array<HTMLElement>>([])\n\nwatch(() => [context.modelValue.value, context?.dir.value], () => {\n  updateIndicatorStyle()\n}, { immediate: true, flush: 'post' })\n\nwatchPostEffect(() => {\n  tabs.value = Array.from(context.tabsList.value?.querySelectorAll<HTMLElement>('[role=\"tab\"]') || [])\n})\n\nuseResizeObserver(computed(() => [context.tabsList.value, ...tabs.value]), updateIndicatorStyle)\n\nfunction updateIndicatorStyle() {\n  const activeTab = context.tabsList.value?.querySelector<HTMLButtonElement>('[role=\"tab\"][data-state=\"active\"]')\n\n  if (!activeTab)\n    return\n\n  if (context.orientation.value === 'horizontal') {\n    indicatorStyle.value = {\n      size: activeTab.offsetWidth,\n      position: activeTab.offsetLeft,\n    }\n  }\n  else {\n    indicatorStyle.value = {\n      size: activeTab.offsetHeight,\n      position: activeTab.offsetTop,\n    }\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    v-if=\"isMounted && typeof indicatorStyle.size === 'number'\"\n    v-bind=\"props\"\n    :style=\"{\n      '--reka-tabs-indicator-size': `${indicatorStyle.size}px`,\n      '--reka-tabs-indicator-position': `${indicatorStyle.position}px`,\n    }\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface TabsListProps extends PrimitiveProps {\n  /** When `true`, keyboard navigation will loop from last tab to first, and vice versa. */\n  loop?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusGroup } from '@/RovingFocus'\nimport { injectTabsRootContext } from './TabsRoot.vue'\n\nconst props = withDefaults(defineProps<TabsListProps>(), {\n  loop: true,\n})\nconst { loop } = toRefs(props)\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst context = injectTabsRootContext()\n\ncontext.tabsList = currentElement\n</script>\n\n<template>\n  <RovingFocusGroup\n    as-child\n    :orientation=\"context.orientation.value\"\n    :dir=\"context.dir.value\"\n    :loop=\"loop\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      role=\"tablist\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      :aria-orientation=\"context.orientation.value\"\n    >\n      <slot />\n    </Primitive>\n  </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface TabsListProps extends PrimitiveProps {\n  /** When `true`, keyboard navigation will loop from last tab to first, and vice versa. */\n  loop?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusGroup } from '@/RovingFocus'\nimport { injectTabsRootContext } from './TabsRoot.vue'\n\nconst props = withDefaults(defineProps<TabsListProps>(), {\n  loop: true,\n})\nconst { loop } = toRefs(props)\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst context = injectTabsRootContext()\n\ncontext.tabsList = currentElement\n</script>\n\n<template>\n  <RovingFocusGroup\n    as-child\n    :orientation=\"context.orientation.value\"\n    :dir=\"context.dir.value\"\n    :loop=\"loop\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      role=\"tablist\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n      :aria-orientation=\"context.orientation.value\"\n    >\n      <slot />\n    </Primitive>\n  </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { StringOrNumber } from '@/shared/types'\nimport { useForwardExpose } from '@/shared'\n\nexport interface TabsTriggerProps extends PrimitiveProps {\n  /** A unique value that associates the trigger with a content. */\n  value: StringOrNumber\n  /** When `true`, prevents the user from interacting with the tab. */\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusItem } from '@/RovingFocus'\nimport { injectTabsRootContext } from './TabsRoot.vue'\nimport { makeContentId, makeTriggerId } from './utils'\n\nconst props = withDefaults(defineProps<TabsTriggerProps>(), {\n  disabled: false,\n  as: 'button',\n})\n\nconst { forwardRef } = useForwardExpose()\nconst rootContext = injectTabsRootContext()\n\nconst triggerId = computed(() => makeTriggerId(rootContext.baseId, props.value))\nconst contentId = computed(() => rootContext.contentIds.value.has(props.value) ? makeContentId(rootContext.baseId, props.value) : undefined)\n\nconst isSelected = computed(() => props.value === rootContext.modelValue.value)\n</script>\n\n<template>\n  <RovingFocusItem\n    as-child\n    :focusable=\"!disabled\"\n    :active=\"isSelected\"\n  >\n    <Primitive\n      :id=\"triggerId\"\n      :ref=\"forwardRef\"\n      role=\"tab\"\n      :type=\"as === 'button' ? 'button' : undefined\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :aria-selected=\"isSelected ? 'true' : 'false'\"\n      :aria-controls=\"contentId\"\n      :data-state=\"isSelected ? 'active' : 'inactive'\"\n      :disabled=\"disabled\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :data-orientation=\"rootContext.orientation.value\"\n      @mousedown.left=\"(event: MouseEvent) => {\n        // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n        // but not when the control key is pressed (avoiding MacOS right click)\n        if (!disabled && event.ctrlKey === false) {\n          rootContext.changeModelValue(value);\n        }\n        else {\n          // prevent focus to avoid accidental activation\n          event.preventDefault();\n        }\n      }\"\n      @keydown.enter.space=\"rootContext.changeModelValue(value)\"\n      @focus=\"() => {\n        // handle 'automatic' activation if necessary\n        // ie. activate tab following focus\n        const isAutomaticActivation = rootContext.activationMode !== 'manual';\n        if (!isSelected && !disabled && isAutomaticActivation) {\n          rootContext.changeModelValue(value);\n        }\n      }\"\n    >\n      <slot />\n    </Primitive>\n  </RovingFocusItem>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { StringOrNumber } from '@/shared/types'\nimport { useForwardExpose } from '@/shared'\n\nexport interface TabsTriggerProps extends PrimitiveProps {\n  /** A unique value that associates the trigger with a content. */\n  value: StringOrNumber\n  /** When `true`, prevents the user from interacting with the tab. */\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusItem } from '@/RovingFocus'\nimport { injectTabsRootContext } from './TabsRoot.vue'\nimport { makeContentId, makeTriggerId } from './utils'\n\nconst props = withDefaults(defineProps<TabsTriggerProps>(), {\n  disabled: false,\n  as: 'button',\n})\n\nconst { forwardRef } = useForwardExpose()\nconst rootContext = injectTabsRootContext()\n\nconst triggerId = computed(() => makeTriggerId(rootContext.baseId, props.value))\nconst contentId = computed(() => rootContext.contentIds.value.has(props.value) ? makeContentId(rootContext.baseId, props.value) : undefined)\n\nconst isSelected = computed(() => props.value === rootContext.modelValue.value)\n</script>\n\n<template>\n  <RovingFocusItem\n    as-child\n    :focusable=\"!disabled\"\n    :active=\"isSelected\"\n  >\n    <Primitive\n      :id=\"triggerId\"\n      :ref=\"forwardRef\"\n      role=\"tab\"\n      :type=\"as === 'button' ? 'button' : undefined\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :aria-selected=\"isSelected ? 'true' : 'false'\"\n      :aria-controls=\"contentId\"\n      :data-state=\"isSelected ? 'active' : 'inactive'\"\n      :disabled=\"disabled\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :data-orientation=\"rootContext.orientation.value\"\n      @mousedown.left=\"(event: MouseEvent) => {\n        // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n        // but not when the control key is pressed (avoiding MacOS right click)\n        if (!disabled && event.ctrlKey === false) {\n          rootContext.changeModelValue(value);\n        }\n        else {\n          // prevent focus to avoid accidental activation\n          event.preventDefault();\n        }\n      }\"\n      @keydown.enter.space=\"rootContext.changeModelValue(value)\"\n      @focus=\"() => {\n        // handle 'automatic' activation if necessary\n        // ie. activate tab following focus\n        const isAutomaticActivation = rootContext.activationMode !== 'manual';\n        if (!isSelected && !disabled && isAutomaticActivation) {\n          rootContext.changeModelValue(value);\n        }\n      }\"\n    >\n      <slot />\n    </Primitive>\n  </RovingFocusItem>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Direction, FormFieldProps } from '@/shared/types'\nimport { computed, ref, toRefs } from 'vue'\nimport { createContext, useArrowNavigation, useDirection, useFormControl, useForwardExpose } from '@/shared'\n\nexport type AcceptableInputValue = string | number | bigint | Record<string, any>\n\nexport interface TagsInputRootProps<T = AcceptableInputValue> extends PrimitiveProps, FormFieldProps {\n  /** The controlled value of the tags input. Can be bind as `v-model`. */\n  modelValue?: Array<T> | null\n  /** The value of the tags that should be added. Use when you do not need to control the state of the tags input */\n  defaultValue?: Array<T>\n  /** When `true`, allow adding tags on paste. Work in conjunction with delimiter prop. */\n  addOnPaste?: boolean\n  /** When `true` allow adding tags on tab keydown */\n  addOnTab?: boolean\n  /** When `true` allow adding tags blur input */\n  addOnBlur?: boolean\n  /** When `true`, allow duplicated tags. */\n  duplicate?: boolean\n  /** When `true`, prevents the user from interacting with the tags input. */\n  disabled?: boolean\n  /** The character or regular expression to trigger the addition of a new tag. Also used to split tags for `@paste` event */\n  delimiter?: string | RegExp\n  /** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** Maximum number of tags. */\n  max?: number\n  id?: string\n  /** Convert the input value to the desired type. Mandatory when using objects as values and using `TagsInputInput` */\n  convertValue?: (value: string) => T\n  /** Display the value of the tag. Useful when you want to apply modifications to the value like adding a suffix or when using object as values */\n  displayValue?: (value: T) => string\n}\n\nexport type TagsInputRootEmits<T = AcceptableInputValue> = {\n  /** Event handler called when the value changes */\n  'update:modelValue': [payload: Array<T>]\n  /** Event handler called when the value is invalid */\n  'invalid': [payload: T]\n  /** Event handler called when tag is added */\n  'addTag': [payload: T]\n  /** Event handler called when tag is removed */\n  'removeTag': [payload: T]\n}\n\nexport interface TagsInputRootContext<T = AcceptableInputValue> {\n  modelValue: Ref<Array<T>>\n  onAddValue: (payload: string) => boolean\n  onRemoveValue: (index: number) => void\n  onInputKeydown: (event: KeyboardEvent) => void\n  selectedElement: Ref<HTMLElement | undefined>\n  isInvalidInput: Ref<boolean>\n  addOnPaste: Ref<boolean>\n  addOnTab: Ref<boolean>\n  addOnBlur: Ref<boolean>\n  disabled: Ref<boolean>\n  delimiter: Ref<string | RegExp>\n  dir: Ref<Direction>\n  max: Ref<number>\n  id: Ref<string | undefined> | undefined\n  displayValue: (value: T) => string\n}\n\nexport const [injectTagsInputRootContext, provideTagsInputRootContext]\n  = createContext<TagsInputRootContext>('TagsInputRoot')\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableInputValue = string\">\nimport { useFocusWithin, useVModel } from '@vueuse/core'\nimport { useCollection } from '@/Collection'\nimport { Primitive } from '@/Primitive'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\n\nconst props = withDefaults(defineProps<TagsInputRootProps<T>>(), {\n  defaultValue: () => [],\n  delimiter: ',',\n  max: 0,\n  displayValue: (value: T) => value.toString(),\n})\nconst emits = defineEmits<TagsInputRootEmits<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { addOnPaste, disabled, delimiter, max, id, dir: propDir, addOnBlur, addOnTab } = toRefs(props)\nconst dir = useDirection(propDir)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: true,\n  deep: true,\n}) as Ref<Array<AcceptableInputValue>>\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst { focused } = useFocusWithin(currentElement)\nconst isFormControl = useFormControl(currentElement)\n\nconst { getItems, CollectionSlot } = useCollection({ isProvider: true })\n\nconst selectedElement = ref<HTMLElement>()\nconst isInvalidInput = ref(false)\n\nconst currentModelValue = computed(() => Array.isArray(modelValue.value) ? [...modelValue.value] : [])\n\nfunction handleRemoveTag(index: number) {\n  if (index !== -1) {\n    const collection = getItems().filter(i => i.ref.dataset.disabled !== '')\n    modelValue.value = modelValue.value.filter((_, i) => i !== index)\n    emits('removeTag', collection[index].value)\n  }\n}\n\nprovideTagsInputRootContext({\n  modelValue,\n  onAddValue: (_payload) => {\n    const array = [...currentModelValue.value]\n    const modelValueIsObject = array.length > 0 && typeof array[0] === 'object'\n    const defaultValueIsObject = array.length > 0 && typeof props.defaultValue[0] === 'object'\n\n    // Check if the value is an object and if the convertValue function is provided. We don't check this a type level because the use\n    // of `TagsInputInput` is optional.\n    if ((modelValueIsObject || defaultValueIsObject) && typeof props.convertValue !== 'function')\n      throw new Error('You must provide a `convertValue` function when using objects as values.')\n    const payload = props.convertValue ? props.convertValue(_payload) : _payload as T\n\n    if ((array.length >= max.value) && !!max.value) {\n      emits('invalid', payload)\n      return false\n    }\n\n    if (props.duplicate) {\n      modelValue.value = [...array, payload]\n      emits('addTag', payload)\n      return true\n    }\n    else {\n      const exist = array.includes(payload)\n      if (!exist) {\n        modelValue.value = [...array, payload]\n        emits('addTag', payload)\n        return true\n      }\n      else {\n        isInvalidInput.value = true\n      }\n    }\n    emits('invalid', payload)\n    return false\n  },\n  onRemoveValue: handleRemoveTag,\n  onInputKeydown: (event) => {\n    // Don't navigate/select tags mid-composition, keys are used for IME candidate navigation\n    if (event.isComposing)\n      return\n    const target = event.target as HTMLInputElement\n    const collection = getItems().map(i => i.ref).filter(i => i.dataset.disabled !== '')\n    if (!collection.length)\n      return\n    const lastTag = collection.at(-1)\n    switch (event.key) {\n      case 'Delete':\n      case 'Backspace': {\n        if (target.selectionStart !== 0 || target.selectionEnd !== 0)\n          break\n\n        if (selectedElement.value) {\n          const index = collection.findIndex(i => i === selectedElement.value)\n          handleRemoveTag(index)\n          selectedElement.value = selectedElement.value === lastTag ? collection.at(index - 1) : collection.at(index + 1)\n          event.preventDefault()\n        }\n        else if (event.key === 'Backspace') {\n          selectedElement.value = lastTag\n          event.preventDefault()\n        }\n        break\n      }\n      case 'Home':\n      case 'End':\n      case 'ArrowRight':\n      case 'ArrowLeft': {\n        const isArrowRight = (event.key === 'ArrowRight' && dir.value === 'ltr') || (event.key === 'ArrowLeft' && dir.value === 'rtl')\n        const isArrowLeft = !isArrowRight\n        // only focus on tags when cursor is at the first position\n        if (target.selectionStart !== 0 || target.selectionEnd !== 0)\n          break\n\n        // if you press ArrowLeft, then we last tag\n        if (isArrowLeft && !selectedElement.value) {\n          selectedElement.value = lastTag\n          event.preventDefault()\n        }\n        // if you press ArrowRight on last tag, you deselect\n        else if (isArrowRight && lastTag && selectedElement.value === lastTag) {\n          selectedElement.value = undefined\n          event.preventDefault()\n        }\n        else if (selectedElement.value) {\n          const el = useArrowNavigation(event, selectedElement.value, undefined, {\n            itemsArray: collection,\n            loop: false,\n            dir: dir.value,\n          })\n          if (el)\n            selectedElement.value = el\n          event.preventDefault()\n        }\n        break\n      }\n      case 'ArrowUp':\n      case 'ArrowDown': {\n        if (selectedElement.value)\n          event.preventDefault()\n        break\n      }\n      default: {\n        selectedElement.value = undefined\n      }\n    }\n  },\n  selectedElement,\n  isInvalidInput,\n  addOnPaste,\n  addOnBlur,\n  addOnTab,\n  dir,\n  disabled,\n  delimiter,\n  max,\n  id,\n  displayValue: props.displayValue as (value: AcceptableInputValue) => string,\n})\n</script>\n\n<template>\n  <CollectionSlot>\n    <Primitive\n      :ref=\"forwardRef\"\n      :dir=\"dir\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :data-invalid=\"isInvalidInput ? '' : undefined\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :data-focused=\"focused ? '' : undefined\"\n    >\n      <slot :model-value=\"modelValue\" />\n\n      <VisuallyHiddenInput\n        v-if=\"isFormControl && name\"\n        :name=\"name\"\n        :value=\"modelValue\"\n        :required=\"required\"\n        :disabled=\"disabled\"\n      />\n    </Primitive>\n  </CollectionSlot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Direction, FormFieldProps } from '@/shared/types'\nimport { computed, ref, toRefs } from 'vue'\nimport { createContext, useArrowNavigation, useDirection, useFormControl, useForwardExpose } from '@/shared'\n\nexport type AcceptableInputValue = string | number | bigint | Record<string, any>\n\nexport interface TagsInputRootProps<T = AcceptableInputValue> extends PrimitiveProps, FormFieldProps {\n  /** The controlled value of the tags input. Can be bind as `v-model`. */\n  modelValue?: Array<T> | null\n  /** The value of the tags that should be added. Use when you do not need to control the state of the tags input */\n  defaultValue?: Array<T>\n  /** When `true`, allow adding tags on paste. Work in conjunction with delimiter prop. */\n  addOnPaste?: boolean\n  /** When `true` allow adding tags on tab keydown */\n  addOnTab?: boolean\n  /** When `true` allow adding tags blur input */\n  addOnBlur?: boolean\n  /** When `true`, allow duplicated tags. */\n  duplicate?: boolean\n  /** When `true`, prevents the user from interacting with the tags input. */\n  disabled?: boolean\n  /** The character or regular expression to trigger the addition of a new tag. Also used to split tags for `@paste` event */\n  delimiter?: string | RegExp\n  /** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** Maximum number of tags. */\n  max?: number\n  id?: string\n  /** Convert the input value to the desired type. Mandatory when using objects as values and using `TagsInputInput` */\n  convertValue?: (value: string) => T\n  /** Display the value of the tag. Useful when you want to apply modifications to the value like adding a suffix or when using object as values */\n  displayValue?: (value: T) => string\n}\n\nexport type TagsInputRootEmits<T = AcceptableInputValue> = {\n  /** Event handler called when the value changes */\n  'update:modelValue': [payload: Array<T>]\n  /** Event handler called when the value is invalid */\n  'invalid': [payload: T]\n  /** Event handler called when tag is added */\n  'addTag': [payload: T]\n  /** Event handler called when tag is removed */\n  'removeTag': [payload: T]\n}\n\nexport interface TagsInputRootContext<T = AcceptableInputValue> {\n  modelValue: Ref<Array<T>>\n  onAddValue: (payload: string) => boolean\n  onRemoveValue: (index: number) => void\n  onInputKeydown: (event: KeyboardEvent) => void\n  selectedElement: Ref<HTMLElement | undefined>\n  isInvalidInput: Ref<boolean>\n  addOnPaste: Ref<boolean>\n  addOnTab: Ref<boolean>\n  addOnBlur: Ref<boolean>\n  disabled: Ref<boolean>\n  delimiter: Ref<string | RegExp>\n  dir: Ref<Direction>\n  max: Ref<number>\n  id: Ref<string | undefined> | undefined\n  displayValue: (value: T) => string\n}\n\nexport const [injectTagsInputRootContext, provideTagsInputRootContext]\n  = createContext<TagsInputRootContext>('TagsInputRoot')\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends AcceptableInputValue = string\">\nimport { useFocusWithin, useVModel } from '@vueuse/core'\nimport { useCollection } from '@/Collection'\nimport { Primitive } from '@/Primitive'\nimport { VisuallyHiddenInput } from '@/VisuallyHidden'\n\nconst props = withDefaults(defineProps<TagsInputRootProps<T>>(), {\n  defaultValue: () => [],\n  delimiter: ',',\n  max: 0,\n  displayValue: (value: T) => value.toString(),\n})\nconst emits = defineEmits<TagsInputRootEmits<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current input values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { addOnPaste, disabled, delimiter, max, id, dir: propDir, addOnBlur, addOnTab } = toRefs(props)\nconst dir = useDirection(propDir)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: true,\n  deep: true,\n}) as Ref<Array<AcceptableInputValue>>\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst { focused } = useFocusWithin(currentElement)\nconst isFormControl = useFormControl(currentElement)\n\nconst { getItems, CollectionSlot } = useCollection({ isProvider: true })\n\nconst selectedElement = ref<HTMLElement>()\nconst isInvalidInput = ref(false)\n\nconst currentModelValue = computed(() => Array.isArray(modelValue.value) ? [...modelValue.value] : [])\n\nfunction handleRemoveTag(index: number) {\n  if (index !== -1) {\n    const collection = getItems().filter(i => i.ref.dataset.disabled !== '')\n    modelValue.value = modelValue.value.filter((_, i) => i !== index)\n    emits('removeTag', collection[index].value)\n  }\n}\n\nprovideTagsInputRootContext({\n  modelValue,\n  onAddValue: (_payload) => {\n    const array = [...currentModelValue.value]\n    const modelValueIsObject = array.length > 0 && typeof array[0] === 'object'\n    const defaultValueIsObject = array.length > 0 && typeof props.defaultValue[0] === 'object'\n\n    // Check if the value is an object and if the convertValue function is provided. We don't check this a type level because the use\n    // of `TagsInputInput` is optional.\n    if ((modelValueIsObject || defaultValueIsObject) && typeof props.convertValue !== 'function')\n      throw new Error('You must provide a `convertValue` function when using objects as values.')\n    const payload = props.convertValue ? props.convertValue(_payload) : _payload as T\n\n    if ((array.length >= max.value) && !!max.value) {\n      emits('invalid', payload)\n      return false\n    }\n\n    if (props.duplicate) {\n      modelValue.value = [...array, payload]\n      emits('addTag', payload)\n      return true\n    }\n    else {\n      const exist = array.includes(payload)\n      if (!exist) {\n        modelValue.value = [...array, payload]\n        emits('addTag', payload)\n        return true\n      }\n      else {\n        isInvalidInput.value = true\n      }\n    }\n    emits('invalid', payload)\n    return false\n  },\n  onRemoveValue: handleRemoveTag,\n  onInputKeydown: (event) => {\n    // Don't navigate/select tags mid-composition, keys are used for IME candidate navigation\n    if (event.isComposing)\n      return\n    const target = event.target as HTMLInputElement\n    const collection = getItems().map(i => i.ref).filter(i => i.dataset.disabled !== '')\n    if (!collection.length)\n      return\n    const lastTag = collection.at(-1)\n    switch (event.key) {\n      case 'Delete':\n      case 'Backspace': {\n        if (target.selectionStart !== 0 || target.selectionEnd !== 0)\n          break\n\n        if (selectedElement.value) {\n          const index = collection.findIndex(i => i === selectedElement.value)\n          handleRemoveTag(index)\n          selectedElement.value = selectedElement.value === lastTag ? collection.at(index - 1) : collection.at(index + 1)\n          event.preventDefault()\n        }\n        else if (event.key === 'Backspace') {\n          selectedElement.value = lastTag\n          event.preventDefault()\n        }\n        break\n      }\n      case 'Home':\n      case 'End':\n      case 'ArrowRight':\n      case 'ArrowLeft': {\n        const isArrowRight = (event.key === 'ArrowRight' && dir.value === 'ltr') || (event.key === 'ArrowLeft' && dir.value === 'rtl')\n        const isArrowLeft = !isArrowRight\n        // only focus on tags when cursor is at the first position\n        if (target.selectionStart !== 0 || target.selectionEnd !== 0)\n          break\n\n        // if you press ArrowLeft, then we last tag\n        if (isArrowLeft && !selectedElement.value) {\n          selectedElement.value = lastTag\n          event.preventDefault()\n        }\n        // if you press ArrowRight on last tag, you deselect\n        else if (isArrowRight && lastTag && selectedElement.value === lastTag) {\n          selectedElement.value = undefined\n          event.preventDefault()\n        }\n        else if (selectedElement.value) {\n          const el = useArrowNavigation(event, selectedElement.value, undefined, {\n            itemsArray: collection,\n            loop: false,\n            dir: dir.value,\n          })\n          if (el)\n            selectedElement.value = el\n          event.preventDefault()\n        }\n        break\n      }\n      case 'ArrowUp':\n      case 'ArrowDown': {\n        if (selectedElement.value)\n          event.preventDefault()\n        break\n      }\n      default: {\n        selectedElement.value = undefined\n      }\n    }\n  },\n  selectedElement,\n  isInvalidInput,\n  addOnPaste,\n  addOnBlur,\n  addOnTab,\n  dir,\n  disabled,\n  delimiter,\n  max,\n  id,\n  displayValue: props.displayValue as (value: AcceptableInputValue) => string,\n})\n</script>\n\n<template>\n  <CollectionSlot>\n    <Primitive\n      :ref=\"forwardRef\"\n      :dir=\"dir\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :data-invalid=\"isInvalidInput ? '' : undefined\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :data-focused=\"focused ? '' : undefined\"\n    >\n      <slot :model-value=\"modelValue\" />\n\n      <VisuallyHiddenInput\n        v-if=\"isFormControl && name\"\n        :name=\"name\"\n        :value=\"modelValue\"\n        :required=\"required\"\n        :disabled=\"disabled\"\n      />\n    </Primitive>\n  </CollectionSlot>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectTagsInputRootContext } from './TagsInputRoot.vue'\n\nexport interface TagsInputClearProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<TagsInputClearProps>(), {\n  as: 'button',\n})\n\nuseForwardExpose()\nconst context = injectTagsInputRootContext()\n\nfunction handleCancel() {\n  if (context.disabled.value)\n    return\n  context.modelValue.value = []\n}\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :data-disabled=\"context.disabled.value ? '' : undefined\"\n    @click=\"handleCancel\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\nimport { injectTagsInputRootContext } from './TagsInputRoot.vue'\n\nexport interface TagsInputClearProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<TagsInputClearProps>(), {\n  as: 'button',\n})\n\nuseForwardExpose()\nconst context = injectTagsInputRootContext()\n\nfunction handleCancel() {\n  if (context.disabled.value)\n    return\n  context.modelValue.value = []\n}\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :data-disabled=\"context.disabled.value ? '' : undefined\"\n    @click=\"handleCancel\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useComposing, useForwardExpose } from '@/shared'\n\nexport interface TagsInputInputProps extends PrimitiveProps {\n  /** The placeholder character to use for empty tags input. */\n  placeholder?: string\n  /** Focus on element when mounted. */\n  autoFocus?: boolean\n  /** Maximum number of character allowed. */\n  maxLength?: number\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { nextTick, onMounted } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectTagsInputRootContext } from './TagsInputRoot.vue'\n\nconst props = withDefaults(defineProps<TagsInputInputProps>(), {\n  as: 'input',\n})\n\nconst context = injectTagsInputRootContext()\nconst { forwardRef, currentElement } = useForwardExpose()\n\nfunction handleBlur(event: FocusEvent) {\n  context.selectedElement.value = undefined\n\n  if (!context.addOnBlur.value)\n    return\n\n  const target = event.target as HTMLInputElement\n\n  // If the blur is caused by clicking an option within the content,\n  // we don't trigger the `addOnBlur` action,\n  // because the clicked option should be added instead of the input's current value.\n  const relatedTarget = event.relatedTarget as HTMLElement | null\n  const controlledId = target.getAttribute('aria-controls')\n  if (controlledId && relatedTarget?.closest(`#${CSS.escape(controlledId)}`))\n    return\n\n  if (!target.value)\n    return\n\n  const isAdded = context.onAddValue(target.value)\n  if (isAdded)\n    target.value = ''\n}\n\nfunction handleTab(event: Event) {\n  if (!context.addOnTab.value)\n    return\n\n  handleCustomKeydown(event)\n}\n\nconst { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing()\nasync function handleCustomKeydown(event: Event) {\n  if (isComposing.value)\n    return\n  await nextTick()\n  // if keydown 'Enter' or `Tab` was prevented, we let user handle updating the value themselves\n  if (event.defaultPrevented)\n    return\n\n  const target = event.target as HTMLInputElement\n  if (!target.value)\n    return\n\n  const isAdded = context.onAddValue(target.value)\n  if (isAdded)\n    target.value = ''\n\n  // prevent reloading when using inside of form\n  event.preventDefault()\n}\n\nfunction handleInput(event: InputEvent) {\n  if (isComposing.value)\n    return\n  context.isInvalidInput.value = false\n  if (event.data === null)\n    return\n\n  const delimiter = context.delimiter.value\n  const matchesDelimiter = delimiter === event.data || (delimiter instanceof RegExp && delimiter.test(event.data))\n  if (matchesDelimiter) {\n    const target = event.target as HTMLInputElement\n    target.value = target.value.replace(delimiter, '')\n\n    if (target.value.trim() === '') {\n      target.value = ''\n      return\n    }\n\n    const isAdded = context.onAddValue(target.value)\n    if (isAdded)\n      target.value = ''\n  }\n}\n\nfunction handleInputKeydown(event: KeyboardEvent) {\n  // `isComposing` stays true until the tick after `compositionend`, so arrow/backspace\n  // tag navigation is skipped even when the commit keydown reports `event.isComposing === false`.\n  if (isComposing.value)\n    return\n  context.onInputKeydown(event)\n}\n\nfunction handlePaste(event: ClipboardEvent) {\n  if (context.addOnPaste.value) {\n    event.preventDefault()\n    const clipboardData = event.clipboardData\n    if (!clipboardData)\n      return\n\n    const value = clipboardData.getData('text')\n    if (context.delimiter.value) {\n      const splitValue = value.split(context.delimiter.value)\n      splitValue.forEach((v) => {\n        context.onAddValue(v)\n      })\n    }\n    else {\n      context.onAddValue(value)\n    }\n  }\n}\n\nonMounted(() => {\n  const inputEl = currentElement.value.nodeName === 'INPUT'\n    ? currentElement.value\n    : currentElement.value.querySelector('input')\n\n  if (!inputEl)\n    return\n\n  setTimeout(() => {\n    // make sure all DOM was flush then only capture the focus\n    if (props.autoFocus)\n      inputEl?.focus()\n  }, 1)\n})\n</script>\n\n<template>\n  <Primitive\n    :id=\"context.id?.value\"\n    :ref=\"forwardRef\"\n    type=\"text\"\n    autocomplete=\"off\"\n    autocorrect=\"off\"\n    autocapitalize=\"off\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :maxlength=\"maxLength\"\n    :placeholder=\"placeholder\"\n    :disabled=\"context.disabled.value\"\n    :data-invalid=\"context.isInvalidInput.value ? '' : undefined\"\n    @input=\"handleInput\"\n    @keydown.enter=\"handleCustomKeydown\"\n    @keydown.tab=\"handleTab\"\n    @blur=\"handleBlur\"\n    @keydown=\"handleInputKeydown\"\n    @compositionstart=\"handleCompositionStart\"\n    @compositionend=\"handleCompositionEnd\"\n    @paste=\"handlePaste\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useComposing, useForwardExpose } from '@/shared'\n\nexport interface TagsInputInputProps extends PrimitiveProps {\n  /** The placeholder character to use for empty tags input. */\n  placeholder?: string\n  /** Focus on element when mounted. */\n  autoFocus?: boolean\n  /** Maximum number of character allowed. */\n  maxLength?: number\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { nextTick, onMounted } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectTagsInputRootContext } from './TagsInputRoot.vue'\n\nconst props = withDefaults(defineProps<TagsInputInputProps>(), {\n  as: 'input',\n})\n\nconst context = injectTagsInputRootContext()\nconst { forwardRef, currentElement } = useForwardExpose()\n\nfunction handleBlur(event: FocusEvent) {\n  context.selectedElement.value = undefined\n\n  if (!context.addOnBlur.value)\n    return\n\n  const target = event.target as HTMLInputElement\n\n  // If the blur is caused by clicking an option within the content,\n  // we don't trigger the `addOnBlur` action,\n  // because the clicked option should be added instead of the input's current value.\n  const relatedTarget = event.relatedTarget as HTMLElement | null\n  const controlledId = target.getAttribute('aria-controls')\n  if (controlledId && relatedTarget?.closest(`#${CSS.escape(controlledId)}`))\n    return\n\n  if (!target.value)\n    return\n\n  const isAdded = context.onAddValue(target.value)\n  if (isAdded)\n    target.value = ''\n}\n\nfunction handleTab(event: Event) {\n  if (!context.addOnTab.value)\n    return\n\n  handleCustomKeydown(event)\n}\n\nconst { isComposing, handleCompositionStart, handleCompositionEnd } = useComposing()\nasync function handleCustomKeydown(event: Event) {\n  if (isComposing.value)\n    return\n  await nextTick()\n  // if keydown 'Enter' or `Tab` was prevented, we let user handle updating the value themselves\n  if (event.defaultPrevented)\n    return\n\n  const target = event.target as HTMLInputElement\n  if (!target.value)\n    return\n\n  const isAdded = context.onAddValue(target.value)\n  if (isAdded)\n    target.value = ''\n\n  // prevent reloading when using inside of form\n  event.preventDefault()\n}\n\nfunction handleInput(event: InputEvent) {\n  if (isComposing.value)\n    return\n  context.isInvalidInput.value = false\n  if (event.data === null)\n    return\n\n  const delimiter = context.delimiter.value\n  const matchesDelimiter = delimiter === event.data || (delimiter instanceof RegExp && delimiter.test(event.data))\n  if (matchesDelimiter) {\n    const target = event.target as HTMLInputElement\n    target.value = target.value.replace(delimiter, '')\n\n    if (target.value.trim() === '') {\n      target.value = ''\n      return\n    }\n\n    const isAdded = context.onAddValue(target.value)\n    if (isAdded)\n      target.value = ''\n  }\n}\n\nfunction handleInputKeydown(event: KeyboardEvent) {\n  // `isComposing` stays true until the tick after `compositionend`, so arrow/backspace\n  // tag navigation is skipped even when the commit keydown reports `event.isComposing === false`.\n  if (isComposing.value)\n    return\n  context.onInputKeydown(event)\n}\n\nfunction handlePaste(event: ClipboardEvent) {\n  if (context.addOnPaste.value) {\n    event.preventDefault()\n    const clipboardData = event.clipboardData\n    if (!clipboardData)\n      return\n\n    const value = clipboardData.getData('text')\n    if (context.delimiter.value) {\n      const splitValue = value.split(context.delimiter.value)\n      splitValue.forEach((v) => {\n        context.onAddValue(v)\n      })\n    }\n    else {\n      context.onAddValue(value)\n    }\n  }\n}\n\nonMounted(() => {\n  const inputEl = currentElement.value.nodeName === 'INPUT'\n    ? currentElement.value\n    : currentElement.value.querySelector('input')\n\n  if (!inputEl)\n    return\n\n  setTimeout(() => {\n    // make sure all DOM was flush then only capture the focus\n    if (props.autoFocus)\n      inputEl?.focus()\n  }, 1)\n})\n</script>\n\n<template>\n  <Primitive\n    :id=\"context.id?.value\"\n    :ref=\"forwardRef\"\n    type=\"text\"\n    autocomplete=\"off\"\n    autocorrect=\"off\"\n    autocapitalize=\"off\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :maxlength=\"maxLength\"\n    :placeholder=\"placeholder\"\n    :disabled=\"context.disabled.value\"\n    :data-invalid=\"context.isInvalidInput.value ? '' : undefined\"\n    @input=\"handleInput\"\n    @keydown.enter=\"handleCustomKeydown\"\n    @keydown.tab=\"handleTab\"\n    @blur=\"handleBlur\"\n    @keydown=\"handleInputKeydown\"\n    @compositionstart=\"handleCompositionStart\"\n    @compositionend=\"handleCompositionEnd\"\n    @paste=\"handlePaste\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { AcceptableInputValue } from './TagsInputRoot.vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed, toRefs } from 'vue'\nimport { createContext, useForwardExpose } from '@/shared'\nimport { injectTagsInputRootContext } from './TagsInputRoot.vue'\n\nexport interface TagsInputItemProps extends PrimitiveProps {\n  /** Value associated with the tags */\n  value: AcceptableInputValue\n  /** When `true`, prevents the user from interacting with the tags input. */\n  disabled?: boolean\n}\n\nexport interface TagsInputItemContext {\n  value: Ref<AcceptableInputValue>\n  displayValue: ComputedRef<string>\n  isSelected: Ref<boolean>\n  disabled?: Ref<boolean>\n  textId: string\n}\n\nexport const [injectTagsInputItemContext, provideTagsInputItemContext]\n  = createContext<TagsInputItemContext>('TagsInputItem')\n</script>\n\n<script setup lang=\"ts\">\nimport { useCollection } from '@/Collection'\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<TagsInputItemProps>()\nconst { value } = toRefs(props)\n\nconst context = injectTagsInputRootContext()\nconst { forwardRef, currentElement } = useForwardExpose()\nconst { CollectionItem } = useCollection()\n\nconst isSelected = computed(() => context.selectedElement.value === currentElement.value)\n\nconst disabled = computed(() => props.disabled || context.disabled.value)\n\nconst itemContext = provideTagsInputItemContext({\n  value,\n  isSelected,\n  disabled,\n  textId: '',\n  displayValue: computed(() => context.displayValue(value.value)),\n})\n</script>\n\n<template>\n  <CollectionItem :value=\"value\">\n    <Primitive\n      :ref=\"forwardRef\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :aria-labelledby=\"itemContext.textId\"\n      :aria-current=\"isSelected\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :data-state=\"isSelected ? 'active' : 'inactive'\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionItem>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { AcceptableInputValue } from './TagsInputRoot.vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed, toRefs } from 'vue'\nimport { createContext, useForwardExpose } from '@/shared'\nimport { injectTagsInputRootContext } from './TagsInputRoot.vue'\n\nexport interface TagsInputItemProps extends PrimitiveProps {\n  /** Value associated with the tags */\n  value: AcceptableInputValue\n  /** When `true`, prevents the user from interacting with the tags input. */\n  disabled?: boolean\n}\n\nexport interface TagsInputItemContext {\n  value: Ref<AcceptableInputValue>\n  displayValue: ComputedRef<string>\n  isSelected: Ref<boolean>\n  disabled?: Ref<boolean>\n  textId: string\n}\n\nexport const [injectTagsInputItemContext, provideTagsInputItemContext]\n  = createContext<TagsInputItemContext>('TagsInputItem')\n</script>\n\n<script setup lang=\"ts\">\nimport { useCollection } from '@/Collection'\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<TagsInputItemProps>()\nconst { value } = toRefs(props)\n\nconst context = injectTagsInputRootContext()\nconst { forwardRef, currentElement } = useForwardExpose()\nconst { CollectionItem } = useCollection()\n\nconst isSelected = computed(() => context.selectedElement.value === currentElement.value)\n\nconst disabled = computed(() => props.disabled || context.disabled.value)\n\nconst itemContext = provideTagsInputItemContext({\n  value,\n  isSelected,\n  disabled,\n  textId: '',\n  displayValue: computed(() => context.displayValue(value.value)),\n})\n</script>\n\n<template>\n  <CollectionItem :value=\"value\">\n    <Primitive\n      :ref=\"forwardRef\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :aria-labelledby=\"itemContext.textId\"\n      :aria-current=\"isSelected\"\n      :data-disabled=\"disabled ? '' : undefined\"\n      :data-state=\"isSelected ? 'active' : 'inactive'\"\n    >\n      <slot />\n    </Primitive>\n  </CollectionItem>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { isEqual } from 'ohash'\nimport { computed } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport { injectTagsInputItemContext } from './TagsInputItem.vue'\nimport { injectTagsInputRootContext } from './TagsInputRoot.vue'\n\nexport interface TagsInputItemDeleteProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<TagsInputItemDeleteProps>(), {\n  as: 'button',\n})\n\nuseForwardExpose()\nconst context = injectTagsInputRootContext()\nconst itemContext = injectTagsInputItemContext()\n\nconst disabled = computed(() => itemContext.disabled?.value || context.disabled.value)\n\nfunction handleDelete() {\n  if (disabled.value)\n    return\n  const index = context.modelValue.value.findIndex(i => isEqual(i, itemContext.value.value))\n  context.onRemoveValue(index)\n}\n</script>\n\n<template>\n  <Primitive\n    tabindex=\"-1\"\n    v-bind=\"props\"\n    :aria-labelledby=\"itemContext.textId\"\n    :aria-current=\"itemContext.isSelected.value\"\n    :data-state=\"itemContext.isSelected.value ? 'active' : 'inactive'\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    @click=\"handleDelete\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { isEqual } from 'ohash'\nimport { computed } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport { injectTagsInputItemContext } from './TagsInputItem.vue'\nimport { injectTagsInputRootContext } from './TagsInputRoot.vue'\n\nexport interface TagsInputItemDeleteProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<TagsInputItemDeleteProps>(), {\n  as: 'button',\n})\n\nuseForwardExpose()\nconst context = injectTagsInputRootContext()\nconst itemContext = injectTagsInputItemContext()\n\nconst disabled = computed(() => itemContext.disabled?.value || context.disabled.value)\n\nfunction handleDelete() {\n  if (disabled.value)\n    return\n  const index = context.modelValue.value.findIndex(i => isEqual(i, itemContext.value.value))\n  context.onRemoveValue(index)\n}\n</script>\n\n<template>\n  <Primitive\n    tabindex=\"-1\"\n    v-bind=\"props\"\n    :aria-labelledby=\"itemContext.textId\"\n    :aria-current=\"itemContext.isSelected.value\"\n    :data-state=\"itemContext.isSelected.value ? 'active' : 'inactive'\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    @click=\"handleDelete\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose, useId } from '@/shared'\nimport { injectTagsInputItemContext } from './TagsInputItem.vue'\n\nexport interface TagsInputItemTextProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<TagsInputItemTextProps>(), {\n  as: 'span',\n})\n\nconst itemContext = injectTagsInputItemContext()\nuseForwardExpose()\n\nitemContext.textId ||= useId(undefined, 'reka-tags-input-item-text')\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"itemContext.textId\"\n  >\n    <slot>{{ itemContext.displayValue.value }}</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose, useId } from '@/shared'\nimport { injectTagsInputItemContext } from './TagsInputItem.vue'\n\nexport interface TagsInputItemTextProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<TagsInputItemTextProps>(), {\n  as: 'span',\n})\n\nconst itemContext = injectTagsInputItemContext()\nuseForwardExpose()\n\nitemContext.textId ||= useId(undefined, 'reka-tags-input-item-text')\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"itemContext.textId\"\n  >\n    <slot>{{ itemContext.displayValue.value }}</slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Formatter } from '@/shared'\nimport type { DateStep, HourCycle, SegmentPart, SegmentValueObj, TimeValue } from '@/shared/date'\nimport type { Direction, FormFieldProps } from '@/shared/types'\nimport { getLocalTimeZone, isEqualDay, Time, toCalendarDateTime, today } from '@internationalized/date'\nimport { isBefore } from '@/date'\nimport { createContext, isNullish, useDateFormatter, useDirection, useKbd, useLocale } from '@/shared'\nimport {\n  createContent,\n  getDefaultTime,\n  getTimeFieldSegmentElements,\n  initializeTimeSegmentValues,\n  isSegmentNavigationKey,\n  normalizeDateStep,\n  normalizeHourCycle,\n  syncTimeSegmentValues,\n} from '@/shared/date'\n\ntype TimeFieldRootContext = {\n  locale: Ref<string>\n  modelValue: Ref<DateValue | undefined>\n  placeholder: Ref<DateValue>\n  isInvalid: Ref<boolean>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  formatter: Formatter\n  hourCycle: HourCycle\n  step: Ref<DateStep>\n  stepSnapping: Ref<boolean>\n  segmentValues: Ref<SegmentValueObj>\n  segmentContents: Ref<{ part: SegmentPart, value: string }[]>\n  elements: Ref<Set<HTMLElement>>\n  focusNext: () => void\n  setFocusedElement: (el: HTMLElement) => void\n}\n\nexport interface TimeFieldRootProps extends PrimitiveProps, FormFieldProps {\n  /** The default value for the calendar */\n  defaultValue?: TimeValue\n  /** The default placeholder date */\n  defaultPlaceholder?: TimeValue\n  /** The placeholder date, which is used to determine what time to display when no time is selected. This updates as the user navigates the field */\n  placeholder?: TimeValue\n  /** The controlled checked state of the field. Can be bound as `v-model`. */\n  modelValue?: TimeValue | null\n  /** The hour cycle used for formatting times. Defaults to the local preference */\n  hourCycle?: HourCycle\n  /** The stepping interval for the time fields. Defaults to `1`. */\n  step?: DateStep\n  /** Whether to enforce snapping the value to the nearest step increment after input. Defaults to `false`. */\n  stepSnapping?: boolean\n  /** The granularity to use for formatting times. Defaults to minute if a Time is provided, otherwise defaults to minute. The field will render segments for each part of the date up to and including the specified granularity */\n  granularity?: 'hour' | 'minute' | 'second'\n  /** Whether or not to hide the time zone segment of the field */\n  hideTimeZone?: boolean\n  /** The maximum date that can be selected */\n  maxValue?: TimeValue\n  /** The minimum date that can be selected */\n  minValue?: TimeValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** Whether or not the time field is disabled */\n  disabled?: boolean\n  /** Whether or not the time field is readonly */\n  readonly?: boolean\n  /** Id of the element */\n  id?: string\n  /** The reading direction of the time field when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n}\n\nexport type TimeFieldRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: TimeValue | undefined]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: TimeValue]\n}\n\nexport const [injectTimeFieldRootContext, provideTimeFieldRootContext]\n  = createContext<TimeFieldRootContext>('TimeFieldRoot')\n\nfunction convertValue(value: TimeValue, date: DateValue = today(getLocalTimeZone())) {\n  if (value && 'day' in value) {\n    return value\n  }\n\n  return toCalendarDateTime(date, value)\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, nextTick, onMounted, ref, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { VisuallyHidden } from '@/VisuallyHidden'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<TimeFieldRootProps>(), {\n  defaultValue: undefined,\n  disabled: false,\n  readonly: false,\n  placeholder: undefined,\n  isDateUnavailable: undefined,\n  stepSnapping: false,\n})\nconst emits = defineEmits<TimeFieldRootEmits>()\ndefineSlots<{\n  default?: (props: {\n    /** The current time of the field */\n    modelValue: TimeValue | undefined\n    /** The time field segment contents */\n    segments: { part: SegmentPart, value: string }[]\n    /** Value if the input is invalid */\n    isInvalid: boolean\n  }) => any\n}>()\n\nconst { disabled, readonly, granularity, defaultValue, minValue, maxValue, stepSnapping, dir: propDir, locale: propLocale } = toRefs(props)\nconst locale = useLocale(propLocale)\nconst dir = useDirection(propDir)\n\nconst formatter = useDateFormatter(locale.value, {\n  hourCycle: normalizeHourCycle(props.hourCycle),\n})\nconst { primitiveElement, currentElement: parentElement }\n  = usePrimitiveElement()\nconst segmentElements = ref<Set<HTMLElement>>(new Set())\n\nconst step = computed(() => normalizeDateStep(props))\n\nconst convertedMinValue = computed(() => minValue.value ? convertValue(minValue.value) : undefined)\nconst convertedMaxValue = computed(() => maxValue.value ? convertValue(maxValue.value) : undefined)\n\nonMounted(() => {\n  getTimeFieldSegmentElements(parentElement.value).forEach(item => segmentElements.value.add(item as HTMLElement))\n})\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: defaultValue.value,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<TimeValue>\n\nconst convertedModelValue = computed({\n  get() {\n    if (isNullish(modelValue.value))\n      return modelValue.value\n    return convertValue(modelValue.value)\n  },\n  set(newValue) {\n    if (newValue) {\n      modelValue.value = modelValue.value && 'day' in modelValue.value ? newValue : new Time(newValue.hour, newValue.minute, newValue.second, modelValue.value?.millisecond)\n    }\n    else {\n      modelValue.value = newValue\n    }\n    return newValue\n  },\n})\n\nconst defaultDate = getDefaultTime({\n  defaultPlaceholder: props.placeholder,\n  defaultValue: modelValue.value,\n})\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<TimeValue>\n\nconst convertedPlaceholder = computed({\n  get() {\n    return convertValue(placeholder.value)\n  },\n  set(newValue) {\n    if (newValue)\n      placeholder.value = 'day' in placeholder.value ? newValue.copy() : new Time(newValue.hour, newValue.minute, newValue.second, placeholder.value?.millisecond)\n    return newValue\n  },\n})\n\nconst inferredGranularity = computed(() => {\n  if (granularity.value)\n    return granularity.value\n\n  return 'minute'\n})\n\nconst isInvalid = computed(() => {\n  if (!modelValue.value)\n    return false\n\n  if (convertedMinValue.value && isBefore(convertedModelValue.value, convertedMinValue.value))\n    return true\n\n  if (convertedMaxValue.value && isBefore(convertedMaxValue.value, convertedModelValue.value))\n    return true\n\n  return false\n})\n\nconst initialSegments = initializeTimeSegmentValues(inferredGranularity.value)\n\nconst segmentValues = ref<SegmentValueObj>(modelValue.value ? { ...syncTimeSegmentValues({ value: convertedModelValue.value, formatter }) } : { ...initialSegments })\n\nconst allSegmentContent = computed(() => createContent({\n  granularity: inferredGranularity.value,\n  dateRef: convertedPlaceholder.value,\n  formatter,\n  hideTimeZone: props.hideTimeZone,\n  hourCycle: props.hourCycle,\n  segmentValues: segmentValues.value,\n  locale,\n  isTimeValue: true,\n}))\n\nconst segmentContents = computed(() => {\n  const contents = allSegmentContent.value.arr\n\n  // Convert hour values for 12-hour display\n  if (props.hourCycle === 12) {\n    return contents.map((segment) => {\n      if (segment.part === 'hour' && 'hour' in segmentValues.value) {\n        const hour = segmentValues.value.hour\n        if (hour !== null) {\n          const displayHour = hour === 0 ? 12 : hour > 12 ? hour - 12 : hour\n          return { ...segment, value: displayHour.toString() }\n        }\n      }\n      return segment\n    })\n  }\n\n  return contents\n})\n\nconst editableSegmentContents = computed(() => segmentContents.value.filter(({ part }) => part !== 'literal'))\n\nwatch(locale, (value) => {\n  if (formatter.getLocale() !== value) {\n    formatter.setLocale(value)\n    // Locale changed, so we need to clear the segment elements and re-get them (different order)\n    // Get the focusable elements again on the next tick\n    nextTick(() => {\n      segmentElements.value.clear()\n      getTimeFieldSegmentElements(parentElement.value).forEach(item => segmentElements.value.add(item as HTMLElement))\n    })\n  }\n})\n\nwatch(convertedModelValue, (_modelValue) => {\n  if (!isNullish(_modelValue) && (!isEqualDay(convertedPlaceholder.value, _modelValue) || convertedPlaceholder.value.compare(_modelValue) !== 0))\n    placeholder.value = _modelValue.copy()\n})\n\nwatch([convertedModelValue, locale], ([_modelValue]) => {\n  if (!isNullish(_modelValue)) {\n    segmentValues.value = { ...syncTimeSegmentValues({ value: _modelValue, formatter }) }\n  }\n  // If segment has null value, means that user modified it, thus do not reset the segmentValues\n  else if (Object.values(segmentValues.value).every(value => value !== null) && isNullish(_modelValue)) {\n    segmentValues.value = { ...initialSegments }\n  }\n})\n\nconst currentFocusedElement = ref<HTMLElement | null>(null)\n\nconst currentSegmentIndex = computed(() =>\n  Array.from(segmentElements.value).findIndex(el =>\n    el.getAttribute('data-reka-time-field-segment')\n    === currentFocusedElement.value?.getAttribute('data-reka-time-field-segment')))\n\nconst nextFocusableSegment = computed(() => {\n  const sign = dir.value === 'rtl' ? -1 : 1\n  const nextCondition = sign < 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1\n  if (nextCondition)\n    return null\n  const segmentToFocus = Array.from(segmentElements.value)[currentSegmentIndex.value + sign]\n  return segmentToFocus\n})\n\nconst prevFocusableSegment = computed(() => {\n  const sign = dir.value === 'rtl' ? -1 : 1\n  const prevCondition = sign > 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1\n  if (prevCondition)\n    return null\n\n  const segmentToFocus = Array.from(segmentElements.value)[currentSegmentIndex.value - sign]\n  return segmentToFocus\n})\n\nconst kbd = useKbd()\n\nfunction handleKeydown(e: KeyboardEvent) {\n  // Don't navigate between segments mid-composition, arrow keys are used for IME candidate navigation\n  if (e.isComposing)\n    return\n  if (!isSegmentNavigationKey(e.key))\n    return\n  if (e.key === kbd.ARROW_LEFT)\n    prevFocusableSegment.value?.focus()\n  if (e.key === kbd.ARROW_RIGHT)\n    nextFocusableSegment.value?.focus()\n}\n\nfunction setFocusedElement(el: HTMLElement) {\n  currentFocusedElement.value = el\n}\n\nprovideTimeFieldRootContext({\n  locale,\n  modelValue: convertedModelValue,\n  placeholder: convertedPlaceholder,\n  disabled,\n  formatter,\n  hourCycle: props.hourCycle,\n  step,\n  stepSnapping,\n  readonly,\n  segmentValues,\n  isInvalid,\n  segmentContents: editableSegmentContents,\n  elements: segmentElements,\n  setFocusedElement,\n  focusNext() {\n    nextFocusableSegment.value?.focus()\n  },\n})\n\ndefineExpose({\n  /** Helper to set the focused element inside the DateField */\n  setFocusedElement,\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    ref=\"primitiveElement\"\n    role=\"group\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n    @keydown.left.right=\"handleKeydown\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :segments=\"segmentContents\"\n      :is-invalid=\"isInvalid\"\n    />\n\n    <VisuallyHidden\n      :id=\"id\"\n      as=\"input\"\n      feature=\"focusable\"\n      tabindex=\"-1\"\n      :value=\"modelValue ? modelValue.toString() : ''\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n      @focus=\"Array.from(segmentElements)?.[0]?.focus()\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Formatter } from '@/shared'\nimport type { DateStep, HourCycle, SegmentPart, SegmentValueObj, TimeValue } from '@/shared/date'\nimport type { Direction, FormFieldProps } from '@/shared/types'\nimport { getLocalTimeZone, isEqualDay, Time, toCalendarDateTime, today } from '@internationalized/date'\nimport { isBefore } from '@/date'\nimport { createContext, isNullish, useDateFormatter, useDirection, useKbd, useLocale } from '@/shared'\nimport {\n  createContent,\n  getDefaultTime,\n  getTimeFieldSegmentElements,\n  initializeTimeSegmentValues,\n  isSegmentNavigationKey,\n  normalizeDateStep,\n  normalizeHourCycle,\n  syncTimeSegmentValues,\n} from '@/shared/date'\n\ntype TimeFieldRootContext = {\n  locale: Ref<string>\n  modelValue: Ref<DateValue | undefined>\n  placeholder: Ref<DateValue>\n  isInvalid: Ref<boolean>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  formatter: Formatter\n  hourCycle: HourCycle\n  step: Ref<DateStep>\n  stepSnapping: Ref<boolean>\n  segmentValues: Ref<SegmentValueObj>\n  segmentContents: Ref<{ part: SegmentPart, value: string }[]>\n  elements: Ref<Set<HTMLElement>>\n  focusNext: () => void\n  setFocusedElement: (el: HTMLElement) => void\n}\n\nexport interface TimeFieldRootProps extends PrimitiveProps, FormFieldProps {\n  /** The default value for the calendar */\n  defaultValue?: TimeValue\n  /** The default placeholder date */\n  defaultPlaceholder?: TimeValue\n  /** The placeholder date, which is used to determine what time to display when no time is selected. This updates as the user navigates the field */\n  placeholder?: TimeValue\n  /** The controlled checked state of the field. Can be bound as `v-model`. */\n  modelValue?: TimeValue | null\n  /** The hour cycle used for formatting times. Defaults to the local preference */\n  hourCycle?: HourCycle\n  /** The stepping interval for the time fields. Defaults to `1`. */\n  step?: DateStep\n  /** Whether to enforce snapping the value to the nearest step increment after input. Defaults to `false`. */\n  stepSnapping?: boolean\n  /** The granularity to use for formatting times. Defaults to minute if a Time is provided, otherwise defaults to minute. The field will render segments for each part of the date up to and including the specified granularity */\n  granularity?: 'hour' | 'minute' | 'second'\n  /** Whether or not to hide the time zone segment of the field */\n  hideTimeZone?: boolean\n  /** The maximum date that can be selected */\n  maxValue?: TimeValue\n  /** The minimum date that can be selected */\n  minValue?: TimeValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** Whether or not the time field is disabled */\n  disabled?: boolean\n  /** Whether or not the time field is readonly */\n  readonly?: boolean\n  /** Id of the element */\n  id?: string\n  /** The reading direction of the time field when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n}\n\nexport type TimeFieldRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: TimeValue | undefined]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: TimeValue]\n}\n\nexport const [injectTimeFieldRootContext, provideTimeFieldRootContext]\n  = createContext<TimeFieldRootContext>('TimeFieldRoot')\n\nfunction convertValue(value: TimeValue, date: DateValue = today(getLocalTimeZone())) {\n  if (value && 'day' in value) {\n    return value\n  }\n\n  return toCalendarDateTime(date, value)\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, nextTick, onMounted, ref, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { VisuallyHidden } from '@/VisuallyHidden'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<TimeFieldRootProps>(), {\n  defaultValue: undefined,\n  disabled: false,\n  readonly: false,\n  placeholder: undefined,\n  isDateUnavailable: undefined,\n  stepSnapping: false,\n})\nconst emits = defineEmits<TimeFieldRootEmits>()\ndefineSlots<{\n  default?: (props: {\n    /** The current time of the field */\n    modelValue: TimeValue | undefined\n    /** The time field segment contents */\n    segments: { part: SegmentPart, value: string }[]\n    /** Value if the input is invalid */\n    isInvalid: boolean\n  }) => any\n}>()\n\nconst { disabled, readonly, granularity, defaultValue, minValue, maxValue, stepSnapping, dir: propDir, locale: propLocale } = toRefs(props)\nconst locale = useLocale(propLocale)\nconst dir = useDirection(propDir)\n\nconst formatter = useDateFormatter(locale.value, {\n  hourCycle: normalizeHourCycle(props.hourCycle),\n})\nconst { primitiveElement, currentElement: parentElement }\n  = usePrimitiveElement()\nconst segmentElements = ref<Set<HTMLElement>>(new Set())\n\nconst step = computed(() => normalizeDateStep(props))\n\nconst convertedMinValue = computed(() => minValue.value ? convertValue(minValue.value) : undefined)\nconst convertedMaxValue = computed(() => maxValue.value ? convertValue(maxValue.value) : undefined)\n\nonMounted(() => {\n  getTimeFieldSegmentElements(parentElement.value).forEach(item => segmentElements.value.add(item as HTMLElement))\n})\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: defaultValue.value,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<TimeValue>\n\nconst convertedModelValue = computed({\n  get() {\n    if (isNullish(modelValue.value))\n      return modelValue.value\n    return convertValue(modelValue.value)\n  },\n  set(newValue) {\n    if (newValue) {\n      modelValue.value = modelValue.value && 'day' in modelValue.value ? newValue : new Time(newValue.hour, newValue.minute, newValue.second, modelValue.value?.millisecond)\n    }\n    else {\n      modelValue.value = newValue\n    }\n    return newValue\n  },\n})\n\nconst defaultDate = getDefaultTime({\n  defaultPlaceholder: props.placeholder,\n  defaultValue: modelValue.value,\n})\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<TimeValue>\n\nconst convertedPlaceholder = computed({\n  get() {\n    return convertValue(placeholder.value)\n  },\n  set(newValue) {\n    if (newValue)\n      placeholder.value = 'day' in placeholder.value ? newValue.copy() : new Time(newValue.hour, newValue.minute, newValue.second, placeholder.value?.millisecond)\n    return newValue\n  },\n})\n\nconst inferredGranularity = computed(() => {\n  if (granularity.value)\n    return granularity.value\n\n  return 'minute'\n})\n\nconst isInvalid = computed(() => {\n  if (!modelValue.value)\n    return false\n\n  if (convertedMinValue.value && isBefore(convertedModelValue.value, convertedMinValue.value))\n    return true\n\n  if (convertedMaxValue.value && isBefore(convertedMaxValue.value, convertedModelValue.value))\n    return true\n\n  return false\n})\n\nconst initialSegments = initializeTimeSegmentValues(inferredGranularity.value)\n\nconst segmentValues = ref<SegmentValueObj>(modelValue.value ? { ...syncTimeSegmentValues({ value: convertedModelValue.value, formatter }) } : { ...initialSegments })\n\nconst allSegmentContent = computed(() => createContent({\n  granularity: inferredGranularity.value,\n  dateRef: convertedPlaceholder.value,\n  formatter,\n  hideTimeZone: props.hideTimeZone,\n  hourCycle: props.hourCycle,\n  segmentValues: segmentValues.value,\n  locale,\n  isTimeValue: true,\n}))\n\nconst segmentContents = computed(() => {\n  const contents = allSegmentContent.value.arr\n\n  // Convert hour values for 12-hour display\n  if (props.hourCycle === 12) {\n    return contents.map((segment) => {\n      if (segment.part === 'hour' && 'hour' in segmentValues.value) {\n        const hour = segmentValues.value.hour\n        if (hour !== null) {\n          const displayHour = hour === 0 ? 12 : hour > 12 ? hour - 12 : hour\n          return { ...segment, value: displayHour.toString() }\n        }\n      }\n      return segment\n    })\n  }\n\n  return contents\n})\n\nconst editableSegmentContents = computed(() => segmentContents.value.filter(({ part }) => part !== 'literal'))\n\nwatch(locale, (value) => {\n  if (formatter.getLocale() !== value) {\n    formatter.setLocale(value)\n    // Locale changed, so we need to clear the segment elements and re-get them (different order)\n    // Get the focusable elements again on the next tick\n    nextTick(() => {\n      segmentElements.value.clear()\n      getTimeFieldSegmentElements(parentElement.value).forEach(item => segmentElements.value.add(item as HTMLElement))\n    })\n  }\n})\n\nwatch(convertedModelValue, (_modelValue) => {\n  if (!isNullish(_modelValue) && (!isEqualDay(convertedPlaceholder.value, _modelValue) || convertedPlaceholder.value.compare(_modelValue) !== 0))\n    placeholder.value = _modelValue.copy()\n})\n\nwatch([convertedModelValue, locale], ([_modelValue]) => {\n  if (!isNullish(_modelValue)) {\n    segmentValues.value = { ...syncTimeSegmentValues({ value: _modelValue, formatter }) }\n  }\n  // If segment has null value, means that user modified it, thus do not reset the segmentValues\n  else if (Object.values(segmentValues.value).every(value => value !== null) && isNullish(_modelValue)) {\n    segmentValues.value = { ...initialSegments }\n  }\n})\n\nconst currentFocusedElement = ref<HTMLElement | null>(null)\n\nconst currentSegmentIndex = computed(() =>\n  Array.from(segmentElements.value).findIndex(el =>\n    el.getAttribute('data-reka-time-field-segment')\n    === currentFocusedElement.value?.getAttribute('data-reka-time-field-segment')))\n\nconst nextFocusableSegment = computed(() => {\n  const sign = dir.value === 'rtl' ? -1 : 1\n  const nextCondition = sign < 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1\n  if (nextCondition)\n    return null\n  const segmentToFocus = Array.from(segmentElements.value)[currentSegmentIndex.value + sign]\n  return segmentToFocus\n})\n\nconst prevFocusableSegment = computed(() => {\n  const sign = dir.value === 'rtl' ? -1 : 1\n  const prevCondition = sign > 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1\n  if (prevCondition)\n    return null\n\n  const segmentToFocus = Array.from(segmentElements.value)[currentSegmentIndex.value - sign]\n  return segmentToFocus\n})\n\nconst kbd = useKbd()\n\nfunction handleKeydown(e: KeyboardEvent) {\n  // Don't navigate between segments mid-composition, arrow keys are used for IME candidate navigation\n  if (e.isComposing)\n    return\n  if (!isSegmentNavigationKey(e.key))\n    return\n  if (e.key === kbd.ARROW_LEFT)\n    prevFocusableSegment.value?.focus()\n  if (e.key === kbd.ARROW_RIGHT)\n    nextFocusableSegment.value?.focus()\n}\n\nfunction setFocusedElement(el: HTMLElement) {\n  currentFocusedElement.value = el\n}\n\nprovideTimeFieldRootContext({\n  locale,\n  modelValue: convertedModelValue,\n  placeholder: convertedPlaceholder,\n  disabled,\n  formatter,\n  hourCycle: props.hourCycle,\n  step,\n  stepSnapping,\n  readonly,\n  segmentValues,\n  isInvalid,\n  segmentContents: editableSegmentContents,\n  elements: segmentElements,\n  setFocusedElement,\n  focusNext() {\n    nextFocusableSegment.value?.focus()\n  },\n})\n\ndefineExpose({\n  /** Helper to set the focused element inside the DateField */\n  setFocusedElement,\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    ref=\"primitiveElement\"\n    role=\"group\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n    @keydown.left.right=\"handleKeydown\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :segments=\"segmentContents\"\n      :is-invalid=\"isInvalid\"\n    />\n\n    <VisuallyHidden\n      :id=\"id\"\n      as=\"input\"\n      feature=\"focusable\"\n      tabindex=\"-1\"\n      :value=\"modelValue ? modelValue.toString() : ''\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n      @focus=\"Array.from(segmentElements)?.[0]?.focus()\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { SegmentPart } from '@/shared/date'\nimport { computed, ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useDateField } from '@/shared/date/useDateField'\nimport { injectTimeFieldRootContext } from './TimeFieldRoot.vue'\n\nexport interface TimeFieldInputProps extends PrimitiveProps {\n  /** The part of the date to render */\n  part: SegmentPart\n}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<TimeFieldInputProps>()\n\nconst rootContext = injectTimeFieldRootContext()\n\nconst hasLeftFocus = ref(true)\nconst lastKeyZero = ref(false)\n\nconst {\n  handleSegmentClick,\n  handleSegmentKeydown,\n  handleSegmentBeforeInput,\n  handleSegmentCompositionStart,\n  handleSegmentCompositionEnd,\n  handleSegmentFocusOut,\n  attributes,\n} = useDateField({\n  hasLeftFocus,\n  lastKeyZero,\n  placeholder: rootContext.placeholder,\n  hourCycle: rootContext.hourCycle,\n  step: rootContext.step,\n  stepSnapping: rootContext.stepSnapping,\n  segmentValues: rootContext.segmentValues,\n  formatter: rootContext.formatter,\n  part: props.part,\n  disabled: rootContext.disabled,\n  readonly: rootContext.readonly,\n  focusNext: rootContext.focusNext,\n  modelValue: rootContext.modelValue,\n})\n\nconst disabled = computed(() => rootContext.disabled.value)\nconst readonly = computed(() => rootContext.readonly.value)\nconst isInvalid = computed(() => rootContext.isInvalid.value)\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    v-bind=\"attributes\"\n    :contenteditable=\"disabled || readonly ? false : part !== 'literal'\"\n    :data-reka-time-field-segment=\"part\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :aria-readonly=\"readonly ? true : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :aria-invalid=\"isInvalid ? true : undefined\"\n    v-on=\"part !== 'literal' ? {\n      mousedown: handleSegmentClick,\n      keydown: handleSegmentKeydown,\n      beforeinput: handleSegmentBeforeInput,\n      compositionstart: handleSegmentCompositionStart,\n      compositionend: handleSegmentCompositionEnd,\n      focusout: () => {\n        hasLeftFocus = true\n        handleSegmentFocusOut()\n      },\n      focusin: (e: FocusEvent) => {\n        rootContext.setFocusedElement(e.target as HTMLElement)\n      },\n    } : {}\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { SegmentPart } from '@/shared/date'\nimport { computed, ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useDateField } from '@/shared/date/useDateField'\nimport { injectTimeFieldRootContext } from './TimeFieldRoot.vue'\n\nexport interface TimeFieldInputProps extends PrimitiveProps {\n  /** The part of the date to render */\n  part: SegmentPart\n}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<TimeFieldInputProps>()\n\nconst rootContext = injectTimeFieldRootContext()\n\nconst hasLeftFocus = ref(true)\nconst lastKeyZero = ref(false)\n\nconst {\n  handleSegmentClick,\n  handleSegmentKeydown,\n  handleSegmentBeforeInput,\n  handleSegmentCompositionStart,\n  handleSegmentCompositionEnd,\n  handleSegmentFocusOut,\n  attributes,\n} = useDateField({\n  hasLeftFocus,\n  lastKeyZero,\n  placeholder: rootContext.placeholder,\n  hourCycle: rootContext.hourCycle,\n  step: rootContext.step,\n  stepSnapping: rootContext.stepSnapping,\n  segmentValues: rootContext.segmentValues,\n  formatter: rootContext.formatter,\n  part: props.part,\n  disabled: rootContext.disabled,\n  readonly: rootContext.readonly,\n  focusNext: rootContext.focusNext,\n  modelValue: rootContext.modelValue,\n})\n\nconst disabled = computed(() => rootContext.disabled.value)\nconst readonly = computed(() => rootContext.readonly.value)\nconst isInvalid = computed(() => rootContext.isInvalid.value)\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    v-bind=\"attributes\"\n    :contenteditable=\"disabled || readonly ? false : part !== 'literal'\"\n    :data-reka-time-field-segment=\"part\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :aria-readonly=\"readonly ? true : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :aria-invalid=\"isInvalid ? true : undefined\"\n    v-on=\"part !== 'literal' ? {\n      mousedown: handleSegmentClick,\n      keydown: handleSegmentKeydown,\n      beforeinput: handleSegmentBeforeInput,\n      compositionstart: handleSegmentCompositionStart,\n      compositionend: handleSegmentCompositionEnd,\n      focusout: () => {\n        hasLeftFocus = true\n        handleSegmentFocusOut()\n      },\n      focusin: (e: FocusEvent) => {\n        rootContext.setFocusedElement(e.target as HTMLElement)\n      },\n    } : {}\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Matcher } from '@/date'\nimport type { DateRangeType } from '@/DateRangeField/DateRangeFieldRoot.vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Formatter } from '@/shared'\nimport type { DateStep, HourCycle, SegmentPart, SegmentValueObj, TimeValue } from '@/shared/date'\nimport type { TimeRange } from '@/shared/date/types'\nimport type { Direction, FormFieldProps } from '@/shared/types'\nimport { getLocalTimeZone, Time, toCalendarDateTime, today } from '@internationalized/date'\nimport { areAllDaysBetweenValid, isBefore, isBeforeOrSame } from '@/date'\nimport { createContext, isNullish, useDateFormatter, useDirection, useKbd, useLocale } from '@/shared'\nimport {\n  createContent,\n  getDefaultTime,\n  getTimeFieldSegmentElements,\n  initializeTimeSegmentValues,\n  isSegmentNavigationKey,\n  normalizeDateStep,\n  normalizeHourCycle,\n\n  syncSegmentValues,\n\n  syncTimeSegmentValues,\n\n} from '@/shared/date'\n\ntype TimeRangeFieldRootContext = {\n  locale: Ref<string>\n  startValue: Ref<DateValue | undefined>\n  endValue: Ref<DateValue | undefined>\n  placeholder: Ref<DateValue>\n  isInvalid: Ref<boolean>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  formatter: Formatter\n  hourCycle: HourCycle\n  step: Ref<DateStep>\n  segmentValues: Record<DateRangeType, Ref<SegmentValueObj>>\n  segmentContents: Ref<{ start: { part: SegmentPart, value: string }[], end: { part: SegmentPart, value: string }[] }>\n  elements: Ref<Set<HTMLElement>>\n  focusNext: () => void\n  setFocusedElement: (el: HTMLElement) => void\n}\n\nexport interface TimeRangeFieldRootProps extends PrimitiveProps, FormFieldProps {\n  /** The default value for the field */\n  defaultValue?: TimeRange\n  /** The default placeholder time */\n  defaultPlaceholder?: TimeValue\n  /** The placeholder time, which is used to determine what time to display when no time is selected. This updates as the user navigates the field */\n  placeholder?: TimeValue\n  /** The controlled checked state of the field. Can be bound as `v-model`. */\n  modelValue?: TimeRange | null\n  /** The hour cycle used for formatting times. Defaults to the local preference */\n  hourCycle?: HourCycle\n  /** The stepping interval for the time fields. Defaults to `1`. */\n  step?: DateStep\n  /** The granularity to use for formatting times. Defaults to minute. The field will render segments for each part of the time up to and including the specified granularity */\n  granularity?: 'hour' | 'minute' | 'second'\n  /** Whether or not to hide the time zone segment of the field */\n  hideTimeZone?: boolean\n  /** The maximum time that can be selected */\n  maxValue?: TimeValue\n  /** The minimum time that can be selected */\n  minValue?: TimeValue\n  /** The locale to use for formatting times */\n  locale?: string\n  /** Whether or not the time field is disabled */\n  disabled?: boolean\n  /** Whether or not the time field is readonly */\n  readonly?: boolean\n  /** Id of the element */\n  id?: string\n  /** The reading direction of the time field when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** A function that returns whether or not a time is unavailable */\n  isTimeUnavailable?: Matcher\n}\n\nexport type TimeRangeFieldRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: TimeRange]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: TimeValue]\n}\n\nexport const [injectTimeRangeFieldRootContext, provideTimeRangeFieldRootContext]\n  = createContext<TimeRangeFieldRootContext>('TimeRangeFieldRoot')\n\nfunction convertValue(value: TimeValue, date: DateValue = today(getLocalTimeZone())) {\n  if (value && 'day' in value) {\n    return value\n  }\n\n  return toCalendarDateTime(date, value)\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, nextTick, onMounted, ref, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { VisuallyHidden } from '@/VisuallyHidden'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<TimeRangeFieldRootProps>(), {\n  defaultValue: undefined,\n  disabled: false,\n  readonly: false,\n  placeholder: undefined,\n  isTimeUnavailable: undefined,\n})\nconst emits = defineEmits<TimeRangeFieldRootEmits>()\ndefineSlots<{\n  default?: (props: {\n    /** The current time of the field */\n    modelValue: TimeRange | undefined\n    /** The time field segment contents */\n    segments: { start: { part: SegmentPart, value: string }[], end: { part: SegmentPart, value: string }[] }\n    /** Value if the input is invalid */\n    isInvalid: boolean\n  }) => any\n}>()\n\nconst { disabled, readonly, granularity, defaultValue, minValue, maxValue, dir: propDir, locale: propLocale, isTimeUnavailable: propsIsTimeUnavailable } = toRefs(props)\nconst locale = useLocale(propLocale)\nconst dir = useDirection(propDir)\n\nconst formatter = useDateFormatter(locale.value, {\n  hourCycle: normalizeHourCycle(props.hourCycle),\n})\nconst { primitiveElement, currentElement: parentElement }\n  = usePrimitiveElement()\nconst segmentElements = ref<Set<HTMLElement>>(new Set())\n\nconst step = computed(() => normalizeDateStep(props))\n\nconst convertedMinValue = computed(() => minValue.value ? convertValue(minValue.value) : undefined)\nconst convertedMaxValue = computed(() => maxValue.value ? convertValue(maxValue.value) : undefined)\n\nonMounted(() => {\n  getTimeFieldSegmentElements(parentElement.value).forEach(item => segmentElements.value.add(item as HTMLElement))\n})\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: defaultValue.value ?? { start: undefined, end: undefined },\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<TimeRange>\n\nconst isStartInvalid = computed(() => {\n  if (!modelValue.value?.start)\n    return false\n\n  const convertedStartValue = convertValue(modelValue.value.start)\n\n  if (propsIsTimeUnavailable.value?.(convertedStartValue))\n    return true\n\n  if (convertedMinValue.value && isBefore(convertedStartValue, convertedMinValue.value))\n    return true\n\n  if (convertedMaxValue.value && isBefore(convertedMaxValue.value, convertedStartValue))\n    return true\n\n  return false\n})\n\nconst isEndInvalid = computed(() => {\n  if (!modelValue.value?.end)\n    return false\n\n  const convertedEndValue = convertValue(modelValue.value.end)\n\n  if (propsIsTimeUnavailable.value?.(convertedEndValue))\n    return true\n\n  if (convertedMinValue.value && isBefore(convertedEndValue, convertedMinValue.value))\n    return true\n\n  if (convertedMaxValue.value && isBefore(convertedMaxValue.value, convertedEndValue))\n    return true\n\n  return false\n})\n\nconst isInvalid = computed(() => {\n  if (isStartInvalid.value || isEndInvalid.value)\n    return true\n\n  if (!modelValue.value?.start || !modelValue.value?.end)\n    return false\n\n  const convertedModelValue = {\n    start: convertValue(modelValue.value.start),\n    end: convertValue(modelValue.value.end),\n  }\n\n  if (!isBeforeOrSame(convertedModelValue.start, convertedModelValue.end))\n    return true\n\n  if (propsIsTimeUnavailable.value !== undefined) {\n    const allValid = areAllDaysBetweenValid(\n      convertedModelValue.start,\n      convertedModelValue.end,\n      propsIsTimeUnavailable.value,\n      undefined,\n    )\n    if (!allValid)\n      return true\n  }\n  return false\n})\n\nconst startValue = ref(modelValue.value?.start?.copy()) as Ref<TimeValue | undefined>\nconst endValue = ref(modelValue.value?.end?.copy()) as Ref<TimeValue | undefined>\n\nwatch([startValue, endValue], ([_startValue, _endValue]) => {\n  modelValue.value = { start: _startValue?.copy(), end: _endValue?.copy() }\n})\n\nconst convertedStartValue = computed({\n  get() {\n    if (isNullish(startValue.value))\n      return startValue.value\n    return convertValue(startValue.value)\n  },\n  set(newValue) {\n    if (newValue) {\n      startValue.value = startValue.value && 'day' in startValue.value ? newValue : new Time(newValue.hour, newValue.minute, newValue.second, startValue.value?.millisecond)\n    }\n    else {\n      startValue.value = newValue\n    }\n    return newValue\n  },\n})\n\nconst convertedEndValue = computed({\n  get() {\n    if (isNullish(endValue.value))\n      return endValue.value\n    return convertValue(endValue.value)\n  },\n  set(newValue) {\n    if (newValue) {\n      endValue.value = endValue.value && 'day' in endValue.value ? newValue : new Time(newValue.hour, newValue.minute, newValue.second, endValue.value?.millisecond)\n    }\n    else {\n      endValue.value = newValue\n    }\n    return newValue\n  },\n})\n\nconst convertedModelValue = computed(() => ({ start: convertedStartValue.value, end: convertedEndValue.value }))\n\nconst defaultDate = getDefaultTime({\n  defaultPlaceholder: props.placeholder,\n  defaultValue: modelValue.value?.start,\n})\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<TimeValue>\n\nconst convertedPlaceholder = computed({\n  get() {\n    return convertValue(placeholder.value)\n  },\n  set(newValue) {\n    if (newValue)\n      placeholder.value = 'day' in placeholder.value ? newValue.copy() : new Time(newValue.hour, newValue.minute, newValue.second, placeholder.value?.millisecond)\n    return newValue\n  },\n})\n\nconst inferredGranularity = computed(() => {\n  if (granularity.value)\n    return granularity.value\n\n  return 'minute'\n})\n\nconst initialSegments = initializeTimeSegmentValues(inferredGranularity.value)\n\nconst startSegmentValues = ref<SegmentValueObj>(convertedStartValue.value ? { ...syncTimeSegmentValues({ value: convertedStartValue.value, formatter }) } : { ...initialSegments })\nconst endSegmentValues = ref<SegmentValueObj>(convertedEndValue.value ? { ...syncTimeSegmentValues({ value: convertedEndValue.value, formatter }) } : { ...initialSegments })\n\nconst startSegmentContent = computed(() => createContent({\n  granularity: inferredGranularity.value,\n  dateRef: convertedPlaceholder.value,\n  formatter,\n  hideTimeZone: props.hideTimeZone,\n  hourCycle: props.hourCycle,\n  segmentValues: startSegmentValues.value,\n  locale,\n  isTimeValue: true,\n}))\n\nconst endSegmentContent = computed(() => createContent({\n  granularity: inferredGranularity.value,\n  dateRef: convertedPlaceholder.value,\n  formatter,\n  hideTimeZone: props.hideTimeZone,\n  hourCycle: props.hourCycle,\n  segmentValues: endSegmentValues.value,\n  locale,\n  isTimeValue: true,\n}))\n\nconst segmentContents = computed(() => ({\n  start: startSegmentContent.value.arr,\n  end: endSegmentContent.value.arr,\n}))\n\nconst editableSegmentContents = computed(() => ({ start: segmentContents.value.start.filter(({ part }) => part !== 'literal'), end: segmentContents.value.end.filter(({ part }) => part !== 'literal') }))\n\nwatch(convertedModelValue, (_modelValue) => {\n  const isStartChanged = _modelValue?.start && convertedStartValue.value\n    ? _modelValue.start.compare(convertedStartValue.value) !== 0\n    : _modelValue?.start !== convertedStartValue.value\n  if (isStartChanged) {\n    convertedStartValue.value = _modelValue?.start?.copy()\n  }\n\n  const isEndChanged = _modelValue?.end && convertedEndValue.value\n    ? _modelValue.end.compare(convertedEndValue.value) !== 0\n    : _modelValue?.end !== convertedEndValue.value\n  if (isEndChanged) {\n    convertedEndValue.value = _modelValue?.end?.copy()\n  }\n})\n\nwatch([convertedStartValue, locale], ([_startValue]) => {\n  if (_startValue !== undefined) {\n    startSegmentValues.value = { ...syncSegmentValues({ value: _startValue, formatter }) }\n  }\n  // If segment has null value, means that user modified it, thus do not reset the segmentValues\n  else if (Object.values(startSegmentValues.value).every(value => value !== null) && _startValue === undefined) {\n    startSegmentValues.value = { ...initialSegments }\n  }\n})\n\nwatch(locale, (value) => {\n  if (formatter.getLocale() !== value) {\n    formatter.setLocale(value)\n    // Locale changed, so we need to clear the segment elements and re-get them (different order)\n    // Get the focusable elements again on the next tick\n    nextTick(() => {\n      segmentElements.value.clear()\n      getTimeFieldSegmentElements(parentElement.value).forEach(item => segmentElements.value.add(item as HTMLElement))\n    })\n  }\n})\n\nwatch(convertedModelValue, (_modelValue) => {\n  if (_modelValue && _modelValue.start !== undefined && placeholder.value.compare(_modelValue.start) !== 0)\n    placeholder.value = _modelValue.start.copy()\n})\n\nwatch([convertedEndValue, locale], ([_endValue]) => {\n  if (_endValue !== undefined) {\n    endSegmentValues.value = { ...syncSegmentValues({ value: _endValue, formatter }) }\n  }\n  // If segment has null value, means that user modified it, thus do not reset the segmentValues\n  else if (Object.values(endSegmentValues.value).every(value => value !== null) && _endValue === undefined) {\n    endSegmentValues.value = { ...initialSegments }\n  }\n})\n\nconst currentFocusedElement = ref<HTMLElement | null>(null)\n\nconst currentSegmentIndex = computed(() => Array.from(segmentElements.value).findIndex(el =>\n  el.getAttribute('data-reka-time-field-segment') === currentFocusedElement.value?.getAttribute('data-reka-time-field-segment')\n  && el.getAttribute('data-reka-time-range-field-segment-type') === currentFocusedElement.value?.getAttribute('data-reka-time-range-field-segment-type')))\n\nconst nextFocusableSegment = computed(() => {\n  const sign = dir.value === 'rtl' ? -1 : 1\n  const nextCondition = sign < 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1\n  if (nextCondition)\n    return null\n  const segmentToFocus = Array.from(segmentElements.value)[currentSegmentIndex.value + sign]\n  return segmentToFocus\n})\n\nconst prevFocusableSegment = computed(() => {\n  const sign = dir.value === 'rtl' ? -1 : 1\n  const prevCondition = sign > 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1\n  if (prevCondition)\n    return null\n\n  const segmentToFocus = Array.from(segmentElements.value)[currentSegmentIndex.value - sign]\n  return segmentToFocus\n})\n\nconst kbd = useKbd()\n\nfunction handleKeydown(e: KeyboardEvent) {\n  // Don't navigate between segments mid-composition, arrow keys are used for IME candidate navigation\n  if (e.isComposing)\n    return\n  if (!isSegmentNavigationKey(e.key))\n    return\n  if (e.key === kbd.ARROW_LEFT)\n    prevFocusableSegment.value?.focus()\n  if (e.key === kbd.ARROW_RIGHT)\n    nextFocusableSegment.value?.focus()\n}\n\nfunction setFocusedElement(el: HTMLElement) {\n  currentFocusedElement.value = el\n}\n\nprovideTimeRangeFieldRootContext({\n  locale,\n  startValue: convertedStartValue,\n  endValue: convertedEndValue,\n  placeholder: convertedPlaceholder,\n  disabled,\n  formatter,\n  hourCycle: props.hourCycle,\n  step,\n  readonly,\n  isInvalid,\n  segmentValues: { start: startSegmentValues, end: endSegmentValues },\n  segmentContents: editableSegmentContents,\n  elements: segmentElements,\n  setFocusedElement,\n  focusNext() {\n    nextFocusableSegment.value?.focus()\n  },\n})\n\ndefineExpose({\n  /** Helper to set the focused element inside the TimeRangeField */\n  setFocusedElement,\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    ref=\"primitiveElement\"\n    role=\"group\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n    @keydown.left.right=\"handleKeydown\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :segments=\"segmentContents\"\n      :is-invalid=\"isInvalid\"\n    />\n\n    <VisuallyHidden\n      :id=\"id\"\n      as=\"input\"\n      feature=\"focusable\"\n      tabindex=\"-1\"\n      :value=\"`${modelValue?.start?.toString()} - ${modelValue?.end?.toString()}`\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n      @focus=\"Array.from(segmentElements)?.[0]?.focus()\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Matcher } from '@/date'\nimport type { DateRangeType } from '@/DateRangeField/DateRangeFieldRoot.vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Formatter } from '@/shared'\nimport type { DateStep, HourCycle, SegmentPart, SegmentValueObj, TimeValue } from '@/shared/date'\nimport type { TimeRange } from '@/shared/date/types'\nimport type { Direction, FormFieldProps } from '@/shared/types'\nimport { getLocalTimeZone, Time, toCalendarDateTime, today } from '@internationalized/date'\nimport { areAllDaysBetweenValid, isBefore, isBeforeOrSame } from '@/date'\nimport { createContext, isNullish, useDateFormatter, useDirection, useKbd, useLocale } from '@/shared'\nimport {\n  createContent,\n  getDefaultTime,\n  getTimeFieldSegmentElements,\n  initializeTimeSegmentValues,\n  isSegmentNavigationKey,\n  normalizeDateStep,\n  normalizeHourCycle,\n\n  syncSegmentValues,\n\n  syncTimeSegmentValues,\n\n} from '@/shared/date'\n\ntype TimeRangeFieldRootContext = {\n  locale: Ref<string>\n  startValue: Ref<DateValue | undefined>\n  endValue: Ref<DateValue | undefined>\n  placeholder: Ref<DateValue>\n  isInvalid: Ref<boolean>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  formatter: Formatter\n  hourCycle: HourCycle\n  step: Ref<DateStep>\n  segmentValues: Record<DateRangeType, Ref<SegmentValueObj>>\n  segmentContents: Ref<{ start: { part: SegmentPart, value: string }[], end: { part: SegmentPart, value: string }[] }>\n  elements: Ref<Set<HTMLElement>>\n  focusNext: () => void\n  setFocusedElement: (el: HTMLElement) => void\n}\n\nexport interface TimeRangeFieldRootProps extends PrimitiveProps, FormFieldProps {\n  /** The default value for the field */\n  defaultValue?: TimeRange\n  /** The default placeholder time */\n  defaultPlaceholder?: TimeValue\n  /** The placeholder time, which is used to determine what time to display when no time is selected. This updates as the user navigates the field */\n  placeholder?: TimeValue\n  /** The controlled checked state of the field. Can be bound as `v-model`. */\n  modelValue?: TimeRange | null\n  /** The hour cycle used for formatting times. Defaults to the local preference */\n  hourCycle?: HourCycle\n  /** The stepping interval for the time fields. Defaults to `1`. */\n  step?: DateStep\n  /** The granularity to use for formatting times. Defaults to minute. The field will render segments for each part of the time up to and including the specified granularity */\n  granularity?: 'hour' | 'minute' | 'second'\n  /** Whether or not to hide the time zone segment of the field */\n  hideTimeZone?: boolean\n  /** The maximum time that can be selected */\n  maxValue?: TimeValue\n  /** The minimum time that can be selected */\n  minValue?: TimeValue\n  /** The locale to use for formatting times */\n  locale?: string\n  /** Whether or not the time field is disabled */\n  disabled?: boolean\n  /** Whether or not the time field is readonly */\n  readonly?: boolean\n  /** Id of the element */\n  id?: string\n  /** The reading direction of the time field when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** A function that returns whether or not a time is unavailable */\n  isTimeUnavailable?: Matcher\n}\n\nexport type TimeRangeFieldRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: TimeRange]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: TimeValue]\n}\n\nexport const [injectTimeRangeFieldRootContext, provideTimeRangeFieldRootContext]\n  = createContext<TimeRangeFieldRootContext>('TimeRangeFieldRoot')\n\nfunction convertValue(value: TimeValue, date: DateValue = today(getLocalTimeZone())) {\n  if (value && 'day' in value) {\n    return value\n  }\n\n  return toCalendarDateTime(date, value)\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { computed, nextTick, onMounted, ref, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { VisuallyHidden } from '@/VisuallyHidden'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<TimeRangeFieldRootProps>(), {\n  defaultValue: undefined,\n  disabled: false,\n  readonly: false,\n  placeholder: undefined,\n  isTimeUnavailable: undefined,\n})\nconst emits = defineEmits<TimeRangeFieldRootEmits>()\ndefineSlots<{\n  default?: (props: {\n    /** The current time of the field */\n    modelValue: TimeRange | undefined\n    /** The time field segment contents */\n    segments: { start: { part: SegmentPart, value: string }[], end: { part: SegmentPart, value: string }[] }\n    /** Value if the input is invalid */\n    isInvalid: boolean\n  }) => any\n}>()\n\nconst { disabled, readonly, granularity, defaultValue, minValue, maxValue, dir: propDir, locale: propLocale, isTimeUnavailable: propsIsTimeUnavailable } = toRefs(props)\nconst locale = useLocale(propLocale)\nconst dir = useDirection(propDir)\n\nconst formatter = useDateFormatter(locale.value, {\n  hourCycle: normalizeHourCycle(props.hourCycle),\n})\nconst { primitiveElement, currentElement: parentElement }\n  = usePrimitiveElement()\nconst segmentElements = ref<Set<HTMLElement>>(new Set())\n\nconst step = computed(() => normalizeDateStep(props))\n\nconst convertedMinValue = computed(() => minValue.value ? convertValue(minValue.value) : undefined)\nconst convertedMaxValue = computed(() => maxValue.value ? convertValue(maxValue.value) : undefined)\n\nonMounted(() => {\n  getTimeFieldSegmentElements(parentElement.value).forEach(item => segmentElements.value.add(item as HTMLElement))\n})\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: defaultValue.value ?? { start: undefined, end: undefined },\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<TimeRange>\n\nconst isStartInvalid = computed(() => {\n  if (!modelValue.value?.start)\n    return false\n\n  const convertedStartValue = convertValue(modelValue.value.start)\n\n  if (propsIsTimeUnavailable.value?.(convertedStartValue))\n    return true\n\n  if (convertedMinValue.value && isBefore(convertedStartValue, convertedMinValue.value))\n    return true\n\n  if (convertedMaxValue.value && isBefore(convertedMaxValue.value, convertedStartValue))\n    return true\n\n  return false\n})\n\nconst isEndInvalid = computed(() => {\n  if (!modelValue.value?.end)\n    return false\n\n  const convertedEndValue = convertValue(modelValue.value.end)\n\n  if (propsIsTimeUnavailable.value?.(convertedEndValue))\n    return true\n\n  if (convertedMinValue.value && isBefore(convertedEndValue, convertedMinValue.value))\n    return true\n\n  if (convertedMaxValue.value && isBefore(convertedMaxValue.value, convertedEndValue))\n    return true\n\n  return false\n})\n\nconst isInvalid = computed(() => {\n  if (isStartInvalid.value || isEndInvalid.value)\n    return true\n\n  if (!modelValue.value?.start || !modelValue.value?.end)\n    return false\n\n  const convertedModelValue = {\n    start: convertValue(modelValue.value.start),\n    end: convertValue(modelValue.value.end),\n  }\n\n  if (!isBeforeOrSame(convertedModelValue.start, convertedModelValue.end))\n    return true\n\n  if (propsIsTimeUnavailable.value !== undefined) {\n    const allValid = areAllDaysBetweenValid(\n      convertedModelValue.start,\n      convertedModelValue.end,\n      propsIsTimeUnavailable.value,\n      undefined,\n    )\n    if (!allValid)\n      return true\n  }\n  return false\n})\n\nconst startValue = ref(modelValue.value?.start?.copy()) as Ref<TimeValue | undefined>\nconst endValue = ref(modelValue.value?.end?.copy()) as Ref<TimeValue | undefined>\n\nwatch([startValue, endValue], ([_startValue, _endValue]) => {\n  modelValue.value = { start: _startValue?.copy(), end: _endValue?.copy() }\n})\n\nconst convertedStartValue = computed({\n  get() {\n    if (isNullish(startValue.value))\n      return startValue.value\n    return convertValue(startValue.value)\n  },\n  set(newValue) {\n    if (newValue) {\n      startValue.value = startValue.value && 'day' in startValue.value ? newValue : new Time(newValue.hour, newValue.minute, newValue.second, startValue.value?.millisecond)\n    }\n    else {\n      startValue.value = newValue\n    }\n    return newValue\n  },\n})\n\nconst convertedEndValue = computed({\n  get() {\n    if (isNullish(endValue.value))\n      return endValue.value\n    return convertValue(endValue.value)\n  },\n  set(newValue) {\n    if (newValue) {\n      endValue.value = endValue.value && 'day' in endValue.value ? newValue : new Time(newValue.hour, newValue.minute, newValue.second, endValue.value?.millisecond)\n    }\n    else {\n      endValue.value = newValue\n    }\n    return newValue\n  },\n})\n\nconst convertedModelValue = computed(() => ({ start: convertedStartValue.value, end: convertedEndValue.value }))\n\nconst defaultDate = getDefaultTime({\n  defaultPlaceholder: props.placeholder,\n  defaultValue: modelValue.value?.start,\n})\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<TimeValue>\n\nconst convertedPlaceholder = computed({\n  get() {\n    return convertValue(placeholder.value)\n  },\n  set(newValue) {\n    if (newValue)\n      placeholder.value = 'day' in placeholder.value ? newValue.copy() : new Time(newValue.hour, newValue.minute, newValue.second, placeholder.value?.millisecond)\n    return newValue\n  },\n})\n\nconst inferredGranularity = computed(() => {\n  if (granularity.value)\n    return granularity.value\n\n  return 'minute'\n})\n\nconst initialSegments = initializeTimeSegmentValues(inferredGranularity.value)\n\nconst startSegmentValues = ref<SegmentValueObj>(convertedStartValue.value ? { ...syncTimeSegmentValues({ value: convertedStartValue.value, formatter }) } : { ...initialSegments })\nconst endSegmentValues = ref<SegmentValueObj>(convertedEndValue.value ? { ...syncTimeSegmentValues({ value: convertedEndValue.value, formatter }) } : { ...initialSegments })\n\nconst startSegmentContent = computed(() => createContent({\n  granularity: inferredGranularity.value,\n  dateRef: convertedPlaceholder.value,\n  formatter,\n  hideTimeZone: props.hideTimeZone,\n  hourCycle: props.hourCycle,\n  segmentValues: startSegmentValues.value,\n  locale,\n  isTimeValue: true,\n}))\n\nconst endSegmentContent = computed(() => createContent({\n  granularity: inferredGranularity.value,\n  dateRef: convertedPlaceholder.value,\n  formatter,\n  hideTimeZone: props.hideTimeZone,\n  hourCycle: props.hourCycle,\n  segmentValues: endSegmentValues.value,\n  locale,\n  isTimeValue: true,\n}))\n\nconst segmentContents = computed(() => ({\n  start: startSegmentContent.value.arr,\n  end: endSegmentContent.value.arr,\n}))\n\nconst editableSegmentContents = computed(() => ({ start: segmentContents.value.start.filter(({ part }) => part !== 'literal'), end: segmentContents.value.end.filter(({ part }) => part !== 'literal') }))\n\nwatch(convertedModelValue, (_modelValue) => {\n  const isStartChanged = _modelValue?.start && convertedStartValue.value\n    ? _modelValue.start.compare(convertedStartValue.value) !== 0\n    : _modelValue?.start !== convertedStartValue.value\n  if (isStartChanged) {\n    convertedStartValue.value = _modelValue?.start?.copy()\n  }\n\n  const isEndChanged = _modelValue?.end && convertedEndValue.value\n    ? _modelValue.end.compare(convertedEndValue.value) !== 0\n    : _modelValue?.end !== convertedEndValue.value\n  if (isEndChanged) {\n    convertedEndValue.value = _modelValue?.end?.copy()\n  }\n})\n\nwatch([convertedStartValue, locale], ([_startValue]) => {\n  if (_startValue !== undefined) {\n    startSegmentValues.value = { ...syncSegmentValues({ value: _startValue, formatter }) }\n  }\n  // If segment has null value, means that user modified it, thus do not reset the segmentValues\n  else if (Object.values(startSegmentValues.value).every(value => value !== null) && _startValue === undefined) {\n    startSegmentValues.value = { ...initialSegments }\n  }\n})\n\nwatch(locale, (value) => {\n  if (formatter.getLocale() !== value) {\n    formatter.setLocale(value)\n    // Locale changed, so we need to clear the segment elements and re-get them (different order)\n    // Get the focusable elements again on the next tick\n    nextTick(() => {\n      segmentElements.value.clear()\n      getTimeFieldSegmentElements(parentElement.value).forEach(item => segmentElements.value.add(item as HTMLElement))\n    })\n  }\n})\n\nwatch(convertedModelValue, (_modelValue) => {\n  if (_modelValue && _modelValue.start !== undefined && placeholder.value.compare(_modelValue.start) !== 0)\n    placeholder.value = _modelValue.start.copy()\n})\n\nwatch([convertedEndValue, locale], ([_endValue]) => {\n  if (_endValue !== undefined) {\n    endSegmentValues.value = { ...syncSegmentValues({ value: _endValue, formatter }) }\n  }\n  // If segment has null value, means that user modified it, thus do not reset the segmentValues\n  else if (Object.values(endSegmentValues.value).every(value => value !== null) && _endValue === undefined) {\n    endSegmentValues.value = { ...initialSegments }\n  }\n})\n\nconst currentFocusedElement = ref<HTMLElement | null>(null)\n\nconst currentSegmentIndex = computed(() => Array.from(segmentElements.value).findIndex(el =>\n  el.getAttribute('data-reka-time-field-segment') === currentFocusedElement.value?.getAttribute('data-reka-time-field-segment')\n  && el.getAttribute('data-reka-time-range-field-segment-type') === currentFocusedElement.value?.getAttribute('data-reka-time-range-field-segment-type')))\n\nconst nextFocusableSegment = computed(() => {\n  const sign = dir.value === 'rtl' ? -1 : 1\n  const nextCondition = sign < 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1\n  if (nextCondition)\n    return null\n  const segmentToFocus = Array.from(segmentElements.value)[currentSegmentIndex.value + sign]\n  return segmentToFocus\n})\n\nconst prevFocusableSegment = computed(() => {\n  const sign = dir.value === 'rtl' ? -1 : 1\n  const prevCondition = sign > 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1\n  if (prevCondition)\n    return null\n\n  const segmentToFocus = Array.from(segmentElements.value)[currentSegmentIndex.value - sign]\n  return segmentToFocus\n})\n\nconst kbd = useKbd()\n\nfunction handleKeydown(e: KeyboardEvent) {\n  // Don't navigate between segments mid-composition, arrow keys are used for IME candidate navigation\n  if (e.isComposing)\n    return\n  if (!isSegmentNavigationKey(e.key))\n    return\n  if (e.key === kbd.ARROW_LEFT)\n    prevFocusableSegment.value?.focus()\n  if (e.key === kbd.ARROW_RIGHT)\n    nextFocusableSegment.value?.focus()\n}\n\nfunction setFocusedElement(el: HTMLElement) {\n  currentFocusedElement.value = el\n}\n\nprovideTimeRangeFieldRootContext({\n  locale,\n  startValue: convertedStartValue,\n  endValue: convertedEndValue,\n  placeholder: convertedPlaceholder,\n  disabled,\n  formatter,\n  hourCycle: props.hourCycle,\n  step,\n  readonly,\n  isInvalid,\n  segmentValues: { start: startSegmentValues, end: endSegmentValues },\n  segmentContents: editableSegmentContents,\n  elements: segmentElements,\n  setFocusedElement,\n  focusNext() {\n    nextFocusableSegment.value?.focus()\n  },\n})\n\ndefineExpose({\n  /** Helper to set the focused element inside the TimeRangeField */\n  setFocusedElement,\n})\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"$attrs\"\n    ref=\"primitiveElement\"\n    role=\"group\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n    @keydown.left.right=\"handleKeydown\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :segments=\"segmentContents\"\n      :is-invalid=\"isInvalid\"\n    />\n\n    <VisuallyHidden\n      :id=\"id\"\n      as=\"input\"\n      feature=\"focusable\"\n      tabindex=\"-1\"\n      :value=\"`${modelValue?.start?.toString()} - ${modelValue?.end?.toString()}`\"\n      :name=\"name\"\n      :disabled=\"disabled\"\n      :required=\"required\"\n      @focus=\"Array.from(segmentElements)?.[0]?.focus()\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateRangeType } from '@/DateRangeField/DateRangeFieldRoot.vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { SegmentPart } from '@/shared/date'\nimport { computed, ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useDateField } from '@/shared/date/useDateField'\nimport { injectTimeRangeFieldRootContext } from './TimeRangeFieldRoot.vue'\n\nexport interface TimeRangeFieldInputProps extends PrimitiveProps {\n  /** The part of the date to render */\n  part: SegmentPart\n  /** The type of field to render (start or end) */\n  type: DateRangeType\n}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<TimeRangeFieldInputProps>()\n\nconst rootContext = injectTimeRangeFieldRootContext()\n\nconst hasLeftFocus = ref(true)\nconst lastKeyZero = ref(false)\n\nconst {\n  handleSegmentClick,\n  handleSegmentKeydown,\n  handleSegmentBeforeInput,\n  handleSegmentCompositionStart,\n  handleSegmentCompositionEnd,\n  attributes,\n} = useDateField({\n  hasLeftFocus,\n  lastKeyZero,\n  placeholder: rootContext.placeholder,\n  hourCycle: rootContext.hourCycle,\n  step: rootContext.step,\n  segmentValues: rootContext.segmentValues[props.type],\n  formatter: rootContext.formatter,\n  part: props.part,\n  disabled: rootContext.disabled,\n  readonly: rootContext.readonly,\n  focusNext: rootContext.focusNext,\n  modelValue: props.type === 'start' ? rootContext.startValue : rootContext.endValue,\n})\n\nconst disabled = computed(() => rootContext.disabled.value)\nconst readonly = computed(() => rootContext.readonly.value)\nconst isInvalid = computed(() => rootContext.isInvalid.value)\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    v-bind=\"attributes\"\n    :contenteditable=\"disabled || readonly ? false : part !== 'literal'\"\n    :data-reka-time-field-segment=\"part\"\n    :data-reka-time-range-field-segment-type=\"type\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :aria-readonly=\"readonly ? true : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :aria-invalid=\"isInvalid ? true : undefined\"\n    v-on=\"part !== 'literal' ? {\n      mousedown: handleSegmentClick,\n      keydown: handleSegmentKeydown,\n      beforeinput: handleSegmentBeforeInput,\n      compositionstart: handleSegmentCompositionStart,\n      compositionend: handleSegmentCompositionEnd,\n      focusout: () => { hasLeftFocus = true },\n      focusin: (e: FocusEvent) => {\n        rootContext.setFocusedElement(e.target as HTMLElement)\n      },\n    } : {}\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateRangeType } from '@/DateRangeField/DateRangeFieldRoot.vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { SegmentPart } from '@/shared/date'\nimport { computed, ref } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { useDateField } from '@/shared/date/useDateField'\nimport { injectTimeRangeFieldRootContext } from './TimeRangeFieldRoot.vue'\n\nexport interface TimeRangeFieldInputProps extends PrimitiveProps {\n  /** The part of the date to render */\n  part: SegmentPart\n  /** The type of field to render (start or end) */\n  type: DateRangeType\n}\n</script>\n\n<script setup lang=\"ts\">\nconst props = defineProps<TimeRangeFieldInputProps>()\n\nconst rootContext = injectTimeRangeFieldRootContext()\n\nconst hasLeftFocus = ref(true)\nconst lastKeyZero = ref(false)\n\nconst {\n  handleSegmentClick,\n  handleSegmentKeydown,\n  handleSegmentBeforeInput,\n  handleSegmentCompositionStart,\n  handleSegmentCompositionEnd,\n  attributes,\n} = useDateField({\n  hasLeftFocus,\n  lastKeyZero,\n  placeholder: rootContext.placeholder,\n  hourCycle: rootContext.hourCycle,\n  step: rootContext.step,\n  segmentValues: rootContext.segmentValues[props.type],\n  formatter: rootContext.formatter,\n  part: props.part,\n  disabled: rootContext.disabled,\n  readonly: rootContext.readonly,\n  focusNext: rootContext.focusNext,\n  modelValue: props.type === 'start' ? rootContext.startValue : rootContext.endValue,\n})\n\nconst disabled = computed(() => rootContext.disabled.value)\nconst readonly = computed(() => rootContext.readonly.value)\nconst isInvalid = computed(() => rootContext.isInvalid.value)\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    v-bind=\"attributes\"\n    :contenteditable=\"disabled || readonly ? false : part !== 'literal'\"\n    :data-reka-time-field-segment=\"part\"\n    :data-reka-time-range-field-segment-type=\"type\"\n    :aria-disabled=\"disabled ? true : undefined\"\n    :aria-readonly=\"readonly ? true : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :aria-invalid=\"isInvalid ? true : undefined\"\n    v-on=\"part !== 'literal' ? {\n      mousedown: handleSegmentClick,\n      keydown: handleSegmentKeydown,\n      beforeinput: handleSegmentBeforeInput,\n      compositionstart: handleSegmentCompositionStart,\n      compositionend: handleSegmentCompositionEnd,\n      focusout: () => { hasLeftFocus = true },\n      focusin: (e: FocusEvent) => {\n        rootContext.setFocusedElement(e.target as HTMLElement)\n      },\n    } : {}\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ToastAnnounceExcludeProps extends PrimitiveProps {\n  altText?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\ndefineProps<ToastAnnounceExcludeProps>()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    data-reka-toast-announce-exclude=\"\"\n    :data-reka-toast-announce-alt=\"altText || undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ToastAnnounceExcludeProps extends PrimitiveProps {\n  altText?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\ndefineProps<ToastAnnounceExcludeProps>()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    data-reka-toast-announce-exclude=\"\"\n    :data-reka-toast-announce-alt=\"altText || undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { SwipeDirection } from './utils'\nimport { useCollection } from '@/Collection'\nimport { createContext } from '@/shared'\n\ntype ToastProviderContext = {\n  label: Ref<string>\n  duration: Ref<number>\n  disableSwipe: Ref<boolean>\n  swipeDirection: Ref<SwipeDirection>\n  swipeThreshold: Ref<number>\n  toastCount: Ref<number>\n  viewport: Ref<HTMLElement | undefined>\n  onViewportChange: (viewport: HTMLElement) => void\n  onToastAdd: () => void\n  onToastRemove: () => void\n  isFocusedToastEscapeKeyDownRef: Ref<boolean>\n  isClosePausedRef: Ref<boolean>\n}\n\nexport interface ToastProviderProps {\n  /**\n   * An author-localized label for each toast. Used to help screen reader users\n   * associate the interruption with a toast.\n   * @defaultValue 'Notification'\n   */\n  label?: string\n  /**\n   * Time in milliseconds that each toast should remain visible for.\n   * @defaultValue 5000\n   */\n  duration?: number\n  /**\n   * Whether to disable the ability to swipe to close the toast.\n   * @defaultValue false\n   */\n  disableSwipe?: boolean\n  /**\n   * Direction of pointer swipe that should close the toast.\n   * @defaultValue 'right'\n   */\n  swipeDirection?: SwipeDirection\n  /**\n   * Distance in pixels that the swipe must pass before a close is triggered.\n   * @defaultValue 50\n   */\n  swipeThreshold?: number\n}\n\nexport const [injectToastProviderContext, provideToastProviderContext]\n  = createContext<ToastProviderContext>('ToastProvider')\n</script>\n\n<script setup lang=\"ts\">\nimport { ref, toRefs } from 'vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<ToastProviderProps>(), {\n  label: 'Notification',\n  duration: 5000,\n  swipeDirection: 'right',\n  swipeThreshold: 50,\n})\nconst { label, duration, disableSwipe, swipeDirection, swipeThreshold } = toRefs(props)\nuseCollection({ isProvider: true })\n\nconst viewport = ref<HTMLElement>()\nconst toastCount = ref(0)\nconst isFocusedToastEscapeKeyDownRef = ref(false)\nconst isClosePausedRef = ref(false)\n\nif (props.label && typeof props.label === 'string' && !props.label.trim()) {\n  const error = 'Invalid prop `label` supplied to `ToastProvider`. Expected non-empty `string`.'\n  throw new Error(error)\n}\n\nprovideToastProviderContext({\n  label,\n  duration,\n  disableSwipe,\n  swipeDirection,\n  swipeThreshold,\n  toastCount,\n  viewport,\n  onViewportChange(el) {\n    viewport.value = el\n  },\n  onToastAdd() {\n    toastCount.value++\n  },\n  onToastRemove() {\n    toastCount.value--\n  },\n  isFocusedToastEscapeKeyDownRef,\n  isClosePausedRef,\n\n})\n</script>\n\n<template>\n  <slot />\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { SwipeDirection } from './utils'\nimport { useCollection } from '@/Collection'\nimport { createContext } from '@/shared'\n\ntype ToastProviderContext = {\n  label: Ref<string>\n  duration: Ref<number>\n  disableSwipe: Ref<boolean>\n  swipeDirection: Ref<SwipeDirection>\n  swipeThreshold: Ref<number>\n  toastCount: Ref<number>\n  viewport: Ref<HTMLElement | undefined>\n  onViewportChange: (viewport: HTMLElement) => void\n  onToastAdd: () => void\n  onToastRemove: () => void\n  isFocusedToastEscapeKeyDownRef: Ref<boolean>\n  isClosePausedRef: Ref<boolean>\n}\n\nexport interface ToastProviderProps {\n  /**\n   * An author-localized label for each toast. Used to help screen reader users\n   * associate the interruption with a toast.\n   * @defaultValue 'Notification'\n   */\n  label?: string\n  /**\n   * Time in milliseconds that each toast should remain visible for.\n   * @defaultValue 5000\n   */\n  duration?: number\n  /**\n   * Whether to disable the ability to swipe to close the toast.\n   * @defaultValue false\n   */\n  disableSwipe?: boolean\n  /**\n   * Direction of pointer swipe that should close the toast.\n   * @defaultValue 'right'\n   */\n  swipeDirection?: SwipeDirection\n  /**\n   * Distance in pixels that the swipe must pass before a close is triggered.\n   * @defaultValue 50\n   */\n  swipeThreshold?: number\n}\n\nexport const [injectToastProviderContext, provideToastProviderContext]\n  = createContext<ToastProviderContext>('ToastProvider')\n</script>\n\n<script setup lang=\"ts\">\nimport { ref, toRefs } from 'vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<ToastProviderProps>(), {\n  label: 'Notification',\n  duration: 5000,\n  swipeDirection: 'right',\n  swipeThreshold: 50,\n})\nconst { label, duration, disableSwipe, swipeDirection, swipeThreshold } = toRefs(props)\nuseCollection({ isProvider: true })\n\nconst viewport = ref<HTMLElement>()\nconst toastCount = ref(0)\nconst isFocusedToastEscapeKeyDownRef = ref(false)\nconst isClosePausedRef = ref(false)\n\nif (props.label && typeof props.label === 'string' && !props.label.trim()) {\n  const error = 'Invalid prop `label` supplied to `ToastProvider`. Expected non-empty `string`.'\n  throw new Error(error)\n}\n\nprovideToastProviderContext({\n  label,\n  duration,\n  disableSwipe,\n  swipeDirection,\n  swipeThreshold,\n  toastCount,\n  viewport,\n  onViewportChange(el) {\n    viewport.value = el\n  },\n  onToastAdd() {\n    toastCount.value++\n  },\n  onToastRemove() {\n    toastCount.value--\n  },\n  isFocusedToastEscapeKeyDownRef,\n  isClosePausedRef,\n\n})\n</script>\n\n<template>\n  <slot />\n</template>\n","<script setup lang=\"ts\">\nimport { isClient, useTimeout } from '@vueuse/shared'\nimport { onScopeDispose, ref } from 'vue'\nimport { VisuallyHidden } from '@/VisuallyHidden'\nimport { injectToastProviderContext } from './ToastProvider.vue'\n\nconst providerContext = injectToastProviderContext()\n\nconst isAnnounced = useTimeout(1000)\nconst renderAnnounceText = ref(false)\n\n// Render text content in the next frame to ensure toast is announced in NVDA.\n// Double rAF mirrors Radix UI's `useNextFrame` behavior.\nlet raf1 = 0\nlet raf2 = 0\nif (isClient) {\n  raf1 = requestAnimationFrame(() => {\n    raf2 = requestAnimationFrame(() => {\n      renderAnnounceText.value = true\n    })\n  })\n  onScopeDispose(() => {\n    cancelAnimationFrame(raf1)\n    cancelAnimationFrame(raf2)\n  })\n}\n</script>\n\n<template>\n  <VisuallyHidden\n    v-if=\"isAnnounced || renderAnnounceText\"\n    feature=\"fully-hidden\"\n  >\n    {{ providerContext.label.value }}\n    <slot />\n  </VisuallyHidden>\n</template>\n","<script setup lang=\"ts\">\nimport { isClient, useTimeout } from '@vueuse/shared'\nimport { onScopeDispose, ref } from 'vue'\nimport { VisuallyHidden } from '@/VisuallyHidden'\nimport { injectToastProviderContext } from './ToastProvider.vue'\n\nconst providerContext = injectToastProviderContext()\n\nconst isAnnounced = useTimeout(1000)\nconst renderAnnounceText = ref(false)\n\n// Render text content in the next frame to ensure toast is announced in NVDA.\n// Double rAF mirrors Radix UI's `useNextFrame` behavior.\nlet raf1 = 0\nlet raf2 = 0\nif (isClient) {\n  raf1 = requestAnimationFrame(() => {\n    raf2 = requestAnimationFrame(() => {\n      renderAnnounceText.value = true\n    })\n  })\n  onScopeDispose(() => {\n    cancelAnimationFrame(raf1)\n    cancelAnimationFrame(raf2)\n  })\n}\n</script>\n\n<template>\n  <VisuallyHidden\n    v-if=\"isAnnounced || renderAnnounceText\"\n    feature=\"fully-hidden\"\n  >\n    {{ providerContext.label.value }}\n    <slot />\n  </VisuallyHidden>\n</template>\n","export const TOAST_SWIPE_START = 'toast.swipeStart'\nexport const TOAST_SWIPE_MOVE = 'toast.swipeMove'\nexport const TOAST_SWIPE_CANCEL = 'toast.swipeCancel'\nexport const TOAST_SWIPE_END = 'toast.swipeEnd'\n\nexport const VIEWPORT_NAME = 'ToastViewport'\nexport const VIEWPORT_DEFAULT_HOTKEY = ['F8']\nexport const VIEWPORT_PAUSE = 'toast.viewportPause'\nexport const VIEWPORT_RESUME = 'toast.viewportResume'\n\nexport type SwipeDirection = 'up' | 'down' | 'left' | 'right'\n\nexport type SwipeEvent = { currentTarget: EventTarget & HTMLElement } & Omit<\n  CustomEvent<{ originalEvent: PointerEvent, delta: { x: number, y: number } }>,\n  'currentTarget'\n>\n\nexport function handleAndDispatchCustomEvent<\n  E extends CustomEvent,\n  OriginalEvent extends Event,\n>(\n  name: string,\n  handler: ((event: E) => void) | undefined,\n  detail: { originalEvent: OriginalEvent } & (E extends CustomEvent<infer D>\n    ? D\n    : never),\n) {\n  const currentTarget = detail.originalEvent.currentTarget as HTMLElement\n  const event = new CustomEvent(name, {\n    bubbles: false,\n    cancelable: true,\n    detail,\n  })\n  if (handler)\n    currentTarget.addEventListener(name, handler as EventListener, { once: true })\n\n  currentTarget.dispatchEvent(event)\n}\n\nexport function isDeltaInDirection(delta: { x: number, y: number }, direction: SwipeDirection, threshold = 0) {\n  const deltaX = Math.abs(delta.x)\n  const deltaY = Math.abs(delta.y)\n  const isDeltaX = deltaX > deltaY\n  if (direction === 'left' || direction === 'right')\n    return isDeltaX && deltaX > threshold\n  else\n    return !isDeltaX && deltaY > threshold\n}\n\nexport function isHTMLElement(node: any): node is HTMLElement {\n  return node.nodeType === node.ELEMENT_NODE\n}\n\nexport function getAnnounceTextContent(container: HTMLElement) {\n  const textContent: string[] = []\n  const childNodes = Array.from(container.childNodes)\n\n  childNodes.forEach((node) => {\n    if (node.nodeType === node.TEXT_NODE && node.textContent)\n      textContent.push(node.textContent)\n    if (isHTMLElement(node)) {\n      const isHidden = node.ariaHidden || node.hidden || node.style.display === 'none'\n      const isExcluded = node.dataset.rekaToastAnnounceExclude === ''\n\n      if (!isHidden) {\n        if (isExcluded) {\n          const altText = node.dataset.rekaToastAnnounceAlt\n          if (altText)\n            textContent.push(altText)\n        }\n        else {\n          textContent.push(...getAnnounceTextContent(node))\n        }\n      }\n    }\n  })\n  // We return a collection of text rather than a single concatenated string.\n  // This allows SR VO to naturally pause break between nodes while announcing.\n  return textContent\n}\n","<script lang=\"ts\">\nimport type { SwipeEvent } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { isClient } from '@vueuse/shared'\nimport { useCollection } from '@/Collection'\nimport { createContext, getActiveElement, useForwardExpose } from '@/shared'\n\nexport type ToastRootImplEmits = {\n  close: []\n  /** Event handler called when the escape key is down. It can be prevented by calling `event.preventDefault`. */\n  escapeKeyDown: [event: KeyboardEvent]\n  /** Event handler called when the dismiss timer is paused. This occurs when the pointer is moved over the viewport, the viewport is focused or when the window is blurred. */\n  pause: []\n  /** Event handler called when the dismiss timer is resumed. This occurs when the pointer is moved away from the viewport, the viewport is blurred or when the window is focused. */\n  resume: []\n  /** Event handler called when starting a swipe interaction. It can be prevented by calling `event.preventDefault`. */\n  swipeStart: [event: SwipeEvent]\n  /** Event handler called during a swipe interaction. It can be prevented by calling `event.preventDefault`. */\n  swipeMove: [event: SwipeEvent]\n  /** Event handler called when swipe interaction is cancelled. It can be prevented by calling `event.preventDefault`. */\n  swipeCancel: [event: SwipeEvent]\n  /** Event handler called at the end of a swipe interaction. It can be prevented by calling `event.preventDefault`. */\n  swipeEnd: [event: SwipeEvent]\n}\n\nexport interface ToastRootImplProps extends PrimitiveProps {\n  /**\n   * Control the sensitivity of the toast for accessibility purposes.\n   *\n   * For toasts that are the result of a user action, choose `foreground`. Toasts generated from background tasks should use `background`.\n   */\n  type?: 'foreground' | 'background'\n  /**\n   * The controlled open state of the dialog. Can be bind as `v-model:open`.\n   */\n  open?: boolean\n  /**\n   * Time in milliseconds that toast should remain visible for. Overrides value\n   * given to `ToastProvider`.\n   */\n  duration?: number\n}\n\nexport const [injectToastRootContext, provideToastRootContext]\n  = createContext<{ onClose: () => void }>('ToastRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { onKeyStroke, useRafFn } from '@vueuse/core'\nimport { computed, onMounted, onUnmounted, ref, watch, watchEffect } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport ToastAnnounce from './ToastAnnounce.vue'\nimport { injectToastProviderContext } from './ToastProvider.vue'\nimport { getAnnounceTextContent, handleAndDispatchCustomEvent, isDeltaInDirection, TOAST_SWIPE_CANCEL, TOAST_SWIPE_END, TOAST_SWIPE_MOVE, TOAST_SWIPE_START, VIEWPORT_PAUSE, VIEWPORT_RESUME } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<ToastRootImplProps>(), {\n  open: false,\n  as: 'li',\n})\n\nconst emits = defineEmits<ToastRootImplEmits>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst { CollectionItem } = useCollection()\n\nconst providerContext = injectToastProviderContext()\nconst pointerStartRef = ref<{ x: number, y: number } | null>(null)\nconst swipeDeltaRef = ref<{ x: number, y: number } | null>(null)\nconst duration = computed(\n  () => typeof props.duration === 'number'\n    ? props.duration\n    : providerContext.duration.value,\n)\n\nconst closeTimerStartTimeRef = ref(0)\nconst closeTimerRemainingTimeRef = ref(duration.value)\nconst closeTimerRef = ref(0)\nconst remainingTime = ref(duration.value)\n\nconst remainingRaf = useRafFn(() => {\n  const elapsedTime = Date.now() - closeTimerStartTimeRef.value\n  remainingTime.value = Math.max(closeTimerRemainingTimeRef.value - elapsedTime, 0)\n}, { fpsLimit: 60 })\n\nfunction startTimer(duration: number) {\n  if (duration <= 0 || duration === Number.POSITIVE_INFINITY)\n    return\n  // startTimer is used inside a watch with immediate set to true.\n  // This results in code execution during SSR.\n  // Ensure this code only runs in a browser environment\n  if (!isClient)\n    return\n  window.clearTimeout(closeTimerRef.value)\n  closeTimerStartTimeRef.value = Date.now()\n  closeTimerRef.value = window.setTimeout(handleClose, duration)\n}\n\nfunction handleClose(event?: PointerEvent) {\n  const isNonPointerEvent = event?.pointerType === ''\n\n  // reka: update to only perform focus when user focus via keyboard\n  // focus viewport if focus is within toast to read the remaining toast\n  // count to SR users and ensure focus isn't lost\n  const isFocusInToast = currentElement.value?.contains(getActiveElement())\n  if (isFocusInToast && isNonPointerEvent)\n    providerContext.viewport.value?.focus()\n\n  if (isNonPointerEvent) {\n    // when manually close the toast, we reset isClosePausedRef\n    providerContext.isClosePausedRef.value = false\n  }\n\n  emits('close')\n}\n\nconst announceTextContent = computed(() => currentElement.value ? getAnnounceTextContent(currentElement.value) : null)\n\nif (props.type && !['foreground', 'background'].includes(props.type)) {\n  const error = 'Invalid prop `type` supplied to `Toast`. Expected `foreground | background`.'\n  throw new Error(error)\n}\n\nwatchEffect((cleanupFn) => {\n  const viewport = providerContext.viewport.value\n  if (viewport) {\n    const handleResume = () => {\n      startTimer(closeTimerRemainingTimeRef.value)\n      remainingRaf.resume()\n      emits('resume')\n    }\n    const handlePause = () => {\n      const elapsedTime = Date.now() - closeTimerStartTimeRef.value\n      closeTimerRemainingTimeRef.value = closeTimerRemainingTimeRef.value - elapsedTime\n      window.clearTimeout(closeTimerRef.value)\n      remainingRaf.pause()\n      emits('pause')\n    }\n    viewport.addEventListener(VIEWPORT_PAUSE, handlePause)\n    viewport.addEventListener(VIEWPORT_RESUME, handleResume)\n    return () => {\n      viewport.removeEventListener(VIEWPORT_PAUSE, handlePause)\n      viewport.removeEventListener(VIEWPORT_RESUME, handleResume)\n    }\n  }\n})\n\n// start timer when toast opens or duration changes.\n// we include `open` in deps because closed !== unmounted when animating\n// so it could reopen before being completely unmounted\nwatch(() => [props.open, duration.value], () => {\n  // Reset the timer when the toast is rerendered with the new duration\n  closeTimerRemainingTimeRef.value = duration.value\n\n  if (props.open && !providerContext.isClosePausedRef.value)\n    startTimer(duration.value)\n}, { immediate: true })\n\nonKeyStroke('Escape', (event) => {\n  emits('escapeKeyDown', event)\n  if (!event.defaultPrevented) {\n    providerContext.isFocusedToastEscapeKeyDownRef.value = true\n    handleClose()\n  }\n})\n\nonMounted(() => {\n  providerContext.onToastAdd()\n})\nonUnmounted(() => {\n  providerContext.onToastRemove()\n})\n\nprovideToastRootContext({ onClose: handleClose })\n</script>\n\n<template>\n  <ToastAnnounce\n    v-if=\"announceTextContent\"\n    role=\"alert\"\n    :aria-live=\"type === 'foreground' ? 'assertive' : 'polite'\"\n  >\n    <!--\n      Render each chunk as its own text node so screen readers get the\n      natural pause break between nodes (see comment in utils.ts).\n      Interpolating the array directly with `{{ announceTextContent }}`\n      would route through Vue's `toDisplayString`, which JSON-stringifies\n      arrays — the live region would then announce literal `[`, quotes\n      and commas instead of the toast title and description.\n    -->\n    <template\n      v-for=\"(text, i) in announceTextContent\"\n      :key=\"i\"\n    >\n      {{ text }}\n    </template>\n  </ToastAnnounce>\n\n  <Teleport\n    v-if=\"providerContext.viewport.value\"\n    :to=\"providerContext.viewport.value\"\n  >\n    <CollectionItem>\n      <Primitive\n        :ref=\"forwardRef\"\n        tabindex=\"0\"\n        v-bind=\"$attrs\"\n        :as=\"as\"\n        :as-child=\"asChild\"\n        :data-state=\"open ? 'open' : 'closed'\"\n        :data-swipe-direction=\"providerContext.swipeDirection.value\"\n        :style=\"providerContext.disableSwipe.value\n          ? undefined\n          : { userSelect: 'none', touchAction: 'none' }\"\n        @pointerdown.left=\"(event: PointerEvent) => {\n          if (providerContext.disableSwipe.value) return;\n\n          pointerStartRef = { x: event.clientX, y: event.clientY };\n        }\"\n        @pointermove=\"(event: PointerEvent) => {\n          if (providerContext.disableSwipe.value || !pointerStartRef) return;\n\n          const x = event.clientX - pointerStartRef.x;\n          const y = event.clientY - pointerStartRef.y;\n          const hasSwipeMoveStarted = Boolean(swipeDeltaRef);\n          const isHorizontalSwipe = ['left', 'right'].includes(providerContext.swipeDirection.value);\n          const clamp = ['left', 'up'].includes(providerContext.swipeDirection.value)\n            ? Math.min\n            : Math.max;\n          const clampedX = isHorizontalSwipe ? clamp(0, x) : 0;\n          const clampedY = !isHorizontalSwipe ? clamp(0, y) : 0;\n          const moveStartBuffer = event.pointerType === 'touch' ? 10 : 2;\n          const delta = { x: clampedX, y: clampedY };\n          const eventDetail = { originalEvent: event, delta };\n          if (hasSwipeMoveStarted) {\n            swipeDeltaRef = delta;\n            handleAndDispatchCustomEvent(TOAST_SWIPE_MOVE, (ev: SwipeEvent) => emits('swipeMove', ev), eventDetail);\n          }\n          else if (isDeltaInDirection(delta, providerContext.swipeDirection.value, moveStartBuffer)) {\n            swipeDeltaRef = delta;\n            handleAndDispatchCustomEvent(TOAST_SWIPE_START, (ev: SwipeEvent) => emits('swipeStart', ev), eventDetail);\n            (event.target as HTMLElement).setPointerCapture(event.pointerId);\n          }\n          else if (Math.abs(x) > moveStartBuffer || Math.abs(y) > moveStartBuffer) {\n            // User is swiping in wrong direction so we disable swipe gesture\n            // for the current pointer down interaction\n            pointerStartRef = null;\n          }\n        }\"\n        @pointerup=\"(event: PointerEvent) => {\n          if (providerContext.disableSwipe.value) return;\n\n          const delta = swipeDeltaRef;\n          const target = event.target as HTMLElement;\n          if (target.hasPointerCapture(event.pointerId)) {\n            target.releasePointerCapture(event.pointerId);\n          }\n          swipeDeltaRef = null;\n          pointerStartRef = null;\n          if (delta) {\n            const toast = event.currentTarget;\n            const eventDetail = { originalEvent: event, delta };\n            if (\n              isDeltaInDirection(delta, providerContext.swipeDirection.value, providerContext.swipeThreshold.value)\n            ) {\n              handleAndDispatchCustomEvent(TOAST_SWIPE_END, (ev: SwipeEvent) => emits('swipeEnd', ev), eventDetail);\n            }\n            else {\n              handleAndDispatchCustomEvent(TOAST_SWIPE_CANCEL, (ev: SwipeEvent) => emits('swipeCancel', ev), eventDetail);\n            }\n            // Prevent click event from triggering on items within the toast when\n            // pointer up is part of a swipe gesture\n            toast?.addEventListener('click', (event) => event.preventDefault(), {\n              once: true,\n            });\n          }\n        }\"\n      >\n        <slot\n          :remaining=\"remainingTime\"\n          :duration=\"duration\"\n        />\n      </Primitive>\n    </CollectionItem>\n  </Teleport>\n</template>\n","<script lang=\"ts\">\nimport type { SwipeEvent } from './utils'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { isClient } from '@vueuse/shared'\nimport { useCollection } from '@/Collection'\nimport { createContext, getActiveElement, useForwardExpose } from '@/shared'\n\nexport type ToastRootImplEmits = {\n  close: []\n  /** Event handler called when the escape key is down. It can be prevented by calling `event.preventDefault`. */\n  escapeKeyDown: [event: KeyboardEvent]\n  /** Event handler called when the dismiss timer is paused. This occurs when the pointer is moved over the viewport, the viewport is focused or when the window is blurred. */\n  pause: []\n  /** Event handler called when the dismiss timer is resumed. This occurs when the pointer is moved away from the viewport, the viewport is blurred or when the window is focused. */\n  resume: []\n  /** Event handler called when starting a swipe interaction. It can be prevented by calling `event.preventDefault`. */\n  swipeStart: [event: SwipeEvent]\n  /** Event handler called during a swipe interaction. It can be prevented by calling `event.preventDefault`. */\n  swipeMove: [event: SwipeEvent]\n  /** Event handler called when swipe interaction is cancelled. It can be prevented by calling `event.preventDefault`. */\n  swipeCancel: [event: SwipeEvent]\n  /** Event handler called at the end of a swipe interaction. It can be prevented by calling `event.preventDefault`. */\n  swipeEnd: [event: SwipeEvent]\n}\n\nexport interface ToastRootImplProps extends PrimitiveProps {\n  /**\n   * Control the sensitivity of the toast for accessibility purposes.\n   *\n   * For toasts that are the result of a user action, choose `foreground`. Toasts generated from background tasks should use `background`.\n   */\n  type?: 'foreground' | 'background'\n  /**\n   * The controlled open state of the dialog. Can be bind as `v-model:open`.\n   */\n  open?: boolean\n  /**\n   * Time in milliseconds that toast should remain visible for. Overrides value\n   * given to `ToastProvider`.\n   */\n  duration?: number\n}\n\nexport const [injectToastRootContext, provideToastRootContext]\n  = createContext<{ onClose: () => void }>('ToastRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { onKeyStroke, useRafFn } from '@vueuse/core'\nimport { computed, onMounted, onUnmounted, ref, watch, watchEffect } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport ToastAnnounce from './ToastAnnounce.vue'\nimport { injectToastProviderContext } from './ToastProvider.vue'\nimport { getAnnounceTextContent, handleAndDispatchCustomEvent, isDeltaInDirection, TOAST_SWIPE_CANCEL, TOAST_SWIPE_END, TOAST_SWIPE_MOVE, TOAST_SWIPE_START, VIEWPORT_PAUSE, VIEWPORT_RESUME } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<ToastRootImplProps>(), {\n  open: false,\n  as: 'li',\n})\n\nconst emits = defineEmits<ToastRootImplEmits>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst { CollectionItem } = useCollection()\n\nconst providerContext = injectToastProviderContext()\nconst pointerStartRef = ref<{ x: number, y: number } | null>(null)\nconst swipeDeltaRef = ref<{ x: number, y: number } | null>(null)\nconst duration = computed(\n  () => typeof props.duration === 'number'\n    ? props.duration\n    : providerContext.duration.value,\n)\n\nconst closeTimerStartTimeRef = ref(0)\nconst closeTimerRemainingTimeRef = ref(duration.value)\nconst closeTimerRef = ref(0)\nconst remainingTime = ref(duration.value)\n\nconst remainingRaf = useRafFn(() => {\n  const elapsedTime = Date.now() - closeTimerStartTimeRef.value\n  remainingTime.value = Math.max(closeTimerRemainingTimeRef.value - elapsedTime, 0)\n}, { fpsLimit: 60 })\n\nfunction startTimer(duration: number) {\n  if (duration <= 0 || duration === Number.POSITIVE_INFINITY)\n    return\n  // startTimer is used inside a watch with immediate set to true.\n  // This results in code execution during SSR.\n  // Ensure this code only runs in a browser environment\n  if (!isClient)\n    return\n  window.clearTimeout(closeTimerRef.value)\n  closeTimerStartTimeRef.value = Date.now()\n  closeTimerRef.value = window.setTimeout(handleClose, duration)\n}\n\nfunction handleClose(event?: PointerEvent) {\n  const isNonPointerEvent = event?.pointerType === ''\n\n  // reka: update to only perform focus when user focus via keyboard\n  // focus viewport if focus is within toast to read the remaining toast\n  // count to SR users and ensure focus isn't lost\n  const isFocusInToast = currentElement.value?.contains(getActiveElement())\n  if (isFocusInToast && isNonPointerEvent)\n    providerContext.viewport.value?.focus()\n\n  if (isNonPointerEvent) {\n    // when manually close the toast, we reset isClosePausedRef\n    providerContext.isClosePausedRef.value = false\n  }\n\n  emits('close')\n}\n\nconst announceTextContent = computed(() => currentElement.value ? getAnnounceTextContent(currentElement.value) : null)\n\nif (props.type && !['foreground', 'background'].includes(props.type)) {\n  const error = 'Invalid prop `type` supplied to `Toast`. Expected `foreground | background`.'\n  throw new Error(error)\n}\n\nwatchEffect((cleanupFn) => {\n  const viewport = providerContext.viewport.value\n  if (viewport) {\n    const handleResume = () => {\n      startTimer(closeTimerRemainingTimeRef.value)\n      remainingRaf.resume()\n      emits('resume')\n    }\n    const handlePause = () => {\n      const elapsedTime = Date.now() - closeTimerStartTimeRef.value\n      closeTimerRemainingTimeRef.value = closeTimerRemainingTimeRef.value - elapsedTime\n      window.clearTimeout(closeTimerRef.value)\n      remainingRaf.pause()\n      emits('pause')\n    }\n    viewport.addEventListener(VIEWPORT_PAUSE, handlePause)\n    viewport.addEventListener(VIEWPORT_RESUME, handleResume)\n    return () => {\n      viewport.removeEventListener(VIEWPORT_PAUSE, handlePause)\n      viewport.removeEventListener(VIEWPORT_RESUME, handleResume)\n    }\n  }\n})\n\n// start timer when toast opens or duration changes.\n// we include `open` in deps because closed !== unmounted when animating\n// so it could reopen before being completely unmounted\nwatch(() => [props.open, duration.value], () => {\n  // Reset the timer when the toast is rerendered with the new duration\n  closeTimerRemainingTimeRef.value = duration.value\n\n  if (props.open && !providerContext.isClosePausedRef.value)\n    startTimer(duration.value)\n}, { immediate: true })\n\nonKeyStroke('Escape', (event) => {\n  emits('escapeKeyDown', event)\n  if (!event.defaultPrevented) {\n    providerContext.isFocusedToastEscapeKeyDownRef.value = true\n    handleClose()\n  }\n})\n\nonMounted(() => {\n  providerContext.onToastAdd()\n})\nonUnmounted(() => {\n  providerContext.onToastRemove()\n})\n\nprovideToastRootContext({ onClose: handleClose })\n</script>\n\n<template>\n  <ToastAnnounce\n    v-if=\"announceTextContent\"\n    role=\"alert\"\n    :aria-live=\"type === 'foreground' ? 'assertive' : 'polite'\"\n  >\n    <!--\n      Render each chunk as its own text node so screen readers get the\n      natural pause break between nodes (see comment in utils.ts).\n      Interpolating the array directly with `{{ announceTextContent }}`\n      would route through Vue's `toDisplayString`, which JSON-stringifies\n      arrays — the live region would then announce literal `[`, quotes\n      and commas instead of the toast title and description.\n    -->\n    <template\n      v-for=\"(text, i) in announceTextContent\"\n      :key=\"i\"\n    >\n      {{ text }}\n    </template>\n  </ToastAnnounce>\n\n  <Teleport\n    v-if=\"providerContext.viewport.value\"\n    :to=\"providerContext.viewport.value\"\n  >\n    <CollectionItem>\n      <Primitive\n        :ref=\"forwardRef\"\n        tabindex=\"0\"\n        v-bind=\"$attrs\"\n        :as=\"as\"\n        :as-child=\"asChild\"\n        :data-state=\"open ? 'open' : 'closed'\"\n        :data-swipe-direction=\"providerContext.swipeDirection.value\"\n        :style=\"providerContext.disableSwipe.value\n          ? undefined\n          : { userSelect: 'none', touchAction: 'none' }\"\n        @pointerdown.left=\"(event: PointerEvent) => {\n          if (providerContext.disableSwipe.value) return;\n\n          pointerStartRef = { x: event.clientX, y: event.clientY };\n        }\"\n        @pointermove=\"(event: PointerEvent) => {\n          if (providerContext.disableSwipe.value || !pointerStartRef) return;\n\n          const x = event.clientX - pointerStartRef.x;\n          const y = event.clientY - pointerStartRef.y;\n          const hasSwipeMoveStarted = Boolean(swipeDeltaRef);\n          const isHorizontalSwipe = ['left', 'right'].includes(providerContext.swipeDirection.value);\n          const clamp = ['left', 'up'].includes(providerContext.swipeDirection.value)\n            ? Math.min\n            : Math.max;\n          const clampedX = isHorizontalSwipe ? clamp(0, x) : 0;\n          const clampedY = !isHorizontalSwipe ? clamp(0, y) : 0;\n          const moveStartBuffer = event.pointerType === 'touch' ? 10 : 2;\n          const delta = { x: clampedX, y: clampedY };\n          const eventDetail = { originalEvent: event, delta };\n          if (hasSwipeMoveStarted) {\n            swipeDeltaRef = delta;\n            handleAndDispatchCustomEvent(TOAST_SWIPE_MOVE, (ev: SwipeEvent) => emits('swipeMove', ev), eventDetail);\n          }\n          else if (isDeltaInDirection(delta, providerContext.swipeDirection.value, moveStartBuffer)) {\n            swipeDeltaRef = delta;\n            handleAndDispatchCustomEvent(TOAST_SWIPE_START, (ev: SwipeEvent) => emits('swipeStart', ev), eventDetail);\n            (event.target as HTMLElement).setPointerCapture(event.pointerId);\n          }\n          else if (Math.abs(x) > moveStartBuffer || Math.abs(y) > moveStartBuffer) {\n            // User is swiping in wrong direction so we disable swipe gesture\n            // for the current pointer down interaction\n            pointerStartRef = null;\n          }\n        }\"\n        @pointerup=\"(event: PointerEvent) => {\n          if (providerContext.disableSwipe.value) return;\n\n          const delta = swipeDeltaRef;\n          const target = event.target as HTMLElement;\n          if (target.hasPointerCapture(event.pointerId)) {\n            target.releasePointerCapture(event.pointerId);\n          }\n          swipeDeltaRef = null;\n          pointerStartRef = null;\n          if (delta) {\n            const toast = event.currentTarget;\n            const eventDetail = { originalEvent: event, delta };\n            if (\n              isDeltaInDirection(delta, providerContext.swipeDirection.value, providerContext.swipeThreshold.value)\n            ) {\n              handleAndDispatchCustomEvent(TOAST_SWIPE_END, (ev: SwipeEvent) => emits('swipeEnd', ev), eventDetail);\n            }\n            else {\n              handleAndDispatchCustomEvent(TOAST_SWIPE_CANCEL, (ev: SwipeEvent) => emits('swipeCancel', ev), eventDetail);\n            }\n            // Prevent click event from triggering on items within the toast when\n            // pointer up is part of a swipe gesture\n            toast?.addEventListener('click', (event) => event.preventDefault(), {\n              once: true,\n            });\n          }\n        }\"\n      >\n        <slot\n          :remaining=\"remainingTime\"\n          :duration=\"duration\"\n        />\n      </Primitive>\n    </CollectionItem>\n  </Teleport>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ToastCloseProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport ToastAnnounceExclude from './ToastAnnounceExclude.vue'\nimport { injectToastRootContext } from './ToastRootImpl.vue'\n\nconst props = withDefaults(defineProps<ToastCloseProps>(), {\n  as: 'button',\n})\n\nconst rootContext = injectToastRootContext()\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <ToastAnnounceExclude as-child>\n    <Primitive\n      v-bind=\"props\"\n      :ref=\"forwardRef\"\n      :type=\"as === 'button' ? 'button' : undefined \"\n      @click=\"rootContext.onClose\"\n    >\n      <slot />\n    </Primitive>\n  </ToastAnnounceExclude>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ToastCloseProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport ToastAnnounceExclude from './ToastAnnounceExclude.vue'\nimport { injectToastRootContext } from './ToastRootImpl.vue'\n\nconst props = withDefaults(defineProps<ToastCloseProps>(), {\n  as: 'button',\n})\n\nconst rootContext = injectToastRootContext()\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <ToastAnnounceExclude as-child>\n    <Primitive\n      v-bind=\"props\"\n      :ref=\"forwardRef\"\n      :type=\"as === 'button' ? 'button' : undefined \"\n      @click=\"rootContext.onClose\"\n    >\n      <slot />\n    </Primitive>\n  </ToastAnnounceExclude>\n</template>\n","<script lang=\"ts\">\nimport type { ToastCloseProps } from './ToastClose.vue'\n\nexport interface ToastActionProps extends ToastCloseProps {\n  /**\n   * A short description for an alternate way to carry out the action. For screen reader users\n   * who will not be able to navigate to the button easily/quickly.\n   * @example <ToastAction altText=\"Goto account settings to upgrade\">Upgrade</ToastAction>\n   * @example <ToastAction altText=\"Undo (Alt+U)\">Undo</ToastAction>\n   */\n  altText: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useForwardExpose } from '@/shared'\nimport ToastAnnounceExclude from './ToastAnnounceExclude.vue'\nimport ToastClose from './ToastClose.vue'\n\nconst props = defineProps<ToastActionProps>()\n\nif (!props.altText)\n  throw new Error('Missing prop `altText` expected on `ToastAction`')\n\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <ToastAnnounceExclude\n    v-if=\"altText\"\n    :alt-text=\"altText\"\n    as-child\n  >\n    <ToastClose\n      :ref=\"forwardRef\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n    >\n      <slot />\n    </ToastClose>\n  </ToastAnnounceExclude>\n</template>\n","<script lang=\"ts\">\nimport type { ToastCloseProps } from './ToastClose.vue'\n\nexport interface ToastActionProps extends ToastCloseProps {\n  /**\n   * A short description for an alternate way to carry out the action. For screen reader users\n   * who will not be able to navigate to the button easily/quickly.\n   * @example <ToastAction altText=\"Goto account settings to upgrade\">Upgrade</ToastAction>\n   * @example <ToastAction altText=\"Undo (Alt+U)\">Undo</ToastAction>\n   */\n  altText: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useForwardExpose } from '@/shared'\nimport ToastAnnounceExclude from './ToastAnnounceExclude.vue'\nimport ToastClose from './ToastClose.vue'\n\nconst props = defineProps<ToastActionProps>()\n\nif (!props.altText)\n  throw new Error('Missing prop `altText` expected on `ToastAction`')\n\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <ToastAnnounceExclude\n    v-if=\"altText\"\n    :alt-text=\"altText\"\n    as-child\n  >\n    <ToastClose\n      :ref=\"forwardRef\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n    >\n      <slot />\n    </ToastClose>\n  </ToastAnnounceExclude>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ToastDescriptionProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<ToastDescriptionProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ToastDescriptionProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<ToastDescriptionProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface ToastPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<ToastPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface ToastPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<ToastPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { ToastRootImplEmits, ToastRootImplProps } from './ToastRootImpl.vue'\nimport { useForwardExpose } from '@/shared'\n\nexport type ToastRootEmits = Omit<ToastRootImplEmits, 'close'> & {\n  /** Event handler called when the open state changes */\n  'update:open': [value: boolean]\n}\n\nexport interface ToastRootProps extends ToastRootImplProps {\n  /** The open state of the dialog when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { Presence } from '@/Presence'\nimport ToastRootImpl from './ToastRootImpl.vue'\n\nconst props = withDefaults(defineProps<ToastRootProps>(), {\n  type: 'foreground',\n  open: undefined,\n  defaultOpen: true,\n  as: 'li',\n})\n\nconst emits = defineEmits<ToastRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n    /** Remaining time (in ms) */\n    remaining: number\n    /** Total time the toast will remain visible for (in ms) */\n    duration: number\n  }) => any\n}>()\n\nconst { forwardRef } = useForwardExpose()\nconst open = useVModel(props, 'open', emits, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n</script>\n\n<template>\n  <Presence :present=\"forceMount || open\">\n    <ToastRootImpl\n      :ref=\"forwardRef\"\n      v-slot=\"{ remaining, duration: _duration }\"\n      :open=\"open\"\n      :type=\"type\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :duration=\"duration\"\n      v-bind=\"$attrs\"\n      @close=\"open = false\"\n      @pause=\"emits('pause')\"\n      @resume=\"emits('resume')\"\n      @escape-key-down=\"emits('escapeKeyDown', $event)\"\n      @swipe-start=\"(event) => {\n        emits('swipeStart', event);\n        if (!event.defaultPrevented) {\n          (event.currentTarget as HTMLElement).setAttribute('data-swipe', 'start');\n        }\n      }\"\n      @swipe-move=\"(event) => {\n        emits('swipeMove', event);\n        if (!event.defaultPrevented) {\n          const { x, y } = event.detail.delta;\n          const target = event.currentTarget as HTMLElement\n          target.setAttribute('data-swipe', 'move');\n          target.style.setProperty('--reka-toast-swipe-move-x', `${x}px`);\n          target.style.setProperty('--reka-toast-swipe-move-y', `${y}px`);\n        }\n      }\"\n      @swipe-cancel=\"(event) => {\n        emits('swipeCancel', event);\n        if (!event.defaultPrevented) {\n          const target = event.currentTarget as HTMLElement\n          target.setAttribute('data-swipe', 'cancel');\n          target.style.removeProperty('--reka-toast-swipe-move-x');\n          target.style.removeProperty('--reka-toast-swipe-move-y');\n          target.style.removeProperty('--reka-toast-swipe-end-x');\n          target.style.removeProperty('--reka-toast-swipe-end-y');\n        }\n      }\"\n      @swipe-end=\"(event) => {\n        emits('swipeEnd', event);\n        if (!event.defaultPrevented) {\n          const { x, y } = event.detail.delta;\n          const target = event.currentTarget as HTMLElement\n          target.setAttribute('data-swipe', 'end');\n          target.style.removeProperty('--reka-toast-swipe-move-x');\n          target.style.removeProperty('--reka-toast-swipe-move-y');\n          target.style.setProperty('--reka-toast-swipe-end-x', `${x}px`);\n          target.style.setProperty('--reka-toast-swipe-end-y', `${y}px`);\n          open = false;\n        }\n      }\"\n    >\n      <slot\n        :remaining=\"remaining\"\n        :duration=\"_duration\"\n        :open=\"open\"\n      />\n    </ToastRootImpl>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { ToastRootImplEmits, ToastRootImplProps } from './ToastRootImpl.vue'\nimport { useForwardExpose } from '@/shared'\n\nexport type ToastRootEmits = Omit<ToastRootImplEmits, 'close'> & {\n  /** Event handler called when the open state changes */\n  'update:open': [value: boolean]\n}\n\nexport interface ToastRootProps extends ToastRootImplProps {\n  /** The open state of the dialog when it is initially rendered. Use when you do not need to control its open state. */\n  defaultOpen?: boolean\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { Presence } from '@/Presence'\nimport ToastRootImpl from './ToastRootImpl.vue'\n\nconst props = withDefaults(defineProps<ToastRootProps>(), {\n  type: 'foreground',\n  open: undefined,\n  defaultOpen: true,\n  as: 'li',\n})\n\nconst emits = defineEmits<ToastRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n    /** Remaining time (in ms) */\n    remaining: number\n    /** Total time the toast will remain visible for (in ms) */\n    duration: number\n  }) => any\n}>()\n\nconst { forwardRef } = useForwardExpose()\nconst open = useVModel(props, 'open', emits, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n</script>\n\n<template>\n  <Presence :present=\"forceMount || open\">\n    <ToastRootImpl\n      :ref=\"forwardRef\"\n      v-slot=\"{ remaining, duration: _duration }\"\n      :open=\"open\"\n      :type=\"type\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :duration=\"duration\"\n      v-bind=\"$attrs\"\n      @close=\"open = false\"\n      @pause=\"emits('pause')\"\n      @resume=\"emits('resume')\"\n      @escape-key-down=\"emits('escapeKeyDown', $event)\"\n      @swipe-start=\"(event) => {\n        emits('swipeStart', event);\n        if (!event.defaultPrevented) {\n          (event.currentTarget as HTMLElement).setAttribute('data-swipe', 'start');\n        }\n      }\"\n      @swipe-move=\"(event) => {\n        emits('swipeMove', event);\n        if (!event.defaultPrevented) {\n          const { x, y } = event.detail.delta;\n          const target = event.currentTarget as HTMLElement\n          target.setAttribute('data-swipe', 'move');\n          target.style.setProperty('--reka-toast-swipe-move-x', `${x}px`);\n          target.style.setProperty('--reka-toast-swipe-move-y', `${y}px`);\n        }\n      }\"\n      @swipe-cancel=\"(event) => {\n        emits('swipeCancel', event);\n        if (!event.defaultPrevented) {\n          const target = event.currentTarget as HTMLElement\n          target.setAttribute('data-swipe', 'cancel');\n          target.style.removeProperty('--reka-toast-swipe-move-x');\n          target.style.removeProperty('--reka-toast-swipe-move-y');\n          target.style.removeProperty('--reka-toast-swipe-end-x');\n          target.style.removeProperty('--reka-toast-swipe-end-y');\n        }\n      }\"\n      @swipe-end=\"(event) => {\n        emits('swipeEnd', event);\n        if (!event.defaultPrevented) {\n          const { x, y } = event.detail.delta;\n          const target = event.currentTarget as HTMLElement\n          target.setAttribute('data-swipe', 'end');\n          target.style.removeProperty('--reka-toast-swipe-move-x');\n          target.style.removeProperty('--reka-toast-swipe-move-y');\n          target.style.setProperty('--reka-toast-swipe-end-x', `${x}px`);\n          target.style.setProperty('--reka-toast-swipe-end-y', `${y}px`);\n          open = false;\n        }\n      }\"\n    >\n      <slot\n        :remaining=\"remaining\"\n        :duration=\"_duration\"\n        :open=\"open\"\n      />\n    </ToastRootImpl>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ToastTitleProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<ToastTitleProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ToastTitleProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<ToastTitleProps>()\nuseForwardExpose()\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script setup lang=\"ts\">\nimport { VisuallyHidden } from '@/VisuallyHidden'\nimport { injectToastProviderContext } from './ToastProvider.vue'\n\nconst emits = defineEmits<{\n  focusFromOutsideViewport: [void]\n}>()\n\nconst providerContext = injectToastProviderContext()\n</script>\n\n<template>\n  <VisuallyHidden\n    tabindex=\"0\"\n    style=\"position: fixed\"\n    @focus=\"(event: FocusEvent) => {\n      const prevFocusedElement = event.relatedTarget as HTMLElement | null;\n      const isFocusFromOutsideViewport = !providerContext.viewport.value?.contains(prevFocusedElement);\n      if (isFocusFromOutsideViewport) emits('focusFromOutsideViewport');\n    }\"\n  >\n    <slot />\n  </VisuallyHidden>\n</template>\n","<script setup lang=\"ts\">\nimport { VisuallyHidden } from '@/VisuallyHidden'\nimport { injectToastProviderContext } from './ToastProvider.vue'\n\nconst emits = defineEmits<{\n  focusFromOutsideViewport: [void]\n}>()\n\nconst providerContext = injectToastProviderContext()\n</script>\n\n<template>\n  <VisuallyHidden\n    tabindex=\"0\"\n    style=\"position: fixed\"\n    @focus=\"(event: FocusEvent) => {\n      const prevFocusedElement = event.relatedTarget as HTMLElement | null;\n      const isFocusFromOutsideViewport = !providerContext.viewport.value?.contains(prevFocusedElement);\n      if (isFocusFromOutsideViewport) emits('focusFromOutsideViewport');\n    }\"\n  >\n    <slot />\n  </VisuallyHidden>\n</template>\n","<script lang=\"ts\">\nimport type { ComponentPublicInstance } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useCollection } from '@/Collection'\nimport { getActiveElement, useForwardExpose } from '@/shared'\n\nexport interface ToastViewportProps extends PrimitiveProps {\n  /**\n   * The keys to use as the keyboard shortcut that will move focus to the toast viewport.\n   * @defaultValue ['F8']\n   */\n  hotkey?: string[]\n  /**\n   * An author-localized label for the toast viewport to provide context for screen reader users\n   * when navigating page landmarks. The available `{hotkey}` placeholder will be replaced for you.\n   * Alternatively, you can pass in a custom function to generate the label.\n   * @defaultValue 'Notifications ({hotkey})'\n   */\n  label?: string | ((hotkey: string) => string)\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { onKeyStroke, unrefElement } from '@vueuse/core'\nimport { computed, onMounted, ref, toRefs, watchEffect } from 'vue'\nimport { DismissableLayerBranch } from '@/DismissableLayer'\nimport { focusFirst, getTabbableCandidates } from '@/FocusScope/utils'\nimport { Primitive } from '@/Primitive'\nimport FocusProxy from './FocusProxy.vue'\nimport { injectToastProviderContext } from './ToastProvider.vue'\nimport { VIEWPORT_PAUSE, VIEWPORT_RESUME } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<ToastViewportProps>(), {\n  hotkey: () => ['F8'], // from VIEWPORT_DEFAULT_HOTKEY\n  label: 'Notifications ({hotkey})',\n  as: 'ol',\n})\nconst { hotkey, label } = toRefs(props)\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst { CollectionSlot, getItems } = useCollection()\nconst providerContext = injectToastProviderContext()\nconst hasToasts = computed(() => providerContext.toastCount.value > 0)\nconst headFocusProxyRef = ref<HTMLElement>()\nconst tailFocusProxyRef = ref<HTMLElement>()\n\nconst KEY_RE = /Key/g\nconst DIGIT_RE = /Digit/g\nconst hotkeyMessage = computed(() => hotkey.value.join('+').replace(KEY_RE, '').replace(DIGIT_RE, ''))\n\nonKeyStroke(hotkey.value, () => {\n  currentElement.value.focus()\n})\n\nonMounted(() => {\n  providerContext.onViewportChange(currentElement.value)\n})\n\nwatchEffect((cleanupFn) => {\n  const viewport = currentElement.value\n  if (hasToasts.value && viewport) {\n    const handlePause = () => {\n      if (!providerContext.isClosePausedRef.value) {\n        const pauseEvent = new CustomEvent(VIEWPORT_PAUSE)\n        viewport.dispatchEvent(pauseEvent)\n        providerContext.isClosePausedRef.value = true\n      }\n    }\n\n    const handleResume = () => {\n      if (providerContext.isClosePausedRef.value) {\n        const resumeEvent = new CustomEvent(VIEWPORT_RESUME)\n        viewport.dispatchEvent(resumeEvent)\n        providerContext.isClosePausedRef.value = false\n      }\n    }\n\n    const handleFocusOutResume = (event: FocusEvent) => {\n      const isFocusMovingOutside = !viewport.contains(event.relatedTarget as HTMLElement)\n      if (isFocusMovingOutside)\n        handleResume()\n    }\n\n    const handlePointerLeaveResume = () => {\n      const isFocusInside = viewport.contains(getActiveElement())\n      if (!isFocusInside)\n        handleResume()\n    }\n\n    // We programmatically manage tabbing as we are unable to influence\n    // the source order with portals, this allows us to reverse the\n    // tab order so that it runs from most recent toast to least\n    const handleKeyDown = (event: KeyboardEvent) => {\n      const isMetaKey = event.altKey || event.ctrlKey || event.metaKey\n      const isTabKey = event.key === 'Tab' && !isMetaKey\n\n      if (isTabKey) {\n        const focusedElement = getActiveElement()\n        const isTabbingBackwards = event.shiftKey\n        const targetIsViewport = event.target === viewport\n\n        // If we're back tabbing after jumping to the viewport then we simply\n        // proxy focus out to the preceding document\n        if (targetIsViewport && isTabbingBackwards) {\n          headFocusProxyRef.value?.focus()\n          return\n        }\n\n        const tabbingDirection = isTabbingBackwards ? 'backwards' : 'forwards'\n        const sortedCandidates = getSortedTabbableCandidates({ tabbingDirection })\n        const index = sortedCandidates.findIndex(candidate => candidate === focusedElement)\n        if (focusFirst(sortedCandidates.slice(index + 1))) {\n          event.preventDefault()\n        }\n        else {\n          // If we can't focus that means we're at the edges so we\n          // proxy to the corresponding exit point and let the browser handle\n          // tab/shift+tab keypress and implicitly pass focus to the next valid element in the document\n          isTabbingBackwards\n            ? headFocusProxyRef.value?.focus()\n            : tailFocusProxyRef.value?.focus()\n        }\n      }\n    }\n\n    viewport.addEventListener('focusin', handlePause)\n    viewport.addEventListener('focusout', handleFocusOutResume)\n    viewport.addEventListener('pointermove', handlePause)\n    viewport.addEventListener('pointerleave', handlePointerLeaveResume)\n    viewport.addEventListener('keydown', handleKeyDown)\n    window.addEventListener('blur', handlePause)\n    window.addEventListener('focus', handleResume)\n\n    cleanupFn(() => {\n      viewport.removeEventListener('focusin', handlePause)\n      viewport.removeEventListener('focusout', handleFocusOutResume)\n      viewport.removeEventListener('pointermove', handlePause)\n      viewport.removeEventListener('pointerleave', handlePointerLeaveResume)\n      viewport.removeEventListener('keydown', handleKeyDown)\n      window.removeEventListener('blur', handlePause)\n      window.removeEventListener('focus', handleResume)\n    })\n  }\n})\n\nfunction getSortedTabbableCandidates({ tabbingDirection }: { tabbingDirection: 'forwards' | 'backwards' }) {\n  const toastItems = getItems().map(i => i.ref)\n  const tabbableCandidates = toastItems.map((toastNode) => {\n    const toastTabbableCandidates = [toastNode, ...getTabbableCandidates(toastNode)]\n    return tabbingDirection === 'forwards'\n      ? toastTabbableCandidates\n      : toastTabbableCandidates.reverse()\n  })\n  return (\n    tabbingDirection === 'forwards' ? tabbableCandidates.reverse() : tabbableCandidates\n  ).flat()\n}\n</script>\n\n<template>\n  <DismissableLayerBranch\n    role=\"region\"\n    :aria-label=\"typeof label === 'string' ? label.replace('{hotkey}', hotkeyMessage) : label(hotkeyMessage)\"\n    tabindex=\"-1\"\n    :style=\"{\n      // incase list has size when empty (e.g. padding), we remove pointer events so\n      // it doesn't prevent interactions with page elements that it overlays\n      pointerEvents: hasToasts ? undefined : 'none',\n    }\"\n  >\n    <FocusProxy\n      v-if=\"hasToasts\"\n      :ref=\"(node: Element | ComponentPublicInstance | null) => {\n        if (!node) return undefined\n        headFocusProxyRef = unrefElement(node as ComponentPublicInstance) as HTMLElement\n        return undefined\n      }\"\n      @focus-from-outside-viewport=\"() => {\n        const tabbableCandidates = getSortedTabbableCandidates({\n          tabbingDirection: 'forwards',\n        })\n        focusFirst(tabbableCandidates)\n      }\"\n    />\n    <CollectionSlot>\n      <Primitive\n        :ref=\"forwardRef\"\n        tabindex=\"-1\"\n        :as=\"as\"\n        :as-child=\"asChild\"\n        v-bind=\"$attrs\"\n      >\n        <slot />\n      </Primitive>\n    </CollectionSlot>\n    <FocusProxy\n      v-if=\"hasToasts\"\n      :ref=\"(node: Element | ComponentPublicInstance | null) => {\n        if (!node) return undefined\n        tailFocusProxyRef = unrefElement(node as ComponentPublicInstance) as HTMLElement\n        return undefined\n      }\"\n      @focus-from-outside-viewport=\"() => {\n        const tabbableCandidates = getSortedTabbableCandidates({\n          tabbingDirection: 'backwards',\n        })\n        focusFirst(tabbableCandidates)\n      }\"\n    />\n  </DismissableLayerBranch>\n</template>\n","<script lang=\"ts\">\nimport type { ComponentPublicInstance } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useCollection } from '@/Collection'\nimport { getActiveElement, useForwardExpose } from '@/shared'\n\nexport interface ToastViewportProps extends PrimitiveProps {\n  /**\n   * The keys to use as the keyboard shortcut that will move focus to the toast viewport.\n   * @defaultValue ['F8']\n   */\n  hotkey?: string[]\n  /**\n   * An author-localized label for the toast viewport to provide context for screen reader users\n   * when navigating page landmarks. The available `{hotkey}` placeholder will be replaced for you.\n   * Alternatively, you can pass in a custom function to generate the label.\n   * @defaultValue 'Notifications ({hotkey})'\n   */\n  label?: string | ((hotkey: string) => string)\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { onKeyStroke, unrefElement } from '@vueuse/core'\nimport { computed, onMounted, ref, toRefs, watchEffect } from 'vue'\nimport { DismissableLayerBranch } from '@/DismissableLayer'\nimport { focusFirst, getTabbableCandidates } from '@/FocusScope/utils'\nimport { Primitive } from '@/Primitive'\nimport FocusProxy from './FocusProxy.vue'\nimport { injectToastProviderContext } from './ToastProvider.vue'\nimport { VIEWPORT_PAUSE, VIEWPORT_RESUME } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<ToastViewportProps>(), {\n  hotkey: () => ['F8'], // from VIEWPORT_DEFAULT_HOTKEY\n  label: 'Notifications ({hotkey})',\n  as: 'ol',\n})\nconst { hotkey, label } = toRefs(props)\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst { CollectionSlot, getItems } = useCollection()\nconst providerContext = injectToastProviderContext()\nconst hasToasts = computed(() => providerContext.toastCount.value > 0)\nconst headFocusProxyRef = ref<HTMLElement>()\nconst tailFocusProxyRef = ref<HTMLElement>()\n\nconst KEY_RE = /Key/g\nconst DIGIT_RE = /Digit/g\nconst hotkeyMessage = computed(() => hotkey.value.join('+').replace(KEY_RE, '').replace(DIGIT_RE, ''))\n\nonKeyStroke(hotkey.value, () => {\n  currentElement.value.focus()\n})\n\nonMounted(() => {\n  providerContext.onViewportChange(currentElement.value)\n})\n\nwatchEffect((cleanupFn) => {\n  const viewport = currentElement.value\n  if (hasToasts.value && viewport) {\n    const handlePause = () => {\n      if (!providerContext.isClosePausedRef.value) {\n        const pauseEvent = new CustomEvent(VIEWPORT_PAUSE)\n        viewport.dispatchEvent(pauseEvent)\n        providerContext.isClosePausedRef.value = true\n      }\n    }\n\n    const handleResume = () => {\n      if (providerContext.isClosePausedRef.value) {\n        const resumeEvent = new CustomEvent(VIEWPORT_RESUME)\n        viewport.dispatchEvent(resumeEvent)\n        providerContext.isClosePausedRef.value = false\n      }\n    }\n\n    const handleFocusOutResume = (event: FocusEvent) => {\n      const isFocusMovingOutside = !viewport.contains(event.relatedTarget as HTMLElement)\n      if (isFocusMovingOutside)\n        handleResume()\n    }\n\n    const handlePointerLeaveResume = () => {\n      const isFocusInside = viewport.contains(getActiveElement())\n      if (!isFocusInside)\n        handleResume()\n    }\n\n    // We programmatically manage tabbing as we are unable to influence\n    // the source order with portals, this allows us to reverse the\n    // tab order so that it runs from most recent toast to least\n    const handleKeyDown = (event: KeyboardEvent) => {\n      const isMetaKey = event.altKey || event.ctrlKey || event.metaKey\n      const isTabKey = event.key === 'Tab' && !isMetaKey\n\n      if (isTabKey) {\n        const focusedElement = getActiveElement()\n        const isTabbingBackwards = event.shiftKey\n        const targetIsViewport = event.target === viewport\n\n        // If we're back tabbing after jumping to the viewport then we simply\n        // proxy focus out to the preceding document\n        if (targetIsViewport && isTabbingBackwards) {\n          headFocusProxyRef.value?.focus()\n          return\n        }\n\n        const tabbingDirection = isTabbingBackwards ? 'backwards' : 'forwards'\n        const sortedCandidates = getSortedTabbableCandidates({ tabbingDirection })\n        const index = sortedCandidates.findIndex(candidate => candidate === focusedElement)\n        if (focusFirst(sortedCandidates.slice(index + 1))) {\n          event.preventDefault()\n        }\n        else {\n          // If we can't focus that means we're at the edges so we\n          // proxy to the corresponding exit point and let the browser handle\n          // tab/shift+tab keypress and implicitly pass focus to the next valid element in the document\n          isTabbingBackwards\n            ? headFocusProxyRef.value?.focus()\n            : tailFocusProxyRef.value?.focus()\n        }\n      }\n    }\n\n    viewport.addEventListener('focusin', handlePause)\n    viewport.addEventListener('focusout', handleFocusOutResume)\n    viewport.addEventListener('pointermove', handlePause)\n    viewport.addEventListener('pointerleave', handlePointerLeaveResume)\n    viewport.addEventListener('keydown', handleKeyDown)\n    window.addEventListener('blur', handlePause)\n    window.addEventListener('focus', handleResume)\n\n    cleanupFn(() => {\n      viewport.removeEventListener('focusin', handlePause)\n      viewport.removeEventListener('focusout', handleFocusOutResume)\n      viewport.removeEventListener('pointermove', handlePause)\n      viewport.removeEventListener('pointerleave', handlePointerLeaveResume)\n      viewport.removeEventListener('keydown', handleKeyDown)\n      window.removeEventListener('blur', handlePause)\n      window.removeEventListener('focus', handleResume)\n    })\n  }\n})\n\nfunction getSortedTabbableCandidates({ tabbingDirection }: { tabbingDirection: 'forwards' | 'backwards' }) {\n  const toastItems = getItems().map(i => i.ref)\n  const tabbableCandidates = toastItems.map((toastNode) => {\n    const toastTabbableCandidates = [toastNode, ...getTabbableCandidates(toastNode)]\n    return tabbingDirection === 'forwards'\n      ? toastTabbableCandidates\n      : toastTabbableCandidates.reverse()\n  })\n  return (\n    tabbingDirection === 'forwards' ? tabbableCandidates.reverse() : tabbableCandidates\n  ).flat()\n}\n</script>\n\n<template>\n  <DismissableLayerBranch\n    role=\"region\"\n    :aria-label=\"typeof label === 'string' ? label.replace('{hotkey}', hotkeyMessage) : label(hotkeyMessage)\"\n    tabindex=\"-1\"\n    :style=\"{\n      // incase list has size when empty (e.g. padding), we remove pointer events so\n      // it doesn't prevent interactions with page elements that it overlays\n      pointerEvents: hasToasts ? undefined : 'none',\n    }\"\n  >\n    <FocusProxy\n      v-if=\"hasToasts\"\n      :ref=\"(node: Element | ComponentPublicInstance | null) => {\n        if (!node) return undefined\n        headFocusProxyRef = unrefElement(node as ComponentPublicInstance) as HTMLElement\n        return undefined\n      }\"\n      @focus-from-outside-viewport=\"() => {\n        const tabbableCandidates = getSortedTabbableCandidates({\n          tabbingDirection: 'forwards',\n        })\n        focusFirst(tabbableCandidates)\n      }\"\n    />\n    <CollectionSlot>\n      <Primitive\n        :ref=\"forwardRef\"\n        tabindex=\"-1\"\n        :as=\"as\"\n        :as-child=\"asChild\"\n        v-bind=\"$attrs\"\n      >\n        <slot />\n      </Primitive>\n    </CollectionSlot>\n    <FocusProxy\n      v-if=\"hasToasts\"\n      :ref=\"(node: Element | ComponentPublicInstance | null) => {\n        if (!node) return undefined\n        tailFocusProxyRef = unrefElement(node as ComponentPublicInstance) as HTMLElement\n        return undefined\n      }\"\n      @focus-from-outside-viewport=\"() => {\n        const tabbableCandidates = getSortedTabbableCandidates({\n          tabbingDirection: 'backwards',\n        })\n        focusFirst(tabbableCandidates)\n      }\"\n    />\n  </DismissableLayerBranch>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { AcceptableValue, DataOrientation, Direction, FormFieldProps, SingleOrMultipleProps } from '../shared/types'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useDirection, useFormControl, useForwardExpose } from '@/shared'\nimport VisuallyHiddenInput from '@/VisuallyHidden/VisuallyHiddenInput.vue'\n\nexport interface ToggleGroupRootProps<T = AcceptableValue | AcceptableValue[]>\n  extends PrimitiveProps, FormFieldProps, SingleOrMultipleProps<T> {\n  /** When `false`, navigating through the items using arrow keys will be disabled. */\n  rovingFocus?: boolean\n  /** When `true`, prevents the user from interacting with the toggle group and all its items. */\n  disabled?: boolean\n  /** The orientation of the component, which determines how focus moves: `horizontal` for left/right arrows and `vertical` for up/down arrows. */\n  orientation?: DataOrientation\n  /** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** When `loop` and `rovingFocus` is `true`, keyboard navigation will loop from last item to first, and vice versa. */\n  loop?: boolean\n}\nexport type ToggleGroupRootEmits = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [payload: AcceptableValue | AcceptableValue[]]\n}\n\ninterface ToggleGroupRootContext {\n  isSingle: ComputedRef<boolean>\n  modelValue: Ref<AcceptableValue | AcceptableValue[] | undefined>\n  changeModelValue: (value: AcceptableValue) => void\n  dir?: Ref<Direction>\n  orientation?: DataOrientation\n  loop: Ref<boolean>\n  rovingFocus: Ref<boolean>\n  disabled?: Ref<boolean>\n}\n\nexport const [injectToggleGroupRootContext, provideToggleGroupRootContext]\n  = createContext<ToggleGroupRootContext>('ToggleGroupRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusGroup } from '@/RovingFocus'\nimport { useSingleOrMultipleValue } from '@/shared/useSingleOrMultipleValue'\n\nconst props = withDefaults(defineProps<ToggleGroupRootProps>(), {\n  loop: true,\n  rovingFocus: true,\n  disabled: false,\n})\nconst emits = defineEmits<ToggleGroupRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current toggle values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { loop, rovingFocus, disabled, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst { modelValue, changeModelValue, isSingle } = useSingleOrMultipleValue(props, emits)\nconst isFormControl = useFormControl(currentElement)\n\nprovideToggleGroupRootContext({\n  isSingle,\n  modelValue,\n  changeModelValue,\n  dir,\n  orientation: props.orientation,\n  loop,\n  rovingFocus,\n  disabled,\n})\n</script>\n\n<template>\n  <component\n    :is=\"rovingFocus ? RovingFocusGroup : Primitive\"\n    as-child\n    :orientation=\"rovingFocus ? orientation : undefined\"\n    :dir=\"dir\"\n    :loop=\"rovingFocus ? loop : undefined\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      role=\"group\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n    >\n      <slot :model-value=\"modelValue\" />\n\n      <VisuallyHiddenInput\n        v-if=\"isFormControl && name\"\n        :name=\"name\"\n        :required=\"required\"\n        :value=\"modelValue\"\n      />\n    </Primitive>\n  </component>\n</template>\n","<script lang=\"ts\">\nimport type { ComputedRef, Ref } from 'vue'\nimport type { AcceptableValue, DataOrientation, Direction, FormFieldProps, SingleOrMultipleProps } from '../shared/types'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createContext, useDirection, useFormControl, useForwardExpose } from '@/shared'\nimport VisuallyHiddenInput from '@/VisuallyHidden/VisuallyHiddenInput.vue'\n\nexport interface ToggleGroupRootProps<T = AcceptableValue | AcceptableValue[]>\n  extends PrimitiveProps, FormFieldProps, SingleOrMultipleProps<T> {\n  /** When `false`, navigating through the items using arrow keys will be disabled. */\n  rovingFocus?: boolean\n  /** When `true`, prevents the user from interacting with the toggle group and all its items. */\n  disabled?: boolean\n  /** The orientation of the component, which determines how focus moves: `horizontal` for left/right arrows and `vertical` for up/down arrows. */\n  orientation?: DataOrientation\n  /** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** When `loop` and `rovingFocus` is `true`, keyboard navigation will loop from last item to first, and vice versa. */\n  loop?: boolean\n}\nexport type ToggleGroupRootEmits = {\n  /** Event handler called when the value changes. */\n  'update:modelValue': [payload: AcceptableValue | AcceptableValue[]]\n}\n\ninterface ToggleGroupRootContext {\n  isSingle: ComputedRef<boolean>\n  modelValue: Ref<AcceptableValue | AcceptableValue[] | undefined>\n  changeModelValue: (value: AcceptableValue) => void\n  dir?: Ref<Direction>\n  orientation?: DataOrientation\n  loop: Ref<boolean>\n  rovingFocus: Ref<boolean>\n  disabled?: Ref<boolean>\n}\n\nexport const [injectToggleGroupRootContext, provideToggleGroupRootContext]\n  = createContext<ToggleGroupRootContext>('ToggleGroupRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusGroup } from '@/RovingFocus'\nimport { useSingleOrMultipleValue } from '@/shared/useSingleOrMultipleValue'\n\nconst props = withDefaults(defineProps<ToggleGroupRootProps>(), {\n  loop: true,\n  rovingFocus: true,\n  disabled: false,\n})\nconst emits = defineEmits<ToggleGroupRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current toggle values */\n    modelValue: typeof modelValue.value\n  }) => any\n}>()\n\nconst { loop, rovingFocus, disabled, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst { modelValue, changeModelValue, isSingle } = useSingleOrMultipleValue(props, emits)\nconst isFormControl = useFormControl(currentElement)\n\nprovideToggleGroupRootContext({\n  isSingle,\n  modelValue,\n  changeModelValue,\n  dir,\n  orientation: props.orientation,\n  loop,\n  rovingFocus,\n  disabled,\n})\n</script>\n\n<template>\n  <component\n    :is=\"rovingFocus ? RovingFocusGroup : Primitive\"\n    as-child\n    :orientation=\"rovingFocus ? orientation : undefined\"\n    :dir=\"dir\"\n    :loop=\"rovingFocus ? loop : undefined\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      role=\"group\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n    >\n      <slot :model-value=\"modelValue\" />\n\n      <VisuallyHiddenInput\n        v-if=\"isFormControl && name\"\n        :name=\"name\"\n        :required=\"required\"\n        :value=\"modelValue\"\n      />\n    </Primitive>\n  </component>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { FormFieldProps } from '@/shared/types'\nimport { useFormControl, useForwardExpose } from '@/shared'\nimport { injectToggleGroupRootContext } from '@/ToggleGroup/ToggleGroupRoot.vue'\nimport VisuallyHiddenInput from '@/VisuallyHidden/VisuallyHiddenInput.vue'\n\nexport type ToggleEmits = {\n  /** Event handler called when the value of the toggle changes. */\n  'update:modelValue': [value: boolean]\n}\n\nexport type DataState = 'on' | 'off'\n\nexport interface ToggleProps extends PrimitiveProps, FormFieldProps {\n  /**\n   * The pressed state of the toggle when it is initially rendered. Use when you do not need to control its open state.\n   */\n  defaultValue?: boolean\n  /**\n   * The controlled pressed state of the toggle. Can be bind as `v-model`.\n   */\n  modelValue?: boolean | null\n  /**\n   * When `true`, prevents the user from interacting with the toggle.\n   */\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport type { Ref } from 'vue'\nimport { useVModel } from '@vueuse/core'\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<ToggleProps>(), {\n  modelValue: undefined,\n  disabled: false,\n  as: 'button',\n})\n\nconst emits = defineEmits<ToggleEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current value */\n    modelValue: typeof modelValue.value\n    /** Current state */\n    state: typeof dataState.value\n    /** Current pressed state */\n    pressed: typeof modelValue.value\n    /** Current disabled state */\n    disabled: boolean\n  }) => any\n}>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst toggleGroupContext = injectToggleGroupRootContext(null)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<boolean>\n\nfunction togglePressed() {\n  modelValue.value = !modelValue.value\n}\n\nconst dataState = computed<DataState>(() => {\n  return modelValue.value ? 'on' : 'off'\n})\n\nconst isFormControl = useFormControl(currentElement)\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :as-child=\"props.asChild\"\n    :as=\"as\"\n    :aria-pressed=\"modelValue\"\n    :data-state=\"dataState\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :disabled=\"disabled\"\n    @click=\"togglePressed\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :disabled=\"disabled\"\n      :pressed=\"modelValue\"\n      :state=\"dataState\"\n    />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name && !toggleGroupContext\"\n      type=\"checkbox\"\n      :name=\"name\"\n      :value=\"modelValue\"\n      :required=\"required\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { FormFieldProps } from '@/shared/types'\nimport { useFormControl, useForwardExpose } from '@/shared'\nimport { injectToggleGroupRootContext } from '@/ToggleGroup/ToggleGroupRoot.vue'\nimport VisuallyHiddenInput from '@/VisuallyHidden/VisuallyHiddenInput.vue'\n\nexport type ToggleEmits = {\n  /** Event handler called when the value of the toggle changes. */\n  'update:modelValue': [value: boolean]\n}\n\nexport type DataState = 'on' | 'off'\n\nexport interface ToggleProps extends PrimitiveProps, FormFieldProps {\n  /**\n   * The pressed state of the toggle when it is initially rendered. Use when you do not need to control its open state.\n   */\n  defaultValue?: boolean\n  /**\n   * The controlled pressed state of the toggle. Can be bind as `v-model`.\n   */\n  modelValue?: boolean | null\n  /**\n   * When `true`, prevents the user from interacting with the toggle.\n   */\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport type { Ref } from 'vue'\nimport { useVModel } from '@vueuse/core'\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<ToggleProps>(), {\n  modelValue: undefined,\n  disabled: false,\n  as: 'button',\n})\n\nconst emits = defineEmits<ToggleEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current value */\n    modelValue: typeof modelValue.value\n    /** Current state */\n    state: typeof dataState.value\n    /** Current pressed state */\n    pressed: typeof modelValue.value\n    /** Current disabled state */\n    disabled: boolean\n  }) => any\n}>()\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst toggleGroupContext = injectToggleGroupRootContext(null)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<boolean>\n\nfunction togglePressed() {\n  modelValue.value = !modelValue.value\n}\n\nconst dataState = computed<DataState>(() => {\n  return modelValue.value ? 'on' : 'off'\n})\n\nconst isFormControl = useFormControl(currentElement)\n</script>\n\n<template>\n  <Primitive\n    :ref=\"forwardRef\"\n    :type=\"as === 'button' ? 'button' : undefined\"\n    :as-child=\"props.asChild\"\n    :as=\"as\"\n    :aria-pressed=\"modelValue\"\n    :data-state=\"dataState\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :disabled=\"disabled\"\n    @click=\"togglePressed\"\n  >\n    <slot\n      :model-value=\"modelValue\"\n      :disabled=\"disabled\"\n      :pressed=\"modelValue\"\n      :state=\"dataState\"\n    />\n\n    <VisuallyHiddenInput\n      v-if=\"isFormControl && name && !toggleGroupContext\"\n      type=\"checkbox\"\n      :name=\"name\"\n      :value=\"modelValue\"\n      :required=\"required\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { AcceptableValue } from '@/shared/types'\nimport type { ToggleProps } from '@/Toggle'\nimport { isValueEqualOrExist, useForwardExpose } from '@/shared'\n\nexport interface ToggleGroupItemProps extends Omit<ToggleProps, 'name' | 'required' | 'modelValue' | 'defaultValue'> {\n  /**\n   * A string value for the toggle group item. All items within a toggle group should use a unique value.\n   */\n  value: AcceptableValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusItem } from '@/RovingFocus'\nimport { Toggle } from '@/Toggle'\nimport { injectToggleGroupRootContext } from './ToggleGroupRoot.vue'\n\nconst props = withDefaults(defineProps<ToggleGroupItemProps>(), {\n  as: 'button',\n})\n\nconst rootContext = injectToggleGroupRootContext()\nconst disabled = computed(() => rootContext.disabled?.value || props.disabled)\nconst pressed = computed(() => isValueEqualOrExist(rootContext.modelValue.value, props.value))\n\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <component\n    :is=\"rootContext.rovingFocus.value ? RovingFocusItem : Primitive\"\n    as-child\n    v-bind=\"rootContext.rovingFocus.value ? { focusable: !disabled, active: pressed } : {}\"\n  >\n    <Toggle\n      v-bind=\"props\"\n      :ref=\"forwardRef\"\n      v-slot=\"slotProps\"\n      :disabled=\"disabled\"\n      :model-value=\"pressed\"\n      @update:model-value=\"rootContext.changeModelValue(value)\"\n    >\n      <slot v-bind=\"slotProps\" />\n    </Toggle>\n  </component>\n</template>\n","<script lang=\"ts\">\nimport type { AcceptableValue } from '@/shared/types'\nimport type { ToggleProps } from '@/Toggle'\nimport { isValueEqualOrExist, useForwardExpose } from '@/shared'\n\nexport interface ToggleGroupItemProps extends Omit<ToggleProps, 'name' | 'required' | 'modelValue' | 'defaultValue'> {\n  /**\n   * A string value for the toggle group item. All items within a toggle group should use a unique value.\n   */\n  value: AcceptableValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusItem } from '@/RovingFocus'\nimport { Toggle } from '@/Toggle'\nimport { injectToggleGroupRootContext } from './ToggleGroupRoot.vue'\n\nconst props = withDefaults(defineProps<ToggleGroupItemProps>(), {\n  as: 'button',\n})\n\nconst rootContext = injectToggleGroupRootContext()\nconst disabled = computed(() => rootContext.disabled?.value || props.disabled)\nconst pressed = computed(() => isValueEqualOrExist(rootContext.modelValue.value, props.value))\n\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <component\n    :is=\"rootContext.rovingFocus.value ? RovingFocusItem : Primitive\"\n    as-child\n    v-bind=\"rootContext.rovingFocus.value ? { focusable: !disabled, active: pressed } : {}\"\n  >\n    <Toggle\n      v-bind=\"props\"\n      :ref=\"forwardRef\"\n      v-slot=\"slotProps\"\n      :disabled=\"disabled\"\n      :model-value=\"pressed\"\n      @update:model-value=\"rootContext.changeModelValue(value)\"\n    >\n      <slot v-bind=\"slotProps\" />\n    </Toggle>\n  </component>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ToolbarButtonProps extends PrimitiveProps {\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusItem } from '@/RovingFocus'\n\nconst props = withDefaults(defineProps<ToolbarButtonProps>(), { as: 'button' })\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <RovingFocusItem\n    as-child\n    :focusable=\"!disabled\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :type=\"as === 'button' ? 'button' : undefined\"\n      v-bind=\"props\"\n    >\n      <slot />\n    </Primitive>\n  </RovingFocusItem>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ToolbarButtonProps extends PrimitiveProps {\n  disabled?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusItem } from '@/RovingFocus'\n\nconst props = withDefaults(defineProps<ToolbarButtonProps>(), { as: 'button' })\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <RovingFocusItem\n    as-child\n    :focusable=\"!disabled\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :type=\"as === 'button' ? 'button' : undefined\"\n      v-bind=\"props\"\n    >\n      <slot />\n    </Primitive>\n  </RovingFocusItem>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ToolbarLinkProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusItem } from '@/RovingFocus'\n\nconst props = withDefaults(defineProps<ToolbarLinkProps>(), { as: 'a' })\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <RovingFocusItem\n    as-child\n    focusable\n  >\n    <Primitive\n      v-bind=\"props\"\n      :ref=\"forwardRef\"\n      @keydown=\"(event: KeyboardEvent) => {\n        if (event.key === ' ') (event.currentTarget as HTMLElement)?.click()\n      }\"\n    >\n      <slot />\n    </Primitive>\n  </RovingFocusItem>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ToolbarLinkProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusItem } from '@/RovingFocus'\n\nconst props = withDefaults(defineProps<ToolbarLinkProps>(), { as: 'a' })\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <RovingFocusItem\n    as-child\n    focusable\n  >\n    <Primitive\n      v-bind=\"props\"\n      :ref=\"forwardRef\"\n      @keydown=\"(event: KeyboardEvent) => {\n        if (event.key === ' ') (event.currentTarget as HTMLElement)?.click()\n      }\"\n    >\n      <slot />\n    </Primitive>\n  </RovingFocusItem>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { DataOrientation, Direction } from '@/shared/types'\nimport { createContext, useDirection, useForwardExpose } from '@/shared'\n\nexport interface ToolbarRootProps extends PrimitiveProps {\n  /** The orientation of the toolbar */\n  orientation?: DataOrientation\n  /** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** When `true`, keyboard navigation will loop from last tab to first, and vice versa. */\n  loop?: boolean\n}\n\nexport interface ToolbarRootContext {\n  orientation: Ref<DataOrientation>\n  dir: Ref<Direction>\n}\n\nexport const [injectToolbarRootContext, provideToolbarRootContext]\n  = createContext<ToolbarRootContext>('ToolbarRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusGroup } from '@/RovingFocus'\n\nconst props = withDefaults(defineProps<ToolbarRootProps>(), {\n  orientation: 'horizontal',\n})\nconst { orientation, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\nconst { forwardRef } = useForwardExpose()\n\nprovideToolbarRootContext({ orientation, dir })\n</script>\n\n<template>\n  <RovingFocusGroup\n    as-child\n    :orientation=\"orientation\"\n    :dir=\"dir\"\n    :loop=\"loop\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      role=\"toolbar\"\n      :aria-orientation=\"orientation\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n    >\n      <slot />\n    </Primitive>\n  </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { DataOrientation, Direction } from '@/shared/types'\nimport { createContext, useDirection, useForwardExpose } from '@/shared'\n\nexport interface ToolbarRootProps extends PrimitiveProps {\n  /** The orientation of the toolbar */\n  orientation?: DataOrientation\n  /** The reading direction of the combobox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** When `true`, keyboard navigation will loop from last tab to first, and vice versa. */\n  loop?: boolean\n}\n\nexport interface ToolbarRootContext {\n  orientation: Ref<DataOrientation>\n  dir: Ref<Direction>\n}\n\nexport const [injectToolbarRootContext, provideToolbarRootContext]\n  = createContext<ToolbarRootContext>('ToolbarRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusGroup } from '@/RovingFocus'\n\nconst props = withDefaults(defineProps<ToolbarRootProps>(), {\n  orientation: 'horizontal',\n})\nconst { orientation, dir: propDir } = toRefs(props)\nconst dir = useDirection(propDir)\nconst { forwardRef } = useForwardExpose()\n\nprovideToolbarRootContext({ orientation, dir })\n</script>\n\n<template>\n  <RovingFocusGroup\n    as-child\n    :orientation=\"orientation\"\n    :dir=\"dir\"\n    :loop=\"loop\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      role=\"toolbar\"\n      :aria-orientation=\"orientation\"\n      :as-child=\"asChild\"\n      :as=\"as\"\n    >\n      <slot />\n    </Primitive>\n  </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ToolbarSeparatorProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useForwardExpose } from '@/shared'\nimport BaseSeparator from '../shared/component/BaseSeparator.vue'\nimport { injectToolbarRootContext } from './ToolbarRoot.vue'\n\nconst props = defineProps<ToolbarSeparatorProps>()\n\nconst rootContext = injectToolbarRootContext()\nuseForwardExpose()\n</script>\n\n<template>\n  <BaseSeparator\n    :orientation=\"rootContext.orientation.value\"\n    :as-child=\"props.asChild\"\n    :as=\"as\"\n  >\n    <slot />\n  </BaseSeparator>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface ToolbarSeparatorProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useForwardExpose } from '@/shared'\nimport BaseSeparator from '../shared/component/BaseSeparator.vue'\nimport { injectToolbarRootContext } from './ToolbarRoot.vue'\n\nconst props = defineProps<ToolbarSeparatorProps>()\n\nconst rootContext = injectToolbarRootContext()\nuseForwardExpose()\n</script>\n\n<template>\n  <BaseSeparator\n    :orientation=\"rootContext.orientation.value\"\n    :as-child=\"props.asChild\"\n    :as=\"as\"\n  >\n    <slot />\n  </BaseSeparator>\n</template>\n","<script lang=\"ts\">\nimport type {\n  ToggleGroupRootEmits,\n  ToggleGroupRootProps,\n} from '@/ToggleGroup'\n\nexport type ToolbarToggleGroupEmits = ToggleGroupRootEmits\n\nexport interface ToolbarToggleGroupProps extends ToggleGroupRootProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\nimport { ToggleGroupRoot } from '@/ToggleGroup'\nimport { injectToolbarRootContext } from './ToolbarRoot.vue'\n\nconst props = defineProps<ToolbarToggleGroupProps>()\nconst emits = defineEmits<ToolbarToggleGroupEmits>()\n\nconst rootContext = injectToolbarRootContext()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <ToggleGroupRoot\n    v-bind=\"{ ...props, ...emitsAsProps }\"\n    :data-orientation=\"rootContext.orientation.value\"\n    :dir=\"rootContext.dir.value\"\n    :roving-focus=\"false\"\n  >\n    <slot />\n  </ToggleGroupRoot>\n</template>\n","<script lang=\"ts\">\nimport type {\n  ToggleGroupRootEmits,\n  ToggleGroupRootProps,\n} from '@/ToggleGroup'\n\nexport type ToolbarToggleGroupEmits = ToggleGroupRootEmits\n\nexport interface ToolbarToggleGroupProps extends ToggleGroupRootProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useEmitAsProps, useForwardExpose } from '@/shared'\nimport { ToggleGroupRoot } from '@/ToggleGroup'\nimport { injectToolbarRootContext } from './ToolbarRoot.vue'\n\nconst props = defineProps<ToolbarToggleGroupProps>()\nconst emits = defineEmits<ToolbarToggleGroupEmits>()\n\nconst rootContext = injectToolbarRootContext()\n\nconst emitsAsProps = useEmitAsProps(emits)\nuseForwardExpose()\n</script>\n\n<template>\n  <ToggleGroupRoot\n    v-bind=\"{ ...props, ...emitsAsProps }\"\n    :data-orientation=\"rootContext.orientation.value\"\n    :dir=\"rootContext.dir.value\"\n    :roving-focus=\"false\"\n  >\n    <slot />\n  </ToggleGroupRoot>\n</template>\n","<script lang=\"ts\">\nimport type { ToggleGroupItemProps } from '@/ToggleGroup'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ToolbarToggleItemProps extends ToggleGroupItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ToggleGroupItem } from '@/ToggleGroup'\nimport ToolbarButton from './ToolbarButton.vue'\n\nconst props = defineProps<ToolbarToggleItemProps>()\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <ToolbarButton as-child>\n    <ToggleGroupItem\n      v-bind=\"props\"\n      :ref=\"forwardRef\"\n    >\n      <slot />\n    </ToggleGroupItem>\n  </ToolbarButton>\n</template>\n","<script lang=\"ts\">\nimport type { ToggleGroupItemProps } from '@/ToggleGroup'\nimport { useForwardExpose } from '@/shared'\n\nexport interface ToolbarToggleItemProps extends ToggleGroupItemProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ToggleGroupItem } from '@/ToggleGroup'\nimport ToolbarButton from './ToolbarButton.vue'\n\nconst props = defineProps<ToolbarToggleItemProps>()\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <ToolbarButton as-child>\n    <ToggleGroupItem\n      v-bind=\"props\"\n      :ref=\"forwardRef\"\n    >\n      <slot />\n    </ToggleGroupItem>\n  </ToolbarButton>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface TooltipArrowProps extends PrimitiveProps {\n  /**\n   * The width of the arrow in pixels.\n   *\n   * @defaultValue 10\n   */\n  width?: number\n\n  /**\n   * The height of the arrow in pixels.\n   *\n   * @defaultValue 5\n   */\n  height?: number\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { PopperArrow } from '@/Popper'\n\nconst props = withDefaults(defineProps<TooltipArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\nuseForwardExpose()\n</script>\n\n<template>\n  <PopperArrow v-bind=\"props\">\n    <slot />\n  </PopperArrow>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { useForwardExpose } from '@/shared'\n\nexport interface TooltipArrowProps extends PrimitiveProps {\n  /**\n   * The width of the arrow in pixels.\n   *\n   * @defaultValue 10\n   */\n  width?: number\n\n  /**\n   * The height of the arrow in pixels.\n   *\n   * @defaultValue 5\n   */\n  height?: number\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { PopperArrow } from '@/Popper'\n\nconst props = withDefaults(defineProps<TooltipArrowProps>(), {\n  width: 10,\n  height: 5,\n  as: 'svg',\n})\nuseForwardExpose()\n</script>\n\n<template>\n  <PopperArrow v-bind=\"props\">\n    <slot />\n  </PopperArrow>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { TooltipContentProps } from './TooltipContent.vue'\nimport { createContext, useForwardExpose } from '@/shared'\n\ninterface TooltipProviderContext {\n  isOpenDelayed: Ref<boolean>\n  delayDuration: Ref<number>\n  onOpen: () => void\n  onClose: () => void\n  isPointerInTransitRef: Ref<boolean>\n  disableHoverableContent: Ref<boolean>\n  disableClosingTrigger: Ref<boolean>\n  disabled: Ref<boolean>\n  ignoreNonKeyboardFocus: Ref<boolean>\n  content: Ref<TooltipContentProps | undefined>\n}\n\nexport const [injectTooltipProviderContext, provideTooltipProviderContext]\n  = createContext<TooltipProviderContext>('TooltipProvider')\n\nexport interface TooltipProviderProps {\n  /**\n   * The duration from when the pointer enters the trigger until the tooltip gets opened.\n   * @defaultValue 700\n   */\n  delayDuration?: number\n  /**\n   * How much time a user has to enter another trigger without incurring a delay again.\n   * @defaultValue 300\n   */\n  skipDelayDuration?: number\n  /**\n   * When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.\n   * @defaultValue false\n   */\n  disableHoverableContent?: boolean\n  /**\n   * When `true`, clicking on trigger will not close the content.\n   * @defaultValue false\n   */\n  disableClosingTrigger?: boolean\n  /**\n   * When `true`, disable tooltip\n   * @defaultValue false\n   */\n  disabled?: boolean\n  /**\n   * Prevent the tooltip from opening if the focus did not come from\n   * the keyboard by matching against the `:focus-visible` selector.\n   * This is useful if you want to avoid opening it when switching\n   * browser tabs or closing a dialog.\n   * @defaultValue false\n   */\n  ignoreNonKeyboardFocus?: boolean\n  /**\n   * Default settings that will be used by all tooltip components.\n   */\n  content?: TooltipContentProps\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useTimeoutFn } from '@vueuse/shared'\nimport { ref, toRefs } from 'vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<TooltipProviderProps>(), {\n  delayDuration: 700,\n  skipDelayDuration: 300,\n  disableHoverableContent: false,\n  ignoreNonKeyboardFocus: false,\n})\nconst { delayDuration, skipDelayDuration, disableHoverableContent, disableClosingTrigger, ignoreNonKeyboardFocus, disabled, content } = toRefs(props)\nuseForwardExpose()\n\nconst isOpenDelayed = ref(true)\n// Reset the inTransit state if idle/scrolled.\nconst isPointerInTransitRef = ref(false)\n\nconst { start: startTimer, stop: clearTimer } = useTimeoutFn(() => {\n  isOpenDelayed.value = true\n}, skipDelayDuration, { immediate: false })\n\nprovideTooltipProviderContext({\n  isOpenDelayed,\n  delayDuration,\n  onOpen() {\n    clearTimer()\n    isOpenDelayed.value = false\n  },\n  onClose() {\n    startTimer()\n  },\n  isPointerInTransitRef,\n  disableHoverableContent,\n  disableClosingTrigger,\n  disabled,\n  ignoreNonKeyboardFocus,\n  content,\n})\n</script>\n\n<template>\n  <slot />\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport type { TooltipContentProps } from './TooltipContent.vue'\nimport { createContext, useForwardExpose } from '@/shared'\n\ninterface TooltipProviderContext {\n  isOpenDelayed: Ref<boolean>\n  delayDuration: Ref<number>\n  onOpen: () => void\n  onClose: () => void\n  isPointerInTransitRef: Ref<boolean>\n  disableHoverableContent: Ref<boolean>\n  disableClosingTrigger: Ref<boolean>\n  disabled: Ref<boolean>\n  ignoreNonKeyboardFocus: Ref<boolean>\n  content: Ref<TooltipContentProps | undefined>\n}\n\nexport const [injectTooltipProviderContext, provideTooltipProviderContext]\n  = createContext<TooltipProviderContext>('TooltipProvider')\n\nexport interface TooltipProviderProps {\n  /**\n   * The duration from when the pointer enters the trigger until the tooltip gets opened.\n   * @defaultValue 700\n   */\n  delayDuration?: number\n  /**\n   * How much time a user has to enter another trigger without incurring a delay again.\n   * @defaultValue 300\n   */\n  skipDelayDuration?: number\n  /**\n   * When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.\n   * @defaultValue false\n   */\n  disableHoverableContent?: boolean\n  /**\n   * When `true`, clicking on trigger will not close the content.\n   * @defaultValue false\n   */\n  disableClosingTrigger?: boolean\n  /**\n   * When `true`, disable tooltip\n   * @defaultValue false\n   */\n  disabled?: boolean\n  /**\n   * Prevent the tooltip from opening if the focus did not come from\n   * the keyboard by matching against the `:focus-visible` selector.\n   * This is useful if you want to avoid opening it when switching\n   * browser tabs or closing a dialog.\n   * @defaultValue false\n   */\n  ignoreNonKeyboardFocus?: boolean\n  /**\n   * Default settings that will be used by all tooltip components.\n   */\n  content?: TooltipContentProps\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useTimeoutFn } from '@vueuse/shared'\nimport { ref, toRefs } from 'vue'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<TooltipProviderProps>(), {\n  delayDuration: 700,\n  skipDelayDuration: 300,\n  disableHoverableContent: false,\n  ignoreNonKeyboardFocus: false,\n})\nconst { delayDuration, skipDelayDuration, disableHoverableContent, disableClosingTrigger, ignoreNonKeyboardFocus, disabled, content } = toRefs(props)\nuseForwardExpose()\n\nconst isOpenDelayed = ref(true)\n// Reset the inTransit state if idle/scrolled.\nconst isPointerInTransitRef = ref(false)\n\nconst { start: startTimer, stop: clearTimer } = useTimeoutFn(() => {\n  isOpenDelayed.value = true\n}, skipDelayDuration, { immediate: false })\n\nprovideTooltipProviderContext({\n  isOpenDelayed,\n  delayDuration,\n  onOpen() {\n    clearTimer()\n    isOpenDelayed.value = false\n  },\n  onClose() {\n    startTimer()\n  },\n  isPointerInTransitRef,\n  disableHoverableContent,\n  disableClosingTrigger,\n  disabled,\n  ignoreNonKeyboardFocus,\n  content,\n})\n</script>\n\n<template>\n  <slot />\n</template>\n","export const TOOLTIP_OPEN = 'tooltip.open'\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport { createContext, useForwardExpose } from '@/shared'\n\nexport interface TooltipRootProps {\n  /**\n   * The open state of the tooltip when it is initially rendered.\n   * Use when you do not need to control its open state.\n   */\n  defaultOpen?: boolean\n  /**\n   * The controlled open state of the tooltip.\n   */\n  open?: boolean\n  /**\n   * Override the duration given to the `Provider` to customise\n   * the open delay for a specific tooltip.\n   *\n   * @defaultValue 700\n   */\n  delayDuration?: number\n  /**\n   * Prevents Tooltip.Content from remaining open when hovering.\n   * Disabling this has accessibility consequences. Inherits\n   * from Tooltip.Provider.\n   */\n  disableHoverableContent?: boolean\n  /**\n   * When `true`, clicking on trigger will not close the content.\n   * @defaultValue false\n   */\n  disableClosingTrigger?: boolean\n  /**\n   * When `true`, disable tooltip\n   * @defaultValue false\n   */\n  disabled?: boolean\n  /**\n   * Prevent the tooltip from opening if the focus did not come from\n   * the keyboard by matching against the `:focus-visible` selector.\n   * This is useful if you want to avoid opening it when switching\n   * browser tabs or closing a dialog.\n   * @defaultValue false\n   */\n  ignoreNonKeyboardFocus?: boolean\n}\n\nexport type TooltipRootEmits = {\n  /** Event handler called when the open state of the tooltip changes. */\n  'update:open': [value: boolean]\n}\n\nexport interface TooltipContext {\n  contentId: string\n  open: Ref<boolean>\n  stateAttribute: Ref<'closed' | 'delayed-open' | 'instant-open'>\n  trigger: Ref<HTMLElement | undefined>\n  onTriggerChange: (trigger: HTMLElement | undefined) => void\n  onTriggerEnter: () => void\n  onTriggerLeave: () => void\n  onOpen: () => void\n  onClose: () => void\n  disableHoverableContent: Ref<boolean>\n  disableClosingTrigger: Ref<boolean>\n  disabled: Ref<boolean>\n  ignoreNonKeyboardFocus: Ref<boolean>\n}\n\nexport const [injectTooltipRootContext, provideTooltipRootContext]\n  = createContext<TooltipContext>('TooltipRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useTimeoutFn, useVModel } from '@vueuse/core'\nimport { computed, ref, watch } from 'vue'\nimport { PopperRoot } from '@/Popper'\nimport { injectTooltipProviderContext } from './TooltipProvider.vue'\nimport { TOOLTIP_OPEN } from './utils'\n\nconst props = withDefaults(defineProps<TooltipRootProps>(), {\n  defaultOpen: false,\n  open: undefined,\n  delayDuration: undefined,\n  disableHoverableContent: undefined,\n  disableClosingTrigger: undefined,\n  disabled: undefined,\n  ignoreNonKeyboardFocus: undefined,\n})\n\nconst emit = defineEmits<TooltipRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nuseForwardExpose()\nconst providerContext = injectTooltipProviderContext()\n\nconst disableHoverableContent = computed(() => props.disableHoverableContent ?? providerContext.disableHoverableContent.value)\nconst disableClosingTrigger = computed(() => props.disableClosingTrigger ?? providerContext.disableClosingTrigger.value)\nconst disableTooltip = computed(() => props.disabled ?? providerContext.disabled.value)\n\nconst delayDuration = computed(() => props.delayDuration ?? providerContext.delayDuration.value)\nconst ignoreNonKeyboardFocus = computed(() => props.ignoreNonKeyboardFocus ?? providerContext.ignoreNonKeyboardFocus.value)\n\nconst open = useVModel(props, 'open', emit, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nwatch(open, (isOpen) => {\n  if (!providerContext.onClose)\n    return\n  if (isOpen) {\n    providerContext.onOpen()\n    // as `onChange` is called within a lifecycle method we\n    // avoid dispatching via `dispatchDiscreteCustomEvent`.\n    document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN))\n  }\n  else {\n    providerContext.onClose()\n  }\n})\n\nconst wasOpenDelayedRef = ref(false)\nconst trigger = ref<HTMLElement>()\n\nconst stateAttribute = computed(() => {\n  if (!open.value)\n    return 'closed'\n  return wasOpenDelayedRef.value ? 'delayed-open' : 'instant-open'\n})\n\nconst { start: startTimer, stop: clearTimer } = useTimeoutFn(() => {\n  wasOpenDelayedRef.value = true\n  open.value = true\n}, delayDuration, { immediate: false })\n\nfunction handleOpen() {\n  clearTimer()\n  wasOpenDelayedRef.value = false\n  open.value = true\n}\nfunction handleClose() {\n  clearTimer()\n  open.value = false\n}\nfunction handleDelayedOpen() {\n  startTimer()\n}\n\nprovideTooltipRootContext({\n  contentId: '',\n  open,\n  stateAttribute,\n  trigger,\n  onTriggerChange(el) {\n    trigger.value = el\n  },\n  onTriggerEnter() {\n    if (providerContext.isOpenDelayed.value)\n      handleDelayedOpen()\n    else handleOpen()\n  },\n  onTriggerLeave() {\n    if (disableHoverableContent.value) {\n      handleClose()\n    }\n    else {\n      // Clear the timer in case the pointer leaves the trigger before the tooltip is opened.\n      clearTimer()\n    }\n  },\n  onOpen: handleOpen,\n  onClose: handleClose,\n  disableHoverableContent,\n  disableClosingTrigger,\n  disabled: disableTooltip,\n  ignoreNonKeyboardFocus,\n})\n</script>\n\n<template>\n  <PopperRoot>\n    <slot :open=\"open\" />\n  </PopperRoot>\n</template>\n","<script lang=\"ts\">\nimport type { Ref } from 'vue'\nimport { createContext, useForwardExpose } from '@/shared'\n\nexport interface TooltipRootProps {\n  /**\n   * The open state of the tooltip when it is initially rendered.\n   * Use when you do not need to control its open state.\n   */\n  defaultOpen?: boolean\n  /**\n   * The controlled open state of the tooltip.\n   */\n  open?: boolean\n  /**\n   * Override the duration given to the `Provider` to customise\n   * the open delay for a specific tooltip.\n   *\n   * @defaultValue 700\n   */\n  delayDuration?: number\n  /**\n   * Prevents Tooltip.Content from remaining open when hovering.\n   * Disabling this has accessibility consequences. Inherits\n   * from Tooltip.Provider.\n   */\n  disableHoverableContent?: boolean\n  /**\n   * When `true`, clicking on trigger will not close the content.\n   * @defaultValue false\n   */\n  disableClosingTrigger?: boolean\n  /**\n   * When `true`, disable tooltip\n   * @defaultValue false\n   */\n  disabled?: boolean\n  /**\n   * Prevent the tooltip from opening if the focus did not come from\n   * the keyboard by matching against the `:focus-visible` selector.\n   * This is useful if you want to avoid opening it when switching\n   * browser tabs or closing a dialog.\n   * @defaultValue false\n   */\n  ignoreNonKeyboardFocus?: boolean\n}\n\nexport type TooltipRootEmits = {\n  /** Event handler called when the open state of the tooltip changes. */\n  'update:open': [value: boolean]\n}\n\nexport interface TooltipContext {\n  contentId: string\n  open: Ref<boolean>\n  stateAttribute: Ref<'closed' | 'delayed-open' | 'instant-open'>\n  trigger: Ref<HTMLElement | undefined>\n  onTriggerChange: (trigger: HTMLElement | undefined) => void\n  onTriggerEnter: () => void\n  onTriggerLeave: () => void\n  onOpen: () => void\n  onClose: () => void\n  disableHoverableContent: Ref<boolean>\n  disableClosingTrigger: Ref<boolean>\n  disabled: Ref<boolean>\n  ignoreNonKeyboardFocus: Ref<boolean>\n}\n\nexport const [injectTooltipRootContext, provideTooltipRootContext]\n  = createContext<TooltipContext>('TooltipRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useTimeoutFn, useVModel } from '@vueuse/core'\nimport { computed, ref, watch } from 'vue'\nimport { PopperRoot } from '@/Popper'\nimport { injectTooltipProviderContext } from './TooltipProvider.vue'\nimport { TOOLTIP_OPEN } from './utils'\n\nconst props = withDefaults(defineProps<TooltipRootProps>(), {\n  defaultOpen: false,\n  open: undefined,\n  delayDuration: undefined,\n  disableHoverableContent: undefined,\n  disableClosingTrigger: undefined,\n  disabled: undefined,\n  ignoreNonKeyboardFocus: undefined,\n})\n\nconst emit = defineEmits<TooltipRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** Current open state */\n    open: typeof open.value\n  }) => any\n}>()\n\nuseForwardExpose()\nconst providerContext = injectTooltipProviderContext()\n\nconst disableHoverableContent = computed(() => props.disableHoverableContent ?? providerContext.disableHoverableContent.value)\nconst disableClosingTrigger = computed(() => props.disableClosingTrigger ?? providerContext.disableClosingTrigger.value)\nconst disableTooltip = computed(() => props.disabled ?? providerContext.disabled.value)\n\nconst delayDuration = computed(() => props.delayDuration ?? providerContext.delayDuration.value)\nconst ignoreNonKeyboardFocus = computed(() => props.ignoreNonKeyboardFocus ?? providerContext.ignoreNonKeyboardFocus.value)\n\nconst open = useVModel(props, 'open', emit, {\n  defaultValue: props.defaultOpen,\n  passive: (props.open === undefined) as false,\n}) as Ref<boolean>\n\nwatch(open, (isOpen) => {\n  if (!providerContext.onClose)\n    return\n  if (isOpen) {\n    providerContext.onOpen()\n    // as `onChange` is called within a lifecycle method we\n    // avoid dispatching via `dispatchDiscreteCustomEvent`.\n    document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN))\n  }\n  else {\n    providerContext.onClose()\n  }\n})\n\nconst wasOpenDelayedRef = ref(false)\nconst trigger = ref<HTMLElement>()\n\nconst stateAttribute = computed(() => {\n  if (!open.value)\n    return 'closed'\n  return wasOpenDelayedRef.value ? 'delayed-open' : 'instant-open'\n})\n\nconst { start: startTimer, stop: clearTimer } = useTimeoutFn(() => {\n  wasOpenDelayedRef.value = true\n  open.value = true\n}, delayDuration, { immediate: false })\n\nfunction handleOpen() {\n  clearTimer()\n  wasOpenDelayedRef.value = false\n  open.value = true\n}\nfunction handleClose() {\n  clearTimer()\n  open.value = false\n}\nfunction handleDelayedOpen() {\n  startTimer()\n}\n\nprovideTooltipRootContext({\n  contentId: '',\n  open,\n  stateAttribute,\n  trigger,\n  onTriggerChange(el) {\n    trigger.value = el\n  },\n  onTriggerEnter() {\n    if (providerContext.isOpenDelayed.value)\n      handleDelayedOpen()\n    else handleOpen()\n  },\n  onTriggerLeave() {\n    if (disableHoverableContent.value) {\n      handleClose()\n    }\n    else {\n      // Clear the timer in case the pointer leaves the trigger before the tooltip is opened.\n      clearTimer()\n    }\n  },\n  onOpen: handleOpen,\n  onClose: handleClose,\n  disableHoverableContent,\n  disableClosingTrigger,\n  disabled: disableTooltip,\n  ignoreNonKeyboardFocus,\n})\n</script>\n\n<template>\n  <PopperRoot>\n    <slot :open=\"open\" />\n  </PopperRoot>\n</template>\n","<script lang=\"ts\">\nimport type { PopperContentProps } from '@/Popper'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { defu } from 'defu'\nimport { useForwardExpose } from '@/shared'\nimport { injectTooltipProviderContext } from './TooltipProvider.vue'\n\nexport type TooltipContentImplEmits = {\n  /** Event handler called when focus moves to the destructive action after opening. It can be prevented by calling `event.preventDefault` */\n  escapeKeyDown: [event: KeyboardEvent]\n  /** Event handler called when a pointer event occurs outside the bounds of the component. It can be prevented by calling `event.preventDefault`. */\n  pointerDownOutside: [event: Event]\n}\n\nexport interface TooltipContentImplProps\n  extends PrimitiveProps,\n  Pick<\n    PopperContentProps,\n    | 'side'\n    | 'sideOffset'\n    | 'align'\n    | 'alignOffset'\n    | 'avoidCollisions'\n    | 'collisionBoundary'\n    | 'collisionPadding'\n    | 'arrowPadding'\n    | 'sticky'\n    | 'hideWhenDetached'\n    | 'positionStrategy'\n    | 'updatePositionStrategy'\n  > {\n  /**\n   * By default, screenreaders will announce the content inside\n   * the component. If this is not descriptive enough, or you have\n   * content that cannot be announced, use aria-label as a more\n   * descriptive label.\n   *\n   * @defaultValue String\n   */\n  ariaLabel?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useEventListener } from '@vueuse/core'\nimport { computed, onMounted } from 'vue'\nimport { DismissableLayer } from '@/DismissableLayer'\nimport { PopperContent } from '@/Popper'\nimport { VisuallyHidden } from '@/VisuallyHidden'\nimport { injectTooltipRootContext } from './TooltipRoot.vue'\nimport { TOOLTIP_OPEN } from './utils'\n\nconst props = withDefaults(defineProps<TooltipContentImplProps>(), {\n  avoidCollisions: undefined,\n  asChild: undefined,\n  hideWhenDetached: undefined,\n})\nconst emits = defineEmits<TooltipContentImplEmits>()\n\nconst rootContext = injectTooltipRootContext()\nconst providerContext = injectTooltipProviderContext()\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst ariaLabel = computed(() => props.ariaLabel || currentElement.value?.textContent)\n\nconst popperContentProps = computed(() => {\n  const { ariaLabel: _, ...restProps } = props\n\n  return defu(restProps, providerContext.content.value ?? {}, {\n    side: 'top',\n    sideOffset: 0,\n    align: 'center',\n    avoidCollisions: true,\n    collisionBoundary: [],\n    collisionPadding: 0,\n    arrowPadding: 0,\n    sticky: 'partial',\n    hideWhenDetached: false,\n  } satisfies TooltipContentImplProps)\n})\n\nonMounted(() => {\n  // Close the tooltip if the trigger is scrolled\n  useEventListener(window, 'scroll', (event) => {\n    const target = event.target as HTMLElement\n    if (target?.contains(rootContext.trigger.value!))\n      rootContext.onClose()\n  }, { capture: true })\n  // Close this tooltip if another one opens\n  useEventListener(window, TOOLTIP_OPEN, rootContext.onClose)\n})\n</script>\n\n<template>\n  <DismissableLayer\n    as-child\n    :disable-outside-pointer-events=\"false\"\n    @escape-key-down=\"emits('escapeKeyDown', $event)\"\n    @pointer-down-outside=\"(event) => {\n      if (rootContext.disableClosingTrigger.value && rootContext.trigger.value?.contains(event.target as HTMLElement))\n        event.preventDefault()\n\n      emits('pointerDownOutside', event)\n    }\"\n    @focus-outside.prevent\n    @dismiss=\"rootContext.onClose()\"\n  >\n    <PopperContent\n      :ref=\"forwardRef\"\n      :data-state=\"rootContext.stateAttribute.value\"\n      v-bind=\"{ ...$attrs, ...popperContentProps }\"\n      :style=\"{\n        '--reka-tooltip-content-transform-origin': 'var(--reka-popper-transform-origin)',\n        '--reka-tooltip-content-available-width': 'var(--reka-popper-available-width)',\n        '--reka-tooltip-content-available-height': 'var(--reka-popper-available-height)',\n        '--reka-tooltip-trigger-width': 'var(--reka-popper-anchor-width)',\n        '--reka-tooltip-trigger-height': 'var(--reka-popper-anchor-height)',\n      }\"\n    >\n      <slot />\n      <VisuallyHidden\n        :id=\"rootContext.contentId\"\n        role=\"tooltip\"\n      >\n        {{ ariaLabel }}\n      </VisuallyHidden>\n    </PopperContent>\n  </DismissableLayer>\n</template>\n","<script lang=\"ts\">\nimport type { PopperContentProps } from '@/Popper'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { defu } from 'defu'\nimport { useForwardExpose } from '@/shared'\nimport { injectTooltipProviderContext } from './TooltipProvider.vue'\n\nexport type TooltipContentImplEmits = {\n  /** Event handler called when focus moves to the destructive action after opening. It can be prevented by calling `event.preventDefault` */\n  escapeKeyDown: [event: KeyboardEvent]\n  /** Event handler called when a pointer event occurs outside the bounds of the component. It can be prevented by calling `event.preventDefault`. */\n  pointerDownOutside: [event: Event]\n}\n\nexport interface TooltipContentImplProps\n  extends PrimitiveProps,\n  Pick<\n    PopperContentProps,\n    | 'side'\n    | 'sideOffset'\n    | 'align'\n    | 'alignOffset'\n    | 'avoidCollisions'\n    | 'collisionBoundary'\n    | 'collisionPadding'\n    | 'arrowPadding'\n    | 'sticky'\n    | 'hideWhenDetached'\n    | 'positionStrategy'\n    | 'updatePositionStrategy'\n  > {\n  /**\n   * By default, screenreaders will announce the content inside\n   * the component. If this is not descriptive enough, or you have\n   * content that cannot be announced, use aria-label as a more\n   * descriptive label.\n   *\n   * @defaultValue String\n   */\n  ariaLabel?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useEventListener } from '@vueuse/core'\nimport { computed, onMounted } from 'vue'\nimport { DismissableLayer } from '@/DismissableLayer'\nimport { PopperContent } from '@/Popper'\nimport { VisuallyHidden } from '@/VisuallyHidden'\nimport { injectTooltipRootContext } from './TooltipRoot.vue'\nimport { TOOLTIP_OPEN } from './utils'\n\nconst props = withDefaults(defineProps<TooltipContentImplProps>(), {\n  avoidCollisions: undefined,\n  asChild: undefined,\n  hideWhenDetached: undefined,\n})\nconst emits = defineEmits<TooltipContentImplEmits>()\n\nconst rootContext = injectTooltipRootContext()\nconst providerContext = injectTooltipProviderContext()\n\nconst { forwardRef, currentElement } = useForwardExpose()\nconst ariaLabel = computed(() => props.ariaLabel || currentElement.value?.textContent)\n\nconst popperContentProps = computed(() => {\n  const { ariaLabel: _, ...restProps } = props\n\n  return defu(restProps, providerContext.content.value ?? {}, {\n    side: 'top',\n    sideOffset: 0,\n    align: 'center',\n    avoidCollisions: true,\n    collisionBoundary: [],\n    collisionPadding: 0,\n    arrowPadding: 0,\n    sticky: 'partial',\n    hideWhenDetached: false,\n  } satisfies TooltipContentImplProps)\n})\n\nonMounted(() => {\n  // Close the tooltip if the trigger is scrolled\n  useEventListener(window, 'scroll', (event) => {\n    const target = event.target as HTMLElement\n    if (target?.contains(rootContext.trigger.value!))\n      rootContext.onClose()\n  }, { capture: true })\n  // Close this tooltip if another one opens\n  useEventListener(window, TOOLTIP_OPEN, rootContext.onClose)\n})\n</script>\n\n<template>\n  <DismissableLayer\n    as-child\n    :disable-outside-pointer-events=\"false\"\n    @escape-key-down=\"emits('escapeKeyDown', $event)\"\n    @pointer-down-outside=\"(event) => {\n      if (rootContext.disableClosingTrigger.value && rootContext.trigger.value?.contains(event.target as HTMLElement))\n        event.preventDefault()\n\n      emits('pointerDownOutside', event)\n    }\"\n    @focus-outside.prevent\n    @dismiss=\"rootContext.onClose()\"\n  >\n    <PopperContent\n      :ref=\"forwardRef\"\n      :data-state=\"rootContext.stateAttribute.value\"\n      v-bind=\"{ ...$attrs, ...popperContentProps }\"\n      :style=\"{\n        '--reka-tooltip-content-transform-origin': 'var(--reka-popper-transform-origin)',\n        '--reka-tooltip-content-available-width': 'var(--reka-popper-available-width)',\n        '--reka-tooltip-content-available-height': 'var(--reka-popper-available-height)',\n        '--reka-tooltip-trigger-width': 'var(--reka-popper-anchor-width)',\n        '--reka-tooltip-trigger-height': 'var(--reka-popper-anchor-height)',\n      }\"\n    >\n      <slot />\n      <VisuallyHidden\n        :id=\"rootContext.contentId\"\n        role=\"tooltip\"\n      >\n        {{ ariaLabel }}\n      </VisuallyHidden>\n    </PopperContent>\n  </DismissableLayer>\n</template>\n","<script setup lang=\"ts\">\nimport type { TooltipContentImplProps } from './TooltipContentImpl.vue'\nimport { useForwardExpose, useForwardProps, useGraceArea } from '@/shared'\nimport TooltipContentImpl from './TooltipContentImpl.vue'\nimport { injectTooltipProviderContext } from './TooltipProvider.vue'\nimport { injectTooltipRootContext } from './TooltipRoot.vue'\n\nconst props = defineProps<TooltipContentImplProps>()\nconst forwardedProps = useForwardProps(props)\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst { trigger, onClose } = injectTooltipRootContext()\nconst providerContext = injectTooltipProviderContext()\n\nconst { isPointerInTransit, onPointerExit } = useGraceArea(trigger, currentElement)\n\nproviderContext.isPointerInTransitRef = isPointerInTransit\nonPointerExit(() => {\n  onClose()\n})\n</script>\n\n<template>\n  <TooltipContentImpl\n    :ref=\"forwardRef\"\n    v-bind=\"forwardedProps\"\n  >\n    <slot />\n  </TooltipContentImpl>\n</template>\n","<script setup lang=\"ts\">\nimport type { TooltipContentImplProps } from './TooltipContentImpl.vue'\nimport { useForwardExpose, useForwardProps, useGraceArea } from '@/shared'\nimport TooltipContentImpl from './TooltipContentImpl.vue'\nimport { injectTooltipProviderContext } from './TooltipProvider.vue'\nimport { injectTooltipRootContext } from './TooltipRoot.vue'\n\nconst props = defineProps<TooltipContentImplProps>()\nconst forwardedProps = useForwardProps(props)\nconst { forwardRef, currentElement } = useForwardExpose()\n\nconst { trigger, onClose } = injectTooltipRootContext()\nconst providerContext = injectTooltipProviderContext()\n\nconst { isPointerInTransit, onPointerExit } = useGraceArea(trigger, currentElement)\n\nproviderContext.isPointerInTransitRef = isPointerInTransit\nonPointerExit(() => {\n  onClose()\n})\n</script>\n\n<template>\n  <TooltipContentImpl\n    :ref=\"forwardRef\"\n    v-bind=\"forwardedProps\"\n  >\n    <slot />\n  </TooltipContentImpl>\n</template>\n","<script lang=\"ts\">\nimport type { TooltipContentImplEmits, TooltipContentImplProps } from './TooltipContentImpl.vue'\n\nexport type TooltipContentEmits = TooltipContentImplEmits\n\nexport interface TooltipContentProps extends TooltipContentImplProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\nimport TooltipContentHoverable from './TooltipContentHoverable.vue'\nimport TooltipContentImpl from './TooltipContentImpl.vue'\nimport { injectTooltipRootContext } from './TooltipRoot.vue'\n\nconst props = defineProps<TooltipContentProps>()\nconst emits = defineEmits<TooltipContentEmits>()\n\nconst rootContext = injectTooltipRootContext()\nconst forwarded = useForwardPropsEmits(props, emits)\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <Presence :present=\"forceMount || rootContext.open.value\">\n    <component\n      :is=\"rootContext.disableHoverableContent.value ? TooltipContentImpl : TooltipContentHoverable\"\n      :ref=\"forwardRef\"\n      v-bind=\"forwarded\"\n    >\n      <slot />\n    </component>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { TooltipContentImplEmits, TooltipContentImplProps } from './TooltipContentImpl.vue'\n\nexport type TooltipContentEmits = TooltipContentImplEmits\n\nexport interface TooltipContentProps extends TooltipContentImplProps {\n  /**\n   * Used to force mounting when more control is needed. Useful when\n   * controlling animation with Vue animation libraries.\n   */\n  forceMount?: boolean\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Presence } from '@/Presence'\nimport { useForwardExpose, useForwardPropsEmits } from '@/shared'\nimport TooltipContentHoverable from './TooltipContentHoverable.vue'\nimport TooltipContentImpl from './TooltipContentImpl.vue'\nimport { injectTooltipRootContext } from './TooltipRoot.vue'\n\nconst props = defineProps<TooltipContentProps>()\nconst emits = defineEmits<TooltipContentEmits>()\n\nconst rootContext = injectTooltipRootContext()\nconst forwarded = useForwardPropsEmits(props, emits)\nconst { forwardRef } = useForwardExpose()\n</script>\n\n<template>\n  <Presence :present=\"forceMount || rootContext.open.value\">\n    <component\n      :is=\"rootContext.disableHoverableContent.value ? TooltipContentImpl : TooltipContentHoverable\"\n      :ref=\"forwardRef\"\n      v-bind=\"forwarded\"\n    >\n      <slot />\n    </component>\n  </Presence>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface TooltipPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<TooltipPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport type { TeleportProps } from '@/Teleport'\n\nexport interface TooltipPortalProps extends TeleportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { TeleportPrimitive } from '@/Teleport'\n\nconst props = defineProps<TooltipPortalProps>()\n</script>\n\n<template>\n  <TeleportPrimitive v-bind=\"props\">\n    <slot />\n  </TeleportPrimitive>\n</template>\n","<script lang=\"ts\">\nimport { useForwardExpose, useId } from '@/shared'\n\nexport type TooltipTriggerDataState\n  = | 'closed'\n    | 'delayed-open'\n    | 'instant-open'\n\nexport interface TooltipTriggerProps extends PopperAnchorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { PopperAnchorProps } from '@/Popper'\nimport { computed, onMounted, ref } from 'vue'\nimport { PopperAnchor } from '@/Popper'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { injectTooltipProviderContext } from './TooltipProvider.vue'\nimport { injectTooltipRootContext } from './TooltipRoot.vue'\n\nconst props = withDefaults(defineProps<TooltipTriggerProps>(), {\n  as: 'button',\n})\nconst rootContext = injectTooltipRootContext()\nconst providerContext = injectTooltipProviderContext()\n\nrootContext.contentId ||= useId(undefined, 'reka-tooltip-content')\n\nconst { forwardRef, currentElement: triggerElement } = useForwardExpose()\n\nconst isPointerDown = ref(false)\nconst hasPointerMoveOpened = ref(false)\n\nconst tooltipListeners = computed(() => {\n  if (rootContext.disabled.value)\n    return {}\n\n  return {\n    click: handleClick,\n    focus: handleFocus,\n    pointermove: handlePointerMove,\n    pointerleave: handlePointerLeave,\n    pointerdown: handlePointerDown,\n    blur: handleBlur,\n  }\n})\n\nonMounted(() => {\n  rootContext.onTriggerChange(triggerElement.value)\n})\n\nfunction handlePointerUp() {\n  setTimeout(() => {\n    isPointerDown.value = false\n  }, 1)\n}\n\nfunction handlePointerDown() {\n  if (rootContext.open && !rootContext.disableClosingTrigger.value) {\n    rootContext.onClose()\n  }\n  isPointerDown.value = true\n  document.addEventListener('pointerup', handlePointerUp, { once: true })\n}\n\nfunction handlePointerMove(event: PointerEvent) {\n  if (event.pointerType === 'touch')\n    return\n  if (\n    !hasPointerMoveOpened.value && !providerContext.isPointerInTransitRef.value\n  ) {\n    rootContext.onTriggerEnter()\n    hasPointerMoveOpened.value = true\n  }\n}\n\nfunction handlePointerLeave() {\n  rootContext.onTriggerLeave()\n  hasPointerMoveOpened.value = false\n}\n\nfunction handleFocus(event: FocusEvent) {\n  if (isPointerDown.value)\n    return\n\n  if (rootContext.ignoreNonKeyboardFocus.value && !(event.target as HTMLElement).matches?.(':focus-visible'))\n    return\n\n  rootContext.onOpen()\n}\n\nfunction handleBlur() {\n  rootContext.onClose()\n}\n\nfunction handleClick() {\n  if (!rootContext.disableClosingTrigger.value)\n    rootContext.onClose()\n}\n</script>\n\n<template>\n  <PopperAnchor\n    as-child\n    :reference=\"reference\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :aria-describedby=\"\n        rootContext.open.value ? rootContext.contentId : undefined\n      \"\n      :data-state=\"rootContext.stateAttribute.value\"\n      :as=\"as\"\n      :as-child=\"props.asChild\"\n      data-grace-area-trigger\n      v-on=\"tooltipListeners\"\n    >\n      <slot />\n    </Primitive>\n  </PopperAnchor>\n</template>\n","<script lang=\"ts\">\nimport { useForwardExpose, useId } from '@/shared'\n\nexport type TooltipTriggerDataState\n  = | 'closed'\n    | 'delayed-open'\n    | 'instant-open'\n\nexport interface TooltipTriggerProps extends PopperAnchorProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { PopperAnchorProps } from '@/Popper'\nimport { computed, onMounted, ref } from 'vue'\nimport { PopperAnchor } from '@/Popper'\nimport {\n  Primitive,\n} from '@/Primitive'\nimport { injectTooltipProviderContext } from './TooltipProvider.vue'\nimport { injectTooltipRootContext } from './TooltipRoot.vue'\n\nconst props = withDefaults(defineProps<TooltipTriggerProps>(), {\n  as: 'button',\n})\nconst rootContext = injectTooltipRootContext()\nconst providerContext = injectTooltipProviderContext()\n\nrootContext.contentId ||= useId(undefined, 'reka-tooltip-content')\n\nconst { forwardRef, currentElement: triggerElement } = useForwardExpose()\n\nconst isPointerDown = ref(false)\nconst hasPointerMoveOpened = ref(false)\n\nconst tooltipListeners = computed(() => {\n  if (rootContext.disabled.value)\n    return {}\n\n  return {\n    click: handleClick,\n    focus: handleFocus,\n    pointermove: handlePointerMove,\n    pointerleave: handlePointerLeave,\n    pointerdown: handlePointerDown,\n    blur: handleBlur,\n  }\n})\n\nonMounted(() => {\n  rootContext.onTriggerChange(triggerElement.value)\n})\n\nfunction handlePointerUp() {\n  setTimeout(() => {\n    isPointerDown.value = false\n  }, 1)\n}\n\nfunction handlePointerDown() {\n  if (rootContext.open && !rootContext.disableClosingTrigger.value) {\n    rootContext.onClose()\n  }\n  isPointerDown.value = true\n  document.addEventListener('pointerup', handlePointerUp, { once: true })\n}\n\nfunction handlePointerMove(event: PointerEvent) {\n  if (event.pointerType === 'touch')\n    return\n  if (\n    !hasPointerMoveOpened.value && !providerContext.isPointerInTransitRef.value\n  ) {\n    rootContext.onTriggerEnter()\n    hasPointerMoveOpened.value = true\n  }\n}\n\nfunction handlePointerLeave() {\n  rootContext.onTriggerLeave()\n  hasPointerMoveOpened.value = false\n}\n\nfunction handleFocus(event: FocusEvent) {\n  if (isPointerDown.value)\n    return\n\n  if (rootContext.ignoreNonKeyboardFocus.value && !(event.target as HTMLElement).matches?.(':focus-visible'))\n    return\n\n  rootContext.onOpen()\n}\n\nfunction handleBlur() {\n  rootContext.onClose()\n}\n\nfunction handleClick() {\n  if (!rootContext.disableClosingTrigger.value)\n    rootContext.onClose()\n}\n</script>\n\n<template>\n  <PopperAnchor\n    as-child\n    :reference=\"reference\"\n  >\n    <Primitive\n      :ref=\"forwardRef\"\n      :aria-describedby=\"\n        rootContext.open.value ? rootContext.contentId : undefined\n      \"\n      :data-state=\"rootContext.stateAttribute.value\"\n      :as=\"as\"\n      :as-child=\"props.asChild\"\n      data-grace-area-trigger\n      v-on=\"tooltipListeners\"\n    >\n      <slot />\n    </Primitive>\n  </PopperAnchor>\n</template>\n","export function flatten<U, T extends { children: any[] }>(items: T[]): U[] {\n  return items.reduce((acc: any[], item: T) => {\n    acc.push(item)\n\n    if (item.children)\n      acc.push(...flatten(item.children))\n\n    return acc\n  }, [])\n}\n\n// TODO: expose more utility function to handle flattened item\n","<script lang=\"ts\">\nimport type { Direction } from '@/shared/types'\nimport { createContext, getActiveElement, useDirection, useSelectionBehavior, useTypeahead } from '@/shared'\nimport { flatten } from './utils'\n\nexport interface TreeRootProps<T = Record<string, any>, U extends Record<string, any> = Record<string, any>, M extends boolean = false> extends PrimitiveProps {\n  /** The controlled value of the tree. Can be binded with `v-model`. */\n  modelValue?: M extends true ? U[] : U\n  /** The value of the tree when initially rendered. Use when you do not need to control the state of the tree */\n  defaultValue?: M extends true ? U[] : U\n  /** List of items */\n  items?: T[]\n  /** The controlled value of the expanded item. Can be binded with `v-model`. */\n  expanded?: string[]\n  /** The value of the expanded tree when initially rendered. Use when you do not need to control the state of the expanded tree */\n  defaultExpanded?: string[]\n  /** This function is passed the index of each item and should return a unique key for that item */\n  getKey: (val: T) => string\n  /** This function is passed the index of each item and should return a list of children for that item */\n  getChildren?: (val: T) => T[] | undefined\n  /** How multiple selection should behave in the collection. */\n  selectionBehavior?: 'toggle' | 'replace'\n  /** Whether multiple options can be selected or not.  */\n  multiple?: M | boolean\n  /** The reading direction of the listbox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** When `true`, prevents the user from interacting with tree  */\n  disabled?: boolean\n  /** When `true`, selecting parent will select the descendants. */\n  propagateSelect?: boolean\n  /** When `true`, selecting children will update the parent state. */\n  bubbleSelect?: boolean\n}\n\nexport type TreeRootEmits<T = Record<string, any>, M extends boolean = false> = {\n  'update:modelValue': [val: M extends true ? T[] : T]\n  'update:expanded': [val: string[]]\n}\n\ninterface TreeRootContext<T = Record<string, any>> {\n  modelValue: Ref<T | T[]>\n  selectedKeys: Ref<string[]>\n  onSelect: (val: T) => void\n  expanded: Ref<string[]>\n  onToggle: (val: T) => void\n  items: Ref<T[]>\n  expandedItems: Ref<T[]>\n  getKey: (val: T) => string\n  getChildren: (val: T) => T[] | undefined\n  multiple: Ref<boolean>\n  disabled: Ref<boolean>\n  dir: Ref<Direction>\n  propagateSelect: Ref<boolean>\n  bubbleSelect: Ref<boolean>\n  isVirtual: Ref<boolean>\n  virtualKeydownHook: EventHook<KeyboardEvent>\n\n  handleMultipleReplace: ReturnType<typeof useSelectionBehavior>['handleMultipleReplace']\n}\n\nexport type FlattenedItem<T> = {\n  _id: string\n  index: number\n  value: T\n  level: number\n  hasChildren: boolean\n  parentItem?: T\n  bind: {\n    value: T\n    level: number\n    [key: string]: any\n  }\n}\n\nexport const [injectTreeRootContext, provideTreeRootContext] = createContext<TreeRootContext<any>>('TreeRoot')\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends Record<string, any>, U extends Record<string, any>, M extends boolean = false\">\nimport type { EventHook } from '@vueuse/core'\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createEventHook, useVModel } from '@vueuse/core'\nimport { computed, nextTick, ref, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusGroup } from '@/RovingFocus'\nimport { MAP_KEY_TO_FOCUS_INTENT } from '@/RovingFocus/utils'\n\nconst props = withDefaults(defineProps<TreeRootProps<T, U, M>>(), {\n  as: 'ul',\n  selectionBehavior: 'toggle',\n  getChildren: (val: T) => val.children,\n})\nconst emits = defineEmits<TreeRootEmits<U, M>>()\n\ndefineSlots<{\n  default?: (props: {\n    flattenItems: FlattenedItem<T>[]\n    modelValue: M extends true ? U[] : U\n    expanded: typeof expanded.value\n  }) => any\n}>()\n\nconst { items, multiple, disabled, propagateSelect, dir: propDir, bubbleSelect } = toRefs(props)\nconst { handleTypeaheadSearch } = useTypeahead()\nconst dir = useDirection(propDir)\nconst rovingFocusGroupRef = ref<InstanceType<typeof RovingFocusGroup>>()\n\n// Virtualizer\nconst isVirtual = ref(false)\nconst virtualKeydownHook = createEventHook<KeyboardEvent>()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  // @ts-expect-error idk\n  defaultValue: props.defaultValue ?? (multiple.value ? [] : undefined),\n  passive: true,\n  deep: true,\n}) as Ref<U | U[]>\n\nconst expanded = useVModel(props, 'expanded', emits, {\n  // @ts-expect-error idk\n  defaultValue: props.defaultExpanded ?? [],\n  passive: (props.expanded === undefined) as false,\n  deep: true,\n}) as Ref<string[]>\n\nconst { onSelectItem, handleMultipleReplace } = useSelectionBehavior(modelValue, props)\n\nconst selectedKeys = computed(() => {\n  if (multiple.value && Array.isArray(modelValue.value))\n    return modelValue.value.map(i => props.getKey(i as any))\n  else\n    return [props.getKey(modelValue.value as any ?? {})]\n})\n\nfunction flattenItems(items: T[], level: number = 1, parentItem?: T): FlattenedItem<T>[] {\n  return items.reduce((acc: FlattenedItem<T>[], item: T, index: number) => {\n    const key = props.getKey(item)\n    const children = props.getChildren(item)\n    const isExpanded = expanded.value.includes(key)\n\n    const flattenedItem: FlattenedItem<T> = {\n      _id: key,\n      value: item,\n      index,\n      level,\n      parentItem,\n      hasChildren: !!children,\n      bind: {\n        'value': item,\n        level,\n        'aria-setsize': items.length,\n        'aria-posinset': index + 1,\n      },\n    }\n    acc.push(flattenedItem)\n\n    if (children && isExpanded)\n      acc.push(...flattenItems(children, level + 1, item))\n\n    return acc\n  }, [])\n}\n\nconst expandedItems = computed(() => {\n  const items = props.items\n  const expandedKeys = expanded.value.map(i => i)\n  return flattenItems(items ?? [])\n})\n\nfunction handleKeydown(event: KeyboardEvent) {\n  if (isVirtual.value) {\n    virtualKeydownHook.trigger(event)\n  }\n  else {\n    const collections = rovingFocusGroupRef.value?.getItems() ?? []\n    handleTypeaheadSearch(event.key, collections)\n  }\n}\n\nfunction handleKeydownNavigation(event: KeyboardEvent) {\n  if (isVirtual.value)\n    return\n\n  const intent = MAP_KEY_TO_FOCUS_INTENT[event.key]\n  nextTick(() => {\n    handleMultipleReplace(\n      intent,\n      getActiveElement(),\n      rovingFocusGroupRef.value?.getItems!,\n      expandedItems.value.map(i => i.value),\n    )\n  })\n}\n\nfunction handleBubbleSelect(item: FlattenedItem<T>) {\n  if (item.parentItem != null && Array.isArray(modelValue.value) && props.multiple) {\n    const parentItem = expandedItems.value.find((i) => {\n      return item.parentItem != null && props.getKey(i.value) === props.getKey(item.parentItem)\n    })\n\n    if (parentItem != null) {\n      const areAllChilredOfParentSelected = props.getChildren(parentItem.value)?.every(i => modelValue.value.find((v: any) => props.getKey(v) === props.getKey(i)))\n\n      if (areAllChilredOfParentSelected) {\n        modelValue.value = [...modelValue.value, parentItem.value as any]\n      }\n      else {\n        modelValue.value = modelValue.value.filter((v: any) => props.getKey(v) !== props.getKey(parentItem.value))\n      }\n\n      handleBubbleSelect(parentItem)\n    }\n  }\n}\n\nprovideTreeRootContext({\n  modelValue,\n  selectedKeys,\n  onSelect: (val) => {\n    const condition = (baseValue: U) => props.getKey(baseValue as any ?? {}) === props.getKey(val)\n    const exist = props.multiple && Array.isArray(modelValue.value) ? modelValue.value?.findIndex(condition) !== -1 : undefined\n    onSelectItem(val, condition)\n\n    if (props.bubbleSelect && props.multiple && Array.isArray(modelValue.value)) {\n      const item = expandedItems.value.find((i) => {\n        return props.getKey(i.value) === props.getKey(val)\n      })\n      if (item != null) {\n        handleBubbleSelect(item)\n      }\n    }\n\n    if (props.propagateSelect && props.multiple && Array.isArray(modelValue.value)) {\n      const children = flatten<U, any>(props.getChildren(val) ?? [])\n\n      if (exist) {\n        // remove all child\n        modelValue.value = [...modelValue.value]\n          .filter(i => !children.some(child => props.getKey(i as any ?? {}) === props.getKey(child as any)))\n      }\n      else {\n        // select all child\n        modelValue.value = [...modelValue.value, ...children]\n      }\n    }\n  },\n  expanded,\n  onToggle(val) {\n    const children = val ? props.getChildren(val) : undefined\n    if (!children)\n      return\n\n    const key = props.getKey(val) ?? val\n    if (expanded.value.includes(key))\n      expanded.value = expanded.value.filter(val => val !== key)\n    else\n      expanded.value = [...expanded.value, key]\n  },\n  getKey: props.getKey,\n  getChildren: props.getChildren,\n  items,\n  expandedItems,\n  disabled,\n  multiple,\n  dir,\n  propagateSelect,\n  bubbleSelect,\n\n  isVirtual,\n  virtualKeydownHook,\n  handleMultipleReplace,\n})\n</script>\n\n<template>\n  <RovingFocusGroup\n    ref=\"rovingFocusGroupRef\"\n    as-child\n    orientation=\"vertical\"\n    :dir=\"dir\"\n  >\n    <Primitive\n      role=\"tree\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :aria-multiselectable=\"multiple ? true : undefined\"\n      @keydown=\"handleKeydown\"\n      @keydown.up.down.shift=\"handleKeydownNavigation\"\n    >\n      <slot\n        :flatten-items=\"expandedItems\"\n        :model-value=\"modelValue as M extends true ? U[] : U\"\n        :expanded=\"expanded\"\n      />\n    </Primitive>\n  </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\nimport type { Direction } from '@/shared/types'\nimport { createContext, getActiveElement, useDirection, useSelectionBehavior, useTypeahead } from '@/shared'\nimport { flatten } from './utils'\n\nexport interface TreeRootProps<T = Record<string, any>, U extends Record<string, any> = Record<string, any>, M extends boolean = false> extends PrimitiveProps {\n  /** The controlled value of the tree. Can be binded with `v-model`. */\n  modelValue?: M extends true ? U[] : U\n  /** The value of the tree when initially rendered. Use when you do not need to control the state of the tree */\n  defaultValue?: M extends true ? U[] : U\n  /** List of items */\n  items?: T[]\n  /** The controlled value of the expanded item. Can be binded with `v-model`. */\n  expanded?: string[]\n  /** The value of the expanded tree when initially rendered. Use when you do not need to control the state of the expanded tree */\n  defaultExpanded?: string[]\n  /** This function is passed the index of each item and should return a unique key for that item */\n  getKey: (val: T) => string\n  /** This function is passed the index of each item and should return a list of children for that item */\n  getChildren?: (val: T) => T[] | undefined\n  /** How multiple selection should behave in the collection. */\n  selectionBehavior?: 'toggle' | 'replace'\n  /** Whether multiple options can be selected or not.  */\n  multiple?: M | boolean\n  /** The reading direction of the listbox when applicable. <br> If omitted, inherits globally from `ConfigProvider` or assumes LTR (left-to-right) reading mode. */\n  dir?: Direction\n  /** When `true`, prevents the user from interacting with tree  */\n  disabled?: boolean\n  /** When `true`, selecting parent will select the descendants. */\n  propagateSelect?: boolean\n  /** When `true`, selecting children will update the parent state. */\n  bubbleSelect?: boolean\n}\n\nexport type TreeRootEmits<T = Record<string, any>, M extends boolean = false> = {\n  'update:modelValue': [val: M extends true ? T[] : T]\n  'update:expanded': [val: string[]]\n}\n\ninterface TreeRootContext<T = Record<string, any>> {\n  modelValue: Ref<T | T[]>\n  selectedKeys: Ref<string[]>\n  onSelect: (val: T) => void\n  expanded: Ref<string[]>\n  onToggle: (val: T) => void\n  items: Ref<T[]>\n  expandedItems: Ref<T[]>\n  getKey: (val: T) => string\n  getChildren: (val: T) => T[] | undefined\n  multiple: Ref<boolean>\n  disabled: Ref<boolean>\n  dir: Ref<Direction>\n  propagateSelect: Ref<boolean>\n  bubbleSelect: Ref<boolean>\n  isVirtual: Ref<boolean>\n  virtualKeydownHook: EventHook<KeyboardEvent>\n\n  handleMultipleReplace: ReturnType<typeof useSelectionBehavior>['handleMultipleReplace']\n}\n\nexport type FlattenedItem<T> = {\n  _id: string\n  index: number\n  value: T\n  level: number\n  hasChildren: boolean\n  parentItem?: T\n  bind: {\n    value: T\n    level: number\n    [key: string]: any\n  }\n}\n\nexport const [injectTreeRootContext, provideTreeRootContext] = createContext<TreeRootContext<any>>('TreeRoot')\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends Record<string, any>, U extends Record<string, any>, M extends boolean = false\">\nimport type { EventHook } from '@vueuse/core'\nimport type { Ref } from 'vue'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { createEventHook, useVModel } from '@vueuse/core'\nimport { computed, nextTick, ref, toRefs } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusGroup } from '@/RovingFocus'\nimport { MAP_KEY_TO_FOCUS_INTENT } from '@/RovingFocus/utils'\n\nconst props = withDefaults(defineProps<TreeRootProps<T, U, M>>(), {\n  as: 'ul',\n  selectionBehavior: 'toggle',\n  getChildren: (val: T) => val.children,\n})\nconst emits = defineEmits<TreeRootEmits<U, M>>()\n\ndefineSlots<{\n  default?: (props: {\n    flattenItems: FlattenedItem<T>[]\n    modelValue: M extends true ? U[] : U\n    expanded: typeof expanded.value\n  }) => any\n}>()\n\nconst { items, multiple, disabled, propagateSelect, dir: propDir, bubbleSelect } = toRefs(props)\nconst { handleTypeaheadSearch } = useTypeahead()\nconst dir = useDirection(propDir)\nconst rovingFocusGroupRef = ref<InstanceType<typeof RovingFocusGroup>>()\n\n// Virtualizer\nconst isVirtual = ref(false)\nconst virtualKeydownHook = createEventHook<KeyboardEvent>()\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  // @ts-expect-error idk\n  defaultValue: props.defaultValue ?? (multiple.value ? [] : undefined),\n  passive: true,\n  deep: true,\n}) as Ref<U | U[]>\n\nconst expanded = useVModel(props, 'expanded', emits, {\n  // @ts-expect-error idk\n  defaultValue: props.defaultExpanded ?? [],\n  passive: (props.expanded === undefined) as false,\n  deep: true,\n}) as Ref<string[]>\n\nconst { onSelectItem, handleMultipleReplace } = useSelectionBehavior(modelValue, props)\n\nconst selectedKeys = computed(() => {\n  if (multiple.value && Array.isArray(modelValue.value))\n    return modelValue.value.map(i => props.getKey(i as any))\n  else\n    return [props.getKey(modelValue.value as any ?? {})]\n})\n\nfunction flattenItems(items: T[], level: number = 1, parentItem?: T): FlattenedItem<T>[] {\n  return items.reduce((acc: FlattenedItem<T>[], item: T, index: number) => {\n    const key = props.getKey(item)\n    const children = props.getChildren(item)\n    const isExpanded = expanded.value.includes(key)\n\n    const flattenedItem: FlattenedItem<T> = {\n      _id: key,\n      value: item,\n      index,\n      level,\n      parentItem,\n      hasChildren: !!children,\n      bind: {\n        'value': item,\n        level,\n        'aria-setsize': items.length,\n        'aria-posinset': index + 1,\n      },\n    }\n    acc.push(flattenedItem)\n\n    if (children && isExpanded)\n      acc.push(...flattenItems(children, level + 1, item))\n\n    return acc\n  }, [])\n}\n\nconst expandedItems = computed(() => {\n  const items = props.items\n  const expandedKeys = expanded.value.map(i => i)\n  return flattenItems(items ?? [])\n})\n\nfunction handleKeydown(event: KeyboardEvent) {\n  if (isVirtual.value) {\n    virtualKeydownHook.trigger(event)\n  }\n  else {\n    const collections = rovingFocusGroupRef.value?.getItems() ?? []\n    handleTypeaheadSearch(event.key, collections)\n  }\n}\n\nfunction handleKeydownNavigation(event: KeyboardEvent) {\n  if (isVirtual.value)\n    return\n\n  const intent = MAP_KEY_TO_FOCUS_INTENT[event.key]\n  nextTick(() => {\n    handleMultipleReplace(\n      intent,\n      getActiveElement(),\n      rovingFocusGroupRef.value?.getItems!,\n      expandedItems.value.map(i => i.value),\n    )\n  })\n}\n\nfunction handleBubbleSelect(item: FlattenedItem<T>) {\n  if (item.parentItem != null && Array.isArray(modelValue.value) && props.multiple) {\n    const parentItem = expandedItems.value.find((i) => {\n      return item.parentItem != null && props.getKey(i.value) === props.getKey(item.parentItem)\n    })\n\n    if (parentItem != null) {\n      const areAllChilredOfParentSelected = props.getChildren(parentItem.value)?.every(i => modelValue.value.find((v: any) => props.getKey(v) === props.getKey(i)))\n\n      if (areAllChilredOfParentSelected) {\n        modelValue.value = [...modelValue.value, parentItem.value as any]\n      }\n      else {\n        modelValue.value = modelValue.value.filter((v: any) => props.getKey(v) !== props.getKey(parentItem.value))\n      }\n\n      handleBubbleSelect(parentItem)\n    }\n  }\n}\n\nprovideTreeRootContext({\n  modelValue,\n  selectedKeys,\n  onSelect: (val) => {\n    const condition = (baseValue: U) => props.getKey(baseValue as any ?? {}) === props.getKey(val)\n    const exist = props.multiple && Array.isArray(modelValue.value) ? modelValue.value?.findIndex(condition) !== -1 : undefined\n    onSelectItem(val, condition)\n\n    if (props.bubbleSelect && props.multiple && Array.isArray(modelValue.value)) {\n      const item = expandedItems.value.find((i) => {\n        return props.getKey(i.value) === props.getKey(val)\n      })\n      if (item != null) {\n        handleBubbleSelect(item)\n      }\n    }\n\n    if (props.propagateSelect && props.multiple && Array.isArray(modelValue.value)) {\n      const children = flatten<U, any>(props.getChildren(val) ?? [])\n\n      if (exist) {\n        // remove all child\n        modelValue.value = [...modelValue.value]\n          .filter(i => !children.some(child => props.getKey(i as any ?? {}) === props.getKey(child as any)))\n      }\n      else {\n        // select all child\n        modelValue.value = [...modelValue.value, ...children]\n      }\n    }\n  },\n  expanded,\n  onToggle(val) {\n    const children = val ? props.getChildren(val) : undefined\n    if (!children)\n      return\n\n    const key = props.getKey(val) ?? val\n    if (expanded.value.includes(key))\n      expanded.value = expanded.value.filter(val => val !== key)\n    else\n      expanded.value = [...expanded.value, key]\n  },\n  getKey: props.getKey,\n  getChildren: props.getChildren,\n  items,\n  expandedItems,\n  disabled,\n  multiple,\n  dir,\n  propagateSelect,\n  bubbleSelect,\n\n  isVirtual,\n  virtualKeydownHook,\n  handleMultipleReplace,\n})\n</script>\n\n<template>\n  <RovingFocusGroup\n    ref=\"rovingFocusGroupRef\"\n    as-child\n    orientation=\"vertical\"\n    :dir=\"dir\"\n  >\n    <Primitive\n      role=\"tree\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :aria-multiselectable=\"multiple ? true : undefined\"\n      @keydown=\"handleKeydown\"\n      @keydown.up.down.shift=\"handleKeydownNavigation\"\n    >\n      <slot\n        :flatten-items=\"expandedItems\"\n        :model-value=\"modelValue as M extends true ? U[] : U\"\n        :expanded=\"expanded\"\n      />\n    </Primitive>\n  </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\nexport interface TreeItemProps<T> extends PrimitiveProps {\n  /** Value given to this item */\n  value: T\n  /** Level of depth */\n  level: number\n}\n\nexport type SelectEvent<T> = CustomEvent<{ originalEvent: PointerEvent | KeyboardEvent, value?: T, isExpanded: boolean, isSelected: boolean }>\nexport type ToggleEvent<T> = CustomEvent<{ originalEvent: PointerEvent | KeyboardEvent, value?: T, isExpanded: boolean, isSelected: boolean }>\n\nexport type TreeItemEmits<T> = {\n  /** Event handler called when the selecting item. <br> It can be prevented by calling `event.preventDefault`. */\n  select: [event: SelectEvent<T>]\n  /** Event handler called when the selecting item. <br> It can be prevented by calling `event.preventDefault`. */\n  toggle: [event: ToggleEvent<T>]\n}\n\nconst TREE_SELECT = 'tree.select'\nconst TREE_TOGGLE = 'tree.toggle'\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends Record<string, any>\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusItem } from '@/RovingFocus'\nimport { getActiveElement, handleAndDispatchCustomEvent } from '@/shared'\nimport { injectTreeRootContext } from './TreeRoot.vue'\nimport { flatten } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<TreeItemProps<T>>(), {\n  as: 'li',\n})\n\nconst emits = defineEmits<TreeItemEmits<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    isExpanded: boolean\n    isSelected: boolean\n    isIndeterminate: boolean | undefined\n    handleToggle: () => void\n    handleSelect: () => void\n  }) => any\n}>()\nconst rootContext = injectTreeRootContext()\nconst { getItems } = useCollection()\n\nconst hasChildren = computed(() => !!rootContext.getChildren(props.value))\n\nconst isExpanded = computed(() => {\n  const key = rootContext.getKey(props.value)\n  return rootContext.expanded.value.includes(key)\n})\n\nconst isSelected = computed(() => {\n  const key = rootContext.getKey(props.value)\n  return rootContext.selectedKeys.value.includes(key)\n})\n\nconst isIndeterminate = computed(() => {\n  if (rootContext.bubbleSelect.value && hasChildren.value && Array.isArray(rootContext.modelValue.value)) {\n    const children = flatten<T, any>(rootContext.getChildren(props.value) || [])\n\n    return children.some(child => rootContext.modelValue.value.find((v: any) => rootContext.getKey(v) === rootContext.getKey(child)))\n      && !children.every(child => rootContext.modelValue.value.find((v: any) => rootContext.getKey(v) === rootContext.getKey(child)))\n  }\n  else if (rootContext.propagateSelect.value && isSelected.value && hasChildren.value && Array.isArray(rootContext.modelValue.value)) {\n    const children = flatten<T, any>(rootContext.getChildren(props.value) || [])\n\n    return !children.every(child => rootContext.modelValue.value.find((v: any) => rootContext.getKey(v) === rootContext.getKey(child)))\n  }\n  else {\n    return undefined\n  }\n})\n\nfunction handleKeydownRight(ev: KeyboardEvent) {\n  if (!hasChildren.value)\n    return\n\n  if (isExpanded.value) {\n    // go to first child\n    const collection = getItems().map(i => i.ref)\n    const currentElement = getActiveElement() as HTMLElement\n    const currentIndex = collection.indexOf(currentElement)\n    const list = [...collection].slice(currentIndex)\n    const nextElement = list.find(el => Number(el.getAttribute('data-indent')) === (props.level + 1))\n\n    if (nextElement)\n      nextElement.focus()\n  }\n  else {\n    //  open expanded\n    handleToggleCustomEvent(ev)\n  }\n}\n\nfunction handleKeydownLeft(ev: KeyboardEvent) {\n  if (isExpanded.value) {\n    //  close expanded\n    handleToggleCustomEvent(ev)\n  }\n  else {\n    // go back to parent\n    const collection = getItems().map(i => i.ref)\n    const currentElement = getActiveElement() as HTMLElement\n    const currentIndex = collection.indexOf(currentElement)\n    const list = [...collection].slice(0, currentIndex).reverse()\n    const parentElement = list.find(el => Number(el.getAttribute('data-indent')) === (props.level - 1))\n\n    if (parentElement)\n      parentElement.focus()\n  }\n}\n\nasync function handleSelect(ev: SelectEvent<T>) {\n  emits('select', ev)\n  if (ev?.defaultPrevented)\n    return\n\n  rootContext.onSelect(props.value)\n}\nasync function handleToggle(ev: ToggleEvent<T>) {\n  emits('toggle', ev)\n  if (ev?.defaultPrevented)\n    return\n\n  rootContext.onToggle(props.value)\n}\n\nasync function handleSelectCustomEvent(ev?: PointerEvent | KeyboardEvent) {\n  if (!ev)\n    return\n\n  const eventDetail = { originalEvent: ev, value: props.value, isExpanded: isExpanded.value, isSelected: isSelected.value }\n  handleAndDispatchCustomEvent(TREE_SELECT, handleSelect, eventDetail)\n}\n\nasync function handleToggleCustomEvent(ev?: PointerEvent | KeyboardEvent) {\n  if (!ev)\n    return\n\n  const eventDetail = { originalEvent: ev, value: props.value, isExpanded: isExpanded.value, isSelected: isSelected.value }\n  handleAndDispatchCustomEvent(TREE_TOGGLE, handleToggle, eventDetail)\n}\n\ndefineExpose({\n  isExpanded,\n  isSelected,\n  isIndeterminate,\n  handleToggle: () => rootContext.onToggle(props.value),\n  handleSelect: () => rootContext.onSelect(props.value),\n})\n</script>\n\n<template>\n  <RovingFocusItem\n    as-child\n    :value=\"value\"\n    allow-shift-key\n  >\n    <Primitive\n      v-bind=\"$attrs\"\n      role=\"treeitem\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :aria-selected=\"isSelected\"\n      :aria-expanded=\"hasChildren ? isExpanded : undefined\"\n      :aria-level=\"level\"\n      :data-indent=\"level\"\n      :data-selected=\"isSelected ? '' : undefined\"\n      :data-expanded=\"isExpanded ? '' : undefined\"\n      @keydown.enter.space.self.prevent=\"handleSelectCustomEvent\"\n      @keydown.right.prevent=\"(ev: KeyboardEvent) => rootContext.dir.value === 'ltr' ? handleKeydownRight(ev) : handleKeydownLeft(ev)\"\n      @keydown.left.prevent=\"(ev: KeyboardEvent) => rootContext.dir.value === 'ltr' ? handleKeydownLeft(ev) : handleKeydownRight(ev)\"\n      @click.stop=\"(ev: PointerEvent) => {\n        handleSelectCustomEvent(ev)\n        handleToggleCustomEvent(ev)\n      }\"\n    >\n      <slot\n        :is-expanded=\"isExpanded\"\n        :is-selected=\"isSelected\"\n        :is-indeterminate=\"isIndeterminate\"\n        :handle-select=\"() => rootContext.onSelect(value)\"\n        :handle-toggle=\"() => rootContext.onToggle(value)\"\n      />\n    </Primitive>\n  </RovingFocusItem>\n</template>\n","<script lang=\"ts\">\nexport interface TreeItemProps<T> extends PrimitiveProps {\n  /** Value given to this item */\n  value: T\n  /** Level of depth */\n  level: number\n}\n\nexport type SelectEvent<T> = CustomEvent<{ originalEvent: PointerEvent | KeyboardEvent, value?: T, isExpanded: boolean, isSelected: boolean }>\nexport type ToggleEvent<T> = CustomEvent<{ originalEvent: PointerEvent | KeyboardEvent, value?: T, isExpanded: boolean, isSelected: boolean }>\n\nexport type TreeItemEmits<T> = {\n  /** Event handler called when the selecting item. <br> It can be prevented by calling `event.preventDefault`. */\n  select: [event: SelectEvent<T>]\n  /** Event handler called when the selecting item. <br> It can be prevented by calling `event.preventDefault`. */\n  toggle: [event: ToggleEvent<T>]\n}\n\nconst TREE_SELECT = 'tree.select'\nconst TREE_TOGGLE = 'tree.toggle'\n</script>\n\n<script setup lang=\"ts\" generic=\"T extends Record<string, any>\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { computed } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { Primitive } from '@/Primitive'\nimport { RovingFocusItem } from '@/RovingFocus'\nimport { getActiveElement, handleAndDispatchCustomEvent } from '@/shared'\nimport { injectTreeRootContext } from './TreeRoot.vue'\nimport { flatten } from './utils'\n\ndefineOptions({\n  inheritAttrs: false,\n})\n\nconst props = withDefaults(defineProps<TreeItemProps<T>>(), {\n  as: 'li',\n})\n\nconst emits = defineEmits<TreeItemEmits<T>>()\n\ndefineSlots<{\n  default?: (props: {\n    isExpanded: boolean\n    isSelected: boolean\n    isIndeterminate: boolean | undefined\n    handleToggle: () => void\n    handleSelect: () => void\n  }) => any\n}>()\nconst rootContext = injectTreeRootContext()\nconst { getItems } = useCollection()\n\nconst hasChildren = computed(() => !!rootContext.getChildren(props.value))\n\nconst isExpanded = computed(() => {\n  const key = rootContext.getKey(props.value)\n  return rootContext.expanded.value.includes(key)\n})\n\nconst isSelected = computed(() => {\n  const key = rootContext.getKey(props.value)\n  return rootContext.selectedKeys.value.includes(key)\n})\n\nconst isIndeterminate = computed(() => {\n  if (rootContext.bubbleSelect.value && hasChildren.value && Array.isArray(rootContext.modelValue.value)) {\n    const children = flatten<T, any>(rootContext.getChildren(props.value) || [])\n\n    return children.some(child => rootContext.modelValue.value.find((v: any) => rootContext.getKey(v) === rootContext.getKey(child)))\n      && !children.every(child => rootContext.modelValue.value.find((v: any) => rootContext.getKey(v) === rootContext.getKey(child)))\n  }\n  else if (rootContext.propagateSelect.value && isSelected.value && hasChildren.value && Array.isArray(rootContext.modelValue.value)) {\n    const children = flatten<T, any>(rootContext.getChildren(props.value) || [])\n\n    return !children.every(child => rootContext.modelValue.value.find((v: any) => rootContext.getKey(v) === rootContext.getKey(child)))\n  }\n  else {\n    return undefined\n  }\n})\n\nfunction handleKeydownRight(ev: KeyboardEvent) {\n  if (!hasChildren.value)\n    return\n\n  if (isExpanded.value) {\n    // go to first child\n    const collection = getItems().map(i => i.ref)\n    const currentElement = getActiveElement() as HTMLElement\n    const currentIndex = collection.indexOf(currentElement)\n    const list = [...collection].slice(currentIndex)\n    const nextElement = list.find(el => Number(el.getAttribute('data-indent')) === (props.level + 1))\n\n    if (nextElement)\n      nextElement.focus()\n  }\n  else {\n    //  open expanded\n    handleToggleCustomEvent(ev)\n  }\n}\n\nfunction handleKeydownLeft(ev: KeyboardEvent) {\n  if (isExpanded.value) {\n    //  close expanded\n    handleToggleCustomEvent(ev)\n  }\n  else {\n    // go back to parent\n    const collection = getItems().map(i => i.ref)\n    const currentElement = getActiveElement() as HTMLElement\n    const currentIndex = collection.indexOf(currentElement)\n    const list = [...collection].slice(0, currentIndex).reverse()\n    const parentElement = list.find(el => Number(el.getAttribute('data-indent')) === (props.level - 1))\n\n    if (parentElement)\n      parentElement.focus()\n  }\n}\n\nasync function handleSelect(ev: SelectEvent<T>) {\n  emits('select', ev)\n  if (ev?.defaultPrevented)\n    return\n\n  rootContext.onSelect(props.value)\n}\nasync function handleToggle(ev: ToggleEvent<T>) {\n  emits('toggle', ev)\n  if (ev?.defaultPrevented)\n    return\n\n  rootContext.onToggle(props.value)\n}\n\nasync function handleSelectCustomEvent(ev?: PointerEvent | KeyboardEvent) {\n  if (!ev)\n    return\n\n  const eventDetail = { originalEvent: ev, value: props.value, isExpanded: isExpanded.value, isSelected: isSelected.value }\n  handleAndDispatchCustomEvent(TREE_SELECT, handleSelect, eventDetail)\n}\n\nasync function handleToggleCustomEvent(ev?: PointerEvent | KeyboardEvent) {\n  if (!ev)\n    return\n\n  const eventDetail = { originalEvent: ev, value: props.value, isExpanded: isExpanded.value, isSelected: isSelected.value }\n  handleAndDispatchCustomEvent(TREE_TOGGLE, handleToggle, eventDetail)\n}\n\ndefineExpose({\n  isExpanded,\n  isSelected,\n  isIndeterminate,\n  handleToggle: () => rootContext.onToggle(props.value),\n  handleSelect: () => rootContext.onSelect(props.value),\n})\n</script>\n\n<template>\n  <RovingFocusItem\n    as-child\n    :value=\"value\"\n    allow-shift-key\n  >\n    <Primitive\n      v-bind=\"$attrs\"\n      role=\"treeitem\"\n      :as=\"as\"\n      :as-child=\"asChild\"\n      :aria-selected=\"isSelected\"\n      :aria-expanded=\"hasChildren ? isExpanded : undefined\"\n      :aria-level=\"level\"\n      :data-indent=\"level\"\n      :data-selected=\"isSelected ? '' : undefined\"\n      :data-expanded=\"isExpanded ? '' : undefined\"\n      @keydown.enter.space.self.prevent=\"handleSelectCustomEvent\"\n      @keydown.right.prevent=\"(ev: KeyboardEvent) => rootContext.dir.value === 'ltr' ? handleKeydownRight(ev) : handleKeydownLeft(ev)\"\n      @keydown.left.prevent=\"(ev: KeyboardEvent) => rootContext.dir.value === 'ltr' ? handleKeydownLeft(ev) : handleKeydownRight(ev)\"\n      @click.stop=\"(ev: PointerEvent) => {\n        handleSelectCustomEvent(ev)\n        handleToggleCustomEvent(ev)\n      }\"\n    >\n      <slot\n        :is-expanded=\"isExpanded\"\n        :is-selected=\"isSelected\"\n        :is-indeterminate=\"isIndeterminate\"\n        :handle-select=\"() => rootContext.onSelect(value)\"\n        :handle-toggle=\"() => rootContext.onToggle(value)\"\n      />\n    </Primitive>\n  </RovingFocusItem>\n</template>\n","<script lang=\"ts\">\nexport interface TreeVirtualizerProps {\n  /** Number of items rendered outside the visible area */\n  overscan?: number\n  /** Estimated size (in px) of each item */\n  estimateSize?: number | ((index: number) => number)\n  /** Text content for each item to achieve type-ahead feature */\n  textContent?: (item: Record<string, any>) => string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport type { VirtualItem, Virtualizer } from '@tanstack/vue-virtual'\nimport type { Ref } from 'vue'\nimport type { FlattenedItem } from './TreeRoot.vue'\nimport { useVirtualizer } from '@tanstack/vue-virtual'\nimport { refAutoReset, useParentElement } from '@vueuse/core'\nimport { cloneVNode, computed, nextTick, useSlots } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { MAP_KEY_TO_FOCUS_INTENT } from '@/RovingFocus/utils'\nimport { getActiveElement } from '@/shared'\nimport { getNextMatch } from '@/shared/useTypeahead'\nimport { injectTreeRootContext } from './TreeRoot.vue'\n\nconst props = defineProps<TreeVirtualizerProps>()\n\ndefineSlots<{\n  default?: (props: {\n    item: FlattenedItem<Record<string, any>>\n    virtualizer: Virtualizer<Element | Window, Element>\n    virtualItem: VirtualItem\n  }) => any\n}>()\n\nconst slots = useSlots()\nconst rootContext = injectTreeRootContext()\nconst parentEl = useParentElement() as Ref<HTMLElement>\nconst { getItems } = useCollection()\n\n// Reset `search` 1 second after it was last updated\nconst search = refAutoReset('', 1000)\nconst optionsWithMetadata = computed(() => {\n  const parseTextContent = (option: Record<string, any>) => {\n    if (props.textContent)\n      return props.textContent(option)\n    else\n      return option.toString().toLowerCase()\n  }\n\n  return rootContext.expandedItems.value.map((option, index) => ({\n    index,\n    textContent: parseTextContent(option.value),\n  }))\n})\n\n// set virtual true when this component mounted\nrootContext.isVirtual.value = true\n\nconst padding = computed(() => {\n  const el = parentEl.value\n  if (!el) {\n    return { start: 0, end: 0 }\n  }\n  else {\n    const styles = window.getComputedStyle(el)\n    return {\n      start: Number.parseFloat(styles.paddingBlockStart || styles.paddingTop),\n      end: Number.parseFloat(styles.paddingBlockEnd || styles.paddingBottom),\n    }\n  }\n})\n\nconst virtualizer = useVirtualizer(\n  {\n    get scrollPaddingStart() { return padding.value.start },\n    get scrollPaddingEnd() { return padding.value.end },\n    get count() { return rootContext.expandedItems.value.length ?? 0 },\n    get horizontal() { return false },\n    getItemKey(index) {\n      return index + rootContext.getKey(rootContext.expandedItems.value[index].value)\n    },\n    estimateSize(index) {\n      if (typeof props.estimateSize === 'function')\n        return props.estimateSize(index)\n\n      return props.estimateSize ?? 28\n    },\n    getScrollElement() { return parentEl.value },\n    overscan: props.overscan ?? 12,\n  },\n)\n\nconst virtualizedItems = computed(() => virtualizer.value.getVirtualItems().map((item) => {\n  return {\n    item,\n    is: cloneVNode(slots.default!({\n      item: rootContext.expandedItems.value[item.index],\n      virtualizer: virtualizer.value,\n      virtualItem: item,\n    })![0], {\n      'data-index': item.index,\n      'style': {\n        position: 'absolute',\n        top: 0,\n        left: 0,\n        transform: `translateY(${item.start}px)`,\n        overflowAnchor: 'none',\n      },\n    }),\n  }\n}))\n\nfunction scrollToIndexAndFocus(index: number) {\n  virtualizer.value.scrollToIndex(index, { align: 'start' })\n  requestAnimationFrame(() => {\n    const item = parentEl.value.querySelector(`[data-index=\"${index}\"]`) as HTMLElement\n    if (item instanceof HTMLElement)\n      item.focus()\n  })\n}\n\nrootContext.virtualKeydownHook.on((event) => {\n  const isMetaKey = event.altKey || event.ctrlKey || event.metaKey\n  const isTabKey = event.key === 'Tab' && !isMetaKey\n  if (isTabKey)\n    return\n\n  const intent = MAP_KEY_TO_FOCUS_INTENT[event.key]\n\n  if (['first', 'last'].includes(intent)) {\n    event.preventDefault()\n\n    const index = intent === 'first' ? 0 : rootContext.expandedItems.value.length - 1\n    virtualizer.value.scrollToIndex(index)\n    requestAnimationFrame(() => {\n      const items = getItems()\n      const item = intent === 'first' ? items[0] : items.at(-1)!\n      item.ref.focus()\n    })\n  }\n  else if (intent === 'prev' && event.key !== 'ArrowUp') {\n    const currentElement = getActiveElement() as HTMLElement\n    const currentIndex = Number(currentElement.getAttribute('data-index'))\n    const currentLevel = Number(currentElement.getAttribute('data-indent'))\n    const list = rootContext.expandedItems.value.slice(0, currentIndex).map((item, index) => ({ ...item, index })).reverse()\n\n    const parentItem = list.find(item => item.level === (currentLevel - 1))\n    if (parentItem)\n      scrollToIndexAndFocus(parentItem.index)\n  }\n  else if (!intent && !isMetaKey) {\n    search.value += event.key\n    const currentIndex = Number(getActiveElement()?.getAttribute('data-index'))\n    const currentMatch = optionsWithMetadata.value[currentIndex].textContent\n    const filteredOptions = optionsWithMetadata.value.map(i => i.textContent)\n    const next = getNextMatch(filteredOptions, search.value, currentMatch)\n\n    const nextMatch = optionsWithMetadata.value.find(option => option.textContent === next)\n    if (nextMatch)\n      scrollToIndexAndFocus(nextMatch.index)\n  }\n\n  nextTick(() => {\n    if (event.shiftKey && intent)\n      rootContext.handleMultipleReplace(intent, getActiveElement(), getItems, rootContext.expandedItems.value.map(i => i.value))\n  })\n})\n</script>\n\n<template>\n  <div\n    data-reka-virtualizer\n    :style=\"{\n      position: 'relative',\n      width: '100%',\n      height: `${virtualizer.getTotalSize()}px`,\n    }\"\n  >\n    <component\n      :is=\"is\"\n      v-for=\"{ is, item } in virtualizedItems\"\n      :key=\"item.key\"\n    />\n  </div>\n</template>\n","<script lang=\"ts\">\nexport interface TreeVirtualizerProps {\n  /** Number of items rendered outside the visible area */\n  overscan?: number\n  /** Estimated size (in px) of each item */\n  estimateSize?: number | ((index: number) => number)\n  /** Text content for each item to achieve type-ahead feature */\n  textContent?: (item: Record<string, any>) => string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport type { VirtualItem, Virtualizer } from '@tanstack/vue-virtual'\nimport type { Ref } from 'vue'\nimport type { FlattenedItem } from './TreeRoot.vue'\nimport { useVirtualizer } from '@tanstack/vue-virtual'\nimport { refAutoReset, useParentElement } from '@vueuse/core'\nimport { cloneVNode, computed, nextTick, useSlots } from 'vue'\nimport { useCollection } from '@/Collection'\nimport { MAP_KEY_TO_FOCUS_INTENT } from '@/RovingFocus/utils'\nimport { getActiveElement } from '@/shared'\nimport { getNextMatch } from '@/shared/useTypeahead'\nimport { injectTreeRootContext } from './TreeRoot.vue'\n\nconst props = defineProps<TreeVirtualizerProps>()\n\ndefineSlots<{\n  default?: (props: {\n    item: FlattenedItem<Record<string, any>>\n    virtualizer: Virtualizer<Element | Window, Element>\n    virtualItem: VirtualItem\n  }) => any\n}>()\n\nconst slots = useSlots()\nconst rootContext = injectTreeRootContext()\nconst parentEl = useParentElement() as Ref<HTMLElement>\nconst { getItems } = useCollection()\n\n// Reset `search` 1 second after it was last updated\nconst search = refAutoReset('', 1000)\nconst optionsWithMetadata = computed(() => {\n  const parseTextContent = (option: Record<string, any>) => {\n    if (props.textContent)\n      return props.textContent(option)\n    else\n      return option.toString().toLowerCase()\n  }\n\n  return rootContext.expandedItems.value.map((option, index) => ({\n    index,\n    textContent: parseTextContent(option.value),\n  }))\n})\n\n// set virtual true when this component mounted\nrootContext.isVirtual.value = true\n\nconst padding = computed(() => {\n  const el = parentEl.value\n  if (!el) {\n    return { start: 0, end: 0 }\n  }\n  else {\n    const styles = window.getComputedStyle(el)\n    return {\n      start: Number.parseFloat(styles.paddingBlockStart || styles.paddingTop),\n      end: Number.parseFloat(styles.paddingBlockEnd || styles.paddingBottom),\n    }\n  }\n})\n\nconst virtualizer = useVirtualizer(\n  {\n    get scrollPaddingStart() { return padding.value.start },\n    get scrollPaddingEnd() { return padding.value.end },\n    get count() { return rootContext.expandedItems.value.length ?? 0 },\n    get horizontal() { return false },\n    getItemKey(index) {\n      return index + rootContext.getKey(rootContext.expandedItems.value[index].value)\n    },\n    estimateSize(index) {\n      if (typeof props.estimateSize === 'function')\n        return props.estimateSize(index)\n\n      return props.estimateSize ?? 28\n    },\n    getScrollElement() { return parentEl.value },\n    overscan: props.overscan ?? 12,\n  },\n)\n\nconst virtualizedItems = computed(() => virtualizer.value.getVirtualItems().map((item) => {\n  return {\n    item,\n    is: cloneVNode(slots.default!({\n      item: rootContext.expandedItems.value[item.index],\n      virtualizer: virtualizer.value,\n      virtualItem: item,\n    })![0], {\n      'data-index': item.index,\n      'style': {\n        position: 'absolute',\n        top: 0,\n        left: 0,\n        transform: `translateY(${item.start}px)`,\n        overflowAnchor: 'none',\n      },\n    }),\n  }\n}))\n\nfunction scrollToIndexAndFocus(index: number) {\n  virtualizer.value.scrollToIndex(index, { align: 'start' })\n  requestAnimationFrame(() => {\n    const item = parentEl.value.querySelector(`[data-index=\"${index}\"]`) as HTMLElement\n    if (item instanceof HTMLElement)\n      item.focus()\n  })\n}\n\nrootContext.virtualKeydownHook.on((event) => {\n  const isMetaKey = event.altKey || event.ctrlKey || event.metaKey\n  const isTabKey = event.key === 'Tab' && !isMetaKey\n  if (isTabKey)\n    return\n\n  const intent = MAP_KEY_TO_FOCUS_INTENT[event.key]\n\n  if (['first', 'last'].includes(intent)) {\n    event.preventDefault()\n\n    const index = intent === 'first' ? 0 : rootContext.expandedItems.value.length - 1\n    virtualizer.value.scrollToIndex(index)\n    requestAnimationFrame(() => {\n      const items = getItems()\n      const item = intent === 'first' ? items[0] : items.at(-1)!\n      item.ref.focus()\n    })\n  }\n  else if (intent === 'prev' && event.key !== 'ArrowUp') {\n    const currentElement = getActiveElement() as HTMLElement\n    const currentIndex = Number(currentElement.getAttribute('data-index'))\n    const currentLevel = Number(currentElement.getAttribute('data-indent'))\n    const list = rootContext.expandedItems.value.slice(0, currentIndex).map((item, index) => ({ ...item, index })).reverse()\n\n    const parentItem = list.find(item => item.level === (currentLevel - 1))\n    if (parentItem)\n      scrollToIndexAndFocus(parentItem.index)\n  }\n  else if (!intent && !isMetaKey) {\n    search.value += event.key\n    const currentIndex = Number(getActiveElement()?.getAttribute('data-index'))\n    const currentMatch = optionsWithMetadata.value[currentIndex].textContent\n    const filteredOptions = optionsWithMetadata.value.map(i => i.textContent)\n    const next = getNextMatch(filteredOptions, search.value, currentMatch)\n\n    const nextMatch = optionsWithMetadata.value.find(option => option.textContent === next)\n    if (nextMatch)\n      scrollToIndexAndFocus(nextMatch.index)\n  }\n\n  nextTick(() => {\n    if (event.shiftKey && intent)\n      rootContext.handleMultipleReplace(intent, getActiveElement(), getItems, rootContext.expandedItems.value.map(i => i.value))\n  })\n})\n</script>\n\n<template>\n  <div\n    data-reka-virtualizer\n    :style=\"{\n      position: 'relative',\n      width: '100%',\n      height: `${virtualizer.getTotalSize()}px`,\n    }\"\n  >\n    <component\n      :is=\"is\"\n      v-for=\"{ is, item } in virtualizedItems\"\n      :key=\"item.key\"\n    />\n  </div>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { toRefs } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport { useNonce } from '@/shared/useNonce'\n\nexport interface ViewportProps extends PrimitiveProps {\n  /**\n   * Will add `nonce` attribute to the style tag which can be used by Content Security Policy. <br> If omitted, inherits globally from `ConfigProvider`.\n   */\n  nonce?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<ViewportProps>()\nconst { forwardRef } = useForwardExpose()\n\nconst { nonce: propNonce } = toRefs(props)\nconst nonce = useNonce(propNonce)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"{ ...$attrs, ...props }\"\n    :ref=\"forwardRef\"\n    data-reka-viewport\n    role=\"presentation\"\n    :style=\"{\n      // we use position: 'relative' here on the `viewport` so that when we call\n      // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport\n      // (independent of the scrollUpButton).\n      position: 'relative',\n      flex: 1,\n      overflow: 'auto',\n    }\"\n  >\n    <slot />\n  </Primitive>\n  <Primitive\n    as=\"style\"\n    :nonce=\"nonce\"\n  >\n    /* Hide scrollbars cross-browser and enable momentum scroll for touch\n    devices */ [data-reka-viewport] { scrollbar-width:none; -ms-overflow-style: none;\n    -webkit-overflow-scrolling: touch; }\n    [data-reka-viewport]::-webkit-scrollbar { display: none; }\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\nimport { toRefs } from 'vue'\nimport { useForwardExpose } from '@/shared'\nimport { useNonce } from '@/shared/useNonce'\n\nexport interface ViewportProps extends PrimitiveProps {\n  /**\n   * Will add `nonce` attribute to the style tag which can be used by Content Security Policy. <br> If omitted, inherits globally from `ConfigProvider`.\n   */\n  nonce?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = defineProps<ViewportProps>()\nconst { forwardRef } = useForwardExpose()\n\nconst { nonce: propNonce } = toRefs(props)\nconst nonce = useNonce(propNonce)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"{ ...$attrs, ...props }\"\n    :ref=\"forwardRef\"\n    data-reka-viewport\n    role=\"presentation\"\n    :style=\"{\n      // we use position: 'relative' here on the `viewport` so that when we call\n      // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport\n      // (independent of the scrollUpButton).\n      position: 'relative',\n      flex: 1,\n      overflow: 'auto',\n    }\"\n  >\n    <slot />\n  </Primitive>\n  <Primitive\n    as=\"style\"\n    :nonce=\"nonce\"\n  >\n    /* Hide scrollbars cross-browser and enable momentum scroll for touch\n    devices */ [data-reka-viewport] { scrollbar-width:none; -ms-overflow-style: none;\n    -webkit-overflow-scrolling: touch; }\n    [data-reka-viewport]::-webkit-scrollbar { display: none; }\n  </Primitive>\n</template>\n","import type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Grid, Matcher } from '@/date'\nimport type { DateFormatterOptions } from '@/shared/useDateFormatter'\nimport { endOfYear, startOfYear } from '@internationalized/date'\nimport { computed, ref, watch } from 'vue'\nimport { createYearGrid, isAfter, isBefore, isSameYear, toDate } from '@/date'\nimport { useDateFormatter } from '@/shared'\n\nexport type UseYearPickerProps = {\n  locale: Ref<string>\n  placeholder: Ref<DateValue>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n  disabled: Ref<boolean>\n  yearsPerPage: Ref<number>\n  isYearDisabled?: Matcher | Ref<Matcher | undefined>\n  isYearUnavailable?: Matcher | Ref<Matcher | undefined>\n  calendarLabel: Ref<string | undefined>\n  nextPage: Ref<((placeholder: DateValue) => DateValue) | undefined>\n  prevPage: Ref<((placeholder: DateValue) => DateValue) | undefined>\n}\n\nexport type UseYearPickerStateProps = {\n  isYearDisabled: Matcher\n  isYearUnavailable: Matcher\n  date: Ref<DateValue | DateValue[] | undefined>\n}\n\nexport function useYearPickerState(props: UseYearPickerStateProps) {\n  function isYearSelected(dateObj: DateValue) {\n    if (Array.isArray(props.date.value))\n      return props.date.value.some(d => isSameYear(d, dateObj))\n    else if (!props.date.value)\n      return false\n    else\n      return isSameYear(props.date.value, dateObj)\n  }\n\n  const isInvalid = computed(() => {\n    if (Array.isArray(props.date.value)) {\n      if (!props.date.value.length)\n        return false\n      for (const dateObj of props.date.value) {\n        if (props.isYearDisabled?.(dateObj))\n          return true\n        if (props.isYearUnavailable?.(dateObj))\n          return true\n      }\n    }\n    else {\n      if (!props.date.value)\n        return false\n      if (props.isYearDisabled?.(props.date.value))\n        return true\n      if (props.isYearUnavailable?.(props.date.value))\n        return true\n    }\n    return false\n  })\n\n  return { isYearSelected, isInvalid }\n}\n\nexport function useYearPicker(props: UseYearPickerProps) {\n  const formatter = useDateFormatter(props.locale.value)\n\n  const resolveMatcher = (matcher?: Matcher | Ref<Matcher | undefined>) =>\n    typeof matcher === 'function' ? matcher : matcher?.value\n\n  const headingFormatOptions = computed(() => {\n    const options: DateFormatterOptions = {\n      calendar: props.placeholder.value.calendar.identifier,\n    }\n\n    if (props.placeholder.value.calendar.identifier === 'gregory' && props.placeholder.value.era === 'BC')\n      options.era = 'short'\n\n    return options\n  })\n\n  const grid = ref<Grid<DateValue>>(createYearGrid({\n    dateObj: props.placeholder.value,\n    yearsPerPage: props.yearsPerPage.value,\n  })) as Ref<Grid<DateValue>>\n\n  function isYearDisabled(dateObj: DateValue) {\n    if (resolveMatcher(props.isYearDisabled)?.(dateObj) || props.disabled.value)\n      return true\n    if (props.maxValue.value && isAfter(startOfYear(dateObj), props.maxValue.value))\n      return true\n    if (props.minValue.value && isBefore(endOfYear(dateObj), props.minValue.value))\n      return true\n    return false\n  }\n\n  const isYearUnavailable = (date: DateValue) => {\n    if (resolveMatcher(props.isYearUnavailable)?.(date))\n      return true\n    return false\n  }\n\n  const isNextButtonDisabled = (nextPageFunc?: (date: DateValue) => DateValue) => {\n    if (!props.maxValue.value)\n      return false\n    if (props.disabled.value)\n      return true\n\n    const lastYearInView = grid.value.cells.at(-1)!\n    if (nextPageFunc || props.nextPage.value) {\n      const nextDate = (nextPageFunc || props.nextPage.value)!(lastYearInView)\n      return isAfter(startOfYear(nextDate), props.maxValue.value)\n    }\n\n    const nextPageStart = startOfYear(lastYearInView.add({ years: 1 }))\n    return isAfter(nextPageStart, props.maxValue.value)\n  }\n\n  const isPrevButtonDisabled = (prevPageFunc?: (date: DateValue) => DateValue) => {\n    if (!props.minValue.value)\n      return false\n    if (props.disabled.value)\n      return true\n\n    const firstYearInView = grid.value.value\n    if (prevPageFunc || props.prevPage.value) {\n      const prevDate = (prevPageFunc || props.prevPage.value)!(firstYearInView)\n      return isBefore(endOfYear(prevDate), props.minValue.value)\n    }\n\n    const prevPageEnd = endOfYear(firstYearInView.subtract({ years: 1 }))\n    return isBefore(prevPageEnd, props.minValue.value)\n  }\n\n  const nextPage = (nextPageFunc?: (date: DateValue) => DateValue) => {\n    const firstYearInGrid = grid.value.value\n\n    if (nextPageFunc || props.nextPage.value) {\n      const newDate = (nextPageFunc || props.nextPage.value)!(firstYearInGrid)\n      grid.value = createYearGrid({ dateObj: newDate, yearsPerPage: props.yearsPerPage.value, decadeAligned: false })\n      props.placeholder.value = newDate.set({ month: props.placeholder.value.month, day: props.placeholder.value.day })\n      return\n    }\n\n    const newDate = firstYearInGrid.add({ years: props.yearsPerPage.value })\n    grid.value = createYearGrid({ dateObj: newDate, yearsPerPage: props.yearsPerPage.value, decadeAligned: false })\n    props.placeholder.value = newDate.set({ month: props.placeholder.value.month, day: props.placeholder.value.day })\n  }\n\n  const prevPage = (prevPageFunc?: (date: DateValue) => DateValue) => {\n    const firstYearInGrid = grid.value.value\n\n    if (prevPageFunc || props.prevPage.value) {\n      const newDate = (prevPageFunc || props.prevPage.value)!(firstYearInGrid)\n      grid.value = createYearGrid({ dateObj: newDate, yearsPerPage: props.yearsPerPage.value, decadeAligned: false })\n      props.placeholder.value = newDate.set({ month: props.placeholder.value.month, day: props.placeholder.value.day })\n      return\n    }\n\n    const newDate = firstYearInGrid.subtract({ years: props.yearsPerPage.value })\n    grid.value = createYearGrid({ dateObj: newDate, yearsPerPage: props.yearsPerPage.value, decadeAligned: false })\n    props.placeholder.value = newDate.set({ month: props.placeholder.value.month, day: props.placeholder.value.day })\n  }\n\n  watch(props.placeholder, (value) => {\n    const firstYearInGrid = grid.value.value\n    const lastYearInGrid = grid.value.cells.at(-1)!\n    if (value.year >= firstYearInGrid.year && value.year <= lastYearInGrid.year)\n      return\n    grid.value = createYearGrid({ dateObj: value, yearsPerPage: props.yearsPerPage.value })\n  })\n\n  watch([props.locale, props.yearsPerPage], () => {\n    formatter.setLocale(props.locale.value)\n    grid.value = createYearGrid({ dateObj: props.placeholder.value, yearsPerPage: props.yearsPerPage.value })\n  })\n\n  const headingValue = computed(() => {\n    if (props.locale.value !== formatter.getLocale())\n      formatter.setLocale(props.locale.value)\n\n    const firstYear = grid.value.cells[0]\n    const lastYear = grid.value.cells.at(-1)!\n\n    return `${formatter.fullYear(toDate(firstYear), headingFormatOptions.value)} - ${formatter.fullYear(toDate(lastYear), headingFormatOptions.value)}`\n  })\n\n  const fullCalendarLabel = computed(() => `${props.calendarLabel.value ?? 'Year Picker'}, ${headingValue.value}`)\n\n  return {\n    isYearDisabled,\n    isYearUnavailable,\n    isNextButtonDisabled,\n    isPrevButtonDisabled,\n    grid,\n    formatter,\n    nextPage,\n    prevPage,\n    headingValue,\n    fullCalendarLabel,\n  }\n}\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Grid, Matcher } from '@/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Formatter } from '@/shared'\nimport type { Direction } from '@/shared/types'\nimport { isSameYear } from '@/date'\nimport { createContext, useDirection, useId, useLocale } from '@/shared'\nimport { getDefaultDate, handleCalendarInitialFocus } from '@/shared/date'\nimport { useYearPicker, useYearPickerState } from './useYearPicker'\n\ntype YearPickerRootContext = {\n  locale: Ref<string>\n  modelValue: Ref<DateValue | DateValue[] | undefined>\n  placeholder: Ref<DateValue>\n  multiple: Ref<boolean>\n  preventDeselect: Ref<boolean>\n  grid: Ref<Grid<DateValue>>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  initialFocus: Ref<boolean>\n  onYearChange: (date: DateValue) => void\n  onPlaceholderChange: (date: DateValue) => void\n  fullCalendarLabel: Ref<string>\n  parentElement: Ref<HTMLElement | undefined>\n  headingValue: Ref<string>\n  headingId: string\n  isInvalid: Ref<boolean>\n  isYearDisabled: Matcher\n  isYearSelected: Matcher\n  isYearUnavailable?: Matcher\n  prevPage: (prevPageFunc?: (date: DateValue) => DateValue) => void\n  nextPage: (nextPageFunc?: (date: DateValue) => DateValue) => void\n  isNextButtonDisabled: (nextPageFunc?: (date: DateValue) => DateValue) => boolean\n  isPrevButtonDisabled: (prevPageFunc?: (date: DateValue) => DateValue) => boolean\n  formatter: Formatter\n  dir: Ref<Direction>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n  yearsPerPage: Ref<number>\n}\n\nexport interface YearPickerRootProps extends PrimitiveProps {\n  /** The default value for the year picker */\n  defaultValue?: DateValue\n  /** The default placeholder date */\n  defaultPlaceholder?: DateValue\n  /** The placeholder date, which is used to determine what year range to display when no date is selected */\n  placeholder?: DateValue\n  /** Whether or not to prevent the user from deselecting a date without selecting another date first */\n  preventDeselect?: boolean\n  /** The accessible label for the year picker */\n  calendarLabel?: string\n  /** The maximum date that can be selected */\n  maxValue?: DateValue\n  /** The minimum date that can be selected */\n  minValue?: DateValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** Whether the year picker is disabled */\n  disabled?: boolean\n  /** Whether the year picker is readonly */\n  readonly?: boolean\n  /** If true, the year picker will focus the selected year, today, or the first year of the range on mount */\n  initialFocus?: boolean\n  /** A function that returns whether or not a year is disabled */\n  isYearDisabled?: Matcher\n  /** A function that returns whether or not a year is unavailable */\n  isYearUnavailable?: Matcher\n  /** The reading direction of the calendar when applicable. If omitted, inherits globally from `ConfigProvider` or assumes LTR. */\n  dir?: Direction\n  /** A function that returns the next page of the year picker. Receives the current placeholder as an argument. */\n  nextPage?: (placeholder: DateValue) => DateValue\n  /** A function that returns the previous page of the year picker. Receives the current placeholder as an argument. */\n  prevPage?: (placeholder: DateValue) => DateValue\n  /** The controlled selected year value of the year picker. Can be bound as `v-model`. */\n  modelValue?: DateValue | DateValue[] | null\n  /** Whether multiple years can be selected */\n  multiple?: boolean\n  /** Number of years to display per page */\n  yearsPerPage?: number\n}\n\nexport type YearPickerRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateValue | DateValue[] | undefined]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n}\n\nexport const [injectYearPickerRootContext, provideYearPickerRootContext]\n  = createContext<YearPickerRootContext>('YearPickerRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { onMounted, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<YearPickerRootProps>(), {\n  defaultValue: undefined,\n  as: 'div',\n  preventDeselect: false,\n  multiple: false,\n  disabled: false,\n  readonly: false,\n  initialFocus: false,\n  placeholder: undefined,\n  isYearDisabled: undefined,\n  isYearUnavailable: undefined,\n  yearsPerPage: 12,\n})\nconst emits = defineEmits<YearPickerRootEmits>()\ndefineSlots<{\n  default?: (props: {\n    /** The current date of the placeholder */\n    date: DateValue\n    /** The grid of years */\n    grid: Grid<DateValue>\n    /** The year picker locale */\n    locale: string\n    /** The current selected value */\n    modelValue: DateValue | DateValue[] | undefined\n  }) => any\n}>()\n\nconst {\n  disabled,\n  readonly,\n  initialFocus,\n  multiple,\n  minValue,\n  maxValue,\n  preventDeselect,\n  isYearDisabled: propsIsYearDisabled,\n  isYearUnavailable: propsIsYearUnavailable,\n  calendarLabel,\n  defaultValue,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n  dir: propDir,\n  locale: propLocale,\n  yearsPerPage,\n} = toRefs(props)\n\nconst { primitiveElement, currentElement: parentElement } = usePrimitiveElement()\nconst locale = useLocale(propLocale)\nconst dir = useDirection(propDir)\nconst headingId = useId(undefined, 'reka-year-picker-heading')\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: defaultValue.value,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateValue | DateValue[] | undefined>\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  defaultValue: modelValue.value,\n  locale: props.locale,\n})\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nfunction onPlaceholderChange(value: DateValue) {\n  placeholder.value = value.copy()\n}\n\nconst {\n  fullCalendarLabel,\n  headingValue,\n  isYearDisabled,\n  isYearUnavailable,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  nextPage,\n  prevPage,\n  formatter,\n  grid,\n} = useYearPicker({\n  locale,\n  placeholder,\n  minValue,\n  maxValue,\n  disabled,\n  yearsPerPage,\n  isYearDisabled: propsIsYearDisabled,\n  isYearUnavailable: propsIsYearUnavailable,\n  calendarLabel,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n})\n\nconst { isInvalid, isYearSelected } = useYearPickerState({\n  date: modelValue,\n  isYearDisabled,\n  isYearUnavailable,\n})\n\nwatch(modelValue, (_modelValue) => {\n  if (Array.isArray(_modelValue) && _modelValue.length) {\n    const lastValue = _modelValue.at(-1)\n    if (lastValue && !isSameYear(placeholder.value, lastValue))\n      onPlaceholderChange(lastValue)\n  }\n  else if (!Array.isArray(_modelValue) && _modelValue && !isSameYear(placeholder.value, _modelValue)) {\n    onPlaceholderChange(_modelValue)\n  }\n})\n\nfunction resolveYearValue(value: DateValue, reference?: DateValue) {\n  if (!reference)\n    return value.copy()\n  return value.copy().set({ month: reference.month, day: reference.day })\n}\n\nfunction onYearChange(value: DateValue) {\n  if (!multiple.value) {\n    if (!modelValue.value) {\n      modelValue.value = resolveYearValue(value, placeholder.value)\n      return\n    }\n\n    if (!preventDeselect.value && isSameYear(modelValue.value as DateValue, value)) {\n      placeholder.value = resolveYearValue(value, modelValue.value as DateValue)\n      modelValue.value = undefined\n    }\n    else {\n      modelValue.value = resolveYearValue(value, modelValue.value as DateValue)\n    }\n  }\n  else if (!modelValue.value) {\n    modelValue.value = [resolveYearValue(value, placeholder.value)]\n  }\n  else if (Array.isArray(modelValue.value)) {\n    const index = modelValue.value.findIndex(date => isSameYear(date, value))\n    if (index === -1) {\n      modelValue.value = [...modelValue.value, resolveYearValue(value, placeholder.value)]\n    }\n    else if (!preventDeselect.value) {\n      const next = modelValue.value.filter(date => !isSameYear(date, value))\n      if (!next.length) {\n        placeholder.value = resolveYearValue(value, modelValue.value[index])\n        modelValue.value = undefined\n        return\n      }\n      modelValue.value = next.map(date => date.copy())\n    }\n  }\n}\n\nonMounted(() => {\n  if (initialFocus.value)\n    handleCalendarInitialFocus(parentElement.value)\n})\n\nprovideYearPickerRootContext({\n  isYearUnavailable,\n  dir,\n  isYearDisabled,\n  locale,\n  formatter,\n  modelValue,\n  placeholder,\n  disabled,\n  initialFocus,\n  grid,\n  multiple,\n  readonly,\n  preventDeselect,\n  fullCalendarLabel,\n  headingValue,\n  headingId,\n  isInvalid,\n  isYearSelected,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  nextPage,\n  prevPage,\n  parentElement,\n  onPlaceholderChange,\n  onYearChange,\n  minValue,\n  maxValue,\n  yearsPerPage,\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-label=\"fullCalendarLabel\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n  >\n    <slot\n      :date=\"placeholder\"\n      :grid=\"grid\"\n      :locale=\"locale\"\n      :model-value=\"modelValue\"\n    />\n    <div\n      style=\"border: 0px; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; white-space: nowrap; width: 1px;\"\n    >\n      <div\n        role=\"heading\"\n        aria-level=\"2\"\n      >\n        {{ fullCalendarLabel }}\n      </div>\n    </div>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Grid, Matcher } from '@/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Formatter } from '@/shared'\nimport type { Direction } from '@/shared/types'\nimport { isSameYear } from '@/date'\nimport { createContext, useDirection, useId, useLocale } from '@/shared'\nimport { getDefaultDate, handleCalendarInitialFocus } from '@/shared/date'\nimport { useYearPicker, useYearPickerState } from './useYearPicker'\n\ntype YearPickerRootContext = {\n  locale: Ref<string>\n  modelValue: Ref<DateValue | DateValue[] | undefined>\n  placeholder: Ref<DateValue>\n  multiple: Ref<boolean>\n  preventDeselect: Ref<boolean>\n  grid: Ref<Grid<DateValue>>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  initialFocus: Ref<boolean>\n  onYearChange: (date: DateValue) => void\n  onPlaceholderChange: (date: DateValue) => void\n  fullCalendarLabel: Ref<string>\n  parentElement: Ref<HTMLElement | undefined>\n  headingValue: Ref<string>\n  headingId: string\n  isInvalid: Ref<boolean>\n  isYearDisabled: Matcher\n  isYearSelected: Matcher\n  isYearUnavailable?: Matcher\n  prevPage: (prevPageFunc?: (date: DateValue) => DateValue) => void\n  nextPage: (nextPageFunc?: (date: DateValue) => DateValue) => void\n  isNextButtonDisabled: (nextPageFunc?: (date: DateValue) => DateValue) => boolean\n  isPrevButtonDisabled: (prevPageFunc?: (date: DateValue) => DateValue) => boolean\n  formatter: Formatter\n  dir: Ref<Direction>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n  yearsPerPage: Ref<number>\n}\n\nexport interface YearPickerRootProps extends PrimitiveProps {\n  /** The default value for the year picker */\n  defaultValue?: DateValue\n  /** The default placeholder date */\n  defaultPlaceholder?: DateValue\n  /** The placeholder date, which is used to determine what year range to display when no date is selected */\n  placeholder?: DateValue\n  /** Whether or not to prevent the user from deselecting a date without selecting another date first */\n  preventDeselect?: boolean\n  /** The accessible label for the year picker */\n  calendarLabel?: string\n  /** The maximum date that can be selected */\n  maxValue?: DateValue\n  /** The minimum date that can be selected */\n  minValue?: DateValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** Whether the year picker is disabled */\n  disabled?: boolean\n  /** Whether the year picker is readonly */\n  readonly?: boolean\n  /** If true, the year picker will focus the selected year, today, or the first year of the range on mount */\n  initialFocus?: boolean\n  /** A function that returns whether or not a year is disabled */\n  isYearDisabled?: Matcher\n  /** A function that returns whether or not a year is unavailable */\n  isYearUnavailable?: Matcher\n  /** The reading direction of the calendar when applicable. If omitted, inherits globally from `ConfigProvider` or assumes LTR. */\n  dir?: Direction\n  /** A function that returns the next page of the year picker. Receives the current placeholder as an argument. */\n  nextPage?: (placeholder: DateValue) => DateValue\n  /** A function that returns the previous page of the year picker. Receives the current placeholder as an argument. */\n  prevPage?: (placeholder: DateValue) => DateValue\n  /** The controlled selected year value of the year picker. Can be bound as `v-model`. */\n  modelValue?: DateValue | DateValue[] | null\n  /** Whether multiple years can be selected */\n  multiple?: boolean\n  /** Number of years to display per page */\n  yearsPerPage?: number\n}\n\nexport type YearPickerRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateValue | DateValue[] | undefined]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n}\n\nexport const [injectYearPickerRootContext, provideYearPickerRootContext]\n  = createContext<YearPickerRootContext>('YearPickerRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useVModel } from '@vueuse/core'\nimport { onMounted, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<YearPickerRootProps>(), {\n  defaultValue: undefined,\n  as: 'div',\n  preventDeselect: false,\n  multiple: false,\n  disabled: false,\n  readonly: false,\n  initialFocus: false,\n  placeholder: undefined,\n  isYearDisabled: undefined,\n  isYearUnavailable: undefined,\n  yearsPerPage: 12,\n})\nconst emits = defineEmits<YearPickerRootEmits>()\ndefineSlots<{\n  default?: (props: {\n    /** The current date of the placeholder */\n    date: DateValue\n    /** The grid of years */\n    grid: Grid<DateValue>\n    /** The year picker locale */\n    locale: string\n    /** The current selected value */\n    modelValue: DateValue | DateValue[] | undefined\n  }) => any\n}>()\n\nconst {\n  disabled,\n  readonly,\n  initialFocus,\n  multiple,\n  minValue,\n  maxValue,\n  preventDeselect,\n  isYearDisabled: propsIsYearDisabled,\n  isYearUnavailable: propsIsYearUnavailable,\n  calendarLabel,\n  defaultValue,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n  dir: propDir,\n  locale: propLocale,\n  yearsPerPage,\n} = toRefs(props)\n\nconst { primitiveElement, currentElement: parentElement } = usePrimitiveElement()\nconst locale = useLocale(propLocale)\nconst dir = useDirection(propDir)\nconst headingId = useId(undefined, 'reka-year-picker-heading')\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: defaultValue.value,\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateValue | DateValue[] | undefined>\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  defaultValue: modelValue.value,\n  locale: props.locale,\n})\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nfunction onPlaceholderChange(value: DateValue) {\n  placeholder.value = value.copy()\n}\n\nconst {\n  fullCalendarLabel,\n  headingValue,\n  isYearDisabled,\n  isYearUnavailable,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  nextPage,\n  prevPage,\n  formatter,\n  grid,\n} = useYearPicker({\n  locale,\n  placeholder,\n  minValue,\n  maxValue,\n  disabled,\n  yearsPerPage,\n  isYearDisabled: propsIsYearDisabled,\n  isYearUnavailable: propsIsYearUnavailable,\n  calendarLabel,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n})\n\nconst { isInvalid, isYearSelected } = useYearPickerState({\n  date: modelValue,\n  isYearDisabled,\n  isYearUnavailable,\n})\n\nwatch(modelValue, (_modelValue) => {\n  if (Array.isArray(_modelValue) && _modelValue.length) {\n    const lastValue = _modelValue.at(-1)\n    if (lastValue && !isSameYear(placeholder.value, lastValue))\n      onPlaceholderChange(lastValue)\n  }\n  else if (!Array.isArray(_modelValue) && _modelValue && !isSameYear(placeholder.value, _modelValue)) {\n    onPlaceholderChange(_modelValue)\n  }\n})\n\nfunction resolveYearValue(value: DateValue, reference?: DateValue) {\n  if (!reference)\n    return value.copy()\n  return value.copy().set({ month: reference.month, day: reference.day })\n}\n\nfunction onYearChange(value: DateValue) {\n  if (!multiple.value) {\n    if (!modelValue.value) {\n      modelValue.value = resolveYearValue(value, placeholder.value)\n      return\n    }\n\n    if (!preventDeselect.value && isSameYear(modelValue.value as DateValue, value)) {\n      placeholder.value = resolveYearValue(value, modelValue.value as DateValue)\n      modelValue.value = undefined\n    }\n    else {\n      modelValue.value = resolveYearValue(value, modelValue.value as DateValue)\n    }\n  }\n  else if (!modelValue.value) {\n    modelValue.value = [resolveYearValue(value, placeholder.value)]\n  }\n  else if (Array.isArray(modelValue.value)) {\n    const index = modelValue.value.findIndex(date => isSameYear(date, value))\n    if (index === -1) {\n      modelValue.value = [...modelValue.value, resolveYearValue(value, placeholder.value)]\n    }\n    else if (!preventDeselect.value) {\n      const next = modelValue.value.filter(date => !isSameYear(date, value))\n      if (!next.length) {\n        placeholder.value = resolveYearValue(value, modelValue.value[index])\n        modelValue.value = undefined\n        return\n      }\n      modelValue.value = next.map(date => date.copy())\n    }\n  }\n}\n\nonMounted(() => {\n  if (initialFocus.value)\n    handleCalendarInitialFocus(parentElement.value)\n})\n\nprovideYearPickerRootContext({\n  isYearUnavailable,\n  dir,\n  isYearDisabled,\n  locale,\n  formatter,\n  modelValue,\n  placeholder,\n  disabled,\n  initialFocus,\n  grid,\n  multiple,\n  readonly,\n  preventDeselect,\n  fullCalendarLabel,\n  headingValue,\n  headingId,\n  isInvalid,\n  isYearSelected,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  nextPage,\n  prevPage,\n  parentElement,\n  onPlaceholderChange,\n  onYearChange,\n  minValue,\n  maxValue,\n  yearsPerPage,\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-label=\"fullCalendarLabel\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n  >\n    <slot\n      :date=\"placeholder\"\n      :grid=\"grid\"\n      :locale=\"locale\"\n      :model-value=\"modelValue\"\n    />\n    <div\n      style=\"border: 0px; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; white-space: nowrap; width: 1px;\"\n    >\n      <div\n        role=\"heading\"\n        aria-level=\"2\"\n      >\n        {{ fullCalendarLabel }}\n      </div>\n    </div>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearPickerCellProps extends PrimitiveProps {\n  /** The date value for the cell */\n  date: DateValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectYearPickerRootContext } from './YearPickerRoot.vue'\n\nwithDefaults(defineProps<YearPickerCellProps>(), { as: 'td' })\nconst rootContext = injectYearPickerRootContext()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"gridcell\"\n    :aria-selected=\"rootContext.isYearSelected(date) ? true : undefined\"\n    :aria-disabled=\"rootContext.isYearDisabled(date) || rootContext.isYearUnavailable?.(date)\"\n    :data-disabled=\"rootContext.isYearDisabled(date) ? '' : undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearPickerCellProps extends PrimitiveProps {\n  /** The date value for the cell */\n  date: DateValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectYearPickerRootContext } from './YearPickerRoot.vue'\n\nwithDefaults(defineProps<YearPickerCellProps>(), { as: 'td' })\nconst rootContext = injectYearPickerRootContext()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"gridcell\"\n    :aria-selected=\"rootContext.isYearSelected(date) ? true : undefined\"\n    :aria-disabled=\"rootContext.isYearDisabled(date) || rootContext.isYearUnavailable?.(date)\"\n    :data-disabled=\"rootContext.isYearDisabled(date) ? '' : undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { endOfYear, getLocalTimeZone, startOfYear, toCalendar, today } from '@internationalized/date'\nimport { computed, nextTick } from 'vue'\nimport { isSameYear, toDate } from '@/date'\nimport { useKbd } from '@/shared'\n\nexport interface YearPickerCellTriggerProps extends PrimitiveProps {\n  /** The date value provided to the cell trigger */\n  year: DateValue\n}\n\nexport interface YearPickerCellTriggerSlot {\n  default?: (props: {\n    /** Current year value */\n    yearValue: string\n    /** Current disable state */\n    disabled: boolean\n    /** Current selected state */\n    selected: boolean\n    /** Current year is today state */\n    today: boolean\n    /** Current unavailable state */\n    unavailable: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { injectYearPickerRootContext } from './YearPickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearPickerCellTriggerProps>(), { as: 'div' })\n\ndefineSlots<YearPickerCellTriggerSlot>()\n\nconst kbd = useKbd()\nconst rootContext = injectYearPickerRootContext()\n\nconst { primitiveElement } = usePrimitiveElement()\n\nconst yearValue = computed(() => {\n  rootContext.locale.value\n  return rootContext.formatter.fullYear(toDate(props.year))\n})\n\nconst labelText = computed(() => {\n  rootContext.locale.value\n  return rootContext.formatter.custom(toDate(props.year), {\n    year: 'numeric',\n  })\n})\n\nconst isUnavailable = computed(() => rootContext.isYearUnavailable?.(props.year) ?? false)\n\nconst isCurrentYear = computed(() => {\n  const todayDate = toCalendar(today(getLocalTimeZone()), props.year.calendar)\n  return isSameYear(props.year, todayDate)\n})\n\nconst isDisabled = computed(() => rootContext.isYearDisabled(props.year))\n\nconst isFocusedYear = computed(() => {\n  return !rootContext.disabled.value && isSameYear(props.year, rootContext.placeholder.value)\n})\n\nconst isSelectedYear = computed(() => rootContext.isYearSelected(props.year))\n\nfunction changeYear(date: DateValue) {\n  if (rootContext.readonly.value)\n    return\n  if (rootContext.isYearDisabled(date) || rootContext.isYearUnavailable?.(date))\n    return\n\n  rootContext.onYearChange(date)\n}\n\nfunction handleClick() {\n  if (isDisabled.value)\n    return\n  changeYear(props.year)\n}\n\nfunction handleArrowKey(e: KeyboardEvent) {\n  if (isDisabled.value)\n    return\n  e.preventDefault()\n  e.stopPropagation()\n  const parentElement = rootContext.parentElement.value!\n  const sign = rootContext.dir.value === 'rtl' ? -1 : 1\n\n  switch (e.code) {\n    case kbd.ARROW_RIGHT:\n      shiftFocus(props.year, sign)\n      break\n    case kbd.ARROW_LEFT:\n      shiftFocus(props.year, -sign)\n      break\n    case kbd.ARROW_UP:\n      shiftFocus(props.year, -4)\n      break\n    case kbd.ARROW_DOWN:\n      shiftFocus(props.year, 4)\n      break\n    case kbd.PAGE_UP:\n      shiftFocusPage(-1)\n      break\n    case kbd.PAGE_DOWN:\n      shiftFocusPage(1)\n      break\n    case kbd.ENTER:\n    case kbd.SPACE_CODE:\n      changeYear(props.year)\n  }\n\n  function shiftFocus(currentYear: DateValue, add: number, depth = 0) {\n    if (depth > 48)\n      return\n    const candidateYearValue = currentYear.add({ years: add })\n\n    if ((rootContext.minValue.value && endOfYear(candidateYearValue).compare(rootContext.minValue.value) < 0)\n      || (rootContext.maxValue.value && startOfYear(candidateYearValue).compare(rootContext.maxValue.value) > 0)) {\n      return\n    }\n\n    const candidateYear = parentElement.querySelector<HTMLElement>(`[data-value='${candidateYearValue.toString()}']`)\n\n    if (!candidateYear) {\n      if (add > 0) {\n        if (rootContext.isNextButtonDisabled())\n          return\n        rootContext.nextPage()\n      }\n      else {\n        if (rootContext.isPrevButtonDisabled())\n          return\n        rootContext.prevPage()\n      }\n      nextTick(() => {\n        shiftFocus(currentYear, add, depth + 1)\n      })\n      return\n    }\n\n    if (candidateYear && candidateYear.hasAttribute('data-disabled'))\n      return shiftFocus(candidateYearValue, add, depth + 1)\n\n    rootContext.onPlaceholderChange(candidateYearValue)\n    candidateYear?.focus()\n  }\n\n  function shiftFocusPage(direction: number) {\n    const yearsPerPage = rootContext.yearsPerPage.value\n    const candidateYearValue = props.year.add({ years: direction * yearsPerPage })\n\n    if ((rootContext.minValue.value && endOfYear(candidateYearValue).compare(rootContext.minValue.value) < 0)\n      || (rootContext.maxValue.value && startOfYear(candidateYearValue).compare(rootContext.maxValue.value) > 0)) {\n      return\n    }\n\n    if (direction > 0) {\n      if (rootContext.isNextButtonDisabled())\n        return\n      rootContext.nextPage()\n    }\n    else {\n      if (rootContext.isPrevButtonDisabled())\n        return\n      rootContext.prevPage()\n    }\n\n    nextTick(() => {\n      const candidateYear = parentElement.querySelector<HTMLElement>(`[data-value='${candidateYearValue.toString()}']`)\n      if (candidateYear && !candidateYear.hasAttribute('data-disabled')) {\n        rootContext.onPlaceholderChange(candidateYearValue)\n        candidateYear?.focus()\n        return\n      }\n\n      if (!candidateYear || candidateYear.hasAttribute('data-disabled'))\n        shiftFocus(candidateYearValue, direction > 0 ? 1 : -1, 1)\n    })\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    role=\"button\"\n    :aria-label=\"labelText\"\n    data-reka-year-picker-cell-trigger\n    :aria-disabled=\"isDisabled || isUnavailable ? true : undefined\"\n    :data-selected=\"isSelectedYear ? '' : undefined\"\n    :data-value=\"year.toString()\"\n    :data-disabled=\"isDisabled ? '' : undefined\"\n    :data-unavailable=\"isUnavailable ? '' : undefined\"\n    :data-today=\"isCurrentYear ? '' : undefined\"\n    :data-focused=\"isFocusedYear ? '' : undefined\"\n    :tabindex=\"isFocusedYear ? 0 : isDisabled ? undefined : -1\"\n    @click=\"handleClick\"\n    @keydown.up.down.left.right.space.enter.page-up.page-down=\"handleArrowKey\"\n    @keydown.enter.prevent\n  >\n    <slot\n      :year-value=\"yearValue\"\n      :disabled=\"isDisabled\"\n      :today=\"isCurrentYear\"\n      :selected=\"isSelectedYear\"\n      :unavailable=\"isUnavailable\"\n    >\n      {{ yearValue }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { endOfYear, getLocalTimeZone, startOfYear, toCalendar, today } from '@internationalized/date'\nimport { computed, nextTick } from 'vue'\nimport { isSameYear, toDate } from '@/date'\nimport { useKbd } from '@/shared'\n\nexport interface YearPickerCellTriggerProps extends PrimitiveProps {\n  /** The date value provided to the cell trigger */\n  year: DateValue\n}\n\nexport interface YearPickerCellTriggerSlot {\n  default?: (props: {\n    /** Current year value */\n    yearValue: string\n    /** Current disable state */\n    disabled: boolean\n    /** Current selected state */\n    selected: boolean\n    /** Current year is today state */\n    today: boolean\n    /** Current unavailable state */\n    unavailable: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { injectYearPickerRootContext } from './YearPickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearPickerCellTriggerProps>(), { as: 'div' })\n\ndefineSlots<YearPickerCellTriggerSlot>()\n\nconst kbd = useKbd()\nconst rootContext = injectYearPickerRootContext()\n\nconst { primitiveElement } = usePrimitiveElement()\n\nconst yearValue = computed(() => {\n  rootContext.locale.value\n  return rootContext.formatter.fullYear(toDate(props.year))\n})\n\nconst labelText = computed(() => {\n  rootContext.locale.value\n  return rootContext.formatter.custom(toDate(props.year), {\n    year: 'numeric',\n  })\n})\n\nconst isUnavailable = computed(() => rootContext.isYearUnavailable?.(props.year) ?? false)\n\nconst isCurrentYear = computed(() => {\n  const todayDate = toCalendar(today(getLocalTimeZone()), props.year.calendar)\n  return isSameYear(props.year, todayDate)\n})\n\nconst isDisabled = computed(() => rootContext.isYearDisabled(props.year))\n\nconst isFocusedYear = computed(() => {\n  return !rootContext.disabled.value && isSameYear(props.year, rootContext.placeholder.value)\n})\n\nconst isSelectedYear = computed(() => rootContext.isYearSelected(props.year))\n\nfunction changeYear(date: DateValue) {\n  if (rootContext.readonly.value)\n    return\n  if (rootContext.isYearDisabled(date) || rootContext.isYearUnavailable?.(date))\n    return\n\n  rootContext.onYearChange(date)\n}\n\nfunction handleClick() {\n  if (isDisabled.value)\n    return\n  changeYear(props.year)\n}\n\nfunction handleArrowKey(e: KeyboardEvent) {\n  if (isDisabled.value)\n    return\n  e.preventDefault()\n  e.stopPropagation()\n  const parentElement = rootContext.parentElement.value!\n  const sign = rootContext.dir.value === 'rtl' ? -1 : 1\n\n  switch (e.code) {\n    case kbd.ARROW_RIGHT:\n      shiftFocus(props.year, sign)\n      break\n    case kbd.ARROW_LEFT:\n      shiftFocus(props.year, -sign)\n      break\n    case kbd.ARROW_UP:\n      shiftFocus(props.year, -4)\n      break\n    case kbd.ARROW_DOWN:\n      shiftFocus(props.year, 4)\n      break\n    case kbd.PAGE_UP:\n      shiftFocusPage(-1)\n      break\n    case kbd.PAGE_DOWN:\n      shiftFocusPage(1)\n      break\n    case kbd.ENTER:\n    case kbd.SPACE_CODE:\n      changeYear(props.year)\n  }\n\n  function shiftFocus(currentYear: DateValue, add: number, depth = 0) {\n    if (depth > 48)\n      return\n    const candidateYearValue = currentYear.add({ years: add })\n\n    if ((rootContext.minValue.value && endOfYear(candidateYearValue).compare(rootContext.minValue.value) < 0)\n      || (rootContext.maxValue.value && startOfYear(candidateYearValue).compare(rootContext.maxValue.value) > 0)) {\n      return\n    }\n\n    const candidateYear = parentElement.querySelector<HTMLElement>(`[data-value='${candidateYearValue.toString()}']`)\n\n    if (!candidateYear) {\n      if (add > 0) {\n        if (rootContext.isNextButtonDisabled())\n          return\n        rootContext.nextPage()\n      }\n      else {\n        if (rootContext.isPrevButtonDisabled())\n          return\n        rootContext.prevPage()\n      }\n      nextTick(() => {\n        shiftFocus(currentYear, add, depth + 1)\n      })\n      return\n    }\n\n    if (candidateYear && candidateYear.hasAttribute('data-disabled'))\n      return shiftFocus(candidateYearValue, add, depth + 1)\n\n    rootContext.onPlaceholderChange(candidateYearValue)\n    candidateYear?.focus()\n  }\n\n  function shiftFocusPage(direction: number) {\n    const yearsPerPage = rootContext.yearsPerPage.value\n    const candidateYearValue = props.year.add({ years: direction * yearsPerPage })\n\n    if ((rootContext.minValue.value && endOfYear(candidateYearValue).compare(rootContext.minValue.value) < 0)\n      || (rootContext.maxValue.value && startOfYear(candidateYearValue).compare(rootContext.maxValue.value) > 0)) {\n      return\n    }\n\n    if (direction > 0) {\n      if (rootContext.isNextButtonDisabled())\n        return\n      rootContext.nextPage()\n    }\n    else {\n      if (rootContext.isPrevButtonDisabled())\n        return\n      rootContext.prevPage()\n    }\n\n    nextTick(() => {\n      const candidateYear = parentElement.querySelector<HTMLElement>(`[data-value='${candidateYearValue.toString()}']`)\n      if (candidateYear && !candidateYear.hasAttribute('data-disabled')) {\n        rootContext.onPlaceholderChange(candidateYearValue)\n        candidateYear?.focus()\n        return\n      }\n\n      if (!candidateYear || candidateYear.hasAttribute('data-disabled'))\n        shiftFocus(candidateYearValue, direction > 0 ? 1 : -1, 1)\n    })\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    role=\"button\"\n    :aria-label=\"labelText\"\n    data-reka-year-picker-cell-trigger\n    :aria-disabled=\"isDisabled || isUnavailable ? true : undefined\"\n    :data-selected=\"isSelectedYear ? '' : undefined\"\n    :data-value=\"year.toString()\"\n    :data-disabled=\"isDisabled ? '' : undefined\"\n    :data-unavailable=\"isUnavailable ? '' : undefined\"\n    :data-today=\"isCurrentYear ? '' : undefined\"\n    :data-focused=\"isFocusedYear ? '' : undefined\"\n    :tabindex=\"isFocusedYear ? 0 : isDisabled ? undefined : -1\"\n    @click=\"handleClick\"\n    @keydown.up.down.left.right.space.enter.page-up.page-down=\"handleArrowKey\"\n    @keydown.enter.prevent\n  >\n    <slot\n      :year-value=\"yearValue\"\n      :disabled=\"isDisabled\"\n      :today=\"isCurrentYear\"\n      :selected=\"isSelectedYear\"\n      :unavailable=\"isUnavailable\"\n    >\n      {{ yearValue }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearPickerGridProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectYearPickerRootContext } from './YearPickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearPickerGridProps>(), { as: 'table' })\n\nconst rootContext = injectYearPickerRootContext()\nconst disabled = computed(() => rootContext.disabled.value ? true : undefined)\nconst readonly = computed(() => rootContext.readonly.value ? true : undefined)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    tabindex=\"-1\"\n    role=\"application\"\n    :aria-labelledby=\"rootContext.headingId\"\n    :aria-readonly=\"readonly\"\n    :aria-disabled=\"disabled\"\n    :data-readonly=\"readonly && ''\"\n    :data-disabled=\"disabled && ''\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearPickerGridProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectYearPickerRootContext } from './YearPickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearPickerGridProps>(), { as: 'table' })\n\nconst rootContext = injectYearPickerRootContext()\nconst disabled = computed(() => rootContext.disabled.value ? true : undefined)\nconst readonly = computed(() => rootContext.readonly.value ? true : undefined)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    tabindex=\"-1\"\n    role=\"application\"\n    :aria-labelledby=\"rootContext.headingId\"\n    :aria-readonly=\"readonly\"\n    :aria-disabled=\"disabled\"\n    :data-readonly=\"readonly && ''\"\n    :data-disabled=\"disabled && ''\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearPickerGridBodyProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<YearPickerGridBodyProps>(), { as: 'tbody' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearPickerGridBodyProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<YearPickerGridBodyProps>(), { as: 'tbody' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearPickerGridRowProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<YearPickerGridRowProps>(), { as: 'tr' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    role=\"row\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearPickerGridRowProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<YearPickerGridRowProps>(), { as: 'tr' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    role=\"row\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearPickerHeaderProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<YearPickerHeaderProps>(), { as: 'div' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearPickerHeaderProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<YearPickerHeaderProps>(), { as: 'div' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearPickerHeadingProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectYearPickerRootContext } from './YearPickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearPickerHeadingProps>(), { as: 'div' })\n\ndefineSlots<{\n  default?: (props: {\n    /** Current year range heading */\n    headingValue: string\n  }) => any\n}>()\n\nconst rootContext = injectYearPickerRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"rootContext.headingId\"\n    role=\"heading\"\n    aria-level=\"2\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n  >\n    <slot :heading-value=\"rootContext.headingValue.value\">\n      {{ rootContext.headingValue.value }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearPickerHeadingProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectYearPickerRootContext } from './YearPickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearPickerHeadingProps>(), { as: 'div' })\n\ndefineSlots<{\n  default?: (props: {\n    /** Current year range heading */\n    headingValue: string\n  }) => any\n}>()\n\nconst rootContext = injectYearPickerRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"rootContext.headingId\"\n    role=\"heading\"\n    aria-level=\"2\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n  >\n    <slot :heading-value=\"rootContext.headingValue.value\">\n      {{ rootContext.headingValue.value }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearPickerNextProps extends PrimitiveProps {\n  /** The function to be used for the next page. Overwrites the `nextPage` function set on the `YearPickerRoot`. */\n  nextPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface YearPickerNextSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectYearPickerRootContext } from './YearPickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearPickerNextProps>(), { as: 'button' })\ndefineSlots<YearPickerNextSlot>()\n\nconst rootContext = injectYearPickerRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isNextButtonDisabled(props.nextPage))\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.nextPage(props.nextPage)\n}\n</script>\n\n<template>\n  <Primitive\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    aria-label=\"Next page\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Next page\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearPickerNextProps extends PrimitiveProps {\n  /** The function to be used for the next page. Overwrites the `nextPage` function set on the `YearPickerRoot`. */\n  nextPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface YearPickerNextSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectYearPickerRootContext } from './YearPickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearPickerNextProps>(), { as: 'button' })\ndefineSlots<YearPickerNextSlot>()\n\nconst rootContext = injectYearPickerRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isNextButtonDisabled(props.nextPage))\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.nextPage(props.nextPage)\n}\n</script>\n\n<template>\n  <Primitive\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    aria-label=\"Next page\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Next page\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearPickerPrevProps extends PrimitiveProps {\n  /** The function to be used for the prev page. Overwrites the `prevPage` function set on the `YearPickerRoot`. */\n  prevPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface YearPickerPrevSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectYearPickerRootContext } from './YearPickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearPickerPrevProps>(), { as: 'button' })\ndefineSlots<YearPickerPrevSlot>()\n\nconst rootContext = injectYearPickerRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isPrevButtonDisabled(props.prevPage))\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.prevPage(props.prevPage)\n}\n</script>\n\n<template>\n  <Primitive\n    aria-label=\"Previous page\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Prev page\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearPickerPrevProps extends PrimitiveProps {\n  /** The function to be used for the prev page. Overwrites the `prevPage` function set on the `YearPickerRoot`. */\n  prevPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface YearPickerPrevSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectYearPickerRootContext } from './YearPickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearPickerPrevProps>(), { as: 'button' })\ndefineSlots<YearPickerPrevSlot>()\n\nconst rootContext = injectYearPickerRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isPrevButtonDisabled(props.prevPage))\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.prevPage(props.prevPage)\n}\n</script>\n\n<template>\n  <Primitive\n    aria-label=\"Previous page\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Prev page\n    </slot>\n  </Primitive>\n</template>\n","import type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Matcher } from '@/date'\nimport { computed } from 'vue'\nimport { areAllYearsBetweenValid, getYearsBetween, isSameYear } from '@/date'\n\nexport type UseRangeYearPickerProps = {\n  start: Ref<DateValue | undefined>\n  end: Ref<DateValue | undefined>\n  isYearDisabled: Matcher\n  isYearUnavailable: Matcher\n  focusedValue: Ref<DateValue | undefined>\n  allowNonContiguousRanges: Ref<boolean>\n  fixedDate: Ref<'start' | 'end' | undefined>\n  maximumYears?: Ref<number | undefined>\n}\n\nexport function useRangeYearPickerState(props: UseRangeYearPickerProps) {\n  const isStartInvalid = computed(() => {\n    if (!props.start.value)\n      return false\n    if (props.isYearDisabled(props.start.value))\n      return true\n    return false\n  })\n\n  const isEndInvalid = computed(() => {\n    if (!props.end.value)\n      return false\n    if (props.isYearDisabled(props.end.value))\n      return true\n    return false\n  })\n\n  const isInvalid = computed(() => {\n    if (isStartInvalid.value || isEndInvalid.value)\n      return true\n    if (props.start.value && props.end.value && props.end.value.year < props.start.value.year)\n      return true\n    return false\n  })\n\n  const isSelectionStart = (date: DateValue) => {\n    if (!props.start.value)\n      return false\n    return isSameYear(props.start.value, date)\n  }\n\n  const isSelectionEnd = (date: DateValue) => {\n    if (!props.end.value)\n      return false\n    return isSameYear(props.end.value, date)\n  }\n\n  const isSelected = (date: DateValue) => {\n    if (props.start.value && isSameYear(props.start.value, date))\n      return true\n    if (props.end.value && isSameYear(props.end.value, date))\n      return true\n    if (props.end.value && props.start.value) {\n      return date.year > props.start.value.year && date.year < props.end.value.year\n    }\n    return false\n  }\n\n  const rangeIsYearDisabled = (date: DateValue) => {\n    if (props.isYearDisabled(date))\n      return true\n\n    if (props.maximumYears?.value) {\n      const maximumYears = props.maximumYears.value\n\n      if (props.start.value && props.end.value) {\n        if (props.fixedDate.value) {\n          const diff = getYearsBetween(props.start.value, props.end.value)\n          if (diff <= maximumYears) {\n            const yearsLeft = maximumYears - diff\n            const startLimit = props.start.value.subtract({ years: yearsLeft })\n            const endLimit = props.end.value.add({ years: yearsLeft })\n            return date.year < startLimit.year || date.year > endLimit.year\n          }\n\n          const fixedValue = props.fixedDate.value === 'start' ? props.start.value : props.end.value\n          const maxDate = fixedValue.add({ years: maximumYears - 1 })\n          const minDate = fixedValue.subtract({ years: maximumYears - 1 })\n          return date.year < minDate.year || date.year > maxDate.year\n        }\n        return false\n      }\n      if (props.start.value) {\n        const maxDate = props.start.value.add({ years: maximumYears - 1 })\n        const minDate = props.start.value.subtract({ years: maximumYears - 1 })\n        return date.year < minDate.year || date.year > maxDate.year\n      }\n    }\n\n    return false\n  }\n\n  const highlightedRange = computed(() => {\n    if (props.start.value && props.end.value && !props.fixedDate.value)\n      return null\n    if (!props.start.value || !props.focusedValue.value)\n      return null\n\n    const isStartBeforeFocused = props.start.value.year < props.focusedValue.value.year\n    const start = isStartBeforeFocused ? props.start.value : props.focusedValue.value\n    const end = isStartBeforeFocused ? props.focusedValue.value : props.start.value\n\n    if (isSameYear(start, end)) {\n      return { start, end }\n    }\n\n    if (props.maximumYears?.value && !props.end.value) {\n      const maximumYears = props.maximumYears.value\n      const anchor = props.start.value\n      const focused = props.focusedValue.value\n\n      if (focused.year >= anchor.year) {\n        const maxEnd = anchor.add({ years: maximumYears - 1 })\n        const cappedEnd = focused.year > maxEnd.year ? maxEnd : focused\n        return { start: anchor, end: cappedEnd }\n      }\n      else {\n        const minStart = anchor.subtract({ years: maximumYears - 1 })\n        const cappedStart = focused.year < minStart.year ? minStart : focused\n        return { start: cappedStart, end: anchor }\n      }\n    }\n\n    const isValid = areAllYearsBetweenValid(\n      start,\n      end,\n      props.allowNonContiguousRanges.value ? () => false : props.isYearUnavailable,\n      rangeIsYearDisabled,\n    )\n    if (isValid)\n      return { start, end }\n\n    return null\n  })\n\n  const isHighlightedStart = (date: DateValue) => {\n    if (!highlightedRange.value?.start)\n      return false\n    return isSameYear(highlightedRange.value.start, date)\n  }\n\n  const isHighlightedEnd = (date: DateValue) => {\n    if (!highlightedRange.value?.end)\n      return false\n    return isSameYear(highlightedRange.value.end, date)\n  }\n\n  return {\n    isInvalid,\n    isSelected,\n    highlightedRange,\n    isSelectionStart,\n    isSelectionEnd,\n    isHighlightedStart,\n    isHighlightedEnd,\n    isYearDisabled: rangeIsYearDisabled,\n  }\n}\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Grid, Matcher } from '@/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Formatter } from '@/shared'\nimport type { DateRange } from '@/shared/date'\nimport type { Direction } from '@/shared/types'\nimport { isSameYear } from '@/date'\nimport { createContext, useDirection, useId, useKbd, useLocale } from '@/shared'\nimport { getDefaultDate, handleCalendarInitialFocus } from '@/shared/date'\nimport { useYearPicker } from '@/YearPicker/useYearPicker'\nimport { useRangeYearPickerState } from './useRangeYearPicker'\n\ntype YearRangePickerRootContext = {\n  modelValue: Ref<DateRange>\n  startValue: Ref<DateValue | undefined>\n  endValue: Ref<DateValue | undefined>\n  locale: Ref<string>\n  placeholder: Ref<DateValue>\n  preventDeselect: Ref<boolean>\n  grid: Ref<Grid<DateValue>>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  initialFocus: Ref<boolean>\n  onPlaceholderChange: (date: DateValue) => void\n  fullCalendarLabel: Ref<string>\n  parentElement: Ref<HTMLElement | undefined>\n  headingValue: Ref<string>\n  headingId: string\n  isInvalid: Ref<boolean>\n  isYearDisabled: Matcher\n  isYearUnavailable?: Matcher\n  allowNonContiguousRanges: Ref<boolean>\n  highlightedRange: Ref<{ start: DateValue, end: DateValue } | null>\n  focusedValue: Ref<DateValue | undefined>\n  lastPressedDateValue: Ref<DateValue | undefined>\n  isSelected: (date: DateValue) => boolean\n  isSelectionEnd: (date: DateValue) => boolean\n  isSelectionStart: (date: DateValue) => boolean\n  isHighlightedStart: (date: DateValue) => boolean\n  isHighlightedEnd: (date: DateValue) => boolean\n  prevPage: (prevPageFunc?: (date: DateValue) => DateValue) => void\n  nextPage: (nextPageFunc?: (date: DateValue) => DateValue) => void\n  isNextButtonDisabled: (nextPageFunc?: (date: DateValue) => DateValue) => boolean\n  isPrevButtonDisabled: (prevPageFunc?: (date: DateValue) => DateValue) => boolean\n  formatter: Formatter\n  dir: Ref<Direction>\n  fixedDate: Ref<'start' | 'end' | undefined>\n  maximumYears: Ref<number | undefined>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n  yearsPerPage: Ref<number>\n}\n\nexport interface YearRangePickerRootProps extends PrimitiveProps {\n  /** The default placeholder date */\n  defaultPlaceholder?: DateValue\n  /** The default value for the calendar */\n  defaultValue?: DateRange\n  /** The controlled selected year range of the year range picker. Can be bound as `v-model`. */\n  modelValue?: DateRange | null\n  /** The placeholder date, which is used to determine what year range to display when no date is selected. */\n  placeholder?: DateValue\n  /** When combined with `isYearUnavailable`, determines whether non-contiguous ranges may be selected. */\n  allowNonContiguousRanges?: boolean\n  /** Whether or not to prevent the user from deselecting a date without selecting another date first */\n  preventDeselect?: boolean\n  /** The maximum number of years that can be selected in a range */\n  maximumYears?: number\n  /** The accessible label for the calendar */\n  calendarLabel?: string\n  /** The maximum date that can be selected */\n  maxValue?: DateValue\n  /** The minimum date that can be selected */\n  minValue?: DateValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** Whether or not the calendar is disabled */\n  disabled?: boolean\n  /** Whether or not the calendar is readonly */\n  readonly?: boolean\n  /** If true, the calendar will focus the selected year on mount */\n  initialFocus?: boolean\n  /** A function that returns whether or not a year is disabled */\n  isYearDisabled?: Matcher\n  /** A function that returns whether or not a year is unavailable */\n  isYearUnavailable?: Matcher\n  /** The reading direction of the calendar when applicable. */\n  dir?: Direction\n  /** A function that returns the next page of the calendar. */\n  nextPage?: (placeholder: DateValue) => DateValue\n  /** A function that returns the previous page of the calendar. */\n  prevPage?: (placeholder: DateValue) => DateValue\n  /** Which part of the range should be fixed */\n  fixedDate?: 'start' | 'end'\n  /** Number of years to display per page */\n  yearsPerPage?: number\n}\n\nexport type YearRangePickerRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateRange]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n  /** Event handler called whenever the start value changes */\n  'update:startValue': [date: DateValue | undefined]\n}\n\nexport const [injectYearRangePickerRootContext, provideYearRangePickerRootContext]\n  = createContext<YearRangePickerRootContext>('YearRangePickerRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useEventListener, useVModel } from '@vueuse/core'\nimport { computed, onMounted, ref, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<YearRangePickerRootProps>(), {\n  defaultValue: () => ({ start: undefined, end: undefined }),\n  as: 'div',\n  preventDeselect: false,\n  disabled: false,\n  readonly: false,\n  initialFocus: false,\n  placeholder: undefined,\n  isYearDisabled: undefined,\n  isYearUnavailable: undefined,\n  allowNonContiguousRanges: false,\n  maximumYears: undefined,\n  yearsPerPage: 12,\n})\nconst emits = defineEmits<YearRangePickerRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** The current date of the placeholder */\n    date: DateValue\n    /** The grid of years */\n    grid: Grid<DateValue>\n    /** The calendar locale */\n    locale: string\n    /** The current date range */\n    modelValue: DateRange\n  }) => any\n}>()\n\nconst {\n  disabled,\n  readonly,\n  initialFocus,\n  preventDeselect,\n  isYearUnavailable: propsIsYearUnavailable,\n  isYearDisabled: propsIsYearDisabled,\n  calendarLabel,\n  maxValue,\n  minValue,\n  dir: propDir,\n  locale: propLocale,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n  allowNonContiguousRanges,\n  fixedDate,\n  maximumYears,\n  yearsPerPage,\n} = toRefs(props)\n\nconst { primitiveElement, currentElement: parentElement } = usePrimitiveElement()\nconst dir = useDirection(propDir)\nconst locale = useLocale(propLocale)\nconst headingId = useId(undefined, 'reka-year-range-picker-heading')\n\nconst lastPressedDateValue = ref() as Ref<DateValue | undefined>\nconst focusedValue = ref() as Ref<DateValue | undefined>\nconst isEditing = ref(false)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? { start: undefined, end: undefined },\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateRange | null>\n\nconst normalizeRange = (value?: DateRange | null): DateRange => value ?? { start: undefined, end: undefined }\nconst normalizedModelValue = computed(() => normalizeRange(modelValue.value))\n\nconst validModelValue = ref(normalizeRange(modelValue.value)) as Ref<DateRange>\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  defaultValue: normalizeRange(modelValue.value).start,\n  locale: props.locale,\n})\n\nconst startValue = ref(normalizeRange(modelValue.value).start) as Ref<DateValue | undefined>\nconst endValue = ref(normalizeRange(modelValue.value).end) as Ref<DateValue | undefined>\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nfunction onPlaceholderChange(value: DateValue) {\n  placeholder.value = value.copy()\n}\n\nconst {\n  fullCalendarLabel,\n  headingValue,\n  isYearDisabled,\n  isYearUnavailable,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  grid,\n  nextPage,\n  prevPage,\n  formatter,\n} = useYearPicker({\n  locale,\n  placeholder,\n  minValue,\n  maxValue,\n  disabled,\n  yearsPerPage,\n  isYearDisabled: propsIsYearDisabled,\n  isYearUnavailable: propsIsYearUnavailable,\n  calendarLabel,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n})\n\nconst {\n  isInvalid,\n  isSelected,\n  highlightedRange,\n  isSelectionStart,\n  isSelectionEnd,\n  isHighlightedStart,\n  isHighlightedEnd,\n  isYearDisabled: rangeIsYearDisabled,\n} = useRangeYearPickerState({\n  start: startValue,\n  end: endValue,\n  isYearDisabled,\n  isYearUnavailable,\n  focusedValue,\n  allowNonContiguousRanges,\n  fixedDate,\n  maximumYears,\n})\n\nwatch(modelValue, (_modelValue) => {\n  const next = normalizeRange(_modelValue)\n\n  const isStartSynced = (!next.start && !startValue.value)\n    || (!!next.start && !!startValue.value && isSameYear(next.start, startValue.value))\n\n  if (!isStartSynced) {\n    startValue.value = next.start?.copy?.()\n  }\n\n  const isEndSynced = (!next.end && !endValue.value)\n    || (!!next.end && !!endValue.value && isSameYear(next.end, endValue.value))\n\n  if (!isEndSynced) {\n    endValue.value = next.end?.copy?.()\n  }\n})\n\nwatch(startValue, (_startValue) => {\n  if (_startValue && !isSameYear(_startValue, placeholder.value))\n    onPlaceholderChange(_startValue)\n\n  emits('update:startValue', _startValue)\n})\n\nwatch([startValue, endValue], ([_startValue, _endValue]) => {\n  const value = modelValue.value\n\n  if (\n    value\n    && value.start\n    && value.end\n    && _startValue\n    && _endValue\n    && isSameYear(value.start, _startValue)\n    && isSameYear(value.end, _endValue)\n  ) {\n    return\n  }\n\n  isEditing.value = true\n  if (_endValue && _startValue) {\n    const nextValue = _endValue.year < _startValue.year\n      ? { start: _endValue.copy(), end: _startValue.copy() }\n      : { start: _startValue.copy(), end: _endValue.copy() }\n\n    modelValue.value = { start: nextValue.start, end: nextValue.end }\n    isEditing.value = false\n    validModelValue.value = { start: nextValue.start.copy(), end: nextValue.end.copy() }\n  }\n  else {\n    modelValue.value = _startValue\n      ? { start: _startValue.copy(), end: undefined }\n      : { start: _endValue?.copy(), end: undefined }\n  }\n})\n\nconst kbd = useKbd()\nuseEventListener(parentElement, 'keydown', (ev) => {\n  if (ev.key === kbd.ESCAPE && isEditing.value) {\n    startValue.value = validModelValue.value.start?.copy()\n    endValue.value = validModelValue.value.end?.copy()\n  }\n})\n\nprovideYearRangePickerRootContext({\n  isYearUnavailable,\n  startValue,\n  endValue,\n  formatter,\n  modelValue: normalizedModelValue,\n  placeholder,\n  disabled,\n  initialFocus,\n  grid,\n  readonly,\n  preventDeselect,\n  fullCalendarLabel,\n  headingValue,\n  headingId,\n  isInvalid,\n  isYearDisabled: rangeIsYearDisabled,\n  allowNonContiguousRanges,\n  highlightedRange,\n  focusedValue,\n  lastPressedDateValue,\n  isSelected,\n  isSelectionEnd,\n  isSelectionStart,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  nextPage,\n  prevPage,\n  parentElement,\n  onPlaceholderChange,\n  locale,\n  dir,\n  isHighlightedStart,\n  isHighlightedEnd,\n  fixedDate,\n  maximumYears,\n  minValue,\n  maxValue,\n  yearsPerPage,\n})\n\nonMounted(() => {\n  if (initialFocus.value)\n    handleCalendarInitialFocus(parentElement.value)\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-label=\"fullCalendarLabel\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n  >\n    <div\n      style=\"border: 0px; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; white-space: nowrap; width: 1px;\"\n    >\n      <div\n        role=\"heading\"\n        aria-level=\"2\"\n      >\n        {{ fullCalendarLabel }}\n      </div>\n    </div>\n\n    <slot\n      :date=\"placeholder\"\n      :grid=\"grid\"\n      :locale=\"locale\"\n      :model-value=\"normalizedModelValue\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { Ref } from 'vue'\nimport type { Grid, Matcher } from '@/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport type { Formatter } from '@/shared'\nimport type { DateRange } from '@/shared/date'\nimport type { Direction } from '@/shared/types'\nimport { isSameYear } from '@/date'\nimport { createContext, useDirection, useId, useKbd, useLocale } from '@/shared'\nimport { getDefaultDate, handleCalendarInitialFocus } from '@/shared/date'\nimport { useYearPicker } from '@/YearPicker/useYearPicker'\nimport { useRangeYearPickerState } from './useRangeYearPicker'\n\ntype YearRangePickerRootContext = {\n  modelValue: Ref<DateRange>\n  startValue: Ref<DateValue | undefined>\n  endValue: Ref<DateValue | undefined>\n  locale: Ref<string>\n  placeholder: Ref<DateValue>\n  preventDeselect: Ref<boolean>\n  grid: Ref<Grid<DateValue>>\n  disabled: Ref<boolean>\n  readonly: Ref<boolean>\n  initialFocus: Ref<boolean>\n  onPlaceholderChange: (date: DateValue) => void\n  fullCalendarLabel: Ref<string>\n  parentElement: Ref<HTMLElement | undefined>\n  headingValue: Ref<string>\n  headingId: string\n  isInvalid: Ref<boolean>\n  isYearDisabled: Matcher\n  isYearUnavailable?: Matcher\n  allowNonContiguousRanges: Ref<boolean>\n  highlightedRange: Ref<{ start: DateValue, end: DateValue } | null>\n  focusedValue: Ref<DateValue | undefined>\n  lastPressedDateValue: Ref<DateValue | undefined>\n  isSelected: (date: DateValue) => boolean\n  isSelectionEnd: (date: DateValue) => boolean\n  isSelectionStart: (date: DateValue) => boolean\n  isHighlightedStart: (date: DateValue) => boolean\n  isHighlightedEnd: (date: DateValue) => boolean\n  prevPage: (prevPageFunc?: (date: DateValue) => DateValue) => void\n  nextPage: (nextPageFunc?: (date: DateValue) => DateValue) => void\n  isNextButtonDisabled: (nextPageFunc?: (date: DateValue) => DateValue) => boolean\n  isPrevButtonDisabled: (prevPageFunc?: (date: DateValue) => DateValue) => boolean\n  formatter: Formatter\n  dir: Ref<Direction>\n  fixedDate: Ref<'start' | 'end' | undefined>\n  maximumYears: Ref<number | undefined>\n  minValue: Ref<DateValue | undefined>\n  maxValue: Ref<DateValue | undefined>\n  yearsPerPage: Ref<number>\n}\n\nexport interface YearRangePickerRootProps extends PrimitiveProps {\n  /** The default placeholder date */\n  defaultPlaceholder?: DateValue\n  /** The default value for the calendar */\n  defaultValue?: DateRange\n  /** The controlled selected year range of the year range picker. Can be bound as `v-model`. */\n  modelValue?: DateRange | null\n  /** The placeholder date, which is used to determine what year range to display when no date is selected. */\n  placeholder?: DateValue\n  /** When combined with `isYearUnavailable`, determines whether non-contiguous ranges may be selected. */\n  allowNonContiguousRanges?: boolean\n  /** Whether or not to prevent the user from deselecting a date without selecting another date first */\n  preventDeselect?: boolean\n  /** The maximum number of years that can be selected in a range */\n  maximumYears?: number\n  /** The accessible label for the calendar */\n  calendarLabel?: string\n  /** The maximum date that can be selected */\n  maxValue?: DateValue\n  /** The minimum date that can be selected */\n  minValue?: DateValue\n  /** The locale to use for formatting dates */\n  locale?: string\n  /** Whether or not the calendar is disabled */\n  disabled?: boolean\n  /** Whether or not the calendar is readonly */\n  readonly?: boolean\n  /** If true, the calendar will focus the selected year on mount */\n  initialFocus?: boolean\n  /** A function that returns whether or not a year is disabled */\n  isYearDisabled?: Matcher\n  /** A function that returns whether or not a year is unavailable */\n  isYearUnavailable?: Matcher\n  /** The reading direction of the calendar when applicable. */\n  dir?: Direction\n  /** A function that returns the next page of the calendar. */\n  nextPage?: (placeholder: DateValue) => DateValue\n  /** A function that returns the previous page of the calendar. */\n  prevPage?: (placeholder: DateValue) => DateValue\n  /** Which part of the range should be fixed */\n  fixedDate?: 'start' | 'end'\n  /** Number of years to display per page */\n  yearsPerPage?: number\n}\n\nexport type YearRangePickerRootEmits = {\n  /** Event handler called whenever the model value changes */\n  'update:modelValue': [date: DateRange]\n  /** Event handler called whenever the placeholder value changes */\n  'update:placeholder': [date: DateValue]\n  /** Event handler called whenever the start value changes */\n  'update:startValue': [date: DateValue | undefined]\n}\n\nexport const [injectYearRangePickerRootContext, provideYearRangePickerRootContext]\n  = createContext<YearRangePickerRootContext>('YearRangePickerRoot')\n</script>\n\n<script setup lang=\"ts\">\nimport { useEventListener, useVModel } from '@vueuse/core'\nimport { computed, onMounted, ref, toRefs, watch } from 'vue'\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\n\nconst props = withDefaults(defineProps<YearRangePickerRootProps>(), {\n  defaultValue: () => ({ start: undefined, end: undefined }),\n  as: 'div',\n  preventDeselect: false,\n  disabled: false,\n  readonly: false,\n  initialFocus: false,\n  placeholder: undefined,\n  isYearDisabled: undefined,\n  isYearUnavailable: undefined,\n  allowNonContiguousRanges: false,\n  maximumYears: undefined,\n  yearsPerPage: 12,\n})\nconst emits = defineEmits<YearRangePickerRootEmits>()\n\ndefineSlots<{\n  default?: (props: {\n    /** The current date of the placeholder */\n    date: DateValue\n    /** The grid of years */\n    grid: Grid<DateValue>\n    /** The calendar locale */\n    locale: string\n    /** The current date range */\n    modelValue: DateRange\n  }) => any\n}>()\n\nconst {\n  disabled,\n  readonly,\n  initialFocus,\n  preventDeselect,\n  isYearUnavailable: propsIsYearUnavailable,\n  isYearDisabled: propsIsYearDisabled,\n  calendarLabel,\n  maxValue,\n  minValue,\n  dir: propDir,\n  locale: propLocale,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n  allowNonContiguousRanges,\n  fixedDate,\n  maximumYears,\n  yearsPerPage,\n} = toRefs(props)\n\nconst { primitiveElement, currentElement: parentElement } = usePrimitiveElement()\nconst dir = useDirection(propDir)\nconst locale = useLocale(propLocale)\nconst headingId = useId(undefined, 'reka-year-range-picker-heading')\n\nconst lastPressedDateValue = ref() as Ref<DateValue | undefined>\nconst focusedValue = ref() as Ref<DateValue | undefined>\nconst isEditing = ref(false)\n\nconst modelValue = useVModel(props, 'modelValue', emits, {\n  defaultValue: props.defaultValue ?? { start: undefined, end: undefined },\n  passive: (props.modelValue === undefined) as false,\n}) as Ref<DateRange | null>\n\nconst normalizeRange = (value?: DateRange | null): DateRange => value ?? { start: undefined, end: undefined }\nconst normalizedModelValue = computed(() => normalizeRange(modelValue.value))\n\nconst validModelValue = ref(normalizeRange(modelValue.value)) as Ref<DateRange>\n\nconst defaultDate = getDefaultDate({\n  defaultPlaceholder: props.placeholder,\n  defaultValue: normalizeRange(modelValue.value).start,\n  locale: props.locale,\n})\n\nconst startValue = ref(normalizeRange(modelValue.value).start) as Ref<DateValue | undefined>\nconst endValue = ref(normalizeRange(modelValue.value).end) as Ref<DateValue | undefined>\n\nconst placeholder = useVModel(props, 'placeholder', emits, {\n  defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),\n  passive: (props.placeholder === undefined) as false,\n}) as Ref<DateValue>\n\nfunction onPlaceholderChange(value: DateValue) {\n  placeholder.value = value.copy()\n}\n\nconst {\n  fullCalendarLabel,\n  headingValue,\n  isYearDisabled,\n  isYearUnavailable,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  grid,\n  nextPage,\n  prevPage,\n  formatter,\n} = useYearPicker({\n  locale,\n  placeholder,\n  minValue,\n  maxValue,\n  disabled,\n  yearsPerPage,\n  isYearDisabled: propsIsYearDisabled,\n  isYearUnavailable: propsIsYearUnavailable,\n  calendarLabel,\n  nextPage: propsNextPage,\n  prevPage: propsPrevPage,\n})\n\nconst {\n  isInvalid,\n  isSelected,\n  highlightedRange,\n  isSelectionStart,\n  isSelectionEnd,\n  isHighlightedStart,\n  isHighlightedEnd,\n  isYearDisabled: rangeIsYearDisabled,\n} = useRangeYearPickerState({\n  start: startValue,\n  end: endValue,\n  isYearDisabled,\n  isYearUnavailable,\n  focusedValue,\n  allowNonContiguousRanges,\n  fixedDate,\n  maximumYears,\n})\n\nwatch(modelValue, (_modelValue) => {\n  const next = normalizeRange(_modelValue)\n\n  const isStartSynced = (!next.start && !startValue.value)\n    || (!!next.start && !!startValue.value && isSameYear(next.start, startValue.value))\n\n  if (!isStartSynced) {\n    startValue.value = next.start?.copy?.()\n  }\n\n  const isEndSynced = (!next.end && !endValue.value)\n    || (!!next.end && !!endValue.value && isSameYear(next.end, endValue.value))\n\n  if (!isEndSynced) {\n    endValue.value = next.end?.copy?.()\n  }\n})\n\nwatch(startValue, (_startValue) => {\n  if (_startValue && !isSameYear(_startValue, placeholder.value))\n    onPlaceholderChange(_startValue)\n\n  emits('update:startValue', _startValue)\n})\n\nwatch([startValue, endValue], ([_startValue, _endValue]) => {\n  const value = modelValue.value\n\n  if (\n    value\n    && value.start\n    && value.end\n    && _startValue\n    && _endValue\n    && isSameYear(value.start, _startValue)\n    && isSameYear(value.end, _endValue)\n  ) {\n    return\n  }\n\n  isEditing.value = true\n  if (_endValue && _startValue) {\n    const nextValue = _endValue.year < _startValue.year\n      ? { start: _endValue.copy(), end: _startValue.copy() }\n      : { start: _startValue.copy(), end: _endValue.copy() }\n\n    modelValue.value = { start: nextValue.start, end: nextValue.end }\n    isEditing.value = false\n    validModelValue.value = { start: nextValue.start.copy(), end: nextValue.end.copy() }\n  }\n  else {\n    modelValue.value = _startValue\n      ? { start: _startValue.copy(), end: undefined }\n      : { start: _endValue?.copy(), end: undefined }\n  }\n})\n\nconst kbd = useKbd()\nuseEventListener(parentElement, 'keydown', (ev) => {\n  if (ev.key === kbd.ESCAPE && isEditing.value) {\n    startValue.value = validModelValue.value.start?.copy()\n    endValue.value = validModelValue.value.end?.copy()\n  }\n})\n\nprovideYearRangePickerRootContext({\n  isYearUnavailable,\n  startValue,\n  endValue,\n  formatter,\n  modelValue: normalizedModelValue,\n  placeholder,\n  disabled,\n  initialFocus,\n  grid,\n  readonly,\n  preventDeselect,\n  fullCalendarLabel,\n  headingValue,\n  headingId,\n  isInvalid,\n  isYearDisabled: rangeIsYearDisabled,\n  allowNonContiguousRanges,\n  highlightedRange,\n  focusedValue,\n  lastPressedDateValue,\n  isSelected,\n  isSelectionEnd,\n  isSelectionStart,\n  isNextButtonDisabled,\n  isPrevButtonDisabled,\n  nextPage,\n  prevPage,\n  parentElement,\n  onPlaceholderChange,\n  locale,\n  dir,\n  isHighlightedStart,\n  isHighlightedEnd,\n  fixedDate,\n  maximumYears,\n  minValue,\n  maxValue,\n  yearsPerPage,\n})\n\nonMounted(() => {\n  if (initialFocus.value)\n    handleCalendarInitialFocus(parentElement.value)\n})\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"as\"\n    :as-child=\"asChild\"\n    :aria-label=\"fullCalendarLabel\"\n    :data-readonly=\"readonly ? '' : undefined\"\n    :data-disabled=\"disabled ? '' : undefined\"\n    :data-invalid=\"isInvalid ? '' : undefined\"\n    :dir=\"dir\"\n  >\n    <div\n      style=\"border: 0px; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; white-space: nowrap; width: 1px;\"\n    >\n      <div\n        role=\"heading\"\n        aria-level=\"2\"\n      >\n        {{ fullCalendarLabel }}\n      </div>\n    </div>\n\n    <slot\n      :date=\"placeholder\"\n      :grid=\"grid\"\n      :locale=\"locale\"\n      :model-value=\"normalizedModelValue\"\n    />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearRangePickerCellProps extends PrimitiveProps {\n  /** The date value for the cell */\n  date: DateValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectYearRangePickerRootContext } from './YearRangePickerRoot.vue'\n\nwithDefaults(defineProps<YearRangePickerCellProps>(), { as: 'td' })\nconst rootContext = injectYearRangePickerRootContext()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"gridcell\"\n    :aria-selected=\"rootContext.isSelected(date) ? true : undefined\"\n    :aria-disabled=\"rootContext.isYearDisabled(date) || rootContext.isYearUnavailable?.(date)\"\n    :data-disabled=\"rootContext.isYearDisabled(date) ? '' : undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearRangePickerCellProps extends PrimitiveProps {\n  /** The date value for the cell */\n  date: DateValue\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectYearRangePickerRootContext } from './YearRangePickerRoot.vue'\n\nwithDefaults(defineProps<YearRangePickerCellProps>(), { as: 'td' })\nconst rootContext = injectYearRangePickerRootContext()\n</script>\n\n<template>\n  <Primitive\n    :as=\"as\"\n    :as-child=\"asChild\"\n    role=\"gridcell\"\n    :aria-selected=\"rootContext.isSelected(date) ? true : undefined\"\n    :aria-disabled=\"rootContext.isYearDisabled(date) || rootContext.isYearUnavailable?.(date)\"\n    :data-disabled=\"rootContext.isYearDisabled(date) ? '' : undefined\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { endOfYear, getLocalTimeZone, startOfYear, toCalendar, today } from '@internationalized/date'\nimport { computed, nextTick } from 'vue'\nimport { isSameYear, isYearBetweenInclusive, toDate } from '@/date'\nimport { useKbd } from '@/shared'\n\nexport interface YearRangePickerCellTriggerProps extends PrimitiveProps {\n  /** The date value provided to the cell trigger */\n  year: DateValue\n}\n\nexport interface YearRangePickerCellTriggerSlot {\n  default?: (props: {\n    /** Current year value */\n    yearValue: string\n    /** Current disable state */\n    disabled: boolean\n    /** Current selected state */\n    selected: boolean\n    /** Current year is today's year state */\n    today: boolean\n    /** Current unavailable state */\n    unavailable: boolean\n    /** Current highlighted state */\n    highlighted: boolean\n    /** Current highlighted start state */\n    highlightedStart: boolean\n    /** Current highlighted end state */\n    highlightedEnd: boolean\n    /** Current selection start state */\n    selectionStart: boolean\n    /** Current selection end state */\n    selectionEnd: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { injectYearRangePickerRootContext } from './YearRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearRangePickerCellTriggerProps>(), { as: 'div' })\n\ndefineSlots<YearRangePickerCellTriggerSlot>()\n\nconst kbd = useKbd()\nconst rootContext = injectYearRangePickerRootContext()\n\nconst { primitiveElement } = usePrimitiveElement()\n\nconst yearValue = computed(() => {\n  rootContext.locale.value\n  return rootContext.formatter.fullYear(toDate(props.year))\n})\n\nconst labelText = computed(() => {\n  rootContext.locale.value\n  return rootContext.formatter.custom(toDate(props.year), { year: 'numeric' })\n})\n\nconst isUnavailable = computed(() => rootContext.isYearUnavailable?.(props.year) ?? false)\n\nconst isCurrentYear = computed(() => {\n  const todayDate = toCalendar(today(getLocalTimeZone()), props.year.calendar)\n  return isSameYear(props.year, todayDate)\n})\n\nconst isDisabled = computed(() => rootContext.isYearDisabled(props.year))\n\nconst isFocusedYear = computed(() => {\n  return !rootContext.disabled.value && isSameYear(props.year, rootContext.placeholder.value)\n})\n\nconst isSelectedYear = computed(() => rootContext.isSelected(props.year))\nconst isSelectionStart = computed(() => rootContext.isSelectionStart(props.year))\nconst isSelectionEnd = computed(() => rootContext.isSelectionEnd(props.year))\nconst isHighlightStart = computed(() => rootContext.isHighlightedStart(props.year))\nconst isHighlightEnd = computed(() => rootContext.isHighlightedEnd(props.year))\nconst isHighlighted = computed(() => rootContext.highlightedRange.value\n  ? isYearBetweenInclusive(props.year, rootContext.highlightedRange.value.start, rootContext.highlightedRange.value.end)\n  : false)\nconst allowNonContiguousRanges = computed(() => rootContext.allowNonContiguousRanges.value)\n\nfunction changeYear(e: MouseEvent | KeyboardEvent, date: DateValue) {\n  if (rootContext.readonly.value)\n    return\n  if (rootContext.isYearDisabled(date) || rootContext.isYearUnavailable?.(date))\n    return\n\n  if (rootContext.startValue.value && rootContext.highlightedRange.value === null) {\n    if (isSameYear(date, rootContext.startValue.value) && !rootContext.preventDeselect.value && !rootContext.endValue.value) {\n      rootContext.startValue.value = undefined\n      rootContext.onPlaceholderChange(date)\n      rootContext.lastPressedDateValue.value = date.copy()\n      return\n    }\n    else if (!rootContext.endValue.value) {\n      e.preventDefault()\n      if (rootContext.lastPressedDateValue.value && isSameYear(rootContext.lastPressedDateValue.value, date))\n        rootContext.startValue.value = date.copy()\n      rootContext.lastPressedDateValue.value = date.copy()\n      return\n    }\n  }\n\n  rootContext.lastPressedDateValue.value = date.copy()\n\n  if (\n    rootContext.startValue.value\n    && rootContext.endValue.value\n    && isSameYear(rootContext.startValue.value, rootContext.endValue.value)\n    && isSameYear(rootContext.startValue.value, date)\n    && !rootContext.preventDeselect.value\n  ) {\n    rootContext.startValue.value = undefined\n    rootContext.endValue.value = undefined\n    rootContext.onPlaceholderChange(date)\n    return\n  }\n\n  if (!rootContext.startValue.value) {\n    rootContext.startValue.value = date.copy()\n  }\n  else if (!rootContext.endValue.value) {\n    rootContext.endValue.value = date.copy()\n  }\n  else if (rootContext.endValue.value && rootContext.startValue.value) {\n    if (!rootContext.fixedDate.value) {\n      rootContext.endValue.value = undefined\n      rootContext.startValue.value = date.copy()\n    }\n    else if (rootContext.fixedDate.value === 'start') {\n      if (date.compare(rootContext.startValue.value) < 0) {\n        rootContext.startValue.value = date.copy()\n      }\n      else {\n        rootContext.endValue.value = date.copy()\n      }\n    }\n    else if (rootContext.fixedDate.value === 'end') {\n      if (date.compare(rootContext.endValue.value) > 0) {\n        rootContext.endValue.value = date.copy()\n      }\n      else {\n        rootContext.startValue.value = date.copy()\n      }\n    }\n  }\n}\n\nfunction handleClick(e: MouseEvent) {\n  if (isDisabled.value)\n    return\n  changeYear(e, props.year)\n}\n\nfunction handleFocus() {\n  if (isDisabled.value || rootContext.isYearUnavailable?.(props.year))\n    return\n  rootContext.focusedValue.value = props.year.copy()\n}\n\nfunction handleArrowKey(e: KeyboardEvent) {\n  if (isDisabled.value)\n    return\n  e.preventDefault()\n  e.stopPropagation()\n  const parentElement = rootContext.parentElement.value!\n  const sign = rootContext.dir.value === 'rtl' ? -1 : 1\n\n  switch (e.code) {\n    case kbd.ARROW_RIGHT:\n      shiftFocus(props.year, sign)\n      break\n    case kbd.ARROW_LEFT:\n      shiftFocus(props.year, -sign)\n      break\n    case kbd.ARROW_UP:\n      shiftFocus(props.year, -4)\n      break\n    case kbd.ARROW_DOWN:\n      shiftFocus(props.year, 4)\n      break\n    case kbd.PAGE_UP:\n      shiftFocusPage(-1)\n      break\n    case kbd.PAGE_DOWN:\n      shiftFocusPage(1)\n      break\n    case kbd.ENTER:\n    case kbd.SPACE_CODE:\n      changeYear(e, props.year)\n  }\n\n  function shiftFocus(currentYear: DateValue, add: number, depth = 0) {\n    if (depth > 48)\n      return\n    const candidateYearValue = currentYear.add({ years: add })\n\n    if ((rootContext.minValue.value && endOfYear(candidateYearValue).compare(rootContext.minValue.value) < 0)\n      || (rootContext.maxValue.value && startOfYear(candidateYearValue).compare(rootContext.maxValue.value) > 0)) {\n      return\n    }\n\n    const candidateYear = parentElement.querySelector<HTMLElement>(`[data-value='${candidateYearValue.toString()}']`)\n\n    if (!candidateYear) {\n      if (add > 0) {\n        if (rootContext.isNextButtonDisabled())\n          return\n        rootContext.nextPage()\n      }\n      else {\n        if (rootContext.isPrevButtonDisabled())\n          return\n        rootContext.prevPage()\n      }\n      nextTick(() => {\n        shiftFocus(currentYear, add, depth + 1)\n      })\n      return\n    }\n\n    if (candidateYear && candidateYear.hasAttribute('data-disabled'))\n      return shiftFocus(candidateYearValue, add, depth + 1)\n\n    rootContext.onPlaceholderChange(candidateYearValue)\n    candidateYear?.focus()\n  }\n\n  function shiftFocusPage(direction: number) {\n    const yearsPerPage = rootContext.yearsPerPage.value\n    const candidateYearValue = props.year.add({ years: direction * yearsPerPage })\n\n    if ((rootContext.minValue.value && endOfYear(candidateYearValue).compare(rootContext.minValue.value) < 0)\n      || (rootContext.maxValue.value && startOfYear(candidateYearValue).compare(rootContext.maxValue.value) > 0)) {\n      return\n    }\n\n    if (direction > 0) {\n      if (rootContext.isNextButtonDisabled())\n        return\n      rootContext.nextPage()\n    }\n    else {\n      if (rootContext.isPrevButtonDisabled())\n        return\n      rootContext.prevPage()\n    }\n\n    nextTick(() => {\n      const candidateYear = parentElement.querySelector<HTMLElement>(`[data-value='${candidateYearValue.toString()}']`)\n      if (candidateYear && !candidateYear.hasAttribute('data-disabled')) {\n        rootContext.onPlaceholderChange(candidateYearValue)\n        candidateYear?.focus()\n        return\n      }\n\n      if (!candidateYear || candidateYear.hasAttribute('data-disabled'))\n        shiftFocus(candidateYearValue, direction > 0 ? 1 : -1, 1)\n    })\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    role=\"button\"\n    :aria-label=\"labelText\"\n    data-reka-year-range-picker-cell-trigger\n    :aria-pressed=\"isSelectedYear && (allowNonContiguousRanges || !isUnavailable) ? true : undefined\"\n    :aria-disabled=\"isDisabled || isUnavailable ? true : undefined\"\n    :data-highlighted=\"isHighlighted && (allowNonContiguousRanges || !isUnavailable) ? '' : undefined\"\n    :data-selection-start=\"isSelectionStart ? true : undefined\"\n    :data-selection-end=\"isSelectionEnd ? true : undefined\"\n    :data-highlighted-start=\"isHighlightStart ? true : undefined\"\n    :data-highlighted-end=\"isHighlightEnd ? true : undefined\"\n    :data-selected=\"isSelectedYear && (allowNonContiguousRanges || !isUnavailable) ? true : undefined\"\n    :data-value=\"year.toString()\"\n    :data-disabled=\"isDisabled ? '' : undefined\"\n    :data-unavailable=\"isUnavailable ? '' : undefined\"\n    :data-today=\"isCurrentYear ? '' : undefined\"\n    :data-focused=\"isFocusedYear ? '' : undefined\"\n    :tabindex=\"isFocusedYear ? 0 : isDisabled ? undefined : -1\"\n    @click=\"handleClick\"\n    @focusin=\"handleFocus\"\n    @mouseenter=\"handleFocus\"\n    @keydown.up.down.left.right.space.enter.page-up.page-down=\"handleArrowKey\"\n    @keydown.enter.prevent\n  >\n    <slot\n      :year-value=\"yearValue\"\n      :disabled=\"isDisabled\"\n      :today=\"isCurrentYear\"\n      :selected=\"isSelectedYear\"\n      :unavailable=\"isUnavailable\"\n      :highlighted=\"isHighlighted && (allowNonContiguousRanges || !isUnavailable)\"\n      :highlighted-start=\"isHighlightStart\"\n      :highlighted-end=\"isHighlightEnd\"\n      :selection-start=\"isSelectionStart\"\n      :selection-end=\"isSelectionEnd\"\n    >\n      {{ yearValue }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\nimport { endOfYear, getLocalTimeZone, startOfYear, toCalendar, today } from '@internationalized/date'\nimport { computed, nextTick } from 'vue'\nimport { isSameYear, isYearBetweenInclusive, toDate } from '@/date'\nimport { useKbd } from '@/shared'\n\nexport interface YearRangePickerCellTriggerProps extends PrimitiveProps {\n  /** The date value provided to the cell trigger */\n  year: DateValue\n}\n\nexport interface YearRangePickerCellTriggerSlot {\n  default?: (props: {\n    /** Current year value */\n    yearValue: string\n    /** Current disable state */\n    disabled: boolean\n    /** Current selected state */\n    selected: boolean\n    /** Current year is today's year state */\n    today: boolean\n    /** Current unavailable state */\n    unavailable: boolean\n    /** Current highlighted state */\n    highlighted: boolean\n    /** Current highlighted start state */\n    highlightedStart: boolean\n    /** Current highlighted end state */\n    highlightedEnd: boolean\n    /** Current selection start state */\n    selectionStart: boolean\n    /** Current selection end state */\n    selectionEnd: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive, usePrimitiveElement } from '@/Primitive'\nimport { injectYearRangePickerRootContext } from './YearRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearRangePickerCellTriggerProps>(), { as: 'div' })\n\ndefineSlots<YearRangePickerCellTriggerSlot>()\n\nconst kbd = useKbd()\nconst rootContext = injectYearRangePickerRootContext()\n\nconst { primitiveElement } = usePrimitiveElement()\n\nconst yearValue = computed(() => {\n  rootContext.locale.value\n  return rootContext.formatter.fullYear(toDate(props.year))\n})\n\nconst labelText = computed(() => {\n  rootContext.locale.value\n  return rootContext.formatter.custom(toDate(props.year), { year: 'numeric' })\n})\n\nconst isUnavailable = computed(() => rootContext.isYearUnavailable?.(props.year) ?? false)\n\nconst isCurrentYear = computed(() => {\n  const todayDate = toCalendar(today(getLocalTimeZone()), props.year.calendar)\n  return isSameYear(props.year, todayDate)\n})\n\nconst isDisabled = computed(() => rootContext.isYearDisabled(props.year))\n\nconst isFocusedYear = computed(() => {\n  return !rootContext.disabled.value && isSameYear(props.year, rootContext.placeholder.value)\n})\n\nconst isSelectedYear = computed(() => rootContext.isSelected(props.year))\nconst isSelectionStart = computed(() => rootContext.isSelectionStart(props.year))\nconst isSelectionEnd = computed(() => rootContext.isSelectionEnd(props.year))\nconst isHighlightStart = computed(() => rootContext.isHighlightedStart(props.year))\nconst isHighlightEnd = computed(() => rootContext.isHighlightedEnd(props.year))\nconst isHighlighted = computed(() => rootContext.highlightedRange.value\n  ? isYearBetweenInclusive(props.year, rootContext.highlightedRange.value.start, rootContext.highlightedRange.value.end)\n  : false)\nconst allowNonContiguousRanges = computed(() => rootContext.allowNonContiguousRanges.value)\n\nfunction changeYear(e: MouseEvent | KeyboardEvent, date: DateValue) {\n  if (rootContext.readonly.value)\n    return\n  if (rootContext.isYearDisabled(date) || rootContext.isYearUnavailable?.(date))\n    return\n\n  if (rootContext.startValue.value && rootContext.highlightedRange.value === null) {\n    if (isSameYear(date, rootContext.startValue.value) && !rootContext.preventDeselect.value && !rootContext.endValue.value) {\n      rootContext.startValue.value = undefined\n      rootContext.onPlaceholderChange(date)\n      rootContext.lastPressedDateValue.value = date.copy()\n      return\n    }\n    else if (!rootContext.endValue.value) {\n      e.preventDefault()\n      if (rootContext.lastPressedDateValue.value && isSameYear(rootContext.lastPressedDateValue.value, date))\n        rootContext.startValue.value = date.copy()\n      rootContext.lastPressedDateValue.value = date.copy()\n      return\n    }\n  }\n\n  rootContext.lastPressedDateValue.value = date.copy()\n\n  if (\n    rootContext.startValue.value\n    && rootContext.endValue.value\n    && isSameYear(rootContext.startValue.value, rootContext.endValue.value)\n    && isSameYear(rootContext.startValue.value, date)\n    && !rootContext.preventDeselect.value\n  ) {\n    rootContext.startValue.value = undefined\n    rootContext.endValue.value = undefined\n    rootContext.onPlaceholderChange(date)\n    return\n  }\n\n  if (!rootContext.startValue.value) {\n    rootContext.startValue.value = date.copy()\n  }\n  else if (!rootContext.endValue.value) {\n    rootContext.endValue.value = date.copy()\n  }\n  else if (rootContext.endValue.value && rootContext.startValue.value) {\n    if (!rootContext.fixedDate.value) {\n      rootContext.endValue.value = undefined\n      rootContext.startValue.value = date.copy()\n    }\n    else if (rootContext.fixedDate.value === 'start') {\n      if (date.compare(rootContext.startValue.value) < 0) {\n        rootContext.startValue.value = date.copy()\n      }\n      else {\n        rootContext.endValue.value = date.copy()\n      }\n    }\n    else if (rootContext.fixedDate.value === 'end') {\n      if (date.compare(rootContext.endValue.value) > 0) {\n        rootContext.endValue.value = date.copy()\n      }\n      else {\n        rootContext.startValue.value = date.copy()\n      }\n    }\n  }\n}\n\nfunction handleClick(e: MouseEvent) {\n  if (isDisabled.value)\n    return\n  changeYear(e, props.year)\n}\n\nfunction handleFocus() {\n  if (isDisabled.value || rootContext.isYearUnavailable?.(props.year))\n    return\n  rootContext.focusedValue.value = props.year.copy()\n}\n\nfunction handleArrowKey(e: KeyboardEvent) {\n  if (isDisabled.value)\n    return\n  e.preventDefault()\n  e.stopPropagation()\n  const parentElement = rootContext.parentElement.value!\n  const sign = rootContext.dir.value === 'rtl' ? -1 : 1\n\n  switch (e.code) {\n    case kbd.ARROW_RIGHT:\n      shiftFocus(props.year, sign)\n      break\n    case kbd.ARROW_LEFT:\n      shiftFocus(props.year, -sign)\n      break\n    case kbd.ARROW_UP:\n      shiftFocus(props.year, -4)\n      break\n    case kbd.ARROW_DOWN:\n      shiftFocus(props.year, 4)\n      break\n    case kbd.PAGE_UP:\n      shiftFocusPage(-1)\n      break\n    case kbd.PAGE_DOWN:\n      shiftFocusPage(1)\n      break\n    case kbd.ENTER:\n    case kbd.SPACE_CODE:\n      changeYear(e, props.year)\n  }\n\n  function shiftFocus(currentYear: DateValue, add: number, depth = 0) {\n    if (depth > 48)\n      return\n    const candidateYearValue = currentYear.add({ years: add })\n\n    if ((rootContext.minValue.value && endOfYear(candidateYearValue).compare(rootContext.minValue.value) < 0)\n      || (rootContext.maxValue.value && startOfYear(candidateYearValue).compare(rootContext.maxValue.value) > 0)) {\n      return\n    }\n\n    const candidateYear = parentElement.querySelector<HTMLElement>(`[data-value='${candidateYearValue.toString()}']`)\n\n    if (!candidateYear) {\n      if (add > 0) {\n        if (rootContext.isNextButtonDisabled())\n          return\n        rootContext.nextPage()\n      }\n      else {\n        if (rootContext.isPrevButtonDisabled())\n          return\n        rootContext.prevPage()\n      }\n      nextTick(() => {\n        shiftFocus(currentYear, add, depth + 1)\n      })\n      return\n    }\n\n    if (candidateYear && candidateYear.hasAttribute('data-disabled'))\n      return shiftFocus(candidateYearValue, add, depth + 1)\n\n    rootContext.onPlaceholderChange(candidateYearValue)\n    candidateYear?.focus()\n  }\n\n  function shiftFocusPage(direction: number) {\n    const yearsPerPage = rootContext.yearsPerPage.value\n    const candidateYearValue = props.year.add({ years: direction * yearsPerPage })\n\n    if ((rootContext.minValue.value && endOfYear(candidateYearValue).compare(rootContext.minValue.value) < 0)\n      || (rootContext.maxValue.value && startOfYear(candidateYearValue).compare(rootContext.maxValue.value) > 0)) {\n      return\n    }\n\n    if (direction > 0) {\n      if (rootContext.isNextButtonDisabled())\n        return\n      rootContext.nextPage()\n    }\n    else {\n      if (rootContext.isPrevButtonDisabled())\n        return\n      rootContext.prevPage()\n    }\n\n    nextTick(() => {\n      const candidateYear = parentElement.querySelector<HTMLElement>(`[data-value='${candidateYearValue.toString()}']`)\n      if (candidateYear && !candidateYear.hasAttribute('data-disabled')) {\n        rootContext.onPlaceholderChange(candidateYearValue)\n        candidateYear?.focus()\n        return\n      }\n\n      if (!candidateYear || candidateYear.hasAttribute('data-disabled'))\n        shiftFocus(candidateYearValue, direction > 0 ? 1 : -1, 1)\n    })\n  }\n}\n</script>\n\n<template>\n  <Primitive\n    ref=\"primitiveElement\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    role=\"button\"\n    :aria-label=\"labelText\"\n    data-reka-year-range-picker-cell-trigger\n    :aria-pressed=\"isSelectedYear && (allowNonContiguousRanges || !isUnavailable) ? true : undefined\"\n    :aria-disabled=\"isDisabled || isUnavailable ? true : undefined\"\n    :data-highlighted=\"isHighlighted && (allowNonContiguousRanges || !isUnavailable) ? '' : undefined\"\n    :data-selection-start=\"isSelectionStart ? true : undefined\"\n    :data-selection-end=\"isSelectionEnd ? true : undefined\"\n    :data-highlighted-start=\"isHighlightStart ? true : undefined\"\n    :data-highlighted-end=\"isHighlightEnd ? true : undefined\"\n    :data-selected=\"isSelectedYear && (allowNonContiguousRanges || !isUnavailable) ? true : undefined\"\n    :data-value=\"year.toString()\"\n    :data-disabled=\"isDisabled ? '' : undefined\"\n    :data-unavailable=\"isUnavailable ? '' : undefined\"\n    :data-today=\"isCurrentYear ? '' : undefined\"\n    :data-focused=\"isFocusedYear ? '' : undefined\"\n    :tabindex=\"isFocusedYear ? 0 : isDisabled ? undefined : -1\"\n    @click=\"handleClick\"\n    @focusin=\"handleFocus\"\n    @mouseenter=\"handleFocus\"\n    @keydown.up.down.left.right.space.enter.page-up.page-down=\"handleArrowKey\"\n    @keydown.enter.prevent\n  >\n    <slot\n      :year-value=\"yearValue\"\n      :disabled=\"isDisabled\"\n      :today=\"isCurrentYear\"\n      :selected=\"isSelectedYear\"\n      :unavailable=\"isUnavailable\"\n      :highlighted=\"isHighlighted && (allowNonContiguousRanges || !isUnavailable)\"\n      :highlighted-start=\"isHighlightStart\"\n      :highlighted-end=\"isHighlightEnd\"\n      :selection-start=\"isSelectionStart\"\n      :selection-end=\"isSelectionEnd\"\n    >\n      {{ yearValue }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearRangePickerGridProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectYearRangePickerRootContext } from './YearRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearRangePickerGridProps>(), { as: 'table' })\n\nconst rootContext = injectYearRangePickerRootContext()\nconst disabled = computed(() => rootContext.disabled.value ? true : undefined)\nconst readonly = computed(() => rootContext.readonly.value ? true : undefined)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    tabindex=\"-1\"\n    role=\"application\"\n    :aria-labelledby=\"rootContext.headingId\"\n    :aria-readonly=\"readonly\"\n    :aria-disabled=\"disabled\"\n    :data-readonly=\"readonly && ''\"\n    :data-disabled=\"disabled && ''\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearRangePickerGridProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectYearRangePickerRootContext } from './YearRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearRangePickerGridProps>(), { as: 'table' })\n\nconst rootContext = injectYearRangePickerRootContext()\nconst disabled = computed(() => rootContext.disabled.value ? true : undefined)\nconst readonly = computed(() => rootContext.readonly.value ? true : undefined)\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    tabindex=\"-1\"\n    role=\"application\"\n    :aria-labelledby=\"rootContext.headingId\"\n    :aria-readonly=\"readonly\"\n    :aria-disabled=\"disabled\"\n    :data-readonly=\"readonly && ''\"\n    :data-disabled=\"disabled && ''\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearRangePickerGridBodyProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<YearRangePickerGridBodyProps>(), { as: 'tbody' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearRangePickerGridBodyProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<YearRangePickerGridBodyProps>(), { as: 'tbody' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearRangePickerGridRowProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<YearRangePickerGridRowProps>(), { as: 'tr' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    role=\"row\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearRangePickerGridRowProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<YearRangePickerGridRowProps>(), { as: 'tr' })\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    role=\"row\"\n  >\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearRangePickerHeaderProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<YearRangePickerHeaderProps>(), { as: 'div' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearRangePickerHeaderProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\n\nconst props = withDefaults(defineProps<YearRangePickerHeaderProps>(), { as: 'div' })\n</script>\n\n<template>\n  <Primitive v-bind=\"props\">\n    <slot />\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearRangePickerHeadingProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectYearRangePickerRootContext } from './YearRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearRangePickerHeadingProps>(), { as: 'div' })\n\ndefineSlots<{\n  default?: (props: {\n    /** Current year range heading */\n    headingValue: string\n  }) => any\n}>()\n\nconst rootContext = injectYearRangePickerRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"rootContext.headingId\"\n    role=\"heading\"\n    aria-level=\"2\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n  >\n    <slot :heading-value=\"rootContext.headingValue.value\">\n      {{ rootContext.headingValue.value }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearRangePickerHeadingProps extends PrimitiveProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { Primitive } from '@/Primitive'\nimport { injectYearRangePickerRootContext } from './YearRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearRangePickerHeadingProps>(), { as: 'div' })\n\ndefineSlots<{\n  default?: (props: {\n    /** Current year range heading */\n    headingValue: string\n  }) => any\n}>()\n\nconst rootContext = injectYearRangePickerRootContext()\n</script>\n\n<template>\n  <Primitive\n    v-bind=\"props\"\n    :id=\"rootContext.headingId\"\n    role=\"heading\"\n    aria-level=\"2\"\n    :data-disabled=\"rootContext.disabled.value ? '' : undefined\"\n  >\n    <slot :heading-value=\"rootContext.headingValue.value\">\n      {{ rootContext.headingValue.value }}\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearRangePickerNextProps extends PrimitiveProps {\n  /** The function to be used for the next page. Overwrites the `nextPage` function set on the Root. */\n  nextPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface YearRangePickerNextSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectYearRangePickerRootContext } from './YearRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearRangePickerNextProps>(), { as: 'button' })\ndefineSlots<YearRangePickerNextSlot>()\n\nconst rootContext = injectYearRangePickerRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isNextButtonDisabled(props.nextPage))\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.nextPage(props.nextPage)\n}\n</script>\n\n<template>\n  <Primitive\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    aria-label=\"Next page\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Next page\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearRangePickerNextProps extends PrimitiveProps {\n  /** The function to be used for the next page. Overwrites the `nextPage` function set on the Root. */\n  nextPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface YearRangePickerNextSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectYearRangePickerRootContext } from './YearRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearRangePickerNextProps>(), { as: 'button' })\ndefineSlots<YearRangePickerNextSlot>()\n\nconst rootContext = injectYearRangePickerRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isNextButtonDisabled(props.nextPage))\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.nextPage(props.nextPage)\n}\n</script>\n\n<template>\n  <Primitive\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    aria-label=\"Next page\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Next page\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearRangePickerPrevProps extends PrimitiveProps {\n  /** The function to be used for the prev page. Overwrites the `prevPage` function set on the Root. */\n  prevPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface YearRangePickerPrevSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectYearRangePickerRootContext } from './YearRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearRangePickerPrevProps>(), { as: 'button' })\ndefineSlots<YearRangePickerPrevSlot>()\n\nconst rootContext = injectYearRangePickerRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isPrevButtonDisabled(props.prevPage))\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.prevPage(props.prevPage)\n}\n</script>\n\n<template>\n  <Primitive\n    aria-label=\"Previous page\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Prev page\n    </slot>\n  </Primitive>\n</template>\n","<script lang=\"ts\">\nimport type { DateValue } from '@internationalized/date'\nimport type { PrimitiveProps } from '@/Primitive'\n\nexport interface YearRangePickerPrevProps extends PrimitiveProps {\n  /** The function to be used for the prev page. Overwrites the `prevPage` function set on the Root. */\n  prevPage?: (placeholder: DateValue) => DateValue\n}\n\nexport interface YearRangePickerPrevSlot {\n  default?: (props: {\n    /** Current disable state */\n    disabled: boolean\n  }) => any\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Primitive } from '@/Primitive'\nimport { injectYearRangePickerRootContext } from './YearRangePickerRoot.vue'\n\nconst props = withDefaults(defineProps<YearRangePickerPrevProps>(), { as: 'button' })\ndefineSlots<YearRangePickerPrevSlot>()\n\nconst rootContext = injectYearRangePickerRootContext()\n\nconst disabled = computed(() => rootContext.disabled.value || rootContext.isPrevButtonDisabled(props.prevPage))\n\nfunction handleClick() {\n  if (disabled.value)\n    return\n  rootContext.prevPage(props.prevPage)\n}\n</script>\n\n<template>\n  <Primitive\n    aria-label=\"Previous page\"\n    :as=\"props.as\"\n    :as-child=\"props.asChild\"\n    :type=\"props.as === 'button' ? 'button' : undefined\"\n    :aria-disabled=\"disabled || undefined\"\n    :data-disabled=\"disabled || undefined\"\n    :disabled=\"disabled\"\n    @click=\"handleClick\"\n  >\n    <slot :disabled>\n      Prev page\n    </slot>\n  </Primitive>\n</template>\n","","require('./shared/arrays.cjs');\nrequire('./shared/browser.cjs');\nrequire('./shared/clamp.cjs');\nconst require_shared_createContext = require('./shared/createContext.cjs');\nrequire('./shared/getActiveElement.cjs');\nrequire('./shared/handleAndDispatchCustomEvent.cjs');\nrequire('./shared/isValidVNodeElement.cjs');\nrequire('./shared/nullish.cjs');\nrequire('./shared/isValueEqualOrExist.cjs');\nrequire('./shared/object.cjs');\nrequire('./shared/onFocusOutside.cjs');\nrequire('./shared/renderSlotFragments.cjs');\nrequire('./shared/trap-focus.cjs');\nrequire('./shared/useArrowNavigation.cjs');\nconst require_ConfigProvider_ConfigProvider = require('./ConfigProvider/ConfigProvider.cjs');\nconst require_shared_useBodyScrollLock = require('./shared/useBodyScrollLock.cjs');\nrequire('./shared/useComposing.cjs');\nrequire('./date/comparators.cjs');\nrequire('./date/utils.cjs');\nrequire('./date/calendar.cjs');\nrequire('./date/index.cjs');\nconst require_shared_useDateFormatter = require('./shared/useDateFormatter.cjs');\nconst require_shared_useDirection = require('./shared/useDirection.cjs');\nconst require_shared_useEmitAsProps = require('./shared/useEmitAsProps.cjs');\nconst require_shared_useFilter = require('./shared/useFilter.cjs');\nrequire('./shared/useFocusGuards.cjs');\nrequire('./shared/useFormControl.cjs');\nconst require_shared_useForwardExpose = require('./shared/useForwardExpose.cjs');\nconst require_shared_useForwardProps = require('./shared/useForwardProps.cjs');\nconst require_shared_useForwardPropsEmits = require('./shared/useForwardPropsEmits.cjs');\nrequire('./shared/useForwardRef.cjs');\nrequire('./shared/useGraceArea.cjs');\nrequire('./shared/useHideOthers.cjs');\nconst require_shared_useId = require('./shared/useId.cjs');\nrequire('./shared/useKbd.cjs');\nconst require_shared_useLocale = require('./shared/useLocale.cjs');\nrequire('./shared/useSelectionBehavior.cjs');\nrequire('./shared/useSize.cjs');\nconst require_shared_useStateMachine = require('./shared/useStateMachine.cjs');\nrequire('./shared/useTypeahead.cjs');\nconst require_shared_withDefault = require('./shared/withDefault.cjs');\nrequire('./shared/index.cjs');\nrequire('./Presence/usePresence.cjs');\nconst require_Presence_Presence = require('./Presence/Presence.cjs');\nconst require_Primitive_Slot = require('./Primitive/Slot.cjs');\nconst require_Primitive_Primitive = require('./Primitive/Primitive.cjs');\nrequire('./Primitive/usePrimitiveElement.cjs');\nconst require_Collapsible_CollapsibleRoot = require('./Collapsible/CollapsibleRoot.cjs');\nconst require_Collapsible_CollapsibleContent = require('./Collapsible/CollapsibleContent.cjs');\nconst require_Collapsible_CollapsibleTrigger = require('./Collapsible/CollapsibleTrigger.cjs');\nrequire('./shared/useSingleOrMultipleValue.cjs');\nconst require_Accordion_AccordionRoot = require('./Accordion/AccordionRoot.cjs');\nconst require_Accordion_AccordionItem = require('./Accordion/AccordionItem.cjs');\nconst require_Accordion_AccordionContent = require('./Accordion/AccordionContent.cjs');\nconst require_Accordion_AccordionHeader = require('./Accordion/AccordionHeader.cjs');\nconst require_Accordion_AccordionTrigger = require('./Accordion/AccordionTrigger.cjs');\nconst require_Dialog_DialogRoot = require('./Dialog/DialogRoot.cjs');\nconst require_Dialog_DialogClose = require('./Dialog/DialogClose.cjs');\nrequire('./DismissableLayer/utils.cjs');\nrequire('./DismissableLayer/DismissableLayer.cjs');\nrequire('./DismissableLayer/DismissableLayerBranch.cjs');\nrequire('./FocusScope/stack.cjs');\nrequire('./FocusScope/utils.cjs');\nconst require_FocusScope_FocusScope = require('./FocusScope/FocusScope.cjs');\nrequire('./Menu/utils.cjs');\nrequire('./Dialog/utils.cjs');\nrequire('./Dialog/DialogContentImpl.cjs');\nrequire('./Dialog/DialogContentModal.cjs');\nrequire('./Dialog/DialogContentNonModal.cjs');\nconst require_Dialog_DialogContent = require('./Dialog/DialogContent.cjs');\nconst require_Dialog_DialogDescription = require('./Dialog/DialogDescription.cjs');\nrequire('./Dialog/DialogOverlayImpl.cjs');\nconst require_Dialog_DialogOverlay = require('./Dialog/DialogOverlay.cjs');\nrequire('./Teleport/Teleport.cjs');\nconst require_Dialog_DialogPortal = require('./Dialog/DialogPortal.cjs');\nconst require_Dialog_DialogTitle = require('./Dialog/DialogTitle.cjs');\nconst require_Dialog_DialogTrigger = require('./Dialog/DialogTrigger.cjs');\nconst require_AlertDialog_AlertDialogAction = require('./AlertDialog/AlertDialogAction.cjs');\nconst require_AlertDialog_AlertDialogContent = require('./AlertDialog/AlertDialogContent.cjs');\nconst require_AlertDialog_AlertDialogCancel = require('./AlertDialog/AlertDialogCancel.cjs');\nconst require_AlertDialog_AlertDialogDescription = require('./AlertDialog/AlertDialogDescription.cjs');\nconst require_AlertDialog_AlertDialogOverlay = require('./AlertDialog/AlertDialogOverlay.cjs');\nconst require_AlertDialog_AlertDialogPortal = require('./AlertDialog/AlertDialogPortal.cjs');\nconst require_AlertDialog_AlertDialogRoot = require('./AlertDialog/AlertDialogRoot.cjs');\nconst require_AlertDialog_AlertDialogTitle = require('./AlertDialog/AlertDialogTitle.cjs');\nconst require_AlertDialog_AlertDialogTrigger = require('./AlertDialog/AlertDialogTrigger.cjs');\nconst require_AspectRatio_AspectRatio = require('./AspectRatio/AspectRatio.cjs');\nrequire('./Collection/Collection.cjs');\nconst require_VisuallyHidden_VisuallyHidden = require('./VisuallyHidden/VisuallyHidden.cjs');\nrequire('./VisuallyHidden/VisuallyHiddenInputBubble.cjs');\nrequire('./VisuallyHidden/VisuallyHiddenInput.cjs');\nrequire('./Listbox/utils.cjs');\nrequire('./RovingFocus/utils.cjs');\nconst require_Listbox_ListboxRoot = require('./Listbox/ListboxRoot.cjs');\nconst require_Listbox_ListboxContent = require('./Listbox/ListboxContent.cjs');\nconst require_Listbox_ListboxFilter = require('./Listbox/ListboxFilter.cjs');\nconst require_Listbox_ListboxGroup = require('./Listbox/ListboxGroup.cjs');\nconst require_Listbox_ListboxGroupLabel = require('./Listbox/ListboxGroupLabel.cjs');\nconst require_Listbox_ListboxItem = require('./Listbox/ListboxItem.cjs');\nconst require_Listbox_ListboxItemIndicator = require('./Listbox/ListboxItemIndicator.cjs');\nconst require_Listbox_ListboxVirtualizer = require('./Listbox/ListboxVirtualizer.cjs');\nrequire('./Popper/PopperRoot.cjs');\nrequire('./Popper/PopperAnchor.cjs');\nrequire('./component/Arrow.cjs');\nrequire('./Popper/utils.cjs');\nrequire('./Popper/PopperContent.cjs');\nrequire('./Popper/PopperArrow.cjs');\nconst require_Combobox_ComboboxRoot = require('./Combobox/ComboboxRoot.cjs');\nconst require_Autocomplete_AutocompleteRoot = require('./Autocomplete/AutocompleteRoot.cjs');\nconst require_Autocomplete_AutocompleteInput = require('./Autocomplete/AutocompleteInput.cjs');\nconst require_Combobox_ComboboxAnchor = require('./Combobox/ComboboxAnchor.cjs');\nrequire('./Combobox/ComboboxContentImpl.cjs');\nconst require_Combobox_ComboboxArrow = require('./Combobox/ComboboxArrow.cjs');\nconst require_Combobox_ComboboxCancel = require('./Combobox/ComboboxCancel.cjs');\nconst require_Combobox_ComboboxContent = require('./Combobox/ComboboxContent.cjs');\nconst require_Combobox_ComboboxEmpty = require('./Combobox/ComboboxEmpty.cjs');\nconst require_Combobox_ComboboxGroup = require('./Combobox/ComboboxGroup.cjs');\nconst require_Combobox_ComboboxInput = require('./Combobox/ComboboxInput.cjs');\nconst require_Combobox_ComboboxItem = require('./Combobox/ComboboxItem.cjs');\nconst require_Combobox_ComboboxItemIndicator = require('./Combobox/ComboboxItemIndicator.cjs');\nconst require_Combobox_ComboboxLabel = require('./Combobox/ComboboxLabel.cjs');\nconst require_Combobox_ComboboxPortal = require('./Combobox/ComboboxPortal.cjs');\nconst require_Combobox_ComboboxSeparator = require('./Combobox/ComboboxSeparator.cjs');\nconst require_Combobox_ComboboxTrigger = require('./Combobox/ComboboxTrigger.cjs');\nrequire('./shared/useNonce.cjs');\nconst require_Combobox_ComboboxViewport = require('./Combobox/ComboboxViewport.cjs');\nconst require_Combobox_ComboboxVirtualizer = require('./Combobox/ComboboxVirtualizer.cjs');\nconst require_Avatar_AvatarRoot = require('./Avatar/AvatarRoot.cjs');\nconst require_Avatar_AvatarFallback = require('./Avatar/AvatarFallback.cjs');\nrequire('./Avatar/utils.cjs');\nconst require_Avatar_AvatarImage = require('./Avatar/AvatarImage.cjs');\nrequire('./date/parser.cjs');\nrequire('./date/parts.cjs');\nrequire('./date/placeholders.cjs');\nrequire('./date/segment.cjs');\nrequire('./date/useDateField.cjs');\nrequire('./Calendar/useCalendar.cjs');\nconst require_Calendar_CalendarRoot = require('./Calendar/CalendarRoot.cjs');\nconst require_Calendar_CalendarCell = require('./Calendar/CalendarCell.cjs');\nconst require_Calendar_CalendarCellTrigger = require('./Calendar/CalendarCellTrigger.cjs');\nconst require_Calendar_CalendarGrid = require('./Calendar/CalendarGrid.cjs');\nconst require_Calendar_CalendarGridBody = require('./Calendar/CalendarGridBody.cjs');\nconst require_Calendar_CalendarGridHead = require('./Calendar/CalendarGridHead.cjs');\nconst require_Calendar_CalendarGridRow = require('./Calendar/CalendarGridRow.cjs');\nconst require_Calendar_CalendarHeadCell = require('./Calendar/CalendarHeadCell.cjs');\nconst require_Calendar_CalendarHeader = require('./Calendar/CalendarHeader.cjs');\nconst require_Calendar_CalendarHeading = require('./Calendar/CalendarHeading.cjs');\nconst require_Calendar_CalendarNext = require('./Calendar/CalendarNext.cjs');\nconst require_Calendar_CalendarPrev = require('./Calendar/CalendarPrev.cjs');\nconst require_RovingFocus_RovingFocusGroup = require('./RovingFocus/RovingFocusGroup.cjs');\nconst require_RovingFocus_RovingFocusItem = require('./RovingFocus/RovingFocusItem.cjs');\nconst require_Checkbox_CheckboxGroupRoot = require('./Checkbox/CheckboxGroupRoot.cjs');\nrequire('./Checkbox/utils.cjs');\nconst require_Checkbox_CheckboxRoot = require('./Checkbox/CheckboxRoot.cjs');\nconst require_Checkbox_CheckboxIndicator = require('./Checkbox/CheckboxIndicator.cjs');\nconst require_color_convert = require('./color/convert.cjs');\nconst require_color_channel = require('./color/channel.cjs');\nconst require_color_gradient = require('./color/gradient.cjs');\nconst require_color_parse = require('./color/parse.cjs');\nrequire('./color/utils.cjs');\nconst require_ColorArea_ColorAreaRoot = require('./ColorArea/ColorAreaRoot.cjs');\nrequire('./ColorArea/utils.cjs');\nconst require_ColorArea_ColorAreaArea = require('./ColorArea/ColorAreaArea.cjs');\nconst require_ColorArea_ColorAreaThumb = require('./ColorArea/ColorAreaThumb.cjs');\nconst require_ColorField_ColorFieldRoot = require('./ColorField/ColorFieldRoot.cjs');\nconst require_ColorField_ColorFieldInput = require('./ColorField/ColorFieldInput.cjs');\nrequire('./Slider/utils.cjs');\nrequire('./Slider/SliderImpl.cjs');\nrequire('./Slider/SliderHorizontal.cjs');\nrequire('./Slider/SliderVertical.cjs');\nconst require_Slider_SliderRoot = require('./Slider/SliderRoot.cjs');\nconst require_Slider_SliderRange = require('./Slider/SliderRange.cjs');\nrequire('./Slider/SliderThumbImpl.cjs');\nconst require_Slider_SliderThumb = require('./Slider/SliderThumb.cjs');\nconst require_Slider_SliderTrack = require('./Slider/SliderTrack.cjs');\nconst require_ColorSlider_ColorSliderRoot = require('./ColorSlider/ColorSliderRoot.cjs');\nconst require_ColorSlider_ColorSliderThumb = require('./ColorSlider/ColorSliderThumb.cjs');\nconst require_ColorSlider_ColorSliderTrack = require('./ColorSlider/ColorSliderTrack.cjs');\nconst require_ColorSwatch_ColorSwatch = require('./ColorSwatch/ColorSwatch.cjs');\nconst require_ColorSwatchPicker_ColorSwatchPickerItem = require('./ColorSwatchPicker/ColorSwatchPickerItem.cjs');\nconst require_ColorSwatchPicker_ColorSwatchPickerItemIndicator = require('./ColorSwatchPicker/ColorSwatchPickerItemIndicator.cjs');\nconst require_ColorSwatchPicker_ColorSwatchPickerItemSwatch = require('./ColorSwatchPicker/ColorSwatchPickerItemSwatch.cjs');\nconst require_ColorSwatchPicker_ColorSwatchPickerRoot = require('./ColorSwatchPicker/ColorSwatchPickerRoot.cjs');\nrequire('./Menu/MenuAnchor.cjs');\nrequire('./Menu/MenuArrow.cjs');\nrequire('./shared/useIsUsingKeyboard.cjs');\nrequire('./Menu/MenuRoot.cjs');\nrequire('./Menu/MenuContentImpl.cjs');\nrequire('./Menu/MenuItemImpl.cjs');\nrequire('./Menu/MenuItem.cjs');\nrequire('./Menu/MenuItemIndicator.cjs');\nrequire('./Menu/MenuCheckboxItem.cjs');\nrequire('./Menu/MenuRootContentModal.cjs');\nrequire('./Menu/MenuRootContentNonModal.cjs');\nrequire('./Menu/MenuContent.cjs');\nrequire('./Menu/MenuGroup.cjs');\nrequire('./Menu/MenuLabel.cjs');\nrequire('./Menu/MenuPortal.cjs');\nrequire('./Menu/MenuRadioGroup.cjs');\nrequire('./Menu/MenuRadioItem.cjs');\nrequire('./Menu/MenuSeparator.cjs');\nrequire('./Menu/MenuSub.cjs');\nrequire('./Menu/MenuSubContent.cjs');\nrequire('./Menu/MenuSubTrigger.cjs');\nconst require_ContextMenu_ContextMenuArrow = require('./ContextMenu/ContextMenuArrow.cjs');\nconst require_ContextMenu_ContextMenuCheckboxItem = require('./ContextMenu/ContextMenuCheckboxItem.cjs');\nconst require_ContextMenu_ContextMenuRoot = require('./ContextMenu/ContextMenuRoot.cjs');\nconst require_ContextMenu_ContextMenuContent = require('./ContextMenu/ContextMenuContent.cjs');\nconst require_ContextMenu_ContextMenuGroup = require('./ContextMenu/ContextMenuGroup.cjs');\nconst require_ContextMenu_ContextMenuItem = require('./ContextMenu/ContextMenuItem.cjs');\nconst require_ContextMenu_ContextMenuItemIndicator = require('./ContextMenu/ContextMenuItemIndicator.cjs');\nconst require_ContextMenu_ContextMenuLabel = require('./ContextMenu/ContextMenuLabel.cjs');\nconst require_ContextMenu_ContextMenuPortal = require('./ContextMenu/ContextMenuPortal.cjs');\nconst require_ContextMenu_ContextMenuRadioGroup = require('./ContextMenu/ContextMenuRadioGroup.cjs');\nconst require_ContextMenu_ContextMenuRadioItem = require('./ContextMenu/ContextMenuRadioItem.cjs');\nconst require_ContextMenu_ContextMenuSeparator = require('./ContextMenu/ContextMenuSeparator.cjs');\nconst require_ContextMenu_ContextMenuSub = require('./ContextMenu/ContextMenuSub.cjs');\nconst require_ContextMenu_ContextMenuSubContent = require('./ContextMenu/ContextMenuSubContent.cjs');\nconst require_ContextMenu_ContextMenuSubTrigger = require('./ContextMenu/ContextMenuSubTrigger.cjs');\nrequire('./ContextMenu/utils.cjs');\nconst require_ContextMenu_ContextMenuTrigger = require('./ContextMenu/ContextMenuTrigger.cjs');\nconst require_DateField_DateFieldRoot = require('./DateField/DateFieldRoot.cjs');\nconst require_DateField_DateFieldInput = require('./DateField/DateFieldInput.cjs');\nconst require_DatePicker_DatePickerAnchor = require('./DatePicker/DatePickerAnchor.cjs');\nconst require_DatePicker_DatePickerArrow = require('./DatePicker/DatePickerArrow.cjs');\nconst require_DatePicker_DatePickerRoot = require('./DatePicker/DatePickerRoot.cjs');\nconst require_DatePicker_DatePickerCalendar = require('./DatePicker/DatePickerCalendar.cjs');\nconst require_DatePicker_DatePickerCell = require('./DatePicker/DatePickerCell.cjs');\nconst require_DatePicker_DatePickerCellTrigger = require('./DatePicker/DatePickerCellTrigger.cjs');\nconst require_DatePicker_DatePickerClose = require('./DatePicker/DatePickerClose.cjs');\nconst require_DatePicker_DatePickerContent = require('./DatePicker/DatePickerContent.cjs');\nconst require_DatePicker_DatePickerField = require('./DatePicker/DatePickerField.cjs');\nconst require_DatePicker_DatePickerGrid = require('./DatePicker/DatePickerGrid.cjs');\nconst require_DatePicker_DatePickerGridBody = require('./DatePicker/DatePickerGridBody.cjs');\nconst require_DatePicker_DatePickerGridHead = require('./DatePicker/DatePickerGridHead.cjs');\nconst require_DatePicker_DatePickerGridRow = require('./DatePicker/DatePickerGridRow.cjs');\nconst require_DatePicker_DatePickerHeadCell = require('./DatePicker/DatePickerHeadCell.cjs');\nconst require_DatePicker_DatePickerHeader = require('./DatePicker/DatePickerHeader.cjs');\nconst require_DatePicker_DatePickerHeading = require('./DatePicker/DatePickerHeading.cjs');\nconst require_DatePicker_DatePickerInput = require('./DatePicker/DatePickerInput.cjs');\nconst require_DatePicker_DatePickerNext = require('./DatePicker/DatePickerNext.cjs');\nconst require_DatePicker_DatePickerPrev = require('./DatePicker/DatePickerPrev.cjs');\nconst require_DatePicker_DatePickerTrigger = require('./DatePicker/DatePickerTrigger.cjs');\nconst require_DateRangeField_DateRangeFieldRoot = require('./DateRangeField/DateRangeFieldRoot.cjs');\nconst require_DateRangeField_DateRangeFieldInput = require('./DateRangeField/DateRangeFieldInput.cjs');\nconst require_DateRangePicker_DateRangePickerAnchor = require('./DateRangePicker/DateRangePickerAnchor.cjs');\nconst require_DateRangePicker_DateRangePickerArrow = require('./DateRangePicker/DateRangePickerArrow.cjs');\nconst require_DateRangePicker_DateRangePickerRoot = require('./DateRangePicker/DateRangePickerRoot.cjs');\nconst require_DateRangePicker_DateRangePickerCalendar = require('./DateRangePicker/DateRangePickerCalendar.cjs');\nconst require_DateRangePicker_DateRangePickerCell = require('./DateRangePicker/DateRangePickerCell.cjs');\nconst require_DateRangePicker_DateRangePickerCellTrigger = require('./DateRangePicker/DateRangePickerCellTrigger.cjs');\nconst require_DateRangePicker_DateRangePickerClose = require('./DateRangePicker/DateRangePickerClose.cjs');\nconst require_DateRangePicker_DateRangePickerContent = require('./DateRangePicker/DateRangePickerContent.cjs');\nconst require_DateRangePicker_DateRangePickerField = require('./DateRangePicker/DateRangePickerField.cjs');\nconst require_DateRangePicker_DateRangePickerGrid = require('./DateRangePicker/DateRangePickerGrid.cjs');\nconst require_DateRangePicker_DateRangePickerGridBody = require('./DateRangePicker/DateRangePickerGridBody.cjs');\nconst require_DateRangePicker_DateRangePickerGridHead = require('./DateRangePicker/DateRangePickerGridHead.cjs');\nconst require_DateRangePicker_DateRangePickerGridRow = require('./DateRangePicker/DateRangePickerGridRow.cjs');\nconst require_DateRangePicker_DateRangePickerHeadCell = require('./DateRangePicker/DateRangePickerHeadCell.cjs');\nconst require_DateRangePicker_DateRangePickerHeader = require('./DateRangePicker/DateRangePickerHeader.cjs');\nconst require_DateRangePicker_DateRangePickerHeading = require('./DateRangePicker/DateRangePickerHeading.cjs');\nconst require_DateRangePicker_DateRangePickerInput = require('./DateRangePicker/DateRangePickerInput.cjs');\nconst require_DateRangePicker_DateRangePickerNext = require('./DateRangePicker/DateRangePickerNext.cjs');\nconst require_DateRangePicker_DateRangePickerPrev = require('./DateRangePicker/DateRangePickerPrev.cjs');\nconst require_DateRangePicker_DateRangePickerTrigger = require('./DateRangePicker/DateRangePickerTrigger.cjs');\nconst require_DropdownMenu_DropdownMenuArrow = require('./DropdownMenu/DropdownMenuArrow.cjs');\nconst require_DropdownMenu_DropdownMenuCheckboxItem = require('./DropdownMenu/DropdownMenuCheckboxItem.cjs');\nconst require_DropdownMenu_DropdownMenuRoot = require('./DropdownMenu/DropdownMenuRoot.cjs');\nconst require_DropdownMenu_DropdownMenuContent = require('./DropdownMenu/DropdownMenuContent.cjs');\nconst require_DropdownMenu_DropdownMenuFilter = require('./DropdownMenu/DropdownMenuFilter.cjs');\nconst require_DropdownMenu_DropdownMenuGroup = require('./DropdownMenu/DropdownMenuGroup.cjs');\nconst require_DropdownMenu_DropdownMenuItem = require('./DropdownMenu/DropdownMenuItem.cjs');\nconst require_DropdownMenu_DropdownMenuItemIndicator = require('./DropdownMenu/DropdownMenuItemIndicator.cjs');\nconst require_DropdownMenu_DropdownMenuLabel = require('./DropdownMenu/DropdownMenuLabel.cjs');\nconst require_DropdownMenu_DropdownMenuPortal = require('./DropdownMenu/DropdownMenuPortal.cjs');\nconst require_DropdownMenu_DropdownMenuRadioGroup = require('./DropdownMenu/DropdownMenuRadioGroup.cjs');\nconst require_DropdownMenu_DropdownMenuRadioItem = require('./DropdownMenu/DropdownMenuRadioItem.cjs');\nconst require_DropdownMenu_DropdownMenuSeparator = require('./DropdownMenu/DropdownMenuSeparator.cjs');\nconst require_DropdownMenu_DropdownMenuSub = require('./DropdownMenu/DropdownMenuSub.cjs');\nconst require_DropdownMenu_DropdownMenuSubContent = require('./DropdownMenu/DropdownMenuSubContent.cjs');\nconst require_DropdownMenu_DropdownMenuSubTrigger = require('./DropdownMenu/DropdownMenuSubTrigger.cjs');\nconst require_DropdownMenu_DropdownMenuTrigger = require('./DropdownMenu/DropdownMenuTrigger.cjs');\nconst require_Editable_EditableRoot = require('./Editable/EditableRoot.cjs');\nconst require_Editable_EditableArea = require('./Editable/EditableArea.cjs');\nconst require_Editable_EditableCancelTrigger = require('./Editable/EditableCancelTrigger.cjs');\nconst require_Editable_EditableEditTrigger = require('./Editable/EditableEditTrigger.cjs');\nconst require_Editable_EditableInput = require('./Editable/EditableInput.cjs');\nconst require_Editable_EditablePreview = require('./Editable/EditablePreview.cjs');\nconst require_Editable_EditableSubmitTrigger = require('./Editable/EditableSubmitTrigger.cjs');\nconst require_HoverCard_HoverCardArrow = require('./HoverCard/HoverCardArrow.cjs');\nconst require_HoverCard_HoverCardRoot = require('./HoverCard/HoverCardRoot.cjs');\nrequire('./HoverCard/utils.cjs');\nrequire('./HoverCard/HoverCardContentImpl.cjs');\nconst require_HoverCard_HoverCardContent = require('./HoverCard/HoverCardContent.cjs');\nconst require_HoverCard_HoverCardPortal = require('./HoverCard/HoverCardPortal.cjs');\nconst require_HoverCard_HoverCardTrigger = require('./HoverCard/HoverCardTrigger.cjs');\nconst require_Label_Label = require('./Label/Label.cjs');\nconst require_Menubar_MenubarArrow = require('./Menubar/MenubarArrow.cjs');\nconst require_Menubar_MenubarCheckboxItem = require('./Menubar/MenubarCheckboxItem.cjs');\nconst require_Menubar_MenubarRoot = require('./Menubar/MenubarRoot.cjs');\nconst require_Menubar_MenubarMenu = require('./Menubar/MenubarMenu.cjs');\nconst require_Menubar_MenubarContent = require('./Menubar/MenubarContent.cjs');\nconst require_Menubar_MenubarGroup = require('./Menubar/MenubarGroup.cjs');\nconst require_Menubar_MenubarItem = require('./Menubar/MenubarItem.cjs');\nconst require_Menubar_MenubarItemIndicator = require('./Menubar/MenubarItemIndicator.cjs');\nconst require_Menubar_MenubarLabel = require('./Menubar/MenubarLabel.cjs');\nconst require_Menubar_MenubarPortal = require('./Menubar/MenubarPortal.cjs');\nconst require_Menubar_MenubarRadioGroup = require('./Menubar/MenubarRadioGroup.cjs');\nconst require_Menubar_MenubarRadioItem = require('./Menubar/MenubarRadioItem.cjs');\nconst require_Menubar_MenubarSeparator = require('./Menubar/MenubarSeparator.cjs');\nconst require_Menubar_MenubarSub = require('./Menubar/MenubarSub.cjs');\nconst require_Menubar_MenubarSubContent = require('./Menubar/MenubarSubContent.cjs');\nconst require_Menubar_MenubarSubTrigger = require('./Menubar/MenubarSubTrigger.cjs');\nconst require_Menubar_MenubarTrigger = require('./Menubar/MenubarTrigger.cjs');\nrequire('./MonthPicker/useMonthPicker.cjs');\nconst require_MonthPicker_MonthPickerRoot = require('./MonthPicker/MonthPickerRoot.cjs');\nconst require_MonthPicker_MonthPickerCell = require('./MonthPicker/MonthPickerCell.cjs');\nconst require_MonthPicker_MonthPickerCellTrigger = require('./MonthPicker/MonthPickerCellTrigger.cjs');\nconst require_MonthPicker_MonthPickerGrid = require('./MonthPicker/MonthPickerGrid.cjs');\nconst require_MonthPicker_MonthPickerGridBody = require('./MonthPicker/MonthPickerGridBody.cjs');\nconst require_MonthPicker_MonthPickerGridRow = require('./MonthPicker/MonthPickerGridRow.cjs');\nconst require_MonthPicker_MonthPickerHeader = require('./MonthPicker/MonthPickerHeader.cjs');\nconst require_MonthPicker_MonthPickerHeading = require('./MonthPicker/MonthPickerHeading.cjs');\nconst require_MonthPicker_MonthPickerNext = require('./MonthPicker/MonthPickerNext.cjs');\nconst require_MonthPicker_MonthPickerPrev = require('./MonthPicker/MonthPickerPrev.cjs');\nrequire('./MonthRangePicker/useRangeMonthPicker.cjs');\nconst require_MonthRangePicker_MonthRangePickerRoot = require('./MonthRangePicker/MonthRangePickerRoot.cjs');\nconst require_MonthRangePicker_MonthRangePickerCell = require('./MonthRangePicker/MonthRangePickerCell.cjs');\nconst require_MonthRangePicker_MonthRangePickerCellTrigger = require('./MonthRangePicker/MonthRangePickerCellTrigger.cjs');\nconst require_MonthRangePicker_MonthRangePickerGrid = require('./MonthRangePicker/MonthRangePickerGrid.cjs');\nconst require_MonthRangePicker_MonthRangePickerGridBody = require('./MonthRangePicker/MonthRangePickerGridBody.cjs');\nconst require_MonthRangePicker_MonthRangePickerGridRow = require('./MonthRangePicker/MonthRangePickerGridRow.cjs');\nconst require_MonthRangePicker_MonthRangePickerHeader = require('./MonthRangePicker/MonthRangePickerHeader.cjs');\nconst require_MonthRangePicker_MonthRangePickerHeading = require('./MonthRangePicker/MonthRangePickerHeading.cjs');\nconst require_MonthRangePicker_MonthRangePickerNext = require('./MonthRangePicker/MonthRangePickerNext.cjs');\nconst require_MonthRangePicker_MonthRangePickerPrev = require('./MonthRangePicker/MonthRangePickerPrev.cjs');\nrequire('./NavigationMenu/utils.cjs');\nconst require_NavigationMenu_NavigationMenuRoot = require('./NavigationMenu/NavigationMenuRoot.cjs');\nconst require_NavigationMenu_NavigationMenuItem = require('./NavigationMenu/NavigationMenuItem.cjs');\nrequire('./NavigationMenu/NavigationMenuContentImpl.cjs');\nconst require_NavigationMenu_NavigationMenuContent = require('./NavigationMenu/NavigationMenuContent.cjs');\nconst require_NavigationMenu_NavigationMenuIndicator = require('./NavigationMenu/NavigationMenuIndicator.cjs');\nconst require_NavigationMenu_NavigationMenuLink = require('./NavigationMenu/NavigationMenuLink.cjs');\nconst require_NavigationMenu_NavigationMenuList = require('./NavigationMenu/NavigationMenuList.cjs');\nconst require_NavigationMenu_NavigationMenuSub = require('./NavigationMenu/NavigationMenuSub.cjs');\nconst require_NavigationMenu_NavigationMenuTrigger = require('./NavigationMenu/NavigationMenuTrigger.cjs');\nconst require_NavigationMenu_NavigationMenuViewport = require('./NavigationMenu/NavigationMenuViewport.cjs');\nrequire('./NumberField/utils.cjs');\nconst require_NumberField_NumberFieldRoot = require('./NumberField/NumberFieldRoot.cjs');\nconst require_NumberField_NumberFieldDecrement = require('./NumberField/NumberFieldDecrement.cjs');\nconst require_NumberField_NumberFieldIncrement = require('./NumberField/NumberFieldIncrement.cjs');\nconst require_NumberField_NumberFieldInput = require('./NumberField/NumberFieldInput.cjs');\nconst require_Pagination_PaginationEllipsis = require('./Pagination/PaginationEllipsis.cjs');\nconst require_Pagination_PaginationRoot = require('./Pagination/PaginationRoot.cjs');\nconst require_Pagination_PaginationFirst = require('./Pagination/PaginationFirst.cjs');\nconst require_Pagination_PaginationLast = require('./Pagination/PaginationLast.cjs');\nrequire('./Pagination/utils.cjs');\nconst require_Pagination_PaginationList = require('./Pagination/PaginationList.cjs');\nconst require_Pagination_PaginationListItem = require('./Pagination/PaginationListItem.cjs');\nconst require_Pagination_PaginationNext = require('./Pagination/PaginationNext.cjs');\nconst require_Pagination_PaginationPrev = require('./Pagination/PaginationPrev.cjs');\nconst require_PinInput_PinInputRoot = require('./PinInput/PinInputRoot.cjs');\nconst require_PinInput_PinInputInput = require('./PinInput/PinInputInput.cjs');\nconst require_Popover_PopoverRoot = require('./Popover/PopoverRoot.cjs');\nconst require_Popover_PopoverAnchor = require('./Popover/PopoverAnchor.cjs');\nconst require_Popover_PopoverArrow = require('./Popover/PopoverArrow.cjs');\nconst require_Popover_PopoverClose = require('./Popover/PopoverClose.cjs');\nrequire('./Popover/PopoverContentImpl.cjs');\nrequire('./Popover/PopoverContentModal.cjs');\nrequire('./Popover/PopoverContentNonModal.cjs');\nconst require_Popover_PopoverContent = require('./Popover/PopoverContent.cjs');\nconst require_Popover_PopoverPortal = require('./Popover/PopoverPortal.cjs');\nconst require_Popover_PopoverTrigger = require('./Popover/PopoverTrigger.cjs');\nconst require_Progress_ProgressRoot = require('./Progress/ProgressRoot.cjs');\nconst require_Progress_ProgressIndicator = require('./Progress/ProgressIndicator.cjs');\nrequire('./RadioGroup/utils.cjs');\nrequire('./RadioGroup/Radio.cjs');\nconst require_RadioGroup_RadioGroupRoot = require('./RadioGroup/RadioGroupRoot.cjs');\nconst require_RadioGroup_RadioGroupItem = require('./RadioGroup/RadioGroupItem.cjs');\nconst require_RadioGroup_RadioGroupIndicator = require('./RadioGroup/RadioGroupIndicator.cjs');\nrequire('./RangeCalendar/useRangeCalendar.cjs');\nconst require_RangeCalendar_RangeCalendarRoot = require('./RangeCalendar/RangeCalendarRoot.cjs');\nconst require_RangeCalendar_RangeCalendarCell = require('./RangeCalendar/RangeCalendarCell.cjs');\nconst require_RangeCalendar_RangeCalendarCellTrigger = require('./RangeCalendar/RangeCalendarCellTrigger.cjs');\nconst require_RangeCalendar_RangeCalendarGrid = require('./RangeCalendar/RangeCalendarGrid.cjs');\nconst require_RangeCalendar_RangeCalendarGridBody = require('./RangeCalendar/RangeCalendarGridBody.cjs');\nconst require_RangeCalendar_RangeCalendarGridHead = require('./RangeCalendar/RangeCalendarGridHead.cjs');\nconst require_RangeCalendar_RangeCalendarGridRow = require('./RangeCalendar/RangeCalendarGridRow.cjs');\nconst require_RangeCalendar_RangeCalendarHeadCell = require('./RangeCalendar/RangeCalendarHeadCell.cjs');\nconst require_RangeCalendar_RangeCalendarHeader = require('./RangeCalendar/RangeCalendarHeader.cjs');\nconst require_RangeCalendar_RangeCalendarHeading = require('./RangeCalendar/RangeCalendarHeading.cjs');\nconst require_RangeCalendar_RangeCalendarNext = require('./RangeCalendar/RangeCalendarNext.cjs');\nconst require_RangeCalendar_RangeCalendarPrev = require('./RangeCalendar/RangeCalendarPrev.cjs');\nconst require_ScrollArea_ScrollAreaRoot = require('./ScrollArea/ScrollAreaRoot.cjs');\nrequire('./ScrollArea/ScrollAreaCornerImpl.cjs');\nconst require_ScrollArea_ScrollAreaCorner = require('./ScrollArea/ScrollAreaCorner.cjs');\nrequire('./ScrollArea/utils.cjs');\nrequire('./ScrollArea/ScrollAreaScrollbarImpl.cjs');\nrequire('./ScrollArea/ScrollAreaScrollbarX.cjs');\nrequire('./ScrollArea/ScrollAreaScrollbarY.cjs');\nrequire('./ScrollArea/ScrollAreaScrollbarVisible.cjs');\nrequire('./ScrollArea/ScrollAreaScrollbarAuto.cjs');\nconst require_ScrollArea_ScrollAreaScrollbarGlimpse = require('./ScrollArea/ScrollAreaScrollbarGlimpse.cjs');\nrequire('./ScrollArea/ScrollAreaScrollbarHover.cjs');\nrequire('./ScrollArea/ScrollAreaScrollbarScroll.cjs');\nconst require_ScrollArea_ScrollAreaScrollbar = require('./ScrollArea/ScrollAreaScrollbar.cjs');\nconst require_ScrollArea_ScrollAreaThumb = require('./ScrollArea/ScrollAreaThumb.cjs');\nconst require_ScrollArea_ScrollAreaViewport = require('./ScrollArea/ScrollAreaViewport.cjs');\nrequire('./Select/BubbleSelect.cjs');\nrequire('./Select/utils.cjs');\nconst require_Select_SelectRoot = require('./Select/SelectRoot.cjs');\nrequire('./Select/SelectItemAlignedPosition.cjs');\nrequire('./Select/SelectPopperPosition.cjs');\nrequire('./Select/SelectContentImpl.cjs');\nconst require_Select_SelectArrow = require('./Select/SelectArrow.cjs');\nrequire('./Select/SelectProvider.cjs');\nconst require_Select_SelectContent = require('./Select/SelectContent.cjs');\nconst require_Select_SelectGroup = require('./Select/SelectGroup.cjs');\nconst require_Select_SelectIcon = require('./Select/SelectIcon.cjs');\nconst require_Select_SelectItem = require('./Select/SelectItem.cjs');\nconst require_Select_SelectItemIndicator = require('./Select/SelectItemIndicator.cjs');\nconst require_Select_SelectItemText = require('./Select/SelectItemText.cjs');\nconst require_Select_SelectLabel = require('./Select/SelectLabel.cjs');\nconst require_Select_SelectPortal = require('./Select/SelectPortal.cjs');\nrequire('./Select/SelectScrollButtonImpl.cjs');\nconst require_Select_SelectScrollDownButton = require('./Select/SelectScrollDownButton.cjs');\nconst require_Select_SelectScrollUpButton = require('./Select/SelectScrollUpButton.cjs');\nconst require_Select_SelectSeparator = require('./Select/SelectSeparator.cjs');\nconst require_Select_SelectTrigger = require('./Select/SelectTrigger.cjs');\nconst require_Select_SelectValue = require('./Select/SelectValue.cjs');\nconst require_Select_SelectViewport = require('./Select/SelectViewport.cjs');\nrequire('./component/BaseSeparator.cjs');\nconst require_Separator_Separator = require('./Separator/Separator.cjs');\nrequire('./utils/assert.cjs');\nrequire('./utils/dom.cjs');\nrequire('./utils/events.cjs');\nrequire('./utils/calculate.cjs');\nrequire('./utils/constants.cjs');\nrequire('./utils/compare.cjs');\nrequire('./utils/callPanelCallbacks.cjs');\nrequire('./utils/debounce.cjs');\nrequire('./utils/resizePanel.cjs');\nrequire('./utils/layout.cjs');\nrequire('./utils/pivot.cjs');\nrequire('./utils/rects.cjs');\nrequire('./utils/stackingOrder.cjs');\nrequire('./utils/style.cjs');\nrequire('./utils/registry.cjs');\nrequire('./utils/units.cjs');\nrequire('./utils/validation.cjs');\nrequire('./composables/useWindowSplitterPanelGroupBehavior.cjs');\nrequire('./utils/storage.cjs');\nconst require_Splitter_SplitterGroup = require('./Splitter/SplitterGroup.cjs');\nconst require_Splitter_SplitterPanel = require('./Splitter/SplitterPanel.cjs');\nrequire('./composables/useWindowSplitterBehavior.cjs');\nconst require_Splitter_SplitterResizeHandle = require('./Splitter/SplitterResizeHandle.cjs');\nconst require_Stepper_StepperRoot = require('./Stepper/StepperRoot.cjs');\nconst require_Stepper_StepperItem = require('./Stepper/StepperItem.cjs');\nconst require_Stepper_StepperDescription = require('./Stepper/StepperDescription.cjs');\nconst require_Stepper_StepperIndicator = require('./Stepper/StepperIndicator.cjs');\nconst require_Stepper_StepperSeparator = require('./Stepper/StepperSeparator.cjs');\nconst require_Stepper_StepperTitle = require('./Stepper/StepperTitle.cjs');\nconst require_Stepper_StepperTrigger = require('./Stepper/StepperTrigger.cjs');\nconst require_Switch_SwitchRoot = require('./Switch/SwitchRoot.cjs');\nconst require_Switch_SwitchThumb = require('./Switch/SwitchThumb.cjs');\nconst require_Tabs_TabsRoot = require('./Tabs/TabsRoot.cjs');\nrequire('./Tabs/utils.cjs');\nconst require_Tabs_TabsContent = require('./Tabs/TabsContent.cjs');\nconst require_Tabs_TabsIndicator = require('./Tabs/TabsIndicator.cjs');\nconst require_Tabs_TabsList = require('./Tabs/TabsList.cjs');\nconst require_Tabs_TabsTrigger = require('./Tabs/TabsTrigger.cjs');\nconst require_TagsInput_TagsInputRoot = require('./TagsInput/TagsInputRoot.cjs');\nconst require_TagsInput_TagsInputClear = require('./TagsInput/TagsInputClear.cjs');\nconst require_TagsInput_TagsInputInput = require('./TagsInput/TagsInputInput.cjs');\nconst require_TagsInput_TagsInputItem = require('./TagsInput/TagsInputItem.cjs');\nconst require_TagsInput_TagsInputItemDelete = require('./TagsInput/TagsInputItemDelete.cjs');\nconst require_TagsInput_TagsInputItemText = require('./TagsInput/TagsInputItemText.cjs');\nconst require_TimeField_TimeFieldRoot = require('./TimeField/TimeFieldRoot.cjs');\nconst require_TimeField_TimeFieldInput = require('./TimeField/TimeFieldInput.cjs');\nconst require_TimeRangeField_TimeRangeFieldRoot = require('./TimeRangeField/TimeRangeFieldRoot.cjs');\nconst require_TimeRangeField_TimeRangeFieldInput = require('./TimeRangeField/TimeRangeFieldInput.cjs');\nrequire('./Toast/ToastAnnounceExclude.cjs');\nconst require_Toast_ToastProvider = require('./Toast/ToastProvider.cjs');\nrequire('./Toast/ToastAnnounce.cjs');\nrequire('./Toast/utils.cjs');\nrequire('./Toast/ToastRootImpl.cjs');\nconst require_Toast_ToastClose = require('./Toast/ToastClose.cjs');\nconst require_Toast_ToastAction = require('./Toast/ToastAction.cjs');\nconst require_Toast_ToastDescription = require('./Toast/ToastDescription.cjs');\nconst require_Toast_ToastPortal = require('./Toast/ToastPortal.cjs');\nconst require_Toast_ToastRoot = require('./Toast/ToastRoot.cjs');\nconst require_Toast_ToastTitle = require('./Toast/ToastTitle.cjs');\nrequire('./Toast/FocusProxy.cjs');\nconst require_Toast_ToastViewport = require('./Toast/ToastViewport.cjs');\nconst require_ToggleGroup_ToggleGroupRoot = require('./ToggleGroup/ToggleGroupRoot.cjs');\nconst require_Toggle_Toggle = require('./Toggle/Toggle.cjs');\nconst require_ToggleGroup_ToggleGroupItem = require('./ToggleGroup/ToggleGroupItem.cjs');\nconst require_Toolbar_ToolbarButton = require('./Toolbar/ToolbarButton.cjs');\nconst require_Toolbar_ToolbarLink = require('./Toolbar/ToolbarLink.cjs');\nconst require_Toolbar_ToolbarRoot = require('./Toolbar/ToolbarRoot.cjs');\nconst require_Toolbar_ToolbarSeparator = require('./Toolbar/ToolbarSeparator.cjs');\nconst require_Toolbar_ToolbarToggleGroup = require('./Toolbar/ToolbarToggleGroup.cjs');\nconst require_Toolbar_ToolbarToggleItem = require('./Toolbar/ToolbarToggleItem.cjs');\nconst require_Tooltip_TooltipArrow = require('./Tooltip/TooltipArrow.cjs');\nconst require_Tooltip_TooltipProvider = require('./Tooltip/TooltipProvider.cjs');\nrequire('./Tooltip/utils.cjs');\nconst require_Tooltip_TooltipRoot = require('./Tooltip/TooltipRoot.cjs');\nrequire('./Tooltip/TooltipContentImpl.cjs');\nrequire('./Tooltip/TooltipContentHoverable.cjs');\nconst require_Tooltip_TooltipContent = require('./Tooltip/TooltipContent.cjs');\nconst require_Tooltip_TooltipPortal = require('./Tooltip/TooltipPortal.cjs');\nconst require_Tooltip_TooltipTrigger = require('./Tooltip/TooltipTrigger.cjs');\nrequire('./Tree/utils.cjs');\nconst require_Tree_TreeRoot = require('./Tree/TreeRoot.cjs');\nconst require_Tree_TreeItem = require('./Tree/TreeItem.cjs');\nconst require_Tree_TreeVirtualizer = require('./Tree/TreeVirtualizer.cjs');\nconst require_Viewport_Viewport = require('./Viewport/Viewport.cjs');\nrequire('./YearPicker/useYearPicker.cjs');\nconst require_YearPicker_YearPickerRoot = require('./YearPicker/YearPickerRoot.cjs');\nconst require_YearPicker_YearPickerCell = require('./YearPicker/YearPickerCell.cjs');\nconst require_YearPicker_YearPickerCellTrigger = require('./YearPicker/YearPickerCellTrigger.cjs');\nconst require_YearPicker_YearPickerGrid = require('./YearPicker/YearPickerGrid.cjs');\nconst require_YearPicker_YearPickerGridBody = require('./YearPicker/YearPickerGridBody.cjs');\nconst require_YearPicker_YearPickerGridRow = require('./YearPicker/YearPickerGridRow.cjs');\nconst require_YearPicker_YearPickerHeader = require('./YearPicker/YearPickerHeader.cjs');\nconst require_YearPicker_YearPickerHeading = require('./YearPicker/YearPickerHeading.cjs');\nconst require_YearPicker_YearPickerNext = require('./YearPicker/YearPickerNext.cjs');\nconst require_YearPicker_YearPickerPrev = require('./YearPicker/YearPickerPrev.cjs');\nrequire('./YearRangePicker/useRangeYearPicker.cjs');\nconst require_YearRangePicker_YearRangePickerRoot = require('./YearRangePicker/YearRangePickerRoot.cjs');\nconst require_YearRangePicker_YearRangePickerCell = require('./YearRangePicker/YearRangePickerCell.cjs');\nconst require_YearRangePicker_YearRangePickerCellTrigger = require('./YearRangePicker/YearRangePickerCellTrigger.cjs');\nconst require_YearRangePicker_YearRangePickerGrid = require('./YearRangePicker/YearRangePickerGrid.cjs');\nconst require_YearRangePicker_YearRangePickerGridBody = require('./YearRangePicker/YearRangePickerGridBody.cjs');\nconst require_YearRangePicker_YearRangePickerGridRow = require('./YearRangePicker/YearRangePickerGridRow.cjs');\nconst require_YearRangePicker_YearRangePickerHeader = require('./YearRangePicker/YearRangePickerHeader.cjs');\nconst require_YearRangePicker_YearRangePickerHeading = require('./YearRangePicker/YearRangePickerHeading.cjs');\nconst require_YearRangePicker_YearRangePickerNext = require('./YearRangePicker/YearRangePickerNext.cjs');\nconst require_YearRangePicker_YearRangePickerPrev = require('./YearRangePicker/YearRangePickerPrev.cjs');\nrequire('./index2.cjs');\n\nexports.AccordionContent = require_Accordion_AccordionContent.AccordionContent_default;\nexports.AccordionHeader = require_Accordion_AccordionHeader.AccordionHeader_default;\nexports.AccordionItem = require_Accordion_AccordionItem.AccordionItem_default;\nexports.AccordionRoot = require_Accordion_AccordionRoot.AccordionRoot_default;\nexports.AccordionTrigger = require_Accordion_AccordionTrigger.AccordionTrigger_default;\nexports.AlertDialogAction = require_AlertDialog_AlertDialogAction.AlertDialogAction_default;\nexports.AlertDialogCancel = require_AlertDialog_AlertDialogCancel.AlertDialogCancel_default;\nexports.AlertDialogContent = require_AlertDialog_AlertDialogContent.AlertDialogContent_default;\nexports.AlertDialogDescription = require_AlertDialog_AlertDialogDescription.AlertDialogDescription_default;\nexports.AlertDialogOverlay = require_AlertDialog_AlertDialogOverlay.AlertDialogOverlay_default;\nexports.AlertDialogPortal = require_AlertDialog_AlertDialogPortal.AlertDialogPortal_default;\nexports.AlertDialogRoot = require_AlertDialog_AlertDialogRoot.AlertDialogRoot_default;\nexports.AlertDialogTitle = require_AlertDialog_AlertDialogTitle.AlertDialogTitle_default;\nexports.AlertDialogTrigger = require_AlertDialog_AlertDialogTrigger.AlertDialogTrigger_default;\nexports.AspectRatio = require_AspectRatio_AspectRatio.AspectRatio_default;\nexports.AutocompleteAnchor = require_Combobox_ComboboxAnchor.ComboboxAnchor_default;\nexports.AutocompleteArrow = require_Combobox_ComboboxArrow.ComboboxArrow_default;\nexports.AutocompleteCancel = require_Combobox_ComboboxCancel.ComboboxCancel_default;\nexports.AutocompleteContent = require_Combobox_ComboboxContent.ComboboxContent_default;\nexports.AutocompleteEmpty = require_Combobox_ComboboxEmpty.ComboboxEmpty_default;\nexports.AutocompleteGroup = require_Combobox_ComboboxGroup.ComboboxGroup_default;\nexports.AutocompleteInput = require_Autocomplete_AutocompleteInput.AutocompleteInput_default;\nexports.AutocompleteItem = require_Combobox_ComboboxItem.ComboboxItem_default;\nexports.AutocompleteItemIndicator = require_Combobox_ComboboxItemIndicator.ComboboxItemIndicator_default;\nexports.AutocompleteLabel = require_Combobox_ComboboxLabel.ComboboxLabel_default;\nexports.AutocompletePortal = require_Combobox_ComboboxPortal.ComboboxPortal_default;\nexports.AutocompleteRoot = require_Autocomplete_AutocompleteRoot.AutocompleteRoot_default;\nexports.AutocompleteSeparator = require_Combobox_ComboboxSeparator.ComboboxSeparator_default;\nexports.AutocompleteTrigger = require_Combobox_ComboboxTrigger.ComboboxTrigger_default;\nexports.AutocompleteViewport = require_Combobox_ComboboxViewport.ComboboxViewport_default;\nexports.AutocompleteVirtualizer = require_Combobox_ComboboxVirtualizer.ComboboxVirtualizer_default;\nexports.AvatarFallback = require_Avatar_AvatarFallback.AvatarFallback_default;\nexports.AvatarImage = require_Avatar_AvatarImage.AvatarImage_default;\nexports.AvatarRoot = require_Avatar_AvatarRoot.AvatarRoot_default;\nexports.CalendarCell = require_Calendar_CalendarCell.CalendarCell_default;\nexports.CalendarCellTrigger = require_Calendar_CalendarCellTrigger.CalendarCellTrigger_default;\nexports.CalendarGrid = require_Calendar_CalendarGrid.CalendarGrid_default;\nexports.CalendarGridBody = require_Calendar_CalendarGridBody.CalendarGridBody_default;\nexports.CalendarGridHead = require_Calendar_CalendarGridHead.CalendarGridHead_default;\nexports.CalendarGridRow = require_Calendar_CalendarGridRow.CalendarGridRow_default;\nexports.CalendarHeadCell = require_Calendar_CalendarHeadCell.CalendarHeadCell_default;\nexports.CalendarHeader = require_Calendar_CalendarHeader.CalendarHeader_default;\nexports.CalendarHeading = require_Calendar_CalendarHeading.CalendarHeading_default;\nexports.CalendarNext = require_Calendar_CalendarNext.CalendarNext_default;\nexports.CalendarPrev = require_Calendar_CalendarPrev.CalendarPrev_default;\nexports.CalendarRoot = require_Calendar_CalendarRoot.CalendarRoot_default;\nexports.CheckboxGroupRoot = require_Checkbox_CheckboxGroupRoot.CheckboxGroupRoot_default;\nexports.CheckboxIndicator = require_Checkbox_CheckboxIndicator.CheckboxIndicator_default;\nexports.CheckboxRoot = require_Checkbox_CheckboxRoot.CheckboxRoot_default;\nexports.CollapsibleContent = require_Collapsible_CollapsibleContent.CollapsibleContent_default;\nexports.CollapsibleRoot = require_Collapsible_CollapsibleRoot.CollapsibleRoot_default;\nexports.CollapsibleTrigger = require_Collapsible_CollapsibleTrigger.CollapsibleTrigger_default;\nexports.ColorAreaArea = require_ColorArea_ColorAreaArea.ColorAreaArea_default;\nexports.ColorAreaRoot = require_ColorArea_ColorAreaRoot.ColorAreaRoot_default;\nexports.ColorAreaThumb = require_ColorArea_ColorAreaThumb.ColorAreaThumb_default;\nexports.ColorFieldInput = require_ColorField_ColorFieldInput.ColorFieldInput_default;\nexports.ColorFieldRoot = require_ColorField_ColorFieldRoot.ColorFieldRoot_default;\nexports.ColorSliderRoot = require_ColorSlider_ColorSliderRoot.ColorSliderRoot_default;\nexports.ColorSliderThumb = require_ColorSlider_ColorSliderThumb.ColorSliderThumb_default;\nexports.ColorSliderTrack = require_ColorSlider_ColorSliderTrack.ColorSliderTrack_default;\nexports.ColorSwatch = require_ColorSwatch_ColorSwatch.ColorSwatch_default;\nexports.ColorSwatchPickerItem = require_ColorSwatchPicker_ColorSwatchPickerItem.ColorSwatchPickerItem_default;\nexports.ColorSwatchPickerItemIndicator = require_ColorSwatchPicker_ColorSwatchPickerItemIndicator.ColorSwatchPickerItemIndicator_default;\nexports.ColorSwatchPickerItemSwatch = require_ColorSwatchPicker_ColorSwatchPickerItemSwatch.ColorSwatchPickerItemSwatch_default;\nexports.ColorSwatchPickerRoot = require_ColorSwatchPicker_ColorSwatchPickerRoot.ColorSwatchPickerRoot_default;\nexports.ComboboxAnchor = require_Combobox_ComboboxAnchor.ComboboxAnchor_default;\nexports.ComboboxArrow = require_Combobox_ComboboxArrow.ComboboxArrow_default;\nexports.ComboboxCancel = require_Combobox_ComboboxCancel.ComboboxCancel_default;\nexports.ComboboxContent = require_Combobox_ComboboxContent.ComboboxContent_default;\nexports.ComboboxEmpty = require_Combobox_ComboboxEmpty.ComboboxEmpty_default;\nexports.ComboboxGroup = require_Combobox_ComboboxGroup.ComboboxGroup_default;\nexports.ComboboxInput = require_Combobox_ComboboxInput.ComboboxInput_default;\nexports.ComboboxItem = require_Combobox_ComboboxItem.ComboboxItem_default;\nexports.ComboboxItemIndicator = require_Combobox_ComboboxItemIndicator.ComboboxItemIndicator_default;\nexports.ComboboxLabel = require_Combobox_ComboboxLabel.ComboboxLabel_default;\nexports.ComboboxPortal = require_Combobox_ComboboxPortal.ComboboxPortal_default;\nexports.ComboboxRoot = require_Combobox_ComboboxRoot.ComboboxRoot_default;\nexports.ComboboxSeparator = require_Combobox_ComboboxSeparator.ComboboxSeparator_default;\nexports.ComboboxTrigger = require_Combobox_ComboboxTrigger.ComboboxTrigger_default;\nexports.ComboboxViewport = require_Combobox_ComboboxViewport.ComboboxViewport_default;\nexports.ComboboxVirtualizer = require_Combobox_ComboboxVirtualizer.ComboboxVirtualizer_default;\nexports.ConfigProvider = require_ConfigProvider_ConfigProvider.ConfigProvider_default;\nexports.ContextMenuArrow = require_ContextMenu_ContextMenuArrow.ContextMenuArrow_default;\nexports.ContextMenuCheckboxItem = require_ContextMenu_ContextMenuCheckboxItem.ContextMenuCheckboxItem_default;\nexports.ContextMenuContent = require_ContextMenu_ContextMenuContent.ContextMenuContent_default;\nexports.ContextMenuGroup = require_ContextMenu_ContextMenuGroup.ContextMenuGroup_default;\nexports.ContextMenuItem = require_ContextMenu_ContextMenuItem.ContextMenuItem_default;\nexports.ContextMenuItemIndicator = require_ContextMenu_ContextMenuItemIndicator.ContextMenuItemIndicator_default;\nexports.ContextMenuLabel = require_ContextMenu_ContextMenuLabel.ContextMenuLabel_default;\nexports.ContextMenuPortal = require_ContextMenu_ContextMenuPortal.ContextMenuPortal_default;\nexports.ContextMenuRadioGroup = require_ContextMenu_ContextMenuRadioGroup.ContextMenuRadioGroup_default;\nexports.ContextMenuRadioItem = require_ContextMenu_ContextMenuRadioItem.ContextMenuRadioItem_default;\nexports.ContextMenuRoot = require_ContextMenu_ContextMenuRoot.ContextMenuRoot_default;\nexports.ContextMenuSeparator = require_ContextMenu_ContextMenuSeparator.ContextMenuSeparator_default;\nexports.ContextMenuSub = require_ContextMenu_ContextMenuSub.ContextMenuSub_default;\nexports.ContextMenuSubContent = require_ContextMenu_ContextMenuSubContent.ContextMenuSubContent_default;\nexports.ContextMenuSubTrigger = require_ContextMenu_ContextMenuSubTrigger.ContextMenuSubTrigger_default;\nexports.ContextMenuTrigger = require_ContextMenu_ContextMenuTrigger.ContextMenuTrigger_default;\nexports.DateFieldInput = require_DateField_DateFieldInput.DateFieldInput_default;\nexports.DateFieldRoot = require_DateField_DateFieldRoot.DateFieldRoot_default;\nexports.DatePickerAnchor = require_DatePicker_DatePickerAnchor.DatePickerAnchor_default;\nexports.DatePickerArrow = require_DatePicker_DatePickerArrow.DatePickerArrow_default;\nexports.DatePickerCalendar = require_DatePicker_DatePickerCalendar.DatePickerCalendar_default;\nexports.DatePickerCell = require_DatePicker_DatePickerCell.DatePickerCell_default;\nexports.DatePickerCellTrigger = require_DatePicker_DatePickerCellTrigger.DatePickerCellTrigger_default;\nexports.DatePickerClose = require_DatePicker_DatePickerClose.DatePickerClose_default;\nexports.DatePickerContent = require_DatePicker_DatePickerContent.DatePickerContent_default;\nexports.DatePickerField = require_DatePicker_DatePickerField.DatePickerField_default;\nexports.DatePickerGrid = require_DatePicker_DatePickerGrid.DatePickerGrid_default;\nexports.DatePickerGridBody = require_DatePicker_DatePickerGridBody.DatePickerGridBody_default;\nexports.DatePickerGridHead = require_DatePicker_DatePickerGridHead.DatePickerGridHead_default;\nexports.DatePickerGridRow = require_DatePicker_DatePickerGridRow.DatePickerGridRow_default;\nexports.DatePickerHeadCell = require_DatePicker_DatePickerHeadCell.DatePickerHeadCell_default;\nexports.DatePickerHeader = require_DatePicker_DatePickerHeader.DatePickerHeader_default;\nexports.DatePickerHeading = require_DatePicker_DatePickerHeading.DatePickerHeading_default;\nexports.DatePickerInput = require_DatePicker_DatePickerInput.DatePickerInput_default;\nexports.DatePickerNext = require_DatePicker_DatePickerNext.DatePickerNext_default;\nexports.DatePickerPrev = require_DatePicker_DatePickerPrev.DatePickerPrev_default;\nexports.DatePickerRoot = require_DatePicker_DatePickerRoot.DatePickerRoot_default;\nexports.DatePickerTrigger = require_DatePicker_DatePickerTrigger.DatePickerTrigger_default;\nexports.DateRangeFieldInput = require_DateRangeField_DateRangeFieldInput.DateRangeFieldInput_default;\nexports.DateRangeFieldRoot = require_DateRangeField_DateRangeFieldRoot.DateRangeFieldRoot_default;\nexports.DateRangePickerAnchor = require_DateRangePicker_DateRangePickerAnchor.DateRangePickerAnchor_default;\nexports.DateRangePickerArrow = require_DateRangePicker_DateRangePickerArrow.DateRangePickerArrow_default;\nexports.DateRangePickerCalendar = require_DateRangePicker_DateRangePickerCalendar.DateRangePickerCalendar_default;\nexports.DateRangePickerCell = require_DateRangePicker_DateRangePickerCell.DateRangePickerCell_default;\nexports.DateRangePickerCellTrigger = require_DateRangePicker_DateRangePickerCellTrigger.DateRangePickerCellTrigger_default;\nexports.DateRangePickerClose = require_DateRangePicker_DateRangePickerClose.DateRangePickerClose_default;\nexports.DateRangePickerContent = require_DateRangePicker_DateRangePickerContent.DateRangePickerContent_default;\nexports.DateRangePickerField = require_DateRangePicker_DateRangePickerField.DateRangePickerField_default;\nexports.DateRangePickerGrid = require_DateRangePicker_DateRangePickerGrid.DateRangePickerGrid_default;\nexports.DateRangePickerGridBody = require_DateRangePicker_DateRangePickerGridBody.DateRangePickerGridBody_default;\nexports.DateRangePickerGridHead = require_DateRangePicker_DateRangePickerGridHead.DateRangePickerGridHead_default;\nexports.DateRangePickerGridRow = require_DateRangePicker_DateRangePickerGridRow.DateRangePickerGridRow_default;\nexports.DateRangePickerHeadCell = require_DateRangePicker_DateRangePickerHeadCell.DateRangePickerHeadCell_default;\nexports.DateRangePickerHeader = require_DateRangePicker_DateRangePickerHeader.DateRangePickerHeader_default;\nexports.DateRangePickerHeading = require_DateRangePicker_DateRangePickerHeading.DateRangePickerHeading_default;\nexports.DateRangePickerInput = require_DateRangePicker_DateRangePickerInput.DateRangePickerInput_default;\nexports.DateRangePickerNext = require_DateRangePicker_DateRangePickerNext.DateRangePickerNext_default;\nexports.DateRangePickerPrev = require_DateRangePicker_DateRangePickerPrev.DateRangePickerPrev_default;\nexports.DateRangePickerRoot = require_DateRangePicker_DateRangePickerRoot.DateRangePickerRoot_default;\nexports.DateRangePickerTrigger = require_DateRangePicker_DateRangePickerTrigger.DateRangePickerTrigger_default;\nexports.DialogClose = require_Dialog_DialogClose.DialogClose_default;\nexports.DialogContent = require_Dialog_DialogContent.DialogContent_default;\nexports.DialogDescription = require_Dialog_DialogDescription.DialogDescription_default;\nexports.DialogOverlay = require_Dialog_DialogOverlay.DialogOverlay_default;\nexports.DialogPortal = require_Dialog_DialogPortal.DialogPortal_default;\nexports.DialogRoot = require_Dialog_DialogRoot.DialogRoot_default;\nexports.DialogTitle = require_Dialog_DialogTitle.DialogTitle_default;\nexports.DialogTrigger = require_Dialog_DialogTrigger.DialogTrigger_default;\nexports.DropdownMenuArrow = require_DropdownMenu_DropdownMenuArrow.DropdownMenuArrow_default;\nexports.DropdownMenuCheckboxItem = require_DropdownMenu_DropdownMenuCheckboxItem.DropdownMenuCheckboxItem_default;\nexports.DropdownMenuContent = require_DropdownMenu_DropdownMenuContent.DropdownMenuContent_default;\nexports.DropdownMenuFilter = require_DropdownMenu_DropdownMenuFilter.DropdownMenuFilter_default;\nexports.DropdownMenuGroup = require_DropdownMenu_DropdownMenuGroup.DropdownMenuGroup_default;\nexports.DropdownMenuItem = require_DropdownMenu_DropdownMenuItem.DropdownMenuItem_default;\nexports.DropdownMenuItemIndicator = require_DropdownMenu_DropdownMenuItemIndicator.DropdownMenuItemIndicator_default;\nexports.DropdownMenuLabel = require_DropdownMenu_DropdownMenuLabel.DropdownMenuLabel_default;\nexports.DropdownMenuPortal = require_DropdownMenu_DropdownMenuPortal.DropdownMenuPortal_default;\nexports.DropdownMenuRadioGroup = require_DropdownMenu_DropdownMenuRadioGroup.DropdownMenuRadioGroup_default;\nexports.DropdownMenuRadioItem = require_DropdownMenu_DropdownMenuRadioItem.DropdownMenuRadioItem_default;\nexports.DropdownMenuRoot = require_DropdownMenu_DropdownMenuRoot.DropdownMenuRoot_default;\nexports.DropdownMenuSeparator = require_DropdownMenu_DropdownMenuSeparator.DropdownMenuSeparator_default;\nexports.DropdownMenuSub = require_DropdownMenu_DropdownMenuSub.DropdownMenuSub_default;\nexports.DropdownMenuSubContent = require_DropdownMenu_DropdownMenuSubContent.DropdownMenuSubContent_default;\nexports.DropdownMenuSubTrigger = require_DropdownMenu_DropdownMenuSubTrigger.DropdownMenuSubTrigger_default;\nexports.DropdownMenuTrigger = require_DropdownMenu_DropdownMenuTrigger.DropdownMenuTrigger_default;\nexports.EditableArea = require_Editable_EditableArea.EditableArea_default;\nexports.EditableCancelTrigger = require_Editable_EditableCancelTrigger.EditableCancelTrigger_default;\nexports.EditableEditTrigger = require_Editable_EditableEditTrigger.EditableEditTrigger_default;\nexports.EditableInput = require_Editable_EditableInput.EditableInput_default;\nexports.EditablePreview = require_Editable_EditablePreview.EditablePreview_default;\nexports.EditableRoot = require_Editable_EditableRoot.EditableRoot_default;\nexports.EditableSubmitTrigger = require_Editable_EditableSubmitTrigger.EditableSubmitTrigger_default;\nexports.FocusScope = require_FocusScope_FocusScope.FocusScope_default;\nexports.HoverCardArrow = require_HoverCard_HoverCardArrow.HoverCardArrow_default;\nexports.HoverCardContent = require_HoverCard_HoverCardContent.HoverCardContent_default;\nexports.HoverCardPortal = require_HoverCard_HoverCardPortal.HoverCardPortal_default;\nexports.HoverCardRoot = require_HoverCard_HoverCardRoot.HoverCardRoot_default;\nexports.HoverCardTrigger = require_HoverCard_HoverCardTrigger.HoverCardTrigger_default;\nexports.Label = require_Label_Label.Label_default;\nexports.ListboxContent = require_Listbox_ListboxContent.ListboxContent_default;\nexports.ListboxFilter = require_Listbox_ListboxFilter.ListboxFilter_default;\nexports.ListboxGroup = require_Listbox_ListboxGroup.ListboxGroup_default;\nexports.ListboxGroupLabel = require_Listbox_ListboxGroupLabel.ListboxGroupLabel_default;\nexports.ListboxItem = require_Listbox_ListboxItem.ListboxItem_default;\nexports.ListboxItemIndicator = require_Listbox_ListboxItemIndicator.ListboxItemIndicator_default;\nexports.ListboxRoot = require_Listbox_ListboxRoot.ListboxRoot_default;\nexports.ListboxVirtualizer = require_Listbox_ListboxVirtualizer.ListboxVirtualizer_default;\nexports.MenubarArrow = require_Menubar_MenubarArrow.MenubarArrow_default;\nexports.MenubarCheckboxItem = require_Menubar_MenubarCheckboxItem.MenubarCheckboxItem_default;\nexports.MenubarContent = require_Menubar_MenubarContent.MenubarContent_default;\nexports.MenubarGroup = require_Menubar_MenubarGroup.MenubarGroup_default;\nexports.MenubarItem = require_Menubar_MenubarItem.MenubarItem_default;\nexports.MenubarItemIndicator = require_Menubar_MenubarItemIndicator.MenubarItemIndicator_default;\nexports.MenubarLabel = require_Menubar_MenubarLabel.MenubarLabel_default;\nexports.MenubarMenu = require_Menubar_MenubarMenu.MenubarMenu_default;\nexports.MenubarPortal = require_Menubar_MenubarPortal.MenubarPortal_default;\nexports.MenubarRadioGroup = require_Menubar_MenubarRadioGroup.MenubarRadioGroup_default;\nexports.MenubarRadioItem = require_Menubar_MenubarRadioItem.MenubarRadioItem_default;\nexports.MenubarRoot = require_Menubar_MenubarRoot.MenubarRoot_default;\nexports.MenubarSeparator = require_Menubar_MenubarSeparator.MenubarSeparator_default;\nexports.MenubarSub = require_Menubar_MenubarSub.MenubarSub_default;\nexports.MenubarSubContent = require_Menubar_MenubarSubContent.MenubarSubContent_default;\nexports.MenubarSubTrigger = require_Menubar_MenubarSubTrigger.MenubarSubTrigger_default;\nexports.MenubarTrigger = require_Menubar_MenubarTrigger.MenubarTrigger_default;\nexports.MonthPickerCell = require_MonthPicker_MonthPickerCell.MonthPickerCell_default;\nexports.MonthPickerCellTrigger = require_MonthPicker_MonthPickerCellTrigger.MonthPickerCellTrigger_default;\nexports.MonthPickerGrid = require_MonthPicker_MonthPickerGrid.MonthPickerGrid_default;\nexports.MonthPickerGridBody = require_MonthPicker_MonthPickerGridBody.MonthPickerGridBody_default;\nexports.MonthPickerGridRow = require_MonthPicker_MonthPickerGridRow.MonthPickerGridRow_default;\nexports.MonthPickerHeader = require_MonthPicker_MonthPickerHeader.MonthPickerHeader_default;\nexports.MonthPickerHeading = require_MonthPicker_MonthPickerHeading.MonthPickerHeading_default;\nexports.MonthPickerNext = require_MonthPicker_MonthPickerNext.MonthPickerNext_default;\nexports.MonthPickerPrev = require_MonthPicker_MonthPickerPrev.MonthPickerPrev_default;\nexports.MonthPickerRoot = require_MonthPicker_MonthPickerRoot.MonthPickerRoot_default;\nexports.MonthRangePickerCell = require_MonthRangePicker_MonthRangePickerCell.MonthRangePickerCell_default;\nexports.MonthRangePickerCellTrigger = require_MonthRangePicker_MonthRangePickerCellTrigger.MonthRangePickerCellTrigger_default;\nexports.MonthRangePickerGrid = require_MonthRangePicker_MonthRangePickerGrid.MonthRangePickerGrid_default;\nexports.MonthRangePickerGridBody = require_MonthRangePicker_MonthRangePickerGridBody.MonthRangePickerGridBody_default;\nexports.MonthRangePickerGridRow = require_MonthRangePicker_MonthRangePickerGridRow.MonthRangePickerGridRow_default;\nexports.MonthRangePickerHeader = require_MonthRangePicker_MonthRangePickerHeader.MonthRangePickerHeader_default;\nexports.MonthRangePickerHeading = require_MonthRangePicker_MonthRangePickerHeading.MonthRangePickerHeading_default;\nexports.MonthRangePickerNext = require_MonthRangePicker_MonthRangePickerNext.MonthRangePickerNext_default;\nexports.MonthRangePickerPrev = require_MonthRangePicker_MonthRangePickerPrev.MonthRangePickerPrev_default;\nexports.MonthRangePickerRoot = require_MonthRangePicker_MonthRangePickerRoot.MonthRangePickerRoot_default;\nexports.NavigationMenuContent = require_NavigationMenu_NavigationMenuContent.NavigationMenuContent_default;\nexports.NavigationMenuIndicator = require_NavigationMenu_NavigationMenuIndicator.NavigationMenuIndicator_default;\nexports.NavigationMenuItem = require_NavigationMenu_NavigationMenuItem.NavigationMenuItem_default;\nexports.NavigationMenuLink = require_NavigationMenu_NavigationMenuLink.NavigationMenuLink_default;\nexports.NavigationMenuList = require_NavigationMenu_NavigationMenuList.NavigationMenuList_default;\nexports.NavigationMenuRoot = require_NavigationMenu_NavigationMenuRoot.NavigationMenuRoot_default;\nexports.NavigationMenuSub = require_NavigationMenu_NavigationMenuSub.NavigationMenuSub_default;\nexports.NavigationMenuTrigger = require_NavigationMenu_NavigationMenuTrigger.NavigationMenuTrigger_default;\nexports.NavigationMenuViewport = require_NavigationMenu_NavigationMenuViewport.NavigationMenuViewport_default;\nexports.NumberFieldDecrement = require_NumberField_NumberFieldDecrement.NumberFieldDecrement_default;\nexports.NumberFieldIncrement = require_NumberField_NumberFieldIncrement.NumberFieldIncrement_default;\nexports.NumberFieldInput = require_NumberField_NumberFieldInput.NumberFieldInput_default;\nexports.NumberFieldRoot = require_NumberField_NumberFieldRoot.NumberFieldRoot_default;\nexports.PaginationEllipsis = require_Pagination_PaginationEllipsis.PaginationEllipsis_default;\nexports.PaginationFirst = require_Pagination_PaginationFirst.PaginationFirst_default;\nexports.PaginationLast = require_Pagination_PaginationLast.PaginationLast_default;\nexports.PaginationList = require_Pagination_PaginationList.PaginationList_default;\nexports.PaginationListItem = require_Pagination_PaginationListItem.PaginationListItem_default;\nexports.PaginationNext = require_Pagination_PaginationNext.PaginationNext_default;\nexports.PaginationPrev = require_Pagination_PaginationPrev.PaginationPrev_default;\nexports.PaginationRoot = require_Pagination_PaginationRoot.PaginationRoot_default;\nexports.PinInputInput = require_PinInput_PinInputInput.PinInputInput_default;\nexports.PinInputRoot = require_PinInput_PinInputRoot.PinInputRoot_default;\nexports.PopoverAnchor = require_Popover_PopoverAnchor.PopoverAnchor_default;\nexports.PopoverArrow = require_Popover_PopoverArrow.PopoverArrow_default;\nexports.PopoverClose = require_Popover_PopoverClose.PopoverClose_default;\nexports.PopoverContent = require_Popover_PopoverContent.PopoverContent_default;\nexports.PopoverPortal = require_Popover_PopoverPortal.PopoverPortal_default;\nexports.PopoverRoot = require_Popover_PopoverRoot.PopoverRoot_default;\nexports.PopoverTrigger = require_Popover_PopoverTrigger.PopoverTrigger_default;\nexports.Presence = require_Presence_Presence.Presence_default;\nexports.Primitive = require_Primitive_Primitive.Primitive;\nexports.ProgressIndicator = require_Progress_ProgressIndicator.ProgressIndicator_default;\nexports.ProgressRoot = require_Progress_ProgressRoot.ProgressRoot_default;\nexports.RadioGroupIndicator = require_RadioGroup_RadioGroupIndicator.RadioGroupIndicator_default;\nexports.RadioGroupItem = require_RadioGroup_RadioGroupItem.RadioGroupItem_default;\nexports.RadioGroupRoot = require_RadioGroup_RadioGroupRoot.RadioGroupRoot_default;\nexports.RangeCalendarCell = require_RangeCalendar_RangeCalendarCell.RangeCalendarCell_default;\nexports.RangeCalendarCellTrigger = require_RangeCalendar_RangeCalendarCellTrigger.RangeCalendarCellTrigger_default;\nexports.RangeCalendarGrid = require_RangeCalendar_RangeCalendarGrid.RangeCalendarGrid_default;\nexports.RangeCalendarGridBody = require_RangeCalendar_RangeCalendarGridBody.RangeCalendarGridBody_default;\nexports.RangeCalendarGridHead = require_RangeCalendar_RangeCalendarGridHead.RangeCalendarGridHead_default;\nexports.RangeCalendarGridRow = require_RangeCalendar_RangeCalendarGridRow.RangeCalendarGridRow_default;\nexports.RangeCalendarHeadCell = require_RangeCalendar_RangeCalendarHeadCell.RangeCalendarHeadCell_default;\nexports.RangeCalendarHeader = require_RangeCalendar_RangeCalendarHeader.RangeCalendarHeader_default;\nexports.RangeCalendarHeading = require_RangeCalendar_RangeCalendarHeading.RangeCalendarHeading_default;\nexports.RangeCalendarNext = require_RangeCalendar_RangeCalendarNext.RangeCalendarNext_default;\nexports.RangeCalendarPrev = require_RangeCalendar_RangeCalendarPrev.RangeCalendarPrev_default;\nexports.RangeCalendarRoot = require_RangeCalendar_RangeCalendarRoot.RangeCalendarRoot_default;\nexports.RovingFocusGroup = require_RovingFocus_RovingFocusGroup.RovingFocusGroup_default;\nexports.RovingFocusItem = require_RovingFocus_RovingFocusItem.RovingFocusItem_default;\nexports.ScrollAreaCorner = require_ScrollArea_ScrollAreaCorner.ScrollAreaCorner_default;\nexports.ScrollAreaRoot = require_ScrollArea_ScrollAreaRoot.ScrollAreaRoot_default;\nexports.ScrollAreaScrollbar = require_ScrollArea_ScrollAreaScrollbar.ScrollAreaScrollbar_default;\nexports.ScrollAreaScrollbarGlimpse = require_ScrollArea_ScrollAreaScrollbarGlimpse.ScrollAreaScrollbarGlimpse_default;\nexports.ScrollAreaThumb = require_ScrollArea_ScrollAreaThumb.ScrollAreaThumb_default;\nexports.ScrollAreaViewport = require_ScrollArea_ScrollAreaViewport.ScrollAreaViewport_default;\nexports.SelectArrow = require_Select_SelectArrow.SelectArrow_default;\nexports.SelectContent = require_Select_SelectContent.SelectContent_default;\nexports.SelectGroup = require_Select_SelectGroup.SelectGroup_default;\nexports.SelectIcon = require_Select_SelectIcon.SelectIcon_default;\nexports.SelectItem = require_Select_SelectItem.SelectItem_default;\nexports.SelectItemIndicator = require_Select_SelectItemIndicator.SelectItemIndicator_default;\nexports.SelectItemText = require_Select_SelectItemText.SelectItemText_default;\nexports.SelectLabel = require_Select_SelectLabel.SelectLabel_default;\nexports.SelectPortal = require_Select_SelectPortal.SelectPortal_default;\nexports.SelectRoot = require_Select_SelectRoot.SelectRoot_default;\nexports.SelectScrollDownButton = require_Select_SelectScrollDownButton.SelectScrollDownButton_default;\nexports.SelectScrollUpButton = require_Select_SelectScrollUpButton.SelectScrollUpButton_default;\nexports.SelectSeparator = require_Select_SelectSeparator.SelectSeparator_default;\nexports.SelectTrigger = require_Select_SelectTrigger.SelectTrigger_default;\nexports.SelectValue = require_Select_SelectValue.SelectValue_default;\nexports.SelectViewport = require_Select_SelectViewport.SelectViewport_default;\nexports.Separator = require_Separator_Separator.Separator_default;\nexports.SliderRange = require_Slider_SliderRange.SliderRange_default;\nexports.SliderRoot = require_Slider_SliderRoot.SliderRoot_default;\nexports.SliderThumb = require_Slider_SliderThumb.SliderThumb_default;\nexports.SliderTrack = require_Slider_SliderTrack.SliderTrack_default;\nexports.Slot = require_Primitive_Slot.Slot;\nexports.SplitterGroup = require_Splitter_SplitterGroup.SplitterGroup_default;\nexports.SplitterPanel = require_Splitter_SplitterPanel.SplitterPanel_default;\nexports.SplitterResizeHandle = require_Splitter_SplitterResizeHandle.SplitterResizeHandle_default;\nexports.StepperDescription = require_Stepper_StepperDescription.StepperDescription_default;\nexports.StepperIndicator = require_Stepper_StepperIndicator.StepperIndicator_default;\nexports.StepperItem = require_Stepper_StepperItem.StepperItem_default;\nexports.StepperRoot = require_Stepper_StepperRoot.StepperRoot_default;\nexports.StepperSeparator = require_Stepper_StepperSeparator.StepperSeparator_default;\nexports.StepperTitle = require_Stepper_StepperTitle.StepperTitle_default;\nexports.StepperTrigger = require_Stepper_StepperTrigger.StepperTrigger_default;\nexports.SwitchRoot = require_Switch_SwitchRoot.SwitchRoot_default;\nexports.SwitchThumb = require_Switch_SwitchThumb.SwitchThumb_default;\nexports.TabsContent = require_Tabs_TabsContent.TabsContent_default;\nexports.TabsIndicator = require_Tabs_TabsIndicator.TabsIndicator_default;\nexports.TabsList = require_Tabs_TabsList.TabsList_default;\nexports.TabsRoot = require_Tabs_TabsRoot.TabsRoot_default;\nexports.TabsTrigger = require_Tabs_TabsTrigger.TabsTrigger_default;\nexports.TagsInputClear = require_TagsInput_TagsInputClear.TagsInputClear_default;\nexports.TagsInputInput = require_TagsInput_TagsInputInput.TagsInputInput_default;\nexports.TagsInputItem = require_TagsInput_TagsInputItem.TagsInputItem_default;\nexports.TagsInputItemDelete = require_TagsInput_TagsInputItemDelete.TagsInputItemDelete_default;\nexports.TagsInputItemText = require_TagsInput_TagsInputItemText.TagsInputItemText_default;\nexports.TagsInputRoot = require_TagsInput_TagsInputRoot.TagsInputRoot_default;\nexports.TimeFieldInput = require_TimeField_TimeFieldInput.TimeFieldInput_default;\nexports.TimeFieldRoot = require_TimeField_TimeFieldRoot.TimeFieldRoot_default;\nexports.TimeRangeFieldInput = require_TimeRangeField_TimeRangeFieldInput.TimeRangeFieldInput_default;\nexports.TimeRangeFieldRoot = require_TimeRangeField_TimeRangeFieldRoot.TimeRangeFieldRoot_default;\nexports.ToastAction = require_Toast_ToastAction.ToastAction_default;\nexports.ToastClose = require_Toast_ToastClose.ToastClose_default;\nexports.ToastDescription = require_Toast_ToastDescription.ToastDescription_default;\nexports.ToastPortal = require_Toast_ToastPortal.ToastPortal_default;\nexports.ToastProvider = require_Toast_ToastProvider.ToastProvider_default;\nexports.ToastRoot = require_Toast_ToastRoot.ToastRoot_default;\nexports.ToastTitle = require_Toast_ToastTitle.ToastTitle_default;\nexports.ToastViewport = require_Toast_ToastViewport.ToastViewport_default;\nexports.Toggle = require_Toggle_Toggle.Toggle_default;\nexports.ToggleGroupItem = require_ToggleGroup_ToggleGroupItem.ToggleGroupItem_default;\nexports.ToggleGroupRoot = require_ToggleGroup_ToggleGroupRoot.ToggleGroupRoot_default;\nexports.ToolbarButton = require_Toolbar_ToolbarButton.ToolbarButton_default;\nexports.ToolbarLink = require_Toolbar_ToolbarLink.ToolbarLink_default;\nexports.ToolbarRoot = require_Toolbar_ToolbarRoot.ToolbarRoot_default;\nexports.ToolbarSeparator = require_Toolbar_ToolbarSeparator.ToolbarSeparator_default;\nexports.ToolbarToggleGroup = require_Toolbar_ToolbarToggleGroup.ToolbarToggleGroup_default;\nexports.ToolbarToggleItem = require_Toolbar_ToolbarToggleItem.ToolbarToggleItem_default;\nexports.TooltipArrow = require_Tooltip_TooltipArrow.TooltipArrow_default;\nexports.TooltipContent = require_Tooltip_TooltipContent.TooltipContent_default;\nexports.TooltipPortal = require_Tooltip_TooltipPortal.TooltipPortal_default;\nexports.TooltipProvider = require_Tooltip_TooltipProvider.TooltipProvider_default;\nexports.TooltipRoot = require_Tooltip_TooltipRoot.TooltipRoot_default;\nexports.TooltipTrigger = require_Tooltip_TooltipTrigger.TooltipTrigger_default;\nexports.TreeItem = require_Tree_TreeItem.TreeItem_default;\nexports.TreeRoot = require_Tree_TreeRoot.TreeRoot_default;\nexports.TreeVirtualizer = require_Tree_TreeVirtualizer.TreeVirtualizer_default;\nexports.Viewport = require_Viewport_Viewport.Viewport_default;\nexports.VisuallyHidden = require_VisuallyHidden_VisuallyHidden.VisuallyHidden_default;\nexports.YearPickerCell = require_YearPicker_YearPickerCell.YearPickerCell_default;\nexports.YearPickerCellTrigger = require_YearPicker_YearPickerCellTrigger.YearPickerCellTrigger_default;\nexports.YearPickerGrid = require_YearPicker_YearPickerGrid.YearPickerGrid_default;\nexports.YearPickerGridBody = require_YearPicker_YearPickerGridBody.YearPickerGridBody_default;\nexports.YearPickerGridRow = require_YearPicker_YearPickerGridRow.YearPickerGridRow_default;\nexports.YearPickerHeader = require_YearPicker_YearPickerHeader.YearPickerHeader_default;\nexports.YearPickerHeading = require_YearPicker_YearPickerHeading.YearPickerHeading_default;\nexports.YearPickerNext = require_YearPicker_YearPickerNext.YearPickerNext_default;\nexports.YearPickerPrev = require_YearPicker_YearPickerPrev.YearPickerPrev_default;\nexports.YearPickerRoot = require_YearPicker_YearPickerRoot.YearPickerRoot_default;\nexports.YearRangePickerCell = require_YearRangePicker_YearRangePickerCell.YearRangePickerCell_default;\nexports.YearRangePickerCellTrigger = require_YearRangePicker_YearRangePickerCellTrigger.YearRangePickerCellTrigger_default;\nexports.YearRangePickerGrid = require_YearRangePicker_YearRangePickerGrid.YearRangePickerGrid_default;\nexports.YearRangePickerGridBody = require_YearRangePicker_YearRangePickerGridBody.YearRangePickerGridBody_default;\nexports.YearRangePickerGridRow = require_YearRangePicker_YearRangePickerGridRow.YearRangePickerGridRow_default;\nexports.YearRangePickerHeader = require_YearRangePicker_YearRangePickerHeader.YearRangePickerHeader_default;\nexports.YearRangePickerHeading = require_YearRangePicker_YearRangePickerHeading.YearRangePickerHeading_default;\nexports.YearRangePickerNext = require_YearRangePicker_YearRangePickerNext.YearRangePickerNext_default;\nexports.YearRangePickerPrev = require_YearRangePicker_YearRangePickerPrev.YearRangePickerPrev_default;\nexports.YearRangePickerRoot = require_YearRangePicker_YearRangePickerRoot.YearRangePickerRoot_default;\nexports.colorToHex = require_color_convert.colorToHex;\nexports.colorToHsb = require_color_convert.colorToHsb;\nexports.colorToHsl = require_color_convert.colorToHsl;\nexports.colorToRgb = require_color_convert.colorToRgb;\nexports.colorToString = require_color_convert.colorToString;\nexports.convertToHsb = require_color_convert.convertToHsb;\nexports.convertToHsl = require_color_convert.convertToHsl;\nexports.convertToRgb = require_color_convert.convertToRgb;\nexports.createContext = require_shared_createContext.createContext;\nexports.getAreaBackgroundStyle = require_color_gradient.getAreaBackgroundStyle;\nexports.getAreaGradient = require_color_gradient.getAreaGradient;\nexports.getChannelName = require_color_channel.getChannelName;\nexports.getChannelRange = require_color_channel.getChannelRange;\nexports.getChannelValue = require_color_channel.getChannelValue;\nexports.getSliderBackgroundStyle = require_color_gradient.getSliderBackgroundStyle;\nexports.getSliderGradient = require_color_gradient.getSliderGradient;\nexports.injectAccordionItemContext = require_Accordion_AccordionItem.injectAccordionItemContext;\nexports.injectAccordionRootContext = require_Accordion_AccordionRoot.injectAccordionRootContext;\nexports.injectAlertDialogContentContext = require_AlertDialog_AlertDialogContent.injectAlertDialogContentContext;\nexports.injectAutocompleteRootContext = require_Autocomplete_AutocompleteRoot.injectAutocompleteRootContext;\nexports.injectAvatarRootContext = require_Avatar_AvatarRoot.injectAvatarRootContext;\nexports.injectCalendarRootContext = require_Calendar_CalendarRoot.injectCalendarRootContext;\nexports.injectCheckboxGroupRootContext = require_Checkbox_CheckboxGroupRoot.injectCheckboxGroupRootContext;\nexports.injectCheckboxRootContext = require_Checkbox_CheckboxRoot.injectCheckboxRootContext;\nexports.injectCollapsibleRootContext = require_Collapsible_CollapsibleRoot.injectCollapsibleRootContext;\nexports.injectColorAreaRootContext = require_ColorArea_ColorAreaRoot.injectColorAreaRootContext;\nexports.injectColorFieldRootContext = require_ColorField_ColorFieldRoot.injectColorFieldRootContext;\nexports.injectColorSliderRootContext = require_ColorSlider_ColorSliderRoot.injectColorSliderRootContext;\nexports.injectComboboxGroupContext = require_Combobox_ComboboxGroup.injectComboboxGroupContext;\nexports.injectComboboxItemContext = require_Listbox_ListboxItem.injectListboxItemContext;\nexports.injectComboboxRootContext = require_Combobox_ComboboxRoot.injectComboboxRootContext;\nexports.injectConfigProviderContext = require_ConfigProvider_ConfigProvider.injectConfigProviderContext;\nexports.injectContextMenuRootContext = require_ContextMenu_ContextMenuRoot.injectContextMenuRootContext;\nexports.injectDateFieldRootContext = require_DateField_DateFieldRoot.injectDateFieldRootContext;\nexports.injectDatePickerRootContext = require_DatePicker_DatePickerRoot.injectDatePickerRootContext;\nexports.injectDateRangeFieldRootContext = require_DateRangeField_DateRangeFieldRoot.injectDateRangeFieldRootContext;\nexports.injectDateRangePickerRootContext = require_DateRangePicker_DateRangePickerRoot.injectDateRangePickerRootContext;\nexports.injectDialogRootContext = require_Dialog_DialogRoot.injectDialogRootContext;\nexports.injectDropdownMenuRootContext = require_DropdownMenu_DropdownMenuRoot.injectDropdownMenuRootContext;\nexports.injectEditableRootContext = require_Editable_EditableRoot.injectEditableRootContext;\nexports.injectHoverCardRootContext = require_HoverCard_HoverCardRoot.injectHoverCardRootContext;\nexports.injectListboxGroupContext = require_Listbox_ListboxGroup.injectListboxGroupContext;\nexports.injectListboxItemContext = require_Listbox_ListboxItem.injectListboxItemContext;\nexports.injectListboxRootContext = require_Listbox_ListboxRoot.injectListboxRootContext;\nexports.injectMenubarMenuContext = require_Menubar_MenubarMenu.injectMenubarMenuContext;\nexports.injectMenubarRootContext = require_Menubar_MenubarRoot.injectMenubarRootContext;\nexports.injectMonthPickerRootContext = require_MonthPicker_MonthPickerRoot.injectMonthPickerRootContext;\nexports.injectMonthRangePickerRootContext = require_MonthRangePicker_MonthRangePickerRoot.injectMonthRangePickerRootContext;\nexports.injectNavigationMenuContext = require_NavigationMenu_NavigationMenuRoot.injectNavigationMenuContext;\nexports.injectNavigationMenuItemContext = require_NavigationMenu_NavigationMenuItem.injectNavigationMenuItemContext;\nexports.injectNumberFieldRootContext = require_NumberField_NumberFieldRoot.injectNumberFieldRootContext;\nexports.injectPaginationRootContext = require_Pagination_PaginationRoot.injectPaginationRootContext;\nexports.injectPinInputRootContext = require_PinInput_PinInputRoot.injectPinInputRootContext;\nexports.injectPopoverRootContext = require_Popover_PopoverRoot.injectPopoverRootContext;\nexports.injectProgressRootContext = require_Progress_ProgressRoot.injectProgressRootContext;\nexports.injectRadioGroupItemContext = require_RadioGroup_RadioGroupItem.injectRadioGroupItemContext;\nexports.injectRadioGroupRootContext = require_RadioGroup_RadioGroupRoot.injectRadioGroupRootContext;\nexports.injectRangeCalendarRootContext = require_RangeCalendar_RangeCalendarRoot.injectRangeCalendarRootContext;\nexports.injectScrollAreaRootContext = require_ScrollArea_ScrollAreaRoot.injectScrollAreaRootContext;\nexports.injectScrollAreaScrollbarContext = require_ScrollArea_ScrollAreaScrollbar.injectScrollAreaScrollbarContext;\nexports.injectSelectGroupContext = require_Select_SelectGroup.injectSelectGroupContext;\nexports.injectSelectItemContext = require_Select_SelectItem.injectSelectItemContext;\nexports.injectSelectRootContext = require_Select_SelectRoot.injectSelectRootContext;\nexports.injectSliderRootContext = require_Slider_SliderRoot.injectSliderRootContext;\nexports.injectSplitterGroupContext = require_Splitter_SplitterGroup.injectPanelGroupContext;\nexports.injectStepperItemContext = require_Stepper_StepperItem.injectStepperItemContext;\nexports.injectStepperRootContext = require_Stepper_StepperRoot.injectStepperRootContext;\nexports.injectSwitchRootContext = require_Switch_SwitchRoot.injectSwitchRootContext;\nexports.injectTabsRootContext = require_Tabs_TabsRoot.injectTabsRootContext;\nexports.injectTagsInputItemContext = require_TagsInput_TagsInputItem.injectTagsInputItemContext;\nexports.injectTagsInputRootContext = require_TagsInput_TagsInputRoot.injectTagsInputRootContext;\nexports.injectTimeFieldRootContext = require_TimeField_TimeFieldRoot.injectTimeFieldRootContext;\nexports.injectTimeRangeFieldRootContext = require_TimeRangeField_TimeRangeFieldRoot.injectTimeRangeFieldRootContext;\nexports.injectToastProviderContext = require_Toast_ToastProvider.injectToastProviderContext;\nexports.injectToggleGroupRootContext = require_ToggleGroup_ToggleGroupRoot.injectToggleGroupRootContext;\nexports.injectToolbarRootContext = require_Toolbar_ToolbarRoot.injectToolbarRootContext;\nexports.injectTooltipProviderContext = require_Tooltip_TooltipProvider.injectTooltipProviderContext;\nexports.injectTooltipRootContext = require_Tooltip_TooltipRoot.injectTooltipRootContext;\nexports.injectTreeRootContext = require_Tree_TreeRoot.injectTreeRootContext;\nexports.injectYearPickerRootContext = require_YearPicker_YearPickerRoot.injectYearPickerRootContext;\nexports.injectYearRangePickerRootContext = require_YearRangePicker_YearRangePickerRoot.injectYearRangePickerRootContext;\nexports.isValidColor = require_color_parse.isValidColor;\nexports.normalizeColor = require_color_parse.normalizeColor;\nexports.parseColor = require_color_parse.parseColor;\nexports.setChannelValue = require_color_channel.setChannelValue;\nexports.setChannelValues = require_color_channel.setChannelValues;\nexports.useBodyScrollLock = require_shared_useBodyScrollLock.useBodyScrollLock;\nexports.useDateFormatter = require_shared_useDateFormatter.useDateFormatter;\nexports.useDirection = require_shared_useDirection.useDirection;\nexports.useEmitAsProps = require_shared_useEmitAsProps.useEmitAsProps;\nexports.useFilter = require_shared_useFilter.useFilter;\nexports.useForwardExpose = require_shared_useForwardExpose.useForwardExpose;\nexports.useForwardProps = require_shared_useForwardProps.useForwardProps;\nexports.useForwardPropsEmits = require_shared_useForwardPropsEmits.useForwardPropsEmits;\nexports.useId = require_shared_useId.useId;\nexports.useLocale = require_shared_useLocale.useLocale;\nexports.useStateMachine = require_shared_useStateMachine.useStateMachine;\nexports.withDefault = require_shared_withDefault.withDefault;","/*\r\n * @namespace Util\r\n *\r\n * Various utility functions, used by Leaflet internally.\r\n */\r\n\r\n// @function extend(dest: Object, src?: Object): Object\r\n// Merges the properties of the `src` object (or multiple objects) into `dest` object and returns the latter. Has an `L.extend` shortcut.\r\nexport function extend(dest) {\r\n\tvar i, j, len, src;\r\n\r\n\tfor (j = 1, len = arguments.length; j < len; j++) {\r\n\t\tsrc = arguments[j];\r\n\t\tfor (i in src) {\r\n\t\t\tdest[i] = src[i];\r\n\t\t}\r\n\t}\r\n\treturn dest;\r\n}\r\n\r\n// @function create(proto: Object, properties?: Object): Object\r\n// Compatibility polyfill for [Object.create](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/create)\r\nexport var create = Object.create || (function () {\r\n\tfunction F() {}\r\n\treturn function (proto) {\r\n\t\tF.prototype = proto;\r\n\t\treturn new F();\r\n\t};\r\n})();\r\n\r\n// @function bind(fn: Function, …): Function\r\n// Returns a new function bound to the arguments passed, like [Function.prototype.bind](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\r\n// Has a `L.bind()` shortcut.\r\nexport function bind(fn, obj) {\r\n\tvar slice = Array.prototype.slice;\r\n\r\n\tif (fn.bind) {\r\n\t\treturn fn.bind.apply(fn, slice.call(arguments, 1));\r\n\t}\r\n\r\n\tvar args = slice.call(arguments, 2);\r\n\r\n\treturn function () {\r\n\t\treturn fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments);\r\n\t};\r\n}\r\n\r\n// @property lastId: Number\r\n// Last unique ID used by [`stamp()`](#util-stamp)\r\nexport var lastId = 0;\r\n\r\n// @function stamp(obj: Object): Number\r\n// Returns the unique ID of an object, assigning it one if it doesn't have it.\r\nexport function stamp(obj) {\r\n\tif (!('_leaflet_id' in obj)) {\r\n\t\tobj['_leaflet_id'] = ++lastId;\r\n\t}\r\n\treturn obj._leaflet_id;\r\n}\r\n\r\n// @function throttle(fn: Function, time: Number, context: Object): Function\r\n// Returns a function which executes function `fn` with the given scope `context`\r\n// (so that the `this` keyword refers to `context` inside `fn`'s code). The function\r\n// `fn` will be called no more than one time per given amount of `time`. The arguments\r\n// received by the bound function will be any arguments passed when binding the\r\n// function, followed by any arguments passed when invoking the bound function.\r\n// Has an `L.throttle` shortcut.\r\nexport function throttle(fn, time, context) {\r\n\tvar lock, args, wrapperFn, later;\r\n\r\n\tlater = function () {\r\n\t\t// reset lock and call if queued\r\n\t\tlock = false;\r\n\t\tif (args) {\r\n\t\t\twrapperFn.apply(context, args);\r\n\t\t\targs = false;\r\n\t\t}\r\n\t};\r\n\r\n\twrapperFn = function () {\r\n\t\tif (lock) {\r\n\t\t\t// called too soon, queue to call later\r\n\t\t\targs = arguments;\r\n\r\n\t\t} else {\r\n\t\t\t// call and lock until later\r\n\t\t\tfn.apply(context, arguments);\r\n\t\t\tsetTimeout(later, time);\r\n\t\t\tlock = true;\r\n\t\t}\r\n\t};\r\n\r\n\treturn wrapperFn;\r\n}\r\n\r\n// @function wrapNum(num: Number, range: Number[], includeMax?: Boolean): Number\r\n// Returns the number `num` modulo `range` in such a way so it lies within\r\n// `range[0]` and `range[1]`. The returned value will be always smaller than\r\n// `range[1]` unless `includeMax` is set to `true`.\r\nexport function wrapNum(x, range, includeMax) {\r\n\tvar max = range[1],\r\n\t    min = range[0],\r\n\t    d = max - min;\r\n\treturn x === max && includeMax ? x : ((x - min) % d + d) % d + min;\r\n}\r\n\r\n// @function falseFn(): Function\r\n// Returns a function which always returns `false`.\r\nexport function falseFn() { return false; }\r\n\r\n// @function formatNum(num: Number, precision?: Number|false): Number\r\n// Returns the number `num` rounded with specified `precision`.\r\n// The default `precision` value is 6 decimal places.\r\n// `false` can be passed to skip any processing (can be useful to avoid round-off errors).\r\nexport function formatNum(num, precision) {\r\n\tif (precision === false) { return num; }\r\n\tvar pow = Math.pow(10, precision === undefined ? 6 : precision);\r\n\treturn Math.round(num * pow) / pow;\r\n}\r\n\r\n// @function trim(str: String): String\r\n// Compatibility polyfill for [String.prototype.trim](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim)\r\nexport function trim(str) {\r\n\treturn str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\r\n}\r\n\r\n// @function splitWords(str: String): String[]\r\n// Trims and splits the string on whitespace and returns the array of parts.\r\nexport function splitWords(str) {\r\n\treturn trim(str).split(/\\s+/);\r\n}\r\n\r\n// @function setOptions(obj: Object, options: Object): Object\r\n// Merges the given properties to the `options` of the `obj` object, returning the resulting options. See `Class options`. Has an `L.setOptions` shortcut.\r\nexport function setOptions(obj, options) {\r\n\tif (!Object.prototype.hasOwnProperty.call(obj, 'options')) {\r\n\t\tobj.options = obj.options ? create(obj.options) : {};\r\n\t}\r\n\tfor (var i in options) {\r\n\t\tobj.options[i] = options[i];\r\n\t}\r\n\treturn obj.options;\r\n}\r\n\r\n// @function getParamString(obj: Object, existingUrl?: String, uppercase?: Boolean): String\r\n// Converts an object into a parameter URL string, e.g. `{a: \"foo\", b: \"bar\"}`\r\n// translates to `'?a=foo&b=bar'`. If `existingUrl` is set, the parameters will\r\n// be appended at the end. If `uppercase` is `true`, the parameter names will\r\n// be uppercased (e.g. `'?A=foo&B=bar'`)\r\nexport function getParamString(obj, existingUrl, uppercase) {\r\n\tvar params = [];\r\n\tfor (var i in obj) {\r\n\t\tparams.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i]));\r\n\t}\r\n\treturn ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&');\r\n}\r\n\r\nvar templateRe = /\\{ *([\\w_ -]+) *\\}/g;\r\n\r\n// @function template(str: String, data: Object): String\r\n// Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'`\r\n// and a data object like `{a: 'foo', b: 'bar'}`, returns evaluated string\r\n// `('Hello foo, bar')`. You can also specify functions instead of strings for\r\n// data values — they will be evaluated passing `data` as an argument.\r\nexport function template(str, data) {\r\n\treturn str.replace(templateRe, function (str, key) {\r\n\t\tvar value = data[key];\r\n\r\n\t\tif (value === undefined) {\r\n\t\t\tthrow new Error('No value provided for variable ' + str);\r\n\r\n\t\t} else if (typeof value === 'function') {\r\n\t\t\tvalue = value(data);\r\n\t\t}\r\n\t\treturn value;\r\n\t});\r\n}\r\n\r\n// @function isArray(obj): Boolean\r\n// Compatibility polyfill for [Array.isArray](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray)\r\nexport var isArray = Array.isArray || function (obj) {\r\n\treturn (Object.prototype.toString.call(obj) === '[object Array]');\r\n};\r\n\r\n// @function indexOf(array: Array, el: Object): Number\r\n// Compatibility polyfill for [Array.prototype.indexOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf)\r\nexport function indexOf(array, el) {\r\n\tfor (var i = 0; i < array.length; i++) {\r\n\t\tif (array[i] === el) { return i; }\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\n// @property emptyImageUrl: String\r\n// Data URI string containing a base64-encoded empty GIF image.\r\n// Used as a hack to free memory from unused images on WebKit-powered\r\n// mobile devices (by setting image `src` to this string).\r\nexport var emptyImageUrl = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';\r\n\r\n// inspired by https://paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n\r\nfunction getPrefixed(name) {\r\n\treturn window['webkit' + name] || window['moz' + name] || window['ms' + name];\r\n}\r\n\r\nvar lastTime = 0;\r\n\r\n// fallback for IE 7-8\r\nfunction timeoutDefer(fn) {\r\n\tvar time = +new Date(),\r\n\t    timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\tlastTime = time + timeToCall;\r\n\treturn window.setTimeout(fn, timeToCall);\r\n}\r\n\r\nexport var requestFn = window.requestAnimationFrame || getPrefixed('RequestAnimationFrame') || timeoutDefer;\r\nexport var cancelFn = window.cancelAnimationFrame || getPrefixed('CancelAnimationFrame') ||\r\n\t\tgetPrefixed('CancelRequestAnimationFrame') || function (id) { window.clearTimeout(id); };\r\n\r\n// @function requestAnimFrame(fn: Function, context?: Object, immediate?: Boolean): Number\r\n// Schedules `fn` to be executed when the browser repaints. `fn` is bound to\r\n// `context` if given. When `immediate` is set, `fn` is called immediately if\r\n// the browser doesn't have native support for\r\n// [`window.requestAnimationFrame`](https://developer.mozilla.org/docs/Web/API/window/requestAnimationFrame),\r\n// otherwise it's delayed. Returns a request ID that can be used to cancel the request.\r\nexport function requestAnimFrame(fn, context, immediate) {\r\n\tif (immediate && requestFn === timeoutDefer) {\r\n\t\tfn.call(context);\r\n\t} else {\r\n\t\treturn requestFn.call(window, bind(fn, context));\r\n\t}\r\n}\r\n\r\n// @function cancelAnimFrame(id: Number): undefined\r\n// Cancels a previous `requestAnimFrame`. See also [window.cancelAnimationFrame](https://developer.mozilla.org/docs/Web/API/window/cancelAnimationFrame).\r\nexport function cancelAnimFrame(id) {\r\n\tif (id) {\r\n\t\tcancelFn.call(window, id);\r\n\t}\r\n}\r\n","import * as Util from './Util';\r\n\r\n// @class Class\r\n// @aka L.Class\r\n\r\n// @section\r\n// @uninheritable\r\n\r\n// Thanks to John Resig and Dean Edwards for inspiration!\r\n\r\nexport function Class() {}\r\n\r\nClass.extend = function (props) {\r\n\r\n\t// @function extend(props: Object): Function\r\n\t// [Extends the current class](#class-inheritance) given the properties to be included.\r\n\t// Returns a Javascript function that is a class constructor (to be called with `new`).\r\n\tvar NewClass = function () {\r\n\r\n\t\tUtil.setOptions(this);\r\n\r\n\t\t// call the constructor\r\n\t\tif (this.initialize) {\r\n\t\t\tthis.initialize.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\t// call all constructor hooks\r\n\t\tthis.callInitHooks();\r\n\t};\r\n\r\n\tvar parentProto = NewClass.__super__ = this.prototype;\r\n\r\n\tvar proto = Util.create(parentProto);\r\n\tproto.constructor = NewClass;\r\n\r\n\tNewClass.prototype = proto;\r\n\r\n\t// inherit parent's statics\r\n\tfor (var i in this) {\r\n\t\tif (Object.prototype.hasOwnProperty.call(this, i) && i !== 'prototype' && i !== '__super__') {\r\n\t\t\tNewClass[i] = this[i];\r\n\t\t}\r\n\t}\r\n\r\n\t// mix static properties into the class\r\n\tif (props.statics) {\r\n\t\tUtil.extend(NewClass, props.statics);\r\n\t}\r\n\r\n\t// mix includes into the prototype\r\n\tif (props.includes) {\r\n\t\tcheckDeprecatedMixinEvents(props.includes);\r\n\t\tUtil.extend.apply(null, [proto].concat(props.includes));\r\n\t}\r\n\r\n\t// mix given properties into the prototype\r\n\tUtil.extend(proto, props);\r\n\tdelete proto.statics;\r\n\tdelete proto.includes;\r\n\r\n\t// merge options\r\n\tif (proto.options) {\r\n\t\tproto.options = parentProto.options ? Util.create(parentProto.options) : {};\r\n\t\tUtil.extend(proto.options, props.options);\r\n\t}\r\n\r\n\tproto._initHooks = [];\r\n\r\n\t// add method for calling all hooks\r\n\tproto.callInitHooks = function () {\r\n\r\n\t\tif (this._initHooksCalled) { return; }\r\n\r\n\t\tif (parentProto.callInitHooks) {\r\n\t\t\tparentProto.callInitHooks.call(this);\r\n\t\t}\r\n\r\n\t\tthis._initHooksCalled = true;\r\n\r\n\t\tfor (var i = 0, len = proto._initHooks.length; i < len; i++) {\r\n\t\t\tproto._initHooks[i].call(this);\r\n\t\t}\r\n\t};\r\n\r\n\treturn NewClass;\r\n};\r\n\r\n\r\n// @function include(properties: Object): this\r\n// [Includes a mixin](#class-includes) into the current class.\r\nClass.include = function (props) {\r\n\tvar parentOptions = this.prototype.options;\r\n\tUtil.extend(this.prototype, props);\r\n\tif (props.options) {\r\n\t\tthis.prototype.options = parentOptions;\r\n\t\tthis.mergeOptions(props.options);\r\n\t}\r\n\treturn this;\r\n};\r\n\r\n// @function mergeOptions(options: Object): this\r\n// [Merges `options`](#class-options) into the defaults of the class.\r\nClass.mergeOptions = function (options) {\r\n\tUtil.extend(this.prototype.options, options);\r\n\treturn this;\r\n};\r\n\r\n// @function addInitHook(fn: Function): this\r\n// Adds a [constructor hook](#class-constructor-hooks) to the class.\r\nClass.addInitHook = function (fn) { // (Function) || (String, args...)\r\n\tvar args = Array.prototype.slice.call(arguments, 1);\r\n\r\n\tvar init = typeof fn === 'function' ? fn : function () {\r\n\t\tthis[fn].apply(this, args);\r\n\t};\r\n\r\n\tthis.prototype._initHooks = this.prototype._initHooks || [];\r\n\tthis.prototype._initHooks.push(init);\r\n\treturn this;\r\n};\r\n\r\nfunction checkDeprecatedMixinEvents(includes) {\r\n\t/* global L: true */\r\n\tif (typeof L === 'undefined' || !L || !L.Mixin) { return; }\r\n\r\n\tincludes = Util.isArray(includes) ? includes : [includes];\r\n\r\n\tfor (var i = 0; i < includes.length; i++) {\r\n\t\tif (includes[i] === L.Mixin.Events) {\r\n\t\t\tconsole.warn('Deprecated include of L.Mixin.Events: ' +\r\n\t\t\t\t'this property will be removed in future releases, ' +\r\n\t\t\t\t'please inherit from L.Evented instead.', new Error().stack);\r\n\t\t}\r\n\t}\r\n}\r\n","import {Class} from './Class';\r\nimport * as Util from './Util';\r\n\r\n/*\r\n * @class Evented\r\n * @aka L.Evented\r\n * @inherits Class\r\n *\r\n * A set of methods shared between event-powered classes (like `Map` and `Marker`). Generally, events allow you to execute some function when something happens with an object (e.g. the user clicks on the map, causing the map to fire `'click'` event).\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * map.on('click', function(e) {\r\n * \talert(e.latlng);\r\n * } );\r\n * ```\r\n *\r\n * Leaflet deals with event listeners by reference, so if you want to add a listener and then remove it, define it as a function:\r\n *\r\n * ```js\r\n * function onClick(e) { ... }\r\n *\r\n * map.on('click', onClick);\r\n * map.off('click', onClick);\r\n * ```\r\n */\r\n\r\nexport var Events = {\r\n\t/* @method on(type: String, fn: Function, context?: Object): this\r\n\t * Adds a listener function (`fn`) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. `'click dblclick'`).\r\n\t *\r\n\t * @alternative\r\n\t * @method on(eventMap: Object): this\r\n\t * Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`\r\n\t */\r\n\ton: function (types, fn, context) {\r\n\r\n\t\t// types can be a map of types/handlers\r\n\t\tif (typeof types === 'object') {\r\n\t\t\tfor (var type in types) {\r\n\t\t\t\t// we don't process space-separated events here for performance;\r\n\t\t\t\t// it's a hot path since Layer uses the on(obj) syntax\r\n\t\t\t\tthis._on(type, types[type], fn);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t// types can be a string of space-separated words\r\n\t\t\ttypes = Util.splitWords(types);\r\n\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tthis._on(types[i], fn, context);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t/* @method off(type: String, fn?: Function, context?: Object): this\r\n\t * Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to `on`, you must pass the same context to `off` in order to remove the listener.\r\n\t *\r\n\t * @alternative\r\n\t * @method off(eventMap: Object): this\r\n\t * Removes a set of type/listener pairs.\r\n\t *\r\n\t * @alternative\r\n\t * @method off: this\r\n\t * Removes all listeners to all events on the object. This includes implicitly attached events.\r\n\t */\r\n\toff: function (types, fn, context) {\r\n\r\n\t\tif (!arguments.length) {\r\n\t\t\t// clear all listeners if called without arguments\r\n\t\t\tdelete this._events;\r\n\r\n\t\t} else if (typeof types === 'object') {\r\n\t\t\tfor (var type in types) {\r\n\t\t\t\tthis._off(type, types[type], fn);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\ttypes = Util.splitWords(types);\r\n\r\n\t\t\tvar removeAll = arguments.length === 1;\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tif (removeAll) {\r\n\t\t\t\t\tthis._off(types[i]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._off(types[i], fn, context);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// attach listener (without syntactic sugar now)\r\n\t_on: function (type, fn, context, _once) {\r\n\t\tif (typeof fn !== 'function') {\r\n\t\t\tconsole.warn('wrong listener type: ' + typeof fn);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// check if fn already there\r\n\t\tif (this._listens(type, fn, context) !== false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (context === this) {\r\n\t\t\t// Less memory footprint.\r\n\t\t\tcontext = undefined;\r\n\t\t}\r\n\r\n\t\tvar newListener = {fn: fn, ctx: context};\r\n\t\tif (_once) {\r\n\t\t\tnewListener.once = true;\r\n\t\t}\r\n\r\n\t\tthis._events = this._events || {};\r\n\t\tthis._events[type] = this._events[type] || [];\r\n\t\tthis._events[type].push(newListener);\r\n\t},\r\n\r\n\t_off: function (type, fn, context) {\r\n\t\tvar listeners,\r\n\t\t    i,\r\n\t\t    len;\r\n\r\n\t\tif (!this._events) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlisteners = this._events[type];\r\n\t\tif (!listeners) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (arguments.length === 1) { // remove all\r\n\t\t\tif (this._firingCount) {\r\n\t\t\t\t// Set all removed listeners to noop\r\n\t\t\t\t// so they are not called if remove happens in fire\r\n\t\t\t\tfor (i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\t\t\tlisteners[i].fn = Util.falseFn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// clear all listeners for a type if function isn't specified\r\n\t\t\tdelete this._events[type];\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (typeof fn !== 'function') {\r\n\t\t\tconsole.warn('wrong listener type: ' + typeof fn);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// find fn and remove it\r\n\t\tvar index = this._listens(type, fn, context);\r\n\t\tif (index !== false) {\r\n\t\t\tvar listener = listeners[index];\r\n\t\t\tif (this._firingCount) {\r\n\t\t\t\t// set the removed listener to noop so that's not called if remove happens in fire\r\n\t\t\t\tlistener.fn = Util.falseFn;\r\n\r\n\t\t\t\t/* copy array in case events are being fired */\r\n\t\t\t\tthis._events[type] = listeners = listeners.slice();\r\n\t\t\t}\r\n\t\t\tlisteners.splice(index, 1);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method fire(type: String, data?: Object, propagate?: Boolean): this\r\n\t// Fires an event of the specified type. You can optionally provide a data\r\n\t// object — the first argument of the listener function will contain its\r\n\t// properties. The event can optionally be propagated to event parents.\r\n\tfire: function (type, data, propagate) {\r\n\t\tif (!this.listens(type, propagate)) { return this; }\r\n\r\n\t\tvar event = Util.extend({}, data, {\r\n\t\t\ttype: type,\r\n\t\t\ttarget: this,\r\n\t\t\tsourceTarget: data && data.sourceTarget || this\r\n\t\t});\r\n\r\n\t\tif (this._events) {\r\n\t\t\tvar listeners = this._events[type];\r\n\t\t\tif (listeners) {\r\n\t\t\t\tthis._firingCount = (this._firingCount + 1) || 1;\r\n\t\t\t\tfor (var i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\t\t\tvar l = listeners[i];\r\n\t\t\t\t\t// off overwrites l.fn, so we need to copy fn to a var\r\n\t\t\t\t\tvar fn = l.fn;\r\n\t\t\t\t\tif (l.once) {\r\n\t\t\t\t\t\tthis.off(type, fn, l.ctx);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfn.call(l.ctx || this, event);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._firingCount--;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (propagate) {\r\n\t\t\t// propagate the event to parents (set with addEventParent)\r\n\t\t\tthis._propagateEvent(event);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method listens(type: String, propagate?: Boolean): Boolean\r\n\t// @method listens(type: String, fn: Function, context?: Object, propagate?: Boolean): Boolean\r\n\t// Returns `true` if a particular event type has any listeners attached to it.\r\n\t// The verification can optionally be propagated, it will return `true` if parents have the listener attached to it.\r\n\tlistens: function (type, fn, context, propagate) {\r\n\t\tif (typeof type !== 'string') {\r\n\t\t\tconsole.warn('\"string\" type argument expected');\r\n\t\t}\r\n\r\n\t\t// we don't overwrite the input `fn` value, because we need to use it for propagation\r\n\t\tvar _fn = fn;\r\n\t\tif (typeof fn !== 'function') {\r\n\t\t\tpropagate = !!fn;\r\n\t\t\t_fn = undefined;\r\n\t\t\tcontext = undefined;\r\n\t\t}\r\n\r\n\t\tvar listeners = this._events && this._events[type];\r\n\t\tif (listeners && listeners.length) {\r\n\t\t\tif (this._listens(type, _fn, context) !== false) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (propagate) {\r\n\t\t\t// also check parents for listeners if event propagates\r\n\t\t\tfor (var id in this._eventParents) {\r\n\t\t\t\tif (this._eventParents[id].listens(type, fn, context, propagate)) { return true; }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\t// returns the index (number) or false\r\n\t_listens: function (type, fn, context) {\r\n\t\tif (!this._events) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar listeners = this._events[type] || [];\r\n\t\tif (!fn) {\r\n\t\t\treturn !!listeners.length;\r\n\t\t}\r\n\r\n\t\tif (context === this) {\r\n\t\t\t// Less memory footprint.\r\n\t\t\tcontext = undefined;\r\n\t\t}\r\n\r\n\t\tfor (var i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\tif (listeners[i].fn === fn && listeners[i].ctx === context) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\r\n\t},\r\n\r\n\t// @method once(…): this\r\n\t// Behaves as [`on(…)`](#evented-on), except the listener will only get fired once and then removed.\r\n\tonce: function (types, fn, context) {\r\n\r\n\t\t// types can be a map of types/handlers\r\n\t\tif (typeof types === 'object') {\r\n\t\t\tfor (var type in types) {\r\n\t\t\t\t// we don't process space-separated events here for performance;\r\n\t\t\t\t// it's a hot path since Layer uses the on(obj) syntax\r\n\t\t\t\tthis._on(type, types[type], fn, true);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t// types can be a string of space-separated words\r\n\t\t\ttypes = Util.splitWords(types);\r\n\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tthis._on(types[i], fn, context, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method addEventParent(obj: Evented): this\r\n\t// Adds an event parent - an `Evented` that will receive propagated events\r\n\taddEventParent: function (obj) {\r\n\t\tthis._eventParents = this._eventParents || {};\r\n\t\tthis._eventParents[Util.stamp(obj)] = obj;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeEventParent(obj: Evented): this\r\n\t// Removes an event parent, so it will stop receiving propagated events\r\n\tremoveEventParent: function (obj) {\r\n\t\tif (this._eventParents) {\r\n\t\t\tdelete this._eventParents[Util.stamp(obj)];\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_propagateEvent: function (e) {\r\n\t\tfor (var id in this._eventParents) {\r\n\t\t\tthis._eventParents[id].fire(e.type, Util.extend({\r\n\t\t\t\tlayer: e.target,\r\n\t\t\t\tpropagatedFrom: e.target\r\n\t\t\t}, e), true);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// aliases; we should ditch those eventually\r\n\r\n// @method addEventListener(…): this\r\n// Alias to [`on(…)`](#evented-on)\r\nEvents.addEventListener = Events.on;\r\n\r\n// @method removeEventListener(…): this\r\n// Alias to [`off(…)`](#evented-off)\r\n\r\n// @method clearAllEventListeners(…): this\r\n// Alias to [`off()`](#evented-off)\r\nEvents.removeEventListener = Events.clearAllEventListeners = Events.off;\r\n\r\n// @method addOneTimeEventListener(…): this\r\n// Alias to [`once(…)`](#evented-once)\r\nEvents.addOneTimeEventListener = Events.once;\r\n\r\n// @method fireEvent(…): this\r\n// Alias to [`fire(…)`](#evented-fire)\r\nEvents.fireEvent = Events.fire;\r\n\r\n// @method hasEventListeners(…): Boolean\r\n// Alias to [`listens(…)`](#evented-listens)\r\nEvents.hasEventListeners = Events.listens;\r\n\r\nexport var Evented = Class.extend(Events);\r\n","import {isArray, formatNum} from '../core/Util';\r\n\r\n/*\r\n * @class Point\r\n * @aka L.Point\r\n *\r\n * Represents a point with `x` and `y` coordinates in pixels.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var point = L.point(200, 300);\r\n * ```\r\n *\r\n * All Leaflet methods and options that accept `Point` objects also accept them in a simple Array form (unless noted otherwise), so these lines are equivalent:\r\n *\r\n * ```js\r\n * map.panBy([200, 300]);\r\n * map.panBy(L.point(200, 300));\r\n * ```\r\n *\r\n * Note that `Point` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\nexport function Point(x, y, round) {\r\n\t// @property x: Number; The `x` coordinate of the point\r\n\tthis.x = (round ? Math.round(x) : x);\r\n\t// @property y: Number; The `y` coordinate of the point\r\n\tthis.y = (round ? Math.round(y) : y);\r\n}\r\n\r\nvar trunc = Math.trunc || function (v) {\r\n\treturn v > 0 ? Math.floor(v) : Math.ceil(v);\r\n};\r\n\r\nPoint.prototype = {\r\n\r\n\t// @method clone(): Point\r\n\t// Returns a copy of the current point.\r\n\tclone: function () {\r\n\t\treturn new Point(this.x, this.y);\r\n\t},\r\n\r\n\t// @method add(otherPoint: Point): Point\r\n\t// Returns the result of addition of the current and the given points.\r\n\tadd: function (point) {\r\n\t\t// non-destructive, returns a new point\r\n\t\treturn this.clone()._add(toPoint(point));\r\n\t},\r\n\r\n\t_add: function (point) {\r\n\t\t// destructive, used directly for performance in situations where it's safe to modify existing point\r\n\t\tthis.x += point.x;\r\n\t\tthis.y += point.y;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method subtract(otherPoint: Point): Point\r\n\t// Returns the result of subtraction of the given point from the current.\r\n\tsubtract: function (point) {\r\n\t\treturn this.clone()._subtract(toPoint(point));\r\n\t},\r\n\r\n\t_subtract: function (point) {\r\n\t\tthis.x -= point.x;\r\n\t\tthis.y -= point.y;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method divideBy(num: Number): Point\r\n\t// Returns the result of division of the current point by the given number.\r\n\tdivideBy: function (num) {\r\n\t\treturn this.clone()._divideBy(num);\r\n\t},\r\n\r\n\t_divideBy: function (num) {\r\n\t\tthis.x /= num;\r\n\t\tthis.y /= num;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method multiplyBy(num: Number): Point\r\n\t// Returns the result of multiplication of the current point by the given number.\r\n\tmultiplyBy: function (num) {\r\n\t\treturn this.clone()._multiplyBy(num);\r\n\t},\r\n\r\n\t_multiplyBy: function (num) {\r\n\t\tthis.x *= num;\r\n\t\tthis.y *= num;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method scaleBy(scale: Point): Point\r\n\t// Multiply each coordinate of the current point by each coordinate of\r\n\t// `scale`. In linear algebra terms, multiply the point by the\r\n\t// [scaling matrix](https://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation)\r\n\t// defined by `scale`.\r\n\tscaleBy: function (point) {\r\n\t\treturn new Point(this.x * point.x, this.y * point.y);\r\n\t},\r\n\r\n\t// @method unscaleBy(scale: Point): Point\r\n\t// Inverse of `scaleBy`. Divide each coordinate of the current point by\r\n\t// each coordinate of `scale`.\r\n\tunscaleBy: function (point) {\r\n\t\treturn new Point(this.x / point.x, this.y / point.y);\r\n\t},\r\n\r\n\t// @method round(): Point\r\n\t// Returns a copy of the current point with rounded coordinates.\r\n\tround: function () {\r\n\t\treturn this.clone()._round();\r\n\t},\r\n\r\n\t_round: function () {\r\n\t\tthis.x = Math.round(this.x);\r\n\t\tthis.y = Math.round(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method floor(): Point\r\n\t// Returns a copy of the current point with floored coordinates (rounded down).\r\n\tfloor: function () {\r\n\t\treturn this.clone()._floor();\r\n\t},\r\n\r\n\t_floor: function () {\r\n\t\tthis.x = Math.floor(this.x);\r\n\t\tthis.y = Math.floor(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method ceil(): Point\r\n\t// Returns a copy of the current point with ceiled coordinates (rounded up).\r\n\tceil: function () {\r\n\t\treturn this.clone()._ceil();\r\n\t},\r\n\r\n\t_ceil: function () {\r\n\t\tthis.x = Math.ceil(this.x);\r\n\t\tthis.y = Math.ceil(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method trunc(): Point\r\n\t// Returns a copy of the current point with truncated coordinates (rounded towards zero).\r\n\ttrunc: function () {\r\n\t\treturn this.clone()._trunc();\r\n\t},\r\n\r\n\t_trunc: function () {\r\n\t\tthis.x = trunc(this.x);\r\n\t\tthis.y = trunc(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method distanceTo(otherPoint: Point): Number\r\n\t// Returns the cartesian distance between the current and the given points.\r\n\tdistanceTo: function (point) {\r\n\t\tpoint = toPoint(point);\r\n\r\n\t\tvar x = point.x - this.x,\r\n\t\t    y = point.y - this.y;\r\n\r\n\t\treturn Math.sqrt(x * x + y * y);\r\n\t},\r\n\r\n\t// @method equals(otherPoint: Point): Boolean\r\n\t// Returns `true` if the given point has the same coordinates.\r\n\tequals: function (point) {\r\n\t\tpoint = toPoint(point);\r\n\r\n\t\treturn point.x === this.x &&\r\n\t\t       point.y === this.y;\r\n\t},\r\n\r\n\t// @method contains(otherPoint: Point): Boolean\r\n\t// Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).\r\n\tcontains: function (point) {\r\n\t\tpoint = toPoint(point);\r\n\r\n\t\treturn Math.abs(point.x) <= Math.abs(this.x) &&\r\n\t\t       Math.abs(point.y) <= Math.abs(this.y);\r\n\t},\r\n\r\n\t// @method toString(): String\r\n\t// Returns a string representation of the point for debugging purposes.\r\n\ttoString: function () {\r\n\t\treturn 'Point(' +\r\n\t\t        formatNum(this.x) + ', ' +\r\n\t\t        formatNum(this.y) + ')';\r\n\t}\r\n};\r\n\r\n// @factory L.point(x: Number, y: Number, round?: Boolean)\r\n// Creates a Point object with the given `x` and `y` coordinates. If optional `round` is set to true, rounds the `x` and `y` values.\r\n\r\n// @alternative\r\n// @factory L.point(coords: Number[])\r\n// Expects an array of the form `[x, y]` instead.\r\n\r\n// @alternative\r\n// @factory L.point(coords: Object)\r\n// Expects a plain object of the form `{x: Number, y: Number}` instead.\r\nexport function toPoint(x, y, round) {\r\n\tif (x instanceof Point) {\r\n\t\treturn x;\r\n\t}\r\n\tif (isArray(x)) {\r\n\t\treturn new Point(x[0], x[1]);\r\n\t}\r\n\tif (x === undefined || x === null) {\r\n\t\treturn x;\r\n\t}\r\n\tif (typeof x === 'object' && 'x' in x && 'y' in x) {\r\n\t\treturn new Point(x.x, x.y);\r\n\t}\r\n\treturn new Point(x, y, round);\r\n}\r\n","import {Point, toPoint} from './Point';\r\n\r\n/*\r\n * @class Bounds\r\n * @aka L.Bounds\r\n *\r\n * Represents a rectangular area in pixel coordinates.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var p1 = L.point(10, 10),\r\n * p2 = L.point(40, 60),\r\n * bounds = L.bounds(p1, p2);\r\n * ```\r\n *\r\n * All Leaflet methods that accept `Bounds` objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this:\r\n *\r\n * ```js\r\n * otherBounds.intersects([[10, 10], [40, 60]]);\r\n * ```\r\n *\r\n * Note that `Bounds` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\nexport function Bounds(a, b) {\r\n\tif (!a) { return; }\r\n\r\n\tvar points = b ? [a, b] : a;\r\n\r\n\tfor (var i = 0, len = points.length; i < len; i++) {\r\n\t\tthis.extend(points[i]);\r\n\t}\r\n}\r\n\r\nBounds.prototype = {\r\n\t// @method extend(point: Point): this\r\n\t// Extends the bounds to contain the given point.\r\n\r\n\t// @alternative\r\n\t// @method extend(otherBounds: Bounds): this\r\n\t// Extend the bounds to contain the given bounds\r\n\textend: function (obj) {\r\n\t\tvar min2, max2;\r\n\t\tif (!obj) { return this; }\r\n\r\n\t\tif (obj instanceof Point || typeof obj[0] === 'number' || 'x' in obj) {\r\n\t\t\tmin2 = max2 = toPoint(obj);\r\n\t\t} else {\r\n\t\t\tobj = toBounds(obj);\r\n\t\t\tmin2 = obj.min;\r\n\t\t\tmax2 = obj.max;\r\n\r\n\t\t\tif (!min2 || !max2) { return this; }\r\n\t\t}\r\n\r\n\t\t// @property min: Point\r\n\t\t// The top left corner of the rectangle.\r\n\t\t// @property max: Point\r\n\t\t// The bottom right corner of the rectangle.\r\n\t\tif (!this.min && !this.max) {\r\n\t\t\tthis.min = min2.clone();\r\n\t\t\tthis.max = max2.clone();\r\n\t\t} else {\r\n\t\t\tthis.min.x = Math.min(min2.x, this.min.x);\r\n\t\t\tthis.max.x = Math.max(max2.x, this.max.x);\r\n\t\t\tthis.min.y = Math.min(min2.y, this.min.y);\r\n\t\t\tthis.max.y = Math.max(max2.y, this.max.y);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getCenter(round?: Boolean): Point\r\n\t// Returns the center point of the bounds.\r\n\tgetCenter: function (round) {\r\n\t\treturn toPoint(\r\n\t\t        (this.min.x + this.max.x) / 2,\r\n\t\t        (this.min.y + this.max.y) / 2, round);\r\n\t},\r\n\r\n\t// @method getBottomLeft(): Point\r\n\t// Returns the bottom-left point of the bounds.\r\n\tgetBottomLeft: function () {\r\n\t\treturn toPoint(this.min.x, this.max.y);\r\n\t},\r\n\r\n\t// @method getTopRight(): Point\r\n\t// Returns the top-right point of the bounds.\r\n\tgetTopRight: function () { // -> Point\r\n\t\treturn toPoint(this.max.x, this.min.y);\r\n\t},\r\n\r\n\t// @method getTopLeft(): Point\r\n\t// Returns the top-left point of the bounds (i.e. [`this.min`](#bounds-min)).\r\n\tgetTopLeft: function () {\r\n\t\treturn this.min; // left, top\r\n\t},\r\n\r\n\t// @method getBottomRight(): Point\r\n\t// Returns the bottom-right point of the bounds (i.e. [`this.max`](#bounds-max)).\r\n\tgetBottomRight: function () {\r\n\t\treturn this.max; // right, bottom\r\n\t},\r\n\r\n\t// @method getSize(): Point\r\n\t// Returns the size of the given bounds\r\n\tgetSize: function () {\r\n\t\treturn this.max.subtract(this.min);\r\n\t},\r\n\r\n\t// @method contains(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle contains the given one.\r\n\t// @alternative\r\n\t// @method contains(point: Point): Boolean\r\n\t// Returns `true` if the rectangle contains the given point.\r\n\tcontains: function (obj) {\r\n\t\tvar min, max;\r\n\r\n\t\tif (typeof obj[0] === 'number' || obj instanceof Point) {\r\n\t\t\tobj = toPoint(obj);\r\n\t\t} else {\r\n\t\t\tobj = toBounds(obj);\r\n\t\t}\r\n\r\n\t\tif (obj instanceof Bounds) {\r\n\t\t\tmin = obj.min;\r\n\t\t\tmax = obj.max;\r\n\t\t} else {\r\n\t\t\tmin = max = obj;\r\n\t\t}\r\n\r\n\t\treturn (min.x >= this.min.x) &&\r\n\t\t       (max.x <= this.max.x) &&\r\n\t\t       (min.y >= this.min.y) &&\r\n\t\t       (max.y <= this.max.y);\r\n\t},\r\n\r\n\t// @method intersects(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle intersects the given bounds. Two bounds\r\n\t// intersect if they have at least one point in common.\r\n\tintersects: function (bounds) { // (Bounds) -> Boolean\r\n\t\tbounds = toBounds(bounds);\r\n\r\n\t\tvar min = this.min,\r\n\t\t    max = this.max,\r\n\t\t    min2 = bounds.min,\r\n\t\t    max2 = bounds.max,\r\n\t\t    xIntersects = (max2.x >= min.x) && (min2.x <= max.x),\r\n\t\t    yIntersects = (max2.y >= min.y) && (min2.y <= max.y);\r\n\r\n\t\treturn xIntersects && yIntersects;\r\n\t},\r\n\r\n\t// @method overlaps(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle overlaps the given bounds. Two bounds\r\n\t// overlap if their intersection is an area.\r\n\toverlaps: function (bounds) { // (Bounds) -> Boolean\r\n\t\tbounds = toBounds(bounds);\r\n\r\n\t\tvar min = this.min,\r\n\t\t    max = this.max,\r\n\t\t    min2 = bounds.min,\r\n\t\t    max2 = bounds.max,\r\n\t\t    xOverlaps = (max2.x > min.x) && (min2.x < max.x),\r\n\t\t    yOverlaps = (max2.y > min.y) && (min2.y < max.y);\r\n\r\n\t\treturn xOverlaps && yOverlaps;\r\n\t},\r\n\r\n\t// @method isValid(): Boolean\r\n\t// Returns `true` if the bounds are properly initialized.\r\n\tisValid: function () {\r\n\t\treturn !!(this.min && this.max);\r\n\t},\r\n\r\n\r\n\t// @method pad(bufferRatio: Number): Bounds\r\n\t// Returns bounds created by extending or retracting the current bounds by a given ratio in each direction.\r\n\t// For example, a ratio of 0.5 extends the bounds by 50% in each direction.\r\n\t// Negative values will retract the bounds.\r\n\tpad: function (bufferRatio) {\r\n\t\tvar min = this.min,\r\n\t\tmax = this.max,\r\n\t\theightBuffer = Math.abs(min.x - max.x) * bufferRatio,\r\n\t\twidthBuffer = Math.abs(min.y - max.y) * bufferRatio;\r\n\r\n\r\n\t\treturn toBounds(\r\n\t\t\ttoPoint(min.x - heightBuffer, min.y - widthBuffer),\r\n\t\t\ttoPoint(max.x + heightBuffer, max.y + widthBuffer));\r\n\t},\r\n\r\n\r\n\t// @method equals(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle is equivalent to the given bounds.\r\n\tequals: function (bounds) {\r\n\t\tif (!bounds) { return false; }\r\n\r\n\t\tbounds = toBounds(bounds);\r\n\r\n\t\treturn this.min.equals(bounds.getTopLeft()) &&\r\n\t\t\tthis.max.equals(bounds.getBottomRight());\r\n\t},\r\n};\r\n\r\n\r\n// @factory L.bounds(corner1: Point, corner2: Point)\r\n// Creates a Bounds object from two corners coordinate pairs.\r\n// @alternative\r\n// @factory L.bounds(points: Point[])\r\n// Creates a Bounds object from the given array of points.\r\nexport function toBounds(a, b) {\r\n\tif (!a || a instanceof Bounds) {\r\n\t\treturn a;\r\n\t}\r\n\treturn new Bounds(a, b);\r\n}\r\n","import {LatLng, toLatLng} from './LatLng';\r\n\r\n/*\r\n * @class LatLngBounds\r\n * @aka L.LatLngBounds\r\n *\r\n * Represents a rectangular geographical area on a map.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var corner1 = L.latLng(40.712, -74.227),\r\n * corner2 = L.latLng(40.774, -74.125),\r\n * bounds = L.latLngBounds(corner1, corner2);\r\n * ```\r\n *\r\n * All Leaflet methods that accept LatLngBounds objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this:\r\n *\r\n * ```js\r\n * map.fitBounds([\r\n * \t[40.712, -74.227],\r\n * \t[40.774, -74.125]\r\n * ]);\r\n * ```\r\n *\r\n * Caution: if the area crosses the antimeridian (often confused with the International Date Line), you must specify corners _outside_ the [-180, 180] degrees longitude range.\r\n *\r\n * Note that `LatLngBounds` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\nexport function LatLngBounds(corner1, corner2) { // (LatLng, LatLng) or (LatLng[])\r\n\tif (!corner1) { return; }\r\n\r\n\tvar latlngs = corner2 ? [corner1, corner2] : corner1;\r\n\r\n\tfor (var i = 0, len = latlngs.length; i < len; i++) {\r\n\t\tthis.extend(latlngs[i]);\r\n\t}\r\n}\r\n\r\nLatLngBounds.prototype = {\r\n\r\n\t// @method extend(latlng: LatLng): this\r\n\t// Extend the bounds to contain the given point\r\n\r\n\t// @alternative\r\n\t// @method extend(otherBounds: LatLngBounds): this\r\n\t// Extend the bounds to contain the given bounds\r\n\textend: function (obj) {\r\n\t\tvar sw = this._southWest,\r\n\t\t    ne = this._northEast,\r\n\t\t    sw2, ne2;\r\n\r\n\t\tif (obj instanceof LatLng) {\r\n\t\t\tsw2 = obj;\r\n\t\t\tne2 = obj;\r\n\r\n\t\t} else if (obj instanceof LatLngBounds) {\r\n\t\t\tsw2 = obj._southWest;\r\n\t\t\tne2 = obj._northEast;\r\n\r\n\t\t\tif (!sw2 || !ne2) { return this; }\r\n\r\n\t\t} else {\r\n\t\t\treturn obj ? this.extend(toLatLng(obj) || toLatLngBounds(obj)) : this;\r\n\t\t}\r\n\r\n\t\tif (!sw && !ne) {\r\n\t\t\tthis._southWest = new LatLng(sw2.lat, sw2.lng);\r\n\t\t\tthis._northEast = new LatLng(ne2.lat, ne2.lng);\r\n\t\t} else {\r\n\t\t\tsw.lat = Math.min(sw2.lat, sw.lat);\r\n\t\t\tsw.lng = Math.min(sw2.lng, sw.lng);\r\n\t\t\tne.lat = Math.max(ne2.lat, ne.lat);\r\n\t\t\tne.lng = Math.max(ne2.lng, ne.lng);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method pad(bufferRatio: Number): LatLngBounds\r\n\t// Returns bounds created by extending or retracting the current bounds by a given ratio in each direction.\r\n\t// For example, a ratio of 0.5 extends the bounds by 50% in each direction.\r\n\t// Negative values will retract the bounds.\r\n\tpad: function (bufferRatio) {\r\n\t\tvar sw = this._southWest,\r\n\t\t    ne = this._northEast,\r\n\t\t    heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio,\r\n\t\t    widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio;\r\n\r\n\t\treturn new LatLngBounds(\r\n\t\t        new LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer),\r\n\t\t        new LatLng(ne.lat + heightBuffer, ne.lng + widthBuffer));\r\n\t},\r\n\r\n\t// @method getCenter(): LatLng\r\n\t// Returns the center point of the bounds.\r\n\tgetCenter: function () {\r\n\t\treturn new LatLng(\r\n\t\t        (this._southWest.lat + this._northEast.lat) / 2,\r\n\t\t        (this._southWest.lng + this._northEast.lng) / 2);\r\n\t},\r\n\r\n\t// @method getSouthWest(): LatLng\r\n\t// Returns the south-west point of the bounds.\r\n\tgetSouthWest: function () {\r\n\t\treturn this._southWest;\r\n\t},\r\n\r\n\t// @method getNorthEast(): LatLng\r\n\t// Returns the north-east point of the bounds.\r\n\tgetNorthEast: function () {\r\n\t\treturn this._northEast;\r\n\t},\r\n\r\n\t// @method getNorthWest(): LatLng\r\n\t// Returns the north-west point of the bounds.\r\n\tgetNorthWest: function () {\r\n\t\treturn new LatLng(this.getNorth(), this.getWest());\r\n\t},\r\n\r\n\t// @method getSouthEast(): LatLng\r\n\t// Returns the south-east point of the bounds.\r\n\tgetSouthEast: function () {\r\n\t\treturn new LatLng(this.getSouth(), this.getEast());\r\n\t},\r\n\r\n\t// @method getWest(): Number\r\n\t// Returns the west longitude of the bounds\r\n\tgetWest: function () {\r\n\t\treturn this._southWest.lng;\r\n\t},\r\n\r\n\t// @method getSouth(): Number\r\n\t// Returns the south latitude of the bounds\r\n\tgetSouth: function () {\r\n\t\treturn this._southWest.lat;\r\n\t},\r\n\r\n\t// @method getEast(): Number\r\n\t// Returns the east longitude of the bounds\r\n\tgetEast: function () {\r\n\t\treturn this._northEast.lng;\r\n\t},\r\n\r\n\t// @method getNorth(): Number\r\n\t// Returns the north latitude of the bounds\r\n\tgetNorth: function () {\r\n\t\treturn this._northEast.lat;\r\n\t},\r\n\r\n\t// @method contains(otherBounds: LatLngBounds): Boolean\r\n\t// Returns `true` if the rectangle contains the given one.\r\n\r\n\t// @alternative\r\n\t// @method contains (latlng: LatLng): Boolean\r\n\t// Returns `true` if the rectangle contains the given point.\r\n\tcontains: function (obj) { // (LatLngBounds) or (LatLng) -> Boolean\r\n\t\tif (typeof obj[0] === 'number' || obj instanceof LatLng || 'lat' in obj) {\r\n\t\t\tobj = toLatLng(obj);\r\n\t\t} else {\r\n\t\t\tobj = toLatLngBounds(obj);\r\n\t\t}\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t    ne = this._northEast,\r\n\t\t    sw2, ne2;\r\n\r\n\t\tif (obj instanceof LatLngBounds) {\r\n\t\t\tsw2 = obj.getSouthWest();\r\n\t\t\tne2 = obj.getNorthEast();\r\n\t\t} else {\r\n\t\t\tsw2 = ne2 = obj;\r\n\t\t}\r\n\r\n\t\treturn (sw2.lat >= sw.lat) && (ne2.lat <= ne.lat) &&\r\n\t\t       (sw2.lng >= sw.lng) && (ne2.lng <= ne.lng);\r\n\t},\r\n\r\n\t// @method intersects(otherBounds: LatLngBounds): Boolean\r\n\t// Returns `true` if the rectangle intersects the given bounds. Two bounds intersect if they have at least one point in common.\r\n\tintersects: function (bounds) {\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t    ne = this._northEast,\r\n\t\t    sw2 = bounds.getSouthWest(),\r\n\t\t    ne2 = bounds.getNorthEast(),\r\n\r\n\t\t    latIntersects = (ne2.lat >= sw.lat) && (sw2.lat <= ne.lat),\r\n\t\t    lngIntersects = (ne2.lng >= sw.lng) && (sw2.lng <= ne.lng);\r\n\r\n\t\treturn latIntersects && lngIntersects;\r\n\t},\r\n\r\n\t// @method overlaps(otherBounds: LatLngBounds): Boolean\r\n\t// Returns `true` if the rectangle overlaps the given bounds. Two bounds overlap if their intersection is an area.\r\n\toverlaps: function (bounds) {\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t    ne = this._northEast,\r\n\t\t    sw2 = bounds.getSouthWest(),\r\n\t\t    ne2 = bounds.getNorthEast(),\r\n\r\n\t\t    latOverlaps = (ne2.lat > sw.lat) && (sw2.lat < ne.lat),\r\n\t\t    lngOverlaps = (ne2.lng > sw.lng) && (sw2.lng < ne.lng);\r\n\r\n\t\treturn latOverlaps && lngOverlaps;\r\n\t},\r\n\r\n\t// @method toBBoxString(): String\r\n\t// Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to web services that return geo data.\r\n\ttoBBoxString: function () {\r\n\t\treturn [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(',');\r\n\t},\r\n\r\n\t// @method equals(otherBounds: LatLngBounds, maxMargin?: Number): Boolean\r\n\t// Returns `true` if the rectangle is equivalent (within a small margin of error) to the given bounds. The margin of error can be overridden by setting `maxMargin` to a small number.\r\n\tequals: function (bounds, maxMargin) {\r\n\t\tif (!bounds) { return false; }\r\n\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\treturn this._southWest.equals(bounds.getSouthWest(), maxMargin) &&\r\n\t\t       this._northEast.equals(bounds.getNorthEast(), maxMargin);\r\n\t},\r\n\r\n\t// @method isValid(): Boolean\r\n\t// Returns `true` if the bounds are properly initialized.\r\n\tisValid: function () {\r\n\t\treturn !!(this._southWest && this._northEast);\r\n\t}\r\n};\r\n\r\n// TODO International date line?\r\n\r\n// @factory L.latLngBounds(corner1: LatLng, corner2: LatLng)\r\n// Creates a `LatLngBounds` object by defining two diagonally opposite corners of the rectangle.\r\n\r\n// @alternative\r\n// @factory L.latLngBounds(latlngs: LatLng[])\r\n// Creates a `LatLngBounds` object defined by the geographical points it contains. Very useful for zooming the map to fit a particular set of locations with [`fitBounds`](#map-fitbounds).\r\nexport function toLatLngBounds(a, b) {\r\n\tif (a instanceof LatLngBounds) {\r\n\t\treturn a;\r\n\t}\r\n\treturn new LatLngBounds(a, b);\r\n}\r\n","import * as Util from '../core/Util';\r\nimport {Earth} from './crs/CRS.Earth';\r\nimport {toLatLngBounds} from './LatLngBounds';\r\n\r\n/* @class LatLng\r\n * @aka L.LatLng\r\n *\r\n * Represents a geographical point with a certain latitude and longitude.\r\n *\r\n * @example\r\n *\r\n * ```\r\n * var latlng = L.latLng(50.5, 30.5);\r\n * ```\r\n *\r\n * All Leaflet methods that accept LatLng objects also accept them in a simple Array form and simple object form (unless noted otherwise), so these lines are equivalent:\r\n *\r\n * ```\r\n * map.panTo([50, 30]);\r\n * map.panTo({lon: 30, lat: 50});\r\n * map.panTo({lat: 50, lng: 30});\r\n * map.panTo(L.latLng(50, 30));\r\n * ```\r\n *\r\n * Note that `LatLng` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\nexport function LatLng(lat, lng, alt) {\r\n\tif (isNaN(lat) || isNaN(lng)) {\r\n\t\tthrow new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')');\r\n\t}\r\n\r\n\t// @property lat: Number\r\n\t// Latitude in degrees\r\n\tthis.lat = +lat;\r\n\r\n\t// @property lng: Number\r\n\t// Longitude in degrees\r\n\tthis.lng = +lng;\r\n\r\n\t// @property alt: Number\r\n\t// Altitude in meters (optional)\r\n\tif (alt !== undefined) {\r\n\t\tthis.alt = +alt;\r\n\t}\r\n}\r\n\r\nLatLng.prototype = {\r\n\t// @method equals(otherLatLng: LatLng, maxMargin?: Number): Boolean\r\n\t// Returns `true` if the given `LatLng` point is at the same position (within a small margin of error). The margin of error can be overridden by setting `maxMargin` to a small number.\r\n\tequals: function (obj, maxMargin) {\r\n\t\tif (!obj) { return false; }\r\n\r\n\t\tobj = toLatLng(obj);\r\n\r\n\t\tvar margin = Math.max(\r\n\t\t        Math.abs(this.lat - obj.lat),\r\n\t\t        Math.abs(this.lng - obj.lng));\r\n\r\n\t\treturn margin <= (maxMargin === undefined ? 1.0E-9 : maxMargin);\r\n\t},\r\n\r\n\t// @method toString(): String\r\n\t// Returns a string representation of the point (for debugging purposes).\r\n\ttoString: function (precision) {\r\n\t\treturn 'LatLng(' +\r\n\t\t        Util.formatNum(this.lat, precision) + ', ' +\r\n\t\t        Util.formatNum(this.lng, precision) + ')';\r\n\t},\r\n\r\n\t// @method distanceTo(otherLatLng: LatLng): Number\r\n\t// Returns the distance (in meters) to the given `LatLng` calculated using the [Spherical Law of Cosines](https://en.wikipedia.org/wiki/Spherical_law_of_cosines).\r\n\tdistanceTo: function (other) {\r\n\t\treturn Earth.distance(this, toLatLng(other));\r\n\t},\r\n\r\n\t// @method wrap(): LatLng\r\n\t// Returns a new `LatLng` object with the longitude wrapped so it's always between -180 and +180 degrees.\r\n\twrap: function () {\r\n\t\treturn Earth.wrapLatLng(this);\r\n\t},\r\n\r\n\t// @method toBounds(sizeInMeters: Number): LatLngBounds\r\n\t// Returns a new `LatLngBounds` object in which each boundary is `sizeInMeters/2` meters apart from the `LatLng`.\r\n\ttoBounds: function (sizeInMeters) {\r\n\t\tvar latAccuracy = 180 * sizeInMeters / 40075017,\r\n\t\t    lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat);\r\n\r\n\t\treturn toLatLngBounds(\r\n\t\t        [this.lat - latAccuracy, this.lng - lngAccuracy],\r\n\t\t        [this.lat + latAccuracy, this.lng + lngAccuracy]);\r\n\t},\r\n\r\n\tclone: function () {\r\n\t\treturn new LatLng(this.lat, this.lng, this.alt);\r\n\t}\r\n};\r\n\r\n\r\n\r\n// @factory L.latLng(latitude: Number, longitude: Number, altitude?: Number): LatLng\r\n// Creates an object representing a geographical point with the given latitude and longitude (and optionally altitude).\r\n\r\n// @alternative\r\n// @factory L.latLng(coords: Array): LatLng\r\n// Expects an array of the form `[Number, Number]` or `[Number, Number, Number]` instead.\r\n\r\n// @alternative\r\n// @factory L.latLng(coords: Object): LatLng\r\n// Expects an plain object of the form `{lat: Number, lng: Number}` or `{lat: Number, lng: Number, alt: Number}` instead.\r\n\r\nexport function toLatLng(a, b, c) {\r\n\tif (a instanceof LatLng) {\r\n\t\treturn a;\r\n\t}\r\n\tif (Util.isArray(a) && typeof a[0] !== 'object') {\r\n\t\tif (a.length === 3) {\r\n\t\t\treturn new LatLng(a[0], a[1], a[2]);\r\n\t\t}\r\n\t\tif (a.length === 2) {\r\n\t\t\treturn new LatLng(a[0], a[1]);\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\tif (a === undefined || a === null) {\r\n\t\treturn a;\r\n\t}\r\n\tif (typeof a === 'object' && 'lat' in a) {\r\n\t\treturn new LatLng(a.lat, 'lng' in a ? a.lng : a.lon, a.alt);\r\n\t}\r\n\tif (b === undefined) {\r\n\t\treturn null;\r\n\t}\r\n\treturn new LatLng(a, b, c);\r\n}\r\n","\r\nimport {Bounds} from '../../geometry/Bounds';\r\nimport {LatLng} from '../LatLng';\r\nimport {LatLngBounds} from '../LatLngBounds';\r\nimport * as Util from '../../core/Util';\r\n\r\n/*\r\n * @namespace CRS\r\n * @crs L.CRS.Base\r\n * Object that defines coordinate reference systems for projecting\r\n * geographical points into pixel (screen) coordinates and back (and to\r\n * coordinates in other units for [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services). See\r\n * [spatial reference system](https://en.wikipedia.org/wiki/Spatial_reference_system).\r\n *\r\n * Leaflet defines the most usual CRSs by default. If you want to use a\r\n * CRS not defined by default, take a look at the\r\n * [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) plugin.\r\n *\r\n * Note that the CRS instances do not inherit from Leaflet's `Class` object,\r\n * and can't be instantiated. Also, new classes can't inherit from them,\r\n * and methods can't be added to them with the `include` function.\r\n */\r\n\r\nexport var CRS = {\r\n\t// @method latLngToPoint(latlng: LatLng, zoom: Number): Point\r\n\t// Projects geographical coordinates into pixel coordinates for a given zoom.\r\n\tlatLngToPoint: function (latlng, zoom) {\r\n\t\tvar projectedPoint = this.projection.project(latlng),\r\n\t\t    scale = this.scale(zoom);\r\n\r\n\t\treturn this.transformation._transform(projectedPoint, scale);\r\n\t},\r\n\r\n\t// @method pointToLatLng(point: Point, zoom: Number): LatLng\r\n\t// The inverse of `latLngToPoint`. Projects pixel coordinates on a given\r\n\t// zoom into geographical coordinates.\r\n\tpointToLatLng: function (point, zoom) {\r\n\t\tvar scale = this.scale(zoom),\r\n\t\t    untransformedPoint = this.transformation.untransform(point, scale);\r\n\r\n\t\treturn this.projection.unproject(untransformedPoint);\r\n\t},\r\n\r\n\t// @method project(latlng: LatLng): Point\r\n\t// Projects geographical coordinates into coordinates in units accepted for\r\n\t// this CRS (e.g. meters for EPSG:3857, for passing it to WMS services).\r\n\tproject: function (latlng) {\r\n\t\treturn this.projection.project(latlng);\r\n\t},\r\n\r\n\t// @method unproject(point: Point): LatLng\r\n\t// Given a projected coordinate returns the corresponding LatLng.\r\n\t// The inverse of `project`.\r\n\tunproject: function (point) {\r\n\t\treturn this.projection.unproject(point);\r\n\t},\r\n\r\n\t// @method scale(zoom: Number): Number\r\n\t// Returns the scale used when transforming projected coordinates into\r\n\t// pixel coordinates for a particular zoom. For example, it returns\r\n\t// `256 * 2^zoom` for Mercator-based CRS.\r\n\tscale: function (zoom) {\r\n\t\treturn 256 * Math.pow(2, zoom);\r\n\t},\r\n\r\n\t// @method zoom(scale: Number): Number\r\n\t// Inverse of `scale()`, returns the zoom level corresponding to a scale\r\n\t// factor of `scale`.\r\n\tzoom: function (scale) {\r\n\t\treturn Math.log(scale / 256) / Math.LN2;\r\n\t},\r\n\r\n\t// @method getProjectedBounds(zoom: Number): Bounds\r\n\t// Returns the projection's bounds scaled and transformed for the provided `zoom`.\r\n\tgetProjectedBounds: function (zoom) {\r\n\t\tif (this.infinite) { return null; }\r\n\r\n\t\tvar b = this.projection.bounds,\r\n\t\t    s = this.scale(zoom),\r\n\t\t    min = this.transformation.transform(b.min, s),\r\n\t\t    max = this.transformation.transform(b.max, s);\r\n\r\n\t\treturn new Bounds(min, max);\r\n\t},\r\n\r\n\t// @method distance(latlng1: LatLng, latlng2: LatLng): Number\r\n\t// Returns the distance between two geographical coordinates.\r\n\r\n\t// @property code: String\r\n\t// Standard code name of the CRS passed into WMS services (e.g. `'EPSG:3857'`)\r\n\t//\r\n\t// @property wrapLng: Number[]\r\n\t// An array of two numbers defining whether the longitude (horizontal) coordinate\r\n\t// axis wraps around a given range and how. Defaults to `[-180, 180]` in most\r\n\t// geographical CRSs. If `undefined`, the longitude axis does not wrap around.\r\n\t//\r\n\t// @property wrapLat: Number[]\r\n\t// Like `wrapLng`, but for the latitude (vertical) axis.\r\n\r\n\t// wrapLng: [min, max],\r\n\t// wrapLat: [min, max],\r\n\r\n\t// @property infinite: Boolean\r\n\t// If true, the coordinate space will be unbounded (infinite in both axes)\r\n\tinfinite: false,\r\n\r\n\t// @method wrapLatLng(latlng: LatLng): LatLng\r\n\t// Returns a `LatLng` where lat and lng has been wrapped according to the\r\n\t// CRS's `wrapLat` and `wrapLng` properties, if they are outside the CRS's bounds.\r\n\twrapLatLng: function (latlng) {\r\n\t\tvar lng = this.wrapLng ? Util.wrapNum(latlng.lng, this.wrapLng, true) : latlng.lng,\r\n\t\t    lat = this.wrapLat ? Util.wrapNum(latlng.lat, this.wrapLat, true) : latlng.lat,\r\n\t\t    alt = latlng.alt;\r\n\r\n\t\treturn new LatLng(lat, lng, alt);\r\n\t},\r\n\r\n\t// @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds\r\n\t// Returns a `LatLngBounds` with the same size as the given one, ensuring\r\n\t// that its center is within the CRS's bounds.\r\n\t// Only accepts actual `L.LatLngBounds` instances, not arrays.\r\n\twrapLatLngBounds: function (bounds) {\r\n\t\tvar center = bounds.getCenter(),\r\n\t\t    newCenter = this.wrapLatLng(center),\r\n\t\t    latShift = center.lat - newCenter.lat,\r\n\t\t    lngShift = center.lng - newCenter.lng;\r\n\r\n\t\tif (latShift === 0 && lngShift === 0) {\r\n\t\t\treturn bounds;\r\n\t\t}\r\n\r\n\t\tvar sw = bounds.getSouthWest(),\r\n\t\t    ne = bounds.getNorthEast(),\r\n\t\t    newSw = new LatLng(sw.lat - latShift, sw.lng - lngShift),\r\n\t\t    newNe = new LatLng(ne.lat - latShift, ne.lng - lngShift);\r\n\r\n\t\treturn new LatLngBounds(newSw, newNe);\r\n\t}\r\n};\r\n","import {CRS} from './CRS';\nimport * as Util from '../../core/Util';\n\n/*\n * @namespace CRS\n * @crs L.CRS.Earth\n *\n * Serves as the base for CRS that are global such that they cover the earth.\n * Can only be used as the base for other CRS and cannot be used directly,\n * since it does not have a `code`, `projection` or `transformation`. `distance()` returns\n * meters.\n */\n\nexport var Earth = Util.extend({}, CRS, {\n\twrapLng: [-180, 180],\n\n\t// Mean Earth Radius, as recommended for use by\n\t// the International Union of Geodesy and Geophysics,\n\t// see https://rosettacode.org/wiki/Haversine_formula\n\tR: 6371000,\n\n\t// distance between two geographical points using spherical law of cosines approximation\n\tdistance: function (latlng1, latlng2) {\n\t\tvar rad = Math.PI / 180,\n\t\t    lat1 = latlng1.lat * rad,\n\t\t    lat2 = latlng2.lat * rad,\n\t\t    sinDLat = Math.sin((latlng2.lat - latlng1.lat) * rad / 2),\n\t\t    sinDLon = Math.sin((latlng2.lng - latlng1.lng) * rad / 2),\n\t\t    a = sinDLat * sinDLat + Math.cos(lat1) * Math.cos(lat2) * sinDLon * sinDLon,\n\t\t    c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\t\treturn this.R * c;\n\t}\n});\n","import {LatLng} from '../LatLng';\r\nimport {Bounds} from '../../geometry/Bounds';\r\nimport {Point} from '../../geometry/Point';\r\n\r\n/*\r\n * @namespace Projection\r\n * @projection L.Projection.SphericalMercator\r\n *\r\n * Spherical Mercator projection — the most common projection for online maps,\r\n * used by almost all free and commercial tile providers. Assumes that Earth is\r\n * a sphere. Used by the `EPSG:3857` CRS.\r\n */\r\n\r\nvar earthRadius = 6378137;\r\n\r\nexport var SphericalMercator = {\r\n\r\n\tR: earthRadius,\r\n\tMAX_LATITUDE: 85.0511287798,\r\n\r\n\tproject: function (latlng) {\r\n\t\tvar d = Math.PI / 180,\r\n\t\t    max = this.MAX_LATITUDE,\r\n\t\t    lat = Math.max(Math.min(max, latlng.lat), -max),\r\n\t\t    sin = Math.sin(lat * d);\r\n\r\n\t\treturn new Point(\r\n\t\t\tthis.R * latlng.lng * d,\r\n\t\t\tthis.R * Math.log((1 + sin) / (1 - sin)) / 2);\r\n\t},\r\n\r\n\tunproject: function (point) {\r\n\t\tvar d = 180 / Math.PI;\r\n\r\n\t\treturn new LatLng(\r\n\t\t\t(2 * Math.atan(Math.exp(point.y / this.R)) - (Math.PI / 2)) * d,\r\n\t\t\tpoint.x * d / this.R);\r\n\t},\r\n\r\n\tbounds: (function () {\r\n\t\tvar d = earthRadius * Math.PI;\r\n\t\treturn new Bounds([-d, -d], [d, d]);\r\n\t})()\r\n};\r\n","import {Point} from './Point';\r\nimport * as Util from '../core/Util';\r\n\r\n/*\r\n * @class Transformation\r\n * @aka L.Transformation\r\n *\r\n * Represents an affine transformation: a set of coefficients `a`, `b`, `c`, `d`\r\n * for transforming a point of a form `(x, y)` into `(a*x + b, c*y + d)` and doing\r\n * the reverse. Used by Leaflet in its projections code.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var transformation = L.transformation(2, 5, -1, 10),\r\n * \tp = L.point(1, 2),\r\n * \tp2 = transformation.transform(p), //  L.point(7, 8)\r\n * \tp3 = transformation.untransform(p2); //  L.point(1, 2)\r\n * ```\r\n */\r\n\r\n\r\n// factory new L.Transformation(a: Number, b: Number, c: Number, d: Number)\r\n// Creates a `Transformation` object with the given coefficients.\r\nexport function Transformation(a, b, c, d) {\r\n\tif (Util.isArray(a)) {\r\n\t\t// use array properties\r\n\t\tthis._a = a[0];\r\n\t\tthis._b = a[1];\r\n\t\tthis._c = a[2];\r\n\t\tthis._d = a[3];\r\n\t\treturn;\r\n\t}\r\n\tthis._a = a;\r\n\tthis._b = b;\r\n\tthis._c = c;\r\n\tthis._d = d;\r\n}\r\n\r\nTransformation.prototype = {\r\n\t// @method transform(point: Point, scale?: Number): Point\r\n\t// Returns a transformed point, optionally multiplied by the given scale.\r\n\t// Only accepts actual `L.Point` instances, not arrays.\r\n\ttransform: function (point, scale) { // (Point, Number) -> Point\r\n\t\treturn this._transform(point.clone(), scale);\r\n\t},\r\n\r\n\t// destructive transform (faster)\r\n\t_transform: function (point, scale) {\r\n\t\tscale = scale || 1;\r\n\t\tpoint.x = scale * (this._a * point.x + this._b);\r\n\t\tpoint.y = scale * (this._c * point.y + this._d);\r\n\t\treturn point;\r\n\t},\r\n\r\n\t// @method untransform(point: Point, scale?: Number): Point\r\n\t// Returns the reverse transformation of the given point, optionally divided\r\n\t// by the given scale. Only accepts actual `L.Point` instances, not arrays.\r\n\tuntransform: function (point, scale) {\r\n\t\tscale = scale || 1;\r\n\t\treturn new Point(\r\n\t\t        (point.x / scale - this._b) / this._a,\r\n\t\t        (point.y / scale - this._d) / this._c);\r\n\t}\r\n};\r\n\r\n// factory L.transformation(a: Number, b: Number, c: Number, d: Number)\r\n\r\n// @factory L.transformation(a: Number, b: Number, c: Number, d: Number)\r\n// Instantiates a Transformation object with the given coefficients.\r\n\r\n// @alternative\r\n// @factory L.transformation(coefficients: Array): Transformation\r\n// Expects an coefficients array of the form\r\n// `[a: Number, b: Number, c: Number, d: Number]`.\r\n\r\nexport function toTransformation(a, b, c, d) {\r\n\treturn new Transformation(a, b, c, d);\r\n}\r\n","import {Earth} from './CRS.Earth';\r\nimport {SphericalMercator} from '../projection/Projection.SphericalMercator';\r\nimport {toTransformation} from '../../geometry/Transformation';\r\nimport * as Util from '../../core/Util';\r\n\r\n/*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG3857\r\n *\r\n * The most common CRS for online maps, used by almost all free and commercial\r\n * tile providers. Uses Spherical Mercator projection. Set in by default in\r\n * Map's `crs` option.\r\n */\r\n\r\nexport var EPSG3857 = Util.extend({}, Earth, {\r\n\tcode: 'EPSG:3857',\r\n\tprojection: SphericalMercator,\r\n\r\n\ttransformation: (function () {\r\n\t\tvar scale = 0.5 / (Math.PI * SphericalMercator.R);\r\n\t\treturn toTransformation(scale, 0.5, -scale, 0.5);\r\n\t}())\r\n});\r\n\r\nexport var EPSG900913 = Util.extend({}, EPSG3857, {\r\n\tcode: 'EPSG:900913'\r\n});\r\n","import Browser from '../../core/Browser';\n\n// @namespace SVG; @section\n// There are several static functions which can be called without instantiating L.SVG:\n\n// @function create(name: String): SVGElement\n// Returns a instance of [SVGElement](https://developer.mozilla.org/docs/Web/API/SVGElement),\n// corresponding to the class name passed. For example, using 'line' will return\n// an instance of [SVGLineElement](https://developer.mozilla.org/docs/Web/API/SVGLineElement).\nexport function svgCreate(name) {\n\treturn document.createElementNS('http://www.w3.org/2000/svg', name);\n}\n\n// @function pointsToPath(rings: Point[], closed: Boolean): String\n// Generates a SVG path string for multiple rings, with each ring turning\n// into \"M..L..L..\" instructions\nexport function pointsToPath(rings, closed) {\n\tvar str = '',\n\ti, j, len, len2, points, p;\n\n\tfor (i = 0, len = rings.length; i < len; i++) {\n\t\tpoints = rings[i];\n\n\t\tfor (j = 0, len2 = points.length; j < len2; j++) {\n\t\t\tp = points[j];\n\t\t\tstr += (j ? 'L' : 'M') + p.x + ' ' + p.y;\n\t\t}\n\n\t\t// closes the ring for polygons; \"x\" is VML syntax\n\t\tstr += closed ? (Browser.svg ? 'z' : 'x') : '';\n\t}\n\n\t// SVG complains about empty path strings\n\treturn str || 'M0 0';\n}\n\n\n\n\n","import * as Util from './Util';\r\nimport {svgCreate} from '../layer/vector/SVG.Util';\r\n\r\n/*\r\n * @namespace Browser\r\n * @aka L.Browser\r\n *\r\n * A namespace with static properties for browser/feature detection used by Leaflet internally.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * if (L.Browser.ielt9) {\r\n *   alert('Upgrade your browser, dude!');\r\n * }\r\n * ```\r\n */\r\n\r\nvar style = document.documentElement.style;\r\n\r\n// @property ie: Boolean; `true` for all Internet Explorer versions (not Edge).\r\nvar ie = 'ActiveXObject' in window;\r\n\r\n// @property ielt9: Boolean; `true` for Internet Explorer versions less than 9.\r\nvar ielt9 = ie && !document.addEventListener;\r\n\r\n// @property edge: Boolean; `true` for the Edge web browser.\r\nvar edge = 'msLaunchUri' in navigator && !('documentMode' in document);\r\n\r\n// @property webkit: Boolean;\r\n// `true` for webkit-based browsers like Chrome and Safari (including mobile versions).\r\nvar webkit = userAgentContains('webkit');\r\n\r\n// @property android: Boolean\r\n// **Deprecated.** `true` for any browser running on an Android platform.\r\nvar android = userAgentContains('android');\r\n\r\n// @property android23: Boolean; **Deprecated.** `true` for browsers running on Android 2 or Android 3.\r\nvar android23 = userAgentContains('android 2') || userAgentContains('android 3');\r\n\r\n/* See https://stackoverflow.com/a/17961266 for details on detecting stock Android */\r\nvar webkitVer = parseInt(/WebKit\\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10); // also matches AppleWebKit\r\n// @property androidStock: Boolean; **Deprecated.** `true` for the Android stock browser (i.e. not Chrome)\r\nvar androidStock = android && userAgentContains('Google') && webkitVer < 537 && !('AudioNode' in window);\r\n\r\n// @property opera: Boolean; `true` for the Opera browser\r\nvar opera = !!window.opera;\r\n\r\n// @property chrome: Boolean; `true` for the Chrome browser.\r\nvar chrome = !edge && userAgentContains('chrome');\r\n\r\n// @property gecko: Boolean; `true` for gecko-based browsers like Firefox.\r\nvar gecko = userAgentContains('gecko') && !webkit && !opera && !ie;\r\n\r\n// @property safari: Boolean; `true` for the Safari browser.\r\nvar safari = !chrome && userAgentContains('safari');\r\n\r\nvar phantom = userAgentContains('phantom');\r\n\r\n// @property opera12: Boolean\r\n// `true` for the Opera browser supporting CSS transforms (version 12 or later).\r\nvar opera12 = 'OTransition' in style;\r\n\r\n// @property win: Boolean; `true` when the browser is running in a Windows platform\r\nvar win = navigator.platform.indexOf('Win') === 0;\r\n\r\n// @property ie3d: Boolean; `true` for all Internet Explorer versions supporting CSS transforms.\r\nvar ie3d = ie && ('transition' in style);\r\n\r\n// @property webkit3d: Boolean; `true` for webkit-based browsers supporting CSS transforms.\r\nvar webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23;\r\n\r\n// @property gecko3d: Boolean; `true` for gecko-based browsers supporting CSS transforms.\r\nvar gecko3d = 'MozPerspective' in style;\r\n\r\n// @property any3d: Boolean\r\n// `true` for all browsers supporting CSS transforms.\r\nvar any3d = !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d) && !opera12 && !phantom;\r\n\r\n// @property mobile: Boolean; `true` for all browsers running in a mobile device.\r\nvar mobile = typeof orientation !== 'undefined' || userAgentContains('mobile');\r\n\r\n// @property mobileWebkit: Boolean; `true` for all webkit-based browsers in a mobile device.\r\nvar mobileWebkit = mobile && webkit;\r\n\r\n// @property mobileWebkit3d: Boolean\r\n// `true` for all webkit-based browsers in a mobile device supporting CSS transforms.\r\nvar mobileWebkit3d = mobile && webkit3d;\r\n\r\n// @property msPointer: Boolean\r\n// `true` for browsers implementing the Microsoft touch events model (notably IE10).\r\nvar msPointer = !window.PointerEvent && window.MSPointerEvent;\r\n\r\n// @property pointer: Boolean\r\n// `true` for all browsers supporting [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx).\r\nvar pointer = !!(window.PointerEvent || msPointer);\r\n\r\n// @property touchNative: Boolean\r\n// `true` for all browsers supporting [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events).\r\n// **This does not necessarily mean** that the browser is running in a computer with\r\n// a touchscreen, it only means that the browser is capable of understanding\r\n// touch events.\r\nvar touchNative = 'ontouchstart' in window || !!window.TouchEvent;\r\n\r\n// @property touch: Boolean\r\n// `true` for all browsers supporting either [touch](#browser-touch) or [pointer](#browser-pointer) events.\r\n// Note: pointer events will be preferred (if available), and processed for all `touch*` listeners.\r\nvar touch = !window.L_NO_TOUCH && (touchNative || pointer);\r\n\r\n// @property mobileOpera: Boolean; `true` for the Opera browser in a mobile device.\r\nvar mobileOpera = mobile && opera;\r\n\r\n// @property mobileGecko: Boolean\r\n// `true` for gecko-based browsers running in a mobile device.\r\nvar mobileGecko = mobile && gecko;\r\n\r\n// @property retina: Boolean\r\n// `true` for browsers on a high-resolution \"retina\" screen or on any screen when browser's display zoom is more than 100%.\r\nvar retina = (window.devicePixelRatio || (window.screen.deviceXDPI / window.screen.logicalXDPI)) > 1;\r\n\r\n// @property passiveEvents: Boolean\r\n// `true` for browsers that support passive events.\r\nvar passiveEvents = (function () {\r\n\tvar supportsPassiveOption = false;\r\n\ttry {\r\n\t\tvar opts = Object.defineProperty({}, 'passive', {\r\n\t\t\tget: function () { // eslint-disable-line getter-return\r\n\t\t\t\tsupportsPassiveOption = true;\r\n\t\t\t}\r\n\t\t});\r\n\t\twindow.addEventListener('testPassiveEventSupport', Util.falseFn, opts);\r\n\t\twindow.removeEventListener('testPassiveEventSupport', Util.falseFn, opts);\r\n\t} catch (e) {\r\n\t\t// Errors can safely be ignored since this is only a browser support test.\r\n\t}\r\n\treturn supportsPassiveOption;\r\n}());\r\n\r\n// @property canvas: Boolean\r\n// `true` when the browser supports [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).\r\nvar canvas = (function () {\r\n\treturn !!document.createElement('canvas').getContext;\r\n}());\r\n\r\n// @property svg: Boolean\r\n// `true` when the browser supports [SVG](https://developer.mozilla.org/docs/Web/SVG).\r\nvar svg = !!(document.createElementNS && svgCreate('svg').createSVGRect);\r\n\r\nvar inlineSvg = !!svg && (function () {\r\n\tvar div = document.createElement('div');\r\n\tdiv.innerHTML = '<svg/>';\r\n\treturn (div.firstChild && div.firstChild.namespaceURI) === 'http://www.w3.org/2000/svg';\r\n})();\r\n\r\n// @property vml: Boolean\r\n// `true` if the browser supports [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language).\r\nvar vml = !svg && (function () {\r\n\ttry {\r\n\t\tvar div = document.createElement('div');\r\n\t\tdiv.innerHTML = '<v:shape adj=\"1\"/>';\r\n\r\n\t\tvar shape = div.firstChild;\r\n\t\tshape.style.behavior = 'url(#default#VML)';\r\n\r\n\t\treturn shape && (typeof shape.adj === 'object');\r\n\r\n\t} catch (e) {\r\n\t\treturn false;\r\n\t}\r\n}());\r\n\r\n\r\n// @property mac: Boolean; `true` when the browser is running in a Mac platform\r\nvar mac = navigator.platform.indexOf('Mac') === 0;\r\n\r\n// @property mac: Boolean; `true` when the browser is running in a Linux platform\r\nvar linux = navigator.platform.indexOf('Linux') === 0;\r\n\r\nfunction userAgentContains(str) {\r\n\treturn navigator.userAgent.toLowerCase().indexOf(str) >= 0;\r\n}\r\n\r\n\r\nexport default {\r\n\tie: ie,\r\n\tielt9: ielt9,\r\n\tedge: edge,\r\n\twebkit: webkit,\r\n\tandroid: android,\r\n\tandroid23: android23,\r\n\tandroidStock: androidStock,\r\n\topera: opera,\r\n\tchrome: chrome,\r\n\tgecko: gecko,\r\n\tsafari: safari,\r\n\tphantom: phantom,\r\n\topera12: opera12,\r\n\twin: win,\r\n\tie3d: ie3d,\r\n\twebkit3d: webkit3d,\r\n\tgecko3d: gecko3d,\r\n\tany3d: any3d,\r\n\tmobile: mobile,\r\n\tmobileWebkit: mobileWebkit,\r\n\tmobileWebkit3d: mobileWebkit3d,\r\n\tmsPointer: msPointer,\r\n\tpointer: pointer,\r\n\ttouch: touch,\r\n\ttouchNative: touchNative,\r\n\tmobileOpera: mobileOpera,\r\n\tmobileGecko: mobileGecko,\r\n\tretina: retina,\r\n\tpassiveEvents: passiveEvents,\r\n\tcanvas: canvas,\r\n\tsvg: svg,\r\n\tvml: vml,\r\n\tinlineSvg: inlineSvg,\r\n\tmac: mac,\r\n\tlinux: linux\r\n};\r\n","import * as DomEvent from './DomEvent';\nimport Browser from '../core/Browser';\nimport {falseFn} from '../core/Util';\n\n/*\n * Extends L.DomEvent to provide touch support for Internet Explorer and Windows-based devices.\n */\n\nvar POINTER_DOWN =   Browser.msPointer ? 'MSPointerDown'   : 'pointerdown';\nvar POINTER_MOVE =   Browser.msPointer ? 'MSPointerMove'   : 'pointermove';\nvar POINTER_UP =     Browser.msPointer ? 'MSPointerUp'     : 'pointerup';\nvar POINTER_CANCEL = Browser.msPointer ? 'MSPointerCancel' : 'pointercancel';\nvar pEvent = {\n\ttouchstart  : POINTER_DOWN,\n\ttouchmove   : POINTER_MOVE,\n\ttouchend    : POINTER_UP,\n\ttouchcancel : POINTER_CANCEL\n};\nvar handle = {\n\ttouchstart  : _onPointerStart,\n\ttouchmove   : _handlePointer,\n\ttouchend    : _handlePointer,\n\ttouchcancel : _handlePointer\n};\nvar _pointers = {};\nvar _pointerDocListener = false;\n\n// Provides a touch events wrapper for (ms)pointer events.\n// ref https://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890\n\nexport function addPointerListener(obj, type, handler) {\n\tif (type === 'touchstart') {\n\t\t_addPointerDocListener();\n\t}\n\tif (!handle[type]) {\n\t\tconsole.warn('wrong event specified:', type);\n\t\treturn falseFn;\n\t}\n\thandler = handle[type].bind(this, handler);\n\tobj.addEventListener(pEvent[type], handler, false);\n\treturn handler;\n}\n\nexport function removePointerListener(obj, type, handler) {\n\tif (!pEvent[type]) {\n\t\tconsole.warn('wrong event specified:', type);\n\t\treturn;\n\t}\n\tobj.removeEventListener(pEvent[type], handler, false);\n}\n\nfunction _globalPointerDown(e) {\n\t_pointers[e.pointerId] = e;\n}\n\nfunction _globalPointerMove(e) {\n\tif (_pointers[e.pointerId]) {\n\t\t_pointers[e.pointerId] = e;\n\t}\n}\n\nfunction _globalPointerUp(e) {\n\tdelete _pointers[e.pointerId];\n}\n\nfunction _addPointerDocListener() {\n\t// need to keep track of what pointers and how many are active to provide e.touches emulation\n\tif (!_pointerDocListener) {\n\t\t// we listen document as any drags that end by moving the touch off the screen get fired there\n\t\tdocument.addEventListener(POINTER_DOWN, _globalPointerDown, true);\n\t\tdocument.addEventListener(POINTER_MOVE, _globalPointerMove, true);\n\t\tdocument.addEventListener(POINTER_UP, _globalPointerUp, true);\n\t\tdocument.addEventListener(POINTER_CANCEL, _globalPointerUp, true);\n\n\t\t_pointerDocListener = true;\n\t}\n}\n\nfunction _handlePointer(handler, e) {\n\tif (e.pointerType === (e.MSPOINTER_TYPE_MOUSE || 'mouse')) { return; }\n\n\te.touches = [];\n\tfor (var i in _pointers) {\n\t\te.touches.push(_pointers[i]);\n\t}\n\te.changedTouches = [e];\n\n\thandler(e);\n}\n\nfunction _onPointerStart(handler, e) {\n\t// IE10 specific: MsTouch needs preventDefault. See #2000\n\tif (e.MSPOINTER_TYPE_TOUCH && e.pointerType === e.MSPOINTER_TYPE_TOUCH) {\n\t\tDomEvent.preventDefault(e);\n\t}\n\t_handlePointer(handler, e);\n}\n","import * as DomEvent from './DomEvent';\r\n\r\n/*\r\n * Extends the event handling code with double tap support for mobile browsers.\r\n *\r\n * Note: currently most browsers fire native dblclick, with only a few exceptions\r\n * (see https://github.com/Leaflet/Leaflet/issues/7012#issuecomment-595087386)\r\n */\r\n\r\nfunction makeDblclick(event) {\r\n\t// in modern browsers `type` cannot be just overridden:\r\n\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only\r\n\tvar newEvent = {},\r\n\t    prop, i;\r\n\tfor (i in event) {\r\n\t\tprop = event[i];\r\n\t\tnewEvent[i] = prop && prop.bind ? prop.bind(event) : prop;\r\n\t}\r\n\tevent = newEvent;\r\n\tnewEvent.type = 'dblclick';\r\n\tnewEvent.detail = 2;\r\n\tnewEvent.isTrusted = false;\r\n\tnewEvent._simulated = true; // for debug purposes\r\n\treturn newEvent;\r\n}\r\n\r\nvar delay = 200;\r\nexport function addDoubleTapListener(obj, handler) {\r\n\t// Most browsers handle double tap natively\r\n\tobj.addEventListener('dblclick', handler);\r\n\r\n\t// On some platforms the browser doesn't fire native dblclicks for touch events.\r\n\t// It seems that in all such cases `detail` property of `click` event is always `1`.\r\n\t// So here we rely on that fact to avoid excessive 'dblclick' simulation when not needed.\r\n\tvar last = 0,\r\n\t    detail;\r\n\tfunction simDblclick(e) {\r\n\t\tif (e.detail !== 1) {\r\n\t\t\tdetail = e.detail; // keep in sync to avoid false dblclick in some cases\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (e.pointerType === 'mouse' ||\r\n\t\t\t(e.sourceCapabilities && !e.sourceCapabilities.firesTouchEvents)) {\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// When clicking on an <input>, the browser generates a click on its\r\n\t\t// <label> (and vice versa) triggering two clicks in quick succession.\r\n\t\t// This ignores clicks on elements which are a label with a 'for'\r\n\t\t// attribute (or children of such a label), but not children of\r\n\t\t// a <input>.\r\n\t\tvar path = DomEvent.getPropagationPath(e);\r\n\t\tif (path.some(function (el) {\r\n\t\t\treturn el instanceof HTMLLabelElement && el.attributes.for;\r\n\t\t}) &&\r\n\t\t\t!path.some(function (el) {\r\n\t\t\t\treturn (\r\n\t\t\t\t\tel instanceof HTMLInputElement ||\r\n\t\t\t\t\tel instanceof HTMLSelectElement\r\n\t\t\t\t);\r\n\t\t\t})\r\n\t\t) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar now = Date.now();\r\n\t\tif (now - last <= delay) {\r\n\t\t\tdetail++;\r\n\t\t\tif (detail === 2) {\r\n\t\t\t\thandler(makeDblclick(e));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tdetail = 1;\r\n\t\t}\r\n\t\tlast = now;\r\n\t}\r\n\r\n\tobj.addEventListener('click', simDblclick);\r\n\r\n\treturn {\r\n\t\tdblclick: handler,\r\n\t\tsimDblclick: simDblclick\r\n\t};\r\n}\r\n\r\nexport function removeDoubleTapListener(obj, handlers) {\r\n\tobj.removeEventListener('dblclick', handlers.dblclick);\r\n\tobj.removeEventListener('click', handlers.simDblclick);\r\n}\r\n","import * as DomEvent from './DomEvent';\r\nimport * as Util from '../core/Util';\r\nimport {Point} from '../geometry/Point';\r\nimport Browser from '../core/Browser';\r\n\r\n/*\r\n * @namespace DomUtil\r\n *\r\n * Utility functions to work with the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model)\r\n * tree, used by Leaflet internally.\r\n *\r\n * Most functions expecting or returning a `HTMLElement` also work for\r\n * SVG elements. The only difference is that classes refer to CSS classes\r\n * in HTML and SVG classes in SVG.\r\n */\r\n\r\n\r\n// @property TRANSFORM: String\r\n// Vendor-prefixed transform style name (e.g. `'webkitTransform'` for WebKit).\r\nexport var TRANSFORM = testProp(\r\n\t['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform']);\r\n\r\n// webkitTransition comes first because some browser versions that drop vendor prefix don't do\r\n// the same for the transitionend event, in particular the Android 4.1 stock browser\r\n\r\n// @property TRANSITION: String\r\n// Vendor-prefixed transition style name.\r\nexport var TRANSITION = testProp(\r\n\t['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']);\r\n\r\n// @property TRANSITION_END: String\r\n// Vendor-prefixed transitionend event name.\r\nexport var TRANSITION_END =\r\n\tTRANSITION === 'webkitTransition' || TRANSITION === 'OTransition' ? TRANSITION + 'End' : 'transitionend';\r\n\r\n\r\n// @function get(id: String|HTMLElement): HTMLElement\r\n// Returns an element given its DOM id, or returns the element itself\r\n// if it was passed directly.\r\nexport function get(id) {\r\n\treturn typeof id === 'string' ? document.getElementById(id) : id;\r\n}\r\n\r\n// @function getStyle(el: HTMLElement, styleAttrib: String): String\r\n// Returns the value for a certain style attribute on an element,\r\n// including computed values or values set through CSS.\r\nexport function getStyle(el, style) {\r\n\tvar value = el.style[style] || (el.currentStyle && el.currentStyle[style]);\r\n\r\n\tif ((!value || value === 'auto') && document.defaultView) {\r\n\t\tvar css = document.defaultView.getComputedStyle(el, null);\r\n\t\tvalue = css ? css[style] : null;\r\n\t}\r\n\treturn value === 'auto' ? null : value;\r\n}\r\n\r\n// @function create(tagName: String, className?: String, container?: HTMLElement): HTMLElement\r\n// Creates an HTML element with `tagName`, sets its class to `className`, and optionally appends it to `container` element.\r\nexport function create(tagName, className, container) {\r\n\tvar el = document.createElement(tagName);\r\n\tel.className = className || '';\r\n\r\n\tif (container) {\r\n\t\tcontainer.appendChild(el);\r\n\t}\r\n\treturn el;\r\n}\r\n\r\n// @function remove(el: HTMLElement)\r\n// Removes `el` from its parent element\r\nexport function remove(el) {\r\n\tvar parent = el.parentNode;\r\n\tif (parent) {\r\n\t\tparent.removeChild(el);\r\n\t}\r\n}\r\n\r\n// @function empty(el: HTMLElement)\r\n// Removes all of `el`'s children elements from `el`\r\nexport function empty(el) {\r\n\twhile (el.firstChild) {\r\n\t\tel.removeChild(el.firstChild);\r\n\t}\r\n}\r\n\r\n// @function toFront(el: HTMLElement)\r\n// Makes `el` the last child of its parent, so it renders in front of the other children.\r\nexport function toFront(el) {\r\n\tvar parent = el.parentNode;\r\n\tif (parent && parent.lastChild !== el) {\r\n\t\tparent.appendChild(el);\r\n\t}\r\n}\r\n\r\n// @function toBack(el: HTMLElement)\r\n// Makes `el` the first child of its parent, so it renders behind the other children.\r\nexport function toBack(el) {\r\n\tvar parent = el.parentNode;\r\n\tif (parent && parent.firstChild !== el) {\r\n\t\tparent.insertBefore(el, parent.firstChild);\r\n\t}\r\n}\r\n\r\n// @function hasClass(el: HTMLElement, name: String): Boolean\r\n// Returns `true` if the element's class attribute contains `name`.\r\nexport function hasClass(el, name) {\r\n\tif (el.classList !== undefined) {\r\n\t\treturn el.classList.contains(name);\r\n\t}\r\n\tvar className = getClass(el);\r\n\treturn className.length > 0 && new RegExp('(^|\\\\s)' + name + '(\\\\s|$)').test(className);\r\n}\r\n\r\n// @function addClass(el: HTMLElement, name: String)\r\n// Adds `name` to the element's class attribute.\r\nexport function addClass(el, name) {\r\n\tif (el.classList !== undefined) {\r\n\t\tvar classes = Util.splitWords(name);\r\n\t\tfor (var i = 0, len = classes.length; i < len; i++) {\r\n\t\t\tel.classList.add(classes[i]);\r\n\t\t}\r\n\t} else if (!hasClass(el, name)) {\r\n\t\tvar className = getClass(el);\r\n\t\tsetClass(el, (className ? className + ' ' : '') + name);\r\n\t}\r\n}\r\n\r\n// @function removeClass(el: HTMLElement, name: String)\r\n// Removes `name` from the element's class attribute.\r\nexport function removeClass(el, name) {\r\n\tif (el.classList !== undefined) {\r\n\t\tel.classList.remove(name);\r\n\t} else {\r\n\t\tsetClass(el, Util.trim((' ' + getClass(el) + ' ').replace(' ' + name + ' ', ' ')));\r\n\t}\r\n}\r\n\r\n// @function setClass(el: HTMLElement, name: String)\r\n// Sets the element's class.\r\nexport function setClass(el, name) {\r\n\tif (el.className.baseVal === undefined) {\r\n\t\tel.className = name;\r\n\t} else {\r\n\t\t// in case of SVG element\r\n\t\tel.className.baseVal = name;\r\n\t}\r\n}\r\n\r\n// @function getClass(el: HTMLElement): String\r\n// Returns the element's class.\r\nexport function getClass(el) {\r\n\t// Check if the element is an SVGElementInstance and use the correspondingElement instead\r\n\t// (Required for linked SVG elements in IE11.)\r\n\tif (el.correspondingElement) {\r\n\t\tel = el.correspondingElement;\r\n\t}\r\n\treturn el.className.baseVal === undefined ? el.className : el.className.baseVal;\r\n}\r\n\r\n// @function setOpacity(el: HTMLElement, opacity: Number)\r\n// Set the opacity of an element (including old IE support).\r\n// `opacity` must be a number from `0` to `1`.\r\nexport function setOpacity(el, value) {\r\n\tif ('opacity' in el.style) {\r\n\t\tel.style.opacity = value;\r\n\t} else if ('filter' in el.style) {\r\n\t\t_setOpacityIE(el, value);\r\n\t}\r\n}\r\n\r\nfunction _setOpacityIE(el, value) {\r\n\tvar filter = false,\r\n\t    filterName = 'DXImageTransform.Microsoft.Alpha';\r\n\r\n\t// filters collection throws an error if we try to retrieve a filter that doesn't exist\r\n\ttry {\r\n\t\tfilter = el.filters.item(filterName);\r\n\t} catch (e) {\r\n\t\t// don't set opacity to 1 if we haven't already set an opacity,\r\n\t\t// it isn't needed and breaks transparent pngs.\r\n\t\tif (value === 1) { return; }\r\n\t}\r\n\r\n\tvalue = Math.round(value * 100);\r\n\r\n\tif (filter) {\r\n\t\tfilter.Enabled = (value !== 100);\r\n\t\tfilter.Opacity = value;\r\n\t} else {\r\n\t\tel.style.filter += ' progid:' + filterName + '(opacity=' + value + ')';\r\n\t}\r\n}\r\n\r\n// @function testProp(props: String[]): String|false\r\n// Goes through the array of style names and returns the first name\r\n// that is a valid style name for an element. If no such name is found,\r\n// it returns false. Useful for vendor-prefixed styles like `transform`.\r\nexport function testProp(props) {\r\n\tvar style = document.documentElement.style;\r\n\r\n\tfor (var i = 0; i < props.length; i++) {\r\n\t\tif (props[i] in style) {\r\n\t\t\treturn props[i];\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\n// @function setTransform(el: HTMLElement, offset: Point, scale?: Number)\r\n// Resets the 3D CSS transform of `el` so it is translated by `offset` pixels\r\n// and optionally scaled by `scale`. Does not have an effect if the\r\n// browser doesn't support 3D CSS transforms.\r\nexport function setTransform(el, offset, scale) {\r\n\tvar pos = offset || new Point(0, 0);\r\n\r\n\tel.style[TRANSFORM] =\r\n\t\t(Browser.ie3d ?\r\n\t\t\t'translate(' + pos.x + 'px,' + pos.y + 'px)' :\r\n\t\t\t'translate3d(' + pos.x + 'px,' + pos.y + 'px,0)') +\r\n\t\t(scale ? ' scale(' + scale + ')' : '');\r\n}\r\n\r\n// @function setPosition(el: HTMLElement, position: Point)\r\n// Sets the position of `el` to coordinates specified by `position`,\r\n// using CSS translate or top/left positioning depending on the browser\r\n// (used by Leaflet internally to position its layers).\r\nexport function setPosition(el, point) {\r\n\r\n\t/*eslint-disable */\r\n\tel._leaflet_pos = point;\r\n\t/* eslint-enable */\r\n\r\n\tif (Browser.any3d) {\r\n\t\tsetTransform(el, point);\r\n\t} else {\r\n\t\tel.style.left = point.x + 'px';\r\n\t\tel.style.top = point.y + 'px';\r\n\t}\r\n}\r\n\r\n// @function getPosition(el: HTMLElement): Point\r\n// Returns the coordinates of an element previously positioned with setPosition.\r\nexport function getPosition(el) {\r\n\t// this method is only used for elements previously positioned using setPosition,\r\n\t// so it's safe to cache the position for performance\r\n\r\n\treturn el._leaflet_pos || new Point(0, 0);\r\n}\r\n\r\n// @function disableTextSelection()\r\n// Prevents the user from generating `selectstart` DOM events, usually generated\r\n// when the user drags the mouse through a page with text. Used internally\r\n// by Leaflet to override the behaviour of any click-and-drag interaction on\r\n// the map. Affects drag interactions on the whole document.\r\n\r\n// @function enableTextSelection()\r\n// Cancels the effects of a previous [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection).\r\nexport var disableTextSelection;\r\nexport var enableTextSelection;\r\nvar _userSelect;\r\nif ('onselectstart' in document) {\r\n\tdisableTextSelection = function () {\r\n\t\tDomEvent.on(window, 'selectstart', DomEvent.preventDefault);\r\n\t};\r\n\tenableTextSelection = function () {\r\n\t\tDomEvent.off(window, 'selectstart', DomEvent.preventDefault);\r\n\t};\r\n} else {\r\n\tvar userSelectProperty = testProp(\r\n\t\t['userSelect', 'WebkitUserSelect', 'OUserSelect', 'MozUserSelect', 'msUserSelect']);\r\n\r\n\tdisableTextSelection = function () {\r\n\t\tif (userSelectProperty) {\r\n\t\t\tvar style = document.documentElement.style;\r\n\t\t\t_userSelect = style[userSelectProperty];\r\n\t\t\tstyle[userSelectProperty] = 'none';\r\n\t\t}\r\n\t};\r\n\tenableTextSelection = function () {\r\n\t\tif (userSelectProperty) {\r\n\t\t\tdocument.documentElement.style[userSelectProperty] = _userSelect;\r\n\t\t\t_userSelect = undefined;\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// @function disableImageDrag()\r\n// As [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection), but\r\n// for `dragstart` DOM events, usually generated when the user drags an image.\r\nexport function disableImageDrag() {\r\n\tDomEvent.on(window, 'dragstart', DomEvent.preventDefault);\r\n}\r\n\r\n// @function enableImageDrag()\r\n// Cancels the effects of a previous [`L.DomUtil.disableImageDrag`](#domutil-disabletextselection).\r\nexport function enableImageDrag() {\r\n\tDomEvent.off(window, 'dragstart', DomEvent.preventDefault);\r\n}\r\n\r\nvar _outlineElement, _outlineStyle;\r\n// @function preventOutline(el: HTMLElement)\r\n// Makes the [outline](https://developer.mozilla.org/docs/Web/CSS/outline)\r\n// of the element `el` invisible. Used internally by Leaflet to prevent\r\n// focusable elements from displaying an outline when the user performs a\r\n// drag interaction on them.\r\nexport function preventOutline(element) {\r\n\twhile (element.tabIndex === -1) {\r\n\t\telement = element.parentNode;\r\n\t}\r\n\tif (!element.style) { return; }\r\n\trestoreOutline();\r\n\t_outlineElement = element;\r\n\t_outlineStyle = element.style.outlineStyle;\r\n\telement.style.outlineStyle = 'none';\r\n\tDomEvent.on(window, 'keydown', restoreOutline);\r\n}\r\n\r\n// @function restoreOutline()\r\n// Cancels the effects of a previous [`L.DomUtil.preventOutline`]().\r\nexport function restoreOutline() {\r\n\tif (!_outlineElement) { return; }\r\n\t_outlineElement.style.outlineStyle = _outlineStyle;\r\n\t_outlineElement = undefined;\r\n\t_outlineStyle = undefined;\r\n\tDomEvent.off(window, 'keydown', restoreOutline);\r\n}\r\n\r\n// @function getSizedParentNode(el: HTMLElement): HTMLElement\r\n// Finds the closest parent node which size (width and height) is not null.\r\nexport function getSizedParentNode(element) {\r\n\tdo {\r\n\t\telement = element.parentNode;\r\n\t} while ((!element.offsetWidth || !element.offsetHeight) && element !== document.body);\r\n\treturn element;\r\n}\r\n\r\n// @function getScale(el: HTMLElement): Object\r\n// Computes the CSS scale currently applied on the element.\r\n// Returns an object with `x` and `y` members as horizontal and vertical scales respectively,\r\n// and `boundingClientRect` as the result of [`getBoundingClientRect()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).\r\nexport function getScale(element) {\r\n\tvar rect = element.getBoundingClientRect(); // Read-only in old browsers.\r\n\r\n\treturn {\r\n\t\tx: rect.width / element.offsetWidth || 1,\r\n\t\ty: rect.height / element.offsetHeight || 1,\r\n\t\tboundingClientRect: rect\r\n\t};\r\n}\r\n","import {Point} from '../geometry/Point';\r\nimport * as Util from '../core/Util';\r\nimport Browser from '../core/Browser';\r\nimport {addPointerListener, removePointerListener} from './DomEvent.Pointer';\r\nimport {addDoubleTapListener, removeDoubleTapListener} from './DomEvent.DoubleTap';\r\nimport {getScale} from './DomUtil';\r\n\r\n/*\r\n * @namespace DomEvent\r\n * Utility functions to work with the [DOM events](https://developer.mozilla.org/docs/Web/API/Event), used by Leaflet internally.\r\n */\r\n\r\n// Inspired by John Resig, Dean Edwards and YUI addEvent implementations.\r\n\r\n// @function on(el: HTMLElement, types: String, fn: Function, context?: Object): this\r\n// Adds a listener function (`fn`) to a particular DOM event type of the\r\n// element `el`. You can optionally specify the context of the listener\r\n// (object the `this` keyword will point to). You can also pass several\r\n// space-separated types (e.g. `'click dblclick'`).\r\n\r\n// @alternative\r\n// @function on(el: HTMLElement, eventMap: Object, context?: Object): this\r\n// Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`\r\nexport function on(obj, types, fn, context) {\r\n\r\n\tif (types && typeof types === 'object') {\r\n\t\tfor (var type in types) {\r\n\t\t\taddOne(obj, type, types[type], fn);\r\n\t\t}\r\n\t} else {\r\n\t\ttypes = Util.splitWords(types);\r\n\r\n\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\taddOne(obj, types[i], fn, context);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this;\r\n}\r\n\r\nvar eventsKey = '_leaflet_events';\r\n\r\n// @function off(el: HTMLElement, types: String, fn: Function, context?: Object): this\r\n// Removes a previously added listener function.\r\n// Note that if you passed a custom context to on, you must pass the same\r\n// context to `off` in order to remove the listener.\r\n\r\n// @alternative\r\n// @function off(el: HTMLElement, eventMap: Object, context?: Object): this\r\n// Removes a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`\r\n\r\n// @alternative\r\n// @function off(el: HTMLElement, types: String): this\r\n// Removes all previously added listeners of given types.\r\n\r\n// @alternative\r\n// @function off(el: HTMLElement): this\r\n// Removes all previously added listeners from given HTMLElement\r\nexport function off(obj, types, fn, context) {\r\n\r\n\tif (arguments.length === 1) {\r\n\t\tbatchRemove(obj);\r\n\t\tdelete obj[eventsKey];\r\n\r\n\t} else if (types && typeof types === 'object') {\r\n\t\tfor (var type in types) {\r\n\t\t\tremoveOne(obj, type, types[type], fn);\r\n\t\t}\r\n\r\n\t} else {\r\n\t\ttypes = Util.splitWords(types);\r\n\r\n\t\tif (arguments.length === 2) {\r\n\t\t\tbatchRemove(obj, function (type) {\r\n\t\t\t\treturn Util.indexOf(types, type) !== -1;\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tremoveOne(obj, types[i], fn, context);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn this;\r\n}\r\n\r\nfunction batchRemove(obj, filterFn) {\r\n\tfor (var id in obj[eventsKey]) {\r\n\t\tvar type = id.split(/\\d/)[0];\r\n\t\tif (!filterFn || filterFn(type)) {\r\n\t\t\tremoveOne(obj, type, null, null, id);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvar mouseSubst = {\r\n\tmouseenter: 'mouseover',\r\n\tmouseleave: 'mouseout',\r\n\twheel: !('onwheel' in window) && 'mousewheel'\r\n};\r\n\r\nfunction addOne(obj, type, fn, context) {\r\n\tvar id = type + Util.stamp(fn) + (context ? '_' + Util.stamp(context) : '');\r\n\r\n\tif (obj[eventsKey] && obj[eventsKey][id]) { return this; }\r\n\r\n\tvar handler = function (e) {\r\n\t\treturn fn.call(context || obj, e || window.event);\r\n\t};\r\n\r\n\tvar originalHandler = handler;\r\n\r\n\tif (!Browser.touchNative && Browser.pointer && type.indexOf('touch') === 0) {\r\n\t\t// Needs DomEvent.Pointer.js\r\n\t\thandler = addPointerListener(obj, type, handler);\r\n\r\n\t} else if (Browser.touch && (type === 'dblclick')) {\r\n\t\thandler = addDoubleTapListener(obj, handler);\r\n\r\n\t} else if ('addEventListener' in obj) {\r\n\r\n\t\tif (type === 'touchstart' || type === 'touchmove' || type === 'wheel' ||  type === 'mousewheel') {\r\n\t\t\tobj.addEventListener(mouseSubst[type] || type, handler, Browser.passiveEvents ? {passive: false} : false);\r\n\r\n\t\t} else if (type === 'mouseenter' || type === 'mouseleave') {\r\n\t\t\thandler = function (e) {\r\n\t\t\t\te = e || window.event;\r\n\t\t\t\tif (isExternalTarget(obj, e)) {\r\n\t\t\t\t\toriginalHandler(e);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tobj.addEventListener(mouseSubst[type], handler, false);\r\n\r\n\t\t} else {\r\n\t\t\tobj.addEventListener(type, originalHandler, false);\r\n\t\t}\r\n\r\n\t} else {\r\n\t\tobj.attachEvent('on' + type, handler);\r\n\t}\r\n\r\n\tobj[eventsKey] = obj[eventsKey] || {};\r\n\tobj[eventsKey][id] = handler;\r\n}\r\n\r\nfunction removeOne(obj, type, fn, context, id) {\r\n\tid = id || type + Util.stamp(fn) + (context ? '_' + Util.stamp(context) : '');\r\n\tvar handler = obj[eventsKey] && obj[eventsKey][id];\r\n\r\n\tif (!handler) { return this; }\r\n\r\n\tif (!Browser.touchNative && Browser.pointer && type.indexOf('touch') === 0) {\r\n\t\tremovePointerListener(obj, type, handler);\r\n\r\n\t} else if (Browser.touch && (type === 'dblclick')) {\r\n\t\tremoveDoubleTapListener(obj, handler);\r\n\r\n\t} else if ('removeEventListener' in obj) {\r\n\r\n\t\tobj.removeEventListener(mouseSubst[type] || type, handler, false);\r\n\r\n\t} else {\r\n\t\tobj.detachEvent('on' + type, handler);\r\n\t}\r\n\r\n\tobj[eventsKey][id] = null;\r\n}\r\n\r\n// @function stopPropagation(ev: DOMEvent): this\r\n// Stop the given event from propagation to parent elements. Used inside the listener functions:\r\n// ```js\r\n// L.DomEvent.on(div, 'click', function (ev) {\r\n// \tL.DomEvent.stopPropagation(ev);\r\n// });\r\n// ```\r\nexport function stopPropagation(e) {\r\n\r\n\tif (e.stopPropagation) {\r\n\t\te.stopPropagation();\r\n\t} else if (e.originalEvent) {  // In case of Leaflet event.\r\n\t\te.originalEvent._stopped = true;\r\n\t} else {\r\n\t\te.cancelBubble = true;\r\n\t}\r\n\r\n\treturn this;\r\n}\r\n\r\n// @function disableScrollPropagation(el: HTMLElement): this\r\n// Adds `stopPropagation` to the element's `'wheel'` events (plus browser variants).\r\nexport function disableScrollPropagation(el) {\r\n\taddOne(el, 'wheel', stopPropagation);\r\n\treturn this;\r\n}\r\n\r\n// @function disableClickPropagation(el: HTMLElement): this\r\n// Adds `stopPropagation` to the element's `'click'`, `'dblclick'`, `'contextmenu'`,\r\n// `'mousedown'` and `'touchstart'` events (plus browser variants).\r\nexport function disableClickPropagation(el) {\r\n\ton(el, 'mousedown touchstart dblclick contextmenu', stopPropagation);\r\n\tel['_leaflet_disable_click'] = true;\r\n\treturn this;\r\n}\r\n\r\n// @function preventDefault(ev: DOMEvent): this\r\n// Prevents the default action of the DOM Event `ev` from happening (such as\r\n// following a link in the href of the a element, or doing a POST request\r\n// with page reload when a `<form>` is submitted).\r\n// Use it inside listener functions.\r\nexport function preventDefault(e) {\r\n\tif (e.preventDefault) {\r\n\t\te.preventDefault();\r\n\t} else {\r\n\t\te.returnValue = false;\r\n\t}\r\n\treturn this;\r\n}\r\n\r\n// @function stop(ev: DOMEvent): this\r\n// Does `stopPropagation` and `preventDefault` at the same time.\r\nexport function stop(e) {\r\n\tpreventDefault(e);\r\n\tstopPropagation(e);\r\n\treturn this;\r\n}\r\n\r\n// @function getPropagationPath(ev: DOMEvent): Array\r\n// Compatibility polyfill for [`Event.composedPath()`](https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath).\r\n// Returns an array containing the `HTMLElement`s that the given DOM event\r\n// should propagate to (if not stopped).\r\nexport function getPropagationPath(ev) {\r\n\tif (ev.composedPath) {\r\n\t\treturn ev.composedPath();\r\n\t}\r\n\r\n\tvar path = [];\r\n\tvar el = ev.target;\r\n\r\n\twhile (el) {\r\n\t\tpath.push(el);\r\n\t\tel = el.parentNode;\r\n\t}\r\n\treturn path;\r\n}\r\n\r\n\r\n// @function getMousePosition(ev: DOMEvent, container?: HTMLElement): Point\r\n// Gets normalized mouse position from a DOM event relative to the\r\n// `container` (border excluded) or to the whole page if not specified.\r\nexport function getMousePosition(e, container) {\r\n\tif (!container) {\r\n\t\treturn new Point(e.clientX, e.clientY);\r\n\t}\r\n\r\n\tvar scale = getScale(container),\r\n\t    offset = scale.boundingClientRect; // left and top  values are in page scale (like the event clientX/Y)\r\n\r\n\treturn new Point(\r\n\t\t// offset.left/top values are in page scale (like clientX/Y),\r\n\t\t// whereas clientLeft/Top (border width) values are the original values (before CSS scale applies).\r\n\t\t(e.clientX - offset.left) / scale.x - container.clientLeft,\r\n\t\t(e.clientY - offset.top) / scale.y - container.clientTop\r\n\t);\r\n}\r\n\r\n\r\n//  except , Safari and\r\n// We need double the scroll pixels (see #7403 and #4538) for all Browsers\r\n// except OSX (Mac) -> 3x, Chrome running on Linux 1x\r\n\r\nvar wheelPxFactor =\r\n\t(Browser.linux && Browser.chrome) ? window.devicePixelRatio :\r\n\tBrowser.mac ? window.devicePixelRatio * 3 :\r\n\twindow.devicePixelRatio > 0 ? 2 * window.devicePixelRatio : 1;\r\n// @function getWheelDelta(ev: DOMEvent): Number\r\n// Gets normalized wheel delta from a wheel DOM event, in vertical\r\n// pixels scrolled (negative if scrolling down).\r\n// Events from pointing devices without precise scrolling are mapped to\r\n// a best guess of 60 pixels.\r\nexport function getWheelDelta(e) {\r\n\treturn (Browser.edge) ? e.wheelDeltaY / 2 : // Don't trust window-geometry-based delta\r\n\t       (e.deltaY && e.deltaMode === 0) ? -e.deltaY / wheelPxFactor : // Pixels\r\n\t       (e.deltaY && e.deltaMode === 1) ? -e.deltaY * 20 : // Lines\r\n\t       (e.deltaY && e.deltaMode === 2) ? -e.deltaY * 60 : // Pages\r\n\t       (e.deltaX || e.deltaZ) ? 0 :\t// Skip horizontal/depth wheel events\r\n\t       e.wheelDelta ? (e.wheelDeltaY || e.wheelDelta) / 2 : // Legacy IE pixels\r\n\t       (e.detail && Math.abs(e.detail) < 32765) ? -e.detail * 20 : // Legacy Moz lines\r\n\t       e.detail ? e.detail / -32765 * 60 : // Legacy Moz pages\r\n\t       0;\r\n}\r\n\r\n// check if element really left/entered the event target (for mouseenter/mouseleave)\r\nexport function isExternalTarget(el, e) {\r\n\r\n\tvar related = e.relatedTarget;\r\n\r\n\tif (!related) { return true; }\r\n\r\n\ttry {\r\n\t\twhile (related && (related !== el)) {\r\n\t\t\trelated = related.parentNode;\r\n\t\t}\r\n\t} catch (err) {\r\n\t\treturn false;\r\n\t}\r\n\treturn (related !== el);\r\n}\r\n\r\n// @function addListener(…): this\r\n// Alias to [`L.DomEvent.on`](#domevent-on)\r\nexport {on as addListener};\r\n\r\n// @function removeListener(…): this\r\n// Alias to [`L.DomEvent.off`](#domevent-off)\r\nexport {off as removeListener};\r\n","import * as Util from '../core/Util';\nimport {Evented} from '../core/Events';\nimport * as DomUtil from '../dom/DomUtil';\n\n\n/*\n * @class PosAnimation\n * @aka L.PosAnimation\n * @inherits Evented\n * Used internally for panning animations, utilizing CSS3 Transitions for modern browsers and a timer fallback for IE6-9.\n *\n * @example\n * ```js\n * var myPositionMarker = L.marker([48.864716, 2.294694]).addTo(map);\n *\n * myPositionMarker.on(\"click\", function() {\n * \tvar pos = map.latLngToLayerPoint(myPositionMarker.getLatLng());\n * \tpos.y -= 25;\n * \tvar fx = new L.PosAnimation();\n *\n * \tfx.once('end',function() {\n * \t\tpos.y += 25;\n * \t\tfx.run(myPositionMarker._icon, pos, 0.8);\n * \t});\n *\n * \tfx.run(myPositionMarker._icon, pos, 0.3);\n * });\n *\n * ```\n *\n * @constructor L.PosAnimation()\n * Creates a `PosAnimation` object.\n *\n */\n\nexport var PosAnimation = Evented.extend({\n\n\t// @method run(el: HTMLElement, newPos: Point, duration?: Number, easeLinearity?: Number)\n\t// Run an animation of a given element to a new position, optionally setting\n\t// duration in seconds (`0.25` by default) and easing linearity factor (3rd\n\t// argument of the [cubic bezier curve](https://cubic-bezier.com/#0,0,.5,1),\n\t// `0.5` by default).\n\trun: function (el, newPos, duration, easeLinearity) {\n\t\tthis.stop();\n\n\t\tthis._el = el;\n\t\tthis._inProgress = true;\n\t\tthis._duration = duration || 0.25;\n\t\tthis._easeOutPower = 1 / Math.max(easeLinearity || 0.5, 0.2);\n\n\t\tthis._startPos = DomUtil.getPosition(el);\n\t\tthis._offset = newPos.subtract(this._startPos);\n\t\tthis._startTime = +new Date();\n\n\t\t// @event start: Event\n\t\t// Fired when the animation starts\n\t\tthis.fire('start');\n\n\t\tthis._animate();\n\t},\n\n\t// @method stop()\n\t// Stops the animation (if currently running).\n\tstop: function () {\n\t\tif (!this._inProgress) { return; }\n\n\t\tthis._step(true);\n\t\tthis._complete();\n\t},\n\n\t_animate: function () {\n\t\t// animation loop\n\t\tthis._animId = Util.requestAnimFrame(this._animate, this);\n\t\tthis._step();\n\t},\n\n\t_step: function (round) {\n\t\tvar elapsed = (+new Date()) - this._startTime,\n\t\t    duration = this._duration * 1000;\n\n\t\tif (elapsed < duration) {\n\t\t\tthis._runFrame(this._easeOut(elapsed / duration), round);\n\t\t} else {\n\t\t\tthis._runFrame(1);\n\t\t\tthis._complete();\n\t\t}\n\t},\n\n\t_runFrame: function (progress, round) {\n\t\tvar pos = this._startPos.add(this._offset.multiplyBy(progress));\n\t\tif (round) {\n\t\t\tpos._round();\n\t\t}\n\t\tDomUtil.setPosition(this._el, pos);\n\n\t\t// @event step: Event\n\t\t// Fired continuously during the animation.\n\t\tthis.fire('step');\n\t},\n\n\t_complete: function () {\n\t\tUtil.cancelAnimFrame(this._animId);\n\n\t\tthis._inProgress = false;\n\t\t// @event end: Event\n\t\t// Fired when the animation ends.\n\t\tthis.fire('end');\n\t},\n\n\t_easeOut: function (t) {\n\t\treturn 1 - Math.pow(1 - t, this._easeOutPower);\n\t}\n});\n","import * as Util from '../core/Util';\r\nimport {Evented} from '../core/Events';\r\nimport {EPSG3857} from '../geo/crs/CRS.EPSG3857';\r\nimport {Point, toPoint} from '../geometry/Point';\r\nimport {Bounds, toBounds} from '../geometry/Bounds';\r\nimport {LatLng, toLatLng} from '../geo/LatLng';\r\nimport {LatLngBounds, toLatLngBounds} from '../geo/LatLngBounds';\r\nimport Browser from '../core/Browser';\r\nimport * as DomEvent from '../dom/DomEvent';\r\nimport * as DomUtil from '../dom/DomUtil';\r\nimport {PosAnimation} from '../dom/PosAnimation';\r\n\r\n/*\r\n * @class Map\r\n * @aka L.Map\r\n * @inherits Evented\r\n *\r\n * The central class of the API — it is used to create a map on a page and manipulate it.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * // initialize the map on the \"map\" div with a given center and zoom\r\n * var map = L.map('map', {\r\n * \tcenter: [51.505, -0.09],\r\n * \tzoom: 13\r\n * });\r\n * ```\r\n *\r\n */\r\n\r\nexport var Map = Evented.extend({\r\n\r\n\toptions: {\r\n\t\t// @section Map State Options\r\n\t\t// @option crs: CRS = L.CRS.EPSG3857\r\n\t\t// The [Coordinate Reference System](#crs) to use. Don't change this if you're not\r\n\t\t// sure what it means.\r\n\t\tcrs: EPSG3857,\r\n\r\n\t\t// @option center: LatLng = undefined\r\n\t\t// Initial geographic center of the map\r\n\t\tcenter: undefined,\r\n\r\n\t\t// @option zoom: Number = undefined\r\n\t\t// Initial map zoom level\r\n\t\tzoom: undefined,\r\n\r\n\t\t// @option minZoom: Number = *\r\n\t\t// Minimum zoom level of the map.\r\n\t\t// If not specified and at least one `GridLayer` or `TileLayer` is in the map,\r\n\t\t// the lowest of their `minZoom` options will be used instead.\r\n\t\tminZoom: undefined,\r\n\r\n\t\t// @option maxZoom: Number = *\r\n\t\t// Maximum zoom level of the map.\r\n\t\t// If not specified and at least one `GridLayer` or `TileLayer` is in the map,\r\n\t\t// the highest of their `maxZoom` options will be used instead.\r\n\t\tmaxZoom: undefined,\r\n\r\n\t\t// @option layers: Layer[] = []\r\n\t\t// Array of layers that will be added to the map initially\r\n\t\tlayers: [],\r\n\r\n\t\t// @option maxBounds: LatLngBounds = null\r\n\t\t// When this option is set, the map restricts the view to the given\r\n\t\t// geographical bounds, bouncing the user back if the user tries to pan\r\n\t\t// outside the view. To set the restriction dynamically, use\r\n\t\t// [`setMaxBounds`](#map-setmaxbounds) method.\r\n\t\tmaxBounds: undefined,\r\n\r\n\t\t// @option renderer: Renderer = *\r\n\t\t// The default method for drawing vector layers on the map. `L.SVG`\r\n\t\t// or `L.Canvas` by default depending on browser support.\r\n\t\trenderer: undefined,\r\n\r\n\r\n\t\t// @section Animation Options\r\n\t\t// @option zoomAnimation: Boolean = true\r\n\t\t// Whether the map zoom animation is enabled. By default it's enabled\r\n\t\t// in all browsers that support CSS3 Transitions except Android.\r\n\t\tzoomAnimation: true,\r\n\r\n\t\t// @option zoomAnimationThreshold: Number = 4\r\n\t\t// Won't animate zoom if the zoom difference exceeds this value.\r\n\t\tzoomAnimationThreshold: 4,\r\n\r\n\t\t// @option fadeAnimation: Boolean = true\r\n\t\t// Whether the tile fade animation is enabled. By default it's enabled\r\n\t\t// in all browsers that support CSS3 Transitions except Android.\r\n\t\tfadeAnimation: true,\r\n\r\n\t\t// @option markerZoomAnimation: Boolean = true\r\n\t\t// Whether markers animate their zoom with the zoom animation, if disabled\r\n\t\t// they will disappear for the length of the animation. By default it's\r\n\t\t// enabled in all browsers that support CSS3 Transitions except Android.\r\n\t\tmarkerZoomAnimation: true,\r\n\r\n\t\t// @option transform3DLimit: Number = 2^23\r\n\t\t// Defines the maximum size of a CSS translation transform. The default\r\n\t\t// value should not be changed unless a web browser positions layers in\r\n\t\t// the wrong place after doing a large `panBy`.\r\n\t\ttransform3DLimit: 8388608, // Precision limit of a 32-bit float\r\n\r\n\t\t// @section Interaction Options\r\n\t\t// @option zoomSnap: Number = 1\r\n\t\t// Forces the map's zoom level to always be a multiple of this, particularly\r\n\t\t// right after a [`fitBounds()`](#map-fitbounds) or a pinch-zoom.\r\n\t\t// By default, the zoom level snaps to the nearest integer; lower values\r\n\t\t// (e.g. `0.5` or `0.1`) allow for greater granularity. A value of `0`\r\n\t\t// means the zoom level will not be snapped after `fitBounds` or a pinch-zoom.\r\n\t\tzoomSnap: 1,\r\n\r\n\t\t// @option zoomDelta: Number = 1\r\n\t\t// Controls how much the map's zoom level will change after a\r\n\t\t// [`zoomIn()`](#map-zoomin), [`zoomOut()`](#map-zoomout), pressing `+`\r\n\t\t// or `-` on the keyboard, or using the [zoom controls](#control-zoom).\r\n\t\t// Values smaller than `1` (e.g. `0.5`) allow for greater granularity.\r\n\t\tzoomDelta: 1,\r\n\r\n\t\t// @option trackResize: Boolean = true\r\n\t\t// Whether the map automatically handles browser window resize to update itself.\r\n\t\ttrackResize: true\r\n\t},\r\n\r\n\tinitialize: function (id, options) { // (HTMLElement or String, Object)\r\n\t\toptions = Util.setOptions(this, options);\r\n\r\n\t\t// Make sure to assign internal flags at the beginning,\r\n\t\t// to avoid inconsistent state in some edge cases.\r\n\t\tthis._handlers = [];\r\n\t\tthis._layers = {};\r\n\t\tthis._zoomBoundLayers = {};\r\n\t\tthis._sizeChanged = true;\r\n\r\n\t\tthis._initContainer(id);\r\n\t\tthis._initLayout();\r\n\r\n\t\t// hack for https://github.com/Leaflet/Leaflet/issues/1980\r\n\t\tthis._onResize = Util.bind(this._onResize, this);\r\n\r\n\t\tthis._initEvents();\r\n\r\n\t\tif (options.maxBounds) {\r\n\t\t\tthis.setMaxBounds(options.maxBounds);\r\n\t\t}\r\n\r\n\t\tif (options.zoom !== undefined) {\r\n\t\t\tthis._zoom = this._limitZoom(options.zoom);\r\n\t\t}\r\n\r\n\t\tif (options.center && options.zoom !== undefined) {\r\n\t\t\tthis.setView(toLatLng(options.center), options.zoom, {reset: true});\r\n\t\t}\r\n\r\n\t\tthis.callInitHooks();\r\n\r\n\t\t// don't animate on browsers without hardware-accelerated transitions or old Android/Opera\r\n\t\tthis._zoomAnimated = DomUtil.TRANSITION && Browser.any3d && !Browser.mobileOpera &&\r\n\t\t\t\tthis.options.zoomAnimation;\r\n\r\n\t\t// zoom transitions run with the same duration for all layers, so if one of transitionend events\r\n\t\t// happens after starting zoom animation (propagating to the map pane), we know that it ended globally\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tthis._createAnimProxy();\r\n\t\t\tDomEvent.on(this._proxy, DomUtil.TRANSITION_END, this._catchTransitionEnd, this);\r\n\t\t}\r\n\r\n\t\tthis._addLayers(this.options.layers);\r\n\t},\r\n\r\n\r\n\t// @section Methods for modifying map state\r\n\r\n\t// @method setView(center: LatLng, zoom: Number, options?: Zoom/pan options): this\r\n\t// Sets the view of the map (geographical center and zoom) with the given\r\n\t// animation options.\r\n\tsetView: function (center, zoom, options) {\r\n\r\n\t\tzoom = zoom === undefined ? this._zoom : this._limitZoom(zoom);\r\n\t\tcenter = this._limitCenter(toLatLng(center), zoom, this.options.maxBounds);\r\n\t\toptions = options || {};\r\n\r\n\t\tthis._stop();\r\n\r\n\t\tif (this._loaded && !options.reset && options !== true) {\r\n\r\n\t\t\tif (options.animate !== undefined) {\r\n\t\t\t\toptions.zoom = Util.extend({animate: options.animate}, options.zoom);\r\n\t\t\t\toptions.pan = Util.extend({animate: options.animate, duration: options.duration}, options.pan);\r\n\t\t\t}\r\n\r\n\t\t\t// try animating pan or zoom\r\n\t\t\tvar moved = (this._zoom !== zoom) ?\r\n\t\t\t\tthis._tryAnimatedZoom && this._tryAnimatedZoom(center, zoom, options.zoom) :\r\n\t\t\t\tthis._tryAnimatedPan(center, options.pan);\r\n\r\n\t\t\tif (moved) {\r\n\t\t\t\t// prevent resize handler call, the view will refresh after animation anyway\r\n\t\t\t\tclearTimeout(this._sizeTimer);\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// animation didn't start, just reset the map view\r\n\t\tthis._resetView(center, zoom, options.pan && options.pan.noMoveStart);\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setZoom(zoom: Number, options?: Zoom/pan options): this\r\n\t// Sets the zoom of the map.\r\n\tsetZoom: function (zoom, options) {\r\n\t\tif (!this._loaded) {\r\n\t\t\tthis._zoom = zoom;\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\treturn this.setView(this.getCenter(), zoom, {zoom: options});\r\n\t},\r\n\r\n\t// @method zoomIn(delta?: Number, options?: Zoom options): this\r\n\t// Increases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).\r\n\tzoomIn: function (delta, options) {\r\n\t\tdelta = delta || (Browser.any3d ? this.options.zoomDelta : 1);\r\n\t\treturn this.setZoom(this._zoom + delta, options);\r\n\t},\r\n\r\n\t// @method zoomOut(delta?: Number, options?: Zoom options): this\r\n\t// Decreases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).\r\n\tzoomOut: function (delta, options) {\r\n\t\tdelta = delta || (Browser.any3d ? this.options.zoomDelta : 1);\r\n\t\treturn this.setZoom(this._zoom - delta, options);\r\n\t},\r\n\r\n\t// @method setZoomAround(latlng: LatLng, zoom: Number, options: Zoom options): this\r\n\t// Zooms the map while keeping a specified geographical point on the map\r\n\t// stationary (e.g. used internally for scroll zoom and double-click zoom).\r\n\t// @alternative\r\n\t// @method setZoomAround(offset: Point, zoom: Number, options: Zoom options): this\r\n\t// Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary.\r\n\tsetZoomAround: function (latlng, zoom, options) {\r\n\t\tvar scale = this.getZoomScale(zoom),\r\n\t\t    viewHalf = this.getSize().divideBy(2),\r\n\t\t    containerPoint = latlng instanceof Point ? latlng : this.latLngToContainerPoint(latlng),\r\n\r\n\t\t    centerOffset = containerPoint.subtract(viewHalf).multiplyBy(1 - 1 / scale),\r\n\t\t    newCenter = this.containerPointToLatLng(viewHalf.add(centerOffset));\r\n\r\n\t\treturn this.setView(newCenter, zoom, {zoom: options});\r\n\t},\r\n\r\n\t_getBoundsCenterZoom: function (bounds, options) {\r\n\r\n\t\toptions = options || {};\r\n\t\tbounds = bounds.getBounds ? bounds.getBounds() : toLatLngBounds(bounds);\r\n\r\n\t\tvar paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]),\r\n\t\t    paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]),\r\n\r\n\t\t    zoom = this.getBoundsZoom(bounds, false, paddingTL.add(paddingBR));\r\n\r\n\t\tzoom = (typeof options.maxZoom === 'number') ? Math.min(options.maxZoom, zoom) : zoom;\r\n\r\n\t\tif (zoom === Infinity) {\r\n\t\t\treturn {\r\n\t\t\t\tcenter: bounds.getCenter(),\r\n\t\t\t\tzoom: zoom\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tvar paddingOffset = paddingBR.subtract(paddingTL).divideBy(2),\r\n\r\n\t\t    swPoint = this.project(bounds.getSouthWest(), zoom),\r\n\t\t    nePoint = this.project(bounds.getNorthEast(), zoom),\r\n\t\t    center = this.unproject(swPoint.add(nePoint).divideBy(2).add(paddingOffset), zoom);\r\n\r\n\t\treturn {\r\n\t\t\tcenter: center,\r\n\t\t\tzoom: zoom\r\n\t\t};\r\n\t},\r\n\r\n\t// @method fitBounds(bounds: LatLngBounds, options?: fitBounds options): this\r\n\t// Sets a map view that contains the given geographical bounds with the\r\n\t// maximum zoom level possible.\r\n\tfitBounds: function (bounds, options) {\r\n\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\tif (!bounds.isValid()) {\r\n\t\t\tthrow new Error('Bounds are not valid.');\r\n\t\t}\r\n\r\n\t\tvar target = this._getBoundsCenterZoom(bounds, options);\r\n\t\treturn this.setView(target.center, target.zoom, options);\r\n\t},\r\n\r\n\t// @method fitWorld(options?: fitBounds options): this\r\n\t// Sets a map view that mostly contains the whole world with the maximum\r\n\t// zoom level possible.\r\n\tfitWorld: function (options) {\r\n\t\treturn this.fitBounds([[-90, -180], [90, 180]], options);\r\n\t},\r\n\r\n\t// @method panTo(latlng: LatLng, options?: Pan options): this\r\n\t// Pans the map to a given center.\r\n\tpanTo: function (center, options) { // (LatLng)\r\n\t\treturn this.setView(center, this._zoom, {pan: options});\r\n\t},\r\n\r\n\t// @method panBy(offset: Point, options?: Pan options): this\r\n\t// Pans the map by a given number of pixels (animated).\r\n\tpanBy: function (offset, options) {\r\n\t\toffset = toPoint(offset).round();\r\n\t\toptions = options || {};\r\n\r\n\t\tif (!offset.x && !offset.y) {\r\n\t\t\treturn this.fire('moveend');\r\n\t\t}\r\n\t\t// If we pan too far, Chrome gets issues with tiles\r\n\t\t// and makes them disappear or appear in the wrong place (slightly offset) #2602\r\n\t\tif (options.animate !== true && !this.getSize().contains(offset)) {\r\n\t\t\tthis._resetView(this.unproject(this.project(this.getCenter()).add(offset)), this.getZoom());\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif (!this._panAnim) {\r\n\t\t\tthis._panAnim = new PosAnimation();\r\n\r\n\t\t\tthis._panAnim.on({\r\n\t\t\t\t'step': this._onPanTransitionStep,\r\n\t\t\t\t'end': this._onPanTransitionEnd\r\n\t\t\t}, this);\r\n\t\t}\r\n\r\n\t\t// don't fire movestart if animating inertia\r\n\t\tif (!options.noMoveStart) {\r\n\t\t\tthis.fire('movestart');\r\n\t\t}\r\n\r\n\t\t// animate pan unless animate: false specified\r\n\t\tif (options.animate !== false) {\r\n\t\t\tDomUtil.addClass(this._mapPane, 'leaflet-pan-anim');\r\n\r\n\t\t\tvar newPos = this._getMapPanePos().subtract(offset).round();\r\n\t\t\tthis._panAnim.run(this._mapPane, newPos, options.duration || 0.25, options.easeLinearity);\r\n\t\t} else {\r\n\t\t\tthis._rawPanBy(offset);\r\n\t\t\tthis.fire('move').fire('moveend');\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method flyTo(latlng: LatLng, zoom?: Number, options?: Zoom/pan options): this\r\n\t// Sets the view of the map (geographical center and zoom) performing a smooth\r\n\t// pan-zoom animation.\r\n\tflyTo: function (targetCenter, targetZoom, options) {\r\n\r\n\t\toptions = options || {};\r\n\t\tif (options.animate === false || !Browser.any3d) {\r\n\t\t\treturn this.setView(targetCenter, targetZoom, options);\r\n\t\t}\r\n\r\n\t\tthis._stop();\r\n\r\n\t\tvar from = this.project(this.getCenter()),\r\n\t\t    to = this.project(targetCenter),\r\n\t\t    size = this.getSize(),\r\n\t\t    startZoom = this._zoom;\r\n\r\n\t\ttargetCenter = toLatLng(targetCenter);\r\n\t\ttargetZoom = targetZoom === undefined ? startZoom : targetZoom;\r\n\r\n\t\tvar w0 = Math.max(size.x, size.y),\r\n\t\t    w1 = w0 * this.getZoomScale(startZoom, targetZoom),\r\n\t\t    u1 = (to.distanceTo(from)) || 1,\r\n\t\t    rho = 1.42,\r\n\t\t    rho2 = rho * rho;\r\n\r\n\t\tfunction r(i) {\r\n\t\t\tvar s1 = i ? -1 : 1,\r\n\t\t\t    s2 = i ? w1 : w0,\r\n\t\t\t    t1 = w1 * w1 - w0 * w0 + s1 * rho2 * rho2 * u1 * u1,\r\n\t\t\t    b1 = 2 * s2 * rho2 * u1,\r\n\t\t\t    b = t1 / b1,\r\n\t\t\t    sq = Math.sqrt(b * b + 1) - b;\r\n\r\n\t\t\t    // workaround for floating point precision bug when sq = 0, log = -Infinite,\r\n\t\t\t    // thus triggering an infinite loop in flyTo\r\n\t\t\t    var log = sq < 0.000000001 ? -18 : Math.log(sq);\r\n\r\n\t\t\treturn log;\r\n\t\t}\r\n\r\n\t\tfunction sinh(n) { return (Math.exp(n) - Math.exp(-n)) / 2; }\r\n\t\tfunction cosh(n) { return (Math.exp(n) + Math.exp(-n)) / 2; }\r\n\t\tfunction tanh(n) { return sinh(n) / cosh(n); }\r\n\r\n\t\tvar r0 = r(0);\r\n\r\n\t\tfunction w(s) { return w0 * (cosh(r0) / cosh(r0 + rho * s)); }\r\n\t\tfunction u(s) { return w0 * (cosh(r0) * tanh(r0 + rho * s) - sinh(r0)) / rho2; }\r\n\r\n\t\tfunction easeOut(t) { return 1 - Math.pow(1 - t, 1.5); }\r\n\r\n\t\tvar start = Date.now(),\r\n\t\t    S = (r(1) - r0) / rho,\r\n\t\t    duration = options.duration ? 1000 * options.duration : 1000 * S * 0.8;\r\n\r\n\t\tfunction frame() {\r\n\t\t\tvar t = (Date.now() - start) / duration,\r\n\t\t\t    s = easeOut(t) * S;\r\n\r\n\t\t\tif (t <= 1) {\r\n\t\t\t\tthis._flyToFrame = Util.requestAnimFrame(frame, this);\r\n\r\n\t\t\t\tthis._move(\r\n\t\t\t\t\tthis.unproject(from.add(to.subtract(from).multiplyBy(u(s) / u1)), startZoom),\r\n\t\t\t\t\tthis.getScaleZoom(w0 / w(s), startZoom),\r\n\t\t\t\t\t{flyTo: true});\r\n\r\n\t\t\t} else {\r\n\t\t\t\tthis\r\n\t\t\t\t\t._move(targetCenter, targetZoom)\r\n\t\t\t\t\t._moveEnd(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._moveStart(true, options.noMoveStart);\r\n\r\n\t\tframe.call(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method flyToBounds(bounds: LatLngBounds, options?: fitBounds options): this\r\n\t// Sets the view of the map with a smooth animation like [`flyTo`](#map-flyto),\r\n\t// but takes a bounds parameter like [`fitBounds`](#map-fitbounds).\r\n\tflyToBounds: function (bounds, options) {\r\n\t\tvar target = this._getBoundsCenterZoom(bounds, options);\r\n\t\treturn this.flyTo(target.center, target.zoom, options);\r\n\t},\r\n\r\n\t// @method setMaxBounds(bounds: LatLngBounds): this\r\n\t// Restricts the map view to the given bounds (see the [maxBounds](#map-maxbounds) option).\r\n\tsetMaxBounds: function (bounds) {\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\tif (this.listens('moveend', this._panInsideMaxBounds)) {\r\n\t\t\tthis.off('moveend', this._panInsideMaxBounds);\r\n\t\t}\r\n\r\n\t\tif (!bounds.isValid()) {\r\n\t\t\tthis.options.maxBounds = null;\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tthis.options.maxBounds = bounds;\r\n\r\n\t\tif (this._loaded) {\r\n\t\t\tthis._panInsideMaxBounds();\r\n\t\t}\r\n\r\n\t\treturn this.on('moveend', this._panInsideMaxBounds);\r\n\t},\r\n\r\n\t// @method setMinZoom(zoom: Number): this\r\n\t// Sets the lower limit for the available zoom levels (see the [minZoom](#map-minzoom) option).\r\n\tsetMinZoom: function (zoom) {\r\n\t\tvar oldZoom = this.options.minZoom;\r\n\t\tthis.options.minZoom = zoom;\r\n\r\n\t\tif (this._loaded && oldZoom !== zoom) {\r\n\t\t\tthis.fire('zoomlevelschange');\r\n\r\n\t\t\tif (this.getZoom() < this.options.minZoom) {\r\n\t\t\t\treturn this.setZoom(zoom);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setMaxZoom(zoom: Number): this\r\n\t// Sets the upper limit for the available zoom levels (see the [maxZoom](#map-maxzoom) option).\r\n\tsetMaxZoom: function (zoom) {\r\n\t\tvar oldZoom = this.options.maxZoom;\r\n\t\tthis.options.maxZoom = zoom;\r\n\r\n\t\tif (this._loaded && oldZoom !== zoom) {\r\n\t\t\tthis.fire('zoomlevelschange');\r\n\r\n\t\t\tif (this.getZoom() > this.options.maxZoom) {\r\n\t\t\t\treturn this.setZoom(zoom);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method panInsideBounds(bounds: LatLngBounds, options?: Pan options): this\r\n\t// Pans the map to the closest view that would lie inside the given bounds (if it's not already), controlling the animation using the options specific, if any.\r\n\tpanInsideBounds: function (bounds, options) {\r\n\t\tthis._enforcingBounds = true;\r\n\t\tvar center = this.getCenter(),\r\n\t\t    newCenter = this._limitCenter(center, this._zoom, toLatLngBounds(bounds));\r\n\r\n\t\tif (!center.equals(newCenter)) {\r\n\t\t\tthis.panTo(newCenter, options);\r\n\t\t}\r\n\r\n\t\tthis._enforcingBounds = false;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method panInside(latlng: LatLng, options?: padding options): this\r\n\t// Pans the map the minimum amount to make the `latlng` visible. Use\r\n\t// padding options to fit the display to more restricted bounds.\r\n\t// If `latlng` is already within the (optionally padded) display bounds,\r\n\t// the map will not be panned.\r\n\tpanInside: function (latlng, options) {\r\n\t\toptions = options || {};\r\n\r\n\t\tvar paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]),\r\n\t\t    paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]),\r\n\t\t    pixelCenter = this.project(this.getCenter()),\r\n\t\t    pixelPoint = this.project(latlng),\r\n\t\t    pixelBounds = this.getPixelBounds(),\r\n\t\t    paddedBounds = toBounds([pixelBounds.min.add(paddingTL), pixelBounds.max.subtract(paddingBR)]),\r\n\t\t    paddedSize = paddedBounds.getSize();\r\n\r\n\t\tif (!paddedBounds.contains(pixelPoint)) {\r\n\t\t\tthis._enforcingBounds = true;\r\n\t\t\tvar centerOffset = pixelPoint.subtract(paddedBounds.getCenter());\r\n\t\t\tvar offset = paddedBounds.extend(pixelPoint).getSize().subtract(paddedSize);\r\n\t\t\tpixelCenter.x += centerOffset.x < 0 ? -offset.x : offset.x;\r\n\t\t\tpixelCenter.y += centerOffset.y < 0 ? -offset.y : offset.y;\r\n\t\t\tthis.panTo(this.unproject(pixelCenter), options);\r\n\t\t\tthis._enforcingBounds = false;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method invalidateSize(options: Zoom/pan options): this\r\n\t// Checks if the map container size changed and updates the map if so —\r\n\t// call it after you've changed the map size dynamically, also animating\r\n\t// pan by default. If `options.pan` is `false`, panning will not occur.\r\n\t// If `options.debounceMoveend` is `true`, it will delay `moveend` event so\r\n\t// that it doesn't happen often even if the method is called many\r\n\t// times in a row.\r\n\r\n\t// @alternative\r\n\t// @method invalidateSize(animate: Boolean): this\r\n\t// Checks if the map container size changed and updates the map if so —\r\n\t// call it after you've changed the map size dynamically, also animating\r\n\t// pan by default.\r\n\tinvalidateSize: function (options) {\r\n\t\tif (!this._loaded) { return this; }\r\n\r\n\t\toptions = Util.extend({\r\n\t\t\tanimate: false,\r\n\t\t\tpan: true\r\n\t\t}, options === true ? {animate: true} : options);\r\n\r\n\t\tvar oldSize = this.getSize();\r\n\t\tthis._sizeChanged = true;\r\n\t\tthis._lastCenter = null;\r\n\r\n\t\tvar newSize = this.getSize(),\r\n\t\t    oldCenter = oldSize.divideBy(2).round(),\r\n\t\t    newCenter = newSize.divideBy(2).round(),\r\n\t\t    offset = oldCenter.subtract(newCenter);\r\n\r\n\t\tif (!offset.x && !offset.y) { return this; }\r\n\r\n\t\tif (options.animate && options.pan) {\r\n\t\t\tthis.panBy(offset);\r\n\r\n\t\t} else {\r\n\t\t\tif (options.pan) {\r\n\t\t\t\tthis._rawPanBy(offset);\r\n\t\t\t}\r\n\r\n\t\t\tthis.fire('move');\r\n\r\n\t\t\tif (options.debounceMoveend) {\r\n\t\t\t\tclearTimeout(this._sizeTimer);\r\n\t\t\t\tthis._sizeTimer = setTimeout(Util.bind(this.fire, this, 'moveend'), 200);\r\n\t\t\t} else {\r\n\t\t\t\tthis.fire('moveend');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// @section Map state change events\r\n\t\t// @event resize: ResizeEvent\r\n\t\t// Fired when the map is resized.\r\n\t\treturn this.fire('resize', {\r\n\t\t\toldSize: oldSize,\r\n\t\t\tnewSize: newSize\r\n\t\t});\r\n\t},\r\n\r\n\t// @section Methods for modifying map state\r\n\t// @method stop(): this\r\n\t// Stops the currently running `panTo` or `flyTo` animation, if any.\r\n\tstop: function () {\r\n\t\tthis.setZoom(this._limitZoom(this._zoom));\r\n\t\tif (!this.options.zoomSnap) {\r\n\t\t\tthis.fire('viewreset');\r\n\t\t}\r\n\t\treturn this._stop();\r\n\t},\r\n\r\n\t// @section Geolocation methods\r\n\t// @method locate(options?: Locate options): this\r\n\t// Tries to locate the user using the Geolocation API, firing a [`locationfound`](#map-locationfound)\r\n\t// event with location data on success or a [`locationerror`](#map-locationerror) event on failure,\r\n\t// and optionally sets the map view to the user's location with respect to\r\n\t// detection accuracy (or to the world view if geolocation failed).\r\n\t// Note that, if your page doesn't use HTTPS, this method will fail in\r\n\t// modern browsers ([Chrome 50 and newer](https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins))\r\n\t// See `Locate options` for more details.\r\n\tlocate: function (options) {\r\n\r\n\t\toptions = this._locateOptions = Util.extend({\r\n\t\t\ttimeout: 10000,\r\n\t\t\twatch: false\r\n\t\t\t// setView: false\r\n\t\t\t// maxZoom: <Number>\r\n\t\t\t// maximumAge: 0\r\n\t\t\t// enableHighAccuracy: false\r\n\t\t}, options);\r\n\r\n\t\tif (!('geolocation' in navigator)) {\r\n\t\t\tthis._handleGeolocationError({\r\n\t\t\t\tcode: 0,\r\n\t\t\t\tmessage: 'Geolocation not supported.'\r\n\t\t\t});\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tvar onResponse = Util.bind(this._handleGeolocationResponse, this),\r\n\t\t    onError = Util.bind(this._handleGeolocationError, this);\r\n\r\n\t\tif (options.watch) {\r\n\t\t\tthis._locationWatchId =\r\n\t\t\t        navigator.geolocation.watchPosition(onResponse, onError, options);\r\n\t\t} else {\r\n\t\t\tnavigator.geolocation.getCurrentPosition(onResponse, onError, options);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method stopLocate(): this\r\n\t// Stops watching location previously initiated by `map.locate({watch: true})`\r\n\t// and aborts resetting the map view if map.locate was called with\r\n\t// `{setView: true}`.\r\n\tstopLocate: function () {\r\n\t\tif (navigator.geolocation && navigator.geolocation.clearWatch) {\r\n\t\t\tnavigator.geolocation.clearWatch(this._locationWatchId);\r\n\t\t}\r\n\t\tif (this._locateOptions) {\r\n\t\t\tthis._locateOptions.setView = false;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_handleGeolocationError: function (error) {\r\n\t\tif (!this._container._leaflet_id) { return; }\r\n\r\n\t\tvar c = error.code,\r\n\t\t    message = error.message ||\r\n\t\t            (c === 1 ? 'permission denied' :\r\n\t\t            (c === 2 ? 'position unavailable' : 'timeout'));\r\n\r\n\t\tif (this._locateOptions.setView && !this._loaded) {\r\n\t\t\tthis.fitWorld();\r\n\t\t}\r\n\r\n\t\t// @section Location events\r\n\t\t// @event locationerror: ErrorEvent\r\n\t\t// Fired when geolocation (using the [`locate`](#map-locate) method) failed.\r\n\t\tthis.fire('locationerror', {\r\n\t\t\tcode: c,\r\n\t\t\tmessage: 'Geolocation error: ' + message + '.'\r\n\t\t});\r\n\t},\r\n\r\n\t_handleGeolocationResponse: function (pos) {\r\n\t\tif (!this._container._leaflet_id) { return; }\r\n\r\n\t\tvar lat = pos.coords.latitude,\r\n\t\t    lng = pos.coords.longitude,\r\n\t\t    latlng = new LatLng(lat, lng),\r\n\t\t    bounds = latlng.toBounds(pos.coords.accuracy * 2),\r\n\t\t    options = this._locateOptions;\r\n\r\n\t\tif (options.setView) {\r\n\t\t\tvar zoom = this.getBoundsZoom(bounds);\r\n\t\t\tthis.setView(latlng, options.maxZoom ? Math.min(zoom, options.maxZoom) : zoom);\r\n\t\t}\r\n\r\n\t\tvar data = {\r\n\t\t\tlatlng: latlng,\r\n\t\t\tbounds: bounds,\r\n\t\t\ttimestamp: pos.timestamp\r\n\t\t};\r\n\r\n\t\tfor (var i in pos.coords) {\r\n\t\t\tif (typeof pos.coords[i] === 'number') {\r\n\t\t\t\tdata[i] = pos.coords[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// @event locationfound: LocationEvent\r\n\t\t// Fired when geolocation (using the [`locate`](#map-locate) method)\r\n\t\t// went successfully.\r\n\t\tthis.fire('locationfound', data);\r\n\t},\r\n\r\n\t// TODO Appropriate docs section?\r\n\t// @section Other Methods\r\n\t// @method addHandler(name: String, HandlerClass: Function): this\r\n\t// Adds a new `Handler` to the map, given its name and constructor function.\r\n\taddHandler: function (name, HandlerClass) {\r\n\t\tif (!HandlerClass) { return this; }\r\n\r\n\t\tvar handler = this[name] = new HandlerClass(this);\r\n\r\n\t\tthis._handlers.push(handler);\r\n\r\n\t\tif (this.options[name]) {\r\n\t\t\thandler.enable();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method remove(): this\r\n\t// Destroys the map and clears all related event listeners.\r\n\tremove: function () {\r\n\r\n\t\tthis._initEvents(true);\r\n\t\tif (this.options.maxBounds) { this.off('moveend', this._panInsideMaxBounds); }\r\n\r\n\t\tif (this._containerId !== this._container._leaflet_id) {\r\n\t\t\tthrow new Error('Map container is being reused by another instance');\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\t// throws error in IE6-8\r\n\t\t\tdelete this._container._leaflet_id;\r\n\t\t\tdelete this._containerId;\r\n\t\t} catch (e) {\r\n\t\t\t/*eslint-disable */\r\n\t\t\tthis._container._leaflet_id = undefined;\r\n\t\t\t/* eslint-enable */\r\n\t\t\tthis._containerId = undefined;\r\n\t\t}\r\n\r\n\t\tif (this._locationWatchId !== undefined) {\r\n\t\t\tthis.stopLocate();\r\n\t\t}\r\n\r\n\t\tthis._stop();\r\n\r\n\t\tDomUtil.remove(this._mapPane);\r\n\r\n\t\tif (this._clearControlPos) {\r\n\t\t\tthis._clearControlPos();\r\n\t\t}\r\n\t\tif (this._resizeRequest) {\r\n\t\t\tUtil.cancelAnimFrame(this._resizeRequest);\r\n\t\t\tthis._resizeRequest = null;\r\n\t\t}\r\n\r\n\t\tthis._clearHandlers();\r\n\r\n\t\tif (this._loaded) {\r\n\t\t\t// @section Map state change events\r\n\t\t\t// @event unload: Event\r\n\t\t\t// Fired when the map is destroyed with [remove](#map-remove) method.\r\n\t\t\tthis.fire('unload');\r\n\t\t}\r\n\r\n\t\tvar i;\r\n\t\tfor (i in this._layers) {\r\n\t\t\tthis._layers[i].remove();\r\n\t\t}\r\n\t\tfor (i in this._panes) {\r\n\t\t\tDomUtil.remove(this._panes[i]);\r\n\t\t}\r\n\r\n\t\tthis._layers = [];\r\n\t\tthis._panes = [];\r\n\t\tdelete this._mapPane;\r\n\t\tdelete this._renderer;\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @section Other Methods\r\n\t// @method createPane(name: String, container?: HTMLElement): HTMLElement\r\n\t// Creates a new [map pane](#map-pane) with the given name if it doesn't exist already,\r\n\t// then returns it. The pane is created as a child of `container`, or\r\n\t// as a child of the main map pane if not set.\r\n\tcreatePane: function (name, container) {\r\n\t\tvar className = 'leaflet-pane' + (name ? ' leaflet-' + name.replace('Pane', '') + '-pane' : ''),\r\n\t\t    pane = DomUtil.create('div', className, container || this._mapPane);\r\n\r\n\t\tif (name) {\r\n\t\t\tthis._panes[name] = pane;\r\n\t\t}\r\n\t\treturn pane;\r\n\t},\r\n\r\n\t// @section Methods for Getting Map State\r\n\r\n\t// @method getCenter(): LatLng\r\n\t// Returns the geographical center of the map view\r\n\tgetCenter: function () {\r\n\t\tthis._checkIfLoaded();\r\n\r\n\t\tif (this._lastCenter && !this._moved()) {\r\n\t\t\treturn this._lastCenter.clone();\r\n\t\t}\r\n\t\treturn this.layerPointToLatLng(this._getCenterLayerPoint());\r\n\t},\r\n\r\n\t// @method getZoom(): Number\r\n\t// Returns the current zoom level of the map view\r\n\tgetZoom: function () {\r\n\t\treturn this._zoom;\r\n\t},\r\n\r\n\t// @method getBounds(): LatLngBounds\r\n\t// Returns the geographical bounds visible in the current map view\r\n\tgetBounds: function () {\r\n\t\tvar bounds = this.getPixelBounds(),\r\n\t\t    sw = this.unproject(bounds.getBottomLeft()),\r\n\t\t    ne = this.unproject(bounds.getTopRight());\r\n\r\n\t\treturn new LatLngBounds(sw, ne);\r\n\t},\r\n\r\n\t// @method getMinZoom(): Number\r\n\t// Returns the minimum zoom level of the map (if set in the `minZoom` option of the map or of any layers), or `0` by default.\r\n\tgetMinZoom: function () {\r\n\t\treturn this.options.minZoom === undefined ? this._layersMinZoom || 0 : this.options.minZoom;\r\n\t},\r\n\r\n\t// @method getMaxZoom(): Number\r\n\t// Returns the maximum zoom level of the map (if set in the `maxZoom` option of the map or of any layers).\r\n\tgetMaxZoom: function () {\r\n\t\treturn this.options.maxZoom === undefined ?\r\n\t\t\t(this._layersMaxZoom === undefined ? Infinity : this._layersMaxZoom) :\r\n\t\t\tthis.options.maxZoom;\r\n\t},\r\n\r\n\t// @method getBoundsZoom(bounds: LatLngBounds, inside?: Boolean, padding?: Point): Number\r\n\t// Returns the maximum zoom level on which the given bounds fit to the map\r\n\t// view in its entirety. If `inside` (optional) is set to `true`, the method\r\n\t// instead returns the minimum zoom level on which the map view fits into\r\n\t// the given bounds in its entirety.\r\n\tgetBoundsZoom: function (bounds, inside, padding) { // (LatLngBounds[, Boolean, Point]) -> Number\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\t\tpadding = toPoint(padding || [0, 0]);\r\n\r\n\t\tvar zoom = this.getZoom() || 0,\r\n\t\t    min = this.getMinZoom(),\r\n\t\t    max = this.getMaxZoom(),\r\n\t\t    nw = bounds.getNorthWest(),\r\n\t\t    se = bounds.getSouthEast(),\r\n\t\t    size = this.getSize().subtract(padding),\r\n\t\t    boundsSize = toBounds(this.project(se, zoom), this.project(nw, zoom)).getSize(),\r\n\t\t    snap = Browser.any3d ? this.options.zoomSnap : 1,\r\n\t\t    scalex = size.x / boundsSize.x,\r\n\t\t    scaley = size.y / boundsSize.y,\r\n\t\t    scale = inside ? Math.max(scalex, scaley) : Math.min(scalex, scaley);\r\n\r\n\t\tzoom = this.getScaleZoom(scale, zoom);\r\n\r\n\t\tif (snap) {\r\n\t\t\tzoom = Math.round(zoom / (snap / 100)) * (snap / 100); // don't jump if within 1% of a snap level\r\n\t\t\tzoom = inside ? Math.ceil(zoom / snap) * snap : Math.floor(zoom / snap) * snap;\r\n\t\t}\r\n\r\n\t\treturn Math.max(min, Math.min(max, zoom));\r\n\t},\r\n\r\n\t// @method getSize(): Point\r\n\t// Returns the current size of the map container (in pixels).\r\n\tgetSize: function () {\r\n\t\tif (!this._size || this._sizeChanged) {\r\n\t\t\tthis._size = new Point(\r\n\t\t\t\tthis._container.clientWidth || 0,\r\n\t\t\t\tthis._container.clientHeight || 0);\r\n\r\n\t\t\tthis._sizeChanged = false;\r\n\t\t}\r\n\t\treturn this._size.clone();\r\n\t},\r\n\r\n\t// @method getPixelBounds(): Bounds\r\n\t// Returns the bounds of the current map view in projected pixel\r\n\t// coordinates (sometimes useful in layer and overlay implementations).\r\n\tgetPixelBounds: function (center, zoom) {\r\n\t\tvar topLeftPoint = this._getTopLeftPoint(center, zoom);\r\n\t\treturn new Bounds(topLeftPoint, topLeftPoint.add(this.getSize()));\r\n\t},\r\n\r\n\t// TODO: Check semantics - isn't the pixel origin the 0,0 coord relative to\r\n\t// the map pane? \"left point of the map layer\" can be confusing, specially\r\n\t// since there can be negative offsets.\r\n\t// @method getPixelOrigin(): Point\r\n\t// Returns the projected pixel coordinates of the top left point of\r\n\t// the map layer (useful in custom layer and overlay implementations).\r\n\tgetPixelOrigin: function () {\r\n\t\tthis._checkIfLoaded();\r\n\t\treturn this._pixelOrigin;\r\n\t},\r\n\r\n\t// @method getPixelWorldBounds(zoom?: Number): Bounds\r\n\t// Returns the world's bounds in pixel coordinates for zoom level `zoom`.\r\n\t// If `zoom` is omitted, the map's current zoom level is used.\r\n\tgetPixelWorldBounds: function (zoom) {\r\n\t\treturn this.options.crs.getProjectedBounds(zoom === undefined ? this.getZoom() : zoom);\r\n\t},\r\n\r\n\t// @section Other Methods\r\n\r\n\t// @method getPane(pane: String|HTMLElement): HTMLElement\r\n\t// Returns a [map pane](#map-pane), given its name or its HTML element (its identity).\r\n\tgetPane: function (pane) {\r\n\t\treturn typeof pane === 'string' ? this._panes[pane] : pane;\r\n\t},\r\n\r\n\t// @method getPanes(): Object\r\n\t// Returns a plain object containing the names of all [panes](#map-pane) as keys and\r\n\t// the panes as values.\r\n\tgetPanes: function () {\r\n\t\treturn this._panes;\r\n\t},\r\n\r\n\t// @method getContainer: HTMLElement\r\n\t// Returns the HTML element that contains the map.\r\n\tgetContainer: function () {\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\r\n\t// @section Conversion Methods\r\n\r\n\t// @method getZoomScale(toZoom: Number, fromZoom: Number): Number\r\n\t// Returns the scale factor to be applied to a map transition from zoom level\r\n\t// `fromZoom` to `toZoom`. Used internally to help with zoom animations.\r\n\tgetZoomScale: function (toZoom, fromZoom) {\r\n\t\t// TODO replace with universal implementation after refactoring projections\r\n\t\tvar crs = this.options.crs;\r\n\t\tfromZoom = fromZoom === undefined ? this._zoom : fromZoom;\r\n\t\treturn crs.scale(toZoom) / crs.scale(fromZoom);\r\n\t},\r\n\r\n\t// @method getScaleZoom(scale: Number, fromZoom: Number): Number\r\n\t// Returns the zoom level that the map would end up at, if it is at `fromZoom`\r\n\t// level and everything is scaled by a factor of `scale`. Inverse of\r\n\t// [`getZoomScale`](#map-getZoomScale).\r\n\tgetScaleZoom: function (scale, fromZoom) {\r\n\t\tvar crs = this.options.crs;\r\n\t\tfromZoom = fromZoom === undefined ? this._zoom : fromZoom;\r\n\t\tvar zoom = crs.zoom(scale * crs.scale(fromZoom));\r\n\t\treturn isNaN(zoom) ? Infinity : zoom;\r\n\t},\r\n\r\n\t// @method project(latlng: LatLng, zoom: Number): Point\r\n\t// Projects a geographical coordinate `LatLng` according to the projection\r\n\t// of the map's CRS, then scales it according to `zoom` and the CRS's\r\n\t// `Transformation`. The result is pixel coordinate relative to\r\n\t// the CRS origin.\r\n\tproject: function (latlng, zoom) {\r\n\t\tzoom = zoom === undefined ? this._zoom : zoom;\r\n\t\treturn this.options.crs.latLngToPoint(toLatLng(latlng), zoom);\r\n\t},\r\n\r\n\t// @method unproject(point: Point, zoom: Number): LatLng\r\n\t// Inverse of [`project`](#map-project).\r\n\tunproject: function (point, zoom) {\r\n\t\tzoom = zoom === undefined ? this._zoom : zoom;\r\n\t\treturn this.options.crs.pointToLatLng(toPoint(point), zoom);\r\n\t},\r\n\r\n\t// @method layerPointToLatLng(point: Point): LatLng\r\n\t// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),\r\n\t// returns the corresponding geographical coordinate (for the current zoom level).\r\n\tlayerPointToLatLng: function (point) {\r\n\t\tvar projectedPoint = toPoint(point).add(this.getPixelOrigin());\r\n\t\treturn this.unproject(projectedPoint);\r\n\t},\r\n\r\n\t// @method latLngToLayerPoint(latlng: LatLng): Point\r\n\t// Given a geographical coordinate, returns the corresponding pixel coordinate\r\n\t// relative to the [origin pixel](#map-getpixelorigin).\r\n\tlatLngToLayerPoint: function (latlng) {\r\n\t\tvar projectedPoint = this.project(toLatLng(latlng))._round();\r\n\t\treturn projectedPoint._subtract(this.getPixelOrigin());\r\n\t},\r\n\r\n\t// @method wrapLatLng(latlng: LatLng): LatLng\r\n\t// Returns a `LatLng` where `lat` and `lng` has been wrapped according to the\r\n\t// map's CRS's `wrapLat` and `wrapLng` properties, if they are outside the\r\n\t// CRS's bounds.\r\n\t// By default this means longitude is wrapped around the dateline so its\r\n\t// value is between -180 and +180 degrees.\r\n\twrapLatLng: function (latlng) {\r\n\t\treturn this.options.crs.wrapLatLng(toLatLng(latlng));\r\n\t},\r\n\r\n\t// @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds\r\n\t// Returns a `LatLngBounds` with the same size as the given one, ensuring that\r\n\t// its center is within the CRS's bounds.\r\n\t// By default this means the center longitude is wrapped around the dateline so its\r\n\t// value is between -180 and +180 degrees, and the majority of the bounds\r\n\t// overlaps the CRS's bounds.\r\n\twrapLatLngBounds: function (latlng) {\r\n\t\treturn this.options.crs.wrapLatLngBounds(toLatLngBounds(latlng));\r\n\t},\r\n\r\n\t// @method distance(latlng1: LatLng, latlng2: LatLng): Number\r\n\t// Returns the distance between two geographical coordinates according to\r\n\t// the map's CRS. By default this measures distance in meters.\r\n\tdistance: function (latlng1, latlng2) {\r\n\t\treturn this.options.crs.distance(toLatLng(latlng1), toLatLng(latlng2));\r\n\t},\r\n\r\n\t// @method containerPointToLayerPoint(point: Point): Point\r\n\t// Given a pixel coordinate relative to the map container, returns the corresponding\r\n\t// pixel coordinate relative to the [origin pixel](#map-getpixelorigin).\r\n\tcontainerPointToLayerPoint: function (point) { // (Point)\r\n\t\treturn toPoint(point).subtract(this._getMapPanePos());\r\n\t},\r\n\r\n\t// @method layerPointToContainerPoint(point: Point): Point\r\n\t// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),\r\n\t// returns the corresponding pixel coordinate relative to the map container.\r\n\tlayerPointToContainerPoint: function (point) { // (Point)\r\n\t\treturn toPoint(point).add(this._getMapPanePos());\r\n\t},\r\n\r\n\t// @method containerPointToLatLng(point: Point): LatLng\r\n\t// Given a pixel coordinate relative to the map container, returns\r\n\t// the corresponding geographical coordinate (for the current zoom level).\r\n\tcontainerPointToLatLng: function (point) {\r\n\t\tvar layerPoint = this.containerPointToLayerPoint(toPoint(point));\r\n\t\treturn this.layerPointToLatLng(layerPoint);\r\n\t},\r\n\r\n\t// @method latLngToContainerPoint(latlng: LatLng): Point\r\n\t// Given a geographical coordinate, returns the corresponding pixel coordinate\r\n\t// relative to the map container.\r\n\tlatLngToContainerPoint: function (latlng) {\r\n\t\treturn this.layerPointToContainerPoint(this.latLngToLayerPoint(toLatLng(latlng)));\r\n\t},\r\n\r\n\t// @method mouseEventToContainerPoint(ev: MouseEvent): Point\r\n\t// Given a MouseEvent object, returns the pixel coordinate relative to the\r\n\t// map container where the event took place.\r\n\tmouseEventToContainerPoint: function (e) {\r\n\t\treturn DomEvent.getMousePosition(e, this._container);\r\n\t},\r\n\r\n\t// @method mouseEventToLayerPoint(ev: MouseEvent): Point\r\n\t// Given a MouseEvent object, returns the pixel coordinate relative to\r\n\t// the [origin pixel](#map-getpixelorigin) where the event took place.\r\n\tmouseEventToLayerPoint: function (e) {\r\n\t\treturn this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e));\r\n\t},\r\n\r\n\t// @method mouseEventToLatLng(ev: MouseEvent): LatLng\r\n\t// Given a MouseEvent object, returns geographical coordinate where the\r\n\t// event took place.\r\n\tmouseEventToLatLng: function (e) { // (MouseEvent)\r\n\t\treturn this.layerPointToLatLng(this.mouseEventToLayerPoint(e));\r\n\t},\r\n\r\n\r\n\t// map initialization methods\r\n\r\n\t_initContainer: function (id) {\r\n\t\tvar container = this._container = DomUtil.get(id);\r\n\r\n\t\tif (!container) {\r\n\t\t\tthrow new Error('Map container not found.');\r\n\t\t} else if (container._leaflet_id) {\r\n\t\t\tthrow new Error('Map container is already initialized.');\r\n\t\t}\r\n\r\n\t\tDomEvent.on(container, 'scroll', this._onScroll, this);\r\n\t\tthis._containerId = Util.stamp(container);\r\n\t},\r\n\r\n\t_initLayout: function () {\r\n\t\tvar container = this._container;\r\n\r\n\t\tthis._fadeAnimated = this.options.fadeAnimation && Browser.any3d;\r\n\r\n\t\tDomUtil.addClass(container, 'leaflet-container' +\r\n\t\t\t(Browser.touch ? ' leaflet-touch' : '') +\r\n\t\t\t(Browser.retina ? ' leaflet-retina' : '') +\r\n\t\t\t(Browser.ielt9 ? ' leaflet-oldie' : '') +\r\n\t\t\t(Browser.safari ? ' leaflet-safari' : '') +\r\n\t\t\t(this._fadeAnimated ? ' leaflet-fade-anim' : ''));\r\n\r\n\t\tvar position = DomUtil.getStyle(container, 'position');\r\n\r\n\t\tif (position !== 'absolute' && position !== 'relative' && position !== 'fixed' && position !== 'sticky') {\r\n\t\t\tcontainer.style.position = 'relative';\r\n\t\t}\r\n\r\n\t\tthis._initPanes();\r\n\r\n\t\tif (this._initControlPos) {\r\n\t\t\tthis._initControlPos();\r\n\t\t}\r\n\t},\r\n\r\n\t_initPanes: function () {\r\n\t\tvar panes = this._panes = {};\r\n\t\tthis._paneRenderers = {};\r\n\r\n\t\t// @section\r\n\t\t//\r\n\t\t// Panes are DOM elements used to control the ordering of layers on the map. You\r\n\t\t// can access panes with [`map.getPane`](#map-getpane) or\r\n\t\t// [`map.getPanes`](#map-getpanes) methods. New panes can be created with the\r\n\t\t// [`map.createPane`](#map-createpane) method.\r\n\t\t//\r\n\t\t// Every map has the following default panes that differ only in zIndex.\r\n\t\t//\r\n\t\t// @pane mapPane: HTMLElement = 'auto'\r\n\t\t// Pane that contains all other map panes\r\n\r\n\t\tthis._mapPane = this.createPane('mapPane', this._container);\r\n\t\tDomUtil.setPosition(this._mapPane, new Point(0, 0));\r\n\r\n\t\t// @pane tilePane: HTMLElement = 200\r\n\t\t// Pane for `GridLayer`s and `TileLayer`s\r\n\t\tthis.createPane('tilePane');\r\n\t\t// @pane overlayPane: HTMLElement = 400\r\n\t\t// Pane for vectors (`Path`s, like `Polyline`s and `Polygon`s), `ImageOverlay`s and `VideoOverlay`s\r\n\t\tthis.createPane('overlayPane');\r\n\t\t// @pane shadowPane: HTMLElement = 500\r\n\t\t// Pane for overlay shadows (e.g. `Marker` shadows)\r\n\t\tthis.createPane('shadowPane');\r\n\t\t// @pane markerPane: HTMLElement = 600\r\n\t\t// Pane for `Icon`s of `Marker`s\r\n\t\tthis.createPane('markerPane');\r\n\t\t// @pane tooltipPane: HTMLElement = 650\r\n\t\t// Pane for `Tooltip`s.\r\n\t\tthis.createPane('tooltipPane');\r\n\t\t// @pane popupPane: HTMLElement = 700\r\n\t\t// Pane for `Popup`s.\r\n\t\tthis.createPane('popupPane');\r\n\r\n\t\tif (!this.options.markerZoomAnimation) {\r\n\t\t\tDomUtil.addClass(panes.markerPane, 'leaflet-zoom-hide');\r\n\t\t\tDomUtil.addClass(panes.shadowPane, 'leaflet-zoom-hide');\r\n\t\t}\r\n\t},\r\n\r\n\r\n\t// private methods that modify map state\r\n\r\n\t// @section Map state change events\r\n\t_resetView: function (center, zoom, noMoveStart) {\r\n\t\tDomUtil.setPosition(this._mapPane, new Point(0, 0));\r\n\r\n\t\tvar loading = !this._loaded;\r\n\t\tthis._loaded = true;\r\n\t\tzoom = this._limitZoom(zoom);\r\n\r\n\t\tthis.fire('viewprereset');\r\n\r\n\t\tvar zoomChanged = this._zoom !== zoom;\r\n\t\tthis\r\n\t\t\t._moveStart(zoomChanged, noMoveStart)\r\n\t\t\t._move(center, zoom)\r\n\t\t\t._moveEnd(zoomChanged);\r\n\r\n\t\t// @event viewreset: Event\r\n\t\t// Fired when the map needs to redraw its content (this usually happens\r\n\t\t// on map zoom or load). Very useful for creating custom overlays.\r\n\t\tthis.fire('viewreset');\r\n\r\n\t\t// @event load: Event\r\n\t\t// Fired when the map is initialized (when its center and zoom are set\r\n\t\t// for the first time).\r\n\t\tif (loading) {\r\n\t\t\tthis.fire('load');\r\n\t\t}\r\n\t},\r\n\r\n\t_moveStart: function (zoomChanged, noMoveStart) {\r\n\t\t// @event zoomstart: Event\r\n\t\t// Fired when the map zoom is about to change (e.g. before zoom animation).\r\n\t\t// @event movestart: Event\r\n\t\t// Fired when the view of the map starts changing (e.g. user starts dragging the map).\r\n\t\tif (zoomChanged) {\r\n\t\t\tthis.fire('zoomstart');\r\n\t\t}\r\n\t\tif (!noMoveStart) {\r\n\t\t\tthis.fire('movestart');\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_move: function (center, zoom, data, supressEvent) {\r\n\t\tif (zoom === undefined) {\r\n\t\t\tzoom = this._zoom;\r\n\t\t}\r\n\t\tvar zoomChanged = this._zoom !== zoom;\r\n\r\n\t\tthis._zoom = zoom;\r\n\t\tthis._lastCenter = center;\r\n\t\tthis._pixelOrigin = this._getNewPixelOrigin(center);\r\n\r\n\t\tif (!supressEvent) {\r\n\t\t\t// @event zoom: Event\r\n\t\t\t// Fired repeatedly during any change in zoom level,\r\n\t\t\t// including zoom and fly animations.\r\n\t\t\tif (zoomChanged || (data && data.pinch)) {\t// Always fire 'zoom' if pinching because #3530\r\n\t\t\t\tthis.fire('zoom', data);\r\n\t\t\t}\r\n\r\n\t\t\t// @event move: Event\r\n\t\t\t// Fired repeatedly during any movement of the map,\r\n\t\t\t// including pan and fly animations.\r\n\t\t\tthis.fire('move', data);\r\n\t\t} else if (data && data.pinch) {\t// Always fire 'zoom' if pinching because #3530\r\n\t\t\tthis.fire('zoom', data);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_moveEnd: function (zoomChanged) {\r\n\t\t// @event zoomend: Event\r\n\t\t// Fired when the map zoom changed, after any animations.\r\n\t\tif (zoomChanged) {\r\n\t\t\tthis.fire('zoomend');\r\n\t\t}\r\n\r\n\t\t// @event moveend: Event\r\n\t\t// Fired when the center of the map stops changing\r\n\t\t// (e.g. user stopped dragging the map or after non-centered zoom).\r\n\t\treturn this.fire('moveend');\r\n\t},\r\n\r\n\t_stop: function () {\r\n\t\tUtil.cancelAnimFrame(this._flyToFrame);\r\n\t\tif (this._panAnim) {\r\n\t\t\tthis._panAnim.stop();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_rawPanBy: function (offset) {\r\n\t\tDomUtil.setPosition(this._mapPane, this._getMapPanePos().subtract(offset));\r\n\t},\r\n\r\n\t_getZoomSpan: function () {\r\n\t\treturn this.getMaxZoom() - this.getMinZoom();\r\n\t},\r\n\r\n\t_panInsideMaxBounds: function () {\r\n\t\tif (!this._enforcingBounds) {\r\n\t\t\tthis.panInsideBounds(this.options.maxBounds);\r\n\t\t}\r\n\t},\r\n\r\n\t_checkIfLoaded: function () {\r\n\t\tif (!this._loaded) {\r\n\t\t\tthrow new Error('Set map center and zoom first.');\r\n\t\t}\r\n\t},\r\n\r\n\t// DOM event handling\r\n\r\n\t// @section Interaction events\r\n\t_initEvents: function (remove) {\r\n\t\tthis._targets = {};\r\n\t\tthis._targets[Util.stamp(this._container)] = this;\r\n\r\n\t\tvar onOff = remove ? DomEvent.off : DomEvent.on;\r\n\r\n\t\t// @event click: MouseEvent\r\n\t\t// Fired when the user clicks (or taps) the map.\r\n\t\t// @event dblclick: MouseEvent\r\n\t\t// Fired when the user double-clicks (or double-taps) the map.\r\n\t\t// @event mousedown: MouseEvent\r\n\t\t// Fired when the user pushes the mouse button on the map.\r\n\t\t// @event mouseup: MouseEvent\r\n\t\t// Fired when the user releases the mouse button on the map.\r\n\t\t// @event mouseover: MouseEvent\r\n\t\t// Fired when the mouse enters the map.\r\n\t\t// @event mouseout: MouseEvent\r\n\t\t// Fired when the mouse leaves the map.\r\n\t\t// @event mousemove: MouseEvent\r\n\t\t// Fired while the mouse moves over the map.\r\n\t\t// @event contextmenu: MouseEvent\r\n\t\t// Fired when the user pushes the right mouse button on the map, prevents\r\n\t\t// default browser context menu from showing if there are listeners on\r\n\t\t// this event. Also fired on mobile when the user holds a single touch\r\n\t\t// for a second (also called long press).\r\n\t\t// @event keypress: KeyboardEvent\r\n\t\t// Fired when the user presses a key from the keyboard that produces a character value while the map is focused.\r\n\t\t// @event keydown: KeyboardEvent\r\n\t\t// Fired when the user presses a key from the keyboard while the map is focused. Unlike the `keypress` event,\r\n\t\t// the `keydown` event is fired for keys that produce a character value and for keys\r\n\t\t// that do not produce a character value.\r\n\t\t// @event keyup: KeyboardEvent\r\n\t\t// Fired when the user releases a key from the keyboard while the map is focused.\r\n\t\tonOff(this._container, 'click dblclick mousedown mouseup ' +\r\n\t\t\t'mouseover mouseout mousemove contextmenu keypress keydown keyup', this._handleDOMEvent, this);\r\n\r\n\t\tif (this.options.trackResize) {\r\n\t\t\tonOff(window, 'resize', this._onResize, this);\r\n\t\t}\r\n\r\n\t\tif (Browser.any3d && this.options.transform3DLimit) {\r\n\t\t\t(remove ? this.off : this.on).call(this, 'moveend', this._onMoveEnd);\r\n\t\t}\r\n\t},\r\n\r\n\t_onResize: function () {\r\n\t\tUtil.cancelAnimFrame(this._resizeRequest);\r\n\t\tthis._resizeRequest = Util.requestAnimFrame(\r\n\t\t        function () { this.invalidateSize({debounceMoveend: true}); }, this);\r\n\t},\r\n\r\n\t_onScroll: function () {\r\n\t\tthis._container.scrollTop  = 0;\r\n\t\tthis._container.scrollLeft = 0;\r\n\t},\r\n\r\n\t_onMoveEnd: function () {\r\n\t\tvar pos = this._getMapPanePos();\r\n\t\tif (Math.max(Math.abs(pos.x), Math.abs(pos.y)) >= this.options.transform3DLimit) {\r\n\t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=1203873 but Webkit also have\r\n\t\t\t// a pixel offset on very high values, see: https://jsfiddle.net/dg6r5hhb/\r\n\t\t\tthis._resetView(this.getCenter(), this.getZoom());\r\n\t\t}\r\n\t},\r\n\r\n\t_findEventTargets: function (e, type) {\r\n\t\tvar targets = [],\r\n\t\t    target,\r\n\t\t    isHover = type === 'mouseout' || type === 'mouseover',\r\n\t\t    src = e.target || e.srcElement,\r\n\t\t    dragging = false;\r\n\r\n\t\twhile (src) {\r\n\t\t\ttarget = this._targets[Util.stamp(src)];\r\n\t\t\tif (target && (type === 'click' || type === 'preclick') && this._draggableMoved(target)) {\r\n\t\t\t\t// Prevent firing click after you just dragged an object.\r\n\t\t\t\tdragging = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (target && target.listens(type, true)) {\r\n\t\t\t\tif (isHover && !DomEvent.isExternalTarget(src, e)) { break; }\r\n\t\t\t\ttargets.push(target);\r\n\t\t\t\tif (isHover) { break; }\r\n\t\t\t}\r\n\t\t\tif (src === this._container) { break; }\r\n\t\t\tsrc = src.parentNode;\r\n\t\t}\r\n\t\tif (!targets.length && !dragging && !isHover && this.listens(type, true)) {\r\n\t\t\ttargets = [this];\r\n\t\t}\r\n\t\treturn targets;\r\n\t},\r\n\r\n\t_isClickDisabled: function (el) {\r\n\t\twhile (el && el !== this._container) {\r\n\t\t\tif (el['_leaflet_disable_click']) { return true; }\r\n\t\t\tel = el.parentNode;\r\n\t\t}\r\n\t},\r\n\r\n\t_handleDOMEvent: function (e) {\r\n\t\tvar el = (e.target || e.srcElement);\r\n\t\tif (!this._loaded || el['_leaflet_disable_events'] || e.type === 'click' && this._isClickDisabled(el)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar type = e.type;\r\n\r\n\t\tif (type === 'mousedown') {\r\n\t\t\t// prevents outline when clicking on keyboard-focusable element\r\n\t\t\tDomUtil.preventOutline(el);\r\n\t\t}\r\n\r\n\t\tthis._fireDOMEvent(e, type);\r\n\t},\r\n\r\n\t_mouseEvents: ['click', 'dblclick', 'mouseover', 'mouseout', 'contextmenu'],\r\n\r\n\t_fireDOMEvent: function (e, type, canvasTargets) {\r\n\r\n\t\tif (e.type === 'click') {\r\n\t\t\t// Fire a synthetic 'preclick' event which propagates up (mainly for closing popups).\r\n\t\t\t// @event preclick: MouseEvent\r\n\t\t\t// Fired before mouse click on the map (sometimes useful when you\r\n\t\t\t// want something to happen on click before any existing click\r\n\t\t\t// handlers start running).\r\n\t\t\tvar synth = Util.extend({}, e);\r\n\t\t\tsynth.type = 'preclick';\r\n\t\t\tthis._fireDOMEvent(synth, synth.type, canvasTargets);\r\n\t\t}\r\n\r\n\t\t// Find the layer the event is propagating from and its parents.\r\n\t\tvar targets = this._findEventTargets(e, type);\r\n\r\n\t\tif (canvasTargets) {\r\n\t\t\tvar filtered = []; // pick only targets with listeners\r\n\t\t\tfor (var i = 0; i < canvasTargets.length; i++) {\r\n\t\t\t\tif (canvasTargets[i].listens(type, true)) {\r\n\t\t\t\t\tfiltered.push(canvasTargets[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttargets = filtered.concat(targets);\r\n\t\t}\r\n\r\n\t\tif (!targets.length) { return; }\r\n\r\n\t\tif (type === 'contextmenu') {\r\n\t\t\tDomEvent.preventDefault(e);\r\n\t\t}\r\n\r\n\t\tvar target = targets[0];\r\n\t\tvar data = {\r\n\t\t\toriginalEvent: e\r\n\t\t};\r\n\r\n\t\tif (e.type !== 'keypress' && e.type !== 'keydown' && e.type !== 'keyup') {\r\n\t\t\tvar isMarker = target.getLatLng && (!target._radius || target._radius <= 10);\r\n\t\t\tdata.containerPoint = isMarker ?\r\n\t\t\t\tthis.latLngToContainerPoint(target.getLatLng()) : this.mouseEventToContainerPoint(e);\r\n\t\t\tdata.layerPoint = this.containerPointToLayerPoint(data.containerPoint);\r\n\t\t\tdata.latlng = isMarker ? target.getLatLng() : this.layerPointToLatLng(data.layerPoint);\r\n\t\t}\r\n\r\n\t\tfor (i = 0; i < targets.length; i++) {\r\n\t\t\ttargets[i].fire(type, data, true);\r\n\t\t\tif (data.originalEvent._stopped ||\r\n\t\t\t\t(targets[i].options.bubblingMouseEvents === false && Util.indexOf(this._mouseEvents, type) !== -1)) { return; }\r\n\t\t}\r\n\t},\r\n\r\n\t_draggableMoved: function (obj) {\r\n\t\tobj = obj.dragging && obj.dragging.enabled() ? obj : this;\r\n\t\treturn (obj.dragging && obj.dragging.moved()) || (this.boxZoom && this.boxZoom.moved());\r\n\t},\r\n\r\n\t_clearHandlers: function () {\r\n\t\tfor (var i = 0, len = this._handlers.length; i < len; i++) {\r\n\t\t\tthis._handlers[i].disable();\r\n\t\t}\r\n\t},\r\n\r\n\t// @section Other Methods\r\n\r\n\t// @method whenReady(fn: Function, context?: Object): this\r\n\t// Runs the given function `fn` when the map gets initialized with\r\n\t// a view (center and zoom) and at least one layer, or immediately\r\n\t// if it's already initialized, optionally passing a function context.\r\n\twhenReady: function (callback, context) {\r\n\t\tif (this._loaded) {\r\n\t\t\tcallback.call(context || this, {target: this});\r\n\t\t} else {\r\n\t\t\tthis.on('load', callback, context);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\r\n\t// private methods for getting map state\r\n\r\n\t_getMapPanePos: function () {\r\n\t\treturn DomUtil.getPosition(this._mapPane) || new Point(0, 0);\r\n\t},\r\n\r\n\t_moved: function () {\r\n\t\tvar pos = this._getMapPanePos();\r\n\t\treturn pos && !pos.equals([0, 0]);\r\n\t},\r\n\r\n\t_getTopLeftPoint: function (center, zoom) {\r\n\t\tvar pixelOrigin = center && zoom !== undefined ?\r\n\t\t\tthis._getNewPixelOrigin(center, zoom) :\r\n\t\t\tthis.getPixelOrigin();\r\n\t\treturn pixelOrigin.subtract(this._getMapPanePos());\r\n\t},\r\n\r\n\t_getNewPixelOrigin: function (center, zoom) {\r\n\t\tvar viewHalf = this.getSize()._divideBy(2);\r\n\t\treturn this.project(center, zoom)._subtract(viewHalf)._add(this._getMapPanePos())._round();\r\n\t},\r\n\r\n\t_latLngToNewLayerPoint: function (latlng, zoom, center) {\r\n\t\tvar topLeft = this._getNewPixelOrigin(center, zoom);\r\n\t\treturn this.project(latlng, zoom)._subtract(topLeft);\r\n\t},\r\n\r\n\t_latLngBoundsToNewLayerBounds: function (latLngBounds, zoom, center) {\r\n\t\tvar topLeft = this._getNewPixelOrigin(center, zoom);\r\n\t\treturn toBounds([\r\n\t\t\tthis.project(latLngBounds.getSouthWest(), zoom)._subtract(topLeft),\r\n\t\t\tthis.project(latLngBounds.getNorthWest(), zoom)._subtract(topLeft),\r\n\t\t\tthis.project(latLngBounds.getSouthEast(), zoom)._subtract(topLeft),\r\n\t\t\tthis.project(latLngBounds.getNorthEast(), zoom)._subtract(topLeft)\r\n\t\t]);\r\n\t},\r\n\r\n\t// layer point of the current center\r\n\t_getCenterLayerPoint: function () {\r\n\t\treturn this.containerPointToLayerPoint(this.getSize()._divideBy(2));\r\n\t},\r\n\r\n\t// offset of the specified place to the current center in pixels\r\n\t_getCenterOffset: function (latlng) {\r\n\t\treturn this.latLngToLayerPoint(latlng).subtract(this._getCenterLayerPoint());\r\n\t},\r\n\r\n\t// adjust center for view to get inside bounds\r\n\t_limitCenter: function (center, zoom, bounds) {\r\n\r\n\t\tif (!bounds) { return center; }\r\n\r\n\t\tvar centerPoint = this.project(center, zoom),\r\n\t\t    viewHalf = this.getSize().divideBy(2),\r\n\t\t    viewBounds = new Bounds(centerPoint.subtract(viewHalf), centerPoint.add(viewHalf)),\r\n\t\t    offset = this._getBoundsOffset(viewBounds, bounds, zoom);\r\n\r\n\t\t// If offset is less than a pixel, ignore.\r\n\t\t// This prevents unstable projections from getting into\r\n\t\t// an infinite loop of tiny offsets.\r\n\t\tif (Math.abs(offset.x) <= 1 && Math.abs(offset.y) <= 1) {\r\n\t\t\treturn center;\r\n\t\t}\r\n\r\n\t\treturn this.unproject(centerPoint.add(offset), zoom);\r\n\t},\r\n\r\n\t// adjust offset for view to get inside bounds\r\n\t_limitOffset: function (offset, bounds) {\r\n\t\tif (!bounds) { return offset; }\r\n\r\n\t\tvar viewBounds = this.getPixelBounds(),\r\n\t\t    newBounds = new Bounds(viewBounds.min.add(offset), viewBounds.max.add(offset));\r\n\r\n\t\treturn offset.add(this._getBoundsOffset(newBounds, bounds));\r\n\t},\r\n\r\n\t// returns offset needed for pxBounds to get inside maxBounds at a specified zoom\r\n\t_getBoundsOffset: function (pxBounds, maxBounds, zoom) {\r\n\t\tvar projectedMaxBounds = toBounds(\r\n\t\t        this.project(maxBounds.getNorthEast(), zoom),\r\n\t\t        this.project(maxBounds.getSouthWest(), zoom)\r\n\t\t    ),\r\n\t\t    minOffset = projectedMaxBounds.min.subtract(pxBounds.min),\r\n\t\t    maxOffset = projectedMaxBounds.max.subtract(pxBounds.max),\r\n\r\n\t\t    dx = this._rebound(minOffset.x, -maxOffset.x),\r\n\t\t    dy = this._rebound(minOffset.y, -maxOffset.y);\r\n\r\n\t\treturn new Point(dx, dy);\r\n\t},\r\n\r\n\t_rebound: function (left, right) {\r\n\t\treturn left + right > 0 ?\r\n\t\t\tMath.round(left - right) / 2 :\r\n\t\t\tMath.max(0, Math.ceil(left)) - Math.max(0, Math.floor(right));\r\n\t},\r\n\r\n\t_limitZoom: function (zoom) {\r\n\t\tvar min = this.getMinZoom(),\r\n\t\t    max = this.getMaxZoom(),\r\n\t\t    snap = Browser.any3d ? this.options.zoomSnap : 1;\r\n\t\tif (snap) {\r\n\t\t\tzoom = Math.round(zoom / snap) * snap;\r\n\t\t}\r\n\t\treturn Math.max(min, Math.min(max, zoom));\r\n\t},\r\n\r\n\t_onPanTransitionStep: function () {\r\n\t\tthis.fire('move');\r\n\t},\r\n\r\n\t_onPanTransitionEnd: function () {\r\n\t\tDomUtil.removeClass(this._mapPane, 'leaflet-pan-anim');\r\n\t\tthis.fire('moveend');\r\n\t},\r\n\r\n\t_tryAnimatedPan: function (center, options) {\r\n\t\t// difference between the new and current centers in pixels\r\n\t\tvar offset = this._getCenterOffset(center)._trunc();\r\n\r\n\t\t// don't animate too far unless animate: true specified in options\r\n\t\tif ((options && options.animate) !== true && !this.getSize().contains(offset)) { return false; }\r\n\r\n\t\tthis.panBy(offset, options);\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\t_createAnimProxy: function () {\r\n\r\n\t\tvar proxy = this._proxy = DomUtil.create('div', 'leaflet-proxy leaflet-zoom-animated');\r\n\t\tthis._panes.mapPane.appendChild(proxy);\r\n\r\n\t\tthis.on('zoomanim', function (e) {\r\n\t\t\tvar prop = DomUtil.TRANSFORM,\r\n\t\t\t    transform = this._proxy.style[prop];\r\n\r\n\t\t\tDomUtil.setTransform(this._proxy, this.project(e.center, e.zoom), this.getZoomScale(e.zoom, 1));\r\n\r\n\t\t\t// workaround for case when transform is the same and so transitionend event is not fired\r\n\t\t\tif (transform === this._proxy.style[prop] && this._animatingZoom) {\r\n\t\t\t\tthis._onZoomTransitionEnd();\r\n\t\t\t}\r\n\t\t}, this);\r\n\r\n\t\tthis.on('load moveend', this._animMoveEnd, this);\r\n\r\n\t\tthis._on('unload', this._destroyAnimProxy, this);\r\n\t},\r\n\r\n\t_destroyAnimProxy: function () {\r\n\t\tDomUtil.remove(this._proxy);\r\n\t\tthis.off('load moveend', this._animMoveEnd, this);\r\n\t\tdelete this._proxy;\r\n\t},\r\n\r\n\t_animMoveEnd: function () {\r\n\t\tvar c = this.getCenter(),\r\n\t\t    z = this.getZoom();\r\n\t\tDomUtil.setTransform(this._proxy, this.project(c, z), this.getZoomScale(z, 1));\r\n\t},\r\n\r\n\t_catchTransitionEnd: function (e) {\r\n\t\tif (this._animatingZoom && e.propertyName.indexOf('transform') >= 0) {\r\n\t\t\tthis._onZoomTransitionEnd();\r\n\t\t}\r\n\t},\r\n\r\n\t_nothingToAnimate: function () {\r\n\t\treturn !this._container.getElementsByClassName('leaflet-zoom-animated').length;\r\n\t},\r\n\r\n\t_tryAnimatedZoom: function (center, zoom, options) {\r\n\r\n\t\tif (this._animatingZoom) { return true; }\r\n\r\n\t\toptions = options || {};\r\n\r\n\t\t// don't animate if disabled, not supported or zoom difference is too large\r\n\t\tif (!this._zoomAnimated || options.animate === false || this._nothingToAnimate() ||\r\n\t\t        Math.abs(zoom - this._zoom) > this.options.zoomAnimationThreshold) { return false; }\r\n\r\n\t\t// offset is the pixel coords of the zoom origin relative to the current center\r\n\t\tvar scale = this.getZoomScale(zoom),\r\n\t\t    offset = this._getCenterOffset(center)._divideBy(1 - 1 / scale);\r\n\r\n\t\t// don't animate if the zoom origin isn't within one screen from the current center, unless forced\r\n\t\tif (options.animate !== true && !this.getSize().contains(offset)) { return false; }\r\n\r\n\t\tUtil.requestAnimFrame(function () {\r\n\t\t\tthis\r\n\t\t\t    ._moveStart(true, options.noMoveStart || false)\r\n\t\t\t    ._animateZoom(center, zoom, true);\r\n\t\t}, this);\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\t_animateZoom: function (center, zoom, startAnim, noUpdate) {\r\n\t\tif (!this._mapPane) { return; }\r\n\r\n\t\tif (startAnim) {\r\n\t\t\tthis._animatingZoom = true;\r\n\r\n\t\t\t// remember what center/zoom to set after animation\r\n\t\t\tthis._animateToCenter = center;\r\n\t\t\tthis._animateToZoom = zoom;\r\n\r\n\t\t\tDomUtil.addClass(this._mapPane, 'leaflet-zoom-anim');\r\n\t\t}\r\n\r\n\t\t// @section Other Events\r\n\t\t// @event zoomanim: ZoomAnimEvent\r\n\t\t// Fired at least once per zoom animation. For continuous zoom, like pinch zooming, fired once per frame during zoom.\r\n\t\tthis.fire('zoomanim', {\r\n\t\t\tcenter: center,\r\n\t\t\tzoom: zoom,\r\n\t\t\tnoUpdate: noUpdate\r\n\t\t});\r\n\r\n\t\tif (!this._tempFireZoomEvent) {\r\n\t\t\tthis._tempFireZoomEvent = this._zoom !== this._animateToZoom;\r\n\t\t}\r\n\r\n\t\tthis._move(this._animateToCenter, this._animateToZoom, undefined, true);\r\n\r\n\t\t// Work around webkit not firing 'transitionend', see https://github.com/Leaflet/Leaflet/issues/3689, 2693\r\n\t\tsetTimeout(Util.bind(this._onZoomTransitionEnd, this), 250);\r\n\t},\r\n\r\n\t_onZoomTransitionEnd: function () {\r\n\t\tif (!this._animatingZoom) { return; }\r\n\r\n\t\tif (this._mapPane) {\r\n\t\t\tDomUtil.removeClass(this._mapPane, 'leaflet-zoom-anim');\r\n\t\t}\r\n\r\n\t\tthis._animatingZoom = false;\r\n\r\n\t\tthis._move(this._animateToCenter, this._animateToZoom, undefined, true);\r\n\r\n\t\tif (this._tempFireZoomEvent) {\r\n\t\t\tthis.fire('zoom');\r\n\t\t}\r\n\t\tdelete this._tempFireZoomEvent;\r\n\r\n\t\tthis.fire('move');\r\n\r\n\t\tthis._moveEnd(true);\r\n\t}\r\n});\r\n\r\n// @section\r\n\r\n// @factory L.map(id: String, options?: Map options)\r\n// Instantiates a map object given the DOM ID of a `<div>` element\r\n// and optionally an object literal with `Map options`.\r\n//\r\n// @alternative\r\n// @factory L.map(el: HTMLElement, options?: Map options)\r\n// Instantiates a map object given an instance of a `<div>` HTML element\r\n// and optionally an object literal with `Map options`.\r\nexport function createMap(id, options) {\r\n\treturn new Map(id, options);\r\n}\r\n","\r\nimport {Class} from '../core/Class';\r\nimport {Map} from '../map/Map';\r\nimport * as Util from '../core/Util';\r\nimport * as DomUtil from '../dom/DomUtil';\r\n\r\n/*\r\n * @class Control\r\n * @aka L.Control\r\n * @inherits Class\r\n *\r\n * L.Control is a base class for implementing map controls. Handles positioning.\r\n * All other controls extend from this class.\r\n */\r\n\r\nexport var Control = Class.extend({\r\n\t// @section\r\n\t// @aka Control Options\r\n\toptions: {\r\n\t\t// @option position: String = 'topright'\r\n\t\t// The position of the control (one of the map corners). Possible values are `'topleft'`,\r\n\t\t// `'topright'`, `'bottomleft'` or `'bottomright'`\r\n\t\tposition: 'topright'\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tUtil.setOptions(this, options);\r\n\t},\r\n\r\n\t/* @section\r\n\t * Classes extending L.Control will inherit the following methods:\r\n\t *\r\n\t * @method getPosition: string\r\n\t * Returns the position of the control.\r\n\t */\r\n\tgetPosition: function () {\r\n\t\treturn this.options.position;\r\n\t},\r\n\r\n\t// @method setPosition(position: string): this\r\n\t// Sets the position of the control.\r\n\tsetPosition: function (position) {\r\n\t\tvar map = this._map;\r\n\r\n\t\tif (map) {\r\n\t\t\tmap.removeControl(this);\r\n\t\t}\r\n\r\n\t\tthis.options.position = position;\r\n\r\n\t\tif (map) {\r\n\t\t\tmap.addControl(this);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getContainer: HTMLElement\r\n\t// Returns the HTMLElement that contains the control.\r\n\tgetContainer: function () {\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\t// @method addTo(map: Map): this\r\n\t// Adds the control to the given map.\r\n\taddTo: function (map) {\r\n\t\tthis.remove();\r\n\t\tthis._map = map;\r\n\r\n\t\tvar container = this._container = this.onAdd(map),\r\n\t\t    pos = this.getPosition(),\r\n\t\t    corner = map._controlCorners[pos];\r\n\r\n\t\tDomUtil.addClass(container, 'leaflet-control');\r\n\r\n\t\tif (pos.indexOf('bottom') !== -1) {\r\n\t\t\tcorner.insertBefore(container, corner.firstChild);\r\n\t\t} else {\r\n\t\t\tcorner.appendChild(container);\r\n\t\t}\r\n\r\n\t\tthis._map.on('unload', this.remove, this);\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method remove: this\r\n\t// Removes the control from the map it is currently active on.\r\n\tremove: function () {\r\n\t\tif (!this._map) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tDomUtil.remove(this._container);\r\n\r\n\t\tif (this.onRemove) {\r\n\t\t\tthis.onRemove(this._map);\r\n\t\t}\r\n\r\n\t\tthis._map.off('unload', this.remove, this);\r\n\t\tthis._map = null;\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_refocusOnMap: function (e) {\r\n\t\t// if map exists and event is not a keyboard event\r\n\t\tif (this._map && e && e.screenX > 0 && e.screenY > 0) {\r\n\t\t\tthis._map.getContainer().focus();\r\n\t\t}\r\n\t}\r\n});\r\n\r\nexport var control = function (options) {\r\n\treturn new Control(options);\r\n};\r\n\r\n/* @section Extension methods\r\n * @uninheritable\r\n *\r\n * Every control should extend from `L.Control` and (re-)implement the following methods.\r\n *\r\n * @method onAdd(map: Map): HTMLElement\r\n * Should return the container DOM element for the control and add listeners on relevant map events. Called on [`control.addTo(map)`](#control-addTo).\r\n *\r\n * @method onRemove(map: Map)\r\n * Optional method. Should contain all clean up code that removes the listeners previously added in [`onAdd`](#control-onadd). Called on [`control.remove()`](#control-remove).\r\n */\r\n\r\n/* @namespace Map\r\n * @section Methods for Layers and Controls\r\n */\r\nMap.include({\r\n\t// @method addControl(control: Control): this\r\n\t// Adds the given control to the map\r\n\taddControl: function (control) {\r\n\t\tcontrol.addTo(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeControl(control: Control): this\r\n\t// Removes the given control from the map\r\n\tremoveControl: function (control) {\r\n\t\tcontrol.remove();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initControlPos: function () {\r\n\t\tvar corners = this._controlCorners = {},\r\n\t\t    l = 'leaflet-',\r\n\t\t    container = this._controlContainer =\r\n\t\t            DomUtil.create('div', l + 'control-container', this._container);\r\n\r\n\t\tfunction createCorner(vSide, hSide) {\r\n\t\t\tvar className = l + vSide + ' ' + l + hSide;\r\n\r\n\t\t\tcorners[vSide + hSide] = DomUtil.create('div', className, container);\r\n\t\t}\r\n\r\n\t\tcreateCorner('top', 'left');\r\n\t\tcreateCorner('top', 'right');\r\n\t\tcreateCorner('bottom', 'left');\r\n\t\tcreateCorner('bottom', 'right');\r\n\t},\r\n\r\n\t_clearControlPos: function () {\r\n\t\tfor (var i in this._controlCorners) {\r\n\t\t\tDomUtil.remove(this._controlCorners[i]);\r\n\t\t}\r\n\t\tDomUtil.remove(this._controlContainer);\r\n\t\tdelete this._controlCorners;\r\n\t\tdelete this._controlContainer;\r\n\t}\r\n});\r\n","\r\nimport {Control} from './Control';\r\nimport * as Util from '../core/Util';\r\nimport * as DomEvent from '../dom/DomEvent';\r\nimport * as DomUtil from '../dom/DomUtil';\r\n\r\n/*\r\n * @class Control.Layers\r\n * @aka L.Control.Layers\r\n * @inherits Control\r\n *\r\n * The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the [detailed example](https://leafletjs.com/examples/layers-control/)). Extends `Control`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var baseLayers = {\r\n * \t\"Mapbox\": mapbox,\r\n * \t\"OpenStreetMap\": osm\r\n * };\r\n *\r\n * var overlays = {\r\n * \t\"Marker\": marker,\r\n * \t\"Roads\": roadsLayer\r\n * };\r\n *\r\n * L.control.layers(baseLayers, overlays).addTo(map);\r\n * ```\r\n *\r\n * The `baseLayers` and `overlays` parameters are object literals with layer names as keys and `Layer` objects as values:\r\n *\r\n * ```js\r\n * {\r\n *     \"<someName1>\": layer1,\r\n *     \"<someName2>\": layer2\r\n * }\r\n * ```\r\n *\r\n * The layer names can contain HTML, which allows you to add additional styling to the items:\r\n *\r\n * ```js\r\n * {\"<img src='my-layer-icon' /> <span class='my-layer-item'>My Layer</span>\": myLayer}\r\n * ```\r\n */\r\n\r\nexport var Layers = Control.extend({\r\n\t// @section\r\n\t// @aka Control.Layers options\r\n\toptions: {\r\n\t\t// @option collapsed: Boolean = true\r\n\t\t// If `true`, the control will be collapsed into an icon and expanded on mouse hover, touch, or keyboard activation.\r\n\t\tcollapsed: true,\r\n\t\tposition: 'topright',\r\n\r\n\t\t// @option autoZIndex: Boolean = true\r\n\t\t// If `true`, the control will assign zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off.\r\n\t\tautoZIndex: true,\r\n\r\n\t\t// @option hideSingleBase: Boolean = false\r\n\t\t// If `true`, the base layers in the control will be hidden when there is only one.\r\n\t\thideSingleBase: false,\r\n\r\n\t\t// @option sortLayers: Boolean = false\r\n\t\t// Whether to sort the layers. When `false`, layers will keep the order\r\n\t\t// in which they were added to the control.\r\n\t\tsortLayers: false,\r\n\r\n\t\t// @option sortFunction: Function = *\r\n\t\t// A [compare function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)\r\n\t\t// that will be used for sorting the layers, when `sortLayers` is `true`.\r\n\t\t// The function receives both the `L.Layer` instances and their names, as in\r\n\t\t// `sortFunction(layerA, layerB, nameA, nameB)`.\r\n\t\t// By default, it sorts layers alphabetically by their name.\r\n\t\tsortFunction: function (layerA, layerB, nameA, nameB) {\r\n\t\t\treturn nameA < nameB ? -1 : (nameB < nameA ? 1 : 0);\r\n\t\t}\r\n\t},\r\n\r\n\tinitialize: function (baseLayers, overlays, options) {\r\n\t\tUtil.setOptions(this, options);\r\n\r\n\t\tthis._layerControlInputs = [];\r\n\t\tthis._layers = [];\r\n\t\tthis._lastZIndex = 0;\r\n\t\tthis._handlingClick = false;\r\n\t\tthis._preventClick = false;\r\n\r\n\t\tfor (var i in baseLayers) {\r\n\t\t\tthis._addLayer(baseLayers[i], i);\r\n\t\t}\r\n\r\n\t\tfor (i in overlays) {\r\n\t\t\tthis._addLayer(overlays[i], i, true);\r\n\t\t}\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._initLayout();\r\n\t\tthis._update();\r\n\r\n\t\tthis._map = map;\r\n\t\tmap.on('zoomend', this._checkDisabledLayers, this);\r\n\r\n\t\tfor (var i = 0; i < this._layers.length; i++) {\r\n\t\t\tthis._layers[i].layer.on('add remove', this._onLayerChange, this);\r\n\t\t}\r\n\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\taddTo: function (map) {\r\n\t\tControl.prototype.addTo.call(this, map);\r\n\t\t// Trigger expand after Layers Control has been inserted into DOM so that is now has an actual height.\r\n\t\treturn this._expandIfNotCollapsed();\r\n\t},\r\n\r\n\tonRemove: function () {\r\n\t\tthis._map.off('zoomend', this._checkDisabledLayers, this);\r\n\r\n\t\tfor (var i = 0; i < this._layers.length; i++) {\r\n\t\t\tthis._layers[i].layer.off('add remove', this._onLayerChange, this);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method addBaseLayer(layer: Layer, name: String): this\r\n\t// Adds a base layer (radio button entry) with the given name to the control.\r\n\taddBaseLayer: function (layer, name) {\r\n\t\tthis._addLayer(layer, name);\r\n\t\treturn (this._map) ? this._update() : this;\r\n\t},\r\n\r\n\t// @method addOverlay(layer: Layer, name: String): this\r\n\t// Adds an overlay (checkbox entry) with the given name to the control.\r\n\taddOverlay: function (layer, name) {\r\n\t\tthis._addLayer(layer, name, true);\r\n\t\treturn (this._map) ? this._update() : this;\r\n\t},\r\n\r\n\t// @method removeLayer(layer: Layer): this\r\n\t// Remove the given layer from the control.\r\n\tremoveLayer: function (layer) {\r\n\t\tlayer.off('add remove', this._onLayerChange, this);\r\n\r\n\t\tvar obj = this._getLayer(Util.stamp(layer));\r\n\t\tif (obj) {\r\n\t\t\tthis._layers.splice(this._layers.indexOf(obj), 1);\r\n\t\t}\r\n\t\treturn (this._map) ? this._update() : this;\r\n\t},\r\n\r\n\t// @method expand(): this\r\n\t// Expand the control container if collapsed.\r\n\texpand: function () {\r\n\t\tDomUtil.addClass(this._container, 'leaflet-control-layers-expanded');\r\n\t\tthis._section.style.height = null;\r\n\t\tvar acceptableHeight = this._map.getSize().y - (this._container.offsetTop + 50);\r\n\t\tif (acceptableHeight < this._section.clientHeight) {\r\n\t\t\tDomUtil.addClass(this._section, 'leaflet-control-layers-scrollbar');\r\n\t\t\tthis._section.style.height = acceptableHeight + 'px';\r\n\t\t} else {\r\n\t\t\tDomUtil.removeClass(this._section, 'leaflet-control-layers-scrollbar');\r\n\t\t}\r\n\t\tthis._checkDisabledLayers();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method collapse(): this\r\n\t// Collapse the control container if expanded.\r\n\tcollapse: function () {\r\n\t\tDomUtil.removeClass(this._container, 'leaflet-control-layers-expanded');\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initLayout: function () {\r\n\t\tvar className = 'leaflet-control-layers',\r\n\t\t    container = this._container = DomUtil.create('div', className),\r\n\t\t    collapsed = this.options.collapsed;\r\n\r\n\t\t// makes this work on IE touch devices by stopping it from firing a mouseout event when the touch is released\r\n\t\tcontainer.setAttribute('aria-haspopup', true);\r\n\r\n\t\tDomEvent.disableClickPropagation(container);\r\n\t\tDomEvent.disableScrollPropagation(container);\r\n\r\n\t\tvar section = this._section = DomUtil.create('section', className + '-list');\r\n\r\n\t\tif (collapsed) {\r\n\t\t\tthis._map.on('click', this.collapse, this);\r\n\r\n\t\t\tDomEvent.on(container, {\r\n\t\t\t\tmouseenter: this._expandSafely,\r\n\t\t\t\tmouseleave: this.collapse\r\n\t\t\t}, this);\r\n\t\t}\r\n\r\n\t\tvar link = this._layersLink = DomUtil.create('a', className + '-toggle', container);\r\n\t\tlink.href = '#';\r\n\t\tlink.title = 'Layers';\r\n\t\tlink.setAttribute('role', 'button');\r\n\r\n\t\tDomEvent.on(link, {\r\n\t\t\tkeydown: function (e) {\r\n\t\t\t\tif (e.keyCode === 13) {\r\n\t\t\t\t\tthis._expandSafely();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t// Certain screen readers intercept the key event and instead send a click event\r\n\t\t\tclick: function (e) {\r\n\t\t\t\tDomEvent.preventDefault(e);\r\n\t\t\t\tthis._expandSafely();\r\n\t\t\t}\r\n\t\t}, this);\r\n\r\n\t\tif (!collapsed) {\r\n\t\t\tthis.expand();\r\n\t\t}\r\n\r\n\t\tthis._baseLayersList = DomUtil.create('div', className + '-base', section);\r\n\t\tthis._separator = DomUtil.create('div', className + '-separator', section);\r\n\t\tthis._overlaysList = DomUtil.create('div', className + '-overlays', section);\r\n\r\n\t\tcontainer.appendChild(section);\r\n\t},\r\n\r\n\t_getLayer: function (id) {\r\n\t\tfor (var i = 0; i < this._layers.length; i++) {\r\n\r\n\t\t\tif (this._layers[i] && Util.stamp(this._layers[i].layer) === id) {\r\n\t\t\t\treturn this._layers[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_addLayer: function (layer, name, overlay) {\r\n\t\tif (this._map) {\r\n\t\t\tlayer.on('add remove', this._onLayerChange, this);\r\n\t\t}\r\n\r\n\t\tthis._layers.push({\r\n\t\t\tlayer: layer,\r\n\t\t\tname: name,\r\n\t\t\toverlay: overlay\r\n\t\t});\r\n\r\n\t\tif (this.options.sortLayers) {\r\n\t\t\tthis._layers.sort(Util.bind(function (a, b) {\r\n\t\t\t\treturn this.options.sortFunction(a.layer, b.layer, a.name, b.name);\r\n\t\t\t}, this));\r\n\t\t}\r\n\r\n\t\tif (this.options.autoZIndex && layer.setZIndex) {\r\n\t\t\tthis._lastZIndex++;\r\n\t\t\tlayer.setZIndex(this._lastZIndex);\r\n\t\t}\r\n\r\n\t\tthis._expandIfNotCollapsed();\r\n\t},\r\n\r\n\t_update: function () {\r\n\t\tif (!this._container) { return this; }\r\n\r\n\t\tDomUtil.empty(this._baseLayersList);\r\n\t\tDomUtil.empty(this._overlaysList);\r\n\r\n\t\tthis._layerControlInputs = [];\r\n\t\tvar baseLayersPresent, overlaysPresent, i, obj, baseLayersCount = 0;\r\n\r\n\t\tfor (i = 0; i < this._layers.length; i++) {\r\n\t\t\tobj = this._layers[i];\r\n\t\t\tthis._addItem(obj);\r\n\t\t\toverlaysPresent = overlaysPresent || obj.overlay;\r\n\t\t\tbaseLayersPresent = baseLayersPresent || !obj.overlay;\r\n\t\t\tbaseLayersCount += !obj.overlay ? 1 : 0;\r\n\t\t}\r\n\r\n\t\t// Hide base layers section if there's only one layer.\r\n\t\tif (this.options.hideSingleBase) {\r\n\t\t\tbaseLayersPresent = baseLayersPresent && baseLayersCount > 1;\r\n\t\t\tthis._baseLayersList.style.display = baseLayersPresent ? '' : 'none';\r\n\t\t}\r\n\r\n\t\tthis._separator.style.display = overlaysPresent && baseLayersPresent ? '' : 'none';\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_onLayerChange: function (e) {\r\n\t\tif (!this._handlingClick) {\r\n\t\t\tthis._update();\r\n\t\t}\r\n\r\n\t\tvar obj = this._getLayer(Util.stamp(e.target));\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Layer events\r\n\t\t// @event baselayerchange: LayersControlEvent\r\n\t\t// Fired when the base layer is changed through the [layers control](#control-layers).\r\n\t\t// @event overlayadd: LayersControlEvent\r\n\t\t// Fired when an overlay is selected through the [layers control](#control-layers).\r\n\t\t// @event overlayremove: LayersControlEvent\r\n\t\t// Fired when an overlay is deselected through the [layers control](#control-layers).\r\n\t\t// @namespace Control.Layers\r\n\t\tvar type = obj.overlay ?\r\n\t\t\t(e.type === 'add' ? 'overlayadd' : 'overlayremove') :\r\n\t\t\t(e.type === 'add' ? 'baselayerchange' : null);\r\n\r\n\t\tif (type) {\r\n\t\t\tthis._map.fire(type, obj);\r\n\t\t}\r\n\t},\r\n\r\n\t// IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see https://stackoverflow.com/a/119079)\r\n\t_createRadioElement: function (name, checked) {\r\n\r\n\t\tvar radioHtml = '<input type=\"radio\" class=\"leaflet-control-layers-selector\" name=\"' +\r\n\t\t\t\tname + '\"' + (checked ? ' checked=\"checked\"' : '') + '/>';\r\n\r\n\t\tvar radioFragment = document.createElement('div');\r\n\t\tradioFragment.innerHTML = radioHtml;\r\n\r\n\t\treturn radioFragment.firstChild;\r\n\t},\r\n\r\n\t_addItem: function (obj) {\r\n\t\tvar label = document.createElement('label'),\r\n\t\t    checked = this._map.hasLayer(obj.layer),\r\n\t\t    input;\r\n\r\n\t\tif (obj.overlay) {\r\n\t\t\tinput = document.createElement('input');\r\n\t\t\tinput.type = 'checkbox';\r\n\t\t\tinput.className = 'leaflet-control-layers-selector';\r\n\t\t\tinput.defaultChecked = checked;\r\n\t\t} else {\r\n\t\t\tinput = this._createRadioElement('leaflet-base-layers_' + Util.stamp(this), checked);\r\n\t\t}\r\n\r\n\t\tthis._layerControlInputs.push(input);\r\n\t\tinput.layerId = Util.stamp(obj.layer);\r\n\r\n\t\tDomEvent.on(input, 'click', this._onInputClick, this);\r\n\r\n\t\tvar name = document.createElement('span');\r\n\t\tname.innerHTML = ' ' + obj.name;\r\n\r\n\t\t// Helps from preventing layer control flicker when checkboxes are disabled\r\n\t\t// https://github.com/Leaflet/Leaflet/issues/2771\r\n\t\tvar holder = document.createElement('span');\r\n\r\n\t\tlabel.appendChild(holder);\r\n\t\tholder.appendChild(input);\r\n\t\tholder.appendChild(name);\r\n\r\n\t\tvar container = obj.overlay ? this._overlaysList : this._baseLayersList;\r\n\t\tcontainer.appendChild(label);\r\n\r\n\t\tthis._checkDisabledLayers();\r\n\t\treturn label;\r\n\t},\r\n\r\n\t_onInputClick: function () {\r\n\t\t// expanding the control on mobile with a click can cause adding a layer - we don't want this\r\n\t\tif (this._preventClick) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar inputs = this._layerControlInputs,\r\n\t\t    input, layer;\r\n\t\tvar addedLayers = [],\r\n\t\t    removedLayers = [];\r\n\r\n\t\tthis._handlingClick = true;\r\n\r\n\t\tfor (var i = inputs.length - 1; i >= 0; i--) {\r\n\t\t\tinput = inputs[i];\r\n\t\t\tlayer = this._getLayer(input.layerId).layer;\r\n\r\n\t\t\tif (input.checked) {\r\n\t\t\t\taddedLayers.push(layer);\r\n\t\t\t} else if (!input.checked) {\r\n\t\t\t\tremovedLayers.push(layer);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Bugfix issue 2318: Should remove all old layers before readding new ones\r\n\t\tfor (i = 0; i < removedLayers.length; i++) {\r\n\t\t\tif (this._map.hasLayer(removedLayers[i])) {\r\n\t\t\t\tthis._map.removeLayer(removedLayers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (i = 0; i < addedLayers.length; i++) {\r\n\t\t\tif (!this._map.hasLayer(addedLayers[i])) {\r\n\t\t\t\tthis._map.addLayer(addedLayers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._handlingClick = false;\r\n\r\n\t\tthis._refocusOnMap();\r\n\t},\r\n\r\n\t_checkDisabledLayers: function () {\r\n\t\tvar inputs = this._layerControlInputs,\r\n\t\t    input,\r\n\t\t    layer,\r\n\t\t    zoom = this._map.getZoom();\r\n\r\n\t\tfor (var i = inputs.length - 1; i >= 0; i--) {\r\n\t\t\tinput = inputs[i];\r\n\t\t\tlayer = this._getLayer(input.layerId).layer;\r\n\t\t\tinput.disabled = (layer.options.minZoom !== undefined && zoom < layer.options.minZoom) ||\r\n\t\t\t                 (layer.options.maxZoom !== undefined && zoom > layer.options.maxZoom);\r\n\r\n\t\t}\r\n\t},\r\n\r\n\t_expandIfNotCollapsed: function () {\r\n\t\tif (this._map && !this.options.collapsed) {\r\n\t\t\tthis.expand();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_expandSafely: function () {\r\n\t\tvar section = this._section;\r\n\t\tthis._preventClick = true;\r\n\t\tDomEvent.on(section, 'click', DomEvent.preventDefault);\r\n\t\tthis.expand();\r\n\t\tvar that = this;\r\n\t\tsetTimeout(function () {\r\n\t\t\tDomEvent.off(section, 'click', DomEvent.preventDefault);\r\n\t\t\tthat._preventClick = false;\r\n\t\t});\r\n\t}\r\n\r\n});\r\n\r\n\r\n// @factory L.control.layers(baselayers?: Object, overlays?: Object, options?: Control.Layers options)\r\n// Creates a layers control with the given layers. Base layers will be switched with radio buttons, while overlays will be switched with checkboxes. Note that all base layers should be passed in the base layers object, but only one should be added to the map during map instantiation.\r\nexport var layers = function (baseLayers, overlays, options) {\r\n\treturn new Layers(baseLayers, overlays, options);\r\n};\r\n","\r\nimport {Control} from './Control';\r\nimport {Map} from '../map/Map';\r\nimport * as DomUtil from '../dom/DomUtil';\r\nimport * as DomEvent from '../dom/DomEvent';\r\n\r\n/*\r\n * @class Control.Zoom\r\n * @aka L.Control.Zoom\r\n * @inherits Control\r\n *\r\n * A basic zoom control with two buttons (zoom in and zoom out). It is put on the map by default unless you set its [`zoomControl` option](#map-zoomcontrol) to `false`. Extends `Control`.\r\n */\r\n\r\nexport var Zoom = Control.extend({\r\n\t// @section\r\n\t// @aka Control.Zoom options\r\n\toptions: {\r\n\t\tposition: 'topleft',\r\n\r\n\t\t// @option zoomInText: String = '<span aria-hidden=\"true\">+</span>'\r\n\t\t// The text set on the 'zoom in' button.\r\n\t\tzoomInText: '<span aria-hidden=\"true\">+</span>',\r\n\r\n\t\t// @option zoomInTitle: String = 'Zoom in'\r\n\t\t// The title set on the 'zoom in' button.\r\n\t\tzoomInTitle: 'Zoom in',\r\n\r\n\t\t// @option zoomOutText: String = '<span aria-hidden=\"true\">&#x2212;</span>'\r\n\t\t// The text set on the 'zoom out' button.\r\n\t\tzoomOutText: '<span aria-hidden=\"true\">&#x2212;</span>',\r\n\r\n\t\t// @option zoomOutTitle: String = 'Zoom out'\r\n\t\t// The title set on the 'zoom out' button.\r\n\t\tzoomOutTitle: 'Zoom out'\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tvar zoomName = 'leaflet-control-zoom',\r\n\t\t    container = DomUtil.create('div', zoomName + ' leaflet-bar'),\r\n\t\t    options = this.options;\r\n\r\n\t\tthis._zoomInButton  = this._createButton(options.zoomInText, options.zoomInTitle,\r\n\t\t        zoomName + '-in',  container, this._zoomIn);\r\n\t\tthis._zoomOutButton = this._createButton(options.zoomOutText, options.zoomOutTitle,\r\n\t\t        zoomName + '-out', container, this._zoomOut);\r\n\r\n\t\tthis._updateDisabled();\r\n\t\tmap.on('zoomend zoomlevelschange', this._updateDisabled, this);\r\n\r\n\t\treturn container;\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tmap.off('zoomend zoomlevelschange', this._updateDisabled, this);\r\n\t},\r\n\r\n\tdisable: function () {\r\n\t\tthis._disabled = true;\r\n\t\tthis._updateDisabled();\r\n\t\treturn this;\r\n\t},\r\n\r\n\tenable: function () {\r\n\t\tthis._disabled = false;\r\n\t\tthis._updateDisabled();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_zoomIn: function (e) {\r\n\t\tif (!this._disabled && this._map._zoom < this._map.getMaxZoom()) {\r\n\t\t\tthis._map.zoomIn(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));\r\n\t\t}\r\n\t},\r\n\r\n\t_zoomOut: function (e) {\r\n\t\tif (!this._disabled && this._map._zoom > this._map.getMinZoom()) {\r\n\t\t\tthis._map.zoomOut(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));\r\n\t\t}\r\n\t},\r\n\r\n\t_createButton: function (html, title, className, container, fn) {\r\n\t\tvar link = DomUtil.create('a', className, container);\r\n\t\tlink.innerHTML = html;\r\n\t\tlink.href = '#';\r\n\t\tlink.title = title;\r\n\r\n\t\t/*\r\n\t\t * Will force screen readers like VoiceOver to read this as \"Zoom in - button\"\r\n\t\t */\r\n\t\tlink.setAttribute('role', 'button');\r\n\t\tlink.setAttribute('aria-label', title);\r\n\r\n\t\tDomEvent.disableClickPropagation(link);\r\n\t\tDomEvent.on(link, 'click', DomEvent.stop);\r\n\t\tDomEvent.on(link, 'click', fn, this);\r\n\t\tDomEvent.on(link, 'click', this._refocusOnMap, this);\r\n\r\n\t\treturn link;\r\n\t},\r\n\r\n\t_updateDisabled: function () {\r\n\t\tvar map = this._map,\r\n\t\t    className = 'leaflet-disabled';\r\n\r\n\t\tDomUtil.removeClass(this._zoomInButton, className);\r\n\t\tDomUtil.removeClass(this._zoomOutButton, className);\r\n\t\tthis._zoomInButton.setAttribute('aria-disabled', 'false');\r\n\t\tthis._zoomOutButton.setAttribute('aria-disabled', 'false');\r\n\r\n\t\tif (this._disabled || map._zoom === map.getMinZoom()) {\r\n\t\t\tDomUtil.addClass(this._zoomOutButton, className);\r\n\t\t\tthis._zoomOutButton.setAttribute('aria-disabled', 'true');\r\n\t\t}\r\n\t\tif (this._disabled || map._zoom === map.getMaxZoom()) {\r\n\t\t\tDomUtil.addClass(this._zoomInButton, className);\r\n\t\t\tthis._zoomInButton.setAttribute('aria-disabled', 'true');\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// @namespace Map\r\n// @section Control options\r\n// @option zoomControl: Boolean = true\r\n// Whether a [zoom control](#control-zoom) is added to the map by default.\r\nMap.mergeOptions({\r\n\tzoomControl: true\r\n});\r\n\r\nMap.addInitHook(function () {\r\n\tif (this.options.zoomControl) {\r\n\t\t// @section Controls\r\n\t\t// @property zoomControl: Control.Zoom\r\n\t\t// The default zoom control (only available if the\r\n\t\t// [`zoomControl` option](#map-zoomcontrol) was `true` when creating the map).\r\n\t\tthis.zoomControl = new Zoom();\r\n\t\tthis.addControl(this.zoomControl);\r\n\t}\r\n});\r\n\r\n// @namespace Control.Zoom\r\n// @factory L.control.zoom(options: Control.Zoom options)\r\n// Creates a zoom control\r\nexport var zoom = function (options) {\r\n\treturn new Zoom(options);\r\n};\r\n","\nimport {Control} from './Control';\nimport * as DomUtil from '../dom/DomUtil';\n\n/*\n * @class Control.Scale\n * @aka L.Control.Scale\n * @inherits Control\n *\n * A simple scale control that shows the scale of the current center of screen in metric (m/km) and imperial (mi/ft) systems. Extends `Control`.\n *\n * @example\n *\n * ```js\n * L.control.scale().addTo(map);\n * ```\n */\n\nexport var Scale = Control.extend({\n\t// @section\n\t// @aka Control.Scale options\n\toptions: {\n\t\tposition: 'bottomleft',\n\n\t\t// @option maxWidth: Number = 100\n\t\t// Maximum width of the control in pixels. The width is set dynamically to show round values (e.g. 100, 200, 500).\n\t\tmaxWidth: 100,\n\n\t\t// @option metric: Boolean = True\n\t\t// Whether to show the metric scale line (m/km).\n\t\tmetric: true,\n\n\t\t// @option imperial: Boolean = True\n\t\t// Whether to show the imperial scale line (mi/ft).\n\t\timperial: true\n\n\t\t// @option updateWhenIdle: Boolean = false\n\t\t// If `true`, the control is updated on [`moveend`](#map-moveend), otherwise it's always up-to-date (updated on [`move`](#map-move)).\n\t},\n\n\tonAdd: function (map) {\n\t\tvar className = 'leaflet-control-scale',\n\t\t    container = DomUtil.create('div', className),\n\t\t    options = this.options;\n\n\t\tthis._addScales(options, className + '-line', container);\n\n\t\tmap.on(options.updateWhenIdle ? 'moveend' : 'move', this._update, this);\n\t\tmap.whenReady(this._update, this);\n\n\t\treturn container;\n\t},\n\n\tonRemove: function (map) {\n\t\tmap.off(this.options.updateWhenIdle ? 'moveend' : 'move', this._update, this);\n\t},\n\n\t_addScales: function (options, className, container) {\n\t\tif (options.metric) {\n\t\t\tthis._mScale = DomUtil.create('div', className, container);\n\t\t}\n\t\tif (options.imperial) {\n\t\t\tthis._iScale = DomUtil.create('div', className, container);\n\t\t}\n\t},\n\n\t_update: function () {\n\t\tvar map = this._map,\n\t\t    y = map.getSize().y / 2;\n\n\t\tvar maxMeters = map.distance(\n\t\t\tmap.containerPointToLatLng([0, y]),\n\t\t\tmap.containerPointToLatLng([this.options.maxWidth, y]));\n\n\t\tthis._updateScales(maxMeters);\n\t},\n\n\t_updateScales: function (maxMeters) {\n\t\tif (this.options.metric && maxMeters) {\n\t\t\tthis._updateMetric(maxMeters);\n\t\t}\n\t\tif (this.options.imperial && maxMeters) {\n\t\t\tthis._updateImperial(maxMeters);\n\t\t}\n\t},\n\n\t_updateMetric: function (maxMeters) {\n\t\tvar meters = this._getRoundNum(maxMeters),\n\t\t    label = meters < 1000 ? meters + ' m' : (meters / 1000) + ' km';\n\n\t\tthis._updateScale(this._mScale, label, meters / maxMeters);\n\t},\n\n\t_updateImperial: function (maxMeters) {\n\t\tvar maxFeet = maxMeters * 3.2808399,\n\t\t    maxMiles, miles, feet;\n\n\t\tif (maxFeet > 5280) {\n\t\t\tmaxMiles = maxFeet / 5280;\n\t\t\tmiles = this._getRoundNum(maxMiles);\n\t\t\tthis._updateScale(this._iScale, miles + ' mi', miles / maxMiles);\n\n\t\t} else {\n\t\t\tfeet = this._getRoundNum(maxFeet);\n\t\t\tthis._updateScale(this._iScale, feet + ' ft', feet / maxFeet);\n\t\t}\n\t},\n\n\t_updateScale: function (scale, text, ratio) {\n\t\tscale.style.width = Math.round(this.options.maxWidth * ratio) + 'px';\n\t\tscale.innerHTML = text;\n\t},\n\n\t_getRoundNum: function (num) {\n\t\tvar pow10 = Math.pow(10, (Math.floor(num) + '').length - 1),\n\t\t    d = num / pow10;\n\n\t\td = d >= 10 ? 10 :\n\t\t    d >= 5 ? 5 :\n\t\t    d >= 3 ? 3 :\n\t\t    d >= 2 ? 2 : 1;\n\n\t\treturn pow10 * d;\n\t}\n});\n\n\n// @factory L.control.scale(options?: Control.Scale options)\n// Creates an scale control with the given options.\nexport var scale = function (options) {\n\treturn new Scale(options);\n};\n","\r\nimport {Control} from './Control';\r\nimport {Map} from '../map/Map';\r\nimport * as Util from '../core/Util';\r\nimport * as DomEvent from '../dom/DomEvent';\r\nimport * as DomUtil from '../dom/DomUtil';\r\nimport Browser from '../core/Browser';\r\n\r\nvar ukrainianFlag = '<svg aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" class=\"leaflet-attribution-flag\"><path fill=\"#4C7BE1\" d=\"M0 0h12v4H0z\"/><path fill=\"#FFD500\" d=\"M0 4h12v3H0z\"/><path fill=\"#E0BC00\" d=\"M0 7h12v1H0z\"/></svg>';\r\n\r\n\r\n/*\r\n * @class Control.Attribution\r\n * @aka L.Control.Attribution\r\n * @inherits Control\r\n *\r\n * The attribution control allows you to display attribution data in a small text box on a map. It is put on the map by default unless you set its [`attributionControl` option](#map-attributioncontrol) to `false`, and it fetches attribution texts from layers with the [`getAttribution` method](#layer-getattribution) automatically. Extends Control.\r\n */\r\n\r\nexport var Attribution = Control.extend({\r\n\t// @section\r\n\t// @aka Control.Attribution options\r\n\toptions: {\r\n\t\tposition: 'bottomright',\r\n\r\n\t\t// @option prefix: String|false = 'Leaflet'\r\n\t\t// The HTML text shown before the attributions. Pass `false` to disable.\r\n\t\tprefix: '<a href=\"https://leafletjs.com\" title=\"A JavaScript library for interactive maps\">' + (Browser.inlineSvg ? ukrainianFlag + ' ' : '') + 'Leaflet</a>'\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tUtil.setOptions(this, options);\r\n\r\n\t\tthis._attributions = {};\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tmap.attributionControl = this;\r\n\t\tthis._container = DomUtil.create('div', 'leaflet-control-attribution');\r\n\t\tDomEvent.disableClickPropagation(this._container);\r\n\r\n\t\t// TODO ugly, refactor\r\n\t\tfor (var i in map._layers) {\r\n\t\t\tif (map._layers[i].getAttribution) {\r\n\t\t\t\tthis.addAttribution(map._layers[i].getAttribution());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._update();\r\n\r\n\t\tmap.on('layeradd', this._addAttribution, this);\r\n\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tmap.off('layeradd', this._addAttribution, this);\r\n\t},\r\n\r\n\t_addAttribution: function (ev) {\r\n\t\tif (ev.layer.getAttribution) {\r\n\t\t\tthis.addAttribution(ev.layer.getAttribution());\r\n\t\t\tev.layer.once('remove', function () {\r\n\t\t\t\tthis.removeAttribution(ev.layer.getAttribution());\r\n\t\t\t}, this);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method setPrefix(prefix: String|false): this\r\n\t// The HTML text shown before the attributions. Pass `false` to disable.\r\n\tsetPrefix: function (prefix) {\r\n\t\tthis.options.prefix = prefix;\r\n\t\tthis._update();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method addAttribution(text: String): this\r\n\t// Adds an attribution text (e.g. `'&copy; OpenStreetMap contributors'`).\r\n\taddAttribution: function (text) {\r\n\t\tif (!text) { return this; }\r\n\r\n\t\tif (!this._attributions[text]) {\r\n\t\t\tthis._attributions[text] = 0;\r\n\t\t}\r\n\t\tthis._attributions[text]++;\r\n\r\n\t\tthis._update();\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeAttribution(text: String): this\r\n\t// Removes an attribution text.\r\n\tremoveAttribution: function (text) {\r\n\t\tif (!text) { return this; }\r\n\r\n\t\tif (this._attributions[text]) {\r\n\t\t\tthis._attributions[text]--;\r\n\t\t\tthis._update();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_update: function () {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tvar attribs = [];\r\n\r\n\t\tfor (var i in this._attributions) {\r\n\t\t\tif (this._attributions[i]) {\r\n\t\t\t\tattribs.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar prefixAndAttribs = [];\r\n\r\n\t\tif (this.options.prefix) {\r\n\t\t\tprefixAndAttribs.push(this.options.prefix);\r\n\t\t}\r\n\t\tif (attribs.length) {\r\n\t\t\tprefixAndAttribs.push(attribs.join(', '));\r\n\t\t}\r\n\r\n\t\tthis._container.innerHTML = prefixAndAttribs.join(' <span aria-hidden=\"true\">|</span> ');\r\n\t}\r\n});\r\n\r\n// @namespace Map\r\n// @section Control options\r\n// @option attributionControl: Boolean = true\r\n// Whether a [attribution control](#control-attribution) is added to the map by default.\r\nMap.mergeOptions({\r\n\tattributionControl: true\r\n});\r\n\r\nMap.addInitHook(function () {\r\n\tif (this.options.attributionControl) {\r\n\t\tnew Attribution().addTo(this);\r\n\t}\r\n});\r\n\r\n// @namespace Control.Attribution\r\n// @factory L.control.attribution(options: Control.Attribution options)\r\n// Creates an attribution control.\r\nexport var attribution = function (options) {\r\n\treturn new Attribution(options);\r\n};\r\n","import {Control, control} from './Control';\nimport {Layers, layers} from './Control.Layers';\nimport {Zoom, zoom} from './Control.Zoom';\nimport {Scale, scale} from './Control.Scale';\nimport {Attribution, attribution} from './Control.Attribution';\n\nControl.Layers = Layers;\nControl.Zoom = Zoom;\nControl.Scale = Scale;\nControl.Attribution = Attribution;\n\ncontrol.layers = layers;\ncontrol.zoom = zoom;\ncontrol.scale = scale;\ncontrol.attribution = attribution;\n\nexport {Control, control};\n","import {Class} from './Class';\n\n/*\n\tL.Handler is a base class for handler classes that are used internally to inject\n\tinteraction features like dragging to classes like Map and Marker.\n*/\n\n// @class Handler\n// @aka L.Handler\n// Abstract class for map interaction handlers\n\nexport var Handler = Class.extend({\n\tinitialize: function (map) {\n\t\tthis._map = map;\n\t},\n\n\t// @method enable(): this\n\t// Enables the handler\n\tenable: function () {\n\t\tif (this._enabled) { return this; }\n\n\t\tthis._enabled = true;\n\t\tthis.addHooks();\n\t\treturn this;\n\t},\n\n\t// @method disable(): this\n\t// Disables the handler\n\tdisable: function () {\n\t\tif (!this._enabled) { return this; }\n\n\t\tthis._enabled = false;\n\t\tthis.removeHooks();\n\t\treturn this;\n\t},\n\n\t// @method enabled(): Boolean\n\t// Returns `true` if the handler is enabled\n\tenabled: function () {\n\t\treturn !!this._enabled;\n\t}\n\n\t// @section Extension methods\n\t// Classes inheriting from `Handler` must implement the two following methods:\n\t// @method addHooks()\n\t// Called when the handler is enabled, should add event hooks.\n\t// @method removeHooks()\n\t// Called when the handler is disabled, should remove the event hooks added previously.\n});\n\n// @section There is static function which can be called without instantiating L.Handler:\n// @function addTo(map: Map, name: String): this\n// Adds a new Handler to the given map with the given name.\nHandler.addTo = function (map, name) {\n\tmap.addHandler(name, this);\n\treturn this;\n};\n","import Browser from './Browser';\nexport {Browser};\n\nexport {Class} from './Class';\n\nimport {Evented} from './Events';\nimport {Events} from './Events';\nexport {Evented};\nexport var Mixin = {Events: Events};\n\nexport {Handler} from './Handler';\n\nimport * as Util from './Util';\nexport {Util};\nexport {extend, bind, stamp, setOptions} from './Util';\n","import {Evented} from '../core/Events';\r\nimport Browser from '../core/Browser';\r\nimport * as DomEvent from './DomEvent';\r\nimport * as DomUtil from './DomUtil';\r\nimport * as Util from '../core/Util';\r\nimport {Point} from '../geometry/Point';\r\n\r\n/*\r\n * @class Draggable\r\n * @aka L.Draggable\r\n * @inherits Evented\r\n *\r\n * A class for making DOM elements draggable (including touch support).\r\n * Used internally for map and marker dragging. Only works for elements\r\n * that were positioned with [`L.DomUtil.setPosition`](#domutil-setposition).\r\n *\r\n * @example\r\n * ```js\r\n * var draggable = new L.Draggable(elementToDrag);\r\n * draggable.enable();\r\n * ```\r\n */\r\n\r\nvar START = Browser.touch ? 'touchstart mousedown' : 'mousedown';\r\n\r\nexport var Draggable = Evented.extend({\r\n\r\n\toptions: {\r\n\t\t// @section\r\n\t\t// @aka Draggable options\r\n\t\t// @option clickTolerance: Number = 3\r\n\t\t// The max number of pixels a user can shift the mouse pointer during a click\r\n\t\t// for it to be considered a valid click (as opposed to a mouse drag).\r\n\t\tclickTolerance: 3\r\n\t},\r\n\r\n\t// @constructor L.Draggable(el: HTMLElement, dragHandle?: HTMLElement, preventOutline?: Boolean, options?: Draggable options)\r\n\t// Creates a `Draggable` object for moving `el` when you start dragging the `dragHandle` element (equals `el` itself by default).\r\n\tinitialize: function (element, dragStartTarget, preventOutline, options) {\r\n\t\tUtil.setOptions(this, options);\r\n\r\n\t\tthis._element = element;\r\n\t\tthis._dragStartTarget = dragStartTarget || element;\r\n\t\tthis._preventOutline = preventOutline;\r\n\t},\r\n\r\n\t// @method enable()\r\n\t// Enables the dragging ability\r\n\tenable: function () {\r\n\t\tif (this._enabled) { return; }\r\n\r\n\t\tDomEvent.on(this._dragStartTarget, START, this._onDown, this);\r\n\r\n\t\tthis._enabled = true;\r\n\t},\r\n\r\n\t// @method disable()\r\n\t// Disables the dragging ability\r\n\tdisable: function () {\r\n\t\tif (!this._enabled) { return; }\r\n\r\n\t\t// If we're currently dragging this draggable,\r\n\t\t// disabling it counts as first ending the drag.\r\n\t\tif (Draggable._dragging === this) {\r\n\t\t\tthis.finishDrag(true);\r\n\t\t}\r\n\r\n\t\tDomEvent.off(this._dragStartTarget, START, this._onDown, this);\r\n\r\n\t\tthis._enabled = false;\r\n\t\tthis._moved = false;\r\n\t},\r\n\r\n\t_onDown: function (e) {\r\n\t\t// Ignore the event if disabled; this happens in IE11\r\n\t\t// under some circumstances, see #3666.\r\n\t\tif (!this._enabled) { return; }\r\n\r\n\t\tthis._moved = false;\r\n\r\n\t\tif (DomUtil.hasClass(this._element, 'leaflet-zoom-anim')) { return; }\r\n\r\n\t\tif (e.touches && e.touches.length !== 1) {\r\n\t\t\t// Finish dragging to avoid conflict with touchZoom\r\n\t\t\tif (Draggable._dragging === this) {\r\n\t\t\t\tthis.finishDrag();\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (Draggable._dragging || e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches)) { return; }\r\n\t\tDraggable._dragging = this;  // Prevent dragging multiple objects at once.\r\n\r\n\t\tif (this._preventOutline) {\r\n\t\t\tDomUtil.preventOutline(this._element);\r\n\t\t}\r\n\r\n\t\tDomUtil.disableImageDrag();\r\n\t\tDomUtil.disableTextSelection();\r\n\r\n\t\tif (this._moving) { return; }\r\n\r\n\t\t// @event down: Event\r\n\t\t// Fired when a drag is about to start.\r\n\t\tthis.fire('down');\r\n\r\n\t\tvar first = e.touches ? e.touches[0] : e,\r\n\t\t    sizedParent = DomUtil.getSizedParentNode(this._element);\r\n\r\n\t\tthis._startPoint = new Point(first.clientX, first.clientY);\r\n\t\tthis._startPos = DomUtil.getPosition(this._element);\r\n\r\n\t\t// Cache the scale, so that we can continuously compensate for it during drag (_onMove).\r\n\t\tthis._parentScale = DomUtil.getScale(sizedParent);\r\n\r\n\t\tvar mouseevent = e.type === 'mousedown';\r\n\t\tDomEvent.on(document, mouseevent ? 'mousemove' : 'touchmove', this._onMove, this);\r\n\t\tDomEvent.on(document, mouseevent ? 'mouseup' : 'touchend touchcancel', this._onUp, this);\r\n\t},\r\n\r\n\t_onMove: function (e) {\r\n\t\t// Ignore the event if disabled; this happens in IE11\r\n\t\t// under some circumstances, see #3666.\r\n\t\tif (!this._enabled) { return; }\r\n\r\n\t\tif (e.touches && e.touches.length > 1) {\r\n\t\t\tthis._moved = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar first = (e.touches && e.touches.length === 1 ? e.touches[0] : e),\r\n\t\t    offset = new Point(first.clientX, first.clientY)._subtract(this._startPoint);\r\n\r\n\t\tif (!offset.x && !offset.y) { return; }\r\n\t\tif (Math.abs(offset.x) + Math.abs(offset.y) < this.options.clickTolerance) { return; }\r\n\r\n\t\t// We assume that the parent container's position, border and scale do not change for the duration of the drag.\r\n\t\t// Therefore there is no need to account for the position and border (they are eliminated by the subtraction)\r\n\t\t// and we can use the cached value for the scale.\r\n\t\toffset.x /= this._parentScale.x;\r\n\t\toffset.y /= this._parentScale.y;\r\n\r\n\t\tDomEvent.preventDefault(e);\r\n\r\n\t\tif (!this._moved) {\r\n\t\t\t// @event dragstart: Event\r\n\t\t\t// Fired when a drag starts\r\n\t\t\tthis.fire('dragstart');\r\n\r\n\t\t\tthis._moved = true;\r\n\r\n\t\t\tDomUtil.addClass(document.body, 'leaflet-dragging');\r\n\r\n\t\t\tthis._lastTarget = e.target || e.srcElement;\r\n\t\t\t// IE and Edge do not give the <use> element, so fetch it\r\n\t\t\t// if necessary\r\n\t\t\tif (window.SVGElementInstance && this._lastTarget instanceof window.SVGElementInstance) {\r\n\t\t\t\tthis._lastTarget = this._lastTarget.correspondingUseElement;\r\n\t\t\t}\r\n\t\t\tDomUtil.addClass(this._lastTarget, 'leaflet-drag-target');\r\n\t\t}\r\n\r\n\t\tthis._newPos = this._startPos.add(offset);\r\n\t\tthis._moving = true;\r\n\r\n\t\tthis._lastEvent = e;\r\n\t\tthis._updatePosition();\r\n\t},\r\n\r\n\t_updatePosition: function () {\r\n\t\tvar e = {originalEvent: this._lastEvent};\r\n\r\n\t\t// @event predrag: Event\r\n\t\t// Fired continuously during dragging *before* each corresponding\r\n\t\t// update of the element's position.\r\n\t\tthis.fire('predrag', e);\r\n\t\tDomUtil.setPosition(this._element, this._newPos);\r\n\r\n\t\t// @event drag: Event\r\n\t\t// Fired continuously during dragging.\r\n\t\tthis.fire('drag', e);\r\n\t},\r\n\r\n\t_onUp: function () {\r\n\t\t// Ignore the event if disabled; this happens in IE11\r\n\t\t// under some circumstances, see #3666.\r\n\t\tif (!this._enabled) { return; }\r\n\t\tthis.finishDrag();\r\n\t},\r\n\r\n\tfinishDrag: function (noInertia) {\r\n\t\tDomUtil.removeClass(document.body, 'leaflet-dragging');\r\n\r\n\t\tif (this._lastTarget) {\r\n\t\t\tDomUtil.removeClass(this._lastTarget, 'leaflet-drag-target');\r\n\t\t\tthis._lastTarget = null;\r\n\t\t}\r\n\r\n\t\tDomEvent.off(document, 'mousemove touchmove', this._onMove, this);\r\n\t\tDomEvent.off(document, 'mouseup touchend touchcancel', this._onUp, this);\r\n\r\n\t\tDomUtil.enableImageDrag();\r\n\t\tDomUtil.enableTextSelection();\r\n\r\n\t\tvar fireDragend = this._moved && this._moving;\r\n\r\n\t\tthis._moving = false;\r\n\t\tDraggable._dragging = false;\r\n\r\n\t\tif (fireDragend) {\r\n\t\t\t// @event dragend: DragEndEvent\r\n\t\t\t// Fired when the drag ends.\r\n\t\t\tthis.fire('dragend', {\r\n\t\t\t\tnoInertia: noInertia,\r\n\t\t\t\tdistance: this._newPos.distanceTo(this._startPos)\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n});\r\n","import * as LineUtil from './LineUtil';\r\nimport {toLatLng} from '../geo/LatLng';\r\nimport {toPoint} from './Point';\r\nimport {toLatLngBounds} from '../geo/LatLngBounds';\r\n/*\r\n * @namespace PolyUtil\r\n * Various utility functions for polygon geometries.\r\n */\r\n\r\n/* @function clipPolygon(points: Point[], bounds: Bounds, round?: Boolean): Point[]\r\n * Clips the polygon geometry defined by the given `points` by the given bounds (using the [Sutherland-Hodgman algorithm](https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm)).\r\n * Used by Leaflet to only show polygon points that are on the screen or near, increasing\r\n * performance. Note that polygon points needs different algorithm for clipping\r\n * than polyline, so there's a separate method for it.\r\n */\r\nexport function clipPolygon(points, bounds, round) {\r\n\tvar clippedPoints,\r\n\t    edges = [1, 4, 2, 8],\r\n\t    i, j, k,\r\n\t    a, b,\r\n\t    len, edge, p;\r\n\r\n\tfor (i = 0, len = points.length; i < len; i++) {\r\n\t\tpoints[i]._code = LineUtil._getBitCode(points[i], bounds);\r\n\t}\r\n\r\n\t// for each edge (left, bottom, right, top)\r\n\tfor (k = 0; k < 4; k++) {\r\n\t\tedge = edges[k];\r\n\t\tclippedPoints = [];\r\n\r\n\t\tfor (i = 0, len = points.length, j = len - 1; i < len; j = i++) {\r\n\t\t\ta = points[i];\r\n\t\t\tb = points[j];\r\n\r\n\t\t\t// if a is inside the clip window\r\n\t\t\tif (!(a._code & edge)) {\r\n\t\t\t\t// if b is outside the clip window (a->b goes out of screen)\r\n\t\t\t\tif (b._code & edge) {\r\n\t\t\t\t\tp = LineUtil._getEdgeIntersection(b, a, edge, bounds, round);\r\n\t\t\t\t\tp._code = LineUtil._getBitCode(p, bounds);\r\n\t\t\t\t\tclippedPoints.push(p);\r\n\t\t\t\t}\r\n\t\t\t\tclippedPoints.push(a);\r\n\r\n\t\t\t// else if b is inside the clip window (a->b enters the screen)\r\n\t\t\t} else if (!(b._code & edge)) {\r\n\t\t\t\tp = LineUtil._getEdgeIntersection(b, a, edge, bounds, round);\r\n\t\t\t\tp._code = LineUtil._getBitCode(p, bounds);\r\n\t\t\t\tclippedPoints.push(p);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpoints = clippedPoints;\r\n\t}\r\n\r\n\treturn points;\r\n}\r\n\r\n/* @function polygonCenter(latlngs: LatLng[], crs: CRS): LatLng\r\n * Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the passed LatLngs (first ring) from a polygon.\r\n */\r\nexport function polygonCenter(latlngs, crs) {\r\n\tvar i, j, p1, p2, f, area, x, y, center;\r\n\r\n\tif (!latlngs || latlngs.length === 0) {\r\n\t\tthrow new Error('latlngs not passed');\r\n\t}\r\n\r\n\tif (!LineUtil.isFlat(latlngs)) {\r\n\t\tconsole.warn('latlngs are not flat! Only the first ring will be used');\r\n\t\tlatlngs = latlngs[0];\r\n\t}\r\n\r\n\tvar centroidLatLng = toLatLng([0, 0]);\r\n\r\n\tvar bounds = toLatLngBounds(latlngs);\r\n\tvar areaBounds = bounds.getNorthWest().distanceTo(bounds.getSouthWest()) * bounds.getNorthEast().distanceTo(bounds.getNorthWest());\r\n\t// tests showed that below 1700 rounding errors are happening\r\n\tif (areaBounds < 1700) {\r\n\t\t// getting a inexact center, to move the latlngs near to [0, 0] to prevent rounding errors\r\n\t\tcentroidLatLng = centroid(latlngs);\r\n\t}\r\n\r\n\tvar len = latlngs.length;\r\n\tvar points = [];\r\n\tfor (i = 0; i < len; i++) {\r\n\t\tvar latlng = toLatLng(latlngs[i]);\r\n\t\tpoints.push(crs.project(toLatLng([latlng.lat - centroidLatLng.lat, latlng.lng - centroidLatLng.lng])));\r\n\t}\r\n\r\n\tarea = x = y = 0;\r\n\r\n\t// polygon centroid algorithm;\r\n\tfor (i = 0, j = len - 1; i < len; j = i++) {\r\n\t\tp1 = points[i];\r\n\t\tp2 = points[j];\r\n\r\n\t\tf = p1.y * p2.x - p2.y * p1.x;\r\n\t\tx += (p1.x + p2.x) * f;\r\n\t\ty += (p1.y + p2.y) * f;\r\n\t\tarea += f * 3;\r\n\t}\r\n\r\n\tif (area === 0) {\r\n\t\t// Polygon is so small that all points are on same pixel.\r\n\t\tcenter = points[0];\r\n\t} else {\r\n\t\tcenter = [x / area, y / area];\r\n\t}\r\n\r\n\tvar latlngCenter = crs.unproject(toPoint(center));\r\n\treturn toLatLng([latlngCenter.lat + centroidLatLng.lat, latlngCenter.lng + centroidLatLng.lng]);\r\n}\r\n\r\n/* @function centroid(latlngs: LatLng[]): LatLng\r\n * Returns the 'center of mass' of the passed LatLngs.\r\n */\r\nexport function centroid(coords) {\r\n\tvar latSum = 0;\r\n\tvar lngSum = 0;\r\n\tvar len = 0;\r\n\tfor (var i = 0; i < coords.length; i++) {\r\n\t\tvar latlng = toLatLng(coords[i]);\r\n\t\tlatSum += latlng.lat;\r\n\t\tlngSum += latlng.lng;\r\n\t\tlen++;\r\n\t}\r\n\treturn toLatLng([latSum / len, lngSum / len]);\r\n}\r\n","import {Point, toPoint} from './Point';\r\nimport * as Util from '../core/Util';\r\nimport {toLatLng} from '../geo/LatLng';\r\nimport {centroid} from './PolyUtil';\r\nimport {toLatLngBounds} from '../geo/LatLngBounds';\r\n\r\n\r\n/*\r\n * @namespace LineUtil\r\n *\r\n * Various utility functions for polyline points processing, used by Leaflet internally to make polylines lightning-fast.\r\n */\r\n\r\n// Simplify polyline with vertex reduction and Douglas-Peucker simplification.\r\n// Improves rendering performance dramatically by lessening the number of points to draw.\r\n\r\n// @function simplify(points: Point[], tolerance: Number): Point[]\r\n// Dramatically reduces the number of points in a polyline while retaining\r\n// its shape and returns a new array of simplified points, using the\r\n// [Ramer-Douglas-Peucker algorithm](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm).\r\n// Used for a huge performance boost when processing/displaying Leaflet polylines for\r\n// each zoom level and also reducing visual noise. tolerance affects the amount of\r\n// simplification (lesser value means higher quality but slower and with more points).\r\n// Also released as a separated micro-library [Simplify.js](https://mourner.github.io/simplify-js/).\r\nexport function simplify(points, tolerance) {\r\n\tif (!tolerance || !points.length) {\r\n\t\treturn points.slice();\r\n\t}\r\n\r\n\tvar sqTolerance = tolerance * tolerance;\r\n\r\n\t    // stage 1: vertex reduction\r\n\t    points = _reducePoints(points, sqTolerance);\r\n\r\n\t    // stage 2: Douglas-Peucker simplification\r\n\t    points = _simplifyDP(points, sqTolerance);\r\n\r\n\treturn points;\r\n}\r\n\r\n// @function pointToSegmentDistance(p: Point, p1: Point, p2: Point): Number\r\n// Returns the distance between point `p` and segment `p1` to `p2`.\r\nexport function pointToSegmentDistance(p, p1, p2) {\r\n\treturn Math.sqrt(_sqClosestPointOnSegment(p, p1, p2, true));\r\n}\r\n\r\n// @function closestPointOnSegment(p: Point, p1: Point, p2: Point): Number\r\n// Returns the closest point from a point `p` on a segment `p1` to `p2`.\r\nexport function closestPointOnSegment(p, p1, p2) {\r\n\treturn _sqClosestPointOnSegment(p, p1, p2);\r\n}\r\n\r\n// Ramer-Douglas-Peucker simplification, see https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm\r\nfunction _simplifyDP(points, sqTolerance) {\r\n\r\n\tvar len = points.length,\r\n\t    ArrayConstructor = typeof Uint8Array !== undefined + '' ? Uint8Array : Array,\r\n\t    markers = new ArrayConstructor(len);\r\n\r\n\t    markers[0] = markers[len - 1] = 1;\r\n\r\n\t_simplifyDPStep(points, markers, sqTolerance, 0, len - 1);\r\n\r\n\tvar i,\r\n\t    newPoints = [];\r\n\r\n\tfor (i = 0; i < len; i++) {\r\n\t\tif (markers[i]) {\r\n\t\t\tnewPoints.push(points[i]);\r\n\t\t}\r\n\t}\r\n\r\n\treturn newPoints;\r\n}\r\n\r\nfunction _simplifyDPStep(points, markers, sqTolerance, first, last) {\r\n\r\n\tvar maxSqDist = 0,\r\n\tindex, i, sqDist;\r\n\r\n\tfor (i = first + 1; i <= last - 1; i++) {\r\n\t\tsqDist = _sqClosestPointOnSegment(points[i], points[first], points[last], true);\r\n\r\n\t\tif (sqDist > maxSqDist) {\r\n\t\t\tindex = i;\r\n\t\t\tmaxSqDist = sqDist;\r\n\t\t}\r\n\t}\r\n\r\n\tif (maxSqDist > sqTolerance) {\r\n\t\tmarkers[index] = 1;\r\n\r\n\t\t_simplifyDPStep(points, markers, sqTolerance, first, index);\r\n\t\t_simplifyDPStep(points, markers, sqTolerance, index, last);\r\n\t}\r\n}\r\n\r\n// reduce points that are too close to each other to a single point\r\nfunction _reducePoints(points, sqTolerance) {\r\n\tvar reducedPoints = [points[0]];\r\n\r\n\tfor (var i = 1, prev = 0, len = points.length; i < len; i++) {\r\n\t\tif (_sqDist(points[i], points[prev]) > sqTolerance) {\r\n\t\t\treducedPoints.push(points[i]);\r\n\t\t\tprev = i;\r\n\t\t}\r\n\t}\r\n\tif (prev < len - 1) {\r\n\t\treducedPoints.push(points[len - 1]);\r\n\t}\r\n\treturn reducedPoints;\r\n}\r\n\r\nvar _lastCode;\r\n\r\n// @function clipSegment(a: Point, b: Point, bounds: Bounds, useLastCode?: Boolean, round?: Boolean): Point[]|Boolean\r\n// Clips the segment a to b by rectangular bounds with the\r\n// [Cohen-Sutherland algorithm](https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm)\r\n// (modifying the segment points directly!). Used by Leaflet to only show polyline\r\n// points that are on the screen or near, increasing performance.\r\nexport function clipSegment(a, b, bounds, useLastCode, round) {\r\n\tvar codeA = useLastCode ? _lastCode : _getBitCode(a, bounds),\r\n\t    codeB = _getBitCode(b, bounds),\r\n\r\n\t    codeOut, p, newCode;\r\n\r\n\t    // save 2nd code to avoid calculating it on the next segment\r\n\t    _lastCode = codeB;\r\n\r\n\twhile (true) {\r\n\t\t// if a,b is inside the clip window (trivial accept)\r\n\t\tif (!(codeA | codeB)) {\r\n\t\t\treturn [a, b];\r\n\t\t}\r\n\r\n\t\t// if a,b is outside the clip window (trivial reject)\r\n\t\tif (codeA & codeB) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// other cases\r\n\t\tcodeOut = codeA || codeB;\r\n\t\tp = _getEdgeIntersection(a, b, codeOut, bounds, round);\r\n\t\tnewCode = _getBitCode(p, bounds);\r\n\r\n\t\tif (codeOut === codeA) {\r\n\t\t\ta = p;\r\n\t\t\tcodeA = newCode;\r\n\t\t} else {\r\n\t\t\tb = p;\r\n\t\t\tcodeB = newCode;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport function _getEdgeIntersection(a, b, code, bounds, round) {\r\n\tvar dx = b.x - a.x,\r\n\t    dy = b.y - a.y,\r\n\t    min = bounds.min,\r\n\t    max = bounds.max,\r\n\t    x, y;\r\n\r\n\tif (code & 8) { // top\r\n\t\tx = a.x + dx * (max.y - a.y) / dy;\r\n\t\ty = max.y;\r\n\r\n\t} else if (code & 4) { // bottom\r\n\t\tx = a.x + dx * (min.y - a.y) / dy;\r\n\t\ty = min.y;\r\n\r\n\t} else if (code & 2) { // right\r\n\t\tx = max.x;\r\n\t\ty = a.y + dy * (max.x - a.x) / dx;\r\n\r\n\t} else if (code & 1) { // left\r\n\t\tx = min.x;\r\n\t\ty = a.y + dy * (min.x - a.x) / dx;\r\n\t}\r\n\r\n\treturn new Point(x, y, round);\r\n}\r\n\r\nexport function _getBitCode(p, bounds) {\r\n\tvar code = 0;\r\n\r\n\tif (p.x < bounds.min.x) { // left\r\n\t\tcode |= 1;\r\n\t} else if (p.x > bounds.max.x) { // right\r\n\t\tcode |= 2;\r\n\t}\r\n\r\n\tif (p.y < bounds.min.y) { // bottom\r\n\t\tcode |= 4;\r\n\t} else if (p.y > bounds.max.y) { // top\r\n\t\tcode |= 8;\r\n\t}\r\n\r\n\treturn code;\r\n}\r\n\r\n// square distance (to avoid unnecessary Math.sqrt calls)\r\nfunction _sqDist(p1, p2) {\r\n\tvar dx = p2.x - p1.x,\r\n\t    dy = p2.y - p1.y;\r\n\treturn dx * dx + dy * dy;\r\n}\r\n\r\n// return closest point on segment or distance to that point\r\nexport function _sqClosestPointOnSegment(p, p1, p2, sqDist) {\r\n\tvar x = p1.x,\r\n\t    y = p1.y,\r\n\t    dx = p2.x - x,\r\n\t    dy = p2.y - y,\r\n\t    dot = dx * dx + dy * dy,\r\n\t    t;\r\n\r\n\tif (dot > 0) {\r\n\t\tt = ((p.x - x) * dx + (p.y - y) * dy) / dot;\r\n\r\n\t\tif (t > 1) {\r\n\t\t\tx = p2.x;\r\n\t\t\ty = p2.y;\r\n\t\t} else if (t > 0) {\r\n\t\t\tx += dx * t;\r\n\t\t\ty += dy * t;\r\n\t\t}\r\n\t}\r\n\r\n\tdx = p.x - x;\r\n\tdy = p.y - y;\r\n\r\n\treturn sqDist ? dx * dx + dy * dy : new Point(x, y);\r\n}\r\n\r\n\r\n// @function isFlat(latlngs: LatLng[]): Boolean\r\n// Returns true if `latlngs` is a flat array, false is nested.\r\nexport function isFlat(latlngs) {\r\n\treturn !Util.isArray(latlngs[0]) || (typeof latlngs[0][0] !== 'object' && typeof latlngs[0][0] !== 'undefined');\r\n}\r\n\r\nexport function _flat(latlngs) {\r\n\tconsole.warn('Deprecated use of _flat, please use L.LineUtil.isFlat instead.');\r\n\treturn isFlat(latlngs);\r\n}\r\n\r\n/* @function polylineCenter(latlngs: LatLng[], crs: CRS): LatLng\r\n * Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the passed LatLngs (first ring) from a polyline.\r\n */\r\nexport function polylineCenter(latlngs, crs) {\r\n\tvar i, halfDist, segDist, dist, p1, p2, ratio, center;\r\n\r\n\tif (!latlngs || latlngs.length === 0) {\r\n\t\tthrow new Error('latlngs not passed');\r\n\t}\r\n\r\n\tif (!isFlat(latlngs)) {\r\n\t\tconsole.warn('latlngs are not flat! Only the first ring will be used');\r\n\t\tlatlngs = latlngs[0];\r\n\t}\r\n\r\n\tvar centroidLatLng = toLatLng([0, 0]);\r\n\r\n\tvar bounds = toLatLngBounds(latlngs);\r\n\tvar areaBounds = bounds.getNorthWest().distanceTo(bounds.getSouthWest()) * bounds.getNorthEast().distanceTo(bounds.getNorthWest());\r\n\t// tests showed that below 1700 rounding errors are happening\r\n\tif (areaBounds < 1700) {\r\n\t\t// getting a inexact center, to move the latlngs near to [0, 0] to prevent rounding errors\r\n\t\tcentroidLatLng = centroid(latlngs);\r\n\t}\r\n\r\n\tvar len = latlngs.length;\r\n\tvar points = [];\r\n\tfor (i = 0; i < len; i++) {\r\n\t\tvar latlng = toLatLng(latlngs[i]);\r\n\t\tpoints.push(crs.project(toLatLng([latlng.lat - centroidLatLng.lat, latlng.lng - centroidLatLng.lng])));\r\n\t}\r\n\r\n\tfor (i = 0, halfDist = 0; i < len - 1; i++) {\r\n\t\thalfDist += points[i].distanceTo(points[i + 1]) / 2;\r\n\t}\r\n\r\n\t// The line is so small in the current view that all points are on the same pixel.\r\n\tif (halfDist === 0) {\r\n\t\tcenter = points[0];\r\n\t} else {\r\n\t\tfor (i = 0, dist = 0; i < len - 1; i++) {\r\n\t\t\tp1 = points[i];\r\n\t\t\tp2 = points[i + 1];\r\n\t\t\tsegDist = p1.distanceTo(p2);\r\n\t\t\tdist += segDist;\r\n\r\n\t\t\tif (dist > halfDist) {\r\n\t\t\t\tratio = (dist - halfDist) / segDist;\r\n\t\t\t\tcenter = [\r\n\t\t\t\t\tp2.x - ratio * (p2.x - p1.x),\r\n\t\t\t\t\tp2.y - ratio * (p2.y - p1.y)\r\n\t\t\t\t];\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar latlngCenter = crs.unproject(toPoint(center));\r\n\treturn toLatLng([latlngCenter.lat + centroidLatLng.lat, latlngCenter.lng + centroidLatLng.lng]);\r\n}\r\n","import {LatLng} from '../LatLng';\r\nimport {Bounds} from '../../geometry/Bounds';\r\nimport {Point} from '../../geometry/Point';\r\n\r\n/*\r\n * @namespace Projection\r\n * @section\r\n * Leaflet comes with a set of already defined Projections out of the box:\r\n *\r\n * @projection L.Projection.LonLat\r\n *\r\n * Equirectangular, or Plate Carree projection — the most simple projection,\r\n * mostly used by GIS enthusiasts. Directly maps `x` as longitude, and `y` as\r\n * latitude. Also suitable for flat worlds, e.g. game maps. Used by the\r\n * `EPSG:4326` and `Simple` CRS.\r\n */\r\n\r\nexport var LonLat = {\r\n\tproject: function (latlng) {\r\n\t\treturn new Point(latlng.lng, latlng.lat);\r\n\t},\r\n\r\n\tunproject: function (point) {\r\n\t\treturn new LatLng(point.y, point.x);\r\n\t},\r\n\r\n\tbounds: new Bounds([-180, -90], [180, 90])\r\n};\r\n","import {LatLng} from '../LatLng';\r\nimport {Bounds} from '../../geometry/Bounds';\r\nimport {Point} from '../../geometry/Point';\r\n\r\n/*\r\n * @namespace Projection\r\n * @projection L.Projection.Mercator\r\n *\r\n * Elliptical Mercator projection — more complex than Spherical Mercator. Assumes that Earth is an ellipsoid. Used by the EPSG:3395 CRS.\r\n */\r\n\r\nexport var Mercator = {\r\n\tR: 6378137,\r\n\tR_MINOR: 6356752.314245179,\r\n\r\n\tbounds: new Bounds([-20037508.34279, -15496570.73972], [20037508.34279, 18764656.23138]),\r\n\r\n\tproject: function (latlng) {\r\n\t\tvar d = Math.PI / 180,\r\n\t\t    r = this.R,\r\n\t\t    y = latlng.lat * d,\r\n\t\t    tmp = this.R_MINOR / r,\r\n\t\t    e = Math.sqrt(1 - tmp * tmp),\r\n\t\t    con = e * Math.sin(y);\r\n\r\n\t\tvar ts = Math.tan(Math.PI / 4 - y / 2) / Math.pow((1 - con) / (1 + con), e / 2);\r\n\t\ty = -r * Math.log(Math.max(ts, 1E-10));\r\n\r\n\t\treturn new Point(latlng.lng * d * r, y);\r\n\t},\r\n\r\n\tunproject: function (point) {\r\n\t\tvar d = 180 / Math.PI,\r\n\t\t    r = this.R,\r\n\t\t    tmp = this.R_MINOR / r,\r\n\t\t    e = Math.sqrt(1 - tmp * tmp),\r\n\t\t    ts = Math.exp(-point.y / r),\r\n\t\t    phi = Math.PI / 2 - 2 * Math.atan(ts);\r\n\r\n\t\tfor (var i = 0, dphi = 0.1, con; i < 15 && Math.abs(dphi) > 1e-7; i++) {\r\n\t\t\tcon = e * Math.sin(phi);\r\n\t\t\tcon = Math.pow((1 - con) / (1 + con), e / 2);\r\n\t\t\tdphi = Math.PI / 2 - 2 * Math.atan(ts * con) - phi;\r\n\t\t\tphi += dphi;\r\n\t\t}\r\n\r\n\t\treturn new LatLng(phi * d, point.x * d / r);\r\n\t}\r\n};\r\n","/*\n * @class Projection\n\n * An object with methods for projecting geographical coordinates of the world onto\n * a flat surface (and back). See [Map projection](https://en.wikipedia.org/wiki/Map_projection).\n\n * @property bounds: Bounds\n * The bounds (specified in CRS units) where the projection is valid\n\n * @method project(latlng: LatLng): Point\n * Projects geographical coordinates into a 2D point.\n * Only accepts actual `L.LatLng` instances, not arrays.\n\n * @method unproject(point: Point): LatLng\n * The inverse of `project`. Projects a 2D point into a geographical location.\n * Only accepts actual `L.Point` instances, not arrays.\n\n * Note that the projection instances do not inherit from Leaflet's `Class` object,\n * and can't be instantiated. Also, new classes can't inherit from them,\n * and methods can't be added to them with the `include` function.\n\n */\n\nexport {LonLat} from './Projection.LonLat';\nexport {Mercator} from './Projection.Mercator';\nexport {SphericalMercator} from './Projection.SphericalMercator';\n","import {Earth} from './CRS.Earth';\r\nimport {Mercator} from '../projection/Projection.Mercator';\r\nimport {toTransformation} from '../../geometry/Transformation';\r\nimport * as Util from '../../core/Util';\r\n\r\n/*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG3395\r\n *\r\n * Rarely used by some commercial tile providers. Uses Elliptical Mercator projection.\r\n */\r\nexport var EPSG3395 = Util.extend({}, Earth, {\r\n\tcode: 'EPSG:3395',\r\n\tprojection: Mercator,\r\n\r\n\ttransformation: (function () {\r\n\t\tvar scale = 0.5 / (Math.PI * Mercator.R);\r\n\t\treturn toTransformation(scale, 0.5, -scale, 0.5);\r\n\t}())\r\n});\r\n","import {Earth} from './CRS.Earth';\r\nimport {LonLat} from '../projection/Projection.LonLat';\r\nimport {toTransformation} from '../../geometry/Transformation';\r\nimport * as Util from '../../core/Util';\r\n\r\n/*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG4326\r\n *\r\n * A common CRS among GIS enthusiasts. Uses simple Equirectangular projection.\r\n *\r\n * Leaflet 1.0.x complies with the [TMS coordinate scheme for EPSG:4326](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#global-geodetic),\r\n * which is a breaking change from 0.7.x behaviour.  If you are using a `TileLayer`\r\n * with this CRS, ensure that there are two 256x256 pixel tiles covering the\r\n * whole earth at zoom level zero, and that the tile coordinate origin is (-180,+90),\r\n * or (-180,-90) for `TileLayer`s with [the `tms` option](#tilelayer-tms) set.\r\n */\r\n\r\nexport var EPSG4326 = Util.extend({}, Earth, {\r\n\tcode: 'EPSG:4326',\r\n\tprojection: LonLat,\r\n\ttransformation: toTransformation(1 / 180, 1, -1 / 180, 0.5)\r\n});\r\n","import {CRS} from './CRS';\nimport {LonLat} from '../projection/Projection.LonLat';\nimport {toTransformation} from '../../geometry/Transformation';\nimport * as Util from '../../core/Util';\n\n/*\n * @namespace CRS\n * @crs L.CRS.Simple\n *\n * A simple CRS that maps longitude and latitude into `x` and `y` directly.\n * May be used for maps of flat surfaces (e.g. game maps). Note that the `y`\n * axis should still be inverted (going from bottom to top). `distance()` returns\n * simple euclidean distance.\n */\n\nexport var Simple = Util.extend({}, CRS, {\n\tprojection: LonLat,\n\ttransformation: toTransformation(1, 0, -1, 0),\n\n\tscale: function (zoom) {\n\t\treturn Math.pow(2, zoom);\n\t},\n\n\tzoom: function (scale) {\n\t\treturn Math.log(scale) / Math.LN2;\n\t},\n\n\tdistance: function (latlng1, latlng2) {\n\t\tvar dx = latlng2.lng - latlng1.lng,\n\t\t    dy = latlng2.lat - latlng1.lat;\n\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\t},\n\n\tinfinite: true\n});\n","import {CRS} from './CRS';\nimport {Earth} from './CRS.Earth';\nimport {EPSG3395} from './CRS.EPSG3395';\nimport {EPSG3857, EPSG900913} from './CRS.EPSG3857';\nimport {EPSG4326} from './CRS.EPSG4326';\nimport {Simple} from './CRS.Simple';\n\nCRS.Earth = Earth;\nCRS.EPSG3395 = EPSG3395;\nCRS.EPSG3857 = EPSG3857;\nCRS.EPSG900913 = EPSG900913;\nCRS.EPSG4326 = EPSG4326;\nCRS.Simple = Simple;\n\nexport {CRS};\n","import {Evented} from '../core/Events';\nimport {Map} from '../map/Map';\nimport * as Util from '../core/Util';\n\n/*\n * @class Layer\n * @inherits Evented\n * @aka L.Layer\n * @aka ILayer\n *\n * A set of methods from the Layer base class that all Leaflet layers use.\n * Inherits all methods, options and events from `L.Evented`.\n *\n * @example\n *\n * ```js\n * var layer = L.marker(latlng).addTo(map);\n * layer.addTo(map);\n * layer.remove();\n * ```\n *\n * @event add: Event\n * Fired after the layer is added to a map\n *\n * @event remove: Event\n * Fired after the layer is removed from a map\n */\n\n\nexport var Layer = Evented.extend({\n\n\t// Classes extending `L.Layer` will inherit the following options:\n\toptions: {\n\t\t// @option pane: String = 'overlayPane'\n\t\t// By default the layer will be added to the map's [overlay pane](#map-overlaypane). Overriding this option will cause the layer to be placed on another pane by default.\n\t\tpane: 'overlayPane',\n\n\t\t// @option attribution: String = null\n\t\t// String to be shown in the attribution control, e.g. \"© OpenStreetMap contributors\". It describes the layer data and is often a legal obligation towards copyright holders and tile providers.\n\t\tattribution: null,\n\n\t\tbubblingMouseEvents: true\n\t},\n\n\t/* @section\n\t * Classes extending `L.Layer` will inherit the following methods:\n\t *\n\t * @method addTo(map: Map|LayerGroup): this\n\t * Adds the layer to the given map or layer group.\n\t */\n\taddTo: function (map) {\n\t\tmap.addLayer(this);\n\t\treturn this;\n\t},\n\n\t// @method remove: this\n\t// Removes the layer from the map it is currently active on.\n\tremove: function () {\n\t\treturn this.removeFrom(this._map || this._mapToAdd);\n\t},\n\n\t// @method removeFrom(map: Map): this\n\t// Removes the layer from the given map\n\t//\n\t// @alternative\n\t// @method removeFrom(group: LayerGroup): this\n\t// Removes the layer from the given `LayerGroup`\n\tremoveFrom: function (obj) {\n\t\tif (obj) {\n\t\t\tobj.removeLayer(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method getPane(name? : String): HTMLElement\n\t// Returns the `HTMLElement` representing the named pane on the map. If `name` is omitted, returns the pane for this layer.\n\tgetPane: function (name) {\n\t\treturn this._map.getPane(name ? (this.options[name] || name) : this.options.pane);\n\t},\n\n\taddInteractiveTarget: function (targetEl) {\n\t\tthis._map._targets[Util.stamp(targetEl)] = this;\n\t\treturn this;\n\t},\n\n\tremoveInteractiveTarget: function (targetEl) {\n\t\tdelete this._map._targets[Util.stamp(targetEl)];\n\t\treturn this;\n\t},\n\n\t// @method getAttribution: String\n\t// Used by the `attribution control`, returns the [attribution option](#gridlayer-attribution).\n\tgetAttribution: function () {\n\t\treturn this.options.attribution;\n\t},\n\n\t_layerAdd: function (e) {\n\t\tvar map = e.target;\n\n\t\t// check in case layer gets added and then removed before the map is ready\n\t\tif (!map.hasLayer(this)) { return; }\n\n\t\tthis._map = map;\n\t\tthis._zoomAnimated = map._zoomAnimated;\n\n\t\tif (this.getEvents) {\n\t\t\tvar events = this.getEvents();\n\t\t\tmap.on(events, this);\n\t\t\tthis.once('remove', function () {\n\t\t\t\tmap.off(events, this);\n\t\t\t}, this);\n\t\t}\n\n\t\tthis.onAdd(map);\n\n\t\tthis.fire('add');\n\t\tmap.fire('layeradd', {layer: this});\n\t}\n});\n\n/* @section Extension methods\n * @uninheritable\n *\n * Every layer should extend from `L.Layer` and (re-)implement the following methods.\n *\n * @method onAdd(map: Map): this\n * Should contain code that creates DOM elements for the layer, adds them to `map panes` where they should belong and puts listeners on relevant map events. Called on [`map.addLayer(layer)`](#map-addlayer).\n *\n * @method onRemove(map: Map): this\n * Should contain all clean up code that removes the layer's elements from the DOM and removes listeners previously added in [`onAdd`](#layer-onadd). Called on [`map.removeLayer(layer)`](#map-removelayer).\n *\n * @method getEvents(): Object\n * This optional method should return an object like `{ viewreset: this._reset }` for [`addEventListener`](#evented-addeventlistener). The event handlers in this object will be automatically added and removed from the map with your layer.\n *\n * @method getAttribution(): String\n * This optional method should return a string containing HTML to be shown on the `Attribution control` whenever the layer is visible.\n *\n * @method beforeAdd(map: Map): this\n * Optional method. Called on [`map.addLayer(layer)`](#map-addlayer), before the layer is added to the map, before events are initialized, without waiting until the map is in a usable state. Use for early initialization only.\n */\n\n\n/* @namespace Map\n * @section Layer events\n *\n * @event layeradd: LayerEvent\n * Fired when a new layer is added to the map.\n *\n * @event layerremove: LayerEvent\n * Fired when some layer is removed from the map\n *\n * @section Methods for Layers and Controls\n */\nMap.include({\n\t// @method addLayer(layer: Layer): this\n\t// Adds the given layer to the map\n\taddLayer: function (layer) {\n\t\tif (!layer._layerAdd) {\n\t\t\tthrow new Error('The provided object is not a Layer.');\n\t\t}\n\n\t\tvar id = Util.stamp(layer);\n\t\tif (this._layers[id]) { return this; }\n\t\tthis._layers[id] = layer;\n\n\t\tlayer._mapToAdd = this;\n\n\t\tif (layer.beforeAdd) {\n\t\t\tlayer.beforeAdd(this);\n\t\t}\n\n\t\tthis.whenReady(layer._layerAdd, layer);\n\n\t\treturn this;\n\t},\n\n\t// @method removeLayer(layer: Layer): this\n\t// Removes the given layer from the map.\n\tremoveLayer: function (layer) {\n\t\tvar id = Util.stamp(layer);\n\n\t\tif (!this._layers[id]) { return this; }\n\n\t\tif (this._loaded) {\n\t\t\tlayer.onRemove(this);\n\t\t}\n\n\t\tdelete this._layers[id];\n\n\t\tif (this._loaded) {\n\t\t\tthis.fire('layerremove', {layer: layer});\n\t\t\tlayer.fire('remove');\n\t\t}\n\n\t\tlayer._map = layer._mapToAdd = null;\n\n\t\treturn this;\n\t},\n\n\t// @method hasLayer(layer: Layer): Boolean\n\t// Returns `true` if the given layer is currently added to the map\n\thasLayer: function (layer) {\n\t\treturn Util.stamp(layer) in this._layers;\n\t},\n\n\t/* @method eachLayer(fn: Function, context?: Object): this\n\t * Iterates over the layers of the map, optionally specifying context of the iterator function.\n\t * ```\n\t * map.eachLayer(function(layer){\n\t *     layer.bindPopup('Hello');\n\t * });\n\t * ```\n\t */\n\teachLayer: function (method, context) {\n\t\tfor (var i in this._layers) {\n\t\t\tmethod.call(context, this._layers[i]);\n\t\t}\n\t\treturn this;\n\t},\n\n\t_addLayers: function (layers) {\n\t\tlayers = layers ? (Util.isArray(layers) ? layers : [layers]) : [];\n\n\t\tfor (var i = 0, len = layers.length; i < len; i++) {\n\t\t\tthis.addLayer(layers[i]);\n\t\t}\n\t},\n\n\t_addZoomLimit: function (layer) {\n\t\tif (!isNaN(layer.options.maxZoom) || !isNaN(layer.options.minZoom)) {\n\t\t\tthis._zoomBoundLayers[Util.stamp(layer)] = layer;\n\t\t\tthis._updateZoomLevels();\n\t\t}\n\t},\n\n\t_removeZoomLimit: function (layer) {\n\t\tvar id = Util.stamp(layer);\n\n\t\tif (this._zoomBoundLayers[id]) {\n\t\t\tdelete this._zoomBoundLayers[id];\n\t\t\tthis._updateZoomLevels();\n\t\t}\n\t},\n\n\t_updateZoomLevels: function () {\n\t\tvar minZoom = Infinity,\n\t\t    maxZoom = -Infinity,\n\t\t    oldZoomSpan = this._getZoomSpan();\n\n\t\tfor (var i in this._zoomBoundLayers) {\n\t\t\tvar options = this._zoomBoundLayers[i].options;\n\n\t\t\tminZoom = options.minZoom === undefined ? minZoom : Math.min(minZoom, options.minZoom);\n\t\t\tmaxZoom = options.maxZoom === undefined ? maxZoom : Math.max(maxZoom, options.maxZoom);\n\t\t}\n\n\t\tthis._layersMaxZoom = maxZoom === -Infinity ? undefined : maxZoom;\n\t\tthis._layersMinZoom = minZoom === Infinity ? undefined : minZoom;\n\n\t\t// @section Map state change events\n\t\t// @event zoomlevelschange: Event\n\t\t// Fired when the number of zoomlevels on the map is changed due\n\t\t// to adding or removing a layer.\n\t\tif (oldZoomSpan !== this._getZoomSpan()) {\n\t\t\tthis.fire('zoomlevelschange');\n\t\t}\n\n\t\tif (this.options.maxZoom === undefined && this._layersMaxZoom && this.getZoom() > this._layersMaxZoom) {\n\t\t\tthis.setZoom(this._layersMaxZoom);\n\t\t}\n\t\tif (this.options.minZoom === undefined && this._layersMinZoom && this.getZoom() < this._layersMinZoom) {\n\t\t\tthis.setZoom(this._layersMinZoom);\n\t\t}\n\t}\n});\n","\r\nimport {Layer} from './Layer';\r\nimport * as Util from '../core/Util';\r\n\r\n/*\r\n * @class LayerGroup\r\n * @aka L.LayerGroup\r\n * @inherits Interactive layer\r\n *\r\n * Used to group several layers and handle them as one. If you add it to the map,\r\n * any layers added or removed from the group will be added/removed on the map as\r\n * well. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.layerGroup([marker1, marker2])\r\n * \t.addLayer(polyline)\r\n * \t.addTo(map);\r\n * ```\r\n */\r\n\r\nexport var LayerGroup = Layer.extend({\r\n\r\n\tinitialize: function (layers, options) {\r\n\t\tUtil.setOptions(this, options);\r\n\r\n\t\tthis._layers = {};\r\n\r\n\t\tvar i, len;\r\n\r\n\t\tif (layers) {\r\n\t\t\tfor (i = 0, len = layers.length; i < len; i++) {\r\n\t\t\t\tthis.addLayer(layers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// @method addLayer(layer: Layer): this\r\n\t// Adds the given layer to the group.\r\n\taddLayer: function (layer) {\r\n\t\tvar id = this.getLayerId(layer);\r\n\r\n\t\tthis._layers[id] = layer;\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._map.addLayer(layer);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeLayer(layer: Layer): this\r\n\t// Removes the given layer from the group.\r\n\t// @alternative\r\n\t// @method removeLayer(id: Number): this\r\n\t// Removes the layer with the given internal ID from the group.\r\n\tremoveLayer: function (layer) {\r\n\t\tvar id = layer in this._layers ? layer : this.getLayerId(layer);\r\n\r\n\t\tif (this._map && this._layers[id]) {\r\n\t\t\tthis._map.removeLayer(this._layers[id]);\r\n\t\t}\r\n\r\n\t\tdelete this._layers[id];\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method hasLayer(layer: Layer): Boolean\r\n\t// Returns `true` if the given layer is currently added to the group.\r\n\t// @alternative\r\n\t// @method hasLayer(id: Number): Boolean\r\n\t// Returns `true` if the given internal ID is currently added to the group.\r\n\thasLayer: function (layer) {\r\n\t\tvar layerId = typeof layer === 'number' ? layer : this.getLayerId(layer);\r\n\t\treturn layerId in this._layers;\r\n\t},\r\n\r\n\t// @method clearLayers(): this\r\n\t// Removes all the layers from the group.\r\n\tclearLayers: function () {\r\n\t\treturn this.eachLayer(this.removeLayer, this);\r\n\t},\r\n\r\n\t// @method invoke(methodName: String, …): this\r\n\t// Calls `methodName` on every layer contained in this group, passing any\r\n\t// additional parameters. Has no effect if the layers contained do not\r\n\t// implement `methodName`.\r\n\tinvoke: function (methodName) {\r\n\t\tvar args = Array.prototype.slice.call(arguments, 1),\r\n\t\t    i, layer;\r\n\r\n\t\tfor (i in this._layers) {\r\n\t\t\tlayer = this._layers[i];\r\n\r\n\t\t\tif (layer[methodName]) {\r\n\t\t\t\tlayer[methodName].apply(layer, args);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis.eachLayer(map.addLayer, map);\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tthis.eachLayer(map.removeLayer, map);\r\n\t},\r\n\r\n\t// @method eachLayer(fn: Function, context?: Object): this\r\n\t// Iterates over the layers of the group, optionally specifying context of the iterator function.\r\n\t// ```js\r\n\t// group.eachLayer(function (layer) {\r\n\t// \tlayer.bindPopup('Hello');\r\n\t// });\r\n\t// ```\r\n\teachLayer: function (method, context) {\r\n\t\tfor (var i in this._layers) {\r\n\t\t\tmethod.call(context, this._layers[i]);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getLayer(id: Number): Layer\r\n\t// Returns the layer with the given internal ID.\r\n\tgetLayer: function (id) {\r\n\t\treturn this._layers[id];\r\n\t},\r\n\r\n\t// @method getLayers(): Layer[]\r\n\t// Returns an array of all the layers added to the group.\r\n\tgetLayers: function () {\r\n\t\tvar layers = [];\r\n\t\tthis.eachLayer(layers.push, layers);\r\n\t\treturn layers;\r\n\t},\r\n\r\n\t// @method setZIndex(zIndex: Number): this\r\n\t// Calls `setZIndex` on every layer contained in this group, passing the z-index.\r\n\tsetZIndex: function (zIndex) {\r\n\t\treturn this.invoke('setZIndex', zIndex);\r\n\t},\r\n\r\n\t// @method getLayerId(layer: Layer): Number\r\n\t// Returns the internal ID for a layer\r\n\tgetLayerId: function (layer) {\r\n\t\treturn Util.stamp(layer);\r\n\t}\r\n});\r\n\r\n\r\n// @factory L.layerGroup(layers?: Layer[], options?: Object)\r\n// Create a layer group, optionally given an initial set of layers and an `options` object.\r\nexport var layerGroup = function (layers, options) {\r\n\treturn new LayerGroup(layers, options);\r\n};\r\n","import {LayerGroup} from './LayerGroup';\r\nimport {LatLngBounds} from '../geo/LatLngBounds';\r\n\r\n/*\r\n * @class FeatureGroup\r\n * @aka L.FeatureGroup\r\n * @inherits LayerGroup\r\n *\r\n * Extended `LayerGroup` that makes it easier to do the same thing to all its member layers:\r\n *  * [`bindPopup`](#layer-bindpopup) binds a popup to all of the layers at once (likewise with [`bindTooltip`](#layer-bindtooltip))\r\n *  * Events are propagated to the `FeatureGroup`, so if the group has an event\r\n * handler, it will handle events from any of the layers. This includes mouse events\r\n * and custom events.\r\n *  * Has `layeradd` and `layerremove` events\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.featureGroup([marker1, marker2, polyline])\r\n * \t.bindPopup('Hello world!')\r\n * \t.on('click', function() { alert('Clicked on a member of the group!'); })\r\n * \t.addTo(map);\r\n * ```\r\n */\r\n\r\nexport var FeatureGroup = LayerGroup.extend({\r\n\r\n\taddLayer: function (layer) {\r\n\t\tif (this.hasLayer(layer)) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tlayer.addEventParent(this);\r\n\r\n\t\tLayerGroup.prototype.addLayer.call(this, layer);\r\n\r\n\t\t// @event layeradd: LayerEvent\r\n\t\t// Fired when a layer is added to this `FeatureGroup`\r\n\t\treturn this.fire('layeradd', {layer: layer});\r\n\t},\r\n\r\n\tremoveLayer: function (layer) {\r\n\t\tif (!this.hasLayer(layer)) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif (layer in this._layers) {\r\n\t\t\tlayer = this._layers[layer];\r\n\t\t}\r\n\r\n\t\tlayer.removeEventParent(this);\r\n\r\n\t\tLayerGroup.prototype.removeLayer.call(this, layer);\r\n\r\n\t\t// @event layerremove: LayerEvent\r\n\t\t// Fired when a layer is removed from this `FeatureGroup`\r\n\t\treturn this.fire('layerremove', {layer: layer});\r\n\t},\r\n\r\n\t// @method setStyle(style: Path options): this\r\n\t// Sets the given path options to each layer of the group that has a `setStyle` method.\r\n\tsetStyle: function (style) {\r\n\t\treturn this.invoke('setStyle', style);\r\n\t},\r\n\r\n\t// @method bringToFront(): this\r\n\t// Brings the layer group to the top of all other layers\r\n\tbringToFront: function () {\r\n\t\treturn this.invoke('bringToFront');\r\n\t},\r\n\r\n\t// @method bringToBack(): this\r\n\t// Brings the layer group to the back of all other layers\r\n\tbringToBack: function () {\r\n\t\treturn this.invoke('bringToBack');\r\n\t},\r\n\r\n\t// @method getBounds(): LatLngBounds\r\n\t// Returns the LatLngBounds of the Feature Group (created from bounds and coordinates of its children).\r\n\tgetBounds: function () {\r\n\t\tvar bounds = new LatLngBounds();\r\n\r\n\t\tfor (var id in this._layers) {\r\n\t\t\tvar layer = this._layers[id];\r\n\t\t\tbounds.extend(layer.getBounds ? layer.getBounds() : layer.getLatLng());\r\n\t\t}\r\n\t\treturn bounds;\r\n\t}\r\n});\r\n\r\n// @factory L.featureGroup(layers?: Layer[], options?: Object)\r\n// Create a feature group, optionally given an initial set of layers and an `options` object.\r\nexport var featureGroup = function (layers, options) {\r\n\treturn new FeatureGroup(layers, options);\r\n};\r\n","import {Class} from '../../core/Class';\r\nimport {setOptions} from '../../core/Util';\r\nimport {toPoint as point} from '../../geometry/Point';\r\nimport Browser from '../../core/Browser';\r\n\r\n/*\r\n * @class Icon\r\n * @aka L.Icon\r\n *\r\n * Represents an icon to provide when creating a marker.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var myIcon = L.icon({\r\n *     iconUrl: 'my-icon.png',\r\n *     iconRetinaUrl: 'my-icon@2x.png',\r\n *     iconSize: [38, 95],\r\n *     iconAnchor: [22, 94],\r\n *     popupAnchor: [-3, -76],\r\n *     shadowUrl: 'my-icon-shadow.png',\r\n *     shadowRetinaUrl: 'my-icon-shadow@2x.png',\r\n *     shadowSize: [68, 95],\r\n *     shadowAnchor: [22, 94]\r\n * });\r\n *\r\n * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map);\r\n * ```\r\n *\r\n * `L.Icon.Default` extends `L.Icon` and is the blue icon Leaflet uses for markers by default.\r\n *\r\n */\r\n\r\nexport var Icon = Class.extend({\r\n\r\n\t/* @section\r\n\t * @aka Icon options\r\n\t *\r\n\t * @option iconUrl: String = null\r\n\t * **(required)** The URL to the icon image (absolute or relative to your script path).\r\n\t *\r\n\t * @option iconRetinaUrl: String = null\r\n\t * The URL to a retina sized version of the icon image (absolute or relative to your\r\n\t * script path). Used for Retina screen devices.\r\n\t *\r\n\t * @option iconSize: Point = null\r\n\t * Size of the icon image in pixels.\r\n\t *\r\n\t * @option iconAnchor: Point = null\r\n\t * The coordinates of the \"tip\" of the icon (relative to its top left corner). The icon\r\n\t * will be aligned so that this point is at the marker's geographical location. Centered\r\n\t * by default if size is specified, also can be set in CSS with negative margins.\r\n\t *\r\n\t * @option popupAnchor: Point = [0, 0]\r\n\t * The coordinates of the point from which popups will \"open\", relative to the icon anchor.\r\n\t *\r\n\t * @option tooltipAnchor: Point = [0, 0]\r\n\t * The coordinates of the point from which tooltips will \"open\", relative to the icon anchor.\r\n\t *\r\n\t * @option shadowUrl: String = null\r\n\t * The URL to the icon shadow image. If not specified, no shadow image will be created.\r\n\t *\r\n\t * @option shadowRetinaUrl: String = null\r\n\t *\r\n\t * @option shadowSize: Point = null\r\n\t * Size of the shadow image in pixels.\r\n\t *\r\n\t * @option shadowAnchor: Point = null\r\n\t * The coordinates of the \"tip\" of the shadow (relative to its top left corner) (the same\r\n\t * as iconAnchor if not specified).\r\n\t *\r\n\t * @option className: String = ''\r\n\t * A custom class name to assign to both icon and shadow images. Empty by default.\r\n\t */\r\n\r\n\toptions: {\r\n\t\tpopupAnchor: [0, 0],\r\n\t\ttooltipAnchor: [0, 0],\r\n\r\n\t\t// @option crossOrigin: Boolean|String = false\r\n\t\t// Whether the crossOrigin attribute will be added to the tiles.\r\n\t\t// If a String is provided, all tiles will have their crossOrigin attribute set to the String provided. This is needed if you want to access tile pixel data.\r\n\t\t// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n\t\tcrossOrigin: false\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tsetOptions(this, options);\r\n\t},\r\n\r\n\t// @method createIcon(oldIcon?: HTMLElement): HTMLElement\r\n\t// Called internally when the icon has to be shown, returns a `<img>` HTML element\r\n\t// styled according to the options.\r\n\tcreateIcon: function (oldIcon) {\r\n\t\treturn this._createIcon('icon', oldIcon);\r\n\t},\r\n\r\n\t// @method createShadow(oldIcon?: HTMLElement): HTMLElement\r\n\t// As `createIcon`, but for the shadow beneath it.\r\n\tcreateShadow: function (oldIcon) {\r\n\t\treturn this._createIcon('shadow', oldIcon);\r\n\t},\r\n\r\n\t_createIcon: function (name, oldIcon) {\r\n\t\tvar src = this._getIconUrl(name);\r\n\r\n\t\tif (!src) {\r\n\t\t\tif (name === 'icon') {\r\n\t\t\t\tthrow new Error('iconUrl not set in Icon options (see the docs).');\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tvar img = this._createImg(src, oldIcon && oldIcon.tagName === 'IMG' ? oldIcon : null);\r\n\t\tthis._setIconStyles(img, name);\r\n\r\n\t\tif (this.options.crossOrigin || this.options.crossOrigin === '') {\r\n\t\t\timg.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;\r\n\t\t}\r\n\r\n\t\treturn img;\r\n\t},\r\n\r\n\t_setIconStyles: function (img, name) {\r\n\t\tvar options = this.options;\r\n\t\tvar sizeOption = options[name + 'Size'];\r\n\r\n\t\tif (typeof sizeOption === 'number') {\r\n\t\t\tsizeOption = [sizeOption, sizeOption];\r\n\t\t}\r\n\r\n\t\tvar size = point(sizeOption),\r\n\t\t    anchor = point(name === 'shadow' && options.shadowAnchor || options.iconAnchor ||\r\n\t\t            size && size.divideBy(2, true));\r\n\r\n\t\timg.className = 'leaflet-marker-' + name + ' ' + (options.className || '');\r\n\r\n\t\tif (anchor) {\r\n\t\t\timg.style.marginLeft = (-anchor.x) + 'px';\r\n\t\t\timg.style.marginTop  = (-anchor.y) + 'px';\r\n\t\t}\r\n\r\n\t\tif (size) {\r\n\t\t\timg.style.width  = size.x + 'px';\r\n\t\t\timg.style.height = size.y + 'px';\r\n\t\t}\r\n\t},\r\n\r\n\t_createImg: function (src, el) {\r\n\t\tel = el || document.createElement('img');\r\n\t\tel.src = src;\r\n\t\treturn el;\r\n\t},\r\n\r\n\t_getIconUrl: function (name) {\r\n\t\treturn Browser.retina && this.options[name + 'RetinaUrl'] || this.options[name + 'Url'];\r\n\t}\r\n});\r\n\r\n\r\n// @factory L.icon(options: Icon options)\r\n// Creates an icon instance with the given options.\r\nexport function icon(options) {\r\n\treturn new Icon(options);\r\n}\r\n","import {Icon} from './Icon';\nimport * as DomUtil from '../../dom/DomUtil';\n\n/*\n * @miniclass Icon.Default (Icon)\n * @aka L.Icon.Default\n * @section\n *\n * A trivial subclass of `Icon`, represents the icon to use in `Marker`s when\n * no icon is specified. Points to the blue marker image distributed with Leaflet\n * releases.\n *\n * In order to customize the default icon, just change the properties of `L.Icon.Default.prototype.options`\n * (which is a set of `Icon options`).\n *\n * If you want to _completely_ replace the default icon, override the\n * `L.Marker.prototype.options.icon` with your own icon instead.\n */\n\nexport var IconDefault = Icon.extend({\n\n\toptions: {\n\t\ticonUrl:       'marker-icon.png',\n\t\ticonRetinaUrl: 'marker-icon-2x.png',\n\t\tshadowUrl:     'marker-shadow.png',\n\t\ticonSize:    [25, 41],\n\t\ticonAnchor:  [12, 41],\n\t\tpopupAnchor: [1, -34],\n\t\ttooltipAnchor: [16, -28],\n\t\tshadowSize:  [41, 41]\n\t},\n\n\t_getIconUrl: function (name) {\n\t\tif (typeof IconDefault.imagePath !== 'string') {\t// Deprecated, backwards-compatibility only\n\t\t\tIconDefault.imagePath = this._detectIconPath();\n\t\t}\n\n\t\t// @option imagePath: String\n\t\t// `Icon.Default` will try to auto-detect the location of the\n\t\t// blue icon images. If you are placing these images in a non-standard\n\t\t// way, set this option to point to the right path.\n\t\treturn (this.options.imagePath || IconDefault.imagePath) + Icon.prototype._getIconUrl.call(this, name);\n\t},\n\n\t_stripUrl: function (path) {\t// separate function to use in tests\n\t\tvar strip = function (str, re, idx) {\n\t\t\tvar match = re.exec(str);\n\t\t\treturn match && match[idx];\n\t\t};\n\t\tpath = strip(path, /^url\\((['\"])?(.+)\\1\\)$/, 2);\n\t\treturn path && strip(path, /^(.*)marker-icon\\.png$/, 1);\n\t},\n\n\t_detectIconPath: function () {\n\t\tvar el = DomUtil.create('div',  'leaflet-default-icon-path', document.body);\n\t\tvar path = DomUtil.getStyle(el, 'background-image') ||\n\t\t           DomUtil.getStyle(el, 'backgroundImage');\t// IE8\n\n\t\tdocument.body.removeChild(el);\n\t\tpath = this._stripUrl(path);\n\t\tif (path) { return path; }\n\t\tvar link = document.querySelector('link[href$=\"leaflet.css\"]');\n\t\tif (!link) { return ''; }\n\t\treturn link.href.substring(0, link.href.length - 'leaflet.css'.length - 1);\n\t}\n});\n","import {Handler} from '../../core/Handler';\nimport * as DomUtil from '../../dom/DomUtil';\nimport {Draggable} from '../../dom/Draggable';\nimport {toBounds} from '../../geometry/Bounds';\nimport {toPoint} from '../../geometry/Point';\nimport {requestAnimFrame, cancelAnimFrame} from '../../core/Util';\n\n/*\n * L.Handler.MarkerDrag is used internally by L.Marker to make the markers draggable.\n */\n\n\n/* @namespace Marker\n * @section Interaction handlers\n *\n * Interaction handlers are properties of a marker instance that allow you to control interaction behavior in runtime, enabling or disabling certain features such as dragging (see `Handler` methods). Example:\n *\n * ```js\n * marker.dragging.disable();\n * ```\n *\n * @property dragging: Handler\n * Marker dragging handler (by both mouse and touch). Only valid when the marker is on the map (Otherwise set [`marker.options.draggable`](#marker-draggable)).\n */\n\nexport var MarkerDrag = Handler.extend({\n\tinitialize: function (marker) {\n\t\tthis._marker = marker;\n\t},\n\n\taddHooks: function () {\n\t\tvar icon = this._marker._icon;\n\n\t\tif (!this._draggable) {\n\t\t\tthis._draggable = new Draggable(icon, icon, true);\n\t\t}\n\n\t\tthis._draggable.on({\n\t\t\tdragstart: this._onDragStart,\n\t\t\tpredrag: this._onPreDrag,\n\t\t\tdrag: this._onDrag,\n\t\t\tdragend: this._onDragEnd\n\t\t}, this).enable();\n\n\t\tDomUtil.addClass(icon, 'leaflet-marker-draggable');\n\t},\n\n\tremoveHooks: function () {\n\t\tthis._draggable.off({\n\t\t\tdragstart: this._onDragStart,\n\t\t\tpredrag: this._onPreDrag,\n\t\t\tdrag: this._onDrag,\n\t\t\tdragend: this._onDragEnd\n\t\t}, this).disable();\n\n\t\tif (this._marker._icon) {\n\t\t\tDomUtil.removeClass(this._marker._icon, 'leaflet-marker-draggable');\n\t\t}\n\t},\n\n\tmoved: function () {\n\t\treturn this._draggable && this._draggable._moved;\n\t},\n\n\t_adjustPan: function (e) {\n\t\tvar marker = this._marker,\n\t\t    map = marker._map,\n\t\t    speed = this._marker.options.autoPanSpeed,\n\t\t    padding = this._marker.options.autoPanPadding,\n\t\t    iconPos = DomUtil.getPosition(marker._icon),\n\t\t    bounds = map.getPixelBounds(),\n\t\t    origin = map.getPixelOrigin();\n\n\t\tvar panBounds = toBounds(\n\t\t\tbounds.min._subtract(origin).add(padding),\n\t\t\tbounds.max._subtract(origin).subtract(padding)\n\t\t);\n\n\t\tif (!panBounds.contains(iconPos)) {\n\t\t\t// Compute incremental movement\n\t\t\tvar movement = toPoint(\n\t\t\t\t(Math.max(panBounds.max.x, iconPos.x) - panBounds.max.x) / (bounds.max.x - panBounds.max.x) -\n\t\t\t\t(Math.min(panBounds.min.x, iconPos.x) - panBounds.min.x) / (bounds.min.x - panBounds.min.x),\n\n\t\t\t\t(Math.max(panBounds.max.y, iconPos.y) - panBounds.max.y) / (bounds.max.y - panBounds.max.y) -\n\t\t\t\t(Math.min(panBounds.min.y, iconPos.y) - panBounds.min.y) / (bounds.min.y - panBounds.min.y)\n\t\t\t).multiplyBy(speed);\n\n\t\t\tmap.panBy(movement, {animate: false});\n\n\t\t\tthis._draggable._newPos._add(movement);\n\t\t\tthis._draggable._startPos._add(movement);\n\n\t\t\tDomUtil.setPosition(marker._icon, this._draggable._newPos);\n\t\t\tthis._onDrag(e);\n\n\t\t\tthis._panRequest = requestAnimFrame(this._adjustPan.bind(this, e));\n\t\t}\n\t},\n\n\t_onDragStart: function () {\n\t\t// @section Dragging events\n\t\t// @event dragstart: Event\n\t\t// Fired when the user starts dragging the marker.\n\n\t\t// @event movestart: Event\n\t\t// Fired when the marker starts moving (because of dragging).\n\n\t\tthis._oldLatLng = this._marker.getLatLng();\n\n\t\t// When using ES6 imports it could not be set when `Popup` was not imported as well\n\t\tthis._marker.closePopup && this._marker.closePopup();\n\n\t\tthis._marker\n\t\t\t.fire('movestart')\n\t\t\t.fire('dragstart');\n\t},\n\n\t_onPreDrag: function (e) {\n\t\tif (this._marker.options.autoPan) {\n\t\t\tcancelAnimFrame(this._panRequest);\n\t\t\tthis._panRequest = requestAnimFrame(this._adjustPan.bind(this, e));\n\t\t}\n\t},\n\n\t_onDrag: function (e) {\n\t\tvar marker = this._marker,\n\t\t    shadow = marker._shadow,\n\t\t    iconPos = DomUtil.getPosition(marker._icon),\n\t\t    latlng = marker._map.layerPointToLatLng(iconPos);\n\n\t\t// update shadow position\n\t\tif (shadow) {\n\t\t\tDomUtil.setPosition(shadow, iconPos);\n\t\t}\n\n\t\tmarker._latlng = latlng;\n\t\te.latlng = latlng;\n\t\te.oldLatLng = this._oldLatLng;\n\n\t\t// @event drag: Event\n\t\t// Fired repeatedly while the user drags the marker.\n\t\tmarker\n\t\t    .fire('move', e)\n\t\t    .fire('drag', e);\n\t},\n\n\t_onDragEnd: function (e) {\n\t\t// @event dragend: DragEndEvent\n\t\t// Fired when the user stops dragging the marker.\n\n\t\t cancelAnimFrame(this._panRequest);\n\n\t\t// @event moveend: Event\n\t\t// Fired when the marker stops moving (because of dragging).\n\t\tdelete this._oldLatLng;\n\t\tthis._marker\n\t\t    .fire('moveend')\n\t\t    .fire('dragend', e);\n\t}\n});\n","import {Layer} from '../Layer';\r\nimport {IconDefault} from './Icon.Default';\r\nimport * as Util from '../../core/Util';\r\nimport {toLatLng as latLng} from '../../geo/LatLng';\r\nimport {toPoint as point} from '../../geometry/Point';\r\nimport * as DomUtil from '../../dom/DomUtil';\r\nimport * as DomEvent from '../../dom/DomEvent';\r\nimport {MarkerDrag} from './Marker.Drag';\r\n\r\n/*\r\n * @class Marker\r\n * @inherits Interactive layer\r\n * @aka L.Marker\r\n * L.Marker is used to display clickable/draggable icons on the map. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.marker([50.5, 30.5]).addTo(map);\r\n * ```\r\n */\r\n\r\nexport var Marker = Layer.extend({\r\n\r\n\t// @section\r\n\t// @aka Marker options\r\n\toptions: {\r\n\t\t// @option icon: Icon = *\r\n\t\t// Icon instance to use for rendering the marker.\r\n\t\t// See [Icon documentation](#L.Icon) for details on how to customize the marker icon.\r\n\t\t// If not specified, a common instance of `L.Icon.Default` is used.\r\n\t\ticon: new IconDefault(),\r\n\r\n\t\t// Option inherited from \"Interactive layer\" abstract class\r\n\t\tinteractive: true,\r\n\r\n\t\t// @option keyboard: Boolean = true\r\n\t\t// Whether the marker can be tabbed to with a keyboard and clicked by pressing enter.\r\n\t\tkeyboard: true,\r\n\r\n\t\t// @option title: String = ''\r\n\t\t// Text for the browser tooltip that appear on marker hover (no tooltip by default).\r\n\t\t// [Useful for accessibility](https://leafletjs.com/examples/accessibility/#markers-must-be-labelled).\r\n\t\ttitle: '',\r\n\r\n\t\t// @option alt: String = 'Marker'\r\n\t\t// Text for the `alt` attribute of the icon image.\r\n\t\t// [Useful for accessibility](https://leafletjs.com/examples/accessibility/#markers-must-be-labelled).\r\n\t\talt: 'Marker',\r\n\r\n\t\t// @option zIndexOffset: Number = 0\r\n\t\t// By default, marker images zIndex is set automatically based on its latitude. Use this option if you want to put the marker on top of all others (or below), specifying a high value like `1000` (or high negative value, respectively).\r\n\t\tzIndexOffset: 0,\r\n\r\n\t\t// @option opacity: Number = 1.0\r\n\t\t// The opacity of the marker.\r\n\t\topacity: 1,\r\n\r\n\t\t// @option riseOnHover: Boolean = false\r\n\t\t// If `true`, the marker will get on top of others when you hover the mouse over it.\r\n\t\triseOnHover: false,\r\n\r\n\t\t// @option riseOffset: Number = 250\r\n\t\t// The z-index offset used for the `riseOnHover` feature.\r\n\t\triseOffset: 250,\r\n\r\n\t\t// @option pane: String = 'markerPane'\r\n\t\t// `Map pane` where the markers icon will be added.\r\n\t\tpane: 'markerPane',\r\n\r\n\t\t// @option shadowPane: String = 'shadowPane'\r\n\t\t// `Map pane` where the markers shadow will be added.\r\n\t\tshadowPane: 'shadowPane',\r\n\r\n\t\t// @option bubblingMouseEvents: Boolean = false\r\n\t\t// When `true`, a mouse event on this marker will trigger the same event on the map\r\n\t\t// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).\r\n\t\tbubblingMouseEvents: false,\r\n\r\n\t\t// @option autoPanOnFocus: Boolean = true\r\n\t\t// When `true`, the map will pan whenever the marker is focused (via\r\n\t\t// e.g. pressing `tab` on the keyboard) to ensure the marker is\r\n\t\t// visible within the map's bounds\r\n\t\tautoPanOnFocus: true,\r\n\r\n\t\t// @section Draggable marker options\r\n\t\t// @option draggable: Boolean = false\r\n\t\t// Whether the marker is draggable with mouse/touch or not.\r\n\t\tdraggable: false,\r\n\r\n\t\t// @option autoPan: Boolean = false\r\n\t\t// Whether to pan the map when dragging this marker near its edge or not.\r\n\t\tautoPan: false,\r\n\r\n\t\t// @option autoPanPadding: Point = Point(50, 50)\r\n\t\t// Distance (in pixels to the left/right and to the top/bottom) of the\r\n\t\t// map edge to start panning the map.\r\n\t\tautoPanPadding: [50, 50],\r\n\r\n\t\t// @option autoPanSpeed: Number = 10\r\n\t\t// Number of pixels the map should pan by.\r\n\t\tautoPanSpeed: 10\r\n\t},\r\n\r\n\t/* @section\r\n\t *\r\n\t * In addition to [shared layer methods](#Layer) like `addTo()` and `remove()` and [popup methods](#Popup) like bindPopup() you can also use the following methods:\r\n\t */\r\n\r\n\tinitialize: function (latlng, options) {\r\n\t\tUtil.setOptions(this, options);\r\n\t\tthis._latlng = latLng(latlng);\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._zoomAnimated = this._zoomAnimated && map.options.markerZoomAnimation;\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tmap.on('zoomanim', this._animateZoom, this);\r\n\t\t}\r\n\r\n\t\tthis._initIcon();\r\n\t\tthis.update();\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tif (this.dragging && this.dragging.enabled()) {\r\n\t\t\tthis.options.draggable = true;\r\n\t\t\tthis.dragging.removeHooks();\r\n\t\t}\r\n\t\tdelete this.dragging;\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tmap.off('zoomanim', this._animateZoom, this);\r\n\t\t}\r\n\r\n\t\tthis._removeIcon();\r\n\t\tthis._removeShadow();\r\n\t},\r\n\r\n\tgetEvents: function () {\r\n\t\treturn {\r\n\t\t\tzoom: this.update,\r\n\t\t\tviewreset: this.update\r\n\t\t};\r\n\t},\r\n\r\n\t// @method getLatLng: LatLng\r\n\t// Returns the current geographical position of the marker.\r\n\tgetLatLng: function () {\r\n\t\treturn this._latlng;\r\n\t},\r\n\r\n\t// @method setLatLng(latlng: LatLng): this\r\n\t// Changes the marker position to the given point.\r\n\tsetLatLng: function (latlng) {\r\n\t\tvar oldLatLng = this._latlng;\r\n\t\tthis._latlng = latLng(latlng);\r\n\t\tthis.update();\r\n\r\n\t\t// @event move: Event\r\n\t\t// Fired when the marker is moved via [`setLatLng`](#marker-setlatlng) or by [dragging](#marker-dragging). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`.\r\n\t\treturn this.fire('move', {oldLatLng: oldLatLng, latlng: this._latlng});\r\n\t},\r\n\r\n\t// @method setZIndexOffset(offset: Number): this\r\n\t// Changes the [zIndex offset](#marker-zindexoffset) of the marker.\r\n\tsetZIndexOffset: function (offset) {\r\n\t\tthis.options.zIndexOffset = offset;\r\n\t\treturn this.update();\r\n\t},\r\n\r\n\t// @method getIcon: Icon\r\n\t// Returns the current icon used by the marker\r\n\tgetIcon: function () {\r\n\t\treturn this.options.icon;\r\n\t},\r\n\r\n\t// @method setIcon(icon: Icon): this\r\n\t// Changes the marker icon.\r\n\tsetIcon: function (icon) {\r\n\r\n\t\tthis.options.icon = icon;\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._initIcon();\r\n\t\t\tthis.update();\r\n\t\t}\r\n\r\n\t\tif (this._popup) {\r\n\t\t\tthis.bindPopup(this._popup, this._popup.options);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgetElement: function () {\r\n\t\treturn this._icon;\r\n\t},\r\n\r\n\tupdate: function () {\r\n\r\n\t\tif (this._icon && this._map) {\r\n\t\t\tvar pos = this._map.latLngToLayerPoint(this._latlng).round();\r\n\t\t\tthis._setPos(pos);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initIcon: function () {\r\n\t\tvar options = this.options,\r\n\t\t    classToAdd = 'leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide');\r\n\r\n\t\tvar icon = options.icon.createIcon(this._icon),\r\n\t\t    addIcon = false;\r\n\r\n\t\t// if we're not reusing the icon, remove the old one and init new one\r\n\t\tif (icon !== this._icon) {\r\n\t\t\tif (this._icon) {\r\n\t\t\t\tthis._removeIcon();\r\n\t\t\t}\r\n\t\t\taddIcon = true;\r\n\r\n\t\t\tif (options.title) {\r\n\t\t\t\ticon.title = options.title;\r\n\t\t\t}\r\n\r\n\t\t\tif (icon.tagName === 'IMG') {\r\n\t\t\t\ticon.alt = options.alt || '';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tDomUtil.addClass(icon, classToAdd);\r\n\r\n\t\tif (options.keyboard) {\r\n\t\t\ticon.tabIndex = '0';\r\n\t\t\ticon.setAttribute('role', 'button');\r\n\t\t}\r\n\r\n\t\tthis._icon = icon;\r\n\r\n\t\tif (options.riseOnHover) {\r\n\t\t\tthis.on({\r\n\t\t\t\tmouseover: this._bringToFront,\r\n\t\t\t\tmouseout: this._resetZIndex\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (this.options.autoPanOnFocus) {\r\n\t\t\tDomEvent.on(icon, 'focus', this._panOnFocus, this);\r\n\t\t}\r\n\r\n\t\tvar newShadow = options.icon.createShadow(this._shadow),\r\n\t\t    addShadow = false;\r\n\r\n\t\tif (newShadow !== this._shadow) {\r\n\t\t\tthis._removeShadow();\r\n\t\t\taddShadow = true;\r\n\t\t}\r\n\r\n\t\tif (newShadow) {\r\n\t\t\tDomUtil.addClass(newShadow, classToAdd);\r\n\t\t\tnewShadow.alt = '';\r\n\t\t}\r\n\t\tthis._shadow = newShadow;\r\n\r\n\r\n\t\tif (options.opacity < 1) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\r\n\r\n\t\tif (addIcon) {\r\n\t\t\tthis.getPane().appendChild(this._icon);\r\n\t\t}\r\n\t\tthis._initInteraction();\r\n\t\tif (newShadow && addShadow) {\r\n\t\t\tthis.getPane(options.shadowPane).appendChild(this._shadow);\r\n\t\t}\r\n\t},\r\n\r\n\t_removeIcon: function () {\r\n\t\tif (this.options.riseOnHover) {\r\n\t\t\tthis.off({\r\n\t\t\t\tmouseover: this._bringToFront,\r\n\t\t\t\tmouseout: this._resetZIndex\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (this.options.autoPanOnFocus) {\r\n\t\t\tDomEvent.off(this._icon, 'focus', this._panOnFocus, this);\r\n\t\t}\r\n\r\n\t\tDomUtil.remove(this._icon);\r\n\t\tthis.removeInteractiveTarget(this._icon);\r\n\r\n\t\tthis._icon = null;\r\n\t},\r\n\r\n\t_removeShadow: function () {\r\n\t\tif (this._shadow) {\r\n\t\t\tDomUtil.remove(this._shadow);\r\n\t\t}\r\n\t\tthis._shadow = null;\r\n\t},\r\n\r\n\t_setPos: function (pos) {\r\n\r\n\t\tif (this._icon) {\r\n\t\t\tDomUtil.setPosition(this._icon, pos);\r\n\t\t}\r\n\r\n\t\tif (this._shadow) {\r\n\t\t\tDomUtil.setPosition(this._shadow, pos);\r\n\t\t}\r\n\r\n\t\tthis._zIndex = pos.y + this.options.zIndexOffset;\r\n\r\n\t\tthis._resetZIndex();\r\n\t},\r\n\r\n\t_updateZIndex: function (offset) {\r\n\t\tif (this._icon) {\r\n\t\t\tthis._icon.style.zIndex = this._zIndex + offset;\r\n\t\t}\r\n\t},\r\n\r\n\t_animateZoom: function (opt) {\r\n\t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center).round();\r\n\r\n\t\tthis._setPos(pos);\r\n\t},\r\n\r\n\t_initInteraction: function () {\r\n\r\n\t\tif (!this.options.interactive) { return; }\r\n\r\n\t\tDomUtil.addClass(this._icon, 'leaflet-interactive');\r\n\r\n\t\tthis.addInteractiveTarget(this._icon);\r\n\r\n\t\tif (MarkerDrag) {\r\n\t\t\tvar draggable = this.options.draggable;\r\n\t\t\tif (this.dragging) {\r\n\t\t\t\tdraggable = this.dragging.enabled();\r\n\t\t\t\tthis.dragging.disable();\r\n\t\t\t}\r\n\r\n\t\t\tthis.dragging = new MarkerDrag(this);\r\n\r\n\t\t\tif (draggable) {\r\n\t\t\t\tthis.dragging.enable();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// @method setOpacity(opacity: Number): this\r\n\t// Changes the opacity of the marker.\r\n\tsetOpacity: function (opacity) {\r\n\t\tthis.options.opacity = opacity;\r\n\t\tif (this._map) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_updateOpacity: function () {\r\n\t\tvar opacity = this.options.opacity;\r\n\r\n\t\tif (this._icon) {\r\n\t\t\tDomUtil.setOpacity(this._icon, opacity);\r\n\t\t}\r\n\r\n\t\tif (this._shadow) {\r\n\t\t\tDomUtil.setOpacity(this._shadow, opacity);\r\n\t\t}\r\n\t},\r\n\r\n\t_bringToFront: function () {\r\n\t\tthis._updateZIndex(this.options.riseOffset);\r\n\t},\r\n\r\n\t_resetZIndex: function () {\r\n\t\tthis._updateZIndex(0);\r\n\t},\r\n\r\n\t_panOnFocus: function () {\r\n\t\tvar map = this._map;\r\n\t\tif (!map) { return; }\r\n\r\n\t\tvar iconOpts = this.options.icon.options;\r\n\t\tvar size = iconOpts.iconSize ? point(iconOpts.iconSize) : point(0, 0);\r\n\t\tvar anchor = iconOpts.iconAnchor ? point(iconOpts.iconAnchor) : point(0, 0);\r\n\r\n\t\tmap.panInside(this._latlng, {\r\n\t\t\tpaddingTopLeft: anchor,\r\n\t\t\tpaddingBottomRight: size.subtract(anchor)\r\n\t\t});\r\n\t},\r\n\r\n\t_getPopupAnchor: function () {\r\n\t\treturn this.options.icon.options.popupAnchor;\r\n\t},\r\n\r\n\t_getTooltipAnchor: function () {\r\n\t\treturn this.options.icon.options.tooltipAnchor;\r\n\t}\r\n});\r\n\r\n\r\n// factory L.marker(latlng: LatLng, options? : Marker options)\r\n\r\n// @factory L.marker(latlng: LatLng, options? : Marker options)\r\n// Instantiates a Marker object given a geographical point and optionally an options object.\r\nexport function marker(latlng, options) {\r\n\treturn new Marker(latlng, options);\r\n}\r\n","import {Layer} from '../Layer';\nimport * as Util from '../../core/Util';\n\n/*\n * @class Path\n * @aka L.Path\n * @inherits Interactive layer\n *\n * An abstract class that contains options and constants shared between vector\n * overlays (Polygon, Polyline, Circle). Do not use it directly. Extends `Layer`.\n */\n\nexport var Path = Layer.extend({\n\n\t// @section\n\t// @aka Path options\n\toptions: {\n\t\t// @option stroke: Boolean = true\n\t\t// Whether to draw stroke along the path. Set it to `false` to disable borders on polygons or circles.\n\t\tstroke: true,\n\n\t\t// @option color: String = '#3388ff'\n\t\t// Stroke color\n\t\tcolor: '#3388ff',\n\n\t\t// @option weight: Number = 3\n\t\t// Stroke width in pixels\n\t\tweight: 3,\n\n\t\t// @option opacity: Number = 1.0\n\t\t// Stroke opacity\n\t\topacity: 1,\n\n\t\t// @option lineCap: String= 'round'\n\t\t// A string that defines [shape to be used at the end](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linecap) of the stroke.\n\t\tlineCap: 'round',\n\n\t\t// @option lineJoin: String = 'round'\n\t\t// A string that defines [shape to be used at the corners](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linejoin) of the stroke.\n\t\tlineJoin: 'round',\n\n\t\t// @option dashArray: String = null\n\t\t// A string that defines the stroke [dash pattern](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dasharray). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).\n\t\tdashArray: null,\n\n\t\t// @option dashOffset: String = null\n\t\t// A string that defines the [distance into the dash pattern to start the dash](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dashoffset). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).\n\t\tdashOffset: null,\n\n\t\t// @option fill: Boolean = depends\n\t\t// Whether to fill the path with color. Set it to `false` to disable filling on polygons or circles.\n\t\tfill: false,\n\n\t\t// @option fillColor: String = *\n\t\t// Fill color. Defaults to the value of the [`color`](#path-color) option\n\t\tfillColor: null,\n\n\t\t// @option fillOpacity: Number = 0.2\n\t\t// Fill opacity.\n\t\tfillOpacity: 0.2,\n\n\t\t// @option fillRule: String = 'evenodd'\n\t\t// A string that defines [how the inside of a shape](https://developer.mozilla.org/docs/Web/SVG/Attribute/fill-rule) is determined.\n\t\tfillRule: 'evenodd',\n\n\t\t// className: '',\n\n\t\t// Option inherited from \"Interactive layer\" abstract class\n\t\tinteractive: true,\n\n\t\t// @option bubblingMouseEvents: Boolean = true\n\t\t// When `true`, a mouse event on this path will trigger the same event on the map\n\t\t// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).\n\t\tbubblingMouseEvents: true\n\t},\n\n\tbeforeAdd: function (map) {\n\t\t// Renderer is set here because we need to call renderer.getEvents\n\t\t// before this.getEvents.\n\t\tthis._renderer = map.getRenderer(this);\n\t},\n\n\tonAdd: function () {\n\t\tthis._renderer._initPath(this);\n\t\tthis._reset();\n\t\tthis._renderer._addPath(this);\n\t},\n\n\tonRemove: function () {\n\t\tthis._renderer._removePath(this);\n\t},\n\n\t// @method redraw(): this\n\t// Redraws the layer. Sometimes useful after you changed the coordinates that the path uses.\n\tredraw: function () {\n\t\tif (this._map) {\n\t\t\tthis._renderer._updatePath(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method setStyle(style: Path options): this\n\t// Changes the appearance of a Path based on the options in the `Path options` object.\n\tsetStyle: function (style) {\n\t\tUtil.setOptions(this, style);\n\t\tif (this._renderer) {\n\t\t\tthis._renderer._updateStyle(this);\n\t\t\tif (this.options.stroke && style && Object.prototype.hasOwnProperty.call(style, 'weight')) {\n\t\t\t\tthis._updateBounds();\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method bringToFront(): this\n\t// Brings the layer to the top of all path layers.\n\tbringToFront: function () {\n\t\tif (this._renderer) {\n\t\t\tthis._renderer._bringToFront(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method bringToBack(): this\n\t// Brings the layer to the bottom of all path layers.\n\tbringToBack: function () {\n\t\tif (this._renderer) {\n\t\t\tthis._renderer._bringToBack(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\tgetElement: function () {\n\t\treturn this._path;\n\t},\n\n\t_reset: function () {\n\t\t// defined in child classes\n\t\tthis._project();\n\t\tthis._update();\n\t},\n\n\t_clickTolerance: function () {\n\t\t// used when doing hit detection for Canvas layers\n\t\treturn (this.options.stroke ? this.options.weight / 2 : 0) +\n\t\t  (this._renderer.options.tolerance || 0);\n\t}\n});\n","import {Path} from './Path';\nimport * as Util from '../../core/Util';\nimport {toLatLng} from '../../geo/LatLng';\nimport {Bounds} from '../../geometry/Bounds';\n\n\n/*\n * @class CircleMarker\n * @aka L.CircleMarker\n * @inherits Path\n *\n * A circle of a fixed size with radius specified in pixels. Extends `Path`.\n */\n\nexport var CircleMarker = Path.extend({\n\n\t// @section\n\t// @aka CircleMarker options\n\toptions: {\n\t\tfill: true,\n\n\t\t// @option radius: Number = 10\n\t\t// Radius of the circle marker, in pixels\n\t\tradius: 10\n\t},\n\n\tinitialize: function (latlng, options) {\n\t\tUtil.setOptions(this, options);\n\t\tthis._latlng = toLatLng(latlng);\n\t\tthis._radius = this.options.radius;\n\t},\n\n\t// @method setLatLng(latLng: LatLng): this\n\t// Sets the position of a circle marker to a new location.\n\tsetLatLng: function (latlng) {\n\t\tvar oldLatLng = this._latlng;\n\t\tthis._latlng = toLatLng(latlng);\n\t\tthis.redraw();\n\n\t\t// @event move: Event\n\t\t// Fired when the marker is moved via [`setLatLng`](#circlemarker-setlatlng). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`.\n\t\treturn this.fire('move', {oldLatLng: oldLatLng, latlng: this._latlng});\n\t},\n\n\t// @method getLatLng(): LatLng\n\t// Returns the current geographical position of the circle marker\n\tgetLatLng: function () {\n\t\treturn this._latlng;\n\t},\n\n\t// @method setRadius(radius: Number): this\n\t// Sets the radius of a circle marker. Units are in pixels.\n\tsetRadius: function (radius) {\n\t\tthis.options.radius = this._radius = radius;\n\t\treturn this.redraw();\n\t},\n\n\t// @method getRadius(): Number\n\t// Returns the current radius of the circle\n\tgetRadius: function () {\n\t\treturn this._radius;\n\t},\n\n\tsetStyle : function (options) {\n\t\tvar radius = options && options.radius || this._radius;\n\t\tPath.prototype.setStyle.call(this, options);\n\t\tthis.setRadius(radius);\n\t\treturn this;\n\t},\n\n\t_project: function () {\n\t\tthis._point = this._map.latLngToLayerPoint(this._latlng);\n\t\tthis._updateBounds();\n\t},\n\n\t_updateBounds: function () {\n\t\tvar r = this._radius,\n\t\t    r2 = this._radiusY || r,\n\t\t    w = this._clickTolerance(),\n\t\t    p = [r + w, r2 + w];\n\t\tthis._pxBounds = new Bounds(this._point.subtract(p), this._point.add(p));\n\t},\n\n\t_update: function () {\n\t\tif (this._map) {\n\t\t\tthis._updatePath();\n\t\t}\n\t},\n\n\t_updatePath: function () {\n\t\tthis._renderer._updateCircle(this);\n\t},\n\n\t_empty: function () {\n\t\treturn this._radius && !this._renderer._bounds.intersects(this._pxBounds);\n\t},\n\n\t// Needed by the `Canvas` renderer for interactivity\n\t_containsPoint: function (p) {\n\t\treturn p.distanceTo(this._point) <= this._radius + this._clickTolerance();\n\t}\n});\n\n\n// @factory L.circleMarker(latlng: LatLng, options?: CircleMarker options)\n// Instantiates a circle marker object given a geographical point, and an optional options object.\nexport function circleMarker(latlng, options) {\n\treturn new CircleMarker(latlng, options);\n}\n","import {CircleMarker} from './CircleMarker';\nimport {Path} from './Path';\nimport * as Util from '../../core/Util';\nimport {toLatLng} from '../../geo/LatLng';\nimport {LatLngBounds} from '../../geo/LatLngBounds';\nimport {Earth} from '../../geo/crs/CRS.Earth';\n\n\n/*\n * @class Circle\n * @aka L.Circle\n * @inherits CircleMarker\n *\n * A class for drawing circle overlays on a map. Extends `CircleMarker`.\n *\n * It's an approximation and starts to diverge from a real circle closer to poles (due to projection distortion).\n *\n * @example\n *\n * ```js\n * L.circle([50.5, 30.5], {radius: 200}).addTo(map);\n * ```\n */\n\nexport var Circle = CircleMarker.extend({\n\n\tinitialize: function (latlng, options, legacyOptions) {\n\t\tif (typeof options === 'number') {\n\t\t\t// Backwards compatibility with 0.7.x factory (latlng, radius, options?)\n\t\t\toptions = Util.extend({}, legacyOptions, {radius: options});\n\t\t}\n\t\tUtil.setOptions(this, options);\n\t\tthis._latlng = toLatLng(latlng);\n\n\t\tif (isNaN(this.options.radius)) { throw new Error('Circle radius cannot be NaN'); }\n\n\t\t// @section\n\t\t// @aka Circle options\n\t\t// @option radius: Number; Radius of the circle, in meters.\n\t\tthis._mRadius = this.options.radius;\n\t},\n\n\t// @method setRadius(radius: Number): this\n\t// Sets the radius of a circle. Units are in meters.\n\tsetRadius: function (radius) {\n\t\tthis._mRadius = radius;\n\t\treturn this.redraw();\n\t},\n\n\t// @method getRadius(): Number\n\t// Returns the current radius of a circle. Units are in meters.\n\tgetRadius: function () {\n\t\treturn this._mRadius;\n\t},\n\n\t// @method getBounds(): LatLngBounds\n\t// Returns the `LatLngBounds` of the path.\n\tgetBounds: function () {\n\t\tvar half = [this._radius, this._radiusY || this._radius];\n\n\t\treturn new LatLngBounds(\n\t\t\tthis._map.layerPointToLatLng(this._point.subtract(half)),\n\t\t\tthis._map.layerPointToLatLng(this._point.add(half)));\n\t},\n\n\tsetStyle: Path.prototype.setStyle,\n\n\t_project: function () {\n\n\t\tvar lng = this._latlng.lng,\n\t\t    lat = this._latlng.lat,\n\t\t    map = this._map,\n\t\t    crs = map.options.crs;\n\n\t\tif (crs.distance === Earth.distance) {\n\t\t\tvar d = Math.PI / 180,\n\t\t\t    latR = (this._mRadius / Earth.R) / d,\n\t\t\t    top = map.project([lat + latR, lng]),\n\t\t\t    bottom = map.project([lat - latR, lng]),\n\t\t\t    p = top.add(bottom).divideBy(2),\n\t\t\t    lat2 = map.unproject(p).lat,\n\t\t\t    lngR = Math.acos((Math.cos(latR * d) - Math.sin(lat * d) * Math.sin(lat2 * d)) /\n\t\t\t            (Math.cos(lat * d) * Math.cos(lat2 * d))) / d;\n\n\t\t\tif (isNaN(lngR) || lngR === 0) {\n\t\t\t\tlngR = latR / Math.cos(Math.PI / 180 * lat); // Fallback for edge case, #2425\n\t\t\t}\n\n\t\t\tthis._point = p.subtract(map.getPixelOrigin());\n\t\t\tthis._radius = isNaN(lngR) ? 0 : p.x - map.project([lat2, lng - lngR]).x;\n\t\t\tthis._radiusY = p.y - top.y;\n\n\t\t} else {\n\t\t\tvar latlng2 = crs.unproject(crs.project(this._latlng).subtract([this._mRadius, 0]));\n\n\t\t\tthis._point = map.latLngToLayerPoint(this._latlng);\n\t\t\tthis._radius = this._point.x - map.latLngToLayerPoint(latlng2).x;\n\t\t}\n\n\t\tthis._updateBounds();\n\t}\n});\n\n// @factory L.circle(latlng: LatLng, options?: Circle options)\n// Instantiates a circle object given a geographical point, and an options object\n// which contains the circle radius.\n// @alternative\n// @factory L.circle(latlng: LatLng, radius: Number, options?: Circle options)\n// Obsolete way of instantiating a circle, for compatibility with 0.7.x code.\n// Do not use in new applications or plugins.\nexport function circle(latlng, options, legacyOptions) {\n\treturn new Circle(latlng, options, legacyOptions);\n}\n","import {Path} from './Path';\nimport * as Util from '../../core/Util';\nimport * as LineUtil from '../../geometry/LineUtil';\nimport {LatLng, toLatLng} from '../../geo/LatLng';\nimport {LatLngBounds} from '../../geo/LatLngBounds';\nimport {Bounds} from '../../geometry/Bounds';\nimport {Point} from '../../geometry/Point';\n\n/*\n * @class Polyline\n * @aka L.Polyline\n * @inherits Path\n *\n * A class for drawing polyline overlays on a map. Extends `Path`.\n *\n * @example\n *\n * ```js\n * // create a red polyline from an array of LatLng points\n * var latlngs = [\n * \t[45.51, -122.68],\n * \t[37.77, -122.43],\n * \t[34.04, -118.2]\n * ];\n *\n * var polyline = L.polyline(latlngs, {color: 'red'}).addTo(map);\n *\n * // zoom the map to the polyline\n * map.fitBounds(polyline.getBounds());\n * ```\n *\n * You can also pass a multi-dimensional array to represent a `MultiPolyline` shape:\n *\n * ```js\n * // create a red polyline from an array of arrays of LatLng points\n * var latlngs = [\n * \t[[45.51, -122.68],\n * \t [37.77, -122.43],\n * \t [34.04, -118.2]],\n * \t[[40.78, -73.91],\n * \t [41.83, -87.62],\n * \t [32.76, -96.72]]\n * ];\n * ```\n */\n\n\nexport var Polyline = Path.extend({\n\n\t// @section\n\t// @aka Polyline options\n\toptions: {\n\t\t// @option smoothFactor: Number = 1.0\n\t\t// How much to simplify the polyline on each zoom level. More means\n\t\t// better performance and smoother look, and less means more accurate representation.\n\t\tsmoothFactor: 1.0,\n\n\t\t// @option noClip: Boolean = false\n\t\t// Disable polyline clipping.\n\t\tnoClip: false\n\t},\n\n\tinitialize: function (latlngs, options) {\n\t\tUtil.setOptions(this, options);\n\t\tthis._setLatLngs(latlngs);\n\t},\n\n\t// @method getLatLngs(): LatLng[]\n\t// Returns an array of the points in the path, or nested arrays of points in case of multi-polyline.\n\tgetLatLngs: function () {\n\t\treturn this._latlngs;\n\t},\n\n\t// @method setLatLngs(latlngs: LatLng[]): this\n\t// Replaces all the points in the polyline with the given array of geographical points.\n\tsetLatLngs: function (latlngs) {\n\t\tthis._setLatLngs(latlngs);\n\t\treturn this.redraw();\n\t},\n\n\t// @method isEmpty(): Boolean\n\t// Returns `true` if the Polyline has no LatLngs.\n\tisEmpty: function () {\n\t\treturn !this._latlngs.length;\n\t},\n\n\t// @method closestLayerPoint(p: Point): Point\n\t// Returns the point closest to `p` on the Polyline.\n\tclosestLayerPoint: function (p) {\n\t\tvar minDistance = Infinity,\n\t\t    minPoint = null,\n\t\t    closest = LineUtil._sqClosestPointOnSegment,\n\t\t    p1, p2;\n\n\t\tfor (var j = 0, jLen = this._parts.length; j < jLen; j++) {\n\t\t\tvar points = this._parts[j];\n\n\t\t\tfor (var i = 1, len = points.length; i < len; i++) {\n\t\t\t\tp1 = points[i - 1];\n\t\t\t\tp2 = points[i];\n\n\t\t\t\tvar sqDist = closest(p, p1, p2, true);\n\n\t\t\t\tif (sqDist < minDistance) {\n\t\t\t\t\tminDistance = sqDist;\n\t\t\t\t\tminPoint = closest(p, p1, p2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (minPoint) {\n\t\t\tminPoint.distance = Math.sqrt(minDistance);\n\t\t}\n\t\treturn minPoint;\n\t},\n\n\t// @method getCenter(): LatLng\n\t// Returns the center ([centroid](https://en.wikipedia.org/wiki/Centroid)) of the polyline.\n\tgetCenter: function () {\n\t\t// throws error when not yet added to map as this center calculation requires projected coordinates\n\t\tif (!this._map) {\n\t\t\tthrow new Error('Must add layer to map before using getCenter()');\n\t\t}\n\t\treturn LineUtil.polylineCenter(this._defaultShape(), this._map.options.crs);\n\t},\n\n\t// @method getBounds(): LatLngBounds\n\t// Returns the `LatLngBounds` of the path.\n\tgetBounds: function () {\n\t\treturn this._bounds;\n\t},\n\n\t// @method addLatLng(latlng: LatLng, latlngs?: LatLng[]): this\n\t// Adds a given point to the polyline. By default, adds to the first ring of\n\t// the polyline in case of a multi-polyline, but can be overridden by passing\n\t// a specific ring as a LatLng array (that you can earlier access with [`getLatLngs`](#polyline-getlatlngs)).\n\taddLatLng: function (latlng, latlngs) {\n\t\tlatlngs = latlngs || this._defaultShape();\n\t\tlatlng = toLatLng(latlng);\n\t\tlatlngs.push(latlng);\n\t\tthis._bounds.extend(latlng);\n\t\treturn this.redraw();\n\t},\n\n\t_setLatLngs: function (latlngs) {\n\t\tthis._bounds = new LatLngBounds();\n\t\tthis._latlngs = this._convertLatLngs(latlngs);\n\t},\n\n\t_defaultShape: function () {\n\t\treturn LineUtil.isFlat(this._latlngs) ? this._latlngs : this._latlngs[0];\n\t},\n\n\t// recursively convert latlngs input into actual LatLng instances; calculate bounds along the way\n\t_convertLatLngs: function (latlngs) {\n\t\tvar result = [],\n\t\t    flat = LineUtil.isFlat(latlngs);\n\n\t\tfor (var i = 0, len = latlngs.length; i < len; i++) {\n\t\t\tif (flat) {\n\t\t\t\tresult[i] = toLatLng(latlngs[i]);\n\t\t\t\tthis._bounds.extend(result[i]);\n\t\t\t} else {\n\t\t\t\tresult[i] = this._convertLatLngs(latlngs[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t},\n\n\t_project: function () {\n\t\tvar pxBounds = new Bounds();\n\t\tthis._rings = [];\n\t\tthis._projectLatlngs(this._latlngs, this._rings, pxBounds);\n\n\t\tif (this._bounds.isValid() && pxBounds.isValid()) {\n\t\t\tthis._rawPxBounds = pxBounds;\n\t\t\tthis._updateBounds();\n\t\t}\n\t},\n\n\t_updateBounds: function () {\n\t\tvar w = this._clickTolerance(),\n\t\t    p = new Point(w, w);\n\n\t\tif (!this._rawPxBounds) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._pxBounds = new Bounds([\n\t\t\tthis._rawPxBounds.min.subtract(p),\n\t\t\tthis._rawPxBounds.max.add(p)\n\t\t]);\n\t},\n\n\t// recursively turns latlngs into a set of rings with projected coordinates\n\t_projectLatlngs: function (latlngs, result, projectedBounds) {\n\t\tvar flat = latlngs[0] instanceof LatLng,\n\t\t    len = latlngs.length,\n\t\t    i, ring;\n\n\t\tif (flat) {\n\t\t\tring = [];\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tring[i] = this._map.latLngToLayerPoint(latlngs[i]);\n\t\t\t\tprojectedBounds.extend(ring[i]);\n\t\t\t}\n\t\t\tresult.push(ring);\n\t\t} else {\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tthis._projectLatlngs(latlngs[i], result, projectedBounds);\n\t\t\t}\n\t\t}\n\t},\n\n\t// clip polyline by renderer bounds so that we have less to render for performance\n\t_clipPoints: function () {\n\t\tvar bounds = this._renderer._bounds;\n\n\t\tthis._parts = [];\n\t\tif (!this._pxBounds || !this._pxBounds.intersects(bounds)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.options.noClip) {\n\t\t\tthis._parts = this._rings;\n\t\t\treturn;\n\t\t}\n\n\t\tvar parts = this._parts,\n\t\t    i, j, k, len, len2, segment, points;\n\n\t\tfor (i = 0, k = 0, len = this._rings.length; i < len; i++) {\n\t\t\tpoints = this._rings[i];\n\n\t\t\tfor (j = 0, len2 = points.length; j < len2 - 1; j++) {\n\t\t\t\tsegment = LineUtil.clipSegment(points[j], points[j + 1], bounds, j, true);\n\n\t\t\t\tif (!segment) { continue; }\n\n\t\t\t\tparts[k] = parts[k] || [];\n\t\t\t\tparts[k].push(segment[0]);\n\n\t\t\t\t// if segment goes out of screen, or it's the last one, it's the end of the line part\n\t\t\t\tif ((segment[1] !== points[j + 1]) || (j === len2 - 2)) {\n\t\t\t\t\tparts[k].push(segment[1]);\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// simplify each clipped part of the polyline for performance\n\t_simplifyPoints: function () {\n\t\tvar parts = this._parts,\n\t\t    tolerance = this.options.smoothFactor;\n\n\t\tfor (var i = 0, len = parts.length; i < len; i++) {\n\t\t\tparts[i] = LineUtil.simplify(parts[i], tolerance);\n\t\t}\n\t},\n\n\t_update: function () {\n\t\tif (!this._map) { return; }\n\n\t\tthis._clipPoints();\n\t\tthis._simplifyPoints();\n\t\tthis._updatePath();\n\t},\n\n\t_updatePath: function () {\n\t\tthis._renderer._updatePoly(this);\n\t},\n\n\t// Needed by the `Canvas` renderer for interactivity\n\t_containsPoint: function (p, closed) {\n\t\tvar i, j, k, len, len2, part,\n\t\t    w = this._clickTolerance();\n\n\t\tif (!this._pxBounds || !this._pxBounds.contains(p)) { return false; }\n\n\t\t// hit detection for polylines\n\t\tfor (i = 0, len = this._parts.length; i < len; i++) {\n\t\t\tpart = this._parts[i];\n\n\t\t\tfor (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {\n\t\t\t\tif (!closed && (j === 0)) { continue; }\n\n\t\t\t\tif (LineUtil.pointToSegmentDistance(p, part[k], part[j]) <= w) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n});\n\n// @factory L.polyline(latlngs: LatLng[], options?: Polyline options)\n// Instantiates a polyline object given an array of geographical points and\n// optionally an options object. You can create a `Polyline` object with\n// multiple separate lines (`MultiPolyline`) by passing an array of arrays\n// of geographic points.\nexport function polyline(latlngs, options) {\n\treturn new Polyline(latlngs, options);\n}\n\n// Retrocompat. Allow plugins to support Leaflet versions before and after 1.1.\nPolyline._flat = LineUtil._flat;\n","import {Polyline} from './Polyline';\nimport {LatLng} from '../../geo/LatLng';\nimport * as LineUtil from '../../geometry/LineUtil';\nimport {Point} from '../../geometry/Point';\nimport {Bounds} from '../../geometry/Bounds';\nimport * as PolyUtil from '../../geometry/PolyUtil';\n\n/*\n * @class Polygon\n * @aka L.Polygon\n * @inherits Polyline\n *\n * A class for drawing polygon overlays on a map. Extends `Polyline`.\n *\n * Note that points you pass when creating a polygon shouldn't have an additional last point equal to the first one — it's better to filter out such points.\n *\n *\n * @example\n *\n * ```js\n * // create a red polygon from an array of LatLng points\n * var latlngs = [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]];\n *\n * var polygon = L.polygon(latlngs, {color: 'red'}).addTo(map);\n *\n * // zoom the map to the polygon\n * map.fitBounds(polygon.getBounds());\n * ```\n *\n * You can also pass an array of arrays of latlngs, with the first array representing the outer shape and the other arrays representing holes in the outer shape:\n *\n * ```js\n * var latlngs = [\n *   [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring\n *   [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole\n * ];\n * ```\n *\n * Additionally, you can pass a multi-dimensional array to represent a MultiPolygon shape.\n *\n * ```js\n * var latlngs = [\n *   [ // first polygon\n *     [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring\n *     [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole\n *   ],\n *   [ // second polygon\n *     [[41, -111.03],[45, -111.04],[45, -104.05],[41, -104.05]]\n *   ]\n * ];\n * ```\n */\n\nexport var Polygon = Polyline.extend({\n\n\toptions: {\n\t\tfill: true\n\t},\n\n\tisEmpty: function () {\n\t\treturn !this._latlngs.length || !this._latlngs[0].length;\n\t},\n\n\t// @method getCenter(): LatLng\n\t// Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the Polygon.\n\tgetCenter: function () {\n\t\t// throws error when not yet added to map as this center calculation requires projected coordinates\n\t\tif (!this._map) {\n\t\t\tthrow new Error('Must add layer to map before using getCenter()');\n\t\t}\n\t\treturn PolyUtil.polygonCenter(this._defaultShape(), this._map.options.crs);\n\t},\n\n\t_convertLatLngs: function (latlngs) {\n\t\tvar result = Polyline.prototype._convertLatLngs.call(this, latlngs),\n\t\t    len = result.length;\n\n\t\t// remove last point if it equals first one\n\t\tif (len >= 2 && result[0] instanceof LatLng && result[0].equals(result[len - 1])) {\n\t\t\tresult.pop();\n\t\t}\n\t\treturn result;\n\t},\n\n\t_setLatLngs: function (latlngs) {\n\t\tPolyline.prototype._setLatLngs.call(this, latlngs);\n\t\tif (LineUtil.isFlat(this._latlngs)) {\n\t\t\tthis._latlngs = [this._latlngs];\n\t\t}\n\t},\n\n\t_defaultShape: function () {\n\t\treturn LineUtil.isFlat(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0];\n\t},\n\n\t_clipPoints: function () {\n\t\t// polygons need a different clipping algorithm so we redefine that\n\n\t\tvar bounds = this._renderer._bounds,\n\t\t    w = this.options.weight,\n\t\t    p = new Point(w, w);\n\n\t\t// increase clip padding by stroke width to avoid stroke on clip edges\n\t\tbounds = new Bounds(bounds.min.subtract(p), bounds.max.add(p));\n\n\t\tthis._parts = [];\n\t\tif (!this._pxBounds || !this._pxBounds.intersects(bounds)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.options.noClip) {\n\t\t\tthis._parts = this._rings;\n\t\t\treturn;\n\t\t}\n\n\t\tfor (var i = 0, len = this._rings.length, clipped; i < len; i++) {\n\t\t\tclipped = PolyUtil.clipPolygon(this._rings[i], bounds, true);\n\t\t\tif (clipped.length) {\n\t\t\t\tthis._parts.push(clipped);\n\t\t\t}\n\t\t}\n\t},\n\n\t_updatePath: function () {\n\t\tthis._renderer._updatePoly(this, true);\n\t},\n\n\t// Needed by the `Canvas` renderer for interactivity\n\t_containsPoint: function (p) {\n\t\tvar inside = false,\n\t\t    part, p1, p2, i, j, k, len, len2;\n\n\t\tif (!this._pxBounds || !this._pxBounds.contains(p)) { return false; }\n\n\t\t// ray casting algorithm for detecting if point is in polygon\n\t\tfor (i = 0, len = this._parts.length; i < len; i++) {\n\t\t\tpart = this._parts[i];\n\n\t\t\tfor (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {\n\t\t\t\tp1 = part[j];\n\t\t\t\tp2 = part[k];\n\n\t\t\t\tif (((p1.y > p.y) !== (p2.y > p.y)) && (p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x)) {\n\t\t\t\t\tinside = !inside;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// also check if it's on polygon stroke\n\t\treturn inside || Polyline.prototype._containsPoint.call(this, p, true);\n\t}\n\n});\n\n\n// @factory L.polygon(latlngs: LatLng[], options?: Polyline options)\nexport function polygon(latlngs, options) {\n\treturn new Polygon(latlngs, options);\n}\n","import {LayerGroup} from './LayerGroup';\r\nimport {FeatureGroup} from './FeatureGroup';\r\nimport * as Util from '../core/Util';\r\nimport {Marker} from './marker/Marker';\r\nimport {Circle} from './vector/Circle';\r\nimport {CircleMarker} from './vector/CircleMarker';\r\nimport {Polyline} from './vector/Polyline';\r\nimport {Polygon} from './vector/Polygon';\r\nimport {LatLng} from '../geo/LatLng';\r\nimport * as LineUtil from '../geometry/LineUtil';\r\nimport {toLatLng} from '../geo/LatLng';\r\n\r\n\r\n/*\r\n * @class GeoJSON\r\n * @aka L.GeoJSON\r\n * @inherits FeatureGroup\r\n *\r\n * Represents a GeoJSON object or an array of GeoJSON objects. Allows you to parse\r\n * GeoJSON data and display it on the map. Extends `FeatureGroup`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.geoJSON(data, {\r\n * \tstyle: function (feature) {\r\n * \t\treturn {color: feature.properties.color};\r\n * \t}\r\n * }).bindPopup(function (layer) {\r\n * \treturn layer.feature.properties.description;\r\n * }).addTo(map);\r\n * ```\r\n */\r\n\r\nexport var GeoJSON = FeatureGroup.extend({\r\n\r\n\t/* @section\r\n\t * @aka GeoJSON options\r\n\t *\r\n\t * @option pointToLayer: Function = *\r\n\t * A `Function` defining how GeoJSON points spawn Leaflet layers. It is internally\r\n\t * called when data is added, passing the GeoJSON point feature and its `LatLng`.\r\n\t * The default is to spawn a default `Marker`:\r\n\t * ```js\r\n\t * function(geoJsonPoint, latlng) {\r\n\t * \treturn L.marker(latlng);\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @option style: Function = *\r\n\t * A `Function` defining the `Path options` for styling GeoJSON lines and polygons,\r\n\t * called internally when data is added.\r\n\t * The default value is to not override any defaults:\r\n\t * ```js\r\n\t * function (geoJsonFeature) {\r\n\t * \treturn {}\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @option onEachFeature: Function = *\r\n\t * A `Function` that will be called once for each created `Feature`, after it has\r\n\t * been created and styled. Useful for attaching events and popups to features.\r\n\t * The default is to do nothing with the newly created layers:\r\n\t * ```js\r\n\t * function (feature, layer) {}\r\n\t * ```\r\n\t *\r\n\t * @option filter: Function = *\r\n\t * A `Function` that will be used to decide whether to include a feature or not.\r\n\t * The default is to include all features:\r\n\t * ```js\r\n\t * function (geoJsonFeature) {\r\n\t * \treturn true;\r\n\t * }\r\n\t * ```\r\n\t * Note: dynamically changing the `filter` option will have effect only on newly\r\n\t * added data. It will _not_ re-evaluate already included features.\r\n\t *\r\n\t * @option coordsToLatLng: Function = *\r\n\t * A `Function` that will be used for converting GeoJSON coordinates to `LatLng`s.\r\n\t * The default is the `coordsToLatLng` static method.\r\n\t *\r\n\t * @option markersInheritOptions: Boolean = false\r\n\t * Whether default Markers for \"Point\" type Features inherit from group options.\r\n\t */\r\n\r\n\tinitialize: function (geojson, options) {\r\n\t\tUtil.setOptions(this, options);\r\n\r\n\t\tthis._layers = {};\r\n\r\n\t\tif (geojson) {\r\n\t\t\tthis.addData(geojson);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method addData( <GeoJSON> data ): this\r\n\t// Adds a GeoJSON object to the layer.\r\n\taddData: function (geojson) {\r\n\t\tvar features = Util.isArray(geojson) ? geojson : geojson.features,\r\n\t\t    i, len, feature;\r\n\r\n\t\tif (features) {\r\n\t\t\tfor (i = 0, len = features.length; i < len; i++) {\r\n\t\t\t\t// only add this if geometry or geometries are set and not null\r\n\t\t\t\tfeature = features[i];\r\n\t\t\t\tif (feature.geometries || feature.geometry || feature.features || feature.coordinates) {\r\n\t\t\t\t\tthis.addData(feature);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tvar options = this.options;\r\n\r\n\t\tif (options.filter && !options.filter(geojson)) { return this; }\r\n\r\n\t\tvar layer = geometryToLayer(geojson, options);\r\n\t\tif (!layer) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tlayer.feature = asFeature(geojson);\r\n\r\n\t\tlayer.defaultOptions = layer.options;\r\n\t\tthis.resetStyle(layer);\r\n\r\n\t\tif (options.onEachFeature) {\r\n\t\t\toptions.onEachFeature(geojson, layer);\r\n\t\t}\r\n\r\n\t\treturn this.addLayer(layer);\r\n\t},\r\n\r\n\t// @method resetStyle( <Path> layer? ): this\r\n\t// Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events.\r\n\t// If `layer` is omitted, the style of all features in the current layer is reset.\r\n\tresetStyle: function (layer) {\r\n\t\tif (layer === undefined) {\r\n\t\t\treturn this.eachLayer(this.resetStyle, this);\r\n\t\t}\r\n\t\t// reset any custom styles\r\n\t\tlayer.options = Util.extend({}, layer.defaultOptions);\r\n\t\tthis._setLayerStyle(layer, this.options.style);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setStyle( <Function> style ): this\r\n\t// Changes styles of GeoJSON vector layers with the given style function.\r\n\tsetStyle: function (style) {\r\n\t\treturn this.eachLayer(function (layer) {\r\n\t\t\tthis._setLayerStyle(layer, style);\r\n\t\t}, this);\r\n\t},\r\n\r\n\t_setLayerStyle: function (layer, style) {\r\n\t\tif (layer.setStyle) {\r\n\t\t\tif (typeof style === 'function') {\r\n\t\t\t\tstyle = style(layer.feature);\r\n\t\t\t}\r\n\t\t\tlayer.setStyle(style);\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// @section\r\n// There are several static functions which can be called without instantiating L.GeoJSON:\r\n\r\n// @function geometryToLayer(featureData: Object, options?: GeoJSON options): Layer\r\n// Creates a `Layer` from a given GeoJSON feature. Can use a custom\r\n// [`pointToLayer`](#geojson-pointtolayer) and/or [`coordsToLatLng`](#geojson-coordstolatlng)\r\n// functions if provided as options.\r\nexport function geometryToLayer(geojson, options) {\r\n\r\n\tvar geometry = geojson.type === 'Feature' ? geojson.geometry : geojson,\r\n\t    coords = geometry ? geometry.coordinates : null,\r\n\t    layers = [],\r\n\t    pointToLayer = options && options.pointToLayer,\r\n\t    _coordsToLatLng = options && options.coordsToLatLng || coordsToLatLng,\r\n\t    latlng, latlngs, i, len;\r\n\r\n\tif (!coords && !geometry) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tswitch (geometry.type) {\r\n\tcase 'Point':\r\n\t\tlatlng = _coordsToLatLng(coords);\r\n\t\treturn _pointToLayer(pointToLayer, geojson, latlng, options);\r\n\r\n\tcase 'MultiPoint':\r\n\t\tfor (i = 0, len = coords.length; i < len; i++) {\r\n\t\t\tlatlng = _coordsToLatLng(coords[i]);\r\n\t\t\tlayers.push(_pointToLayer(pointToLayer, geojson, latlng, options));\r\n\t\t}\r\n\t\treturn new FeatureGroup(layers);\r\n\r\n\tcase 'LineString':\r\n\tcase 'MultiLineString':\r\n\t\tlatlngs = coordsToLatLngs(coords, geometry.type === 'LineString' ? 0 : 1, _coordsToLatLng);\r\n\t\treturn new Polyline(latlngs, options);\r\n\r\n\tcase 'Polygon':\r\n\tcase 'MultiPolygon':\r\n\t\tlatlngs = coordsToLatLngs(coords, geometry.type === 'Polygon' ? 1 : 2, _coordsToLatLng);\r\n\t\treturn new Polygon(latlngs, options);\r\n\r\n\tcase 'GeometryCollection':\r\n\t\tfor (i = 0, len = geometry.geometries.length; i < len; i++) {\r\n\t\t\tvar geoLayer = geometryToLayer({\r\n\t\t\t\tgeometry: geometry.geometries[i],\r\n\t\t\t\ttype: 'Feature',\r\n\t\t\t\tproperties: geojson.properties\r\n\t\t\t}, options);\r\n\r\n\t\t\tif (geoLayer) {\r\n\t\t\t\tlayers.push(geoLayer);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new FeatureGroup(layers);\r\n\r\n\tcase 'FeatureCollection':\r\n\t\tfor (i = 0, len = geometry.features.length; i < len; i++) {\r\n\t\t\tvar featureLayer = geometryToLayer(geometry.features[i], options);\r\n\r\n\t\t\tif (featureLayer) {\r\n\t\t\t\tlayers.push(featureLayer);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new FeatureGroup(layers);\r\n\r\n\tdefault:\r\n\t\tthrow new Error('Invalid GeoJSON object.');\r\n\t}\r\n}\r\n\r\nfunction _pointToLayer(pointToLayerFn, geojson, latlng, options) {\r\n\treturn pointToLayerFn ?\r\n\t\tpointToLayerFn(geojson, latlng) :\r\n\t\tnew Marker(latlng, options && options.markersInheritOptions && options);\r\n}\r\n\r\n// @function coordsToLatLng(coords: Array): LatLng\r\n// Creates a `LatLng` object from an array of 2 numbers (longitude, latitude)\r\n// or 3 numbers (longitude, latitude, altitude) used in GeoJSON for points.\r\nexport function coordsToLatLng(coords) {\r\n\treturn new LatLng(coords[1], coords[0], coords[2]);\r\n}\r\n\r\n// @function coordsToLatLngs(coords: Array, levelsDeep?: Number, coordsToLatLng?: Function): Array\r\n// Creates a multidimensional array of `LatLng`s from a GeoJSON coordinates array.\r\n// `levelsDeep` specifies the nesting level (0 is for an array of points, 1 for an array of arrays of points, etc., 0 by default).\r\n// Can use a custom [`coordsToLatLng`](#geojson-coordstolatlng) function.\r\nexport function coordsToLatLngs(coords, levelsDeep, _coordsToLatLng) {\r\n\tvar latlngs = [];\r\n\r\n\tfor (var i = 0, len = coords.length, latlng; i < len; i++) {\r\n\t\tlatlng = levelsDeep ?\r\n\t\t\tcoordsToLatLngs(coords[i], levelsDeep - 1, _coordsToLatLng) :\r\n\t\t\t(_coordsToLatLng || coordsToLatLng)(coords[i]);\r\n\r\n\t\tlatlngs.push(latlng);\r\n\t}\r\n\r\n\treturn latlngs;\r\n}\r\n\r\n// @function latLngToCoords(latlng: LatLng, precision?: Number|false): Array\r\n// Reverse of [`coordsToLatLng`](#geojson-coordstolatlng)\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function.\r\nexport function latLngToCoords(latlng, precision) {\r\n\tlatlng = toLatLng(latlng);\r\n\treturn latlng.alt !== undefined ?\r\n\t\t[Util.formatNum(latlng.lng, precision), Util.formatNum(latlng.lat, precision), Util.formatNum(latlng.alt, precision)] :\r\n\t\t[Util.formatNum(latlng.lng, precision), Util.formatNum(latlng.lat, precision)];\r\n}\r\n\r\n// @function latLngsToCoords(latlngs: Array, levelsDeep?: Number, closed?: Boolean, precision?: Number|false): Array\r\n// Reverse of [`coordsToLatLngs`](#geojson-coordstolatlngs)\r\n// `closed` determines whether the first point should be appended to the end of the array to close the feature, only used when `levelsDeep` is 0. False by default.\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function.\r\nexport function latLngsToCoords(latlngs, levelsDeep, closed, precision) {\r\n\tvar coords = [];\r\n\r\n\tfor (var i = 0, len = latlngs.length; i < len; i++) {\r\n\t\t// Check for flat arrays required to ensure unbalanced arrays are correctly converted in recursion\r\n\t\tcoords.push(levelsDeep ?\r\n\t\t\tlatLngsToCoords(latlngs[i], LineUtil.isFlat(latlngs[i]) ? 0 : levelsDeep - 1, closed, precision) :\r\n\t\t\tlatLngToCoords(latlngs[i], precision));\r\n\t}\r\n\r\n\tif (!levelsDeep && closed && coords.length > 0) {\r\n\t\tcoords.push(coords[0].slice());\r\n\t}\r\n\r\n\treturn coords;\r\n}\r\n\r\nexport function getFeature(layer, newGeometry) {\r\n\treturn layer.feature ?\r\n\t\tUtil.extend({}, layer.feature, {geometry: newGeometry}) :\r\n\t\tasFeature(newGeometry);\r\n}\r\n\r\n// @function asFeature(geojson: Object): Object\r\n// Normalize GeoJSON geometries/features into GeoJSON features.\r\nexport function asFeature(geojson) {\r\n\tif (geojson.type === 'Feature' || geojson.type === 'FeatureCollection') {\r\n\t\treturn geojson;\r\n\t}\r\n\r\n\treturn {\r\n\t\ttype: 'Feature',\r\n\t\tproperties: {},\r\n\t\tgeometry: geojson\r\n\t};\r\n}\r\n\r\nvar PointToGeoJSON = {\r\n\ttoGeoJSON: function (precision) {\r\n\t\treturn getFeature(this, {\r\n\t\t\ttype: 'Point',\r\n\t\t\tcoordinates: latLngToCoords(this.getLatLng(), precision)\r\n\t\t});\r\n\t}\r\n};\r\n\r\n// @namespace Marker\r\n// @section Other methods\r\n// @method toGeoJSON(precision?: Number|false): Object\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the marker (as a GeoJSON `Point` Feature).\r\nMarker.include(PointToGeoJSON);\r\n\r\n// @namespace CircleMarker\r\n// @method toGeoJSON(precision?: Number|false): Object\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the circle marker (as a GeoJSON `Point` Feature).\r\nCircle.include(PointToGeoJSON);\r\nCircleMarker.include(PointToGeoJSON);\r\n\r\n\r\n// @namespace Polyline\r\n// @method toGeoJSON(precision?: Number|false): Object\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the polyline (as a GeoJSON `LineString` or `MultiLineString` Feature).\r\nPolyline.include({\r\n\ttoGeoJSON: function (precision) {\r\n\t\tvar multi = !LineUtil.isFlat(this._latlngs);\r\n\r\n\t\tvar coords = latLngsToCoords(this._latlngs, multi ? 1 : 0, false, precision);\r\n\r\n\t\treturn getFeature(this, {\r\n\t\t\ttype: (multi ? 'Multi' : '') + 'LineString',\r\n\t\t\tcoordinates: coords\r\n\t\t});\r\n\t}\r\n});\r\n\r\n// @namespace Polygon\r\n// @method toGeoJSON(precision?: Number|false): Object\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the polygon (as a GeoJSON `Polygon` or `MultiPolygon` Feature).\r\nPolygon.include({\r\n\ttoGeoJSON: function (precision) {\r\n\t\tvar holes = !LineUtil.isFlat(this._latlngs),\r\n\t\t    multi = holes && !LineUtil.isFlat(this._latlngs[0]);\r\n\r\n\t\tvar coords = latLngsToCoords(this._latlngs, multi ? 2 : holes ? 1 : 0, true, precision);\r\n\r\n\t\tif (!holes) {\r\n\t\t\tcoords = [coords];\r\n\t\t}\r\n\r\n\t\treturn getFeature(this, {\r\n\t\t\ttype: (multi ? 'Multi' : '') + 'Polygon',\r\n\t\t\tcoordinates: coords\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n// @namespace LayerGroup\r\nLayerGroup.include({\r\n\ttoMultiPoint: function (precision) {\r\n\t\tvar coords = [];\r\n\r\n\t\tthis.eachLayer(function (layer) {\r\n\t\t\tcoords.push(layer.toGeoJSON(precision).geometry.coordinates);\r\n\t\t});\r\n\r\n\t\treturn getFeature(this, {\r\n\t\t\ttype: 'MultiPoint',\r\n\t\t\tcoordinates: coords\r\n\t\t});\r\n\t},\r\n\r\n\t// @method toGeoJSON(precision?: Number|false): Object\r\n\t// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n\t// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the layer group (as a GeoJSON `FeatureCollection`, `GeometryCollection`, or `MultiPoint`).\r\n\ttoGeoJSON: function (precision) {\r\n\r\n\t\tvar type = this.feature && this.feature.geometry && this.feature.geometry.type;\r\n\r\n\t\tif (type === 'MultiPoint') {\r\n\t\t\treturn this.toMultiPoint(precision);\r\n\t\t}\r\n\r\n\t\tvar isGeometryCollection = type === 'GeometryCollection',\r\n\t\t    jsons = [];\r\n\r\n\t\tthis.eachLayer(function (layer) {\r\n\t\t\tif (layer.toGeoJSON) {\r\n\t\t\t\tvar json = layer.toGeoJSON(precision);\r\n\t\t\t\tif (isGeometryCollection) {\r\n\t\t\t\t\tjsons.push(json.geometry);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar feature = asFeature(json);\r\n\t\t\t\t\t// Squash nested feature collections\r\n\t\t\t\t\tif (feature.type === 'FeatureCollection') {\r\n\t\t\t\t\t\tjsons.push.apply(jsons, feature.features);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tjsons.push(feature);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif (isGeometryCollection) {\r\n\t\t\treturn getFeature(this, {\r\n\t\t\t\tgeometries: jsons,\r\n\t\t\t\ttype: 'GeometryCollection'\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\ttype: 'FeatureCollection',\r\n\t\t\tfeatures: jsons\r\n\t\t};\r\n\t}\r\n});\r\n\r\n// @namespace GeoJSON\r\n// @factory L.geoJSON(geojson?: Object, options?: GeoJSON options)\r\n// Creates a GeoJSON layer. Optionally accepts an object in\r\n// [GeoJSON format](https://tools.ietf.org/html/rfc7946) to display on the map\r\n// (you can alternatively add it later with `addData` method) and an `options` object.\r\nexport function geoJSON(geojson, options) {\r\n\treturn new GeoJSON(geojson, options);\r\n}\r\n\r\n// Backward compatibility.\r\nexport var geoJson = geoJSON;\r\n","import {Layer} from './Layer';\r\nimport * as Util from '../core/Util';\r\nimport {toLatLngBounds} from '../geo/LatLngBounds';\r\nimport {Bounds} from '../geometry/Bounds';\r\nimport * as DomUtil from '../dom/DomUtil';\r\n\r\n/*\r\n * @class ImageOverlay\r\n * @aka L.ImageOverlay\r\n * @inherits Interactive layer\r\n *\r\n * Used to load and display a single image over specific bounds of the map. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var imageUrl = 'https://maps.lib.utexas.edu/maps/historical/newark_nj_1922.jpg',\r\n * \timageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];\r\n * L.imageOverlay(imageUrl, imageBounds).addTo(map);\r\n * ```\r\n */\r\n\r\nexport var ImageOverlay = Layer.extend({\r\n\r\n\t// @section\r\n\t// @aka ImageOverlay options\r\n\toptions: {\r\n\t\t// @option opacity: Number = 1.0\r\n\t\t// The opacity of the image overlay.\r\n\t\topacity: 1,\r\n\r\n\t\t// @option alt: String = ''\r\n\t\t// Text for the `alt` attribute of the image (useful for accessibility).\r\n\t\talt: '',\r\n\r\n\t\t// @option interactive: Boolean = false\r\n\t\t// If `true`, the image overlay will emit [mouse events](#interactive-layer) when clicked or hovered.\r\n\t\tinteractive: false,\r\n\r\n\t\t// @option crossOrigin: Boolean|String = false\r\n\t\t// Whether the crossOrigin attribute will be added to the image.\r\n\t\t// If a String is provided, the image will have its crossOrigin attribute set to the String provided. This is needed if you want to access image pixel data.\r\n\t\t// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n\t\tcrossOrigin: false,\r\n\r\n\t\t// @option errorOverlayUrl: String = ''\r\n\t\t// URL to the overlay image to show in place of the overlay that failed to load.\r\n\t\terrorOverlayUrl: '',\r\n\r\n\t\t// @option zIndex: Number = 1\r\n\t\t// The explicit [zIndex](https://developer.mozilla.org/docs/Web/CSS/CSS_Positioning/Understanding_z_index) of the overlay layer.\r\n\t\tzIndex: 1,\r\n\r\n\t\t// @option className: String = ''\r\n\t\t// A custom class name to assign to the image. Empty by default.\r\n\t\tclassName: ''\r\n\t},\r\n\r\n\tinitialize: function (url, bounds, options) { // (String, LatLngBounds, Object)\r\n\t\tthis._url = url;\r\n\t\tthis._bounds = toLatLngBounds(bounds);\r\n\r\n\t\tUtil.setOptions(this, options);\r\n\t},\r\n\r\n\tonAdd: function () {\r\n\t\tif (!this._image) {\r\n\t\t\tthis._initImage();\r\n\r\n\t\t\tif (this.options.opacity < 1) {\r\n\t\t\t\tthis._updateOpacity();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this.options.interactive) {\r\n\t\t\tDomUtil.addClass(this._image, 'leaflet-interactive');\r\n\t\t\tthis.addInteractiveTarget(this._image);\r\n\t\t}\r\n\r\n\t\tthis.getPane().appendChild(this._image);\r\n\t\tthis._reset();\r\n\t},\r\n\r\n\tonRemove: function () {\r\n\t\tDomUtil.remove(this._image);\r\n\t\tif (this.options.interactive) {\r\n\t\t\tthis.removeInteractiveTarget(this._image);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method setOpacity(opacity: Number): this\r\n\t// Sets the opacity of the overlay.\r\n\tsetOpacity: function (opacity) {\r\n\t\tthis.options.opacity = opacity;\r\n\r\n\t\tif (this._image) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsetStyle: function (styleOpts) {\r\n\t\tif (styleOpts.opacity) {\r\n\t\t\tthis.setOpacity(styleOpts.opacity);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method bringToFront(): this\r\n\t// Brings the layer to the top of all overlays.\r\n\tbringToFront: function () {\r\n\t\tif (this._map) {\r\n\t\t\tDomUtil.toFront(this._image);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method bringToBack(): this\r\n\t// Brings the layer to the bottom of all overlays.\r\n\tbringToBack: function () {\r\n\t\tif (this._map) {\r\n\t\t\tDomUtil.toBack(this._image);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setUrl(url: String): this\r\n\t// Changes the URL of the image.\r\n\tsetUrl: function (url) {\r\n\t\tthis._url = url;\r\n\r\n\t\tif (this._image) {\r\n\t\t\tthis._image.src = url;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setBounds(bounds: LatLngBounds): this\r\n\t// Update the bounds that this ImageOverlay covers\r\n\tsetBounds: function (bounds) {\r\n\t\tthis._bounds = toLatLngBounds(bounds);\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._reset();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgetEvents: function () {\r\n\t\tvar events = {\r\n\t\t\tzoom: this._reset,\r\n\t\t\tviewreset: this._reset\r\n\t\t};\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tevents.zoomanim = this._animateZoom;\r\n\t\t}\r\n\r\n\t\treturn events;\r\n\t},\r\n\r\n\t// @method setZIndex(value: Number): this\r\n\t// Changes the [zIndex](#imageoverlay-zindex) of the image overlay.\r\n\tsetZIndex: function (value) {\r\n\t\tthis.options.zIndex = value;\r\n\t\tthis._updateZIndex();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getBounds(): LatLngBounds\r\n\t// Get the bounds that this ImageOverlay covers\r\n\tgetBounds: function () {\r\n\t\treturn this._bounds;\r\n\t},\r\n\r\n\t// @method getElement(): HTMLElement\r\n\t// Returns the instance of [`HTMLImageElement`](https://developer.mozilla.org/docs/Web/API/HTMLImageElement)\r\n\t// used by this overlay.\r\n\tgetElement: function () {\r\n\t\treturn this._image;\r\n\t},\r\n\r\n\t_initImage: function () {\r\n\t\tvar wasElementSupplied = this._url.tagName === 'IMG';\r\n\t\tvar img = this._image = wasElementSupplied ? this._url : DomUtil.create('img');\r\n\r\n\t\tDomUtil.addClass(img, 'leaflet-image-layer');\r\n\t\tif (this._zoomAnimated) { DomUtil.addClass(img, 'leaflet-zoom-animated'); }\r\n\t\tif (this.options.className) { DomUtil.addClass(img, this.options.className); }\r\n\r\n\t\timg.onselectstart = Util.falseFn;\r\n\t\timg.onmousemove = Util.falseFn;\r\n\r\n\t\t// @event load: Event\r\n\t\t// Fired when the ImageOverlay layer has loaded its image\r\n\t\timg.onload = Util.bind(this.fire, this, 'load');\r\n\t\timg.onerror = Util.bind(this._overlayOnError, this, 'error');\r\n\r\n\t\tif (this.options.crossOrigin || this.options.crossOrigin === '') {\r\n\t\t\timg.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;\r\n\t\t}\r\n\r\n\t\tif (this.options.zIndex) {\r\n\t\t\tthis._updateZIndex();\r\n\t\t}\r\n\r\n\t\tif (wasElementSupplied) {\r\n\t\t\tthis._url = img.src;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\timg.src = this._url;\r\n\t\timg.alt = this.options.alt;\r\n\t},\r\n\r\n\t_animateZoom: function (e) {\r\n\t\tvar scale = this._map.getZoomScale(e.zoom),\r\n\t\t    offset = this._map._latLngBoundsToNewLayerBounds(this._bounds, e.zoom, e.center).min;\r\n\r\n\t\tDomUtil.setTransform(this._image, offset, scale);\r\n\t},\r\n\r\n\t_reset: function () {\r\n\t\tvar image = this._image,\r\n\t\t    bounds = new Bounds(\r\n\t\t        this._map.latLngToLayerPoint(this._bounds.getNorthWest()),\r\n\t\t        this._map.latLngToLayerPoint(this._bounds.getSouthEast())),\r\n\t\t    size = bounds.getSize();\r\n\r\n\t\tDomUtil.setPosition(image, bounds.min);\r\n\r\n\t\timage.style.width  = size.x + 'px';\r\n\t\timage.style.height = size.y + 'px';\r\n\t},\r\n\r\n\t_updateOpacity: function () {\r\n\t\tDomUtil.setOpacity(this._image, this.options.opacity);\r\n\t},\r\n\r\n\t_updateZIndex: function () {\r\n\t\tif (this._image && this.options.zIndex !== undefined && this.options.zIndex !== null) {\r\n\t\t\tthis._image.style.zIndex = this.options.zIndex;\r\n\t\t}\r\n\t},\r\n\r\n\t_overlayOnError: function () {\r\n\t\t// @event error: Event\r\n\t\t// Fired when the ImageOverlay layer fails to load its image\r\n\t\tthis.fire('error');\r\n\r\n\t\tvar errorUrl = this.options.errorOverlayUrl;\r\n\t\tif (errorUrl && this._url !== errorUrl) {\r\n\t\t\tthis._url = errorUrl;\r\n\t\t\tthis._image.src = errorUrl;\r\n\t\t}\r\n\t},\r\n\r\n\t// @method getCenter(): LatLng\r\n\t// Returns the center of the ImageOverlay.\r\n\tgetCenter: function () {\r\n\t\treturn this._bounds.getCenter();\r\n\t}\r\n});\r\n\r\n// @factory L.imageOverlay(imageUrl: String, bounds: LatLngBounds, options?: ImageOverlay options)\r\n// Instantiates an image overlay object given the URL of the image and the\r\n// geographical bounds it is tied to.\r\nexport var imageOverlay = function (url, bounds, options) {\r\n\treturn new ImageOverlay(url, bounds, options);\r\n};\r\n","import {ImageOverlay} from './ImageOverlay';\r\nimport * as DomUtil from '../dom/DomUtil';\r\nimport * as Util from '../core/Util';\r\n\r\n/*\r\n * @class VideoOverlay\r\n * @aka L.VideoOverlay\r\n * @inherits ImageOverlay\r\n *\r\n * Used to load and display a video player over specific bounds of the map. Extends `ImageOverlay`.\r\n *\r\n * A video overlay uses the [`<video>`](https://developer.mozilla.org/docs/Web/HTML/Element/video)\r\n * HTML5 element.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var videoUrl = 'https://www.mapbox.com/bites/00188/patricia_nasa.webm',\r\n * \tvideoBounds = [[ 32, -130], [ 13, -100]];\r\n * L.videoOverlay(videoUrl, videoBounds ).addTo(map);\r\n * ```\r\n */\r\n\r\nexport var VideoOverlay = ImageOverlay.extend({\r\n\r\n\t// @section\r\n\t// @aka VideoOverlay options\r\n\toptions: {\r\n\t\t// @option autoplay: Boolean = true\r\n\t\t// Whether the video starts playing automatically when loaded.\r\n\t\t// On some browsers autoplay will only work with `muted: true`\r\n\t\tautoplay: true,\r\n\r\n\t\t// @option loop: Boolean = true\r\n\t\t// Whether the video will loop back to the beginning when played.\r\n\t\tloop: true,\r\n\r\n\t\t// @option keepAspectRatio: Boolean = true\r\n\t\t// Whether the video will save aspect ratio after the projection.\r\n\t\t// Relevant for supported browsers. See [browser compatibility](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit)\r\n\t\tkeepAspectRatio: true,\r\n\r\n\t\t// @option muted: Boolean = false\r\n\t\t// Whether the video starts on mute when loaded.\r\n\t\tmuted: false,\r\n\r\n\t\t// @option playsInline: Boolean = true\r\n\t\t// Mobile browsers will play the video right where it is instead of open it up in fullscreen mode.\r\n\t\tplaysInline: true\r\n\t},\r\n\r\n\t_initImage: function () {\r\n\t\tvar wasElementSupplied = this._url.tagName === 'VIDEO';\r\n\t\tvar vid = this._image = wasElementSupplied ? this._url : DomUtil.create('video');\r\n\r\n\t\tDomUtil.addClass(vid, 'leaflet-image-layer');\r\n\t\tif (this._zoomAnimated) { DomUtil.addClass(vid, 'leaflet-zoom-animated'); }\r\n\t\tif (this.options.className) { DomUtil.addClass(vid, this.options.className); }\r\n\r\n\t\tvid.onselectstart = Util.falseFn;\r\n\t\tvid.onmousemove = Util.falseFn;\r\n\r\n\t\t// @event load: Event\r\n\t\t// Fired when the video has finished loading the first frame\r\n\t\tvid.onloadeddata = Util.bind(this.fire, this, 'load');\r\n\r\n\t\tif (wasElementSupplied) {\r\n\t\t\tvar sourceElements = vid.getElementsByTagName('source');\r\n\t\t\tvar sources = [];\r\n\t\t\tfor (var j = 0; j < sourceElements.length; j++) {\r\n\t\t\t\tsources.push(sourceElements[j].src);\r\n\t\t\t}\r\n\r\n\t\t\tthis._url = (sourceElements.length > 0) ? sources : [vid.src];\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!Util.isArray(this._url)) { this._url = [this._url]; }\r\n\r\n\t\tif (!this.options.keepAspectRatio && Object.prototype.hasOwnProperty.call(vid.style, 'objectFit')) {\r\n\t\t\tvid.style['objectFit'] = 'fill';\r\n\t\t}\r\n\t\tvid.autoplay = !!this.options.autoplay;\r\n\t\tvid.loop = !!this.options.loop;\r\n\t\tvid.muted = !!this.options.muted;\r\n\t\tvid.playsInline = !!this.options.playsInline;\r\n\t\tfor (var i = 0; i < this._url.length; i++) {\r\n\t\t\tvar source = DomUtil.create('source');\r\n\t\t\tsource.src = this._url[i];\r\n\t\t\tvid.appendChild(source);\r\n\t\t}\r\n\t}\r\n\r\n\t// @method getElement(): HTMLVideoElement\r\n\t// Returns the instance of [`HTMLVideoElement`](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement)\r\n\t// used by this overlay.\r\n});\r\n\r\n\r\n// @factory L.videoOverlay(video: String|Array|HTMLVideoElement, bounds: LatLngBounds, options?: VideoOverlay options)\r\n// Instantiates an image overlay object given the URL of the video (or array of URLs, or even a video element) and the\r\n// geographical bounds it is tied to.\r\n\r\nexport function videoOverlay(video, bounds, options) {\r\n\treturn new VideoOverlay(video, bounds, options);\r\n}\r\n","import {ImageOverlay} from './ImageOverlay';\nimport * as DomUtil from '../dom/DomUtil';\nimport * as Util from '../core/Util';\n\n/*\n * @class SVGOverlay\n * @aka L.SVGOverlay\n * @inherits ImageOverlay\n *\n * Used to load, display and provide DOM access to an SVG file over specific bounds of the map. Extends `ImageOverlay`.\n *\n * An SVG overlay uses the [`<svg>`](https://developer.mozilla.org/docs/Web/SVG/Element/svg) element.\n *\n * @example\n *\n * ```js\n * var svgElement = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n * svgElement.setAttribute('xmlns', \"http://www.w3.org/2000/svg\");\n * svgElement.setAttribute('viewBox', \"0 0 200 200\");\n * svgElement.innerHTML = '<rect width=\"200\" height=\"200\"/><rect x=\"75\" y=\"23\" width=\"50\" height=\"50\" style=\"fill:red\"/><rect x=\"75\" y=\"123\" width=\"50\" height=\"50\" style=\"fill:#0013ff\"/>';\n * var svgElementBounds = [ [ 32, -130 ], [ 13, -100 ] ];\n * L.svgOverlay(svgElement, svgElementBounds).addTo(map);\n * ```\n */\n\nexport var SVGOverlay = ImageOverlay.extend({\n\t_initImage: function () {\n\t\tvar el = this._image = this._url;\n\n\t\tDomUtil.addClass(el, 'leaflet-image-layer');\n\t\tif (this._zoomAnimated) { DomUtil.addClass(el, 'leaflet-zoom-animated'); }\n\t\tif (this.options.className) { DomUtil.addClass(el, this.options.className); }\n\n\t\tel.onselectstart = Util.falseFn;\n\t\tel.onmousemove = Util.falseFn;\n\t}\n\n\t// @method getElement(): SVGElement\n\t// Returns the instance of [`SVGElement`](https://developer.mozilla.org/docs/Web/API/SVGElement)\n\t// used by this overlay.\n});\n\n\n// @factory L.svgOverlay(svg: String|SVGElement, bounds: LatLngBounds, options?: SVGOverlay options)\n// Instantiates an image overlay object given an SVG element and the geographical bounds it is tied to.\n// A viewBox attribute is required on the SVG element to zoom in and out properly.\n\nexport function svgOverlay(el, bounds, options) {\n\treturn new SVGOverlay(el, bounds, options);\n}\n","import {Map} from '../map/Map';\r\nimport {Layer} from './Layer';\r\nimport {FeatureGroup} from './FeatureGroup';\r\nimport * as Util from '../core/Util';\r\nimport {toLatLng, LatLng} from '../geo/LatLng';\r\nimport {toPoint} from '../geometry/Point';\r\nimport * as DomUtil from '../dom/DomUtil';\r\n\r\n/*\r\n * @class DivOverlay\r\n * @inherits Interactive layer\r\n * @aka L.DivOverlay\r\n * Base model for L.Popup and L.Tooltip. Inherit from it for custom overlays like plugins.\r\n */\r\n\r\n// @namespace DivOverlay\r\nexport var DivOverlay = Layer.extend({\r\n\r\n\t// @section\r\n\t// @aka DivOverlay options\r\n\toptions: {\r\n\t\t// @option interactive: Boolean = false\r\n\t\t// If true, the popup/tooltip will listen to the mouse events.\r\n\t\tinteractive: false,\r\n\r\n\t\t// @option offset: Point = Point(0, 0)\r\n\t\t// The offset of the overlay position.\r\n\t\toffset: [0, 0],\r\n\r\n\t\t// @option className: String = ''\r\n\t\t// A custom CSS class name to assign to the overlay.\r\n\t\tclassName: '',\r\n\r\n\t\t// @option pane: String = undefined\r\n\t\t// `Map pane` where the overlay will be added.\r\n\t\tpane: undefined,\r\n\r\n\t\t// @option content: String|HTMLElement|Function = ''\r\n\t\t// Sets the HTML content of the overlay while initializing. If a function is passed the source layer will be\r\n\t\t// passed to the function. The function should return a `String` or `HTMLElement` to be used in the overlay.\r\n\t\tcontent: ''\r\n\t},\r\n\r\n\tinitialize: function (options, source) {\r\n\t\tif (options && (options instanceof LatLng || Util.isArray(options))) {\r\n\t\t\tthis._latlng = toLatLng(options);\r\n\t\t\tUtil.setOptions(this, source);\r\n\t\t} else {\r\n\t\t\tUtil.setOptions(this, options);\r\n\t\t\tthis._source = source;\r\n\t\t}\r\n\t\tif (this.options.content) {\r\n\t\t\tthis._content = this.options.content;\r\n\t\t}\r\n\t},\r\n\r\n\t// @method openOn(map: Map): this\r\n\t// Adds the overlay to the map.\r\n\t// Alternative to `map.openPopup(popup)`/`.openTooltip(tooltip)`.\r\n\topenOn: function (map) {\r\n\t\tmap = arguments.length ? map : this._source._map; // experimental, not the part of public api\r\n\t\tif (!map.hasLayer(this)) {\r\n\t\t\tmap.addLayer(this);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method close(): this\r\n\t// Closes the overlay.\r\n\t// Alternative to `map.closePopup(popup)`/`.closeTooltip(tooltip)`\r\n\t// and `layer.closePopup()`/`.closeTooltip()`.\r\n\tclose: function () {\r\n\t\tif (this._map) {\r\n\t\t\tthis._map.removeLayer(this);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method toggle(layer?: Layer): this\r\n\t// Opens or closes the overlay bound to layer depending on its current state.\r\n\t// Argument may be omitted only for overlay bound to layer.\r\n\t// Alternative to `layer.togglePopup()`/`.toggleTooltip()`.\r\n\ttoggle: function (layer) {\r\n\t\tif (this._map) {\r\n\t\t\tthis.close();\r\n\t\t} else {\r\n\t\t\tif (arguments.length) {\r\n\t\t\t\tthis._source = layer;\r\n\t\t\t} else {\r\n\t\t\t\tlayer = this._source;\r\n\t\t\t}\r\n\t\t\tthis._prepareOpen();\r\n\r\n\t\t\t// open the overlay on the map\r\n\t\t\tthis.openOn(layer._map);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._zoomAnimated = map._zoomAnimated;\r\n\r\n\t\tif (!this._container) {\r\n\t\t\tthis._initLayout();\r\n\t\t}\r\n\r\n\t\tif (map._fadeAnimated) {\r\n\t\t\tDomUtil.setOpacity(this._container, 0);\r\n\t\t}\r\n\r\n\t\tclearTimeout(this._removeTimeout);\r\n\t\tthis.getPane().appendChild(this._container);\r\n\t\tthis.update();\r\n\r\n\t\tif (map._fadeAnimated) {\r\n\t\t\tDomUtil.setOpacity(this._container, 1);\r\n\t\t}\r\n\r\n\t\tthis.bringToFront();\r\n\r\n\t\tif (this.options.interactive) {\r\n\t\t\tDomUtil.addClass(this._container, 'leaflet-interactive');\r\n\t\t\tthis.addInteractiveTarget(this._container);\r\n\t\t}\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tif (map._fadeAnimated) {\r\n\t\t\tDomUtil.setOpacity(this._container, 0);\r\n\t\t\tthis._removeTimeout = setTimeout(Util.bind(DomUtil.remove, undefined, this._container), 200);\r\n\t\t} else {\r\n\t\t\tDomUtil.remove(this._container);\r\n\t\t}\r\n\r\n\t\tif (this.options.interactive) {\r\n\t\t\tDomUtil.removeClass(this._container, 'leaflet-interactive');\r\n\t\t\tthis.removeInteractiveTarget(this._container);\r\n\t\t}\r\n\t},\r\n\r\n\t// @namespace DivOverlay\r\n\t// @method getLatLng: LatLng\r\n\t// Returns the geographical point of the overlay.\r\n\tgetLatLng: function () {\r\n\t\treturn this._latlng;\r\n\t},\r\n\r\n\t// @method setLatLng(latlng: LatLng): this\r\n\t// Sets the geographical point where the overlay will open.\r\n\tsetLatLng: function (latlng) {\r\n\t\tthis._latlng = toLatLng(latlng);\r\n\t\tif (this._map) {\r\n\t\t\tthis._updatePosition();\r\n\t\t\tthis._adjustPan();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getContent: String|HTMLElement\r\n\t// Returns the content of the overlay.\r\n\tgetContent: function () {\r\n\t\treturn this._content;\r\n\t},\r\n\r\n\t// @method setContent(htmlContent: String|HTMLElement|Function): this\r\n\t// Sets the HTML content of the overlay. If a function is passed the source layer will be passed to the function.\r\n\t// The function should return a `String` or `HTMLElement` to be used in the overlay.\r\n\tsetContent: function (content) {\r\n\t\tthis._content = content;\r\n\t\tthis.update();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getElement: String|HTMLElement\r\n\t// Returns the HTML container of the overlay.\r\n\tgetElement: function () {\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\t// @method update: null\r\n\t// Updates the overlay content, layout and position. Useful for updating the overlay after something inside changed, e.g. image loaded.\r\n\tupdate: function () {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tthis._container.style.visibility = 'hidden';\r\n\r\n\t\tthis._updateContent();\r\n\t\tthis._updateLayout();\r\n\t\tthis._updatePosition();\r\n\r\n\t\tthis._container.style.visibility = '';\r\n\r\n\t\tthis._adjustPan();\r\n\t},\r\n\r\n\tgetEvents: function () {\r\n\t\tvar events = {\r\n\t\t\tzoom: this._updatePosition,\r\n\t\t\tviewreset: this._updatePosition\r\n\t\t};\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tevents.zoomanim = this._animateZoom;\r\n\t\t}\r\n\t\treturn events;\r\n\t},\r\n\r\n\t// @method isOpen: Boolean\r\n\t// Returns `true` when the overlay is visible on the map.\r\n\tisOpen: function () {\r\n\t\treturn !!this._map && this._map.hasLayer(this);\r\n\t},\r\n\r\n\t// @method bringToFront: this\r\n\t// Brings this overlay in front of other overlays (in the same map pane).\r\n\tbringToFront: function () {\r\n\t\tif (this._map) {\r\n\t\t\tDomUtil.toFront(this._container);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method bringToBack: this\r\n\t// Brings this overlay to the back of other overlays (in the same map pane).\r\n\tbringToBack: function () {\r\n\t\tif (this._map) {\r\n\t\t\tDomUtil.toBack(this._container);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// prepare bound overlay to open: update latlng pos / content source (for FeatureGroup)\r\n\t_prepareOpen: function (latlng) {\r\n\t\tvar source = this._source;\r\n\t\tif (!source._map) { return false; }\r\n\r\n\t\tif (source instanceof FeatureGroup) {\r\n\t\t\tsource = null;\r\n\t\t\tvar layers = this._source._layers;\r\n\t\t\tfor (var id in layers) {\r\n\t\t\t\tif (layers[id]._map) {\r\n\t\t\t\t\tsource = layers[id];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!source) { return false; } // Unable to get source layer.\r\n\r\n\t\t\t// set overlay source to this layer\r\n\t\t\tthis._source = source;\r\n\t\t}\r\n\r\n\t\tif (!latlng) {\r\n\t\t\tif (source.getCenter) {\r\n\t\t\t\tlatlng = source.getCenter();\r\n\t\t\t} else if (source.getLatLng) {\r\n\t\t\t\tlatlng = source.getLatLng();\r\n\t\t\t} else if (source.getBounds) {\r\n\t\t\t\tlatlng = source.getBounds().getCenter();\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Error('Unable to get source layer LatLng.');\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.setLatLng(latlng);\r\n\r\n\t\tif (this._map) {\r\n\t\t\t// update the overlay (content, layout, etc...)\r\n\t\t\tthis.update();\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\t_updateContent: function () {\r\n\t\tif (!this._content) { return; }\r\n\r\n\t\tvar node = this._contentNode;\r\n\t\tvar content = (typeof this._content === 'function') ? this._content(this._source || this) : this._content;\r\n\r\n\t\tif (typeof content === 'string') {\r\n\t\t\tnode.innerHTML = content;\r\n\t\t} else {\r\n\t\t\twhile (node.hasChildNodes()) {\r\n\t\t\t\tnode.removeChild(node.firstChild);\r\n\t\t\t}\r\n\t\t\tnode.appendChild(content);\r\n\t\t}\r\n\r\n\t\t// @namespace DivOverlay\r\n\t\t// @section DivOverlay events\r\n\t\t// @event contentupdate: Event\r\n\t\t// Fired when the content of the overlay is updated\r\n\t\tthis.fire('contentupdate');\r\n\t},\r\n\r\n\t_updatePosition: function () {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tvar pos = this._map.latLngToLayerPoint(this._latlng),\r\n\t\t    offset = toPoint(this.options.offset),\r\n\t\t    anchor = this._getAnchor();\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tDomUtil.setPosition(this._container, pos.add(anchor));\r\n\t\t} else {\r\n\t\t\toffset = offset.add(pos).add(anchor);\r\n\t\t}\r\n\r\n\t\tvar bottom = this._containerBottom = -offset.y,\r\n\t\t    left = this._containerLeft = -Math.round(this._containerWidth / 2) + offset.x;\r\n\r\n\t\t// bottom position the overlay in case the height of the overlay changes (images loading etc)\r\n\t\tthis._container.style.bottom = bottom + 'px';\r\n\t\tthis._container.style.left = left + 'px';\r\n\t},\r\n\r\n\t_getAnchor: function () {\r\n\t\treturn [0, 0];\r\n\t}\r\n\r\n});\r\n\r\nMap.include({\r\n\t_initOverlay: function (OverlayClass, content, latlng, options) {\r\n\t\tvar overlay = content;\r\n\t\tif (!(overlay instanceof OverlayClass)) {\r\n\t\t\toverlay = new OverlayClass(options).setContent(content);\r\n\t\t}\r\n\t\tif (latlng) {\r\n\t\t\toverlay.setLatLng(latlng);\r\n\t\t}\r\n\t\treturn overlay;\r\n\t}\r\n});\r\n\r\n\r\nLayer.include({\r\n\t_initOverlay: function (OverlayClass, old, content, options) {\r\n\t\tvar overlay = content;\r\n\t\tif (overlay instanceof OverlayClass) {\r\n\t\t\tUtil.setOptions(overlay, options);\r\n\t\t\toverlay._source = this;\r\n\t\t} else {\r\n\t\t\toverlay = (old && !options) ? old : new OverlayClass(options, this);\r\n\t\t\toverlay.setContent(content);\r\n\t\t}\r\n\t\treturn overlay;\r\n\t}\r\n});\r\n","import {DivOverlay} from './DivOverlay';\r\nimport * as DomEvent from '../dom/DomEvent';\r\nimport * as DomUtil from '../dom/DomUtil';\r\nimport {Point, toPoint} from '../geometry/Point';\r\nimport {Map} from '../map/Map';\r\nimport {Layer} from './Layer';\r\nimport {Path} from './vector/Path';\r\nimport {FeatureGroup} from './FeatureGroup';\r\n\r\n/*\r\n * @class Popup\r\n * @inherits DivOverlay\r\n * @aka L.Popup\r\n * Used to open popups in certain places of the map. Use [Map.openPopup](#map-openpopup) to\r\n * open popups while making sure that only one popup is open at one time\r\n * (recommended for usability), or use [Map.addLayer](#map-addlayer) to open as many as you want.\r\n *\r\n * @example\r\n *\r\n * If you want to just bind a popup to marker click and then open it, it's really easy:\r\n *\r\n * ```js\r\n * marker.bindPopup(popupContent).openPopup();\r\n * ```\r\n * Path overlays like polylines also have a `bindPopup` method.\r\n *\r\n * A popup can be also standalone:\r\n *\r\n * ```js\r\n * var popup = L.popup()\r\n * \t.setLatLng(latlng)\r\n * \t.setContent('<p>Hello world!<br />This is a nice popup.</p>')\r\n * \t.openOn(map);\r\n * ```\r\n * or\r\n * ```js\r\n * var popup = L.popup(latlng, {content: '<p>Hello world!<br />This is a nice popup.</p>')\r\n * \t.openOn(map);\r\n * ```\r\n */\r\n\r\n\r\n// @namespace Popup\r\nexport var Popup = DivOverlay.extend({\r\n\r\n\t// @section\r\n\t// @aka Popup options\r\n\toptions: {\r\n\t\t// @option pane: String = 'popupPane'\r\n\t\t// `Map pane` where the popup will be added.\r\n\t\tpane: 'popupPane',\r\n\r\n\t\t// @option offset: Point = Point(0, 7)\r\n\t\t// The offset of the popup position.\r\n\t\toffset: [0, 7],\r\n\r\n\t\t// @option maxWidth: Number = 300\r\n\t\t// Max width of the popup, in pixels.\r\n\t\tmaxWidth: 300,\r\n\r\n\t\t// @option minWidth: Number = 50\r\n\t\t// Min width of the popup, in pixels.\r\n\t\tminWidth: 50,\r\n\r\n\t\t// @option maxHeight: Number = null\r\n\t\t// If set, creates a scrollable container of the given height\r\n\t\t// inside a popup if its content exceeds it.\r\n\t\t// The scrollable container can be styled using the\r\n\t\t// `leaflet-popup-scrolled` CSS class selector.\r\n\t\tmaxHeight: null,\r\n\r\n\t\t// @option autoPan: Boolean = true\r\n\t\t// Set it to `false` if you don't want the map to do panning animation\r\n\t\t// to fit the opened popup.\r\n\t\tautoPan: true,\r\n\r\n\t\t// @option autoPanPaddingTopLeft: Point = null\r\n\t\t// The margin between the popup and the top left corner of the map\r\n\t\t// view after autopanning was performed.\r\n\t\tautoPanPaddingTopLeft: null,\r\n\r\n\t\t// @option autoPanPaddingBottomRight: Point = null\r\n\t\t// The margin between the popup and the bottom right corner of the map\r\n\t\t// view after autopanning was performed.\r\n\t\tautoPanPaddingBottomRight: null,\r\n\r\n\t\t// @option autoPanPadding: Point = Point(5, 5)\r\n\t\t// Equivalent of setting both top left and bottom right autopan padding to the same value.\r\n\t\tautoPanPadding: [5, 5],\r\n\r\n\t\t// @option keepInView: Boolean = false\r\n\t\t// Set it to `true` if you want to prevent users from panning the popup\r\n\t\t// off of the screen while it is open.\r\n\t\tkeepInView: false,\r\n\r\n\t\t// @option closeButton: Boolean = true\r\n\t\t// Controls the presence of a close button in the popup.\r\n\t\tcloseButton: true,\r\n\r\n\t\t// @option autoClose: Boolean = true\r\n\t\t// Set it to `false` if you want to override the default behavior of\r\n\t\t// the popup closing when another popup is opened.\r\n\t\tautoClose: true,\r\n\r\n\t\t// @option closeOnEscapeKey: Boolean = true\r\n\t\t// Set it to `false` if you want to override the default behavior of\r\n\t\t// the ESC key for closing of the popup.\r\n\t\tcloseOnEscapeKey: true,\r\n\r\n\t\t// @option closeOnClick: Boolean = *\r\n\t\t// Set it if you want to override the default behavior of the popup closing when user clicks\r\n\t\t// on the map. Defaults to the map's [`closePopupOnClick`](#map-closepopuponclick) option.\r\n\r\n\t\t// @option className: String = ''\r\n\t\t// A custom CSS class name to assign to the popup.\r\n\t\tclassName: ''\r\n\t},\r\n\r\n\t// @namespace Popup\r\n\t// @method openOn(map: Map): this\r\n\t// Alternative to `map.openPopup(popup)`.\r\n\t// Adds the popup to the map and closes the previous one.\r\n\topenOn: function (map) {\r\n\t\tmap = arguments.length ? map : this._source._map; // experimental, not the part of public api\r\n\r\n\t\tif (!map.hasLayer(this) && map._popup && map._popup.options.autoClose) {\r\n\t\t\tmap.removeLayer(map._popup);\r\n\t\t}\r\n\t\tmap._popup = this;\r\n\r\n\t\treturn DivOverlay.prototype.openOn.call(this, map);\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tDivOverlay.prototype.onAdd.call(this, map);\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Popup events\r\n\t\t// @event popupopen: PopupEvent\r\n\t\t// Fired when a popup is opened in the map\r\n\t\tmap.fire('popupopen', {popup: this});\r\n\r\n\t\tif (this._source) {\r\n\t\t\t// @namespace Layer\r\n\t\t\t// @section Popup events\r\n\t\t\t// @event popupopen: PopupEvent\r\n\t\t\t// Fired when a popup bound to this layer is opened\r\n\t\t\tthis._source.fire('popupopen', {popup: this}, true);\r\n\t\t\t// For non-path layers, we toggle the popup when clicking\r\n\t\t\t// again the layer, so prevent the map to reopen it.\r\n\t\t\tif (!(this._source instanceof Path)) {\r\n\t\t\t\tthis._source.on('preclick', DomEvent.stopPropagation);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tDivOverlay.prototype.onRemove.call(this, map);\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Popup events\r\n\t\t// @event popupclose: PopupEvent\r\n\t\t// Fired when a popup in the map is closed\r\n\t\tmap.fire('popupclose', {popup: this});\r\n\r\n\t\tif (this._source) {\r\n\t\t\t// @namespace Layer\r\n\t\t\t// @section Popup events\r\n\t\t\t// @event popupclose: PopupEvent\r\n\t\t\t// Fired when a popup bound to this layer is closed\r\n\t\t\tthis._source.fire('popupclose', {popup: this}, true);\r\n\t\t\tif (!(this._source instanceof Path)) {\r\n\t\t\t\tthis._source.off('preclick', DomEvent.stopPropagation);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tgetEvents: function () {\r\n\t\tvar events = DivOverlay.prototype.getEvents.call(this);\r\n\r\n\t\tif (this.options.closeOnClick !== undefined ? this.options.closeOnClick : this._map.options.closePopupOnClick) {\r\n\t\t\tevents.preclick = this.close;\r\n\t\t}\r\n\r\n\t\tif (this.options.keepInView) {\r\n\t\t\tevents.moveend = this._adjustPan;\r\n\t\t}\r\n\r\n\t\treturn events;\r\n\t},\r\n\r\n\t_initLayout: function () {\r\n\t\tvar prefix = 'leaflet-popup',\r\n\t\t    container = this._container = DomUtil.create('div',\r\n\t\t\tprefix + ' ' + (this.options.className || '') +\r\n\t\t\t' leaflet-zoom-animated');\r\n\r\n\t\tvar wrapper = this._wrapper = DomUtil.create('div', prefix + '-content-wrapper', container);\r\n\t\tthis._contentNode = DomUtil.create('div', prefix + '-content', wrapper);\r\n\r\n\t\tDomEvent.disableClickPropagation(container);\r\n\t\tDomEvent.disableScrollPropagation(this._contentNode);\r\n\t\tDomEvent.on(container, 'contextmenu', DomEvent.stopPropagation);\r\n\r\n\t\tthis._tipContainer = DomUtil.create('div', prefix + '-tip-container', container);\r\n\t\tthis._tip = DomUtil.create('div', prefix + '-tip', this._tipContainer);\r\n\r\n\t\tif (this.options.closeButton) {\r\n\t\t\tvar closeButton = this._closeButton = DomUtil.create('a', prefix + '-close-button', container);\r\n\t\t\tcloseButton.setAttribute('role', 'button'); // overrides the implicit role=link of <a> elements #7399\r\n\t\t\tcloseButton.setAttribute('aria-label', 'Close popup');\r\n\t\t\tcloseButton.href = '#close';\r\n\t\t\tcloseButton.innerHTML = '<span aria-hidden=\"true\">&#215;</span>';\r\n\r\n\t\t\tDomEvent.on(closeButton, 'click', function (ev) {\r\n\t\t\t\tDomEvent.preventDefault(ev);\r\n\t\t\t\tthis.close();\r\n\t\t\t}, this);\r\n\t\t}\r\n\t},\r\n\r\n\t_updateLayout: function () {\r\n\t\tvar container = this._contentNode,\r\n\t\t    style = container.style;\r\n\r\n\t\tstyle.width = '';\r\n\t\tstyle.whiteSpace = 'nowrap';\r\n\r\n\t\tvar width = container.offsetWidth;\r\n\t\twidth = Math.min(width, this.options.maxWidth);\r\n\t\twidth = Math.max(width, this.options.minWidth);\r\n\r\n\t\tstyle.width = (width + 1) + 'px';\r\n\t\tstyle.whiteSpace = '';\r\n\r\n\t\tstyle.height = '';\r\n\r\n\t\tvar height = container.offsetHeight,\r\n\t\t    maxHeight = this.options.maxHeight,\r\n\t\t    scrolledClass = 'leaflet-popup-scrolled';\r\n\r\n\t\tif (maxHeight && height > maxHeight) {\r\n\t\t\tstyle.height = maxHeight + 'px';\r\n\t\t\tDomUtil.addClass(container, scrolledClass);\r\n\t\t} else {\r\n\t\t\tDomUtil.removeClass(container, scrolledClass);\r\n\t\t}\r\n\r\n\t\tthis._containerWidth = this._container.offsetWidth;\r\n\t},\r\n\r\n\t_animateZoom: function (e) {\r\n\t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center),\r\n\t\t    anchor = this._getAnchor();\r\n\t\tDomUtil.setPosition(this._container, pos.add(anchor));\r\n\t},\r\n\r\n\t_adjustPan: function () {\r\n\t\tif (!this.options.autoPan) { return; }\r\n\t\tif (this._map._panAnim) { this._map._panAnim.stop(); }\r\n\r\n\t\t// We can endlessly recurse if keepInView is set and the view resets.\r\n\t\t// Let's guard against that by exiting early if we're responding to our own autopan.\r\n\t\tif (this._autopanning) {\r\n\t\t\tthis._autopanning = false;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar map = this._map,\r\n\t\t    marginBottom = parseInt(DomUtil.getStyle(this._container, 'marginBottom'), 10) || 0,\r\n\t\t    containerHeight = this._container.offsetHeight + marginBottom,\r\n\t\t    containerWidth = this._containerWidth,\r\n\t\t    layerPos = new Point(this._containerLeft, -containerHeight - this._containerBottom);\r\n\r\n\t\tlayerPos._add(DomUtil.getPosition(this._container));\r\n\r\n\t\tvar containerPos = map.layerPointToContainerPoint(layerPos),\r\n\t\t    padding = toPoint(this.options.autoPanPadding),\r\n\t\t    paddingTL = toPoint(this.options.autoPanPaddingTopLeft || padding),\r\n\t\t    paddingBR = toPoint(this.options.autoPanPaddingBottomRight || padding),\r\n\t\t    size = map.getSize(),\r\n\t\t    dx = 0,\r\n\t\t    dy = 0;\r\n\r\n\t\tif (containerPos.x + containerWidth + paddingBR.x > size.x) { // right\r\n\t\t\tdx = containerPos.x + containerWidth - size.x + paddingBR.x;\r\n\t\t}\r\n\t\tif (containerPos.x - dx - paddingTL.x < 0) { // left\r\n\t\t\tdx = containerPos.x - paddingTL.x;\r\n\t\t}\r\n\t\tif (containerPos.y + containerHeight + paddingBR.y > size.y) { // bottom\r\n\t\t\tdy = containerPos.y + containerHeight - size.y + paddingBR.y;\r\n\t\t}\r\n\t\tif (containerPos.y - dy - paddingTL.y < 0) { // top\r\n\t\t\tdy = containerPos.y - paddingTL.y;\r\n\t\t}\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Popup events\r\n\t\t// @event autopanstart: Event\r\n\t\t// Fired when the map starts autopanning when opening a popup.\r\n\t\tif (dx || dy) {\r\n\t\t\t// Track that we're autopanning, as this function will be re-ran on moveend\r\n\t\t\tif (this.options.keepInView) {\r\n\t\t\t\tthis._autopanning = true;\r\n\t\t\t}\r\n\r\n\t\t\tmap\r\n\t\t\t    .fire('autopanstart')\r\n\t\t\t    .panBy([dx, dy]);\r\n\t\t}\r\n\t},\r\n\r\n\t_getAnchor: function () {\r\n\t\t// Where should we anchor the popup on the source layer?\r\n\t\treturn toPoint(this._source && this._source._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]);\r\n\t}\r\n\r\n});\r\n\r\n// @namespace Popup\r\n// @factory L.popup(options?: Popup options, source?: Layer)\r\n// Instantiates a `Popup` object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the popup with a reference to the Layer to which it refers.\r\n// @alternative\r\n// @factory L.popup(latlng: LatLng, options?: Popup options)\r\n// Instantiates a `Popup` object given `latlng` where the popup will open and an optional `options` object that describes its appearance and location.\r\nexport var popup = function (options, source) {\r\n\treturn new Popup(options, source);\r\n};\r\n\r\n\r\n/* @namespace Map\r\n * @section Interaction Options\r\n * @option closePopupOnClick: Boolean = true\r\n * Set it to `false` if you don't want popups to close when user clicks the map.\r\n */\r\nMap.mergeOptions({\r\n\tclosePopupOnClick: true\r\n});\r\n\r\n\r\n// @namespace Map\r\n// @section Methods for Layers and Controls\r\nMap.include({\r\n\t// @method openPopup(popup: Popup): this\r\n\t// Opens the specified popup while closing the previously opened (to make sure only one is opened at one time for usability).\r\n\t// @alternative\r\n\t// @method openPopup(content: String|HTMLElement, latlng: LatLng, options?: Popup options): this\r\n\t// Creates a popup with the specified content and options and opens it in the given point on a map.\r\n\topenPopup: function (popup, latlng, options) {\r\n\t\tthis._initOverlay(Popup, popup, latlng, options)\r\n\t\t  .openOn(this);\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method closePopup(popup?: Popup): this\r\n\t// Closes the popup previously opened with [openPopup](#map-openpopup) (or the given one).\r\n\tclosePopup: function (popup) {\r\n\t\tpopup = arguments.length ? popup : this._popup;\r\n\t\tif (popup) {\r\n\t\t\tpopup.close();\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n});\r\n\r\n/*\r\n * @namespace Layer\r\n * @section Popup methods example\r\n *\r\n * All layers share a set of methods convenient for binding popups to it.\r\n *\r\n * ```js\r\n * var layer = L.Polygon(latlngs).bindPopup('Hi There!').addTo(map);\r\n * layer.openPopup();\r\n * layer.closePopup();\r\n * ```\r\n *\r\n * Popups will also be automatically opened when the layer is clicked on and closed when the layer is removed from the map or another popup is opened.\r\n */\r\n\r\n// @section Popup methods\r\nLayer.include({\r\n\r\n\t// @method bindPopup(content: String|HTMLElement|Function|Popup, options?: Popup options): this\r\n\t// Binds a popup to the layer with the passed `content` and sets up the\r\n\t// necessary event listeners. If a `Function` is passed it will receive\r\n\t// the layer as the first argument and should return a `String` or `HTMLElement`.\r\n\tbindPopup: function (content, options) {\r\n\t\tthis._popup = this._initOverlay(Popup, this._popup, content, options);\r\n\t\tif (!this._popupHandlersAdded) {\r\n\t\t\tthis.on({\r\n\t\t\t\tclick: this._openPopup,\r\n\t\t\t\tkeypress: this._onKeyPress,\r\n\t\t\t\tremove: this.closePopup,\r\n\t\t\t\tmove: this._movePopup\r\n\t\t\t});\r\n\t\t\tthis._popupHandlersAdded = true;\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method unbindPopup(): this\r\n\t// Removes the popup previously bound with `bindPopup`.\r\n\tunbindPopup: function () {\r\n\t\tif (this._popup) {\r\n\t\t\tthis.off({\r\n\t\t\t\tclick: this._openPopup,\r\n\t\t\t\tkeypress: this._onKeyPress,\r\n\t\t\t\tremove: this.closePopup,\r\n\t\t\t\tmove: this._movePopup\r\n\t\t\t});\r\n\t\t\tthis._popupHandlersAdded = false;\r\n\t\t\tthis._popup = null;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method openPopup(latlng?: LatLng): this\r\n\t// Opens the bound popup at the specified `latlng` or at the default popup anchor if no `latlng` is passed.\r\n\topenPopup: function (latlng) {\r\n\t\tif (this._popup) {\r\n\t\t\tif (!(this instanceof FeatureGroup)) {\r\n\t\t\t\tthis._popup._source = this;\r\n\t\t\t}\r\n\t\t\tif (this._popup._prepareOpen(latlng || this._latlng)) {\r\n\t\t\t\t// open the popup on the map\r\n\t\t\t\tthis._popup.openOn(this._map);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method closePopup(): this\r\n\t// Closes the popup bound to this layer if it is open.\r\n\tclosePopup: function () {\r\n\t\tif (this._popup) {\r\n\t\t\tthis._popup.close();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method togglePopup(): this\r\n\t// Opens or closes the popup bound to this layer depending on its current state.\r\n\ttogglePopup: function () {\r\n\t\tif (this._popup) {\r\n\t\t\tthis._popup.toggle(this);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method isPopupOpen(): boolean\r\n\t// Returns `true` if the popup bound to this layer is currently open.\r\n\tisPopupOpen: function () {\r\n\t\treturn (this._popup ? this._popup.isOpen() : false);\r\n\t},\r\n\r\n\t// @method setPopupContent(content: String|HTMLElement|Popup): this\r\n\t// Sets the content of the popup bound to this layer.\r\n\tsetPopupContent: function (content) {\r\n\t\tif (this._popup) {\r\n\t\t\tthis._popup.setContent(content);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getPopup(): Popup\r\n\t// Returns the popup bound to this layer.\r\n\tgetPopup: function () {\r\n\t\treturn this._popup;\r\n\t},\r\n\r\n\t_openPopup: function (e) {\r\n\t\tif (!this._popup || !this._map) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// prevent map click\r\n\t\tDomEvent.stop(e);\r\n\r\n\t\tvar target = e.layer || e.target;\r\n\t\tif (this._popup._source === target && !(target instanceof Path)) {\r\n\t\t\t// treat it like a marker and figure out\r\n\t\t\t// if we should toggle it open/closed\r\n\t\t\tif (this._map.hasLayer(this._popup)) {\r\n\t\t\t\tthis.closePopup();\r\n\t\t\t} else {\r\n\t\t\t\tthis.openPopup(e.latlng);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._popup._source = target;\r\n\t\tthis.openPopup(e.latlng);\r\n\t},\r\n\r\n\t_movePopup: function (e) {\r\n\t\tthis._popup.setLatLng(e.latlng);\r\n\t},\r\n\r\n\t_onKeyPress: function (e) {\r\n\t\tif (e.originalEvent.keyCode === 13) {\r\n\t\t\tthis._openPopup(e);\r\n\t\t}\r\n\t}\r\n});\r\n","import {DivOverlay} from './DivOverlay';\nimport {toPoint} from '../geometry/Point';\nimport {Map} from '../map/Map';\nimport {Layer} from './Layer';\nimport * as DomUtil from '../dom/DomUtil';\nimport * as DomEvent from '../dom/DomEvent';\nimport * as Util from '../core/Util';\nimport {FeatureGroup} from './FeatureGroup';\n\n/*\n * @class Tooltip\n * @inherits DivOverlay\n * @aka L.Tooltip\n * Used to display small texts on top of map layers.\n *\n * @example\n * If you want to just bind a tooltip to marker:\n *\n * ```js\n * marker.bindTooltip(\"my tooltip text\").openTooltip();\n * ```\n * Path overlays like polylines also have a `bindTooltip` method.\n *\n * A tooltip can be also standalone:\n *\n * ```js\n * var tooltip = L.tooltip()\n * \t.setLatLng(latlng)\n * \t.setContent('Hello world!<br />This is a nice tooltip.')\n * \t.addTo(map);\n * ```\n * or\n * ```js\n * var tooltip = L.tooltip(latlng, {content: 'Hello world!<br />This is a nice tooltip.'})\n * \t.addTo(map);\n * ```\n *\n *\n * Note about tooltip offset. Leaflet takes two options in consideration\n * for computing tooltip offsetting:\n * - the `offset` Tooltip option: it defaults to [0, 0], and it's specific to one tooltip.\n *   Add a positive x offset to move the tooltip to the right, and a positive y offset to\n *   move it to the bottom. Negatives will move to the left and top.\n * - the `tooltipAnchor` Icon option: this will only be considered for Marker. You\n *   should adapt this value if you use a custom icon.\n */\n\n\n// @namespace Tooltip\nexport var Tooltip = DivOverlay.extend({\n\n\t// @section\n\t// @aka Tooltip options\n\toptions: {\n\t\t// @option pane: String = 'tooltipPane'\n\t\t// `Map pane` where the tooltip will be added.\n\t\tpane: 'tooltipPane',\n\n\t\t// @option offset: Point = Point(0, 0)\n\t\t// Optional offset of the tooltip position.\n\t\toffset: [0, 0],\n\n\t\t// @option direction: String = 'auto'\n\t\t// Direction where to open the tooltip. Possible values are: `right`, `left`,\n\t\t// `top`, `bottom`, `center`, `auto`.\n\t\t// `auto` will dynamically switch between `right` and `left` according to the tooltip\n\t\t// position on the map.\n\t\tdirection: 'auto',\n\n\t\t// @option permanent: Boolean = false\n\t\t// Whether to open the tooltip permanently or only on mouseover.\n\t\tpermanent: false,\n\n\t\t// @option sticky: Boolean = false\n\t\t// If true, the tooltip will follow the mouse instead of being fixed at the feature center.\n\t\tsticky: false,\n\n\t\t// @option opacity: Number = 0.9\n\t\t// Tooltip container opacity.\n\t\topacity: 0.9\n\t},\n\n\tonAdd: function (map) {\n\t\tDivOverlay.prototype.onAdd.call(this, map);\n\t\tthis.setOpacity(this.options.opacity);\n\n\t\t// @namespace Map\n\t\t// @section Tooltip events\n\t\t// @event tooltipopen: TooltipEvent\n\t\t// Fired when a tooltip is opened in the map.\n\t\tmap.fire('tooltipopen', {tooltip: this});\n\n\t\tif (this._source) {\n\t\t\tthis.addEventParent(this._source);\n\n\t\t\t// @namespace Layer\n\t\t\t// @section Tooltip events\n\t\t\t// @event tooltipopen: TooltipEvent\n\t\t\t// Fired when a tooltip bound to this layer is opened.\n\t\t\tthis._source.fire('tooltipopen', {tooltip: this}, true);\n\t\t}\n\t},\n\n\tonRemove: function (map) {\n\t\tDivOverlay.prototype.onRemove.call(this, map);\n\n\t\t// @namespace Map\n\t\t// @section Tooltip events\n\t\t// @event tooltipclose: TooltipEvent\n\t\t// Fired when a tooltip in the map is closed.\n\t\tmap.fire('tooltipclose', {tooltip: this});\n\n\t\tif (this._source) {\n\t\t\tthis.removeEventParent(this._source);\n\n\t\t\t// @namespace Layer\n\t\t\t// @section Tooltip events\n\t\t\t// @event tooltipclose: TooltipEvent\n\t\t\t// Fired when a tooltip bound to this layer is closed.\n\t\t\tthis._source.fire('tooltipclose', {tooltip: this}, true);\n\t\t}\n\t},\n\n\tgetEvents: function () {\n\t\tvar events = DivOverlay.prototype.getEvents.call(this);\n\n\t\tif (!this.options.permanent) {\n\t\t\tevents.preclick = this.close;\n\t\t}\n\n\t\treturn events;\n\t},\n\n\t_initLayout: function () {\n\t\tvar prefix = 'leaflet-tooltip',\n\t\t    className = prefix + ' ' + (this.options.className || '') + ' leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide');\n\n\t\tthis._contentNode = this._container = DomUtil.create('div', className);\n\n\t\tthis._container.setAttribute('role', 'tooltip');\n\t\tthis._container.setAttribute('id', 'leaflet-tooltip-' + Util.stamp(this));\n\t},\n\n\t_updateLayout: function () {},\n\n\t_adjustPan: function () {},\n\n\t_setPosition: function (pos) {\n\t\tvar subX, subY,\n\t\t    map = this._map,\n\t\t    container = this._container,\n\t\t    centerPoint = map.latLngToContainerPoint(map.getCenter()),\n\t\t    tooltipPoint = map.layerPointToContainerPoint(pos),\n\t\t    direction = this.options.direction,\n\t\t    tooltipWidth = container.offsetWidth,\n\t\t    tooltipHeight = container.offsetHeight,\n\t\t    offset = toPoint(this.options.offset),\n\t\t    anchor = this._getAnchor();\n\n\t\tif (direction === 'top') {\n\t\t\tsubX = tooltipWidth / 2;\n\t\t\tsubY = tooltipHeight;\n\t\t} else if (direction === 'bottom') {\n\t\t\tsubX = tooltipWidth / 2;\n\t\t\tsubY = 0;\n\t\t} else if (direction === 'center') {\n\t\t\tsubX = tooltipWidth / 2;\n\t\t\tsubY = tooltipHeight / 2;\n\t\t} else if (direction === 'right') {\n\t\t\tsubX = 0;\n\t\t\tsubY = tooltipHeight / 2;\n\t\t} else if (direction === 'left') {\n\t\t\tsubX = tooltipWidth;\n\t\t\tsubY = tooltipHeight / 2;\n\t\t} else if (tooltipPoint.x < centerPoint.x) {\n\t\t\tdirection = 'right';\n\t\t\tsubX = 0;\n\t\t\tsubY = tooltipHeight / 2;\n\t\t} else {\n\t\t\tdirection = 'left';\n\t\t\tsubX = tooltipWidth + (offset.x + anchor.x) * 2;\n\t\t\tsubY = tooltipHeight / 2;\n\t\t}\n\n\t\tpos = pos.subtract(toPoint(subX, subY, true)).add(offset).add(anchor);\n\n\t\tDomUtil.removeClass(container, 'leaflet-tooltip-right');\n\t\tDomUtil.removeClass(container, 'leaflet-tooltip-left');\n\t\tDomUtil.removeClass(container, 'leaflet-tooltip-top');\n\t\tDomUtil.removeClass(container, 'leaflet-tooltip-bottom');\n\t\tDomUtil.addClass(container, 'leaflet-tooltip-' + direction);\n\t\tDomUtil.setPosition(container, pos);\n\t},\n\n\t_updatePosition: function () {\n\t\tvar pos = this._map.latLngToLayerPoint(this._latlng);\n\t\tthis._setPosition(pos);\n\t},\n\n\tsetOpacity: function (opacity) {\n\t\tthis.options.opacity = opacity;\n\n\t\tif (this._container) {\n\t\t\tDomUtil.setOpacity(this._container, opacity);\n\t\t}\n\t},\n\n\t_animateZoom: function (e) {\n\t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center);\n\t\tthis._setPosition(pos);\n\t},\n\n\t_getAnchor: function () {\n\t\t// Where should we anchor the tooltip on the source layer?\n\t\treturn toPoint(this._source && this._source._getTooltipAnchor && !this.options.sticky ? this._source._getTooltipAnchor() : [0, 0]);\n\t}\n\n});\n\n// @namespace Tooltip\n// @factory L.tooltip(options?: Tooltip options, source?: Layer)\n// Instantiates a `Tooltip` object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the tooltip with a reference to the Layer to which it refers.\n// @alternative\n// @factory L.tooltip(latlng: LatLng, options?: Tooltip options)\n// Instantiates a `Tooltip` object given `latlng` where the tooltip will open and an optional `options` object that describes its appearance and location.\nexport var tooltip = function (options, source) {\n\treturn new Tooltip(options, source);\n};\n\n// @namespace Map\n// @section Methods for Layers and Controls\nMap.include({\n\n\t// @method openTooltip(tooltip: Tooltip): this\n\t// Opens the specified tooltip.\n\t// @alternative\n\t// @method openTooltip(content: String|HTMLElement, latlng: LatLng, options?: Tooltip options): this\n\t// Creates a tooltip with the specified content and options and open it.\n\topenTooltip: function (tooltip, latlng, options) {\n\t\tthis._initOverlay(Tooltip, tooltip, latlng, options)\n\t\t  .openOn(this);\n\n\t\treturn this;\n\t},\n\n\t// @method closeTooltip(tooltip: Tooltip): this\n\t// Closes the tooltip given as parameter.\n\tcloseTooltip: function (tooltip) {\n\t\ttooltip.close();\n\t\treturn this;\n\t}\n\n});\n\n/*\n * @namespace Layer\n * @section Tooltip methods example\n *\n * All layers share a set of methods convenient for binding tooltips to it.\n *\n * ```js\n * var layer = L.Polygon(latlngs).bindTooltip('Hi There!').addTo(map);\n * layer.openTooltip();\n * layer.closeTooltip();\n * ```\n */\n\n// @section Tooltip methods\nLayer.include({\n\n\t// @method bindTooltip(content: String|HTMLElement|Function|Tooltip, options?: Tooltip options): this\n\t// Binds a tooltip to the layer with the passed `content` and sets up the\n\t// necessary event listeners. If a `Function` is passed it will receive\n\t// the layer as the first argument and should return a `String` or `HTMLElement`.\n\tbindTooltip: function (content, options) {\n\n\t\tif (this._tooltip && this.isTooltipOpen()) {\n\t\t\tthis.unbindTooltip();\n\t\t}\n\n\t\tthis._tooltip = this._initOverlay(Tooltip, this._tooltip, content, options);\n\t\tthis._initTooltipInteractions();\n\n\t\tif (this._tooltip.options.permanent && this._map && this._map.hasLayer(this)) {\n\t\t\tthis.openTooltip();\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t// @method unbindTooltip(): this\n\t// Removes the tooltip previously bound with `bindTooltip`.\n\tunbindTooltip: function () {\n\t\tif (this._tooltip) {\n\t\t\tthis._initTooltipInteractions(true);\n\t\t\tthis.closeTooltip();\n\t\t\tthis._tooltip = null;\n\t\t}\n\t\treturn this;\n\t},\n\n\t_initTooltipInteractions: function (remove) {\n\t\tif (!remove && this._tooltipHandlersAdded) { return; }\n\t\tvar onOff = remove ? 'off' : 'on',\n\t\t    events = {\n\t\t\tremove: this.closeTooltip,\n\t\t\tmove: this._moveTooltip\n\t\t    };\n\t\tif (!this._tooltip.options.permanent) {\n\t\t\tevents.mouseover = this._openTooltip;\n\t\t\tevents.mouseout = this.closeTooltip;\n\t\t\tevents.click = this._openTooltip;\n\t\t\tif (this._map) {\n\t\t\t\tthis._addFocusListeners();\n\t\t\t} else {\n\t\t\t\tevents.add = this._addFocusListeners;\n\t\t\t}\n\t\t} else {\n\t\t\tevents.add = this._openTooltip;\n\t\t}\n\t\tif (this._tooltip.options.sticky) {\n\t\t\tevents.mousemove = this._moveTooltip;\n\t\t}\n\t\tthis[onOff](events);\n\t\tthis._tooltipHandlersAdded = !remove;\n\t},\n\n\t// @method openTooltip(latlng?: LatLng): this\n\t// Opens the bound tooltip at the specified `latlng` or at the default tooltip anchor if no `latlng` is passed.\n\topenTooltip: function (latlng) {\n\t\tif (this._tooltip) {\n\t\t\tif (!(this instanceof FeatureGroup)) {\n\t\t\t\tthis._tooltip._source = this;\n\t\t\t}\n\t\t\tif (this._tooltip._prepareOpen(latlng)) {\n\t\t\t\t// open the tooltip on the map\n\t\t\t\tthis._tooltip.openOn(this._map);\n\n\t\t\t\tif (this.getElement) {\n\t\t\t\t\tthis._setAriaDescribedByOnLayer(this);\n\t\t\t\t} else if (this.eachLayer) {\n\t\t\t\t\tthis.eachLayer(this._setAriaDescribedByOnLayer, this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method closeTooltip(): this\n\t// Closes the tooltip bound to this layer if it is open.\n\tcloseTooltip: function () {\n\t\tif (this._tooltip) {\n\t\t\treturn this._tooltip.close();\n\t\t}\n\t},\n\n\t// @method toggleTooltip(): this\n\t// Opens or closes the tooltip bound to this layer depending on its current state.\n\ttoggleTooltip: function () {\n\t\tif (this._tooltip) {\n\t\t\tthis._tooltip.toggle(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method isTooltipOpen(): boolean\n\t// Returns `true` if the tooltip bound to this layer is currently open.\n\tisTooltipOpen: function () {\n\t\treturn this._tooltip.isOpen();\n\t},\n\n\t// @method setTooltipContent(content: String|HTMLElement|Tooltip): this\n\t// Sets the content of the tooltip bound to this layer.\n\tsetTooltipContent: function (content) {\n\t\tif (this._tooltip) {\n\t\t\tthis._tooltip.setContent(content);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method getTooltip(): Tooltip\n\t// Returns the tooltip bound to this layer.\n\tgetTooltip: function () {\n\t\treturn this._tooltip;\n\t},\n\n\t_addFocusListeners: function () {\n\t\tif (this.getElement) {\n\t\t\tthis._addFocusListenersOnLayer(this);\n\t\t} else if (this.eachLayer) {\n\t\t\tthis.eachLayer(this._addFocusListenersOnLayer, this);\n\t\t}\n\t},\n\n\t_addFocusListenersOnLayer: function (layer) {\n\t\tvar el = typeof layer.getElement === 'function' && layer.getElement();\n\t\tif (el) {\n\t\t\tDomEvent.on(el, 'focus', function () {\n\t\t\t\tthis._tooltip._source = layer;\n\t\t\t\tthis.openTooltip();\n\t\t\t}, this);\n\t\t\tDomEvent.on(el, 'blur', this.closeTooltip, this);\n\t\t}\n\t},\n\n\t_setAriaDescribedByOnLayer: function (layer) {\n\t\tvar el = typeof layer.getElement === 'function' && layer.getElement();\n\t\tif (el) {\n\t\t\tel.setAttribute('aria-describedby', this._tooltip._container.id);\n\t\t}\n\t},\n\n\n\t_openTooltip: function (e) {\n\t\tif (!this._tooltip || !this._map) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If the map is moving, we will show the tooltip after it's done.\n\t\tif (this._map.dragging && this._map.dragging.moving() && !this._openOnceFlag) {\n\t\t\tthis._openOnceFlag = true;\n\t\t\tvar that = this;\n\t\t\tthis._map.once('moveend', function () {\n\t\t\t\tthat._openOnceFlag = false;\n\t\t\t\tthat._openTooltip(e);\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tthis._tooltip._source = e.layer || e.target;\n\n\t\tthis.openTooltip(this._tooltip.options.sticky ? e.latlng : undefined);\n\t},\n\n\t_moveTooltip: function (e) {\n\t\tvar latlng = e.latlng, containerPoint, layerPoint;\n\t\tif (this._tooltip.options.sticky && e.originalEvent) {\n\t\t\tcontainerPoint = this._map.mouseEventToContainerPoint(e.originalEvent);\n\t\t\tlayerPoint = this._map.containerPointToLayerPoint(containerPoint);\n\t\t\tlatlng = this._map.layerPointToLatLng(layerPoint);\n\t\t}\n\t\tthis._tooltip.setLatLng(latlng);\n\t}\n});\n","import {Icon} from './Icon';\nimport {toPoint as point} from '../../geometry/Point';\nimport {empty} from '../../dom/DomUtil';\n\n/*\n * @class DivIcon\n * @aka L.DivIcon\n * @inherits Icon\n *\n * Represents a lightweight icon for markers that uses a simple `<div>`\n * element instead of an image. Inherits from `Icon` but ignores the `iconUrl` and shadow options.\n *\n * @example\n * ```js\n * var myIcon = L.divIcon({className: 'my-div-icon'});\n * // you can set .my-div-icon styles in CSS\n *\n * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map);\n * ```\n *\n * By default, it has a 'leaflet-div-icon' CSS class and is styled as a little white square with a shadow.\n */\n\nexport var DivIcon = Icon.extend({\n\toptions: {\n\t\t// @section\n\t\t// @aka DivIcon options\n\t\ticonSize: [12, 12], // also can be set through CSS\n\n\t\t// iconAnchor: (Point),\n\t\t// popupAnchor: (Point),\n\n\t\t// @option html: String|HTMLElement = ''\n\t\t// Custom HTML code to put inside the div element, empty by default. Alternatively,\n\t\t// an instance of `HTMLElement`.\n\t\thtml: false,\n\n\t\t// @option bgPos: Point = [0, 0]\n\t\t// Optional relative position of the background, in pixels\n\t\tbgPos: null,\n\n\t\tclassName: 'leaflet-div-icon'\n\t},\n\n\tcreateIcon: function (oldIcon) {\n\t\tvar div = (oldIcon && oldIcon.tagName === 'DIV') ? oldIcon : document.createElement('div'),\n\t\t    options = this.options;\n\n\t\tif (options.html instanceof Element) {\n\t\t\tempty(div);\n\t\t\tdiv.appendChild(options.html);\n\t\t} else {\n\t\t\tdiv.innerHTML = options.html !== false ? options.html : '';\n\t\t}\n\n\t\tif (options.bgPos) {\n\t\t\tvar bgPos = point(options.bgPos);\n\t\t\tdiv.style.backgroundPosition = (-bgPos.x) + 'px ' + (-bgPos.y) + 'px';\n\t\t}\n\t\tthis._setIconStyles(div, 'icon');\n\n\t\treturn div;\n\t},\n\n\tcreateShadow: function () {\n\t\treturn null;\n\t}\n});\n\n// @factory L.divIcon(options: DivIcon options)\n// Creates a `DivIcon` instance with the given options.\nexport function divIcon(options) {\n\treturn new DivIcon(options);\n}\n","import {Icon} from './Icon';\nexport {icon} from './Icon';\nimport {IconDefault} from './Icon.Default';\nIcon.Default = IconDefault;\nexport {Icon};\n\nexport {DivIcon, divIcon} from './DivIcon';\nexport {Marker, marker} from './Marker';\n","import {Layer} from '../Layer';\nimport Browser from '../../core/Browser';\nimport * as Util from '../../core/Util';\nimport * as DomUtil from '../../dom/DomUtil';\nimport {Point} from '../../geometry/Point';\nimport {Bounds} from '../../geometry/Bounds';\nimport {LatLngBounds, toLatLngBounds as latLngBounds} from '../../geo/LatLngBounds';\n\n/*\n * @class GridLayer\n * @inherits Layer\n * @aka L.GridLayer\n *\n * Generic class for handling a tiled grid of HTML elements. This is the base class for all tile layers and replaces `TileLayer.Canvas`.\n * GridLayer can be extended to create a tiled grid of HTML elements like `<canvas>`, `<img>` or `<div>`. GridLayer will handle creating and animating these DOM elements for you.\n *\n *\n * @section Synchronous usage\n * @example\n *\n * To create a custom layer, extend GridLayer and implement the `createTile()` method, which will be passed a `Point` object with the `x`, `y`, and `z` (zoom level) coordinates to draw your tile.\n *\n * ```js\n * var CanvasLayer = L.GridLayer.extend({\n *     createTile: function(coords){\n *         // create a <canvas> element for drawing\n *         var tile = L.DomUtil.create('canvas', 'leaflet-tile');\n *\n *         // setup tile width and height according to the options\n *         var size = this.getTileSize();\n *         tile.width = size.x;\n *         tile.height = size.y;\n *\n *         // get a canvas context and draw something on it using coords.x, coords.y and coords.z\n *         var ctx = tile.getContext('2d');\n *\n *         // return the tile so it can be rendered on screen\n *         return tile;\n *     }\n * });\n * ```\n *\n * @section Asynchronous usage\n * @example\n *\n * Tile creation can also be asynchronous, this is useful when using a third-party drawing library. Once the tile is finished drawing it can be passed to the `done()` callback.\n *\n * ```js\n * var CanvasLayer = L.GridLayer.extend({\n *     createTile: function(coords, done){\n *         var error;\n *\n *         // create a <canvas> element for drawing\n *         var tile = L.DomUtil.create('canvas', 'leaflet-tile');\n *\n *         // setup tile width and height according to the options\n *         var size = this.getTileSize();\n *         tile.width = size.x;\n *         tile.height = size.y;\n *\n *         // draw something asynchronously and pass the tile to the done() callback\n *         setTimeout(function() {\n *             done(error, tile);\n *         }, 1000);\n *\n *         return tile;\n *     }\n * });\n * ```\n *\n * @section\n */\n\n\nexport var GridLayer = Layer.extend({\n\n\t// @section\n\t// @aka GridLayer options\n\toptions: {\n\t\t// @option tileSize: Number|Point = 256\n\t\t// Width and height of tiles in the grid. Use a number if width and height are equal, or `L.point(width, height)` otherwise.\n\t\ttileSize: 256,\n\n\t\t// @option opacity: Number = 1.0\n\t\t// Opacity of the tiles. Can be used in the `createTile()` function.\n\t\topacity: 1,\n\n\t\t// @option updateWhenIdle: Boolean = (depends)\n\t\t// Load new tiles only when panning ends.\n\t\t// `true` by default on mobile browsers, in order to avoid too many requests and keep smooth navigation.\n\t\t// `false` otherwise in order to display new tiles _during_ panning, since it is easy to pan outside the\n\t\t// [`keepBuffer`](#gridlayer-keepbuffer) option in desktop browsers.\n\t\tupdateWhenIdle: Browser.mobile,\n\n\t\t// @option updateWhenZooming: Boolean = true\n\t\t// By default, a smooth zoom animation (during a [touch zoom](#map-touchzoom) or a [`flyTo()`](#map-flyto)) will update grid layers every integer zoom level. Setting this option to `false` will update the grid layer only when the smooth animation ends.\n\t\tupdateWhenZooming: true,\n\n\t\t// @option updateInterval: Number = 200\n\t\t// Tiles will not update more than once every `updateInterval` milliseconds when panning.\n\t\tupdateInterval: 200,\n\n\t\t// @option zIndex: Number = 1\n\t\t// The explicit zIndex of the tile layer.\n\t\tzIndex: 1,\n\n\t\t// @option bounds: LatLngBounds = undefined\n\t\t// If set, tiles will only be loaded inside the set `LatLngBounds`.\n\t\tbounds: null,\n\n\t\t// @option minZoom: Number = 0\n\t\t// The minimum zoom level down to which this layer will be displayed (inclusive).\n\t\tminZoom: 0,\n\n\t\t// @option maxZoom: Number = undefined\n\t\t// The maximum zoom level up to which this layer will be displayed (inclusive).\n\t\tmaxZoom: undefined,\n\n\t\t// @option maxNativeZoom: Number = undefined\n\t\t// Maximum zoom number the tile source has available. If it is specified,\n\t\t// the tiles on all zoom levels higher than `maxNativeZoom` will be loaded\n\t\t// from `maxNativeZoom` level and auto-scaled.\n\t\tmaxNativeZoom: undefined,\n\n\t\t// @option minNativeZoom: Number = undefined\n\t\t// Minimum zoom number the tile source has available. If it is specified,\n\t\t// the tiles on all zoom levels lower than `minNativeZoom` will be loaded\n\t\t// from `minNativeZoom` level and auto-scaled.\n\t\tminNativeZoom: undefined,\n\n\t\t// @option noWrap: Boolean = false\n\t\t// Whether the layer is wrapped around the antimeridian. If `true`, the\n\t\t// GridLayer will only be displayed once at low zoom levels. Has no\n\t\t// effect when the [map CRS](#map-crs) doesn't wrap around. Can be used\n\t\t// in combination with [`bounds`](#gridlayer-bounds) to prevent requesting\n\t\t// tiles outside the CRS limits.\n\t\tnoWrap: false,\n\n\t\t// @option pane: String = 'tilePane'\n\t\t// `Map pane` where the grid layer will be added.\n\t\tpane: 'tilePane',\n\n\t\t// @option className: String = ''\n\t\t// A custom class name to assign to the tile layer. Empty by default.\n\t\tclassName: '',\n\n\t\t// @option keepBuffer: Number = 2\n\t\t// When panning the map, keep this many rows and columns of tiles before unloading them.\n\t\tkeepBuffer: 2\n\t},\n\n\tinitialize: function (options) {\n\t\tUtil.setOptions(this, options);\n\t},\n\n\tonAdd: function () {\n\t\tthis._initContainer();\n\n\t\tthis._levels = {};\n\t\tthis._tiles = {};\n\n\t\tthis._resetView(); // implicit _update() call\n\t},\n\n\tbeforeAdd: function (map) {\n\t\tmap._addZoomLimit(this);\n\t},\n\n\tonRemove: function (map) {\n\t\tthis._removeAllTiles();\n\t\tDomUtil.remove(this._container);\n\t\tmap._removeZoomLimit(this);\n\t\tthis._container = null;\n\t\tthis._tileZoom = undefined;\n\t},\n\n\t// @method bringToFront: this\n\t// Brings the tile layer to the top of all tile layers.\n\tbringToFront: function () {\n\t\tif (this._map) {\n\t\t\tDomUtil.toFront(this._container);\n\t\t\tthis._setAutoZIndex(Math.max);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method bringToBack: this\n\t// Brings the tile layer to the bottom of all tile layers.\n\tbringToBack: function () {\n\t\tif (this._map) {\n\t\t\tDomUtil.toBack(this._container);\n\t\t\tthis._setAutoZIndex(Math.min);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method getContainer: HTMLElement\n\t// Returns the HTML element that contains the tiles for this layer.\n\tgetContainer: function () {\n\t\treturn this._container;\n\t},\n\n\t// @method setOpacity(opacity: Number): this\n\t// Changes the [opacity](#gridlayer-opacity) of the grid layer.\n\tsetOpacity: function (opacity) {\n\t\tthis.options.opacity = opacity;\n\t\tthis._updateOpacity();\n\t\treturn this;\n\t},\n\n\t// @method setZIndex(zIndex: Number): this\n\t// Changes the [zIndex](#gridlayer-zindex) of the grid layer.\n\tsetZIndex: function (zIndex) {\n\t\tthis.options.zIndex = zIndex;\n\t\tthis._updateZIndex();\n\n\t\treturn this;\n\t},\n\n\t// @method isLoading: Boolean\n\t// Returns `true` if any tile in the grid layer has not finished loading.\n\tisLoading: function () {\n\t\treturn this._loading;\n\t},\n\n\t// @method redraw: this\n\t// Causes the layer to clear all the tiles and request them again.\n\tredraw: function () {\n\t\tif (this._map) {\n\t\t\tthis._removeAllTiles();\n\t\t\tvar tileZoom = this._clampZoom(this._map.getZoom());\n\t\t\tif (tileZoom !== this._tileZoom) {\n\t\t\t\tthis._tileZoom = tileZoom;\n\t\t\t\tthis._updateLevels();\n\t\t\t}\n\t\t\tthis._update();\n\t\t}\n\t\treturn this;\n\t},\n\n\tgetEvents: function () {\n\t\tvar events = {\n\t\t\tviewprereset: this._invalidateAll,\n\t\t\tviewreset: this._resetView,\n\t\t\tzoom: this._resetView,\n\t\t\tmoveend: this._onMoveEnd\n\t\t};\n\n\t\tif (!this.options.updateWhenIdle) {\n\t\t\t// update tiles on move, but not more often than once per given interval\n\t\t\tif (!this._onMove) {\n\t\t\t\tthis._onMove = Util.throttle(this._onMoveEnd, this.options.updateInterval, this);\n\t\t\t}\n\n\t\t\tevents.move = this._onMove;\n\t\t}\n\n\t\tif (this._zoomAnimated) {\n\t\t\tevents.zoomanim = this._animateZoom;\n\t\t}\n\n\t\treturn events;\n\t},\n\n\t// @section Extension methods\n\t// Layers extending `GridLayer` shall reimplement the following method.\n\t// @method createTile(coords: Object, done?: Function): HTMLElement\n\t// Called only internally, must be overridden by classes extending `GridLayer`.\n\t// Returns the `HTMLElement` corresponding to the given `coords`. If the `done` callback\n\t// is specified, it must be called when the tile has finished loading and drawing.\n\tcreateTile: function () {\n\t\treturn document.createElement('div');\n\t},\n\n\t// @section\n\t// @method getTileSize: Point\n\t// Normalizes the [tileSize option](#gridlayer-tilesize) into a point. Used by the `createTile()` method.\n\tgetTileSize: function () {\n\t\tvar s = this.options.tileSize;\n\t\treturn s instanceof Point ? s : new Point(s, s);\n\t},\n\n\t_updateZIndex: function () {\n\t\tif (this._container && this.options.zIndex !== undefined && this.options.zIndex !== null) {\n\t\t\tthis._container.style.zIndex = this.options.zIndex;\n\t\t}\n\t},\n\n\t_setAutoZIndex: function (compare) {\n\t\t// go through all other layers of the same pane, set zIndex to max + 1 (front) or min - 1 (back)\n\n\t\tvar layers = this.getPane().children,\n\t\t    edgeZIndex = -compare(-Infinity, Infinity); // -Infinity for max, Infinity for min\n\n\t\tfor (var i = 0, len = layers.length, zIndex; i < len; i++) {\n\n\t\t\tzIndex = layers[i].style.zIndex;\n\n\t\t\tif (layers[i] !== this._container && zIndex) {\n\t\t\t\tedgeZIndex = compare(edgeZIndex, +zIndex);\n\t\t\t}\n\t\t}\n\n\t\tif (isFinite(edgeZIndex)) {\n\t\t\tthis.options.zIndex = edgeZIndex + compare(-1, 1);\n\t\t\tthis._updateZIndex();\n\t\t}\n\t},\n\n\t_updateOpacity: function () {\n\t\tif (!this._map) { return; }\n\n\t\t// IE doesn't inherit filter opacity properly, so we're forced to set it on tiles\n\t\tif (Browser.ielt9) { return; }\n\n\t\tDomUtil.setOpacity(this._container, this.options.opacity);\n\n\t\tvar now = +new Date(),\n\t\t    nextFrame = false,\n\t\t    willPrune = false;\n\n\t\tfor (var key in this._tiles) {\n\t\t\tvar tile = this._tiles[key];\n\t\t\tif (!tile.current || !tile.loaded) { continue; }\n\n\t\t\tvar fade = Math.min(1, (now - tile.loaded) / 200);\n\n\t\t\tDomUtil.setOpacity(tile.el, fade);\n\t\t\tif (fade < 1) {\n\t\t\t\tnextFrame = true;\n\t\t\t} else {\n\t\t\t\tif (tile.active) {\n\t\t\t\t\twillPrune = true;\n\t\t\t\t} else {\n\t\t\t\t\tthis._onOpaqueTile(tile);\n\t\t\t\t}\n\t\t\t\ttile.active = true;\n\t\t\t}\n\t\t}\n\n\t\tif (willPrune && !this._noPrune) { this._pruneTiles(); }\n\n\t\tif (nextFrame) {\n\t\t\tUtil.cancelAnimFrame(this._fadeFrame);\n\t\t\tthis._fadeFrame = Util.requestAnimFrame(this._updateOpacity, this);\n\t\t}\n\t},\n\n\t_onOpaqueTile: Util.falseFn,\n\n\t_initContainer: function () {\n\t\tif (this._container) { return; }\n\n\t\tthis._container = DomUtil.create('div', 'leaflet-layer ' + (this.options.className || ''));\n\t\tthis._updateZIndex();\n\n\t\tif (this.options.opacity < 1) {\n\t\t\tthis._updateOpacity();\n\t\t}\n\n\t\tthis.getPane().appendChild(this._container);\n\t},\n\n\t_updateLevels: function () {\n\n\t\tvar zoom = this._tileZoom,\n\t\t    maxZoom = this.options.maxZoom;\n\n\t\tif (zoom === undefined) { return undefined; }\n\n\t\tfor (var z in this._levels) {\n\t\t\tz = Number(z);\n\t\t\tif (this._levels[z].el.children.length || z === zoom) {\n\t\t\t\tthis._levels[z].el.style.zIndex = maxZoom - Math.abs(zoom - z);\n\t\t\t\tthis._onUpdateLevel(z);\n\t\t\t} else {\n\t\t\t\tDomUtil.remove(this._levels[z].el);\n\t\t\t\tthis._removeTilesAtZoom(z);\n\t\t\t\tthis._onRemoveLevel(z);\n\t\t\t\tdelete this._levels[z];\n\t\t\t}\n\t\t}\n\n\t\tvar level = this._levels[zoom],\n\t\t    map = this._map;\n\n\t\tif (!level) {\n\t\t\tlevel = this._levels[zoom] = {};\n\n\t\t\tlevel.el = DomUtil.create('div', 'leaflet-tile-container leaflet-zoom-animated', this._container);\n\t\t\tlevel.el.style.zIndex = maxZoom;\n\n\t\t\tlevel.origin = map.project(map.unproject(map.getPixelOrigin()), zoom).round();\n\t\t\tlevel.zoom = zoom;\n\n\t\t\tthis._setZoomTransform(level, map.getCenter(), map.getZoom());\n\n\t\t\t// force the browser to consider the newly added element for transition\n\t\t\tUtil.falseFn(level.el.offsetWidth);\n\n\t\t\tthis._onCreateLevel(level);\n\t\t}\n\n\t\tthis._level = level;\n\n\t\treturn level;\n\t},\n\n\t_onUpdateLevel: Util.falseFn,\n\n\t_onRemoveLevel: Util.falseFn,\n\n\t_onCreateLevel: Util.falseFn,\n\n\t_pruneTiles: function () {\n\t\tif (!this._map) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar key, tile;\n\n\t\tvar zoom = this._map.getZoom();\n\t\tif (zoom > this.options.maxZoom ||\n\t\t\tzoom < this.options.minZoom) {\n\t\t\tthis._removeAllTiles();\n\t\t\treturn;\n\t\t}\n\n\t\tfor (key in this._tiles) {\n\t\t\ttile = this._tiles[key];\n\t\t\ttile.retain = tile.current;\n\t\t}\n\n\t\tfor (key in this._tiles) {\n\t\t\ttile = this._tiles[key];\n\t\t\tif (tile.current && !tile.active) {\n\t\t\t\tvar coords = tile.coords;\n\t\t\t\tif (!this._retainParent(coords.x, coords.y, coords.z, coords.z - 5)) {\n\t\t\t\t\tthis._retainChildren(coords.x, coords.y, coords.z, coords.z + 2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (key in this._tiles) {\n\t\t\tif (!this._tiles[key].retain) {\n\t\t\t\tthis._removeTile(key);\n\t\t\t}\n\t\t}\n\t},\n\n\t_removeTilesAtZoom: function (zoom) {\n\t\tfor (var key in this._tiles) {\n\t\t\tif (this._tiles[key].coords.z !== zoom) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._removeTile(key);\n\t\t}\n\t},\n\n\t_removeAllTiles: function () {\n\t\tfor (var key in this._tiles) {\n\t\t\tthis._removeTile(key);\n\t\t}\n\t},\n\n\t_invalidateAll: function () {\n\t\tfor (var z in this._levels) {\n\t\t\tDomUtil.remove(this._levels[z].el);\n\t\t\tthis._onRemoveLevel(Number(z));\n\t\t\tdelete this._levels[z];\n\t\t}\n\t\tthis._removeAllTiles();\n\n\t\tthis._tileZoom = undefined;\n\t},\n\n\t_retainParent: function (x, y, z, minZoom) {\n\t\tvar x2 = Math.floor(x / 2),\n\t\t    y2 = Math.floor(y / 2),\n\t\t    z2 = z - 1,\n\t\t    coords2 = new Point(+x2, +y2);\n\t\tcoords2.z = +z2;\n\n\t\tvar key = this._tileCoordsToKey(coords2),\n\t\t    tile = this._tiles[key];\n\n\t\tif (tile && tile.active) {\n\t\t\ttile.retain = true;\n\t\t\treturn true;\n\n\t\t} else if (tile && tile.loaded) {\n\t\t\ttile.retain = true;\n\t\t}\n\n\t\tif (z2 > minZoom) {\n\t\t\treturn this._retainParent(x2, y2, z2, minZoom);\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_retainChildren: function (x, y, z, maxZoom) {\n\n\t\tfor (var i = 2 * x; i < 2 * x + 2; i++) {\n\t\t\tfor (var j = 2 * y; j < 2 * y + 2; j++) {\n\n\t\t\t\tvar coords = new Point(i, j);\n\t\t\t\tcoords.z = z + 1;\n\n\t\t\t\tvar key = this._tileCoordsToKey(coords),\n\t\t\t\t    tile = this._tiles[key];\n\n\t\t\t\tif (tile && tile.active) {\n\t\t\t\t\ttile.retain = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else if (tile && tile.loaded) {\n\t\t\t\t\ttile.retain = true;\n\t\t\t\t}\n\n\t\t\t\tif (z + 1 < maxZoom) {\n\t\t\t\t\tthis._retainChildren(i, j, z + 1, maxZoom);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t_resetView: function (e) {\n\t\tvar animating = e && (e.pinch || e.flyTo);\n\t\tthis._setView(this._map.getCenter(), this._map.getZoom(), animating, animating);\n\t},\n\n\t_animateZoom: function (e) {\n\t\tthis._setView(e.center, e.zoom, true, e.noUpdate);\n\t},\n\n\t_clampZoom: function (zoom) {\n\t\tvar options = this.options;\n\n\t\tif (undefined !== options.minNativeZoom && zoom < options.minNativeZoom) {\n\t\t\treturn options.minNativeZoom;\n\t\t}\n\n\t\tif (undefined !== options.maxNativeZoom && options.maxNativeZoom < zoom) {\n\t\t\treturn options.maxNativeZoom;\n\t\t}\n\n\t\treturn zoom;\n\t},\n\n\t_setView: function (center, zoom, noPrune, noUpdate) {\n\t\tvar tileZoom = Math.round(zoom);\n\t\tif ((this.options.maxZoom !== undefined && tileZoom > this.options.maxZoom) ||\n\t\t    (this.options.minZoom !== undefined && tileZoom < this.options.minZoom)) {\n\t\t\ttileZoom = undefined;\n\t\t} else {\n\t\t\ttileZoom = this._clampZoom(tileZoom);\n\t\t}\n\n\t\tvar tileZoomChanged = this.options.updateWhenZooming && (tileZoom !== this._tileZoom);\n\n\t\tif (!noUpdate || tileZoomChanged) {\n\n\t\t\tthis._tileZoom = tileZoom;\n\n\t\t\tif (this._abortLoading) {\n\t\t\t\tthis._abortLoading();\n\t\t\t}\n\n\t\t\tthis._updateLevels();\n\t\t\tthis._resetGrid();\n\n\t\t\tif (tileZoom !== undefined) {\n\t\t\t\tthis._update(center);\n\t\t\t}\n\n\t\t\tif (!noPrune) {\n\t\t\t\tthis._pruneTiles();\n\t\t\t}\n\n\t\t\t// Flag to prevent _updateOpacity from pruning tiles during\n\t\t\t// a zoom anim or a pinch gesture\n\t\t\tthis._noPrune = !!noPrune;\n\t\t}\n\n\t\tthis._setZoomTransforms(center, zoom);\n\t},\n\n\t_setZoomTransforms: function (center, zoom) {\n\t\tfor (var i in this._levels) {\n\t\t\tthis._setZoomTransform(this._levels[i], center, zoom);\n\t\t}\n\t},\n\n\t_setZoomTransform: function (level, center, zoom) {\n\t\tvar scale = this._map.getZoomScale(zoom, level.zoom),\n\t\t    translate = level.origin.multiplyBy(scale)\n\t\t        .subtract(this._map._getNewPixelOrigin(center, zoom)).round();\n\n\t\tif (Browser.any3d) {\n\t\t\tDomUtil.setTransform(level.el, translate, scale);\n\t\t} else {\n\t\t\tDomUtil.setPosition(level.el, translate);\n\t\t}\n\t},\n\n\t_resetGrid: function () {\n\t\tvar map = this._map,\n\t\t    crs = map.options.crs,\n\t\t    tileSize = this._tileSize = this.getTileSize(),\n\t\t    tileZoom = this._tileZoom;\n\n\t\tvar bounds = this._map.getPixelWorldBounds(this._tileZoom);\n\t\tif (bounds) {\n\t\t\tthis._globalTileRange = this._pxBoundsToTileRange(bounds);\n\t\t}\n\n\t\tthis._wrapX = crs.wrapLng && !this.options.noWrap && [\n\t\t\tMath.floor(map.project([0, crs.wrapLng[0]], tileZoom).x / tileSize.x),\n\t\t\tMath.ceil(map.project([0, crs.wrapLng[1]], tileZoom).x / tileSize.y)\n\t\t];\n\t\tthis._wrapY = crs.wrapLat && !this.options.noWrap && [\n\t\t\tMath.floor(map.project([crs.wrapLat[0], 0], tileZoom).y / tileSize.x),\n\t\t\tMath.ceil(map.project([crs.wrapLat[1], 0], tileZoom).y / tileSize.y)\n\t\t];\n\t},\n\n\t_onMoveEnd: function () {\n\t\tif (!this._map || this._map._animatingZoom) { return; }\n\n\t\tthis._update();\n\t},\n\n\t_getTiledPixelBounds: function (center) {\n\t\tvar map = this._map,\n\t\t    mapZoom = map._animatingZoom ? Math.max(map._animateToZoom, map.getZoom()) : map.getZoom(),\n\t\t    scale = map.getZoomScale(mapZoom, this._tileZoom),\n\t\t    pixelCenter = map.project(center, this._tileZoom).floor(),\n\t\t    halfSize = map.getSize().divideBy(scale * 2);\n\n\t\treturn new Bounds(pixelCenter.subtract(halfSize), pixelCenter.add(halfSize));\n\t},\n\n\t// Private method to load tiles in the grid's active zoom level according to map bounds\n\t_update: function (center) {\n\t\tvar map = this._map;\n\t\tif (!map) { return; }\n\t\tvar zoom = this._clampZoom(map.getZoom());\n\n\t\tif (center === undefined) { center = map.getCenter(); }\n\t\tif (this._tileZoom === undefined) { return; }\t// if out of minzoom/maxzoom\n\n\t\tvar pixelBounds = this._getTiledPixelBounds(center),\n\t\t    tileRange = this._pxBoundsToTileRange(pixelBounds),\n\t\t    tileCenter = tileRange.getCenter(),\n\t\t    queue = [],\n\t\t    margin = this.options.keepBuffer,\n\t\t    noPruneRange = new Bounds(tileRange.getBottomLeft().subtract([margin, -margin]),\n\t\t                              tileRange.getTopRight().add([margin, -margin]));\n\n\t\t// Sanity check: panic if the tile range contains Infinity somewhere.\n\t\tif (!(isFinite(tileRange.min.x) &&\n\t\t      isFinite(tileRange.min.y) &&\n\t\t      isFinite(tileRange.max.x) &&\n\t\t      isFinite(tileRange.max.y))) { throw new Error('Attempted to load an infinite number of tiles'); }\n\n\t\tfor (var key in this._tiles) {\n\t\t\tvar c = this._tiles[key].coords;\n\t\t\tif (c.z !== this._tileZoom || !noPruneRange.contains(new Point(c.x, c.y))) {\n\t\t\t\tthis._tiles[key].current = false;\n\t\t\t}\n\t\t}\n\n\t\t// _update just loads more tiles. If the tile zoom level differs too much\n\t\t// from the map's, let _setView reset levels and prune old tiles.\n\t\tif (Math.abs(zoom - this._tileZoom) > 1) { this._setView(center, zoom); return; }\n\n\t\t// create a queue of coordinates to load tiles from\n\t\tfor (var j = tileRange.min.y; j <= tileRange.max.y; j++) {\n\t\t\tfor (var i = tileRange.min.x; i <= tileRange.max.x; i++) {\n\t\t\t\tvar coords = new Point(i, j);\n\t\t\t\tcoords.z = this._tileZoom;\n\n\t\t\t\tif (!this._isValidTile(coords)) { continue; }\n\n\t\t\t\tvar tile = this._tiles[this._tileCoordsToKey(coords)];\n\t\t\t\tif (tile) {\n\t\t\t\t\ttile.current = true;\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push(coords);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort tile queue to load tiles in order of their distance to center\n\t\tqueue.sort(function (a, b) {\n\t\t\treturn a.distanceTo(tileCenter) - b.distanceTo(tileCenter);\n\t\t});\n\n\t\tif (queue.length !== 0) {\n\t\t\t// if it's the first batch of tiles to load\n\t\t\tif (!this._loading) {\n\t\t\t\tthis._loading = true;\n\t\t\t\t// @event loading: Event\n\t\t\t\t// Fired when the grid layer starts loading tiles.\n\t\t\t\tthis.fire('loading');\n\t\t\t}\n\n\t\t\t// create DOM fragment to append tiles in one batch\n\t\t\tvar fragment = document.createDocumentFragment();\n\n\t\t\tfor (i = 0; i < queue.length; i++) {\n\t\t\t\tthis._addTile(queue[i], fragment);\n\t\t\t}\n\n\t\t\tthis._level.el.appendChild(fragment);\n\t\t}\n\t},\n\n\t_isValidTile: function (coords) {\n\t\tvar crs = this._map.options.crs;\n\n\t\tif (!crs.infinite) {\n\t\t\t// don't load tile if it's out of bounds and not wrapped\n\t\t\tvar bounds = this._globalTileRange;\n\t\t\tif ((!crs.wrapLng && (coords.x < bounds.min.x || coords.x > bounds.max.x)) ||\n\t\t\t    (!crs.wrapLat && (coords.y < bounds.min.y || coords.y > bounds.max.y))) { return false; }\n\t\t}\n\n\t\tif (!this.options.bounds) { return true; }\n\n\t\t// don't load tile if it doesn't intersect the bounds in options\n\t\tvar tileBounds = this._tileCoordsToBounds(coords);\n\t\treturn latLngBounds(this.options.bounds).overlaps(tileBounds);\n\t},\n\n\t_keyToBounds: function (key) {\n\t\treturn this._tileCoordsToBounds(this._keyToTileCoords(key));\n\t},\n\n\t_tileCoordsToNwSe: function (coords) {\n\t\tvar map = this._map,\n\t\t    tileSize = this.getTileSize(),\n\t\t    nwPoint = coords.scaleBy(tileSize),\n\t\t    sePoint = nwPoint.add(tileSize),\n\t\t    nw = map.unproject(nwPoint, coords.z),\n\t\t    se = map.unproject(sePoint, coords.z);\n\t\treturn [nw, se];\n\t},\n\n\t// converts tile coordinates to its geographical bounds\n\t_tileCoordsToBounds: function (coords) {\n\t\tvar bp = this._tileCoordsToNwSe(coords),\n\t\t    bounds = new LatLngBounds(bp[0], bp[1]);\n\n\t\tif (!this.options.noWrap) {\n\t\t\tbounds = this._map.wrapLatLngBounds(bounds);\n\t\t}\n\t\treturn bounds;\n\t},\n\t// converts tile coordinates to key for the tile cache\n\t_tileCoordsToKey: function (coords) {\n\t\treturn coords.x + ':' + coords.y + ':' + coords.z;\n\t},\n\n\t// converts tile cache key to coordinates\n\t_keyToTileCoords: function (key) {\n\t\tvar k = key.split(':'),\n\t\t    coords = new Point(+k[0], +k[1]);\n\t\tcoords.z = +k[2];\n\t\treturn coords;\n\t},\n\n\t_removeTile: function (key) {\n\t\tvar tile = this._tiles[key];\n\t\tif (!tile) { return; }\n\n\t\tDomUtil.remove(tile.el);\n\n\t\tdelete this._tiles[key];\n\n\t\t// @event tileunload: TileEvent\n\t\t// Fired when a tile is removed (e.g. when a tile goes off the screen).\n\t\tthis.fire('tileunload', {\n\t\t\ttile: tile.el,\n\t\t\tcoords: this._keyToTileCoords(key)\n\t\t});\n\t},\n\n\t_initTile: function (tile) {\n\t\tDomUtil.addClass(tile, 'leaflet-tile');\n\n\t\tvar tileSize = this.getTileSize();\n\t\ttile.style.width = tileSize.x + 'px';\n\t\ttile.style.height = tileSize.y + 'px';\n\n\t\ttile.onselectstart = Util.falseFn;\n\t\ttile.onmousemove = Util.falseFn;\n\n\t\t// update opacity on tiles in IE7-8 because of filter inheritance problems\n\t\tif (Browser.ielt9 && this.options.opacity < 1) {\n\t\t\tDomUtil.setOpacity(tile, this.options.opacity);\n\t\t}\n\t},\n\n\t_addTile: function (coords, container) {\n\t\tvar tilePos = this._getTilePos(coords),\n\t\t    key = this._tileCoordsToKey(coords);\n\n\t\tvar tile = this.createTile(this._wrapCoords(coords), Util.bind(this._tileReady, this, coords));\n\n\t\tthis._initTile(tile);\n\n\t\t// if createTile is defined with a second argument (\"done\" callback),\n\t\t// we know that tile is async and will be ready later; otherwise\n\t\tif (this.createTile.length < 2) {\n\t\t\t// mark tile as ready, but delay one frame for opacity animation to happen\n\t\t\tUtil.requestAnimFrame(Util.bind(this._tileReady, this, coords, null, tile));\n\t\t}\n\n\t\tDomUtil.setPosition(tile, tilePos);\n\n\t\t// save tile in cache\n\t\tthis._tiles[key] = {\n\t\t\tel: tile,\n\t\t\tcoords: coords,\n\t\t\tcurrent: true\n\t\t};\n\n\t\tcontainer.appendChild(tile);\n\t\t// @event tileloadstart: TileEvent\n\t\t// Fired when a tile is requested and starts loading.\n\t\tthis.fire('tileloadstart', {\n\t\t\ttile: tile,\n\t\t\tcoords: coords\n\t\t});\n\t},\n\n\t_tileReady: function (coords, err, tile) {\n\t\tif (err) {\n\t\t\t// @event tileerror: TileErrorEvent\n\t\t\t// Fired when there is an error loading a tile.\n\t\t\tthis.fire('tileerror', {\n\t\t\t\terror: err,\n\t\t\t\ttile: tile,\n\t\t\t\tcoords: coords\n\t\t\t});\n\t\t}\n\n\t\tvar key = this._tileCoordsToKey(coords);\n\n\t\ttile = this._tiles[key];\n\t\tif (!tile) { return; }\n\n\t\ttile.loaded = +new Date();\n\t\tif (this._map._fadeAnimated) {\n\t\t\tDomUtil.setOpacity(tile.el, 0);\n\t\t\tUtil.cancelAnimFrame(this._fadeFrame);\n\t\t\tthis._fadeFrame = Util.requestAnimFrame(this._updateOpacity, this);\n\t\t} else {\n\t\t\ttile.active = true;\n\t\t\tthis._pruneTiles();\n\t\t}\n\n\t\tif (!err) {\n\t\t\tDomUtil.addClass(tile.el, 'leaflet-tile-loaded');\n\n\t\t\t// @event tileload: TileEvent\n\t\t\t// Fired when a tile loads.\n\t\t\tthis.fire('tileload', {\n\t\t\t\ttile: tile.el,\n\t\t\t\tcoords: coords\n\t\t\t});\n\t\t}\n\n\t\tif (this._noTilesToLoad()) {\n\t\t\tthis._loading = false;\n\t\t\t// @event load: Event\n\t\t\t// Fired when the grid layer loaded all visible tiles.\n\t\t\tthis.fire('load');\n\n\t\t\tif (Browser.ielt9 || !this._map._fadeAnimated) {\n\t\t\t\tUtil.requestAnimFrame(this._pruneTiles, this);\n\t\t\t} else {\n\t\t\t\t// Wait a bit more than 0.2 secs (the duration of the tile fade-in)\n\t\t\t\t// to trigger a pruning.\n\t\t\t\tsetTimeout(Util.bind(this._pruneTiles, this), 250);\n\t\t\t}\n\t\t}\n\t},\n\n\t_getTilePos: function (coords) {\n\t\treturn coords.scaleBy(this.getTileSize()).subtract(this._level.origin);\n\t},\n\n\t_wrapCoords: function (coords) {\n\t\tvar newCoords = new Point(\n\t\t\tthis._wrapX ? Util.wrapNum(coords.x, this._wrapX) : coords.x,\n\t\t\tthis._wrapY ? Util.wrapNum(coords.y, this._wrapY) : coords.y);\n\t\tnewCoords.z = coords.z;\n\t\treturn newCoords;\n\t},\n\n\t_pxBoundsToTileRange: function (bounds) {\n\t\tvar tileSize = this.getTileSize();\n\t\treturn new Bounds(\n\t\t\tbounds.min.unscaleBy(tileSize).floor(),\n\t\t\tbounds.max.unscaleBy(tileSize).ceil().subtract([1, 1]));\n\t},\n\n\t_noTilesToLoad: function () {\n\t\tfor (var key in this._tiles) {\n\t\t\tif (!this._tiles[key].loaded) { return false; }\n\t\t}\n\t\treturn true;\n\t}\n});\n\n// @factory L.gridLayer(options?: GridLayer options)\n// Creates a new instance of GridLayer with the supplied options.\nexport function gridLayer(options) {\n\treturn new GridLayer(options);\n}\n","import {GridLayer} from './GridLayer';\r\nimport Browser from '../../core/Browser';\r\nimport * as Util from '../../core/Util';\r\nimport * as DomEvent from '../../dom/DomEvent';\r\nimport * as DomUtil from '../../dom/DomUtil';\r\n\r\n\r\n/*\r\n * @class TileLayer\r\n * @inherits GridLayer\r\n * @aka L.TileLayer\r\n * Used to load and display tile layers on the map. Note that most tile servers require attribution, which you can set under `Layer`. Extends `GridLayer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', {foo: 'bar', attribution: '&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors'}).addTo(map);\n * ```\r\n *\r\n * @section URL template\r\n * @example\r\n *\r\n * A string of the following form:\r\n *\r\n * ```\r\n * 'https://{s}.somedomain.com/blabla/{z}/{x}/{y}{r}.png'\r\n * ```\r\n *\r\n * `{s}` means one of the available subdomains (used sequentially to help with browser parallel requests per domain limitation; subdomain values are specified in options; `a`, `b` or `c` by default, can be omitted), `{z}` — zoom level, `{x}` and `{y}` — tile coordinates. `{r}` can be used to add \"&commat;2x\" to the URL to load retina tiles.\r\n *\r\n * You can use custom keys in the template, which will be [evaluated](#util-template) from TileLayer options, like this:\r\n *\r\n * ```\r\n * L.tileLayer('https://{s}.somedomain.com/{foo}/{z}/{x}/{y}.png', {foo: 'bar'});\r\n * ```\r\n */\r\n\r\n\r\nexport var TileLayer = GridLayer.extend({\r\n\r\n\t// @section\r\n\t// @aka TileLayer options\r\n\toptions: {\r\n\t\t// @option minZoom: Number = 0\r\n\t\t// The minimum zoom level down to which this layer will be displayed (inclusive).\r\n\t\tminZoom: 0,\r\n\r\n\t\t// @option maxZoom: Number = 18\r\n\t\t// The maximum zoom level up to which this layer will be displayed (inclusive).\r\n\t\tmaxZoom: 18,\r\n\r\n\t\t// @option subdomains: String|String[] = 'abc'\r\n\t\t// Subdomains of the tile service. Can be passed in the form of one string (where each letter is a subdomain name) or an array of strings.\r\n\t\tsubdomains: 'abc',\r\n\r\n\t\t// @option errorTileUrl: String = ''\r\n\t\t// URL to the tile image to show in place of the tile that failed to load.\r\n\t\terrorTileUrl: '',\r\n\r\n\t\t// @option zoomOffset: Number = 0\r\n\t\t// The zoom number used in tile URLs will be offset with this value.\r\n\t\tzoomOffset: 0,\r\n\r\n\t\t// @option tms: Boolean = false\r\n\t\t// If `true`, inverses Y axis numbering for tiles (turn this on for [TMS](https://en.wikipedia.org/wiki/Tile_Map_Service) services).\r\n\t\ttms: false,\r\n\r\n\t\t// @option zoomReverse: Boolean = false\r\n\t\t// If set to true, the zoom number used in tile URLs will be reversed (`maxZoom - zoom` instead of `zoom`)\r\n\t\tzoomReverse: false,\r\n\r\n\t\t// @option detectRetina: Boolean = false\r\n\t\t// If `true` and user is on a retina display, it will request four tiles of half the specified size and a bigger zoom level in place of one to utilize the high resolution.\r\n\t\tdetectRetina: false,\r\n\r\n\t\t// @option crossOrigin: Boolean|String = false\r\n\t\t// Whether the crossOrigin attribute will be added to the tiles.\r\n\t\t// If a String is provided, all tiles will have their crossOrigin attribute set to the String provided. This is needed if you want to access tile pixel data.\r\n\t\t// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n\t\tcrossOrigin: false,\r\n\r\n\t\t// @option referrerPolicy: Boolean|String = false\r\n\t\t// Whether the referrerPolicy attribute will be added to the tiles.\r\n\t\t// If a String is provided, all tiles will have their referrerPolicy attribute set to the String provided.\r\n\t\t// This may be needed if your map's rendering context has a strict default but your tile provider expects a valid referrer\r\n\t\t// (e.g. to validate an API token).\r\n\t\t// Refer to [HTMLImageElement.referrerPolicy](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy) for valid String values.\r\n\t\treferrerPolicy: false\r\n\t},\r\n\r\n\tinitialize: function (url, options) {\r\n\r\n\t\tthis._url = url;\r\n\r\n\t\toptions = Util.setOptions(this, options);\r\n\r\n\t\t// detecting retina displays, adjusting tileSize and zoom levels\r\n\t\tif (options.detectRetina && Browser.retina && options.maxZoom > 0) {\r\n\r\n\t\t\toptions.tileSize = Math.floor(options.tileSize / 2);\r\n\r\n\t\t\tif (!options.zoomReverse) {\r\n\t\t\t\toptions.zoomOffset++;\r\n\t\t\t\toptions.maxZoom = Math.max(options.minZoom, options.maxZoom - 1);\r\n\t\t\t} else {\r\n\t\t\t\toptions.zoomOffset--;\r\n\t\t\t\toptions.minZoom = Math.min(options.maxZoom, options.minZoom + 1);\r\n\t\t\t}\r\n\r\n\t\t\toptions.minZoom = Math.max(0, options.minZoom);\r\n\t\t} else if (!options.zoomReverse) {\r\n\t\t\t// make sure maxZoom is gte minZoom\r\n\t\t\toptions.maxZoom = Math.max(options.minZoom, options.maxZoom);\r\n\t\t} else {\r\n\t\t\t// make sure minZoom is lte maxZoom\r\n\t\t\toptions.minZoom = Math.min(options.maxZoom, options.minZoom);\r\n\t\t}\r\n\r\n\t\tif (typeof options.subdomains === 'string') {\r\n\t\t\toptions.subdomains = options.subdomains.split('');\r\n\t\t}\r\n\r\n\t\tthis.on('tileunload', this._onTileRemove);\r\n\t},\r\n\r\n\t// @method setUrl(url: String, noRedraw?: Boolean): this\r\n\t// Updates the layer's URL template and redraws it (unless `noRedraw` is set to `true`).\r\n\t// If the URL does not change, the layer will not be redrawn unless\r\n\t// the noRedraw parameter is set to false.\r\n\tsetUrl: function (url, noRedraw) {\r\n\t\tif (this._url === url && noRedraw === undefined) {\r\n\t\t\tnoRedraw = true;\r\n\t\t}\r\n\r\n\t\tthis._url = url;\r\n\r\n\t\tif (!noRedraw) {\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method createTile(coords: Object, done?: Function): HTMLElement\r\n\t// Called only internally, overrides GridLayer's [`createTile()`](#gridlayer-createtile)\r\n\t// to return an `<img>` HTML element with the appropriate image URL given `coords`. The `done`\r\n\t// callback is called when the tile has been loaded.\r\n\tcreateTile: function (coords, done) {\r\n\t\tvar tile = document.createElement('img');\r\n\r\n\t\tDomEvent.on(tile, 'load', Util.bind(this._tileOnLoad, this, done, tile));\r\n\t\tDomEvent.on(tile, 'error', Util.bind(this._tileOnError, this, done, tile));\r\n\r\n\t\tif (this.options.crossOrigin || this.options.crossOrigin === '') {\r\n\t\t\ttile.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;\r\n\t\t}\r\n\r\n\t\t// for this new option we follow the documented behavior\r\n\t\t// more closely by only setting the property when string\r\n\t\tif (typeof this.options.referrerPolicy === 'string') {\r\n\t\t\ttile.referrerPolicy = this.options.referrerPolicy;\r\n\t\t}\r\n\r\n\t\t// The alt attribute is set to the empty string,\r\n\t\t// allowing screen readers to ignore the decorative image tiles.\r\n\t\t// https://www.w3.org/WAI/tutorials/images/decorative/\r\n\t\t// https://www.w3.org/TR/html-aria/#el-img-empty-alt\r\n\t\ttile.alt = '';\r\n\r\n\t\ttile.src = this.getTileUrl(coords);\r\n\r\n\t\treturn tile;\r\n\t},\r\n\r\n\t// @section Extension methods\r\n\t// @uninheritable\r\n\t// Layers extending `TileLayer` might reimplement the following method.\r\n\t// @method getTileUrl(coords: Object): String\r\n\t// Called only internally, returns the URL for a tile given its coordinates.\r\n\t// Classes extending `TileLayer` can override this function to provide custom tile URL naming schemes.\r\n\tgetTileUrl: function (coords) {\r\n\t\tvar data = {\r\n\t\t\tr: Browser.retina ? '@2x' : '',\r\n\t\t\ts: this._getSubdomain(coords),\r\n\t\t\tx: coords.x,\r\n\t\t\ty: coords.y,\r\n\t\t\tz: this._getZoomForUrl()\r\n\t\t};\r\n\t\tif (this._map && !this._map.options.crs.infinite) {\r\n\t\t\tvar invertedY = this._globalTileRange.max.y - coords.y;\r\n\t\t\tif (this.options.tms) {\r\n\t\t\t\tdata['y'] = invertedY;\r\n\t\t\t}\r\n\t\t\tdata['-y'] = invertedY;\r\n\t\t}\r\n\r\n\t\treturn Util.template(this._url, Util.extend(data, this.options));\r\n\t},\r\n\r\n\t_tileOnLoad: function (done, tile) {\r\n\t\t// For https://github.com/Leaflet/Leaflet/issues/3332\r\n\t\tif (Browser.ielt9) {\r\n\t\t\tsetTimeout(Util.bind(done, this, null, tile), 0);\r\n\t\t} else {\r\n\t\t\tdone(null, tile);\r\n\t\t}\r\n\t},\r\n\r\n\t_tileOnError: function (done, tile, e) {\r\n\t\tvar errorUrl = this.options.errorTileUrl;\r\n\t\tif (errorUrl && tile.getAttribute('src') !== errorUrl) {\r\n\t\t\ttile.src = errorUrl;\r\n\t\t}\r\n\t\tdone(e, tile);\r\n\t},\r\n\r\n\t_onTileRemove: function (e) {\r\n\t\te.tile.onload = null;\r\n\t},\r\n\r\n\t_getZoomForUrl: function () {\r\n\t\tvar zoom = this._tileZoom,\r\n\t\tmaxZoom = this.options.maxZoom,\r\n\t\tzoomReverse = this.options.zoomReverse,\r\n\t\tzoomOffset = this.options.zoomOffset;\r\n\r\n\t\tif (zoomReverse) {\r\n\t\t\tzoom = maxZoom - zoom;\r\n\t\t}\r\n\r\n\t\treturn zoom + zoomOffset;\r\n\t},\r\n\r\n\t_getSubdomain: function (tilePoint) {\r\n\t\tvar index = Math.abs(tilePoint.x + tilePoint.y) % this.options.subdomains.length;\r\n\t\treturn this.options.subdomains[index];\r\n\t},\r\n\r\n\t// stops loading all tiles in the background layer\r\n\t_abortLoading: function () {\r\n\t\tvar i, tile;\r\n\t\tfor (i in this._tiles) {\r\n\t\t\tif (this._tiles[i].coords.z !== this._tileZoom) {\r\n\t\t\t\ttile = this._tiles[i].el;\r\n\r\n\t\t\t\ttile.onload = Util.falseFn;\r\n\t\t\t\ttile.onerror = Util.falseFn;\r\n\r\n\t\t\t\tif (!tile.complete) {\r\n\t\t\t\t\ttile.src = Util.emptyImageUrl;\r\n\t\t\t\t\tvar coords = this._tiles[i].coords;\r\n\t\t\t\t\tDomUtil.remove(tile);\r\n\t\t\t\t\tdelete this._tiles[i];\r\n\t\t\t\t\t// @event tileabort: TileEvent\r\n\t\t\t\t\t// Fired when a tile was loading but is now not wanted.\r\n\t\t\t\t\tthis.fire('tileabort', {\r\n\t\t\t\t\t\ttile: tile,\r\n\t\t\t\t\t\tcoords: coords\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_removeTile: function (key) {\r\n\t\tvar tile = this._tiles[key];\r\n\t\tif (!tile) { return; }\r\n\r\n\t\t// Cancels any pending http requests associated with the tile\r\n\t\ttile.el.setAttribute('src', Util.emptyImageUrl);\r\n\r\n\t\treturn GridLayer.prototype._removeTile.call(this, key);\r\n\t},\r\n\r\n\t_tileReady: function (coords, err, tile) {\r\n\t\tif (!this._map || (tile && tile.getAttribute('src') === Util.emptyImageUrl)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\treturn GridLayer.prototype._tileReady.call(this, coords, err, tile);\r\n\t}\r\n});\r\n\r\n\r\n// @factory L.tilelayer(urlTemplate: String, options?: TileLayer options)\r\n// Instantiates a tile layer object given a `URL template` and optionally an options object.\r\n\r\nexport function tileLayer(url, options) {\r\n\treturn new TileLayer(url, options);\r\n}\r\n","import {TileLayer} from './TileLayer';\r\nimport {extend, setOptions, getParamString} from '../../core/Util';\r\nimport Browser from '../../core/Browser';\r\nimport {EPSG4326} from '../../geo/crs/CRS.EPSG4326';\r\nimport {toBounds} from '../../geometry/Bounds';\r\n\r\n/*\r\n * @class TileLayer.WMS\r\n * @inherits TileLayer\r\n * @aka L.TileLayer.WMS\r\n * Used to display [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services as tile layers on the map. Extends `TileLayer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var nexrad = L.tileLayer.wms(\"http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi\", {\r\n * \tlayers: 'nexrad-n0r-900913',\r\n * \tformat: 'image/png',\r\n * \ttransparent: true,\r\n * \tattribution: \"Weather data © 2012 IEM Nexrad\"\r\n * });\r\n * ```\r\n */\r\n\r\nexport var TileLayerWMS = TileLayer.extend({\r\n\r\n\t// @section\r\n\t// @aka TileLayer.WMS options\r\n\t// If any custom options not documented here are used, they will be sent to the\r\n\t// WMS server as extra parameters in each request URL. This can be useful for\r\n\t// [non-standard vendor WMS parameters](https://docs.geoserver.org/stable/en/user/services/wms/vendor.html).\r\n\tdefaultWmsParams: {\r\n\t\tservice: 'WMS',\r\n\t\trequest: 'GetMap',\r\n\r\n\t\t// @option layers: String = ''\r\n\t\t// **(required)** Comma-separated list of WMS layers to show.\r\n\t\tlayers: '',\r\n\r\n\t\t// @option styles: String = ''\r\n\t\t// Comma-separated list of WMS styles.\r\n\t\tstyles: '',\r\n\r\n\t\t// @option format: String = 'image/jpeg'\r\n\t\t// WMS image format (use `'image/png'` for layers with transparency).\r\n\t\tformat: 'image/jpeg',\r\n\r\n\t\t// @option transparent: Boolean = false\r\n\t\t// If `true`, the WMS service will return images with transparency.\r\n\t\ttransparent: false,\r\n\r\n\t\t// @option version: String = '1.1.1'\r\n\t\t// Version of the WMS service to use\r\n\t\tversion: '1.1.1'\r\n\t},\r\n\r\n\toptions: {\r\n\t\t// @option crs: CRS = null\r\n\t\t// Coordinate Reference System to use for the WMS requests, defaults to\r\n\t\t// map CRS. Don't change this if you're not sure what it means.\r\n\t\tcrs: null,\r\n\r\n\t\t// @option uppercase: Boolean = false\r\n\t\t// If `true`, WMS request parameter keys will be uppercase.\r\n\t\tuppercase: false\r\n\t},\r\n\r\n\tinitialize: function (url, options) {\r\n\r\n\t\tthis._url = url;\r\n\r\n\t\tvar wmsParams = extend({}, this.defaultWmsParams);\r\n\r\n\t\t// all keys that are not TileLayer options go to WMS params\r\n\t\tfor (var i in options) {\r\n\t\t\tif (!(i in this.options)) {\r\n\t\t\t\twmsParams[i] = options[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\toptions = setOptions(this, options);\r\n\r\n\t\tvar realRetina = options.detectRetina && Browser.retina ? 2 : 1;\r\n\t\tvar tileSize = this.getTileSize();\r\n\t\twmsParams.width = tileSize.x * realRetina;\r\n\t\twmsParams.height = tileSize.y * realRetina;\r\n\r\n\t\tthis.wmsParams = wmsParams;\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\r\n\t\tthis._crs = this.options.crs || map.options.crs;\r\n\t\tthis._wmsVersion = parseFloat(this.wmsParams.version);\r\n\r\n\t\tvar projectionKey = this._wmsVersion >= 1.3 ? 'crs' : 'srs';\r\n\t\tthis.wmsParams[projectionKey] = this._crs.code;\r\n\r\n\t\tTileLayer.prototype.onAdd.call(this, map);\r\n\t},\r\n\r\n\tgetTileUrl: function (coords) {\r\n\r\n\t\tvar tileBounds = this._tileCoordsToNwSe(coords),\r\n\t\t    crs = this._crs,\r\n\t\t    bounds = toBounds(crs.project(tileBounds[0]), crs.project(tileBounds[1])),\r\n\t\t    min = bounds.min,\r\n\t\t    max = bounds.max,\r\n\t\t    bbox = (this._wmsVersion >= 1.3 && this._crs === EPSG4326 ?\r\n\t\t    [min.y, min.x, max.y, max.x] :\r\n\t\t    [min.x, min.y, max.x, max.y]).join(','),\r\n\t\t    url = TileLayer.prototype.getTileUrl.call(this, coords);\r\n\t\treturn url +\r\n\t\t\tgetParamString(this.wmsParams, url, this.options.uppercase) +\r\n\t\t\t(this.options.uppercase ? '&BBOX=' : '&bbox=') + bbox;\r\n\t},\r\n\r\n\t// @method setParams(params: Object, noRedraw?: Boolean): this\r\n\t// Merges an object with the new parameters and re-requests tiles on the current screen (unless `noRedraw` was set to true).\r\n\tsetParams: function (params, noRedraw) {\r\n\r\n\t\textend(this.wmsParams, params);\r\n\r\n\t\tif (!noRedraw) {\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n});\r\n\r\n\r\n// @factory L.tileLayer.wms(baseUrl: String, options: TileLayer.WMS options)\r\n// Instantiates a WMS tile layer object given a base URL of the WMS service and a WMS parameters/options object.\r\nexport function tileLayerWMS(url, options) {\r\n\treturn new TileLayerWMS(url, options);\r\n}\r\n","export {GridLayer, gridLayer} from './GridLayer';\nimport {TileLayer, tileLayer} from './TileLayer';\nimport {TileLayerWMS, tileLayerWMS} from './TileLayer.WMS';\nTileLayer.WMS = TileLayerWMS;\ntileLayer.wms = tileLayerWMS;\nexport {TileLayer, tileLayer};\n","import {Layer} from '../Layer';\nimport * as DomUtil from '../../dom/DomUtil';\nimport * as Util from '../../core/Util';\nimport Browser from '../../core/Browser';\nimport {Bounds} from '../../geometry/Bounds';\n\n\n\n/*\n * @class Renderer\n * @inherits Layer\n * @aka L.Renderer\n *\n * Base class for vector renderer implementations (`SVG`, `Canvas`). Handles the\n * DOM container of the renderer, its bounds, and its zoom animation.\n *\n * A `Renderer` works as an implicit layer group for all `Path`s - the renderer\n * itself can be added or removed to the map. All paths use a renderer, which can\n * be implicit (the map will decide the type of renderer and use it automatically)\n * or explicit (using the [`renderer`](#path-renderer) option of the path).\n *\n * Do not use this class directly, use `SVG` and `Canvas` instead.\n *\n * @event update: Event\n * Fired when the renderer updates its bounds, center and zoom, for example when\n * its map has moved\n */\n\nexport var Renderer = Layer.extend({\n\n\t// @section\n\t// @aka Renderer options\n\toptions: {\n\t\t// @option padding: Number = 0.1\n\t\t// How much to extend the clip area around the map view (relative to its size)\n\t\t// e.g. 0.1 would be 10% of map view in each direction\n\t\tpadding: 0.1\n\t},\n\n\tinitialize: function (options) {\n\t\tUtil.setOptions(this, options);\n\t\tUtil.stamp(this);\n\t\tthis._layers = this._layers || {};\n\t},\n\n\tonAdd: function () {\n\t\tif (!this._container) {\n\t\t\tthis._initContainer(); // defined by renderer implementations\n\n\t\t\t// always keep transform-origin as 0 0\n\t\t\tDomUtil.addClass(this._container, 'leaflet-zoom-animated');\n\t\t}\n\n\t\tthis.getPane().appendChild(this._container);\n\t\tthis._update();\n\t\tthis.on('update', this._updatePaths, this);\n\t},\n\n\tonRemove: function () {\n\t\tthis.off('update', this._updatePaths, this);\n\t\tthis._destroyContainer();\n\t},\n\n\tgetEvents: function () {\n\t\tvar events = {\n\t\t\tviewreset: this._reset,\n\t\t\tzoom: this._onZoom,\n\t\t\tmoveend: this._update,\n\t\t\tzoomend: this._onZoomEnd\n\t\t};\n\t\tif (this._zoomAnimated) {\n\t\t\tevents.zoomanim = this._onAnimZoom;\n\t\t}\n\t\treturn events;\n\t},\n\n\t_onAnimZoom: function (ev) {\n\t\tthis._updateTransform(ev.center, ev.zoom);\n\t},\n\n\t_onZoom: function () {\n\t\tthis._updateTransform(this._map.getCenter(), this._map.getZoom());\n\t},\n\n\t_updateTransform: function (center, zoom) {\n\t\tvar scale = this._map.getZoomScale(zoom, this._zoom),\n\t\t    viewHalf = this._map.getSize().multiplyBy(0.5 + this.options.padding),\n\t\t    currentCenterPoint = this._map.project(this._center, zoom),\n\n\t\t    topLeftOffset = viewHalf.multiplyBy(-scale).add(currentCenterPoint)\n\t\t\t\t  .subtract(this._map._getNewPixelOrigin(center, zoom));\n\n\t\tif (Browser.any3d) {\n\t\t\tDomUtil.setTransform(this._container, topLeftOffset, scale);\n\t\t} else {\n\t\t\tDomUtil.setPosition(this._container, topLeftOffset);\n\t\t}\n\t},\n\n\t_reset: function () {\n\t\tthis._update();\n\t\tthis._updateTransform(this._center, this._zoom);\n\n\t\tfor (var id in this._layers) {\n\t\t\tthis._layers[id]._reset();\n\t\t}\n\t},\n\n\t_onZoomEnd: function () {\n\t\tfor (var id in this._layers) {\n\t\t\tthis._layers[id]._project();\n\t\t}\n\t},\n\n\t_updatePaths: function () {\n\t\tfor (var id in this._layers) {\n\t\t\tthis._layers[id]._update();\n\t\t}\n\t},\n\n\t_update: function () {\n\t\t// Update pixel bounds of renderer container (for positioning/sizing/clipping later)\n\t\t// Subclasses are responsible of firing the 'update' event.\n\t\tvar p = this.options.padding,\n\t\t    size = this._map.getSize(),\n\t\t    min = this._map.containerPointToLayerPoint(size.multiplyBy(-p)).round();\n\n\t\tthis._bounds = new Bounds(min, min.add(size.multiplyBy(1 + p * 2)).round());\n\n\t\tthis._center = this._map.getCenter();\n\t\tthis._zoom = this._map.getZoom();\n\t}\n});\n","import {Renderer} from './Renderer';\nimport * as DomUtil from '../../dom/DomUtil';\nimport * as DomEvent from '../../dom/DomEvent';\nimport Browser from '../../core/Browser';\nimport * as Util from '../../core/Util';\nimport {Bounds} from '../../geometry/Bounds';\n\n/*\n * @class Canvas\n * @inherits Renderer\n * @aka L.Canvas\n *\n * Allows vector layers to be displayed with [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).\n * Inherits `Renderer`.\n *\n * Due to [technical limitations](https://caniuse.com/canvas), Canvas is not\n * available in all web browsers, notably IE8, and overlapping geometries might\n * not display properly in some edge cases.\n *\n * @example\n *\n * Use Canvas by default for all paths in the map:\n *\n * ```js\n * var map = L.map('map', {\n * \trenderer: L.canvas()\n * });\n * ```\n *\n * Use a Canvas renderer with extra padding for specific vector geometries:\n *\n * ```js\n * var map = L.map('map');\n * var myRenderer = L.canvas({ padding: 0.5 });\n * var line = L.polyline( coordinates, { renderer: myRenderer } );\n * var circle = L.circle( center, { renderer: myRenderer } );\n * ```\n */\n\nexport var Canvas = Renderer.extend({\n\n\t// @section\n\t// @aka Canvas options\n\toptions: {\n\t\t// @option tolerance: Number = 0\n\t\t// How much to extend the click tolerance around a path/object on the map.\n\t\ttolerance: 0\n\t},\n\n\tgetEvents: function () {\n\t\tvar events = Renderer.prototype.getEvents.call(this);\n\t\tevents.viewprereset = this._onViewPreReset;\n\t\treturn events;\n\t},\n\n\t_onViewPreReset: function () {\n\t\t// Set a flag so that a viewprereset+moveend+viewreset only updates&redraws once\n\t\tthis._postponeUpdatePaths = true;\n\t},\n\n\tonAdd: function () {\n\t\tRenderer.prototype.onAdd.call(this);\n\n\t\t// Redraw vectors since canvas is cleared upon removal,\n\t\t// in case of removing the renderer itself from the map.\n\t\tthis._draw();\n\t},\n\n\t_initContainer: function () {\n\t\tvar container = this._container = document.createElement('canvas');\n\n\t\tDomEvent.on(container, 'mousemove', this._onMouseMove, this);\n\t\tDomEvent.on(container, 'click dblclick mousedown mouseup contextmenu', this._onClick, this);\n\t\tDomEvent.on(container, 'mouseout', this._handleMouseOut, this);\n\t\tcontainer['_leaflet_disable_events'] = true;\n\n\t\tthis._ctx = container.getContext('2d');\n\t},\n\n\t_destroyContainer: function () {\n\t\tUtil.cancelAnimFrame(this._redrawRequest);\n\t\tdelete this._ctx;\n\t\tDomUtil.remove(this._container);\n\t\tDomEvent.off(this._container);\n\t\tdelete this._container;\n\t},\n\n\t_updatePaths: function () {\n\t\tif (this._postponeUpdatePaths) { return; }\n\n\t\tvar layer;\n\t\tthis._redrawBounds = null;\n\t\tfor (var id in this._layers) {\n\t\t\tlayer = this._layers[id];\n\t\t\tlayer._update();\n\t\t}\n\t\tthis._redraw();\n\t},\n\n\t_update: function () {\n\t\tif (this._map._animatingZoom && this._bounds) { return; }\n\n\t\tRenderer.prototype._update.call(this);\n\n\t\tvar b = this._bounds,\n\t\t    container = this._container,\n\t\t    size = b.getSize(),\n\t\t    m = Browser.retina ? 2 : 1;\n\n\t\tDomUtil.setPosition(container, b.min);\n\n\t\t// set canvas size (also clearing it); use double size on retina\n\t\tcontainer.width = m * size.x;\n\t\tcontainer.height = m * size.y;\n\t\tcontainer.style.width = size.x + 'px';\n\t\tcontainer.style.height = size.y + 'px';\n\n\t\tif (Browser.retina) {\n\t\t\tthis._ctx.scale(2, 2);\n\t\t}\n\n\t\t// translate so we use the same path coordinates after canvas element moves\n\t\tthis._ctx.translate(-b.min.x, -b.min.y);\n\n\t\t// Tell paths to redraw themselves\n\t\tthis.fire('update');\n\t},\n\n\t_reset: function () {\n\t\tRenderer.prototype._reset.call(this);\n\n\t\tif (this._postponeUpdatePaths) {\n\t\t\tthis._postponeUpdatePaths = false;\n\t\t\tthis._updatePaths();\n\t\t}\n\t},\n\n\t_initPath: function (layer) {\n\t\tthis._updateDashArray(layer);\n\t\tthis._layers[Util.stamp(layer)] = layer;\n\n\t\tvar order = layer._order = {\n\t\t\tlayer: layer,\n\t\t\tprev: this._drawLast,\n\t\t\tnext: null\n\t\t};\n\t\tif (this._drawLast) { this._drawLast.next = order; }\n\t\tthis._drawLast = order;\n\t\tthis._drawFirst = this._drawFirst || this._drawLast;\n\t},\n\n\t_addPath: function (layer) {\n\t\tthis._requestRedraw(layer);\n\t},\n\n\t_removePath: function (layer) {\n\t\tvar order = layer._order;\n\t\tvar next = order.next;\n\t\tvar prev = order.prev;\n\n\t\tif (next) {\n\t\t\tnext.prev = prev;\n\t\t} else {\n\t\t\tthis._drawLast = prev;\n\t\t}\n\t\tif (prev) {\n\t\t\tprev.next = next;\n\t\t} else {\n\t\t\tthis._drawFirst = next;\n\t\t}\n\n\t\tdelete layer._order;\n\n\t\tdelete this._layers[Util.stamp(layer)];\n\n\t\tthis._requestRedraw(layer);\n\t},\n\n\t_updatePath: function (layer) {\n\t\t// Redraw the union of the layer's old pixel\n\t\t// bounds and the new pixel bounds.\n\t\tthis._extendRedrawBounds(layer);\n\t\tlayer._project();\n\t\tlayer._update();\n\t\t// The redraw will extend the redraw bounds\n\t\t// with the new pixel bounds.\n\t\tthis._requestRedraw(layer);\n\t},\n\n\t_updateStyle: function (layer) {\n\t\tthis._updateDashArray(layer);\n\t\tthis._requestRedraw(layer);\n\t},\n\n\t_updateDashArray: function (layer) {\n\t\tif (typeof layer.options.dashArray === 'string') {\n\t\t\tvar parts = layer.options.dashArray.split(/[, ]+/),\n\t\t\t    dashArray = [],\n\t\t\t    dashValue,\n\t\t\t    i;\n\t\t\tfor (i = 0; i < parts.length; i++) {\n\t\t\t\tdashValue = Number(parts[i]);\n\t\t\t\t// Ignore dash array containing invalid lengths\n\t\t\t\tif (isNaN(dashValue)) { return; }\n\t\t\t\tdashArray.push(dashValue);\n\t\t\t}\n\t\t\tlayer.options._dashArray = dashArray;\n\t\t} else {\n\t\t\tlayer.options._dashArray = layer.options.dashArray;\n\t\t}\n\t},\n\n\t_requestRedraw: function (layer) {\n\t\tif (!this._map) { return; }\n\n\t\tthis._extendRedrawBounds(layer);\n\t\tthis._redrawRequest = this._redrawRequest || Util.requestAnimFrame(this._redraw, this);\n\t},\n\n\t_extendRedrawBounds: function (layer) {\n\t\tif (layer._pxBounds) {\n\t\t\tvar padding = (layer.options.weight || 0) + 1;\n\t\t\tthis._redrawBounds = this._redrawBounds || new Bounds();\n\t\t\tthis._redrawBounds.extend(layer._pxBounds.min.subtract([padding, padding]));\n\t\t\tthis._redrawBounds.extend(layer._pxBounds.max.add([padding, padding]));\n\t\t}\n\t},\n\n\t_redraw: function () {\n\t\tthis._redrawRequest = null;\n\n\t\tif (this._redrawBounds) {\n\t\t\tthis._redrawBounds.min._floor();\n\t\t\tthis._redrawBounds.max._ceil();\n\t\t}\n\n\t\tthis._clear(); // clear layers in redraw bounds\n\t\tthis._draw(); // draw layers\n\n\t\tthis._redrawBounds = null;\n\t},\n\n\t_clear: function () {\n\t\tvar bounds = this._redrawBounds;\n\t\tif (bounds) {\n\t\t\tvar size = bounds.getSize();\n\t\t\tthis._ctx.clearRect(bounds.min.x, bounds.min.y, size.x, size.y);\n\t\t} else {\n\t\t\tthis._ctx.save();\n\t\t\tthis._ctx.setTransform(1, 0, 0, 1, 0, 0);\n\t\t\tthis._ctx.clearRect(0, 0, this._container.width, this._container.height);\n\t\t\tthis._ctx.restore();\n\t\t}\n\t},\n\n\t_draw: function () {\n\t\tvar layer, bounds = this._redrawBounds;\n\t\tthis._ctx.save();\n\t\tif (bounds) {\n\t\t\tvar size = bounds.getSize();\n\t\t\tthis._ctx.beginPath();\n\t\t\tthis._ctx.rect(bounds.min.x, bounds.min.y, size.x, size.y);\n\t\t\tthis._ctx.clip();\n\t\t}\n\n\t\tthis._drawing = true;\n\n\t\tfor (var order = this._drawFirst; order; order = order.next) {\n\t\t\tlayer = order.layer;\n\t\t\tif (!bounds || (layer._pxBounds && layer._pxBounds.intersects(bounds))) {\n\t\t\t\tlayer._updatePath();\n\t\t\t}\n\t\t}\n\n\t\tthis._drawing = false;\n\n\t\tthis._ctx.restore();  // Restore state before clipping.\n\t},\n\n\t_updatePoly: function (layer, closed) {\n\t\tif (!this._drawing) { return; }\n\n\t\tvar i, j, len2, p,\n\t\t    parts = layer._parts,\n\t\t    len = parts.length,\n\t\t    ctx = this._ctx;\n\n\t\tif (!len) { return; }\n\n\t\tctx.beginPath();\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tfor (j = 0, len2 = parts[i].length; j < len2; j++) {\n\t\t\t\tp = parts[i][j];\n\t\t\t\tctx[j ? 'lineTo' : 'moveTo'](p.x, p.y);\n\t\t\t}\n\t\t\tif (closed) {\n\t\t\t\tctx.closePath();\n\t\t\t}\n\t\t}\n\n\t\tthis._fillStroke(ctx, layer);\n\n\t\t// TODO optimization: 1 fill/stroke for all features with equal style instead of 1 for each feature\n\t},\n\n\t_updateCircle: function (layer) {\n\n\t\tif (!this._drawing || layer._empty()) { return; }\n\n\t\tvar p = layer._point,\n\t\t    ctx = this._ctx,\n\t\t    r = Math.max(Math.round(layer._radius), 1),\n\t\t    s = (Math.max(Math.round(layer._radiusY), 1) || r) / r;\n\n\t\tif (s !== 1) {\n\t\t\tctx.save();\n\t\t\tctx.scale(1, s);\n\t\t}\n\n\t\tctx.beginPath();\n\t\tctx.arc(p.x, p.y / s, r, 0, Math.PI * 2, false);\n\n\t\tif (s !== 1) {\n\t\t\tctx.restore();\n\t\t}\n\n\t\tthis._fillStroke(ctx, layer);\n\t},\n\n\t_fillStroke: function (ctx, layer) {\n\t\tvar options = layer.options;\n\n\t\tif (options.fill) {\n\t\t\tctx.globalAlpha = options.fillOpacity;\n\t\t\tctx.fillStyle = options.fillColor || options.color;\n\t\t\tctx.fill(options.fillRule || 'evenodd');\n\t\t}\n\n\t\tif (options.stroke && options.weight !== 0) {\n\t\t\tif (ctx.setLineDash) {\n\t\t\t\tctx.setLineDash(layer.options && layer.options._dashArray || []);\n\t\t\t}\n\t\t\tctx.globalAlpha = options.opacity;\n\t\t\tctx.lineWidth = options.weight;\n\t\t\tctx.strokeStyle = options.color;\n\t\t\tctx.lineCap = options.lineCap;\n\t\t\tctx.lineJoin = options.lineJoin;\n\t\t\tctx.stroke();\n\t\t}\n\t},\n\n\t// Canvas obviously doesn't have mouse events for individual drawn objects,\n\t// so we emulate that by calculating what's under the mouse on mousemove/click manually\n\n\t_onClick: function (e) {\n\t\tvar point = this._map.mouseEventToLayerPoint(e), layer, clickedLayer;\n\n\t\tfor (var order = this._drawFirst; order; order = order.next) {\n\t\t\tlayer = order.layer;\n\t\t\tif (layer.options.interactive && layer._containsPoint(point)) {\n\t\t\t\tif (!(e.type === 'click' || e.type === 'preclick') || !this._map._draggableMoved(layer)) {\n\t\t\t\t\tclickedLayer = layer;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._fireEvent(clickedLayer ? [clickedLayer] : false, e);\n\t},\n\n\t_onMouseMove: function (e) {\n\t\tif (!this._map || this._map.dragging.moving() || this._map._animatingZoom) { return; }\n\n\t\tvar point = this._map.mouseEventToLayerPoint(e);\n\t\tthis._handleMouseHover(e, point);\n\t},\n\n\n\t_handleMouseOut: function (e) {\n\t\tvar layer = this._hoveredLayer;\n\t\tif (layer) {\n\t\t\t// if we're leaving the layer, fire mouseout\n\t\t\tDomUtil.removeClass(this._container, 'leaflet-interactive');\n\t\t\tthis._fireEvent([layer], e, 'mouseout');\n\t\t\tthis._hoveredLayer = null;\n\t\t\tthis._mouseHoverThrottled = false;\n\t\t}\n\t},\n\n\t_handleMouseHover: function (e, point) {\n\t\tif (this._mouseHoverThrottled) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar layer, candidateHoveredLayer;\n\n\t\tfor (var order = this._drawFirst; order; order = order.next) {\n\t\t\tlayer = order.layer;\n\t\t\tif (layer.options.interactive && layer._containsPoint(point)) {\n\t\t\t\tcandidateHoveredLayer = layer;\n\t\t\t}\n\t\t}\n\n\t\tif (candidateHoveredLayer !== this._hoveredLayer) {\n\t\t\tthis._handleMouseOut(e);\n\n\t\t\tif (candidateHoveredLayer) {\n\t\t\t\tDomUtil.addClass(this._container, 'leaflet-interactive'); // change cursor\n\t\t\t\tthis._fireEvent([candidateHoveredLayer], e, 'mouseover');\n\t\t\t\tthis._hoveredLayer = candidateHoveredLayer;\n\t\t\t}\n\t\t}\n\n\t\tthis._fireEvent(this._hoveredLayer ? [this._hoveredLayer] : false, e);\n\n\t\tthis._mouseHoverThrottled = true;\n\t\tsetTimeout(Util.bind(function () {\n\t\t\tthis._mouseHoverThrottled = false;\n\t\t}, this), 32);\n\t},\n\n\t_fireEvent: function (layers, e, type) {\n\t\tthis._map._fireDOMEvent(e, type || e.type, layers);\n\t},\n\n\t_bringToFront: function (layer) {\n\t\tvar order = layer._order;\n\n\t\tif (!order) { return; }\n\n\t\tvar next = order.next;\n\t\tvar prev = order.prev;\n\n\t\tif (next) {\n\t\t\tnext.prev = prev;\n\t\t} else {\n\t\t\t// Already last\n\t\t\treturn;\n\t\t}\n\t\tif (prev) {\n\t\t\tprev.next = next;\n\t\t} else if (next) {\n\t\t\t// Update first entry unless this is the\n\t\t\t// single entry\n\t\t\tthis._drawFirst = next;\n\t\t}\n\n\t\torder.prev = this._drawLast;\n\t\tthis._drawLast.next = order;\n\n\t\torder.next = null;\n\t\tthis._drawLast = order;\n\n\t\tthis._requestRedraw(layer);\n\t},\n\n\t_bringToBack: function (layer) {\n\t\tvar order = layer._order;\n\n\t\tif (!order) { return; }\n\n\t\tvar next = order.next;\n\t\tvar prev = order.prev;\n\n\t\tif (prev) {\n\t\t\tprev.next = next;\n\t\t} else {\n\t\t\t// Already first\n\t\t\treturn;\n\t\t}\n\t\tif (next) {\n\t\t\tnext.prev = prev;\n\t\t} else if (prev) {\n\t\t\t// Update last entry unless this is the\n\t\t\t// single entry\n\t\t\tthis._drawLast = prev;\n\t\t}\n\n\t\torder.prev = null;\n\n\t\torder.next = this._drawFirst;\n\t\tthis._drawFirst.prev = order;\n\t\tthis._drawFirst = order;\n\n\t\tthis._requestRedraw(layer);\n\t}\n});\n\n// @factory L.canvas(options?: Renderer options)\n// Creates a Canvas renderer with the given options.\nexport function canvas(options) {\n\treturn Browser.canvas ? new Canvas(options) : null;\n}\n","import * as DomUtil from '../../dom/DomUtil';\nimport * as Util from '../../core/Util';\nimport {Renderer} from './Renderer';\n\n/*\n * Thanks to Dmitry Baranovsky and his Raphael library for inspiration!\n */\n\n\nexport var vmlCreate = (function () {\n\ttry {\n\t\tdocument.namespaces.add('lvml', 'urn:schemas-microsoft-com:vml');\n\t\treturn function (name) {\n\t\t\treturn document.createElement('<lvml:' + name + ' class=\"lvml\">');\n\t\t};\n\t} catch (e) {\n\t\t// Do not return fn from catch block so `e` can be garbage collected\n\t\t// See https://github.com/Leaflet/Leaflet/pull/7279\n\t}\n\treturn function (name) {\n\t\treturn document.createElement('<' + name + ' xmlns=\"urn:schemas-microsoft.com:vml\" class=\"lvml\">');\n\t};\n})();\n\n\n/*\n * @class SVG\n *\n *\n * VML was deprecated in 2012, which means VML functionality exists only for backwards compatibility\n * with old versions of Internet Explorer.\n */\n\n// mixin to redefine some SVG methods to handle VML syntax which is similar but with some differences\nexport var vmlMixin = {\n\n\t_initContainer: function () {\n\t\tthis._container = DomUtil.create('div', 'leaflet-vml-container');\n\t},\n\n\t_update: function () {\n\t\tif (this._map._animatingZoom) { return; }\n\t\tRenderer.prototype._update.call(this);\n\t\tthis.fire('update');\n\t},\n\n\t_initPath: function (layer) {\n\t\tvar container = layer._container = vmlCreate('shape');\n\n\t\tDomUtil.addClass(container, 'leaflet-vml-shape ' + (this.options.className || ''));\n\n\t\tcontainer.coordsize = '1 1';\n\n\t\tlayer._path = vmlCreate('path');\n\t\tcontainer.appendChild(layer._path);\n\n\t\tthis._updateStyle(layer);\n\t\tthis._layers[Util.stamp(layer)] = layer;\n\t},\n\n\t_addPath: function (layer) {\n\t\tvar container = layer._container;\n\t\tthis._container.appendChild(container);\n\n\t\tif (layer.options.interactive) {\n\t\t\tlayer.addInteractiveTarget(container);\n\t\t}\n\t},\n\n\t_removePath: function (layer) {\n\t\tvar container = layer._container;\n\t\tDomUtil.remove(container);\n\t\tlayer.removeInteractiveTarget(container);\n\t\tdelete this._layers[Util.stamp(layer)];\n\t},\n\n\t_updateStyle: function (layer) {\n\t\tvar stroke = layer._stroke,\n\t\t    fill = layer._fill,\n\t\t    options = layer.options,\n\t\t    container = layer._container;\n\n\t\tcontainer.stroked = !!options.stroke;\n\t\tcontainer.filled = !!options.fill;\n\n\t\tif (options.stroke) {\n\t\t\tif (!stroke) {\n\t\t\t\tstroke = layer._stroke = vmlCreate('stroke');\n\t\t\t}\n\t\t\tcontainer.appendChild(stroke);\n\t\t\tstroke.weight = options.weight + 'px';\n\t\t\tstroke.color = options.color;\n\t\t\tstroke.opacity = options.opacity;\n\n\t\t\tif (options.dashArray) {\n\t\t\t\tstroke.dashStyle = Util.isArray(options.dashArray) ?\n\t\t\t\t    options.dashArray.join(' ') :\n\t\t\t\t    options.dashArray.replace(/( *, *)/g, ' ');\n\t\t\t} else {\n\t\t\t\tstroke.dashStyle = '';\n\t\t\t}\n\t\t\tstroke.endcap = options.lineCap.replace('butt', 'flat');\n\t\t\tstroke.joinstyle = options.lineJoin;\n\n\t\t} else if (stroke) {\n\t\t\tcontainer.removeChild(stroke);\n\t\t\tlayer._stroke = null;\n\t\t}\n\n\t\tif (options.fill) {\n\t\t\tif (!fill) {\n\t\t\t\tfill = layer._fill = vmlCreate('fill');\n\t\t\t}\n\t\t\tcontainer.appendChild(fill);\n\t\t\tfill.color = options.fillColor || options.color;\n\t\t\tfill.opacity = options.fillOpacity;\n\n\t\t} else if (fill) {\n\t\t\tcontainer.removeChild(fill);\n\t\t\tlayer._fill = null;\n\t\t}\n\t},\n\n\t_updateCircle: function (layer) {\n\t\tvar p = layer._point.round(),\n\t\t    r = Math.round(layer._radius),\n\t\t    r2 = Math.round(layer._radiusY || r);\n\n\t\tthis._setPath(layer, layer._empty() ? 'M0 0' :\n\t\t\t'AL ' + p.x + ',' + p.y + ' ' + r + ',' + r2 + ' 0,' + (65535 * 360));\n\t},\n\n\t_setPath: function (layer, path) {\n\t\tlayer._path.v = path;\n\t},\n\n\t_bringToFront: function (layer) {\n\t\tDomUtil.toFront(layer._container);\n\t},\n\n\t_bringToBack: function (layer) {\n\t\tDomUtil.toBack(layer._container);\n\t}\n};\n","import {Renderer} from './Renderer';\nimport * as DomUtil from '../../dom/DomUtil';\nimport * as DomEvent from '../../dom/DomEvent';\nimport Browser from '../../core/Browser';\nimport {stamp} from '../../core/Util';\nimport {svgCreate, pointsToPath} from './SVG.Util';\nexport {pointsToPath};\nimport {vmlMixin, vmlCreate} from './SVG.VML';\n\nexport var create = Browser.vml ? vmlCreate : svgCreate;\n\n/*\n * @class SVG\n * @inherits Renderer\n * @aka L.SVG\n *\n * Allows vector layers to be displayed with [SVG](https://developer.mozilla.org/docs/Web/SVG).\n * Inherits `Renderer`.\n *\n * Due to [technical limitations](https://caniuse.com/svg), SVG is not\n * available in all web browsers, notably Android 2.x and 3.x.\n *\n * Although SVG is not available on IE7 and IE8, these browsers support\n * [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language)\n * (a now deprecated technology), and the SVG renderer will fall back to VML in\n * this case.\n *\n * @example\n *\n * Use SVG by default for all paths in the map:\n *\n * ```js\n * var map = L.map('map', {\n * \trenderer: L.svg()\n * });\n * ```\n *\n * Use a SVG renderer with extra padding for specific vector geometries:\n *\n * ```js\n * var map = L.map('map');\n * var myRenderer = L.svg({ padding: 0.5 });\n * var line = L.polyline( coordinates, { renderer: myRenderer } );\n * var circle = L.circle( center, { renderer: myRenderer } );\n * ```\n */\n\nexport var SVG = Renderer.extend({\n\n\t_initContainer: function () {\n\t\tthis._container = create('svg');\n\n\t\t// makes it possible to click through svg root; we'll reset it back in individual paths\n\t\tthis._container.setAttribute('pointer-events', 'none');\n\n\t\tthis._rootGroup = create('g');\n\t\tthis._container.appendChild(this._rootGroup);\n\t},\n\n\t_destroyContainer: function () {\n\t\tDomUtil.remove(this._container);\n\t\tDomEvent.off(this._container);\n\t\tdelete this._container;\n\t\tdelete this._rootGroup;\n\t\tdelete this._svgSize;\n\t},\n\n\t_update: function () {\n\t\tif (this._map._animatingZoom && this._bounds) { return; }\n\n\t\tRenderer.prototype._update.call(this);\n\n\t\tvar b = this._bounds,\n\t\t    size = b.getSize(),\n\t\t    container = this._container;\n\n\t\t// set size of svg-container if changed\n\t\tif (!this._svgSize || !this._svgSize.equals(size)) {\n\t\t\tthis._svgSize = size;\n\t\t\tcontainer.setAttribute('width', size.x);\n\t\t\tcontainer.setAttribute('height', size.y);\n\t\t}\n\n\t\t// movement: update container viewBox so that we don't have to change coordinates of individual layers\n\t\tDomUtil.setPosition(container, b.min);\n\t\tcontainer.setAttribute('viewBox', [b.min.x, b.min.y, size.x, size.y].join(' '));\n\n\t\tthis.fire('update');\n\t},\n\n\t// methods below are called by vector layers implementations\n\n\t_initPath: function (layer) {\n\t\tvar path = layer._path = create('path');\n\n\t\t// @namespace Path\n\t\t// @option className: String = null\n\t\t// Custom class name set on an element. Only for SVG renderer.\n\t\tif (layer.options.className) {\n\t\t\tDomUtil.addClass(path, layer.options.className);\n\t\t}\n\n\t\tif (layer.options.interactive) {\n\t\t\tDomUtil.addClass(path, 'leaflet-interactive');\n\t\t}\n\n\t\tthis._updateStyle(layer);\n\t\tthis._layers[stamp(layer)] = layer;\n\t},\n\n\t_addPath: function (layer) {\n\t\tif (!this._rootGroup) { this._initContainer(); }\n\t\tthis._rootGroup.appendChild(layer._path);\n\t\tlayer.addInteractiveTarget(layer._path);\n\t},\n\n\t_removePath: function (layer) {\n\t\tDomUtil.remove(layer._path);\n\t\tlayer.removeInteractiveTarget(layer._path);\n\t\tdelete this._layers[stamp(layer)];\n\t},\n\n\t_updatePath: function (layer) {\n\t\tlayer._project();\n\t\tlayer._update();\n\t},\n\n\t_updateStyle: function (layer) {\n\t\tvar path = layer._path,\n\t\t    options = layer.options;\n\n\t\tif (!path) { return; }\n\n\t\tif (options.stroke) {\n\t\t\tpath.setAttribute('stroke', options.color);\n\t\t\tpath.setAttribute('stroke-opacity', options.opacity);\n\t\t\tpath.setAttribute('stroke-width', options.weight);\n\t\t\tpath.setAttribute('stroke-linecap', options.lineCap);\n\t\t\tpath.setAttribute('stroke-linejoin', options.lineJoin);\n\n\t\t\tif (options.dashArray) {\n\t\t\t\tpath.setAttribute('stroke-dasharray', options.dashArray);\n\t\t\t} else {\n\t\t\t\tpath.removeAttribute('stroke-dasharray');\n\t\t\t}\n\n\t\t\tif (options.dashOffset) {\n\t\t\t\tpath.setAttribute('stroke-dashoffset', options.dashOffset);\n\t\t\t} else {\n\t\t\t\tpath.removeAttribute('stroke-dashoffset');\n\t\t\t}\n\t\t} else {\n\t\t\tpath.setAttribute('stroke', 'none');\n\t\t}\n\n\t\tif (options.fill) {\n\t\t\tpath.setAttribute('fill', options.fillColor || options.color);\n\t\t\tpath.setAttribute('fill-opacity', options.fillOpacity);\n\t\t\tpath.setAttribute('fill-rule', options.fillRule || 'evenodd');\n\t\t} else {\n\t\t\tpath.setAttribute('fill', 'none');\n\t\t}\n\t},\n\n\t_updatePoly: function (layer, closed) {\n\t\tthis._setPath(layer, pointsToPath(layer._parts, closed));\n\t},\n\n\t_updateCircle: function (layer) {\n\t\tvar p = layer._point,\n\t\t    r = Math.max(Math.round(layer._radius), 1),\n\t\t    r2 = Math.max(Math.round(layer._radiusY), 1) || r,\n\t\t    arc = 'a' + r + ',' + r2 + ' 0 1,0 ';\n\n\t\t// drawing a circle with two half-arcs\n\t\tvar d = layer._empty() ? 'M0 0' :\n\t\t\t'M' + (p.x - r) + ',' + p.y +\n\t\t\tarc + (r * 2) + ',0 ' +\n\t\t\tarc + (-r * 2) + ',0 ';\n\n\t\tthis._setPath(layer, d);\n\t},\n\n\t_setPath: function (layer, path) {\n\t\tlayer._path.setAttribute('d', path);\n\t},\n\n\t// SVG does not have the concept of zIndex so we resort to changing the DOM order of elements\n\t_bringToFront: function (layer) {\n\t\tDomUtil.toFront(layer._path);\n\t},\n\n\t_bringToBack: function (layer) {\n\t\tDomUtil.toBack(layer._path);\n\t}\n});\n\nif (Browser.vml) {\n\tSVG.include(vmlMixin);\n}\n\n// @namespace SVG\n// @factory L.svg(options?: Renderer options)\n// Creates a SVG renderer with the given options.\nexport function svg(options) {\n\treturn Browser.svg || Browser.vml ? new SVG(options) : null;\n}\n","import {Map} from '../../map/Map';\nimport {canvas} from './Canvas';\nimport {svg} from './SVG';\n\nMap.include({\n\t// @namespace Map; @method getRenderer(layer: Path): Renderer\n\t// Returns the instance of `Renderer` that should be used to render the given\n\t// `Path`. It will ensure that the `renderer` options of the map and paths\n\t// are respected, and that the renderers do exist on the map.\n\tgetRenderer: function (layer) {\n\t\t// @namespace Path; @option renderer: Renderer\n\t\t// Use this specific instance of `Renderer` for this path. Takes\n\t\t// precedence over the map's [default renderer](#map-renderer).\n\t\tvar renderer = layer.options.renderer || this._getPaneRenderer(layer.options.pane) || this.options.renderer || this._renderer;\n\n\t\tif (!renderer) {\n\t\t\trenderer = this._renderer = this._createRenderer();\n\t\t}\n\n\t\tif (!this.hasLayer(renderer)) {\n\t\t\tthis.addLayer(renderer);\n\t\t}\n\t\treturn renderer;\n\t},\n\n\t_getPaneRenderer: function (name) {\n\t\tif (name === 'overlayPane' || name === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar renderer = this._paneRenderers[name];\n\t\tif (renderer === undefined) {\n\t\t\trenderer = this._createRenderer({pane: name});\n\t\t\tthis._paneRenderers[name] = renderer;\n\t\t}\n\t\treturn renderer;\n\t},\n\n\t_createRenderer: function (options) {\n\t\t// @namespace Map; @option preferCanvas: Boolean = false\n\t\t// Whether `Path`s should be rendered on a `Canvas` renderer.\n\t\t// By default, all `Path`s are rendered in a `SVG` renderer.\n\t\treturn (this.options.preferCanvas && canvas(options)) || svg(options);\n\t}\n});\n","import {Polygon} from './Polygon';\nimport {toLatLngBounds} from '../../geo/LatLngBounds';\n\n/*\n * L.Rectangle extends Polygon and creates a rectangle when passed a LatLngBounds object.\n */\n\n/*\n * @class Rectangle\n * @aka L.Rectangle\n * @inherits Polygon\n *\n * A class for drawing rectangle overlays on a map. Extends `Polygon`.\n *\n * @example\n *\n * ```js\n * // define rectangle geographical bounds\n * var bounds = [[54.559322, -5.767822], [56.1210604, -3.021240]];\n *\n * // create an orange rectangle\n * L.rectangle(bounds, {color: \"#ff7800\", weight: 1}).addTo(map);\n *\n * // zoom the map to the rectangle bounds\n * map.fitBounds(bounds);\n * ```\n *\n */\n\n\nexport var Rectangle = Polygon.extend({\n\tinitialize: function (latLngBounds, options) {\n\t\tPolygon.prototype.initialize.call(this, this._boundsToLatLngs(latLngBounds), options);\n\t},\n\n\t// @method setBounds(latLngBounds: LatLngBounds): this\n\t// Redraws the rectangle with the passed bounds.\n\tsetBounds: function (latLngBounds) {\n\t\treturn this.setLatLngs(this._boundsToLatLngs(latLngBounds));\n\t},\n\n\t_boundsToLatLngs: function (latLngBounds) {\n\t\tlatLngBounds = toLatLngBounds(latLngBounds);\n\t\treturn [\n\t\t\tlatLngBounds.getSouthWest(),\n\t\t\tlatLngBounds.getNorthWest(),\n\t\t\tlatLngBounds.getNorthEast(),\n\t\t\tlatLngBounds.getSouthEast()\n\t\t];\n\t}\n});\n\n\n// @factory L.rectangle(latLngBounds: LatLngBounds, options?: Polyline options)\nexport function rectangle(latLngBounds, options) {\n\treturn new Rectangle(latLngBounds, options);\n}\n","export {Renderer} from './Renderer';\nexport {Canvas, canvas} from './Canvas';\nimport {SVG, create, pointsToPath, svg} from './SVG';\nSVG.create = create;\nSVG.pointsToPath = pointsToPath;\nexport {SVG, svg};\nimport './Renderer.getRenderer';\t// This is a bit of a hack, but needed because circular dependencies\n\nexport {Path} from './Path';\nexport {CircleMarker, circleMarker} from './CircleMarker';\nexport {Circle, circle} from './Circle';\nexport {Polyline, polyline} from './Polyline';\nexport {Polygon, polygon} from './Polygon';\nexport {Rectangle, rectangle} from './Rectangle';\n","export {Layer} from './Layer';\nexport {LayerGroup, layerGroup} from './LayerGroup';\nexport {FeatureGroup, featureGroup} from './FeatureGroup';\nimport {GeoJSON, geoJSON, geoJson, geometryToLayer, coordsToLatLng, coordsToLatLngs, latLngToCoords, latLngsToCoords, getFeature, asFeature} from './GeoJSON';\nGeoJSON.geometryToLayer = geometryToLayer;\nGeoJSON.coordsToLatLng = coordsToLatLng;\nGeoJSON.coordsToLatLngs = coordsToLatLngs;\nGeoJSON.latLngToCoords = latLngToCoords;\nGeoJSON.latLngsToCoords = latLngsToCoords;\nGeoJSON.getFeature = getFeature;\nGeoJSON.asFeature = asFeature;\nexport {GeoJSON, geoJSON, geoJson};\n\nexport {ImageOverlay, imageOverlay} from './ImageOverlay';\nexport {VideoOverlay, videoOverlay} from './VideoOverlay';\nexport {SVGOverlay, svgOverlay} from './SVGOverlay';\n\nexport {DivOverlay} from './DivOverlay';\nexport {Popup, popup} from './Popup';\nexport {Tooltip, tooltip} from './Tooltip';\n\nexport * from './marker/index';\nexport * from './tile/index';\nexport * from './vector/index';\n","import {Map} from '../Map';\nimport {Handler} from '../../core/Handler';\nimport * as Util from '../../core/Util';\nimport * as DomUtil from '../../dom/DomUtil';\nimport * as DomEvent from '../../dom/DomEvent';\nimport {LatLngBounds} from '../../geo/LatLngBounds';\nimport {Bounds} from '../../geometry/Bounds';\n\n/*\n * L.Handler.BoxZoom is used to add shift-drag zoom interaction to the map\n * (zoom to a selected bounding box), enabled by default.\n */\n\n// @namespace Map\n// @section Interaction Options\nMap.mergeOptions({\n\t// @option boxZoom: Boolean = true\n\t// Whether the map can be zoomed to a rectangular area specified by\n\t// dragging the mouse while pressing the shift key.\n\tboxZoom: true\n});\n\nexport var BoxZoom = Handler.extend({\n\tinitialize: function (map) {\n\t\tthis._map = map;\n\t\tthis._container = map._container;\n\t\tthis._pane = map._panes.overlayPane;\n\t\tthis._resetStateTimeout = 0;\n\t\tmap.on('unload', this._destroy, this);\n\t},\n\n\taddHooks: function () {\n\t\tDomEvent.on(this._container, 'mousedown', this._onMouseDown, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tDomEvent.off(this._container, 'mousedown', this._onMouseDown, this);\n\t},\n\n\tmoved: function () {\n\t\treturn this._moved;\n\t},\n\n\t_destroy: function () {\n\t\tDomUtil.remove(this._pane);\n\t\tdelete this._pane;\n\t},\n\n\t_resetState: function () {\n\t\tthis._resetStateTimeout = 0;\n\t\tthis._moved = false;\n\t},\n\n\t_clearDeferredResetState: function () {\n\t\tif (this._resetStateTimeout !== 0) {\n\t\t\tclearTimeout(this._resetStateTimeout);\n\t\t\tthis._resetStateTimeout = 0;\n\t\t}\n\t},\n\n\t_onMouseDown: function (e) {\n\t\tif (!e.shiftKey || ((e.which !== 1) && (e.button !== 1))) { return false; }\n\n\t\t// Clear the deferred resetState if it hasn't executed yet, otherwise it\n\t\t// will interrupt the interaction and orphan a box element in the container.\n\t\tthis._clearDeferredResetState();\n\t\tthis._resetState();\n\n\t\tDomUtil.disableTextSelection();\n\t\tDomUtil.disableImageDrag();\n\n\t\tthis._startPoint = this._map.mouseEventToContainerPoint(e);\n\n\t\tDomEvent.on(document, {\n\t\t\tcontextmenu: DomEvent.stop,\n\t\t\tmousemove: this._onMouseMove,\n\t\t\tmouseup: this._onMouseUp,\n\t\t\tkeydown: this._onKeyDown\n\t\t}, this);\n\t},\n\n\t_onMouseMove: function (e) {\n\t\tif (!this._moved) {\n\t\t\tthis._moved = true;\n\n\t\t\tthis._box = DomUtil.create('div', 'leaflet-zoom-box', this._container);\n\t\t\tDomUtil.addClass(this._container, 'leaflet-crosshair');\n\n\t\t\tthis._map.fire('boxzoomstart');\n\t\t}\n\n\t\tthis._point = this._map.mouseEventToContainerPoint(e);\n\n\t\tvar bounds = new Bounds(this._point, this._startPoint),\n\t\t    size = bounds.getSize();\n\n\t\tDomUtil.setPosition(this._box, bounds.min);\n\n\t\tthis._box.style.width  = size.x + 'px';\n\t\tthis._box.style.height = size.y + 'px';\n\t},\n\n\t_finish: function () {\n\t\tif (this._moved) {\n\t\t\tDomUtil.remove(this._box);\n\t\t\tDomUtil.removeClass(this._container, 'leaflet-crosshair');\n\t\t}\n\n\t\tDomUtil.enableTextSelection();\n\t\tDomUtil.enableImageDrag();\n\n\t\tDomEvent.off(document, {\n\t\t\tcontextmenu: DomEvent.stop,\n\t\t\tmousemove: this._onMouseMove,\n\t\t\tmouseup: this._onMouseUp,\n\t\t\tkeydown: this._onKeyDown\n\t\t}, this);\n\t},\n\n\t_onMouseUp: function (e) {\n\t\tif ((e.which !== 1) && (e.button !== 1)) { return; }\n\n\t\tthis._finish();\n\n\t\tif (!this._moved) { return; }\n\t\t// Postpone to next JS tick so internal click event handling\n\t\t// still see it as \"moved\".\n\t\tthis._clearDeferredResetState();\n\t\tthis._resetStateTimeout = setTimeout(Util.bind(this._resetState, this), 0);\n\n\t\tvar bounds = new LatLngBounds(\n\t\t        this._map.containerPointToLatLng(this._startPoint),\n\t\t        this._map.containerPointToLatLng(this._point));\n\n\t\tthis._map\n\t\t\t.fitBounds(bounds)\n\t\t\t.fire('boxzoomend', {boxZoomBounds: bounds});\n\t},\n\n\t_onKeyDown: function (e) {\n\t\tif (e.keyCode === 27) {\n\t\t\tthis._finish();\n\t\t\tthis._clearDeferredResetState();\n\t\t\tthis._resetState();\n\t\t}\n\t}\n});\n\n// @section Handlers\n// @property boxZoom: Handler\n// Box (shift-drag with mouse) zoom handler.\nMap.addInitHook('addHandler', 'boxZoom', BoxZoom);\n","import {Map} from '../Map';\nimport {Handler} from '../../core/Handler';\n\n/*\n * L.Handler.DoubleClickZoom is used to handle double-click zoom on the map, enabled by default.\n */\n\n// @namespace Map\n// @section Interaction Options\n\nMap.mergeOptions({\n\t// @option doubleClickZoom: Boolean|String = true\n\t// Whether the map can be zoomed in by double clicking on it and\n\t// zoomed out by double clicking while holding shift. If passed\n\t// `'center'`, double-click zoom will zoom to the center of the\n\t//  view regardless of where the mouse was.\n\tdoubleClickZoom: true\n});\n\nexport var DoubleClickZoom = Handler.extend({\n\taddHooks: function () {\n\t\tthis._map.on('dblclick', this._onDoubleClick, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tthis._map.off('dblclick', this._onDoubleClick, this);\n\t},\n\n\t_onDoubleClick: function (e) {\n\t\tvar map = this._map,\n\t\t    oldZoom = map.getZoom(),\n\t\t    delta = map.options.zoomDelta,\n\t\t    zoom = e.originalEvent.shiftKey ? oldZoom - delta : oldZoom + delta;\n\n\t\tif (map.options.doubleClickZoom === 'center') {\n\t\t\tmap.setZoom(zoom);\n\t\t} else {\n\t\t\tmap.setZoomAround(e.containerPoint, zoom);\n\t\t}\n\t}\n});\n\n// @section Handlers\n//\n// Map properties include interaction handlers that allow you to control\n// interaction behavior in runtime, enabling or disabling certain features such\n// as dragging or touch zoom (see `Handler` methods). For example:\n//\n// ```js\n// map.doubleClickZoom.disable();\n// ```\n//\n// @property doubleClickZoom: Handler\n// Double click zoom handler.\nMap.addInitHook('addHandler', 'doubleClickZoom', DoubleClickZoom);\n","import {Map} from '../Map';\nimport {Handler} from '../../core/Handler';\nimport {Draggable} from '../../dom/Draggable';\nimport * as Util from '../../core/Util';\nimport * as DomUtil from '../../dom/DomUtil';\nimport {toLatLngBounds as latLngBounds} from '../../geo/LatLngBounds';\nimport {toBounds} from '../../geometry/Bounds';\n\n/*\n * L.Handler.MapDrag is used to make the map draggable (with panning inertia), enabled by default.\n */\n\n// @namespace Map\n// @section Interaction Options\nMap.mergeOptions({\n\t// @option dragging: Boolean = true\n\t// Whether the map is draggable with mouse/touch or not.\n\tdragging: true,\n\n\t// @section Panning Inertia Options\n\t// @option inertia: Boolean = *\n\t// If enabled, panning of the map will have an inertia effect where\n\t// the map builds momentum while dragging and continues moving in\n\t// the same direction for some time. Feels especially nice on touch\n\t// devices. Enabled by default.\n\tinertia: true,\n\n\t// @option inertiaDeceleration: Number = 3000\n\t// The rate with which the inertial movement slows down, in pixels/second².\n\tinertiaDeceleration: 3400, // px/s^2\n\n\t// @option inertiaMaxSpeed: Number = Infinity\n\t// Max speed of the inertial movement, in pixels/second.\n\tinertiaMaxSpeed: Infinity, // px/s\n\n\t// @option easeLinearity: Number = 0.2\n\teaseLinearity: 0.2,\n\n\t// TODO refactor, move to CRS\n\t// @option worldCopyJump: Boolean = false\n\t// With this option enabled, the map tracks when you pan to another \"copy\"\n\t// of the world and seamlessly jumps to the original one so that all overlays\n\t// like markers and vector layers are still visible.\n\tworldCopyJump: false,\n\n\t// @option maxBoundsViscosity: Number = 0.0\n\t// If `maxBounds` is set, this option will control how solid the bounds\n\t// are when dragging the map around. The default value of `0.0` allows the\n\t// user to drag outside the bounds at normal speed, higher values will\n\t// slow down map dragging outside bounds, and `1.0` makes the bounds fully\n\t// solid, preventing the user from dragging outside the bounds.\n\tmaxBoundsViscosity: 0.0\n});\n\nexport var Drag = Handler.extend({\n\taddHooks: function () {\n\t\tif (!this._draggable) {\n\t\t\tvar map = this._map;\n\n\t\t\tthis._draggable = new Draggable(map._mapPane, map._container);\n\n\t\t\tthis._draggable.on({\n\t\t\t\tdragstart: this._onDragStart,\n\t\t\t\tdrag: this._onDrag,\n\t\t\t\tdragend: this._onDragEnd\n\t\t\t}, this);\n\n\t\t\tthis._draggable.on('predrag', this._onPreDragLimit, this);\n\t\t\tif (map.options.worldCopyJump) {\n\t\t\t\tthis._draggable.on('predrag', this._onPreDragWrap, this);\n\t\t\t\tmap.on('zoomend', this._onZoomEnd, this);\n\n\t\t\t\tmap.whenReady(this._onZoomEnd, this);\n\t\t\t}\n\t\t}\n\t\tDomUtil.addClass(this._map._container, 'leaflet-grab leaflet-touch-drag');\n\t\tthis._draggable.enable();\n\t\tthis._positions = [];\n\t\tthis._times = [];\n\t},\n\n\tremoveHooks: function () {\n\t\tDomUtil.removeClass(this._map._container, 'leaflet-grab');\n\t\tDomUtil.removeClass(this._map._container, 'leaflet-touch-drag');\n\t\tthis._draggable.disable();\n\t},\n\n\tmoved: function () {\n\t\treturn this._draggable && this._draggable._moved;\n\t},\n\n\tmoving: function () {\n\t\treturn this._draggable && this._draggable._moving;\n\t},\n\n\t_onDragStart: function () {\n\t\tvar map = this._map;\n\n\t\tmap._stop();\n\t\tif (this._map.options.maxBounds && this._map.options.maxBoundsViscosity) {\n\t\t\tvar bounds = latLngBounds(this._map.options.maxBounds);\n\n\t\t\tthis._offsetLimit = toBounds(\n\t\t\t\tthis._map.latLngToContainerPoint(bounds.getNorthWest()).multiplyBy(-1),\n\t\t\t\tthis._map.latLngToContainerPoint(bounds.getSouthEast()).multiplyBy(-1)\n\t\t\t\t\t.add(this._map.getSize()));\n\n\t\t\tthis._viscosity = Math.min(1.0, Math.max(0.0, this._map.options.maxBoundsViscosity));\n\t\t} else {\n\t\t\tthis._offsetLimit = null;\n\t\t}\n\n\t\tmap\n\t\t    .fire('movestart')\n\t\t    .fire('dragstart');\n\n\t\tif (map.options.inertia) {\n\t\t\tthis._positions = [];\n\t\t\tthis._times = [];\n\t\t}\n\t},\n\n\t_onDrag: function (e) {\n\t\tif (this._map.options.inertia) {\n\t\t\tvar time = this._lastTime = +new Date(),\n\t\t\t    pos = this._lastPos = this._draggable._absPos || this._draggable._newPos;\n\n\t\t\tthis._positions.push(pos);\n\t\t\tthis._times.push(time);\n\n\t\t\tthis._prunePositions(time);\n\t\t}\n\n\t\tthis._map\n\t\t    .fire('move', e)\n\t\t    .fire('drag', e);\n\t},\n\n\t_prunePositions: function (time) {\n\t\twhile (this._positions.length > 1 && time - this._times[0] > 50) {\n\t\t\tthis._positions.shift();\n\t\t\tthis._times.shift();\n\t\t}\n\t},\n\n\t_onZoomEnd: function () {\n\t\tvar pxCenter = this._map.getSize().divideBy(2),\n\t\t    pxWorldCenter = this._map.latLngToLayerPoint([0, 0]);\n\n\t\tthis._initialWorldOffset = pxWorldCenter.subtract(pxCenter).x;\n\t\tthis._worldWidth = this._map.getPixelWorldBounds().getSize().x;\n\t},\n\n\t_viscousLimit: function (value, threshold) {\n\t\treturn value - (value - threshold) * this._viscosity;\n\t},\n\n\t_onPreDragLimit: function () {\n\t\tif (!this._viscosity || !this._offsetLimit) { return; }\n\n\t\tvar offset = this._draggable._newPos.subtract(this._draggable._startPos);\n\n\t\tvar limit = this._offsetLimit;\n\t\tif (offset.x < limit.min.x) { offset.x = this._viscousLimit(offset.x, limit.min.x); }\n\t\tif (offset.y < limit.min.y) { offset.y = this._viscousLimit(offset.y, limit.min.y); }\n\t\tif (offset.x > limit.max.x) { offset.x = this._viscousLimit(offset.x, limit.max.x); }\n\t\tif (offset.y > limit.max.y) { offset.y = this._viscousLimit(offset.y, limit.max.y); }\n\n\t\tthis._draggable._newPos = this._draggable._startPos.add(offset);\n\t},\n\n\t_onPreDragWrap: function () {\n\t\t// TODO refactor to be able to adjust map pane position after zoom\n\t\tvar worldWidth = this._worldWidth,\n\t\t    halfWidth = Math.round(worldWidth / 2),\n\t\t    dx = this._initialWorldOffset,\n\t\t    x = this._draggable._newPos.x,\n\t\t    newX1 = (x - halfWidth + dx) % worldWidth + halfWidth - dx,\n\t\t    newX2 = (x + halfWidth + dx) % worldWidth - halfWidth - dx,\n\t\t    newX = Math.abs(newX1 + dx) < Math.abs(newX2 + dx) ? newX1 : newX2;\n\n\t\tthis._draggable._absPos = this._draggable._newPos.clone();\n\t\tthis._draggable._newPos.x = newX;\n\t},\n\n\t_onDragEnd: function (e) {\n\t\tvar map = this._map,\n\t\t    options = map.options,\n\n\t\t    noInertia = !options.inertia || e.noInertia || this._times.length < 2;\n\n\t\tmap.fire('dragend', e);\n\n\t\tif (noInertia) {\n\t\t\tmap.fire('moveend');\n\n\t\t} else {\n\t\t\tthis._prunePositions(+new Date());\n\n\t\t\tvar direction = this._lastPos.subtract(this._positions[0]),\n\t\t\t    duration = (this._lastTime - this._times[0]) / 1000,\n\t\t\t    ease = options.easeLinearity,\n\n\t\t\t    speedVector = direction.multiplyBy(ease / duration),\n\t\t\t    speed = speedVector.distanceTo([0, 0]),\n\n\t\t\t    limitedSpeed = Math.min(options.inertiaMaxSpeed, speed),\n\t\t\t    limitedSpeedVector = speedVector.multiplyBy(limitedSpeed / speed),\n\n\t\t\t    decelerationDuration = limitedSpeed / (options.inertiaDeceleration * ease),\n\t\t\t    offset = limitedSpeedVector.multiplyBy(-decelerationDuration / 2).round();\n\n\t\t\tif (!offset.x && !offset.y) {\n\t\t\t\tmap.fire('moveend');\n\n\t\t\t} else {\n\t\t\t\toffset = map._limitOffset(offset, map.options.maxBounds);\n\n\t\t\t\tUtil.requestAnimFrame(function () {\n\t\t\t\t\tmap.panBy(offset, {\n\t\t\t\t\t\tduration: decelerationDuration,\n\t\t\t\t\t\teaseLinearity: ease,\n\t\t\t\t\t\tnoMoveStart: true,\n\t\t\t\t\t\tanimate: true\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n});\n\n// @section Handlers\n// @property dragging: Handler\n// Map dragging handler (by both mouse and touch).\nMap.addInitHook('addHandler', 'dragging', Drag);\n","import {Map} from '../Map';\nimport {Handler} from '../../core/Handler';\nimport {on, off, stop} from '../../dom/DomEvent';\nimport {toPoint} from '../../geometry/Point';\n\n\n/*\n * L.Map.Keyboard is handling keyboard interaction with the map, enabled by default.\n */\n\n// @namespace Map\n// @section Keyboard Navigation Options\nMap.mergeOptions({\n\t// @option keyboard: Boolean = true\n\t// Makes the map focusable and allows users to navigate the map with keyboard\n\t// arrows and `+`/`-` keys.\n\tkeyboard: true,\n\n\t// @option keyboardPanDelta: Number = 80\n\t// Amount of pixels to pan when pressing an arrow key.\n\tkeyboardPanDelta: 80\n});\n\nexport var Keyboard = Handler.extend({\n\n\tkeyCodes: {\n\t\tleft:    [37],\n\t\tright:   [39],\n\t\tdown:    [40],\n\t\tup:      [38],\n\t\tzoomIn:  [187, 107, 61, 171],\n\t\tzoomOut: [189, 109, 54, 173]\n\t},\n\n\tinitialize: function (map) {\n\t\tthis._map = map;\n\n\t\tthis._setPanDelta(map.options.keyboardPanDelta);\n\t\tthis._setZoomDelta(map.options.zoomDelta);\n\t},\n\n\taddHooks: function () {\n\t\tvar container = this._map._container;\n\n\t\t// make the container focusable by tabbing\n\t\tif (container.tabIndex <= 0) {\n\t\t\tcontainer.tabIndex = '0';\n\t\t}\n\n\t\ton(container, {\n\t\t\tfocus: this._onFocus,\n\t\t\tblur: this._onBlur,\n\t\t\tmousedown: this._onMouseDown\n\t\t}, this);\n\n\t\tthis._map.on({\n\t\t\tfocus: this._addHooks,\n\t\t\tblur: this._removeHooks\n\t\t}, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tthis._removeHooks();\n\n\t\toff(this._map._container, {\n\t\t\tfocus: this._onFocus,\n\t\t\tblur: this._onBlur,\n\t\t\tmousedown: this._onMouseDown\n\t\t}, this);\n\n\t\tthis._map.off({\n\t\t\tfocus: this._addHooks,\n\t\t\tblur: this._removeHooks\n\t\t}, this);\n\t},\n\n\t_onMouseDown: function () {\n\t\tif (this._focused) { return; }\n\n\t\tvar body = document.body,\n\t\t    docEl = document.documentElement,\n\t\t    top = body.scrollTop || docEl.scrollTop,\n\t\t    left = body.scrollLeft || docEl.scrollLeft;\n\n\t\tthis._map._container.focus();\n\n\t\twindow.scrollTo(left, top);\n\t},\n\n\t_onFocus: function () {\n\t\tthis._focused = true;\n\t\tthis._map.fire('focus');\n\t},\n\n\t_onBlur: function () {\n\t\tthis._focused = false;\n\t\tthis._map.fire('blur');\n\t},\n\n\t_setPanDelta: function (panDelta) {\n\t\tvar keys = this._panKeys = {},\n\t\t    codes = this.keyCodes,\n\t\t    i, len;\n\n\t\tfor (i = 0, len = codes.left.length; i < len; i++) {\n\t\t\tkeys[codes.left[i]] = [-1 * panDelta, 0];\n\t\t}\n\t\tfor (i = 0, len = codes.right.length; i < len; i++) {\n\t\t\tkeys[codes.right[i]] = [panDelta, 0];\n\t\t}\n\t\tfor (i = 0, len = codes.down.length; i < len; i++) {\n\t\t\tkeys[codes.down[i]] = [0, panDelta];\n\t\t}\n\t\tfor (i = 0, len = codes.up.length; i < len; i++) {\n\t\t\tkeys[codes.up[i]] = [0, -1 * panDelta];\n\t\t}\n\t},\n\n\t_setZoomDelta: function (zoomDelta) {\n\t\tvar keys = this._zoomKeys = {},\n\t\t    codes = this.keyCodes,\n\t\t    i, len;\n\n\t\tfor (i = 0, len = codes.zoomIn.length; i < len; i++) {\n\t\t\tkeys[codes.zoomIn[i]] = zoomDelta;\n\t\t}\n\t\tfor (i = 0, len = codes.zoomOut.length; i < len; i++) {\n\t\t\tkeys[codes.zoomOut[i]] = -zoomDelta;\n\t\t}\n\t},\n\n\t_addHooks: function () {\n\t\ton(document, 'keydown', this._onKeyDown, this);\n\t},\n\n\t_removeHooks: function () {\n\t\toff(document, 'keydown', this._onKeyDown, this);\n\t},\n\n\t_onKeyDown: function (e) {\n\t\tif (e.altKey || e.ctrlKey || e.metaKey) { return; }\n\n\t\tvar key = e.keyCode,\n\t\t    map = this._map,\n\t\t    offset;\n\n\t\tif (key in this._panKeys) {\n\t\t\tif (!map._panAnim || !map._panAnim._inProgress) {\n\t\t\t\toffset = this._panKeys[key];\n\t\t\t\tif (e.shiftKey) {\n\t\t\t\t\toffset = toPoint(offset).multiplyBy(3);\n\t\t\t\t}\n\n\t\t\t\tif (map.options.maxBounds) {\n\t\t\t\t\toffset = map._limitOffset(toPoint(offset), map.options.maxBounds);\n\t\t\t\t}\n\n\t\t\t\tif (map.options.worldCopyJump) {\n\t\t\t\t\tvar newLatLng = map.wrapLatLng(map.unproject(map.project(map.getCenter()).add(offset)));\n\t\t\t\t\tmap.panTo(newLatLng);\n\t\t\t\t} else {\n\t\t\t\t\tmap.panBy(offset);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (key in this._zoomKeys) {\n\t\t\tmap.setZoom(map.getZoom() + (e.shiftKey ? 3 : 1) * this._zoomKeys[key]);\n\n\t\t} else if (key === 27 && map._popup && map._popup.options.closeOnEscapeKey) {\n\t\t\tmap.closePopup();\n\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\tstop(e);\n\t}\n});\n\n// @section Handlers\n// @section Handlers\n// @property keyboard: Handler\n// Keyboard navigation handler.\nMap.addInitHook('addHandler', 'keyboard', Keyboard);\n","import {Map} from '../Map';\nimport {Handler} from '../../core/Handler';\nimport * as DomEvent from '../../dom/DomEvent';\nimport * as Util from '../../core/Util';\n\n/*\n * L.Handler.ScrollWheelZoom is used by L.Map to enable mouse scroll wheel zoom on the map.\n */\n\n// @namespace Map\n// @section Interaction Options\nMap.mergeOptions({\n\t// @section Mouse wheel options\n\t// @option scrollWheelZoom: Boolean|String = true\n\t// Whether the map can be zoomed by using the mouse wheel. If passed `'center'`,\n\t// it will zoom to the center of the view regardless of where the mouse was.\n\tscrollWheelZoom: true,\n\n\t// @option wheelDebounceTime: Number = 40\n\t// Limits the rate at which a wheel can fire (in milliseconds). By default\n\t// user can't zoom via wheel more often than once per 40 ms.\n\twheelDebounceTime: 40,\n\n\t// @option wheelPxPerZoomLevel: Number = 60\n\t// How many scroll pixels (as reported by [L.DomEvent.getWheelDelta](#domevent-getwheeldelta))\n\t// mean a change of one full zoom level. Smaller values will make wheel-zooming\n\t// faster (and vice versa).\n\twheelPxPerZoomLevel: 60\n});\n\nexport var ScrollWheelZoom = Handler.extend({\n\taddHooks: function () {\n\t\tDomEvent.on(this._map._container, 'wheel', this._onWheelScroll, this);\n\n\t\tthis._delta = 0;\n\t},\n\n\tremoveHooks: function () {\n\t\tDomEvent.off(this._map._container, 'wheel', this._onWheelScroll, this);\n\t},\n\n\t_onWheelScroll: function (e) {\n\t\tvar delta = DomEvent.getWheelDelta(e);\n\n\t\tvar debounce = this._map.options.wheelDebounceTime;\n\n\t\tthis._delta += delta;\n\t\tthis._lastMousePos = this._map.mouseEventToContainerPoint(e);\n\n\t\tif (!this._startTime) {\n\t\t\tthis._startTime = +new Date();\n\t\t}\n\n\t\tvar left = Math.max(debounce - (+new Date() - this._startTime), 0);\n\n\t\tclearTimeout(this._timer);\n\t\tthis._timer = setTimeout(Util.bind(this._performZoom, this), left);\n\n\t\tDomEvent.stop(e);\n\t},\n\n\t_performZoom: function () {\n\t\tvar map = this._map,\n\t\t    zoom = map.getZoom(),\n\t\t    snap = this._map.options.zoomSnap || 0;\n\n\t\tmap._stop(); // stop panning and fly animations if any\n\n\t\t// map the delta with a sigmoid function to -4..4 range leaning on -1..1\n\t\tvar d2 = this._delta / (this._map.options.wheelPxPerZoomLevel * 4),\n\t\t    d3 = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(d2)))) / Math.LN2,\n\t\t    d4 = snap ? Math.ceil(d3 / snap) * snap : d3,\n\t\t    delta = map._limitZoom(zoom + (this._delta > 0 ? d4 : -d4)) - zoom;\n\n\t\tthis._delta = 0;\n\t\tthis._startTime = null;\n\n\t\tif (!delta) { return; }\n\n\t\tif (map.options.scrollWheelZoom === 'center') {\n\t\t\tmap.setZoom(zoom + delta);\n\t\t} else {\n\t\t\tmap.setZoomAround(this._lastMousePos, zoom + delta);\n\t\t}\n\t}\n});\n\n// @section Handlers\n// @property scrollWheelZoom: Handler\n// Scroll wheel zoom handler.\nMap.addInitHook('addHandler', 'scrollWheelZoom', ScrollWheelZoom);\n","import {Map} from '../Map';\nimport {Handler} from '../../core/Handler';\nimport * as DomEvent from '../../dom/DomEvent';\nimport {Point} from '../../geometry/Point';\nimport * as Util from '../../core/Util';\nimport Browser from '../../core/Browser';\n\n/*\n * L.Map.TapHold is used to simulate `contextmenu` event on long hold,\n * which otherwise is not fired by mobile Safari.\n */\n\nvar tapHoldDelay = 600;\n\n// @namespace Map\n// @section Interaction Options\nMap.mergeOptions({\n\t// @section Touch interaction options\n\t// @option tapHold: Boolean\n\t// Enables simulation of `contextmenu` event, default is `true` for mobile Safari.\n\ttapHold: Browser.touchNative && Browser.safari && Browser.mobile,\n\n\t// @option tapTolerance: Number = 15\n\t// The max number of pixels a user can shift his finger during touch\n\t// for it to be considered a valid tap.\n\ttapTolerance: 15\n});\n\nexport var TapHold = Handler.extend({\n\taddHooks: function () {\n\t\tDomEvent.on(this._map._container, 'touchstart', this._onDown, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tDomEvent.off(this._map._container, 'touchstart', this._onDown, this);\n\t},\n\n\t_onDown: function (e) {\n\t\tclearTimeout(this._holdTimeout);\n\t\tif (e.touches.length !== 1) { return; }\n\n\t\tvar first = e.touches[0];\n\t\tthis._startPos = this._newPos = new Point(first.clientX, first.clientY);\n\n\t\tthis._holdTimeout = setTimeout(Util.bind(function () {\n\t\t\tthis._cancel();\n\t\t\tif (!this._isTapValid()) { return; }\n\n\t\t\t// prevent simulated mouse events https://w3c.github.io/touch-events/#mouse-events\n\t\t\tDomEvent.on(document, 'touchend', DomEvent.preventDefault);\n\t\t\tDomEvent.on(document, 'touchend touchcancel', this._cancelClickPrevent);\n\t\t\tthis._simulateEvent('contextmenu', first);\n\t\t}, this), tapHoldDelay);\n\n\t\tDomEvent.on(document, 'touchend touchcancel contextmenu', this._cancel, this);\n\t\tDomEvent.on(document, 'touchmove', this._onMove, this);\n\t},\n\n\t_cancelClickPrevent: function cancelClickPrevent() {\n\t\tDomEvent.off(document, 'touchend', DomEvent.preventDefault);\n\t\tDomEvent.off(document, 'touchend touchcancel', cancelClickPrevent);\n\t},\n\n\t_cancel: function () {\n\t\tclearTimeout(this._holdTimeout);\n\t\tDomEvent.off(document, 'touchend touchcancel contextmenu', this._cancel, this);\n\t\tDomEvent.off(document, 'touchmove', this._onMove, this);\n\t},\n\n\t_onMove: function (e) {\n\t\tvar first = e.touches[0];\n\t\tthis._newPos = new Point(first.clientX, first.clientY);\n\t},\n\n\t_isTapValid: function () {\n\t\treturn this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance;\n\t},\n\n\t_simulateEvent: function (type, e) {\n\t\tvar simulatedEvent = new MouseEvent(type, {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t\tview: window,\n\t\t\t// detail: 1,\n\t\t\tscreenX: e.screenX,\n\t\t\tscreenY: e.screenY,\n\t\t\tclientX: e.clientX,\n\t\t\tclientY: e.clientY,\n\t\t\t// button: 2,\n\t\t\t// buttons: 2\n\t\t});\n\n\t\tsimulatedEvent._simulated = true;\n\n\t\te.target.dispatchEvent(simulatedEvent);\n\t}\n});\n\n// @section Handlers\n// @property tapHold: Handler\n// Long tap handler to simulate `contextmenu` event (useful in mobile Safari).\nMap.addInitHook('addHandler', 'tapHold', TapHold);\n","import {Map} from '../Map';\nimport {Handler} from '../../core/Handler';\nimport * as DomEvent from '../../dom/DomEvent';\nimport * as Util from '../../core/Util';\nimport * as DomUtil from '../../dom/DomUtil';\nimport Browser from '../../core/Browser';\n\n/*\n * L.Handler.TouchZoom is used by L.Map to add pinch zoom on supported mobile browsers.\n */\n\n// @namespace Map\n// @section Interaction Options\nMap.mergeOptions({\n\t// @section Touch interaction options\n\t// @option touchZoom: Boolean|String = *\n\t// Whether the map can be zoomed by touch-dragging with two fingers. If\n\t// passed `'center'`, it will zoom to the center of the view regardless of\n\t// where the touch events (fingers) were. Enabled for touch-capable web\n\t// browsers.\n\ttouchZoom: Browser.touch,\n\n\t// @option bounceAtZoomLimits: Boolean = true\n\t// Set it to false if you don't want the map to zoom beyond min/max zoom\n\t// and then bounce back when pinch-zooming.\n\tbounceAtZoomLimits: true\n});\n\nexport var TouchZoom = Handler.extend({\n\taddHooks: function () {\n\t\tDomUtil.addClass(this._map._container, 'leaflet-touch-zoom');\n\t\tDomEvent.on(this._map._container, 'touchstart', this._onTouchStart, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tDomUtil.removeClass(this._map._container, 'leaflet-touch-zoom');\n\t\tDomEvent.off(this._map._container, 'touchstart', this._onTouchStart, this);\n\t},\n\n\t_onTouchStart: function (e) {\n\t\tvar map = this._map;\n\t\tif (!e.touches || e.touches.length !== 2 || map._animatingZoom || this._zooming) { return; }\n\n\t\tvar p1 = map.mouseEventToContainerPoint(e.touches[0]),\n\t\t    p2 = map.mouseEventToContainerPoint(e.touches[1]);\n\n\t\tthis._centerPoint = map.getSize()._divideBy(2);\n\t\tthis._startLatLng = map.containerPointToLatLng(this._centerPoint);\n\t\tif (map.options.touchZoom !== 'center') {\n\t\t\tthis._pinchStartLatLng = map.containerPointToLatLng(p1.add(p2)._divideBy(2));\n\t\t}\n\n\t\tthis._startDist = p1.distanceTo(p2);\n\t\tthis._startZoom = map.getZoom();\n\n\t\tthis._moved = false;\n\t\tthis._zooming = true;\n\n\t\tmap._stop();\n\n\t\tDomEvent.on(document, 'touchmove', this._onTouchMove, this);\n\t\tDomEvent.on(document, 'touchend touchcancel', this._onTouchEnd, this);\n\n\t\tDomEvent.preventDefault(e);\n\t},\n\n\t_onTouchMove: function (e) {\n\t\tif (!e.touches || e.touches.length !== 2 || !this._zooming) { return; }\n\n\t\tvar map = this._map,\n\t\t    p1 = map.mouseEventToContainerPoint(e.touches[0]),\n\t\t    p2 = map.mouseEventToContainerPoint(e.touches[1]),\n\t\t    scale = p1.distanceTo(p2) / this._startDist;\n\n\t\tthis._zoom = map.getScaleZoom(scale, this._startZoom);\n\n\t\tif (!map.options.bounceAtZoomLimits && (\n\t\t\t(this._zoom < map.getMinZoom() && scale < 1) ||\n\t\t\t(this._zoom > map.getMaxZoom() && scale > 1))) {\n\t\t\tthis._zoom = map._limitZoom(this._zoom);\n\t\t}\n\n\t\tif (map.options.touchZoom === 'center') {\n\t\t\tthis._center = this._startLatLng;\n\t\t\tif (scale === 1) { return; }\n\t\t} else {\n\t\t\t// Get delta from pinch to center, so centerLatLng is delta applied to initial pinchLatLng\n\t\t\tvar delta = p1._add(p2)._divideBy(2)._subtract(this._centerPoint);\n\t\t\tif (scale === 1 && delta.x === 0 && delta.y === 0) { return; }\n\t\t\tthis._center = map.unproject(map.project(this._pinchStartLatLng, this._zoom).subtract(delta), this._zoom);\n\t\t}\n\n\t\tif (!this._moved) {\n\t\t\tmap._moveStart(true, false);\n\t\t\tthis._moved = true;\n\t\t}\n\n\t\tUtil.cancelAnimFrame(this._animRequest);\n\n\t\tvar moveFn = Util.bind(map._move, map, this._center, this._zoom, {pinch: true, round: false}, undefined);\n\t\tthis._animRequest = Util.requestAnimFrame(moveFn, this, true);\n\n\t\tDomEvent.preventDefault(e);\n\t},\n\n\t_onTouchEnd: function () {\n\t\tif (!this._moved || !this._zooming) {\n\t\t\tthis._zooming = false;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._zooming = false;\n\t\tUtil.cancelAnimFrame(this._animRequest);\n\n\t\tDomEvent.off(document, 'touchmove', this._onTouchMove, this);\n\t\tDomEvent.off(document, 'touchend touchcancel', this._onTouchEnd, this);\n\n\t\t// Pinch updates GridLayers' levels only when zoomSnap is off, so zoomSnap becomes noUpdate.\n\t\tif (this._map.options.zoomAnimation) {\n\t\t\tthis._map._animateZoom(this._center, this._map._limitZoom(this._zoom), true, this._map.options.zoomSnap);\n\t\t} else {\n\t\t\tthis._map._resetView(this._center, this._map._limitZoom(this._zoom));\n\t\t}\n\t}\n});\n\n// @section Handlers\n// @property touchZoom: Handler\n// Touch zoom handler.\nMap.addInitHook('addHandler', 'touchZoom', TouchZoom);\n","import {Map} from './Map';\nimport {BoxZoom} from './handler/Map.BoxZoom';\nMap.BoxZoom = BoxZoom;\nimport {DoubleClickZoom} from './handler/Map.DoubleClickZoom';\nMap.DoubleClickZoom = DoubleClickZoom;\nimport {Drag} from './handler/Map.Drag';\nMap.Drag = Drag;\nimport {Keyboard} from './handler/Map.Keyboard';\nMap.Keyboard = Keyboard;\nimport {ScrollWheelZoom} from './handler/Map.ScrollWheelZoom';\nMap.ScrollWheelZoom = ScrollWheelZoom;\nimport {TapHold} from './handler/Map.TapHold';\nMap.TapHold = TapHold;\nimport {TouchZoom} from './handler/Map.TouchZoom';\nMap.TouchZoom = TouchZoom;\n\nexport {Map, createMap as map} from './Map';\n","//We implement the backend version of getWHDebugFlags so bridge can access us without going through a recursive dep\n\nimport type { DTAPStage } from \"./concepts\";\n\n/// List global polyfills currently active. This may be needed to align TypeScript hosts configuration\nexport const globalPolyfills: string[] = [];\n\n/// An object with string keys and typed values\nexport interface WellKnownFlags {\n  /** Log RPcs */\n  rpc?: boolean;\n  /** Log web traffic */\n  wrq?: boolean;\n  /** Autoprofile */\n  apr?: boolean;\n  /** IPC */\n  ipc?: boolean;\n  /** async */\n  async?: boolean;\n}\nexport type DebugFlags = WellKnownFlags & { [key: string]: boolean | undefined };\n\nexport type DebugConfig = {\n  tags: readonly string[];\n  outputsession: string;\n  context: string;\n};\n\n/// Empty or no parameter lang is get, otherwise it's a set\nexport type GetSetAssetBase = (assetBase?: string | null) => string | null;\n\nexport type EnvHooks = {\n  currentAssetBase: GetSetAssetBase;\n};\n\n\nconst settingschangedcallbacks = new Array<() => void>;\n\n/* Global debug flags are set by `wh debug`, local flags are prefilled by environment variables.\n   Edits to the debug flags will be applied to the local flags (unless setDebugFlagsOverrideCB returns\n   override records).\n*/\nconst globalDebugFlags: DebugFlags = {}, localDebugFlags: DebugFlags = {};\n\n/** Returns the flag override records. The first record is examined first, then the second, etc. */\nlet debugFlagsOverridesCB: undefined | (() => DebugFlags[]);\n\n/** Override the debug flag override getter. */\nexport function setDebugFlagsOverrideCB(cb: undefined | (() => DebugFlags[])) {\n  debugFlagsOverridesCB = cb;\n}\n\n/* Proxy handler for the published debug flags. Uses the override records (with the first record\n   examined first, then the second, etc.) to override the flags from baseDebugFlags. Setting to `true` sets\n   the flag, `false` disables it and setting to `undefined` has the same effect as deleting the property in the\n   current top record (exposing any value from a lower record, like the debug settings from `wh debug`).\n*/\nclass DebugFlagsProxyHandler implements ProxyHandler<DebugFlags> {\n  private getRecordList(): DebugFlags[] {\n    return [...debugFlagsOverridesCB?.() ?? [], localDebugFlags, globalDebugFlags];\n  }\n\n  get(target: DebugFlags, p: string) {\n    for (const record of this.getRecordList())\n      if (p in record && typeof record[p] !== \"undefined\")\n        return record[p];\n    return undefined;\n  }\n  has(target: DebugFlags, p: string): boolean {\n    return this.get(target, p) !== undefined;\n  }\n  ownKeys(target: DebugFlags): Array<string | symbol> {\n    const keys = new Array<string | symbol>;\n    for (const record of this.getRecordList())\n      for (const key of Reflect.ownKeys(record))\n        if (typeof key === \"string\" && record[key] !== undefined && !keys.includes(key))\n          keys.push(key);\n    return keys;\n  }\n  set(target: DebugFlags, p: string, newValue: boolean | undefined): boolean {\n    const toModify = this.getRecordList()[0];\n    if (typeof newValue === \"boolean\")\n      toModify[p] = newValue;\n    else\n      delete toModify[p];\n\n    runSettingsCallbacks();\n    return true;\n  }\n  deleteProperty(target: DebugFlags, p: string): boolean {\n    const toModify = this.getRecordList()[0];\n    delete toModify[p];\n\n    runSettingsCallbacks();\n    return true;\n  }\n  getOwnPropertyDescriptor(target: DebugFlags, p: string): PropertyDescriptor | undefined {\n    const value = this.get(target, p);\n    return value !== undefined ? { enumerable: true, value, configurable: true } : undefined;\n  }\n}\n\nexport const debugFlags = new Proxy<DebugFlags>({\n  [Symbol.for('nodejs.util.inspect.custom')]: formatForConsoleLogs\n}, new DebugFlagsProxyHandler());\n\nfunction formatForConsoleLogs() {\n  return `DebugFlags [${[...Object.keys(debugFlags)].filter(key => debugFlags[key]).join(\", \")}]`;\n}\n\nfunction runSettingsCallbacks() {\n  for (const cb of [...settingschangedcallbacks]) {\n    try {\n      cb();\n    } catch (e) {\n      console.error(\"Error invoking settings change callback\", cb?.name, e);\n      //ignore, debugFlags can change due to external updates so they're basically signal handlers and there's no real point in crashing whatever was really running\n    }\n  }\n}\n\n/** Update the debugconfig as present in the system configuration record\n    @param settings - debugconfig cell of the system configuration record\n*/\nexport function updateDebugConfig(settings: DebugConfig | null) {\n  const oldenabledflags = Object.keys(globalDebugFlags).sort();\n  const newenabledflags = settings?.tags ? [...settings.tags].sort() : [];\n\n  if (oldenabledflags.join(\",\") !== newenabledflags.join(\",\")) {\n    for (const flag of newenabledflags)\n      globalDebugFlags[flag] = true;\n    for (const flag of oldenabledflags)\n      if (!newenabledflags.includes(flag))\n        delete globalDebugFlags[flag];\n\n    runSettingsCallbacks();\n  }\n  if (debugFlags.async && Error.stackTraceLimit < 100)\n    Error.stackTraceLimit = 100;\n}\n\nexport function registerDebugConfigChangedCallback(cb: () => void) {\n  settingschangedcallbacks.push(cb);\n}\n\nexport function updateLocalDebugFlags(mode: \"enable\" | \"disable\" | \"clear\", flags: string[]): DebugFlags {\n  switch (mode) {\n    case \"enable\":\n    case \"disable\":\n      for (const flag of flags)\n        localDebugFlags[flag] = mode === \"enable\";\n      break;\n    case \"clear\":\n      for (const flag of Object.keys(localDebugFlags))\n        delete localDebugFlags[flag];\n  }\n  runSettingsCallbacks();\n  return { ...globalDebugFlags, ...localDebugFlags };\n}\n\n/** DTAP stage set for this WebHare */\nlet dtapStage: DTAPStage = \"production\";\n\n/** @deprecated We now recommend checking dtapStage against production/acceptance Explicitly */\nlet isLive: boolean = dtapStage === \"production\" || dtapStage === \"acceptance\";\n\n/** The backend base URL. Used for eg. autoconfiguring JSON/RPC */\nlet backendBase = \"\";\n\n/** The global assetbase */\nlet assetBase: string | null = null;\n\n//deprecated variants\n/** @deprecated For WH5.4 and up use 'dtapStage' */\nlet dtapstage: DTAPStage = dtapStage;\n/** @deprecated For WH5.4 and up compare 'dtapStage' for production or acceptance */\nlet islive: boolean = isLive;\n\nlet hooks: EnvHooks | undefined;\nlet hookFactory: (() => EnvHooks) | undefined;\nlet gotHooks = false;\n\nexport function initEnv(setDtapStage: DTAPStage, setBackendBase: string) {\n  dtapStage = setDtapStage;\n  isLive = dtapStage === \"production\" || dtapStage === \"acceptance\";\n  backendBase = setBackendBase;\n\n  dtapstage = dtapStage;\n  islive = isLive;\n}\n\nexport function setEnvHooksFactory(newHookFactory: () => EnvHooks) {\n  if (gotHooks)\n    throw new Error(`The call to setEnvHooksFactory was too late - hooks have already been retrieved once`);\n  hookFactory = newHookFactory;\n}\n\nexport function getEnvHooks() {\n  gotHooks = true;\n  return hookFactory?.();\n}\n\nfunction ensureHooks(): EnvHooks {\n  return hooks ??= getEnvHooks?.() ?? {\n    currentAssetBase: (newAssetBase) => {\n      if (newAssetBase !== undefined)\n        assetBase = newAssetBase;\n      return assetBase;\n    }\n  };\n}\n\n/** Get the base url for assets. This may point towards eg. a CDN\n * @returns The base url for assets, ending with a '/'. null if not set\n */\nexport function getAssetBase(): string | null {\n  return ensureHooks().currentAssetBase();\n}\n\n/** Get the base url for a module's public assets (those located in the module's `public` folder)\n */\nexport function getModulePublicAssetBase(module: string) {\n  return `${getAssetBase() || \"/\"}.wh/mod/${encodeURIComponent(module)}/public/`;\n}\n\n/** Set the base url for assets */\nexport function setAssetBase(base: string | null): void {\n  if (base && !base.endsWith(\"/\"))\n    throw new Error(`Asset base must end with a '/'`);\n\n  ensureHooks().currentAssetBase(base);\n}\n\nexport { dtapStage, isLive, backendBase, localDebugFlags };\nexport { dtapstage, islive }; //deprecated variants\n","\n//Note that @webhare/env does not invoke this API itself. In WebHare @webhare/frontend/src/init uses this to initialize\nexport function getBrowserDebugFlags(varname: string): string[] {\n  const flags = [];\n  const urldebugvar = new URL(location.href).searchParams.get(varname);\n  if (urldebugvar)\n    flags.push(...urldebugvar.split(','));\n\n  //not importing getCookie to solve some import ordering issues\n  if (typeof document !== \"undefined\") { //'document' is undefined in a worker but assetpacks compiled for a ServiceWorker will also load us\n    const debugcookie = document.cookie.match(`(?:^|;)\\\\s*${varname}=([^;]*)`); //TODO escape varname\n    if (debugcookie) {\n      const debugcookievalue = decodeURIComponent(debugcookie[1]);\n      if (debugcookievalue)\n        flags.push(... (debugcookievalue.split('.').filter(flag => !flag.startsWith('sig='))));\n    }\n  }\n\n  if (typeof sessionStorage !== \"undefined\") {\n    const sessionDebug = sessionStorage.getItem(varname);\n    if (sessionDebug)\n      flags.push(...sessionDebug.split(','));\n  }\n\n  return flags;\n}\n","/** Rect describing an elements position */\nexport type Rect = {\n  top: number;\n  bottom: number;\n  left: number;\n  right: number;\n  width: number;\n  height: number;\n};\n\n/** Elements you can set a value on and would have to trigger change and/or input events */\nexport type FormControlElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\n/** Types that support querySelector(All) */\ntype QuerySelectorAble = ParentNode | ShadowRoot;\n\nexport function qS<E extends Element = HTMLElement>(startnode: QuerySelectorAble, selector: string): E | null;\nexport function qS<E extends Element = HTMLElement>(selector: string): E | null;\n\n/** Match the first element using a CSS selector\n * @param node_or_selector - The starting node or selector\n * @param selector - The selector to match if the starting node was specified\n * @returns The first matching element or null\n */\nexport function qS<E extends Element>(node_or_selector: QuerySelectorAble | string, selector?: string): E | null {\n  if (typeof node_or_selector === 'string')\n    return document.querySelector<E>(node_or_selector);\n  else if (selector)\n    return node_or_selector.querySelector<E>(selector);\n  return null;\n}\n\n\nexport function qR<E extends Element = HTMLElement>(startnode: QuerySelectorAble, selector: string): E;\nexport function qR<E extends Element = HTMLElement>(selector: string): E;\n\n/** Match a specific element using a CSS selector, requiring it to exist and be unique\n * @param node_or_selector - The starting node or selector\n * @param selector - The selector to match if the starting node was specified\n * @returns The requested element. Throw it the selector doesn't match exactly one element\n */\nexport function qR<E extends Element>(node_or_selector: QuerySelectorAble | string, selector?: string): E {\n  const matches = qSA<E>(node_or_selector as QuerySelectorAble, selector as string);\n  if (matches.length === 1)\n    return matches[0];\n\n  if (typeof node_or_selector !== 'string') {\n    console.error(`${matches.length} elements match selector \\`${selector}\\` with startingpoint`, node_or_selector, matches);\n    throw new Error(`${matches.length} elements match selector \\`${selector}\\` given startingpoint '${node_or_selector.nodeName}'`);\n  } else {\n    console.error(`${matches.length} elements match selector \\`${node_or_selector}\\` in the document`, matches);\n    throw new Error(`${matches.length} elements match selector \\`${node_or_selector}\\` in the document`);\n  }\n}\n\nexport function qSA<E extends Element = HTMLElement>(startnode: QuerySelectorAble, selector: string): E[];\nexport function qSA<E extends Element = HTMLElement>(selector: string): E[];\n\n/** Find multiple elements using a CSS selector\n * @param node_or_selector - The starting node or selector\n * @param selector - The selector to match if the starting node was specified\n * @returns The requested elements.\n */\nexport function qSA<E extends Element>(node_or_selector: QuerySelectorAble | string, selector?: string): E[] {\n  if (typeof node_or_selector === 'string')\n    return Array.from(document.querySelectorAll(node_or_selector));\n  else if (selector)\n    return Array.from(node_or_selector.querySelectorAll(selector));\n\n  return [];\n}\n\n/** Return whether the passed element is a FormControlElement */\nexport function isFormControl(field: Element): field is FormControlElement {\n  return isHTMLElement(field) && [\"INPUT\", \"SELECT\", \"TEXTAREA\"].includes(field.tagName);\n}\n\n/** Return whether the passed element is an editable text field */\nexport function isEditControl(field: Element): field is HTMLElement {\n  return isHTMLElement(field) && ([\"INPUT\", \"TEXTAREA\"].includes(field.tagName) || field.isContentEditable);\n}\n\n/** Test whether node is an Element, even if it's in a different iframe */\nexport function isElement(node: unknown): node is Element {\n  //TODO What is actually going on if defaultView is missing?\n  if (!node || typeof node !== \"object\")\n    return false;\n\n  /* Getting the proto doesn't always work:\n  const proto = (node as Element).ownerDocument.defaultView?.Element;\n  (because our iframes derive off about? not sure) so until someone finds the real answer, we'll do a heuristic\n  */\n\n  /** Analyzing node.constructor.name doesn't work because custom elements don't necessarily have their constructor's name ending in Element\n  return Boolean(\"ownerDocument\" in node && node.constructor.name.match(/Element$/));\n  */\n\n  return Boolean(\"ownerDocument\" in node && (node as Element).nodeType === 1);\n\n}\n\n/** Test whether node is a HTMLElement, even if it's in a different iframe */\nexport function isHTMLElement(node: unknown): node is HTMLElement {\n  return isElement(node) && node.namespaceURI === \"http://www.w3.org/1999/xhtml\";\n}\n\n/** Test whether node is a SVGElement, even if it's in a different iframe */\nexport function isSVGElement(node: unknown): node is SVGElement {\n  return isElement(node) && node.namespaceURI === \"http://www.w3.org/2000/svg\";\n}\n\n/**\n * get the relative bound difference between two elements, and return a writable copy\n *\n * @param node - The node for which you need coordinates\n * @param relativeto - Optional reference point. If not set, you just get a 'normal' coordinate object\n */\nexport function getRelativeBounds(node: Element, relativeto?: Element): Rect {\n  if (!relativeto)\n    relativeto = node.ownerDocument.documentElement;\n\n  const nodecoords = node.getBoundingClientRect();\n  const relcoords = relativeto.getBoundingClientRect();\n  return {\n    top: nodecoords.top - relcoords.top,\n    left: nodecoords.left - relcoords.left,\n    right: nodecoords.right - relcoords.left,\n    bottom: nodecoords.bottom - relcoords.top,\n    width: nodecoords.width,\n    height: nodecoords.height\n  };\n}\n\nexport type ParsedLanguageTag = {\n  /** The full tag, eg en-US */\n  tag: string;\n  /** The language code, eg 'en' */\n  language: string;\n  region?: string;\n  /** The script, eg 'Hant' */\n  script?: string;\n};\n\n/** Parse a BCP47 language tag */\nexport function parseLanguageTag(languageTag: string): ParsedLanguageTag {\n  /* https://datatracker.ietf.org/doc/html/rfc5646#section-2.1\n     langtag       = language\n                 [\"-\" script]\n                 [\"-\" region]\n                 *(\"-\" variant)\n                 *(\"-\" extension)\n                 [\"-\" privateuse]\n     BUT: we're limiting ourselves to language, script and region for now\n\n     language      = 2*3ALPHA           ; shortest ISO 639 code\n                    [\"-\" extlang]       ; sometimes followed by\n                                          extended language subtags\n\n                                           extlang       = 3ALPHA              ; selected ISO 639 codes\n                 *2(\"-\" 3ALPHA)      ; permanently reserved\n\n      script        = 4ALPHA              ; ISO 15924 code\n\n      region        = 2ALPHA              ; ISO 3166-1 code\n                    / 3DIGIT              ; UN M.49 code\n\n     Note that we're not yet fully implementing the spec, just the parts we expect to encounter in practice\n  */\n  const match = languageTag.match(/^([a-z]{2,}(-[a-z]{3})?)(-[A-Za-z]{4,})?(-[A-Z]{2}|-\\d{3})?$/);\n  if (!match)\n    throw new Error(`Invalid language tag: ${languageTag}`);\n\n  return {\n    tag: languageTag,\n    language: match[1],\n    ...(match[3] ? { script: match[3].substring(1) } : {}),\n    ...(match[4] ? { region: match[4].substring(1) } : {})\n  };\n}\n\n/** Get the effective language for an element (or the document)\n * @param node - The element for which to get the effective language. If not specified, the documentElement and finally the browser is used\n * @returns The language code, eg. \"nl\" or \"en-GB\"\n */\nexport function getLang(node?: Element): ParsedLanguageTag {\n  if (!node && typeof document !== \"undefined\")\n    node = document.documentElement;\n  const tag = (node?.closest('[lang]')?.getAttribute(\"lang\") || navigator.language || \"en\");\n  return parseLanguageTag(tag);\n}\n","//TODO can we replace ourselves with nodejs util.types in a pure NodeJS environment?\n\nimport type { Money } from \"./money.ts\";\n\nexport function getWHType(obj: unknown): string | null { //not exporting this directly as we hope JS comes up with better solutions for instanceOf not being compatible with realms/reloading\n  // Ideally we'd use symbol but it breaks tree shaking in esbuild, so this is our workaround. Reported as https://github.com/evanw/esbuild/issues/3940\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- Can't cleanly type this it seems and it's low level anyway\n  return (obj as any)?.constructor?.[\"__ $whTypeSymbol\"] ?? null;\n}\n\nfunction isCrossRealm(value: unknown): value is object {\n  return Boolean(value // it's not null\n    && typeof value === \"object\" //and it's an object\n    && !(value instanceof Object)); //and it's not an instance of our Object\n}\n\n/** Test whether a value looks like an instance of Money */\nexport function isMoney(value: unknown): value is Money {\n  return getWHType(value) === \"Money\";\n}\n\n/** Test whether a value looks like an instance of Temporal.Instant */\nexport function isTemporalInstant(value: unknown): value is Temporal.Instant {\n  return Boolean(value && typeof value === \"object\" && Symbol.toStringTag in value && value?.[Symbol.toStringTag] === 'Temporal.Instant');\n}\n\n/** Test whether a value looks like an instance of Temporal.PlainDateTime */\nexport function isTemporalPlainDateTime(value: unknown): value is Temporal.PlainDateTime {\n  return Boolean(value && typeof value === \"object\" && Symbol.toStringTag in value && value?.[Symbol.toStringTag] === 'Temporal.PlainDateTime');\n}\n\n/** Test whether a value looks like an instance of Temporal.PlainDate */\nexport function isTemporalPlainDate(value: unknown): value is Temporal.PlainDate {\n  return Boolean(value && typeof value === \"object\" && Symbol.toStringTag in value && value?.[Symbol.toStringTag] === 'Temporal.PlainDate');\n}\n\n/** Test whether a value looks like an instance of Temporal.PlainTime */\nexport function isTemporalPlainTime(value: unknown): value is Temporal.PlainTime {\n  return Boolean(value && typeof value === \"object\" && Symbol.toStringTag in value && value?.[Symbol.toStringTag] === 'Temporal.PlainTime');\n}\n\n/** Test whether a value looks like an instance of Temporal.ZonedDateTime */\nexport function isTemporalZonedDateTime(value: unknown): value is Temporal.ZonedDateTime {\n  return Boolean(value && typeof value === \"object\" && Symbol.toStringTag in value && value?.[Symbol.toStringTag] === 'Temporal.ZonedDateTime');\n}\n\n/** Test whether a value looks like an instance of Date (assumes no subclasses) */\nexport function isDate(value: unknown): value is Date {\n  return value instanceof Date || (isCrossRealm(value) && value.constructor.name === \"Date\");\n}\n\n/** Test whether a value appears to implement the Blob interface */\nexport function isBlob(value: unknown): value is Blob {\n  return value instanceof Blob || Boolean(value && typeof value === \"object\" && \"size\" in value && \"type\" in value && \"slice\" in value && typeof value.slice === \"function\" && \"stream\" in value && typeof value.stream === \"function\");\n}\n\n/** Test whether a value appears to implement the File interface */\nexport function isFile(value: unknown): value is File {\n  return isBlob(value) && \"name\" in value;\n}\n\n/** Check if the object is probably an Error object. Can't use 'instanceof Error' as an Error might come from a different frame */\nexport function isError(e: unknown): e is Error {\n  return e instanceof Error || (isCrossRealm(e) && \"name\" in e && \"stack\" in e && \"message\" in e);\n}\n\n/** Check if the object looks like a promise */\nexport function isPromise<T>(e: T | Promise<T>): e is Promise<Awaited<T>> {\n  return Boolean(e && typeof (e as Promise<unknown>).then === \"function\" && typeof (e as Promise<unknown>).catch === \"function\");\n}\n\n/** Check the type of a value, return its JS or STD type\n * @param value - The value to check\n * @returns The type of the value. If the value is an object but recognized as any of Money, Date, Blob, Temporal.Instant/PlainDate/PlainDateTime, that type is returned.\n */\nexport function stdTypeOf(value: unknown): \"string\" | \"number\" | \"boolean\" | \"null\" | \"symbol\" | \"bigint\" | \"function\" | \"object\" | \"undefined\" | \"Date\" | \"Money\" | \"Array\" | \"Instant\" | \"PlainDate\" | \"PlainDateTime\" | \"PlainTime\" | \"ZonedDateTime\" | \"File\" | \"Blob\" {\n  const t = typeof value;\n  if (t === \"object\") {\n    if (!value)\n      return \"null\";\n    if (Array.isArray(value))\n      return \"Array\";\n    if (isMoney(value))\n      return \"Money\";\n    if (isBlob(value))\n      return isFile(value) ? \"File\" : \"Blob\";\n    if (isDate(value))\n      return \"Date\";\n    if (isTemporalInstant(value))\n      return \"Instant\";\n    if (isTemporalPlainTime(value))\n      return \"PlainTime\";\n    if (isTemporalPlainDate(value))\n      return \"PlainDate\";\n    if (isTemporalPlainDateTime(value))\n      return \"PlainDateTime\";\n    if (isTemporalZonedDateTime(value))\n      return \"ZonedDateTime\";\n  }\n  return t;\n}\n","/* A math library for safe calculation with money amounts in JS. If you don't\n   know why we need this, try to predict what the following code would print:\n   var cents=0;for(var i=0;i<100;++i)cents+=0.01;cents-=1;console.log(cents);\n   and think twice about whether you want to code anything financial in JS.\n\n   Money values supplied from HareScript should be formatted using FormatJSFinmathMoney\n*/\n\nexport type FinmathInput = string | number;\n\nexport type RoundMode = \"none\" | \"toward-zero\" | \"down\" | \"up\" | \"half-toward-zero\" | \"half-down\" | \"half-up\" | \"toward-infinity\" | \"half-toward-infinity\";\n\nexport interface SplitNumber {\n  num: number;\n  decimals: number;\n}\n\n//a 'price' is a string of the form \"nnn[.NNNN]\"\n\nfunction stripUnneededDecimals(num: number, decimals: number) {\n  //we have a maximum of 5 digits of external precision\n  if (decimals > 5) {\n    // math.round rounds toward positive infinity\n    const isneg = num < 0;\n    if (isneg)\n      num = -num;\n\n    while (decimals > 6) { //truncate excess digits\n      num = Math.floor(num / 10);\n      --decimals;\n    }\n    //round up if 6th decimal >= 5\n    num = Math.round(num / 10);\n    decimals = 5;\n\n    if (isneg)\n      num = -num;\n  }\n\n  //strip unneeded decimals\n  while (decimals > 0 && !(num % 10)) {\n    num /= 10;\n    --decimals;\n  }\n\n  return { num, decimals };\n}\n\nfunction toText(amount: SplitNumber, decimalpoint: string, mindecimals: number) {\n  if (!Number.isSafeInteger(amount.num))\n    throw new Error(\"Result would overflow the safe value range\");\n\n  let num, decimals;\n  ({ num, decimals } = stripUnneededDecimals(amount.num, amount.decimals));\n\n  // Strip sign from number, may need to prefix it\n  const isnegative = num < 0;\n  if (isnegative)\n    num = -num;\n\n  let astext = String(num);\n\n  // Ensure we have enough leading 0's to render the first integer digit\n  if (astext.length <= decimals)\n    astext = '00000000000000000000'.substr(0, decimals + 1 - astext.length) + astext;\n  // make sure we have enough 0's to show mindecimals\n  if (decimals < mindecimals) {\n    astext += '00000000000000000000'.substr(0, mindecimals - decimals);\n    decimals = mindecimals;\n  }\n\n  // insert decimal point if needed\n  if (decimals)\n    astext = astext.substr(0, astext.length - decimals) + decimalpoint + astext.substr(-decimals);\n\n  // add sign if needed\n  astext = (isnegative ? \"-\" : \"\") + astext;\n  return astext;\n}\n\n/** Convert a money of any format to a split number object\n    @param money - Either an integer number or string with a number\n    @returns Split number object\n*/\nfunction splitValue(money: FinmathInput): SplitNumber {\n  if (typeof money === 'number') {\n    if (money !== Math.floor(money))\n      throw new Error(\"Non-integer number passed\");\n    if (!Number.isSafeInteger(money))\n      throw new Error(`The value ${money} is outside the safe value range`);\n    return { num: money, decimals: 0 };\n  }\n  if (typeof money !== 'string')\n    throw new Error(\"Number or string expected, got \" + money);\n\n  const split = money.match(/^(-)?([0-9]*)(\\.([0-9]{0,5})([0-9]*))?$/);\n  if (!split)\n    throw new Error(`Illegal money value received: '${money}'`);\n\n  const sign = split[1] === '-' ? -1 : 1;\n  const decimals = split[3] ? split[4].length : 0;\n  // If there are more than 5 decimals, round up (using halfExpand strategy)\n  const num = sign * (parseInt(split[2] || \"0\") * Math.pow(10, decimals) + (parseInt((split[4] || '')) || 0) + (split[5]?.[0] >= '5' ? 1 : 0));\n  if (!Number.isSafeInteger(num))\n    throw new Error(`The value '${money}' is outside the safe value range`);\n\n  return stripUnneededDecimals(num, decimals);\n}\n\n/** Convert split number into a string\n*/\nfunction joinPrice(parts: SplitNumber): string {\n  return toText(parts, '.', 0);\n}\n\nfunction adjustDecimals(amount: SplitNumber, requiredecimals: number) {\n  const toadd = requiredecimals - amount.decimals;\n  if (toadd <= 0)\n    return;\n\n  let multiplier = 1;\n  for (let idx = 0; idx < toadd; ++idx)\n    multiplier *= 10;\n\n  if (!Number.isSafeInteger(amount.num * multiplier))\n    throw new Error(\"adjustDecimals would overflow the safe value range\");\n\n  amount.num *= multiplier;\n  amount.decimals += toadd;\n}\n\n/** Returns if a price string is valid\n*/\nexport function isValidPrice(money: string) {\n  if (typeof money !== 'string' || !money.match(/[0-9]+(\\.[0-9]{0,5})?$/))\n    return false;\n  return true;\n}\n\nfunction __add(lhs: SplitNumber, rhs: SplitNumber) {\n  //equalize # of decimals, and then it's a simple addition\n  const requiredecimals = Math.max(lhs.decimals, rhs.decimals);\n  adjustDecimals(lhs, requiredecimals);\n  adjustDecimals(rhs, requiredecimals);\n  return { num: lhs.num + rhs.num, decimals: requiredecimals };\n}\n\n/** Adds two numbers together\n*/\nexport function add(amount1: FinmathInput, amount2: FinmathInput): string {\n  return joinPrice(__add(splitValue(amount1), splitValue(amount2)));\n}\n\n/** Subtracts a number from another number\n*/\nexport function subtract(amount: FinmathInput, tosubtract: FinmathInput) {\n  const lhs = splitValue(amount), rhs = splitValue(tosubtract);\n  rhs.num = -rhs.num;\n  return joinPrice(__add(lhs, rhs));\n}\n\nfunction __multiply(lhs: SplitNumber, rhs: SplitNumber) {\n  //ADDME the naive 'add decimals, multiple nums' approach gets you out of the safe range real fast. needs tests\n  return { num: lhs.num * rhs.num, decimals: lhs.decimals + rhs.decimals };\n}\n\n/** Multiplies two numbers together\n*/\nexport function multiply(amount1: FinmathInput, amount2: FinmathInput): string {\n  const lhs = splitValue(amount1), rhs = splitValue(amount2);\n  return joinPrice(__multiply(lhs, rhs));\n}\n\n/** Compares two numbers\n    @param amount1 - Left hand value\n    @param amount2 - Right hand value\n    @returns Returns 0 if amount1 === amount2, -1 if amount1 \\< amount2, 1 if amount1 \\> amount2\n*/\nexport function cmp(amount1: FinmathInput, amount2: FinmathInput) {\n  const diff = __add(splitValue(amount1), __multiply(splitValue(amount2), { num: -1, decimals: 0 }));\n  return diff.num < 0 ? -1 : diff.num === 0 ? 0 : 1;\n}\n\n/** Returns a percentage of an amount\n    @param amount - Original amount\n    @param perc - Percentage of the amount to return\n    @returns Percentage of the amount\n*/\nexport function getPercentageOfAmount(amount: FinmathInput, perc: FinmathInput) {\n  const lhs = splitValue(amount), rhs = splitValue(perc);\n  const result = __multiply(lhs, rhs);\n  result.decimals += 2;\n  return joinPrice(normalize(result));\n}\n\nfunction normalize(amount: SplitNumber) {\n  while (amount.decimals && (amount.num % 10) === 0) {\n    amount.num /= 10;\n    --amount.decimals;\n  }\n  return amount;\n}\n\n/// format a price amount. extend # of decimals to specified # if not enough\nexport function formatPrice(money: FinmathInput, decimalpoint: string, decimals: number) {\n  return toText(splitValue(money), decimalpoint, decimals);\n}\n\n/** Rounds integer to multiple, exposed for testing only\n*/\nexport function __roundIntegerToMultiple(value: number, roundunit: number, mode: RoundMode) {\n  switch (mode) {\n    case \"none\":\n      {\n        // no rounding\n      } break;\n    case \"toward-zero\":\n      {\n        value = Math.trunc(value / roundunit) * roundunit;\n      } break;\n    case \"toward-infinity\":\n      {\n        if (value > 0)\n          value = Math.trunc((value + roundunit - 1) / roundunit) * roundunit;\n        else\n          value = Math.trunc((value - roundunit + 1) / roundunit) * roundunit;\n      } break;\n    case \"down\":\n      {\n        if (value > 0)\n          value = Math.trunc(value / roundunit) * roundunit;\n        else\n          value = Math.trunc((value - roundunit + 1) / roundunit) * roundunit;\n      } break;\n    case \"up\":\n      {\n        if (value > 0)\n          value = Math.trunc((value + roundunit - 1) / roundunit) * roundunit;\n        else\n          value = Math.trunc(value / roundunit) * roundunit;\n      } break;\n    case \"half-toward-zero\":\n      {\n        if (value > 0)\n          value = Math.trunc((value + (roundunit - 1) / 2) / roundunit) * roundunit;\n        else\n          value = Math.trunc((value - (roundunit - 1) / 2) / roundunit) * roundunit;\n      } break;\n    case \"half-toward-infinity\":\n      {\n        if (value > 0)\n          value = Math.trunc((value + roundunit / 2) / roundunit) * roundunit;\n        else\n          value = Math.trunc((value - roundunit / 2) / roundunit) * roundunit;\n      } break;\n    case \"half-down\":\n      {\n        if (value > 0)\n          value = Math.trunc((value + (roundunit - 1) / 2) / roundunit) * roundunit;\n        else\n          value = Math.trunc((value - roundunit / 2) / roundunit) * roundunit;\n      } break;\n    case \"half-up\":\n      {\n        if (value > 0)\n          value = Math.trunc((value + roundunit / 2) / roundunit) * roundunit;\n        else\n          value = Math.trunc((value - (roundunit - 1) / 2) / roundunit) * roundunit;\n      } break;\n    default:\n      {\n        throw new Error(`Unknown rounding mode ${mode}`);\n      }\n  }\n  return value;\n}\n\n/** Rounds a value to a multiple of a unit, with a specific rounding mode\n    @param value - Value to round\n    @param unit - The value will be rounded to a mulitple of this unit (except when rounding mode is 'none')\n    @param mode - Rounding mode. Possible values:\n      <ul>\n        <li>none: No rounding</li>\n        <li>toward-zero: Round toward zero</li>\n        <li>down: Round toward negative infity</li>\n        <li>up: Round toward positive infity</li>\n        <li>half-toward-zero: Round nearest multiple, round half of a multiple toward zero</li>\n        <li>half-down: Round nearest multiple, round half of a multiple toward negative infinity</li>\n        <li>half-up: Round nearest multiple, round half of a multiple toward positive infity</li>\n      </ul>\n    @returns The rounded value\n*/\nexport function roundToMultiple(value: FinmathInput, unit: FinmathInput, mode: RoundMode) {\n  const split_value = splitValue(value);\n  const split_unit = splitValue(unit);\n\n  const requiredecimals = Math.max(split_value.decimals, split_unit.decimals);\n  adjustDecimals(split_value, requiredecimals);\n  adjustDecimals(split_unit, requiredecimals);\n\n  const result = { num: __roundIntegerToMultiple(split_value.num, split_unit.num, mode), decimals: split_value.decimals };\n  return joinPrice(result);\n}\n\n/** Returns the minimum of all the arguments\n    @param amount - First value\n    @param amounts - Rest of the values\n    @returns The lowest value among amount and amounts\n*/\nexport function min(amount: FinmathInput, ...amounts: FinmathInput[]) {\n  for (const val of amounts)\n    if (cmp(amount, val) > 0)\n      amount = val;\n  return joinPrice(splitValue(amount));\n}\n\n/** Returns the maximum of all the arguments\n    @param amount - First value\n    @param amounts - Rest of the values\n    @returns The highest value among amount and amounts\n*/\nexport function max(amount: FinmathInput, ...amounts: FinmathInput[]) {\n  for (const val of amounts)\n    if (cmp(amount, val) < 0)\n      amount = val;\n  return joinPrice(splitValue(amount));\n}\n\n/** Returns a power of 10\n    @param exp - Integer power, must be 0 or bigger\n    @returns Requested power of 10\n*/\nfunction getNonNegativePowerOf10(exp: number) {\n  let retval = 1, running_exp = 10;\n  while (exp) {\n    if (exp & 1)\n      retval *= running_exp;\n    running_exp *= running_exp;\n    exp = exp >> 1;\n  }\n  return retval;\n}\n\n/** Divides two values, with 5 decimals of precision\n    @param value - Value To divide\n    @param divisor - Divisor\n    @returns Divided value, with 5 decimals of precision\n*/\nexport function divide(value: FinmathInput, divisor: FinmathInput) {\n  const lhs = splitValue(value), rhs = splitValue(divisor);\n  const mul10exp = lhs.decimals - rhs.decimals - 5;\n  const mulfactor = mul10exp < 0 ? getNonNegativePowerOf10(-mul10exp) : 1;\n  const roundunit = mul10exp > 0 ? getNonNegativePowerOf10(mul10exp) : 1;\n  return joinPrice({ num: __roundIntegerToMultiple(mulfactor * lhs.num / rhs.num, roundunit, \"half-toward-infinity\"), decimals: 5 });\n}\n\nexport function moneyDivide(value: FinmathInput, divisor: FinmathInput) { //divide was added in 5.0. remove this old name eventually\n  return divide(value, divisor);\n}\n\n/** Test whether two values have a specific relation\n    @param lhs - Left hand value\n    @param relation - One of '\\<', '\\<=', '==', '!=', '\\>', '\\>=''\n    @param rhs - Right hand value\n    @returns TRUE if the relation holds\n    @example\n      console.log(finmath.test(1, '\\<', 2)); // prints 'true'\n*/\nexport function test(lhs: FinmathInput, relation: \"<\" | \"<=\" | \"==\" | \"!=\" | \">\" | \">=\", rhs: FinmathInput) {\n  const compareresult = cmp(lhs, rhs);\n  switch (relation) {\n    case '<': return compareresult < 0;\n    case '<=': return compareresult <= 0;\n    case '==': return compareresult === 0;\n    case '!=': return compareresult !== 0;\n    case '>': return compareresult > 0;\n    case '>=': return compareresult >= 0;\n  }\n  throw Error(`Cannot test for unknown relation '${relation}'`);\n}\n","/* A Money type library for safe calculation with money amounts in JS. If you don't\n   know why we need this, try to predict what the following code would print:\n   var cents=0;for(var i=0;i<100;++i)cents+=0.01;cents-=1;console.log(cents);\n   and think twice about whether you want to code anything financial in JS.\n\n   We haven't decideded yet what range Money should support. To keep our options open and keep HS compatbility for now\n   we will fix ourselves to 5 digits (HS compat) and not allow values bigger than 900_000_000 (2**53 / 100000 'number' compatbiility clamped to a more readable number)\n\n  Users should not rely on JS Money keeping this smaller range in the future. Money values supplied from HareScript should be formatted using FormatJSFinmathMoney\n*/\n\nimport * as finmath from \"./finmath.ts\"; //TODO absorb into us as soon as noone externally depends on finmath anymore\nimport { isMoney } from \"./quacks.ts\";\n\nexport type MoneyRoundingMode = \"none\" | \"toward-zero\" | \"down\" | \"up\" | \"half-toward-zero\" | \"half-down\" | \"half-up\" | \"toward-infinity\" | \"half-toward-infinity\";\nexport type MoneyTestTypes = \"<\" | \"<=\" | \"==\" | \"!=\" | \">\" | \">=\";\n\ntype MoneyParameter = Money | string;\n\ninterface SplitNumber {\n  num: number;\n  decimals: number;\n}\n\nexport interface MoneyFormatOptions {\n  //thousand separator. defaults to \"\"\n  thousandsSeparator?: string;\n  //decimal separator. defaults to \".\"\n  decimalSeparator?: string;\n  //minimum # of decimals. defaults to 2\n  minDecimals?: number;\n}\n\nfunction stripUnneededDecimals(num: number, decimals: number) {\n  //we have a maximum of 5 digits of external precision\n  if (decimals > 5) {\n    // math.round rounds toward positive infinity\n    const isneg = num < 0;\n    if (isneg)\n      num = -num;\n\n    while (decimals > 6) { //truncate excess digits\n      num = Math.floor(num / 10);\n      --decimals;\n    }\n    //round up if 6th decimal >= 5\n    num = Math.round(num / 10);\n    decimals = 5;\n\n    if (isneg)\n      num = -num;\n  }\n\n  //strip unneeded decimals\n  while (decimals > 0 && !(num % 10)) {\n    num /= 10;\n    --decimals;\n  }\n\n  return { num, decimals };\n}\n\n/** Convert a money of any format to a split number object\n    @param money - Either an integer number or string with a number\n    @returns Split number object\n*/\nfunction splitValue(money: MoneyParameter): SplitNumber {\n  if (typeof money === 'number') {\n    if (money !== Math.floor(money))\n      throw new Error(\"Non-integer number passed\");\n    if (!Number.isSafeInteger(money))\n      throw new Error(`The value ${money} is outside the safe value range`);\n    return { num: money, decimals: 0 };\n  }\n  if (typeof money !== 'string')\n    throw new Error(\"Number or string expected, got \" + money);\n\n  const split = money.match(/^(-)?([0-9]*)(\\.([0-9]{0,5})([0-9]*))?$/);\n  if (!split)\n    throw new Error(`Illegal money value received: '${money}'`);\n\n  const sign = split[1] === '-' ? -1 : 1;\n  const decimals = split[3] ? split[4].length : 0;\n  // If there are more than 5 decimals, round up (using halfExpand strategy)\n  const num = sign * (parseInt(split[2] || \"0\") * Math.pow(10, decimals) + (parseInt((split[4] || '')) || 0) + (split[5]?.[0] >= '5' ? 1 : 0));\n  if (!Number.isSafeInteger(num))\n    throw new Error(`The value '${money}' is outside the safe value range`);\n\n  return stripUnneededDecimals(num, decimals);\n}\n\nfunction toText(amount: SplitNumber, decimalpoint: string, mindecimals: number, thousandpoint: string) {\n  if (!Number.isSafeInteger(amount.num))\n    throw new Error(\"Result would overflow the safe value range\");\n\n  let { num, decimals } = stripUnneededDecimals(amount.num, amount.decimals);\n\n  // Strip sign from number, may need to prefix it\n  const isnegative = num < 0;\n  if (isnegative)\n    num = -num;\n\n  let astext = String(num);\n\n  // Ensure we have enough leading 0's to render the first integer digit\n  if (astext.length <= decimals)\n    astext = '00000000000000000000'.substring(0, decimals + 1 - astext.length) + astext;\n  // make sure we have enough 0's to show mindecimals\n  if (decimals < mindecimals) {\n    astext += '00000000000000000000'.substring(0, mindecimals - decimals);\n    decimals = mindecimals;\n  }\n\n  let beforepoint = astext.substring(0, astext.length - decimals);\n  const afterpoint = astext.substring(astext.length - decimals);\n\n  // Add thouands points if neeed\n  if (thousandpoint)\n    beforepoint = beforepoint.replaceAll(/\\B(?=(\\d{3})+(?!\\d))/g, thousandpoint);\n\n  return (isnegative ? \"-\" : \"\") + beforepoint + (afterpoint.length ? decimalpoint + afterpoint : \"\");\n}\n\n/** A decimal based JS money type*/\nexport class Money {\n  /** finmath-compatible value */\n  readonly value: string;\n  private static \"__ $whTypeSymbol\" = \"Money\";\n\n  constructor(value: MoneyParameter = \"0\") {\n    this.value = Money.parseParameter(value);\n\n    const intvalue = parseInt(this.value);\n    //We need the number to be in the safe range even after adding 5 decimals\n    if (intvalue <= (Number.MIN_SAFE_INTEGER / 100000) || intvalue >= (Number.MAX_SAFE_INTEGER / 100000))\n      throw new TypeError(`Money value '${value}' is out of range`);\n  }\n\n  private static parseParameter(param: MoneyParameter): string {\n    if (typeof param === \"string\")\n      return toText(splitValue(param), \".\", 0, \"\");\n    if (Money.isMoney(param))\n      return (param as unknown as { value: string }).value;\n\n    throw new TypeError(`Money cannot be constructed out of a value of type ${typeof param}`);\n  }\n\n  static isMoney(value: unknown): value is Money {\n    return isMoney(value);\n  }\n\n  static fromNumber(value: number): Money {\n    return new Money(String(value));\n  }\n\n  /** Adds numbers together\n  */\n  static add(left: MoneyParameter, ...right: MoneyParameter[]): Money {\n    let sum = Money.parseParameter(left);\n    for (const item of right)\n      sum = finmath.add(sum, Money.parseParameter(item));\n    return new Money(sum);\n  }\n\n  /** Subtracts a number from another number\n  */\n  static subtract(left: MoneyParameter, right: MoneyParameter): Money {\n    return new Money(finmath.subtract(Money.parseParameter(left), Money.parseParameter(right)));\n  }\n\n  /** Rounds a value to a multiple of a unit, with a specific rounding mode\n      @param amount - Value to round\n      @param roundto - The value will be rounded to a mulitple of this unit (except when rounding mode is 'none')\n      @param mode - Rounding mode. Possible values:<br>\n        <ul>\n          <li>none: No rounding</li>\n          <li>toward-zero: Round toward zero</li>\n          <li>down: Round toward negative infity</li>\n          <li>up: Round toward positive infity</li>\n          <li>half-toward-zero: Round nearest multiple, round half of a multiple toward zero</li>\n          <li>half-down: Round nearest multiple, round half of a multiple toward negative infinity</li>\n          <li>half-up: Round nearest multiple, round half of a multiple toward positive infity</li>\n        </ul>\n      @returns The rounded value\n  */\n  static roundToMultiple(amount: MoneyParameter, roundto: MoneyParameter, mode: MoneyRoundingMode): Money {\n    return new Money(finmath.roundToMultiple(Money.parseParameter(amount), Money.parseParameter(roundto), mode));\n  }\n\n  /** Compares two numbers\n      @param lhs - Left hand value\n      @param rhs - Right hand value\n      @returns Returns 0 if amount1 === amount2, -1 if amount1 \\< amount2, 1 if amount1 \\> amount2\n  */\n  static cmp(lhs: MoneyParameter, rhs: MoneyParameter): -1 | 0 | 1 {\n    return finmath.cmp(Money.parseParameter(lhs), Money.parseParameter(rhs));\n  }\n\n  /** Test whether two values have a specific relation\n      @param lhs - Left hand value\n      @param relation - One of '\\<', '\\<=', '==', '!=', '\\>', '\\>=''\n      @param rhs - Right hand value\n      @returns TRUE if the relation holds\n      @example\n        console.log(Money.check(1, '\\<', 2)); // prints 'true'\n  */\n  static check(lhs: MoneyParameter, relation: MoneyTestTypes, rhs: MoneyParameter): boolean {\n    return finmath.test(Money.parseParameter(lhs), relation, Money.parseParameter(rhs));\n  }\n\n  /** Multiplies two numbers together\n  */\n  static multiply(left: MoneyParameter, right: MoneyParameter): Money {\n    return new Money(finmath.multiply(Money.parseParameter(left), Money.parseParameter(right)));\n  }\n\n  /** Returns a percentage of an amount\n      @param amount - Original amount\n      @param percentage - Percentage of the amount to return\n      @returns Percentage of the amount\n  */\n  static getPercentage(amount: MoneyParameter, percentage: MoneyParameter): Money {\n    return new Money(finmath.getPercentageOfAmount(Money.parseParameter(amount), Money.parseParameter(percentage)));\n  }\n\n  /** Divides two values, (currently with up to 5 decimals of precision)\n      @param numerator - Value to divide\n      @param divisor - Divisor\n      @returns Divided value\n  */\n  static divide(numerator: MoneyParameter, divisor: MoneyParameter): Money {\n    return new Money(finmath.divide(Money.parseParameter(numerator), Money.parseParameter(divisor)));\n  }\n  /** Returns the minimum of all the arguments\n      @param amount - First value\n      @param amounts - Rest of the values\n      @returns The lowest value among amount and amounts\n  */\n  static min(amount: MoneyParameter, ...amounts: MoneyParameter[]): Money {\n    return new Money(finmath.min(Money.parseParameter(amount), ...(amounts.map(Money.parseParameter))));\n\n  }\n\n  /** Returns the maximum of all the arguments\n      @param amount - First value\n      @param amounts - Rest of the values\n      @returns The highest value among amount and amounts\n  */\n  static max(amount: MoneyParameter, ...amounts: MoneyParameter[]): Money {\n    return new Money(finmath.max(Money.parseParameter(amount), ...(amounts.map(Money.parseParameter))));\n  }\n\n  /** format a price amount. extend # of decimals to specified # if not enough */\n  format(format?: MoneyFormatOptions): string {\n    return toText(splitValue(this.value),\n      format?.decimalSeparator ?? \".\",\n      format?.minDecimals ?? 2,\n      format?.thousandsSeparator ?? \"\");\n  }\n\n  toJSON(): string {\n    return this.value;\n  }\n\n  toString(): string {\n    return this.value;\n  }\n\n  toNumber(): number {\n    return parseFloat(this.value);\n  }\n}\n","import { Money } from \"./money.ts\";\nimport { isBlob, isDate, isMoney, isPromise, isTemporalInstant, isTemporalPlainDate, isTemporalPlainDateTime, isTemporalPlainTime, isTemporalZonedDateTime, stdTypeOf } from \"./quacks.ts\";\n\n/// Returns T or a promise resolving to T\nexport type MaybePromise<T> = Promise<T> | T;\n\nexport type ComparableType = number | null | bigint | string | Date | Money | boolean | Uint8Array | Temporal.Instant | Temporal.PlainDate | Temporal.PlainTime | Temporal.ZonedDateTime;\n\ntype CamelCase<S extends string> = S extends `${infer P1}_${infer P2}${infer P3}`\n  ? `${Lowercase<P1>}${Uppercase<P2>}${CamelCase<P3>}`\n  : Lowercase<S>;\n\ntype KeysToCamelCase<T> = {\n  [K in keyof T as CamelCase<string & K>]: ToCamelCase<T[K]>;\n};\n\ntype CamelToSnakeCase<S extends string> = S extends `${infer T}${infer U}` ?\n  `${T extends Capitalize<T> ? \"_\" : \"\"}${Lowercase<T>}${CamelToSnakeCase<U>}` :\n  S;\n\ntype KeysToSnakeCase<T> = {\n  [K in keyof T as CamelToSnakeCase<string & K>]: ToSnakeCase<T[K]>\n};\n\ntype NonRecordTypes = Date | Money | Blob | Temporal.Instant | Temporal.PlainDate | Temporal.PlainDateTime | Temporal.ZonedDateTime;\n\nexport type ToSnakeCase<T> =\n  T extends unknown[] ? Array<ToSnakeCase<T[number]>> :\n  T extends NonRecordTypes ? T :\n  T extends object ? KeysToSnakeCase<T> :\n  T;\n\nexport type ToCamelCase<T> =\n  T extends unknown[] ? Array<ToCamelCase<T[number]>> :\n  T extends NonRecordTypes ? T :\n  T extends object ? KeysToCamelCase<T> :\n  T;\n\n/** Convert a snake_case_name to its corresponding camelCaseName\n * @param name - Name to convert\n * @returns Converted name\n*/\nexport function nameToCamelCase(name: string) {\n  return name.replaceAll(/_[a-z]/g, c => c[1].toUpperCase());\n}\n\n/** Convert a camelCaseName to corresponding snake_case_name\n * @param name - Name to convert\n * @returns Converted name\n*/\nexport function nameToSnakeCase(name: string) {\n  return name.replaceAll(/[A-Z]/g, c => '_' + c.toLowerCase());\n}\n\n/// Should we rewrite the key/values in this object?\nfunction recodeObject(inp: object) {\n  return !isDate(inp) && !isMoney(inp) && !isBlob(inp) && !isTemporalInstant(inp) && !isTemporalPlainDate(inp) && !isTemporalPlainDateTime(inp) && !isTemporalZonedDateTime(inp);\n}\n\nfunction recursiveToSnakeCase<T>(inp: T): ToSnakeCase<T> {\n  if (Array.isArray(inp))\n    return inp.map(toSnakeCase) as ToSnakeCase<T>;\n  if (inp && typeof inp === \"object\" && recodeObject(inp))\n    return Object.fromEntries(Object.entries(inp).map(([key, value]) => [nameToSnakeCase(key), recursiveToSnakeCase(value)])) as ToSnakeCase<T>;\n  return inp as ToSnakeCase<T>;\n}\n\nfunction recursiveToCamelCase<T>(inp: T): ToCamelCase<T> {\n  if (Array.isArray(inp))\n    return inp.map(toCamelCase) as ToCamelCase<T>;\n  if (inp && typeof inp === \"object\" && recodeObject(inp))\n    return Object.fromEntries(Object.entries(inp).map(([key, value]) => [nameToCamelCase(key), recursiveToCamelCase(value)])) as ToCamelCase<T>;\n  return inp as ToCamelCase<T>;\n}\n\n/** Convert all keys to camel case recursively\n * @param inp - Array or object to convert\n * @returns Converted object\n*/\nexport function toSnakeCase<T extends object | object[] | null | undefined>(inp: T): ToSnakeCase<T> {\n  return recursiveToSnakeCase(inp);\n}\n\n/** Convert all keys to snake case recursively\n * @param inp - Array or object to convert\n * @returns Converted object\n*/\nexport function toCamelCase<T extends object | object[] | null | undefined>(inp: T): ToCamelCase<T> {\n  return recursiveToCamelCase(inp);\n}\n\n// TODO make this a quack if we're sure Uint8array is what we want to support - this is here basically to give Buffer support to be compatible with hscompat' compare\nfunction isUInt8Array(value: unknown): value is Uint8Array {\n  return value !== null && typeof value === \"object\" && \"length\" in value && (value as Uint8Array).BYTES_PER_ELEMENT === 1;\n}\n\ntype AwaitedValues<T extends readonly unknown[]> = { -readonly [K in keyof T]: Awaited<T[K]> };\n\n/** Resolve an array of potential promises, returning an array with resolved results\n * @param array - Array of values or promises\n * @returns An array of resolved values, or a promise resolving to that array if any input was a promise\n*/\nexport function maybePromiseAll<const T extends readonly unknown[]>(array: T): MaybePromise<AwaitedValues<T>> {\n  const resolved: Array<Awaited<T[number]>> = [];\n  for (const item of array) {\n    if (isPromise(item))\n      return Promise.all(array) as Promise<AwaitedValues<T>>;\n    resolved.push(item as Awaited<T[number]>);\n  }\n  return resolved as AwaitedValues<T>;\n}\n\n/** Call a function on the value of a potential promise, return the result\n * @param value - Value or promise\n * @param cb - Callback to call on the value\n * @returns The result of the callback, or a promise resolving to that result if the input was a promise\n*/\nexport function mapMaybePromise<T, U>(value: T, cb: (arg: Awaited<T>) => U): U | Promise<U> {\n  return isPromise(value) ? value.then(t => cb(t as Awaited<T>)) : cb(value as Awaited<T>);\n}\n\n/** Compare two values of std-supported types\n * @param left - First value\n * @param right - Second value\n * @returns -1 if left \\< right, 0 if equal, 1 if left \\> right\n */\nexport function compare(left: ComparableType, right: ComparableType): -1 | 0 | 1 {\n  if (left === null)\n    return right === null ? 0 : -1;\n  else if (right === null)\n    return 1;\n\n  switch (typeof left) {\n    case \"boolean\": {\n      if (typeof right === \"boolean\")\n        return left !== right ? left < right ? -1 : 1 : 0;\n    } break;\n    case \"number\": {\n      switch (typeof right) {\n        case \"bigint\": {\n          const right_number = Number(right);\n          return left !== right_number ? left < right_number ? -1 : 1 : 0;\n        }\n        case \"number\": {\n          return left !== right ? left < right ? -1 : 1 : 0;\n        }\n        case \"object\": {\n          if (Money.isMoney(right))\n            return Money.cmp(left.toString(), right);\n        }\n      }\n    } break;\n    case \"bigint\": {\n      switch (typeof right) {\n        case \"bigint\": {\n          return left !== right ? left < right ? -1 : 1 : 0;\n        }\n        case \"number\": {\n          const left_number = Number(left);\n          return left_number !== right ? left_number < right ? -1 : 1 : 0;\n        }\n        case \"object\": {\n          if (Money.isMoney(right)) {\n            return Money.cmp(left.toString(), right);\n          }\n        }\n      }\n    } break;\n    case \"string\": {\n      if (typeof right === \"string\")\n        return left === right ? 0 : left < right ? -1 : 1;\n    } break;\n    case \"object\": {\n      if (Money.isMoney(left)) {\n        switch (typeof right) {\n          case \"number\":\n          case \"bigint\":\n            return Money.cmp(left, right.toString());\n          case \"object\": {\n            if (right === null) {\n              return 1;\n            } else if (Money.isMoney(right))\n              return Money.cmp(left, right);\n          }\n        }\n      } else if (isDate(left)) {\n        if (isTemporalInstant(right)) {\n          const left_value = Number(left);\n          const right_value = right.epochMilliseconds;\n          return left_value !== right_value ? left_value < right_value ? -1 : 1 : 0;\n        } else if (isDate(right)) {\n          const left_value = Number(left);\n          const right_value = Number(right);\n          return left_value !== right_value ? left_value < right_value ? -1 : 1 : 0;\n        }\n      } else if (isUInt8Array(left) && isUInt8Array(right)) {\n        const compareLength = Math.min(left.length, right.length);\n        for (let i = 0; i < compareLength; i++) {\n          if (left[i] !== right[i])\n            return left[i] < right[i] ? -1 : 1;\n        }\n        return left.length !== right.length ? left.length < right.length ? -1 : 1 : 0;\n      } else if (isTemporalInstant(left)) {\n        if (isDate(right)) {\n          const left_value = left.epochMilliseconds;\n          const right_value = Number(right);\n          return left_value !== right_value ? left_value < right_value ? -1 : 1 : 0;\n        } else if (isTemporalInstant(right)) {\n          const left_value = left.epochMilliseconds;\n          const right_value = right.epochMilliseconds;\n          return left_value !== right_value ? left_value < right_value ? -1 : 1 : 0;\n        }\n      } else if (isTemporalPlainDate(left) && isTemporalPlainDate(right)) {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any -- we're not loading Temporal types when packaging @webhare/std separately\n        return (globalThis as any).Temporal.PlainDate.compare(left, right);\n      } else if (isTemporalPlainTime(left) && isTemporalPlainTime(right)) {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any -- we're not loading Temporal types when packaging @webhare/std separately\n        return (globalThis as any).Temporal.PlainTime.compare(left, right);\n      } else if (isTemporalZonedDateTime(left) && isTemporalZonedDateTime(right)) {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any -- we're not loading Temporal types when packaging @webhare/std separately\n        return (globalThis as any).Temporal.ZonedDateTime.compare(left, right);\n      }\n    } break;\n  }\n  throw new Error(`Cannot compare a ${stdTypeOf(left)} with a ${stdTypeOf(right)}`);\n}\n\n/** Returns all property keys of an object type whose value is comparable */\ntype ComparableFields<E extends object, K extends keyof E = keyof E> = K extends keyof E ? E[K] extends ComparableType ? K : never : never;\n\n/** Type of array elements for keys in `compareProperties` */\ntype ComparePropertiesArrayElement<E extends object> = ComparableFields<E> | [ComparableFields<E>, \"asc\" | \"desc\"];\n\n/** All possible types of object keys */\ntype AnyKey = string | symbol | number;\n\n/** Extracts the property name from an array element of CompareProperties */\ntype GetPropertyFromComparePropertiesArrayElement<T> = T extends AnyKey ? T : T extends [infer A, \"asc\" | \"desc\"] ? A : never;\n\n/** Get the list of properties referenced in the `compareProperties` keys list */\ntype GetPropertiesFromComparePropertiesKeys<K extends AnyKey | Array<AnyKey | [AnyKey, \"asc\" | \"desc\"]>> = K extends AnyKey ? K : K extends Array<infer T> ? GetPropertyFromComparePropertiesArrayElement<T> : never;\n\n/** Get all proper prefixes of a tuple, excluding the empty tuple and the source tuple */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype TuplePrefixes<K extends AnyKey | [...any[]]> = K extends [any] ? never : K extends [infer A, ...infer B] ? [A] | [A, ...TuplePrefixes<B>] : never;\n\n/** Template for possible keys value (needed to make TS understand that a tuple prefix of the keys is also a valid keys list */\ntype PossibleFields<E extends object> = ComparableFields<E> | [ComparePropertiesArrayElement<E>, ...Array<ComparePropertiesArrayElement<E>>];\n\n/**\n * Build a comparator function for objects using one or more comparable properties.\n * This is extremely useful as a type-safe comparator for sort/toSorted APIs, especially\n * when dealing with multiple or non-string keys.\n *\n * Keys can be provided as:\n * - a single property key\n * - a tuple/array of keys\n * - a tuple/array with sort direction entries in the form [key, \"asc\" | \"desc\"]\n *\n * Comparison is performed in order until the first non-zero result.\n *\n * @param fields - Field selector(s) defining compare priority and optional direction.\n * @returns A compare callback suitable for Array.prototype.sort, extended with\n * `partialCompare(...)` to create a comparator for a prefix of the same key sequence.\n * @throws Error if any configured property is undefined on either compared object.\n * @example\n * ```ts\n * const byName = compareProperties(\"name\");\n * users.sort(byName);\n * ```\n *\n * @example\n * ```ts\n * const byPriorityThenDate = compareProperties([\n *   [\"priority\", \"desc\"],\n *   [\"createdAt\", \"asc\"]\n * ] as const);\n * items.sort(byPriorityThenDate);\n * ```\n *\n * @example\n * ```ts\n * const byCountryCityStreet = compareProperties([\"country\", \"city\", \"street\"] as const);\n * const byCountryCity = byCountryCityStreet.partialCompare([\"country\", \"city\"] as const);\n * addresses.sort(byCountryCity);\n * ```\n */\nexport function compareProperties<const K extends ComparableFields<E> | [...Array<ComparePropertiesArrayElement<E>>], E extends object = Record<GetPropertiesFromComparePropertiesKeys<K>, ComparableType>>(fields: K) {\n  const compareList = (Array.isArray(fields) ? fields : [fields]).map((field): [keyof E, 1 | -1] => Array.isArray(field) ? [field[0], field[1] === \"desc\" ? -1 : 1] : [field, 1]);\n  const retval: (lhs: E, rhs: E) => number = (a, b) => {\n    for (const [field, negate] of compareList) {\n      if (a[field] === undefined || b[field] === undefined)\n        throw new Error(`Property '${String(field)}' does not exist`);\n      const res = negate * compare(a[field] as ComparableType, b[field] as ComparableType);\n      if (res)\n        return res;\n    }\n    return 0;\n  };\n  return Object.assign(retval, {\n    partialCompare: <T extends TuplePrefixes<K> & PossibleFields<E>>(partialFields: T) => compareProperties<T, E>(partialFields)\n  });\n}\n\nlet enumReverseMaps: WeakMap<Record<string, string | number>, Record<string | number, string>> | undefined;\n\ntype EnumEntries<T extends Record<string, string | number>, F extends number, K extends keyof T = keyof T> = K extends keyof T ? T[K] extends F ? [K, T[K]] : never : never;\n\n/** Returns the reverse mapping of a value of an const object used as enum. Can only be used for numbers.\n * @param enumObj - The enum object to reverse map.\n * @param value - The value to look up in the reverse map.\n * @returns The key corresponding to the given value in the enum object.\n * @example\n * ```ts\n * const Color = {\n *   Red: 1,\n *   Green: 2,\n *   Blue: 3\n * } as const;\n * const key = enumReverseMap(Color, 2); // \"Green\"\n * ```\n */\nexport function enumReverseMap<const T extends Record<string, string | number>, const V extends EnumEntries<T, number>[1]>(enumObj: T, value: V): EnumEntries<T, V>[0] {\n  enumReverseMaps ??= new WeakMap<Record<string, string | number>, Record<string | number, string>>();\n  let reverse = enumReverseMaps.get(enumObj);\n  if (!reverse) {\n    reverse = {} as Record<string | number, string>;\n    for (const [key, v] of Object.entries(enumObj))\n      if (typeof v === \"number\")\n        reverse[enumObj[key]] = key;\n    enumReverseMaps.set(enumObj, reverse);\n  }\n  return reverse[value];\n}\n","import { stdTypeOf } from \"./quacks.ts\";\nimport { Money } from \"./money.ts\";\n\nexport type WildcardTypes = \"?*\";\n\n/** Encode string for use in a regexp\n * @param text - Text to encode\n * @param options - Options for encoding\n * @param options.wildcards - Type of wildcards to encode (defaults to none)\n * @returns Encoded for safe use in a RegExp\n*/\nexport function escapeRegExp(text: string, options?: { wildcards?: WildcardTypes }): string {\n  let mask = text.replaceAll(/[/\\-\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'); // $& means the whole matched string\n  if (options?.wildcards === \"?*\") {\n    mask = mask.replaceAll(\"\\\\*\", \".*\");\n    mask = mask.replaceAll(\"\\\\?\", \".\");\n  }\n  return mask;\n}\n\n/** Create a regular expression from one or more wildcard masks\n * @param masks - One or more masks with '?' and/or '*' wildcards\n * @returns Regular expression string\n*/\nexport function regExpFromWildcards(masks: string | string[], options?: { wildcards?: WildcardTypes; caseInsensitive?: boolean }): RegExp {\n  if (Array.isArray(masks) && masks.length === 0)\n    throw new Error(\"Empty mask list\");\n\n  const code = Array.isArray(masks)\n    ? `^(${masks.map(mask => escapeRegExp(mask, { wildcards: options?.wildcards || \"?*\" })).join('|')})$`\n    : `^${escapeRegExp(masks, { wildcards: options?.wildcards || \"?*\" })}$`;\n  return new RegExp(code, options?.caseInsensitive ? \"i\" : undefined);\n}\n\nfunction isHTMLUnrepresentableChar(curch: number) {\n  return (curch < 32 && curch !== 9 && curch !== 10 && curch !== 13)\n    || (curch >= 128 && curch <= 159);\n}\n\nfunction encodeEntities(str: string, html: boolean) {\n  let s = \"\";\n  for (const char of str) {\n    const curch = char.codePointAt(0);\n    if (curch === undefined || isHTMLUnrepresentableChar(curch))\n      continue;\n    if (curch >= 32 && curch < 128 && curch !== 38 && curch !== 60 && curch !== 62 && (html || curch !== 34 && curch !== 39)) {\n      s += String.fromCodePoint(curch);\n      continue;\n    }\n\n    switch (curch) {\n      case 10:\n        {\n          if (html) {\n            s += \"<br>\";\n            continue;\n          }\n          break;\n        }\n      case 13:\n        {\n          if (html)\n            continue;\n          break;\n        }\n      case 34:\n        {\n          s += \"&quot;\";\n          continue;\n        }\n      case 38:\n        {\n          s += \"&amp;\";\n          continue;\n        }\n      case 39:\n        {\n          s += \"&apos;\";\n          continue;\n        }\n      case 60:\n        {\n          s += \"&lt;\";\n          continue;\n        }\n      case 62:\n        {\n          s += \"&gt;\";\n          continue;\n        }\n    }\n\n    s += \"&#\" + curch + \";\";\n  }\n  return s;\n}\n\nfunction decodeEntities(str: string, html: boolean) {\n  if (html)\n    str = str.replace(/<br *\\/?>/g, \"\\n\");\n\n  str = str.replace(/&#(\\d+);/g, (_, dec) => String.fromCharCode(dec))\n    .replace(/&lt;/g, \"<\")\n    .replace(/&gt;/g, \">\")\n    .replace(/&quot;/g, '\"')\n    .replace(/&apos;/g, \"'\")\n    .replace(/&amp;/g, \"&\");\n\n  return str;\n}\n\nexport type StringEncodings = \"base64url\" | \"attribute\" | \"html\";\n\nexport function encodeString(str: string, encoding: StringEncodings): string {\n  if (encoding === \"base64url\")\n    return btoa(str).replaceAll(\"=\", \"\").replaceAll(\"+\", \"-\").replaceAll(\"/\", \"_\");\n  if (encoding === \"attribute\")\n    return encodeEntities(str, false);\n  if (encoding === \"html\")\n    return encodeEntities(str, true);\n\n  throw new Error(`Invalid encoding '${encoding}'`);\n}\n\nexport function decodeString(str: string, encoding: StringEncodings): string {\n  if (encoding === \"base64url\")\n    return atob(str.replaceAll(\"-\", \"+\").replaceAll(\"_\", \"/\"));\n  if (encoding === \"attribute\")\n    return decodeEntities(str, false);\n  if (encoding === \"html\")\n    return decodeEntities(str, true);\n\n  throw new Error(`Invalid encoding '${encoding}'`);\n}\n\ntype JSONReplacerArgument = ((this: unknown, key: string, value: unknown) => unknown) | undefined;\n\nexport interface StringifyOptions {\n  replacer?: JSONReplacerArgument;\n  space?: string | number;\n  stable?: boolean;\n  ///Encode with types (preserve Money, Date, BigInt). Needs std.parseTyped\n  typed?: boolean;\n  ///What to target: string (like JSON.stringify), script (escapes '/') or attribute (escapes '/' and applies attribute encoding)\n  target?: \"string\" | \"script\" | \"attribute\";\n}\n\n/** Improved JSON encoder\n * @param arg - Object to encode\n * @param options - Encoding options\n*/\nexport function stringify(arg: unknown, options?: StringifyOptions) {\n  const usereplacer: JSONReplacerArgument = options?.stable || options?.typed ? (function (this: unknown, key: string, value: unknown) {\n    if (options.typed) {\n      const origvalue = (this as Record<string, unknown>)[key]; //We can't use 'value' as .toJSON() will already have been invoked\n      const type = stdTypeOf(origvalue);\n      switch (type) {\n        case \"function\":\n          throw new Error(`Cannot stringify property '${key}' of type \"${type}'`);\n        case \"Date\":\n          value = { \"$stdType\": \"Date\", date: (origvalue as Date).toISOString() };\n          break;\n        case \"Money\":\n        case \"bigint\":\n        case \"Instant\":\n        case \"PlainDate\":\n        case \"PlainTime\":\n        case \"PlainDateTime\":\n        case \"ZonedDateTime\":\n          value = { \"$stdType\": type, [type.toLowerCase()]: (origvalue as { toString: () => string }).toString() };\n          break;\n        case \"object\":\n          if (\"$stdType\" in (origvalue as { \"$stdType\": string }))\n            throw new Error(`Cannot encode objects with already embedded '$stdType's`);\n        //fallthrough\n      }\n    }\n    if (options.stable && value && typeof value === \"object\" && !Array.isArray(value))\n      value = Object.fromEntries(Object.entries(value).sort((lhs, rhs) => lhs < rhs ? -1 : lhs === rhs ? 0 : 1));\n    if (options.replacer)\n      value = options.replacer.call(this, key, value);\n    return value;\n  }) : options?.replacer ?? undefined;\n\n  let result = JSON.stringify(arg, usereplacer, options?.space);\n  if (options?.target && [\"script\", \"attribute\"].includes(options.target)) {\n    result = result.replaceAll(\"/\", \"\\\\/\");\n    if (options.target === \"attribute\")\n      result = encodeEntities(result, false);\n  }\n  return result;\n}\n\n/** Decode JSON with types (Generated using stringify with typed:true ) */\nexport function parseTyped(input: string) {\n  return JSON.parse(input, (key, value) => {\n    switch (value?.[\"$stdType\"]) {\n      case \"Money\":\n        return new Money(value.money);\n      case \"Date\":\n        return new Date(value.date);\n      case \"bigint\":\n      case \"BigInt\": //pre wh5.7 spelling\n        return BigInt(value.bigint as string);\n      case \"Instant\":\n      case \"PlainDate\":\n      case \"PlainTime\":\n      case \"PlainDateTime\":\n      case \"ZonedDateTime\":\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any -- we just assume/require you to have Temporal installed if you expect to receive/decode Temporal types. browsers should catch up eventually\n        if (!(globalThis as any).Temporal)\n          throw new Error(`Temporal is not available in this environment, cannot deserialize value of type Temporal.${value[\"$stdType\"]}. Load eg. @webhare/deps/temporal-polyfill to use Temporal types in browsers`);\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any -- we just assume/require you to have Temporal installed if you expect to receive/decode Temporal types. browsers should catch up eventually\n        return (globalThis as any).Temporal[value[\"$stdType\"]].from(value[value[\"$stdType\"].toLowerCase()]);\n      case undefined:\n        return value;\n      default:\n        throw new Error(`Unrecognized type '${value[\"$stdType\"]}'`);\n    }\n  });\n}\n\n/** Generate a slug from a (suggested) (file)name\n * @param text - Text to convert\n * @param options - Options for slugification\n * @param options.separator - Separator to use between words (defaults to '-')\n * @param options.keep - Set of characters to keep in addition to a-z0-9\n * @returns Slugified text or null if we couldn't generate anything reeadable\n */\nexport function slugify(text: string, { separator = \"-\", keep = \"\" }: {\n  separator?: string;\n  keep?: string;\n} = {}): string | null {\n  //This function mixes HS getSafeName with a few more modern approaches\n  const keepclass = `[^a-z0-9${escapeRegExp(keep)}]`;\n  text = text\n    .normalize('NFD')                   // split an accented letter in the base letter and the acent\n    // eslint-disable-next-line no-control-regex\n    .replaceAll(/[\\u0000-\\u001F]/g, '')\n    .replaceAll(/[\\u0300-\\u036f]/g, '')   // remove all previously split accents\n    .replaceAll(/ß/g, 'ss')               // german ss\n    .toLowerCase()\n    .replace(new RegExp(`^${keepclass}+`), \"\") //replace bad characters at the start\n    .replace(new RegExp(`${keepclass}+$`), \"\") //.. and end\n    .replaceAll(new RegExp(`${keepclass}+`, \"g\"), separator); // replace all non alphanumeric/space with a single dash\n\n  return text || null; //we return 'null' on purpose so callers realize we won't necessarily give them a string!\n}\n\n/** Check if an email address is valid in modern times (an emailcheck much closer to what a browser would do, with additional sanity checks. No attempt to allow all legacy styles supported by the RFCs but 99.9%+ sure to be an error if seen submitted in a form\n    @returns True if the email address appears to be a well-formed email address to a non-greybeard\n*/\nexport function isValidEmail(email: string): boolean {\n  if (email.length > 254) //TODO count bytes instead of characters\n    return false;\n\n  return /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]{1,64}@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*(?:\\.[a-zA-Z0-9-]{2,})$/.test(email);\n}\n\n/** Uppercases a string using the C-locale (so only the ASCII characters a-z are uppercased)\n * @param str - String to uppercase\n * @returns Uppercased string\n */\nexport function toCLocaleUppercase(str: string) {\n  return str.replaceAll(/[a-z]+/g, part => part.toUpperCase());\n}\n\n/** Lowercases a string using the C-locale (so only the ASCII characters A-Z are lowercased)\n * @param str - String to lowercase\n * @returns Lowercased string\n */\nexport function toCLocaleLowercase(str: string) {\n  return str.replaceAll(/[A-Z]+/g, part => part.toLowerCase());\n}\n\n/** Calculate the levenshtein distance between two strings */\nexport function levenshteinDistance(a: string, b: string): number {\n  /* calculateLevenshteinDistance is adopted from https://github.com/gustf/js-levenshtein/blob/master/index.js, licensed MIT © Gustaf Andersson\n    Picked over fastest-levenshtein because a permanent 256KB memory area for a bit more speed doesn't seem worth it\n  */\n  function _min(d0: number, d1: number, d2: number, bx: number, ay: number) {\n    return d0 < d1 || d2 < d1\n      ? d0 > d2\n        ? d2 + 1\n        : d0 + 1\n      : bx === ay\n        ? d1\n        : d1 + 1;\n  }\n\n  if (a === b) {\n    return 0;\n  }\n\n  if (a.length > b.length) {\n    const tmp = a;\n    a = b;\n    b = tmp;\n  }\n\n  let la = a.length;\n  let lb = b.length;\n\n  while (la > 0 && (a.charCodeAt(la - 1) === b.charCodeAt(lb - 1))) {\n    la--;\n    lb--;\n  }\n\n  let offset = 0;\n\n  while (offset < la && (a.charCodeAt(offset) === b.charCodeAt(offset))) {\n    offset++;\n  }\n\n  la -= offset;\n  lb -= offset;\n\n  if (la === 0 || lb < 3) {\n    return lb;\n  }\n\n  let x = 0;\n  let y, d0, d1, d2, d3, dd = 0, dy, ay, bx0, bx1, bx2, bx3;\n\n  const vector: number[] = [];\n\n  for (y = 0; y < la; y++) {\n    vector.push(y + 1);\n    vector.push(a.charCodeAt(offset + y));\n  }\n\n  const len = vector.length - 1;\n\n  for (; x < lb - 3;) {\n    bx0 = b.charCodeAt(offset + (d0 = x));\n    bx1 = b.charCodeAt(offset + (d1 = x + 1));\n    bx2 = b.charCodeAt(offset + (d2 = x + 2));\n    bx3 = b.charCodeAt(offset + (d3 = x + 3));\n    dd = (x += 4);\n    for (y = 0; y < len; y += 2) {\n      dy = vector[y];\n      ay = vector[y + 1];\n      d0 = _min(dy, d0, d1, bx0, ay);\n      d1 = _min(d0, d1, d2, bx1, ay);\n      d2 = _min(d1, d2, d3, bx2, ay);\n      dd = _min(d2, d3, dd, bx3, ay);\n      vector[y] = dd;\n      d3 = d2;\n      d2 = d1;\n      d1 = d0;\n      d0 = dy;\n    }\n  }\n\n  for (; x < lb;) {\n    bx0 = b.charCodeAt(offset + (d0 = x));\n    dd = ++x;\n    for (y = 0; y < len; y += 2) {\n      dy = vector[y];\n      vector[y] = dd = _min(dy, d0, dd, bx0, vector[y + 1]);\n      d0 = dy;\n    }\n  }\n\n  return dd;\n}\n\n/** Return the length of the string in bytes when UTF-8 encoded */\nexport function getUTF8Length(str: string) {\n  return new TextEncoder().encode(str).length;\n}\n\n/** Truncate the string so it's at most len UTF-8 bytes long */\nexport function limitUTF8Length(str: string, len: number) {\n  // TextEncoder.encodeInto writes into the given array until there's no more room to add more valid UTF-8 sequences from the\n  // source. We can use this property to limit the number of bytes by creating an array that has room for at most the given\n  // number of bytes.\n  const utf8array = new Uint8Array(len);\n  // This function returns the actual number of bytes written to the array\n  const { written } = new TextEncoder().encodeInto(str, utf8array);\n  // Decode only the actually written bytes\n  return new TextDecoder().decode(utf8array.subarray(0, written));\n}\n\n/** Update the search parameters in a URL\n * @param inUrl - URL to update\n * @param updates - Updates to apply, use 'null' to delete a variable\n * @returns Updated URL\n */\nexport function updateURL(inUrl: string | URL, updates: Record<string, string | null>): URL {\n  const u = new URL(inUrl);\n  for (const [k, v] of Object.entries(updates)) {\n    if (v === null) {\n      u.searchParams.delete(k);\n    } else {\n      u.searchParams.set(k, v);\n    }\n  }\n  return u;\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any -- Cannot specify this without using any */\n\nexport interface EmplaceHandler<ValueType> {\n  insert?: () => ValueType;\n  update?: (current: ValueType) => ValueType;\n}\n\nfunction binarySearchImpl<A, K>(compareFn: (element: A, key: K) => number, contents: A[], searchfor: K, upper_bound: boolean): { present: boolean; index: number } {\n  let first = 0;\n  let len = contents.length;\n  let present = false;\n\n  const cmpbound = upper_bound ? 1 : 0;\n  let unsorted_cmp = 0; // if this is non-0 and cmp is this value, we have an unsorted list\n  while (len > 0) {\n    const half = Math.floor(len / 2);\n    const middle = first + half;\n    const cmp = compareFn(contents[middle], searchfor);\n    if (cmp === 0) {\n      present = true;\n      unsorted_cmp = upper_bound ? -1 : 1;\n    } else if (cmp === unsorted_cmp)\n      throw new Error(`The provided array was not properly sorted!`);\n\n    if (cmp < cmpbound) {\n      first = middle + 1;\n      len -= half;\n      --len;\n    } else {\n      len = half;\n    }\n  }\n  return { present, index: first };\n}\n\n//emplace is based on https://github.com/tc39/proposal-upsert (a Map.prototype.emplace)\n/** Place a value into a Map\n * @param map - The map to place the value into\n * @param key - The key to add/replace\n * @param handler - Callbacks for inserting or updating the value\n * @returns The value that was placed into the map.\n * @throws If the key is not found and no insert handler is provided\n */\nexport function emplace<T extends Map<any, any> | WeakMap<any, any>>(\n  map: T,\n  key: T extends Map<infer K, any> ? K : T extends WeakMap<infer K, any> ? K : never,\n  handler?: T extends Map<any, infer V> ? EmplaceHandler<V> : T extends WeakMap<any, infer V> ? EmplaceHandler<V> : never):\n  T extends Map<any, infer V> ? V : T extends WeakMap<any, infer V> ? V : never {\n  let current = map.get(key);\n  if (current !== undefined) {\n    if (handler?.update) {\n      current = handler.update(current);\n      map.set(key, current);\n    }\n    return current;\n  }\n\n  if (!handler?.insert)\n    throw new Error(\"Key not found and no insert handler provided\");\n\n  const setvalue = handler.insert();\n  map.set(key, setvalue);\n  return setvalue;\n}\n\n// the `| keyof X` is needed to be able to use a `keyof X` type as key parameter in DistributedPick or DistributedOmit in generics\nexport type DistributedKeys<X extends object> = (X extends object ? keyof X : never) | keyof X;\n\n/** Applies Pick to all types in a union. Allows all keys that are present in any object in the union. Warning: You might not be\n    able to use all keys of the union if TypeScript has narrowed the union to a specific type. Eg:\n```typescript\ntype A = { x: number; t: \"a\"; a: number } | { x: number; t: \"b\"; b: number };\nconst a: A = { t: \"a\", a: 1 };\nconst b = pick(a, [\"t\", \"a\", \"b\"]); // No overload matches this call. <snip> Type '\"b\"' is not assignable to type '\"a\" | \"t\" | \"d\"'.\n```\n    @typeParam T - Type of the supplied object\n    @typeParam K - Type of the property keys to return\n    @returns Type with only the specified keys (distributed over the union if present)\n*/\nexport type DistributedPick<X extends object, Y extends DistributedKeys<X>> = X extends object ? Pick<X, keyof X & Y> : never;\n\n/** Applies Omit to all types in a union. Allows all keys that are not present in any object in the union. Warning: You might not be\n    able to use all keys of the union if TypeScript has narrowed the union to a specific type. Eg:\n```typescript\ntype A = { x: number; t: \"a\"; a: number } | { x: number; t: \"b\"; b: number };\nconst a: A = { t: \"a\", a: 1 };\nconst b = omit(a, [\"b\"]); // No overload matches this call. <snip> Type '\"b\"' is not assignable to type '\"a\" | \"t\" | \"d\"'.\n```\n    @typeParam T - Type of the supplied object\n    @typeParam K - Type of the property keys to leave out\n    @returns Type with only the specified keys left out (distributed over the union if present)\n*/\nexport type DistributedOmit<X extends object, Y extends DistributedKeys<X>> = X extends object ? Omit<X, keyof X & Y> : never;\n\n/** Returns an object with a selection of properties\n    @typeParam T - Type of the supplied object\n    @typeParam K - Type of the property keys to return\n    @param obj - Object to pick properties out of\n    @param keys - Names of the properties to pick\n    @returns Resulting object\n*/\nexport function pick<T extends object, K extends string & NoInfer<DistributedKeys<T>>>(obj: T, keys: readonly K[]): DistributedPick<T, K>;\n\n/** Returns an array with a selection of properties\n    @typeParam T - Type of the supplied array\n    @typeParam K - Type of the property keys to return\n    @param arr - Array to pick properties out of\n    @param keys - Names of the properties to pick\n    @returns Resulting array\n*/\nexport function pick<T extends object, K extends string & NoInfer<DistributedKeys<T>>>(arr: T[], keys: readonly K[]): Array<DistributedPick<T, K>>;\n\nexport function pick<T extends object, K extends string & NoInfer<DistributedKeys<T>>>(value: T | T[], keys: readonly K[]): DistributedPick<T, K> | Array<DistributedPick<T, K>> {\n  if (Array.isArray(value))\n    return value.map((elt: T) => pick(elt, keys));\n  const ret = {} as T;\n  keys.forEach((key: K) => {\n    if (key in value)\n      ret[key] = value[key];\n  });\n  return ret as object as DistributedPick<T, K>;\n}\n\n/** Returns an object with a selection of properties left out\n    @typeParam T - Type of the supplied object\n    @typeParam K - Type of the property keys to leave out\n    @param obj - Object to leave properties out of\n    @param keys - Names of the properties to remove\n    @returns Resulting object\n*/\nexport function omit<T extends object, K extends string & NoInfer<DistributedKeys<T>>>(obj: T, keys: readonly K[]): DistributedOmit<T, K>;\n\n/** Returns an array with a selection of properties left out\n    @typeParam T - Type of the supplied array\n    @typeParam K - Type of the property keys to leave out\n    @param arr - Array to leave properties out of\n    @param keys - Names of the properties to leave out\n    @returns Resulting array\n*/\nexport function omit<T extends object, K extends string & NoInfer<DistributedKeys<T>>>(arr: T[], keys: readonly K[]): Array<DistributedOmit<T, K>>;\n\nexport function omit<T extends object, K extends string & NoInfer<DistributedKeys<T>>>(value: T | T[], keys: readonly K[]): DistributedOmit<T, K> | Array<DistributedOmit<T, K>> {\n  if (Array.isArray(value))\n    return value.map((elt: T) => omit(elt, keys));\n  const ret = {} as T;\n  for (const [key, val] of Object.entries(value)) {\n    if (!keys.includes(key as K))\n      ret[key as K] = val;\n  }\n  return ret as object as DistributedOmit<T, K>;\n}\n\n/** Shuffle an array in-place\n * @param array - Array to shuffle\n * @returns The shuffled array\n*/\nexport function shuffle<T>(array: T[]): T[] {\n  for (let i = array.length - 1; i > 0; i--) {\n    const j = Math.floor(Math.random() * (i + 1));\n    [array[i], array[j]] = [array[j], array[i]];\n  }\n  return array;\n}\n\n/** Returns (and TypeScript-asserts) that the specified function is truthy. Handy for adjusting the type of an array when\n * filtering out falsy values\n * @example\n * const myarray: Array&lt;number | null&gt; = [0, null];\n * const filtered: number[] = myarray.filter(isTruthy);\n **/\nexport function isTruthy<T>(a: T): a is (T & {}) {\n  return Boolean(a);\n}\n\n/** Append to array, without overflowing the stack (eg V8 overflows at more than 32K entries)\n * @param array - Array to append to\n * @param values - Values to append\n*/\nexport function appendToArray<T>(array: T[], values: ReadonlyArray<NoInfer<T>>): void {\n  if (values.length < 1000)\n    array.push(...values); //push should be safe enough\n  else for (const value of values) //performance wise this appears just as fast as tricks with pushing blocks of slices\n    array.push(value);\n\n  //not returning the original array to make it clear we're not creating a new one\n}\n\ntype TypedEntriesInternal<T extends object, K extends keyof T> = K extends keyof T ? [K, T[K]] : never;\n\n/** Returns a union of [ key, value ] types for an object */\nexport type TypedEntries<T extends object> = T extends object ? TypedEntriesInternal<T, keyof T & string> : never;\n\n/** Returns an array of key/values of the enumerable own properties of an object, with exact types. Use when\n * no extra properties are expected on the object. Exists because Object.entries returns always string as key type.\n * @param obj - Object that contains the properties and methods\n */\nexport function typedEntries<T extends object>(obj: T): Array<TypedEntries<T>> {\n  return Object.entries(obj) as Array<TypedEntries<T>>;\n}\n\n/** Returns an array of keys of the enumerable own properties of an object, with exact types. Use when\n * no extra properties are expected on the object. Exists because Object.keys returns always string as key type.\n * @param obj - Object that contains the properties and methods\n */\nexport function typedKeys<T extends object>(obj: T): Array<keyof T & string> {\n  return Object.keys(obj) as Array<keyof T & string>;\n}\n\n/** Given a union of [key, value] types, returns the object constructed from those pairs. Exists because\n *  Object.fromEntries does not take the type of the keys and values into account.\n * @typeParam T - Union of [key, value] pairs\n */\nexport type TypedFromEntries<T extends [string, unknown]> = { [C in T as C[0]]: C[1] };\n\n/** Returns an object from an iterable of [key, value] pairs, with exact types. Exists because Object.fromEntries\n * doesn't take the type of the keys and values into account.\n * @param entries - Iterable of [key, value] pairs\n * @returns An object with the same keys and values as the input\n */\nexport function typedFromEntries<T extends [string, unknown]>(entries: Iterable<T>): TypedFromEntries<T> {\n  return Object.fromEntries(entries) as TypedFromEntries<T>;\n}\n\n\nexport class SortedMultiSet<V> {\n  private contents: V[] = [];\n  private compareFn;\n\n  constructor(compareFn: (lhs: V, rhs: V) => number, contents?: V[]) {\n    this.compareFn = compareFn;\n    if (contents)\n      this.addMultiple(contents);\n  }\n\n  get size() {\n    return this.contents.length;\n  }\n\n  at(index: number): V | undefined {\n    return this.contents.at(index);\n  }\n\n  add(value: V): number {\n    const pos = this.upperBound(value);\n    this.contents.splice(pos, 0, value);\n    return pos;\n  }\n\n  addMultiple(values: V[]): void {\n    for (const value of values) {\n      this.add(value);\n    }\n  }\n\n  delete(key: V): void {\n    const [start, limit] = this.range(key);\n    this.contents.splice(start, limit - start);\n  }\n\n  clear() {\n    this.contents.splice(0, this.contents.length);\n  }\n\n  lowerBound(key: Readonly<V>): { present: boolean; index: number } {\n    return binarySearchImpl(this.compareFn, this.contents, key, false);\n  }\n\n  upperBound(key: Readonly<V>): number {\n    return binarySearchImpl(this.compareFn, this.contents, key, true).index;\n  }\n\n  range(key: Readonly<V>): [number, number] {\n    return [this.lowerBound(key).index, this.upperBound(key)];\n  }\n\n  slice(start: number, limit: number): V[] {\n    return this.contents.slice(start, limit);\n  }\n\n  *#sliceIterator(start: number, limit: number): Generator<V, void> {\n    for (let idx = start; idx < limit; ++idx)\n      yield this.contents[idx];\n  }\n\n  sliceRange(key: Readonly<V>): V[] {\n    const [start, limit] = this.range(key);\n    return this.slice(start, limit);\n  }\n\n  rangeIterator(key: Readonly<V>): Iterable<V> {\n    const [start, limit] = this.range(key);\n    return this.#sliceIterator(start, limit);\n  }\n}\n\nexport class SortedMultiMap<K, V> {\n  private compareFn;\n  private contents: Array<[K, V]> = [];\n\n  constructor(compareFn: (lhs: K, rhs: K) => number, contents?: Array<[K, V]>) {\n    this.compareFn = (element: [K, V], key: K) => compareFn(element[0], key);\n    if (contents)\n      this.addMultiple(contents);\n  }\n\n  get size() {\n    return this.contents.length;\n  }\n\n  at(index: number): [K, V] | undefined {\n    return this.contents.at(index);\n  }\n\n  add(key: K, value: V): number {\n    const pos = this.upperBound(key);\n    this.contents.splice(pos, 0, [key, value]);\n    return pos;\n  }\n\n  addMultiple(values: Array<[K, V]>) {\n    for (const [key, value] of values) {\n      this.add(key, value);\n    }\n  }\n\n  delete(key: K): void {\n    const [start, limit] = this.range(key);\n    this.contents.splice(start, limit - start);\n  }\n\n  clear() {\n    this.contents.splice(0, this.contents.length);\n  }\n\n  lowerBound(key: Readonly<K>): { present: boolean; index: number } {\n    return binarySearchImpl(this.compareFn, this.contents, key, false);\n  }\n\n  upperBound(key: Readonly<K>): number {\n    return binarySearchImpl(this.compareFn, this.contents, key, true).index;\n  }\n\n  range(key: Readonly<K>): [number, number] {\n    return [this.lowerBound(key).index, this.upperBound(key)];\n  }\n\n  slice(start: number, limit: number): Array<[K, V]> {\n    return this.contents.slice(start, limit);\n  }\n\n  *#sliceIterator(start: number, limit: number): Generator<[K, V], void> {\n    for (let idx = start; idx < limit; ++idx)\n      yield this.contents[idx];\n  }\n\n  sliceRange(key: Readonly<K>): Array<[K, V]> {\n    const [start, limit] = this.range(key);\n    return this.slice(start, limit);\n  }\n\n  rangeIterator(key: Readonly<K>): Iterable<[K, V]> {\n    const [start, limit] = this.range(key);\n    return this.#sliceIterator(start, limit);\n  }\n}\n","const unlock = Symbol(\"unlock\");\n\n/** A mutex which is only visible in the current JavaScript VM\n\n    @example\n```ts\nconst mutex = new LocalMutex;\n\nusing lock = await mutex.lock();\nlock.release();\n\n// If you'll be relying on automatic release\nusing lock = await mutex.lock();\nvoid(lock);\n```\n\n*/\nexport class LocalMutex {\n  private locked = false;\n  private unlockList = new Array<() => void>;\n\n  /** Lock this mutex\n   * @returns Lock object. Use with `using` to ensure automatic unlock\n   */\n  async lock() {\n    if (this.locked) {\n      const defer = Promise.withResolvers<void>();\n      this.unlockList.push(() => defer.resolve());\n      await defer.promise;\n    } else {\n      this.locked = true;\n    }\n    return new LocalLock(this);\n  }\n\n  [unlock](): void {\n    if (this.unlockList.length > 0)\n      (this.unlockList.shift()!)(); //we're fair... unlock longest waiter\n    else\n      this.locked = false;\n  }\n}\n\n/** Instance of a LocalMutex lock */\nclass LocalLock implements Disposable {\n  private mutex: LocalMutex | null;\n\n  constructor(mutex: LocalMutex) {\n    this.mutex = mutex;\n  }\n  /** Explicitly release the lock\n   * @throws Error if the lock is already released\n  */\n  release() {\n    if (!this.mutex)\n      throw new Error(\"Lock already released\");\n\n    this.mutex[unlock]();\n    this.mutex = null;\n  }\n  [Symbol.dispose]() {\n    this.mutex?.[unlock]();\n  }\n}\n\nexport type { LocalLock };\n","/* frontend-config parses the wh-config object in the browser and mocks any missing data. @webhare/env does not actually expose this config, @webhare/frontend does\n   The frontend configuration is built in PageBuildRequest's 'frontendConfig' member */\n\nimport type { DTAPStage } from \"@webhare/env/src/concepts\";\nimport { debugFlags, initEnv } from \"@webhare/env/src/envbackend\";\nimport { getBrowserDebugFlags } from \"@webhare/env/src/init-browser\";\nimport { getLang } from \"@webhare/dompack/src/tree\";\nimport type { FrontendDataTypes } from \"@webhare/frontend\";\nimport { omit, throwError } from \"@webhare/std\";\n\n\n/** The format of the <script id=\"wh-config\"> object  */\nexport type WHConfigScriptData = {\n  //NOTE: existing frontend code doesn't expect site/obj to ever be null. not sure if 'object' provides the best interface or whether we need some sort of 'unknown but an existing object'\n  /** Page (targetobject) specific settings\n   *  @deprecated Use setFrontendData for type-safe settings\n  */\n  obj: { [key: string]: unknown };\n  /** Site specific settings\n   *  @deprecated Use setFrontendData for type-safe settings\n   */\n  site: { [key: string]: unknown };\n\n  /** Root URL of this site */\n  siteRoot: string;\n};\n\nexport type WHConfigScriptData_FromServer = WHConfigScriptData & { dtapStage: DTAPStage };\n\n//names fields can still have when not yet republished\ninterface WHConfigScriptData_OldPublishFields {\n  islive: boolean;\n  dtapstage: DTAPStage;\n  siteroot: string;\n}\n\n//fallback names with deprecation warnings\ninterface WHConfigScriptData_LegacyFields {\n  /** @deprecated Use dtapStage in WH5.4+ */\n  islive: boolean;\n  /** @deprecated Use `dtapStage` from \"\\@webhare/env\"; in WH5.4+ */\n  dtapstage: DTAPStage;\n  /** @deprecated Use `getSiteRoot` from \"\\@webhare/frontend\"; in WH5.7+ */\n  siteroot: string;\n}\n\nlet config: WHConfigScriptData_FromServer | undefined;\nlet siteroot: string | undefined;\nlet dtapStage: DTAPStage = \"production\";\n\n//if document is undefined, we're serverside or in a worker\nconst whconfigel = typeof document !== \"undefined\" ? document.querySelector('script#wh-config') : null;\nif (whconfigel?.textContent) {\n  const parsedConfig: WHConfigScriptData_FromServer & WHConfigScriptData_OldPublishFields = JSON.parse(whconfigel.textContent);\n  config = omit(parsedConfig, [\"siteroot\", \"dtapstage\", \"islive\"]);\n\n  //Fallbacks for pages last published with WH5.3 *and* pages published from HareScript which still emit lowercase props\n  siteroot = parsedConfig.siteRoot ?? parsedConfig.siteroot!;\n  dtapStage = parsedConfig.dtapStage ?? parsedConfig.dtapstage;\n}\n\ninitEnv(dtapStage, '/');\n\nif (typeof location !== \"undefined\")\n  for (const flag of getBrowserDebugFlags('wh-debug'))\n    debugFlags[flag] = true;\n\n\n/** @deprecated frontendConfig has been deprecated. Switch to the getFrontendData system */\n// Make sure we have obj/site as some sort of object, to prevent crashes on naive 'if ($wh.config.obj.x)' tests'\nexport const frontendConfig: WHConfigScriptData & {\n  /** @deprecated Use `getLang().tag` in WH6.0+ & WH5.9.7 */\n  locale?: string;\n} = {\n  ...config,\n  obj: config?.obj || {},\n  site: config?.site || {},\n  siteRoot: siteroot || \"\",\n  dtapstage: dtapStage,\n  islive: dtapStage === \"production\" || dtapStage === \"acceptance\",\n  siteroot: siteroot || \"\",\n  ...typeof document !== \"undefined\" ? { locale: getLang().tag } : {},\n} as WHConfigScriptData & WHConfigScriptData_LegacyFields;\n\n// this is what we actually store in the config object but is type-unsafe to access. Plugins still store data in the config object\nexport type WHConfigSerializedData = WHConfigScriptData & WHConfigScriptData_LegacyFields & { [key in keyof FrontendDataTypes]?: FrontendDataTypes[key] };\n\nif (dtapStage === \"development\") { //WH6.0: it's time to hard phase-out the old fields\n  Object.defineProperties(frontendConfig, {\n    islive: { get() { throw new Error(\"frontendConfig.islive will be removed - replace with testing 'dtapStage' for production | acceptance (WH5.4+)\"); } },\n    dtapstage: { get() { throw new Error(\"frontendConfig.dtapstage will be removed - replace with 'dtapStage' (WH5.4+)\"); } },\n    siteroot: { get() { throw new Error(\"frontendConfig.siteroot will be removed - replace with 'getSiteRoot()' (WH5.7+)\"); } },\n    //TODO but only WH6 addded this property AND getLang so there's no phasing out yet.\n    //locale: { get() { throw new Error(\"frontendConfig.locale will be removed - replace with getLang().tag in WH6.0+ & WH5.9.7\"); } },\n  });\n}\n\n//NOTE: These APIs need to live in init.ts so eg gtm.ts can access us without triggering a CSS reset through frontend.ts. When frontend.ts stops auto-resetting we might move it back\n\nexport function getFrontendData<Type extends keyof FrontendDataTypes>(type: Type, options: { allowMissing: true }): FrontendDataTypes[Type] | null;\nexport function getFrontendData<Type extends keyof FrontendDataTypes>(type: Type, options?: { allowMissing: boolean }): FrontendDataTypes[Type];\n\n/** Get data exported by the response\n * @typeParam Type - The type of data to get\n * @param dataObject - The data object of data to get\n * @param allowMissing - If true, return null if the data object is missing. Otherwise throw an error\n * @example\n```\n  declare module \"@webhare/frontend\" {\n    interface FrontendDataTypes {\n      \"mymodule:type\": {\n        test: number;\n      };\n    }\n  }\n\n  const data = getFrontendData(\"mymodule:type\");\n```\n*/\nexport function getFrontendData<Type extends keyof FrontendDataTypes>(dataObject: Type, { allowMissing = false } = {}): FrontendDataTypes[Type] | null {\n  const retval = (config as undefined | WHConfigSerializedData)?.[dataObject] as FrontendDataTypes[Type];\n  if (!retval)\n    if (allowMissing)\n      return null;\n    else\n      throw new Error(`Missing frontend data object: ${dataObject}`);\n\n  return retval;\n}\n\n/** Get the current site root\n *\n * @returns The site root URL (ending with a slash)\n*/\nexport function getSiteRoot(): string { //now an API to improve treeshaking\n  return siteroot ?? throwError(\"Site root is undefined. HTML code may be broken\");\n}\n","// Set up dispose symbols - https://github.com/evanw/esbuild/pull/3192 \"you'll need to polyfill Symbol.dispose if it's not present before you use it.\n\n//@ts-expect-error -- It's marked readonly\nSymbol.dispose ||= Symbol.for('Symbol.dispose');\n//@ts-expect-error -- It's marked readonly\nSymbol.asyncDispose ||= Symbol.for('Symbol.asyncDispose');\n\n// Set up promise resolvers (ES2024)\nPromise.withResolvers ||= function <T>(): PromiseWithResolvers<T> {\n  let resolve: (value: T | PromiseLike<T>) => void;\n  let reject: (reason: Error) => void;\n  const promise = new Promise<T>((_resolve, _reject) => { resolve = _resolve; reject = _reject; });\n  // @ts-expect-error `resolve` and `reject` are assigned synchronously, which isn't picked up by the TypeScript compiler (see\n  // https://github.com/Microsoft/TypeScript/issues/30053)\n  return { promise, resolve, reject };\n};\n\n// Polyfills for https://caniuse.com/?search=groupby - needed until we can assume safari 17.4 as global baseline\nif (!Map.groupBy)\n  Map.groupBy = function <Item, Key>(items: Iterable<Item>, callbackfn: (item: Item, idx: number) => Key): Map<Key, Item[]> {\n    const retval = new Map<Key, Item[]>;\n    let idx = 0;\n    for (const item of items) {\n      const key = callbackfn(item, idx++);\n      let list = retval.get(key);\n      if (!list)\n        retval.set(key, list = []);\n      list.push(item);\n    }\n    return retval;\n  };\n\nif (!Object.groupBy)\n  Object.groupBy = function <Item, Key extends string | number | symbol>(items: Iterable<Item>, callbackfn: (item: Item, idx: number) => Key): Partial<Record<Key, Item[]>> {\n    return Object.fromEntries(Map.groupBy(items, callbackfn).entries()) as Partial<Record<Key, Item[]>>;\n  };\n","/* eslint-disable @typescript-eslint/no-loop-func */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-this-alias */\n\n/* Iterator polyfills (https://caniuse.com/?search=iterator) - stage 4 ES but not in all browsers yet\n   Based on https://github.com/alkihis/iterator-polyfill/tree/master but we removed all the AsyncIterator\n   stuff as that's still stage 2 AND not implemented in TypeScript (as of 5.6)\n\n   We're ignoring a few linting/any issues as we really don't care to maintain this much\n   Fixed an issue with .some - reported as https://github.com/alkihis/iterator-polyfill/issues/6\n*/\n\n(function () {\n  // polyfill already applied / proposal implemented\n  if ('Iterator' in globalThis) {\n    return;\n  }\n\n  // Polyfill for Iterator\n  const IteratorPrototype = {};\n\n  const ArrayIteratorPrototype = Object.getPrototypeOf([][Symbol.iterator]());\n  const OriginalIteratorPrototype = Object.getPrototypeOf(ArrayIteratorPrototype);\n\n  Object.setPrototypeOf(OriginalIteratorPrototype, IteratorPrototype);\n\n  Object.defineProperties(IteratorPrototype, {\n    [Symbol.iterator]: {\n      value() {\n        return this;\n      }\n    },\n    map: {\n      *value<T, R>(callback: (value: T) => R): Generator<any, any, any> {\n        const it = this;\n        let value = it.next();\n\n        while (!value.done) {\n          const real_value = callback(value.value);\n          const next_value = yield real_value;\n          value = it.next(next_value);\n        }\n\n        return value.value;\n      },\n    },\n    filter: {\n      *value<T>(callback: (value: T) => boolean): Generator<any, any, any> {\n        const it = this;\n        let value = it.next();\n        let next_value;\n\n        while (!value.done) {\n          const real_value = value.value;\n          if (callback(real_value)) {\n            next_value = yield real_value;\n            value = it.next(next_value);\n          } else {\n            value = it.next(next_value);\n          }\n        }\n\n        return value.value;\n      },\n    },\n    find: {\n      value<T>(callback: (value: boolean) => T) {\n        const it = this;\n        let value = it.next();\n\n        while (!value.done) {\n          const real_value = value.value;\n\n          if (callback(real_value))\n            return real_value;\n\n          value = it.next();\n        }\n      }\n    },\n    every: {\n      value<T>(callback: (value: T) => boolean) {\n        const it = this;\n        let value = it.next();\n\n        while (!value.done) {\n          const real_value = value.value;\n\n          if (!callback(real_value))\n            return false;\n\n          value = it.next();\n        }\n\n        return true;\n      }\n    },\n    some: {\n      value<T>(callback: (value: T) => boolean) {\n        const it = this;\n        let value = it.next();\n\n        while (!value.done) {\n          const real_value = value.value;\n\n          if (callback(real_value)) {\n            it.return();\n            return true;\n          }\n\n          value = it.next();\n        }\n\n        return false;\n      }\n    },\n    toArray: {\n      value(max_count = Infinity) {\n        const values = [];\n\n        const it = this;\n        let value = it.next();\n\n        while (!value.done) {\n          const real_value = value.value;\n\n          if (max_count <= 0)\n            return values;\n\n          values.push(real_value);\n\n          if (max_count !== Infinity)\n            max_count--;\n\n          value = it.next();\n        }\n\n        return values;\n      }\n    },\n    take: {\n      *value(limit: number): Generator<any, any, any> {\n        limit = Number(limit);\n        if (limit < 0)\n          throw new RangeError('Invalid limit.');\n\n        const it = this;\n        let value = it.next();\n        let remaining = limit;\n        let next_value;\n\n        while (!value.done) {\n          const real_value = value.value;\n\n          if (remaining <= 0)\n            return;\n\n          next_value = yield real_value;\n          value = it.next(next_value);\n          remaining--;\n        }\n\n        return value.value;\n      },\n    },\n    drop: {\n      *value(limit: number): Generator<any, any, any> {\n        limit = Number(limit);\n        if (limit < 0)\n          throw new RangeError('Invalid limit.');\n\n        const it = this;\n        let value = it.next();\n        let remaining = limit;\n        let next_value;\n\n        while (!value.done) {\n          const real_value = value.value;\n\n          if (remaining > 0) {\n            value = it.next(next_value);\n            remaining--;\n            continue;\n          }\n\n          next_value = yield real_value;\n          value = it.next(next_value);\n        }\n\n        return value.value;\n      },\n    },\n    asIndexedPairs: {\n      *value(): Generator<any, any, any> {\n        const it = this;\n        let value = it.next();\n        let index = 0;\n\n        while (!value.done) {\n          const real_value = value.value;\n          const next_value = yield [index, real_value];\n          value = it.next(next_value);\n          index++;\n        }\n\n        return value.value;\n      }\n    },\n    flatMap: {\n      *value<T, R extends object>(mapper: (value: T) => IterableIterator<R> | R): Generator<any, any, any> {\n        if (typeof mapper !== 'function') {\n          throw new TypeError('Mapper must be a function.');\n        }\n\n        const it = this;\n        let value = it.next();\n        let next_value;\n\n        while (!value.done) {\n          const real_value = value.value;\n          const mapped = mapper(real_value);\n\n          if (Symbol.iterator in mapped) {\n            next_value = yield* mapped[Symbol.iterator]();\n          } else {\n            next_value = yield mapped;\n          }\n\n          value = it.next(next_value);\n        }\n\n        return value.value;\n      },\n    },\n    reduce: {\n      value<T, V>(reducer: (acc: V, value: T) => V, initial_value?: V) {\n        let acc = initial_value;\n\n        const it = this;\n        if (acc === undefined) {\n          acc = it.next().value;\n        }\n\n        let value = it.next();\n        while (!value.done) {\n          const real_value = value.value;\n\n          acc = reducer(acc!, real_value);\n\n          value = it.next();\n        }\n\n        return acc;\n      }\n    },\n    forEach: {\n      value<T>(callback: (value: T) => any) {\n        const it = this;\n        let value = it.next();\n\n        while (!value.done) {\n          const real_value = value.value;\n\n          callback(real_value);\n\n          value = it.next();\n        }\n      }\n    },\n    [Symbol.toStringTag]: {\n      value: 'IteratorPrototype'\n    },\n\n    /* OUTSIDE PROPOSAL */\n    count: {\n      value() {\n        let count = 0;\n\n        const it = this;\n        let value = it.next();\n\n        while (!value.done) {\n          count++;\n          value = it.next();\n        }\n\n        return count;\n      },\n    },\n    join: {\n      value(string: string) {\n        let final = '';\n        let first = true;\n\n        const it = this;\n        let value = it.next();\n\n        while (!value.done) {\n          const real_value = value.value;\n\n          if (first) {\n            first = false;\n            final += real_value;\n          } else {\n            final += string + real_value;\n          }\n\n          value = it.next();\n        }\n\n        return final;\n      }\n    },\n    chain: {\n      *value<I>(...iterables: IterableIterator<I>[]) {\n        yield* this;\n\n        for (const it of iterables) {\n          yield* it;\n        }\n      }\n    },\n    zip: {\n      *value<T, O>(...others: IterableIterator<O>[]): Iterator<(T | O)[]> {\n        const it_array = [this, ...others].map((e: any) => Symbol.iterator in e ? e[Symbol.iterator]() : e as Iterator<T | O>);\n        let values = it_array.map(e => e.next());\n        let next_value: any;\n\n        while (values.every(e => !e.done)) {\n          next_value = yield values.map(e => e.value);\n          values = it_array.map(e => e.next(next_value));\n        }\n      },\n    },\n    takeWhile: {\n      *value<T>(callback: (value: T) => boolean): Generator<any, any, any> {\n        const it = this;\n        let value = it.next();\n        let next_value;\n\n        while (!value.done) {\n          const real_value = value.value;\n\n          if (callback(real_value))\n            next_value = yield real_value;\n          else\n            return;\n\n          value = it.next(next_value);\n        }\n\n        return value.value;\n      }\n    },\n    dropWhile: {\n      *value<T>(callback: (value: T) => boolean): Generator<any, any, any> {\n        const it = this;\n        let value = it.next();\n        let next_value;\n        let finished = false;\n\n        while (!value.done) {\n          const real_value = value.value;\n\n          if (!finished && callback(real_value)) {\n            value = it.next(next_value);\n            continue;\n          }\n\n          finished = true;\n          next_value = yield real_value;\n\n          value = it.next(next_value);\n        }\n\n        return value.value;\n      }\n    },\n    fuse: {\n      *value(): Generator<any, any, any> {\n        const it = this;\n        let value = it.next();\n        let next_value;\n\n        while (!value.done) {\n          const real_value = value.value;\n\n          if (real_value !== undefined && real_value !== null)\n            next_value = yield real_value;\n          else\n            return;\n\n          value = it.next(next_value);\n        }\n\n        return value.value;\n      }\n    },\n    partition: {\n      value<T>(callback: (value: T) => boolean) {\n        const partition1 = [], partition2 = [];\n\n        const it = this;\n        let value = it.next();\n\n        while (!value.done) {\n          const real_value = value.value;\n\n          if (callback(real_value))\n            partition1.push(real_value);\n          else\n            partition2.push(real_value);\n\n          value = it.next();\n        }\n\n        return [partition1, partition2];\n      },\n    },\n    findIndex: {\n      value<T>(callback: (value: T) => boolean) {\n        const it = this;\n        let i = 0;\n        let value = it.next();\n\n        while (!value.done) {\n          const real_value = value.value;\n\n          if (callback(real_value))\n            return i;\n\n          value = it.next();\n          i++;\n        }\n\n        return -1;\n      }\n    },\n    max: {\n      value() {\n        let max = -Infinity;\n\n        const it = this;\n        let value = it.next();\n\n        while (!value.done) {\n          const real_value = value.value;\n\n          if (max < real_value)\n            max = real_value;\n\n          value = it.next();\n        }\n\n        return max;\n      },\n    },\n    min: {\n      value() {\n        let min = Infinity;\n\n        const it = this;\n        let value = it.next();\n\n        while (!value.done) {\n          const real_value = value.value;\n\n          if (min > real_value)\n            min = real_value;\n\n          value = it.next();\n        }\n\n        return min;\n      },\n    },\n    cycle: {\n      *value(): Generator<any, any, any> {\n        const values = [];\n\n        const it = this;\n        let value = it.next();\n\n        while (!value.done) {\n          const real_value = value.value;\n          values.push(real_value);\n\n          const next_value = yield real_value;\n          value = it.next(next_value);\n        }\n\n        while (true) {\n          yield* values;\n        }\n      },\n    },\n  });\n\n  //iterator.from from https://github.com/rauschma/iterator-helpers-polyfill/\n\n  function isObject(value: unknown) {\n    if (value === null) return false;\n    const t = typeof value;\n    return t === 'object' || t === 'function';\n  }\n\n  function GetIteratorFlattenable<T>(obj: Record<symbol, any>): T {\n    if (!isObject(obj)) {\n      throw new TypeError();\n    }\n    const method = obj[Symbol.iterator];\n    let iterator = undefined;\n    if (typeof method !== 'function') {\n      iterator = obj;\n    } else {\n      iterator = method.call(obj);\n    }\n    if (!isObject(iterator)) {\n      throw new TypeError();\n    }\n    return iterator;\n  }\n\n  if (!('Iterator' in globalThis)) {\n    const Iterator = function Iterator() { };\n\n    Iterator.prototype = IteratorPrototype;\n\n    // @ts-expect-error We're still missing From in this poyfill\n    (globalThis).Iterator = Iterator;\n  }\n\n\n  //----- Static method -----\n  // Must be done after Iterator.prototype was set up,\n  // so that `extends Iterator` works below\n\n  class WrappedIterator<T, TReturn = any, TNext = undefined> extends Iterator<T, TReturn, TNext> {\n    #iterator;\n    constructor(iterator: Iterator<T, TReturn, TNext>) {\n      super();\n      this.#iterator = iterator;\n    }\n    override next(...args: [] | [TNext]): any {\n      return this.#iterator.next(...args);\n    }\n    // `async` helps with line (*)\n    override return(value?: TReturn | PromiseLike<TReturn>): any {\n      const returnMethod = this.#iterator.return;\n      if (returnMethod === undefined) {\n        return { done: true, value: value as any }; // (*)\n      }\n      return returnMethod.call(this.#iterator);\n    }\n  }\n\n  function Iterator_from<T>(value: any) {\n    const iterator = GetIteratorFlattenable<Iterator<T>>(value);\n    if (iterator instanceof Iterator) {\n      return iterator;\n    }\n    // `iterator´ does not support the new API – wrap it so that it does\n    return new WrappedIterator(iterator);\n  }\n\n  Object.defineProperty(\n    Iterator, 'from',\n    {\n      writable: true,\n      enumerable: false,\n      configurable: true,\n      value: Iterator_from,\n    }\n  );\n})();\n","type FormValueList = Array<{ name: string; value: string }>;\n\n/** A navigation instruction encapsulates the next step that a client has to take in eg. a login, payment or wizard flow.\n * Use navigateTo to execute a navigation in a browser\n*/\n\nexport type NavigateInstruction =\n  {\n    type: \"redirect\";\n    url: string;\n  } | {\n    type: \"form\";\n    form: {\n      action: string;\n      vars: FormValueList;\n      method?: \"POST\";\n    };\n  } | {\n    type: \"reload\";\n  } | {\n    type: \"postmessage\";\n    message: unknown;\n    target?: \"parent\" | \"opener\";\n  } | {\n    type: \"close\";\n  };\n\nfunction submitForm(action: string, values: FormValueList, method = \"POST\") {\n  const form = document.createElement(\"form\");\n  form.method = method;\n  form.action = action;\n  form.append(...values.map(item => {\n    const input = document.createElement(\"input\");\n    input.type = \"hidden\";\n    input.name = item.name;\n    input.value = item.value;\n    return input;\n  }));\n  document.body.appendChild(form);\n  form.submit();\n}\n\n/** Navigate to a specific URL (may be hookable by other scripts)\n* @param navigation - Target URL or NavigateInstruction\n*/\nexport function navigateTo(navigation: string | NavigateInstruction) {\n  if (typeof window === \"undefined\")\n    throw new Error(`navigateTo() is not available in this environment`);\n\n  if (typeof navigation === \"string\")\n    navigation = { type: \"redirect\", url: navigation };\n\n  switch (navigation.type) {\n    case \"redirect\":\n      {\n        location.href = navigation.url;\n      } break;\n\n    case \"form\":\n      {\n        submitForm(navigation.form.action, navigation.form.vars, navigation.form.method);\n      } break;\n\n    case \"reload\":\n      {\n        window.location.reload();\n      } break;\n\n    case \"postmessage\":\n      {\n        if (!navigation.target || navigation.target === \"parent\")\n          window.parent.postMessage(navigation.message, \"*\");\n        else if (navigation.target === \"opener\") {\n          window.opener.postMessage(navigation.message, \"*\");\n          window.close();\n        } else\n          throw Error(\"Unknown postmessage target '\" + navigation.target + \"' received\");\n      } break;\n\n    case \"close\":\n      {\n        window.close();\n      } break;\n\n    default:\n      throw new Error(`Unknown navigation type '${(navigation as { type: string }).type}'`);\n  }\n}\n","/* Manages the $wh global, an API for just-in-time debugging */\nimport type { DebugRegistry } from \"@webhare/env\";\nimport { debugFlags } from \"./envbackend\";\n\nlet debugRegFinalizer: FinalizationRegistry<{ type: keyof DebugRegistry; key: string }> | undefined;\n\nexport type WHGlobal = DebugRegistry & {\n  debugFlags: typeof debugFlags;\n  /** Global counter to avoid HMRs from duplicating IDs */\n  nextId: number;\n};\n\ndeclare global {\n  var $wh: WHGlobal;\n}\n\nglobalThis.$wh = {\n  debugFlags,\n  nextId: 1\n} satisfies WHGlobal;\n\nexport function addToDebugRegistry<T extends keyof DebugRegistry>(type: T, key: string, value: NonNullable<ReturnType<NonNullable<DebugRegistry[T]>[string][\"deref\"]>>) {\n  const debugRegistry = globalThis.$wh as unknown as DebugRegistry;\n  //@ts-ignore prevents '>   Type '{}' is not assignable to type 'never'. in jssdk builds, probably because noone yet extends DebugRegistry there\n  debugRegistry[type] ||= {};\n  debugRegFinalizer ||= new FinalizationRegistry(({ type: t, key: k }) => {\n    delete debugRegistry![t]?.[k];\n  });\n\n  if (debugRegistry[type][key])\n    console.error(`Debug registry key ${key} already exists, overwriting it`);\n\n  (debugRegistry[type] as Record<string, unknown>)[key] = new WeakRef(value);\n  debugRegFinalizer.register(value, { type, key });\n}\n","import type { FormControlElement } from \"@webhare/dompack\";\n\nexport const CustomEvent = globalThis.CustomEvent;\n/** Wrap an event to ensure it's target is a HTMLElement\n * @typeParam EventType - The expected event type\n * @typeParam CurrentTargetType - The type of the elemnt you're binding the event to. Optional, defaults to HTMLElement\n * @typeParam RelatedTargetType - The type of the elemnt you're binding the event to. Optional, defaults to HTMLElement\n*/\nexport type DocEvent<EventType extends Event, CurrentTargetType extends HTMLElement = HTMLElement, RelatedTargetType extends HTMLElement = HTMLElement> = EventType & {\n  target: HTMLElement;\n  currentTarget: CurrentTargetType;\n  relatedTarget: RelatedTargetType | null;\n};\n\nexport type DomEventOptions =\n  {\n    bubbles?: boolean;\n    cancelable?: boolean;\n    relatedTarget?: EventTarget;\n    detail?: object;\n  };\n\n/** @deprecated Browsers finally have cross-platform event dispatching. Use element.dispatchEvent(new MouseEvent/FocusEvent/CustomEvent) */\nexport function dispatchDomEvent(element: EventTarget, eventtype: string, options?: DomEventOptions) {\n  //see here https://developer.mozilla.org/en-US/docs/Web/Events whether an event is bubbles/cancelabel\n  options = {\n    bubbles: [\n      \"input\", \"change\", \"click\", \"contextmenu\", \"dblclick\",\n      \"reset\", \"submit\"\n    ].includes(eventtype),\n    cancelable: [\n      \"animationstart\", \"animationcancel\", \"animationend\", \"animationiteration\",\n      \"beforeunload\",\n      \"click\", \"contextmenu\", \"dblclick\",\n      \"reset\", \"submit\",\n      \"transitionstart\", \"transitioncancel\", \"transitionend\", \"transitionrun\"\n    ].includes(eventtype),\n    ...options\n  };\n\n  if (!element || !(element as Node).ownerDocument)\n    return true; //the element has left the dom... so there's no more bubbling. just drop it\n\n  //FIXME the load/scroll is buggy and we should be probably be using new Event (but an earlier attempt at that triggered quite a few test failures)\n  const createtype = /*[\"load\",\"scroll\"].includes(eventtype) === \"load\" ? \"UIEvents\" :*/[\"focus\", \"blur\", \"focusin\", \"focusout\"].includes(eventtype) ? \"FocusEvent\" : eventtype === \"click\" ? \"MouseEvents\" : \"HTMLEvents\";\n  //we verified its non-null ness above but TS doesn't really understand that\n  const evt = (element as Node).ownerDocument!.createEvent(createtype);\n  evt.initEvent(eventtype, options.bubbles, options.cancelable);\n  if (options.detail)\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any -- we should just rewrite to new Event\n    (evt as any).detail = options.detail;\n  if (options.relatedTarget) //its a readonly prop, so redefine it\n    Object.defineProperty(evt, 'relatedTarget', { value: options.relatedTarget, writable: false });\n\n  //TODO: Should we keep this code?\n  // @ts-expect-error IScroll is a custom Window property set by IScroll\n  if (eventtype === 'click' && window.IScroll)\n    // @ts-expect-error _constructed is a custom Event property used by IScroll\n    evt._constructed = true; //ensure IScroll doesn't blindly cancel our synthetic clicks\n\n  return element.dispatchEvent(evt);\n}\n\n/** Fire the proper modified events (input and/or change) on the element after changing its value\n * @param element - Element to receive event\n * @deprecated Use changeValue so we can figure out the proper events to fire\n */\nexport function fireModifiedEvents(element: FormControlElement) {\n  element.dispatchEvent(new InputEvent(\"input\"));\n  element.dispatchEvent(new Event(\"change\"));\n}\n\n/** @deprecated Browsers finally have cross-platform event dispatching. Use element.dispatchEvent(new MouseEvent/FocusEvent/CustomEvent) */\nexport function fireHTMLEvent(element: EventTarget, type: string, options?: DomEventOptions) {\n  return dispatchDomEvent(element, type, options);\n}\n\ntype CustomEventParams =\n  {\n    /** Whether this event should bubble up in the DOM */\n    bubbles: boolean;\n    /** Whether this event can be cancelled */\n    cancelable: boolean;\n    /** Custom event information */\n    detail?: unknown;\n    /** Handler to execute if the default isn't prevented by a event listener */\n    defaulthandler?: (evt: CustomEvent) => void;\n  };\n\n/** Fire a custom event\n    @param node - node to fire the event on\n    @param event - event type. You should add this event to the GlobalEventHandlersEventMap for validation in dispatchCustomEvent calls and addEventListener callbacks.\n    @param params - Event options\n    @returns true if the default wasn't prevented\n */\n\nexport function dispatchCustomEvent<K extends string>(\n  node: EventTarget,\n  event: K,\n  params: CustomEventParams & (K extends keyof GlobalEventHandlersEventMap ?\n    GlobalEventHandlersEventMap[K] extends CustomEvent ?\n    { detail: GlobalEventHandlersEventMap[K][\"detail\"] } : unknown : unknown)) {\n\n  if (!params)\n    throw new Error(`Missing dispatchCustomEvent params`);\n  ['bubbles', 'cancelable'].forEach(prop => {\n    if (!(prop in params))\n      throw new Error(`Missing '${prop}' in dispatchCustomEvent params`);\n  });\n\n  const evt = new CustomEvent(event, {\n    bubbles: params.bubbles,\n    cancelable: params.cancelable,\n    detail: params.detail\n  });\n  let defaultaction = true;\n  try {\n    if (!node.dispatchEvent(evt))\n      defaultaction = false; //defaultPrevented is unreliable on IE11, so double check\n  } finally {\n    if (!evt.defaultPrevented && params.defaulthandler && defaultaction) {\n      params.defaulthandler(evt);\n    }\n  }\n  return defaultaction && !evt.defaultPrevented;\n}\n\n/**\n     Change the value of a form element, and fire the correct events as if it were a user change\n *\n    @param element - Element to change\n    @param newvalue - New value\n */\nexport function changeValue(element: FormControlElement, newvalue: string | number | boolean) {\n  if (element.matches(`input[type=radio], input[type=checkbox]`)) {\n    if (Boolean((element as HTMLInputElement).checked) === Boolean(newvalue))\n      return;\n    (element as HTMLInputElement).checked = Boolean(newvalue);\n  } else {\n    //FIXME it's not really clean to assume that this element is changeable - throw for non input/select..\n    const asString = String(newvalue);\n    if ((element as HTMLInputElement).value === asString)\n      return;\n\n    (element as HTMLInputElement).value = String(newvalue);\n  }\n  dispatchDomEvent(element as EventTarget, 'input');\n  dispatchDomEvent(element as EventTarget, 'change');\n}\n\nlet keydata: { mapping: { [key: string]: string } };\n\nfunction initKeyMapping() {\n  keydata =\n  {\n    // Mapping from keyIdentifier/key to key. If not found, translate U+XXXX to the unicode char and return that.\n\n    // List of all current key mappings (and current inconsistencies\n    // at https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values\n    mapping:\n    {\n      \"Del\": \"Delete\", // IE/edge use 'Del' instead of 'Delete'\n      \"Esc\": \"Escape\", // IE/edge use 'Esc' instead of 'Escape'\n      \"OS\": \"Meta\", // Meta key is called OS on IE 9 and Firefox (tested v50)\n      \"Win\": \"Meta\", // Meta key is called Win on IE/Edge\n      \"Scroll\": \"ScrollLock\", // More IE/Edge, from tests\n      \"PrintScreen\": \"Print\", // More IE/Edge, from tests\n      \"MozHomeScreen\": \"GoHome\", // Prior to Firefox 37, the Home button generated a key code of \"Exit\". Starting in Firefox 37, the button generates the key code \"MozHomeScreen\".\n\n      // Internet Explorer 9 and Firefox 36 and earlier return \"Left\", \"Right\", \"Up\", and \"Down\" for the arrow keys, instead of \"ArrowLeft\", \"ArrowRight\", \"ArrowUp\", and \"ArrowDown\".\n      \"Left\": \"ArrowLeft\",\n      \"Right\": \"ArrowRight\",\n      \"Up\": \"ArrowUp\",\n      \"Down\": \"ArrowDown\",\n      // More IE and old Firefox stuff\n      \"Crsel\": \"CrSel\",\n      \"Exsel\": \"ExSel\",\n      \"Nonconvert\": \"NonConvert\",\n      // Internet Explorer 9 and Firefox 36 and earlier report \"Apps\" instead of \"ContextMenu\" for the context menu key.\n      \"Apps\": \"ContextMenu\",\n      // Internet Explorer 9 and Firefox 36 and earlier use \"MediaNextTrack\" and \"MediaPreviousTrack\" instead of \"MediaTrackNext\" and \"MediaTrackPrevious\".\n      \"MediaNextTrack\": \"MediaTrackNext\",\n      \"MediaPreviousTrack\": \"MediaTrackPrevious\",\n      // In Internet Explorer 9, and prior to Firefox 49, \"AudioVolumeUp\", \"AudioVolumeDown\", and \"AudioVolumeMute\" were \"VolumeUp\", \"VolumeDown\", and \"VolumeMute\".\n      // In Firefox 49 they were updated to match the latest specification. The old names are still used on Boot to Gecko.\n      \"VolumeUp\": \"AudioVolumeUp\",\n      \"VolumeDown\": \"AudioVolumeDown\",\n      \"VolumeMute\": \"AudioVolumeMute\",\n      // Firefox added proper support for the \"TV\" key in Firefox 37; before that, this key generated the key code \"Live\".\n      \"Live\": \"TV\",\n      // Internet Explorer 9 and Firefox 36 and earlier identify the zoom toggle button as \"Zoom\". Firefox 37 corrects this to \"ZoomToggle\".\n      \"Zoom\": \"ZoomToggle\",\n      // Internet Explorer 9 and Firefox 36 and earlier use \"SelectMedia\" instead of \"LaunchMediaPlayer\". Firefox 37 through Firefox 48 use \"MediaSelect\". Firefox 49 has been updated to match the latest specification, and to return \"LaunchMediaPlayer\".\n      \"SelectMedia\": \"LaunchMediaPlayer\",\n      \"MediaSelect\": \"LaunchMediaPlayer\",\n      // Google Chrome returns \"LaunchCalculator\" instead of \"LaunchApplication1\". See Chromium bug 612743 for more information.\n      // Google Chrome returns \"LaunchMyComputer\" instead of \"LaunchApplication2\". See Chromium bug 612743 for more information.\n      // (LaunchCalculator and LaunchMyComputer are valid too, so no translation)\n\n      // While older browsers used words like \"Add\", \"Decimal\", \"Multiply\", and so forth modern browsers identify these using the actual character (\"+\", \".\", \"*\", and so forth).\n      \"Multiply\": \"*\",\n      \"Add\": \"+\",\n      \"Divide\": \"/\",\n      \"Subtract\": \"-\",\n      \"Decimal\": \".\", // (mozilla Key_Values doc says depends on region)\n      \"Separator\": \".\", // (mozilla Key_Values doc says depends on region)\n\n      // keyIdenfier spec mapping of non-printable keys: https://www.w3.org/TR/2009/WD-DOM-Level-3-Events-20090908/#keyset-keyidentifiers\n      // Used in safari\n      \"U+0008\": \"Backspace\",\n      \"U+0009\": \"Tab\",\n      \"U+000D\": \"Enter\",\n      \"U+0018\": \"Cancel\",\n      \"U+001B\": \"Escape\",\n      \"U+007F\": \"Delete\",\n      \"U+0300\": \"DeadGrave\",\n      \"U+0301\": \"DeadEacute\",\n      \"U+0302\": \"DeadCircumflex\",\n      \"U+0303\": \"DeadTilde\",\n      \"U+0304\": \"DeadMacron\",\n      \"U+0306\": \"DeadBreve\",\n      \"U+0307\": \"DeadAboveDot\",\n      \"U+0308\": \"DeadUmlaut\",\n      \"U+030A\": \"DeadAboveRing\",\n      \"U+030B\": \"DeadDoubleacute\",\n      \"U+030C\": \"DeadCaron\",\n      \"U+0327\": \"DeadCedilla\",\n      \"U+0328\": \"DeadOgonek\",\n      \"U+0345\": \"DeadIota\",\n      \"U+3099\": \"DeadVoicedSound\",\n      \"U+309A\": \"DeadSemivoicedSound\",\n\n      // keyIdenfier spec mapping to characters: https://www.w3.org/TR/2009/WD-DOM-Level-3-Events-20090908/#keyset-keyidentifiers\n      \"Exclamation\": \"!\",\n      \"DoubleQuote\": \"\\\"\",\n      \"Hash\": \"#\",\n      \"Dollar\": \"$\",\n      \"Ampersand\": \"&\",\n      \"LeftParen\": \"(\",\n      \"RightParen\": \")\",\n      \"Asterisk\": \"*\",\n      \"Plus\": \"+\",\n      \"Percent\": \"%\",\n      \"Comma\": \",\",\n      \"HyphenMinus\": \"-\",\n      \"Period\": \".\",\n      \"Solidus\": \"/\",\n      \"Colon\": \":\",\n      \"Semicolon\": \";\",\n      \"LessThan\": \"<\",\n      \"Equals\": \"=\",\n      \"GreaterThan\": \">\",\n      \"QuestionMark\": \"?\",\n      \"At\": \"@\",\n      \"LeftSquareBracket\": \"[\",\n      \"Backslash\": \"\\\\\",\n      \"RightSquareBracket\": \"]\",\n      \"Circumflex\": \"^\",\n      \"Underscore\": \"_\",\n      \"Grave\": \"`\",\n      \"LeftCurlyBracket\": \"{\",\n      \"Pipe\": \"|\",\n      \"RightCurlyBracket\": \"}\",\n      \"Euro\": \"€\",\n      \"InvertedExclamation\": \"¡\",\n\n      // Safari fixes: viewed in local tests\n      \"U+0010\": \"ContextMenu\"\n    }\n  };\n}\n\nexport type NormalizedKeyboardEvent =\n  {\n    type: string;\n    target: EventTarget | null;\n    key: string;\n    code: string;\n    ctrlKey: boolean;\n    altKey: boolean;\n    location: number;\n    shiftKey: boolean;\n    metaKey: boolean;\n    repeat: boolean;\n    isComposing: boolean;\n  };\n\n/**\n     Returns normalized keyboard event properties, following the current W3C UI Events spec\n *\n    @param evt - Keyboard event\n    @returns Normalized keyboard event data\n */\nexport function normalizeKeyboardEventData(evt: KeyboardEvent): NormalizedKeyboardEvent {\n  // event.key is supported from chrome:51, edge, ff: 29, ie: 9, not in safari\n  // event.keyIdentifier in chrome 26-54, opera 15-41, safara: 5.1\n  // safari doesn't provide either in keypress events, use U+evt.keyCode (uppercase 4-byte hex)\n\n  let key = evt.key;\n  if (!keydata)\n    initKeyMapping();\n  if (keydata.mapping[key])\n    key = keydata.mapping[key];\n  else if (key.startsWith(\"U+\")) // U+xxxx code\n    key = String.fromCodePoint(parseInt(key.substring(2), 16));\n\n  // Seen in chrome 56.0.2924.76 on linux, numpad '.' without numlock returns key \"\\u0000\"\n  if (evt.key === \"\\u0000\" && evt.code === \"NumpadDecimal\")\n    key = \".\";\n\n  return (\n    {\n      type: evt.type,\n      target: evt.target,\n      key: key,\n      code: evt.code || \"Unidentified\",\n      ctrlKey: evt.ctrlKey,\n      altKey: evt.altKey,\n      location: evt.location,\n      shiftKey: evt.shiftKey,\n      metaKey: evt.metaKey,\n      repeat: evt.repeat,\n      isComposing: evt.isComposing\n    });\n}\n\n/**\n * Stop, fully, an event\n *\n * @param event - Event to stop\n */\nexport function stop(event: Event) {\n  event.preventDefault();\n  event.stopImmediatePropagation();\n}\n\n/** Add an event listener to HTMLElements inside a document (which allows us to ensure that 'target' is a HTMLElement for easier typings) */\nexport function addDocEventListener<CurrentTargetType extends HTMLElement, Type extends keyof HTMLElementEventMap>(node: CurrentTargetType, type: Type, listener: (this: CurrentTargetType, ev: DocEvent<HTMLElementEventMap[Type], CurrentTargetType>) => void | Promise<void>, options?: AddEventListenerOptions): void;\nexport function addDocEventListener<CurrentTargetType extends HTMLElement>(node: CurrentTargetType, type: string, listener: (this: CurrentTargetType, evt: DocEvent<Event, CurrentTargetType>) => void | Promise<void>, options?: AddEventListenerOptions): void;\n\nexport function addDocEventListener<CurrentTargetType extends HTMLElement>(node: CurrentTargetType, type: string, listener: (this: CurrentTargetType, evt: DocEvent<Event, CurrentTargetType>) => void | Promise<void>, options?: AddEventListenerOptions): void {\n  node.addEventListener(type, listener as EventListener, options);\n}\n","import { debugFlags } from '@webhare/env';\nimport * as domevents from '../../../modules/system/js/dompack/src/events';\nimport \"@webhare/tsrun/src/polyfills\";\n\nlet locallocks: BusyLock[] = [];\nlet modallocked = false;\nlet uiwatcher: NodeJS.Timeout | null = null;\nlet installedanticancelhandler = false;\n\nlet currentbusymodaldialog: HTMLDialogElement | null = null;\nlet currentbusymodaluserdialog: HTMLDialogElement | null = null;\nlet busymodalcontent: string | HTMLElement | HTMLDialogElement | undefined;\nlet mylockmgr: LockManager | undefined;\n\nexport type BusyModalEvent = CustomEvent<{ show: boolean }>;\n\n// As 'Lock' already exists on the Web (https://developer.mozilla.org/docs/Web/API/Lock) and it's seldom used just use a longer name. Available since WH 5.4\nexport interface UIBusyLock extends Disposable {\n  release(): void;\n  [Symbol.dispose](): void;\n}\n\ndeclare global {\n  interface GlobalEventHandlersEventMap {\n    \"dompack:busymodal\": BusyModalEvent;\n  }\n  interface Window {\n    __dompack_busylockmanager?: LockManager;\n  }\n\n  // __dompack_busylockmanager: LockManager | undefined;  //\n}\n\nfunction getLockmgr(): LockManager {\n  if (!mylockmgr) {\n    mylockmgr = getParentLockManager() || new LockManager;\n    if (typeof window !== \"undefined\")\n      window.__dompack_busylockmanager = mylockmgr;\n  }\n  return mylockmgr;\n}\n\nfunction anyModalLocks() {\n  return locallocks.some(l => l.modal);\n}\n\n/* scheduleCheckUIFree is invoked by release() or when waitUIFree is explicitly called. the call from release() should\n   be a 'fast' path. We schedule a full check for the next tick if there's a chance it might actually find a free UI */\nfunction scheduleCheckUIFree() {\n  if (!uiwatcher && locallocks.length === 0)\n    uiwatcher = setTimeout(() => checkUIFree(), 0);\n}\n\n/* check if the UI is actually free. if so, remove busymodals and resolve waitUIFrees for the benefit of testfw  */\nfunction checkUIFree() {\n  uiwatcher = null;\n\n  if (modallocked && !anyModalLocks()) { //did the last frame-level *modal* lock just get released?\n    modallocked = false;\n    toggleBusyModal(false);\n  }\n\n  if (locallocks.length === 0) {\n    const lockmgr = getLockmgr();\n    lockmgr.busyframes.delete(window); //we won't release our block in the lockmanager until we've had a chance to remove our modal layer\n    lockmgr.checkUIFree(); //to resolve any waitUIFrees. runs in the top-level frame. note that lockmgr cares about ALL ui locks, not just modals\n  }\n}\n\nfunction isDialogElement(el: unknown): boolean {\n  return typeof el === \"object\" && (el as HTMLElement).matches?.(\"dialog\") || false;\n}\n\nfunction checkCancelEvent(evt: Event) {\n  if (modallocked)\n    evt.preventDefault();\n}\n\nfunction toggleBusyModal(show: boolean) {\n  //'islock' is legacy non-camel version. TypeScript typing should help us transition (since 5.3). 'as' shuts up the warning TODO remove 'islock' and the 'as'\n  if (!domevents.dispatchCustomEvent(window, 'dompack:busymodal', { bubbles: true, cancelable: true, detail: { show: show, islock: show } as BusyModalEvent['detail'] }))\n    return; //cancelled!\n\n  if (!installedanticancelhandler) {\n    //capture cancel, as it doesn't bubble up\n    addEventListener(\"cancel\", evt => checkCancelEvent(evt), { capture: true });\n    installedanticancelhandler = true;\n  }\n\n  if (show) {\n    if (isDialogElement(busymodalcontent)) { //the user provided us with an element\n      currentbusymodaluserdialog = busymodalcontent as HTMLDialogElement;\n      currentbusymodaluserdialog.showModal();\n    } else if (busymodalcontent) { //we'll create our own dialog\n      const dialog = document.createElement('dialog');\n      const toembed = typeof busymodalcontent === \"string\" ? document.createTextNode(busymodalcontent) : busymodalcontent.cloneNode(true);\n      dialog.className = \"dompack-busydialog\";\n      dialog.role = \"status\";\n      dialog.ariaLive = \"off\";\n      dialog.append(toembed);\n      document.body.appendChild(dialog);\n      currentbusymodaldialog = dialog;\n      dialog.showModal();\n      return;\n    }\n\n    document.documentElement.classList.add(\"dompack--busymodal\");\n    return;\n  }\n\n  //hiding\n  document.documentElement.classList.remove(\"dompack--busymodal\");\n  if (currentbusymodaluserdialog)\n    currentbusymodaluserdialog.close();\n  if (currentbusymodaldialog) { //we added a dialog to the dom\n    currentbusymodaldialog.close();\n    document.body.removeChild(currentbusymodaldialog);\n    currentbusymodaldialog = null;\n  }\n}\n\nclass LockManager {\n  locks: BusyLock[];\n  busyframes: Set<Window> = new Set;\n  busycounter: number;\n  deferreduipromise: PromiseWithResolvers<boolean> | null;\n\n  //this object is not for external consumption\n  constructor() {\n    this.locks = [];\n    this.busycounter = 0;\n    this.deferreduipromise = null;\n  }\n  add(lock: BusyLock) {\n    this.locks.push(lock);\n    const returnvalue = this.busycounter++;\n    return returnvalue;\n  }\n  release(lock: BusyLock) {\n    const pos = this.locks.indexOf(lock);\n    if (pos === -1) {\n      if (debugFlags.bus) {\n        console.error(\"Duplicate release of busy lock #\" + lock.locknum);\n        console.log(\"Lock allocated:\");\n        console.log(lock.acquirestack);\n        console.log(\"Lock first released:\");\n        console.log(lock.releasestack);\n      }\n      throw new Error(\"Duplicate release of busy lock\");\n    }\n\n    this.locks.splice(pos, 1);\n  }\n  getNumLocks() {\n    return this.locks.length;\n  }\n  //used by child windows to schedule a check in *our* frame (eg before they themselves are unloaded)\n  scheduleCheckUIFree() {\n    scheduleCheckUIFree();\n  }\n  checkUIFree() {\n    if (this.locks.length === 0 && this.busyframes.size === 0 && this.deferreduipromise) {\n      this.deferreduipromise.resolve(true);\n      this.deferreduipromise = null;\n    }\n  }\n  waitUIFree() {\n    if (!this.deferreduipromise)\n      this.deferreduipromise = Promise.withResolvers();\n\n    scheduleCheckUIFree(); //ensures uiwait is released at next tick if no locks are present at all\n    return this.deferreduipromise.promise;\n  }\n  logLocks() {\n    this.locks.forEach(lock => console.log('[bus] lock #' + lock.locknum, lock.acquirestack, lock));\n    console.log(\"[bus] total \" + this.locks.length + \" locks\");\n  }\n  getLockIds() {\n    return this.locks.map(l => \"#\" + l.locknum).join(\", \");\n  }\n}\n\n/** Configure an (accessible) modal dialog\n * @param bmc - What to show in the dialog: either a text or DOM fragment to clone.\n *              If a <dialog> element is passed, this dialog will be used instead of creating a new one.\n */\nexport function setupBusyModal(bmc: NonNullable<typeof busymodalcontent>) {\n  busymodalcontent = bmc;\n}\n\ninterface LockOptions {\n  ///Whether this lock should enable a modality laayer\n  modal?: boolean;\n}\n\nclass BusyLock implements UIBusyLock {\n  modal: boolean;\n  locknum: number;\n  acquirestack: string | undefined;\n  releasestack: string | undefined;\n\n  constructor(options?: LockOptions) {\n    //legacy non-camel name is 'ismodal'\n    this.modal = options?.modal ?? (options as { ismodal?: boolean })?.ismodal ?? false;\n\n    const lockmgr = getLockmgr();\n    this.locknum = lockmgr.add(this);\n    lockmgr.busyframes.add(window);\n    locallocks.push(this);\n\n    if (this.modal && !modallocked) {\n      modallocked = true;\n      toggleBusyModal(true);\n    }\n\n    if (debugFlags.bus) {\n      this.acquirestack = (new Error).stack;\n      console.trace('[bus] Busy lock #' + this.locknum + ' taken. ' + lockmgr.getNumLocks() + \" locks active now: \" + lockmgr.getLockIds());\n    }\n  }\n\n  [Symbol.dispose]() {\n    if (debugFlags.bus)\n      this.releasestack = (new Error).stack;\n\n    const lockmgr = getLockmgr();\n    lockmgr.release(this);\n    const lockpos = locallocks.indexOf(this);\n    locallocks.splice(lockpos, 1);\n\n    if (debugFlags.bus) {\n      console.trace('[bus] Busy lock #' + this.locknum + ' released. ' + lockmgr.getNumLocks() + \" locks active now: \" + lockmgr.getLockIds());\n    }\n\n    scheduleCheckUIFree();\n  }\n\n  release() {\n    this[Symbol.dispose]();\n  }\n}\n\n/** Return a promise resolving as soon as the UI (any accessible frame) is free for at least one tick */\nexport function waitUIFree() {\n  return getLockmgr().waitUIFree();\n}\n\n/**\n     flag userinterface as busy. tests then know not to interact with the UI until the busy flag is released\n *\n    @param options - Options.<br>\n                   - modal: true/false - Whether the lock is a modal lock\n */\nexport function flagUIBusy(options?: LockOptions): UIBusyLock {\n  return new BusyLock(options);\n}\n\nexport function getUIBusyCounter() {\n  return getLockmgr().busycounter;\n}\n\nfunction getParentLockManager(): LockManager | null {\n  try { //we're accessing a parent window, so we may hit security exceptions\n    if (!(window.parent?.__dompack_busylockmanager))\n      return null;\n\n    //if we connected to a parent...  deregister our locks, eg. if parent navigated our frame away\n    window.addEventListener(\"pagehide\", () => {\n      if (debugFlags.bus)\n        console.log(\"[bus] Frame unloading, \" + locallocks.length + \" locks pending.\", locallocks.map(l => \"#\" + l.locknum).join(\", \"), locallocks);\n\n      //switch to local instance in case anyone still tries to touch these locks during unload\n      const lockmgr = getLockmgr();\n      const locallockmgr = new LockManager;\n      locallocks.forEach(lock => { lockmgr.release(lock); locallockmgr.add(lock); });\n      locallocks = [];\n\n      lockmgr.busyframes.delete(window); //explicitly remove us so we won't be waited upon\n      lockmgr.scheduleCheckUIFree();\n      mylockmgr = locallockmgr;\n    });\n\n    return window.parent.__dompack_busylockmanager;\n  } catch (e) {\n    return null;\n  }\n}\n","\n/* Regex to identify dimensionless style sttributes. copied from old version of preact/src/constants.js (MIT)\n   meant to capture:\n  { boxFlex:1, boxFlexGroup:1, columnCount:1, fillOpacity:1, flex:1, flexGrow:1,\n    flexPositive:1, flexShrink:1, flexNegative:1, fontWeight:1, lineClamp:1, lineHeight:1,\n    opacity:1, order:1, orphans:1, strokeOpacity:1, widows:1, zIndex:1, zoom:1\n*/\nconst IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n\nexport { qS, qSA } from '@webhare/dompack/src/tree.ts';\n\nfunction generateInsertList(nodes: Array<string | Node>) {\n  if (nodes.length === 1)\n    return typeof nodes[0] === 'string' ? document.createTextNode(nodes[0]) : nodes[0];\n\n  const frag = document.createDocumentFragment();\n  nodes.forEach(node => frag.appendChild(typeof node === 'string' ? document.createTextNode(node) : node));\n  return frag;\n}\n\n/** @deprecated Use node.matches() */\nexport function matches(node: Element, selector: string): boolean {\n  //only invoke 'matches' if it exists. it *should* but past versions of dompack.matches would check for it too (and thus not fail if you passed in a string instead of a Node)\n  return node.matches?.(selector);\n}\n/** @deprecated Use node.closest() */\nexport function closest(node: Element, selector: string) {\n  if (node.closest)\n    return node.closest(selector);\n  //TODO: Warn about out-of-date browser?\n  let testNode: Element | null = node;\n  for (; testNode && !matches(testNode, selector); testNode = testNode.parentElement)\n    /*iterate*/;\n  return testNode;\n}\n//implements contains. TODO we only really need this on IE11, which doesn't consider a text node a child, we can probably fall back to native elsewhere ?\n/** @deprecated Use node.contains() */\nexport function contains(ancestor: Node, child: Node) {\n  if (ancestor.contains)\n    return ancestor.contains(child);\n  //TODO: Warn about out-of-date browser?\n  for (let testNode: Node | null = child; testNode; testNode = testNode.parentNode)\n    if (testNode === ancestor)\n      return true;\n  return false;\n}\n//insert a range of nodes before a node: https://dom.spec.whatwg.org/#dom-childnode-before\n/** @deprecated Use node.before() */\nexport function before(node: ChildNode, ...nodes: Array<string | Node>) {\n  if (node.before) {\n    node.before(...nodes);\n    return;\n  }\n  //TODO: Warn about out-of-date browser?\n  if (node.parentNode)\n    node.parentNode.insertBefore(generateInsertList(nodes), node);\n}\n//insert a range of nodes after a node: https://dom.spec.whatwg.org/#dom-childnode-after\n/** @deprecated Use node.after() */\nexport function after(node: ChildNode, ...nodes: Array<string | Node>) {\n  if (node.after) {\n    node.after(...nodes);\n    return;\n  }\n  //TODO: Warn about out-of-date browser?\n  if (node.parentNode)\n    node.parentNode.insertBefore(generateInsertList(nodes), node.nextSibling);\n}\n//replace node with a set of nodes : https://dom.spec.whatwg.org/#dom-childnode-replacewith\n/** @deprecated Use node.replaceWith() */\nexport function replaceWith(node: ChildNode, ...nodes: Array<string | Node>) {\n  if (node.replaceWith) {\n    node.replaceWith(...nodes);\n    return;\n  }\n  //TODO: Warn about out-of-date browser?\n  if (node.parentNode)\n    node.parentNode.replaceChild(generateInsertList(nodes), node);\n}\n//remove node with a set of nodes : https://dom.spec.whatwg.org/#dom-childnode-remove\n/** @deprecated Use node.remove() */\nexport function remove(node: ChildNode) {\n  if (node.remove) {\n    node.remove();\n    return;\n  }\n  //TODO: Warn about out-of-date browser?\n  if (node.parentNode)\n    node.parentNode.removeChild(node);\n}\n//insert nodes at start: https://dom.spec.whatwg.org/#dom-parentnode-prepend\n/** @deprecated Use node.prepend() */\nexport function prepend(node: ParentNode, ...nodes: Array<string | Node>) {\n  if (node.prepend) {\n    node.prepend(...nodes);\n    return;\n  }\n  //TODO: Warn about out-of-date browser?\n  node.insertBefore(generateInsertList(nodes), node.firstChild);\n}\n//insert nodes at end: https://dom.spec.whatwg.org/#dom-parentnode-append\n/** @deprecated Use node.append() */\nexport function append(node: ParentNode, ...nodes: Array<string | Node>) {\n  if (node.append) {\n    node.append(...nodes);\n    return;\n  }\n  //TODO: Warn about out-of-date browser?\n  node.appendChild(generateInsertList(nodes));\n}\n\n/**\n * Toggle a single class\n *\n * @param node - Node to modify\n * @param classname - Class to toggle\n * @param settoggle - true to enable, false to disable, undefined to toggle\n * @deprecated Just use classList.toggle on the node itself\n */\n/** @deprecated Use classList.toggle() */\nexport function toggleClass(node: Element, classname: string, settoggle?: boolean) {\n  if (arguments.length === 2) //in old dompack, 2 argument version toggled and 3 argument version toggled off. match that behavior\n    node.classList.toggle(classname);\n  else\n    node.classList.toggle(classname, settoggle);\n}\n\n/**\n     Toggle classes in a node\n *\n    @param node - Node which classes to toggle\n    @param toggles - Object, all keys will be added/removed based on the truthyness of their values\n */\nexport function toggleClasses(node: Element, toggles: { [key: string]: boolean }) {\n  if (typeof (toggles) !== \"object\")\n    throw new Error(\"Expected an object with keys as classnames\");\n  Object.keys(toggles).forEach(key => node.classList[toggles[key] ? \"add\" : \"remove\"](key));\n}\n\n/* remove the contents of an existing node */\n/** @deprecated Use node.replaceChildren() */\nexport function empty(node: Element) {\n  if (node.replaceChildren) {\n    node.replaceChildren();\n    return;\n  }\n  //TODO: Warn about out-of-date browser?\n  while (node.lastChild)\n    node.removeChild(node.lastChild);\n}\n\nexport function isDomReady() {\n  //ensure no domready events can run if there will never be a dom\n  return typeof document !== \"undefined\" && (document.readyState === \"interactive\" || document.readyState === \"complete\");\n}\n\n/* run the specified function 'on ready'. adds to DOMContentLoaded if dom is not ready yet. Exceptions/rejections from the ready handler will not be fatal to the rest of code execution */\nexport function onDomReady(callback: () => unknown | Promise<unknown>) {\n  if (isDomReady()) {\n    try {\n      void callback(); //Ignore unhandled rejections\n    } catch (e) { // We don't want our caller to 'stop' due to a domready exception as its usually the toplevel initialization code, so log the exception ourselves\n      void Promise.reject(new Error(\"Synchronous onDomReady handler failed\", { cause: e })); //Let it propagate as a standard unhandled rejection\n    }\n  } else\n    document.addEventListener(\"DOMContentLoaded\", () => void callback());\n}\n\n//parse JSON data, throw with more info on parse failure\nexport function getJSONAttribute<T>(node: Element, attributename: string): T | null {\n  try {\n    if (node.hasAttribute(attributename))\n      return JSON.parse(node.getAttribute(attributename) as string);\n  } catch (e) {\n    console.error(\"JSON parse failure on attribute '\" + attributename + \"' of node\", node);\n    throw e;\n  }\n  return null;\n}\n\n/**\n     Get the base URI of the current document. IE11 doesn't implement document.baseURI\n *\n    @param doc - Document to query. Defaults to window.document\n    @deprecated Use document.baseURI\n */\nexport function getBaseURI(doc: Document | undefined) {\n  if (!doc)\n    doc = window.document;\n  if (doc.baseURI)\n    return doc.baseURI;\n\n  const base = doc.querySelector('base');\n  if (base && base.href)\n    return base.href;\n  return doc.URL;\n}\n\n/**\n     Sets multiple styles on a node, automatically adding 'px' to numbers when appropriate\n    (can be used as replacement for Mootools .setStyles)\n *\n * @param node - Node to update\n * @param value - Styles to set\n */\nexport function setStyles(node: HTMLElement, value?: string | { [key: string]: string | number }) {\n  if (!value)\n    node.style.cssText = '';\n  else if (typeof value === 'string')\n    node.style.cssText = value || '';\n  else {\n    for (const [key, propvalue] of Object.entries(value)) {\n      // for numbers, add 'px' if the constant isn't dimensionless (eg zIndex)\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any -- we don't know which keys will be set\n      (node.style as any)[key] = typeof value[key] === 'number' && IS_NON_DIMENSIONAL.test(key) === false\n        ? propvalue + 'px'\n        : propvalue;\n    }\n  }\n}\n","import * as domtree from './tree';\nimport * as domevents from './events';\n\nexport type TakeFocusEvent = CustomEvent<{ options?: FocusOptions }>;\n\ndeclare global {\n  interface GlobalEventHandlersEventMap {\n    \"dompack:takefocus\": TakeFocusEvent;\n  }\n}\n\ntype RegistrationHandler<E extends Element = HTMLElement> = (node: E, index?: number) => void;\ntype ComponentRegistration<E extends Element = HTMLElement> =\n  {\n    selector: string;\n    handler: RegistrationHandler<E>;\n    index: number;\n    num: number;\n    afterdomready: boolean;\n  };\n\nconst components: Array<ComponentRegistration<Element>> = [];\nconst map = new WeakMap();\n\n//is a node completely in the dom? if we can find a sibling anywhere, it must be closed\nfunction isNodeCompletelyInDom(node: Element | null) {\n  for (; node; node = node.parentElement)\n    if (node.nextSibling)\n      return true;\n  return false;\n}\nfunction processRegistration<E extends Element>(item: E, reg: ComponentRegistration<E>, domready: boolean) {\n  if (!domready && !isNodeCompletelyInDom(item))\n    return; //not safe to register\n\n  if (!map.has(item))\n    map.set(item, [reg.num]);\n  else {\n    const list = map.get(item);\n    if (list.includes(reg.num))\n      return;\n    list.push(reg.num);\n  }\n  reg.handler(item, reg.index++); //note: if an exception is reported from Object.handler,\n}\nfunction applyRegistration<E extends Element>(reg: ComponentRegistration<E>, startnode?: Element) {\n  const domready = domtree.isDomReady();\n  if (reg.afterdomready && !domready)\n    return;\n\n  const items = Array.from((startnode || document).querySelectorAll(reg.selector)) as E[];\n  if (startnode?.matches(reg.selector))\n    items.unshift(startnode as E); //if startnode matches it has to be an E\n\n  items.forEach(item => {\n    try {\n      processRegistration<E>(item, reg, domready);\n    } catch (e) {\n      console.error(\"Exception handling registration of\", item, \"for rule\", reg.selector);\n      console.log(\"Registration\", reg);\n      if (e instanceof Error) {\n        console.log(e, e.stack);\n        if (window.onerror) {\n          // Send to onerror to trigger exception reporting\n          try {\n            // @ts-expect-error: fileName, lineNumber and columnNumber are non-standard\n            window.onerror(e.message, e.fileName || \"\", e.lineNumber || 1, e.columNumber || 1, e);\n          } catch (e2) { }\n        }\n      } else\n        console.log(e);\n    }\n  });\n}\n\n/* A focus implementation that allows the node to intercept focused, allowing eg\n   radio/checkbox replacements to redirect focus but also explicitly preventing\n   focus of a disabled element\n   Returns true when the focus operation was successfull or handled by an event handler.\n   @param node Node to focus\n   @param options.preventScroll Prevent scroll to focused element\n*/\nexport function focus(node: Element, options?: FocusOptions) {\n  if (!domevents.dispatchCustomEvent(node, 'dompack:takefocus', { bubbles: true, cancelable: true, detail: { options } }))\n    return true;\n\n  if (typeof (node as HTMLElement).focus !== \"function\" || (node as HTMLInputElement).disabled)\n    return false;\n\n  (node as HTMLInputElement).focus(options);\n  return true;\n}\n\n/**\n * @param node - Node to show\n * @param options - Scroll options\n * @deprecated invoke scrollIntoView directly  on the nodes\n */\nexport function scrollIntoView(node: Element, options?: ScrollIntoViewOptions) {\n  node.scrollIntoView(options);\n  return true;\n}\n\n/**\n    Register a component for auto-initialization.\n\n    @param selector - Selector the component must match\n    @param handler - Handler\n    @param options - Any unrecognized options are passed to the handler\n\n    The handler will be invoked with two parameters\n    - the node to register\n    - the index of the node (a unique counter for this selector - first is 0)\n */\n\nexport function register<E extends Element = HTMLElement>(selector: string, handler: RegistrationHandler<E>, options?: { afterdomready: boolean }) {\n  const newreg: ComponentRegistration<E> =\n  {\n    selector: selector,\n    handler: handler,\n    index: 0,\n    num: components.length,\n    afterdomready: !options || options.afterdomready\n  };\n  if (components.length === 0 && !domtree.isDomReady()) //first component... we'll need a ready handler\n    domtree.onDomReady(() => registerMissed());\n\n  components.push(newreg as ComponentRegistration<Element>);\n  applyRegistration(newreg);\n}\n\n// register any components we missed on previous scans\nexport function registerMissed(startnode?: Element) {\n  const todo = components.slice(0);\n  todo.forEach(item => applyRegistration(item, startnode));\n}\n","import { buildCookieHeader, type CookieOptions } from '@webhare/dompack/src/cookiebuilder';\nimport { escapeRegExp, parseTyped, stringify } from '@webhare/std';\n\nconst backup: {\n  sessionStorage?: Record<string, string>;\n  localStorage?: Record<string, string>;\n} = {};\ntype BrowserStorage = keyof typeof backup;\n\nexport function listCookies() {\n  return document.cookie.split(';').map(cookie => {\n    const parts = cookie.split('=');\n    return { name: decodeURIComponent(parts[0].trim()), value: decodeURIComponent(parts[1] || '') };\n  });\n}\n\nexport function setCookie(key: string, value: string, options?: CookieOptions) {\n  document.cookie = buildCookieHeader(key, value, options);\n}\n\nexport function getCookie(key: string): string | null {\n  const value = document.cookie.match('(?:^|;)\\\\s*' + escapeRegExp(key) + '=([^;]*)');\n  return (value) ? decodeURIComponent(value[1]) : null;\n}\n\nexport function deleteCookie(key: string, options?: CookieOptions) {\n  setCookie(key, '', { ...options, duration: -1, expires: undefined });\n}\n\nfunction get(storage: BrowserStorage, key: string): unknown | null {\n  let foundvalue: string | undefined | null = backup[storage]?.[key];\n  if (foundvalue) //if it's in the backups storage encoding can't fail either\n    return parseTyped(foundvalue);\n\n  try {\n    foundvalue = window[storage].getItem(key);\n    if (foundvalue)\n      return parseTyped(foundvalue);\n  } catch (e) {\n    //we ignore parse failures\n  }\n  return null;\n}\n\nfunction set(storage: BrowserStorage, key: string, value: unknown) {\n  const tostore = value !== null && value !== undefined ? stringify(value, { typed: true }) : null;\n  try {\n    if (tostore !== null)\n      window[storage].setItem(key, tostore);\n    else\n      window[storage].removeItem(key);\n    return;\n  } catch (e) {\n    //ignore\n  }\n\n  const store = (backup[storage] ||= {});\n  if (tostore !== null)\n    store[key] = tostore;\n  else\n    delete store[key];\n}\n\nexport function getSession<T>(key: string): T | null {\n  return get(\"sessionStorage\", key) as T | null;\n}\nexport function setSession<T>(key: string, value: T | null) {\n  set(\"sessionStorage\", key, value);\n}\nexport function getLocal<T>(key: string): T | null {\n  return get(\"localStorage\", key) as T | null;\n}\nexport function setLocal<T>(key: string, value: T | null) {\n  set(\"localStorage\", key, value);\n}\nexport function listSessionKeys() {\n  try {\n    return Object.keys(window.sessionStorage);\n  } catch (e) {\n    return Object.keys(backup.sessionStorage || {});\n  }\n}\nexport function listLocalKeys() {\n  try {\n    return Object.keys(window.localStorage);\n  } catch (e) {\n    return Object.keys(backup.localStorage || {});\n  }\n}\n","/* Identify devices for the purpose of analytics/tracing\n   NOT a library for feature detection!\n   Originally based on Mootools.Browser\n*/\n\nexport type Platform = \"windows\" | \"ios\" | \"webos\" | \"android\" | \"linux\" | \"mac\" | \"other\";\nexport type Device = \"desktop\" | \"mobile\" | \"tablet\" | \"\";\n\n/** Valid KeyboardEvent.key values (next to 'plain' keys)\n    This list was built from https://www.w3.org/TR/uievents-key/\n    using `console.log([...new Set([...document.querySelectorAll(\".key-table-key .key\")].map(_ => _.textContent))].toSorted().join(' | '))`\n*/\nexport type KeyAttributeValue = \"AVRInput\" | \"AVRPower\" | \"Accept\" | \"Again\" | \"AllCandidates\" | \"Alphanumeric\" | \"Alt\" | \"AltGraph\" | \"AppSwitch\" | \"ArrowDown\" | \"ArrowLeft\" | \"ArrowRight\" | \"ArrowUp\" | \"Attn\" | \"AudioBalanceLeft\" | \"AudioBalanceRight\" | \"AudioBassBoostDown\" | \"AudioBassBoostToggle\" | \"AudioBassBoostUp\" | \"AudioFaderFront\" | \"AudioFaderRear\" | \"AudioSurroundModeNext\" | \"AudioTrebleDown\" | \"AudioTrebleUp\" | \"AudioVolumeDown\" | \"AudioVolumeMute\" | \"AudioVolumeUp\" | \"Backspace\" | \"BrightnessDown\" | \"BrightnessUp\" | \"BrowserBack\" | \"BrowserFavorites\" | \"BrowserForward\" | \"BrowserHome\" | \"BrowserRefresh\" | \"BrowserSearch\" | \"BrowserStop\" | \"Call\" | \"Camera\" | \"CameraFocus\" | \"Cancel\" | \"CapsLock\" | \"ChannelDown\" | \"ChannelUp\" | \"Clear\" | \"Close\" | \"ClosedCaptionToggle\" | \"CodeInput\" | \"ColorF0Red\" | \"ColorF1Green\" | \"ColorF2Yellow\" | \"ColorF3Blue\" | \"ColorF4Grey\" | \"ColorF5Brown\" | \"Compose\" | \"ContextMenu\" | \"Control\" | \"Convert\" | \"Copy\" | \"CrSel\" | \"Cut\" | \"DVR\" | \"Dead\" | \"Delete\" | \"Dimmer\" | \"DisplaySwap\" | \"Eisu\" | \"Eject\" | \"End\" | \"EndCall\" | \"Enter\" | \"EraseEof\" | \"Escape\" | \"ExSel\" | \"Execute\" | \"Exit\" | \"F1\" | \"F10\" | \"F11\" | \"F12\" | \"F2\" | \"F3\" | \"F4\" | \"F5\" | \"F6\" | \"F7\" | \"F8\" | \"F9\" | \"FavoriteClear0\" | \"FavoriteClear1\" | \"FavoriteClear2\" | \"FavoriteClear3\" | \"FavoriteRecall0\" | \"FavoriteRecall1\" | \"FavoriteRecall2\" | \"FavoriteRecall3\" | \"FavoriteStore0\" | \"FavoriteStore1\" | \"FavoriteStore2\" | \"FavoriteStore3\" | \"FinalMode\" | \"Find\" | \"Fn\" | \"FnLock\" | \"GoBack\" | \"GoHome\" | \"GroupFirst\" | \"GroupLast\" | \"GroupNext\" | \"GroupPrevious\" | \"Guide\" | \"GuideNextDay\" | \"GuidePreviousDay\" | \"HangulMode\" | \"HanjaMode\" | \"Hankaku\" | \"HeadsetHook\" | \"Help\" | \"Hibernate\" | \"Hiragana\" | \"HiraganaKatakana\" | \"Home\" | \"Hyper\" | \"Info\" | \"Insert\" | \"InstantReplay\" | \"JunjaMode\" | \"KanaMode\" | \"KanjiMode\" | \"Katakana\" | \"Key11\" | \"Key12\" | \"LastNumberRedial\" | \"LaunchApplication1\" | \"LaunchApplication2\" | \"LaunchCalendar\" | \"LaunchContacts\" | \"LaunchMail\" | \"LaunchMediaPlayer\" | \"LaunchMusicPlayer\" | \"LaunchPhone\" | \"LaunchScreenSaver\" | \"LaunchSpreadsheet\" | \"LaunchWebBrowser\" | \"LaunchWebCam\" | \"LaunchWordProcessor\" | \"Link\" | \"ListProgram\" | \"LiveContent\" | \"Lock\" | \"LogOff\" | \"MailForward\" | \"MailReply\" | \"MailSend\" | \"MannerMode\" | \"MediaApps\" | \"MediaAudioTrack\" | \"MediaClose\" | \"MediaFastForward\" | \"MediaLast\" | \"MediaNextTrack\" | \"MediaPause\" | \"MediaPlay\" | \"MediaPlayPause\" | \"MediaPreviousTrack\" | \"MediaRecord\" | \"MediaRewind\" | \"MediaSkipBackward\" | \"MediaSkipForward\" | \"MediaStepBackward\" | \"MediaStepForward\" | \"MediaStop\" | \"MediaTopMenu\" | \"MediaTrackNext\" | \"MediaTrackPrevious\" | \"Meta\" | \"MicrophoneToggle\" | \"MicrophoneVolumeDown\" | \"MicrophoneVolumeMute\" | \"MicrophoneVolumeUp\" | \"ModeChange\" | \"NavigateIn\" | \"NavigateNext\" | \"NavigateOut\" | \"NavigatePrevious\" | \"New\" | \"NextCandidate\" | \"NextFavoriteChannel\" | \"NextUserProfile\" | \"NonConvert\" | \"Notification\" | \"NumLock\" | \"OnDemand\" | \"Open\" | \"PageDown\" | \"PageUp\" | \"Pairing\" | \"Paste\" | \"Pause\" | \"PinPDown\" | \"PinPMove\" | \"PinPToggle\" | \"PinPUp\" | \"Play\" | \"PlaySpeedDown\" | \"PlaySpeedReset\" | \"PlaySpeedUp\" | \"Power\" | \"PowerOff\" | \"PreviousCandidate\" | \"Print\" | \"PrintScreen\" | \"Process\" | \"Props\" | \"RandomToggle\" | \"RcLowBattery\" | \"RecordSpeedNext\" | \"Redo\" | \"RfBypass\" | \"Romaji\" | \"STBInput\" | \"STBPower\" | \"Save\" | \"ScanChannelsToggle\" | \"ScreenModeNext\" | \"ScrollLock\" | \"Select\" | \"Settings\" | \"Shift\" | \"SingleCandidate\" | \"Soft1\" | \"Soft2\" | \"Soft3\" | \"Soft4\" | \"SpeechCorrectionList\" | \"SpeechInputToggle\" | \"SpellCheck\" | \"SplitScreenToggle\" | \"Standby\" | \"Subtitle\" | \"Super\" | \"Symbol\" | \"SymbolLock\" | \"TV\" | \"TV3DMode\" | \"TVAntennaCable\" | \"TVAudioDescription\" | \"TVAudioDescriptionMixDown\" | \"TVAudioDescriptionMixUp\" | \"TVContentsMenu\" | \"TVDataService\" | \"TVInput\" | \"TVInputComponent1\" | \"TVInputComponent2\" | \"TVInputComposite1\" | \"TVInputComposite2\" | \"TVInputHDMI1\" | \"TVInputHDMI2\" | \"TVInputHDMI3\" | \"TVInputHDMI4\" | \"TVInputVGA1\" | \"TVMediaContext\" | \"TVNetwork\" | \"TVNumberEntry\" | \"TVPower\" | \"TVRadioService\" | \"TVSatellite\" | \"TVSatelliteBS\" | \"TVSatelliteCS\" | \"TVSatelliteToggle\" | \"TVTerrestrialAnalog\" | \"TVTerrestrialDigital\" | \"TVTimer\" | \"Tab\" | \"Teletext\" | \"Undo\" | \"Unidentified\" | \"VideoModeNext\" | \"VoiceDial\" | \"WakeUp\" | \"Wink\" | \"Zenkaku\" | \"ZenkakuHankaku\" | \"ZoomIn\" | \"ZoomOut\" | \"ZoomToggle\";\n\nexport type UserAgentInfo =\n  {\n    /** Browser name, eg 'chrome' or 'firefox' */\n    name: string;\n    /** Browser numeric version (eg 97) */\n    version: number;\n    /** Platform the browser is running on (eg 'windows') */\n    platform: Platform;\n    /** Type of device (eg 'desktop' or 'tablet' for an iPad) */\n    device: Device;\n    /** platform-browsername-version eg ios-safari-11 */\n    triplet: string;\n  };\n\nexport function parseUserAgent(ua: string): UserAgentInfo {\n  ua = ua.toLowerCase();\n\n  // chrome is included in the edge UA, so need to check for edge first, before checking if it's chrome.\n  // safari is included in the miuibrowser UA, so need to check for miuibrowser first, before checking if it's safari.\n  let UA: RegExpMatchArray | null = ua.match(/(edge|miuibrowser)[\\s/:]([\\w\\d.]+)/);\n  if (!UA)\n    UA = ua.match(/(opera|ie|firefox|chrome|trident|crios|version)[\\s/:]([\\w\\d.]+)?.*?(safari|(?:rv[\\s/:]|version[\\s/:])([\\w\\d.]+)|$)/);\n  if (!UA) { //try ios 11.4.1\n    UA = ua.match(/; cpu os ([\\d]+)/);\n    if (UA)\n      UA = ['', 'safari', UA[1]];\n  }\n  if (!UA)\n    UA = ['', 'unknown', \"0\"];\n\n  if (UA[1] === 'trident') {\n    UA[1] = 'ie';\n    if (UA[4]) UA[2] = UA[4];\n  } else if (UA[1] === 'crios') {\n    UA[1] = 'chrome';\n  }\n\n  let platform = ua.match(/ip(?:ad|od|hone)/) ? 'ios' : (ua.match(/(?:webos|android)/) || ua.match(/mac|win|linux/) || ['other'])[0];\n  if (platform === 'win')\n    platform = 'windows';\n\n  const name = (UA[1] === 'version') ? UA[3] : UA[1];\n  const version = parseInt((UA[1] === 'opera' && UA[4]) ? UA[4] : UA[2]);\n  const device = ua.match(/ipad/) ? 'tablet' : ['ios', 'webos', 'android'].includes(platform) ? 'mobile' : ['mac', 'windows', 'linux'].includes(platform) ? 'desktop' : '';\n\n  return {\n    name,\n    version,\n    platform: platform as Platform,\n    device,\n    triplet: platform + '-' + name + '-' + version\n  };\n}\n\n/**\n * Is the native 'multiselect' modifier for this platform pressed? (Cmd for Mac, Ctrl for Windows/Linux)\n *\n * @param event - Event to check\n */\nexport function isMultiSelectKey(event: KeyboardEvent | MouseEvent): boolean {\n  return getBrowser().platform === 'mac' ? event.metaKey : event.ctrlKey;\n}\n\n/**\n * Is the native 'copy' modifier for this platform pressed?\n *\n * @param event - Event to check\n */\nexport function isCopyKey(event: KeyboardEvent | MouseEvent): boolean {\n  return getBrowser().platform === 'mac' ? event.altKey : event.ctrlKey;\n}\n\nlet browser: Readonly<UserAgentInfo> | undefined;\n\n/** Get browser information */\nexport function getBrowser(): Readonly<UserAgentInfo> {\n  browser ||= Object.freeze(parseUserAgent(globalThis.navigator?.userAgent || \"\"));\n  //Offer this as a function to improve treeshakability\n  return browser;\n}\n\n//CSS Query used to find valid submittors\nexport const submitselector = 'input[type=submit],input[type=image],button[type=submit],button:not([type])';\n//Must match possible types returned by the submitselector\nexport type SubmitSelectorType = HTMLInputElement | HTMLButtonElement;\n","import { isHTMLElement } from \"@webhare/dompack\";\nimport type { CMSConfig } from \"@mod-system/js/internal/generation/gen_misc_ts\";\n\nlet config: CMSConfig | undefined;\n\nfunction forwardPublisherNavigation(event: Event) {\n  /* we watch for clicks.. as we only want to update the Publisher's selection for user triggered actions (otherwise we'd\n     start navigation in response to JS or internal link autoredirects) */\n  if (!isHTMLElement(event.target) || !config?.interfaceServers)\n    return;\n\n  const navaction = event.target.closest<HTMLAnchorElement>('a[href]');\n  if (!navaction)\n    return;\n\n  const desturl = navaction.href;\n  if (desturl.split('#')[0] !== location.href.split('#')[0]) { //it's actual navigation...\n    for (const origin of config.interfaceServers)\n      if (origin.startsWith(document.referrer || ''))\n        try {\n          window.top?.postMessage({ type: \"webhare-navigation\", location: desturl }, origin);\n        } catch (ignore) {\n          //ignore crossdomain errors\n        }\n  }\n}\n\nasync function configureForCMS() {\n  try {\n    const res = await fetch(\"/.wh/ea/config/cms.json\");\n    config = await res.json();\n  } catch (e) {\n    console.log(\"Failed to get CMS configuration\", e);\n    return;\n  }\n  window.addEventListener(\"click\", forwardPublisherNavigation);\n}\n\nif (typeof window !== \"undefined\" && window !== window.top) { //if we're in an iframe, we may be running in WebHare and need to forward navigation events\n  //we have no way to detect whether we're in a WebHare iframe or a 3rd party iframe. assume it's webhare and grab the interface servers\n  void configureForCMS();\n}\n","import \"@webhare/dompack/reset.css\";\nimport \"leaflet/dist/leaflet.css\";\nimport \"./frontend.scss\";\n\nimport { createApp } from \"vue\";\nimport { onDomReady } from \"@webhare/dompack\";\nimport { setupWRDAuth } from \"@webhare/frontend\";\nimport App from \"./App.vue\";\nimport { router } from \"./lib/router\";\nimport { initTheme } from \"./lib/useTheme\";\n\ndeclare module \"@webhare/frontend\" {\n  interface FrontendDataTypes {\n    \"statiegeldnl:admin\": { hosted: true; siteRoot: string };\n  }\n}\n\n// Resolve and apply the theme synchronously so the first paint matches the\n// stored preference instead of flashing the default.\ninitTheme();\n\nonDomReady(async () => {\n  const app = createApp(App);\n  app.use(router);\n  // Wait for the first route to resolve so <router-view> has rendered before\n  // mount; otherwise setupWRDAuth() scans an empty DOM.\n  await router.isReady();\n  app.mount(\"#app\");\n\n  // AFTER mount: dompack.register() does a one-shot scan per selector, so the\n  // login form and the logout link must already be in the DOM.\n  //\n  // The onLogin callback keeps setupWRDAuth from reloading the whole page (its\n  // default navigates to `returnTo = location.href` and drops the hash, which\n  // would break every deep link). No reload means the MutationObserver in\n  // useWrdAuthState flips the state reactively; we then send the user to the\n  // locations list rather than leaving them on whatever hash was there.\n  setupWRDAuth({\n    onLogin: async () => {\n      await router.replace({ name: \"locations\" });\n    },\n  });\n});\n","var UNKNOWN_FUNCTION = '<unknown>';\n/**\n * This parses the different stack traces and puts them into one format\n * This borrows heavily from TraceKit (https://github.com/csnover/TraceKit)\n */\n\nfunction parse(stackString) {\n  var lines = stackString.split('\\n');\n  return lines.reduce(function (stack, line) {\n    var parseResult = parseChrome(line) || parseWinjs(line) || parseGecko(line) || parseNode(line) || parseJSC(line);\n\n    if (parseResult) {\n      stack.push(parseResult);\n    }\n\n    return stack;\n  }, []);\n}\nvar chromeRe = /^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc|<anonymous>|\\/|[a-z]:\\\\|\\\\\\\\).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nvar chromeEvalRe = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\nfunction parseChrome(line) {\n  var parts = chromeRe.exec(line);\n\n  if (!parts) {\n    return null;\n  }\n\n  var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n\n  var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n  var submatch = chromeEvalRe.exec(parts[2]);\n\n  if (isEval && submatch != null) {\n    // throw out eval line/column and use top-most line/column number\n    parts[2] = submatch[1]; // url\n\n    parts[3] = submatch[2]; // line\n\n    parts[4] = submatch[3]; // column\n  }\n\n  return {\n    file: !isNative ? parts[2] : null,\n    methodName: parts[1] || UNKNOWN_FUNCTION,\n    arguments: isNative ? [parts[2]] : [],\n    lineNumber: parts[3] ? +parts[3] : null,\n    column: parts[4] ? +parts[4] : null\n  };\n}\n\nvar winjsRe = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nfunction parseWinjs(line) {\n  var parts = winjsRe.exec(line);\n\n  if (!parts) {\n    return null;\n  }\n\n  return {\n    file: parts[2],\n    methodName: parts[1] || UNKNOWN_FUNCTION,\n    arguments: [],\n    lineNumber: +parts[3],\n    column: parts[4] ? +parts[4] : null\n  };\n}\n\nvar geckoRe = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar geckoEvalRe = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nfunction parseGecko(line) {\n  var parts = geckoRe.exec(line);\n\n  if (!parts) {\n    return null;\n  }\n\n  var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n  var submatch = geckoEvalRe.exec(parts[3]);\n\n  if (isEval && submatch != null) {\n    // throw out eval line/column and use top-most line number\n    parts[3] = submatch[1];\n    parts[4] = submatch[2];\n    parts[5] = null; // no column when eval\n  }\n\n  return {\n    file: parts[3],\n    methodName: parts[1] || UNKNOWN_FUNCTION,\n    arguments: parts[2] ? parts[2].split(',') : [],\n    lineNumber: parts[4] ? +parts[4] : null,\n    column: parts[5] ? +parts[5] : null\n  };\n}\n\nvar javaScriptCoreRe = /^\\s*(?:([^@]*)(?:\\((.*?)\\))?@)?(\\S.*?):(\\d+)(?::(\\d+))?\\s*$/i;\n\nfunction parseJSC(line) {\n  var parts = javaScriptCoreRe.exec(line);\n\n  if (!parts) {\n    return null;\n  }\n\n  return {\n    file: parts[3],\n    methodName: parts[1] || UNKNOWN_FUNCTION,\n    arguments: [],\n    lineNumber: +parts[4],\n    column: parts[5] ? +parts[5] : null\n  };\n}\n\nvar nodeRe = /^\\s*at (?:((?:\\[object object\\])?[^\\\\/]+(?: \\[as \\S+\\])?) )?\\(?(.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nfunction parseNode(line) {\n  var parts = nodeRe.exec(line);\n\n  if (!parts) {\n    return null;\n  }\n\n  return {\n    file: parts[2],\n    methodName: parts[1] || UNKNOWN_FUNCTION,\n    arguments: [],\n    lineNumber: +parts[3],\n    column: parts[4] ? +parts[4] : null\n  };\n}\n\nexport { parse };\n","import * as stacktrace_parser from \"stacktrace-parser\";\n\nexport type StackTraceItem = {\n  filename: string;\n  line: number;\n  col: number;\n  func: string;\n};\n\nexport type StackTrace = StackTraceItem[];\n\nexport function parseTrace(e: Error): StackTrace {\n  if (!e?.stack)\n    return [];\n\n  const trace = stacktrace_parser.parse(e.stack);\n  return trace.map(i => ({ filename: i.file || \"\", line: i.lineNumber || 1, col: i.column || 1, func: (i.methodName || \"\") }));\n}\n\nexport function getStackTrace(): StackTrace {\n  return parseTrace(new Error()).slice(1);\n}\n\nexport function formatTrace(trace: StackTraceItem[]): string {\n  return trace.map(e =>\n    `    at ${e.func} (${e.filename}:${e.line}:${e.col})`).join(\"\\n\");\n}\n\nexport function prependStackTrace(error: Error, trace: StackTrace) {\n  if (!error.stack)\n    return; //no stack to manipulate\n\n  const stacklines = error.stack?.split(\"\\n\") || [];\n  const tracelines = formatTrace(trace);\n  error.stack = (stacklines[0] ? stacklines[0] + \"\\n\" : \"\") + tracelines + '\\n' + (stacklines.slice(1).join(\"\\n\"));\n  return error;\n}\n","// This gets TypeScript to refer to us by our @webhare/... name in auto imports:\ndeclare module \"@webhare/jsonrpc-client\" {\n}\n\nimport { debugFlags, backendBase } from \"@webhare/env\";\nimport { type StackTrace, parseTrace, prependStackTrace, type PromisifyInterface } from \"@webhare/js-api-tools\";\n\n//just number RPCs globally instead of per server, makes debug ouput more useful\nlet globalseqnr = 0;\n\nexport interface RPCCallOptions {\n  /** Append function name to URLs. Purely for better logging/visibility as the WebHare JSONRPC server will ignore it */\n  addfunctionname?: boolean;\n  /** Custom URL marker */\n  urlappend?: string;\n  /** Call timeout */\n  timeout?: number;\n  /** Abort signal to cancel the RPC */\n  signal?: AbortSignal;\n  /** Retry on 429 */\n  retry429?: boolean;\n  /** Silent - do not log errors */\n  silent?: boolean;\n  /** Debug (Follows 'rpc' debugflag if not explicity specified) */\n  debug?: boolean;\n  /** Wrap result with response info */\n  wrapresult?: boolean;\n  keepalive?: boolean;\n  /** Headers to submit (Eg Authorization) */\n  headers?: Record<string, string>;\n  /** Base URL for service paths */\n  baseUrl?: string;\n  /** Overide fetch credentials option (defaults to same-origin) */\n  credentials?: RequestCredentials;\n}\n\nexport type RequestID = number | string | null;\n\nexport interface JSONRPCBaseResponse {\n  id: RequestID;\n  debug?: {\n    consoleLog: Array<{\n      //TODO this is Serialized<ConsoleLogItem[]> - should probably rename it to SerializedToJSON and move to std or env ?\n      /** Date when console function was called */\n      when: string;\n      /** `console` method that was called (eg 'log') */\n      method: string;\n      /** Logged data */\n      data: string;\n      /** Location of caller */\n      location?: {\n        filename: string;\n        line: number;\n        col: number;\n        func: string;\n      };\n      /** Codecontext */\n      codeContextId?: string;\n    }>;\n  };\n}\n\nexport interface JSONRPCSuccesfulResponse extends JSONRPCBaseResponse {\n  error: null;\n  result: unknown;\n}\n\nexport interface JSONRPCErrorResponse extends JSONRPCBaseResponse {\n  result: null;\n  error: {\n    code: number;\n    message: string;\n    data?: {\n      trace?: StackTrace;\n    };\n  };\n}\n\nexport type JSONRPCResponse = JSONRPCSuccesfulResponse | JSONRPCErrorResponse;\n\nfunction getDebugAppend() {\n  if (typeof window !== \"undefined\" && typeof window.location !== \"undefined\") {\n    const urldebugvar = new URL(window.location.href).searchParams.get(\"wh-debug\");\n    if (urldebugvar)\n      return '?wh-debug=' + encodeURIComponent(urldebugvar);\n  }\n  return '';\n}\n\nclass ControlledCall {\n  client: RPCClient;\n  options: RPCCallOptions;\n  abortcontroller: AbortController;\n  timeout?: number;\n  _callurl: string;\n  _fetchoptions: RequestInit;\n  promise: Promise<unknown>;\n  timedout?: boolean;\n  aborted?: boolean;\n\n  constructor(client: RPCClient, method: string, stack: StackTrace | null, id: number, options: RPCCallOptions, callurl: string, fetchoptions: RequestInit) {\n    this.client = client;\n    this.options = options;\n\n    // if(options.timeout || options.signal) //as long as rpcResolve exists, we'll ALWAYS need to setup a controller\n    {\n      this.abortcontroller = new AbortController;\n      fetchoptions.signal = this.abortcontroller.signal;\n\n      if (options.timeout && options.timeout > 0) {\n        this.timeout = options.timeout;\n        setTimeout(() => this._handleTimeout(), options.timeout);\n      }\n      if (options.signal) {\n        options.signal.addEventListener(\"abort\", () => this._abort());\n      }\n    }\n\n    this._callurl = callurl;\n    this._fetchoptions = fetchoptions;\n\n    const fetchpromise = fetch(this._callurl, this._fetchoptions);\n    this.promise = this._completeCall(method, stack, id, fetchpromise) as Promise<unknown>;\n  }\n  _handleTimeout() {\n    this.timedout = true;\n    this.abortcontroller.abort();\n  }\n  _abort() {\n    this.aborted = true;\n    this.abortcontroller.abort();\n  }\n\n  async _completeCall(method: string, requestStack: StackTrace | null, id: number, fetchpromise: Promise<Response>) {\n    let response;\n    try {\n      for (; ;) { //loop to handle \"429 Conflict\"s\n        response = await fetchpromise;\n        if (response.status === 429 && !(\"retry429\" in this.options && !this.options.retry429) && response.headers.get(\"Retry-After\")) {\n          const retryafter = parseInt(response.headers.get(\"Retry-After\") || \"\");\n          if (this.client.debug)\n            console.warn(`[rpc] We are being throttled (429 Too Many Requests) - retrying after ${retryafter} seconds`);\n\n          await new Promise(resolve => setTimeout(resolve, retryafter * 1000));\n          fetchpromise = fetch(this._callurl, this._fetchoptions);\n          continue;\n        }\n        break;\n      }\n    } catch (exception) {\n      if (this.client.debug)\n        console.log(`[rpc] #${id} Exception invoking '${method}'`, exception);\n\n      if (this.aborted)\n        throw new Error(`RPC Aborted`);\n      else if (this.timedout)\n        throw new Error(`RPC Timeout: timeout was set to ${this.timeout} milliseconds`);\n      else\n        throw new Error(`RPC Failed: exception: ` + exception);\n    }\n\n    let jsonresponse;\n    try {\n      jsonresponse = await response.json() as JSONRPCResponse;\n      if (jsonresponse?.debug) {\n        if (jsonresponse.debug.consoleLog) {\n          for (const logitem of jsonresponse.debug.consoleLog) {\n            //should we log 'when'? it's getting more and more noisy then though....\n            //TODO should we match the remote's method (after validating) or just keep eveyrthing at 'log' ?\n            console.log(`[remote:${logitem.method}] ${logitem.location ? `${logitem.location.filename.split(\"/\").at(-1)}:${logitem.location.line}: ` : ''}${logitem.data}`);\n          }\n        }\n\n        delete jsonresponse.debug; //reduce noise in later logs\n      }\n\n      if (this.client.debug)\n        console.log(`[rpc] #${id} Received response to '${method}'`, jsonresponse);\n    } catch (exception) {\n      if (this.client.debug)\n        console.warn(`[rpc] #${id} Response was not valid JSON`, exception);\n    }\n\n    if (!jsonresponse)\n      throw new Error(\"RPC Failed: Invalid JSON/RPC response received\");\n\n    if (jsonresponse?.error) {\n      const err = new Error(\"RPC Error: \" + (jsonresponse.error.message || \"Unknown error\"));\n      if (jsonresponse.error.data?.trace) {\n        try {\n          prependStackTrace(err, jsonresponse.error.data.trace);\n        } catch (err2) {\n          //ignore stacktrace manipulation error\n        }\n      }\n\n      if (!this.options.silent)\n        this.client._tryLogError(requestStack, err);\n      throw err;\n    }\n\n    if (response.status === 200 && jsonresponse && jsonresponse.id !== id)\n      throw new Error(\"RPC Failed: Invalid JSON/RPC response received\");\n\n    if (this.options.wrapresult) {\n      return {\n        status: response.status,\n        result: jsonresponse.result || null,\n        error: jsonresponse.error || null,\n        retryafter: response.headers.get(\"Retry-After\") ? parseInt(response.headers.get(\"Retry-After\") || \"\") : null\n      };\n    }\n\n    return jsonresponse.result;\n  }\n}\n\n/** Invokes (WebHare) JSON/RPC\n    @param url - URL to invoke (leave empty or pass no parameters at all to callback to the current page)\n    */\nclass RPCClient {\n  url: string;\n  addfunctionname: boolean;\n  urlappend: string;\n  options: RPCCallOptions;\n  whservicematch: RegExpMatchArray | null;\n\n  constructor(url: string, options?: RPCCallOptions) {\n    this.options = {\n      timeout: 0,\n      debug: false,\n      ...options\n    };\n\n    if (!url)\n      throw new Error(`You must specify either a WebHare service name or a full URL`);\n\n    this.url = url;\n    this.whservicematch = this.url.match(/^([a-z0-9_]+):([a-z0-9_]+)$/);\n    //if shorthand syntax is used, we know we're talking to our local webhare. add function names and the profiling flag if needed\n    this.addfunctionname = this.options.addfunctionname !== undefined ? this.options.addfunctionname : Boolean(this.whservicematch);\n    this.urlappend = this.options.urlappend !== undefined ? this.options.urlappend : this.whservicematch ? getDebugAppend() : \"\";\n  }\n\n  get debug() {\n    return this.options.debug || debugFlags.rpc;\n  }\n\n  _tryLogError(requestStack: StackTrace | null, error: Error) {\n    console.group();\n    console.warn(\"RPC failed:\", error);\n    if (requestStack) {\n      console.warn(\"Stack at calling point\");\n      console.log(requestStack);\n    }\n    console.groupEnd();\n  }\n\n  //calculate the final URL. delayed here so services can be created on import (getDefaultRPCBase may require waiting for service.ready)\n  private getURL() {\n    //wh_services are always in the root (and soon inside /.wh)\n    const url = this.whservicematch ? `/wh_services/${this.whservicematch[1]}/${this.whservicematch[2]}` : this.url;\n    if (url.match(/^https?:\\/\\//))\n      return url;\n\n    if (this.options.baseUrl)\n      return new URL(url, this.options.baseUrl).toString();\n    else if (backendBase)\n      return backendBase + (backendBase.endsWith('/') && url.startsWith('/') ? url.substring(1) : url);\n    else\n      throw new Error(`You must set the baseUrl option when using the JSONRPC Client without a full URL outside Webhare`);\n  }\n\n  invoke(method: string, params: unknown[]) {\n    //build the URL, add profiling and function parameters where needed\n    let callurl = this.getURL();\n    if (this.addfunctionname) //simplifies log analysis, ignored by the server\n      callurl += `/${method}`;\n    callurl += this.urlappend;\n\n    const id = ++globalseqnr;\n    let requestStack: StackTrace | null = null;\n\n    if (this.debug) {\n      requestStack = parseTrace(new Error);\n      console.log(`[rpc] #${id} Invoking '${method}'`, params, callurl);\n    }\n\n    const fetchoptions: RequestInit = {\n      method: \"POST\",\n      credentials: this.options.credentials || 'same-origin', //this is the default since 2017-08-25, but Edge pre-18 is still around and will fail here\n      headers: {\n        \"Accept\": \"application/json\",\n        \"Content-Type\": \"application/json; charset=utf-8\",\n        ...this.options.headers\n      },\n      body: JSON.stringify(\n        {\n          id: id,\n          method: method,\n          params: params || []\n        }),\n      keepalive: Boolean(this.options.keepalive)\n    };\n\n    return new ControlledCall(this, method, requestStack, id, this.options, callurl, fetchoptions).promise;\n  }\n}\n\ntype ServiceBase<T> = {\n  withOptions(options: RPCCallOptions): T & ServiceBase<T>;\n};\n\nclass ServiceProxy<T> {\n  client: RPCClient;\n\n  constructor(client: RPCClient) {\n    this.client = client;\n  }\n\n  get(target: object, prop: string, receiver: unknown) {\n    if (prop === 'withOptions') { //create a withOptions function\n      return (options: RPCCallOptions) => {\n        const newoptions = {\n          ...this.client.options,\n          ...options,\n          headers: { ...this.client.options.headers, ...options.headers }\n        };\n        return createClient<T>(this.client.url, newoptions);\n      };\n    }\n\n    return (...args: unknown[]) => this.client.invoke(prop, args);\n  }\n}\n\n\n/** Creates an async version of the functions in a class\n * @typeParam ServiceType - Type definition of the service class that implements this service.\n*/\ntype ConvertToRPCInterface<ServiceType> = PromisifyInterface<ServiceType, `_${string}` | \"close\" | \"emit\">;\n\n/** Get the client interface type as would be returned by createClient */\nexport type GetClientInterface<Client> = ConvertToRPCInterface<Client> & ServiceBase<ConvertToRPCInterface<Client>>;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- If you don't care to type the service, just assume it can do anything\nexport function createClient<Client = any>(servicename: string, options?: RPCCallOptions): GetClientInterface<Client> {\n  const rpcclient = new RPCClient(servicename, options);\n  return new Proxy({}, new ServiceProxy<Client>(rpcclient)) as GetClientInterface<Client>;\n}\n","// This gets TypeScript to refer to us by our @webhare/... name in auto imports:\ndeclare module \"@webhare/rpc\" {\n  export interface KnownRPCServices {\n    /* Filled by generated services.ts files */\n  }\n}\n\nimport { debugFlags, backendBase } from \"@webhare/env\";\nimport { type StackTrace, parseTrace, prependStackTrace, type PromisifyInterface } from \"@webhare/js-api-tools\";\nimport { omit, parseTyped, stringify } from \"@webhare/std\";\n\n//Preload interface definitions. To solve this cleaner we would have to do some sort of auto-inject but how to robustly do that accross IDEs/Tscs ?\n\n//@ts-ignore Ignore if it doesn't exist. this line *must* remain a @ts-ignore\nimport type { } from \"@mod-platform/generated/ts/services.ts\";\n//@ts-ignore Ignore if it doesn't exist. this line *must* remain a @ts-ignore\nimport type { } from \"wh:ts/services.ts\";\n\nfunction isAbsolute(url: string) {\n  return url.startsWith(\"http:\") || url.startsWith(\"https:\");\n}\n\nfunction getBaseURL() {\n  if (!backendBase)\n    throw new Error(`You must set the baseUrl option when using the RPC Client outside Webhare`);\n  return isAbsolute(backendBase) ? backendBase : new URL(backendBase, location.origin);\n}\n\nexport interface RPCClientOptions {\n  /** Custom request update. Use to eg. set keepalive or add debug variables to the URL */\n  onBeforeRequest?: (url: URL, requestInit: RequestInit & { headers: Headers }) => void;\n  /** Response callback. Use this if you need to capture details on the incoming respones. May be invoked multiple times per request, eg due to 429 errors! */\n  onResponse?: (response: Response) => void;\n  /** Call timeout */\n  timeout?: number;\n  /** Abort signal to cancel the RPC */\n  signal?: AbortSignal;\n  /** Retry on 429 */\n  retry429?: boolean;\n  /** Silent - do not log errors */\n  silent?: boolean;\n  /** Debug (Follows 'rpc' debugflag if not explicity specified) */\n  debug?: boolean;\n  /** Headers to submit (Eg Authorization) */\n  headers?: Record<string, string>;\n  /** Base URL for service paths */\n  baseUrl?: string;\n}\n\n/** RPC Response format */\nexport type RPCResponse = ({\n  /** Result. Not present if the function didn't return anything */\n  result?: unknown;\n} | {\n  /** Error message */\n  error: string;\n  /** Captured stack trace (if 'etr' debugFlag is set) */\n  trace?: StackTrace;\n}) & {\n  /** Captured console log entries (if 'etr' debugFlag is set) */\n  consoleLog?: Array<{\n    //TODO this is Serialized<ConsoleLogItem[]> - should probably rename it to SerializedToJSON and move to std or env ?\n    /** Date when console function was called */\n    when: string;\n    /** `console` method that was called (eg 'log') */\n    method: string;\n    /** Logged data */\n    data: string;\n    /** Location of caller */\n    location?: {\n      filename: string;\n      line: number;\n      col: number;\n      func: string;\n    };\n    /** Codecontext */\n    codeContextId?: string;\n  }>;\n};\n\nclass ControlledCall {\n  client: RPCClient;\n  options: RPCClientOptions;\n  abortcontroller?: AbortController;\n  timeout?: number;\n  _callurl: string;\n  _fetchoptions: RequestInit;\n  promise: Promise<unknown>;\n  timedout?: boolean;\n  aborted?: boolean;\n\n  constructor(client: RPCClient, method: string, stack: StackTrace | null, options: RPCClientOptions, callurl: URL, fetchoptions: RequestInit) {\n    this.client = client;\n    this.options = options;\n\n    if (options.timeout || options.signal) {\n      this.abortcontroller = new AbortController;\n      fetchoptions.signal = this.abortcontroller.signal;\n\n      if (options.timeout && options.timeout > 0) {\n        this.timeout = options.timeout;\n        setTimeout(() => this._handleTimeout(), options.timeout);\n      }\n      if (options.signal) {\n        options.signal.addEventListener(\"abort\", () => this._abort());\n      }\n    }\n\n    this._callurl = callurl.toString();\n    this._fetchoptions = fetchoptions;\n\n    const fetchpromise = fetch(this._callurl, this._fetchoptions);\n    this.promise = this._completeCall(method, stack, fetchpromise) as Promise<unknown>;\n  }\n  _handleTimeout() {\n    this.timedout = true;\n    this.abortcontroller?.abort();\n  }\n  _abort() {\n    this.aborted = true;\n    this.abortcontroller?.abort();\n  }\n\n  async _completeCall(method: string, requestStack: StackTrace | null, fetchpromise: Promise<Response>) {\n    let response;\n    for (; ;) { //loop to handle \"429 Conflict\"s\n      try { //we should only guard the fetch call and specifically *not* the onResponse callback\n        response = await fetchpromise;\n      } catch (exception) {\n        if (this.client.debug)\n          console.log(`[rpc] Exception invoking '${method}'`, exception);\n\n        if (this.aborted)\n          throw new Error(`RPC Aborted`);\n        else if (this.timedout)\n          throw new Error(`RPC Timeout: timeout was set to ${this.timeout} milliseconds`);\n        else\n          throw new Error(`RPC Failed: exception: ` + exception);\n      }\n\n      this.options.onResponse?.(response); //allow hooks to capture headers\n\n      if (response.status === 429 && !(\"retry429\" in this.options && !this.options.retry429) && response.headers.get(\"Retry-After\")) {\n        const retryafter = parseInt(response.headers.get(\"Retry-After\") || \"\");\n        if (this.client.debug)\n          console.warn(`[rpc] We are being throttled (429 Too Many Requests) - retrying after ${retryafter} seconds`);\n\n        await new Promise(resolve => setTimeout(resolve, retryafter * 1000));\n        fetchpromise = fetch(this._callurl, this._fetchoptions);\n        continue;\n      }\n      break;\n    }\n\n    let jsonresponse: RPCResponse;\n    try {\n      jsonresponse = parseTyped(await response.text());\n      if (jsonresponse.consoleLog) {\n        for (const logitem of jsonresponse.consoleLog) {\n          //should we log 'when'? it's getting more and more noisy then though....\n          //TODO should we match the remote's method (after validating) or just keep everything at 'log' ?\n          console.log(`[remote:${logitem.method}] ${logitem.location ? `${logitem.location.filename.split(\"/\").at(-1)}:${logitem.location.line}: ` : ''}${logitem.data}`);\n        }\n      }\n\n      if (this.client.debug)\n        console.log(`[rpc] Received response to '${method}'`, omit(jsonresponse, [\"consoleLog\", \"trace\"]));\n    } catch (exception) {\n      if (this.client.debug)\n        console.warn(`[rpc] Response was not valid JSON`, exception);\n      throw new Error(\"RPC Failed: Invalid response received\", { cause: exception });\n    }\n\n    if (\"error\" in jsonresponse) {\n      const err = new Error(`RPC Error: ${jsonresponse.error}`);\n      if (jsonresponse.trace) {\n        try {\n          prependStackTrace(err, jsonresponse.trace);\n        } catch (err2) {\n          //ignore stacktrace manipulation error\n        }\n      }\n\n      if (this.options.debug) {\n        console.group();\n        console.warn(\"RPC failed:\", err);\n        if (requestStack) {\n          console.warn(\"Stack at calling point\");\n          console.log(requestStack);\n        }\n        console.groupEnd();\n      }\n\n      throw err;\n    }\n\n    return jsonresponse.result;\n  }\n}\n\nclass RPCClient {\n  readonly url: string;\n  options: RPCClientOptions;\n\n  constructor(url: string, options?: RPCClientOptions) {\n    this.url = url;\n    this.options = {\n      timeout: 0,\n      debug: false,\n      ...options\n    };\n  }\n\n  get debug() {\n    return this.options.debug || debugFlags.rpc;\n  }\n\n  _tryLogError(requestStack: StackTrace | null, error: Error) {\n  }\n\n  invoke(method: string, params: unknown[]) {\n    //build the URL, add profiling and function parameters where needed\n    //We'll delay the baseurl calculation until the first call to allow for the backendBase to be set up\n    const callurl = isAbsolute(this.url) ? new URL(this.url + method) : new URL(this.url + method, this.options.baseUrl || getBaseURL());\n\n    let requestStack: StackTrace | null = null;\n\n    const fetchoptions: RequestInit & { headers: Headers } = {\n      method: \"POST\",\n      headers: new Headers({\n        \"Accept\": \"application/json\",\n        \"Content-Type\": \"application/json; charset=utf-8\",\n        ...this.options.headers\n      }),\n      body: stringify(params, { typed: true }),\n    };\n\n    const pathName = typeof location !== \"undefined\" ? location.pathname : new URL(this.options.baseUrl || getBaseURL()).pathname;\n    if (pathName !== '/')\n      callurl.searchParams.set(\"pathname\", pathName);\n\n    if (this.debug) {\n      requestStack = parseTrace(new Error);\n      console.log(`[rpc] Invoking '${method}'`, params);\n    }\n\n    this.options.onBeforeRequest?.(callurl, fetchoptions);\n    return new ControlledCall(this, method, requestStack, this.options, callurl, fetchoptions).promise;\n  }\n}\n\ntype ServiceBase<T> = {\n  withOptions(options: RPCClientOptions): T & ServiceBase<T>;\n};\n\nclass ServiceProxy<Service extends keyof KnownRPCServices | object> {\n  client: RPCClient;\n\n  constructor(client: RPCClient) {\n    this.client = client;\n  }\n\n  get(target: object, prop: string, receiver: unknown) {\n    if ([\"then\", \"catch\", \"finally\"].includes(prop)) //do not appear like our object is a promise\n      return undefined;\n\n    if (prop === 'withOptions') { //create a withOptions function\n      return (options: RPCClientOptions) => {\n        const newoptions = {\n          ...this.client.options,\n          ...options,\n          headers: { ...this.client.options.headers, ...options.headers }\n        };\n        return rpc(this.client.url as (Service extends keyof KnownRPCServices ? Service : string), newoptions);\n      };\n    }\n\n    return (...args: unknown[]) => this.client.invoke(prop, args);\n  }\n}\n\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- need any to not worry about the actual first arg\ntype OmitFirstArg<F> = F extends (x: any, ...args: infer P) => infer R ? (...args: P) => R : never;\n\nexport type OmitRPCContextArgs<ServiceType> = {\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- need any to not worry about the actual first arg\n  [K in keyof ServiceType as ServiceType[K] extends (...a: any) => any ? K : never]: ServiceType[K] extends (...a: any[]) => void ? OmitFirstArg<ServiceType[K]> : never;\n};\n\n\ntype ExtractInterface<Service extends object> = PromisifyInterface<Service> & ServiceBase<PromisifyInterface<Service>>;\n\n/** Get the client interface type as would be returned by createClient\n * @typeParam Service - either the `module:service` name or the interface to implement. If you want to pass the implementation's type you should wrap it into `OmitRPCContextArgs`.\n*/\nexport type GetRPCClientInterface<Service extends (keyof KnownRPCServices) | object> = Service extends keyof KnownRPCServices ? ExtractInterface<OmitRPCContextArgs<KnownRPCServices[Service]>> : Service extends object ? ExtractInterface<Service> : never;\n\n/** Create a WebHare RPC client\n  @param service - URL (https://<ORIGIN>/.wh/rpc/module/service/) or service name (module:service) to invoke\n*/\nexport function rpc<Service extends keyof KnownRPCServices>(service: Service, options?: RPCClientOptions): GetRPCClientInterface<Service>;\nexport function rpc<Service extends keyof KnownRPCServices>(service: string, options?: RPCClientOptions): GetRPCClientInterface<Service>;\nexport function rpc<Service extends object>(service: Service extends keyof KnownRPCServices ? Service : string, options?: RPCClientOptions): GetRPCClientInterface<Service>;\n\nexport function rpc<Service extends keyof KnownRPCServices | object>(service: Service extends keyof KnownRPCServices ? Service : string, options?: RPCClientOptions): GetRPCClientInterface<Service> {\n  //NOTE: needed the separate overloads to get Intellisense to list the known services for createRPClient's first argument\n\n  if (!service)\n    throw new Error(`You must specify either a WebHare rpcService name or a full URL`);\n\n  const servicematch = service.match(/^([a-z0-9_]+):([a-z0-9_]+)$/);\n  if (servicematch)\n    service = `/.wh/rpc/${servicematch[1]}/${servicematch[2]}/` as (Service extends keyof KnownRPCServices ? Service : string);\n  else if (!service.endsWith('/'))\n    throw new Error(`Service URL must end in a slash`);\n\n  const rpcclient = new RPCClient(service, options);\n  return new Proxy({}, new ServiceProxy<GetRPCClientInterface<Service>>(rpcclient)) as GetRPCClientInterface<Service>;\n}\n","import type { NavigateInstruction } from \"@webhare/env\";\n\n/** Login failure reasons that can also be used by custom isLoginDenied checks */\nexport type LoginErrorCode = \"internal-error\" | \"incorrect-login-password\" | \"incorrect-email-password\" | \"account-disabled\" | \"unknown-account\" | \"require-external-login\";\n\n/** Login reasons that require further client side work but are not errors per-se */\nexport type LoginIncompleteCode = \"totp\" | \"incomplete-account\";\n\nexport type LoginTweaks = {\n  /** Limit session duration (development servers only) */\n  limitExpiry?: number;\n  /** Language code */\n  lang?: string;\n};\n\nexport type LoginResult = {\n  loggedIn: boolean;\n  navigateTo: NavigateInstruction;\n} | {\n  loggedIn: false;\n  code: LoginErrorCode;\n  error?: string;\n};\n\nexport type LogoutResult = { success: true } | {\n  error: string;\n  code: LoginErrorCode | LoginIncompleteCode;\n};\n\nexport const PublicCookieSuffix = \"_publicauthdata\";\n\n/* APIs and types shared between the client and server */\nexport function getCompleteAccountNavigation(token: string, pathname: string): NavigateInstruction {\n  return {\n    type: \"redirect\", //TODO or use a \"form\" too? went for a session now as an excursion to followup GET pages is much more likely in this procedure than with totp\n    url: \"/.wh/common/authpages/?wrd_pwdaction=completeaccount&token=\" + encodeURIComponent(token || '') + \"&pathname=\" + encodeURIComponent(pathname)\n  };\n}\n","import { createClient } from \"@webhare/jsonrpc-client\";\nimport { type NavigateInstruction, navigateTo } from \"@webhare/env\";\nimport * as dompack from '@webhare/dompack';\nimport type { LoginOptions } from \"@webhare/auth/src/identity\";\nimport { rpc } from \"@webhare/rpc\";\n\n//NOTE: Do *NOT* load @webhare/frontend or we enforce the new CSS reset!\nimport { getFrontendData } from '@webhare/frontend/src/init';\nimport { PublicCookieSuffix, type LoginErrorCode, type LoginResult, type LoginTweaks } from \"@webhare/auth/src/shared\";\nimport { parseTyped, toSnakeCase, type ToSnakeCase } from \"@webhare/std\";\nimport type WRDAuthenticationProvider from \"@mod-wrd/js/auth\";\nimport type { OAuth2PromptFlag } from \"@webhare/auth/src/oauth2-client\";\n\n/** WRDAuth configuration */\nexport interface WRDAuthOptions {\n  /** Callback that is invoked after a succesful login. If not set the page will be reloaded. */\n  onLogin?: () => Promise<void> | void;\n}\n\nexport interface PublicAuthData {\n  expiresMs: number;\n  userInfo?: object | null;\n  persistent?: boolean;\n}\n\ndeclare module \"@webhare/frontend\" {\n  interface FrontendDataTypes {\n    \"wrd:auth\": {\n      /** WRDAuth cookiename (used to store userinfo and expiry) */\n      cookiename: string;\n    };\n  }\n}\n\ndeclare global {\n  interface Window {\n    $wh$legacyAuthProvider: WRDAuthenticationProvider;\n    triggerWebHareSSO?: (tag: string, options?: SSOLoginOptions) => Promise<void>;\n  }\n}\n\n/** Current authoptions. undefined if setupWRDAuth hasn't been invoked yet */\nlet authOptions: WRDAuthOptions | undefined;\n\n/** Get current login cookie. If empty, wrdauth is not initialized here */\nfunction getCookieName(): string | null {\n  const settings = getFrontendData(\"wrd:auth\", { allowMissing: true });\n  return settings?.cookiename || null;\n}\n\nfunction getAuthLocalData(): PublicAuthData | null {\n  const c = getCookieName();\n  if (!c)\n    return null;\n\n  try {\n    return parseTyped(dompack.getCookie(c + PublicCookieSuffix)!) as PublicAuthData;\n  } catch {\n    return null;\n  }\n}\n\nasync function submitLoginForm(node: HTMLFormElement, event: SubmitEvent) {\n  if (node.propWhFormhandler)\n    return; //already handled by publisher forms so we'll defer to that\n  dompack.stop(event);\n\n  const username = (node.elements.namedItem(\"login\") as HTMLInputElement)?.value;\n  const password = (node.elements.namedItem(\"password\") as HTMLInputElement)?.value;\n  const site = (node.elements.namedItem(\"site\") as HTMLInputElement)?.value || undefined;\n  const returnto = (node.elements.namedItem(\"returnto\") as HTMLInputElement)?.value || undefined;\n  const persistentlogin = (node.elements.namedItem(\"persistent\") as HTMLInputElement)?.checked;\n  if (!login || !password)\n    throw new Error(`submitLoginForm: required elements login/password not set or missing`);\n\n  using lock = dompack.flagUIBusy({ modal: true });\n  void (lock);\n\n  const loginresult = await login(username, password, {\n    persistent: persistentlogin,\n    site,\n    returnTo: returnto ? new URL(returnto, location.href).toString() : location.href.split('#')[0]\n  });\n  if (loginresult.loggedIn) {\n    refreshLoginStatus();\n    if (loginresult.navigateTo.type === \"redirect\" && loginresult.navigateTo.url.split('#')[0] === location.href.split('#')[0]  //stay on same page\n      && authOptions?.onLogin) {\n\n      if (loginresult.navigateTo.url.includes('#')) //execute any #hash instruction\n        history.replaceState(null, \"\", loginresult.navigateTo.url.substring(loginresult.navigateTo.url.indexOf('#')));\n\n      await authOptions.onLogin();\n    } else {\n      //Reload the page to get the new login status - TODO put this behind a 'login state change' event and allow users to cancel it if they can deal with login/logout on-page\n      console.log(\"Post login redirect\", loginresult.navigateTo);\n      navigateTo(loginresult.navigateTo);\n    }\n  } else if (\"navigateTo\" in loginresult) {\n    console.log(\"Login incomplete, redirecting to\", loginresult.navigateTo);\n    navigateTo(loginresult.navigateTo);\n  } else\n    failLogin(loginresult.error ?? loginresult.code, { code: loginresult.code, data: \"\" }, node); //FIXME restore the code & data members from old wrdauth\n}\n\nfunction refreshLoginStatus() {\n  const loggedIn = isLoggedIn();\n  document.documentElement.classList.toggle(\"wh-wrdauth--isloggedin\", loggedIn);\n\n  window.$wh$legacyAuthProvider?.refresh();\n}\n\n/** Return whether a user's currently logged in */\nexport function isLoggedIn(): boolean {\n  return (getAuthLocalData()?.expiresMs || 0) > Date.now();\n}\n\n/** Setup WRDAuth frontend integration */\nexport function setupWRDAuth(options?: WRDAuthOptions) {\n  if (authOptions)\n    throw new Error(`Duplicate setupWRDAuth call`);\n\n  authOptions = { ...options };\n\n  dompack.register<HTMLFormElement>('form.wh-wrdauth__loginform,form.wh-wrdauth-login__form', node => {\n    node.setAttribute(\"data-wh-wrdauth-attached\", \"\");\n    dompack.addDocEventListener(node, \"submit\", evt => submitLoginForm(node, evt));\n  });\n  dompack.register('.wh-wrdauth__logout', node => {\n    function handleLogoutClick(event: Event) {\n      dompack.stop(event);\n\n      //letting rejections escape - our trigger is generally setup in HTML so there's nothing to catch but uncaught rejection handlers anyway\n      if (node instanceof HTMLAnchorElement && node.href && node.href.split('#')[0] !== location.href.split('#')[0]) { //logout link sending you elsewhere\n        void doLogout().then(() => {\n          console.log(\"Logout complete, redirecting to\", node.href);\n          navigateTo({ type: \"redirect\", url: node.href });\n        });\n      } else {\n        void logout(); //TODO what if the logout only changed the anchor? but what's the usecase for that?\n      }\n    }\n\n    dompack.addDocEventListener(node, \"click\", event => handleLogoutClick(event));\n  });\n\n  dompack.onDomReady(() => {\n    if (\"$wh$wrdauth\" in window) {\n      console.error(\"Both setupWRDAuth from @webhare/frontend and @mod-wrd/js/auth are present in this page. Mixing these is not supported!\");\n    }\n  });\n\n  refreshLoginStatus();\n}\n\nfunction failLogin(message: string, response: { code: LoginErrorCode; data: string }, form: HTMLFormElement) {\n  const evtdetail = {\n    message: message,\n    code: response.code,\n    data: response.data\n  };\n\n  const cancelled = !dompack.dispatchCustomEvent(form || document.documentElement, \"wh:wrdauth-loginfailed\", { bubbles: true, cancelable: true, detail: evtdetail });\n  if (!cancelled) {\n    //TODO depending on error we may need to change a different field?\n    const loginfield = dompack.qR<HTMLInputElement>(form, \"input[name=password]\");\n    loginfield.setCustomValidity(message);\n    // loginfield.reportValidity(); //this actually blocks wh-form error handling from showing the error in-page when so desired\n    loginfield.focus();\n  }\n}\n\n/** Retrieve userinfo if set by onFrontendUserInfo in your WRDAuth customizer */\nexport function getUserInfo<T extends object = object>(): T | null {\n  return isLoggedIn() ? getAuthLocalData()?.userInfo as T | null : null;\n}\n\nfunction getLoginTweaks(): LoginTweaks {\n  const tweaks: LoginTweaks = {\n    lang: dompack.getLang().tag\n  };\n\n  const urlvars = new URL(location.href);\n  if (urlvars.searchParams.has(\"wrdauth_limit_expiry\"))\n    tweaks.limitExpiry = parseInt(urlvars.searchParams.get(\"wrdauth_limit_expiry\") || '0') || undefined;\n\n  return tweaks;\n}\n\n/** Implements the common username/password flows */\nexport async function login(username: string, password: string, options: LoginOptions = {}): Promise<LoginResult> {\n  const cookieName = getCookieName();\n  if (!cookieName)\n    throw new Error(\"WRDAuth not initialized, please call setupWRDAuth first and ensure this page has a <wrdauth> rule\");\n\n  const result = await rpc(\"platform:authservice\").login(username, password, cookieName, dompack.getBrowser().triplet, { ...options, ...getLoginTweaks() });\n  if (result.loggedIn && !getAuthLocalData())\n    throw new Error(\"Login succeeded but no auth data was set in the cookie\");\n\n  return result;\n}\n\n/** Execute and verify cookie clearance to prepare for logging out */\nasync function doLogout() {\n  const cookieName = getCookieName();\n  if (!cookieName)\n    throw new Error(\"WRDAuth not initialized, please call setupWRDAuth first and ensure this page has a <wrdauth> rule\");\n\n  await rpc(\"platform:authservice\").logout(cookieName, dompack.getBrowser().triplet);\n\n  if (getAuthLocalData())\n    throw new Error(\"Logged out but we still have auth data in the cookie\");\n}\n\n/** Logout the current user */\nexport async function logout() {\n  await doLogout();\n  console.log(\"Reloading to process the new logged out status\");\n  navigateTo({ type: \"reload\" }); //TODO put this behind a 'login state change' event\n}\n\nexport interface MyService {\n  startLogin2(urlpath: string, tag: string, options: ToSnakeCase<SSOLoginOptions>): Promise<NavigateInstruction>;\n}\n\ninterface SSOLoginOptions {\n  /** @deprecated use prompt: \"none\" from WH6.0 up */\n  passive?: boolean;\n  /** Set the prompt flag for the authorize request */\n  prompt?: OAuth2PromptFlag;\n}\n\nexport function startSSOLogin(tag: string, options?: SSOLoginOptions): Promise<void> {\n  const client = createClient<MyService>(\"wrd:auth\");\n\n  if (options?.passive)\n    options = { prompt: \"none\", ...options, passive: undefined }; //force prompt to none in passive mode, and remove the passive flag since it doesn't mean anything to the server\n\n  const defer = Promise.withResolvers<void>();\n\n  //Launch SSO login for the current page.\n  //TODO also pass getLoginTweaks() at least to OIDC logins as soon as we've ported this to authservice\n  client.startLogin2(location.pathname + location.search + location.hash, tag, toSnakeCase(options) || {}).then(instr => {\n    //we leave the promise unresolved so any busy layers stay active during the actual redirect\n    //TODO can we have navigateTo detect failed navigations so we can throw ?\n    navigateTo(instr);\n  }).catch((e: Error) => {\n    defer.reject(e);\n  });\n\n  return defer.promise;\n}\n\n/** Configure WebHare external auth buttons (even hidden ones) to listen for bookmarklet login requests */\nexport function setupWebHareSSOTrigger(): void {\n  window.triggerWebHareSSO = startSSOLogin;\n}\n","import { qSA } from \"@webhare/dompack\";\nimport { debugFlags } from \"@webhare/env\";\nimport type { FormAnalyticsEvent } from \"@webhare/forms\";\nimport type { DataLayerEntry } from \"./gtm-types\";\nimport { omit } from \"@webhare/std\";\n\ndeclare global {\n  interface Window {\n    /** The google tag manager (GTM) datalayer */\n    dataLayer: DataLayerEntry[]; //technically window.dataLayer may not exist and should be optional, but we already used to declare it as existing from gtm.ts\n  }\n  //It's safer to access dataLayer through globalThis, which will always be available in all environments unlike 'window'\n  var dataLayer: DataLayerEntry[] | undefined;\n}\n\n//ADDME if we ever figure out a bundler trick to flush this command to the top of all imports/loads, that would be great (we could consider *ALWAYS* putting this in the generated startup code, or we'd need to do a tree pre-walk to see if gtm.es is loaded anywhere)\n(globalThis as unknown as Window).dataLayer ||= [];\nlet lastSeen: DataLayerEntry | undefined;\n\nfunction showDataLayerUpdates() {\n  if (!globalThis.dataLayer)\n    return; //not set up (yet?)\n\n  if (debugFlags.anl)\n    globalThis.dataLayer.slice(globalThis.dataLayer.indexOf(lastSeen!) + 1).forEach(entry => console.log(\"[anl] dataLayer.push:\", entry));\n\n  lastSeen = globalThis.dataLayer[globalThis.dataLayer.length - 1];\n}\n\n/** Push to the dataLayer\n * @param vars - The variables to push\n * @param options - Options for the push\n *   timeout Time before any eventCallback is forcibly called (default 200ms)\n*/\nexport function pushToDataLayer(vars: DataLayerEntry, options?: { timeout?: number }) {\n  if (vars.eventCallback) {\n    //we'll wrap the callback into a promise to ensure it's only invoked once\n    const saveCallback = vars.eventCallback;\n\n    //build a promise to invoke the callback, but only once (promises can resolve only once)\n    let newCallback: () => void;\n    void (new Promise<void>(resolve => newCallback = resolve)).then(() => saveCallback());\n\n    //resolve that new promise after either timeout or datalayer signaling completion\n    setTimeout(() => newCallback(), options?.timeout || 200);\n    vars = { ...vars, eventCallback: newCallback! };\n  }\n\n  globalThis.dataLayer?.push(vars);\n  showDataLayerUpdates();\n}\n\nfunction collectFormValues(formnode: HTMLFormElement): Record<string, unknown> {\n  const donefields: Record<string, boolean> = {};\n  const outdata: Record<string, unknown> = {};\n\n  const multifields = qSA<HTMLInputElement>(formnode, 'input[type=radio], input[type=checkbox]');\n  for (const multifield of multifields) {\n    if (!multifield.name || donefields[multifield.name])\n      continue; //we did this one\n\n    donefields[multifield.name] = true;\n\n    let idx = 0;\n    const values = [];\n    const labels = [];\n    const checkboxes = multifields.filter(node => node.name === multifield.name);\n\n    for (const node of checkboxes.filter(cbox => cbox.checked)) {\n      const keyname = 'form_' + multifield.name + (idx ? '_' + idx : '');\n      let labelsfornode = node.dataset.gtmTag || qSA(`label[for=\"${CSS.escape(node.id)}\"]`).map(labelnode => labelnode.textContent).filter(labelnode => Boolean(labelnode)).join(' ');\n      labelsfornode = labelsfornode.trim(); //TODO normalize whitespace\n      outdata[keyname] = node.value;\n      outdata[keyname + '_label'] = labelsfornode;\n\n      ++idx;\n      values.push(node.value);\n      labels.push(labelsfornode);\n    }\n\n    if (values.length) {\n      const allkeyname = 'form_' + multifield.name + '_all';\n      outdata[allkeyname] = values.join(';');\n      outdata[allkeyname + '_label'] = labels.join(';');\n    }\n  }\n\n  for (const field of formnode.querySelectorAll<HTMLSelectElement | HTMLInputElement>('input:not([type=radio]):not([type=checkbox]),select,textarea')) {\n    if (!field.name || donefields[field.name])\n      continue;\n\n    donefields[field.name] = true;\n\n    const val = field.value;\n    outdata['form_' + field.name] = val;\n    if (field.matches('select')) {\n      const opt = (field as HTMLSelectElement).options[(field as HTMLSelectElement).selectedIndex];\n      if (opt)\n        outdata['form_' + field.name + '_label'] = opt.dataset.gtmTag || opt.textContent;\n    }\n  }\n  return outdata;\n}\n\n/** Setup the dataLayer */\nlet didinit: boolean | undefined;\nexport function setupGTM() {\n  if (!didinit) {\n    didinit = true;\n    if (debugFlags.anl)\n      setInterval(showDataLayerUpdates, 100);\n  }\n}\n\n/** Setup dataLayer events for form analytics events\n * @param options - Options for the form analytics setup\n     - `eventPrefix`. Prefix to use. Default is `wh-platform:form_` but existing integrations may (also) require `publisher:form`\n*/\nexport function setupFormAnalyticsForGTM(options?: { eventPrefix: string }): void {\n  setupGTM(); //ensurse the GTM basics are installed\n\n  addEventListener(\"wh:form-analytics\", (e: FormAnalyticsEvent) => {\n    //we use the same prefixing as pxl events would\n    const entry: DataLayerEntry = {\n      event: `${options?.eventPrefix || \"platform:form_\"}${e.detail.event}`\n    };\n\n    for (const [key, val] of Object.entries(e.detail))\n      if (key !== \"event\" && [\"string\", \"number\", \"boolean\"].includes(typeof val))\n        entry[`formmeta_${key}`] = val;\n\n    const form = e.target as HTMLFormElement | undefined;\n    if (form?.dataset.gtmSubmit) {\n      //When set, we push both the form: variable in gtmSubmit and the current form field avlues\n      Object.assign(entry, JSON.parse(form.dataset.gtmSubmit));\n      Object.assign(entry, collectFormValues(form));\n    }\n\n    pushToDataLayer(entry);\n  });\n}\n\nfunction processClickDataLayerTags(event: MouseEvent) {\n  const entry: Record<string, unknown> = {};\n\n  for (let node = event.target as HTMLElement | undefined | null; node; node = node?.parentElement)\n    for (const attr of node.attributes)\n      if (attr.nodeName.startsWith(\"data-wh-datalayer-onclick-\")) {\n        const key = attr.nodeName.substring(26);\n        if (key !== \"__proto__\" && !(key in entry)) //as we're working upwards, don't overwrite already set keys\n          entry[key] = attr.nodeValue || \"\";\n      } else if (attr.nodeName === \"data-wh-datalayer-onclick\") { //JSON setter\n        const data = JSON.parse(attr.nodeValue!);\n        for (const [key, value] of Object.entries(data))\n          if (key !== \"__proto__\" && !(key in entry)) //as we're working upwards, don't overwrite already set keys\n            entry[key] = value;\n      }\n\n  if (Object.keys(entry).length)\n    pushToDataLayer(entry as DataLayerEntry);\n}\n\n/** Setup support for data-wh-datalayer-onclick-xxx=\"yyy\" attributes. When clicking an element with these attributes the JSON from the attribute and all parents are merged together and pushed to the dataLayer  */\nexport function setupDataLayerTags() {\n  //we capture so we can also simply set variables for any existing GTM handlers\n  window.addEventListener(\"click\", processClickDataLayerTags, { capture: true });\n}\n\n/** Get the current variables in the GTM datalayer\n * @param win - The window to get the dataLayer from (default: current window)\n * @return The current variables in the GTM datalayer, merged together from all entries. Note that this is a snapshot and won't update as the dataLayer changes\n*/\nexport function getCurrentDataLayerVariables<DataLayerFormat extends object = Record<string, unknown>>(win: Window = window): DataLayerFormat {\n  const state: DataLayerFormat = {} as DataLayerFormat;\n  if (win.dataLayer)\n    win.dataLayer.forEach(entry =>\n      Object.assign(state, structuredClone(omit(entry, [\"event\", \"eventCallback\", \"gtm.uniqueEventId\"]))));\n  return state;\n}\n","/* To verify tree shaking viability, try:\n   whcd\n   cd whtree\n   echo 'import \"@webhare/frontend\"' | node_modules/.bin/esbuild --loader:.css=empty --tsconfig=tsconfig.json --bundle --minify\n*/\n\n// This gets TypeScript to refer to us by our @webhare/... name in auto imports:\ndeclare module \"@webhare/frontend\" {\n}\n\nimport { onDomReady } from \"@webhare/dompack\";\nexport { frontendConfig, getFrontendData, getSiteRoot } from \"./init\";\nexport { startSSOLogin, login, setupWRDAuth, isLoggedIn, logout, getUserInfo, setupWebHareSSOTrigger } from \"./auth\";\nexport { loadAssetPack, setupAuthorMode, type AuthorModeOptions } from \"./authormode\";\nexport { setPxlOptions, sendPxl, getPxlUserId, getPxlSessionId, setupFormAnalytics, type PxlData } from \"./pxl\";\nexport { getRemoteIPAddress, getGeoIPInfo, type GetIPInfoOptions, type GeoIPInfoResult } from \"./analytics\";\nexport { setupGTM, setupFormAnalyticsForGTM, pushToDataLayer, setupDataLayerTags, getCurrentDataLayerVariables } from \"./gtm\";\nexport { setupLinksInNewWindow, type LinkOpenOptions } from \"./linkhandler\";\n\nexport type * from \"./gtm-types\";\n\n// we shouldn't deprecate navigateTo exported from frontend. in fact it makes more sense to export it from frontend than env as it's browser-only\nexport { navigateTo } from \"@webhare/env\";\n\n/** Registry for data we receive from the backend */\nexport interface FrontendDataTypes {\n}\n\n/** Registry for expected PXL formats */\nexport interface PxlDataTypes {\n}\n\n/** Test whether the current page is being iframed in the WebHare test framework */\nexport function isInTestFramework(): boolean {\n  if (window.top !== window) { //in a frame\n    try {\n      if ((window.top as { __testframework?: unknown })?.__testframework)\n        return true;//we're inside a testframe, pretend to be the parent\n    } catch (ignore) {\n    }\n  }\n  return false;\n}\n\nfunction postRenderChecks() {\n  const log = document.getElementById(\"wh-console-log\");\n  if (log) {\n    const logtext = atob(log.textContent || \"\");\n    console.group(\"[etr] Server-side console output\");\n    console.log(logtext);\n    console.groupEnd();\n  }\n}\n\nonDomReady(postRenderChecks);\n","<template>\n  <AppShell v-if=\"isLoggedIn\">\n    <RouterView v-slot=\"{ Component, route }\">\n      <KeepAlive :max=\"TAB_CACHE_SIZE\">\n        <component :is=\"Component\" :key=\"tabKeyFor(route.path) ?? route.path\" />\n      </KeepAlive>\n    </RouterView>\n  </AppShell>\n  <LoginView v-else />\n</template>\n\n<script setup lang=\"ts\">\nimport { KeepAlive } from \"vue\";\nimport { RouterView } from \"vue-router\";\nimport AppShell from \"./components/shell/AppShell.vue\";\nimport LoginView from \"./views/LoginView.vue\";\nimport { useWrdAuthState } from \"./lib/useWrdAuthState\";\nimport { TAB_CACHE_SIZE, tabKeyFor } from \"./lib/tab-strip\";\n\n// Een openstaande tab blijft in leven. Terugklikken naar een tab die je al had\n// staan hoort de pagina te tonen zoals je hem achterliet, niet een lege schil\n// die opnieuw gaat laden; daarom is de cache-sleutel de tab-identiteit uit\n// tab-strip.ts en niet het volledige pad (`#/settings/stuck` en `#/settings`\n// zijn een tab, en een ?tab=-wissel binnen een detailpagina ook).\n\n// De login-gate is UI, geen beveiliging: het /admin-RPC-endpoint is direct\n// bereikbaar, dus elke AdminRPC-methode gate't server-side met requireAdmin.\nconst { isLoggedIn } = useWrdAuthState();\n</script>\n","<template>\n  <div class=\"shell\">\n    <ShellHeader :trail=\"trail\" :signals=\"signals\" :signals-unavailable=\"unavailable\" :now=\"now\" @toggle-sidebar=\"drawerOpen = !drawerOpen\" />\n\n    <div class=\"shell__cols\">\n      <Sidebar\n        :collapsed=\"collapsed\"\n        :open=\"drawerOpen\"\n        :location-count=\"shellChrome.locationCount.value\"\n        :counts=\"signals?.counts\"\n        @toggle-collapsed=\"toggleCollapsed\"\n      />\n      <button\n        v-if=\"drawerOpen\"\n        class=\"shell__scrim\"\n        type=\"button\"\n        aria-label=\"Menu sluiten\"\n        @click=\"drawerOpen = false\"\n      />\n      <!-- The tabstrip is the third layer of the kit's shell and belongs to the\n           content column, next to the rail, not above it. -->\n      <div class=\"shell__content\">\n        <TabStrip />\n        <main ref=\"main\" class=\"shell__main\">\n          <slot />\n        </main>\n      </div>\n    </div>\n\n    <StatusBar :signals=\"signals\" :signals-unavailable=\"unavailable\" :location-count=\"shellChrome.locationCount.value\" :now=\"now\" />\n  </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref, useTemplateRef, watch } from \"vue\";\nimport { useRoute } from \"vue-router\";\nimport ShellHeader from \"./ShellHeader.vue\";\nimport Sidebar from \"./Sidebar.vue\";\nimport StatusBar from \"./StatusBar.vue\";\nimport TabStrip from \"./TabStrip.vue\";\nimport { breadcrumbTrail } from \"../../lib/breadcrumb-trail\";\nimport { tabKeyFor } from \"../../lib/tab-strip\";\nimport { analysisCrumbFor, crumbLabelFor, shellChrome } from \"../../lib/shell-chrome\";\nimport { useShellSignals } from \"../../lib/use-shell-signals\";\nimport { resumeBulkRunner, suspendBulkRunner } from \"../../lib/use-bulk-runner\";\n\n// De vierlagenshell van de kit: inktbalk (48), rail (228), content, statusbalk\n// (24). De shell zelf scrollt niet, alleen `main`.\nconst route = useRoute();\nconst { signals, unavailable, now } = useShellSignals();\nonMounted(resumeBulkRunner);\nonBeforeUnmount(suspendBulkRunner);\nconst main = useTemplateRef<HTMLElement>(\"main\");\n\nconst COLLAPSE_KEY = \"statiegeldnl:admin:sidebar-collapsed\";\n\nfunction readCollapsed(): boolean {\n  try {\n    return localStorage.getItem(COLLAPSE_KEY) === \"1\";\n  } catch {\n    return false;\n  }\n}\n\nconst collapsed = ref(readCollapsed());\nconst drawerOpen = ref(false);\n\nfunction toggleCollapsed() {\n  collapsed.value = !collapsed.value;\n  try { localStorage.setItem(COLLAPSE_KEY, collapsed.value ? \"1\" : \"0\"); } catch { /* silent */ }\n}\n\n// Navigeren sluit de lade. Staat in een watcher op de route en niet in elke\n// nav-link, zodat een nieuwe route dit niet kan vergeten.\nwatch(() => route.fullPath, () => { drawerOpen.value = false; });\n\n// Scrollen hoort bij de tab, niet bij de shell: een tab die openstond hoort\n// terug te komen zoals je hem achterliet, een nieuwe begint bovenaan. Staat op\n// `route.path` en niet op `fullPath`, zodat hoofdstukken in de Help hun eigen\n// query-navigatie houden.\nconst scrollByTab = new Map<string, number>();\n\nwatch(() => route.path, (path, previous) => {\n  const element = main.value;\n  if (!element) return;\n  const leaving = previous === undefined ? null : tabKeyFor(previous);\n  if (leaving) scrollByTab.set(leaving, element.scrollTop);\n  const entering = tabKeyFor(path);\n  const offset = entering === null ? 0 : scrollByTab.get(entering) ?? 0;\n  // Pas ná het herplaatsen van de pagina: de bewaarde DOM hangt er op dit\n  // moment nog niet, dus meteen scrollen zou op nul blijven staan.\n  void nextTick(() => { if (main.value) main.value.scrollTop = offset; });\n});\n\nconst trail = computed(() => {\n  const name = String(route.name ?? \"\");\n  if (name === \"analysis-detail\") {\n    const ids = { locationId: Number(route.params.id), analysisId: Number(route.params.analysisId) };\n    return breadcrumbTrail(name, null, { analysis: analysisCrumbFor(ids) ?? ids });\n  }\n  return breadcrumbTrail(name, crumbLabelFor(name));\n});\n</script>\n\n<style scoped>\n.shell {\n  display: flex;\n  flex-direction: column;\n  /* Vaste hoogte, geen min-height: PageBody met `fill` leunt op een BEPAALDE\n     hoogte om zijn tabel te laten scrollen. Met min-height zou de tabel de\n     pagineerbalk onder de vouw duwen. */\n  height: 100vh;\n  height: 100dvh;\n}\n\n.shell__cols {\n  position: relative;\n  display: flex;\n  flex: 1;\n  min-height: 0;\n}\n\n.shell__content {\n  display: flex;\n  flex-direction: column;\n  flex: 1;\n  min-width: 0;\n  min-height: 0;\n}\n\n.shell__main {\n  display: flex;\n  flex-direction: column;\n  flex: 1;\n  min-width: 0;\n  /* flex: 1 + min-height: 0 in a column, not height: 100%: the tabstrip above\n     takes its 36px and main gets the DETERMINED rest, which is what PageBody\n     `fill` needs to let its table scroll with the pagination bar below it. */\n  min-height: 0;\n  overflow-y: auto;\n  /* Geen padding hier: PageHeader is een volvlakke band met eigen padding en\n     PageBody padt de content. */\n}\n\n.shell__scrim {\n  position: absolute;\n  inset: 0;\n  z-index: 1150;\n  border: 0;\n  padding: 0;\n  background: rgba(1, 5, 4, 0.4);\n  cursor: pointer;\n}\n\n@media (min-width: 1080px) {\n  .shell__scrim {\n    display: none;\n  }\n}\n</style>\n","<template>\n  <header class=\"shellhead\">\n    <button class=\"shellhead__burger\" type=\"button\" aria-label=\"Menu\" @click=\"emit('toggle-sidebar')\">\n      <Icon name=\"menu\" :size=\"18\" />\n    </button>\n\n    <img class=\"shellhead__logo\" :src=\"logoUrl\" alt=\"Locata\" height=\"18\">\n    <span class=\"shellhead__sep\">/</span>\n    <nav class=\"shellhead__crumbs\" aria-label=\"Kruimelpad\">\n      <template v-for=\"(crumb, i) in trail\" :key=\"crumb.label\">\n        <span v-if=\"i > 0\" class=\"shellhead__sep\">/</span>\n        <RouterLink v-if=\"crumb.route\" :to=\"{ name: crumb.route, params: crumb.params }\" class=\"shellhead__crumb\">\n          {{ crumb.label }}\n        </RouterLink>\n        <span v-else class=\"shellhead__crumb shellhead__crumb--current\">{{ crumb.label }}</span>\n      </template>\n    </nav>\n\n    <div class=\"shellhead__spacer\" />\n\n    <NotificationBell :signals=\"signals\" :unavailable=\"signalsUnavailable\" :now=\"now\" />\n\n    <button\n      class=\"shellhead__action\"\n      type=\"button\"\n      :aria-label=\"theme === 'dark' ? 'Naar lichte modus' : 'Naar donkere modus'\"\n      @click=\"toggleTheme\"\n    >\n      <Icon :name=\"theme === 'dark' ? 'light' : 'asleep'\" :size=\"16\" />\n    </button>\n\n    <a class=\"shellhead__action shellhead__logout\" href=\"#\" @click.prevent=\"logout()\">\n      Uitloggen\n    </a>\n  </header>\n</template>\n\n<script setup lang=\"ts\">\nimport { logout } from \"@webhare/frontend\";\nimport logoUrl from \"../../assets/logo-locata-white.svg\";\nimport { RouterLink } from \"vue-router\";\nimport Icon from \"../icons/Icon.vue\";\nimport { useTheme } from \"../../lib/useTheme\";\nimport type { Crumb } from \"../../lib/breadcrumb-trail\";\nimport NotificationBell from \"./NotificationBell.vue\";\nimport type { ShellSignals } from \"../../lib/shell-signals\";\n\n// De zwarte 48px inktbalk: identiteit, kruimelpad, globale acties. In licht en\n// donker dezelfde band, want de inkt is hier merkdrager en geen thema-kleur.\ndefineProps<{ trail: Crumb[]; signals: ShellSignals | null; signalsUnavailable: boolean; now: Date }>();\nconst emit = defineEmits<{ \"toggle-sidebar\": [] }>();\n\n// Bind logout explicitly: this header can mount after setupWRDAuth's DOM scan.\nconst { theme, toggleTheme } = useTheme();\n</script>\n\n<style scoped>\n.shellhead {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  height: var(--shell-header-h);\n  padding: 0 12px;\n  background: var(--ink);\n  color: var(--ink-fg);\n  font-size: var(--text-caption);\n}\n\n.shellhead__burger,\n.shellhead__action {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  gap: 6px;\n  height: 32px;\n  min-width: 32px;\n  padding: 0 8px;\n  border: 0;\n  border-radius: var(--radius);\n  background: transparent;\n  color: var(--ink-fg);\n  font: inherit;\n  cursor: pointer;\n}\n\n@media (hover: hover) {\n  .shellhead__burger:hover,\n  .shellhead__action:hover {\n    background: var(--ink-hover);\n  }\n}\n\n/* Het woordmerk als bestand, nooit nagezet in een webfont: zie de brand-mark\n   guideline van de kit. Hoogte 18 is wat de kit zijn ShellHeader meegeeft. */\n.shellhead__logo {\n  display: block;\n  width: auto;\n  margin: 0 4px;\n}\n\n.shellhead__sep {\n  color: var(--ink-muted);\n}\n\n.shellhead__crumbs {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  min-width: 0;\n  overflow: hidden;\n}\n\n.shellhead__crumb {\n  color: var(--ink-muted);\n  white-space: nowrap;\n}\n\n.shellhead__crumb--current {\n  color: var(--ink-fg);\n}\n\n@media (hover: hover) {\n  a.shellhead__crumb:hover {\n    color: var(--ink-fg);\n  }\n}\n\n.shellhead__spacer {\n  flex: 1;\n}\n\n.shellhead__logout {\n  text-decoration: none;\n}\n\n/* Match the sidebar drawer breakpoint: the desktop rail is always visible. */\n@media (min-width: 1080px) {\n  .shellhead__burger {\n    display: none;\n  }\n}\n\n/* Onder 720px is er geen ruimte voor het kruimelpad naast de merknaam. */\n@media (max-width: 719px) {\n  .shellhead__crumbs,\n  .shellhead__sep {\n    display: none;\n  }\n}\n</style>\n","<template>\n  <svg\n    class=\"icon\"\n    :width=\"size\"\n    :height=\"size\"\n    viewBox=\"0 0 32 32\"\n    fill=\"currentColor\"\n    aria-hidden=\"true\"\n    focusable=\"false\"\n  >\n    <component :is=\"tag\" v-for=\"([tag, attrs], i) in nodes\" :key=\"i\" v-bind=\"attrs\" />\n  </svg>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { ICON_DATA, type IconNode } from \"./icon-data\";\n\n// Renders one Carbon glyph from the generated geometry table. No npm icon\n// package at runtime: see scripts/dev/generate-admin-icons.mjs for why.\n//\n// Het contract is dat van de kit: alle geometrie op het 32-raster, geschaald\n// via width/height, gevuld met currentColor. Carbon tekent gevulde vormen, geen\n// lijntekeningen, dus er is hier geen stroke en geen stroke-width.\n//\n// An unknown name renders nothing rather than throwing. A missing glyph is a\n// cosmetic defect; a thrown error inside a table cell would blank the screen.\nconst props = withDefaults(defineProps<{ name: string; size?: number }>(), { size: 16 });\n\nconst nodes = computed<IconNode>(() => ICON_DATA[props.name] ?? []);\n</script>\n\n<style scoped>\n/* De kit zet hier `display: block`, wat klopt zolang elk icoon in een flexrij\n   staat. Bij ons staan er ook iconen midden in een zin (\"Laatste rapport ->\"),\n   en die zakken met block uit de regel. */\n.icon {\n  display: inline-block;\n  flex: none;\n  vertical-align: -0.125em;\n}\n</style>\n","// GENERATED FILE, DO NOT EDIT BY HAND.\n// Run `node scripts/dev/generate-admin-icons.mjs` after changing the ICONS\n// list in that script. Geometry comes from @carbon/icons (Apache-2.0); see\n// frontend/node_modules/@carbon/icons/LICENSE.\n//\n// Each entry is a list of [svgTagName, attributes] pairs, rendered by Icon.vue\n// into an <svg viewBox=\"0 0 32 32\" fill=\"currentColor\">, exactly as the Locata\n// design system's own Icon component does.\n\nexport type IconNode = Array<[string, Record<string, string>]>;\n\nexport const ICON_DATA: Record<string, IconNode> = {\n  \"add\": [[\"path\",{\"d\":\"M17 15 17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z\"}]],\n  \"add--alt\": [[\"path\",{\"d\":\"M16,4c6.6,0,12,5.4,12,12s-5.4,12-12,12S4,22.6,4,16S9.4,4,16,4 M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14 S23.7,2,16,2z\"}],[\"path\",{\"d\":\"M24 15 17 15 17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17z\"}]],\n  \"analytics\": [[\"path\",{\"d\":\"M4,2H2V28a2,2,0,0,0,2,2H30V28H4Z\"}],[\"path\",{\"d\":\"M30,9H23v2h3.59L19,18.59l-4.29-4.3a1,1,0,0,0-1.42,0L6,21.59,7.41,23,14,16.41l4.29,4.3a1,1,0,0,0,1.42,0L28,12.41V16h2Z\"}]],\n  \"arrow--right\": [[\"path\",{\"d\":\"M18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z\"}]],\n  \"asleep\": [[\"path\",{\"d\":\"M13.5025,5.4136A15.0755,15.0755,0,0,0,25.096,23.6082a11.1134,11.1134,0,0,1-7.9749,3.3893c-.1385,0-.2782.0051-.4178,0A11.0944,11.0944,0,0,1,13.5025,5.4136M14.98,3a1.0024,1.0024,0,0,0-.1746.0156A13.0959,13.0959,0,0,0,16.63,28.9973c.1641.006.3282,0,.4909,0a13.0724,13.0724,0,0,0,10.702-5.5556,1.0094,1.0094,0,0,0-.7833-1.5644A13.08,13.08,0,0,1,15.8892,4.38,1.0149,1.0149,0,0,0,14.98,3Z\"}]],\n  \"car\": [[\"path\",{\"d\":\"M29.3379,15.9336l-7.7324-2.7783L18.374,9.0967A2.99,2.99,0,0,0,16.0537,8H8.0576a2.9982,2.9982,0,0,0-2.48,1.3115L2.8662,13.2949A4.9884,4.9884,0,0,0,2,16.1074V24a1,1,0,0,0,1,1H5.1421a3.9806,3.9806,0,0,0,7.7158,0h6.2842a3.9806,3.9806,0,0,0,7.7158,0H29a1,1,0,0,0,1-1V16.875A1,1,0,0,0,29.3379,15.9336ZM9,26a2,2,0,1,1,2-2A2.0027,2.0027,0,0,1,9,26Zm14,0a2,2,0,1,1,2-2A2.0025,2.0025,0,0,1,23,26Zm5-3H26.8579a3.9806,3.9806,0,0,0-7.7158,0H12.8579a3.9806,3.9806,0,0,0-7.7158,0H4V16.1074A2.9977,2.9977,0,0,1,4.52,14.4189l2.711-3.9814A.9992.9992,0,0,1,8.0576,10h7.9961a.9928.9928,0,0,1,.7647.3545l3.3994,4.2685a1.0007,1.0007,0,0,0,.4443.3184L28,17.5781Z\"}]],\n  \"caret--down\": [[\"path\",{\"d\":\"M24 12 16 22 8 12z\"}]],\n  \"caret--up\": [[\"path\",{\"d\":\"M8 20 16 10 24 20z\"}]],\n  \"chart--line\": [[\"path\",{\"d\":\"M4.67,28l6.39-12,7.3,6.49a2,2,0,0,0,1.7.47,2,2,0,0,0,1.42-1.07L27,10.9,25.18,10,19.69,21l-7.3-6.49A2,2,0,0,0,10.71,14a2,2,0,0,0-1.42,1L4,25V2H2V28a2,2,0,0,0,2,2H30V28Z\"}]],\n  \"checkmark\": [[\"path\",{\"d\":\"M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z\"}]],\n  \"checkmark--outline\": [[\"path\",{\"d\":\"M14 21.414 9 16.413 10.413 15 14 18.586 21.585 11 23 12.415 14 21.414z\"}],[\"path\",{\"d\":\"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z\"}]],\n  \"chevron--down\": [[\"path\",{\"d\":\"M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z\"}]],\n  \"chevron--left\": [[\"path\",{\"d\":\"M10 16 20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z\"}]],\n  \"chevron--right\": [[\"path\",{\"d\":\"M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z\"}]],\n  \"circle--outline\": [[\"path\",{\"stroke-width\":\"0\",\"d\":\"m16,2c-7.732,0-14,6.268-14,14s6.268,14,14,14,14-6.268,14-14S23.732,2,16,2Zm0,26c-6.6274,0-12-5.3726-12-12s5.3726-12,12-12,12,5.3726,12,12-5.3726,12-12,12Z\"}]],\n  \"circle-dash\": [[\"path\",{\"d\":\"M7.7,4.7a14.7,14.7,0,0,0-3,3.1L6.3,9A13.26,13.26,0,0,1,8.9,6.3Z\"}],[\"path\",{\"d\":\"M4.6,12.3l-1.9-.6A12.51,12.51,0,0,0,2,16H4A11.48,11.48,0,0,1,4.6,12.3Z\"}],[\"path\",{\"d\":\"M2.7,20.4a14.4,14.4,0,0,0,2,3.9l1.6-1.2a12.89,12.89,0,0,1-1.7-3.3Z\"}],[\"path\",{\"d\":\"M7.8,27.3a14.4,14.4,0,0,0,3.9,2l.6-1.9A12.89,12.89,0,0,1,9,25.7Z\"}],[\"path\",{\"d\":\"M11.7,2.7l.6,1.9A11.48,11.48,0,0,1,16,4V2A12.51,12.51,0,0,0,11.7,2.7Z\"}],[\"path\",{\"d\":\"M24.2,27.3a15.18,15.18,0,0,0,3.1-3.1L25.7,23A11.53,11.53,0,0,1,23,25.7Z\"}],[\"path\",{\"d\":\"M27.4,19.7l1.9.6A15.47,15.47,0,0,0,30,16H28A11.48,11.48,0,0,1,27.4,19.7Z\"}],[\"path\",{\"d\":\"M29.2,11.6a14.4,14.4,0,0,0-2-3.9L25.6,8.9a12.89,12.89,0,0,1,1.7,3.3Z\"}],[\"path\",{\"d\":\"M24.1,4.6a14.4,14.4,0,0,0-3.9-2l-.6,1.9a12.89,12.89,0,0,1,3.3,1.7Z\"}],[\"path\",{\"d\":\"M20.3,29.3l-.6-1.9A11.48,11.48,0,0,1,16,28v2A21.42,21.42,0,0,0,20.3,29.3Z\"}]],\n  \"close\": [[\"path\",{\"d\":\"M17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z\"}]],\n  \"close--outline\": [[\"path\",{\"d\":\"M16,2C8.2,2,2,8.2,2,16s6.2,14,14,14s14-6.2,14-14S23.8,2,16,2z M16,28C9.4,28,4,22.6,4,16S9.4,4,16,4s12,5.4,12,12 S22.6,28,16,28z\"}],[\"path\",{\"d\":\"M21.4 23 16 17.6 10.6 23 9 21.4 14.4 16 9 10.6 10.6 9 16 14.4 21.4 9 23 10.6 17.6 16 23 21.4z\"}]],\n  \"copy\": [[\"path\",{\"d\":\"M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z\"}],[\"path\",{\"d\":\"M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z\"}]],\n  \"delivery-truck\": [[\"path\",{\"d\":\"M29.92,16.61l-3-7A1,1,0,0,0,26,9H23V7a1,1,0,0,0-1-1H3A1,1,0,0,0,2,7V24a1,1,0,0,0,1,1H5.14a4,4,0,0,0,7.72,0h6.28a4,4,0,0,0,7.72,0H29a1,1,0,0,0,1-1V17A1,1,0,0,0,29.92,16.61ZM23,11h2.34l2.14,5H23ZM9,26a2,2,0,1,1,2-2A2,2,0,0,1,9,26Zm10.14-3H12.86a4,4,0,0,0-7.72,0H4V8H21V20.56A4,4,0,0,0,19.14,23ZM23,26a2,2,0,1,1,2-2A2,2,0,0,1,23,26Zm5-3H26.86A4,4,0,0,0,23,20V18h5Z\"}]],\n  \"download\": [[\"path\",{\"d\":\"M26,24v4H6V24H4v4H4a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2h0V24Z\"}],[\"path\",{\"d\":\"M26 14 24.59 12.59 17 20.17 17 2 15 2 15 20.17 7.41 12.59 6 14 16 24 26 14z\"}]],\n  \"filter\": [[\"path\",{\"d\":\"M18,28H14a2,2,0,0,1-2-2V18.41L4.59,11A2,2,0,0,1,4,9.59V6A2,2,0,0,1,6,4H26a2,2,0,0,1,2,2V9.59A2,2,0,0,1,27.41,11L20,18.41V26A2,2,0,0,1,18,28ZM6,6V9.59l8,8V26h4V17.59l8-8V6Z\"}]],\n  \"flag\": [[\"path\",{\"d\":\"M6,30H4V2H28l-5.8,9L28,20H6ZM6,18H24.33L19.8,11l4.53-7H6Z\"}]],\n  \"flash\": [[\"path\",{\"d\":\"M11.61,29.92a1,1,0,0,1-.6-1.07L12.83,17H8a1,1,0,0,1-1-1.23l3-13A1,1,0,0,1,11,2H21a1,1,0,0,1,.78.37,1,1,0,0,1,.2.85L20.25,11H25a1,1,0,0,1,.9.56,1,1,0,0,1-.11,1l-13,17A1,1,0,0,1,12,30,1.09,1.09,0,0,1,11.61,29.92ZM17.75,13l2-9H11.8L9.26,15h5.91L13.58,25.28,23,13Z\"}]],\n  \"idea\": [[\"path\",{\"d\":\"M11 24H21V26H11z\"}],[\"path\",{\"d\":\"M13 28H19V30H13z\"}],[\"path\",{\"d\":\"M16,2A10,10,0,0,0,6,12a9.19,9.19,0,0,0,3.46,7.62c1,.93,1.54,1.46,1.54,2.38h2c0-1.84-1.11-2.87-2.19-3.86A7.2,7.2,0,0,1,8,12a8,8,0,0,1,16,0,7.2,7.2,0,0,1-2.82,6.14c-1.07,1-2.18,2-2.18,3.86h2c0-.92.53-1.45,1.54-2.39A9.18,9.18,0,0,0,26,12,10,10,0,0,0,16,2Z\"}]],\n  \"information--filled\": [[\"path\",{\"fill\":\"none\",\"d\":\"M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z\",\"data-icon-path\":\"inner-path\"}],[\"path\",{\"d\":\"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,6a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z\"}]],\n  \"launch\": [[\"path\",{\"d\":\"M26,28H6a2.0027,2.0027,0,0,1-2-2V6A2.0027,2.0027,0,0,1,6,4H16V6H6V26H26V16h2V26A2.0027,2.0027,0,0,1,26,28Z\"}],[\"path\",{\"d\":\"M20 2 20 4 26.586 4 18 12.586 19.414 14 28 5.414 28 12 30 12 30 2 20 2z\"}]],\n  \"light\": [[\"path\",{\"d\":\"M15 2H17V7H15z\"}],[\"path\",{\"d\":\"M21.668 6.854H26.625999999999998V8.854H21.668z\",\"transform\":\"rotate(-45 24.147 7.853)\"}],[\"path\",{\"d\":\"M25 15H30V17H25z\"}],[\"path\",{\"d\":\"M23.147 21.668H25.147V26.625999999999998H23.147z\",\"transform\":\"rotate(-45 24.147 24.146)\"}],[\"path\",{\"d\":\"M15 25H17V30H15z\"}],[\"path\",{\"d\":\"M5.375 23.147H10.333V25.147H5.375z\",\"transform\":\"rotate(-45 7.853 24.146)\"}],[\"path\",{\"d\":\"M2 15H7V17H2z\"}],[\"path\",{\"d\":\"M6.854 5.375H8.854V10.333H6.854z\",\"transform\":\"rotate(-45 7.854 7.853)\"}],[\"path\",{\"d\":\"M16,12a4,4,0,1,1-4,4,4.0045,4.0045,0,0,1,4-4m0-2a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z\"}]],\n  \"list\": [[\"path\",{\"d\":\"M10 6H28V8H10z\"}],[\"path\",{\"d\":\"M10 24H28V26H10z\"}],[\"path\",{\"d\":\"M10 15H28V17H10z\"}],[\"path\",{\"d\":\"M4 15H6V17H4z\"}],[\"path\",{\"d\":\"M4 6H6V8H4z\"}],[\"path\",{\"d\":\"M4 24H6V26H4z\"}]],\n  \"location\": [[\"path\",{\"d\":\"M16,18a5,5,0,1,1,5-5A5.0057,5.0057,0,0,1,16,18Zm0-8a3,3,0,1,0,3,3A3.0033,3.0033,0,0,0,16,10Z\"}],[\"path\",{\"d\":\"M16,30,7.5645,20.0513c-.0479-.0571-.3482-.4515-.3482-.4515A10.8888,10.8888,0,0,1,5,13a11,11,0,0,1,22,0,10.8844,10.8844,0,0,1-2.2148,6.5973l-.0015.0025s-.3.3944-.3447.4474ZM8.8125,18.395c.001.0007.2334.3082.2866.3744L16,26.9079l6.91-8.15c.0439-.0552.2783-.3649.2788-.3657A8.901,8.901,0,0,0,25,13,9,9,0,1,0,7,13a8.9054,8.9054,0,0,0,1.8125,5.395Z\"}]],\n  \"map\": [[\"path\",{\"d\":\"M16,24l-6.09-8.6A8.14,8.14,0,0,1,16,2a8.08,8.08,0,0,1,8,8.13,8.2,8.2,0,0,1-1.8,5.13ZM16,4a6.07,6.07,0,0,0-6,6.13,6.19,6.19,0,0,0,1.49,4L16,20.52,20.63,14A6.24,6.24,0,0,0,22,10.13,6.07,6.07,0,0,0,16,4Z\"}],[\"circle\",{\"cx\":\"16\",\"cy\":\"9\",\"r\":\"2\"}],[\"path\",{\"d\":\"M28,12H26v2h2V28H4V14H6V12H4a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V14A2,2,0,0,0,28,12Z\"}]],\n  \"menu\": [[\"path\",{\"d\":\"M4 6H28V8H4z\"}],[\"path\",{\"d\":\"M4 24H28V26H4z\"}],[\"path\",{\"d\":\"M4 12H28V14H4z\"}],[\"path\",{\"d\":\"M4 18H28V20H4z\"}]],\n  \"misuse--outline\": [[\"path\",{\"d\":\"M16,2C8.2,2,2,8.2,2,16s6.2,14,14,14s14-6.2,14-14S23.8,2,16,2z M16,28C9.4,28,4,22.6,4,16S9.4,4,16,4s12,5.4,12,12 S22.6,28,16,28z\"}],[\"path\",{\"d\":\"M21.4 23 16 17.6 10.6 23 9 21.4 14.4 16 9 10.6 10.6 9 16 14.4 21.4 9 23 10.6 17.6 16 23 21.4z\"}]],\n  \"notification\": [[\"path\",{\"d\":\"M28.7071,19.293,26,16.5859V13a10.0136,10.0136,0,0,0-9-9.9492V1H15V3.0508A10.0136,10.0136,0,0,0,6,13v3.5859L3.2929,19.293A1,1,0,0,0,3,20v3a1,1,0,0,0,1,1h7v.7768a5.152,5.152,0,0,0,4.5,5.1987A5.0057,5.0057,0,0,0,21,25V24h7a1,1,0,0,0,1-1V20A1,1,0,0,0,28.7071,19.293ZM19,25a3,3,0,0,1-6,0V24h6Zm8-3H5V20.4141L7.707,17.707A1,1,0,0,0,8,17V13a8,8,0,0,1,16,0v4a1,1,0,0,0,.293.707L27,20.4141Z\"}]],\n  \"search\": [[\"path\",{\"d\":\"M29,27.5859l-7.5521-7.5521a11.0177,11.0177,0,1,0-1.4141,1.4141L27.5859,29ZM4,13a9,9,0,1,1,9,9A9.01,9.01,0,0,1,4,13Z\"}]],\n  \"settings\": [[\"path\",{\"d\":\"M27,16.76c0-.25,0-.5,0-.76s0-.51,0-.77l1.92-1.68A2,2,0,0,0,29.3,11L26.94,7a2,2,0,0,0-1.73-1,2,2,0,0,0-.64.1l-2.43.82a11.35,11.35,0,0,0-1.31-.75l-.51-2.52a2,2,0,0,0-2-1.61H13.64a2,2,0,0,0-2,1.61l-.51,2.52a11.48,11.48,0,0,0-1.32.75L7.43,6.06A2,2,0,0,0,6.79,6,2,2,0,0,0,5.06,7L2.7,11a2,2,0,0,0,.41,2.51L5,15.24c0,.25,0,.5,0,.76s0,.51,0,.77L3.11,18.45A2,2,0,0,0,2.7,21L5.06,25a2,2,0,0,0,1.73,1,2,2,0,0,0,.64-.1l2.43-.82a11.35,11.35,0,0,0,1.31.75l.51,2.52a2,2,0,0,0,2,1.61h4.72a2,2,0,0,0,2-1.61l.51-2.52a11.48,11.48,0,0,0,1.32-.75l2.42.82a2,2,0,0,0,.64.1,2,2,0,0,0,1.73-1L29.3,21a2,2,0,0,0-.41-2.51ZM25.21,24l-3.43-1.16a8.86,8.86,0,0,1-2.71,1.57L18.36,28H13.64l-.71-3.55a9.36,9.36,0,0,1-2.7-1.57L6.79,24,4.43,20l2.72-2.4a8.9,8.9,0,0,1,0-3.13L4.43,12,6.79,8l3.43,1.16a8.86,8.86,0,0,1,2.71-1.57L13.64,4h4.72l.71,3.55a9.36,9.36,0,0,1,2.7,1.57L25.21,8,27.57,12l-2.72,2.4a8.9,8.9,0,0,1,0,3.13L27.57,20Z\"}],[\"path\",{\"d\":\"M16,22a6,6,0,1,1,6-6A5.94,5.94,0,0,1,16,22Zm0-10a3.91,3.91,0,0,0-4,4,3.91,3.91,0,0,0,4,4,3.91,3.91,0,0,0,4-4A3.91,3.91,0,0,0,16,12Z\"}]],\n  \"settings--services\": [[\"path\",{\"d\":\"M29,25H27V23h1V19H24v1H22V18a1,1,0,0,1,1-1h6a1,1,0,0,1,1,1v6A1,1,0,0,1,29,25Z\"}],[\"path\",{\"d\":\"M24,30H18a1,1,0,0,1-1-1V23a1,1,0,0,1,1-1h6a1,1,0,0,1,1,1v6A1,1,0,0,1,24,30Zm-5-2h4V24H19Z\"}],[\"path\",{\"d\":\"M15,19.8579A3.9934,3.9934,0,1,1,20,16h2a6,6,0,1,0-7,5.91Z\"}],[\"path\",{\"d\":\"M28.89,13.55l-2.31,2.03-1.42-1.42,2.41-2.12L25.21,7.96,21.77,9.12a9.3684,9.3684,0,0,0-2.7-1.57L18.36,4H13.64l-.71,3.55a8.8609,8.8609,0,0,0-2.71,1.57L6.79,7.96,4.43,12.04l2.72,2.39a8.8948,8.8948,0,0,0,0,3.13l-2.72,2.4,2.36,4.08,3.44-1.16a9.3684,9.3684,0,0,0,2.7,1.57L13.64,28H15v2H13.64a2.0007,2.0007,0,0,1-1.96-1.61l-.51-2.52a11.412,11.412,0,0,1-1.31-.75l-2.43.82a2.038,2.038,0,0,1-.64.1,1.973,1.973,0,0,1-1.73-1L2.7,20.96a2,2,0,0,1,.41-2.51l1.92-1.68C5.01,16.51,5,16.26,5,16s.02-.51.04-.76L3.11,13.55a2,2,0,0,1-.41-2.51L5.06,6.96a1.973,1.973,0,0,1,1.73-1,2.038,2.038,0,0,1,.64.1l2.42.82a11.5416,11.5416,0,0,1,1.32-.75l.51-2.52A2.0007,2.0007,0,0,1,13.64,2h4.72a2.0007,2.0007,0,0,1,1.96,1.61l.51,2.52a11.412,11.412,0,0,1,1.31.75l2.43-.82a2.038,2.038,0,0,1,.64-.1,1.973,1.973,0,0,1,1.73,1l2.36,4.08A2,2,0,0,1,28.89,13.55Z\"}]],\n  \"star\": [[\"path\",{\"d\":\"M16,6.52l2.76,5.58.46,1,1,.15,6.16.89L22,18.44l-.75.73.18,1,1.05,6.13-5.51-2.89L16,23l-.93.49L9.56,26.34l1-6.13.18-1L10,18.44,5.58,14.09l6.16-.89,1-.15.46-1L16,6.52M16,2l-4.55,9.22L1.28,12.69l7.36,7.18L6.9,30,16,25.22,25.1,30,23.36,19.87l7.36-7.17L20.55,11.22Z\"}]],\n  \"store\": [[\"path\",{\"d\":\"M30,10.68l-2-6A1,1,0,0,0,27,4H5a1,1,0,0,0-1,.68l-2,6A1.19,1.19,0,0,0,2,11v6a1,1,0,0,0,1,1H4V28H6V18h6V28H28V18h1a1,1,0,0,0,1-1V11A1.19,1.19,0,0,0,30,10.68ZM26,26H14V18H26Zm2-10H24V12H22v4H17V12H15v4H10V12H8v4H4V11.16L5.72,6H26.28L28,11.16Z\"}]],\n  \"subtract\": [[\"path\",{\"d\":\"M8 15H24V17H8z\"}]],\n  \"subtract--alt\": [[\"path\",{\"d\":\"M16,4c6.6,0,12,5.4,12,12s-5.4,12-12,12S4,22.6,4,16S9.4,4,16,4 M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14 S23.7,2,16,2z\"}],[\"path\",{\"d\":\"M8 15H24V17H8z\"}]],\n  \"time\": [[\"path\",{\"d\":\"M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z\"}],[\"path\",{\"d\":\"M20.59 22 15 16.41 15 7 17 7 17 15.58 22 20.59 20.59 22z\"}]],\n  \"trash-can\": [[\"path\",{\"d\":\"M12 12H14V24H12z\"}],[\"path\",{\"d\":\"M18 12H20V24H18z\"}],[\"path\",{\"d\":\"M4,6V8H6V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8h2V6ZM8,28V8H24V28Z\"}],[\"path\",{\"d\":\"M12 2H20V4H12z\"}]],\n  \"upload\": [[\"path\",{\"d\":\"M6 18 7.41 19.41 15 11.83 15 30 17 30 17 11.83 24.59 19.41 26 18 16 8 6 18z\"}],[\"path\",{\"d\":\"M6,8V4H26V8h2V4a2,2,0,0,0-2-2H6A2,2,0,0,0,4,4V8Z\"}]],\n  \"view\": [[\"path\",{\"d\":\"M30.94,15.66A16.69,16.69,0,0,0,16,5,16.69,16.69,0,0,0,1.06,15.66a1,1,0,0,0,0,.68A16.69,16.69,0,0,0,16,27,16.69,16.69,0,0,0,30.94,16.34,1,1,0,0,0,30.94,15.66ZM16,25c-5.3,0-10.9-3.93-12.93-9C5.1,10.93,10.7,7,16,7s10.9,3.93,12.93,9C26.9,21.07,21.3,25,16,25Z\"}],[\"path\",{\"d\":\"M16,10a6,6,0,1,0,6,6A6,6,0,0,0,16,10Zm0,10a4,4,0,1,1,4-4A4,4,0,0,1,16,20Z\"}]],\n  \"warning--filled\": [[\"path\",{\"d\":\"M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14C30,8.3,23.7,2,16,2z M14.9,8h2.2v11h-2.2V8z M16,25 c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22c0.8,0,1.5,0.7,1.5,1.5S16.8,25,16,25z\"}],[\"path\",{\"fill\":\"none\",\"d\":\"M17.5,23.5c0,0.8-0.7,1.5-1.5,1.5c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22 C16.8,22,17.5,22.7,17.5,23.5z M17.1,8h-2.2v11h2.2V8z\",\"data-icon-path\":\"inner-path\",\"opacity\":\"0\"}]],\n};\n\nexport type IconName = keyof typeof ICON_DATA;\n","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveDynamicComponent as _resolveDynamicComponent, mergeProps as _mergeProps, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = [\"width\", \"height\"]\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"svg\", {\n    class: \"icon\",\n    width: $props.size,\n    height: $props.size,\n    viewBox: \"0 0 32 32\",\n    fill: \"currentColor\",\n    \"aria-hidden\": \"true\",\n    focusable: \"false\"\n  }, [\n    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.nodes, ([tag, attrs], i) => {\n      return (_openBlock(), _createBlock(_resolveDynamicComponent(tag), _mergeProps({ key: i }, { ref_for: true }, attrs), null, 16 /* FULL_PROPS */))\n    }), 128 /* KEYED_FRAGMENT */))\n  ], 8 /* PROPS */, _hoisted_1))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/icons/Icon.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/icons/Icon.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/icons/Icon.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/icons/Icon.vue\";script.__scopeId = \"data-v-c518adf7\";export default script;","// Theme state: dark | light. Persisted in localStorage, falling back to the\n// system `prefers-color-scheme` preference on first load.\n//\n// The switch is the `dark` CLASS on <html>, not a data-attribute: that is the\n// mechanism `next-themes attribute=\"class\"` used in the Next admin, so the\n// ported token block in styles/tokens.scss works unchanged.\nimport { onBeforeUnmount, onMounted, readonly, ref } from \"vue\";\n\nconst STORAGE_KEY = \"statiegeldnl:admin:theme\";\nconst DARK_CLASS = \"dark\";\n\nexport type Theme = \"dark\" | \"light\";\n\nfunction readStored(): Theme | null {\n  try {\n    const v = localStorage.getItem(STORAGE_KEY);\n    return v === \"dark\" || v === \"light\" ? v : null;\n  } catch {\n    return null;\n  }\n}\n\nfunction prefersDark(): boolean {\n  return typeof window !== \"undefined\" && window.matchMedia(\"(prefers-color-scheme: dark)\").matches;\n}\n\n// Default is LIGHT, not dark: the Locata kit starts light and the reading\n// literature favours positive polarity for a table-heavy task. Only an explicit\n// stored choice or a system preference moves it.\nfunction resolveInitialTheme(): Theme {\n  return readStored() ?? (prefersDark() ? \"dark\" : \"light\");\n}\n\nfunction apply(theme: Theme) {\n  document.documentElement.classList.toggle(DARK_CLASS, theme === \"dark\");\n}\n\n// Sync init: call once from frontend.ts before Vue mounts so the first paint\n// matches the resolved theme instead of flashing the default.\nexport function initTheme(): void {\n  apply(resolveInitialTheme());\n}\n\nexport function useTheme() {\n  const theme = ref<Theme>(\n    document.documentElement.classList.contains(DARK_CLASS) ? \"dark\" : resolveInitialTheme(),\n  );\n\n  function setTheme(next: Theme) {\n    theme.value = next;\n    apply(next);\n    try { localStorage.setItem(STORAGE_KEY, next); } catch { /* quota/denied, silent */ }\n  }\n\n  function toggleTheme() {\n    setTheme(theme.value === \"dark\" ? \"light\" : \"dark\");\n  }\n\n  // Follow the system preference only while the user has not picked a theme.\n  const mq = typeof window !== \"undefined\" ? window.matchMedia(\"(prefers-color-scheme: dark)\") : null;\n  function onSystemChange() {\n    if (readStored() !== null) return;\n    const next: Theme = mq?.matches ? \"dark\" : \"light\";\n    theme.value = next;\n    apply(next);\n  }\n\n  onMounted(() => { mq?.addEventListener(\"change\", onSystemChange); });\n  onBeforeUnmount(() => { mq?.removeEventListener(\"change\", onSystemChange); });\n\n  return { theme: readonly(theme), setTheme, toggleTheme };\n}\n","<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport { RouterLink } from \"vue-router\";\nimport Icon from \"../icons/Icon.vue\";\nimport Popover from \"../ui/Popover.vue\";\nimport { notificationRows, syncDescription, type ShellSignals } from \"../../lib/shell-signals\";\nimport { settingsSectionRoute } from \"../../lib/settings-sections\";\n\nconst props = defineProps<{ signals: ShellSignals | null; unavailable: boolean; now: Date }>();\nconst open = ref(false);\nconst rows = computed(() => props.signals ? notificationRows(props.signals) : []);\nconst total = computed(() => props.signals ? props.signals.failed + props.signals.stuck : 0);\n</script>\n\n<template>\n  <Popover v-model:open=\"open\" align=\"end\" :width=\"300\">\n    <template #trigger>\n      <button class=\"notification__trigger\" type=\"button\" :aria-label=\"total > 0 ? `Meldingen, ${total} openstaand` : 'Meldingen'\" title=\"Meldingen\">\n        <Icon name=\"notification\" :size=\"18\" />\n        <span v-if=\"total > 0\" class=\"notification__count\" aria-hidden=\"true\">{{ total > 9 ? '9+' : total }}</span>\n      </button>\n    </template>\n    <section class=\"notification\" aria-label=\"Meldingen\">\n      <h2 class=\"notification__title\">Meldingen</h2>\n      <p v-if=\"unavailable\" class=\"notification__message\" role=\"status\">Meldingen konden niet worden bijgewerkt.</p>\n      <p v-else-if=\"!signals\" class=\"notification__message\">Meldingen laden…</p>\n      <ul v-if=\"rows.length\" class=\"notification__rows\">\n        <li v-for=\"row in rows\" :key=\"row.section\">\n          <RouterLink :to=\"settingsSectionRoute(row.section)\" class=\"notification__row\" @click=\"open = false\">\n            <Icon name=\"warning--filled\" :size=\"16\" :class=\"`notification__icon--${row.tone}`\" />\n            <span><span class=\"notification__label\">{{ row.title }}</span><span class=\"notification__detail\">{{ row.detail }}</span></span>\n          </RouterLink>\n        </li>\n      </ul>\n      <p v-else-if=\"signals && !unavailable\" class=\"notification__message\">\n        <Icon name=\"checkmark--outline\" :size=\"16\" />\n        Geen mislukte of vastgelopen analyses.\n      </p>\n      <p v-if=\"signals\" class=\"notification__sync\">{{ syncDescription({ lastSync: signals.lastSync, now }) }}</p>\n    </section>\n  </Popover>\n</template>\n\n<style scoped>\n.notification__trigger {\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  height: 32px;\n  width: 36px;\n  border: 0;\n  border-radius: var(--radius);\n  background: transparent;\n  color: var(--ink-fg);\n  cursor: pointer;\n}\n.notification__trigger:hover { background: var(--ink-hover); }\n.notification__count {\n  position: absolute;\n  top: 0;\n  right: 0;\n  min-width: 16px;\n  padding: 0 3px;\n  border-radius: 8px;\n  background: var(--diverge);\n  color: var(--ink);\n  font-size: 10px;\n  line-height: 16px;\n}\n.notification__title { margin: 0 0 8px; font-size: var(--text-ui); font-weight: 500; }\n.notification__rows { margin: 0; padding: 0; list-style: none; }\n.notification__row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; color: var(--fg-1); text-decoration: none; cursor: pointer; }\n.notification__row:hover { background: var(--bg-inset); }\n.notification__row > :first-child { flex: none; margin-top: 3px; }\n.notification__label { display: block; font-size: var(--text-ui); }\n.notification__detail { display: block; margin-top: 3px; color: var(--fg-3); font-size: var(--text-caption); }\n.notification__icon--danger { color: var(--danger-fg); }\n.notification__icon--diverge { color: var(--diverge-fg); }\n.notification__message { display: flex; gap: 8px; color: var(--fg-3); font-size: var(--text-ui); }\n.notification__sync { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--border-1); color: var(--fg-3); font-size: var(--text-caption); }\n</style>\n","<template>\n  <PopoverRoot :open=\"open\" @update:open=\"onOpenChange\">\n    <PopoverTrigger as-child>\n      <slot name=\"trigger\" />\n    </PopoverTrigger>\n    <PopoverPortal>\n      <PopoverContent\n        class=\"snl-popover\"\n        :align=\"align\"\n        :side-offset=\"sideOffset\"\n        :style=\"width ? { width: `${width}px` } : undefined\"\n      >\n        <slot />\n      </PopoverContent>\n    </PopoverPortal>\n  </PopoverRoot>\n</template>\n\n<script setup lang=\"ts\">\nimport { PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger } from \"reka-ui\";\n\n// Floating panel anchored to a trigger. The caller supplies its own button in\n// the `trigger` slot (rendered as-child, so it stays that element); the default\n// slot is the content, teleported to <body>.\n//\n// `open` is optional: leave it unbound and reka-ui keeps its own state; bind\n// it (`v-model:open`) to close the panel programmatically after an action.\n//\n// The shadow is deliberate and is the ONLY place in this system besides Dialog\n// where one exists: shadows are for things that float.\nwithDefaults(defineProps<{\n  align?: \"start\" | \"center\" | \"end\";\n  sideOffset?: number;\n  width?: number;\n  open?: boolean;\n}>(), { align: \"start\", sideOffset: 4, open: undefined });\n\nconst emit = defineEmits<{ \"update:open\": [value: boolean] }>();\n\nfunction onOpenChange(value: boolean) {\n  emit(\"update:open\", value);\n}\n</script>\n\n<!-- NOT scoped, on purpose. reka-ui's PopperContent renders a positioning\n     wrapper as its root element and passes our class down to the inner node;\n     Vue puts the scope id on that root, so a scoped `.snl-popover` would never\n     match. Namespaced class instead, same recipe as the Leaflet pins. -->\n<style>\n.snl-popover {\n  z-index: 50;\n  max-height: 60vh;\n  overflow-y: auto;\n  padding: 12px;\n  border: 1px solid var(--border-1);\n  border-radius: var(--radius);\n  background: var(--popover);\n  color: var(--popover-foreground);\n  box-shadow: 0 2px 6px rgba(1, 5, 4, 0.2);\n  outline: none;\n}\n</style>\n","import { renderSlot as _renderSlot, withCtx as _withCtx, createVNode as _createVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createBlock($setup[\"PopoverRoot\"], {\n    open: $props.open,\n    \"onUpdate:open\": $setup.onOpenChange\n  }, {\n    default: _withCtx(() => [\n      _createVNode($setup[\"PopoverTrigger\"], { \"as-child\": \"\" }, {\n        default: _withCtx(() => [\n          _renderSlot(_ctx.$slots, \"trigger\")\n        ]),\n        _: 3 /* FORWARDED */\n      }),\n      _createVNode($setup[\"PopoverPortal\"], null, {\n        default: _withCtx(() => [\n          _createVNode($setup[\"PopoverContent\"], {\n            class: \"snl-popover\",\n            align: $props.align,\n            \"side-offset\": $props.sideOffset,\n            style: _normalizeStyle($props.width ? { width: `${$props.width}px` } : undefined)\n          }, {\n            default: _withCtx(() => [\n              _renderSlot(_ctx.$slots, \"default\")\n            ]),\n            _: 3 /* FORWARDED */\n          }, 8 /* PROPS */, [\"align\", \"side-offset\", \"style\"])\n        ]),\n        _: 3 /* FORWARDED */\n      })\n    ]),\n    _: 3 /* FORWARDED */\n  }, 8 /* PROPS */, [\"open\"]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Popover.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Popover.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Popover.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Popover.vue\";export default script;","/**\n * \"5 min geleden\" voor tijdstempels in lijsten en de statusbalk.\n *\n * Twee dingen die bewust afgevangen worden in plaats van doorgegeven:\n * een ongeldige of ontbrekende datum levert een lege string op (nooit\n * \"Invalid Date\" in de UI), en een datum in de toekomst klemt op \"net\" in\n * plaats van \"in -3 minuten\" te tonen. Dat laatste is geen theoretisch geval:\n * server- en browserklok lopen bijna nooit exact gelijk.\n */\nexport function relativeTime(date: Date | null | undefined, now: Date = new Date()): string {\n  if (!date || Number.isNaN(date.getTime())) return \"\";\n\n  const seconds = Math.floor((now.getTime() - date.getTime()) / 1000);\n  if (seconds < 60) return \"net\";\n\n  const minutes = Math.floor(seconds / 60);\n  if (minutes < 60) return `${minutes} min geleden`;\n\n  const hours = Math.floor(minutes / 60);\n  if (hours < 24) return `${hours} uur geleden`;\n\n  const days = Math.floor(hours / 24);\n  return days === 1 ? \"1 dag geleden\" : `${days} dagen geleden`;\n}\n","import { relativeTime } from \"./relative-time\";\nimport type { SettingsSectionId } from \"./settings-sections\";\n\nexport interface ShellSignals {\n  failed: number;\n  stuck: number;\n  lastSync: string | null;\n  counts: Record<string, number>;\n}\n\nexport function notificationRows(signals: ShellSignals) {\n  const rows: Array<{ section: SettingsSectionId; tone: string; title: string; detail: string }> = [];\n  if (signals.failed > 0) rows.push({\n    section: \"failed\", tone: \"danger\",\n    title: `${signals.failed.toLocaleString(\"nl-NL\")} mislukte ${signals.failed === 1 ? \"analyse\" : \"analyses\"}`,\n    detail: \"Bekijk de foutmelding of verplaats de analyse naar de prullenbak.\",\n  });\n  if (signals.stuck > 0) rows.push({\n    section: \"stuck\", tone: \"diverge\",\n    title: `${signals.stuck.toLocaleString(\"nl-NL\")} vastgelopen ${signals.stuck === 1 ? \"analyse\" : \"analyses\"}`,\n    detail: \"Bezig zonder batch, ouder dan zes uur. Opruimen kan hier.\",\n  });\n  return rows;\n}\n\nexport function syncDescription(options: { lastSync: string | null; now: Date }): string {\n  const age = relativeTime(options.lastSync ? new Date(options.lastSync) : null, options.now);\n  return age ? `Laatste batch-poll ${age}` : \"Nog geen batch-poll geregistreerd\";\n}\n\ninterface PollerOptions {\n  load: () => Promise<ShellSignals>;\n  receive: (signals: ShellSignals) => void;\n  failed: () => void;\n  schedule?: (callback: () => void, delay: number) => () => void;\n}\n\nexport class ShellSignalsPoller {\n  #options: PollerOptions;\n  #active = false;\n  #request = 0;\n  #pending = false;\n  #cancel: (() => void) | null = null;\n\n  constructor(options: PollerOptions) {\n    this.#options = options;\n  }\n\n  public async start(): Promise<void> {\n    if (this.#active) return;\n    this.#active = true;\n    await this.refresh();\n  }\n\n  public stop(): void {\n    this.#active = false;\n    this.#request++;\n    this.#pending = false;\n    this.#cancel?.();\n    this.#cancel = null;\n  }\n\n  public async refresh(): Promise<void> {\n    if (!this.#active || this.#pending) return;\n    this.#cancel?.();\n    this.#cancel = null;\n    this.#pending = true;\n    const request = ++this.#request;\n    try {\n      const signals = await this.#options.load();\n      if (this.#active && request === this.#request) this.#options.receive(signals);\n    } catch {\n      if (this.#active && request === this.#request) this.#options.failed();\n    } finally {\n      if (this.#active && request === this.#request) {\n        this.#pending = false;\n        this.#cancel = (this.#options.schedule ?? this.#schedule)(() => { void this.refresh(); }, 60_000);\n      }\n    }\n  }\n\n  #schedule(callback: () => void, delay: number): () => void {\n    const timer = setTimeout(callback, delay);\n    return () => clearTimeout(timer);\n  }\n}\n","import type { IconName } from \"../components/icons/icon-data\";\n\n/**\n * Registry of the Instellingen sections.\n *\n * Vue-free, like lib/nav.ts: `wh checkmodule` doesn't typecheck an SFC body,\n * so any decision that doesn't need the DOM (which sections exist, their\n * group, glyph, and how an old `?tab=` link translates) lives here instead\n * of in the rail or the view.\n */\n\nexport type SettingsSectionId = \"general\" | \"import\" | \"batches\" | \"failed\" | \"stuck\" | \"trash\";\n\nexport type SettingsGroupKey = \"general\" | \"analyses\";\n\nexport interface SettingsSection {\n  id: SettingsSectionId;\n  /** Rail label. */\n  label: string;\n  /** Page title (h1); differs from label where the rail needs a shorter one. */\n  title: string;\n  group: SettingsGroupKey;\n  icon: IconName;\n}\n\n/**\n * Rail order, matching the old tabstrip order: configuration first, then\n * the analyses you clean up.\n */\nexport const SETTINGS_SECTIONS: readonly SettingsSection[] = [\n  { id: \"general\", label: \"Algemeen\", title: \"Algemeen\", group: \"general\", icon: \"settings\" },\n  { id: \"import\", label: \"Import\", title: \"Import\", group: \"general\", icon: \"upload\" },\n  { id: \"batches\", label: \"Batches\", title: \"Batches\", group: \"analyses\", icon: \"list\" },\n  { id: \"failed\", label: \"Mislukt\", title: \"Mislukte analyses\", group: \"analyses\", icon: \"warning--filled\" },\n  { id: \"stuck\", label: \"Vastgelopen\", title: \"Vastgelopen analyses\", group: \"analyses\", icon: \"time\" },\n  { id: \"trash\", label: \"Prullenbak\", title: \"Prullenbak\", group: \"analyses\", icon: \"trash-can\" },\n];\n\nexport const SETTINGS_GROUP_LABELS: Record<SettingsGroupKey, string> = {\n  general: \"Algemeen\",\n  analyses: \"Analyses\",\n};\n\nconst GROUP_ORDER: readonly SettingsGroupKey[] = [\"general\", \"analyses\"];\n\nconst BY_ID = new Map<string, SettingsSection>(SETTINGS_SECTIONS.map((section) => [section.id, section]));\n\n/** Default section keeps the bare `#/settings` URL an old bookmark points at. */\nconst DEFAULT_SECTION: SettingsSectionId = \"general\";\n\nexport function settingsSection(id: SettingsSectionId): SettingsSection {\n  const section = BY_ID.get(id);\n  if (!section)\n    throw new Error(`Unknown settings section \"${id}\"`);\n  return section;\n}\n\n/** Sections grouped for the rail, in fixed order. */\nexport function settingsNavGroups(): Array<{ key: SettingsGroupKey; label: string; items: SettingsSection[] }> {\n  return GROUP_ORDER.map((key) => ({\n    key,\n    label: SETTINGS_GROUP_LABELS[key],\n    items: SETTINGS_SECTIONS.filter((section) => section.group === key),\n  }));\n}\n\n/**\n * Which section to show.\n *\n * Both inputs arrive as unknown: vue-router hands an optional param over as\n * a string, an array, or undefined/empty string. Order: a valid `requested`,\n * then the legacy tab, then the default. An unrecognized value is treated\n * as a stale link, not an error.\n */\nexport function resolveSettingsSection(options: { requested: unknown; legacyTab: unknown }): SettingsSectionId {\n  return sectionId(options.requested) ?? sectionId(options.legacyTab) ?? DEFAULT_SECTION;\n}\n\n/** One route name, section as a param: an existing `{ name: \"settings\" }`\n    link elsewhere keeps working, and lib/nav.ts still recognizes the path. */\nexport function settingsSectionRoute(id: SettingsSectionId): { name: string; params: { section: string } } {\n  // Empty string, not an absent key: vue-router then drops the segment, so\n  // the default section lands on `#/settings`.\n  return { name: \"settings\", params: { section: id === DEFAULT_SECTION ? \"\" : id } };\n}\n\nfunction sectionId(value: unknown): SettingsSectionId | null {\n  const single = Array.isArray(value) ? value[0] : value;\n  return typeof single === \"string\" && BY_ID.has(single) ? single as SettingsSectionId : null;\n}\n\n// --- return path -------------------------------------------------------\n//\n// Module state, not part of the URL: it's a convenience, not something a\n// shared link should carry. A fresh tab has no return path and falls back\n// to Locations.\n\nlet returnPath: string | null = null;\n\n/** Called by the router when navigating into Instellingen from elsewhere. */\nexport function rememberSettingsReturn(fullPath: string): void {\n  returnPath = fullPath;\n}\n\n/** The remembered path, or null if Instellingen was opened directly. */\nexport function settingsReturnPath(): string | null {\n  return returnPath;\n}\n\n/** Test hook. */\nexport function resetSettingsReturn(): void {\n  returnPath = null;\n}\n","import { createVNode as _createVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, withCtx as _withCtx, createTextVNode as _createTextVNode, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = [\"aria-label\"]\nconst _hoisted_2 = {\n  key: 0,\n  class: \"notification__count\",\n  \"aria-hidden\": \"true\"\n}\nconst _hoisted_3 = {\n  class: \"notification\",\n  \"aria-label\": \"Meldingen\"\n}\nconst _hoisted_4 = {\n  key: 0,\n  class: \"notification__message\",\n  role: \"status\"\n}\nconst _hoisted_5 = {\n  key: 1,\n  class: \"notification__message\"\n}\nconst _hoisted_6 = {\n  key: 2,\n  class: \"notification__rows\"\n}\nconst _hoisted_7 = { class: \"notification__label\" }\nconst _hoisted_8 = { class: \"notification__detail\" }\nconst _hoisted_9 = {\n  key: 3,\n  class: \"notification__message\"\n}\nconst _hoisted_10 = {\n  key: 4,\n  class: \"notification__sync\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createBlock($setup[\"Popover\"], {\n    open: $setup.open,\n    \"onUpdate:open\": _cache[1] || (_cache[1] = $event => (($setup.open) = $event)),\n    align: \"end\",\n    width: 300\n  }, {\n    trigger: _withCtx(() => [\n      _createElementVNode(\"button\", {\n        class: \"notification__trigger\",\n        type: \"button\",\n        \"aria-label\": $setup.total > 0 ? `Meldingen, ${$setup.total} openstaand` : 'Meldingen',\n        title: \"Meldingen\"\n      }, [\n        _createVNode($setup[\"Icon\"], {\n          name: \"notification\",\n          size: 18\n        }),\n        ($setup.total > 0)\n          ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString($setup.total > 9 ? '9+' : $setup.total), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true)\n      ], 8 /* PROPS */, _hoisted_1)\n    ]),\n    default: _withCtx(() => [\n      _createElementVNode(\"section\", _hoisted_3, [\n        _cache[3] || (_cache[3] = _createElementVNode(\"h2\", { class: \"notification__title\" }, \"Meldingen\", -1 /* CACHED */)),\n        ($props.unavailable)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_4, \"Meldingen konden niet worden bijgewerkt.\"))\n          : (!$props.signals)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_5, \"Meldingen laden…\"))\n            : _createCommentVNode(\"v-if\", true),\n        ($setup.rows.length)\n          ? (_openBlock(), _createElementBlock(\"ul\", _hoisted_6, [\n              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.rows, (row) => {\n                return (_openBlock(), _createElementBlock(\"li\", {\n                  key: row.section\n                }, [\n                  _createVNode($setup[\"RouterLink\"], {\n                    to: $setup.settingsSectionRoute(row.section),\n                    class: \"notification__row\",\n                    onClick: _cache[0] || (_cache[0] = $event => ($setup.open = false))\n                  }, {\n                    default: _withCtx(() => [\n                      _createVNode($setup[\"Icon\"], {\n                        name: \"warning--filled\",\n                        size: 16,\n                        class: _normalizeClass(`notification__icon--${row.tone}`)\n                      }, null, 8 /* PROPS */, [\"class\"]),\n                      _createElementVNode(\"span\", null, [\n                        _createElementVNode(\"span\", _hoisted_7, _toDisplayString(row.title), 1 /* TEXT */),\n                        _createElementVNode(\"span\", _hoisted_8, _toDisplayString(row.detail), 1 /* TEXT */)\n                      ])\n                    ]),\n                    _: 2 /* DYNAMIC */\n                  }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"])\n                ]))\n              }), 128 /* KEYED_FRAGMENT */))\n            ]))\n          : ($props.signals && !$props.unavailable)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_9, [\n                _createVNode($setup[\"Icon\"], {\n                  name: \"checkmark--outline\",\n                  size: 16\n                }),\n                _cache[2] || (_cache[2] = _createTextVNode(\" Geen mislukte of vastgelopen analyses. \", -1 /* CACHED */))\n              ]))\n            : _createCommentVNode(\"v-if\", true),\n        ($props.signals)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_10, _toDisplayString($setup.syncDescription({ lastSync: $props.signals.lastSync, now: $props.now })), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true)\n      ])\n    ]),\n    _: 1 /* STABLE */\n  }, 8 /* PROPS */, [\"open\"]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/NotificationBell.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/NotificationBell.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/NotificationBell.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/NotificationBell.vue\";script.__scopeId = \"data-v-b7a2e9ae\";export default script;","import { createVNode as _createVNode, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createBlock as _createBlock, withModifiers as _withModifiers } from \"vue\"\n\nconst _hoisted_1 = { class: \"shellhead\" }\nconst _hoisted_2 = [\"src\"]\nconst _hoisted_3 = {\n  class: \"shellhead__crumbs\",\n  \"aria-label\": \"Kruimelpad\"\n}\nconst _hoisted_4 = {\n  key: 0,\n  class: \"shellhead__sep\"\n}\nconst _hoisted_5 = {\n  key: 2,\n  class: \"shellhead__crumb shellhead__crumb--current\"\n}\nconst _hoisted_6 = [\"aria-label\"]\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"header\", _hoisted_1, [\n    _createElementVNode(\"button\", {\n      class: \"shellhead__burger\",\n      type: \"button\",\n      \"aria-label\": \"Menu\",\n      onClick: _cache[0] || (_cache[0] = $event => ($setup.emit('toggle-sidebar')))\n    }, [\n      _createVNode($setup[\"Icon\"], {\n        name: \"menu\",\n        size: 18\n      })\n    ]),\n    _createElementVNode(\"img\", {\n      class: \"shellhead__logo\",\n      src: $setup.logoUrl,\n      alt: \"Locata\",\n      height: \"18\"\n    }, null, 8 /* PROPS */, _hoisted_2),\n    _cache[3] || (_cache[3] = _createElementVNode(\"span\", { class: \"shellhead__sep\" }, \"/\", -1 /* CACHED */)),\n    _createElementVNode(\"nav\", _hoisted_3, [\n      (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.trail, (crumb, i) => {\n        return (_openBlock(), _createElementBlock(_Fragment, {\n          key: crumb.label\n        }, [\n          (i > 0)\n            ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, \"/\"))\n            : _createCommentVNode(\"v-if\", true),\n          (crumb.route)\n            ? (_openBlock(), _createBlock($setup[\"RouterLink\"], {\n                key: 1,\n                to: { name: crumb.route, params: crumb.params },\n                class: \"shellhead__crumb\"\n              }, {\n                default: _withCtx(() => [\n                  _createTextVNode(_toDisplayString(crumb.label), 1 /* TEXT */)\n                ]),\n                _: 2 /* DYNAMIC */\n              }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"]))\n            : (_openBlock(), _createElementBlock(\"span\", _hoisted_5, _toDisplayString(crumb.label), 1 /* TEXT */))\n        ], 64 /* STABLE_FRAGMENT */))\n      }), 128 /* KEYED_FRAGMENT */))\n    ]),\n    _cache[4] || (_cache[4] = _createElementVNode(\"div\", { class: \"shellhead__spacer\" }, null, -1 /* CACHED */)),\n    _createVNode($setup[\"NotificationBell\"], {\n      signals: $props.signals,\n      unavailable: $props.signalsUnavailable,\n      now: $props.now\n    }, null, 8 /* PROPS */, [\"signals\", \"unavailable\", \"now\"]),\n    _createElementVNode(\"button\", {\n      class: \"shellhead__action\",\n      type: \"button\",\n      \"aria-label\": $setup.theme === 'dark' ? 'Naar lichte modus' : 'Naar donkere modus',\n      onClick: _cache[1] || (_cache[1] = (...args) => ($setup.toggleTheme && $setup.toggleTheme(...args)))\n    }, [\n      _createVNode($setup[\"Icon\"], {\n        name: $setup.theme === 'dark' ? 'light' : 'asleep',\n        size: 16\n      }, null, 8 /* PROPS */, [\"name\"])\n    ], 8 /* PROPS */, _hoisted_6),\n    _createElementVNode(\"a\", {\n      class: \"shellhead__action shellhead__logout\",\n      href: \"#\",\n      onClick: _cache[2] || (_cache[2] = _withModifiers($event => ($setup.logout()), [\"prevent\"]))\n    }, \" Uitloggen \")\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/ShellHeader.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/ShellHeader.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/ShellHeader.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/ShellHeader.vue\";script.__scopeId = \"data-v-54d7f815\";export default script;","<template>\n  <nav class=\"rail\" :class=\"{ 'rail--collapsed': collapsed, 'rail--open': open }\" aria-label=\"Hoofdnavigatie\">\n    <!--\n      On Instellingen the whole rail swaps to its sections: a back link on\n      top, then the sections in their two groups. Same sizes and classes as\n      the main nav, so it still reads as the same app.\n    -->\n    <div v-if=\"inSettings\" class=\"rail__scroll\">\n      <RouterLink\n        :to=\"backTarget\"\n        class=\"rail__item rail__back\"\n        :title=\"collapsed ? 'Terug uit Instellingen' : undefined\"\n      >\n        <Icon name=\"chevron--left\" />\n        <span v-if=\"!collapsed\" class=\"rail__label\">Instellingen</span>\n      </RouterLink>\n      <div v-for=\"group in SETTINGS_NAV_GROUPS\" :key=\"group.key\" class=\"rail__section\">\n        <span v-if=\"!collapsed\" class=\"rail__heading\">{{ group.label }}</span>\n        <!--\n          Active class computed manually: all six links share one route\n          name, so `router-link-active` would light up every one of them.\n          `replace`, so hopping between sections doesn't grow history.\n        -->\n        <RouterLink\n          v-for=\"item in group.items\"\n          :key=\"item.id\"\n          replace\n          :to=\"settingsSectionRoute(item.id)\"\n          class=\"rail__item\"\n          :class=\"{ 'rail__item--active': item.id === activeSection }\"\n          :title=\"collapsed ? item.label : undefined\"\n        >\n          <Icon :name=\"item.icon\" />\n          <span v-if=\"!collapsed\" class=\"rail__label\">{{ item.label }}</span>\n        </RouterLink>\n      </div>\n    </div>\n\n    <div v-else class=\"rail__scroll\">\n      <div v-for=\"section in NAV_SECTIONS\" :key=\"section.title\" class=\"rail__section\">\n        <span v-if=\"!collapsed\" class=\"rail__heading\">{{ section.title }}</span>\n        <template v-for=\"item in section.items\" :key=\"item.route\">\n          <span v-if=\"item.todo\" class=\"rail__item rail__item--todo\" :title=\"`${item.label} komt in een volgende fase`\">\n            <Icon :name=\"iconFor(item.route)\" />\n            <span v-if=\"!collapsed\" class=\"rail__label\">{{ item.label }}</span>\n          </span>\n          <RouterLink\n            v-else\n            :to=\"{ name: item.route }\"\n            class=\"rail__item\"\n            :class=\"{ 'rail__item--active': isActive(item.route) }\"\n          >\n            <Icon :name=\"iconFor(item.route)\" />\n            <span v-if=\"!collapsed\" class=\"rail__label\">{{ item.label }}</span>\n            <span v-if=\"!collapsed && countFor(item.path) !== null\" class=\"rail__count tnum\">\n              {{ countFor(item.path)?.toLocaleString('nl-NL') }}\n            </span>\n          </RouterLink>\n        </template>\n      </div>\n    </div>\n\n    <div class=\"rail__footer\">\n      <template v-for=\"item in inSettings ? [] : NAV_FOOTER_ITEMS\" :key=\"item.route\">\n        <span v-if=\"item.todo\" class=\"rail__item rail__item--todo\" :title=\"`${item.label} komt in een volgende fase`\">\n          <Icon :name=\"iconFor(item.route)\" />\n          <span v-if=\"!collapsed\" class=\"rail__label\">{{ item.label }}</span>\n        </span>\n        <RouterLink\n          v-else\n          :to=\"{ name: item.route }\"\n          class=\"rail__item\"\n          :class=\"{ 'rail__item--active': isActive(item.route) }\"\n        >\n          <Icon :name=\"iconFor(item.route)\" />\n          <span v-if=\"!collapsed\" class=\"rail__label\">{{ item.label }}</span>\n        </RouterLink>\n      </template>\n\n      <button class=\"rail__item rail__collapse\" type=\"button\" @click=\"emit('toggle-collapsed')\">\n        <Icon :name=\"collapsed ? 'chevron--right' : 'chevron--left'\" />\n        <span v-if=\"!collapsed\" class=\"rail__label\">Inklappen</span>\n      </button>\n    </div>\n  </nav>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { RouterLink, useRoute, type RouteLocationRaw } from \"vue-router\";\nimport Icon from \"../icons/Icon.vue\";\nimport { navLabelFor, NAV_FOOTER_ITEMS, NAV_SECTIONS } from \"../../lib/nav\";\nimport { FALLBACK_GLYPH, NAV_GLYPHS } from \"../../lib/icon-names\";\nimport { resolveSettingsSection, settingsNavGroups, settingsReturnPath, settingsSectionRoute } from \"../../lib/settings-sections\";\n\n// De 228px rail, inklapbaar naar 48px. Welke glyph bij welk item hoort staat in\n// lib/icon-names.ts en niet in lib/nav.ts, zodat dat laatste bestand Vue-vrij\n// blijft en door de pure breadcrumb-helper geïmporteerd kan worden.\nconst props = defineProps<{ collapsed: boolean; open: boolean; locationCount: number | null; counts?: Record<string, number> }>();\nconst emit = defineEmits<{ \"toggle-collapsed\": [] }>();\n\nfunction countFor(path: string): number | null {\n  return path === \"/\" ? props.locationCount : props.counts?.[path] ?? null;\n}\n\nfunction iconFor(route: string): string {\n  return NAV_GLYPHS[route] ?? FALLBACK_GLYPH;\n}\n\n// Niet `active-class` op de RouterLink: die matcht alleen de exacte route, dus\n// op /locations/47161 zou geen enkel rail-item oplichten. navLabelFor mapt een\n// detailroute op zijn sectie, precies zoals het kruimelpad dat doet.\nconst route = useRoute();\nconst activeLabel = computed(() => navLabelFor(String(route.name ?? \"\")));\n\nfunction isActive(itemRoute: string): boolean {\n  const label = navLabelFor(itemRoute);\n  return label !== null && label === activeLabel.value;\n}\n\n// The rail decides settings-mode itself; the shell doesn't need to know and\n// passes no prop for it.\nconst inSettings = computed(() => route.name === \"settings\");\n\nconst SETTINGS_NAV_GROUPS = settingsNavGroups();\n\nconst activeSection = computed(() => resolveSettingsSection({ requested: route.params.section, legacyTab: route.query.tab }));\n\n/* Return path is non-reactive module state, set during navigation INTO\n   Instellingen; depending on `inSettings` here forces a re-read at exactly\n   that moment. */\nconst backTarget = computed<RouteLocationRaw>(() =>\n  inSettings.value ? (settingsReturnPath() ?? { name: \"locations\" }) : { name: \"locations\" });\n</script>\n\n<style scoped>\n.rail {\n  display: flex;\n  flex-direction: column;\n  flex: none;\n  width: var(--shell-sidebar-w);\n  background: var(--bg-surface);\n  border-right: 1px solid var(--border-1);\n  overflow: hidden;\n  transition: width 110ms cubic-bezier(0.2, 0, 0.38, 0.9);\n}\n\n.rail--collapsed {\n  width: var(--shell-sidebar-collapsed-w);\n}\n\n.rail__scroll {\n  flex: 1;\n  min-height: 0;\n  overflow-y: auto;\n  padding: 8px 0;\n}\n\n.rail__section {\n  padding-bottom: 8px;\n}\n\n.rail__heading {\n  display: block;\n  padding: 8px 16px 4px;\n  font-size: var(--text-micro);\n  letter-spacing: 0.16em;\n  text-transform: uppercase;\n  color: var(--fg-3);\n}\n\n.rail__item {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  width: 100%;\n  min-height: 32px;\n  padding: 0 16px;\n  border: 0;\n  border-left: 2px solid transparent;\n  background: transparent;\n  color: var(--fg-2);\n  font: inherit;\n  font-size: var(--text-ui);\n  text-align: left;\n  cursor: pointer;\n}\n\n.rail__item--active {\n  border-left-color: var(--brand);\n  background: var(--bg-inset);\n  color: var(--fg-1);\n}\n\n.rail__item--todo {\n  color: var(--fg-5);\n  cursor: default;\n}\n\n/* Back row: same shape as a nav item, but bolder with a hairline below, so\n   it reads as the list's header, not a seventh section. */\n.rail__back {\n  min-height: 40px;\n  margin-bottom: 8px;\n  border-bottom: 1px solid var(--border-1);\n  color: var(--fg-1);\n  font-weight: 600;\n}\n\n@media (hover: hover) {\n  a.rail__item:hover,\n  button.rail__item:hover {\n    background: var(--bg-inset);\n  }\n}\n\n.rail__label {\n  flex: 1;\n  min-width: 0;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n.rail__count {\n  font-size: var(--text-caption);\n  color: var(--fg-4);\n}\n\n.rail__footer {\n  flex: none;\n  padding: 8px 0;\n  border-top: 1px solid var(--border-1);\n}\n\n/* Onder 1080px schuift de rail als lade over de content. */\n@media (max-width: 1079px) {\n  .rail {\n    position: absolute;\n    top: 0;\n    bottom: 0;\n    left: 0;\n    z-index: 1200;\n    width: var(--shell-sidebar-w);\n    transform: translateX(-100%);\n    transition: transform 110ms cubic-bezier(0.2, 0, 0.38, 0.9);\n  }\n\n  .rail--open {\n    transform: translateX(0);\n    box-shadow: 0 0 24px rgba(1, 5, 4, 0.28);\n  }\n}\n</style>\n","/**\n * De navigatie van de admin: één bron voor de rail (groepen + labels), voor de\n * tabstrip en voor de breadcrumb. Iconen staan bewust NIET hier maar in\n * `components/shell/Sidebar.vue`, zodat dit bestand vrij blijft van Vue en dus\n * ook door pure helpers geïmporteerd kan worden.\n *\n * `route` is de vue-router route-naam, niet een pad: de app is hash-routed en\n * hangt onder een variabele site-root, dus paden zijn nergens hardcoded.\n *\n * De secties uit de kit blijven: het dagelijkse screener-werk boven, het\n * batchwerk eronder, beheer en hulp apart onderaan de rail. Elk item dat nog\n * niet bestaat in dit webdesign staat op `todo: true` en wordt in de rail als\n * uitgeschakeld getekend, zodat de volgorde uit de kit vanaf fase 1 klopt en\n * elke volgende fase alleen zijn eigen vlag hoeft weg te halen. Een dood\n * bedieningselement zonder uitleg is erger dan een zichtbaar nog-te-komen item.\n */\nexport interface NavItem {\n  route: string;\n  /** The hash path of the route (`route.path`), the key the tab strip works on. */\n  path: string;\n  label: string;\n  todo?: boolean;\n}\n\nexport interface NavSection {\n  title: string;\n  items: readonly NavItem[];\n}\n\nexport const NAV_SECTIONS: readonly NavSection[] = [\n  {\n    title: \"Screener\",\n    items: [\n      { route: \"explorer\", path: \"/verkenner\", label: \"Verkenner\" },\n      { route: \"locations\", path: \"/\", label: \"Locaties\" },\n      { route: \"analyses\", path: \"/analyses\", label: \"Analyses\" },\n      { route: \"feedback\", path: \"/feedback\", label: \"Feedback\" },\n    ],\n  },\n  {\n    title: \"Batch\",\n    items: [\n      { route: \"bulk\", path: \"/bulk\", label: \"Bulk-analyse\" },\n      { route: \"scoring\", path: \"/scoring\", label: \"Scoring\" },\n      { route: \"usage\", path: \"/gebruik\", label: \"Gebruik\" },\n    ],\n  },\n] as const;\n\nexport const NAV_FOOTER_ITEMS: readonly NavItem[] = [\n  { route: \"settings\", path: \"/settings\", label: \"Instellingen\" },\n  { route: \"help\", path: \"/help\", label: \"Help\" },\n] as const;\n\nexport const NAV_ITEMS: readonly NavItem[] = [\n  ...NAV_SECTIONS.flatMap((section) => section.items),\n  ...NAV_FOOTER_ITEMS,\n];\n\n/** Het label van het nav-item waar een route onder hangt. `location-detail`\n    hoort bij \"Locaties\", omdat locatiedetail onder de locatielijst zit. */\nexport function navLabelFor(routeName: string): string | null {\n  if (routeName === \"locations\" || routeName === \"location-detail\" || routeName === \"analysis-detail\") return \"Locaties\";\n  if (routeName === \"feedback-detail\") return \"Feedback\";\n  return NAV_ITEMS.find((item) => item.route === routeName)?.label ?? null;\n}\n\n/**\n * The nav item a hash path falls under. `/locations/47161` belongs to\n * \"Locaties\" (path `/`) because location detail hangs under the list; any\n * other detail path (`/feedback/83469`) matches its section by prefix.\n */\nfunction sectionItemFor(path: string): NavItem | null {\n  if (path === \"/\" || path.startsWith(\"/locations\")) {\n    return NAV_ITEMS.find((item) => item.path === \"/\") ?? null;\n  }\n  return (\n    NAV_ITEMS.filter((item) => item.path !== \"/\").find(\n      (item) => path === item.path || path.startsWith(`${item.path}/`),\n    ) ?? null\n  );\n}\n\n/** The label of the section a hash path falls under. */\nexport function sectionLabelFor(path: string): string | null {\n  return sectionItemFor(path)?.label ?? null;\n}\n\n/** The path of the section a hash path falls under. */\nexport function sectionHrefFor(path: string): string | null {\n  return sectionItemFor(path)?.path ?? null;\n}\n\nexport function analysisDetailRoute(options: { locationId: number; analysisId: number }) {\n  return { name: \"analysis-detail\", params: { id: options.locationId, analysisId: options.analysisId } };\n}\n\nexport function analysisTabLabel(options: { companyName?: string; analysisId: number }): string {\n  return options.companyName ? `${options.companyName} · analyse #${options.analysisId}` : `Analyse #${options.analysisId}`;\n}\n","import type { IconName } from \"../components/icons/icon-data\";\nimport type { TabIcon } from \"./tab-strip\";\n\n/**\n * Welke Carbon-glyph bij welk onderdeel hoort.\n *\n * Deze twee tabellen stonden eerder als losse `const ICONS` in Sidebar.vue en\n * TabStrip.vue. Daar waren ze onzichtbaar voor `wh checkmodule`, dat de body\n * van een `.vue`-bestand niet typecheckt, en een typfout in een glyphnaam\n * rendert niets: een lege `<svg>`, geen fout. Als los `.ts`-bestand met\n * `IconName` als waardetype vangt de compiler ze wel.\n *\n * De keuzes zijn niet van ons: ze komen letterlijk uit het screener-scherm van\n * de kit (`ui_kits/screener/index.html`, `TAB_ICOON` en de `sections` van de\n * SideNav). Wijk hier niet van af zonder de kit ernaast te leggen.\n */\nexport const NAV_GLYPHS: Record<string, IconName> = {\n  explorer: \"map\",\n  locations: \"list\",\n  analyses: \"analytics\",\n  feedback: \"idea\",\n  bulk: \"flash\",\n  scoring: \"chart--line\",\n  usage: \"time\",\n  settings: \"settings\",\n  help: \"information--filled\",\n};\n\n/** De kit geeft een losse beoordeling een ster en een losse analyse hetzelfde\n    teken als de analyselijst; een locatiedetail krijgt de kaartspeld. */\nexport const TAB_GLYPHS: Record<TabIcon, IconName> = {\n  explorer: \"map\",\n  locations: \"list\",\n  analyses: \"analytics\",\n  feedback: \"idea\",\n  bulk: \"flash\",\n  scoring: \"chart--line\",\n  usage: \"time\",\n  settings: \"settings\",\n  location: \"location\",\n  analysis: \"analytics\",\n  assessment: \"star\",\n};\n\nexport const FALLBACK_GLYPH: IconName = \"circle--outline\";\n","import { createCommentVNode as _createCommentVNode, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, withCtx as _withCtx, renderList as _renderList, Fragment as _Fragment, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, createBlock as _createBlock, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = {\n  key: 0,\n  class: \"rail__scroll\"\n}\nconst _hoisted_2 = {\n  key: 0,\n  class: \"rail__label\"\n}\nconst _hoisted_3 = {\n  key: 0,\n  class: \"rail__heading\"\n}\nconst _hoisted_4 = {\n  key: 0,\n  class: \"rail__label\"\n}\nconst _hoisted_5 = {\n  key: 1,\n  class: \"rail__scroll\"\n}\nconst _hoisted_6 = {\n  key: 0,\n  class: \"rail__heading\"\n}\nconst _hoisted_7 = [\"title\"]\nconst _hoisted_8 = {\n  key: 0,\n  class: \"rail__label\"\n}\nconst _hoisted_9 = {\n  key: 0,\n  class: \"rail__label\"\n}\nconst _hoisted_10 = {\n  key: 1,\n  class: \"rail__count tnum\"\n}\nconst _hoisted_11 = { class: \"rail__footer\" }\nconst _hoisted_12 = [\"title\"]\nconst _hoisted_13 = {\n  key: 0,\n  class: \"rail__label\"\n}\nconst _hoisted_14 = {\n  key: 0,\n  class: \"rail__label\"\n}\nconst _hoisted_15 = {\n  key: 0,\n  class: \"rail__label\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"nav\", {\n    class: _normalizeClass([\"rail\", { 'rail--collapsed': $props.collapsed, 'rail--open': $props.open }]),\n    \"aria-label\": \"Hoofdnavigatie\"\n  }, [\n    _createCommentVNode(\"\\n      On Instellingen the whole rail swaps to its sections: a back link on\\n      top, then the sections in their two groups. Same sizes and classes as\\n      the main nav, so it still reads as the same app.\\n    \"),\n    ($setup.inSettings)\n      ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n          _createVNode($setup[\"RouterLink\"], {\n            to: $setup.backTarget,\n            class: \"rail__item rail__back\",\n            title: $props.collapsed ? 'Terug uit Instellingen' : undefined\n          }, {\n            default: _withCtx(() => [\n              _createVNode($setup[\"Icon\"], { name: \"chevron--left\" }),\n              (!$props.collapsed)\n                ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, \"Instellingen\"))\n                : _createCommentVNode(\"v-if\", true)\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"to\", \"title\"]),\n          (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.SETTINGS_NAV_GROUPS, (group) => {\n            return (_openBlock(), _createElementBlock(\"div\", {\n              key: group.key,\n              class: \"rail__section\"\n            }, [\n              (!$props.collapsed)\n                ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, _toDisplayString(group.label), 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true),\n              _createCommentVNode(\"\\n          Active class computed manually: all six links share one route\\n          name, so `router-link-active` would light up every one of them.\\n          `replace`, so hopping between sections doesn't grow history.\\n        \"),\n              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(group.items, (item) => {\n                return (_openBlock(), _createBlock($setup[\"RouterLink\"], {\n                  key: item.id,\n                  replace: \"\",\n                  to: $setup.settingsSectionRoute(item.id),\n                  class: _normalizeClass([\"rail__item\", { 'rail__item--active': item.id === $setup.activeSection }]),\n                  title: $props.collapsed ? item.label : undefined\n                }, {\n                  default: _withCtx(() => [\n                    _createVNode($setup[\"Icon\"], {\n                      name: item.icon\n                    }, null, 8 /* PROPS */, [\"name\"]),\n                    (!$props.collapsed)\n                      ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, _toDisplayString(item.label), 1 /* TEXT */))\n                      : _createCommentVNode(\"v-if\", true)\n                  ]),\n                  _: 2 /* DYNAMIC */\n                }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\", \"class\", \"title\"]))\n              }), 128 /* KEYED_FRAGMENT */))\n            ]))\n          }), 128 /* KEYED_FRAGMENT */))\n        ]))\n      : (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n          (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.NAV_SECTIONS, (section) => {\n            return (_openBlock(), _createElementBlock(\"div\", {\n              key: section.title,\n              class: \"rail__section\"\n            }, [\n              (!$props.collapsed)\n                ? (_openBlock(), _createElementBlock(\"span\", _hoisted_6, _toDisplayString(section.title), 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true),\n              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(section.items, (item) => {\n                return (_openBlock(), _createElementBlock(_Fragment, {\n                  key: item.route\n                }, [\n                  (item.todo)\n                    ? (_openBlock(), _createElementBlock(\"span\", {\n                        key: 0,\n                        class: \"rail__item rail__item--todo\",\n                        title: `${item.label} komt in een volgende fase`\n                      }, [\n                        _createVNode($setup[\"Icon\"], {\n                          name: $setup.iconFor(item.route)\n                        }, null, 8 /* PROPS */, [\"name\"]),\n                        (!$props.collapsed)\n                          ? (_openBlock(), _createElementBlock(\"span\", _hoisted_8, _toDisplayString(item.label), 1 /* TEXT */))\n                          : _createCommentVNode(\"v-if\", true)\n                      ], 8 /* PROPS */, _hoisted_7))\n                    : (_openBlock(), _createBlock($setup[\"RouterLink\"], {\n                        key: 1,\n                        to: { name: item.route },\n                        class: _normalizeClass([\"rail__item\", { 'rail__item--active': $setup.isActive(item.route) }])\n                      }, {\n                        default: _withCtx(() => [\n                          _createVNode($setup[\"Icon\"], {\n                            name: $setup.iconFor(item.route)\n                          }, null, 8 /* PROPS */, [\"name\"]),\n                          (!$props.collapsed)\n                            ? (_openBlock(), _createElementBlock(\"span\", _hoisted_9, _toDisplayString(item.label), 1 /* TEXT */))\n                            : _createCommentVNode(\"v-if\", true),\n                          (!$props.collapsed && $setup.countFor(item.path) !== null)\n                            ? (_openBlock(), _createElementBlock(\"span\", _hoisted_10, _toDisplayString($setup.countFor(item.path)?.toLocaleString('nl-NL')), 1 /* TEXT */))\n                            : _createCommentVNode(\"v-if\", true)\n                        ]),\n                        _: 2 /* DYNAMIC */\n                      }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\", \"class\"]))\n                ], 64 /* STABLE_FRAGMENT */))\n              }), 128 /* KEYED_FRAGMENT */))\n            ]))\n          }), 128 /* KEYED_FRAGMENT */))\n        ])),\n    _createElementVNode(\"div\", _hoisted_11, [\n      (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.inSettings ? [] : $setup.NAV_FOOTER_ITEMS, (item) => {\n        return (_openBlock(), _createElementBlock(_Fragment, {\n          key: item.route\n        }, [\n          (item.todo)\n            ? (_openBlock(), _createElementBlock(\"span\", {\n                key: 0,\n                class: \"rail__item rail__item--todo\",\n                title: `${item.label} komt in een volgende fase`\n              }, [\n                _createVNode($setup[\"Icon\"], {\n                  name: $setup.iconFor(item.route)\n                }, null, 8 /* PROPS */, [\"name\"]),\n                (!$props.collapsed)\n                  ? (_openBlock(), _createElementBlock(\"span\", _hoisted_13, _toDisplayString(item.label), 1 /* TEXT */))\n                  : _createCommentVNode(\"v-if\", true)\n              ], 8 /* PROPS */, _hoisted_12))\n            : (_openBlock(), _createBlock($setup[\"RouterLink\"], {\n                key: 1,\n                to: { name: item.route },\n                class: _normalizeClass([\"rail__item\", { 'rail__item--active': $setup.isActive(item.route) }])\n              }, {\n                default: _withCtx(() => [\n                  _createVNode($setup[\"Icon\"], {\n                    name: $setup.iconFor(item.route)\n                  }, null, 8 /* PROPS */, [\"name\"]),\n                  (!$props.collapsed)\n                    ? (_openBlock(), _createElementBlock(\"span\", _hoisted_14, _toDisplayString(item.label), 1 /* TEXT */))\n                    : _createCommentVNode(\"v-if\", true)\n                ]),\n                _: 2 /* DYNAMIC */\n              }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\", \"class\"]))\n        ], 64 /* STABLE_FRAGMENT */))\n      }), 128 /* KEYED_FRAGMENT */)),\n      _createElementVNode(\"button\", {\n        class: \"rail__item rail__collapse\",\n        type: \"button\",\n        onClick: _cache[0] || (_cache[0] = $event => ($setup.emit('toggle-collapsed')))\n      }, [\n        _createVNode($setup[\"Icon\"], {\n          name: $props.collapsed ? 'chevron--right' : 'chevron--left'\n        }, null, 8 /* PROPS */, [\"name\"]),\n        (!$props.collapsed)\n          ? (_openBlock(), _createElementBlock(\"span\", _hoisted_15, \"Inklappen\"))\n          : _createCommentVNode(\"v-if\", true)\n      ])\n    ])\n  ], 2 /* CLASS */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/Sidebar.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/Sidebar.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/Sidebar.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/Sidebar.vue\";script.__scopeId = \"data-v-df3ae2f7\";export default script;","export type EnvironmentTone = \"score\" | \"diverge\" | \"info\";\n\nexport interface EnvironmentBadge {\n  label: string;\n  tone: EnvironmentTone;\n  title: string;\n}\n\n/* Which environment the shell pill shows.\n *\n * The Next version read `NEXT_PUBLIC_VERCEL_ENV`, because on a Vercel preview\n * `NODE_ENV === \"production\"` and reading that would have labelled test as\n * production. The WebHare assetpack has no build-time env injection at all, so\n * the browser host is the only signal available here, and it happens to be the\n * sturdiest one: a stale published page or a misreported DTAP stage cannot\n * forge the hostname the user is actually on.\n *\n * A Map rather than an object literal: a hostname is outside input, and an\n * object lookup answers truthily for `constructor` and `toString`.\n */\nconst HOSTS = new Map<string, EnvironmentBadge>([\n  [\"localhost\", { label: \"lokaal\", tone: \"info\", title: \"Lokale ontwikkelomgeving\" }],\n  [\"127.0.0.1\", { label: \"lokaal\", tone: \"info\", title: \"Lokale ontwikkelomgeving\" }],\n  [\"testsites.webwerf.nl\", { label: \"test\", tone: \"diverge\", title: \"Testomgeving, gekoppeld aan de test-backend\" }],\n  [\"test.webwerf.nl\", { label: \"test\", tone: \"diverge\", title: \"Testomgeving, gekoppeld aan de test-backend\" }],\n]);\n\nconst PRODUCTION: EnvironmentBadge = {\n  label: \"productie\",\n  tone: \"score\",\n  title: \"Productie: je kijkt naar live data\",\n};\n\n/** Unknown hosts fall back to \"productie\" on purpose: telling someone on a real\n    deployment that their edits are harmless is the more expensive mistake. */\nexport function resolveEnvironmentFromHost(hostname: string): EnvironmentBadge {\n  return HOSTS.get(hostname.toLowerCase()) ?? PRODUCTION;\n}\n\nexport function environmentBadge(): EnvironmentBadge {\n  return resolveEnvironmentFromHost(location.hostname);\n}\n","<template>\n  <footer class=\"statusbar\">\n    <span class=\"statusbar__env\" :class=\"`statusbar__env--${env.tone}`\" :title=\"env.title\">\n      <span class=\"statusbar__dot\" />\n      {{ env.label }}\n    </span>\n    <span v-if=\"totals\" class=\"statusbar__totals tnum\">{{ totals }}</span>\n    <span v-if=\"signals?.lastSync\" class=\"statusbar__sync\" :title=\"signals.lastSync\">{{ syncDescription({ lastSync: signals.lastSync, now }) }}</span>\n    <span class=\"statusbar__spacer\" />\n    <span v-if=\"signalsUnavailable\" class=\"statusbar__msg\">Status niet bijgewerkt</span>\n    <span v-if=\"message\" class=\"statusbar__msg\">{{ message }}</span>\n  </footer>\n</template>\n\n<script setup lang=\"ts\">\nimport { environmentBadge } from \"../../lib/environment\";\nimport { computed } from \"vue\";\nimport { syncDescription, type ShellSignals } from \"../../lib/shell-signals\";\n\n// De 24px statusbalk onderaan de shell. De omgevings-pil leest de hostname en\n// niet een build-time env-var: de assetpipeline kent geen env-injectie, en de\n// hostname is bovendien het enige signaal dat een verouderde gepubliceerde\n// pagina niet kan vervalsen.\nconst props = defineProps<{ message?: string; signals: ShellSignals | null; signalsUnavailable: boolean; locationCount: number | null; now: Date }>();\n\nconst totals = computed(() => [\n  props.locationCount !== null ? `${props.locationCount.toLocaleString(\"nl-NL\")} locaties` : null,\n  typeof props.signals?.counts[\"/analyses\"] === \"number\" ? `${props.signals.counts[\"/analyses\"].toLocaleString(\"nl-NL\")} analyses` : null,\n].filter(Boolean).join(\" · \"));\n\nconst env = environmentBadge();\n</script>\n\n<style scoped>\n.statusbar {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  flex: none;\n  height: var(--shell-statusbar-h);\n  padding: 0 12px;\n  border-top: 1px solid var(--border-1);\n  background: var(--bg-surface);\n  font-size: var(--text-micro);\n  color: var(--fg-3);\n}\n\n.statusbar__env {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n}\n\n.statusbar__dot {\n  width: 6px;\n  height: 6px;\n  border-radius: 50%;\n  background: var(--fg-4);\n}\n\n.statusbar__env--score .statusbar__dot {\n  background: var(--score);\n}\n\n.statusbar__env--diverge .statusbar__dot {\n  background: var(--diverge);\n}\n\n.statusbar__env--info .statusbar__dot {\n  background: var(--info);\n}\n\n.statusbar__spacer {\n  flex: 1;\n}\n\n.statusbar__msg {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n@media (max-width: 719px) {\n  .statusbar__sync { display: none; }\n}\n</style>\n","import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"statusbar\" }\nconst _hoisted_2 = [\"title\"]\nconst _hoisted_3 = {\n  key: 0,\n  class: \"statusbar__totals tnum\"\n}\nconst _hoisted_4 = [\"title\"]\nconst _hoisted_5 = {\n  key: 2,\n  class: \"statusbar__msg\"\n}\nconst _hoisted_6 = {\n  key: 3,\n  class: \"statusbar__msg\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"footer\", _hoisted_1, [\n    _createElementVNode(\"span\", {\n      class: _normalizeClass([\"statusbar__env\", `statusbar__env--${$setup.env.tone}`]),\n      title: $setup.env.title\n    }, [\n      _cache[0] || (_cache[0] = _createElementVNode(\"span\", { class: \"statusbar__dot\" }, null, -1 /* CACHED */)),\n      _createTextVNode(\" \" + _toDisplayString($setup.env.label), 1 /* TEXT */)\n    ], 10 /* CLASS, PROPS */, _hoisted_2),\n    ($setup.totals)\n      ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, _toDisplayString($setup.totals), 1 /* TEXT */))\n      : _createCommentVNode(\"v-if\", true),\n    ($props.signals?.lastSync)\n      ? (_openBlock(), _createElementBlock(\"span\", {\n          key: 1,\n          class: \"statusbar__sync\",\n          title: $props.signals.lastSync\n        }, _toDisplayString($setup.syncDescription({ lastSync: $props.signals.lastSync, now: $props.now })), 9 /* TEXT, PROPS */, _hoisted_4))\n      : _createCommentVNode(\"v-if\", true),\n    _cache[1] || (_cache[1] = _createElementVNode(\"span\", { class: \"statusbar__spacer\" }, null, -1 /* CACHED */)),\n    ($props.signalsUnavailable)\n      ? (_openBlock(), _createElementBlock(\"span\", _hoisted_5, \"Status niet bijgewerkt\"))\n      : _createCommentVNode(\"v-if\", true),\n    ($props.message)\n      ? (_openBlock(), _createElementBlock(\"span\", _hoisted_6, _toDisplayString($props.message), 1 /* TEXT */))\n      : _createCommentVNode(\"v-if\", true)\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/StatusBar.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/StatusBar.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/StatusBar.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/StatusBar.vue\";script.__scopeId = \"data-v-567fec09\";export default script;","<template>\n  <div\n    v-if=\"activeHref && tabs.length > 0\"\n    class=\"tabstrip\"\n    role=\"tablist\"\n    aria-label=\"Openstaande tabbladen\"\n  >\n    <div\n      v-for=\"tab in tabs\"\n      :key=\"tab.href\"\n      class=\"tabstrip__tab\"\n      :class=\"{ 'tabstrip__tab--active': tab.href === activeHref, 'tabstrip__tab--pinned': tab.pinned }\"\n    >\n      <RouterLink\n        :to=\"tab.href\"\n        class=\"tabstrip__link\"\n        role=\"tab\"\n        :aria-selected=\"tab.href === activeHref\"\n        :title=\"tab.label\"\n      >\n        <Icon :name=\"TAB_GLYPHS[tab.icon]\" :size=\"14\" class=\"tabstrip__icon\" />\n        <span class=\"tabstrip__label\">{{ tab.label }}</span>\n      </RouterLink>\n      <button\n        v-if=\"!tab.pinned\"\n        type=\"button\"\n        class=\"tabstrip__close\"\n        :aria-label=\"`Sluit ${tab.label}`\"\n        :title=\"`Sluit ${tab.label}`\"\n        @click=\"onClose(tab.href)\"\n      >\n        <Icon name=\"close\" :size=\"14\" />\n      </button>\n    </div>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from \"vue\";\nimport { RouterLink, useRoute, useRouter } from \"vue-router\";\nimport Icon from \"../icons/Icon.vue\";\nimport { closeTab, detailTabFor, syncTabs, tabKeyFor, type StripTab, type TabIcon } from \"../../lib/tab-strip\";\nimport { loadTabs, saveTabs } from \"../../lib/tab-strip-store\";\nimport { analysisCrumbFor, shellChrome } from \"../../lib/shell-chrome\";\nimport { analysisTabLabel } from \"../../lib/nav\";\nimport { TAB_GLYPHS } from \"../../lib/icon-names\";\n\n// The tabstrip: what do I have open.\n//\n// Every tab is a real RouterLink to a real route. That makes it shareable,\n// bookmarkable, openable in a browser tab with the mouse wheel, and the Back\n// button just works: exactly the condition under which a tabstrip on top of\n// the browser's tabs is defensible. The list itself is presentation and lives\n// in sessionStorage, not in the URL.\nconst route = useRoute();\nconst router = useRouter();\n\nfunction normalize(path: string): string {\n  return path.length > 1 && path.endsWith(\"/\") ? path.slice(0, -1) : path;\n}\n\nconst currentPath = computed(() => normalize(route.path));\n\nconst tabs = ref<StripTab[]>(syncTabs(loadTabs(), currentPath.value));\n\n// On a page outside the navigation there is nothing to show. A path with no\n// tab of its own belongs to its rail tab: `#/settings/stuck` is a section of\n// Instellingen, not a screen with its own tab.\nconst activeHref = computed(() => tabKeyFor(currentPath.value) ?? \"\");\n\nwatch(currentPath, (path) => {\n  const next = syncTabs(tabs.value, path);\n  if (next !== tabs.value) {\n    tabs.value = next;\n    saveTabs(next);\n  }\n});\n\n// A detail page sets a readable label (the company name) through the same\n// shell-chrome override the breadcrumb reads. Applied to the tab of the path\n// it was set for, and persisted, so the name survives navigating away.\nwatch(\n  [currentPath, () => shellChrome.crumbOverride.value, () => shellChrome.analysisCrumb.value],\n  (_values, previousValues) => {\n    let label: string;\n    if (route.name === \"analysis-detail\") {\n      const context = analysisCrumbFor({ locationId: Number(route.params.id), analysisId: Number(route.params.analysisId) });\n      if (!context) return;\n      label = analysisTabLabel(context);\n    } else {\n      const override = shellChrome.crumbOverride.value;\n      if (override === previousValues[1]) return;\n      if (!override || override.route !== String(route.name ?? \"\")) return;\n      label = override.label;\n    }\n    if (!detailTabFor(currentPath.value)) return;\n    const index = tabs.value.findIndex((tab) => tab.href === currentPath.value);\n    if (index === -1 || tabs.value[index].label === label) return;\n    const next = tabs.value.map((tab, i) => (i === index ? { ...tab, label } : tab));\n    tabs.value = next;\n    saveTabs(next);\n  },\n  { immediate: true },\n);\n\nfunction onClose(href: string) {\n  const result = closeTab(tabs.value, href, currentPath.value);\n  tabs.value = result.tabs;\n  saveTabs(result.tabs);\n  if (result.nextHref) void router.push(result.nextHref);\n}\n</script>\n\n<style scoped>\n.tabstrip {\n  display: flex;\n  flex: none;\n  align-items: stretch;\n  height: var(--shell-tabstrip-h);\n  overflow-x: auto;\n  overflow-y: hidden;\n  scrollbar-width: thin;\n  background: var(--bg-surface);\n  border-bottom: 1px solid var(--border-1);\n}\n\n.tabstrip__tab {\n  display: flex;\n  flex: none;\n  align-items: center;\n  min-width: 0;\n  max-width: 220px;\n  border-right: 1px solid var(--border-1);\n  color: var(--fg-3);\n  transition: background-color 110ms;\n}\n\n@media (hover: hover) {\n  .tabstrip__tab:hover {\n    background: var(--bg-inset);\n  }\n}\n\n/* The active tab takes the page ground and a 2px brand line on top, so it\n   reads as connected to the content below it. */\n.tabstrip__tab--active {\n  background: var(--bg-page);\n  color: var(--fg-1);\n  box-shadow: inset 0 2px 0 var(--brand);\n}\n\n@media (hover: hover) {\n  .tabstrip__tab--active:hover {\n    background: var(--bg-page);\n  }\n}\n\n.tabstrip__link {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  min-width: 0;\n  height: var(--shell-tabstrip-h);\n  padding: 0 4px 0 16px;\n  font-size: var(--text-ui);\n  color: inherit;\n  text-decoration: none;\n}\n\n.tabstrip__tab--pinned .tabstrip__link {\n  padding-right: 16px;\n}\n\n.tabstrip__tab--active .tabstrip__link {\n  font-weight: 600;\n}\n\n.tabstrip__icon {\n  opacity: 0.7;\n}\n\n.tabstrip__tab--active .tabstrip__icon {\n  opacity: 1;\n}\n\n.tabstrip__label {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n.tabstrip__close {\n  display: flex;\n  flex: none;\n  align-items: center;\n  justify-content: center;\n  width: 20px;\n  height: 20px;\n  margin-right: 6px;\n  padding: 0;\n  border: 0;\n  border-radius: var(--radius);\n  background: transparent;\n  color: var(--fg-3);\n  opacity: 0;\n  cursor: pointer;\n  transition: opacity 110ms, background-color 110ms;\n}\n\n.tabstrip__tab--active .tabstrip__close,\n.tabstrip__close:focus-visible {\n  opacity: 1;\n}\n\n@media (hover: hover) {\n  .tabstrip__tab:hover .tabstrip__close {\n    opacity: 1;\n  }\n\n  .tabstrip__close:hover {\n    background: var(--secondary);\n    color: var(--fg-1);\n  }\n}\n\n/* Touch devices cannot hover, so the close button is always visible there. */\n@media (hover: none) {\n  .tabstrip__close {\n    opacity: 1;\n  }\n}\n</style>\n","import { sectionHrefFor, sectionLabelFor } from \"./nav\";\n\n/**\n * De tabstrip boven de content: \"wat heb ik openstaan\".\n *\n * Uitgangspunt uit het UX-onderzoek: een tabstrip bovenop de browsertabs is\n * alleen verdedigbaar als elke tab een echte, deelbare URL heeft en de\n * Back-knop gewoon werkt. Daarom is een tab hier niets anders dan een route:\n * erop klikken is navigeren, de actieve tab volgt uit het pad, en Back brengt\n * je naar de vorige tab terug. De lijst met openstaande tabs is puur\n * presentatie en leeft in sessionStorage; hij zit bewust NIET in de URL, zodat\n * een gedeelde link naar een locatie geen rugzak met tabs van iemand anders\n * meesleept.\n *\n * In de hash-routed admin is \"het pad\" het hash-pad (`route.path`), dus\n * `/analyses`, `/locations/47161`, `/feedback/83469`. Dit bestand is Vue-vrij\n * en puur, zodat het te testen is zonder DOM.\n */\n\n/** Zoveel losse detailtabs blijven bewaard; de oudste rolt eruit. */\nexport const MAX_DETAIL_TABS = 8;\n\n/**\n * Zoveel pagina's houdt de shell tegelijk in leven. Ruim boven wat de strip kan\n * tonen (een vaste tab plus `MAX_DETAIL_TABS`) plus de raildoelen, zodat een\n * tab die zichtbaar openstaat nooit uit de cache valt en alsnog herlaadt.\n */\nexport const TAB_CACHE_SIZE = 20;\n\nexport type TabIcon =\n  | \"explorer\"\n  | \"locations\"\n  | \"analyses\"\n  | \"feedback\"\n  | \"bulk\"\n  | \"scoring\"\n  | \"usage\"\n  | \"settings\"\n  | \"location\"\n  | \"analysis\"\n  | \"assessment\";\n\nexport interface StripTab {\n  /** De echte route. Deelbaar, bookmarkbaar, en waar Back naartoe terugvalt. */\n  href: string;\n  label: string;\n  icon: TabIcon;\n  /** De eerste tab draagt de huidige rail-view en is niet te sluiten. */\n  pinned?: boolean;\n}\n\nconst RAIL_ICONS: Record<string, TabIcon> = {\n  \"/\": \"locations\",\n  \"/verkenner\": \"explorer\",\n  \"/analyses\": \"analyses\",\n  \"/feedback\": \"feedback\",\n  \"/bulk\": \"bulk\",\n  \"/scoring\": \"scoring\",\n  \"/gebruik\": \"usage\",\n  \"/settings\": \"settings\",\n};\n\nfunction normalize(pathname: string): string {\n  if (pathname.length > 1 && pathname.endsWith(\"/\")) return pathname.slice(0, -1);\n  return pathname;\n}\n\n/**\n * De vaste eerste tab voor een pad: het raildoel zelf, of op een detailpagina\n * de sectie waar die pagina onder hangt.\n */\nexport function railTabFor(pathname: string): StripTab | null {\n  const path = normalize(pathname);\n  const href = sectionHrefFor(path);\n  const label = sectionLabelFor(path);\n  if (!href || !label) return null;\n  return { href, label, icon: RAIL_ICONS[href] ?? \"locations\", pinned: true };\n}\n\n/**\n * De eigen sluitbare tab van een detailpagina, of null op een raildoel.\n * Het label is een terugval: zodra de pagina zijn data heeft, vervangt hij het\n * door de bedrijfsnaam.\n */\nexport function detailTabFor(pathname: string): StripTab | null {\n  const path = normalize(pathname);\n  if (RAIL_ICONS[path]) return null;\n\n  const [, first, id, sub, subId] = path.split(\"/\");\n\n  if (first === \"locations\" && id) {\n    if (sub === \"analyses\" && subId) {\n      return { href: path, label: `Analyse #${subId}`, icon: \"analysis\" };\n    }\n    return { href: path, label: `#${id}`, icon: \"location\" };\n  }\n\n  if (first === \"feedback\" && id) {\n    return { href: path, label: `Beoordeling #${id}`, icon: \"assessment\" };\n  }\n\n  return null;\n}\n\n/**\n * De tab waar een pad onder valt: zijn eigen detailtab, en anders het raildoel\n * (`/settings/stuck` hoort bij de tab van Instellingen). Dit is de identiteit\n * van een tab, dus ook de sleutel waaronder de shell een geopende pagina in\n * leven houdt: navigeren binnen dezelfde tab mag de pagina niet opnieuw\n * opbouwen. Geeft null op een pad buiten de navigatie.\n */\nexport function tabKeyFor(pathname: string): string | null {\n  const path = normalize(pathname);\n  const detail = detailTabFor(path);\n  if (detail) return detail.href;\n  return railTabFor(path)?.href ?? null;\n}\n\nfunction sameStrip(a: readonly StripTab[], b: readonly StripTab[]): boolean {\n  if (a.length !== b.length) return false;\n  return a.every((tab, i) => tab.href === b[i].href && tab.label === b[i].label);\n}\n\n/**\n * Brengt de strip in lijn met het huidige pad. Railnavigatie hernoemt de vaste\n * tab in plaats van een nieuwe te openen; een detailpagina krijgt zijn eigen\n * tab. Al geopende tabs houden hun label, zodat een mooie naam niet terugvalt\n * op het id zodra je erlangs navigeert.\n *\n * Geeft de invoer ongewijzigd terug als er niets verandert, zodat een reactieve\n * ref niet onnodig hoeft te triggeren.\n */\nexport function syncTabs(tabs: readonly StripTab[], pathname: string): StripTab[] {\n  const path = normalize(pathname);\n  const detail = detailTabFor(path);\n  // De vaste tab is het raildoel waar je vandaan kwam, niet de sectie waar de\n  // huidige pagina onder hangt: een locatie openen vanaf de Verkenner mag die\n  // tab niet stiekem in \"Locaties\" veranderen. Alleen echte railnavigatie\n  // verplaatst hem; zonder geschiedenis (deeplink, verse sessie) valt hij\n  // terug op de sectie van het pad.\n  const rail = (detail ? tabs.find((tab) => tab.pinned) : null) ?? railTabFor(path);\n  if (!rail) return tabs as StripTab[];\n\n  const details = tabs.filter((tab) => !tab.pinned);\n\n  let next = details;\n  if (detail && !details.some((tab) => tab.href === detail.href)) {\n    next = [...details, detail];\n    if (next.length > MAX_DETAIL_TABS) next = next.slice(next.length - MAX_DETAIL_TABS);\n  }\n\n  const result = [rail, ...next];\n  return sameStrip(result, tabs) ? (tabs as StripTab[]) : result;\n}\n\n/**\n * Sluit een tab. Sluit je de tab waar je op staat, dan is `nextHref` de route\n * waar de shell naartoe moet navigeren (de linkerbuur); anders blijf je staan.\n */\nexport function closeTab(\n  tabs: readonly StripTab[],\n  href: string,\n  activeHref: string,\n): { tabs: StripTab[]; nextHref: string | null } {\n  const index = tabs.findIndex((tab) => tab.href === href);\n  if (index === -1 || tabs[index].pinned) return { tabs: tabs as StripTab[], nextHref: null };\n\n  const remaining = tabs.filter((tab) => tab.href !== href);\n  const nextHref =\n    activeHref === href ? (remaining[index - 1] ?? remaining[0])?.href ?? null : null;\n\n  return { tabs: remaining, nextHref };\n}\n","import type { StripTab, TabIcon } from \"./tab-strip\";\n\n/**\n * sessionStorage persistence of the tabstrip. The open tabs are presentation,\n * not state worth sharing, so they live in the session and never in the URL\n * (see tab-strip.ts). Same key as the Next admin's shell-context.\n */\nexport const TABS_STORAGE_KEY = \"statiegeldnl:admin:tabs\";\n\nconst TAB_ICONS: readonly TabIcon[] = [\n  \"explorer\",\n  \"locations\",\n  \"analyses\",\n  \"feedback\",\n  \"bulk\",\n  \"scoring\",\n  \"usage\",\n  \"settings\",\n  \"location\",\n  \"analysis\",\n  \"assessment\",\n];\n\nfunction isTabIcon(value: unknown): value is TabIcon {\n  return typeof value === \"string\" && (TAB_ICONS as readonly string[]).includes(value);\n}\n\nfunction isStripTab(value: unknown): value is StripTab {\n  if (typeof value !== \"object\" || value === null) return false;\n  const tab = value as Record<string, unknown>;\n  return typeof tab.href === \"string\" && typeof tab.label === \"string\" && isTabIcon(tab.icon);\n}\n\n/**\n * Parses what sessionStorage holds. Anything that is not a well-formed tab is\n * dropped rather than rendered half: a stale entry from an older build must\n * never blank the strip.\n */\nexport function parseStoredTabs(raw: string | null): StripTab[] {\n  if (!raw) return [];\n  try {\n    const parsed: unknown = JSON.parse(raw);\n    if (!Array.isArray(parsed)) return [];\n    return parsed.filter(isStripTab).map((tab) => ({\n      href: tab.href,\n      label: tab.label,\n      icon: tab.icon,\n      ...(tab.pinned === true ? { pinned: true } : {}),\n    }));\n  } catch {\n    return [];\n  }\n}\n\nexport function loadTabs(): StripTab[] {\n  try {\n    return parseStoredTabs(window.sessionStorage.getItem(TABS_STORAGE_KEY));\n  } catch {\n    return [];\n  }\n}\n\nexport function saveTabs(tabs: readonly StripTab[]): void {\n  try {\n    window.sessionStorage.setItem(TABS_STORAGE_KEY, JSON.stringify(tabs));\n  } catch {\n    /* private mode or full quota: the strip simply works without memory */\n  }\n}\n","import { ref } from \"vue\";\nimport { matchingAnalysisCrumb, type AnalysisCrumbContext } from \"./breadcrumb-trail\";\n\n/**\n * Shell-state die een pagina moet kunnen vullen: het laatste kruimel-label en\n * het locatie-aantal in de rail.\n *\n * Bewust geen `useEffect`-achtige watcher: een pagina zet dit in zijn\n * BESTAANDE fetch-success-handler. Een aparte watcher die na het renderen state\n * zet is precies het patroon dat in de Next-versie de\n * `react-hooks/set-state-in-effect`-regel trof, en in Vue levert het hetzelfde\n * probleem op (een tweede render-pass met een tussenstand).\n *\n * De override is gestempeld met de route waarvoor hij geldt en vervalt daardoor\n * vanzelf bij navigatie: geen opruimcode nodig, en nooit het label van de\n * vorige pagina in de kop van de volgende.\n */\nconst crumbOverride = ref<{ route: string; label: string } | null>(null);\nconst locationCount = ref<number | null>(null);\nconst analysisCrumb = ref<AnalysisCrumbContext | null>(null);\n\nexport function setAnalysisCrumb(context: AnalysisCrumbContext): void {\n  analysisCrumb.value = { ...context };\n}\n\nexport function analysisCrumbFor(options: { locationId: number; analysisId: number }): AnalysisCrumbContext | null {\n  return matchingAnalysisCrumb({ context: analysisCrumb.value, ...options });\n}\n\nexport function setCrumbLabel(route: string, label: string): void {\n  crumbOverride.value = { route, label };\n}\n\nexport function crumbLabelFor(route: string): string | null {\n  const current = crumbOverride.value;\n  return current && current.route === route ? current.label : null;\n}\n\nexport function setLocationCount(count: number | null): void {\n  locationCount.value = count;\n}\n\nexport const shellChrome = { crumbOverride, locationCount, analysisCrumb };\n","import { navLabelFor } from \"./nav\";\n\nexport interface Crumb {\n  label: string;\n  /** Route-naam om naartoe te linken, of null voor de huidige (laatste) kruimel. */\n  route: string | null;\n  params?: Record<string, number>;\n}\n\nexport interface AnalysisCrumbContext {\n  locationId: number;\n  analysisId: number;\n  companyName?: string;\n}\n\nexport function matchingAnalysisCrumb(options: { context: AnalysisCrumbContext | null; locationId: number; analysisId: number }): AnalysisCrumbContext | null {\n  return options.context?.locationId === options.locationId && options.context.analysisId === options.analysisId ? options.context : null;\n}\n\n/**\n * Het kruimelpad voor een route. Pure functie zodat hij getest kan worden\n * zonder router of DOM.\n *\n * Een detailpagina mag een mooier laatste label hebben (de bedrijfsnaam in\n * plaats van \"Locatie\"). Dat label komt van de pagina zelf, via\n * `ShellChrome`, en wordt hier als `overrideLast` doorgegeven.\n */\nexport function breadcrumbTrail(routeName: string, overrideLast?: string | null, options: { analysis?: AnalysisCrumbContext } = {}): Crumb[] {\n  const sectionLabel = navLabelFor(routeName);\n\n  if (routeName === \"analysis-detail\" && options.analysis) {\n    const { locationId, analysisId, companyName } = options.analysis;\n    return [\n      { label: \"Locaties\", route: \"locations\" },\n      { label: companyName || `Locatie #${locationId}`, route: \"location-detail\", params: { id: locationId } },\n      { label: `Analyse #${analysisId}`, route: null },\n    ];\n  }\n\n  if (routeName === \"location-detail\") {\n    return [\n      { label: \"Locaties\", route: \"locations\" },\n      { label: overrideLast || \"Locatie\", route: null },\n    ];\n  }\n\n  if (routeName === \"feedback-detail\") {\n    return [\n      { label: \"Feedback\", route: \"feedback\" },\n      { label: overrideLast || \"Beoordeling\", route: null },\n    ];\n  }\n\n  if (!sectionLabel) return [{ label: overrideLast || \"Locata admin\", route: null }];\n  return [{ label: overrideLast || sectionLabel, route: null }];\n}\n","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, withCtx as _withCtx, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = {\n  key: 0,\n  class: \"tabstrip\",\n  role: \"tablist\",\n  \"aria-label\": \"Openstaande tabbladen\"\n}\nconst _hoisted_2 = { class: \"tabstrip__label\" }\nconst _hoisted_3 = [\"aria-label\", \"title\", \"onClick\"]\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return ($setup.activeHref && $setup.tabs.length > 0)\n    ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n        (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.tabs, (tab) => {\n          return (_openBlock(), _createElementBlock(\"div\", {\n            key: tab.href,\n            class: _normalizeClass([\"tabstrip__tab\", { 'tabstrip__tab--active': tab.href === $setup.activeHref, 'tabstrip__tab--pinned': tab.pinned }])\n          }, [\n            _createVNode($setup[\"RouterLink\"], {\n              to: tab.href,\n              class: \"tabstrip__link\",\n              role: \"tab\",\n              \"aria-selected\": tab.href === $setup.activeHref,\n              title: tab.label\n            }, {\n              default: _withCtx(() => [\n                _createVNode($setup[\"Icon\"], {\n                  name: $setup.TAB_GLYPHS[tab.icon],\n                  size: 14,\n                  class: \"tabstrip__icon\"\n                }, null, 8 /* PROPS */, [\"name\"]),\n                _createElementVNode(\"span\", _hoisted_2, _toDisplayString(tab.label), 1 /* TEXT */)\n              ]),\n              _: 2 /* DYNAMIC */\n            }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\", \"aria-selected\", \"title\"]),\n            (!tab.pinned)\n              ? (_openBlock(), _createElementBlock(\"button\", {\n                  key: 0,\n                  type: \"button\",\n                  class: \"tabstrip__close\",\n                  \"aria-label\": `Sluit ${tab.label}`,\n                  title: `Sluit ${tab.label}`,\n                  onClick: $event => ($setup.onClose(tab.href))\n                }, [\n                  _createVNode($setup[\"Icon\"], {\n                    name: \"close\",\n                    size: 14\n                  })\n                ], 8 /* PROPS */, _hoisted_3))\n              : _createCommentVNode(\"v-if\", true)\n          ], 2 /* CLASS */))\n        }), 128 /* KEYED_FRAGMENT */))\n      ]))\n    : _createCommentVNode(\"v-if\", true)\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/TabStrip.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/TabStrip.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/TabStrip.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/TabStrip.vue\";script.__scopeId = \"data-v-f9d1bfbd\";export default script;","import { onBeforeUnmount, onMounted, ref } from \"vue\";\nimport { api } from \"./api\";\nimport { ShellSignalsPoller, type ShellSignals } from \"./shell-signals\";\n\nexport function useShellSignals() {\n  const signals = ref<ShellSignals | null>(null);\n  const unavailable = ref(false);\n  const now = ref(new Date());\n  const poller = new ShellSignalsPoller({\n    load: () => api.getShellSignals(),\n    receive(value) { signals.value = value; unavailable.value = false; now.value = new Date(); },\n    failed() { unavailable.value = true; now.value = new Date(); },\n  });\n  onMounted(() => { void poller.start(); });\n  onBeforeUnmount(() => poller.stop());\n  return { signals, unavailable, now };\n}\n","import { rpc as createRpcClient, type OmitRPCContextArgs } from \"@webhare/rpc\";\nimport type { AdminRPC } from \"@mod-statiegeldnl/js/admin-rpc\";\n\n// Canonical @webhare/rpc client for the admin surface:\n// - typed against AdminRPC (the first `context` arg stripped)\n// - auto-adds ?pathname=location.pathname, which is what lets the router\n//   resolve this site's <wrdauth> rule and therefore the admin session cookie.\n//   A raw fetch() does NOT add it and would always read as logged out.\n//\n// Never call a method with `{}` when it takes no params: the stripped signature\n// is 0-arg, so `api.getProvinces()`.\nexport const api = createRpcClient<OmitRPCContextArgs<typeof AdminRPC>>(\"statiegeldnl:admin\", {\n  baseUrl: location.origin,\n});\n","import { computed, effectScope, onMounted, onUnmounted, reactive, ref, shallowRef, watch } from \"vue\";\nimport { api } from \"./api\";\nimport { BulkRunController, BulkRunScheduler, DEFAULT_BULK_CONCURRENCY, selectBulkWindow, type BulkAnalysisOptions } from \"./analysis-queue\";\nimport { ALL_REGIONS_VALUE } from \"./bulk-regions\";\nimport { classifyImageStatus } from \"./photo-status\";\nimport { workerActionError } from \"./run-analysis\";\n\nexport interface BulkForm {\n  selectionMode: \"region\" | \"ids\";\n  region: string;\n  idsText: string;\n  limit: string;\n  offset: string;\n  concurrency: string;\n  phase: \"images\" | \"analyze\";\n  isDryRun: boolean;\n  skipCompleted: boolean;\n  useBatch: boolean;\n  temperature: string;\n  seed: string;\n}\n\ntype Location = Awaited<ReturnType<typeof api.findAllLocations>>[\"locations\"][number];\nexport interface BulkPhotoStatus {\n  locationId: number;\n  companyName: string;\n  city: string | null;\n  hasCoordinates: boolean;\n  satellite: boolean;\n  cadastral: boolean;\n  cadastralSkipped: boolean;\n  streetViewCount: number;\n  overall: ReturnType<typeof classifyImageStatus>;\n}\nexport interface BulkEstimate {\n  targetCount: number;\n  sampleSize: number;\n  avgInputTokens: number;\n  avgOutputTokens: number;\n  inputCents: number;\n  outputCents: number;\n  imageCostCents: number;\n  totalCents: number;\n  mapbox: number;\n  streetview: number;\n  locationsWithoutCoords: number;\n}\n\nconst STORAGE_KEY = \"statiegeldnl-bulk-form\";\nconst form = reactive<BulkForm>({\n  selectionMode: \"region\", region: \"\", idsText: \"\", limit: \"\", offset: \"\",\n  concurrency: String(DEFAULT_BULK_CONCURRENCY), phase: \"images\", isDryRun: false,\n  skipCompleted: true, useBatch: false, temperature: \"0\", seed: \"42\",\n});\nconst regions = ref<string[]>([]);\nconst regionsLoading = ref(false);\nconst regionsError = ref(\"\");\nconst busy = ref(\"\");\nconst error = ref(\"\");\nconst fieldErrors = ref<Partial<Record<keyof BulkForm, string>>>({});\nconst resolved = ref<{ ids: number[]; nextOffset: number; totalAvailable: number; regionTitle: string | null } | null>(null);\nconst estimate = ref<BulkEstimate | null>(null);\nconst imageStatuses = ref<BulkPhotoStatus[] | null>(null);\nconst statusInfo = ref(\"\");\nconst missingIds = ref<number[] | null>(null);\nconst navigationPaused = ref(false);\nlet initialized = false;\nlet observers = 0;\nlet revision = 0;\n\nconst controller = new BulkRunController({\n  startAnalysis: options => api.startAnalysis(options),\n  findAnalysisProgress: options => api.findAnalysisProgress(options),\n  fetchLocationImages: options => api.fetchLocationImages(options),\n  submitBatch: options => api.submitBatch(options),\n  findPendingBatchAnalyses: () => api.findPendingBatchAnalyses(),\n}, { changed: publish });\nconst run = shallowRef(snapshot());\nconst scheduler = new BulkRunScheduler(controller);\n\nfunction snapshot() {\n  return {\n    active: controller.active, phase: controller.phase, batch: controller.batch, submitting: controller.submitting,\n    paused: controller.queue.paused, cancelled: controller.queue.cancelled, counts: controller.queue.counts,\n    entries: controller.queue.entries.map(entry => ({ ...entry })), error: controller.error,\n    concurrency: controller.queue.concurrency, batchIds: [...controller.batchIds],\n  };\n}\n\nfunction publish() { run.value = snapshot(); }\n\nexport function suspendBulkRunner() {\n  scheduler.suspend();\n  if (controller.active) navigationPaused.value = true;\n}\n\nexport function resumeBulkRunner() {\n  scheduler.resume();\n}\n\nfunction initialize() {\n  if (initialized) return;\n  initialized = true;\n  try {\n    const stored: unknown = JSON.parse(localStorage.getItem(STORAGE_KEY) ?? \"null\");\n    if (stored && typeof stored === \"object\" && !Array.isArray(stored)) {\n      const data = stored as Record<string, unknown>;\n      for (const key of [\"region\", \"idsText\", \"limit\", \"offset\", \"temperature\", \"seed\"] as const) {\n        const value = data[key];\n        if (typeof value === \"string\") form[key] = value;\n      }\n      for (const key of [\"isDryRun\", \"skipCompleted\", \"useBatch\"] as const) {\n        const value = data[key];\n        if (typeof value === \"boolean\") form[key] = value;\n      }\n      if (data.selectionMode === \"ids\") form.selectionMode = \"ids\";\n      if (data.phase === \"analyze\") form.phase = \"analyze\";\n      if (Number.isSafeInteger(Number(data.concurrency)) && Number(data.concurrency) > 0) form.concurrency = String(data.concurrency);\n    }\n  } catch { /* Storage may be disabled. */ }\n  if (form.useBatch) form.isDryRun = false;\n  effectScope(true).run(() => {\n    watch(form, () => {\n      ++revision;\n      resolved.value = null;\n      estimate.value = null;\n      imageStatuses.value = null;\n      statusInfo.value = \"\";\n      missingIds.value = null;\n      try { localStorage.setItem(STORAGE_KEY, JSON.stringify(form)); } catch { /* Storage may be disabled. */ }\n    }, { flush: \"sync\" });\n    watch(() => form.useBatch, enabled => { if (enabled) form.isDryRun = false; }, { flush: \"sync\" });\n  });\n  window.addEventListener(\"beforeunload\", event => {\n    if (!controller.active) return;\n    event.preventDefault();\n    event.returnValue = \"\";\n  });\n}\n\nasync function loadRegions() {\n  if (regionsLoading.value) return;\n  regionsLoading.value = true;\n  regionsError.value = \"\";\n  try {\n    regions.value = (await api.getProvinces()).provinces;\n  } catch {\n    regionsError.value = \"Regio's konden niet worden geladen. Probeer opnieuw of gebruik locatie-ID's.\";\n  } finally {\n    regionsLoading.value = false;\n  }\n}\n\nfunction validate(options: { window?: boolean; analysis?: boolean } = {}) {\n  const errors: Partial<Record<keyof BulkForm, string>> = {};\n  if (form.selectionMode === \"region\" && !form.region) errors.region = \"Kies een regio.\";\n  if (form.selectionMode === \"ids\") {\n    const parts = form.idsText.trim().split(/[,\\s]+/);\n    if (!form.idsText.trim() || parts.some(part => !/^\\d+$/.test(part) || !Number.isSafeInteger(Number(part)) || Number(part) <= 0)) errors.idsText = \"Vul positieve locatie-ID's in, gescheiden door komma's, spaties of nieuwe regels.\";\n  }\n  if (options.window) {\n    if (form.limit.trim() && (!/^\\d+$/.test(form.limit.trim()) || !Number.isSafeInteger(Number(form.limit)) || Number(form.limit) < 1)) errors.limit = \"Vul een positief geheel aantal in of laat het veld leeg.\";\n    if (form.offset.trim() && (!/^\\d+$/.test(form.offset.trim()) || !Number.isSafeInteger(Number(form.offset)))) errors.offset = \"Vul een geheel getal vanaf 0 in.\";\n  }\n  if (options.analysis) {\n    if (!Number.isSafeInteger(Number(form.concurrency)) || Number(form.concurrency) < 1) errors.concurrency = \"Vul minstens één parallelle sessie in.\";\n    if (form.phase === \"analyze\") {\n      if (form.temperature.trim() && (!Number.isFinite(Number(form.temperature)) || Number(form.temperature) < 0 || Number(form.temperature) > 2)) errors.temperature = \"Vul een getal van 0 tot en met 2 in.\";\n      if (form.seed.trim() && !Number.isSafeInteger(Number(form.seed))) errors.seed = \"Vul een geheel getal in of laat het veld leeg.\";\n    }\n  }\n  fieldErrors.value = errors;\n  return Object.keys(errors).length === 0;\n}\n\nasync function loadSelection() {\n  if (form.selectionMode === \"ids\") return { ids: [...new Set(form.idsText.trim().split(/[,\\s]+/).map(Number))], regionTitle: null };\n  if (form.region === ALL_REGIONS_VALUE) return { ...await api.findAllLocationIds(), regionTitle: \"Alle regio's\" };\n  return api.findLocationIdsByRegion({ region: /^\\d+$/.test(form.region) ? Number(form.region) : form.region });\n}\n\nasync function loadLocations(ids: number[]) {\n  const locations: Location[] = [];\n  for (let index = 0; index < ids.length; index += 250) {\n    const subset = ids.slice(index, index + 250);\n    const result = await api.findAllLocations({ ids: subset, page: 1, pageSize: subset.length });\n    locations.push(...result.locations);\n  }\n  return locations;\n}\n\nfunction photoStatus(location: Location): BulkPhotoStatus {\n  const status = {\n    locationId: location.id, companyName: location.companyName, city: location.city,\n    hasCoordinates: location.latitude !== null && location.longitude !== null,\n    satellite: location.imageSatellite, cadastral: location.imageCadastral,\n    cadastralSkipped: location.imageSatellite && !location.imageCadastral && !location.cadastralGeometry,\n    streetViewCount: Number(location.imageStreetview0) + Number(location.imageStreetview90) + Number(location.imageStreetview180) + Number(location.imageStreetview270),\n  };\n  return { ...status, overall: classifyImageStatus(status) };\n}\n\nasync function loadProcessed(ids: number[]) {\n  if (form.phase === \"images\") {\n    const statuses = (await loadLocations(ids)).map(photoStatus);\n    return new Set(statuses.filter(status => [\"complete\", \"complete-skipped\", \"no-coords\"].includes(status.overall)).map(status => status.locationId));\n  }\n  const completed = new Set<number>();\n  for (let index = 0; index < ids.length; index += 1000) {\n    const result = await api.findCompletedAnalysisLocationIds({ ids: ids.slice(index, index + 1000), excludeDryRuns: form.useBatch });\n    for (const id of result.locationIds) completed.add(id);\n  }\n  return completed;\n}\n\nasync function withBusy<T>(name: string, action: () => Promise<T>): Promise<T | null> {\n  if (busy.value || controller.active) return null;\n  busy.value = name;\n  error.value = \"\";\n  try {\n    return await action();\n  } catch (cause) {\n    error.value = workerActionError(cause);\n    return null;\n  } finally {\n    busy.value = \"\";\n  }\n}\n\nasync function resolveSelection() {\n  const version = revision;\n  const selection = await loadSelection();\n  const processed = form.skipCompleted ? await loadProcessed(selection.ids) : new Set<number>();\n  const window = selectBulkWindow({ ids: selection.ids, processed, offset: Number(form.offset) || 0, limit: form.limit ? Number(form.limit) : null, skipCompleted: form.skipCompleted });\n  if (version !== revision) return null;\n  resolved.value = { ...window, totalAvailable: selection.ids.length, regionTitle: selection.regionTitle };\n  return resolved.value;\n}\n\nasync function resolveTargets() {\n  if (!validate({ window: true })) return null;\n  return withBusy(\"resolve\", resolveSelection);\n}\n\nasync function checkStatus(action: \"status\" | \"next\" | \"missing\" = \"status\") {\n  if (!validate()) return;\n  await withBusy(action, async () => {\n    const version = revision;\n    const selection = await loadSelection();\n    const processed = await loadProcessed(selection.ids);\n    if (version !== revision) return;\n    const remaining = selection.ids.filter(id => !processed.has(id));\n    if (action === \"next\") {\n      const index = selection.ids.findIndex(id => !processed.has(id));\n      form.offset = String(index === -1 ? selection.ids.length : index);\n    }\n    if (action === \"missing\") missingIds.value = remaining;\n    statusInfo.value = `${selection.ids.length} locaties, ${selection.ids.length - remaining.length} verwerkt, ${remaining.length} nog te verwerken.`;\n  });\n}\n\nfunction fillMissing(count: string) {\n  if (!Number.isSafeInteger(Number(count)) || Number(count) < 1) return \"Vul een positief geheel aantal in.\";\n  const ids = missingIds.value?.slice(0, Number(count)) ?? [];\n  if (!ids.length) return \"Geen onverwerkte locaties in deze selectie.\";\n  form.selectionMode = \"ids\";\n  form.idsText = ids.join(\"\\n\");\n  form.offset = \"\";\n  form.limit = \"\";\n  return \"\";\n}\n\nasync function checkPhotos() {\n  if (!validate({ window: true })) return;\n  await withBusy(\"photos\", async () => {\n    const targets = await resolveSelection();\n    if (!targets) return;\n    imageStatuses.value = (await loadLocations(targets.ids)).map(photoStatus);\n    const found = new Set(imageStatuses.value.map(status => status.locationId));\n    const missing = targets.ids.filter(id => !found.has(id));\n    if (missing.length) error.value = `Locaties niet gevonden: ${missing.map(id => `#${id}`).join(\", \")}.`;\n  });\n}\n\nasync function estimateCosts() {\n  if (!validate({ window: true })) return;\n  await withBusy(\"estimate\", async () => {\n    const targets = await resolveSelection();\n    if (!targets || !targets.ids.length) return;\n    const [stats, locations] = await Promise.all([\n      api.getModelTokenStats({ modelId: \"google/gemini-3-pro\", limit: 50 }), loadLocations(targets.ids),\n    ]);\n    const avgInputTokens = stats.samples ? stats.avgInputTokens : 12000;\n    const avgOutputTokens = stats.samples ? stats.avgOutputTokens : 3000;\n    let mapbox = 0, streetview = 0, locationsWithoutCoords = 0;\n    for (const location of locations) {\n      if (location.latitude === null || location.longitude === null) { ++locationsWithoutCoords; continue; }\n      if (!location.imageSatellite) ++mapbox;\n      if (!location.imageCadastral) ++mapbox;\n      if (location.streetViewStatus === null || location.streetViewStatus === \"OK\") {\n        streetview += 4 - photoStatus(location).streetViewCount;\n      }\n    }\n    const factor = form.isDryRun && !form.useBatch ? 0 : form.useBatch ? 0.5 : 1;\n    const inputCents = avgInputTokens * targets.ids.length / 1_000_000 * 125 * factor;\n    const outputCents = avgOutputTokens * targets.ids.length / 1_000_000 * 500 * factor;\n    const imageCostCents = mapbox * 0.1 + streetview * 0.7;\n    estimate.value = {\n      targetCount: targets.ids.length, sampleSize: stats.samples, avgInputTokens, avgOutputTokens,\n      inputCents, outputCents, imageCostCents, totalCents: inputCents + outputCents + imageCostCents,\n      mapbox, streetview, locationsWithoutCoords,\n    };\n  });\n}\n\nasync function prepareStart() {\n  if (!validate({ window: true, analysis: true })) return null;\n  return withBusy(\"resolve\", resolveSelection);\n}\n\nasync function start() {\n  if (!resolved.value?.ids.length || controller.active || busy.value || scheduler.suspended) return;\n  const targets = resolved.value;\n  const options: BulkAnalysisOptions = {\n    ...(form.temperature.trim() ? { temperature: Number(form.temperature) } : {}),\n    ...(form.seed.trim() ? { seed: Number(form.seed) } : {}),\n  };\n  navigationPaused.value = false;\n  if (form.phase === \"analyze\" && form.useBatch) {\n    await controller.startBatch({ locationIds: targets.ids, skipCompleted: form.skipCompleted, ...options });\n  } else {\n    controller.start({\n      locationIds: targets.ids, concurrency: Number(form.concurrency), phase: form.phase,\n      forceImages: !form.skipCompleted,\n      analysisOptions: { ...options, dryRun: form.isDryRun, modelIds: [{ id: \"google/gemini-3.6-flash\", displayName: \"Gemini 3.6 Flash\" }] },\n    });\n  }\n  // Advance only on a confirmed start. Cancelled entries remain visible for retry.\n  if (!controller.error) form.offset = String(targets.nextOffset);\n  if (!observers && !controller.batch) { controller.pause(); navigationPaused.value = true; }\n  void scheduler.tick();\n}\n\nfunction resume() { navigationPaused.value = false; controller.resume(); void scheduler.tick(); }\nfunction retryUnfinished() {\n  if (controller.active) return;\n  const ids = controller.queue.entries.filter(entry => entry.locationId !== null && [\"failed\", \"cancelled\"].includes(entry.status)).map(entry => entry.locationId!);\n  form.selectionMode = \"ids\";\n  form.idsText = ids.join(\"\\n\");\n  form.offset = \"\";\n  form.limit = \"\";\n}\n\nexport function useBulkRunStatus() { return computed(() => run.value); }\n\nexport function useBulkRunner() {\n  initialize();\n  onMounted(() => {\n    ++observers;\n    if (!regions.value.length) void loadRegions();\n  });\n  onUnmounted(() => {\n    --observers;\n    if (observers === 0 && controller.active && !controller.batch && !controller.queue.cancelled) {\n      navigationPaused.value = true;\n      controller.pause();\n    }\n  });\n  return {\n    form, regions, regionsLoading, regionsError, loadRegions, fieldErrors,\n    busy, error, resolved, estimate, imageStatuses, statusInfo, missingIds, navigationPaused, run,\n    locked: computed(() => run.value.active || Boolean(busy.value)),\n    resolveTargets, checkStatus, fillMissing, checkPhotos, estimateCosts, prepareStart, start,\n    pause: () => controller.pause(), resume, cancel: () => controller.cancel(),\n    acknowledgeUncertain: () => controller.acknowledgeUncertain(), retryUnfinished,\n  };\n}\n","export const DEFAULT_BULK_CONCURRENCY = 3;\nexport const BULK_POLL_INTERVAL = 3000;\n\nexport type QueueStatus = \"waiting\" | \"starting\" | \"running\" | \"completed\" | \"failed\" | \"skipped\" | \"cancelled\" | \"uncertain\";\nexport interface QueueEntry {\n  key: number;\n  locationId: number | null;\n  analysisId: number | null;\n  slot: number | null;\n  status: QueueStatus;\n  stage: string | null;\n  startedAt: number | null;\n  finishedAt: number | null;\n  message: string;\n  error: string | null;\n  overallScore: number | null;\n}\n\nexport class AnalysisQueue {\n  public entries: QueueEntry[];\n  public concurrency: number;\n  public paused = false;\n  public cancelled = false;\n\n  constructor(options: { locationIds: number[]; concurrency?: number }) {\n    this.concurrency = Number.isFinite(options.concurrency) ? Math.max(1, Math.floor(options.concurrency!)) : DEFAULT_BULK_CONCURRENCY;\n    this.entries = [...new Set(options.locationIds)].map((locationId, key) => ({\n      key, locationId, analysisId: null, slot: null, status: \"waiting\", stage: null,\n      startedAt: null, finishedAt: null, message: \"Wacht op een vrij slot\", error: null, overallScore: null,\n    }));\n  }\n\n  public get counts() {\n    const count = (status: QueueStatus) => this.entries.filter(entry => entry.status === status).length;\n    const completed = count(\"completed\"), failed = count(\"failed\"), skipped = count(\"skipped\");\n    return {\n      total: this.entries.length, done: completed + failed + skipped, completed, failed, skipped,\n      cancelled: count(\"cancelled\"), inflight: count(\"starting\") + count(\"running\"), waiting: count(\"waiting\"), uncertain: count(\"uncertain\"),\n    };\n  }\n\n  public take(): QueueEntry | null {\n    if (this.paused || this.cancelled) return null;\n    const occupied = new Set(this.entries.filter(entry => entry.status === \"starting\" || entry.status === \"running\").map(entry => entry.slot));\n    if (occupied.size >= this.concurrency) return null;\n    const entry = this.entries.find(item => item.status === \"waiting\");\n    if (!entry) return null;\n    let slot = 0;\n    while (occupied.has(slot)) ++slot;\n    Object.assign(entry, { slot, status: \"starting\", startedAt: Date.now(), message: \"Starten...\" });\n    return entry;\n  }\n\n  public finish(options: { key: number; status: \"completed\" | \"failed\" | \"skipped\"; message: string }) {\n    const entry = this.entries.find(item => item.key === options.key);\n    if (!entry || ![\"starting\", \"running\"].includes(entry.status)) return;\n    Object.assign(entry, { status: options.status, message: options.message, finishedAt: Date.now(), error: null });\n  }\n\n  public cancel() {\n    this.cancelled = true;\n    this.paused = false;\n    for (const entry of this.entries) {\n      if (entry.status === \"waiting\") Object.assign(entry, { status: \"cancelled\", message: \"Niet gestart\" });\n    }\n  }\n\n  public reserveBatch(analysisIds: number[]) {\n    this.entries = [...new Set(analysisIds)].map((analysisId, key) => ({\n      key, locationId: null, analysisId, slot: null, status: \"running\", stage: \"batch_preparing\",\n      startedAt: Date.now(), finishedAt: null, message: \"Gereserveerd; wacht op verwerking\", error: null, overallScore: null,\n    }));\n  }\n}\n\nexport function selectBulkWindow(options: { ids: number[]; processed: Set<number>; offset: number; limit: number | null; skipCompleted: boolean }) {\n  const ids: number[] = [];\n  let cursor = Math.min(options.offset, options.ids.length);\n  for (; cursor < options.ids.length && (options.limit === null || ids.length < options.limit); ++cursor) {\n    const id = options.ids[cursor];\n    if (!options.skipCompleted || !options.processed.has(id)) ids.push(id);\n  }\n  return { ids, nextOffset: cursor };\n}\n\nexport interface BulkAnalysisOptions {\n  dryRun?: boolean;\n  temperature?: number;\n  seed?: number;\n  modelIds?: Array<{ id: string; displayName: string }>;\n}\n\nexport interface BulkRunApi {\n  startAnalysis(options: BulkAnalysisOptions & { locationId: number }): Promise<{ analysisId: number; alreadyRunning?: boolean }>;\n  findAnalysisProgress(options: { id: number }): Promise<{ progress: { id: number; status: string; stage: string | null; overallScore: number | null } | null }>;\n  fetchLocationImages(options: { locationId: number; force: boolean }): Promise<{ images: Array<{ cached?: boolean; skipped?: boolean }>; hasCoordinates: boolean; errors?: string[] }>;\n  submitBatch(options: Omit<BulkAnalysisOptions, \"dryRun\"> & { locationIds: number[]; skipCompleted?: boolean }): Promise<{ analysisIds: number[] }>;\n  findPendingBatchAnalyses(): Promise<{ groups: Array<{ batchJobId: string; analyses: Array<{ id: number; locationId: number }> }> }>;\n}\n\nexport class BulkRunController {\n  public queue = new AnalysisQueue({ locationIds: [] });\n  public phase: \"images\" | \"analyze\" = \"images\";\n  public batch = false;\n  public submitting = false;\n  public error: string | null = null;\n  public batchIds: string[] = [];\n  #api: BulkRunApi;\n  #changed: () => void;\n  #ticking = false;\n  #options: BulkAnalysisOptions = {};\n  #forceImages = false;\n\n  constructor(api: BulkRunApi, options: { changed?: () => void } = {}) {\n    this.#api = api;\n    this.#changed = options.changed ?? (() => {});\n  }\n\n  public get active() {\n    const counts = this.queue.counts;\n    return this.submitting || counts.inflight > 0 || counts.waiting > 0 || counts.uncertain > 0;\n  }\n\n  public start(options: { locationIds: number[]; concurrency: number; phase: \"images\" | \"analyze\"; forceImages?: boolean; analysisOptions?: BulkAnalysisOptions }) {\n    if (this.active) throw new Error(\"Er loopt al een bulk-run.\");\n    this.queue = new AnalysisQueue(options);\n    this.phase = options.phase;\n    this.batch = false;\n    this.error = null;\n    this.batchIds = [];\n    this.#forceImages = options.forceImages ?? false;\n    this.#options = { ...options.analysisOptions };\n    this.#changed();\n  }\n\n  public async startBatch(options: Omit<BulkAnalysisOptions, \"dryRun\"> & { locationIds: number[]; skipCompleted?: boolean }) {\n    if (this.active) throw new Error(\"Er loopt al een bulk-run.\");\n    this.submitting = true;\n    this.phase = \"analyze\";\n    this.batch = true;\n    this.error = null;\n    this.batchIds = [];\n    this.queue = new AnalysisQueue({ locationIds: [] });\n    this.#changed();\n    try {\n      const result = await this.#api.submitBatch(options);\n      if (!Array.isArray(result.analysisIds) || !result.analysisIds.every(id => Number.isSafeInteger(id) && id > 0)) throw new Error(\"Ongeldig batchantwoord\");\n      this.queue.reserveBatch(result.analysisIds);\n      if (!result.analysisIds.length) this.error = \"Geen analyses gereserveerd. Mogelijk waren de locaties al verwerkt.\";\n    } catch {\n      this.error = \"Batchstart niet bevestigd. Controleer Batches voordat je opnieuw start.\";\n      this.queue = new AnalysisQueue({ locationIds: options.locationIds, concurrency: options.locationIds.length });\n      for (const entry of this.queue.entries) Object.assign(entry, { status: \"uncertain\", message: this.error });\n    } finally {\n      this.submitting = false;\n      this.#changed();\n    }\n  }\n\n  public pause() { this.queue.paused = true; this.#changed(); }\n  public resume() { this.queue.paused = false; this.#changed(); }\n  public cancel() { this.queue.cancel(); this.#changed(); }\n\n  public acknowledgeUncertain() {\n    for (const entry of this.queue.entries) {\n      if (entry.status === \"uncertain\") Object.assign(entry, { status: \"cancelled\", message: \"Start niet bevestigd; controleer de locatie of Batches\" });\n    }\n    this.#changed();\n  }\n\n  public async tick() {\n    if (this.#ticking || this.submitting) return;\n    this.#ticking = true;\n    try {\n      const running = this.queue.entries.filter(entry => entry.status === \"running\" && entry.analysisId !== null);\n      // Bound read concurrency too: a batch may reserve thousands of rows.\n      for (let index = 0; index < running.length; index += 10) {\n        await Promise.all(running.slice(index, index + 10).map(entry => this.#poll(entry)));\n      }\n      if (this.batch && running.length) {\n        try {\n          const { groups } = await this.#api.findPendingBatchAnalyses();\n          this.error = null;\n          const reserved = new Map(this.queue.entries.map(entry => [entry.analysisId, entry]));\n          for (const group of groups) {\n            for (const analysis of group.analyses) {\n              const entry = reserved.get(analysis.id);\n              if (!entry) continue;\n              entry.locationId = analysis.locationId;\n              if (!this.batchIds.includes(group.batchJobId)) this.batchIds.push(group.batchJobId);\n            }\n          }\n        } catch {\n          this.error = \"Batchgegevens konden niet worden bijgewerkt. De gereserveerde analyses blijven gevolgd.\";\n        }\n      }\n      if (!this.batch) {\n        const wave: QueueEntry[] = [];\n        let entry: QueueEntry | null;\n        while ((entry = this.queue.take())) wave.push(entry);\n        this.#changed();\n        await Promise.all(wave.map(item => this.#dispatch(item)));\n      }\n    } finally {\n      this.#ticking = false;\n      this.#changed();\n    }\n  }\n\n  async #dispatch(entry: QueueEntry) {\n    try {\n      if (this.phase === \"images\") {\n        const result = await this.#api.fetchLocationImages({ locationId: entry.locationId!, force: this.#forceImages });\n        const cached = result.images.filter(image => image.cached).length;\n        const failures = result.errors?.length ?? 0;\n        this.queue.finish({\n          key: entry.key,\n          status: !result.hasCoordinates ? \"skipped\" : failures ? \"failed\" : \"completed\",\n          message: !result.hasCoordinates ? \"Geen coördinaten; overgeslagen\" : failures\n            ? `${cached}/${result.images.length} foto's, ${failures} fout(en)` : `${cached}/${result.images.length} foto's klaar`,\n        });\n      } else {\n        const result = await this.#api.startAnalysis({ locationId: entry.locationId!, ...this.#options });\n        if (!Number.isSafeInteger(result.analysisId) || result.analysisId <= 0) throw new Error(\"Ongeldig analyseantwoord\");\n        Object.assign(entry, { analysisId: result.analysisId, status: \"running\", message: result.alreadyRunning ? \"Bestaande analyse volgen\" : \"Analyse gestart\" });\n      }\n    } catch {\n      // A lost start response may still have created paid work. Never retry it automatically.\n      Object.assign(entry, { status: \"uncertain\", message: \"Start niet bevestigd. Controleer de locatie voordat je opnieuw start.\" });\n      this.queue.paused = true;\n    }\n    this.#changed();\n  }\n\n  async #poll(entry: QueueEntry) {\n    try {\n      const { progress } = await this.#api.findAnalysisProgress({ id: entry.analysisId! });\n      if (!progress) {\n        entry.error = \"Analyse nog niet leesbaar. Wordt opnieuw gecontroleerd.\";\n        return;\n      }\n      entry.error = null;\n      entry.stage = progress.stage;\n      entry.overallScore = progress.status === \"completed\" ? progress.overallScore : null;\n      if ([\"completed\", \"failed\", \"cancelled\", \"canceled\"].includes(progress.status)) {\n        this.queue.finish({\n          key: entry.key, status: progress.status === \"completed\" ? \"completed\" : \"failed\",\n          message: progress.status === \"completed\" ? (progress.overallScore === null ? \"Voltooid\" : `Score ${progress.overallScore}`)\n            : progress.status === \"failed\" ? \"Analyse mislukt\" : \"Analyse geannuleerd\",\n        });\n      }\n    } catch {\n      entry.error = \"Voortgang tijdelijk niet bereikbaar. Analyse blijft gevolgd.\";\n    }\n  }\n}\n\nexport class BulkRunScheduler {\n  public suspended = false;\n  #controller: BulkRunController;\n  #schedule: (callback: () => void) => () => void;\n  #cancelTimer: (() => void) | null = null;\n  #generation = 0;\n  #ticking = false;\n\n  constructor(controller: BulkRunController, options: { schedule?: (callback: () => void) => () => void } = {}) {\n    this.#controller = controller;\n    this.#schedule = options.schedule ?? (callback => {\n      const timer = setTimeout(callback, BULK_POLL_INTERVAL);\n      return () => clearTimeout(timer);\n    });\n  }\n\n  public suspend() {\n    this.suspended = true;\n    ++this.#generation;\n    this.#cancelTimer?.();\n    this.#cancelTimer = null;\n    this.#controller.pause();\n  }\n\n  public resume() {\n    this.suspended = false;\n    ++this.#generation;\n    if (this.#controller.queue.counts.inflight || this.#controller.submitting) this.#scheduleNext();\n  }\n\n  public async tick() {\n    if (this.suspended) return;\n    if (this.#ticking) { this.#scheduleNext(); return; }\n    this.#cancelTimer?.();\n    this.#cancelTimer = null;\n    this.#ticking = true;\n    const generation = this.#generation;\n    try { await this.#controller.tick(); } finally {\n      this.#ticking = false;\n      const queue = this.#controller.queue;\n      if (!this.suspended && generation === this.#generation\n          && (queue.counts.inflight || (queue.counts.waiting && !queue.paused && !queue.cancelled))) this.#scheduleNext();\n    }\n  }\n\n  #scheduleNext() {\n    this.#cancelTimer?.();\n    const generation = this.#generation;\n    this.#cancelTimer = this.#schedule(() => {\n      if (generation !== this.#generation || this.suspended) return;\n      this.#cancelTimer = null;\n      void this.tick();\n    });\n  }\n}\n","/**\n * Sentinel `region` value meaning \"every location in the schema\" — the bulk\n * runner's \"Alle regio's\" dropdown option. Shared by the dropdown and the\n * /api/bulk routes so they agree on the magic string. It can never collide\n * with a real region title (provinces never start with \"__\").\n */\nexport const ALL_REGIONS_VALUE = \"__all__\";\nexport const ALL_REGIONS_LABEL = \"Alle regio's\";\n","// Shared classifier for the \"Foto's\" column on the locations list, the bulk\n// runner's image-status table, and the photoStatus sort key. Cadastral-skipped\n// means PDOK was queried (satellite is the canary for \"user triggered a\n// download\") and returned no parcel, which is a terminal state, not a fetchable\n// gap. We surface it as its own bucket so the locations list can render a\n// distinct icon and the sort can group these between \"partial\" (still fetchable)\n// and \"complete\" (everything we could get is in).\n\nexport type ImageOverall =\n  | \"unknown\"\n  | \"no-coords\"\n  | \"missing\"\n  | \"partial\"\n  | \"complete-skipped\"\n  | \"complete\";\n\nexport interface PhotoStatusInput {\n  hasCoordinates: boolean;\n  satellite: boolean;\n  cadastral: boolean;\n  cadastralSkipped: boolean;\n  streetViewCount: number;\n}\n\nexport function classifyImageStatus(s: PhotoStatusInput): ImageOverall {\n  if (!s.satellite && !s.cadastral && s.streetViewCount === 0) return \"unknown\";\n  if (!s.hasCoordinates) return \"no-coords\";\n  if (!s.satellite) return \"missing\";\n  const cadastralOk = s.cadastral || s.cadastralSkipped;\n  if (cadastralOk && s.streetViewCount >= 1) {\n    return s.cadastralSkipped ? \"complete-skipped\" : \"complete\";\n  }\n  return \"partial\";\n}\n\n// Ascending = worst-first. Cadastral-skipped sits between partial (fetchable\n// gap) and complete (all images present), so a user sorting ascending sees\n// truly-incomplete rows first, then informational \"skipped\" rows, then done.\nconst SORT_KEY: Record<ImageOverall, number> = {\n  unknown: 0,\n  \"no-coords\": 1,\n  missing: 2,\n  partial: 3,\n  \"complete-skipped\": 4,\n  complete: 5,\n};\n\nexport function photoStatusSortKey(s: PhotoStatusInput): number {\n  return SORT_KEY[classifyImageStatus(s)];\n}\n","import { resolveEnvironmentFromHost } from \"./environment\";\n\nexport interface AnalysisModel {\n  id: string;\n  displayName: string;\n  provider: string;\n}\n\nexport interface AnalysisOptions {\n  selectedModels: string[];\n  dryRun: boolean;\n  useCache: boolean;\n  temperature: string;\n  seed: string;\n  mockRequiresHumanReview: boolean;\n}\n\ntype StorageAccess = Pick<Storage, \"getItem\" | \"setItem\" | \"removeItem\">;\nexport type AnalysisOptionErrors = Partial<Record<\"models\" | \"temperature\" | \"seed\", string>>;\n\nexport function defaultAnalysisOptions({ hostname }: { hostname: string }): AnalysisOptions {\n  // Match the shell environment badge; the same assetpack runs on test and production.\n  return { selectedModels: [], dryRun: resolveEnvironmentFromHost(hostname).label !== \"productie\", useCache: true, temperature: \"0\", seed: \"42\", mockRequiresHumanReview: false };\n}\n\nexport class AnalysisOptionsRepository {\n  #storage: StorageAccess;\n  #hostname: string;\n\n  constructor({ storage, hostname }: { storage: StorageAccess; hostname: string }) {\n    this.#storage = storage;\n    this.#hostname = hostname;\n  }\n\n  public load(): AnalysisOptions {\n    this.#migrate();\n    const defaults = defaultAnalysisOptions({ hostname: this.#hostname });\n    const storedDryRun = this.#storage.getItem(\"dryRun\");\n    let selectedModels: string[] = [];\n    try {\n      const parsed: unknown = JSON.parse(this.#storage.getItem(\"statiegeld-selected-models\") ?? \"[]\");\n      if (Array.isArray(parsed)) selectedModels = [...new Set(parsed.filter((id): id is string => typeof id === \"string\"))];\n    } catch {\n      selectedModels = [];\n    }\n    return {\n      selectedModels,\n      dryRun: storedDryRun === null ? defaults.dryRun : storedDryRun === \"true\",\n      useCache: (this.#storage.getItem(\"statiegeld-use-cache\") ?? \"true\") === \"true\",\n      temperature: this.#storage.getItem(\"statiegeld-temperature\") ?? \"0\",\n      seed: this.#storage.getItem(\"statiegeld-seed\") ?? \"42\",\n      mockRequiresHumanReview: this.#storage.getItem(\"mockRequiresHumanReview\") === \"true\",\n    };\n  }\n\n  public save({ options }: { options: AnalysisOptions }) {\n    if (!options.selectedModels.length) this.#storage.removeItem(\"statiegeld-selected-models\");\n    else this.#storage.setItem(\"statiegeld-selected-models\", JSON.stringify(options.selectedModels));\n    this.#storage.setItem(\"dryRun\", String(options.dryRun));\n    this.#storage.setItem(\"statiegeld-use-cache\", String(options.useCache));\n    this.#storage.setItem(\"statiegeld-temperature\", options.temperature);\n    this.#storage.setItem(\"statiegeld-seed\", options.seed);\n    this.#storage.setItem(\"mockRequiresHumanReview\", String(options.mockRequiresHumanReview));\n  }\n\n  #migrate() {\n    const parsedVersion = parseInt(this.#storage.getItem(\"statiegeld-storage-version\") ?? \"1\", 10);\n    const version = Number.isFinite(parsedVersion) && parsedVersion >= 1 ? parsedVersion : 1;\n    if (version >= 3) return;\n    // Version 2 dropped the old method choice; version 3 also drops the free prompt override, which no longer exists.\n    this.#storage.removeItem(\"statiegeld-analysis-mode\");\n    this.#storage.removeItem(\"statiegeld-prompt-template\");\n    try {\n      const raw = this.#storage.getItem(\"statiegeldnl-bulk-form\");\n      if (raw) {\n        const parsed: unknown = JSON.parse(raw);\n        if (!parsed || typeof parsed !== \"object\" || Array.isArray(parsed)) throw new Error(\"Invalid stored bulk options\");\n        delete (parsed as Record<string, unknown>).analysisMode;\n        this.#storage.setItem(\"statiegeldnl-bulk-form\", JSON.stringify(parsed));\n      }\n    } catch {\n      this.#storage.removeItem(\"statiegeldnl-bulk-form\");\n    }\n    this.#storage.setItem(\"statiegeld-storage-version\", \"3\");\n  }\n}\n\n/** The stored choice without models the worker no longer offers; nothing left means the worker deployment's default. */\nexport function selectAvailableModels({ options, models, defaultModel }: { options: AnalysisOptions; models: AnalysisModel[]; defaultModel: string }): AnalysisOptions {\n  const kept = options.selectedModels.filter(id => models.some(model => model.id === id));\n  return { ...options, selectedModels: kept.length ? kept : models.some(model => model.id === defaultModel) ? [defaultModel] : [] };\n}\n\nexport function validateAnalysisOptions({ options, models }: { options: AnalysisOptions; models: AnalysisModel[] }): AnalysisOptionErrors {\n  const errors: AnalysisOptionErrors = {};\n  if (!models.some(model => options.selectedModels.includes(model.id))) errors.models = \"Selecteer minstens één beschikbaar model.\";\n  if (options.temperature.trim() && (!Number.isFinite(Number(options.temperature)) || Number(options.temperature) < 0 || Number(options.temperature) > 2)) errors.temperature = \"Vul een getal tussen 0 en 2 in.\";\n  if (options.seed.trim() && !Number.isSafeInteger(Number(options.seed))) errors.seed = \"Vul een geheel getal in of laat de seed leeg.\";\n  return errors;\n}\n\nexport function buildAnalysisRequest({ locationId, options, models }: { locationId: number; options: AnalysisOptions; models: AnalysisModel[] }) {\n  return {\n    locationId,\n    modelIds: models.filter(model => options.selectedModels.includes(model.id)).map(({ id, displayName }) => ({ id, displayName })),\n    dryRun: options.dryRun,\n    useCache: options.useCache,\n    ...(options.temperature.trim() && Number.isFinite(Number(options.temperature)) ? { temperature: Number(options.temperature) } : {}),\n    ...(options.seed.trim() && Number.isSafeInteger(Number(options.seed)) ? { seed: Number(options.seed) } : {}),\n    ...(options.dryRun ? { mockRequiresHumanReview: options.mockRequiresHumanReview } : {}),\n  };\n}\n\nexport function workerActionError(error: unknown): string {\n  const message = error instanceof Error ? error.message : String(error);\n  // AdminRPC's message for a tool the Locata worker no longer offers: written for the admin, shown as is.\n  if (message.startsWith(\"Niet meer beschikbaar: \")) return message;\n  if (/404|endpoint.*ontbreekt|not found/i.test(message)) return \"Deze functie is nog niet beschikbaar. Probeer het later opnieuw of vraag de beheerder om de analyseservice bij te werken.\";\n  if (/geen toegang|unauthorized|401|403/i.test(message)) return \"Je hebt geen toegang tot deze actie. Meld je opnieuw aan of vraag de beheerder om toegang.\";\n  return \"De actie is niet gelukt. Probeer het opnieuw. Blijft dit gebeuren, neem dan contact op met de beheerder.\";\n}\n","import { createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"shell\" }\nconst _hoisted_2 = { class: \"shell__cols\" }\nconst _hoisted_3 = { class: \"shell__content\" }\nconst _hoisted_4 = {\n  ref: \"main\",\n  class: \"shell__main\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createVNode($setup[\"ShellHeader\"], {\n      trail: $setup.trail,\n      signals: $setup.signals,\n      \"signals-unavailable\": $setup.unavailable,\n      now: $setup.now,\n      onToggleSidebar: _cache[0] || (_cache[0] = $event => ($setup.drawerOpen = !$setup.drawerOpen))\n    }, null, 8 /* PROPS */, [\"trail\", \"signals\", \"signals-unavailable\", \"now\"]),\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createVNode($setup[\"Sidebar\"], {\n        collapsed: $setup.collapsed,\n        open: $setup.drawerOpen,\n        \"location-count\": $setup.shellChrome.locationCount.value,\n        counts: $setup.signals?.counts,\n        onToggleCollapsed: $setup.toggleCollapsed\n      }, null, 8 /* PROPS */, [\"collapsed\", \"open\", \"location-count\", \"counts\"]),\n      ($setup.drawerOpen)\n        ? (_openBlock(), _createElementBlock(\"button\", {\n            key: 0,\n            class: \"shell__scrim\",\n            type: \"button\",\n            \"aria-label\": \"Menu sluiten\",\n            onClick: _cache[1] || (_cache[1] = $event => ($setup.drawerOpen = false))\n          }))\n        : _createCommentVNode(\"v-if\", true),\n      _createCommentVNode(\" The tabstrip is the third layer of the kit's shell and belongs to the\\n           content column, next to the rail, not above it. \"),\n      _createElementVNode(\"div\", _hoisted_3, [\n        _createVNode($setup[\"TabStrip\"]),\n        _createElementVNode(\"main\", _hoisted_4, [\n          _renderSlot(_ctx.$slots, \"default\", {}, undefined, true)\n        ], 512 /* NEED_PATCH */)\n      ])\n    ]),\n    _createVNode($setup[\"StatusBar\"], {\n      signals: $setup.signals,\n      \"signals-unavailable\": $setup.unavailable,\n      \"location-count\": $setup.shellChrome.locationCount.value,\n      now: $setup.now\n    }, null, 8 /* PROPS */, [\"signals\", \"signals-unavailable\", \"location-count\", \"now\"])\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/AppShell.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/AppShell.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/AppShell.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/AppShell.vue\";script.__scopeId = \"data-v-5e9f1062\";export default script;","<script setup lang=\"ts\">\nimport { nextTick, onBeforeUnmount, onMounted, ref } from \"vue\";\nimport { startSSOLogin } from \"@webhare/frontend\";\nimport LoginBrand from \"../components/login/LoginBrand.vue\";\nimport LoginCodeInput from \"../components/login/LoginCodeInput.vue\";\nimport Icon from \"../components/icons/Icon.vue\";\nimport Dialog from \"../components/ui/Dialog.vue\";\nimport Button from \"../components/ui/Button.vue\";\nimport { loginApi } from \"../lib/login\";\n\nconst email = ref(\"\");\nconst code = ref(\"\");\nconst step = ref<\"email\" | \"code\">(\"email\");\nconst errorMessage = ref(\"\");\nconst pending = ref(false);\nconst googleProvider = ref(\"\");\nconst microsoftProvider = ref(\"\");\nconst startingSSO = ref(\"\");\nconst microsoftNoticeOpen = ref(false);\nconst development = ref(false);\nconst developmentCode = ref(\"\");\nconst cooldown = ref(0);\nconst emailInput = ref<HTMLInputElement | null>(null);\nconst codeInput = ref<InstanceType<typeof LoginCodeInput> | null>(null);\nlet resendAfter = 0;\nlet timer: ReturnType<typeof setInterval> | undefined;\n\nasync function requestCode() {\n  if (pending.value || startingSSO.value || (step.value === \"code\" && cooldown.value > 0)) return;\n  errorMessage.value = \"\";\n  if (!emailInput.value?.checkValidity() && step.value === \"email\") {\n    errorMessage.value = \"Vul een geldig e-mailadres in.\";\n    emailInput.value?.focus();\n    return;\n  }\n  pending.value = true;\n  try {\n    email.value = email.value.trim();\n    const result = await loginApi.requestCode({ email: email.value });\n    if (!result.success) {\n      errorMessage.value = result.error;\n      return;\n    }\n    code.value = result.code ?? \"\";\n    developmentCode.value = result.code ?? \"\";\n    step.value = \"code\";\n    resendAfter = Date.now() + 60000;\n    cooldown.value = 60;\n  } catch {\n    errorMessage.value = \"De code kon niet worden verstuurd. Controleer je verbinding en probeer het opnieuw.\";\n  } finally {\n    pending.value = false;\n    await nextTick();\n    if (step.value === \"code\") codeInput.value?.focus();\n  }\n}\n\nasync function verifyCode() {\n  if (pending.value || startingSSO.value) return;\n  errorMessage.value = \"\";\n  if (!/^\\d{6}$/.test(code.value)) {\n    errorMessage.value = \"Vul de code van zes cijfers in.\";\n    codeInput.value?.focus();\n    return;\n  }\n  pending.value = true;\n  try {\n    const result = await loginApi.verifyCode({ email: email.value, code: code.value, persistent: true });\n    if (!result.success) {\n      errorMessage.value = result.error;\n      pending.value = false;\n      await nextTick();\n      codeInput.value?.focus();\n      return;\n    }\n    try {\n      localStorage.setItem(\"statiegeldnl.admin.login\", JSON.stringify({ email: email.value }));\n    } catch { /* Preferences are optional when browser storage is unavailable. */ }\n    const form = document.createElement(\"form\");\n    form.method = \"post\";\n    form.action = result.form.action;\n    form.hidden = true;\n    for (const variable of result.form.vars) {\n      const input = document.createElement(\"input\");\n      input.type = \"hidden\";\n      input.name = variable.name;\n      input.value = variable.value;\n      form.append(input);\n    }\n    document.body.append(form);\n    form.submit();\n  } catch {\n    pending.value = false;\n    errorMessage.value = \"Inloggen is niet gelukt. Controleer je verbinding en probeer het opnieuw.\";\n  }\n}\n\nasync function changeEmail() {\n  if (pending.value) return;\n  step.value = \"email\";\n  code.value = \"\";\n  developmentCode.value = \"\";\n  errorMessage.value = \"\";\n  await nextTick();\n  emailInput.value?.focus();\n}\n\n// `startingSSO` draagt de tag van de provider die bezig is, niet een boolean:\n// zo toont precies één knop \"openen...\", terwijl beide knoppen uitgeschakeld staan.\n// De Entra-knop staat er alvast, ook op een server zonder registratie: het is\n// de hoofdroute op het loginscherm van de kit en de klant wil hem zien. Zonder\n// registratie is er niets om naar door te sturen, dus dan zegt een dialoog dat.\nasync function loginWithMicrosoft() {\n  if (!microsoftProvider.value) {\n    microsoftNoticeOpen.value = true;\n    return;\n  }\n  await loginWithSSO(microsoftProvider.value, \"Microsoft Entra ID\");\n}\n\nasync function loginWithSSO(provider: string, label: string) {\n  if (pending.value || startingSSO.value || !provider) return;\n  errorMessage.value = \"\";\n  startingSSO.value = provider;\n  try {\n    await startSSOLogin(provider, { prompt: \"select_account\" });\n  } catch {\n    startingSSO.value = \"\";\n    errorMessage.value = `Inloggen met ${label} is niet gelukt. Probeer het opnieuw of gebruik een e-mailcode.`;\n  }\n}\n\nonMounted(async () => {\n  try {\n    const stored = JSON.parse(localStorage.getItem(\"statiegeldnl.admin.login\") ?? \"null\");\n    if (typeof stored?.email === \"string\") email.value = stored.email;\n  } catch { /* Preferences are optional when browser storage is unavailable. */ }\n  timer = setInterval(() => {\n    cooldown.value = Math.max(0, Math.ceil((resendAfter - Date.now()) / 1000));\n  }, 1000);\n  try {\n    const options = await loginApi.getLoginOptions();\n    googleProvider.value = options.googleProvider ?? \"\";\n    microsoftProvider.value = options.microsoftProvider ?? \"\";\n    if (options.developmentEmail) {\n      development.value = true;\n      if (step.value === \"email\" && !pending.value) email.value = options.developmentEmail;\n    }\n  } catch { /* The optional development prefill does not block sign-in. */ }\n});\n\nonBeforeUnmount(() => clearInterval(timer));\n</script>\n\n<template>\n  <main class=\"login\">\n    <LoginBrand />\n    <div class=\"login__panel\">\n      <div class=\"login__body\">\n        <div class=\"login__content\">\n          <header class=\"login__heading\">\n            <span class=\"eyebrow\">Locata Intelligence Portal</span>\n            <h2 class=\"login__title\">{{ step === \"email\" ? \"Inloggen\" : \"Controleer je e-mail\" }}</h2>\n          </header>\n\n          <template v-if=\"step === 'email'\">\n            <button\n              class=\"login__sso\"\n              type=\"button\"\n              :disabled=\"pending || !!startingSSO\"\n              @click=\"loginWithMicrosoft\"\n            >\n              <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n                <path fill=\"#f25022\" d=\"M2 2h9.5v9.5H2z\" />\n                <path fill=\"#7fba00\" d=\"M12.5 2H22v9.5h-9.5z\" />\n                <path fill=\"#00a4ef\" d=\"M2 12.5h9.5V22H2z\" />\n                <path fill=\"#ffb900\" d=\"M12.5 12.5H22V22h-9.5z\" />\n              </svg>\n              <span>{{ startingSSO && startingSSO === microsoftProvider ? \"Microsoft openen…\" : \"Inloggen met Microsoft Entra ID\" }}</span>\n            </button>\n            <button\n              v-if=\"googleProvider\"\n              class=\"login__sso\"\n              type=\"button\"\n              :disabled=\"pending || !!startingSSO\"\n              @click=\"loginWithSSO(googleProvider, 'Google')\"\n            >\n              <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n                <path fill=\"#4285F4\" d=\"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.07 5.07 0 0 1-2.21 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1Z\" />\n                <path fill=\"#34A853\" d=\"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06a6.5 6.5 0 0 1-6.16-4.53H2.18v2.84A11 11 0 0 0 12 23Z\" />\n                <path fill=\"#FBBC05\" d=\"M5.84 14.09a6.6 6.6 0 0 1 0-4.18V7.07H2.18a11 11 0 0 0 0 9.86l3.66-2.84Z\" />\n                <path fill=\"#EA4335\" d=\"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15A10.98 10.98 0 0 0 12 1 11 11 0 0 0 2.18 7.07l3.66 2.84A6.5 6.5 0 0 1 12 5.38Z\" />\n              </svg>\n              <span>{{ startingSSO && startingSSO === googleProvider ? \"Google openen…\" : \"Inloggen met Google\" }}</span>\n            </button>\n            <div class=\"login__divider\"><span>of met een e-mailcode</span></div>\n          </template>\n\n          <form class=\"login__form\" method=\"post\" novalidate @submit.prevent=\"step === 'email' ? requestCode() : verifyCode()\">\n            <label v-if=\"step === 'email'\" class=\"login__field\">\n              <span class=\"field-label\">E-mailadres</span>\n              <input\n                ref=\"emailInput\"\n                v-model=\"email\"\n                class=\"login__input\"\n                name=\"email\"\n                type=\"email\"\n                autocomplete=\"username\"\n                placeholder=\"jij@organisatie.com\"\n                :disabled=\"pending || !!startingSSO\"\n                :aria-invalid=\"!!errorMessage\"\n                aria-describedby=\"login-message\"\n                required\n              >\n            </label>\n            <template v-else>\n              <p class=\"login__description\">\n                Als <strong>{{ email }}</strong> toegang heeft, ontvang je een code om in te loggen.\n              </p>\n              <button class=\"login__link\" type=\"button\" :disabled=\"pending\" @click=\"changeEmail\">E-mailadres wijzigen</button>\n              <div class=\"login__field\">\n                <span class=\"field-label\">Inlogcode</span>\n                <LoginCodeInput ref=\"codeInput\" v-model=\"code\" :disabled=\"pending\" :error=\"!!errorMessage\" />\n              </div>\n            </template>\n\n            <div id=\"login-message\" class=\"login__message\" aria-live=\"polite\">\n              <p v-if=\"errorMessage\" class=\"login__error\" role=\"alert\">{{ errorMessage }}</p>\n              <p v-else-if=\"developmentCode\" class=\"login__development\">Developmentmodus: code {{ developmentCode }} is ingevuld.</p>\n              <p v-else-if=\"development\" class=\"login__development\">Developmentmodus: e-mailadres is vooraf ingevuld.</p>\n            </div>\n\n            <button class=\"login__submit\" type=\"submit\" :disabled=\"pending || !!startingSSO\">\n              <span>{{ pending ? (step === \"email\" ? \"Code versturen…\" : \"Bezig…\") : (step === \"email\" ? \"Code mailen\" : \"Inloggen\") }}</span>\n              <Icon v-if=\"!pending\" name=\"arrow--right\" :size=\"16\" />\n            </button>\n            <button v-if=\"step === 'code'\" class=\"login__link\" type=\"button\" :disabled=\"pending || cooldown > 0\" @click=\"requestCode\">\n              {{ cooldown > 0 ? `Opnieuw sturen over ${cooldown}s` : \"Code opnieuw sturen\" }}\n            </button>\n          </form>\n\n        </div>\n      </div>\n    </div>\n\n    <Dialog\n      v-model:open=\"microsoftNoticeOpen\"\n      content-class=\"login-dialog\"\n      title=\"Microsoft-login is nog niet ingericht\"\n      :max-width=\"440\"\n    >\n      <p class=\"login__notice\">\n        De knop staat er alvast, maar de koppeling met Microsoft Entra ID is nog niet gemaakt.\n        Log voorlopig in met Google of met een e-mailcode.\n      </p>\n      <template #footer>\n        <Button variant=\"primary\" @click=\"microsoftNoticeOpen = false\">Begrepen</Button>\n      </template>\n    </Dialog>\n  </main>\n</template>\n\n<style>\n/* Het loginscherm volgt het lichte oppervlak van de kit, los van het admin-thema.\n   De dialoog hangt in een portal onder <body> en is daardoor niet met een scoped\n   selector te bereiken, dus staan de tokens hier en niet in het scoped blok. */\n.login,\n.login-dialog {\n  --bg-surface: #ffffff;\n  --bg-inset: #f4f4f5;\n  --fg-1: #010504;\n  --fg-3: #52525b;\n  --border-1: #e4e4e7;\n  --field-line: #a1a1aa;\n  --ring: var(--ink);\n  --primary: var(--ink);\n  --primary-foreground: var(--ink-fg);\n  --danger-bg: #fff1f1;\n  --danger-border: #ffb3b8;\n  --danger-fg: #b81922;\n}\n\n.login-dialog {\n  color-scheme: light;\n}\n</style>\n\n<style scoped>\n@font-face {\n  font-family: \"Nudica\";\n  font-style: normal;\n  font-weight: 400;\n  font-display: swap;\n  src: url(\"../assets/nudica-regular.woff2\") format(\"woff2\");\n}\n.login {\n  --login-panel-padding: 40px 48px;\n  display: grid;\n  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);\n  min-height: 100vh;\n  min-height: 100dvh;\n  background: var(--bg-surface);\n  color: var(--fg-1);\n  color-scheme: light;\n  font-family: \"Nudica\", \"Helvetica Neue\", Arial, sans-serif;\n}\n.login__panel {\n  display: flex;\n  flex-direction: column;\n  min-width: 0;\n  background: var(--bg-surface);\n  border-left: 1px solid var(--border-1);\n}\n.login__body {\n  display: flex;\n  flex: 1;\n  align-items: center;\n  justify-content: center;\n  padding: var(--login-panel-padding);\n}\n.login__content { width: 100%; max-width: 360px; }\n.login__heading { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }\n.login__title {\n  margin: 0;\n  font-size: 28px;\n  font-weight: 400;\n  line-height: 36px;\n  letter-spacing: -0.02em;\n}\n/* Boven de velden, niet onder de knop: een melding onder de submit is op een\n   telefoon makkelijk te missen. */\n.login__error {\n  margin: 0;\n  padding: 8px 12px;\n  background: var(--danger-bg);\n  border: 1px solid var(--danger-border);\n  border-radius: var(--radius);\n  color: var(--danger-fg);\n  font-size: var(--text-caption);\n}\n.login__description { margin: 0; color: var(--fg-3); line-height: 1.5; overflow-wrap: anywhere; }\n.login__description strong { color: var(--fg-1); font-weight: 400; }\n/* Geen gereserveerde hoogte: zonder melding stond er een gat van 72px tussen\n   het veld en de knop. De foutmelding draagt zelf `role=\"alert\"`, dus die wordt\n   ook aangekondigd als deze regel er nog niet stond. */\n.login__message:empty { display: none; }\n.login__development { margin: 0; color: var(--fg-3); font-size: var(--text-caption); line-height: 16px; }\n.login__link { align-self: flex-start; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--fg-3); font: inherit; text-decoration: underline; cursor: pointer; }\n.login__link:hover:not(:disabled) { color: var(--fg-1); }\n.login__link:disabled { opacity: 0.6; cursor: not-allowed; }\n.login__link:focus-visible, .login__submit:focus-visible, .login__sso:focus-visible { outline: 2px solid var(--ring); outline-offset: 4px; }\n.login__sso { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 48px; padding: 12px 16px; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--bg-surface); color: var(--fg-1); font: inherit; cursor: pointer; }\n.login__sso + .login__sso { margin-top: 12px; }\n.login__sso svg { flex: none; }\n.login__sso:hover:not(:disabled) { background: var(--bg-inset); }\n.login__sso:disabled { opacity: 0.6; cursor: not-allowed; }\n.login__divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--fg-3); font-size: var(--text-caption); }\n.login__divider::before, .login__divider::after { content: \"\"; flex: 1; height: 1px; background: var(--border-1); }\n.login__input[aria-invalid=\"true\"] { border-bottom-color: var(--danger-fg); }\n/* Een tekstveld draagt alleen een onderlijn, dus markeert focus die lijn in plaats\n   van er een kader omheen te zetten: de box-shadow verdubbelt hem naar 2px zwart\n   zonder de regel te verschuiven. De 2px inktring uit frontend.scss blijft wel op\n   knoppen en links staan, waar geen lijn is om te verzwaren. */\n.login__input:focus-visible {\n  outline: none;\n  border-bottom-color: var(--fg-1);\n  box-shadow: 0 1px 0 var(--fg-1);\n}\n.login__notice { margin: 0; color: var(--fg-3); line-height: 1.5; }\n.login__form { display: flex; flex-direction: column; gap: 20px; }\n.login__field { display: flex; flex-direction: column; gap: 8px; }\n.login__input {\n  width: 100%;\n  min-width: 0;\n  height: 48px;\n  padding: 0 16px 0 0;\n  border: 0;\n  border-bottom: 1px solid var(--field-line);\n  border-radius: var(--radius) var(--radius) 0 0;\n  background: var(--bg-surface);\n  color: var(--fg-1);\n  font: inherit;\n}\n.login__submit {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  height: 48px;\n  padding: 0 16px;\n  border: 0;\n  border-radius: var(--radius);\n  background: var(--brand);\n  color: var(--brand-fg);\n  font: inherit;\n  cursor: pointer;\n}\n@media (hover: hover) {\n  .login__submit:hover:not(:disabled) { background: var(--brand-hover); }\n}\n.login__submit:disabled { cursor: not-allowed; opacity: 0.6; }\n@media (max-width: 1079px) {\n  .login {\n    --login-panel-padding: 24px 20px;\n    grid-template-columns: minmax(0, 1fr);\n    grid-template-rows: repeat(2, minmax(50vh, 1fr));\n    grid-template-rows: repeat(2, minmax(50dvh, 1fr));\n  }\n  .login__panel { border-left: 0; }\n  .login__body { align-items: flex-start; }\n  .login__content { max-width: none; }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { onBeforeUnmount, onMounted, ref } from \"vue\";\n\nconst canvas = ref<HTMLCanvasElement | null>(null);\nlet dispose = () => {};\n\n// Original Locata kit shader, rendered directly without the Three.js scene wrapper.\nconst fragmentSource = [\n  \"#define TWO_PI 6.2831853072\",\n  \"#define PI 3.14159265359\",\n  \"precision highp float;\",\n  \"uniform vec2 resolution;\",\n  \"uniform float time;\",\n  \"float random(in float x){return fract(sin(x)*1e4);}\",\n  \"float random(vec2 st){return fract(sin(dot(st.xy,vec2(12.9898,78.233)))*43758.5453123);}\",\n  \"void main(void){\",\n  \"vec2 uv=(gl_FragCoord.xy*2.0-resolution.xy)/min(resolution.x,resolution.y);\",\n  \"vec2 fMosaicScal=vec2(4.0,2.0);\",\n  \"vec2 vScreenSize=vec2(256.0,256.0);\",\n  \"uv.x=floor(uv.x*vScreenSize.x/fMosaicScal.x)/(vScreenSize.x/fMosaicScal.x);\",\n  \"uv.y=floor(uv.y*vScreenSize.y/fMosaicScal.y)/(vScreenSize.y/fMosaicScal.y);\",\n  \"float t=time*0.06+random(uv.x)*0.4;\",\n  \"float lineWidth=0.0008;\",\n  \"vec3 color=vec3(0.0);\",\n  \"for(int j=0;j<3;j++){\",\n  \"for(int i=0;i<5;i++){\",\n  \"color[j]+=lineWidth*float(i*i)/abs(fract(t-0.01*float(j)+float(i)*0.01)*1.0-length(uv));\",\n  \"}\",\n  \"}\",\n  \"float intensity=(color[0]+color[1]+color[2])/3.0;\",\n  \"vec3 green=vec3(0.0,0.9,0.6);\",\n  \"vec3 cyan=vec3(0.49,0.98,1.0);\",\n  \"vec3 finalColor=mix(green*intensity*1.4,cyan*intensity*0.6,0.25);\",\n  \"gl_FragColor=vec4(finalColor,1.0);\",\n  \"}\",\n].join(\"\\n\");\n\nonMounted(() => {\n  const element = canvas.value;\n  const gl = element?.getContext(\"webgl\", { antialias: false, alpha: false });\n  if (!element || !gl) return;\n  const vertex = gl.createShader(gl.VERTEX_SHADER);\n  const fragment = gl.createShader(gl.FRAGMENT_SHADER);\n  const program = gl.createProgram();\n  const buffer = gl.createBuffer();\n  const release = () => {\n    gl.deleteBuffer(buffer);\n    gl.deleteProgram(program);\n    gl.deleteShader(vertex);\n    gl.deleteShader(fragment);\n  };\n  if (!vertex || !fragment || !program || !buffer) { release(); return; }\n  gl.shaderSource(vertex, \"attribute vec2 position; void main(){gl_Position=vec4(position,0.0,1.0);}\");\n  gl.shaderSource(fragment, fragmentSource);\n  gl.compileShader(vertex);\n  gl.compileShader(fragment);\n  if (!gl.getShaderParameter(vertex, gl.COMPILE_STATUS) || !gl.getShaderParameter(fragment, gl.COMPILE_STATUS)) {\n    console.warn(\"Locata background shader could not compile.\");\n    release();\n    return;\n  }\n  gl.attachShader(program, vertex);\n  gl.attachShader(program, fragment);\n  gl.linkProgram(program);\n  if (!gl.getProgramParameter(program, gl.LINK_STATUS)) { release(); return; }\n  gl.useProgram(program);\n  gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n  gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 3, -1, -1, 3]), gl.STATIC_DRAW);\n  const position = gl.getAttribLocation(program, \"position\");\n  gl.enableVertexAttribArray(position);\n  gl.vertexAttribPointer(position, 2, gl.FLOAT, false, 0, 0);\n  const resolution = gl.getUniformLocation(program, \"resolution\");\n  const time = gl.getUniformLocation(program, \"time\");\n  const reducedMotion = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n  let frame = 0;\n  let previousTime = 0;\n  let elapsed = 1;\n  let visible = true;\n\n  const draw = () => {\n    gl.viewport(0, 0, element.width, element.height);\n    gl.uniform2f(resolution, element.width, element.height);\n    gl.uniform1f(time, elapsed);\n    gl.drawArrays(gl.TRIANGLES, 0, 3);\n  };\n  const tick = (now: number) => {\n    if (previousTime) elapsed += Math.min(now - previousTime, 100) * 0.003;\n    previousTime = now;\n    draw();\n    frame = requestAnimationFrame(tick);\n  };\n  const updateAnimation = () => {\n    cancelAnimationFrame(frame);\n    previousTime = 0;\n    draw();\n    if (!reducedMotion.matches && !document.hidden && visible) frame = requestAnimationFrame(tick);\n  };\n  const resize = () => {\n    const bounds = element.getBoundingClientRect();\n    const ratio = Math.min(window.devicePixelRatio, 2);\n    element.width = Math.max(1, Math.round(bounds.width * ratio));\n    element.height = Math.max(1, Math.round(bounds.height * ratio));\n    draw();\n  };\n  const observer = new ResizeObserver(resize);\n  observer.observe(element);\n  const visibility = new IntersectionObserver(([entry]) => {\n    visible = entry.isIntersecting;\n    updateAnimation();\n  });\n  visibility.observe(element);\n  reducedMotion.addEventListener(\"change\", updateAnimation);\n  document.addEventListener(\"visibilitychange\", updateAnimation);\n  resize();\n  updateAnimation();\n  dispose = () => {\n    cancelAnimationFrame(frame);\n    observer.disconnect();\n    visibility.disconnect();\n    reducedMotion.removeEventListener(\"change\", updateAnimation);\n    document.removeEventListener(\"visibilitychange\", updateAnimation);\n    release();\n  };\n});\n\nonBeforeUnmount(() => dispose());\n</script>\n\n<template>\n  <canvas ref=\"canvas\" class=\"login-shader\" aria-hidden=\"true\" />\n</template>\n\n<style scoped>\n.login-shader {\n  position: absolute;\n  inset: 0;\n  display: block;\n  width: 100%;\n  height: 100%;\n  pointer-events: none;\n}\n</style>\n","import { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n  ref: \"canvas\",\n  class: \"login-shader\",\n  \"aria-hidden\": \"true\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"canvas\", _hoisted_1, null, 512 /* NEED_PATCH */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginShader.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginShader.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginShader.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginShader.vue\";script.__scopeId = \"data-v-373091f7\";export default script;","import { createVNode as _createVNode, createElementVNode as _createElementVNode, createStaticVNode as _createStaticVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n  class: \"login-brand\",\n  \"aria-labelledby\": \"login-brand-title\"\n}\nconst _hoisted_2 = [\"src\"]\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"section\", _hoisted_1, [\n    _createVNode($setup[\"LoginShader\"]),\n    _cache[0] || (_cache[0] = _createElementVNode(\"span\", {\n      class: \"login-brand__shade\",\n      \"aria-hidden\": \"true\"\n    }, null, -1 /* CACHED */)),\n    _createElementVNode(\"img\", {\n      class: \"login-brand__logo\",\n      src: $setup.logoUrl,\n      alt: \"Locata\",\n      height: \"22\"\n    }, null, 8 /* PROPS */, _hoisted_2),\n    _cache[1] || (_cache[1] = _createStaticVNode(\"<div class=\\\"login-brand__content\\\" data-v-13d98b04><span class=\\\"eyebrow login-brand__eyebrow\\\" data-v-13d98b04>AI-powered Location Intelligence</span><h1 id=\\\"login-brand-title\\\" class=\\\"login-brand__title\\\" data-v-13d98b04> Locata brengt geografische data, AI en context samen in één intelligent besluitvormingsproces. </h1><p class=\\\"login-brand__description\\\" data-v-13d98b04> AI verrijkt ruwe data met contextuele inzichten, waardoor locaties niet alleen worden beoordeeld op feiten, maar ook op hun omgeving en betekenis. </p></div><span class=\\\"login-brand__footer\\\" data-v-13d98b04>EU-dataresidentie · AVG-conform</span>\", 2))\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginBrand.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginBrand.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginBrand.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginBrand.vue\";script.__scopeId = \"data-v-13d98b04\";export default script;","<script setup lang=\"ts\">\nimport { ref, watch } from \"vue\";\n\nconst props = defineProps<{ modelValue: string; disabled?: boolean; error?: boolean }>();\nconst emit = defineEmits<{ \"update:modelValue\": [value: string] }>();\nconst cells = ref<string[]>(Array(6).fill(\"\"));\nconst inputs = ref<HTMLInputElement[]>([]);\n\nwatch(() => props.modelValue, value => {\n  if (value === cells.value.join(\"\")) return;\n  const digits = value.replace(/\\D/g, \"\").slice(0, 6);\n  cells.value = Array.from({ length: 6 }, (_, index) => digits[index] ?? \"\");\n}, { immediate: true });\n\nfunction focusCell(index: number) {\n  inputs.value[index]?.focus();\n  inputs.value[index]?.select();\n}\n\nfunction focus() {\n  const empty = cells.value.findIndex(cell => !cell);\n  focusCell(empty < 0 ? 0 : empty);\n}\n\nfunction pasteDigits(text: string) {\n  const digits = text.replace(/\\D/g, \"\").slice(0, 6);\n  if (!digits) return;\n  cells.value = Array.from({ length: 6 }, (_, index) => digits[index] ?? \"\");\n  emit(\"update:modelValue\", cells.value.join(\"\"));\n  focusCell(Math.min(digits.length, 5));\n}\n\nfunction onInput({ index, event }: { index: number; event: Event }) {\n  const input = event.target as HTMLInputElement;\n  const digits = input.value.replace(/\\D/g, \"\");\n  if (digits.length > 1) {\n    pasteDigits(digits);\n    return;\n  }\n  cells.value[index] = digits;\n  input.value = digits;\n  emit(\"update:modelValue\", cells.value.join(\"\"));\n  if (digits && index < 5) focusCell(index + 1);\n}\n\nfunction onKeydown({ index, event }: { index: number; event: KeyboardEvent }) {\n  if (event.key === \"Backspace\" && !cells.value[index] && index > 0) {\n    event.preventDefault();\n    cells.value[index - 1] = \"\";\n    emit(\"update:modelValue\", cells.value.join(\"\"));\n    focusCell(index - 1);\n  } else if (event.key === \"ArrowLeft\" && index > 0) {\n    event.preventDefault();\n    focusCell(index - 1);\n  } else if (event.key === \"ArrowRight\" && index < 5) {\n    event.preventDefault();\n    focusCell(index + 1);\n  }\n}\n\ndefineExpose({ focus });\n</script>\n\n<template>\n  <div class=\"login-code\" role=\"group\" aria-label=\"Inlogcode van zes cijfers\" @paste.prevent=\"pasteDigits($event.clipboardData?.getData('text') ?? '')\">\n    <input\n      v-for=\"(cell, index) in cells\"\n      :key=\"index\"\n      :ref=\"element => { if (element) inputs[index] = element as HTMLInputElement; }\"\n      class=\"login-code__cell\"\n      type=\"text\"\n      inputmode=\"numeric\"\n      :autocomplete=\"index === 0 ? 'one-time-code' : 'off'\"\n      :maxlength=\"index === 0 ? 6 : 1\"\n      :aria-label=\"`Cijfer ${index + 1}`\"\n      :aria-invalid=\"!!error\"\n      aria-describedby=\"login-message\"\n      :disabled=\"disabled\"\n      :value=\"cell\"\n      @input=\"onInput({ index, event: $event })\"\n      @keydown=\"onKeydown({ index, event: $event })\"\n      @focus=\"($event.target as HTMLInputElement).select()\"\n    >\n  </div>\n</template>\n\n<style scoped>\n.login-code { display: flex; gap: 8px; }\n.login-code__cell {\n  flex: 1;\n  width: 0;\n  min-width: 0;\n  height: 48px;\n  padding: 0;\n  border: 1px solid var(--field-line);\n  border-radius: var(--radius);\n  background: var(--bg-surface);\n  color: var(--fg-1);\n  font: inherit;\n  font-size: 24px;\n  font-variant-numeric: tabular-nums;\n  text-align: center;\n}\n.login-code__cell:focus { outline: 2px solid var(--ring); outline-offset: 2px; }\n.login-code__cell[aria-invalid=\"true\"] { border-color: var(--danger-fg); }\n.login-code__cell:disabled { opacity: 0.6; cursor: not-allowed; }\n@media (max-width: 359px) {\n  .login-code { gap: 3px; }\n}\n</style>\n","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, withModifiers as _withModifiers } from \"vue\"\n\nconst _hoisted_1 = [\"autocomplete\", \"maxlength\", \"aria-label\", \"aria-invalid\", \"disabled\", \"value\", \"onInput\", \"onKeydown\"]\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", {\n    class: \"login-code\",\n    role: \"group\",\n    \"aria-label\": \"Inlogcode van zes cijfers\",\n    onPaste: _cache[1] || (_cache[1] = _withModifiers($event => ($setup.pasteDigits($event.clipboardData?.getData('text') ?? '')), [\"prevent\"]))\n  }, [\n    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.cells, (cell, index) => {\n      return (_openBlock(), _createElementBlock(\"input\", {\n        key: index,\n        ref_for: true,\n        ref: element => { if (element) $setup.inputs[index] = element as HTMLInputElement; },\n        class: \"login-code__cell\",\n        type: \"text\",\n        inputmode: \"numeric\",\n        autocomplete: index === 0 ? 'one-time-code' : 'off',\n        maxlength: index === 0 ? 6 : 1,\n        \"aria-label\": `Cijfer ${index + 1}`,\n        \"aria-invalid\": !!$props.error,\n        \"aria-describedby\": \"login-message\",\n        disabled: $props.disabled,\n        value: cell,\n        onInput: $event => ($setup.onInput({ index, event: $event })),\n        onKeydown: $event => ($setup.onKeydown({ index, event: $event })),\n        onFocus: _cache[0] || (_cache[0] = $event => (($event.target as HTMLInputElement).select()))\n      }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_1))\n    }), 128 /* KEYED_FRAGMENT */))\n  ], 32 /* NEED_HYDRATION */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginCodeInput.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginCodeInput.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginCodeInput.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/login/LoginCodeInput.vue\";script.__scopeId = \"data-v-9ec46bc3\";export default script;","<template>\n  <DialogRoot :open=\"open\" @update:open=\"onOpenChange\">\n    <DialogPortal>\n      <DialogOverlay :class=\"['dlg__overlay', contentClass]\" />\n      <DialogContent :class=\"['dlg', contentClass]\" :style=\"{ maxWidth: `${maxWidth}px` }\">\n        <header class=\"dlg__head\">\n          <div class=\"dlg__text\">\n            <DialogTitle class=\"page-title\">{{ title }}</DialogTitle>\n            <DialogDescription v-if=\"description\" class=\"dlg__desc\">{{ description }}</DialogDescription>\n          </div>\n          <DialogClose class=\"dlg__close\" aria-label=\"Sluiten\">\n            <Icon name=\"close\" />\n          </DialogClose>\n        </header>\n        <div class=\"dlg__body\">\n          <slot />\n        </div>\n        <footer v-if=\"$slots.footer\" class=\"dlg__foot\">\n          <slot name=\"footer\" />\n        </footer>\n      </DialogContent>\n    </DialogPortal>\n  </DialogRoot>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n  DialogClose,\n  DialogContent,\n  DialogDescription,\n  DialogOverlay,\n  DialogPortal,\n  DialogRoot,\n  DialogTitle,\n} from \"reka-ui\";\nimport Icon from \"../icons/Icon.vue\";\n\n// Modal dialog, controlled through `v-model:open`. Focus trap, Escape and the\n// click-outside come from reka-ui; this file only draws the kit: an ink\n// overlay at 50%, a centered hairline surface, the title in page-title size\n// and a close button top right. Footer buttons go in the `footer` slot.\n//\n// `contentClass` lands on the portalled overlay and surface. The portal hangs\n// under <body>, so a caller that runs on its own palette (the login screen is\n// always light, whatever the theme) cannot reach the dialog from its scoped\n// styles and needs a class it can target from a global rule.\nwithDefaults(defineProps<{\n  open: boolean;\n  title: string;\n  description?: string;\n  maxWidth?: number;\n  contentClass?: string;\n}>(), { maxWidth: 520 });\n\nconst emit = defineEmits<{ \"update:open\": [value: boolean] }>();\n\nfunction onOpenChange(value: boolean) {\n  emit(\"update:open\", value);\n}\n</script>\n\n<style scoped>\n.dlg__overlay {\n  position: fixed;\n  inset: 0;\n  z-index: 50;\n  background: rgba(1, 5, 4, 0.5);\n}\n\n.dlg {\n  position: fixed;\n  top: 50%;\n  left: 50%;\n  z-index: 50;\n  display: flex;\n  flex-direction: column;\n  width: calc(100% - 32px);\n  max-height: calc(100vh - 32px);\n  transform: translate(-50%, -50%);\n  border: 1px solid var(--border-1);\n  border-radius: var(--radius);\n  background: var(--bg-surface);\n  color: var(--fg-1);\n  box-shadow: 0 8px 24px rgba(1, 5, 4, 0.24);\n  outline: none;\n}\n\n.dlg__head {\n  display: flex;\n  align-items: flex-start;\n  justify-content: space-between;\n  gap: 16px;\n  padding: 16px 16px 12px;\n}\n\n.dlg__text {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n  min-width: 0;\n}\n\n.dlg__desc {\n  margin: 0;\n  font-size: var(--text-caption);\n  color: var(--fg-3);\n}\n\n.dlg__close {\n  display: inline-flex;\n  flex: none;\n  align-items: center;\n  justify-content: center;\n  width: 32px;\n  height: 32px;\n  margin: -8px -8px 0 0;\n  border: 0;\n  border-radius: var(--radius);\n  background: transparent;\n  color: var(--fg-3);\n  cursor: pointer;\n}\n\n.dlg__body {\n  flex: 1;\n  min-height: 0;\n  overflow-y: auto;\n  padding: 0 16px 16px;\n}\n\n.dlg__foot {\n  display: flex;\n  justify-content: flex-end;\n  gap: 8px;\n  padding: 12px 16px;\n  border-top: 1px solid var(--border-1);\n}\n\n@media (hover: hover) {\n  .dlg__close:hover {\n    background: var(--bg-inset);\n    color: var(--fg-1);\n  }\n}\n</style>\n","import { normalizeClass as _normalizeClass, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, renderSlot as _renderSlot, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle } from \"vue\"\n\nconst _hoisted_1 = { class: \"dlg__head\" }\nconst _hoisted_2 = { class: \"dlg__text\" }\nconst _hoisted_3 = { class: \"dlg__body\" }\nconst _hoisted_4 = {\n  key: 0,\n  class: \"dlg__foot\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createBlock($setup[\"DialogRoot\"], {\n    open: $props.open,\n    \"onUpdate:open\": $setup.onOpenChange\n  }, {\n    default: _withCtx(() => [\n      _createVNode($setup[\"DialogPortal\"], null, {\n        default: _withCtx(() => [\n          _createVNode($setup[\"DialogOverlay\"], {\n            class: _normalizeClass(['dlg__overlay', $props.contentClass])\n          }, null, 8 /* PROPS */, [\"class\"]),\n          _createVNode($setup[\"DialogContent\"], {\n            class: _normalizeClass(['dlg', $props.contentClass]),\n            style: _normalizeStyle({ maxWidth: `${$props.maxWidth}px` })\n          }, {\n            default: _withCtx(() => [\n              _createElementVNode(\"header\", _hoisted_1, [\n                _createElementVNode(\"div\", _hoisted_2, [\n                  _createVNode($setup[\"DialogTitle\"], { class: \"page-title\" }, {\n                    default: _withCtx(() => [\n                      _createTextVNode(_toDisplayString($props.title), 1 /* TEXT */)\n                    ]),\n                    _: 1 /* STABLE */\n                  }),\n                  ($props.description)\n                    ? (_openBlock(), _createBlock($setup[\"DialogDescription\"], {\n                        key: 0,\n                        class: \"dlg__desc\"\n                      }, {\n                        default: _withCtx(() => [\n                          _createTextVNode(_toDisplayString($props.description), 1 /* TEXT */)\n                        ]),\n                        _: 1 /* STABLE */\n                      }))\n                    : _createCommentVNode(\"v-if\", true)\n                ]),\n                _createVNode($setup[\"DialogClose\"], {\n                  class: \"dlg__close\",\n                  \"aria-label\": \"Sluiten\"\n                }, {\n                  default: _withCtx(() => [\n                    _createVNode($setup[\"Icon\"], { name: \"close\" })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _createElementVNode(\"div\", _hoisted_3, [\n                _renderSlot(_ctx.$slots, \"default\", {}, undefined, true)\n              ]),\n              (_ctx.$slots.footer)\n                ? (_openBlock(), _createElementBlock(\"footer\", _hoisted_4, [\n                    _renderSlot(_ctx.$slots, \"footer\", {}, undefined, true)\n                  ]))\n                : _createCommentVNode(\"v-if\", true)\n            ]),\n            _: 3 /* FORWARDED */\n          }, 8 /* PROPS */, [\"class\", \"style\"])\n        ]),\n        _: 3 /* FORWARDED */\n      })\n    ]),\n    _: 3 /* FORWARDED */\n  }, 8 /* PROPS */, [\"open\"]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Dialog.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Dialog.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Dialog.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Dialog.vue\";script.__scopeId = \"data-v-a394dd5a\";export default script;","import { openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"type\", \"disabled\"]\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"button\", {\n    class: _normalizeClass([\"btn\", [`btn--${$props.variant}`, { 'btn--busy': $props.busy }]]),\n    type: $props.type,\n    disabled: $props.disabled || $props.busy\n  }, [\n    ($props.busy)\n      ? (_openBlock(), _createBlock($setup[\"Icon\"], {\n          key: 0,\n          name: \"circle-dash\",\n          class: \"btn__spinner\"\n        }))\n      : _createCommentVNode(\"v-if\", true),\n    _renderSlot(_ctx.$slots, \"default\", {}, undefined, true)\n  ], 10 /* CLASS, PROPS */, _hoisted_1))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Button.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Button.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Button.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Button.vue\";script.__scopeId = \"data-v-2b8bb293\";export default script;","import { rpc as createRpcClient, type OmitRPCContextArgs } from \"@webhare/rpc\";\nimport type { AdminLoginRPC } from \"@mod-statiegeldnl/js/admin-login-rpc\";\n\nexport const loginApi = createRpcClient<OmitRPCContextArgs<typeof AdminLoginRPC>>(\"statiegeldnl:admin_login\", {\n  baseUrl: location.origin,\n});\n","import { createVNode as _createVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, Fragment as _Fragment, vModelText as _vModelText, withDirectives as _withDirectives, createTextVNode as _createTextVNode, createBlock as _createBlock, withModifiers as _withModifiers, withCtx as _withCtx, createStaticVNode as _createStaticVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"login\" }\nconst _hoisted_2 = { class: \"login__panel\" }\nconst _hoisted_3 = { class: \"login__body\" }\nconst _hoisted_4 = { class: \"login__content\" }\nconst _hoisted_5 = { class: \"login__heading\" }\nconst _hoisted_6 = { class: \"login__title\" }\nconst _hoisted_7 = [\"disabled\"]\nconst _hoisted_8 = [\"disabled\"]\nconst _hoisted_9 = {\n  key: 0,\n  class: \"login__field\"\n}\nconst _hoisted_10 = [\"disabled\", \"aria-invalid\"]\nconst _hoisted_11 = { class: \"login__description\" }\nconst _hoisted_12 = [\"disabled\"]\nconst _hoisted_13 = { class: \"login__field\" }\nconst _hoisted_14 = {\n  id: \"login-message\",\n  class: \"login__message\",\n  \"aria-live\": \"polite\"\n}\nconst _hoisted_15 = {\n  key: 0,\n  class: \"login__error\",\n  role: \"alert\"\n}\nconst _hoisted_16 = {\n  key: 1,\n  class: \"login__development\"\n}\nconst _hoisted_17 = {\n  key: 2,\n  class: \"login__development\"\n}\nconst _hoisted_18 = [\"disabled\"]\nconst _hoisted_19 = [\"disabled\"]\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"main\", _hoisted_1, [\n    _createVNode($setup[\"LoginBrand\"]),\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createElementVNode(\"div\", _hoisted_3, [\n        _createElementVNode(\"div\", _hoisted_4, [\n          _createElementVNode(\"header\", _hoisted_5, [\n            _cache[6] || (_cache[6] = _createElementVNode(\"span\", { class: \"eyebrow\" }, \"Locata Intelligence Portal\", -1 /* CACHED */)),\n            _createElementVNode(\"h2\", _hoisted_6, _toDisplayString($setup.step === \"email\" ? \"Inloggen\" : \"Controleer je e-mail\"), 1 /* TEXT */)\n          ]),\n          ($setup.step === 'email')\n            ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                _createElementVNode(\"button\", {\n                  class: \"login__sso\",\n                  type: \"button\",\n                  disabled: $setup.pending || !!$setup.startingSSO,\n                  onClick: $setup.loginWithMicrosoft\n                }, [\n                  _cache[7] || (_cache[7] = _createStaticVNode(\"<svg width=\\\"18\\\" height=\\\"18\\\" viewBox=\\\"0 0 24 24\\\" aria-hidden=\\\"true\\\" data-v-dac7ed46><path fill=\\\"#f25022\\\" d=\\\"M2 2h9.5v9.5H2z\\\" data-v-dac7ed46></path><path fill=\\\"#7fba00\\\" d=\\\"M12.5 2H22v9.5h-9.5z\\\" data-v-dac7ed46></path><path fill=\\\"#00a4ef\\\" d=\\\"M2 12.5h9.5V22H2z\\\" data-v-dac7ed46></path><path fill=\\\"#ffb900\\\" d=\\\"M12.5 12.5H22V22h-9.5z\\\" data-v-dac7ed46></path></svg>\", 1)),\n                  _createElementVNode(\"span\", null, _toDisplayString($setup.startingSSO && $setup.startingSSO === $setup.microsoftProvider ? \"Microsoft openen…\" : \"Inloggen met Microsoft Entra ID\"), 1 /* TEXT */)\n                ], 8 /* PROPS */, _hoisted_7),\n                ($setup.googleProvider)\n                  ? (_openBlock(), _createElementBlock(\"button\", {\n                      key: 0,\n                      class: \"login__sso\",\n                      type: \"button\",\n                      disabled: $setup.pending || !!$setup.startingSSO,\n                      onClick: _cache[0] || (_cache[0] = $event => ($setup.loginWithSSO($setup.googleProvider, 'Google')))\n                    }, [\n                      _cache[8] || (_cache[8] = _createStaticVNode(\"<svg width=\\\"18\\\" height=\\\"18\\\" viewBox=\\\"0 0 24 24\\\" aria-hidden=\\\"true\\\" data-v-dac7ed46><path fill=\\\"#4285F4\\\" d=\\\"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.07 5.07 0 0 1-2.21 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1Z\\\" data-v-dac7ed46></path><path fill=\\\"#34A853\\\" d=\\\"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06a6.5 6.5 0 0 1-6.16-4.53H2.18v2.84A11 11 0 0 0 12 23Z\\\" data-v-dac7ed46></path><path fill=\\\"#FBBC05\\\" d=\\\"M5.84 14.09a6.6 6.6 0 0 1 0-4.18V7.07H2.18a11 11 0 0 0 0 9.86l3.66-2.84Z\\\" data-v-dac7ed46></path><path fill=\\\"#EA4335\\\" d=\\\"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15A10.98 10.98 0 0 0 12 1 11 11 0 0 0 2.18 7.07l3.66 2.84A6.5 6.5 0 0 1 12 5.38Z\\\" data-v-dac7ed46></path></svg>\", 1)),\n                      _createElementVNode(\"span\", null, _toDisplayString($setup.startingSSO && $setup.startingSSO === $setup.googleProvider ? \"Google openen…\" : \"Inloggen met Google\"), 1 /* TEXT */)\n                    ], 8 /* PROPS */, _hoisted_8))\n                  : _createCommentVNode(\"v-if\", true),\n                _cache[9] || (_cache[9] = _createElementVNode(\"div\", { class: \"login__divider\" }, [\n                  _createElementVNode(\"span\", null, \"of met een e-mailcode\")\n                ], -1 /* CACHED */))\n              ], 64 /* STABLE_FRAGMENT */))\n            : _createCommentVNode(\"v-if\", true),\n          _createElementVNode(\"form\", {\n            class: \"login__form\",\n            method: \"post\",\n            novalidate: \"\",\n            onSubmit: _cache[3] || (_cache[3] = _withModifiers($event => ($setup.step === 'email' ? $setup.requestCode() : $setup.verifyCode()), [\"prevent\"]))\n          }, [\n            ($setup.step === 'email')\n              ? (_openBlock(), _createElementBlock(\"label\", _hoisted_9, [\n                  _cache[10] || (_cache[10] = _createElementVNode(\"span\", { class: \"field-label\" }, \"E-mailadres\", -1 /* CACHED */)),\n                  _withDirectives(_createElementVNode(\"input\", {\n                    ref: \"emailInput\",\n                    \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => (($setup.email) = $event)),\n                    class: \"login__input\",\n                    name: \"email\",\n                    type: \"email\",\n                    autocomplete: \"username\",\n                    placeholder: \"jij@organisatie.com\",\n                    disabled: $setup.pending || !!$setup.startingSSO,\n                    \"aria-invalid\": !!$setup.errorMessage,\n                    \"aria-describedby\": \"login-message\",\n                    required: \"\"\n                  }, null, 8 /* PROPS */, _hoisted_10), [\n                    [_vModelText, $setup.email]\n                  ])\n                ]))\n              : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n                  _createElementVNode(\"p\", _hoisted_11, [\n                    _cache[11] || (_cache[11] = _createTextVNode(\" Als \", -1 /* CACHED */)),\n                    _createElementVNode(\"strong\", null, _toDisplayString($setup.email), 1 /* TEXT */),\n                    _cache[12] || (_cache[12] = _createTextVNode(\" toegang heeft, ontvang je een code om in te loggen. \", -1 /* CACHED */))\n                  ]),\n                  _createElementVNode(\"button\", {\n                    class: \"login__link\",\n                    type: \"button\",\n                    disabled: $setup.pending,\n                    onClick: $setup.changeEmail\n                  }, \"E-mailadres wijzigen\", 8 /* PROPS */, _hoisted_12),\n                  _createElementVNode(\"div\", _hoisted_13, [\n                    _cache[13] || (_cache[13] = _createElementVNode(\"span\", { class: \"field-label\" }, \"Inlogcode\", -1 /* CACHED */)),\n                    _createVNode($setup[\"LoginCodeInput\"], {\n                      ref: \"codeInput\",\n                      modelValue: $setup.code,\n                      \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => (($setup.code) = $event)),\n                      disabled: $setup.pending,\n                      error: !!$setup.errorMessage\n                    }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\", \"error\"])\n                  ])\n                ], 64 /* STABLE_FRAGMENT */)),\n            _createElementVNode(\"div\", _hoisted_14, [\n              ($setup.errorMessage)\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_15, _toDisplayString($setup.errorMessage), 1 /* TEXT */))\n                : ($setup.developmentCode)\n                  ? (_openBlock(), _createElementBlock(\"p\", _hoisted_16, \"Developmentmodus: code \" + _toDisplayString($setup.developmentCode) + \" is ingevuld.\", 1 /* TEXT */))\n                  : ($setup.development)\n                    ? (_openBlock(), _createElementBlock(\"p\", _hoisted_17, \"Developmentmodus: e-mailadres is vooraf ingevuld.\"))\n                    : _createCommentVNode(\"v-if\", true)\n            ]),\n            _createElementVNode(\"button\", {\n              class: \"login__submit\",\n              type: \"submit\",\n              disabled: $setup.pending || !!$setup.startingSSO\n            }, [\n              _createElementVNode(\"span\", null, _toDisplayString($setup.pending ? ($setup.step === \"email\" ? \"Code versturen…\" : \"Bezig…\") : ($setup.step === \"email\" ? \"Code mailen\" : \"Inloggen\")), 1 /* TEXT */),\n              (!$setup.pending)\n                ? (_openBlock(), _createBlock($setup[\"Icon\"], {\n                    key: 0,\n                    name: \"arrow--right\",\n                    size: 16\n                  }))\n                : _createCommentVNode(\"v-if\", true)\n            ], 8 /* PROPS */, _hoisted_18),\n            ($setup.step === 'code')\n              ? (_openBlock(), _createElementBlock(\"button\", {\n                  key: 2,\n                  class: \"login__link\",\n                  type: \"button\",\n                  disabled: $setup.pending || $setup.cooldown > 0,\n                  onClick: $setup.requestCode\n                }, _toDisplayString($setup.cooldown > 0 ? `Opnieuw sturen over ${$setup.cooldown}s` : \"Code opnieuw sturen\"), 9 /* TEXT, PROPS */, _hoisted_19))\n              : _createCommentVNode(\"v-if\", true)\n          ], 32 /* NEED_HYDRATION */)\n        ])\n      ])\n    ]),\n    _createVNode($setup[\"Dialog\"], {\n      open: $setup.microsoftNoticeOpen,\n      \"onUpdate:open\": _cache[5] || (_cache[5] = $event => (($setup.microsoftNoticeOpen) = $event)),\n      \"content-class\": \"login-dialog\",\n      title: \"Microsoft-login is nog niet ingericht\",\n      \"max-width\": 440\n    }, {\n      footer: _withCtx(() => [\n        _createVNode($setup[\"Button\"], {\n          variant: \"primary\",\n          onClick: _cache[4] || (_cache[4] = $event => ($setup.microsoftNoticeOpen = false))\n        }, {\n          default: _withCtx(() => _cache[14] || (_cache[14] = [\n            _createTextVNode(\"Begrepen\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [14]\n        })\n      ]),\n      default: _withCtx(() => [\n        _cache[15] || (_cache[15] = _createElementVNode(\"p\", { class: \"login__notice\" }, \" De knop staat er alvast, maar de koppeling met Microsoft Entra ID is nog niet gemaakt. Log voorlopig in met Google of met een e-mailcode. \", -1 /* CACHED */))\n      ]),\n      _: 1 /* STABLE */,\n      __: [15]\n    }, 8 /* PROPS */, [\"open\"])\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LoginView.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LoginView.vue?type=style&index=0\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LoginView.vue?type=style&index=1\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LoginView.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LoginView.vue\";script.__scopeId = \"data-v-dac7ed46\";export default script;","import { onBeforeUnmount, onMounted, readonly, ref } from \"vue\";\n\nconst LOGGED_IN_CLASS = \"wh-wrdauth--isloggedin\";\n\n// Reactive WRDAuth state driven by the `.wh-wrdauth--isloggedin` class that\n// setupWRDAuth() toggles on <html>. Readonly so components cannot flip it:\n// login and logout go through the form and the logout link.\n//\n// This is NOT a security boundary. The /admin RPC endpoint is directly\n// reachable, so every AdminRPC method gates server-side (requireAdmin).\nexport function useWrdAuthState() {\n  // Read synchronously so the first render already reflects login state and\n  // an already-authenticated user does not see a flash of the login screen.\n  const isLoggedIn = ref(document.documentElement.classList.contains(LOGGED_IN_CLASS));\n  let observer: MutationObserver | null = null;\n\n  function read() {\n    isLoggedIn.value = document.documentElement.classList.contains(LOGGED_IN_CLASS);\n  }\n\n  onMounted(() => {\n    read();\n    observer = new MutationObserver(read);\n    observer.observe(document.documentElement, { attributes: true, attributeFilter: [\"class\"] });\n  });\n\n  onBeforeUnmount(() => {\n    observer?.disconnect();\n    observer = null;\n  });\n\n  return { isLoggedIn: readonly(isLoggedIn) };\n}\n","import { resolveDynamicComponent as _resolveDynamicComponent, openBlock as _openBlock, createBlock as _createBlock, KeepAlive as _KeepAlive, withCtx as _withCtx, createVNode as _createVNode, createCommentVNode as _createCommentVNode } from \"vue\"\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return ($setup.isLoggedIn)\n    ? (_openBlock(), _createBlock($setup[\"AppShell\"], { key: 0 }, {\n        default: _withCtx(() => [\n          _createVNode($setup[\"RouterView\"], null, {\n            default: _withCtx(({ Component, route }) => [\n              (_openBlock(), _createBlock(_KeepAlive, { max: $setup.TAB_CACHE_SIZE }, [\n                (_openBlock(), _createBlock(_resolveDynamicComponent(Component), {\n                  key: $setup.tabKeyFor(route.path) ?? route.path\n                }))\n              ], 1032 /* PROPS, DYNAMIC_SLOTS */, [\"max\"]))\n            ]),\n            _: 1 /* STABLE */\n          })\n        ]),\n        _: 1 /* STABLE */\n      }))\n    : (_openBlock(), _createBlock($setup[\"LoginView\"], { key: 1 }))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/App.vue?type=script\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/App.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/App.vue\";export default script;","// Hash-routing, net als de PWA: de Publisher kan willekeurige paden niet naar\n// dezelfde HTML routeren, dus alle in-app navigatie loopt via het\n// hash-fragment. Zie ook lib/urls.ts voor URL's die buiten de router gebouwd\n// worden.\nimport { createRouter, createWebHashHistory, type RouteRecordRaw } from \"vue-router\";\n\nimport LocationsView from \"../views/LocationsView.vue\";\nimport LocationDetailView from \"../views/LocationDetailView.vue\";\nimport AnalysisDetailView from \"../views/AnalysisDetailView.vue\";\nimport ExplorerView from \"../views/ExplorerView.vue\";\nimport AnalysesView from \"../views/AnalysesView.vue\";\nimport FeedbackView from \"../views/FeedbackView.vue\";\nimport FeedbackDetailView from \"../views/FeedbackDetailView.vue\";\nimport UsageView from \"../views/UsageView.vue\";\nimport ScoringView from \"../views/ScoringView.vue\";\nimport HelpView from \"../views/HelpView.vue\";\nimport BulkView from \"../views/BulkView.vue\";\nimport SettingsView from \"../views/SettingsView.vue\";\n\nimport { rememberSettingsReturn } from \"./settings-sections\";\n\n// De paden zijn de hash-paden van de Next-admin (`/verkenner`, `/gebruik`, ...)\n// zodat een bestaande bookmark na de cutover met alleen een `#` ervoor blijft\n// werken. Route-NAMEN zijn de sleutel in lib/nav.ts.\nconst routes: RouteRecordRaw[] = [\n  { path: \"/\", name: \"locations\", component: LocationsView },\n  {\n    path: \"/locations/:id(\\\\d+)\",\n    name: \"location-detail\",\n    component: LocationDetailView,\n    props: (route) => ({ id: Number(route.params.id) }),\n  },\n  {\n    path: \"/locations/:id(\\\\d+)/analyses/:analysisId(\\\\d+)\",\n    name: \"analysis-detail\",\n    component: AnalysisDetailView,\n    props: (route) => ({ id: Number(route.params.id), analysisId: Number(route.params.analysisId) }),\n  },\n  { path: \"/verkenner\", name: \"explorer\", component: ExplorerView },\n  { path: \"/analyses\", name: \"analyses\", component: AnalysesView },\n  { path: \"/feedback\", name: \"feedback\", component: FeedbackView },\n  {\n    path: \"/feedback/:id(\\\\d+)\",\n    name: \"feedback-detail\",\n    component: FeedbackDetailView,\n    props: (route) => ({ id: Number(route.params.id) }),\n  },\n  { path: \"/gebruik\", name: \"usage\", component: UsageView },\n  { path: \"/scoring\", name: \"scoring\", component: ScoringView },\n  { path: \"/help\", name: \"help\", component: HelpView },\n  { path: \"/bulk\", name: \"bulk\", component: BulkView },\n  // One route name with an optional section param: an existing\n  // `{ name: \"settings\" }` link still lands on `#/settings`, and lib/nav.ts\n  // still recognizes `/settings/<section>` as \"Instellingen\".\n  { path: \"/settings/:section?\", name: \"settings\", component: SettingsView },\n  // Onbekende route valt terug op de lijst in plaats van een leeg scherm.\n  { path: \"/:pathMatch(.*)*\", redirect: { name: \"locations\" } },\n];\n\nexport const router = createRouter({\n  history: createWebHashHistory(),\n  routes,\n});\n\n// Remember where Instellingen was entered from, for the back link. Switching\n// between sections doesn't count, and neither does the login screen.\nrouter.afterEach((to, from) => {\n  if (to.name === \"settings\" && from.name && from.name !== \"settings\" && from.name !== \"login\")\n    rememberSettingsReturn(from.fullPath);\n});\n","<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, reactive, ref, useTemplateRef, watch } from \"vue\";\nimport { RouterLink, useRouter } from \"vue-router\";\nimport LocationFilters from \"../components/locations/LocationFilters.vue\";\nimport LocationMobileList from \"../components/locations/LocationMobileList.vue\";\nimport { LocationPages } from \"../lib/location-pages\";\nimport AddLocationDialog from \"../components/locations/AddLocationDialog.vue\";\nimport { useBreakpoint } from \"../lib/use-breakpoint\";\nimport Badge from \"../components/ui/Badge.vue\";\nimport Button from \"../components/ui/Button.vue\";\nimport EmptyState from \"../components/ui/EmptyState.vue\";\nimport PaginationBar from \"../components/ui/PaginationBar.vue\";\nimport ScoreBar from \"../components/ui/ScoreBar.vue\";\nimport SortCaret from \"../components/ui/SortCaret.vue\";\nimport StatusGlyph from \"../components/ui/StatusGlyph.vue\";\nimport Icon from \"../components/icons/Icon.vue\";\nimport { api } from \"../lib/api\";\nimport { formatLocationType, LOCATION_TYPE_OPTIONS } from \"../lib/location-type\";\nimport { classifyImageStatus, type ImageOverall } from \"../lib/photo-status\";\nimport { formatLocationIdsForClipboard } from \"../lib/copy-location-ids\";\nimport {\n  loadSortState,\n  nextSortState,\n  saveSortState,\n  type SortField,\n  type SortState,\n} from \"../lib/locations-sort\";\nimport { setLocationCount } from \"../lib/shell-chrome\";\n\ntype LocationRow = Awaited<ReturnType<typeof api.findAllLocations>>[\"locations\"][number];\n\n\nconst breakpoint = useBreakpoint();\nconst phone = computed(() => breakpoint.value === \"phone\");\n\nconst router = useRouter();\nconst scrollArea = useTemplateRef<HTMLElement>(\"scrollArea\");\nconst pages = reactive(new LocationPages<LocationRow>());\nconst locations = computed(() => pages.items);\nconst total = computed(() => pages.total);\nconst loading = computed(() => pages.loading);\nconst actionError = ref<string | null>(null);\nconst error = computed(() => pages.error || actionError.value);\nconst selecting = ref(false);\nconst PAGE_SIZE = 25;\n\nconst provinces = ref<string[]>([]);\n\nconst searchInput = ref(\"\");\nconst query = ref(\"\");\nconst province = ref(\"\");\nconst locationType = ref(\"\");\nconst reviewState = ref(\"all\");\nconst page = ref(1);\nconst pageSize = PAGE_SIZE;\nconst sort = ref<SortState>(loadSortState());\n\nconst selected = ref<ReadonlySet<number>>(new Set());\nconst copied = ref(false);\n\nconst provinceOptions = computed(() => [\n  { value: \"\", label: \"Alle provincies\" },\n  ...provinces.value.map((p) => ({ value: p, label: p })),\n]);\n\nconst typeOptions = computed(() => [\n  { value: \"\", label: \"Alle types\" },\n  ...LOCATION_TYPE_OPTIONS.map((o) => ({ value: o.value, label: o.label })),\n]);\n\nconst allOnPageSelected = computed(() =>\n  locations.value.length > 0 && locations.value.every((l) => selected.value.has(l.id)));\n\nconst someOnPageSelected = computed(() => locations.value.some((l) => selected.value.has(l.id)));\n\nfunction fmt(n: number | null | undefined): string {\n  return n === null || n === undefined ? \"-\" : n.toLocaleString(\"nl-NL\");\n}\n\n// De zes presence-booleans naar de drie standen van StatusGlyph. De volledige\n// zesdelige classificatie blijft beschikbaar voor de tooltip, zodat \"kadaster\n// overgeslagen\" niet als \"niet compleet\" leest.\nfunction photoInput(loc: LocationRow) {\n  const streetViewCount =\n    (loc.imageStreetview0 ? 1 : 0) +\n    (loc.imageStreetview90 ? 1 : 0) +\n    (loc.imageStreetview180 ? 1 : 0) +\n    (loc.imageStreetview270 ? 1 : 0);\n  return {\n    hasCoordinates: loc.latitude !== null && loc.longitude !== null,\n    satellite: loc.imageSatellite,\n    cadastral: loc.imageCadastral,\n    cadastralSkipped: loc.imageSatellite && !loc.imageCadastral && !loc.cadastralGeometry,\n    streetViewCount,\n  };\n}\n\nconst PHOTO_TITLES: Record<ImageOverall, string> = {\n  unknown: \"Nog niet opgehaald\",\n  \"no-coords\": \"Geen coördinaten, dus geen foto's mogelijk\",\n  missing: \"Satellietfoto ontbreekt\",\n  partial: \"Deels opgehaald\",\n  \"complete-skipped\": \"Compleet (geen kadastraal perceel gevonden)\",\n  complete: \"Compleet\",\n};\n\nfunction photoGlyph(loc: LocationRow): \"yes\" | \"no\" | \"unknown\" {\n  const status = classifyImageStatus(photoInput(loc));\n  if (status === \"complete\" || status === \"complete-skipped\") return \"yes\";\n  if (status === \"unknown\") return \"unknown\";\n  return \"no\";\n}\n\nfunction photoTitle(loc: LocationRow): string {\n  return PHOTO_TITLES[classifyImageStatus(photoInput(loc))];\n}\n\nconst requestKey = computed(() => JSON.stringify([query.value, province.value, locationType.value, reviewState.value, sort.value, phone.value]));\nlet requestedPage = 1;\n\nasync function load(options: { page?: number; append?: boolean } = {}) {\n  requestedPage = options.page ?? page.value;\n  const key = requestKey.value;\n  const params = {\n    query: query.value || undefined,\n    province: province.value || undefined,\n    locationType: locationType.value || undefined,\n    reviewState: reviewState.value === \"all\" ? undefined : reviewState.value as \"review\" | \"scored\",\n    page: requestedPage,\n    pageSize,\n    sortField: sort.value.field,\n    sortDirection: sort.value.direction,\n  };\n  await pages.load({ key, page: requestedPage, append: options.append ?? false, fetch: () => api.findAllLocations(params) });\n  if (key === requestKey.value && !pages.loading && !pages.error) {\n    // Het aantal in de rail komt uit dezelfde respons, gezet in de\n    // success-handler en niet in een watcher: een aparte watcher zou een\n    // tweede render-pass met een tussenstand opleveren.\n    setLocationCount(pages.total);\n  }\n}\n\nfunction loadMore() {\n  if (!loading.value) void load({ page: pages.page + 1, append: true });\n}\n\nfunction retry() {\n  void load({ page: requestedPage, append: phone.value && pages.items.length > 0 });\n}\n\nfunction openRow(event: MouseEvent, id: number) {\n  if ((event.target as HTMLElement).closest(\"a, input, button, label\") || event.metaKey || event.ctrlKey || event.shiftKey || window.getSelection()?.toString()) return;\n  void router.push({ name: \"location-detail\", params: { id } });\n}\n\nasync function loadProvinces() {\n  try {\n    // 0-arg: de stripped signature neemt geen params, dus geen `{}` meegeven.\n    provinces.value = (await api.getProvinces()).provinces;\n  } catch {\n    provinces.value = [];\n  }\n}\n\n// Debounce op het zoekveld; 250 ms is kort genoeg om direct te voelen en lang\n// genoeg om een woord uit te typen zonder per letter te queryen.\nlet searchTimer: number | null = null;\nwatch(searchInput, (value) => {\n  if (searchTimer !== null) window.clearTimeout(searchTimer);\n  searchTimer = window.setTimeout(() => {\n    query.value = value.trim();\n  }, 250);\n});\n\n// Elke filterwijziging zet de pagina terug op 1: pagina 7 van een nieuw filter\n// is bijna altijd leeg.\nwatch(requestKey, () => {\n  page.value = 1;\n  if (scrollArea.value) scrollArea.value.scrollTop = 0;\n  void load({ page: 1 });\n}, { immediate: true });\n\nfunction applySort(field: SortField) {\n  sort.value = nextSortState(sort.value, field);\n  saveSortState(sort.value);\n}\n\nfunction onPage(next: number) {\n  if (loading.value) return;\n  page.value = next;\n  if (scrollArea.value) scrollArea.value.scrollTop = 0;\n  void load();\n}\n\nfunction clearFilters() {\n  searchInput.value = \"\";\n  query.value = \"\";\n  province.value = \"\";\n  locationType.value = \"\";\n  reviewState.value = \"all\";\n}\n\nfunction toggleRow(id: number) {\n  const next = new Set(selected.value);\n  if (next.has(id)) next.delete(id);\n  else next.add(id);\n  selected.value = next;\n}\n\nfunction toggleAllOnPage() {\n  const next = new Set(selected.value);\n  if (allOnPageSelected.value) for (const l of locations.value) next.delete(l.id);\n  else for (const l of locations.value) next.add(l.id);\n  selected.value = next;\n}\n\nlet copiedTimer: number | null = null;\nasync function copySelectedIds() {\n  actionError.value = null;\n  const text = formatLocationIdsForClipboard([...selected.value]);\n  try {\n    await navigator.clipboard.writeText(text);\n    copied.value = true;\n    if (copiedTimer !== null) window.clearTimeout(copiedTimer);\n    copiedTimer = window.setTimeout(() => { copied.value = false; }, 2000);\n  } catch {\n    actionError.value = \"Kopiëren naar het klembord is niet gelukt.\";\n  }\n}\n\nonMounted(loadProvinces);\n\nonBeforeUnmount(() => {\n  if (searchTimer !== null) window.clearTimeout(searchTimer);\n  if (copiedTimer !== null) window.clearTimeout(copiedTimer);\n});\n</script>\n\n<template>\n  <section class=\"locations\">\n    <header class=\"locations__head\">\n      <div class=\"locations__titlebar\">\n        <h1 class=\"page-title\">Locaties</h1>\n        <span class=\"locations__count tnum\" aria-live=\"polite\">{{ loading && !locations.length ? \"Laden...\" : `${fmt(total)} gevonden` }}</span>\n        <div class=\"locations__actions\"><AddLocationDialog :compact=\"phone\" compact-label=\"Toevoegen\" /></div>\n      </div>\n      <!-- Filterbalk. Zoeken is debounced zodat elke toetsaanslag geen RPC kost. -->\n      <LocationFilters\n        v-model:search=\"searchInput\"\n        v-model:province=\"province\"\n        v-model:location-type=\"locationType\"\n        v-model:review-state=\"reviewState\"\n        :phone=\"phone\"\n        :province-options=\"provinceOptions\"\n        :type-options=\"typeOptions\"\n        :total=\"total\"\n        :loading=\"loading\"\n        :error=\"pages.error\"\n        :sort=\"sort\"\n        @sort=\"applySort\"\n        @clear=\"clearFilters\"\n      />\n    </header>\n\n    <!-- Mobile selection keeps the bulk actions outside the scrolling list. -->\n    <div v-if=\"selected.size > 0 || selecting\" class=\"selbar\">\n      <label v-if=\"phone\" class=\"selbar__all\">\n        <input class=\"snl-checkbox\" type=\"checkbox\" :checked=\"allOnPageSelected\" :indeterminate=\"someOnPageSelected && !allOnPageSelected\" aria-label=\"Alle getoonde locaties selecteren\" @change=\"toggleAllOnPage\">\n        Alle getoonde\n      </label>\n      <span class=\"tnum\">{{ fmt(selected.size) }} geselecteerd</span>\n      <Button :disabled=\"selected.size === 0\" @click=\"copySelectedIds\">\n        <Icon name=\"copy\" />\n        {{ copied ? \"Gekopieerd\" : \"Kopieer ID's\" }}\n      </Button>\n      <Button variant=\"ghost\" @click=\"selected = new Set()\">Selectie wissen</Button>\n      <Button v-if=\"phone\" variant=\"ghost\" @click=\"selecting = !selecting\">{{ selecting ? \"Klaar\" : \"Selecteren\" }}</Button>\n    </div>\n\n    <div v-if=\"error\" class=\"error\" role=\"alert\">{{ error }} <Button v-if=\"pages.error\" @click=\"retry\">Opnieuw proberen</Button></div>\n\n    <!-- Het lijstvak: de tabel scrollt zelf, de pagineerbalk blijft eronder\n         staan. Geen kader eromheen; in de kit loopt de tabel tot de randen door\n         en doen de hairlines het werk. -->\n    <div class=\"listbox\">\n      <div ref=\"scrollArea\" class=\"listbox__scroll\" :aria-busy=\"loading\">\n        <template v-if=\"phone\">\n          <p v-if=\"loading && !locations.length\" class=\"locations__message\" role=\"status\">Locaties laden...</p>\n          <EmptyState v-else-if=\"!error && !locations.length\" icon=\"location\" title=\"Geen locaties gevonden\" description=\"Pas je zoekopdracht of filters aan om locaties te tonen.\" />\n          <LocationMobileList :locations=\"locations\" :selected=\"selected\" :selecting=\"selecting\" :photo-glyph=\"photoGlyph\" :photo-title=\"photoTitle\" @toggle=\"toggleRow\" />\n          <div class=\"locations__mobile-actions\">\n            <Button v-if=\"!selecting\" @click=\"selecting = true\">Selecteren</Button>\n            <Button v-if=\"locations.length < total\" class=\"locations__more\" :busy=\"loading\" @click=\"loadMore\">{{ loading ? \"Laden...\" : \"Meer laden\" }}</Button>\n            <span class=\"locations__loaded tnum\" aria-live=\"polite\">{{ fmt(locations.length) }} van {{ fmt(total) }} locaties</span>\n          </div>\n        </template>\n        <table v-else class=\"tbl\">\n          <thead>\n            <tr>\n              <th class=\"tbl__check\">\n                <input\n                  class=\"snl-checkbox\"\n                  type=\"checkbox\"\n                  :checked=\"allOnPageSelected\"\n                  :indeterminate=\"someOnPageSelected && !allOnPageSelected\"\n                  aria-label=\"Alle locaties op deze pagina selecteren\"\n                  @change=\"toggleAllOnPage\"\n                >\n              </th>\n              <th class=\"tbl__name\" :aria-sort=\"sort.field === 'companyName' ? (sort.direction === 'asc' ? 'ascending' : 'descending') : undefined\">\n                <button class=\"tbl__sort\" type=\"button\" @click=\"applySort('companyName')\">\n                  Bedrijfsnaam\n                  <SortCaret :active=\"sort.field === 'companyName'\" :direction=\"sort.direction\" />\n                </button>\n              </th>\n              <th>Adres</th>\n              <th>Plaats</th>\n              <th>Vestigingstype</th>\n              <th class=\"tbl__center\" :aria-sort=\"sort.field === 'photoStatus' ? (sort.direction === 'asc' ? 'ascending' : 'descending') : undefined\">\n                <button class=\"tbl__sort\" type=\"button\" @click=\"applySort('photoStatus')\">\n                  Foto's\n                  <SortCaret :active=\"sort.field === 'photoStatus'\" :direction=\"sort.direction\" />\n                </button>\n              </th>\n              <th class=\"tbl__right\" :aria-sort=\"sort.field === 'analysisCount' ? (sort.direction === 'asc' ? 'ascending' : 'descending') : undefined\">\n                <button class=\"tbl__sort\" type=\"button\" @click=\"applySort('analysisCount')\">\n                  Analyses\n                  <SortCaret :active=\"sort.field === 'analysisCount'\" :direction=\"sort.direction\" />\n                </button>\n              </th>\n              <th title=\"Zichtbaar wanneer de nieuwste analyse om menselijke controle vraagt\">\n                Review\n              </th>\n              <th class=\"tbl__score\" :aria-sort=\"sort.field === 'latestScore' ? (sort.direction === 'asc' ? 'ascending' : 'descending') : undefined\">\n                <button class=\"tbl__sort\" type=\"button\" @click=\"applySort('latestScore')\">\n                  Score\n                  <SortCaret :active=\"sort.field === 'latestScore'\" :direction=\"sort.direction\" />\n                </button>\n              </th>\n              <th class=\"tbl__chevron\"><span class=\"locations__sr\">Open locatie</span></th>\n            </tr>\n          </thead>\n          <tbody>\n            <tr v-if=\"loading\">\n              <td class=\"tbl__msg\" colspan=\"10\">Laden...</td>\n            </tr>\n            <tr v-else-if=\"!error && locations.length === 0\">\n              <td colspan=\"10\" class=\"tbl__empty\">\n                <EmptyState\n                  icon=\"location\"\n                  title=\"Geen locaties gevonden\"\n                  description=\"Pas je zoekopdracht of filters aan om locaties te tonen.\"\n                />\n              </td>\n            </tr>\n            <tr v-for=\"loc in locations\" v-else :key=\"loc.id\" :class=\"{ 'tbl__row--sel': selected.has(loc.id) }\" @click=\"openRow($event, loc.id)\">\n              <td class=\"tbl__check\">\n                <input\n                  class=\"snl-checkbox\"\n                  type=\"checkbox\"\n                  :checked=\"selected.has(loc.id)\"\n                  :aria-label=\"`${loc.companyName} selecteren`\"\n                  @change=\"toggleRow(loc.id)\"\n                >\n              </td>\n              <td class=\"tbl__name\">\n                <RouterLink :to=\"{ name: 'location-detail', params: { id: loc.id } }\" class=\"tbl__link\">\n                  {{ loc.companyName }}\n                </RouterLink>\n              </td>\n              <td class=\"tbl__trunc tbl__muted\" :title=\"loc.address ?? ''\">{{ loc.address }}</td>\n              <td class=\"tbl__trunc\">{{ loc.city }}</td>\n              <td><Badge>{{ formatLocationType(loc.locationType) }}</Badge></td>\n              <td class=\"tbl__center\">\n                <StatusGlyph :state=\"photoGlyph(loc)\" :title=\"photoTitle(loc)\" />\n              </td>\n              <!-- Getallen rechts uitgelijnd met tabulaire cijfers: zo zijn\n                   groottes in een kolom in één blik te vergelijken. -->\n              <td class=\"tbl__right tnum\">{{ loc.analysisCount ?? 0 }}</td>\n              <td>\n                <Badge v-if=\"loc.requiresHumanReview\" tone=\"diverge\">Mens-review</Badge>\n                <span v-else class=\"tbl__dash\">-</span>\n              </td>\n              <td class=\"tbl__score\">\n                <!-- Geen lege balk bij een locatie zonder analyse: in een tabel\n                     die grotendeels ongescoord is zijn honderd grijze sporen\n                     ruis. -->\n                <ScoreBar v-if=\"loc.latestScore !== null\" :score=\"loc.latestScore\" />\n                <span v-else class=\"tbl__dash\">niet gescoord</span>\n              </td>\n              <td class=\"tbl__chevron\"><RouterLink :to=\"{ name: 'location-detail', params: { id: loc.id } }\" :aria-label=\"`${loc.companyName} openen`\"><Icon name=\"chevron--right\" /></RouterLink></td>\n            </tr>\n          </tbody>\n        </table>\n      </div>\n\n      <PaginationBar v-if=\"!phone\" :page=\"page\" :page-size=\"pageSize\" :total=\"total\" @update:page=\"onPage\" />\n    </div>\n  </section>\n</template>\n\n<style scoped>\n@font-face {\n  font-family: \"Nudica Locations\";\n  font-style: normal;\n  font-weight: 400;\n  font-display: swap;\n  src: url(\"../assets/nudica-regular.woff2\") format(\"woff2\");\n}\n@font-face {\n  font-family: \"Nudica Locations\";\n  font-style: normal;\n  font-weight: 600 700;\n  font-display: swap;\n  src: url(\"../assets/nudica-bold.woff2\") format(\"woff2\");\n}\n.locations {\n  --font-sans: \"Nudica Locations\", \"Helvetica Neue\", Arial, sans-serif;\n  display: flex;\n  flex: 1;\n  flex-direction: column;\n  min-height: 0;\n  min-width: 0;\n  font-family: var(--font-sans);\n  background: var(--bg-surface);\n}\n.locations__head {\n  display: flex;\n  flex: none;\n  flex-direction: column;\n  gap: 10px;\n  padding: 12px;\n  border-bottom: 1px solid var(--border-1);\n}\n.locations__titlebar {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  flex-wrap: wrap;\n}\n.locations__count { color: var(--fg-3); font-size: var(--text-ui); }\n.locations__actions { margin-left: auto; }\n.locations__actions :deep(.add-location__action) {\n  font-family: inherit;\n  background: var(--brand);\n  color: var(--brand-fg);\n}\n@media (hover: hover) {\n  .locations__actions :deep(.add-location__action:hover:not(:disabled)) {\n    background: var(--brand-hover);\n  }\n}\n.locations__mobile-actions {\n  display: flex;\n  gap: 12px;\n  flex-wrap: wrap;\n  padding: 16px;\n}\n.locations__more { flex: 1; border-color: var(--fg-1); }\n.locations__loaded {\n  width: 100%;\n  color: var(--fg-3);\n  font-size: var(--text-caption);\n  text-align: center;\n}\n.locations__message { padding: 20px; color: var(--fg-3); }\n.locations__sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  overflow: hidden;\n  clip-path: inset(50%);\n}\n.selbar__all {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  cursor: pointer;\n}\n\n.selbar {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  flex: none;\n  flex-wrap: wrap;\n  padding: 8px 16px;\n  border-block: 1px solid var(--border-1);\n  background: var(--bg-inset);\n  font-size: var(--text-ui);\n}\n\n.error {\n  flex: none;\n  margin: 0;\n  padding: 8px 12px;\n  background: var(--danger-bg);\n  border: 1px solid var(--danger-border);\n  border-radius: var(--radius);\n  color: var(--danger-fg);\n  font-size: var(--text-caption);\n}\n\n.listbox {\n  display: flex;\n  flex-direction: column;\n  flex: 1;\n  min-height: 0;\n  min-width: 0;\n  background: var(--bg-surface);\n}\n\n.listbox__scroll {\n  flex: 1;\n  min-height: 0;\n  overflow: auto;\n}\n\n.tbl {\n  width: 100%;\n  border-collapse: collapse;\n  font-size: var(--text-ui);\n}\n\n/* 32px-rijen: dat is niet per tabel gekozen maar de standaard in de kit. */\n.tbl th,\n.tbl td {\n  height: 32px;\n  padding: 0 16px;\n  text-align: left;\n  border-bottom: 1px solid var(--border-1);\n  white-space: nowrap;\n}\n\n.tbl thead th {\n  position: sticky;\n  top: 0;\n  z-index: 1;\n  background: var(--bg-inset);\n  font-size: var(--text-caption);\n  font-weight: 600;\n  letter-spacing: 0.32px;\n  text-transform: uppercase;\n  color: var(--fg-1);\n}\n\n/* Een <button> reset text-transform, en Tailwinds font:inherit-equivalent\n   herstelt dat niet. Een sorteerbare kop is een button in een th, dus die\n   heeft zijn eigen uppercase nodig om niet uit de toon te lopen. */\n.tbl__sort {\n  display: inline-flex;\n  align-items: center;\n  gap: 4px;\n  border: 0;\n  padding: 0;\n  background: transparent;\n  font: inherit;\n  font-size: var(--text-caption);\n  letter-spacing: 0.32px;\n  text-transform: uppercase;\n  color: inherit;\n  cursor: pointer;\n}\n\n.tbl__check {\n  width: 40px;\n  padding-left: 16px;\n}\n\n.tbl__name {\n  min-width: 200px;\n  max-width: 280px;\n}\n\n.tbl__trunc {\n  max-width: 200px;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n\n.tbl__muted {\n  color: var(--fg-3);\n}\n\n.tbl .tbl__center {\n  text-align: center;\n}\n\n.tbl .tbl__right {\n  text-align: right;\n}\n\n.tbl__score {\n  min-width: 145px;\n}\n\n.tbl__link {\n  display: block;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  color: var(--fg-1);\n}\n.tbl__chevron { width: 48px; }\n.tbl__chevron a {\n  display: flex;\n  align-items: center;\n  justify-content: flex-end;\n  color: var(--fg-3);\n}\n.tbl tbody tr { cursor: pointer; }\n.tbl__score :deep(.score) { display: inline-flex; flex-direction: row-reverse; }\n.tbl__score :deep(.score__track) { flex: none; width: 80px; height: 6px; }\n.tbl__score :deep(.score__value) { width: auto; }\n.tbl :deep(.badge) { border-radius: 999px; font-family: inherit; }\n@media (min-width: 720px) {\n  .locations__head { padding: 14px 20px 12px; gap: 12px; }\n  .locations__titlebar { gap: 16px; }\n  .tbl a { min-height: 0; }\n}\n\n@media (hover: hover) {\n  .tbl__link:hover {\n    text-decoration: underline;\n  }\n  .tbl tbody tr:hover {\n    background: var(--bg-inset);\n  }\n}\n\n.tbl__row--sel {\n  background: var(--bg-inset);\n}\n\n.tbl__dash {\n  color: var(--fg-5);\n}\n\n.tbl__msg {\n  height: 96px;\n  text-align: center;\n  color: var(--fg-3);\n}\n\n.tbl__empty {\n  height: auto;\n  padding: 0;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed, ref, useId } from \"vue\";\nimport { DialogClose, DialogContent, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger } from \"reka-ui\";\nimport Icon from \"../icons/Icon.vue\";\nimport Button from \"../ui/Button.vue\";\nimport ContentSwitcher from \"../ui/ContentSwitcher.vue\";\nimport Select from \"../ui/Select.vue\";\nimport type { SortField, SortState } from \"../../lib/locations-sort\";\n\nconst props = defineProps<{\n  phone: boolean;\n  search: string;\n  province: string;\n  locationType: string;\n  reviewState: string;\n  provinceOptions: Array<{ value: string; label: string }>;\n  typeOptions: Array<{ value: string; label: string }>;\n  total: number;\n  loading: boolean;\n  error: string | null;\n  sort: SortState;\n}>();\nconst emit = defineEmits<{\n  \"update:search\": [value: string];\n  \"update:province\": [value: string];\n  \"update:locationType\": [value: string];\n  \"update:reviewState\": [value: string];\n  clear: [];\n  sort: [field: SortField];\n}>();\nconst open = ref(false);\nconst radioName = useId();\nconst stateOptions = [\n  { value: \"all\", label: \"Alle locaties\" },\n  { value: \"review\", label: \"Te reviewen\" },\n  { value: \"scored\", label: \"Gescoord\" },\n];\nconst activeCount = computed(() => [Boolean(props.province), Boolean(props.locationType), props.reviewState !== \"all\"].filter(Boolean).length);\nconst sortOptions = [\n  { value: \"companyName\", label: \"Bedrijfsnaam\" },\n  { value: \"photoStatus\", label: \"Foto's\" },\n  { value: \"analysisCount\", label: \"Analyses\" },\n  { value: \"latestScore\", label: \"Score\" },\n];\n</script>\n\n<template>\n  <div class=\"location-filters\" :class=\"{ 'location-filters--phone': phone }\">\n    <div class=\"location-search\" role=\"search\">\n      <Icon name=\"search\" class=\"location-search__icon\" />\n      <input\n        type=\"search\"\n        aria-label=\"Zoek op bedrijfsnaam, adres of plaats\"\n        :placeholder=\"phone ? 'Zoek locatie' : 'Zoek op bedrijfsnaam, adres of plaats'\"\n        :value=\"search\"\n        @input=\"emit('update:search', ($event.target as HTMLInputElement).value)\"\n      >\n      <button v-if=\"search\" type=\"button\" class=\"location-search__clear\" aria-label=\"Zoekopdracht wissen\" @click=\"emit('update:search', '')\"><Icon name=\"close\" /></button>\n    </div>\n    <template v-if=\"!phone\">\n      <Select :model-value=\"province\" label=\"Provincie\" :options=\"provinceOptions\" @update:model-value=\"emit('update:province', $event)\" />\n      <Select :model-value=\"locationType\" label=\"Vestigingstype\" :options=\"typeOptions\" @update:model-value=\"emit('update:locationType', $event)\" />\n      <ContentSwitcher :model-value=\"reviewState\" :options=\"stateOptions\" aria-label=\"Selectie\" @update:model-value=\"emit('update:reviewState', $event)\" />\n      <Button v-if=\"activeCount || search\" variant=\"ghost\" class=\"location-filters__clear\" @click=\"emit('clear')\">Filters wissen</Button>\n    </template>\n    <DialogRoot v-else v-model:open=\"open\">\n      <DialogTrigger as-child><Button class=\"location-filters__trigger\">Filters{{ activeCount ? ` · ${activeCount}` : \"\" }} <Icon name=\"filter\" /></Button></DialogTrigger>\n      <DialogPortal>\n        <DialogOverlay class=\"location-sheet__overlay\" />\n        <DialogContent class=\"location-sheet\" :aria-describedby=\"undefined\">\n          <header class=\"location-sheet__head\">\n            <DialogTitle class=\"page-title\">Filters</DialogTitle>\n            <DialogClose class=\"location-sheet__close\" aria-label=\"Filters sluiten\"><Icon name=\"close\" /></DialogClose>\n          </header>\n          <div class=\"location-sheet__body\">\n            <Select :model-value=\"province\" label=\"Provincie\" :options=\"provinceOptions\" @update:model-value=\"emit('update:province', $event)\" />\n            <Select :model-value=\"locationType\" label=\"Vestigingstype\" :options=\"typeOptions\" @update:model-value=\"emit('update:locationType', $event)\" />\n            <fieldset class=\"location-sheet__states\">\n              <legend>Selectie</legend>\n              <label v-for=\"option in stateOptions\" :key=\"option.value\">\n                <input type=\"radio\" :name=\"radioName\" :value=\"option.value\" :checked=\"reviewState === option.value\" @change=\"emit('update:reviewState', option.value)\">\n                {{ option.label }}\n              </label>\n            </fieldset>\n            <div class=\"location-sheet__sort\">\n              <Select :model-value=\"sort.field\" label=\"Sorteren op\" :options=\"sortOptions\" @update:model-value=\"emit('sort', $event as SortField)\" />\n              <Button @click=\"emit('sort', sort.field)\">{{ sort.direction === \"asc\" ? \"Oplopend\" : \"Aflopend\" }} <Icon :name=\"sort.direction === 'asc' ? 'caret--up' : 'caret--down'\" /></Button>\n            </div>\n            <p v-if=\"error\" class=\"location-sheet__error\" role=\"alert\">{{ error }}</p>\n          </div>\n          <footer class=\"location-sheet__foot\">\n            <Button variant=\"ghost\" @click=\"emit('clear')\">Wissen</Button>\n            <DialogClose as-child>\n              <Button class=\"location-sheet__apply\" :disabled=\"loading || Boolean(error)\">{{ loading ? \"Laden...\" : `Toon ${total.toLocaleString(\"nl-NL\")} locaties` }}</Button>\n            </DialogClose>\n          </footer>\n        </DialogContent>\n      </DialogPortal>\n    </DialogRoot>\n  </div>\n</template>\n\n<style scoped>\n.location-filters {\n  display: grid;\n  grid-template-columns: minmax(0, 1fr) auto;\n  align-items: end;\n  gap: 8px;\n  min-width: 0;\n}\n.location-search {\n  position: relative;\n  display: flex;\n  align-items: center;\n  height: 44px;\n  min-width: 0;\n  border-bottom: 1px solid var(--field-line);\n  background: var(--bg-surface);\n}\n.location-search input {\n  width: 100%;\n  height: 100%;\n  min-height: 44px;\n  padding: 0 40px;\n  border: 0;\n  border-radius: 0;\n  background: transparent;\n  color: var(--fg-1);\n  font: inherit;\n  appearance: none;\n}\n.location-search input::-webkit-search-cancel-button { display: none; }\n.location-search input::placeholder { color: var(--fg-4); }\n.location-search__icon { position: absolute; left: 12px; pointer-events: none; }\n.location-search__clear {\n  position: absolute;\n  right: 0;\n  display: grid;\n  place-items: center;\n  width: 44px;\n  height: 44px;\n  border: 0;\n  background: transparent;\n  cursor: pointer;\n}\n.location-filters__trigger { height: 44px; border-color: var(--fg-1); }\n.location-filters__clear { justify-self: start; }\n.location-filters :deep(.field__select), .location-sheet :deep(.field__select) {\n  height: 44px;\n  background: var(--bg-surface);\n  font: inherit;\n}\n.location-filters :deep(.field), .location-sheet :deep(.field) { gap: 8px; }\n.location-filters :deep(.switcher) {\n  height: 44px;\n  width: max-content;\n  max-width: 100%;\n}\n.location-filters :deep(.switcher__seg) { font-family: inherit; }\n.location-sheet__overlay {\n  position: fixed;\n  inset: 0;\n  z-index: 1400;\n  background: rgba(1, 5, 4, 0.5);\n}\n.location-sheet {\n  --font-sans: \"Nudica Locations\", \"Helvetica Neue\", Arial, sans-serif;\n  position: fixed;\n  inset: auto 0 0;\n  z-index: 1401;\n  display: flex;\n  flex-direction: column;\n  max-height: 86dvh;\n  border-top: 2px solid var(--brand);\n  background: var(--bg-surface);\n  color: var(--fg-1);\n  font-family: var(--font-sans);\n}\n.location-sheet__head {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 12px;\n  padding: 12px 16px;\n  border-bottom: 1px solid var(--border-1);\n}\n.location-sheet__close {\n  display: grid;\n  place-items: center;\n  width: 44px;\n  height: 44px;\n  border: 0;\n  background: transparent;\n  cursor: pointer;\n}\n.location-sheet__body {\n  display: flex;\n  flex-direction: column;\n  gap: 20px;\n  overflow: auto;\n  padding: 16px;\n}\n.location-sheet__states { padding: 0; margin: 0; border: 0; }\n.location-sheet__states legend {\n  margin-bottom: 4px;\n  font-size: var(--text-caption);\n  color: var(--fg-3);\n}\n.location-sheet__states label {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  min-height: 44px;\n  cursor: pointer;\n}\n.location-sheet__states input {\n  width: 20px;\n  height: 20px;\n  margin: 0;\n  accent-color: var(--fg-1);\n  cursor: pointer;\n}\n.location-sheet__sort {\n  display: grid;\n  grid-template-columns: minmax(0, 1fr) auto;\n  align-items: end;\n  gap: 12px;\n}\n.location-sheet__sort :deep(button) { height: 44px; }\n.location-sheet__foot {\n  display: flex;\n  flex: none;\n  gap: 12px;\n  padding: 12px 16px max(12px, env(safe-area-inset-bottom));\n  border-top: 1px solid var(--border-1);\n}\n.location-sheet__foot :deep(button) { height: 44px; }\n.location-sheet__apply { flex: 1; background: var(--brand); color: var(--brand-fg); }\n.location-sheet__error { color: var(--danger-fg); }\n@media (hover: hover) {\n  .location-search__clear:hover, .location-sheet__close:hover {\n    background: var(--bg-inset);\n  }\n  .location-sheet__apply:hover:not(:disabled) { background: var(--brand-hover); }\n}\n@media (min-width: 720px) {\n  .location-filters {\n    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);\n    gap: 12px;\n  }\n  .location-filters__clear { grid-column: 2 / -1; }\n}\n@media (min-width: 1080px) {\n  .location-search input { min-height: 0; }\n  .location-filters {\n    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto;\n  }\n  .location-filters__clear { grid-column: 1 / -1; }\n  .location-search, .location-filters :deep(.field__select), .location-filters :deep(.switcher) {\n    height: 40px;\n  }\n  .location-search__clear { width: 40px; height: 40px; }\n}\n</style>\n","<template>\n  <div class=\"switcher\" role=\"group\" :aria-label=\"ariaLabel\">\n    <button\n      v-for=\"option in options\"\n      :key=\"option.value\"\n      type=\"button\"\n      class=\"switcher__seg\"\n      :class=\"{ 'switcher__seg--on': option.value === modelValue }\"\n      :aria-pressed=\"option.value === modelValue\"\n      :title=\"option.title\"\n      @click=\"emit('update:modelValue', option.value)\"\n    >\n      {{ option.label }}\n    </button>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\n// The ContentSwitcher from the design system: a segmented control for a small,\n// mutually exclusive set of views. Deliberately not a dropdown: with a handful\n// of options everything should be visible, and the active state readable at a\n// glance.\n//\n// Measured in the kit: 40px high, a 1px frame in ink, 2px radius, and the\n// active segment is ink with inverted text. Not green: green is rationed to\n// one accent action per screen.\nexport interface SwitcherOption {\n  value: string;\n  label: string;\n  title?: string;\n}\n\ndefineProps<{ options: SwitcherOption[]; modelValue: string; ariaLabel: string }>();\n\nconst emit = defineEmits<{ \"update:modelValue\": [value: string] }>();\n</script>\n\n<style scoped>\n.switcher {\n  display: inline-flex;\n  flex: none;\n  align-items: stretch;\n  height: 40px;\n  overflow: hidden;\n  border: 1px solid var(--fg-1);\n  border-radius: var(--radius);\n}\n\n.switcher__seg {\n  padding: 0 16px;\n  border: 0;\n  border-left: 1px solid var(--fg-1);\n  background: var(--bg-surface);\n  color: var(--fg-1);\n  font-size: var(--text-ui);\n  white-space: nowrap;\n  cursor: pointer;\n  transition: background-color 110ms cubic-bezier(0.2, 0, 0.38, 0.9);\n}\n\n.switcher__seg:first-child {\n  border-left: 0;\n}\n\n.switcher__seg--on {\n  background: var(--fg-1);\n  color: var(--bg-page);\n}\n\n@media (hover: hover) {\n  .switcher__seg:not(.switcher__seg--on):hover {\n    background: var(--bg-inset);\n  }\n}\n</style>\n","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = [\"aria-label\"]\nconst _hoisted_2 = [\"aria-pressed\", \"title\", \"onClick\"]\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", {\n    class: \"switcher\",\n    role: \"group\",\n    \"aria-label\": $props.ariaLabel\n  }, [\n    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.options, (option) => {\n      return (_openBlock(), _createElementBlock(\"button\", {\n        key: option.value,\n        type: \"button\",\n        class: _normalizeClass([\"switcher__seg\", { 'switcher__seg--on': option.value === $props.modelValue }]),\n        \"aria-pressed\": option.value === $props.modelValue,\n        title: option.title,\n        onClick: $event => ($setup.emit('update:modelValue', option.value))\n      }, _toDisplayString(option.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_2))\n    }), 128 /* KEYED_FRAGMENT */))\n  ], 8 /* PROPS */, _hoisted_1))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/ContentSwitcher.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/ContentSwitcher.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/ContentSwitcher.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/ContentSwitcher.vue\";script.__scopeId = \"data-v-ba48afbf\";export default script;","<template>\n  <label class=\"field\">\n    <span v-if=\"label\" class=\"field-label\">{{ label }}</span>\n    <span class=\"field__wrap\">\n      <select class=\"field__select\" :value=\"modelValue\" :disabled=\"disabled\" @change=\"onChange\">\n        <option v-for=\"opt in options\" :key=\"opt.value\" :value=\"opt.value\">{{ opt.label }}</option>\n      </select>\n      <Icon name=\"chevron--down\" class=\"field__caret\" />\n    </span>\n  </label>\n</template>\n\n<script setup lang=\"ts\">\nimport Icon from \"../icons/Icon.vue\";\n\n// Een native <select> in Carbon-jasje. Bewust niet reka-ui: dit veld heeft geen\n// eigen popover-gedrag nodig, en native werkt beter met een toetsenbord en op\n// mobiel. reka-ui is voor de overlay-primitieven die dat wel nodig hebben.\nwithDefaults(defineProps<{\n  modelValue: string;\n  options: Array<{ value: string; label: string }>;\n  label?: string;\n  disabled?: boolean;\n}>(), { disabled: false });\n\nconst emit = defineEmits<{ \"update:modelValue\": [value: string] }>();\n\nfunction onChange(event: Event) {\n  emit(\"update:modelValue\", (event.target as HTMLSelectElement).value);\n}\n</script>\n\n<style scoped>\n.field {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n  min-width: 0;\n}\n\n.field__wrap {\n  position: relative;\n  display: flex;\n  align-items: center;\n}\n\n.field__select {\n  width: 100%;\n  height: 40px;\n  padding: 0 32px 0 12px;\n  border: 0;\n  border-bottom: 1px solid var(--field-line);\n  border-radius: var(--radius) var(--radius) 0 0;\n  background: var(--bg-inset);\n  color: var(--fg-1);\n  font: inherit;\n  appearance: none;\n  cursor: pointer;\n}\n\n.field__caret {\n  position: absolute;\n  right: 10px;\n  color: var(--fg-3);\n  pointer-events: none;\n}\n</style>\n","import { toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createElementVNode as _createElementVNode, createVNode as _createVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"field\" }\nconst _hoisted_2 = {\n  key: 0,\n  class: \"field-label\"\n}\nconst _hoisted_3 = { class: \"field__wrap\" }\nconst _hoisted_4 = [\"value\", \"disabled\"]\nconst _hoisted_5 = [\"value\"]\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"label\", _hoisted_1, [\n    ($props.label)\n      ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString($props.label), 1 /* TEXT */))\n      : _createCommentVNode(\"v-if\", true),\n    _createElementVNode(\"span\", _hoisted_3, [\n      _createElementVNode(\"select\", {\n        class: \"field__select\",\n        value: $props.modelValue,\n        disabled: $props.disabled,\n        onChange: $setup.onChange\n      }, [\n        (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.options, (opt) => {\n          return (_openBlock(), _createElementBlock(\"option\", {\n            key: opt.value,\n            value: opt.value\n          }, _toDisplayString(opt.label), 9 /* TEXT, PROPS */, _hoisted_5))\n        }), 128 /* KEYED_FRAGMENT */))\n      ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_4),\n      _createVNode($setup[\"Icon\"], {\n        name: \"chevron--down\",\n        class: \"field__caret\"\n      })\n    ])\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Select.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Select.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Select.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Select.vue\";script.__scopeId = \"data-v-cde59d01\";export default script;","import { createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createBlock as _createBlock, Fragment as _Fragment, toDisplayString as _toDisplayString, renderList as _renderList, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = {\n  class: \"location-search\",\n  role: \"search\"\n}\nconst _hoisted_2 = [\"placeholder\", \"value\"]\nconst _hoisted_3 = { class: \"location-sheet__head\" }\nconst _hoisted_4 = { class: \"location-sheet__body\" }\nconst _hoisted_5 = { class: \"location-sheet__states\" }\nconst _hoisted_6 = [\"name\", \"value\", \"checked\", \"onChange\"]\nconst _hoisted_7 = { class: \"location-sheet__sort\" }\nconst _hoisted_8 = {\n  key: 0,\n  class: \"location-sheet__error\",\n  role: \"alert\"\n}\nconst _hoisted_9 = { class: \"location-sheet__foot\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", {\n    class: _normalizeClass([\"location-filters\", { 'location-filters--phone': $props.phone }])\n  }, [\n    _createElementVNode(\"div\", _hoisted_1, [\n      _createVNode($setup[\"Icon\"], {\n        name: \"search\",\n        class: \"location-search__icon\"\n      }),\n      _createElementVNode(\"input\", {\n        type: \"search\",\n        \"aria-label\": \"Zoek op bedrijfsnaam, adres of plaats\",\n        placeholder: $props.phone ? 'Zoek locatie' : 'Zoek op bedrijfsnaam, adres of plaats',\n        value: $props.search,\n        onInput: _cache[0] || (_cache[0] = $event => ($setup.emit('update:search', ($event.target as HTMLInputElement).value)))\n      }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_2),\n      ($props.search)\n        ? (_openBlock(), _createElementBlock(\"button\", {\n            key: 0,\n            type: \"button\",\n            class: \"location-search__clear\",\n            \"aria-label\": \"Zoekopdracht wissen\",\n            onClick: _cache[1] || (_cache[1] = $event => ($setup.emit('update:search', '')))\n          }, [\n            _createVNode($setup[\"Icon\"], { name: \"close\" })\n          ]))\n        : _createCommentVNode(\"v-if\", true)\n    ]),\n    (!$props.phone)\n      ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n          _createVNode($setup[\"Select\"], {\n            \"model-value\": $props.province,\n            label: \"Provincie\",\n            options: $props.provinceOptions,\n            \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => ($setup.emit('update:province', $event)))\n          }, null, 8 /* PROPS */, [\"model-value\", \"options\"]),\n          _createVNode($setup[\"Select\"], {\n            \"model-value\": $props.locationType,\n            label: \"Vestigingstype\",\n            options: $props.typeOptions,\n            \"onUpdate:modelValue\": _cache[3] || (_cache[3] = $event => ($setup.emit('update:locationType', $event)))\n          }, null, 8 /* PROPS */, [\"model-value\", \"options\"]),\n          _createVNode($setup[\"ContentSwitcher\"], {\n            \"model-value\": $props.reviewState,\n            options: $setup.stateOptions,\n            \"aria-label\": \"Selectie\",\n            \"onUpdate:modelValue\": _cache[4] || (_cache[4] = $event => ($setup.emit('update:reviewState', $event)))\n          }, null, 8 /* PROPS */, [\"model-value\"]),\n          ($setup.activeCount || $props.search)\n            ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                key: 0,\n                variant: \"ghost\",\n                class: \"location-filters__clear\",\n                onClick: _cache[5] || (_cache[5] = $event => ($setup.emit('clear')))\n              }, {\n                default: _withCtx(() => _cache[12] || (_cache[12] = [\n                  _createTextVNode(\"Filters wissen\", -1 /* CACHED */)\n                ])),\n                _: 1 /* STABLE */,\n                __: [12]\n              }))\n            : _createCommentVNode(\"v-if\", true)\n        ], 64 /* STABLE_FRAGMENT */))\n      : (_openBlock(), _createBlock($setup[\"DialogRoot\"], {\n          key: 1,\n          open: $setup.open,\n          \"onUpdate:open\": _cache[11] || (_cache[11] = $event => (($setup.open) = $event))\n        }, {\n          default: _withCtx(() => [\n            _createVNode($setup[\"DialogTrigger\"], { \"as-child\": \"\" }, {\n              default: _withCtx(() => [\n                _createVNode($setup[\"Button\"], { class: \"location-filters__trigger\" }, {\n                  default: _withCtx(() => [\n                    _createTextVNode(\"Filters\" + _toDisplayString($setup.activeCount ? ` · ${$setup.activeCount}` : \"\") + \" \", 1 /* TEXT */),\n                    _createVNode($setup[\"Icon\"], { name: \"filter\" })\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            }),\n            _createVNode($setup[\"DialogPortal\"], null, {\n              default: _withCtx(() => [\n                _createVNode($setup[\"DialogOverlay\"], { class: \"location-sheet__overlay\" }),\n                _createVNode($setup[\"DialogContent\"], {\n                  class: \"location-sheet\",\n                  \"aria-describedby\": undefined\n                }, {\n                  default: _withCtx(() => [\n                    _createElementVNode(\"header\", _hoisted_3, [\n                      _createVNode($setup[\"DialogTitle\"], { class: \"page-title\" }, {\n                        default: _withCtx(() => _cache[13] || (_cache[13] = [\n                          _createTextVNode(\"Filters\", -1 /* CACHED */)\n                        ])),\n                        _: 1 /* STABLE */,\n                        __: [13]\n                      }),\n                      _createVNode($setup[\"DialogClose\"], {\n                        class: \"location-sheet__close\",\n                        \"aria-label\": \"Filters sluiten\"\n                      }, {\n                        default: _withCtx(() => [\n                          _createVNode($setup[\"Icon\"], { name: \"close\" })\n                        ]),\n                        _: 1 /* STABLE */\n                      })\n                    ]),\n                    _createElementVNode(\"div\", _hoisted_4, [\n                      _createVNode($setup[\"Select\"], {\n                        \"model-value\": $props.province,\n                        label: \"Provincie\",\n                        options: $props.provinceOptions,\n                        \"onUpdate:modelValue\": _cache[6] || (_cache[6] = $event => ($setup.emit('update:province', $event)))\n                      }, null, 8 /* PROPS */, [\"model-value\", \"options\"]),\n                      _createVNode($setup[\"Select\"], {\n                        \"model-value\": $props.locationType,\n                        label: \"Vestigingstype\",\n                        options: $props.typeOptions,\n                        \"onUpdate:modelValue\": _cache[7] || (_cache[7] = $event => ($setup.emit('update:locationType', $event)))\n                      }, null, 8 /* PROPS */, [\"model-value\", \"options\"]),\n                      _createElementVNode(\"fieldset\", _hoisted_5, [\n                        _cache[14] || (_cache[14] = _createElementVNode(\"legend\", null, \"Selectie\", -1 /* CACHED */)),\n                        (_openBlock(), _createElementBlock(_Fragment, null, _renderList($setup.stateOptions, (option) => {\n                          return _createElementVNode(\"label\", {\n                            key: option.value\n                          }, [\n                            _createElementVNode(\"input\", {\n                              type: \"radio\",\n                              name: $setup.radioName,\n                              value: option.value,\n                              checked: $props.reviewState === option.value,\n                              onChange: $event => ($setup.emit('update:reviewState', option.value))\n                            }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_6),\n                            _createTextVNode(\" \" + _toDisplayString(option.label), 1 /* TEXT */)\n                          ])\n                        }), 64 /* STABLE_FRAGMENT */))\n                      ]),\n                      _createElementVNode(\"div\", _hoisted_7, [\n                        _createVNode($setup[\"Select\"], {\n                          \"model-value\": $props.sort.field,\n                          label: \"Sorteren op\",\n                          options: $setup.sortOptions,\n                          \"onUpdate:modelValue\": _cache[8] || (_cache[8] = $event => ($setup.emit('sort', $event as SortField)))\n                        }, null, 8 /* PROPS */, [\"model-value\"]),\n                        _createVNode($setup[\"Button\"], {\n                          onClick: _cache[9] || (_cache[9] = $event => ($setup.emit('sort', $props.sort.field)))\n                        }, {\n                          default: _withCtx(() => [\n                            _createTextVNode(_toDisplayString($props.sort.direction === \"asc\" ? \"Oplopend\" : \"Aflopend\") + \" \", 1 /* TEXT */),\n                            _createVNode($setup[\"Icon\"], {\n                              name: $props.sort.direction === 'asc' ? 'caret--up' : 'caret--down'\n                            }, null, 8 /* PROPS */, [\"name\"])\n                          ]),\n                          _: 1 /* STABLE */\n                        })\n                      ]),\n                      ($props.error)\n                        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_8, _toDisplayString($props.error), 1 /* TEXT */))\n                        : _createCommentVNode(\"v-if\", true)\n                    ]),\n                    _createElementVNode(\"footer\", _hoisted_9, [\n                      _createVNode($setup[\"Button\"], {\n                        variant: \"ghost\",\n                        onClick: _cache[10] || (_cache[10] = $event => ($setup.emit('clear')))\n                      }, {\n                        default: _withCtx(() => _cache[15] || (_cache[15] = [\n                          _createTextVNode(\"Wissen\", -1 /* CACHED */)\n                        ])),\n                        _: 1 /* STABLE */,\n                        __: [15]\n                      }),\n                      _createVNode($setup[\"DialogClose\"], { \"as-child\": \"\" }, {\n                        default: _withCtx(() => [\n                          _createVNode($setup[\"Button\"], {\n                            class: \"location-sheet__apply\",\n                            disabled: $props.loading || Boolean($props.error)\n                          }, {\n                            default: _withCtx(() => [\n                              _createTextVNode(_toDisplayString($props.loading ? \"Laden...\" : `Toon ${$props.total.toLocaleString(\"nl-NL\")} locaties`), 1 /* TEXT */)\n                            ]),\n                            _: 1 /* STABLE */\n                          }, 8 /* PROPS */, [\"disabled\"])\n                        ]),\n                        _: 1 /* STABLE */\n                      })\n                    ])\n                  ]),\n                  _: 1 /* STABLE */\n                })\n              ]),\n              _: 1 /* STABLE */\n            })\n          ]),\n          _: 1 /* STABLE */\n        }, 8 /* PROPS */, [\"open\"]))\n  ], 2 /* CLASS */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationFilters.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationFilters.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationFilters.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationFilters.vue\";script.__scopeId = \"data-v-8d50cbc2\";export default script;","<script setup lang=\"ts\">\nimport { RouterLink } from \"vue-router\";\nimport { formatLocationType } from \"../../lib/location-type\";\nimport { scoreToSuitability, suitabilityLabel, suitabilityToken } from \"../../lib/rating\";\nimport type { api } from \"../../lib/api\";\nimport Icon from \"../icons/Icon.vue\";\nimport StatusGlyph from \"../ui/StatusGlyph.vue\";\n\ntype LocationRow = Awaited<ReturnType<typeof api.findAllLocations>>[\"locations\"][number];\ndefineProps<{\n  locations: LocationRow[];\n  selected: ReadonlySet<number>;\n  selecting: boolean;\n  photoGlyph: (location: LocationRow) => \"yes\" | \"no\" | \"unknown\";\n  photoTitle: (location: LocationRow) => string;\n}>();\nconst emit = defineEmits<{ toggle: [id: number] }>();\n</script>\n\n<template>\n  <ul class=\"location-rows\" aria-label=\"Locaties\">\n    <li v-for=\"location in locations\" :key=\"location.id\" class=\"location-row\" :class=\"[{ 'location-row--selected': selected.has(location.id) }, `location-row--${suitabilityToken(scoreToSuitability(location.latestScore))}`]\">\n      <label v-if=\"selecting\" class=\"location-row__select\">\n        <input class=\"snl-checkbox\" type=\"checkbox\" :checked=\"selected.has(location.id)\" :aria-label=\"`${location.companyName} selecteren`\" @change=\"emit('toggle', location.id)\">\n      </label>\n      <RouterLink :to=\"{ name: 'location-detail', params: { id: location.id } }\" class=\"location-row__link\">\n        <span class=\"location-row__score\" :title=\"suitabilityLabel(scoreToSuitability(location.latestScore))\">\n          <span class=\"location-row__number tnum\">{{ location.latestScore === null ? \"–\" : location.latestScore }}</span>\n          <span v-if=\"location.requiresHumanReview\" class=\"location-row__review\">review</span>\n        </span>\n        <span class=\"location-row__text\">\n          <span class=\"location-row__name\">{{ location.companyName }}</span>\n          <span class=\"location-row__address\">{{ [location.address, location.city].filter(Boolean).join(\" · \") }}</span>\n          <span class=\"location-row__meta\">{{ [formatLocationType(location.locationType), location.province].filter(Boolean).join(\" · \") }}</span>\n        </span>\n        <StatusGlyph v-if=\"photoGlyph(location) !== 'yes'\" :state=\"photoGlyph(location)\" :title=\"photoTitle(location)\" />\n        <span v-else class=\"location-row__sr\">Foto's: {{ photoTitle(location) }}</span>\n        <Icon name=\"chevron--right\" class=\"location-row__chevron\" />\n      </RouterLink>\n    </li>\n  </ul>\n</template>\n\n<style scoped>\n.location-rows { margin: 0; padding: 0; list-style: none; }\n.location-row {\n  --location-score: var(--border-2);\n  --location-score-text: var(--fg-4);\n  display: flex;\n  border-bottom: 1px solid var(--border-1);\n  border-left: 3px solid var(--location-score);\n  background: var(--bg-surface);\n}\n.location-row--score {\n  --location-score: var(--score);\n  --location-score-text: var(--score-fg);\n}\n.location-row--diverge {\n  --location-score: var(--diverge);\n  --location-score-text: var(--diverge-fg);\n}\n.location-row--danger {\n  --location-score: var(--danger);\n  --location-score-text: var(--danger-fg);\n}\n.location-row--selected { background: var(--bg-inset); }\n.location-row__select {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  flex: 0 0 44px;\n  cursor: pointer;\n}\n.location-row__link {\n  display: flex;\n  align-items: center;\n  flex: 1;\n  min-width: 0;\n  gap: 12px;\n  padding: 10px 12px;\n  min-height: 75px;\n  cursor: pointer;\n}\n.location-row__score {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 2px;\n  flex: 0 0 40px;\n}\n.location-row__number {\n  font-size: 22px;\n  font-weight: 600;\n  line-height: 22px;\n  color: var(--location-score-text);\n}\n.location-row__review {\n  color: var(--diverge-fg);\n  font-size: var(--text-caption);\n  line-height: 16px;\n}\n.location-row__text {\n  display: flex;\n  flex-direction: column;\n  gap: 2px;\n  min-width: 0;\n  flex: 1;\n}\n.location-row__name, .location-row__address, .location-row__meta {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n.location-row__name {\n  font-size: var(--text-ui);\n  font-weight: 600;\n  line-height: 18px;\n}\n.location-row__address, .location-row__meta {\n  font-size: var(--text-caption);\n  line-height: 16px;\n  color: var(--fg-3);\n}\n.location-row__meta { color: var(--fg-4); }\n.location-row__chevron { flex: none; color: var(--fg-3); }\n.location-row__sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  overflow: hidden;\n  clip-path: inset(50%);\n}\n.location-row__link:active { background: var(--bg-inset); }\n@media (hover: hover) { .location-row__link:hover { background: var(--bg-inset); } }\n</style>\n","/**\n * Maps the raw OSM amenity/shop tag stored in `location.location_type`\n * (populated by `js/import-locations.ts`) to a Dutch label for the UI.\n *\n * Unknown values fall through to the raw tag so newly-imported categories stay\n * visible until a label is added here.\n */\nconst LOCATION_TYPE_LABELS: Record<string, string> = {\n  fuel: \"Tankstation\",\n  car_wash: \"Wasstraat\",\n  doityourself: \"Doe-het-zelf\",\n  hardware: \"IJzerwaren\",\n  garden_centre: \"Tuincentrum\",\n};\n\nexport function formatLocationType(type: string | null | undefined): string {\n  if (!type) return \"-\";\n  return LOCATION_TYPE_LABELS[type] ?? type;\n}\n\n/**\n * De keuzes in het vestigingstype-filter, in dropdown-volgorde. Dit is de vaste\n * lijst die de importer kan opleveren; een tag die hier nog niet in staat is wel\n * zichtbaar in de tabel (via de terugval hierboven) maar nog niet filterbaar.\n * Een nieuwe amenity importeren betekent dus: ook hier een label bijzetten.\n */\nexport const LOCATION_TYPE_OPTIONS: ReadonlyArray<{ value: string; label: string }> =\n  Object.entries(LOCATION_TYPE_LABELS).map(([value, label]) => ({ value, label }));\n","/**\n * De geschiktheidsschaal van de admin.\n *\n * Eén vaste schaal, overal: in de lijst, op de detailpagina, in de legenda en\n * in de filters. De grenzen komen van de pagina /scoring, die de formule\n * publiceert:\n *\n *   75 tot 100  Zeer geschikt\n *   55 tot 74   Geschikt\n *   35 tot 54   Beperkt geschikt\n *   0 tot 34    Ongeschikt\n *\n * Let op het verschil tussen 0 en niets: 0 is een echt resultaat (een harde\n * uitsluiting scoort 0), null betekent dat er nog geen analyse is.\n *\n * BEKEND VERSCHIL: de SNL Scout PWA hanteert 85/65/40 (lib/scoutScore.ts), dus\n * admin en veldapp labelen dezelfde score anders. Bestaande inconsistentie,\n * niet in deze migratie opgelost.\n */\nexport const SUITABILITY_LEVELS = [\n  \"zeer_geschikt\",\n  \"geschikt\",\n  \"beperkt\",\n  \"ongeschikt\",\n  \"geen_analyse\",\n] as const;\n\nexport type SuitabilityLevel = (typeof SUITABILITY_LEVELS)[number];\n\n/** Het statustoken waarop een niveau getekend wordt. De component zet er zelf\n    een klasse van (`badge--score`), zodat er geen Tailwind-utility-strings in\n    deze pure lib staan zoals in de Next-versie. */\nexport type StatusToken = \"score\" | \"diverge\" | \"danger\" | \"neutral\";\n\nexport function scoreToSuitability(score: number | null | undefined): SuitabilityLevel {\n  if (score === null || score === undefined || Number.isNaN(score)) return \"geen_analyse\";\n  if (score >= 75) return \"zeer_geschikt\";\n  if (score >= 55) return \"geschikt\";\n  if (score >= 35) return \"beperkt\";\n  return \"ongeschikt\";\n}\n\nconst LABELS: Record<SuitabilityLevel, string> = {\n  zeer_geschikt: \"Zeer geschikt\",\n  geschikt: \"Geschikt\",\n  beperkt: \"Beperkt geschikt\",\n  ongeschikt: \"Ongeschikt\",\n  geen_analyse: \"Geen analyse\",\n};\n\nexport function suitabilityLabel(level: SuitabilityLevel): string {\n  return LABELS[level];\n}\n\n/**\n * De twee groene niveaus delen bewust één token: het ontwerp kleurt scores\n * grofmazig en het verschil tussen geschikt en zeer geschikt zit in het label,\n * niet in de kleur. Meer tinten zou suggereren dat de score preciezer is dan\n * hij is. Kleur staat sowieso nooit alleen: er hoort altijd een label of getal\n * bij.\n */\nconst TOKENS: Record<SuitabilityLevel, StatusToken> = {\n  zeer_geschikt: \"score\",\n  geschikt: \"score\",\n  beperkt: \"diverge\",\n  ongeschikt: \"danger\",\n  geen_analyse: \"neutral\",\n};\n\nexport function suitabilityToken(level: SuitabilityLevel): StatusToken {\n  return TOKENS[level];\n}\n","<template>\n  <span class=\"glyph\" :class=\"`glyph--${tone}`\" :title=\"title\">\n    <Icon :name=\"iconName\" :size=\"14\" />\n  </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport Icon from \"../icons/Icon.vue\";\n\n// Ja/nee/onbekend als teken plus kleur, nooit kleur alleen. Dat is een bewuste\n// afwijking van de kit, die hier vijf bolletjes zet die alleen in kleur\n// verschillen: onze derde staat is \"geen oordeel\", en die is met kleur alleen\n// niet van \"nee\" te onderscheiden.\nconst props = defineProps<{ state: \"yes\" | \"no\" | \"unknown\"; title?: string }>();\n\nconst iconName = computed(() =>\n  props.state === \"yes\" ? \"checkmark\" : props.state === \"no\" ? \"close\" : \"subtract\");\n\nconst tone = computed(() =>\n  props.state === \"yes\" ? \"score\" : props.state === \"no\" ? \"danger\" : \"neutral\");\n</script>\n\n<style scoped>\n.glyph {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  width: 20px;\n  height: 20px;\n  border-radius: var(--radius);\n}\n\n.glyph--score {\n  color: var(--score-fg);\n}\n\n.glyph--danger {\n  color: var(--danger-fg);\n}\n\n.glyph--neutral {\n  color: var(--fg-4);\n}\n</style>\n","import { createVNode as _createVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"title\"]\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"span\", {\n    class: _normalizeClass([\"glyph\", `glyph--${$setup.tone}`]),\n    title: $props.title\n  }, [\n    _createVNode($setup[\"Icon\"], {\n      name: $setup.iconName,\n      size: 14\n    }, null, 8 /* PROPS */, [\"name\"])\n  ], 10 /* CLASS, PROPS */, _hoisted_1))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/StatusGlyph.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/StatusGlyph.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/StatusGlyph.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/StatusGlyph.vue\";script.__scopeId = \"data-v-80d589f7\";export default script;","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createBlock as _createBlock, createVNode as _createVNode, withCtx as _withCtx, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = {\n  class: \"location-rows\",\n  \"aria-label\": \"Locaties\"\n}\nconst _hoisted_2 = {\n  key: 0,\n  class: \"location-row__select\"\n}\nconst _hoisted_3 = [\"checked\", \"aria-label\", \"onChange\"]\nconst _hoisted_4 = [\"title\"]\nconst _hoisted_5 = { class: \"location-row__number tnum\" }\nconst _hoisted_6 = {\n  key: 0,\n  class: \"location-row__review\"\n}\nconst _hoisted_7 = { class: \"location-row__text\" }\nconst _hoisted_8 = { class: \"location-row__name\" }\nconst _hoisted_9 = { class: \"location-row__address\" }\nconst _hoisted_10 = { class: \"location-row__meta\" }\nconst _hoisted_11 = {\n  key: 1,\n  class: \"location-row__sr\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"ul\", _hoisted_1, [\n    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.locations, (location) => {\n      return (_openBlock(), _createElementBlock(\"li\", {\n        key: location.id,\n        class: _normalizeClass([\"location-row\", [{ 'location-row--selected': $props.selected.has(location.id) }, `location-row--${$setup.suitabilityToken($setup.scoreToSuitability(location.latestScore))}`]])\n      }, [\n        ($props.selecting)\n          ? (_openBlock(), _createElementBlock(\"label\", _hoisted_2, [\n              _createElementVNode(\"input\", {\n                class: \"snl-checkbox\",\n                type: \"checkbox\",\n                checked: $props.selected.has(location.id),\n                \"aria-label\": `${location.companyName} selecteren`,\n                onChange: $event => ($setup.emit('toggle', location.id))\n              }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_3)\n            ]))\n          : _createCommentVNode(\"v-if\", true),\n        _createVNode($setup[\"RouterLink\"], {\n          to: { name: 'location-detail', params: { id: location.id } },\n          class: \"location-row__link\"\n        }, {\n          default: _withCtx(() => [\n            _createElementVNode(\"span\", {\n              class: \"location-row__score\",\n              title: $setup.suitabilityLabel($setup.scoreToSuitability(location.latestScore))\n            }, [\n              _createElementVNode(\"span\", _hoisted_5, _toDisplayString(location.latestScore === null ? \"–\" : location.latestScore), 1 /* TEXT */),\n              (location.requiresHumanReview)\n                ? (_openBlock(), _createElementBlock(\"span\", _hoisted_6, \"review\"))\n                : _createCommentVNode(\"v-if\", true)\n            ], 8 /* PROPS */, _hoisted_4),\n            _createElementVNode(\"span\", _hoisted_7, [\n              _createElementVNode(\"span\", _hoisted_8, _toDisplayString(location.companyName), 1 /* TEXT */),\n              _createElementVNode(\"span\", _hoisted_9, _toDisplayString([location.address, location.city].filter(Boolean).join(\" · \")), 1 /* TEXT */),\n              _createElementVNode(\"span\", _hoisted_10, _toDisplayString([$setup.formatLocationType(location.locationType), location.province].filter(Boolean).join(\" · \")), 1 /* TEXT */)\n            ]),\n            ($props.photoGlyph(location) !== 'yes')\n              ? (_openBlock(), _createBlock($setup[\"StatusGlyph\"], {\n                  key: 0,\n                  state: $props.photoGlyph(location),\n                  title: $props.photoTitle(location)\n                }, null, 8 /* PROPS */, [\"state\", \"title\"]))\n              : (_openBlock(), _createElementBlock(\"span\", _hoisted_11, \"Foto's: \" + _toDisplayString($props.photoTitle(location)), 1 /* TEXT */)),\n            _createVNode($setup[\"Icon\"], {\n              name: \"chevron--right\",\n              class: \"location-row__chevron\"\n            })\n          ]),\n          _: 2 /* DYNAMIC */\n        }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"])\n      ], 2 /* CLASS */))\n    }), 128 /* KEYED_FRAGMENT */))\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationMobileList.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationMobileList.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationMobileList.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationMobileList.vue\";script.__scopeId = \"data-v-bbb222c9\";export default script;","// Keep request identity outside the instance so reactive proxies can call load.\nconst requests = new WeakMap<object, { key: string }>();\n\nexport class LocationPages<T extends { id: number }> {\n  public items: T[] = [];\n  public total = 0;\n  public page = 0;\n  public loading = false;\n  public error: string | null = null;\n\n  public async load(options: { key: string; page: number; append: boolean; fetch: () => Promise<{ locations: T[]; total: number }> }): Promise<void> {\n    const append = options.append && requests.get(this)?.key === options.key;\n    const request = { key: options.key };\n    requests.set(this, request);\n    if (!append) {\n      this.items = [];\n      this.total = 0;\n      this.page = 0;\n    }\n    this.loading = true;\n    this.error = null;\n    try {\n      const result = await options.fetch();\n      if (requests.get(this) !== request)\n        return;\n      const locations = append ? [...this.items, ...result.locations] : result.locations;\n      const ids = new Set<number>();\n      this.items = locations.filter(location => {\n        if (ids.has(location.id))\n          return false;\n        ids.add(location.id);\n        return true;\n      });\n      this.total = result.total;\n      this.page = options.page;\n    } catch (error) {\n      if (requests.get(this) === request)\n        this.error = error instanceof Error ? error.message : \"Locaties laden is mislukt. Probeer het opnieuw.\";\n    } finally {\n      if (requests.get(this) === request)\n        this.loading = false;\n    }\n  }\n}\n","<script setup lang=\"ts\">\nimport { reactive, shallowRef, useId, useTemplateRef, watch } from \"vue\";\nimport { useRouter } from \"vue-router\";\nimport { api } from \"../../lib/api\";\nimport { buildManualLocationRequest, validateManualLocation, type ManualLocationRequest } from \"../../lib/add-location\";\nimport { LOCATION_TYPE_OPTIONS } from \"../../lib/location-type\";\nimport Icon from \"../icons/Icon.vue\";\nimport Button from \"../ui/Button.vue\";\nimport Dialog from \"../ui/Dialog.vue\";\nimport Input from \"../ui/Input.vue\";\nimport Select from \"../ui/Select.vue\";\n\nwithDefaults(defineProps<{ compact?: boolean; compactLabel?: string }>(), { compact: false, compactLabel: \"Locatie\" });\n\nconst router = useRouter();\nconst open = shallowRef(false);\nconst pending = shallowRef(false);\nconst fields = reactive({ address: \"\", companyName: \"\", locationType: \"\" });\nconst addressError = shallowRef<string | null>(null);\nconst error = shallowRef<string | null>(null);\nconst duplicateWarning = shallowRef<{\n  request: ManualLocationRequest;\n  duplicates: Awaited<ReturnType<typeof api.createManualLocation>>[\"duplicates\"];\n} | null>(null);\nconst form = useTemplateRef<HTMLFormElement>(\"form\");\nconst formId = useId();\nconst addressErrorId = `${formId}-address-error`;\nconst typeOptions = [{ value: \"\", label: \"Niet opgegeven\" }, ...LOCATION_TYPE_OPTIONS];\n\nwatch(fields, () => {\n  duplicateWarning.value = null;\n  addressError.value = null;\n  error.value = null;\n}, { flush: \"sync\" });\n\nfunction setOpen(value: boolean) {\n  if (pending.value) return;\n  open.value = value;\n  if (!value) reset();\n}\n\nfunction reset() {\n  Object.assign(fields, { address: \"\", companyName: \"\", locationType: \"\" });\n  addressError.value = null;\n  error.value = null;\n  duplicateWarning.value = null;\n}\n\nasync function submit() {\n  if (pending.value) return;\n  addressError.value = validateManualLocation(fields);\n  if (addressError.value) {\n    form.value?.querySelector(\"input\")?.focus();\n    return;\n  }\n  const request = buildManualLocationRequest({\n    fields,\n    checkedRequest: duplicateWarning.value?.request,\n    force: duplicateWarning.value !== null,\n  });\n  error.value = null;\n  pending.value = true;\n  let locationId: number | null = null;\n  try {\n    const result = await api.createManualLocation(request);\n    if (result.locationId === null && result.duplicates.length > 0) {\n      duplicateWarning.value = { request, duplicates: result.duplicates };\n      return;\n    }\n    if (typeof result.locationId !== \"number\") {\n      error.value = \"Aanmaken mislukt: de server gaf geen locatie terug.\";\n      return;\n    }\n    locationId = result.locationId;\n  } catch (err) {\n    error.value = err instanceof Error ? err.message : \"Kon de locatie niet aanmaken. Probeer het opnieuw.\";\n  } finally {\n    pending.value = false;\n  }\n  if (locationId !== null) {\n    setOpen(false);\n    await router.push({ name: \"location-detail\", params: { id: locationId } });\n  }\n}\n</script>\n\n<template>\n  <Button\n    variant=\"primary\"\n    class=\"add-location__action\"\n    :class=\"{ 'add-location__trigger--compact': compact }\"\n    @click=\"setOpen(true)\"\n  >\n    {{ compact ? compactLabel : \"Locatie toevoegen\" }}\n    <Icon name=\"add\" />\n  </Button>\n  <Dialog\n    :open=\"open\"\n    title=\"Locatie toevoegen\"\n    description=\"Het adres wordt opgezocht bij PDOK. Plaats, postcode en provincie vullen zichzelf, coördinaten komen uit die zoekactie.\"\n    :max-width=\"512\"\n    @update:open=\"setOpen\"\n  >\n    <form :id=\"formId\" ref=\"form\" class=\"add-location\" novalidate @submit.prevent=\"submit\">\n      <div role=\"group\" :aria-invalid=\"Boolean(addressError)\" :aria-describedby=\"addressError ? addressErrorId : undefined\">\n        <Input\n          v-model=\"fields.address\"\n          label=\"Adres\"\n          placeholder=\"Straatnaam 12, Plaats\"\n          :disabled=\"pending\"\n          :class=\"{ 'add-location__invalid': addressError }\"\n        />\n        <p v-if=\"addressError\" :id=\"addressErrorId\" class=\"add-location__field-error\" role=\"alert\">{{ addressError }}</p>\n      </div>\n      <Input\n        v-model=\"fields.companyName\"\n        label=\"Bedrijfsnaam\"\n        placeholder=\"Laat leeg voor Onbekende locatie\"\n        :disabled=\"pending\"\n      />\n      <Select v-model=\"fields.locationType\" label=\"Vestigingstype\" :options=\"typeOptions\" :disabled=\"pending\" />\n      <div v-if=\"duplicateWarning\" class=\"add-location__warning\" role=\"status\">\n        <p class=\"add-location__warning-title\">\n          <Icon name=\"warning--filled\" />\n          {{ duplicateWarning.duplicates.length === 1\n            ? \"Er staat al een locatie binnen 150 meter\"\n            : `Er staan al ${duplicateWarning.duplicates.length} locaties binnen 150 meter` }}\n        </p>\n        <ul class=\"add-location__duplicates\">\n          <li v-for=\"duplicate in duplicateWarning.duplicates\" :key=\"duplicate.id\" class=\"add-location__duplicate\">\n            <span class=\"add-location__distance\">{{ Math.round(duplicate.distanceMeters) }} m</span>\n            <span class=\"add-location__duplicate-address\">{{ duplicate.companyName }} · {{ duplicate.address }}</span>\n          </li>\n        </ul>\n        <p class=\"add-location__warning-help\">Is dit echt een ander pand? Kies dan Toch toevoegen.</p>\n      </div>\n      <div v-if=\"error\" class=\"add-location__error\" role=\"alert\">{{ error }}</div>\n    </form>\n    <template #footer>\n      <Button :disabled=\"pending\" @click=\"setOpen(false)\">Annuleren</Button>\n      <Button variant=\"primary\" type=\"submit\" :form=\"formId\" :busy=\"pending\" class=\"add-location__action\">\n        {{ duplicateWarning ? (pending ? \"Toevoegen...\" : \"Toch toevoegen\") : (pending ? \"Aanmaken...\" : \"Aanmaken\") }}\n      </Button>\n    </template>\n  </Dialog>\n</template>\n\n<style scoped>\n.add-location {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n}\n\n.add-location__trigger--compact {\n  min-height: 44px;\n}\n\n.add-location__invalid :deep(input) {\n  border-bottom-color: var(--danger);\n}\n\n.add-location__field-error {\n  margin: 6px 0 0;\n  color: var(--danger-fg);\n  font-size: var(--text-caption);\n}\n\n.add-location__warning {\n  padding: 12px;\n  border: 1px solid var(--diverge-border);\n  background: var(--diverge-bg);\n  color: var(--diverge-fg);\n}\n\n.add-location__warning-title {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  margin: 0;\n  font-size: var(--text-ui);\n  font-weight: 500;\n}\n\n.add-location__duplicates {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n  margin: 8px 0 0;\n  padding: 0;\n  list-style: none;\n  font-size: var(--text-caption);\n}\n\n.add-location__duplicate {\n  display: flex;\n  gap: 8px;\n}\n\n.add-location__distance {\n  flex: none;\n  font-variant-numeric: tabular-nums;\n}\n\n.add-location__duplicate-address {\n  min-width: 0;\n  overflow-wrap: anywhere;\n}\n\n.add-location__warning-help {\n  margin: 8px 0 0;\n  font-size: var(--text-caption);\n}\n\n.add-location__error {\n  padding: 12px;\n  border: 1px solid var(--danger-border);\n  background: var(--danger-bg);\n  color: var(--danger-fg);\n  font-size: var(--text-ui);\n}\n\n@media (hover: hover) {\n  .add-location__action:hover:not(:disabled) {\n    background: var(--brand-hover);\n  }\n}\n</style>\n","export interface ManualLocationFields {\n  address: string;\n  companyName: string;\n  locationType: string;\n}\n\nexport interface ManualLocationRequest {\n  address: string;\n  companyName: string | null;\n  locationType: string | null;\n  force: boolean;\n}\n\nexport function validateManualLocation(fields: ManualLocationFields): string | null {\n  return fields.address.trim() ? null : \"Vul een adres in.\";\n}\n\nexport function buildManualLocationRequest(options: {\n  fields: ManualLocationFields;\n  checkedRequest?: ManualLocationRequest | null;\n  force?: boolean;\n}): ManualLocationRequest {\n  const request = {\n    address: options.fields.address,\n    companyName: options.fields.companyName || null,\n    locationType: options.fields.locationType || null,\n    force: false,\n  };\n  const checked = options.checkedRequest;\n  request.force = Boolean(options.force && checked\n    && checked.address === request.address\n    && checked.companyName === request.companyName\n    && checked.locationType === request.locationType);\n  return request;\n}\n","<template>\n  <label class=\"field\">\n    <span v-if=\"label\" class=\"field-label\">{{ label }}</span>\n    <span class=\"field__wrap\">\n      <Icon v-if=\"icon\" :name=\"icon\" class=\"field__icon\" />\n      <input\n        class=\"field__input\"\n        :class=\"{ 'field__input--iconed': icon }\"\n        :type=\"type\"\n        :value=\"modelValue\"\n        :placeholder=\"placeholder\"\n        :disabled=\"disabled\"\n        @input=\"onInput\"\n      >\n    </span>\n  </label>\n</template>\n\n<script setup lang=\"ts\">\nimport Icon from \"../icons/Icon.vue\";\n\n// Carbon-veld: geen kader, alleen een onderlijn, 40px hoog, radius alleen\n// bovenaan.\n//\n// LET OP: modelValue is hier altijd een string, ook voor type=\"number\". Een\n// v-model op <input type=\"number\"> maakt van een string-ref stil een number,\n// en dat is onzichtbaar voor checkmodule. Callers die een getal willen parsen\n// het zelf.\nwithDefaults(defineProps<{\n  modelValue: string;\n  label?: string;\n  placeholder?: string;\n  type?: string;\n  icon?: string;\n  disabled?: boolean;\n}>(), { type: \"text\", disabled: false });\n\nconst emit = defineEmits<{ \"update:modelValue\": [value: string] }>();\n\nfunction onInput(event: Event) {\n  emit(\"update:modelValue\", (event.target as HTMLInputElement).value);\n}\n</script>\n\n<style scoped>\n.field {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n  min-width: 0;\n}\n\n.field__wrap {\n  position: relative;\n  display: flex;\n  align-items: center;\n}\n\n.field__icon {\n  position: absolute;\n  left: 10px;\n  color: var(--fg-4);\n  pointer-events: none;\n}\n\n.field__input {\n  width: 100%;\n  height: 40px;\n  padding: 0 12px;\n  border: 0;\n  border-bottom: 1px solid var(--field-line);\n  border-radius: var(--radius) var(--radius) 0 0;\n  background: var(--bg-inset);\n  color: var(--fg-1);\n  font: inherit;\n}\n\n/* Zie LoginView: focus verzwaart de onderlijn, geen kader eromheen. */\n.field__input:focus-visible {\n  outline: none;\n  border-bottom-color: var(--fg-1);\n  box-shadow: 0 1px 0 var(--fg-1);\n}\n\n.field__input--iconed {\n  padding-left: 32px;\n}\n\n.field__input::placeholder {\n  color: var(--fg-4);\n}\n\n.field__input:disabled {\n  opacity: 0.5;\n}\n</style>\n","import { toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"field\" }\nconst _hoisted_2 = {\n  key: 0,\n  class: \"field-label\"\n}\nconst _hoisted_3 = { class: \"field__wrap\" }\nconst _hoisted_4 = [\"type\", \"value\", \"placeholder\", \"disabled\"]\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"label\", _hoisted_1, [\n    ($props.label)\n      ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString($props.label), 1 /* TEXT */))\n      : _createCommentVNode(\"v-if\", true),\n    _createElementVNode(\"span\", _hoisted_3, [\n      ($props.icon)\n        ? (_openBlock(), _createBlock($setup[\"Icon\"], {\n            key: 0,\n            name: $props.icon,\n            class: \"field__icon\"\n          }, null, 8 /* PROPS */, [\"name\"]))\n        : _createCommentVNode(\"v-if\", true),\n      _createElementVNode(\"input\", {\n        class: _normalizeClass([\"field__input\", { 'field__input--iconed': $props.icon }]),\n        type: $props.type,\n        value: $props.modelValue,\n        placeholder: $props.placeholder,\n        disabled: $props.disabled,\n        onInput: $setup.onInput\n      }, null, 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_4)\n    ])\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Input.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Input.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Input.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Input.vue\";script.__scopeId = \"data-v-4d207871\";export default script;","import { toDisplayString as _toDisplayString, createVNode as _createVNode, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, withModifiers as _withModifiers } from \"vue\"\n\nconst _hoisted_1 = [\"id\"]\nconst _hoisted_2 = [\"aria-invalid\", \"aria-describedby\"]\nconst _hoisted_3 = {\n  key: 0,\n  class: \"add-location__warning\",\n  role: \"status\"\n}\nconst _hoisted_4 = { class: \"add-location__warning-title\" }\nconst _hoisted_5 = { class: \"add-location__duplicates\" }\nconst _hoisted_6 = { class: \"add-location__distance\" }\nconst _hoisted_7 = { class: \"add-location__duplicate-address\" }\nconst _hoisted_8 = {\n  key: 1,\n  class: \"add-location__error\",\n  role: \"alert\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(_Fragment, null, [\n    _createVNode($setup[\"Button\"], {\n      variant: \"primary\",\n      class: _normalizeClass([\"add-location__action\", { 'add-location__trigger--compact': $props.compact }]),\n      onClick: _cache[0] || (_cache[0] = $event => ($setup.setOpen(true)))\n    }, {\n      default: _withCtx(() => [\n        _createTextVNode(_toDisplayString($props.compact ? $props.compactLabel : \"Locatie toevoegen\") + \" \", 1 /* TEXT */),\n        _createVNode($setup[\"Icon\"], { name: \"add\" })\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"class\"]),\n    _createVNode($setup[\"Dialog\"], {\n      open: $setup.open,\n      title: \"Locatie toevoegen\",\n      description: \"Het adres wordt opgezocht bij PDOK. Plaats, postcode en provincie vullen zichzelf, coördinaten komen uit die zoekactie.\",\n      \"max-width\": 512,\n      \"onUpdate:open\": $setup.setOpen\n    }, {\n      footer: _withCtx(() => [\n        _createVNode($setup[\"Button\"], {\n          disabled: $setup.pending,\n          onClick: _cache[4] || (_cache[4] = $event => ($setup.setOpen(false)))\n        }, {\n          default: _withCtx(() => _cache[6] || (_cache[6] = [\n            _createTextVNode(\"Annuleren\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [6]\n        }, 8 /* PROPS */, [\"disabled\"]),\n        _createVNode($setup[\"Button\"], {\n          variant: \"primary\",\n          type: \"submit\",\n          form: $setup.formId,\n          busy: $setup.pending,\n          class: \"add-location__action\"\n        }, {\n          default: _withCtx(() => [\n            _createTextVNode(_toDisplayString($setup.duplicateWarning ? ($setup.pending ? \"Toevoegen...\" : \"Toch toevoegen\") : ($setup.pending ? \"Aanmaken...\" : \"Aanmaken\")), 1 /* TEXT */)\n          ]),\n          _: 1 /* STABLE */\n        }, 8 /* PROPS */, [\"form\", \"busy\"])\n      ]),\n      default: _withCtx(() => [\n        _createElementVNode(\"form\", {\n          id: $setup.formId,\n          ref: \"form\",\n          class: \"add-location\",\n          novalidate: \"\",\n          onSubmit: _withModifiers($setup.submit, [\"prevent\"])\n        }, [\n          _createElementVNode(\"div\", {\n            role: \"group\",\n            \"aria-invalid\": Boolean($setup.addressError),\n            \"aria-describedby\": $setup.addressError ? $setup.addressErrorId : undefined\n          }, [\n            _createVNode($setup[\"Input\"], {\n              modelValue: $setup.fields.address,\n              \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => (($setup.fields.address) = $event)),\n              label: \"Adres\",\n              placeholder: \"Straatnaam 12, Plaats\",\n              disabled: $setup.pending,\n              class: _normalizeClass({ 'add-location__invalid': $setup.addressError })\n            }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\", \"class\"]),\n            ($setup.addressError)\n              ? (_openBlock(), _createElementBlock(\"p\", {\n                  key: 0,\n                  id: $setup.addressErrorId,\n                  class: \"add-location__field-error\",\n                  role: \"alert\"\n                }, _toDisplayString($setup.addressError), 1 /* TEXT */))\n              : _createCommentVNode(\"v-if\", true)\n          ], 8 /* PROPS */, _hoisted_2),\n          _createVNode($setup[\"Input\"], {\n            modelValue: $setup.fields.companyName,\n            \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => (($setup.fields.companyName) = $event)),\n            label: \"Bedrijfsnaam\",\n            placeholder: \"Laat leeg voor Onbekende locatie\",\n            disabled: $setup.pending\n          }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\"]),\n          _createVNode($setup[\"Select\"], {\n            modelValue: $setup.fields.locationType,\n            \"onUpdate:modelValue\": _cache[3] || (_cache[3] = $event => (($setup.fields.locationType) = $event)),\n            label: \"Vestigingstype\",\n            options: $setup.typeOptions,\n            disabled: $setup.pending\n          }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\"]),\n          ($setup.duplicateWarning)\n            ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [\n                _createElementVNode(\"p\", _hoisted_4, [\n                  _createVNode($setup[\"Icon\"], { name: \"warning--filled\" }),\n                  _createTextVNode(\" \" + _toDisplayString($setup.duplicateWarning.duplicates.length === 1\n            ? \"Er staat al een locatie binnen 150 meter\"\n            : `Er staan al ${$setup.duplicateWarning.duplicates.length} locaties binnen 150 meter`), 1 /* TEXT */)\n                ]),\n                _createElementVNode(\"ul\", _hoisted_5, [\n                  (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.duplicateWarning.duplicates, (duplicate) => {\n                    return (_openBlock(), _createElementBlock(\"li\", {\n                      key: duplicate.id,\n                      class: \"add-location__duplicate\"\n                    }, [\n                      _createElementVNode(\"span\", _hoisted_6, _toDisplayString(Math.round(duplicate.distanceMeters)) + \" m\", 1 /* TEXT */),\n                      _createElementVNode(\"span\", _hoisted_7, _toDisplayString(duplicate.companyName) + \" · \" + _toDisplayString(duplicate.address), 1 /* TEXT */)\n                    ]))\n                  }), 128 /* KEYED_FRAGMENT */))\n                ]),\n                _cache[5] || (_cache[5] = _createElementVNode(\"p\", { class: \"add-location__warning-help\" }, \"Is dit echt een ander pand? Kies dan Toch toevoegen.\", -1 /* CACHED */))\n              ]))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.error)\n            ? (_openBlock(), _createElementBlock(\"div\", _hoisted_8, _toDisplayString($setup.error), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true)\n        ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_1)\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"open\"])\n  ], 64 /* STABLE_FRAGMENT */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/AddLocationDialog.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/AddLocationDialog.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/AddLocationDialog.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/AddLocationDialog.vue\";script.__scopeId = \"data-v-c6f74bdd\";export default script;","import { onBeforeUnmount, ref, type Ref } from \"vue\";\nimport { BREAKPOINT_DESKTOP, BREAKPOINT_TABLET, breakpointOf, type Breakpoint } from \"./breakpoint\";\n\n/**\n * The current breakpoint class, live. Call it from `<script setup>` so the\n * listeners are cleaned up with the component.\n *\n * Two media queries instead of a resize listener: the browser decides when\n * something changes, so we do not re-render on every pixel.\n */\nexport function useBreakpoint(): Ref<Breakpoint> {\n  const breakpoint = ref<Breakpoint>(breakpointOf(window.innerWidth));\n  const queries = [\n    window.matchMedia(`(min-width: ${BREAKPOINT_TABLET}px)`),\n    window.matchMedia(`(min-width: ${BREAKPOINT_DESKTOP}px)`),\n  ];\n  const update = () => {\n    breakpoint.value = breakpointOf(window.innerWidth);\n  };\n  queries.forEach((query) => query.addEventListener(\"change\", update));\n  onBeforeUnmount(() => queries.forEach((query) => query.removeEventListener(\"change\", update)));\n  return breakpoint;\n}\n","/**\n * De breekpunten van het design system, als data.\n *\n * De kit werkt met inline styles en kent dus geen media queries: elk component\n * vraagt daar de klasse op via `useBreakpoint()`. Wij stylen met CSS en doen het\n * meeste dus in media queries, maar een deel van het gedrag is echt gedrag en\n * geen opmaak: op een telefoon is de kaart in de Verkenner het hoofdbeeld en\n * komen lijst, detail en filters als blad van onderen op. Dat vraagt om state,\n * en dus om een breekpunt in JavaScript.\n *\n * Dit bestand is Vue-vrij en puur, zodat de klassering te testen is zonder\n * DOM. De composable staat in `use-breakpoint.ts`.\n */\n\n/** Vanaf hier is het een tablet: onder 720px is het een telefoon. */\nexport const BREAKPOINT_TABLET = 720;\n/** Vanaf hier is het een bureaublad met muisbediening. */\nexport const BREAKPOINT_DESKTOP = 1080;\n\nexport type Breakpoint = \"phone\" | \"tablet\" | \"desktop\";\n\n/** De klasse waarin een viewportbreedte valt. */\nexport function breakpointOf(width: number): Breakpoint {\n  if (width < BREAKPOINT_TABLET) return \"phone\";\n  if (width < BREAKPOINT_DESKTOP) return \"tablet\";\n  return \"desktop\";\n}\n\n/** Telefoon: één scherm tegelijk, bladen in plaats van kolommen. */\nexport function isPhoneBreakpoint(breakpoint: Breakpoint): boolean {\n  return breakpoint === \"phone\";\n}\n\n/**\n * Alles onder het bureaublad. Daar wordt de shell met een vinger bediend, dus\n * gelden de smallere kolombreedtes en de grotere raakvlakken.\n */\nexport function isCompactBreakpoint(breakpoint: Breakpoint): boolean {\n  return breakpoint !== \"desktop\";\n}\n","import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"span\", {\n    class: _normalizeClass([\"badge\", `badge--${$props.tone}`])\n  }, [\n    _renderSlot(_ctx.$slots, \"default\", {}, undefined, true)\n  ], 2 /* CLASS */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Badge.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Badge.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Badge.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Badge.vue\";script.__scopeId = \"data-v-7128ab18\";export default script;","import { createVNode as _createVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot } from \"vue\"\n\nconst _hoisted_1 = { class: \"empty\" }\nconst _hoisted_2 = { class: \"empty__title\" }\nconst _hoisted_3 = {\n  key: 0,\n  class: \"empty__body\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createVNode($setup[\"Icon\"], {\n      name: $props.icon,\n      size: 24,\n      class: \"empty__icon\"\n    }, null, 8 /* PROPS */, [\"name\"]),\n    _createElementVNode(\"p\", _hoisted_2, _toDisplayString($props.title), 1 /* TEXT */),\n    ($props.description)\n      ? (_openBlock(), _createElementBlock(\"p\", _hoisted_3, _toDisplayString($props.description), 1 /* TEXT */))\n      : _createCommentVNode(\"v-if\", true),\n    _renderSlot(_ctx.$slots, \"default\", {}, undefined, true)\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/EmptyState.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/EmptyState.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/EmptyState.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/EmptyState.vue\";script.__scopeId = \"data-v-0908192e\";export default script;","<template>\n  <div class=\"pager\">\n    <span class=\"pager__count tnum\">\n      {{ fmt(from) }} tot {{ fmt(to) }} van {{ fmt(total) }}\n    </span>\n    <div class=\"pager__nav\">\n      <Button variant=\"ghost\" :disabled=\"page <= 1\" @click=\"emit('update:page', page - 1)\">\n        <Icon name=\"chevron--left\" />\n        Vorige\n      </Button>\n      <span class=\"pager__pos tnum\">{{ page }} / {{ pageCount }}</span>\n      <Button variant=\"ghost\" :disabled=\"page >= pageCount\" @click=\"emit('update:page', page + 1)\">\n        Volgende\n        <Icon name=\"chevron--right\" />\n      </Button>\n    </div>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport Button from \"./Button.vue\";\nimport Icon from \"../icons/Icon.vue\";\n\n// Nederlandse strings, bewust afwijkend van de kit (die daar nog Carbons\n// Engelse labels had staan).\nconst props = defineProps<{ page: number; pageSize: number; total: number }>();\nconst emit = defineEmits<{ \"update:page\": [page: number] }>();\n\n// Duizendscheiding zoals in de stat-tiles: \"van 3427\" naast een tegel die\n// \"3.427\" zegt leest als twee verschillende getallen.\nfunction fmt(n: number): string {\n  return n.toLocaleString(\"nl-NL\");\n}\n\nconst pageCount = computed(() => Math.max(1, Math.ceil(props.total / props.pageSize)));\nconst from = computed(() => (props.total === 0 ? 0 : (props.page - 1) * props.pageSize + 1));\nconst to = computed(() => Math.min(props.total, props.page * props.pageSize));\n</script>\n\n<style scoped>\n.pager {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 12px;\n  flex-wrap: wrap;\n  padding: 8px 16px;\n  border-top: 1px solid var(--border-1);\n  background: var(--bg-surface);\n}\n\n.pager__count,\n.pager__pos {\n  font-size: var(--text-caption);\n  color: var(--fg-3);\n}\n\n.pager__nav {\n  display: flex;\n  align-items: center;\n  gap: 4px;\n}\n</style>\n","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createVNode as _createVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"pager\" }\nconst _hoisted_2 = { class: \"pager__count tnum\" }\nconst _hoisted_3 = { class: \"pager__nav\" }\nconst _hoisted_4 = { class: \"pager__pos tnum\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"span\", _hoisted_2, _toDisplayString($setup.fmt($setup.from)) + \" tot \" + _toDisplayString($setup.fmt($setup.to)) + \" van \" + _toDisplayString($setup.fmt($props.total)), 1 /* TEXT */),\n    _createElementVNode(\"div\", _hoisted_3, [\n      _createVNode($setup[\"Button\"], {\n        variant: \"ghost\",\n        disabled: $props.page <= 1,\n        onClick: _cache[0] || (_cache[0] = $event => ($setup.emit('update:page', $props.page - 1)))\n      }, {\n        default: _withCtx(() => [\n          _createVNode($setup[\"Icon\"], { name: \"chevron--left\" }),\n          _cache[2] || (_cache[2] = _createTextVNode(\" Vorige \", -1 /* CACHED */))\n        ]),\n        _: 1 /* STABLE */,\n        __: [2]\n      }, 8 /* PROPS */, [\"disabled\"]),\n      _createElementVNode(\"span\", _hoisted_4, _toDisplayString($props.page) + \" / \" + _toDisplayString($setup.pageCount), 1 /* TEXT */),\n      _createVNode($setup[\"Button\"], {\n        variant: \"ghost\",\n        disabled: $props.page >= $setup.pageCount,\n        onClick: _cache[1] || (_cache[1] = $event => ($setup.emit('update:page', $props.page + 1)))\n      }, {\n        default: _withCtx(() => [\n          _cache[3] || (_cache[3] = _createTextVNode(\" Volgende \", -1 /* CACHED */)),\n          _createVNode($setup[\"Icon\"], { name: \"chevron--right\" })\n        ]),\n        _: 1 /* STABLE */,\n        __: [3]\n      }, 8 /* PROPS */, [\"disabled\"])\n    ])\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/PaginationBar.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/PaginationBar.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/PaginationBar.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/PaginationBar.vue\";script.__scopeId = \"data-v-d59d1425\";export default script;","<template>\n  <div class=\"score\">\n    <span class=\"score__value tnum\">{{ display }}</span>\n    <span class=\"score__track\">\n      <span class=\"score__fill\" :class=\"`score__fill--${token}`\" :style=\"{ width: `${width}%` }\" />\n    </span>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { scoreToSuitability, suitabilityToken } from \"../../lib/rating\";\n\n// score === 0 is een echt voltooid resultaat; alleen null betekent \"geen\n// analyse\". De balk toont dan een streepje en een leeg spoor, geen 0%-vulling\n// die als een score van nul leest.\nconst props = defineProps<{ score: number | null }>();\n\nconst display = computed(() => (props.score === null ? \"-\" : String(props.score)));\nconst width = computed(() => (props.score === null ? 0 : Math.max(0, Math.min(100, props.score))));\nconst token = computed(() => suitabilityToken(scoreToSuitability(props.score)));\n</script>\n\n<style scoped>\n.score {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  min-width: 0;\n}\n\n.score__value {\n  width: 24px;\n  text-align: right;\n  color: var(--fg-1);\n}\n\n.score__track {\n  flex: 1;\n  min-width: 40px;\n  height: 4px;\n  background: var(--bg-sunken);\n  border-radius: 2px;\n  overflow: hidden;\n}\n\n.score__fill {\n  display: block;\n  height: 100%;\n}\n\n.score__fill--score {\n  background: var(--score);\n}\n\n.score__fill--diverge {\n  background: var(--diverge);\n}\n\n.score__fill--danger {\n  background: var(--danger);\n}\n\n.score__fill--neutral {\n  background: var(--border-2);\n}\n</style>\n","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"score\" }\nconst _hoisted_2 = { class: \"score__value tnum\" }\nconst _hoisted_3 = { class: \"score__track\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"span\", _hoisted_2, _toDisplayString($setup.display), 1 /* TEXT */),\n    _createElementVNode(\"span\", _hoisted_3, [\n      _createElementVNode(\"span\", {\n        class: _normalizeClass([\"score__fill\", `score__fill--${$setup.token}`]),\n        style: _normalizeStyle({ width: `${$setup.width}%` })\n      }, null, 6 /* CLASS, STYLE */)\n    ])\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/ScoreBar.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/ScoreBar.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/ScoreBar.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/ScoreBar.vue\";script.__scopeId = \"data-v-1ec04f49\";export default script;","import { createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"span\", {\n    class: _normalizeClass([\"caret\", { 'caret--active': $props.active, 'caret--desc': $props.direction === 'desc' }])\n  }, _cache[0] || (_cache[0] = [\n    _createElementVNode(\"svg\", {\n      width: \"12\",\n      height: \"12\",\n      viewBox: \"0 0 12 12\",\n      \"aria-hidden\": \"true\",\n      focusable: \"false\"\n    }, [\n      _createElementVNode(\"path\", {\n        d: \"M6 3.5 9.5 8h-7z\",\n        fill: \"currentColor\"\n      })\n    ], -1 /* CACHED */)\n  ]), 2 /* CLASS */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/SortCaret.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/SortCaret.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/SortCaret.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/SortCaret.vue\";script.__scopeId = \"data-v-1c4f65d1\";export default script;","/**\n * Formats a list of location IDs into a comma-separated string for the\n * clipboard, deduplicated and sorted ascending. The output is meant to be\n * pasted into the bulk page's \"Op locatie-IDs\" field, which splits on\n * /[,\\n\\s]+/.\n */\nexport function formatLocationIdsForClipboard(locationIds: number[]): string {\n  const unique = Array.from(new Set(locationIds));\n  unique.sort((a, b) => a - b);\n  return unique.join(\", \");\n}\n","/**\n * Sorteerstaat van de locatielijst, met dezelfde localStorage-sleutel als de\n * Next-admin zodat een bestaande gebruiker zijn voorkeur houdt na de cutover.\n *\n * Pure functies, zodat ze getest kunnen worden zonder DOM. De lees/schrijf-kant\n * pakt localStorage wel aan, maar faalt stil: een private window of geweigerde\n * site-data mag de lijst niet blokkeren.\n */\nexport const SORT_STORAGE_KEY = \"statiegeld-locations-sort\";\n\nexport const SORT_FIELDS = [\"companyName\", \"analysisCount\", \"latestScore\", \"photoStatus\"] as const;\nexport type SortField = (typeof SORT_FIELDS)[number];\nexport type SortDirection = \"asc\" | \"desc\";\n\nexport interface SortState {\n  field: SortField;\n  direction: SortDirection;\n}\n\nexport const DEFAULT_SORT: SortState = { field: \"companyName\", direction: \"asc\" };\n\n/** Valideert een uit opslag gelezen waarde. Een onbekend veld uit een oudere\n    versie mag geen kapotte query opleveren, dus die valt terug op de default. */\nexport function parseSortState(raw: string | null): SortState {\n  if (!raw) return DEFAULT_SORT;\n  try {\n    const parsed = JSON.parse(raw) as Partial<SortState>;\n    const field = (SORT_FIELDS as readonly string[]).includes(String(parsed.field))\n      ? parsed.field as SortField\n      : DEFAULT_SORT.field;\n    const direction = parsed.direction === \"desc\" ? \"desc\" : \"asc\";\n    return { field, direction };\n  } catch {\n    return DEFAULT_SORT;\n  }\n}\n\n/** Klikken op de actieve kolom keert de richting om; een andere kolom begint\n    oplopend. */\nexport function nextSortState(current: SortState, field: SortField): SortState {\n  if (current.field !== field) return { field, direction: \"asc\" };\n  return { field, direction: current.direction === \"asc\" ? \"desc\" : \"asc\" };\n}\n\nexport function loadSortState(): SortState {\n  try {\n    return parseSortState(localStorage.getItem(SORT_STORAGE_KEY));\n  } catch {\n    return DEFAULT_SORT;\n  }\n}\n\nexport function saveSortState(sort: SortState): void {\n  try {\n    localStorage.setItem(SORT_STORAGE_KEY, JSON.stringify(sort));\n  } catch {\n    /* quota/denied, silent */\n  }\n}\n","import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createVNode as _createVNode, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, withCtx as _withCtx, createBlock as _createBlock, Fragment as _Fragment, renderList as _renderList, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"locations\" }\nconst _hoisted_2 = { class: \"locations__head\" }\nconst _hoisted_3 = { class: \"locations__titlebar\" }\nconst _hoisted_4 = {\n  class: \"locations__count tnum\",\n  \"aria-live\": \"polite\"\n}\nconst _hoisted_5 = { class: \"locations__actions\" }\nconst _hoisted_6 = {\n  key: 0,\n  class: \"selbar\"\n}\nconst _hoisted_7 = {\n  key: 0,\n  class: \"selbar__all\"\n}\nconst _hoisted_8 = [\"checked\", \"indeterminate\"]\nconst _hoisted_9 = { class: \"tnum\" }\nconst _hoisted_10 = {\n  key: 1,\n  class: \"error\",\n  role: \"alert\"\n}\nconst _hoisted_11 = { class: \"listbox\" }\nconst _hoisted_12 = [\"aria-busy\"]\nconst _hoisted_13 = {\n  key: 0,\n  class: \"locations__message\",\n  role: \"status\"\n}\nconst _hoisted_14 = { class: \"locations__mobile-actions\" }\nconst _hoisted_15 = {\n  class: \"locations__loaded tnum\",\n  \"aria-live\": \"polite\"\n}\nconst _hoisted_16 = {\n  key: 1,\n  class: \"tbl\"\n}\nconst _hoisted_17 = { class: \"tbl__check\" }\nconst _hoisted_18 = [\"checked\", \"indeterminate\"]\nconst _hoisted_19 = [\"aria-sort\"]\nconst _hoisted_20 = [\"aria-sort\"]\nconst _hoisted_21 = [\"aria-sort\"]\nconst _hoisted_22 = [\"aria-sort\"]\nconst _hoisted_23 = { key: 0 }\nconst _hoisted_24 = { key: 1 }\nconst _hoisted_25 = {\n  colspan: \"10\",\n  class: \"tbl__empty\"\n}\nconst _hoisted_26 = [\"onClick\"]\nconst _hoisted_27 = { class: \"tbl__check\" }\nconst _hoisted_28 = [\"checked\", \"aria-label\", \"onChange\"]\nconst _hoisted_29 = { class: \"tbl__name\" }\nconst _hoisted_30 = [\"title\"]\nconst _hoisted_31 = { class: \"tbl__trunc\" }\nconst _hoisted_32 = { class: \"tbl__center\" }\nconst _hoisted_33 = { class: \"tbl__right tnum\" }\nconst _hoisted_34 = {\n  key: 1,\n  class: \"tbl__dash\"\n}\nconst _hoisted_35 = { class: \"tbl__score\" }\nconst _hoisted_36 = {\n  key: 1,\n  class: \"tbl__dash\"\n}\nconst _hoisted_37 = { class: \"tbl__chevron\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"section\", _hoisted_1, [\n    _createElementVNode(\"header\", _hoisted_2, [\n      _createElementVNode(\"div\", _hoisted_3, [\n        _cache[11] || (_cache[11] = _createElementVNode(\"h1\", { class: \"page-title\" }, \"Locaties\", -1 /* CACHED */)),\n        _createElementVNode(\"span\", _hoisted_4, _toDisplayString($setup.loading && !$setup.locations.length ? \"Laden...\" : `${$setup.fmt($setup.total)} gevonden`), 1 /* TEXT */),\n        _createElementVNode(\"div\", _hoisted_5, [\n          _createVNode($setup[\"AddLocationDialog\"], {\n            compact: $setup.phone,\n            \"compact-label\": \"Toevoegen\"\n          }, null, 8 /* PROPS */, [\"compact\"])\n        ])\n      ]),\n      _createCommentVNode(\" Filterbalk. Zoeken is debounced zodat elke toetsaanslag geen RPC kost. \"),\n      _createVNode($setup[\"LocationFilters\"], {\n        search: $setup.searchInput,\n        \"onUpdate:search\": _cache[0] || (_cache[0] = $event => (($setup.searchInput) = $event)),\n        province: $setup.province,\n        \"onUpdate:province\": _cache[1] || (_cache[1] = $event => (($setup.province) = $event)),\n        \"location-type\": $setup.locationType,\n        \"onUpdate:locationType\": _cache[2] || (_cache[2] = $event => (($setup.locationType) = $event)),\n        \"review-state\": $setup.reviewState,\n        \"onUpdate:reviewState\": _cache[3] || (_cache[3] = $event => (($setup.reviewState) = $event)),\n        phone: $setup.phone,\n        \"province-options\": $setup.provinceOptions,\n        \"type-options\": $setup.typeOptions,\n        total: $setup.total,\n        loading: $setup.loading,\n        error: $setup.pages.error,\n        sort: $setup.sort,\n        onSort: $setup.applySort,\n        onClear: $setup.clearFilters\n      }, null, 8 /* PROPS */, [\"search\", \"province\", \"location-type\", \"review-state\", \"phone\", \"province-options\", \"type-options\", \"total\", \"loading\", \"error\", \"sort\"])\n    ]),\n    _createCommentVNode(\" Mobile selection keeps the bulk actions outside the scrolling list. \"),\n    ($setup.selected.size > 0 || $setup.selecting)\n      ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n          ($setup.phone)\n            ? (_openBlock(), _createElementBlock(\"label\", _hoisted_7, [\n                _createElementVNode(\"input\", {\n                  class: \"snl-checkbox\",\n                  type: \"checkbox\",\n                  checked: $setup.allOnPageSelected,\n                  indeterminate: $setup.someOnPageSelected && !$setup.allOnPageSelected,\n                  \"aria-label\": \"Alle getoonde locaties selecteren\",\n                  onChange: $setup.toggleAllOnPage\n                }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_8),\n                _cache[12] || (_cache[12] = _createTextVNode(\" Alle getoonde \", -1 /* CACHED */))\n              ]))\n            : _createCommentVNode(\"v-if\", true),\n          _createElementVNode(\"span\", _hoisted_9, _toDisplayString($setup.fmt($setup.selected.size)) + \" geselecteerd\", 1 /* TEXT */),\n          _createVNode($setup[\"Button\"], {\n            disabled: $setup.selected.size === 0,\n            onClick: $setup.copySelectedIds\n          }, {\n            default: _withCtx(() => [\n              _createVNode($setup[\"Icon\"], { name: \"copy\" }),\n              _createTextVNode(\" \" + _toDisplayString($setup.copied ? \"Gekopieerd\" : \"Kopieer ID's\"), 1 /* TEXT */)\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"disabled\"]),\n          _createVNode($setup[\"Button\"], {\n            variant: \"ghost\",\n            onClick: _cache[4] || (_cache[4] = $event => ($setup.selected = new Set()))\n          }, {\n            default: _withCtx(() => _cache[13] || (_cache[13] = [\n              _createTextVNode(\"Selectie wissen\", -1 /* CACHED */)\n            ])),\n            _: 1 /* STABLE */,\n            __: [13]\n          }),\n          ($setup.phone)\n            ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                key: 1,\n                variant: \"ghost\",\n                onClick: _cache[5] || (_cache[5] = $event => ($setup.selecting = !$setup.selecting))\n              }, {\n                default: _withCtx(() => [\n                  _createTextVNode(_toDisplayString($setup.selecting ? \"Klaar\" : \"Selecteren\"), 1 /* TEXT */)\n                ]),\n                _: 1 /* STABLE */\n              }))\n            : _createCommentVNode(\"v-if\", true)\n        ]))\n      : _createCommentVNode(\"v-if\", true),\n    ($setup.error)\n      ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n          _createTextVNode(_toDisplayString($setup.error) + \" \", 1 /* TEXT */),\n          ($setup.pages.error)\n            ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                key: 0,\n                onClick: $setup.retry\n              }, {\n                default: _withCtx(() => _cache[14] || (_cache[14] = [\n                  _createTextVNode(\"Opnieuw proberen\", -1 /* CACHED */)\n                ])),\n                _: 1 /* STABLE */,\n                __: [14]\n              }))\n            : _createCommentVNode(\"v-if\", true)\n        ]))\n      : _createCommentVNode(\"v-if\", true),\n    _createCommentVNode(\" Het lijstvak: de tabel scrollt zelf, de pagineerbalk blijft eronder\\n         staan. Geen kader eromheen; in de kit loopt de tabel tot de randen door\\n         en doen de hairlines het werk. \"),\n    _createElementVNode(\"div\", _hoisted_11, [\n      _createElementVNode(\"div\", {\n        ref: \"scrollArea\",\n        class: \"listbox__scroll\",\n        \"aria-busy\": $setup.loading\n      }, [\n        ($setup.phone)\n          ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n              ($setup.loading && !$setup.locations.length)\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_13, \"Locaties laden...\"))\n                : (!$setup.error && !$setup.locations.length)\n                  ? (_openBlock(), _createBlock($setup[\"EmptyState\"], {\n                      key: 1,\n                      icon: \"location\",\n                      title: \"Geen locaties gevonden\",\n                      description: \"Pas je zoekopdracht of filters aan om locaties te tonen.\"\n                    }))\n                  : _createCommentVNode(\"v-if\", true),\n              _createVNode($setup[\"LocationMobileList\"], {\n                locations: $setup.locations,\n                selected: $setup.selected,\n                selecting: $setup.selecting,\n                \"photo-glyph\": $setup.photoGlyph,\n                \"photo-title\": $setup.photoTitle,\n                onToggle: $setup.toggleRow\n              }, null, 8 /* PROPS */, [\"locations\", \"selected\", \"selecting\"]),\n              _createElementVNode(\"div\", _hoisted_14, [\n                (!$setup.selecting)\n                  ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                      key: 0,\n                      onClick: _cache[6] || (_cache[6] = $event => ($setup.selecting = true))\n                    }, {\n                      default: _withCtx(() => _cache[15] || (_cache[15] = [\n                        _createTextVNode(\"Selecteren\", -1 /* CACHED */)\n                      ])),\n                      _: 1 /* STABLE */,\n                      __: [15]\n                    }))\n                  : _createCommentVNode(\"v-if\", true),\n                ($setup.locations.length < $setup.total)\n                  ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                      key: 1,\n                      class: \"locations__more\",\n                      busy: $setup.loading,\n                      onClick: $setup.loadMore\n                    }, {\n                      default: _withCtx(() => [\n                        _createTextVNode(_toDisplayString($setup.loading ? \"Laden...\" : \"Meer laden\"), 1 /* TEXT */)\n                      ]),\n                      _: 1 /* STABLE */\n                    }, 8 /* PROPS */, [\"busy\"]))\n                  : _createCommentVNode(\"v-if\", true),\n                _createElementVNode(\"span\", _hoisted_15, _toDisplayString($setup.fmt($setup.locations.length)) + \" van \" + _toDisplayString($setup.fmt($setup.total)) + \" locaties\", 1 /* TEXT */)\n              ])\n            ], 64 /* STABLE_FRAGMENT */))\n          : (_openBlock(), _createElementBlock(\"table\", _hoisted_16, [\n              _createElementVNode(\"thead\", null, [\n                _createElementVNode(\"tr\", null, [\n                  _createElementVNode(\"th\", _hoisted_17, [\n                    _createElementVNode(\"input\", {\n                      class: \"snl-checkbox\",\n                      type: \"checkbox\",\n                      checked: $setup.allOnPageSelected,\n                      indeterminate: $setup.someOnPageSelected && !$setup.allOnPageSelected,\n                      \"aria-label\": \"Alle locaties op deze pagina selecteren\",\n                      onChange: $setup.toggleAllOnPage\n                    }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_18)\n                  ]),\n                  _createElementVNode(\"th\", {\n                    class: \"tbl__name\",\n                    \"aria-sort\": $setup.sort.field === 'companyName' ? ($setup.sort.direction === 'asc' ? 'ascending' : 'descending') : undefined\n                  }, [\n                    _createElementVNode(\"button\", {\n                      class: \"tbl__sort\",\n                      type: \"button\",\n                      onClick: _cache[7] || (_cache[7] = $event => ($setup.applySort('companyName')))\n                    }, [\n                      _cache[16] || (_cache[16] = _createTextVNode(\" Bedrijfsnaam \", -1 /* CACHED */)),\n                      _createVNode($setup[\"SortCaret\"], {\n                        active: $setup.sort.field === 'companyName',\n                        direction: $setup.sort.direction\n                      }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                    ])\n                  ], 8 /* PROPS */, _hoisted_19),\n                  _cache[20] || (_cache[20] = _createElementVNode(\"th\", null, \"Adres\", -1 /* CACHED */)),\n                  _cache[21] || (_cache[21] = _createElementVNode(\"th\", null, \"Plaats\", -1 /* CACHED */)),\n                  _cache[22] || (_cache[22] = _createElementVNode(\"th\", null, \"Vestigingstype\", -1 /* CACHED */)),\n                  _createElementVNode(\"th\", {\n                    class: \"tbl__center\",\n                    \"aria-sort\": $setup.sort.field === 'photoStatus' ? ($setup.sort.direction === 'asc' ? 'ascending' : 'descending') : undefined\n                  }, [\n                    _createElementVNode(\"button\", {\n                      class: \"tbl__sort\",\n                      type: \"button\",\n                      onClick: _cache[8] || (_cache[8] = $event => ($setup.applySort('photoStatus')))\n                    }, [\n                      _cache[17] || (_cache[17] = _createTextVNode(\" Foto's \", -1 /* CACHED */)),\n                      _createVNode($setup[\"SortCaret\"], {\n                        active: $setup.sort.field === 'photoStatus',\n                        direction: $setup.sort.direction\n                      }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                    ])\n                  ], 8 /* PROPS */, _hoisted_20),\n                  _createElementVNode(\"th\", {\n                    class: \"tbl__right\",\n                    \"aria-sort\": $setup.sort.field === 'analysisCount' ? ($setup.sort.direction === 'asc' ? 'ascending' : 'descending') : undefined\n                  }, [\n                    _createElementVNode(\"button\", {\n                      class: \"tbl__sort\",\n                      type: \"button\",\n                      onClick: _cache[9] || (_cache[9] = $event => ($setup.applySort('analysisCount')))\n                    }, [\n                      _cache[18] || (_cache[18] = _createTextVNode(\" Analyses \", -1 /* CACHED */)),\n                      _createVNode($setup[\"SortCaret\"], {\n                        active: $setup.sort.field === 'analysisCount',\n                        direction: $setup.sort.direction\n                      }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                    ])\n                  ], 8 /* PROPS */, _hoisted_21),\n                  _cache[23] || (_cache[23] = _createElementVNode(\"th\", { title: \"Zichtbaar wanneer de nieuwste analyse om menselijke controle vraagt\" }, \" Review \", -1 /* CACHED */)),\n                  _createElementVNode(\"th\", {\n                    class: \"tbl__score\",\n                    \"aria-sort\": $setup.sort.field === 'latestScore' ? ($setup.sort.direction === 'asc' ? 'ascending' : 'descending') : undefined\n                  }, [\n                    _createElementVNode(\"button\", {\n                      class: \"tbl__sort\",\n                      type: \"button\",\n                      onClick: _cache[10] || (_cache[10] = $event => ($setup.applySort('latestScore')))\n                    }, [\n                      _cache[19] || (_cache[19] = _createTextVNode(\" Score \", -1 /* CACHED */)),\n                      _createVNode($setup[\"SortCaret\"], {\n                        active: $setup.sort.field === 'latestScore',\n                        direction: $setup.sort.direction\n                      }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                    ])\n                  ], 8 /* PROPS */, _hoisted_22),\n                  _cache[24] || (_cache[24] = _createElementVNode(\"th\", { class: \"tbl__chevron\" }, [\n                    _createElementVNode(\"span\", { class: \"locations__sr\" }, \"Open locatie\")\n                  ], -1 /* CACHED */))\n                ])\n              ]),\n              _createElementVNode(\"tbody\", null, [\n                ($setup.loading)\n                  ? (_openBlock(), _createElementBlock(\"tr\", _hoisted_23, _cache[25] || (_cache[25] = [\n                      _createElementVNode(\"td\", {\n                        class: \"tbl__msg\",\n                        colspan: \"10\"\n                      }, \"Laden...\", -1 /* CACHED */)\n                    ])))\n                  : (!$setup.error && $setup.locations.length === 0)\n                    ? (_openBlock(), _createElementBlock(\"tr\", _hoisted_24, [\n                        _createElementVNode(\"td\", _hoisted_25, [\n                          _createVNode($setup[\"EmptyState\"], {\n                            icon: \"location\",\n                            title: \"Geen locaties gevonden\",\n                            description: \"Pas je zoekopdracht of filters aan om locaties te tonen.\"\n                          })\n                        ])\n                      ]))\n                    : (_openBlock(true), _createElementBlock(_Fragment, { key: 2 }, _renderList($setup.locations, (loc) => {\n                        return (_openBlock(), _createElementBlock(\"tr\", {\n                          key: loc.id,\n                          class: _normalizeClass({ 'tbl__row--sel': $setup.selected.has(loc.id) }),\n                          onClick: $event => ($setup.openRow($event, loc.id))\n                        }, [\n                          _createElementVNode(\"td\", _hoisted_27, [\n                            _createElementVNode(\"input\", {\n                              class: \"snl-checkbox\",\n                              type: \"checkbox\",\n                              checked: $setup.selected.has(loc.id),\n                              \"aria-label\": `${loc.companyName} selecteren`,\n                              onChange: $event => ($setup.toggleRow(loc.id))\n                            }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_28)\n                          ]),\n                          _createElementVNode(\"td\", _hoisted_29, [\n                            _createVNode($setup[\"RouterLink\"], {\n                              to: { name: 'location-detail', params: { id: loc.id } },\n                              class: \"tbl__link\"\n                            }, {\n                              default: _withCtx(() => [\n                                _createTextVNode(_toDisplayString(loc.companyName), 1 /* TEXT */)\n                              ]),\n                              _: 2 /* DYNAMIC */\n                            }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"])\n                          ]),\n                          _createElementVNode(\"td\", {\n                            class: \"tbl__trunc tbl__muted\",\n                            title: loc.address ?? ''\n                          }, _toDisplayString(loc.address), 9 /* TEXT, PROPS */, _hoisted_30),\n                          _createElementVNode(\"td\", _hoisted_31, _toDisplayString(loc.city), 1 /* TEXT */),\n                          _createElementVNode(\"td\", null, [\n                            _createVNode($setup[\"Badge\"], null, {\n                              default: _withCtx(() => [\n                                _createTextVNode(_toDisplayString($setup.formatLocationType(loc.locationType)), 1 /* TEXT */)\n                              ]),\n                              _: 2 /* DYNAMIC */\n                            }, 1024 /* DYNAMIC_SLOTS */)\n                          ]),\n                          _createElementVNode(\"td\", _hoisted_32, [\n                            _createVNode($setup[\"StatusGlyph\"], {\n                              state: $setup.photoGlyph(loc),\n                              title: $setup.photoTitle(loc)\n                            }, null, 8 /* PROPS */, [\"state\", \"title\"])\n                          ]),\n                          _createCommentVNode(\" Getallen rechts uitgelijnd met tabulaire cijfers: zo zijn\\n                   groottes in een kolom in één blik te vergelijken. \"),\n                          _createElementVNode(\"td\", _hoisted_33, _toDisplayString(loc.analysisCount ?? 0), 1 /* TEXT */),\n                          _createElementVNode(\"td\", null, [\n                            (loc.requiresHumanReview)\n                              ? (_openBlock(), _createBlock($setup[\"Badge\"], {\n                                  key: 0,\n                                  tone: \"diverge\"\n                                }, {\n                                  default: _withCtx(() => _cache[26] || (_cache[26] = [\n                                    _createTextVNode(\"Mens-review\", -1 /* CACHED */)\n                                  ])),\n                                  _: 1 /* STABLE */,\n                                  __: [26]\n                                }))\n                              : (_openBlock(), _createElementBlock(\"span\", _hoisted_34, \"-\"))\n                          ]),\n                          _createElementVNode(\"td\", _hoisted_35, [\n                            _createCommentVNode(\" Geen lege balk bij een locatie zonder analyse: in een tabel\\n                     die grotendeels ongescoord is zijn honderd grijze sporen\\n                     ruis. \"),\n                            (loc.latestScore !== null)\n                              ? (_openBlock(), _createBlock($setup[\"ScoreBar\"], {\n                                  key: 0,\n                                  score: loc.latestScore\n                                }, null, 8 /* PROPS */, [\"score\"]))\n                              : (_openBlock(), _createElementBlock(\"span\", _hoisted_36, \"niet gescoord\"))\n                          ]),\n                          _createElementVNode(\"td\", _hoisted_37, [\n                            _createVNode($setup[\"RouterLink\"], {\n                              to: { name: 'location-detail', params: { id: loc.id } },\n                              \"aria-label\": `${loc.companyName} openen`\n                            }, {\n                              default: _withCtx(() => [\n                                _createVNode($setup[\"Icon\"], { name: \"chevron--right\" })\n                              ]),\n                              _: 2 /* DYNAMIC */\n                            }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\", \"aria-label\"])\n                          ])\n                        ], 10 /* CLASS, PROPS */, _hoisted_26))\n                      }), 128 /* KEYED_FRAGMENT */))\n              ])\n            ]))\n      ], 8 /* PROPS */, _hoisted_12),\n      (!$setup.phone)\n        ? (_openBlock(), _createBlock($setup[\"PaginationBar\"], {\n            key: 0,\n            page: $setup.page,\n            \"page-size\": $setup.pageSize,\n            total: $setup.total,\n            \"onUpdate:page\": $setup.onPage\n          }, null, 8 /* PROPS */, [\"page\", \"page-size\", \"total\"]))\n        : _createCommentVNode(\"v-if\", true)\n    ])\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LocationsView.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LocationsView.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LocationsView.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LocationsView.vue\";script.__scopeId = \"data-v-5bca1131\";export default script;","<script setup lang=\"ts\">\nimport { computed, onActivated, ref, watch } from \"vue\";\nimport { RouterLink, useRoute, useRouter } from \"vue-router\";\nimport Popover from \"../components/ui/Popover.vue\";\nimport Icon from \"../components/icons/Icon.vue\";\nimport LocationAnalysisSummary from \"../components/locations/LocationAnalysisSummary.vue\";\nimport { useBreakpoint } from \"../lib/use-breakpoint\";\nimport PageBody from \"../components/shell/PageBody.vue\";\nimport Panel from \"../components/ui/Panel.vue\";\nimport Button from \"../components/ui/Button.vue\";\nimport Badge from \"../components/ui/Badge.vue\";\nimport MetaBar from \"../components/ui/MetaBar.vue\";\nimport PageTabs from \"../components/ui/PageTabs.vue\";\nimport ScoreBar from \"../components/ui/ScoreBar.vue\";\nimport Checkbox from \"../components/ui/Checkbox.vue\";\nimport Dialog from \"../components/ui/Dialog.vue\";\nimport Input from \"../components/ui/Input.vue\";\nimport Select from \"../components/ui/Select.vue\";\nimport Textarea from \"../components/ui/Textarea.vue\";\nimport LocationImageTabs from \"../components/locations/LocationImageTabs.vue\";\nimport LocationFeedbackList from \"../components/locations/LocationFeedbackList.vue\";\nimport RetrievableFeedbackPreview from \"../components/locations/RetrievableFeedbackPreview.vue\";\nimport RunAnalysisDialog from \"../components/analyses/RunAnalysisDialog.vue\";\nimport CadastralMap, { type CadastralData } from \"../components/CadastralMap.vue\";\nimport SbiCodesDisplay from \"../components/SbiCodesDisplay.vue\";\nimport { useLocationDetail, type LocationScrape } from \"../lib/use-location-detail\";\nimport { safeWebsiteUrl, scoutLocationUrl } from \"../lib/location-detail\";\nimport { googleMapsEmbedUrl, streetViewEmbedUrl, googleMapsUrl, streetViewUrl } from \"../lib/maps\";\nimport { formatLocationType } from \"../lib/location-type\";\nimport { analysisStatusLabel, formatAnalysisDate } from \"../lib/analyses-format\";\nimport { resolveActiveTab, buildTabHref } from \"../lib/tab-url\";\nimport { setCrumbLabel } from \"../lib/shell-chrome\";\nimport { analysisDetailRoute } from \"../lib/nav\";\n\nconst props = defineProps<{ id: number }>();\nconst route = useRoute();\nconst router = useRouter();\nconst {\n  feedback, feedbackLoading, feedbackError, loadFeedback,\n  location, analyses, sortedAnalyses, latestAnalysis, coordinates, images, scrapes,\n  loading, analysesLoading, imagesLoading, scrapeLoading, downloading, scraping, deleting, saving,\n  error, analysesError, imageErrors, scrapeError, groundTruthError, groundTruthSaved,\n  selectedAnalyses, parkingSpots, adjacent, notes,\n  loadLocation, refreshAnalyses, loadImages, loadScrapes, toggleAnalysis, selectAll, deleteAnalyses, saveGroundTruth,\n} = useLocationDetail(() => props.id);\nconst breakpoint = useBreakpoint();\nconst actionsOpen = ref(false);\nconst cadastral = ref<CadastralData | null>(null);\nconst parcelLabel = computed(() => cadastral.value?.parcel ? `${cadastral.value.parcel.kadastraleGemeente} ${cadastral.value.parcel.sectie} ${cadastral.value.parcel.perceelnummer}` : null);\nconst parcelArea = computed(() => cadastral.value?.parcel ? `${cadastral.value.parcel.oppervlakte.toLocaleString(\"nl-NL\")} m²` : null);\nconst runOpen = ref(false);\nconst deleteOpen = ref(false);\nconst deletedMessage = ref(\"\");\nconst startedId = ref<number | null>(null);\nconst scrapeModal = ref<LocationScrape | null>(null);\nconst scrapeModalOpen = computed({ get: () => scrapeModal.value !== null, set: (value: boolean) => { if (!value) scrapeModal.value = null; } });\nconst mapMode = ref(\"map\");\nconst title = computed(() => location.value?.companyName ?? `Locatie #${props.id}`);\nconst activeTab = computed(() => resolveActiveTab(typeof route.query.tab === \"string\" ? route.query.tab : null, [\"overzicht\", \"analyses\", \"veldfeedback\"], \"overzicht\"));\nconst latestScore = computed(() => latestAnalysis.value?.status === \"completed\" ? latestAnalysis.value.consensusOverallScore : null);\nconst scoutUrl = computed(() => scoutLocationUrl({ locationId: props.id, hostname: window.location.hostname }));\nconst cadastralImage = computed(() => images.value.find(image => image.type === \"satellite-cadastral\" && image.cached && image.url)?.url ?? null);\nconst mapSource = computed(() => coordinates.value ? (mapMode.value === \"map\" ? googleMapsEmbedUrl(coordinates.value) : streetViewEmbedUrl(coordinates.value)) : \"\");\nconst allSelected = computed(() => analyses.value.length > 0 && selectedAnalyses.value.size === analyses.value.length);\nconst adjacentOptions = [{ value: \"unknown\", label: \"Onbekend\" }, { value: \"yes\", label: \"Ja\" }, { value: \"no\", label: \"Nee\" }];\n\nfunction tabPath(value: string) {\n  const query = new URLSearchParams();\n  for (const [key, item] of Object.entries(route.query)) {\n    for (const part of Array.isArray(item) ? item : [item]) if (part !== null) query.append(key, part);\n  }\n  return buildTabHref(route.path, query, value, \"overzicht\");\n}\nconst tabs = computed(() => [\n  { value: \"overzicht\", label: \"Overzicht\", to: tabPath(\"overzicht\") },\n  { value: \"analyses\", label: \"Analyses\", count: analyses.value.length, to: tabPath(\"analyses\") },\n  { value: \"veldfeedback\", label: \"Veldfeedback\", count: feedbackLoading.value || feedbackError.value ? undefined : feedback.value.length, to: tabPath(\"veldfeedback\") },\n]);\nconst meta = computed(() => location.value ? [\n  { label: \"Adres\", value: `${location.value.address}${location.value.postalCode ? `, ${location.value.postalCode}` : \"\"}${location.value.city ? ` ${location.value.city}` : \"\"}` },\n  { label: \"Provincie\", value: location.value.province || \"onbekend\" },\n  { label: \"Perceel\", value: parcelLabel.value ?? \"onbekend\" },\n  { label: \"Oppervlak\", value: parcelArea.value ?? \"onbekend\" },\n  { label: \"Analyses\", value: analyses.value.length.toLocaleString(\"nl-NL\") },\n  { label: \"Laatste score\", value: latestScore.value === null ? \"geen\" : `${latestScore.value} / 100` },\n] : []);\nconst fields = computed(() => {\n  const item = location.value;\n  if (!item) return [];\n  return [\n    { label: \"Kadastraal perceel\", value: parcelLabel.value },\n    { label: \"Perceeloppervlak\", value: parcelArea.value },\n    { label: \"Coördinaten\", value: coordinates.value ? `${coordinates.value.lat}, ${coordinates.value.lng}` : null },\n    { label: \"Gemeente\", value: item.municipality },\n    { label: \"Provincie\", value: item.province },\n    { label: \"Organisatie\", value: item.organizationType },\n    { label: \"Medewerkers\", value: item.employeeRange },\n    { label: \"Telefoon\", value: item.phone },\n    { label: \"Website\", value: item.website, href: safeWebsiteUrl(item.website) },\n    { label: \"Branches\", value: item.branchesKvk },\n    { label: \"KVK-nummer\", value: item.kvk },\n    { label: \"Opgericht\", value: item.foundingYear },\n    { label: \"E-mail\", value: item.email, href: item.email ? `mailto:${item.email}` : null },\n    { label: \"Vestigingstype\", value: item.locationType ? formatLocationType(item.locationType) : null },\n    { label: \"SBI-codes\", value: item.sbiCodes, sbi: true },\n    { label: \"BTW-nummer\", value: item.vatNumber },\n  ].filter(field => field.value !== null && field.value !== \"\");\n});\nconst socials = computed(() => {\n  const item = location.value;\n  if (!item) return [];\n  return [\n    { label: \"Facebook\", href: safeWebsiteUrl(item.facebookLink) },\n    { label: \"X/Twitter\", href: safeWebsiteUrl(item.twitterLink) },\n    { label: \"LinkedIn\", href: safeWebsiteUrl(item.linkedinLink) },\n    { label: \"Instagram\", href: safeWebsiteUrl(item.instagramLink) },\n  ].filter(item => item.href);\n});\n\nwatch(() => location.value?.companyName, name => { if (name) setCrumbLabel(\"location-detail\", name); });\n// Het kruimel-label geldt per ROUTE, niet per pad, dus de tab ernaast kan hem\n// hebben overschreven. Bij terugkeren claimt deze pagina hem opnieuw uit wat hij\n// al geladen heeft, zonder te wachten op een nieuwe fetch.\nonActivated(() => { setCrumbLabel(\"location-detail\", location.value?.companyName ?? `Locatie #${props.id}`); });\nwatch(() => props.id, () => {\n  setCrumbLabel(\"location-detail\", `Locatie #${props.id}`);\n  actionsOpen.value = false;\n  cadastral.value = null;\n  runOpen.value = false;\n  deleteOpen.value = false;\n  scrapeModal.value = null;\n  startedId.value = null;\n  deletedMessage.value = \"\";\n  mapMode.value = \"map\";\n}, { immediate: true });\nwatch([parkingSpots, adjacent, notes], () => { groundTruthSaved.value = false; }, { flush: \"sync\" });\n\nasync function onAnalysisStarted(analysisId: number) {\n  runOpen.value = false;\n  startedId.value = analysisId;\n  await router.push(analysisDetailRoute({ locationId: props.id, analysisId }));\n}\n\nasync function confirmDelete() {\n  const count = selectedAnalyses.value.size;\n  const locationId = props.id;\n  if (await deleteAnalyses() && locationId === props.id) {\n    deleteOpen.value = false;\n    deletedMessage.value = count === 1 ? \"Analyse verwijderd.\" : `${count} analyses verwijderd.`;\n  }\n}\n</script>\n\n<template>\n  <div class=\"location-detail\">\n  <header class=\"location-detail__header\">\n    <div class=\"location-detail__crumbline\">\n      <nav aria-label=\"Locatiepad\" class=\"location-detail__crumbs\"><RouterLink to=\"/\">Locaties</RouterLink><span aria-hidden=\"true\">/</span><span :title=\"title\">{{ title }}</span></nav>\n      <div v-if=\"location && breakpoint !== 'desktop'\" class=\"location-detail__badges\">\n        <Badge v-if=\"location.locationType\">{{ formatLocationType(location.locationType) }}</Badge>\n        <Badge v-if=\"latestAnalysis?.requiresHumanReview\" tone=\"diverge\">Mens-review</Badge>\n      </div>\n    </div>\n    <div class=\"location-detail__titlebar\">\n      <h1 :title=\"title\">{{ title }}</h1>\n      <div v-if=\"location && breakpoint === 'desktop'\" class=\"location-detail__badges\">\n        <Badge v-if=\"location.locationType\">{{ formatLocationType(location.locationType) }}</Badge>\n        <Badge v-if=\"latestAnalysis?.requiresHumanReview\" tone=\"diverge\">Mens-review</Badge>\n      </div>\n      <div v-if=\"location\" class=\"location-detail__actions\">\n        <template v-if=\"breakpoint === 'desktop'\">\n          <a :href=\"scoutUrl\" class=\"location-detail__scout\" target=\"_blank\" rel=\"noopener noreferrer\">SNL Scout <Icon name=\"launch\" /></a>\n          <RouterLink v-if=\"latestAnalysis\" :to=\"analysisDetailRoute({ locationId: id, analysisId: latestAnalysis.id })\" class=\"location-detail__scout\">Laatste rapport <Icon name=\"arrow--right\" /></RouterLink>\n        </template>\n        <Button variant=\"primary\" @click=\"runOpen = true\">{{ breakpoint === 'phone' ? 'Analyse' : 'Nieuwe analyse' }}<Icon name=\"flash\" /></Button>\n        <Popover v-if=\"breakpoint !== 'desktop'\" v-model:open=\"actionsOpen\" align=\"end\">\n          <template #trigger><Button variant=\"ghost\" class=\"location-detail__more\" aria-label=\"Meer locatieacties\"><span aria-hidden=\"true\">⋮</span></Button></template>\n          <div class=\"location-detail__action-menu\">\n            <RouterLink v-if=\"latestAnalysis\" :to=\"analysisDetailRoute({ locationId: id, analysisId: latestAnalysis.id })\" @click=\"actionsOpen = false\">Laatste rapport <Icon name=\"arrow--right\" /></RouterLink>\n            <RouterLink :to=\"tabPath('veldfeedback')\" @click=\"actionsOpen = false\">Veldfeedback</RouterLink>\n            <a :href=\"scoutUrl\" target=\"_blank\" rel=\"noopener noreferrer\" @click=\"actionsOpen = false\">SNL Scout <Icon name=\"launch\" /></a>\n          </div>\n        </Popover>\n      </div>\n    </div>\n    <PageTabs v-if=\"location\" :tabs=\"tabs\" :active=\"activeTab\" />\n  </header>\n  <MetaBar v-if=\"location\" :items=\"meta\" />\n  <PageBody class=\"location-detail__body\">\n    <p v-if=\"loading\" class=\"location-detail__muted\" role=\"status\">Locatiegegevens laden...</p>\n    <div v-else-if=\"error\" class=\"location-detail__stack\"><p class=\"location-detail__error\" role=\"alert\">{{ error }}</p><Button @click=\"loadLocation\">Opnieuw proberen</Button></div>\n    <p v-else-if=\"!location\" class=\"location-detail__muted\">Locatie niet gevonden.</p>\n    <template v-else>\n      <div v-show=\"activeTab === 'overzicht'\" class=\"location-detail__overview\">\n          <Panel title=\"Beeldmateriaal\" class=\"location-detail__image-panel\" flush>\n            <template v-if=\"coordinates\" #actions><Button :busy=\"downloading\" @click=\"loadImages(true)\">{{ downloading ? 'Ophalen...' : 'Opnieuw ophalen' }}</Button></template>\n            <p v-if=\"imagesLoading\" class=\"location-detail__padded location-detail__muted\" role=\"status\">Afbeeldingen laden...</p>\n            <LocationImageTabs v-else-if=\"coordinates\" :key=\"id\" :images=\"images\" :coordinates=\"coordinates\" preferred=\"satellite-cadastral\" />\n            <p v-else class=\"location-detail__padded location-detail__muted\">Deze locatie heeft geen coördinaten, dus er is geen beeld op te halen.</p>\n            <div v-if=\"imageErrors.length\" class=\"location-detail__padded location-detail__error\" role=\"alert\"><p v-for=\"(message, index) in imageErrors\" :key=\"index\">{{ message }}</p></div>\n            <p v-if=\"downloading\" class=\"location-detail__padded location-detail__muted\" role=\"status\">Bezig met ophalen van satelliet- en Street View-beelden...</p>\n          </Panel>\n        <div class=\"location-detail__stack location-detail__side\">\n          <Panel title=\"Laatste analyse\" flush>\n            <template #actions><Button v-if=\"latestAnalysis\" variant=\"ghost\" @click=\"router.push(analysisDetailRoute({ locationId: id, analysisId: latestAnalysis.id }))\">Rapport</Button></template>\n            <p v-if=\"analysesLoading\" class=\"location-detail__muted location-detail__padded\" role=\"status\">Analyses laden...</p>\n            <LocationAnalysisSummary v-else-if=\"latestAnalysis\" :key=\"latestAnalysis.id\" :analysis=\"latestAnalysis\" />\n            <p v-else-if=\"!analysesError\" class=\"location-detail__muted location-detail__padded\">Nog geen analyse. Start er een met 'Nieuwe analyse'.</p>\n            <div v-if=\"analysesError\" class=\"location-detail__stack location-detail__padded\"><p class=\"location-detail__error\" role=\"alert\">{{ analysesError }}</p><Button @click=\"refreshAnalyses\">Opnieuw proberen</Button></div>\n          </Panel>\n          <Panel title=\"Gegevens\" flush>\n            <dl class=\"location-detail__fields\">\n              <div v-for=\"field in fields\" :key=\"field.label\" class=\"location-detail__field\"><dt>{{ field.label }}</dt><dd><SbiCodesDisplay v-if=\"field.sbi\" :sbi-codes=\"String(field.value)\" /><a v-else-if=\"field.href\" :href=\"field.href\" target=\"_blank\" rel=\"noopener noreferrer\">{{ field.value }}</a><template v-else>{{ field.value }}</template></dd></div>\n            </dl>\n            <p v-if=\"safeWebsiteUrl(location.businessProfileUrl)\" class=\"location-detail__profile\"><a :href=\"safeWebsiteUrl(location.businessProfileUrl)!\" target=\"_blank\" rel=\"noopener noreferrer\">Bekijk bedrijfsprofiel op Bedrijfsdata.nl</a></p>\n          </Panel>\n          <Panel v-if=\"location.website\" title=\"Websitedata\">\n            <template #actions><Button :busy=\"scraping\" @click=\"loadScrapes(true)\">{{ scraping ? 'Ophalen...' : 'Haal opnieuw op' }}</Button></template>\n            <p v-if=\"scrapeLoading\" class=\"location-detail__muted\" role=\"status\">Websitedata laden...</p>\n            <p v-else-if=\"!scrapes.length && !scrapeError\" class=\"location-detail__muted\">Nog geen data opgehaald. Klik 'Haal opnieuw op' om te starten.</p>\n            <div v-for=\"result in scrapes\" :key=\"result.source\" class=\"location-detail__scrape\">\n              <Badge :tone=\"result.fetched ? 'score' : 'neutral'\">{{ result.fetched ? 'Opgehaald' : 'Niet beschikbaar' }}</Badge><span>{{ result.label }}</span>\n              <span v-if=\"result.fetched && result.fetchedAt\" class=\"location-detail__muted\">{{ formatAnalysisDate(result.fetchedAt) }}</span>\n              <Button v-if=\"result.fetched\" variant=\"ghost\" @click=\"scrapeModal = result\">Bekijk inhoud</Button>\n            </div>\n            <p v-if=\"scrapeError\" class=\"location-detail__error\" role=\"alert\">{{ scrapeError }}</p>\n            <p v-if=\"scraping\" class=\"location-detail__muted\" role=\"status\">Bezig met ophalen van websitedata...</p>\n          </Panel>\n          <Panel v-if=\"socials.length\" title=\"Social media\"><div class=\"location-detail__socials\"><a v-for=\"social in socials\" :key=\"social.label\" :href=\"social.href!\" target=\"_blank\" rel=\"noopener noreferrer\">{{ social.label }}</a></div></Panel>\n        </div>\n          <Panel v-if=\"coordinates\" title=\"Kaart\" class=\"location-detail__map-panel\" flush>\n            <template #actions>\n              <Button :variant=\"mapMode === 'map' ? 'primary' : 'ghost'\" :aria-pressed=\"mapMode === 'map'\" @click=\"mapMode = 'map'\">Kaart</Button>\n              <Button :variant=\"mapMode === 'streetview' ? 'primary' : 'ghost'\" :aria-pressed=\"mapMode === 'streetview'\" @click=\"mapMode = 'streetview'\">Street View</Button>\n            </template>\n            <iframe :key=\"`${id}-${mapMode}`\" :src=\"mapSource\" :title=\"mapMode === 'map' ? `Kaart van ${location.companyName}` : `Street View van ${location.companyName}`\" class=\"location-detail__map\" loading=\"lazy\" referrerpolicy=\"no-referrer-when-downgrade\" allowfullscreen />\n            <div class=\"location-detail__map-links\"><a :href=\"googleMapsUrl(coordinates)\" target=\"_blank\" rel=\"noopener noreferrer\">Open in Google Maps</a><a :href=\"streetViewUrl(coordinates)\" target=\"_blank\" rel=\"noopener noreferrer\">Open Street View</a></div>\n          </Panel>\n          <CadastralMap v-if=\"coordinates\" :key=\"id\" class=\"location-detail__cadastral-panel\" :location-id=\"id\" :latitude=\"coordinates.lat\" :longitude=\"coordinates.lng\" :satellite-image-url=\"cadastralImage\" @loaded=\"cadastral = $event\" />\n      </div>\n      <Panel v-if=\"activeTab === 'analyses'\" title=\"Analysehistorie\" flush>\n        <template #actions><Button :disabled=\"deleting\" @click=\"refreshAnalyses\">Vernieuwen</Button><Button v-if=\"selectedAnalyses.size\" variant=\"danger\" :busy=\"deleting\" @click=\"deleteOpen = true\">Verwijder ({{ selectedAnalyses.size }})</Button></template>\n        <p v-if=\"startedId\" class=\"location-detail__padded\" role=\"status\">Analyse #{{ startedId }} gestart. De status wordt automatisch bijgewerkt.</p>\n        <p v-if=\"deletedMessage\" class=\"location-detail__padded\" role=\"status\">{{ deletedMessage }}</p>\n        <p v-if=\"analysesError\" class=\"location-detail__padded location-detail__error\" role=\"alert\">{{ analysesError }}</p>\n        <p v-if=\"analysesLoading\" class=\"location-detail__padded location-detail__muted\" role=\"status\">Analyses laden...</p>\n        <p v-else-if=\"!analyses.length && !analysesError\" class=\"location-detail__padded location-detail__muted\">Nog geen analyses voor deze locatie.</p>\n        <div v-else-if=\"analyses.length\" class=\"location-detail__table-wrap\">\n          <table class=\"location-detail__table\"><thead><tr>\n            <th><Checkbox :model-value=\"allSelected\" :indeterminate=\"selectedAnalyses.size > 0 && !allSelected\" :disabled=\"deleting\" aria-label=\"Alle analyses selecteren\" @update:model-value=\"selectAll\" /></th><th>Analyse</th><th>Datum</th><th>Gebruiker</th><th>Aanpak</th><th>Score</th><th>Review</th><th>Status</th>\n          </tr></thead><tbody><tr v-for=\"analysis in sortedAnalyses\" :key=\"analysis.id\" class=\"location-detail__analysis-row\" :class=\"{ 'location-detail__row--selected': selectedAnalyses.has(analysis.id) }\" @click=\"router.push(analysisDetailRoute({ locationId: id, analysisId: analysis.id }))\">\n            <td @click.stop><Checkbox :model-value=\"selectedAnalyses.has(analysis.id)\" :disabled=\"deleting\" :aria-label=\"`Selecteer analyse #${analysis.id}`\" @update:model-value=\"toggleAnalysis({ id: analysis.id, selected: $event })\" /></td>\n            <td class=\"tnum\"><RouterLink :to=\"analysisDetailRoute({ locationId: id, analysisId: analysis.id })\" class=\"location-detail__analysis-link\" @click.stop>#{{ analysis.id }}</RouterLink></td><td>{{ formatAnalysisDate(analysis.createdAt) }} <Badge v-if=\"analysis.isDryRun\">Dry run</Badge></td><td>{{ analysis.userName || '–' }}</td>\n            <td>{{ analysis.analysisMode }}</td><td><ScoreBar :score=\"analysis.status === 'completed' ? analysis.consensusOverallScore : null\" /></td>\n            <td><Badge v-if=\"analysis.requiresHumanReview\" tone=\"diverge\">Mens-review</Badge><span v-else class=\"location-detail__muted\">–</span></td><td><Badge :tone=\"analysisStatusLabel(analysis.status).tone\">{{ analysisStatusLabel(analysis.status).label }}</Badge></td>\n          </tr></tbody></table>\n        </div>\n      </Panel>\n      <div v-if=\"activeTab === 'veldfeedback'\" class=\"location-detail__stack\">\n        <LocationFeedbackList :feedback=\"feedback\" :loading=\"feedbackLoading\" :error=\"feedbackError\" @retry=\"loadFeedback\" />\n        <Panel title=\"Werkelijke situatie (ground truth)\">\n          <form class=\"location-detail__ground-truth\" @submit.prevent=\"saveGroundTruth\">\n            <p class=\"location-detail__muted\">Leg vast wat er op de locatie is vastgesteld.</p>\n            <Input v-model=\"parkingSpots\" type=\"number\" label=\"Werkelijk aantal parkeerplaatsen\" :disabled=\"saving\" />\n            <Select v-model=\"adjacent\" :options=\"adjacentOptions\" label=\"Zijn er aangrenzende parkeerplaatsen?\" :disabled=\"saving\" />\n            <Textarea v-model=\"notes\" label=\"Notities\" :rows=\"4\" :disabled=\"saving\" />\n            <p v-if=\"groundTruthError\" class=\"location-detail__error\" role=\"alert\">{{ groundTruthError }}</p>\n            <p v-if=\"groundTruthSaved\" class=\"location-detail__success\" role=\"status\">Werkelijke situatie opgeslagen.</p>\n            <p v-if=\"location.groundTruthUpdatedAt\" class=\"location-detail__muted\">Laatst bijgewerkt: {{ formatAnalysisDate(location.groundTruthUpdatedAt) }}</p>\n            <div><Button type=\"submit\" variant=\"primary\" :busy=\"saving\">{{ saving ? 'Opslaan...' : 'Opslaan' }}</Button></div>\n          </form>\n        </Panel>\n        <RetrievableFeedbackPreview :key=\"id\" :location-id=\"id\" />\n      </div>\n    </template>\n  </PageBody>\n  <RunAnalysisDialog v-if=\"location\" :key=\"id\" v-model:open=\"runOpen\" :location-id=\"id\" @started=\"onAnalysisStarted\" />\n  <Dialog v-model:open=\"deleteOpen\" title=\"Analyses verwijderen?\" :description=\"`De ${selectedAnalyses.size === 1 ? 'geselecteerde analyse verdwijnt' : `${selectedAnalyses.size} geselecteerde analyses verdwijnen`} uit de analysehistorie.`\">\n    <p>Deze analyses worden in de prullenbak geplaatst.</p>\n    <p v-if=\"analysesError\" class=\"location-detail__error\" role=\"alert\">{{ analysesError }}</p>\n    <template #footer><Button :disabled=\"deleting\" @click=\"deleteOpen = false\">Annuleren</Button><Button variant=\"danger\" :busy=\"deleting\" @click=\"confirmDelete\">{{ deleting ? 'Verwijderen...' : 'Verwijderen' }}</Button></template>\n  </Dialog>\n  <Dialog v-model:open=\"scrapeModalOpen\" :title=\"scrapeModal?.label ?? 'Websitedata'\" :max-width=\"760\">\n    <template v-if=\"scrapeModal\"><a v-if=\"safeWebsiteUrl(scrapeModal.url)\" :href=\"safeWebsiteUrl(scrapeModal.url)!\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"location-detail__scrape-link\">{{ scrapeModal.url }}</a><pre class=\"location-detail__scrape-content\">{{ scrapeModal.content }}</pre></template>\n  </Dialog>\n  </div>\n</template>\n\n<style scoped>\n@font-face { font-family: \"Nudica Detail\"; font-style: normal; font-weight: 400; font-display: swap; src: url(\"../assets/nudica-regular.woff2\") format(\"woff2\"); }\n@font-face { font-family: \"Nudica Detail\"; font-style: normal; font-weight: 600 700; font-display: swap; src: url(\"../assets/nudica-bold.woff2\") format(\"woff2\"); }\n.location-detail { --font-sans: \"Nudica Detail\", \"Helvetica Neue\", Arial, sans-serif; min-width: 0; font-family: var(--font-sans); }\n.location-detail__header { display: flex; flex-direction: column; gap: 10px; padding: 12px 20px 0; background: var(--bg-surface); }\n.location-detail__crumbline, .location-detail__titlebar, .location-detail__actions, .location-detail__crumbs { display: flex; align-items: center; min-width: 0; }\n.location-detail__crumbline { gap: 8px; }\n.location-detail__crumbs { gap: 8px; font-size: 14px; }\n.location-detail__crumbs a { display: inline-flex; align-items: center; flex: none; color: var(--fg-3); text-decoration: underline; cursor: pointer; }\n.location-detail__crumbs span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }\n.location-detail__titlebar { gap: 16px; flex-wrap: wrap; }\n.location-detail__titlebar h1 { margin: 0; min-width: 0; font-size: 20px; font-weight: 400; line-height: 28px; }\n.location-detail__actions { gap: 8px; margin-left: auto; flex: none; }\n.location-detail__actions :deep(.btn--primary) { background: var(--brand); color: var(--brand-fg); }\n@media (hover: hover) { .location-detail__actions :deep(.btn--primary:hover) { background: var(--brand-hover); } }\n.location-detail__actions .location-detail__scout { gap: 12px; }\n.location-detail__more { width: 44px; padding: 0; font-size: 24px; }\n.location-detail__action-menu { display: flex; flex-direction: column; min-width: 180px; font-family: \"Nudica Detail\", sans-serif; font-size: 14px; }\n.location-detail__action-menu a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 0 8px; color: var(--fg-1); cursor: pointer; }\n.location-detail__action-menu a:hover { background: var(--bg-inset); }\n.location-detail__body { width: 100%; max-width: none; padding: 16px; }\n.location-detail :deep(.panel__bar) { padding: 8px 12px; min-height: 0; background: var(--bg-inset); }\n.location-detail :deep(.panel__title) { font-weight: 600; font-size: 14px; line-height: 18px; }\n.location-detail :deep(.panel__body:not(.panel__body--flush)) { padding: 12px; }\n.location-detail :deep(.badge) { border-radius: 999px; font-family: inherit; }\n.location-detail__table :deep(.score) { width: 112px; }\n.location-detail__table :deep(.score__value) { order: 2; }\n.location-detail :deep(.score__track) { height: 6px; }\n@media (max-width: 1079px) {\n  .location-detail__header { padding: 12px 16px 0; }\n  .location-detail__titlebar { gap: 8px; flex-wrap: nowrap; }\n  .location-detail__titlebar h1 { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n  .location-detail__crumbline > .location-detail__badges { flex: none; margin-left: auto; gap: 6px; }\n  .location-detail :deep(.btn), .location-detail :deep(.tabs__tab), .location-detail :deep(.location-images__tab) { min-height: 44px; }\n  .location-detail__image-panel { order: 1; }\n  .location-detail__side { order: 2; }\n  .location-detail__map-panel { order: 3; }\n  .location-detail__cadastral-panel { order: 4; }\n}\n.location-detail__overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }\n.location-detail__stack { display: flex; min-width: 0; flex-direction: column; gap: 16px; }\n.location-detail__muted { margin: 0; color: var(--fg-3); font-size: var(--text-ui); }\n.location-detail__error { margin: 0; color: var(--danger-fg); font-size: var(--text-ui); }\n.location-detail__success { margin: 0; color: var(--score-fg); }\n.location-detail__padded { padding: 12px; margin: 0; }\n.location-detail__padded p { margin: 0 0 4px; }\n.location-detail__scout { display: inline-flex; align-items: center; min-height: 32px; padding: 0 8px; color: var(--fg-2); font-size: var(--text-ui); cursor: pointer; }\n.location-detail__fields { margin: 0; font-size: var(--text-ui); overflow-wrap: anywhere; }\n.location-detail__field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--border-1); }\n.location-detail__field:last-child { border-bottom: 0; }\n.location-detail__fields dt { color: var(--fg-3); }\n.location-detail__fields dd { margin: 0; }\n.location-detail__fields a, .location-detail__profile a, .location-detail__socials a, .location-detail__map-links a, .location-detail__scrape-link { color: var(--info-fg); text-decoration: underline; cursor: pointer; overflow-wrap: anywhere; }\n.location-detail__profile { padding: 12px 16px; margin: 0; border-top: 1px solid var(--border-1); font-size: var(--text-ui); }\n.location-detail__badges, .location-detail__socials, .location-detail__scrape { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--text-ui); }\n.location-detail__map { display: block; width: 100%; height: 320px; border: 0; }\n.location-detail__map-links { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px; font-size: var(--text-caption); }\n.location-detail__ground-truth { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }\n.location-detail__table-wrap { max-width: 100%; overflow-x: auto; }\n.location-detail__table { width: 100%; border-collapse: collapse; font-size: var(--text-ui); white-space: nowrap; }\n.location-detail__table th { height: 32px; padding: 0 16px; font-size: 12px; border-bottom: 1px solid var(--border-2); background: var(--bg-inset); color: var(--fg-2); font-weight: 600; text-align: left; }\n.location-detail__table td { height: 32px; padding: 0 16px; border-bottom: 1px solid var(--border-1); }\n.location-detail__table tr:last-child td { border-bottom: 0; }\n.location-detail__row--selected { background: var(--info-bg); }\n.location-detail__analysis-row, .location-detail__analysis-link { cursor: pointer; }\n.location-detail__scrape-content { margin: 16px 0 0; padding: 12px; border: 1px solid var(--border-1); background: var(--bg-inset); color: var(--fg-2); font: inherit; font-size: var(--text-ui); white-space: pre-wrap; overflow-wrap: anywhere; }\n@media (min-width: 1080px) {\n  .location-detail__overview { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }\n  .location-detail__side { grid-column: 2; grid-row: 1 / span 3; }\n  .location-detail__map-panel, .location-detail__cadastral-panel { grid-column: 1; }\n}\n@media (hover: hover) { .location-detail__scout:hover { background: var(--bg-inset); } }\n</style>\n","<script setup lang=\"ts\">\nimport { computed, onScopeDispose, ref, shallowRef, watch } from \"vue\";\nimport Badge from \"../ui/Badge.vue\";\nimport Button from \"../ui/Button.vue\";\nimport ScoreBar from \"../ui/ScoreBar.vue\";\nimport { api } from \"../../lib/api\";\nimport type { AnalysisDetail } from \"../../lib/analysis-detail\";\nimport { analysisStatusLabel, formatAnalysisDate } from \"../../lib/analyses-format\";\nimport { summarizeLocationAnalysis } from \"../../lib/location-analysis-summary\";\nimport { scoreToSuitability, suitabilityLabel, suitabilityToken } from \"../../lib/rating\";\nimport type { LocationAnalysis } from \"../../lib/use-location-detail\";\n\nconst props = defineProps<{ analysis: LocationAnalysis }>();\nconst details = shallowRef<AnalysisDetail | null>(null);\nconst loading = ref(true);\nconst error = ref(\"\");\nlet request = 0;\nconst summary = computed(() => summarizeLocationAnalysis({ ...props.analysis, modelResults: details.value?.modelResults ?? [] }));\nconst status = computed(() => analysisStatusLabel(props.analysis.status));\n\nasync function loadDetails() {\n  const current = ++request;\n  const id = props.analysis.id;\n  loading.value = true;\n  error.value = \"\";\n  try {\n    const result = await api.getAnalysisDetail({ id });\n    if (current !== request) return;\n    if (!result.analysis) throw new Error(\"Deze analyse is niet meer beschikbaar.\");\n    details.value = result.analysis;\n  } catch (caught) {\n    if (current === request) error.value = caught instanceof Error ? caught.message : \"De analysedetails konden niet worden opgehaald.\";\n  } finally {\n    if (current === request) loading.value = false;\n  }\n}\n\nwatch(() => [props.analysis.id, props.analysis.status], () => {\n  details.value = null;\n  void loadDetails();\n}, { immediate: true });\nonScopeDispose(() => { ++request; });\n</script>\n\n<template>\n  <div class=\"location-analysis-summary\">\n    <div class=\"location-analysis-summary__headline\">\n      <span class=\"location-analysis-summary__score tnum\" :aria-label=\"summary.score === null ? 'Geen eindscore' : `Eindscore ${summary.score} van 100`\">{{ summary.score ?? \"-\" }}</span>\n      <div class=\"location-analysis-summary__description\">\n        <ScoreBar :score=\"summary.score\" class=\"location-analysis-summary__bar\" aria-hidden=\"true\" />\n        <span class=\"location-analysis-summary__metadata\">{{ formatAnalysisDate(analysis.createdAt) }}<template v-if=\"analysis.userName\"> · {{ analysis.userName }}</template></span>\n        <span v-if=\"summary.modelNames.length\" class=\"location-analysis-summary__metadata\">{{ summary.modelNames.join(\" · \") }}</span>\n      </div>\n      <div class=\"location-analysis-summary__badges\">\n        <Badge v-if=\"analysis.requiresHumanReview\" tone=\"diverge\">Mens-review</Badge>\n        <Badge v-if=\"analysis.isDryRun\">Dry-run</Badge>\n        <Badge v-if=\"analysis.status !== 'completed'\" :tone=\"status.tone\">{{ status.label }}</Badge>\n      </div>\n    </div>\n    <p v-if=\"loading\" class=\"location-analysis-summary__message\" role=\"status\">Analysedetails laden…</p>\n    <div v-else-if=\"error\" class=\"location-analysis-summary__message\" role=\"alert\">\n      <p class=\"location-analysis-summary__error\">{{ error }}</p>\n      <Button variant=\"ghost\" @click=\"loadDetails\">Opnieuw proberen</Button>\n    </div>\n    <template v-else-if=\"summary.aspects.length\">\n      <p v-if=\"summary.modelNames.length > 1\" class=\"location-analysis-summary__source\">Aspectscores: {{ summary.sourceModel }}</p>\n      <dl class=\"location-analysis-summary__aspects\">\n        <div v-for=\"aspect in summary.aspects\" :key=\"aspect.key\" class=\"location-analysis-summary__aspect\">\n          <dt>{{ aspect.label }}</dt>\n          <dd>\n            <span class=\"location-analysis-summary__aspect-score tnum\">{{ aspect.score ?? \"-\" }}</span>\n            <Badge v-if=\"aspect.score !== null\" :tone=\"suitabilityToken(scoreToSuitability(aspect.score))\">{{ suitabilityLabel(scoreToSuitability(aspect.score)) }}</Badge>\n            <span v-else class=\"location-analysis-summary__metadata\">Niet beschikbaar</span>\n          </dd>\n        </div>\n      </dl>\n    </template>\n    <p v-else class=\"location-analysis-summary__message\">Er zijn nog geen voltooide modelresultaten beschikbaar.</p>\n  </div>\n</template>\n\n<style scoped>\n.location-analysis-summary__headline {\n  display: flex;\n  align-items: center;\n  gap: 16px;\n  padding: 12px;\n  border-bottom: 1px solid var(--border-1);\n}\n.location-analysis-summary__score { flex: 0 0 auto; font-size: 40px; font-weight: 300; line-height: 1; }\n.location-analysis-summary__description { display: flex; flex: 1; flex-direction: column; gap: 6px; min-width: 0; }\n.location-analysis-summary__bar { width: 160px; max-width: 100%; }\n.location-analysis-summary__bar :deep(.score__value) { display: none; }\n.location-analysis-summary__bar :deep(.score__track) { height: 6px; border-radius: 0; }\n.location-analysis-summary__metadata { color: var(--fg-3); font-size: 12px; line-height: 16px; overflow-wrap: anywhere; }\n.location-analysis-summary__badges { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }\n.location-analysis-summary__badges:empty { display: none; }\n.location-analysis-summary__aspects { margin: 0; }\n.location-analysis-summary__aspect { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 8px 12px; }\n.location-analysis-summary__aspect + .location-analysis-summary__aspect { border-top: 1px solid var(--border-1); }\n.location-analysis-summary__aspect dt { color: var(--fg-2); font-size: 13px; line-height: 18px; }\n.location-analysis-summary__aspect dd { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 0; }\n.location-analysis-summary__aspect-score { width: 24px; text-align: right; }\n.location-analysis-summary__message { margin: 0; padding: 12px; color: var(--fg-3); font-size: 13px; }\n.location-analysis-summary__source { margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--border-1); color: var(--fg-3); font-size: 12px; }\n.location-analysis-summary__error { margin: 0 0 8px; color: var(--danger-fg); }\n@media (max-width: 719px) {\n  .location-analysis-summary__headline { flex-wrap: wrap; }\n  .location-analysis-summary__description { flex-basis: calc(100% - 88px); }\n  .location-analysis-summary__badges { flex-direction: row; flex-wrap: wrap; }\n  .location-analysis-summary__aspect { gap: 8px; }\n  .location-analysis-summary__aspect dd { gap: 6px; }\n}\n</style>\n","/**\n * Display helpers for the analyses list. Pure, so the wording and number\n * formats the Next admin used can be pinned in tests.\n */\nimport type { StatusToken } from \"./rating\";\n\nexport type FeedbackImpact = \"shift\" | \"considered\" | \"none\";\n\n/** dd-mm-jjjj uu:mm in nl-NL. `timeZone` exists so tests can pin the zone; the\n    view leaves it out and formats in the browser's zone. */\nexport function formatAnalysisDate(iso: string, options: { timeZone?: string } = {}): string {\n  // Assembled from parts: ICU versions differ on the separator between date and\n  // time (\"05-03-2026, 12:34\" in Node, \"05-03-2026 12:34\" in browsers), and the\n  // column should read the same everywhere.\n  const parts = new Intl.DateTimeFormat(\"nl-NL\", {\n    day: \"2-digit\",\n    month: \"2-digit\",\n    year: \"numeric\",\n    hour: \"2-digit\",\n    minute: \"2-digit\",\n    timeZone: options.timeZone,\n  }).formatToParts(new Date(iso));\n  const get = (type: Intl.DateTimeFormatPartTypes) => parts.find((p) => p.type === type)?.value ?? \"\";\n  return `${get(\"day\")}-${get(\"month\")}-${get(\"year\")} ${get(\"hour\")}:${get(\"minute\")}`;\n}\n\n/** Costs are tracked in dollar cents (provider billing). Zero and unknown both\n    read as a dash: a \"$0.00\" would suggest a measured cost of nothing. */\nexport function formatCostCents(cents: number | null): string {\n  if (cents === null || cents <= 0) return \"-\";\n  return `$${(cents / 100).toFixed(2)}`;\n}\n\nconst STATUS_LABELS: Record<string, { label: string; tone: StatusToken | \"info\" }> = {\n  pending: { label: \"Wachten\", tone: \"neutral\" },\n  running: { label: \"Bezig\", tone: \"info\" },\n  completed: { label: \"Voltooid\", tone: \"score\" },\n  failed: { label: \"Mislukt\", tone: \"danger\" },\n  cancelled: { label: \"Geannuleerd\", tone: \"neutral\" },\n};\n\nexport function analysisStatusLabel(status: string): { label: string; tone: StatusToken | \"info\" } {\n  return STATUS_LABELS[status] ?? { label: status, tone: \"neutral\" };\n}\n\nconst IMPACT_TITLES: Record<FeedbackImpact, string> = {\n  shift: \"Veldfeedback verschoof de score\",\n  considered: \"Veldfeedback meegenomen, score ongewijzigd\",\n  none: \"Geen veldfeedback gebruikt\",\n};\n\nexport function feedbackImpactTitle(impact: FeedbackImpact): string {\n  return IMPACT_TITLES[impact];\n}\n\n/** The selection is keyed by analysis id and holds the location id, so the\n    copy action survives paging. Two analyses of one location are one location. */\nexport function selectedLocationCount(selected: ReadonlyMap<number, number>): number {\n  return new Set(selected.values()).size;\n}\n","import type { AdminRPC } from \"../../../../js/admin-rpc\";\n\ntype StoredAnalysisDetail = NonNullable<Awaited<ReturnType<typeof AdminRPC.getAnalysisDetail>>[\"analysis\"]>;\nexport type ScoringPreview = NonNullable<Awaited<ReturnType<typeof AdminRPC.previewAnalysisScoring>>[\"preview\"]>;\n/** A stored model result plus, when previewed, its stored observations scored with the current profile version. */\nexport type AnalysisResult = StoredAnalysisDetail[\"modelResults\"][number] & { liveScoringBreakdown?: string | null };\nexport type AnalysisDetail = Omit<StoredAnalysisDetail, \"modelResults\"> & { modelResults: AnalysisResult[] };\n\n/** Places a scoring preview beside the stored results; a result without a preview keeps no live breakdown. */\nexport function applyScoringPreview(analysis: StoredAnalysisDetail, preview: ScoringPreview | null): AnalysisDetail {\n  const live = new Map(preview?.results.map(result => [result.modelResultId, result.liveScoringBreakdown]) ?? []);\n  return { ...analysis, modelResults: analysis.modelResults.map(result => ({ ...result, liveScoringBreakdown: live.get(result.id) ?? null })) };\n}\n\n/** Only a finished analysis with stored observations has anything to preview. */\nexport function wantsScoringPreview(analysis: StoredAnalysisDetail): boolean {\n  return !analysisNeedsPolling(analysis) && analysis.modelResults.some(result => result.observations);\n}\n\ninterface AnalysisState {\n  status: string;\n  modelResults: Array<{ status: string }>;\n}\n\nexport function analysisNeedsPolling(analysis: AnalysisState): boolean {\n  if (analysis.status === \"cancelled\") return false;\n  return analysis.status === \"running\" || analysis.status === \"pending\"\n    || analysis.modelResults.some(model => ![\"completed\", \"failed\", \"cancelled\"].includes(model.status));\n}\n\n/** A rerun is a new observe-then-score analysis; the original keeps its method, prompt and scores. */\nexport function buildAnalysisRerun(analysis: {\n  locationId: number;\n  isDryRun: boolean;\n  modelResults: Array<{ modelId: string; modelDisplayName: string }>;\n}) {\n  if (!analysis.modelResults.length) throw new Error(\"Deze analyse heeft geen modellen om opnieuw te draaien.\");\n  return {\n    locationId: analysis.locationId,\n    modelIds: analysis.modelResults.map(model => ({ id: model.modelId, displayName: model.modelDisplayName })),\n    dryRun: analysis.isDryRun,\n    useCache: true,\n  };\n}\n\nexport function primaryModelResult<T extends { id: number; status: string }>(results: readonly T[]): T | null {\n  return [...results].filter(model => model.status === \"completed\").sort((a, b) => b.id - a.id)[0]\n    ?? results[results.length - 1] ?? null;\n}\n\nexport function analysisUsage(results: Array<{\n  status: string;\n  inputTokens: number | null;\n  outputTokens: number | null;\n  costCents: number | null;\n  tokenUsage: string | null;\n}>) {\n  const paid = results.filter(model => model.inputTokens !== null && model.inputTokens > 0);\n  return {\n    models: paid.length,\n    cached: results.filter(model => model.status === \"completed\" && model.tokenUsage === \"cached\").length,\n    tokens: paid.reduce((sum, model) => sum + (model.inputTokens ?? 0) + (model.outputTokens ?? 0), 0),\n    costCents: paid.reduce((sum, model) => sum + (model.costCents ?? 0), 0),\n  };\n}\n\nexport function parseAnalysisObject(value: string | null): Record<string, unknown> | null {\n  if (!value) return null;\n  try {\n    const parsed: unknown = JSON.parse(value);\n    return parsed !== null && typeof parsed === \"object\" && !Array.isArray(parsed) ? parsed as Record<string, unknown> : null;\n  } catch {\n    return null;\n  }\n}\n","/**\n * Stable identifiers for the hard-exclusion reasons (`reden`) and review flags\n * emitted by `scoreLocatie()` (scoring.ts).\n *\n * Single source of truth: the scorer writes these exact strings into the\n * breakdown, and any UI that maps a scoring outcome back to an observation field\n * reads them from here — so the strings can never drift between the two sides.\n *\n * This module deliberately has NO imports. Clients can reference these\n * constants without importing the scoring implementation. Both modules are\n * dependency-free; the standalone worker copies are guarded by parity tests.\n */\n\n/** `reden` values set on a hard exclusion (scoring short-circuits to overall 0). */\nexport const HARD_EXCLUSION = {\n  snelweg: \"Snelweglocatie\",\n  geenShop: \"Geen publieke shopfunctie\",\n  shopOnverifieerbaar: \"Shopfunctie niet verifieerbaar\",\n  geenContainer: \"Geen container past op terrein\",\n} as const;\n\n/** Review flags pushed onto `breakdown.flags` (each marks human review needed). */\nexport const REVIEW_FLAG = {\n  snelwegOnverifieerbaar: \"snelwegcheck_niet_verifieerbaar\",\n  shopOnverifieerbaar: \"shopfunctie_niet_verifieerbaar\",\n  parkeerregel: \"50pct_regel_niet_gehaald_of_onzeker\",\n  alleen10ft: \"alleen_10ft_passend\",\n  servicesOnzeker: \"services_te_veel_onzeker\",\n  parkeertellingOnzeker: \"parkeertelling_onzeker\",\n  reststrook: \"reststrook_als_alternatief\",\n  vrijeHoogteOnzeker: \"vrije_hoogte_onzeker\",\n  vrachtwagenOnzeker: \"vrachtwagenbereik_onzeker\",\n  zichtbaarheidOnzeker: \"zichtbaarheid_onzeker\",\n  terreingrens: \"terreingrens_niet_eenduidig\",\n\n  // TEC-152: gezet wanneer de score steunt op een aangrenzend parkeerterrein dat\n  // (mogelijk) buiten de kadastergrens valt. Voorkomt een onterechte score 0 bij\n  // retail-bestemmingen met een grote bijbehorende parkeerplaats, maar vraagt de\n  // veldagent om het eigendom/de bruikbaarheid ter plaatse te controleren.\n  aangrenzendeParkeerruimte: \"parkeerplaats_buiten_perceel_meegerekend\",\n\n  // TEC-153 P5: gezet wanneer een lage parkeerscore is verzacht doordat er\n  // realistisch bruikbare openbare/straatparkeerplekken vlakbij liggen. Bewuste\n  // normwijziging (klanten gebruiken die plekken), maar vraagt de veldagent om de\n  // bruikbaarheid ter plaatse te bevestigen.\n  openbaarParkeren: \"openbaar_parkeren_meegerekend\",\n\n  // TEC-153 P4: gezet wanneer het model meerdere ondernemingen op één adres ziet\n  // (bv. wasstraat naast tankstation). De AI pakt dan geregeld het verkeerde\n  // (grootste) bedrijf; de veldagent moet controleren dat de met naam genoemde\n  // onderneming beoordeeld is.\n  coLocatie: \"meerdere_bedrijven_op_adres\",\n\n  // Self-learning Laag 1: a deterministic flag raised when enough semantically\n  // similar past field feedback DISAGREED with the AI on an aspect. Not produced\n  // by scoreLocatie itself but by deriveFeedbackReviewFlags (feedback-review-flags.ts)\n  // and merged into the breakdown post-scoring. Lives here so every flag string\n  // stays in one place and REVIEW_FLAG_LABELS can map it.\n  veldfeedbackAardGrootte: \"veldfeedback_tegenspraak_aard_grootte\",\n  veldfeedbackExtraServices: \"veldfeedback_tegenspraak_extra_services\",\n  veldfeedbackParkeerruimte: \"veldfeedback_tegenspraak_parkeerruimte\",\n  veldfeedbackToegankelijkheid: \"veldfeedback_tegenspraak_toegankelijkheid\",\n  veldfeedbackZichtbaarheid: \"veldfeedback_tegenspraak_zichtbaarheid\",\n} as const;\n","import { HARD_EXCLUSION, REVIEW_FLAG } from \"../../../../profiles/snl-inzamelpunten/scoring-markers\";\n\nexport const ASPECT_LABELS = [\n  { key: \"scoreNatureSize\" as const, label: \"Aard & Grootte\" },\n  { key: \"scoreExtraServices\" as const, label: \"Extra Services\" },\n  { key: \"scoreParkingSpace\" as const, label: \"Parkeerruimte\" },\n  { key: \"scoreAccessibility\" as const, label: \"Toegankelijkheid\" },\n  { key: \"scoreVisibility\" as const, label: \"Zichtbaarheid\" },\n];\n\nexport type AspectScoresUI = Record<string, number>;\n\nexport interface AspectTraceStepUI {\n  label: string;\n  effect: string;\n  field?: string;\n}\n\nexport interface AspectTraceUI {\n  steps: AspectTraceStepUI[];\n  result: number;\n}\n\nexport type HintTone = \"points-pos\" | \"points-neg\" | \"points-base\" | \"gate\" | \"flag\";\n\nexport interface ScoreHint {\n  tone: HintTone;\n  text: string;\n\n  active?: boolean;\n}\n\nexport const ASPECT_LABEL_BY_KEY: Record<string, string> = {\n  aard_grootte: \"Aard & Grootte\",\n  extra_services: \"Extra Services\",\n  parkeerruimte: \"Parkeerruimte\",\n  toegankelijkheid: \"Toegankelijkheid\",\n  zichtbaarheid: \"Zichtbaarheid\",\n  bonus: \"Eindscore-bonus\",\n};\nexport interface ScoreOutcome {\n  reden?: string;\n  flags: string[];\n}\nexport interface ObservationRuleDef {\n  field: string;\n  tone: HintTone;\n  text: string;\n  fires: (o: ScoreOutcome) => boolean;\n}\n\nexport const OBSERVATION_RULE_HINTS: ObservationRuleDef[] = [\n  {\n    field: \"harde_checks.is_snelweglocatie\",\n    tone: \"gate\",\n    text: \"Harde uitsluiting bij ja\",\n    fires: (o) => o.reden === HARD_EXCLUSION.snelweg,\n  },\n  {\n    field: \"harde_checks.heeft_publieke_shop_functie\",\n    tone: \"gate\",\n    text: \"Harde uitsluiting bij nee\",\n    fires: (o) =>\n      o.reden === HARD_EXCLUSION.geenShop || o.reden === HARD_EXCLUSION.shopOnverifieerbaar,\n  },\n  {\n    field: \"harde_checks.parkeerregel_50pct_gehaald\",\n    tone: \"flag\",\n    text: \"Review bij nee/onzeker\",\n    fires: (o) => o.flags.includes(REVIEW_FLAG.parkeerregel),\n  },\n  {\n    field: \"terreinafbakening.terreingrens_eenduidig\",\n    tone: \"flag\",\n    text: \"Review bij nee\",\n    fires: (o) => o.flags.includes(REVIEW_FLAG.terreingrens),\n  },\n  {\n    field: \"container_fit.fits_20ft\",\n    tone: \"gate\",\n    text: \"Harde uitsluiting bij geen passende container\",\n    fires: (o) => o.reden === HARD_EXCLUSION.geenContainer,\n  },\n];\n\nexport function effectTone(effect: string): HintTone {\n  if (/review/i.test(effect)) return \"flag\";\n  if (effect.startsWith(\"+\")) return \"points-pos\";\n  if (effect.startsWith(\"−\") || effect.startsWith(\"-\")) return \"points-neg\";\n  return \"points-base\";\n}\n\nexport function buildScoreHints(breakdown?: ScoreBreakdownUI | null): Map<string, ScoreHint[]> {\n  const map = new Map<string, ScoreHint[]>();\n  const add = (field: string, hint: ScoreHint) => {\n    const list = map.get(field) ?? [];\n    list.push(hint);\n    map.set(field, list);\n  };\n  for (const [aspectKey, aspect] of Object.entries(breakdown?.trace ?? {})) {\n    const label = ASPECT_LABEL_BY_KEY[aspectKey] ?? aspectKey;\n    for (const step of aspect.steps) {\n      if (!step.field) continue;\n      add(step.field, { tone: effectTone(step.effect), text: `${label} ${step.effect}` });\n    }\n  }\n  const outcome: ScoreOutcome = { reden: breakdown?.reden, flags: breakdown?.flags ?? [] };\n  for (const rule of OBSERVATION_RULE_HINTS) {\n    add(rule.field, { tone: rule.tone, text: rule.text, active: rule.fires(outcome) });\n  }\n  return map;\n}\n\nexport interface ScoreBreakdownUI {\n  overall: number;\n  aanbeveling: string;\n  aspect_scores: AspectScoresUI;\n  fits_40ft_bonus_toegepast: boolean;\n  requires_human_review: boolean;\n  flags: string[];\n  reden?: string;\n  weights_version?: number;\n\n  trace?: Record<string, AspectTraceUI>;\n}\n\nexport const ASPECT_BREAKDOWN_LABELS: Array<{ key: string; label: string; weightPct: number }> = [\n  { key: \"aard_grootte\", label: \"Aard & Grootte\", weightPct: 20 },\n  { key: \"extra_services\", label: \"Extra Services\", weightPct: 20 },\n  { key: \"parkeerruimte\", label: \"Parkeerruimte\", weightPct: 25 },\n  { key: \"toegankelijkheid\", label: \"Toegankelijkheid\", weightPct: 20 },\n  { key: \"zichtbaarheid\", label: \"Zichtbaarheid\", weightPct: 15 },\n];\n\nexport const BRON_LABELS: Record<string, string> = {\n  satelliet: \"Satelliet\",\n  streetview: \"Street View\",\n  kadaster: \"Kadaster\",\n  website: \"Website\",\n  kvk: \"KvK\",\n  adres: \"Adres\",\n  osm: \"OSM\",\n  niet_vaststelbaar: \"Niet vaststelbaar\",\n  gemengd: \"Gemengd\",\n};\n\nexport const SECTION_TOOLTIPS: Record<string, string> = {\n  terreinafbakening: \"Bepaling van de perceelgrenzen, wat hoort wel/niet bij het te beoordelen terrein.\",\n  harde_checks: \"Beslissende controles die een locatie direct geschikt of ongeschikt maken.\",\n  container_fit: \"Of en welke container fysiek op de aanbevolen plek past.\",\n  wegtype_voor_pand: \"Type weg direct vóór het pand. Bepaalt bereikbaarheid en zichtbaarheid.\",\n  parkeren: \"Parkeercapaciteit en wat er overblijft na plaatsing van een container.\",\n  services: \"Extra voorzieningen op de locatie (wasstraat, laadpaal, pakketautomaat, etc.).\",\n  logistiek: \"Bereikbaarheid en obstakels voor het plaatsen/legen van de container.\",\n  zichtbaarheid: \"Hoe goed de locatie en de container-plek zichtbaar zijn vanaf de openbare weg.\",\n  extras: \"Aanvullende opmerkingen en aspecten die het model niet kon vaststellen.\",\n};\nexport const FIELD_TOOLTIPS: Record<string, string> = {\n  kadastrale_grens_aanwezig: \"Is er een kadastrale perceelgrens (rode lijn) bekend voor deze locatie?\",\n  geidentificeerde_grenzen: \"Welke grenzen het model heeft herkend (bijv. kadastrale grens, hekwerk).\",\n  uitgesloten_gebieden: \"Gebieden buiten het te beoordelen terrein (bijv. openbare weg, trottoir).\",\n  terreingrens_eenduidig: \"Is de terreingrens duidelijk te bepalen? Bij 'nee' wordt de analyse gemarkeerd voor menselijke review.\",\n  bron: \"De bron waarop deze observatie is gebaseerd (kadaster, satelliet, Street View, …).\",\n  is_snelweglocatie: \"Ligt de locatie direct aan een snelweg/verzorgingsplaats? Zo ja → harde uitsluiting (ongeschikt).\",\n  heeft_publieke_shop_functie: \"Heeft de locatie een publiek toegankelijke winkel/shop? Zo nee → harde uitsluiting.\",\n  heeft_publieke_shop_functie_detail: \"Toelichting bij de shop-functie, wat is er op het beeldmateriaal zichtbaar.\",\n  parkeerregel_50pct_gehaald: \"Blijft na plaatsing van een 20ft-container minstens 50% van de parkeervakken over? Bij 'nee'/'onzeker' → review nodig.\",\n  fits_20ft: \"Past een 20ft-container (standaardmaat) op de aanbevolen plek?\",\n  fits_40ft: \"Past een grotere 40ft-container? Zo ja → +5 bonus op de eindscore.\",\n  fits_10ft_fallback: \"Past minimaal een kleine 10ft-container als terugvaloptie?\",\n  aanbevolen_plek: \"De door het model aanbevolen plek voor de container.\",\n  totaal: \"Totaal aantal getelde parkeervakken binnen de terreingrenzen.\",\n  onzeker: \"Aantal vakken dat zichtbaar is maar niet zeker geteld kon worden.\",\n  ingenomen_door_20ft: \"Aantal parkeervakken dat een 20ft-container inneemt (meestal 2).\",\n  resterend_na_20ft: \"Aantal parkeervakken dat overblijft na plaatsing van de container.\",\n  percentage_resterend: \"Percentage parkeervakken dat overblijft na plaatsing (gebruikt voor de 50%-regel).\",\n  reststrook_aanwezig: \"Is er een aparte reststrook waar de container kan staan zonder vakken in te nemen?\",\n  openbare_parkeerplekken_bruikbaar: \"Zijn er realistisch bruikbare openbare/straatparkeerplekken vlakbij die klanten in de praktijk gebruiken?\",\n  openbare_parkeerplekken_aantal: \"Ruwe schatting van het aantal bruikbare openbare/straatparkeerplekken vlakbij.\",\n  verharding_type: \"Type verharding van het parkeerterrein (asfalt, klinkers, beton, …).\",\n  grote_publieksbestemming: \"Is dit een grote publiekstrekker/bestemmingslocatie (tuincentrum, bouwmarkt) die lokaal opvalt, ook zonder doorgaande weg?\",\n  verharding_goed_onderhouden: \"Ziet de verharding er goed onderhouden uit?\",\n  website_actueel: \"Lijkt de website van het bedrijf actueel/actief?\",\n  wasstraat: \"Automatische wasstraat aanwezig.\",\n  wasplaats_zelfbediening: \"Zelfbedienings-wasplaats (jet-wash boxen).\",\n  ev_laadpaal: \"Laadpaal voor elektrische auto's.\",\n  luchtpomp: \"Lucht-/bandenpomp.\",\n  stofzuiger: \"Stofzuiger voor klanten.\",\n  pakketautomaat: \"Pakketautomaat (afhaal-/verzendpunt).\",\n  bakkerij_togo: \"Bakkerij / vers brood to-go.\",\n  foodservice_togo: \"Foodservice / snacks to-go.\",\n  geldautomaat: \"Geldautomaat (pinautomaat).\",\n  toilet_publiek: \"Publiek toegankelijk toilet.\",\n  kledingcontainer: \"Textiel-/kledinginzamelbak (bv. Sympany, ReShare).\",\n  aanhangerverhuur: \"Verhuurpunt voor aanhangers/trailers.\",\n  vrije_hoogte_aanbevolen_plek: \"Is er voldoende vrije hoogte boven de aanbevolen plek (geen luifel/obstakel)?\",\n  vrachtwagen_kan_plek_bereiken: \"Kan een vrachtwagen de plek bereiken om de container te plaatsen/legen? Bij onzeker → review.\",\n  klantroute_geblokkeerd: \"Zou de container de loop-/rijroute van klanten blokkeren?\",\n  conflictgebieden: \"Plekken waar plaatsing tot conflicten leidt (bijv. in-/uitrit, pompeiland).\",\n  hoeklocatie: \"Is het een hoeklocatie (vanaf twee zijden zichtbaar)?\",\n  locatie_zichtbaar_vanaf_openbare_weg: \"Is de locatie zelf zichtbaar vanaf de openbare weg?\",\n  aanbevolen_plek_zichtbaar_vanaf_openbare_weg: \"Is de aanbevolen container-plek zichtbaar vanaf de openbare weg?\",\n  opmerkingen: \"Vrije opmerkingen van het model.\",\n  niet_vaststelbare_aspecten: \"Aspecten die het model niet kon vaststellen uit het beschikbare beeldmateriaal.\",\n};\n\nexport function formatObservationValue(v: unknown): string {\n  if (v === null) return \"niet vaststelbaar\";\n  if (v === undefined) return \"-\";\n  if (typeof v === \"boolean\") return v ? \"ja\" : \"nee\";\n  if (typeof v === \"number\") return String(v);\n  if (typeof v === \"string\") return v.length > 0 ? v : \"-\";\n  if (Array.isArray(v)) {\n    if (v.length === 0) return \"geen\";\n    return v.map((x) => (typeof x === \"string\" ? x : JSON.stringify(x))).join(\", \");\n  }\n  return JSON.stringify(v);\n}\nexport const SECTION_DEFAULT_BRON: Record<string, string> = {\n  terreinafbakening: \"satelliet\",\n  harde_checks: \"gemengd\",\n  container_fit: \"satelliet\",\n  wegtype_voor_pand: \"satelliet\",\n  parkeren: \"satelliet\",\n  services: \"streetview\",\n  logistiek: \"satelliet\",\n  zichtbaarheid: \"streetview\",\n};\n\nexport const SERVICE_CHECKLIST_LABELS: Record<string, string> = {\n  wasstraat: \"Wasstraat\",\n  wasplaats_zelfbediening: \"Wasplaats (zelfbediening)\",\n  ev_laadpaal: \"EV-laadpaal\",\n  luchtpomp: \"Luchtpomp\",\n  stofzuiger: \"Stofzuiger\",\n  pakketautomaat: \"Pakketautomaat\",\n  bakkerij_togo: \"Bakkerij to-go\",\n  foodservice_togo: \"Foodservice to-go\",\n  geldautomaat: \"Geldautomaat\",\n  toilet_publiek: \"Publiek toilet\",\n  kledingcontainer: \"Kledingcontainer\",\n  aanhangerverhuur: \"Aanhangerverhuur\",\n};\n\nexport interface ChecklistEntry {\n  aanwezig: boolean | null;\n  bron: string;\n  evidence: string;\n}\n\nexport function isChecklistEntry(v: unknown): v is ChecklistEntry {\n  if (v === null || typeof v !== \"object\") return false;\n  const o = v as Record<string, unknown>;\n  return (\n    \"aanwezig\" in o &&\n    typeof o.bron === \"string\" &&\n    typeof o.evidence === \"string\" &&\n    (typeof o.aanwezig === \"boolean\" || o.aanwezig === null)\n  );\n}\n\nexport const REVIEW_FLAG_LABELS: Record<string, string> = {\n  snelwegcheck_niet_verifieerbaar: \"Snelweglocatie-check kon niet geverifieerd worden\",\n  shopfunctie_niet_verifieerbaar: \"Publieke shopfunctie kon niet geverifieerd worden\",\n  \"50pct_regel_niet_gehaald_of_onzeker\": \"Parkeerregel (50%-norm) niet gehaald of onzeker\",\n  alleen_10ft_passend: \"Alleen een 10ft-container past, geen 20ft\",\n  services_te_veel_onzeker: \"Te veel services onzeker om betrouwbaar te scoren\",\n  parkeertelling_onzeker: \"Resterend parkeerpercentage kon niet bepaald worden\",\n  reststrook_als_alternatief: \"Reststrook meegeteld als alternatieve plek\",\n  parkeerplaats_buiten_perceel_meegerekend: \"Aangrenzende parkeerplaats meegerekend (mogelijk buiten het perceel), controleer eigendom ter plaatse\",\n  openbaar_parkeren_meegerekend: \"Openbare/straatparkeerplekken meegeteld, controleer bruikbaarheid ter plaatse\",\n  meerdere_bedrijven_op_adres: \"Meerdere bedrijven op dit adres, controleer of het juiste bedrijf is beoordeeld\",\n  vrije_hoogte_onzeker: \"Vrije hoogte op de aanbevolen plek is onzeker\",\n  vrachtwagenbereik_onzeker: \"Onzeker of een vrachtwagen de aanbevolen plek kan bereiken\",\n  zichtbaarheid_onzeker: \"Zichtbaarheid van de aanbevolen plek vanaf de openbare weg is onzeker\",\n  terreingrens_niet_eenduidig: \"Terreingrens is niet eenduidig vast te stellen\",\n  veldfeedback_tegenspraak_aard_grootte: \"Veldfeedback sprak de AI tegen op Aard & grootte\",\n  veldfeedback_tegenspraak_extra_services: \"Veldfeedback sprak de AI tegen op Extra services\",\n  veldfeedback_tegenspraak_parkeerruimte: \"Veldfeedback sprak de AI tegen op Parkeerruimte\",\n  veldfeedback_tegenspraak_toegankelijkheid: \"Veldfeedback sprak de AI tegen op Toegankelijkheid\",\n  veldfeedback_tegenspraak_zichtbaarheid: \"Veldfeedback sprak de AI tegen op Zichtbaarheid\",\n};\n\nexport function buildScoreBreakdownView({ breakdown, liveBreakdown, driftExplainedByCalibration = false }: {\n  breakdown: ScoreBreakdownUI;\n  liveBreakdown?: ScoreBreakdownUI | null;\n  driftExplainedByCalibration?: boolean;\n}) {\n  const isHardExclusion = Boolean(breakdown.reden);\n  const aspects = ASPECT_BREAKDOWN_LABELS.map(aspect => {\n    const score = breakdown.aspect_scores?.[aspect.key] ?? 0;\n    return {\n      ...aspect,\n      score,\n      contribution: score * (aspect.weightPct / 100),\n      trace: liveBreakdown?.trace?.[aspect.key] ?? breakdown.trace?.[aspect.key],\n    };\n  });\n  const changedAspects = liveBreakdown ? aspects.filter(aspect => aspect.score !== (liveBreakdown.aspect_scores?.[aspect.key] ?? 0)) : [];\n  const reviewFlags = breakdown.flags?.length ? breakdown.flags : (liveBreakdown?.flags ?? []);\n  return {\n    isHardExclusion,\n    aspects: isHardExclusion ? [] : aspects,\n    weightedSum: aspects.reduce((sum, aspect) => sum + aspect.contribution, 0),\n    changedAspects,\n    liveDiffers: Boolean(liveBreakdown && (liveBreakdown.overall !== breakdown.overall || changedAspects.length || Boolean(liveBreakdown.reden) !== isHardExclusion)) && !driftExplainedByCalibration,\n    reviewReasons: reviewFlags.map(flag => REVIEW_FLAG_LABELS[flag] ?? flag.replace(/_/g, \" \")),\n  };\n}\n\nexport interface ObservationChecklistItem {\n  key: string;\n  label: string;\n  tooltip?: string;\n  icon: string;\n  status: \"present\" | \"absent\" | \"unknown\";\n  evidence: string;\n  hints: ScoreHint[];\n  sourceLabel: string | null;\n}\n\nexport interface ObservationField {\n  key: string;\n  label: string;\n  tooltip?: string;\n  value: string;\n  hints: ScoreHint[];\n  sourceLabel: string | null;\n  checklist?: ObservationChecklistItem[];\n}\n\nexport interface ObservationSection {\n  key: string;\n  label: string;\n  tooltip?: string;\n  sourceLabel: string | null;\n  primitive: boolean;\n  value: string;\n  hints: ScoreHint[];\n  empty: boolean;\n  fields: ObservationField[];\n}\n\nexport function buildObservationSections({ observations, breakdown, sections }: {\n  observations: Record<string, unknown>;\n  breakdown?: ScoreBreakdownUI | null;\n  sections?: string[];\n}): ObservationSection[] {\n  const hints = buildScoreHints(breakdown);\n  return Object.entries(observations).filter(([key]) => !sections || sections.includes(key)).map(([sectionKey, sectionValue]) => {\n    const source = SECTION_DEFAULT_BRON[sectionKey];\n    const primitive = sectionValue === null || typeof sectionValue !== \"object\" || Array.isArray(sectionValue);\n    const entries = primitive ? [] : Object.entries(sectionValue as Record<string, unknown>);\n    const sources = new Map(entries.filter(([key, value]) => key.endsWith(\"_bron\") && typeof value === \"string\" && value.length > 0).map(([key, value]) => [key.slice(0, -5), value as string]));\n    const fields: ObservationField[] = entries.filter(([key, value]) => !key.endsWith(\"_bron\") && !(Array.isArray(value) && value.length > 0 && typeof value[0] === \"object\")).map(([key, value]) => {\n      const fieldSource = sources.get(key);\n      const field: ObservationField = {\n        key,\n        label: key.replace(/_/g, \" \"),\n        tooltip: FIELD_TOOLTIPS[key],\n        value: formatObservationValue(value),\n        hints: hints.get(`${sectionKey}.${key}`) ?? [],\n        sourceLabel: fieldSource ? (BRON_LABELS[fieldSource] ?? fieldSource) : null,\n      };\n      if (key === \"checklist\" && value !== null && typeof value === \"object\" && !Array.isArray(value) && Object.values(value).every(isChecklistEntry)) {\n        field.checklist = Object.entries(value as Record<string, ChecklistEntry>).map(([serviceKey, entry]) => ({\n          key: serviceKey,\n          label: SERVICE_CHECKLIST_LABELS[serviceKey] ?? serviceKey.replace(/_/g, \" \"),\n          tooltip: FIELD_TOOLTIPS[serviceKey],\n          icon: entry.aanwezig === true ? \"✓\" : entry.aanwezig === false ? \"✗\" : \"?\",\n          status: entry.aanwezig === true ? \"present\" : entry.aanwezig === false ? \"absent\" : \"unknown\",\n          evidence: entry.evidence.trim() ? entry.evidence : \"-\",\n          hints: hints.get(`services.checklist.${serviceKey}`) ?? [],\n          sourceLabel: entry.aanwezig !== false ? (BRON_LABELS[entry.bron] ?? entry.bron) : null,\n        }));\n      }\n      return field;\n    });\n    return {\n      key: sectionKey,\n      label: sectionKey.replace(/_/g, \" \"),\n      tooltip: SECTION_TOOLTIPS[sectionKey],\n      sourceLabel: source ? (BRON_LABELS[source] ?? source) : null,\n      primitive,\n      value: primitive ? formatObservationValue(sectionValue) : \"\",\n      hints: hints.get(sectionKey) ?? [],\n      empty: !primitive && entries.length === 0,\n      fields,\n    };\n  });\n}\n","import { primaryModelResult, type AnalysisResult } from \"./analysis-detail\";\nimport { ASPECT_LABELS } from \"./analysis-scoring\";\n\nexport type SummaryModelResult = Pick<AnalysisResult, \"id\" | \"status\" | \"modelDisplayName\" | typeof ASPECT_LABELS[number][\"key\"]>;\n\nexport function summarizeLocationAnalysis({ status, consensusOverallScore, modelResults }: {\n  status: string;\n  consensusOverallScore: number | null;\n  modelResults: readonly SummaryModelResult[];\n}) {\n  const source = primaryModelResult(modelResults.filter(model => model.status === \"completed\"));\n  return {\n    score: status === \"completed\" ? consensusOverallScore : null,\n    modelNames: [...new Set(modelResults.map(model => model.modelDisplayName))],\n    sourceModel: source?.modelDisplayName ?? null,\n    aspects: source ? ASPECT_LABELS.map(aspect => ({ ...aspect, score: source[aspect.key] })) : [],\n  };\n}\n","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createVNode as _createVNode, createTextVNode as _createTextVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, withCtx as _withCtx, createBlock as _createBlock, renderList as _renderList } from \"vue\"\n\nconst _hoisted_1 = { class: \"location-analysis-summary\" }\nconst _hoisted_2 = { class: \"location-analysis-summary__headline\" }\nconst _hoisted_3 = [\"aria-label\"]\nconst _hoisted_4 = { class: \"location-analysis-summary__description\" }\nconst _hoisted_5 = { class: \"location-analysis-summary__metadata\" }\nconst _hoisted_6 = {\n  key: 0,\n  class: \"location-analysis-summary__metadata\"\n}\nconst _hoisted_7 = { class: \"location-analysis-summary__badges\" }\nconst _hoisted_8 = {\n  key: 0,\n  class: \"location-analysis-summary__message\",\n  role: \"status\"\n}\nconst _hoisted_9 = {\n  key: 1,\n  class: \"location-analysis-summary__message\",\n  role: \"alert\"\n}\nconst _hoisted_10 = { class: \"location-analysis-summary__error\" }\nconst _hoisted_11 = {\n  key: 0,\n  class: \"location-analysis-summary__source\"\n}\nconst _hoisted_12 = { class: \"location-analysis-summary__aspects\" }\nconst _hoisted_13 = { class: \"location-analysis-summary__aspect-score tnum\" }\nconst _hoisted_14 = {\n  key: 1,\n  class: \"location-analysis-summary__metadata\"\n}\nconst _hoisted_15 = {\n  key: 3,\n  class: \"location-analysis-summary__message\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createElementVNode(\"span\", {\n        class: \"location-analysis-summary__score tnum\",\n        \"aria-label\": $setup.summary.score === null ? 'Geen eindscore' : `Eindscore ${$setup.summary.score} van 100`\n      }, _toDisplayString($setup.summary.score ?? \"-\"), 9 /* TEXT, PROPS */, _hoisted_3),\n      _createElementVNode(\"div\", _hoisted_4, [\n        _createVNode($setup[\"ScoreBar\"], {\n          score: $setup.summary.score,\n          class: \"location-analysis-summary__bar\",\n          \"aria-hidden\": \"true\"\n        }, null, 8 /* PROPS */, [\"score\"]),\n        _createElementVNode(\"span\", _hoisted_5, [\n          _createTextVNode(_toDisplayString($setup.formatAnalysisDate($props.analysis.createdAt)), 1 /* TEXT */),\n          ($props.analysis.userName)\n            ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                _createTextVNode(\" · \" + _toDisplayString($props.analysis.userName), 1 /* TEXT */)\n              ], 64 /* STABLE_FRAGMENT */))\n            : _createCommentVNode(\"v-if\", true)\n        ]),\n        ($setup.summary.modelNames.length)\n          ? (_openBlock(), _createElementBlock(\"span\", _hoisted_6, _toDisplayString($setup.summary.modelNames.join(\" · \")), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true)\n      ]),\n      _createElementVNode(\"div\", _hoisted_7, [\n        ($props.analysis.requiresHumanReview)\n          ? (_openBlock(), _createBlock($setup[\"Badge\"], {\n              key: 0,\n              tone: \"diverge\"\n            }, {\n              default: _withCtx(() => _cache[0] || (_cache[0] = [\n                _createTextVNode(\"Mens-review\", -1 /* CACHED */)\n              ])),\n              _: 1 /* STABLE */,\n              __: [0]\n            }))\n          : _createCommentVNode(\"v-if\", true),\n        ($props.analysis.isDryRun)\n          ? (_openBlock(), _createBlock($setup[\"Badge\"], { key: 1 }, {\n              default: _withCtx(() => _cache[1] || (_cache[1] = [\n                _createTextVNode(\"Dry-run\", -1 /* CACHED */)\n              ])),\n              _: 1 /* STABLE */,\n              __: [1]\n            }))\n          : _createCommentVNode(\"v-if\", true),\n        ($props.analysis.status !== 'completed')\n          ? (_openBlock(), _createBlock($setup[\"Badge\"], {\n              key: 2,\n              tone: $setup.status.tone\n            }, {\n              default: _withCtx(() => [\n                _createTextVNode(_toDisplayString($setup.status.label), 1 /* TEXT */)\n              ]),\n              _: 1 /* STABLE */\n            }, 8 /* PROPS */, [\"tone\"]))\n          : _createCommentVNode(\"v-if\", true)\n      ])\n    ]),\n    ($setup.loading)\n      ? (_openBlock(), _createElementBlock(\"p\", _hoisted_8, \"Analysedetails laden…\"))\n      : ($setup.error)\n        ? (_openBlock(), _createElementBlock(\"div\", _hoisted_9, [\n            _createElementVNode(\"p\", _hoisted_10, _toDisplayString($setup.error), 1 /* TEXT */),\n            _createVNode($setup[\"Button\"], {\n              variant: \"ghost\",\n              onClick: $setup.loadDetails\n            }, {\n              default: _withCtx(() => _cache[2] || (_cache[2] = [\n                _createTextVNode(\"Opnieuw proberen\", -1 /* CACHED */)\n              ])),\n              _: 1 /* STABLE */,\n              __: [2]\n            })\n          ]))\n        : ($setup.summary.aspects.length)\n          ? (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [\n              ($setup.summary.modelNames.length > 1)\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_11, \"Aspectscores: \" + _toDisplayString($setup.summary.sourceModel), 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true),\n              _createElementVNode(\"dl\", _hoisted_12, [\n                (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.summary.aspects, (aspect) => {\n                  return (_openBlock(), _createElementBlock(\"div\", {\n                    key: aspect.key,\n                    class: \"location-analysis-summary__aspect\"\n                  }, [\n                    _createElementVNode(\"dt\", null, _toDisplayString(aspect.label), 1 /* TEXT */),\n                    _createElementVNode(\"dd\", null, [\n                      _createElementVNode(\"span\", _hoisted_13, _toDisplayString(aspect.score ?? \"-\"), 1 /* TEXT */),\n                      (aspect.score !== null)\n                        ? (_openBlock(), _createBlock($setup[\"Badge\"], {\n                            key: 0,\n                            tone: $setup.suitabilityToken($setup.scoreToSuitability(aspect.score))\n                          }, {\n                            default: _withCtx(() => [\n                              _createTextVNode(_toDisplayString($setup.suitabilityLabel($setup.scoreToSuitability(aspect.score))), 1 /* TEXT */)\n                            ]),\n                            _: 2 /* DYNAMIC */\n                          }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"tone\"]))\n                        : (_openBlock(), _createElementBlock(\"span\", _hoisted_14, \"Niet beschikbaar\"))\n                    ])\n                  ]))\n                }), 128 /* KEYED_FRAGMENT */))\n              ])\n            ], 64 /* STABLE_FRAGMENT */))\n          : (_openBlock(), _createElementBlock(\"p\", _hoisted_15, \"Er zijn nog geen voltooide modelresultaten beschikbaar.\"))\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationAnalysisSummary.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationAnalysisSummary.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationAnalysisSummary.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationAnalysisSummary.vue\";script.__scopeId = \"data-v-317049aa\";export default script;","import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", {\n    class: _normalizeClass([\"pagebody\", { 'pagebody--fill': $props.fill }])\n  }, [\n    _renderSlot(_ctx.$slots, \"default\", {}, undefined, true)\n  ], 2 /* CLASS */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/PageBody.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/PageBody.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/PageBody.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/PageBody.vue\";script.__scopeId = \"data-v-220a4a61\";export default script;","import { toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"panel\" }\nconst _hoisted_2 = {\n  key: 0,\n  class: \"panel__bar\"\n}\nconst _hoisted_3 = {\n  key: 0,\n  class: \"panel__title\"\n}\nconst _hoisted_4 = {\n  key: 1,\n  class: \"panel__actions\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"section\", _hoisted_1, [\n    ($props.title || _ctx.$slots.actions)\n      ? (_openBlock(), _createElementBlock(\"header\", _hoisted_2, [\n          ($props.title)\n            ? (_openBlock(), _createElementBlock(\"h2\", _hoisted_3, _toDisplayString($props.title), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true),\n          (_ctx.$slots.actions)\n            ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n                _renderSlot(_ctx.$slots, \"actions\", {}, undefined, true)\n              ]))\n            : _createCommentVNode(\"v-if\", true)\n        ]))\n      : _createCommentVNode(\"v-if\", true),\n    _createElementVNode(\"div\", {\n      class: _normalizeClass([\"panel__body\", { 'panel__body--flush': $props.flush }])\n    }, [\n      _renderSlot(_ctx.$slots, \"default\", {}, undefined, true)\n    ], 2 /* CLASS */)\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Panel.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Panel.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Panel.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Panel.vue\";script.__scopeId = \"data-v-6b149a56\";export default script;","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, renderSlot as _renderSlot, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"meta\" }\nconst _hoisted_2 = { class: \"eyebrow\" }\nconst _hoisted_3 = { class: \"meta__value\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.items, (item, index) => {\n      return (_openBlock(), _createElementBlock(\"div\", {\n        key: item.label,\n        class: _normalizeClass([\"meta__cell\", { 'meta__cell--first': index === 0 }])\n      }, [\n        _createElementVNode(\"span\", _hoisted_2, _toDisplayString(item.label), 1 /* TEXT */),\n        _createElementVNode(\"span\", _hoisted_3, [\n          _renderSlot(_ctx.$slots, \"item\", {\n            item: item,\n            index: index\n          }, () => [\n            _createTextVNode(_toDisplayString(item.value), 1 /* TEXT */)\n          ], true)\n        ])\n      ], 2 /* CLASS */))\n    }), 128 /* KEYED_FRAGMENT */))\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/MetaBar.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/MetaBar.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/MetaBar.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/MetaBar.vue\";script.__scopeId = \"data-v-df547788\";export default script;","<template>\n  <div class=\"tabs\" role=\"tablist\">\n    <RouterLink\n      v-for=\"tab in tabs\"\n      :key=\"tab.value\"\n      :to=\"tab.to\"\n      class=\"tabs__tab\"\n      :class=\"{ 'tabs__tab--on': tab.value === active }\"\n      role=\"tab\"\n      :aria-selected=\"tab.value === active\"\n    >\n      {{ tab.label }}\n      <span v-if=\"typeof tab.count === 'number'\" class=\"tabs__count tnum\">{{ fmt(tab.count) }}</span>\n    </RouterLink>\n    <!-- The hairline continues behind the last tab: without this spacer it\n         would stop mid-band and the row falls apart. -->\n    <span class=\"tabs__spacer\" aria-hidden=\"true\" />\n  </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { RouterLink, type RouteLocationRaw } from \"vue-router\";\n\n// Carbon tabs from the kit, not pills. Measured in the design system\n// (`components/navigation/Tabs.jsx`): 40px high, a 2px underline that turns\n// ink on the active tab and stays hairline on the rest, active label in\n// weight 600.\n//\n// A tab is a real route (RouterLink), so the active tab lives in the URL:\n// refreshing returns the same tab and the Back button steps between tabs.\n// Meant for the `tabs` slot of PageHeader, which drops its own bottom border\n// because the tab baseline IS that line.\nexport interface PageTab {\n  value: string;\n  label: string;\n  to: RouteLocationRaw;\n  count?: number;\n}\n\ndefineProps<{ tabs: PageTab[]; active: string }>();\n\nfunction fmt(n: number): string {\n  return n.toLocaleString(\"nl-NL\");\n}\n</script>\n\n<style scoped>\n.tabs {\n  display: flex;\n  margin-bottom: -1px;\n  overflow-x: auto;\n}\n\n.tabs__tab {\n  display: flex;\n  flex: none;\n  align-items: center;\n  gap: 8px;\n  height: 40px;\n  padding: 0 16px;\n  border-bottom: 2px solid var(--border-1);\n  color: var(--fg-3);\n  font-size: var(--text-ui);\n  white-space: nowrap;\n  cursor: pointer;\n  transition: background-color 110ms cubic-bezier(0.2, 0, 0.38, 0.9),\n    color 110ms cubic-bezier(0.2, 0, 0.38, 0.9);\n}\n\n.tabs__tab--on {\n  border-bottom-color: var(--fg-1);\n  color: var(--fg-1);\n  font-weight: 600;\n}\n\n.tabs__count {\n  font-size: var(--text-caption);\n  color: var(--fg-3);\n}\n\n.tabs__spacer {\n  flex: 1;\n  border-bottom: 2px solid var(--border-1);\n}\n\n@media (hover: hover) {\n  .tabs__tab:not(.tabs__tab--on):hover {\n    background: var(--bg-inset);\n    color: var(--fg-1);\n  }\n}\n</style>\n","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, withCtx as _withCtx, createBlock as _createBlock, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = {\n  class: \"tabs\",\n  role: \"tablist\"\n}\nconst _hoisted_2 = {\n  key: 0,\n  class: \"tabs__count tnum\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.tabs, (tab) => {\n      return (_openBlock(), _createBlock($setup[\"RouterLink\"], {\n        key: tab.value,\n        to: tab.to,\n        class: _normalizeClass([\"tabs__tab\", { 'tabs__tab--on': tab.value === $props.active }]),\n        role: \"tab\",\n        \"aria-selected\": tab.value === $props.active\n      }, {\n        default: _withCtx(() => [\n          _createTextVNode(_toDisplayString(tab.label) + \" \", 1 /* TEXT */),\n          (typeof tab.count === 'number')\n            ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString($setup.fmt(tab.count)), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true)\n        ]),\n        _: 2 /* DYNAMIC */\n      }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\", \"class\", \"aria-selected\"]))\n    }), 128 /* KEYED_FRAGMENT */)),\n    _createCommentVNode(\" The hairline continues behind the last tab: without this spacer it\\n         would stop mid-band and the row falls apart. \"),\n    _cache[0] || (_cache[0] = _createElementVNode(\"span\", {\n      class: \"tabs__spacer\",\n      \"aria-hidden\": \"true\"\n    }, null, -1 /* CACHED */))\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/PageTabs.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/PageTabs.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/PageTabs.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/PageTabs.vue\";script.__scopeId = \"data-v-db2cbbca\";export default script;","<template>\n  <input\n    class=\"snl-checkbox\"\n    type=\"checkbox\"\n    :checked=\"modelValue\"\n    :indeterminate=\"indeterminate\"\n    :aria-label=\"ariaLabel\"\n    :disabled=\"disabled\"\n    @change=\"onChange\"\n  >\n</template>\n\n<script setup lang=\"ts\">\n// Thin wrapper around a real <input type=\"checkbox\">. The drawing lives in the\n// global `.snl-checkbox` rule in frontend.scss, so a bare input with that\n// class (as the locations table uses) looks identical. This component only adds\n// the v-model contract.\n//\n// `indeterminate` is a DOM property, not an attribute; Vue binds it as such.\nwithDefaults(defineProps<{\n  modelValue: boolean;\n  indeterminate?: boolean;\n  ariaLabel?: string;\n  disabled?: boolean;\n}>(), { indeterminate: false, disabled: false });\n\nconst emit = defineEmits<{ \"update:modelValue\": [value: boolean] }>();\n\nfunction onChange(event: Event) {\n  emit(\"update:modelValue\", (event.target as HTMLInputElement).checked);\n}\n</script>\n","import { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"checked\", \"indeterminate\", \"aria-label\", \"disabled\"]\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"input\", {\n    class: \"snl-checkbox\",\n    type: \"checkbox\",\n    checked: $props.modelValue,\n    indeterminate: $props.indeterminate,\n    \"aria-label\": $props.ariaLabel,\n    disabled: $props.disabled,\n    onChange: $setup.onChange\n  }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_1))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Checkbox.vue?type=script\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Checkbox.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Checkbox.vue\";export default script;","<template>\n  <label class=\"field\">\n    <span v-if=\"label\" class=\"field-label\">{{ label }}</span>\n    <textarea\n      class=\"field__area\"\n      :value=\"modelValue\"\n      :placeholder=\"placeholder\"\n      :rows=\"rows\"\n      :disabled=\"disabled\"\n      @input=\"onInput\"\n    />\n  </label>\n</template>\n\n<script setup lang=\"ts\">\n// Carbon field, multi-line: same drawing as Input.vue (no frame, only the\n// underline, radius on top) but it grows with `rows` and can be resized\n// vertically.\nwithDefaults(defineProps<{\n  modelValue: string;\n  label?: string;\n  placeholder?: string;\n  rows?: number;\n  disabled?: boolean;\n}>(), { rows: 3, disabled: false });\n\nconst emit = defineEmits<{ \"update:modelValue\": [value: string] }>();\n\nfunction onInput(event: Event) {\n  emit(\"update:modelValue\", (event.target as HTMLTextAreaElement).value);\n}\n</script>\n\n<style scoped>\n.field {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n  min-width: 0;\n}\n\n.field__area {\n  width: 100%;\n  min-height: 40px;\n  padding: 10px 12px;\n  border: 0;\n  border-bottom: 1px solid var(--field-line);\n  border-radius: var(--radius) var(--radius) 0 0;\n  background: var(--bg-inset);\n  color: var(--fg-1);\n  font: inherit;\n  line-height: 20px;\n  resize: vertical;\n}\n\n.field__area::placeholder {\n  color: var(--fg-4);\n}\n\n.field__area:disabled {\n  opacity: 0.5;\n}\n</style>\n","import { toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"field\" }\nconst _hoisted_2 = {\n  key: 0,\n  class: \"field-label\"\n}\nconst _hoisted_3 = [\"value\", \"placeholder\", \"rows\", \"disabled\"]\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"label\", _hoisted_1, [\n    ($props.label)\n      ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, _toDisplayString($props.label), 1 /* TEXT */))\n      : _createCommentVNode(\"v-if\", true),\n    _createElementVNode(\"textarea\", {\n      class: \"field__area\",\n      value: $props.modelValue,\n      placeholder: $props.placeholder,\n      rows: $props.rows,\n      disabled: $props.disabled,\n      onInput: $setup.onInput\n    }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_3)\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Textarea.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Textarea.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Textarea.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Textarea.vue\";script.__scopeId = \"data-v-3d276cec\";export default script;","<script setup lang=\"ts\">\nimport { computed, ref, useId, watch } from \"vue\";\nimport { LOCATION_IMAGE_TABS, resolveImageTab, type LocationImage, type LocationCoordinates } from \"../../lib/location-images\";\n\nconst props = defineProps<{ images: readonly LocationImage[]; coordinates?: LocationCoordinates | null; preferred?: LocationImage[\"type\"] }>();\nconst selected = ref<LocationImage[\"type\"] | null>(null);\nconst active = computed(() => resolveImageTab({ images: props.images, selected: selected.value, preferred: props.preferred }));\nconst current = computed(() => props.images.find(image => image.type === active.value));\nconst shown = computed(() => current.value?.cached && current.value.url ? current.value : null);\nconst tabs = computed(() => LOCATION_IMAGE_TABS.map(tab => ({ ...tab, available: props.images.some(image => image.type === tab.type && image.cached && image.url) })));\nconst id = useId();\nwatch(() => props.coordinates, () => { selected.value = null; });\n\nfunction onTabKeydown(event: KeyboardEvent) {\n  const index = tabs.value.findIndex(tab => tab.type === active.value);\n  let next: number;\n  if (event.key === \"ArrowRight\") next = (index + 1) % tabs.value.length;\n  else if (event.key === \"ArrowLeft\") next = (index + tabs.value.length - 1) % tabs.value.length;\n  else if (event.key === \"Home\") next = 0;\n  else if (event.key === \"End\") next = tabs.value.length - 1;\n  else return;\n  event.preventDefault();\n  selected.value = tabs.value[next].type;\n  const buttons = (event.currentTarget as HTMLElement).querySelectorAll<HTMLButtonElement>(\"button\");\n  buttons[next]?.focus();\n}\n</script>\n\n<template>\n  <div class=\"location-images\">\n    <div role=\"tablist\" aria-label=\"Beeldmateriaal\" class=\"location-images__tabs\" @keydown=\"onTabKeydown\">\n      <button v-for=\"tab in tabs\" :id=\"`${id}-${tab.type}`\" :key=\"tab.type\" type=\"button\" role=\"tab\" class=\"location-images__tab\" :class=\"{ 'location-images__tab--active': active === tab.type, 'location-images__tab--missing': !tab.available }\" :aria-selected=\"active === tab.type\" :aria-controls=\"`${id}-panel`\" :tabindex=\"active === tab.type ? 0 : -1\" @click=\"selected = tab.type\">\n        {{ tab.label }}<span v-if=\"!tab.available\" aria-label=\"niet beschikbaar\">·</span>\n      </button>\n    </div>\n    <div :id=\"`${id}-panel`\" class=\"location-images__body\" role=\"tabpanel\" :aria-labelledby=\"`${id}-${active}`\">\n      <a v-if=\"shown\" :href=\"shown.url!\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"location-images__link\" title=\"Open het beeld op volledige grootte\">\n        <img :src=\"shown.url!\" :alt=\"shown.label\" width=\"1280\" height=\"1280\" class=\"location-images__image\">\n      </a>\n      <div v-else class=\"location-images__empty\">\n        {{ current?.skipped ? (current.skipReason || 'Overgeslagen') : active.startsWith('streetview') ? 'Geen Street View-panorama op deze coördinaten' : 'Nog niet opgehaald' }}\n      </div>\n      <div class=\"location-images__footer\">\n        <span>Kadastrale grenzen zijn indicatief. Bron: PDOK Kadaster (BRK).<template v-if=\"coordinates\"> Coördinaten {{ coordinates.lat }}, {{ coordinates.lng }}.</template></span>\n        <a v-if=\"coordinates\" :href=\"`https://www.google.com/maps/@${coordinates.lat},${coordinates.lng},18z`\" target=\"_blank\" rel=\"noopener noreferrer\">Google Maps</a>\n      </div>\n    </div>\n  </div>\n</template>\n\n<style scoped>\n.location-images { min-width: 0; }\n.location-images__tabs { display: flex; padding: 0 12px; overflow-x: auto; border-bottom: 1px solid var(--border-1); }\n.location-images__tab { display: flex; flex: none; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--fg-3); font: inherit; font-size: var(--text-ui); cursor: pointer; }\n.location-images__tab--active { border-bottom-color: var(--fg-1); color: var(--fg-1); font-weight: 600; }\n.location-images__tab--missing { color: var(--fg-4); }\n.location-images__body { display: flex; flex-direction: column; gap: 8px; padding: 12px; }\n.location-images__link { display: block; cursor: pointer; }\n.location-images__image { display: block; width: 100%; height: 380px; border: 1px solid var(--border-1); object-fit: cover; }\n.location-images__empty { display: flex; align-items: center; justify-content: center; height: 380px; padding: 16px; border: 1px solid var(--border-1); background: var(--bg-inset); color: var(--fg-3); font-size: var(--text-ui); text-align: center; }\n.location-images__footer { display: flex; flex-wrap: wrap; align-items: start; gap: 12px; font-size: var(--text-caption); color: var(--fg-3); }\n.location-images__footer span { flex: 1; min-width: 160px; }\n.location-images__footer a { color: var(--info-fg); text-decoration: underline; cursor: pointer; }\n@media (hover: hover) { .location-images__tab:hover { background: var(--bg-inset); } }\n@media (max-width: 600px) { .location-images__image, .location-images__empty { height: 300px; } }\n</style>\n","export interface LocationImage {\n  type: \"satellite\" | \"satellite-cadastral\" | \"streetview-0\" | \"streetview-90\" | \"streetview-180\" | \"streetview-270\";\n  label: string;\n  filename?: string | null;\n  cached: boolean;\n  url: string | null;\n  skipped?: boolean;\n  skipReason?: string;\n}\n\nexport interface LocationCoordinates {\n  lat: string | number;\n  lng: string | number;\n}\n\nexport const LOCATION_IMAGE_TABS: ReadonlyArray<{ type: LocationImage[\"type\"]; label: string }> = [\n  { type: \"satellite\", label: \"Satelliet\" },\n  { type: \"satellite-cadastral\", label: \"Kadastraal\" },\n  { type: \"streetview-0\", label: \"SV noord\" },\n  { type: \"streetview-90\", label: \"SV oost\" },\n  { type: \"streetview-180\", label: \"SV zuid\" },\n  { type: \"streetview-270\", label: \"SV west\" },\n];\n\nexport function availableLocationImages(images: readonly LocationImage[]): Array<LocationImage & { url: string }> {\n  return images.filter((image): image is LocationImage & { url: string } => image.cached && Boolean(image.url));\n}\n\nexport function resolveImageTab(options: { images: readonly LocationImage[]; selected: LocationImage[\"type\"] | null; preferred?: LocationImage[\"type\"] }): LocationImage[\"type\"] {\n  const available = availableLocationImages(options.images);\n  return options.selected\n    ?? available.find(image => image.type === options.preferred)?.type\n    ?? LOCATION_IMAGE_TABS.find(tab => available.some(image => image.type === tab.type))?.type\n    ?? \"satellite\";\n}\n","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"location-images\" }\nconst _hoisted_2 = [\"id\", \"aria-selected\", \"aria-controls\", \"tabindex\", \"onClick\"]\nconst _hoisted_3 = {\n  key: 0,\n  \"aria-label\": \"niet beschikbaar\"\n}\nconst _hoisted_4 = [\"id\", \"aria-labelledby\"]\nconst _hoisted_5 = [\"href\"]\nconst _hoisted_6 = [\"src\", \"alt\"]\nconst _hoisted_7 = {\n  key: 1,\n  class: \"location-images__empty\"\n}\nconst _hoisted_8 = { class: \"location-images__footer\" }\nconst _hoisted_9 = [\"href\"]\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"div\", {\n      role: \"tablist\",\n      \"aria-label\": \"Beeldmateriaal\",\n      class: \"location-images__tabs\",\n      onKeydown: $setup.onTabKeydown\n    }, [\n      (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.tabs, (tab) => {\n        return (_openBlock(), _createElementBlock(\"button\", {\n          id: `${$setup.id}-${tab.type}`,\n          key: tab.type,\n          type: \"button\",\n          role: \"tab\",\n          class: _normalizeClass([\"location-images__tab\", { 'location-images__tab--active': $setup.active === tab.type, 'location-images__tab--missing': !tab.available }]),\n          \"aria-selected\": $setup.active === tab.type,\n          \"aria-controls\": `${$setup.id}-panel`,\n          tabindex: $setup.active === tab.type ? 0 : -1,\n          onClick: $event => ($setup.selected = tab.type)\n        }, [\n          _createTextVNode(_toDisplayString(tab.label), 1 /* TEXT */),\n          (!tab.available)\n            ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, \"·\"))\n            : _createCommentVNode(\"v-if\", true)\n        ], 10 /* CLASS, PROPS */, _hoisted_2))\n      }), 128 /* KEYED_FRAGMENT */))\n    ], 32 /* NEED_HYDRATION */),\n    _createElementVNode(\"div\", {\n      id: `${$setup.id}-panel`,\n      class: \"location-images__body\",\n      role: \"tabpanel\",\n      \"aria-labelledby\": `${$setup.id}-${$setup.active}`\n    }, [\n      ($setup.shown)\n        ? (_openBlock(), _createElementBlock(\"a\", {\n            key: 0,\n            href: $setup.shown.url!,\n            target: \"_blank\",\n            rel: \"noopener noreferrer\",\n            class: \"location-images__link\",\n            title: \"Open het beeld op volledige grootte\"\n          }, [\n            _createElementVNode(\"img\", {\n              src: $setup.shown.url!,\n              alt: $setup.shown.label,\n              width: \"1280\",\n              height: \"1280\",\n              class: \"location-images__image\"\n            }, null, 8 /* PROPS */, _hoisted_6)\n          ], 8 /* PROPS */, _hoisted_5))\n        : (_openBlock(), _createElementBlock(\"div\", _hoisted_7, _toDisplayString($setup.current?.skipped ? ($setup.current.skipReason || 'Overgeslagen') : $setup.active.startsWith('streetview') ? 'Geen Street View-panorama op deze coördinaten' : 'Nog niet opgehaald'), 1 /* TEXT */)),\n      _createElementVNode(\"div\", _hoisted_8, [\n        _createElementVNode(\"span\", null, [\n          _cache[0] || (_cache[0] = _createTextVNode(\"Kadastrale grenzen zijn indicatief. Bron: PDOK Kadaster (BRK).\", -1 /* CACHED */)),\n          ($props.coordinates)\n            ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                _createTextVNode(\" Coördinaten \" + _toDisplayString($props.coordinates.lat) + \", \" + _toDisplayString($props.coordinates.lng) + \".\", 1 /* TEXT */)\n              ], 64 /* STABLE_FRAGMENT */))\n            : _createCommentVNode(\"v-if\", true)\n        ]),\n        ($props.coordinates)\n          ? (_openBlock(), _createElementBlock(\"a\", {\n              key: 0,\n              href: `https://www.google.com/maps/@${$props.coordinates.lat},${$props.coordinates.lng},18z`,\n              target: \"_blank\",\n              rel: \"noopener noreferrer\"\n            }, \"Google Maps\", 8 /* PROPS */, _hoisted_9))\n          : _createCommentVNode(\"v-if\", true)\n      ])\n    ], 8 /* PROPS */, _hoisted_4)\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationImageTabs.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationImageTabs.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationImageTabs.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationImageTabs.vue\";script.__scopeId = \"data-v-065074b6\";export default script;","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { RouterLink } from \"vue-router\";\nimport type { LocationFeedback } from \"../../lib/use-location-detail\";\nimport { DIMENSION_LABELS, maskPii, ratingLabel } from \"../../lib/feedback-export\";\nimport { formatFeedbackDateTime } from \"../../lib/feedback-table\";\nimport Panel from \"../ui/Panel.vue\";\nimport Button from \"../ui/Button.vue\";\nimport Badge from \"../ui/Badge.vue\";\nimport EmptyState from \"../ui/EmptyState.vue\";\n\nconst props = defineProps<{ feedback: LocationFeedback[]; loading: boolean; error: string }>();\ndefineEmits<{ retry: [] }>();\n\nconst dimensions = [\n  { key: \"natureSize\", rating: \"feedbackNatureSize\", reason: \"reasonNatureSize\" },\n  { key: \"extraServices\", rating: \"feedbackExtraServices\", reason: \"reasonExtraServices\" },\n  { key: \"parkingSpace\", rating: \"feedbackParkingSpace\", reason: \"reasonParkingSpace\" },\n  { key: \"accessibility\", rating: \"feedbackAccessibility\", reason: \"reasonAccessibility\" },\n  { key: \"visibility\", rating: \"feedbackVisibility\", reason: \"reasonVisibility\" },\n] as const;\nconst rows = computed(() => props.feedback.map(item => ({\n  ...item,\n  dimensions: dimensions.map(dimension => ({\n    key: dimension.key,\n    label: DIMENSION_LABELS[dimension.key],\n    rating: item[dimension.rating],\n    reason: item[dimension.reason],\n  })),\n})));\n\nfunction ratingTone(rating: string | null): \"score\" | \"danger\" | \"neutral\" {\n  return rating === \"agree\" ? \"score\" : rating === \"disagree\" ? \"danger\" : \"neutral\";\n}\n</script>\n\n<template>\n  <Panel title=\"Ingediende veldfeedback\">\n    <p v-if=\"loading\" class=\"location-feedback__muted\" role=\"status\">Veldfeedback laden...</p>\n    <div v-else-if=\"error\" class=\"location-feedback__stack\">\n      <p class=\"location-feedback__error\" role=\"alert\">Veldfeedback ophalen mislukt: {{ error }}</p>\n      <div><Button @click=\"$emit('retry')\">Opnieuw proberen</Button></div>\n    </div>\n    <EmptyState v-else-if=\"!feedback.length\" icon=\"flag\" title=\"Nog geen veldfeedback voor deze locatie.\" />\n    <div v-else class=\"location-feedback__stack\">\n      <p class=\"location-feedback__muted\">Beoordelingen die veldagenten voor deze locatie hebben ingediend.</p>\n      <article v-for=\"item in rows\" :key=\"item.id\" class=\"location-feedback__report\" :aria-label=\"`Beoordeling #${item.id}`\">\n        <header class=\"location-feedback__header\">\n          <h3 class=\"location-feedback__title\">{{ formatFeedbackDateTime(item.createdAt) }}</h3>\n          <RouterLink :to=\"`/feedback/${item.id}`\" class=\"location-feedback__link\">Volledige beoordeling</RouterLink>\n        </header>\n        <div class=\"location-feedback__verdict\">\n          <strong>Eindoordeel</strong>\n          <Badge :tone=\"ratingTone(item.feedbackOverallRating)\">{{ ratingLabel(item.feedbackOverallRating) }}</Badge>\n        </div>\n        <p v-if=\"item.reasonOverallRating\" class=\"location-feedback__notes\">{{ maskPii(item.reasonOverallRating) }}</p>\n        <dl class=\"location-feedback__dimensions\">\n          <div v-for=\"dimension in item.dimensions\" :key=\"dimension.key\" class=\"location-feedback__dimension\">\n            <dt>{{ dimension.label }}</dt>\n            <dd class=\"location-feedback__answer\">\n              <Badge :tone=\"ratingTone(dimension.rating)\">{{ ratingLabel(dimension.rating) }}</Badge>\n              <p v-if=\"dimension.reason\" class=\"location-feedback__notes\">{{ maskPii(dimension.reason) }}</p>\n            </dd>\n          </div>\n        </dl>\n        <div v-if=\"item.aiMissesNotes\" class=\"location-feedback__stack\">\n          <strong>Wat de AI mist</strong>\n          <p class=\"location-feedback__notes\">{{ maskPii(item.aiMissesNotes) }}</p>\n        </div>\n        <div v-if=\"item.generalNotes\" class=\"location-feedback__stack\">\n          <strong>Algemene opmerkingen</strong>\n          <p class=\"location-feedback__notes\">{{ maskPii(item.generalNotes) }}</p>\n        </div>\n      </article>\n    </div>\n  </Panel>\n</template>\n\n<style scoped>\n.location-feedback__stack { display: flex; flex-direction: column; gap: 12px; }\n.location-feedback__report { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--border-1); border-radius: var(--radius); }\n.location-feedback__header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }\n.location-feedback__title { margin: 0; font-size: var(--text-ui); font-weight: 600; }\n.location-feedback__muted { margin: 0; color: var(--fg-3); }\n.location-feedback__error { margin: 0; color: var(--danger-fg); }\n.location-feedback__verdict { display: flex; align-items: center; gap: 12px; }\n.location-feedback__dimensions { display: flex; flex-direction: column; margin: 0; }\n.location-feedback__dimension { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--border-1); }\n.location-feedback__answer { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; min-width: 0; }\n.location-feedback__notes { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }\n.location-feedback__link { color: var(--primary); cursor: pointer; }\n.location-feedback__link:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }\n.location-feedback__link:active { text-decoration: underline; }\n@media (min-width: 600px) { .location-feedback__dimension { grid-template-columns: 180px minmax(0, 1fr); } }\n@media (hover: hover) { .location-feedback__link:hover { text-decoration: underline; } }\n</style>\n","import type { FeedbackDetailDTO, FeedbackDimensionKey } from \"./rpc\";\n\n// Port of frontend/lib/feedback-export.ts plus `maskPii` from\n// frontend/components/analyses/retrieved-feedback-helpers.ts. Pure: no WRD,\n// no RPC, so the admin webdesign re-exports it and `AdminRPC.exportFeedbackXlsx`\n// feeds it into generateXLSX.\n\n/** Dimension order + labels for the export columns, matching the feedback\n    detail page. */\nconst DIMENSION_ORDER: FeedbackDimensionKey[] = [\n  \"natureSize\",\n  \"extraServices\",\n  \"parkingSpace\",\n  \"accessibility\",\n  \"visibility\",\n];\n\nexport const DIMENSION_LABELS: Record<FeedbackDimensionKey, string> = {\n  natureSize: \"Aard & grootte\",\n  extraServices: \"Extra services\",\n  parkingSpace: \"Parkeerruimte\",\n  accessibility: \"Toegankelijkheid\",\n  visibility: \"Zichtbaarheid\",\n};\n\nexport interface ExportColumn {\n  header: string;\n  key: string;\n  width: number;\n  /** Cell type for the spreadsheet writer; it rejects a string in a number column. */\n  type: \"string\" | \"number\";\n}\n\n/** One flat sheet, one row per submitted review. Free-text columns are wide. */\nexport const EXPORT_COLUMNS: ExportColumn[] = [\n  { header: \"Feedback-ID\", key: \"id\", width: 12, type: \"number\" },\n  { header: \"Datum\", key: \"createdAt\", width: 18, type: \"string\" },\n  { header: \"Locatie\", key: \"companyName\", width: 32, type: \"string\" },\n  { header: \"Plaats\", key: \"city\", width: 20, type: \"string\" },\n  { header: \"Inzender\", key: \"submittedBy\", width: 22, type: \"string\" },\n  { header: \"Laatste score\", key: \"latestScore\", width: 14, type: \"number\" },\n  { header: \"Eindoordeel\", key: \"overallRating\", width: 14, type: \"string\" },\n  { header: \"Reden eindoordeel\", key: \"reasonOverallRating\", width: 48, type: \"string\" },\n  ...DIMENSION_ORDER.flatMap((k): ExportColumn[] => [\n    { header: `${DIMENSION_LABELS[k]} - oordeel`, key: `${k}__rating`, width: 18, type: \"string\" },\n    { header: `${DIMENSION_LABELS[k]} - toelichting`, key: `${k}__reason`, width: 44, type: \"string\" },\n  ]),\n  { header: \"Wat de AI mist\", key: \"aiMissesNotes\", width: 48, type: \"string\" },\n  { header: \"Algemene opmerkingen\", key: \"generalNotes\", width: 48, type: \"string\" },\n  { header: \"Locatie-ID\", key: \"locationId\", width: 12, type: \"number\" },\n  { header: \"Analyse-ID\", key: \"analysisId\", width: 12, type: \"number\" },\n];\n\nconst PII_PATTERNS: RegExp[] = [\n  // Email, basic but tolerant\n  /\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}\\b/gi,\n  // NL mobile/landline starting with 0 or +31, with optional dashes/spaces\n  /(?:\\+31|0)[\\s-]?[1-9](?:[\\s-]?\\d){8}/g,\n  // NL license plates (rough match: AA-99-AA / 99-AA-AA / AA-AAA-9 etc.)\n  /\\b[A-Z]{1,3}-\\d{1,3}-[A-Z0-9]{1,3}\\b/gi,\n  /\\b\\d{1,2}-[A-Z]{2,3}-[A-Z0-9]{1,3}\\b/gi,\n];\n\n/** Replaces email addresses, NL phone numbers and NL license plates with\n    `[verborgen]`. Same rule as the feedback screens in the admin. */\nexport function maskPii(text: string): string {\n  if (!text) return text;\n  let out = text;\n  for (const re of PII_PATTERNS) {\n    out = out.replace(re, \"[verborgen]\");\n  }\n  return out;\n}\n\n/** Maps the stored `agree`/`disagree` verdict to the Dutch label the UI uses;\n    anything else (null, empty, unknown) is \"Geen oordeel\". */\nexport function ratingLabel(rating: string | null): string {\n  if (rating === \"agree\") return \"Eens\";\n  if (rating === \"disagree\") return \"Oneens\";\n  return \"Geen oordeel\";\n}\n\n/** Formats the ISO timestamp as a readable Dutch date+time (Europe/Amsterdam). */\nexport function formatExportDateTime(iso: string): string {\n  const date = new Date(iso);\n  if (Number.isNaN(date.getTime())) return iso;\n  return date.toLocaleString(\"nl-NL\", {\n    timeZone: \"Europe/Amsterdam\",\n    day: \"2-digit\",\n    month: \"2-digit\",\n    year: \"numeric\",\n    hour: \"2-digit\",\n    minute: \"2-digit\",\n  });\n}\n\nfunction maskText(value: string | null): string {\n  return value ? maskPii(value) : \"\";\n}\n\nexport type ExportRow = Record<string, string | number | null>;\n\n/** Flattens one FeedbackDetailDTO into a single keyed row matching\n    `EXPORT_COLUMNS`. PII in the free-text fields is masked. */\nexport function feedbackToExportRow(fb: FeedbackDetailDTO): ExportRow {\n  const row: ExportRow = {\n    id: fb.id,\n    createdAt: formatExportDateTime(fb.createdAt),\n    companyName: fb.companyName,\n    city: fb.city,\n    submittedBy: fb.submittedBy,\n    latestScore: fb.latestScore === null ? null : Math.round(fb.latestScore),\n    overallRating: ratingLabel(fb.overallRating),\n    reasonOverallRating: maskText(fb.reasonOverallRating),\n    aiMissesNotes: maskText(fb.aiMissesNotes),\n    generalNotes: maskText(fb.generalNotes),\n    locationId: fb.locationId,\n    analysisId: fb.analysisId,\n  };\n  for (const d of fb.dimensions) {\n    row[`${d.key}__rating`] = ratingLabel(d.rating);\n    row[`${d.key}__reason`] = maskText(d.reason);\n  }\n  return row;\n}\n","/**\n * Pure logic behind the admin Feedback list: aspect glyphs, filter, sort and\n * the persisted sort state. Port of frontend/app/feedback/feedback-table.tsx;\n * the `.vue` body is not typechecked, so everything worth asserting lives here\n * and in tests/admin-feedback.test.ts.\n */\nimport type { MyFeedbackDTO } from \"../../../../js/rpc\";\n\nexport type FeedbackListRow = MyFeedbackDTO;\nexport type FeedbackAspectKey = keyof MyFeedbackDTO[\"criteria\"];\n\n/** The five reviewed aspects, in table order. Same labels as DIMENSION_LABELS\n    in feedback-export.ts; kept as an ordered list because the table needs the\n    order and the export needs the lookup. */\nexport const ASPECTS: ReadonlyArray<{ key: FeedbackAspectKey; label: string }> = [\n  { key: \"natureSize\", label: \"Aard & grootte\" },\n  { key: \"extraServices\", label: \"Extra services\" },\n  { key: \"parkingSpace\", label: \"Parkeerruimte\" },\n  { key: \"accessibility\", label: \"Toegankelijkheid\" },\n  { key: \"visibility\", label: \"Zichtbaarheid\" },\n];\n\nexport function disagreementCount(fb: FeedbackListRow): number {\n  return ASPECTS.reduce((n, a) => (fb.criteria[a.key] === \"disagree\" ? n + 1 : n), 0);\n}\n\nexport type AspectTone = \"score\" | \"danger\" | \"neutral\";\n\nexport interface AspectGlyph {\n  icon: \"checkmark\" | \"close\" | \"subtract\";\n  tone: AspectTone;\n  verdict: \"eens\" | \"oneens\" | \"geen oordeel\";\n}\n\n/** Shape carries the verdict, colour only reinforces it: with plain dots the\n    green/red difference is invisible to a red/green colour deficiency. */\nexport function aspectGlyph(rating: string | null): AspectGlyph {\n  if (rating === \"agree\") return { icon: \"checkmark\", tone: \"score\", verdict: \"eens\" };\n  if (rating === \"disagree\") return { icon: \"close\", tone: \"danger\", verdict: \"oneens\" };\n  return { icon: \"subtract\", tone: \"neutral\", verdict: \"geen oordeel\" };\n}\n\n/** Case-insensitive match on company name, city or submitter. */\nexport function filterFeedback(rows: FeedbackListRow[], query: string): FeedbackListRow[] {\n  const q = query.trim().toLowerCase();\n  if (!q) return rows;\n  return rows.filter((fb) =>\n    fb.companyName.toLowerCase().includes(q) ||\n    (fb.city ?? \"\").toLowerCase().includes(q) ||\n    (fb.submittedBy ?? \"\").toLowerCase().includes(q));\n}\n\n/** The submitters that actually occur, for the Inzender dropdown. A review\n    without a submitter yields no option: it stays visible under \"Alle\n    inzenders\" but cannot be picked by name. */\nexport function submitterOptions(rows: FeedbackListRow[]): string[] {\n  const names = new Set<string>();\n  for (const fb of rows) if (fb.submittedBy) names.add(fb.submittedBy);\n  return [...names].sort((a, b) => a.localeCompare(b, \"nl\"));\n}\n\n/** Exact match, because the value comes from `submitterOptions`. Separate from\n    `filterFeedback` so both stay one-argument-plus-rows and compose. */\nexport function filterBySubmitter(rows: FeedbackListRow[], submitter: string): FeedbackListRow[] {\n  if (!submitter) return rows;\n  return rows.filter((fb) => fb.submittedBy === submitter);\n}\n\n// ---------- sort ----------\n\nexport const SORT_STORAGE_KEY = \"statiegeld-feedback-sort\";\n\nexport const SORT_FIELDS = [\"companyName\", \"submittedBy\", \"disagreements\", \"latestScore\", \"createdAt\"] as const;\nexport type SortField = (typeof SORT_FIELDS)[number];\nexport type SortDirection = \"asc\" | \"desc\";\n\nexport interface SortState {\n  field: SortField;\n  direction: SortDirection;\n}\n\nexport const DEFAULT_SORT: SortState = { field: \"createdAt\", direction: \"desc\" };\n\n/** Columns whose first click sorts descending: the newest, highest and most\n    contested reviews are what you look for first. */\nconst DESC_FIRST: ReadonlySet<SortField> = new Set([\"createdAt\", \"latestScore\", \"disagreements\"]);\n\nexport function nextSortState(current: SortState, field: SortField): SortState {\n  if (current.field === field) {\n    return { field, direction: current.direction === \"asc\" ? \"desc\" : \"asc\" };\n  }\n  return { field, direction: DESC_FIRST.has(field) ? \"desc\" : \"asc\" };\n}\n\nexport function sortFeedback(rows: FeedbackListRow[], sort: SortState): FeedbackListRow[] {\n  const dir = sort.direction === \"asc\" ? 1 : -1;\n  return rows.toSorted((a, b) => {\n    switch (sort.field) {\n      case \"companyName\":\n        return a.companyName.localeCompare(b.companyName) * dir;\n      case \"submittedBy\":\n        return (a.submittedBy ?? \"\").localeCompare(b.submittedBy ?? \"\") * dir;\n      case \"disagreements\":\n        return (disagreementCount(a) - disagreementCount(b)) * dir;\n      case \"latestScore\":\n        return ((a.latestScore ?? -1) - (b.latestScore ?? -1)) * dir;\n      case \"createdAt\":\n        return (new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime()) * dir;\n      default:\n        sort.field satisfies never;\n        return 0;\n    }\n  });\n}\n\n/** Validates a stored value; an unknown field from an older version falls back\n    to the default instead of producing an unsortable table. */\nexport function parseSortState(raw: string | null): SortState {\n  if (!raw) return DEFAULT_SORT;\n  try {\n    const parsed = JSON.parse(raw) as Partial<SortState>;\n    if (!(SORT_FIELDS as readonly string[]).includes(String(parsed.field))) return DEFAULT_SORT;\n    const direction = parsed.direction === \"asc\" ? \"asc\" : \"desc\";\n    return { field: parsed.field as SortField, direction };\n  } catch {\n    return DEFAULT_SORT;\n  }\n}\n\nexport function loadSortState(): SortState {\n  try {\n    return parseSortState(localStorage.getItem(SORT_STORAGE_KEY));\n  } catch {\n    return DEFAULT_SORT;\n  }\n}\n\nexport function saveSortState(sort: SortState): void {\n  try {\n    localStorage.setItem(SORT_STORAGE_KEY, JSON.stringify(sort));\n  } catch {\n    /* quota/denied, silent */\n  }\n}\n\n// ---------- dates ----------\n\n// Fixed to Europe/Amsterdam (like formatExportDateTime) so list, detail and\n// export agree, and so the tests are deterministic regardless of the runner.\nconst TIME_ZONE = \"Europe/Amsterdam\";\n\n/** \"5 mrt 2026\" */\nexport function formatFeedbackDate(iso: string): string {\n  return new Date(iso).toLocaleDateString(\"nl-NL\", {\n    timeZone: TIME_ZONE,\n    day: \"numeric\",\n    month: \"short\",\n    year: \"numeric\",\n  });\n}\n\n/** \"5 maart 2026 12:00\" */\nexport function formatFeedbackDateTime(iso: string): string {\n  const date = new Date(iso);\n  const day = date.toLocaleDateString(\"nl-NL\", {\n    timeZone: TIME_ZONE,\n    day: \"numeric\",\n    month: \"long\",\n    year: \"numeric\",\n  });\n  const time = date.toLocaleTimeString(\"nl-NL\", {\n    timeZone: TIME_ZONE,\n    hour: \"2-digit\",\n    minute: \"2-digit\",\n  });\n  return `${day} ${time}`;\n}\n\n// ---------- download ----------\n\nexport const XLSX_MIME_TYPE = \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n\n/** Turns an RPC `{ filename, base64 }` result into a browser download. DOM\n    only; there is no file endpoint on the admin surface. */\nexport function downloadBase64File(options: { filename: string; base64: string; mimeType: string }): void {\n  const binary = atob(options.base64);\n  const bytes = new Uint8Array(binary.length);\n  for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);\n  const url = URL.createObjectURL(new Blob([bytes], { type: options.mimeType }));\n  const anchor = document.createElement(\"a\");\n  anchor.href = url;\n  anchor.download = options.filename;\n  document.body.appendChild(anchor);\n  anchor.click();\n  anchor.remove();\n  URL.revokeObjectURL(url);\n}\n","import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment } from \"vue\"\n\nconst _hoisted_1 = {\n  key: 0,\n  class: \"location-feedback__muted\",\n  role: \"status\"\n}\nconst _hoisted_2 = {\n  key: 1,\n  class: \"location-feedback__stack\"\n}\nconst _hoisted_3 = {\n  class: \"location-feedback__error\",\n  role: \"alert\"\n}\nconst _hoisted_4 = {\n  key: 3,\n  class: \"location-feedback__stack\"\n}\nconst _hoisted_5 = [\"aria-label\"]\nconst _hoisted_6 = { class: \"location-feedback__header\" }\nconst _hoisted_7 = { class: \"location-feedback__title\" }\nconst _hoisted_8 = { class: \"location-feedback__verdict\" }\nconst _hoisted_9 = {\n  key: 0,\n  class: \"location-feedback__notes\"\n}\nconst _hoisted_10 = { class: \"location-feedback__dimensions\" }\nconst _hoisted_11 = { class: \"location-feedback__answer\" }\nconst _hoisted_12 = {\n  key: 0,\n  class: \"location-feedback__notes\"\n}\nconst _hoisted_13 = {\n  key: 1,\n  class: \"location-feedback__stack\"\n}\nconst _hoisted_14 = { class: \"location-feedback__notes\" }\nconst _hoisted_15 = {\n  key: 2,\n  class: \"location-feedback__stack\"\n}\nconst _hoisted_16 = { class: \"location-feedback__notes\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createBlock($setup[\"Panel\"], { title: \"Ingediende veldfeedback\" }, {\n    default: _withCtx(() => [\n      ($props.loading)\n        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_1, \"Veldfeedback laden...\"))\n        : ($props.error)\n          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n              _createElementVNode(\"p\", _hoisted_3, \"Veldfeedback ophalen mislukt: \" + _toDisplayString($props.error), 1 /* TEXT */),\n              _createElementVNode(\"div\", null, [\n                _createVNode($setup[\"Button\"], {\n                  onClick: _cache[0] || (_cache[0] = $event => (_ctx.$emit('retry')))\n                }, {\n                  default: _withCtx(() => _cache[1] || (_cache[1] = [\n                    _createTextVNode(\"Opnieuw proberen\", -1 /* CACHED */)\n                  ])),\n                  _: 1 /* STABLE */,\n                  __: [1]\n                })\n              ])\n            ]))\n          : (!$props.feedback.length)\n            ? (_openBlock(), _createBlock($setup[\"EmptyState\"], {\n                key: 2,\n                icon: \"flag\",\n                title: \"Nog geen veldfeedback voor deze locatie.\"\n              }))\n            : (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n                _cache[6] || (_cache[6] = _createElementVNode(\"p\", { class: \"location-feedback__muted\" }, \"Beoordelingen die veldagenten voor deze locatie hebben ingediend.\", -1 /* CACHED */)),\n                (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.rows, (item) => {\n                  return (_openBlock(), _createElementBlock(\"article\", {\n                    key: item.id,\n                    class: \"location-feedback__report\",\n                    \"aria-label\": `Beoordeling #${item.id}`\n                  }, [\n                    _createElementVNode(\"header\", _hoisted_6, [\n                      _createElementVNode(\"h3\", _hoisted_7, _toDisplayString($setup.formatFeedbackDateTime(item.createdAt)), 1 /* TEXT */),\n                      _createVNode($setup[\"RouterLink\"], {\n                        to: `/feedback/${item.id}`,\n                        class: \"location-feedback__link\"\n                      }, {\n                        default: _withCtx(() => _cache[2] || (_cache[2] = [\n                          _createTextVNode(\"Volledige beoordeling\", -1 /* CACHED */)\n                        ])),\n                        _: 2 /* DYNAMIC */,\n                        __: [2]\n                      }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"])\n                    ]),\n                    _createElementVNode(\"div\", _hoisted_8, [\n                      _cache[3] || (_cache[3] = _createElementVNode(\"strong\", null, \"Eindoordeel\", -1 /* CACHED */)),\n                      _createVNode($setup[\"Badge\"], {\n                        tone: $setup.ratingTone(item.feedbackOverallRating)\n                      }, {\n                        default: _withCtx(() => [\n                          _createTextVNode(_toDisplayString($setup.ratingLabel(item.feedbackOverallRating)), 1 /* TEXT */)\n                        ]),\n                        _: 2 /* DYNAMIC */\n                      }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"tone\"])\n                    ]),\n                    (item.reasonOverallRating)\n                      ? (_openBlock(), _createElementBlock(\"p\", _hoisted_9, _toDisplayString($setup.maskPii(item.reasonOverallRating)), 1 /* TEXT */))\n                      : _createCommentVNode(\"v-if\", true),\n                    _createElementVNode(\"dl\", _hoisted_10, [\n                      (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.dimensions, (dimension) => {\n                        return (_openBlock(), _createElementBlock(\"div\", {\n                          key: dimension.key,\n                          class: \"location-feedback__dimension\"\n                        }, [\n                          _createElementVNode(\"dt\", null, _toDisplayString(dimension.label), 1 /* TEXT */),\n                          _createElementVNode(\"dd\", _hoisted_11, [\n                            _createVNode($setup[\"Badge\"], {\n                              tone: $setup.ratingTone(dimension.rating)\n                            }, {\n                              default: _withCtx(() => [\n                                _createTextVNode(_toDisplayString($setup.ratingLabel(dimension.rating)), 1 /* TEXT */)\n                              ]),\n                              _: 2 /* DYNAMIC */\n                            }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"tone\"]),\n                            (dimension.reason)\n                              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_12, _toDisplayString($setup.maskPii(dimension.reason)), 1 /* TEXT */))\n                              : _createCommentVNode(\"v-if\", true)\n                          ])\n                        ]))\n                      }), 128 /* KEYED_FRAGMENT */))\n                    ]),\n                    (item.aiMissesNotes)\n                      ? (_openBlock(), _createElementBlock(\"div\", _hoisted_13, [\n                          _cache[4] || (_cache[4] = _createElementVNode(\"strong\", null, \"Wat de AI mist\", -1 /* CACHED */)),\n                          _createElementVNode(\"p\", _hoisted_14, _toDisplayString($setup.maskPii(item.aiMissesNotes)), 1 /* TEXT */)\n                        ]))\n                      : _createCommentVNode(\"v-if\", true),\n                    (item.generalNotes)\n                      ? (_openBlock(), _createElementBlock(\"div\", _hoisted_15, [\n                          _cache[5] || (_cache[5] = _createElementVNode(\"strong\", null, \"Algemene opmerkingen\", -1 /* CACHED */)),\n                          _createElementVNode(\"p\", _hoisted_16, _toDisplayString($setup.maskPii(item.generalNotes)), 1 /* TEXT */)\n                        ]))\n                      : _createCommentVNode(\"v-if\", true)\n                  ], 8 /* PROPS */, _hoisted_5))\n                }), 128 /* KEYED_FRAGMENT */))\n              ]))\n    ]),\n    _: 1 /* STABLE */\n  }))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationFeedbackList.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationFeedbackList.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationFeedbackList.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationFeedbackList.vue\";script.__scopeId = \"data-v-1f9e0bfc\";export default script;","<script setup lang=\"ts\">\nimport { computed, onUnmounted, ref, watch } from \"vue\";\nimport { RouterLink } from \"vue-router\";\nimport { api } from \"../../lib/api\";\nimport { FEEDBACK_DIMENSION_LABELS, formatDistanceBadge, maskPii, summarizeDirection, type ResolvedRetrievedFeedback } from \"../../lib/retrieved-feedback\";\nimport { workerActionError } from \"../../lib/run-analysis\";\nimport Button from \"../ui/Button.vue\";\nimport Dialog from \"../ui/Dialog.vue\";\n\nconst props = defineProps<{ locationId: number }>();\nconst state = ref<\"idle\" | \"loading\" | \"loaded\" | \"error\">(\"idle\");\nconst items = ref<ResolvedRetrievedFeedback[]>([]);\nconst retrievalEnabled = ref(true);\nconst error = ref(\"\");\nconst selected = ref<ResolvedRetrievedFeedback | null>(null);\nconst detailOpen = ref(false);\nlet requestVersion = 0;\nconst summary = computed(() => summarizeDirection(items.value));\nconst rows = computed(() => items.value.map(item => ({\n  ...item,\n  badge: Number.isFinite(item.distance) ? formatDistanceBadge(item.distance) : null,\n  tone: item.correctedScore - item.originalScore > 5 ? \"up\" : item.correctedScore - item.originalScore < -5 ? \"down\" : \"neutral\",\n})));\nconst detailDescription = computed(() => {\n  if (!selected.value) return \"Veldrapport\";\n  const date = selected.value.detail.createdAt;\n  const dateLabel = date ? new Date(date).toLocaleDateString(\"nl-NL\", { day: \"numeric\", month: \"long\", year: \"numeric\", hour: \"2-digit\", minute: \"2-digit\" }) : \"\";\n  const relevance = Number.isFinite(selected.value.distance) ? ` · relevantie ${(1 - selected.value.distance).toFixed(2)}` : \"\";\n  return `Veldrapport${dateLabel ? ` · ${dateLabel}` : \"\"}${relevance}`;\n});\n\nwatch(() => props.locationId, () => {\n  requestVersion++;\n  state.value = \"idle\";\n  items.value = [];\n  error.value = \"\";\n  detailOpen.value = false;\n  selected.value = null;\n});\nonUnmounted(() => { requestVersion++; });\n\nasync function load() {\n  if (state.value === \"loading\") return;\n  const version = ++requestVersion;\n  state.value = \"loading\";\n  error.value = \"\";\n  try {\n    const result = await api.previewRetrievableFeedback({ locationId: props.locationId });\n    if (version !== requestVersion) return;\n    items.value = result.items ?? [];\n    retrievalEnabled.value = result.retrievalEnabled ?? true;\n    state.value = \"loaded\";\n  } catch (cause) {\n    if (version !== requestVersion) return;\n    error.value = workerActionError(cause);\n    state.value = \"error\";\n  }\n}\n\nfunction openFeedback(item: ResolvedRetrievedFeedback) {\n  selected.value = item;\n  detailOpen.value = true;\n}\n\nfunction ratingLabel(rating: string | null) {\n  return rating === \"agree\" ? \"Eens\" : rating === \"disagree\" ? \"Oneens\" : \"Niet beoordeeld\";\n}\n</script>\n\n<template>\n  <section class=\"retrieval-preview\">\n    <header class=\"retrieval-preview__head\">\n      <h3>Veldfeedback-preview</h3>\n      <Button v-if=\"state !== 'loaded'\" :busy=\"state === 'loading'\" @click=\"load\">{{ state === 'loading' ? 'Laden...' : state === 'error' ? 'Opnieuw proberen' : 'Toon meegenomen feedback' }}</Button>\n    </header>\n    <p v-if=\"state === 'idle'\" class=\"retrieval-preview__hint\">Bekijk welke eerdere veldrapporten een nieuwe analyse als kalibratie zou meenemen.</p>\n    <p v-if=\"state === 'loading'\" role=\"status\" class=\"retrieval-preview__hint\">Vergelijkbare veldrapporten zoeken...</p>\n    <p v-if=\"state === 'error'\" role=\"alert\" class=\"retrieval-preview__error\">{{ error }}</p>\n    <template v-if=\"state === 'loaded'\">\n      <p v-if=\"!retrievalEnabled\" class=\"retrieval-preview__hint\">Het meenemen van eerdere veldfeedback is uitgeschakeld. Vraag de beheerder om dit in te schakelen als je het wilt gebruiken.</p>\n      <p v-else-if=\"!items.length\" class=\"retrieval-preview__hint\">Nog geen vergelijkbare veldrapporten om mee te nemen.</p>\n      <details v-else open class=\"retrieval-preview__results\">\n        <summary>Een analyse zou <strong>{{ items.length }}</strong> vergelijkbaar {{ items.length === 1 ? 'veldrapport' : 'veldrapporten' }} meenemen</summary>\n        <p class=\"retrieval-preview__hint\">{{ summary }}</p>\n        <ul class=\"retrieval-preview__list\">\n          <li v-for=\"row in rows\" :key=\"row.feedbackId\">\n            <button class=\"retrieval-preview__row\" type=\"button\" @click=\"openFeedback(row)\">\n              <span class=\"retrieval-preview__content\">\n                <span><strong>{{ row.locationName }}</strong><span v-if=\"row.sbiLabel\" class=\"retrieval-preview__sbi\">SBI {{ row.sbiLabel }}</span></span>\n                <span class=\"retrieval-preview__score\" :class=\"`retrieval-preview__score--${row.tone}`\">{{ row.originalScore }} → {{ row.correctedScore }} <span class=\"retrieval-preview__hint\">geschatte correctie</span></span>\n                <span v-if=\"row.notesSnippet\" class=\"retrieval-preview__hint\">{{ maskPii(row.notesSnippet) }}</span>\n              </span>\n              <span v-if=\"row.badge\" class=\"retrieval-preview__badge\" :class=\"`retrieval-preview__badge--${row.badge.tone}`\">{{ row.badge.label }}</span>\n            </button>\n          </li>\n        </ul>\n      </details>\n    </template>\n  </section>\n  <Dialog v-if=\"selected\" v-model:open=\"detailOpen\" :title=\"selected.locationName\" :description=\"detailDescription\" :max-width=\"560\">\n    <div class=\"retrieval-preview__detail\">\n      <p v-if=\"selected.sbiLabel\" class=\"retrieval-preview__hint\">SBI {{ selected.sbiLabel }}</p>\n      <p v-if=\"selected.detail.overallRating\">Eindoordeel: <strong :class=\"`retrieval-preview__rating--${selected.detail.overallRating}`\">{{ ratingLabel(selected.detail.overallRating) }}</strong></p>\n      <p>Score: <strong>{{ selected.originalScore }} → {{ selected.correctedScore }}</strong> <span class=\"retrieval-preview__hint\">(geschatte correctie)</span></p>\n      <h4>Per aspect</h4>\n      <ul class=\"retrieval-preview__dimensions\">\n        <li v-for=\"dimension in selected.detail.dimensions\" :key=\"dimension.key\">\n          <div class=\"retrieval-preview__head\"><span>{{ FEEDBACK_DIMENSION_LABELS[dimension.key] }}</span><strong :class=\"`retrieval-preview__rating--${dimension.rating}`\">{{ ratingLabel(dimension.rating) }}</strong></div>\n          <p v-if=\"dimension.reason\" class=\"retrieval-preview__hint\">{{ maskPii(dimension.reason) }}</p>\n        </li>\n      </ul>\n      <template v-if=\"selected.detail.aiMissesNotes\"><h4>Wat de AI mist</h4><p class=\"retrieval-preview__notes\">{{ maskPii(selected.detail.aiMissesNotes) }}</p></template>\n      <template v-if=\"selected.detail.generalNotes\"><h4>Algemene opmerkingen</h4><p class=\"retrieval-preview__notes\">{{ maskPii(selected.detail.generalNotes) }}</p></template>\n    </div>\n    <template #footer>\n      <RouterLink class=\"retrieval-preview__link\" :to=\"`/locations/${selected.locationId}`\" @click=\"detailOpen = false\">Open locatie</RouterLink>\n      <Button @click=\"detailOpen = false\">Sluiten</Button>\n    </template>\n  </Dialog>\n</template>\n\n<style scoped>\n.retrieval-preview { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }\n.retrieval-preview__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }\n.retrieval-preview__head h3 { margin: 0; font-size: var(--text-ui); font-weight: 600; }\n.retrieval-preview__hint { margin: 0; color: var(--fg-3); font-size: var(--text-caption); }\n.retrieval-preview__error { margin: 0; color: var(--danger-fg); }\n.retrieval-preview__results { padding: 12px 16px; border: 1px solid var(--border-1); border-radius: var(--radius); background: var(--bg-inset); }\n.retrieval-preview__results summary { padding-bottom: 12px; font-size: var(--text-ui); cursor: pointer; }\n.retrieval-preview__list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }\n.retrieval-preview__row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; width: 100%; padding: 8px 12px; border: 1px solid var(--border-1); border-radius: var(--radius); background: var(--bg-surface); color: var(--fg-1); font: inherit; text-align: left; cursor: pointer; }\n.retrieval-preview__content { display: flex; flex-direction: column; flex: 1; gap: 4px; min-width: 0; overflow-wrap: anywhere; }\n.retrieval-preview__sbi { margin-left: 8px; color: var(--fg-3); font-size: var(--text-caption); }\n.retrieval-preview__score { color: var(--fg-3); font-size: var(--text-caption); }\n.retrieval-preview__score--up, .retrieval-preview__rating--agree { color: var(--score-fg); }\n.retrieval-preview__score--down, .retrieval-preview__rating--disagree { color: var(--danger-fg); }\n.retrieval-preview__badge { padding: 2px 8px; border-radius: var(--radius); font-size: var(--text-caption); color: var(--fg-3); background: var(--bg-inset); }\n.retrieval-preview__badge--green { color: var(--score-fg); background: var(--score-bg); }\n.retrieval-preview__badge--blue { color: var(--info-fg); background: var(--info-bg); }\n.retrieval-preview__detail { display: flex; flex-direction: column; gap: 12px; }\n.retrieval-preview__detail p, .retrieval-preview__detail h4 { margin: 0; }\n.retrieval-preview__dimensions { margin: 0; padding: 0; border: 1px solid var(--border-1); list-style: none; }\n.retrieval-preview__dimensions li { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; }\n.retrieval-preview__dimensions li + li { border-top: 1px solid var(--border-1); }\n.retrieval-preview__notes { white-space: pre-wrap; overflow-wrap: anywhere; }\n.retrieval-preview__link { align-self: center; margin-right: auto; color: var(--primary); cursor: pointer; }\n@media (hover: hover) { .retrieval-preview__row:hover { background: var(--bg-inset); } .retrieval-preview__link:hover { text-decoration: underline; } }\n</style>\n","export type { ResolvedRetrievedFeedback } from \"../../../../js/rpc\";\n\nexport function summarizeDirection(items: Array<{ distance: number; originalScore: number; correctedScore: number }>): string {\n  if (items.length <= 2 || items.every(item => item.distance > 0.25)) return \"Beperkt aantal relevante eerdere bevindingen, onzekerheid is hoger dan gebruikelijk.\";\n  const deltas = items.map(item => item.correctedScore - item.originalScore);\n  if (deltas.every(delta => delta > 5)) return \"Vergelijkbare locaties werden meestal naar boven bijgesteld.\";\n  if (deltas.every(delta => delta < -5)) return \"Vergelijkbare locaties werden meestal naar beneden bijgesteld.\";\n  return \"Vergelijkbare locaties leverden gemengd gecorrigeerde scores, onzekerheid is hoger dan gebruikelijk.\";\n}\n\nconst PII_PATTERNS = [\n  /\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}\\b/gi,\n  /(?:\\+31|0)[\\s-]?[1-9](?:[\\s-]?\\d){8}/g,\n  /\\b[A-Z]{1,3}-\\d{1,3}-[A-Z0-9]{1,3}\\b/gi,\n  /\\b\\d{1,2}-[A-Z]{2,3}-[A-Z0-9]{1,3}\\b/gi,\n];\n\nexport function maskPii(text: string): string {\n  return PII_PATTERNS.reduce((result, pattern) => result.replace(pattern, \"[verborgen]\"), text);\n}\n\nexport function formatDistanceBadge(distance: number) {\n  if (distance < 0.15) return { label: \"zeer vergelijkbaar\", tone: \"green\" };\n  if (distance < 0.25) return { label: \"vergelijkbaar\", tone: \"blue\" };\n  return { label: \"enigszins vergelijkbaar\", tone: \"muted\" };\n}\n\nexport const FEEDBACK_DIMENSION_LABELS = {\n  natureSize: \"Aard & grootte\",\n  extraServices: \"Extra services\",\n  parkingSpace: \"Parkeerruimte\",\n  accessibility: \"Toegankelijkheid\",\n  visibility: \"Zichtbaarheid\",\n};\n","import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, createVNode as _createVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"retrieval-preview\" }\nconst _hoisted_2 = { class: \"retrieval-preview__head\" }\nconst _hoisted_3 = {\n  key: 0,\n  class: \"retrieval-preview__hint\"\n}\nconst _hoisted_4 = {\n  key: 1,\n  role: \"status\",\n  class: \"retrieval-preview__hint\"\n}\nconst _hoisted_5 = {\n  key: 2,\n  role: \"alert\",\n  class: \"retrieval-preview__error\"\n}\nconst _hoisted_6 = {\n  key: 0,\n  class: \"retrieval-preview__hint\"\n}\nconst _hoisted_7 = {\n  key: 1,\n  class: \"retrieval-preview__hint\"\n}\nconst _hoisted_8 = {\n  key: 2,\n  open: \"\",\n  class: \"retrieval-preview__results\"\n}\nconst _hoisted_9 = { class: \"retrieval-preview__hint\" }\nconst _hoisted_10 = { class: \"retrieval-preview__list\" }\nconst _hoisted_11 = [\"onClick\"]\nconst _hoisted_12 = { class: \"retrieval-preview__content\" }\nconst _hoisted_13 = {\n  key: 0,\n  class: \"retrieval-preview__sbi\"\n}\nconst _hoisted_14 = {\n  key: 0,\n  class: \"retrieval-preview__hint\"\n}\nconst _hoisted_15 = { class: \"retrieval-preview__detail\" }\nconst _hoisted_16 = {\n  key: 0,\n  class: \"retrieval-preview__hint\"\n}\nconst _hoisted_17 = { key: 1 }\nconst _hoisted_18 = { class: \"retrieval-preview__dimensions\" }\nconst _hoisted_19 = { class: \"retrieval-preview__head\" }\nconst _hoisted_20 = {\n  key: 0,\n  class: \"retrieval-preview__hint\"\n}\nconst _hoisted_21 = { class: \"retrieval-preview__notes\" }\nconst _hoisted_22 = { class: \"retrieval-preview__notes\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(_Fragment, null, [\n    _createElementVNode(\"section\", _hoisted_1, [\n      _createElementVNode(\"header\", _hoisted_2, [\n        _cache[3] || (_cache[3] = _createElementVNode(\"h3\", null, \"Veldfeedback-preview\", -1 /* CACHED */)),\n        ($setup.state !== 'loaded')\n          ? (_openBlock(), _createBlock($setup[\"Button\"], {\n              key: 0,\n              busy: $setup.state === 'loading',\n              onClick: $setup.load\n            }, {\n              default: _withCtx(() => [\n                _createTextVNode(_toDisplayString($setup.state === 'loading' ? 'Laden...' : $setup.state === 'error' ? 'Opnieuw proberen' : 'Toon meegenomen feedback'), 1 /* TEXT */)\n              ]),\n              _: 1 /* STABLE */\n            }, 8 /* PROPS */, [\"busy\"]))\n          : _createCommentVNode(\"v-if\", true)\n      ]),\n      ($setup.state === 'idle')\n        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_3, \"Bekijk welke eerdere veldrapporten een nieuwe analyse als kalibratie zou meenemen.\"))\n        : _createCommentVNode(\"v-if\", true),\n      ($setup.state === 'loading')\n        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_4, \"Vergelijkbare veldrapporten zoeken...\"))\n        : _createCommentVNode(\"v-if\", true),\n      ($setup.state === 'error')\n        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_5, _toDisplayString($setup.error), 1 /* TEXT */))\n        : _createCommentVNode(\"v-if\", true),\n      ($setup.state === 'loaded')\n        ? (_openBlock(), _createElementBlock(_Fragment, { key: 3 }, [\n            (!$setup.retrievalEnabled)\n              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_6, \"Het meenemen van eerdere veldfeedback is uitgeschakeld. Vraag de beheerder om dit in te schakelen als je het wilt gebruiken.\"))\n              : (!$setup.items.length)\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_7, \"Nog geen vergelijkbare veldrapporten om mee te nemen.\"))\n                : (_openBlock(), _createElementBlock(\"details\", _hoisted_8, [\n                    _createElementVNode(\"summary\", null, [\n                      _cache[4] || (_cache[4] = _createTextVNode(\"Een analyse zou \", -1 /* CACHED */)),\n                      _createElementVNode(\"strong\", null, _toDisplayString($setup.items.length), 1 /* TEXT */),\n                      _createTextVNode(\" vergelijkbaar \" + _toDisplayString($setup.items.length === 1 ? 'veldrapport' : 'veldrapporten') + \" meenemen\", 1 /* TEXT */)\n                    ]),\n                    _createElementVNode(\"p\", _hoisted_9, _toDisplayString($setup.summary), 1 /* TEXT */),\n                    _createElementVNode(\"ul\", _hoisted_10, [\n                      (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.rows, (row) => {\n                        return (_openBlock(), _createElementBlock(\"li\", {\n                          key: row.feedbackId\n                        }, [\n                          _createElementVNode(\"button\", {\n                            class: \"retrieval-preview__row\",\n                            type: \"button\",\n                            onClick: $event => ($setup.openFeedback(row))\n                          }, [\n                            _createElementVNode(\"span\", _hoisted_12, [\n                              _createElementVNode(\"span\", null, [\n                                _createElementVNode(\"strong\", null, _toDisplayString(row.locationName), 1 /* TEXT */),\n                                (row.sbiLabel)\n                                  ? (_openBlock(), _createElementBlock(\"span\", _hoisted_13, \"SBI \" + _toDisplayString(row.sbiLabel), 1 /* TEXT */))\n                                  : _createCommentVNode(\"v-if\", true)\n                              ]),\n                              _createElementVNode(\"span\", {\n                                class: _normalizeClass([\"retrieval-preview__score\", `retrieval-preview__score--${row.tone}`])\n                              }, [\n                                _createTextVNode(_toDisplayString(row.originalScore) + \" → \" + _toDisplayString(row.correctedScore) + \" \", 1 /* TEXT */),\n                                _cache[5] || (_cache[5] = _createElementVNode(\"span\", { class: \"retrieval-preview__hint\" }, \"geschatte correctie\", -1 /* CACHED */))\n                              ], 2 /* CLASS */),\n                              (row.notesSnippet)\n                                ? (_openBlock(), _createElementBlock(\"span\", _hoisted_14, _toDisplayString($setup.maskPii(row.notesSnippet)), 1 /* TEXT */))\n                                : _createCommentVNode(\"v-if\", true)\n                            ]),\n                            (row.badge)\n                              ? (_openBlock(), _createElementBlock(\"span\", {\n                                  key: 0,\n                                  class: _normalizeClass([\"retrieval-preview__badge\", `retrieval-preview__badge--${row.badge.tone}`])\n                                }, _toDisplayString(row.badge.label), 3 /* TEXT, CLASS */))\n                              : _createCommentVNode(\"v-if\", true)\n                          ], 8 /* PROPS */, _hoisted_11)\n                        ]))\n                      }), 128 /* KEYED_FRAGMENT */))\n                    ])\n                  ]))\n          ], 64 /* STABLE_FRAGMENT */))\n        : _createCommentVNode(\"v-if\", true)\n    ]),\n    ($setup.selected)\n      ? (_openBlock(), _createBlock($setup[\"Dialog\"], {\n          key: 0,\n          open: $setup.detailOpen,\n          \"onUpdate:open\": _cache[2] || (_cache[2] = $event => (($setup.detailOpen) = $event)),\n          title: $setup.selected.locationName,\n          description: $setup.detailDescription,\n          \"max-width\": 560\n        }, {\n          footer: _withCtx(() => [\n            _createVNode($setup[\"RouterLink\"], {\n              class: \"retrieval-preview__link\",\n              to: `/locations/${$setup.selected.locationId}`,\n              onClick: _cache[0] || (_cache[0] = $event => ($setup.detailOpen = false))\n            }, {\n              default: _withCtx(() => _cache[13] || (_cache[13] = [\n                _createTextVNode(\"Open locatie\", -1 /* CACHED */)\n              ])),\n              _: 1 /* STABLE */,\n              __: [13]\n            }, 8 /* PROPS */, [\"to\"]),\n            _createVNode($setup[\"Button\"], {\n              onClick: _cache[1] || (_cache[1] = $event => ($setup.detailOpen = false))\n            }, {\n              default: _withCtx(() => _cache[14] || (_cache[14] = [\n                _createTextVNode(\"Sluiten\", -1 /* CACHED */)\n              ])),\n              _: 1 /* STABLE */,\n              __: [14]\n            })\n          ]),\n          default: _withCtx(() => [\n            _createElementVNode(\"div\", _hoisted_15, [\n              ($setup.selected.sbiLabel)\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_16, \"SBI \" + _toDisplayString($setup.selected.sbiLabel), 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true),\n              ($setup.selected.detail.overallRating)\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_17, [\n                    _cache[6] || (_cache[6] = _createTextVNode(\"Eindoordeel: \", -1 /* CACHED */)),\n                    _createElementVNode(\"strong\", {\n                      class: _normalizeClass(`retrieval-preview__rating--${$setup.selected.detail.overallRating}`)\n                    }, _toDisplayString($setup.ratingLabel($setup.selected.detail.overallRating)), 3 /* TEXT, CLASS */)\n                  ]))\n                : _createCommentVNode(\"v-if\", true),\n              _createElementVNode(\"p\", null, [\n                _cache[7] || (_cache[7] = _createTextVNode(\"Score: \", -1 /* CACHED */)),\n                _createElementVNode(\"strong\", null, _toDisplayString($setup.selected.originalScore) + \" → \" + _toDisplayString($setup.selected.correctedScore), 1 /* TEXT */),\n                _cache[8] || (_cache[8] = _createTextVNode()),\n                _cache[9] || (_cache[9] = _createElementVNode(\"span\", { class: \"retrieval-preview__hint\" }, \"(geschatte correctie)\", -1 /* CACHED */))\n              ]),\n              _cache[12] || (_cache[12] = _createElementVNode(\"h4\", null, \"Per aspect\", -1 /* CACHED */)),\n              _createElementVNode(\"ul\", _hoisted_18, [\n                (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.selected.detail.dimensions, (dimension) => {\n                  return (_openBlock(), _createElementBlock(\"li\", {\n                    key: dimension.key\n                  }, [\n                    _createElementVNode(\"div\", _hoisted_19, [\n                      _createElementVNode(\"span\", null, _toDisplayString($setup.FEEDBACK_DIMENSION_LABELS[dimension.key]), 1 /* TEXT */),\n                      _createElementVNode(\"strong\", {\n                        class: _normalizeClass(`retrieval-preview__rating--${dimension.rating}`)\n                      }, _toDisplayString($setup.ratingLabel(dimension.rating)), 3 /* TEXT, CLASS */)\n                    ]),\n                    (dimension.reason)\n                      ? (_openBlock(), _createElementBlock(\"p\", _hoisted_20, _toDisplayString($setup.maskPii(dimension.reason)), 1 /* TEXT */))\n                      : _createCommentVNode(\"v-if\", true)\n                  ]))\n                }), 128 /* KEYED_FRAGMENT */))\n              ]),\n              ($setup.selected.detail.aiMissesNotes)\n                ? (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [\n                    _cache[10] || (_cache[10] = _createElementVNode(\"h4\", null, \"Wat de AI mist\", -1 /* CACHED */)),\n                    _createElementVNode(\"p\", _hoisted_21, _toDisplayString($setup.maskPii($setup.selected.detail.aiMissesNotes)), 1 /* TEXT */)\n                  ], 64 /* STABLE_FRAGMENT */))\n                : _createCommentVNode(\"v-if\", true),\n              ($setup.selected.detail.generalNotes)\n                ? (_openBlock(), _createElementBlock(_Fragment, { key: 3 }, [\n                    _cache[11] || (_cache[11] = _createElementVNode(\"h4\", null, \"Algemene opmerkingen\", -1 /* CACHED */)),\n                    _createElementVNode(\"p\", _hoisted_22, _toDisplayString($setup.maskPii($setup.selected.detail.generalNotes)), 1 /* TEXT */)\n                  ], 64 /* STABLE_FRAGMENT */))\n                : _createCommentVNode(\"v-if\", true)\n            ])\n          ]),\n          _: 1 /* STABLE */\n        }, 8 /* PROPS */, [\"open\", \"title\", \"description\"]))\n      : _createCommentVNode(\"v-if\", true)\n  ], 64 /* STABLE_FRAGMENT */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/RetrievableFeedbackPreview.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/RetrievableFeedbackPreview.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/RetrievableFeedbackPreview.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/RetrievableFeedbackPreview.vue\";script.__scopeId = \"data-v-ee6be792\";export default script;","<script setup lang=\"ts\">\nimport { computed, nextTick, onUnmounted, ref, watch } from \"vue\";\nimport { api } from \"../../lib/api\";\nimport { AnalysisOptionsRepository, buildAnalysisRequest, defaultAnalysisOptions, selectAvailableModels, validateAnalysisOptions, workerActionError, type AnalysisModel, type AnalysisOptionErrors } from \"../../lib/run-analysis\";\nimport Button from \"../ui/Button.vue\";\nimport Checkbox from \"../ui/Checkbox.vue\";\nimport Dialog from \"../ui/Dialog.vue\";\n\nconst props = defineProps<{ open: boolean; locationId: number }>();\nconst emit = defineEmits<{ \"update:open\": [value: boolean]; started: [analysisId: number] }>();\nconst hostname = window.location.hostname;\nconst options = ref(defaultAnalysisOptions({ hostname }));\nconst models = ref<AnalysisModel[]>([]);\nconst ready = ref(false);\nconst loading = ref(false);\nconst running = ref(false);\nconst loadError = ref(\"\");\nconst startError = ref(\"\");\nconst storageError = ref(\"\");\nconst errors = ref<AnalysisOptionErrors>({});\nconst form = ref<HTMLFormElement>();\nconst advancedOpen = ref(false);\nlet repository: AnalysisOptionsRepository | undefined;\nlet loadVersion = 0;\nlet mounted = true;\n\nconst selectedCount = computed(() => models.value.filter(model => options.value.selectedModels.includes(model.id)).length);\nconst groups = computed(() => {\n  const grouped = new Map<string, AnalysisModel[]>();\n  for (const model of models.value) grouped.set(model.provider, [...(grouped.get(model.provider) ?? []), model]);\n  const labels: Record<string, string> = { openai: \"OpenAI\", anthropic: \"Anthropic\", google: \"Google\" };\n  return [...grouped].map(([provider, items]) => ({ provider, label: labels[provider] ?? provider, items }));\n});\nwatch(() => props.open, open => {\n  if (open && !ready.value) void loadMeta();\n  if (!open) {\n    loadVersion++;\n    loading.value = false;\n  }\n}, { immediate: true });\nwatch(() => props.locationId, () => { startError.value = \"\"; errors.value = {}; });\nwatch(options, () => {\n  if (ready.value) persist();\n}, { deep: true });\nonUnmounted(() => { mounted = false; loadVersion++; });\n\nasync function loadMeta() {\n  const version = ++loadVersion;\n  loading.value = true;\n  loadError.value = \"\";\n  try {\n    const meta = await api.getWorkerMeta();\n    if (version !== loadVersion) return;\n    if (!meta.availableModels.length) throw new Error(\"No available models\");\n    models.value = meta.availableModels;\n    options.value = defaultAnalysisOptions({ hostname });\n    try {\n      repository = new AnalysisOptionsRepository({ storage: window.localStorage, hostname });\n      options.value = repository.load();\n    } catch {\n      storageError.value = \"Je browser kan de instellingen niet bewaren. Je kunt wel een analyse starten.\";\n    }\n    options.value = selectAvailableModels({ options: options.value, models: meta.availableModels, defaultModel: meta.defaultModel });\n    ready.value = true;\n    persist();\n  } catch (error) {\n    if (version === loadVersion) loadError.value = workerActionError(error);\n  } finally {\n    if (version === loadVersion) loading.value = false;\n  }\n}\n\nfunction persist() {\n  try { repository?.save({ options: options.value }); }\n  catch { storageError.value = \"Je browser kan de instellingen niet bewaren. Je kunt wel een analyse starten.\"; }\n}\n\nfunction toggleModel(id: string) {\n  options.value.selectedModels = options.value.selectedModels.includes(id) ? options.value.selectedModels.filter(value => value !== id) : [...options.value.selectedModels, id];\n}\n\nfunction setOpen(open: boolean) {\n  if (!running.value) emit(\"update:open\", open);\n}\n\nasync function start() {\n  if (running.value || !ready.value) return;\n  errors.value = validateAnalysisOptions({ options: options.value, models: models.value });\n  if (Object.keys(errors.value).length) {\n    if (errors.value.temperature || errors.value.seed) advancedOpen.value = true;\n    await nextTick();\n    form.value?.querySelector<HTMLElement>('[aria-invalid=\"true\"]')?.focus();\n    return;\n  }\n  running.value = true;\n  startError.value = \"\";\n  const locationId = props.locationId;\n  try {\n    const result = await api.startAnalysis(buildAnalysisRequest({ locationId, options: options.value, models: models.value }));\n    if (!mounted || props.locationId !== locationId) return;\n    emit(\"started\", result.analysisId);\n    emit(\"update:open\", false);\n  } catch (error) {\n    if (mounted && props.locationId === locationId) startError.value = workerActionError(error);\n  } finally { running.value = false; }\n}\n</script>\n\n<template>\n  <Dialog :open=\"open\" title=\"Nieuwe analyse\" :description=\"`Locatie #${locationId}`\" :max-width=\"640\" @update:open=\"setOpen\">\n    <p v-if=\"loading\" role=\"status\">Modellen en instellingen laden...</p>\n    <div v-else-if=\"loadError\" class=\"run-analysis__stack\">\n      <p class=\"run-analysis__error\" role=\"alert\">{{ loadError }}</p>\n      <Button @click=\"loadMeta\">Opnieuw proberen</Button>\n    </div>\n    <form v-if=\"ready\" ref=\"form\" class=\"run-analysis__stack\" novalidate @submit.prevent=\"start\">\n      <p v-if=\"storageError\" role=\"status\">{{ storageError }}</p>\n      <fieldset class=\"run-analysis__fieldset\" :disabled=\"running\">\n        <legend class=\"field-label\">Modellen ({{ selectedCount }})</legend>\n        <div class=\"run-analysis__actions\">\n          <Button variant=\"ghost\" @click=\"options.selectedModels = models.map(model => model.id)\">Alles</Button>\n          <Button variant=\"ghost\" @click=\"options.selectedModels = []\">Geen</Button>\n        </div>\n        <div class=\"run-analysis__models\" :aria-invalid=\"Boolean(errors.models)\" :aria-describedby=\"errors.models ? 'run-models-error' : undefined\" tabindex=\"-1\">\n          <div v-for=\"group in groups\" :key=\"group.provider\" class=\"run-analysis__provider\">\n            <span class=\"eyebrow\">{{ group.label }}</span>\n            <label v-for=\"model in group.items\" :key=\"model.id\" class=\"run-analysis__choice\">\n              <Checkbox :model-value=\"options.selectedModels.includes(model.id)\" @update:model-value=\"toggleModel(model.id)\" />\n              {{ model.displayName }}\n            </label>\n          </div>\n        </div>\n        <p v-if=\"errors.models\" id=\"run-models-error\" class=\"run-analysis__error\" role=\"alert\">{{ errors.models }}</p>\n      </fieldset>\n      <details class=\"run-analysis__advanced\" :open=\"advancedOpen\" @toggle=\"advancedOpen = ($event.target as HTMLDetailsElement).open\">\n        <summary>Geavanceerd</summary>\n        <fieldset class=\"run-analysis__stack run-analysis__fieldset\" :disabled=\"running\">\n          <label class=\"run-analysis__choice\"><Checkbox v-model=\"options.dryRun\" /><span><strong>Dry run</strong><small>Mock data, geen API-kosten</small></span></label>\n          <label v-if=\"options.dryRun\" class=\"run-analysis__choice run-analysis__mock\"><Checkbox v-model=\"options.mockRequiresHumanReview\" /><span><strong>Mock: mens-review</strong><small>Laat alle testresultaten om een menselijke beoordeling vragen.</small></span></label>\n          <label class=\"run-analysis__choice\"><Checkbox v-model=\"options.useCache\" /><span><strong>Cache hergebruiken</strong><small>Hergebruik eerder resultaat bij identieke input</small></span></label>\n          <div class=\"run-analysis__sampling\">\n            <label class=\"run-analysis__field\"><span class=\"field-label\">Temperature</span><input class=\"run-analysis__input\" type=\"number\" inputmode=\"decimal\" min=\"0\" max=\"2\" step=\"0.1\" :value=\"options.temperature\" :aria-invalid=\"Boolean(errors.temperature)\" :aria-describedby=\"errors.temperature ? 'run-temperature-error' : undefined\" @input=\"options.temperature = ($event.target as HTMLInputElement).value\"><span v-if=\"errors.temperature\" id=\"run-temperature-error\" class=\"run-analysis__error\">{{ errors.temperature }}</span></label>\n            <label class=\"run-analysis__field\"><span class=\"field-label\">Seed</span><input class=\"run-analysis__input\" type=\"number\" inputmode=\"numeric\" step=\"1\" placeholder=\"random\" :value=\"options.seed\" :aria-invalid=\"Boolean(errors.seed)\" :aria-describedby=\"errors.seed ? 'run-seed-error' : undefined\" @input=\"options.seed = ($event.target as HTMLInputElement).value\"><span v-if=\"errors.seed\" id=\"run-seed-error\" class=\"run-analysis__error\">{{ errors.seed }}</span></label>\n          </div>\n        </fieldset>\n      </details>\n      <p v-if=\"startError\" class=\"run-analysis__error\" role=\"alert\">{{ startError }}</p>\n    </form>\n    <template #footer>\n      <span v-if=\"ready\" class=\"run-analysis__summary\">{{ selectedCount }} {{ selectedCount === 1 ? 'model' : 'modellen' }}{{ options.dryRun ? ' · dry run' : '' }}</span>\n      <Button variant=\"ghost\" :disabled=\"running\" @click=\"setOpen(false)\">Annuleren</Button>\n      <Button v-if=\"ready\" variant=\"primary\" :busy=\"running\" @click=\"start\">{{ running ? 'Analyse wordt gestart...' : 'Analyse starten' }}</Button>\n    </template>\n  </Dialog>\n</template>\n\n<style scoped>\n.run-analysis__stack { display: flex; flex-direction: column; gap: 16px; }\n.run-analysis__fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }\n.run-analysis__fieldset:disabled { opacity: 0.6; }\n.run-analysis__choice { display: flex; align-items: flex-start; gap: 8px; padding: 4px; font-size: var(--text-ui); cursor: pointer; }\n.run-analysis__choice input { flex: none; margin-top: 3px; cursor: pointer; }\n.run-analysis__choice small { display: block; font-size: var(--text-caption); color: var(--fg-3); }\n.run-analysis__hint { margin: 0; color: var(--fg-3); font-size: var(--text-caption); }\n.run-analysis__error { margin: 0; color: var(--danger-fg); font-size: var(--text-caption); }\n.run-analysis__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }\n.run-analysis__models { display: grid; gap: 16px; }\n.run-analysis__provider { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px solid var(--border-1); }\n.run-analysis__advanced { padding-top: 12px; border-top: 1px solid var(--border-1); }\nsummary { padding: 8px 0; font-weight: 600; cursor: pointer; }\n.run-analysis__mock { padding: 12px; border: 1px solid var(--diverge-border); background: var(--diverge-bg); }\n.run-analysis__sampling { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }\n.run-analysis__field { display: flex; flex-direction: column; gap: 4px; }\n.run-analysis__input { width: 100%; min-width: 0; height: 40px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--field-line); border-radius: var(--radius) var(--radius) 0 0; background: var(--bg-inset); color: var(--fg-1); font: inherit; }\n.run-analysis__input[aria-invalid=\"true\"] { border-color: var(--danger); }\n.run-analysis__summary { align-self: center; flex: 1; font-size: var(--text-caption); color: var(--fg-3); }\n@media (min-width: 720px) { .run-analysis__models { grid-template-columns: repeat(3, minmax(0, 1fr)); } }\n@media (hover: hover) { .run-analysis__choice:hover { background: var(--bg-inset); } }\n</style>\n","import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, withModifiers as _withModifiers, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = {\n  key: 0,\n  role: \"status\"\n}\nconst _hoisted_2 = {\n  key: 1,\n  class: \"run-analysis__stack\"\n}\nconst _hoisted_3 = {\n  class: \"run-analysis__error\",\n  role: \"alert\"\n}\nconst _hoisted_4 = {\n  key: 0,\n  role: \"status\"\n}\nconst _hoisted_5 = [\"disabled\"]\nconst _hoisted_6 = { class: \"field-label\" }\nconst _hoisted_7 = { class: \"run-analysis__actions\" }\nconst _hoisted_8 = [\"aria-invalid\", \"aria-describedby\"]\nconst _hoisted_9 = { class: \"eyebrow\" }\nconst _hoisted_10 = {\n  key: 0,\n  id: \"run-models-error\",\n  class: \"run-analysis__error\",\n  role: \"alert\"\n}\nconst _hoisted_11 = [\"open\"]\nconst _hoisted_12 = [\"disabled\"]\nconst _hoisted_13 = { class: \"run-analysis__choice\" }\nconst _hoisted_14 = {\n  key: 0,\n  class: \"run-analysis__choice run-analysis__mock\"\n}\nconst _hoisted_15 = { class: \"run-analysis__choice\" }\nconst _hoisted_16 = { class: \"run-analysis__sampling\" }\nconst _hoisted_17 = { class: \"run-analysis__field\" }\nconst _hoisted_18 = [\"value\", \"aria-invalid\", \"aria-describedby\"]\nconst _hoisted_19 = {\n  key: 0,\n  id: \"run-temperature-error\",\n  class: \"run-analysis__error\"\n}\nconst _hoisted_20 = { class: \"run-analysis__field\" }\nconst _hoisted_21 = [\"value\", \"aria-invalid\", \"aria-describedby\"]\nconst _hoisted_22 = {\n  key: 0,\n  id: \"run-seed-error\",\n  class: \"run-analysis__error\"\n}\nconst _hoisted_23 = {\n  key: 1,\n  class: \"run-analysis__error\",\n  role: \"alert\"\n}\nconst _hoisted_24 = {\n  key: 0,\n  class: \"run-analysis__summary\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createBlock($setup[\"Dialog\"], {\n    open: $props.open,\n    title: \"Nieuwe analyse\",\n    description: `Locatie #${$props.locationId}`,\n    \"max-width\": 640,\n    \"onUpdate:open\": $setup.setOpen\n  }, {\n    footer: _withCtx(() => [\n      ($setup.ready)\n        ? (_openBlock(), _createElementBlock(\"span\", _hoisted_24, _toDisplayString($setup.selectedCount) + \" \" + _toDisplayString($setup.selectedCount === 1 ? 'model' : 'modellen') + _toDisplayString($setup.options.dryRun ? ' · dry run' : ''), 1 /* TEXT */))\n        : _createCommentVNode(\"v-if\", true),\n      _createVNode($setup[\"Button\"], {\n        variant: \"ghost\",\n        disabled: $setup.running,\n        onClick: _cache[8] || (_cache[8] = $event => ($setup.setOpen(false)))\n      }, {\n        default: _withCtx(() => _cache[18] || (_cache[18] = [\n          _createTextVNode(\"Annuleren\", -1 /* CACHED */)\n        ])),\n        _: 1 /* STABLE */,\n        __: [18]\n      }, 8 /* PROPS */, [\"disabled\"]),\n      ($setup.ready)\n        ? (_openBlock(), _createBlock($setup[\"Button\"], {\n            key: 1,\n            variant: \"primary\",\n            busy: $setup.running,\n            onClick: $setup.start\n          }, {\n            default: _withCtx(() => [\n              _createTextVNode(_toDisplayString($setup.running ? 'Analyse wordt gestart...' : 'Analyse starten'), 1 /* TEXT */)\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"busy\"]))\n        : _createCommentVNode(\"v-if\", true)\n    ]),\n    default: _withCtx(() => [\n      ($setup.loading)\n        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_1, \"Modellen en instellingen laden...\"))\n        : ($setup.loadError)\n          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n              _createElementVNode(\"p\", _hoisted_3, _toDisplayString($setup.loadError), 1 /* TEXT */),\n              _createVNode($setup[\"Button\"], { onClick: $setup.loadMeta }, {\n                default: _withCtx(() => _cache[9] || (_cache[9] = [\n                  _createTextVNode(\"Opnieuw proberen\", -1 /* CACHED */)\n                ])),\n                _: 1 /* STABLE */,\n                __: [9]\n              })\n            ]))\n          : _createCommentVNode(\"v-if\", true),\n      ($setup.ready)\n        ? (_openBlock(), _createElementBlock(\"form\", {\n            key: 2,\n            ref: \"form\",\n            class: \"run-analysis__stack\",\n            novalidate: \"\",\n            onSubmit: _withModifiers($setup.start, [\"prevent\"])\n          }, [\n            ($setup.storageError)\n              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_4, _toDisplayString($setup.storageError), 1 /* TEXT */))\n              : _createCommentVNode(\"v-if\", true),\n            _createElementVNode(\"fieldset\", {\n              class: \"run-analysis__fieldset\",\n              disabled: $setup.running\n            }, [\n              _createElementVNode(\"legend\", _hoisted_6, \"Modellen (\" + _toDisplayString($setup.selectedCount) + \")\", 1 /* TEXT */),\n              _createElementVNode(\"div\", _hoisted_7, [\n                _createVNode($setup[\"Button\"], {\n                  variant: \"ghost\",\n                  onClick: _cache[0] || (_cache[0] = $event => ($setup.options.selectedModels = $setup.models.map(model => model.id)))\n                }, {\n                  default: _withCtx(() => _cache[10] || (_cache[10] = [\n                    _createTextVNode(\"Alles\", -1 /* CACHED */)\n                  ])),\n                  _: 1 /* STABLE */,\n                  __: [10]\n                }),\n                _createVNode($setup[\"Button\"], {\n                  variant: \"ghost\",\n                  onClick: _cache[1] || (_cache[1] = $event => ($setup.options.selectedModels = []))\n                }, {\n                  default: _withCtx(() => _cache[11] || (_cache[11] = [\n                    _createTextVNode(\"Geen\", -1 /* CACHED */)\n                  ])),\n                  _: 1 /* STABLE */,\n                  __: [11]\n                })\n              ]),\n              _createElementVNode(\"div\", {\n                class: \"run-analysis__models\",\n                \"aria-invalid\": Boolean($setup.errors.models),\n                \"aria-describedby\": $setup.errors.models ? 'run-models-error' : undefined,\n                tabindex: \"-1\"\n              }, [\n                (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.groups, (group) => {\n                  return (_openBlock(), _createElementBlock(\"div\", {\n                    key: group.provider,\n                    class: \"run-analysis__provider\"\n                  }, [\n                    _createElementVNode(\"span\", _hoisted_9, _toDisplayString(group.label), 1 /* TEXT */),\n                    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(group.items, (model) => {\n                      return (_openBlock(), _createElementBlock(\"label\", {\n                        key: model.id,\n                        class: \"run-analysis__choice\"\n                      }, [\n                        _createVNode($setup[\"Checkbox\"], {\n                          \"model-value\": $setup.options.selectedModels.includes(model.id),\n                          \"onUpdate:modelValue\": $event => ($setup.toggleModel(model.id))\n                        }, null, 8 /* PROPS */, [\"model-value\", \"onUpdate:modelValue\"]),\n                        _createTextVNode(\" \" + _toDisplayString(model.displayName), 1 /* TEXT */)\n                      ]))\n                    }), 128 /* KEYED_FRAGMENT */))\n                  ]))\n                }), 128 /* KEYED_FRAGMENT */))\n              ], 8 /* PROPS */, _hoisted_8),\n              ($setup.errors.models)\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_10, _toDisplayString($setup.errors.models), 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true)\n            ], 8 /* PROPS */, _hoisted_5),\n            _createElementVNode(\"details\", {\n              class: \"run-analysis__advanced\",\n              open: $setup.advancedOpen,\n              onToggle: _cache[7] || (_cache[7] = $event => ($setup.advancedOpen = ($event.target as HTMLDetailsElement).open))\n            }, [\n              _cache[17] || (_cache[17] = _createElementVNode(\"summary\", null, \"Geavanceerd\", -1 /* CACHED */)),\n              _createElementVNode(\"fieldset\", {\n                class: \"run-analysis__stack run-analysis__fieldset\",\n                disabled: $setup.running\n              }, [\n                _createElementVNode(\"label\", _hoisted_13, [\n                  _createVNode($setup[\"Checkbox\"], {\n                    modelValue: $setup.options.dryRun,\n                    \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => (($setup.options.dryRun) = $event))\n                  }, null, 8 /* PROPS */, [\"modelValue\"]),\n                  _cache[12] || (_cache[12] = _createElementVNode(\"span\", null, [\n                    _createElementVNode(\"strong\", null, \"Dry run\"),\n                    _createElementVNode(\"small\", null, \"Mock data, geen API-kosten\")\n                  ], -1 /* CACHED */))\n                ]),\n                ($setup.options.dryRun)\n                  ? (_openBlock(), _createElementBlock(\"label\", _hoisted_14, [\n                      _createVNode($setup[\"Checkbox\"], {\n                        modelValue: $setup.options.mockRequiresHumanReview,\n                        \"onUpdate:modelValue\": _cache[3] || (_cache[3] = $event => (($setup.options.mockRequiresHumanReview) = $event))\n                      }, null, 8 /* PROPS */, [\"modelValue\"]),\n                      _cache[13] || (_cache[13] = _createElementVNode(\"span\", null, [\n                        _createElementVNode(\"strong\", null, \"Mock: mens-review\"),\n                        _createElementVNode(\"small\", null, \"Laat alle testresultaten om een menselijke beoordeling vragen.\")\n                      ], -1 /* CACHED */))\n                    ]))\n                  : _createCommentVNode(\"v-if\", true),\n                _createElementVNode(\"label\", _hoisted_15, [\n                  _createVNode($setup[\"Checkbox\"], {\n                    modelValue: $setup.options.useCache,\n                    \"onUpdate:modelValue\": _cache[4] || (_cache[4] = $event => (($setup.options.useCache) = $event))\n                  }, null, 8 /* PROPS */, [\"modelValue\"]),\n                  _cache[14] || (_cache[14] = _createElementVNode(\"span\", null, [\n                    _createElementVNode(\"strong\", null, \"Cache hergebruiken\"),\n                    _createElementVNode(\"small\", null, \"Hergebruik eerder resultaat bij identieke input\")\n                  ], -1 /* CACHED */))\n                ]),\n                _createElementVNode(\"div\", _hoisted_16, [\n                  _createElementVNode(\"label\", _hoisted_17, [\n                    _cache[15] || (_cache[15] = _createElementVNode(\"span\", { class: \"field-label\" }, \"Temperature\", -1 /* CACHED */)),\n                    _createElementVNode(\"input\", {\n                      class: \"run-analysis__input\",\n                      type: \"number\",\n                      inputmode: \"decimal\",\n                      min: \"0\",\n                      max: \"2\",\n                      step: \"0.1\",\n                      value: $setup.options.temperature,\n                      \"aria-invalid\": Boolean($setup.errors.temperature),\n                      \"aria-describedby\": $setup.errors.temperature ? 'run-temperature-error' : undefined,\n                      onInput: _cache[5] || (_cache[5] = $event => ($setup.options.temperature = ($event.target as HTMLInputElement).value))\n                    }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_18),\n                    ($setup.errors.temperature)\n                      ? (_openBlock(), _createElementBlock(\"span\", _hoisted_19, _toDisplayString($setup.errors.temperature), 1 /* TEXT */))\n                      : _createCommentVNode(\"v-if\", true)\n                  ]),\n                  _createElementVNode(\"label\", _hoisted_20, [\n                    _cache[16] || (_cache[16] = _createElementVNode(\"span\", { class: \"field-label\" }, \"Seed\", -1 /* CACHED */)),\n                    _createElementVNode(\"input\", {\n                      class: \"run-analysis__input\",\n                      type: \"number\",\n                      inputmode: \"numeric\",\n                      step: \"1\",\n                      placeholder: \"random\",\n                      value: $setup.options.seed,\n                      \"aria-invalid\": Boolean($setup.errors.seed),\n                      \"aria-describedby\": $setup.errors.seed ? 'run-seed-error' : undefined,\n                      onInput: _cache[6] || (_cache[6] = $event => ($setup.options.seed = ($event.target as HTMLInputElement).value))\n                    }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_21),\n                    ($setup.errors.seed)\n                      ? (_openBlock(), _createElementBlock(\"span\", _hoisted_22, _toDisplayString($setup.errors.seed), 1 /* TEXT */))\n                      : _createCommentVNode(\"v-if\", true)\n                  ])\n                ])\n              ], 8 /* PROPS */, _hoisted_12)\n            ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_11),\n            ($setup.startError)\n              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_23, _toDisplayString($setup.startError), 1 /* TEXT */))\n              : _createCommentVNode(\"v-if\", true)\n          ], 544 /* NEED_HYDRATION, NEED_PATCH */))\n        : _createCommentVNode(\"v-if\", true)\n    ]),\n    _: 1 /* STABLE */\n  }, 8 /* PROPS */, [\"open\", \"description\"]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/RunAnalysisDialog.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/RunAnalysisDialog.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/RunAnalysisDialog.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/RunAnalysisDialog.vue\";script.__scopeId = \"data-v-2cdf3504\";export default script;","<script setup lang=\"ts\">\nimport { computed, ref, watch, onScopeDispose } from \"vue\";\nimport Panel from \"./ui/Panel.vue\";\nimport Badge from \"./ui/Badge.vue\";\nimport Button from \"./ui/Button.vue\";\nimport { api } from \"../lib/api\";\nimport { LocationRequestScope } from \"../lib/location-detail\";\nimport { projectCadastralBoundary } from \"../lib/cadastral-map\";\n\nconst props = defineProps<{ locationId: number; latitude: number; longitude: number; satelliteImageUrl?: string | null }>();\nexport type CadastralData = Awaited<ReturnType<typeof api.getCadastralParcel>>;\nconst emit = defineEmits<{ loaded: [data: CadastralData | null] }>();\nconst data = ref<CadastralData | null>(null);\nconst loading = ref(true);\nconst error = ref(\"\");\nconst scope = new LocationRequestScope();\nconst projection = computed(() => data.value?.boundary ? projectCadastralBoundary({ boundary: data.value.boundary, latitude: props.latitude, longitude: props.longitude }) : null);\n\nasync function load() {\n  const current = scope.begin(\"parcel\");\n  loading.value = true;\n  error.value = \"\";\n  data.value = null;\n  emit(\"loaded\", null);\n  try {\n    const result = await api.getCadastralParcel({ locationId: props.locationId });\n    if (current()) {\n      data.value = result;\n      emit(\"loaded\", result);\n    }\n  } catch (caught) {\n    if (current()) error.value = caught instanceof Error ? caught.message : \"Kadastrale data ophalen mislukt.\";\n  } finally {\n    if (current()) loading.value = false;\n  }\n}\n\nwatch(() => [props.locationId, props.latitude, props.longitude], () => { void load(); }, { immediate: true });\nonScopeDispose(() => scope.dispose());\n</script>\n\n<template>\n  <Panel title=\"Kadastraal perceel\">\n    <p v-if=\"loading\" class=\"cadastral-map__message\" role=\"status\">Kadastrale data ophalen...</p>\n    <div v-else-if=\"error\" class=\"cadastral-map__stack\"><p class=\"cadastral-map__error\" role=\"alert\">{{ error }}</p><Button @click=\"load\">Opnieuw proberen</Button></div>\n    <div v-else-if=\"data?.parcel && projection\" class=\"cadastral-map__stack\">\n      <div class=\"cadastral-map__badges\"><Badge>{{ data.parcel.kadastraleGemeente }} {{ data.parcel.sectie }} {{ data.parcel.perceelnummer }}</Badge><Badge>{{ data.parcel.oppervlakte.toLocaleString('nl-NL') }} m²</Badge></div>\n      <svg viewBox=\"0 0 400 300\" class=\"cadastral-map__svg\" role=\"img\" aria-label=\"Perceelgrens met de locatie gemarkeerd\">\n        <path :d=\"projection.path\" class=\"cadastral-map__boundary\" fill-rule=\"evenodd\" stroke-width=\"2\" />\n        <circle :cx=\"projection.pin[0]\" :cy=\"projection.pin[1]\" r=\"5\" class=\"cadastral-map__pin\" />\n        <circle :cx=\"projection.pin[0]\" :cy=\"projection.pin[1]\" r=\"8\" fill=\"none\" class=\"cadastral-map__halo\" stroke-width=\"1.5\" />\n      </svg>\n      <div v-if=\"satelliteImageUrl\"><p class=\"cadastral-map__label\">Satellietfoto met kadastrale grens</p><a :href=\"satelliteImageUrl\" target=\"_blank\" rel=\"noopener noreferrer\"><img :src=\"satelliteImageUrl\" alt=\"Satellietfoto met kadastrale grens\" class=\"cadastral-map__image\" loading=\"lazy\"></a></div>\n      <p class=\"cadastral-map__message\">Kadastrale grenzen zijn indicatief en komen niet altijd overeen met fysieke terreingrenzen. Bron: PDOK Kadaster (BRK).</p>\n    </div>\n    <p v-else class=\"cadastral-map__message\">Geen kadastraal perceel gevonden op deze locatie.</p>\n  </Panel>\n</template>\n\n<style scoped>\n.cadastral-map__stack { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }\n.cadastral-map__badges { display: flex; flex-wrap: wrap; gap: 8px; }\n.cadastral-map__svg { display: block; width: 100%; max-height: 300px; border: 1px solid var(--border-1); background: var(--bg-inset); }\n.cadastral-map__boundary { fill: var(--info-bg); stroke: var(--info-fg); }\n.cadastral-map__pin { fill: var(--danger-fg); }\n.cadastral-map__halo { stroke: var(--danger-fg); opacity: .5; }\n.cadastral-map__message { margin: 0; color: var(--fg-3); font-size: var(--text-caption); }\n.cadastral-map__error { margin: 0; color: var(--danger-fg); }\n.cadastral-map__label { margin: 0 0 4px; font-size: var(--text-caption); }\n.cadastral-map__image { display: block; width: 100%; max-height: 400px; border: 1px solid var(--border-1); object-fit: cover; }\n</style>\n","export class LocationRequestScope {\n  #active = true;\n  #versions = new Map<string, number>();\n\n  public begin(resource: string): () => boolean {\n    const version = (this.#versions.get(resource) ?? 0) + 1;\n    this.#versions.set(resource, version);\n    return () => this.#active && this.#versions.get(resource) === version;\n  }\n\n  public dispose(): void {\n    this.#active = false;\n  }\n}\n\nexport function locationCoordinates(location: { latitude: number | null; longitude: number | null } | null): { lat: number; lng: number } | null {\n  if (!location || location.latitude === null || location.longitude === null\n    || !Number.isFinite(location.latitude) || !Number.isFinite(location.longitude)\n    || Math.abs(location.latitude) > 90 || Math.abs(location.longitude) > 180)\n    return null;\n  return { lat: location.latitude, lng: location.longitude };\n}\n\nexport function latestLocationAnalysis<T extends { id: number; createdAt: string }>(analyses: readonly T[]): T | null {\n  return [...analyses].sort((a, b) => Date.parse(b.createdAt) - Date.parse(a.createdAt) || b.id - a.id)[0] ?? null;\n}\n\nexport function parseGroundTruth(input: { parkingSpots: string; adjacent: string; notes: string }) {\n  const raw = input.parkingSpots.trim();\n  const parkingSpots = raw === \"\" ? null : Number(raw);\n  if (parkingSpots !== null && (!/^\\d+$/.test(raw) || !Number.isSafeInteger(parkingSpots) || parkingSpots > 2147483647))\n    throw new Error(\"Vul een positief geheel getal of 0 in voor het aantal parkeerplaatsen.\");\n  return {\n    groundTruthParkingSpots: parkingSpots,\n    groundTruthHasAdjacentSpots: input.adjacent === \"unknown\" ? null : input.adjacent === \"yes\",\n    groundTruthNotes: input.notes.trim() || null,\n  };\n}\n\nexport function scoutLocationUrl(options: { locationId: number; hostname: string }): string {\n  const host = options.hostname.toLowerCase();\n  const base = host === \"localhost\" || host === \"127.0.0.1\"\n    ? \"http://localhost:8001/statiegeld-nl-feedback/\"\n    : host === \"testsites.webwerf.nl\" || host === \"test.webwerf.nl\"\n      ? \"https://testsites.webwerf.nl/snl-scout/\"\n      : \"https://snl-scout.tech42.nl/\";\n  return `${base}#/location/${options.locationId}`;\n}\n\nexport function safeWebsiteUrl(value: string | null | undefined): string | null {\n  if (!value?.trim()) return null;\n  const raw = value.trim();\n  const normalized = /^[a-z][a-z\\d+.-]*:/i.test(raw) ? raw : `https://${raw}`;\n  try {\n    const url = new URL(normalized);\n    return url.protocol === \"https:\" || url.protocol === \"http:\" ? url.href : null;\n  } catch {\n    return null;\n  }\n}\n","export type CadastralBoundary = { type: \"Polygon\"; coordinates: number[][][] } | { type: \"MultiPolygon\"; coordinates: number[][][][] };\n\nexport function projectCadastralBoundary(options: { boundary: CadastralBoundary; latitude: number; longitude: number }) {\n  const rings = options.boundary.type === \"Polygon\" ? options.boundary.coordinates : options.boundary.coordinates.flat();\n  const points = rings.flat();\n  if (!points.length || points.some(point => point.length < 2 || !Number.isFinite(point[0]) || !Number.isFinite(point[1]))) return null;\n  const longitudes = points.map(point => point[0]);\n  const latitudes = points.map(point => point[1]);\n  const minLng = Math.min(...longitudes), maxLng = Math.max(...longitudes);\n  const minLat = Math.min(...latitudes), maxLat = Math.max(...latitudes);\n  const metersPerDegLng = 111320 * Math.cos(((minLat + maxLat) / 2) * Math.PI / 180);\n  const widthMeters = (maxLng - minLng) * metersPerDegLng;\n  const heightMeters = (maxLat - minLat) * 111320;\n  if (widthMeters <= 0 || heightMeters <= 0) return null;\n  const scale = Math.min(280 / widthMeters, 210 / heightMeters);\n  const width = widthMeters * scale;\n  const height = heightMeters * scale;\n  const project = (point: number[]): [number, number] => [\n    (point[0] - minLng) * metersPerDegLng * scale + (400 - width) / 2,\n    (maxLat - point[1]) * 111320 * scale + (300 - height) / 2,\n  ];\n  return {\n    path: rings.filter(ring => ring.length >= 3).map(ring => `M ${ring.map(point => project(point).map(value => value.toFixed(1)).join(\",\")).join(\" L \")} Z`).join(\" \"),\n    pin: project([options.longitude, options.latitude]),\n    width,\n    height,\n  };\n}\n","import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = {\n  key: 0,\n  class: \"cadastral-map__message\",\n  role: \"status\"\n}\nconst _hoisted_2 = {\n  key: 1,\n  class: \"cadastral-map__stack\"\n}\nconst _hoisted_3 = {\n  class: \"cadastral-map__error\",\n  role: \"alert\"\n}\nconst _hoisted_4 = {\n  key: 2,\n  class: \"cadastral-map__stack\"\n}\nconst _hoisted_5 = { class: \"cadastral-map__badges\" }\nconst _hoisted_6 = {\n  viewBox: \"0 0 400 300\",\n  class: \"cadastral-map__svg\",\n  role: \"img\",\n  \"aria-label\": \"Perceelgrens met de locatie gemarkeerd\"\n}\nconst _hoisted_7 = [\"d\"]\nconst _hoisted_8 = [\"cx\", \"cy\"]\nconst _hoisted_9 = [\"cx\", \"cy\"]\nconst _hoisted_10 = { key: 0 }\nconst _hoisted_11 = [\"href\"]\nconst _hoisted_12 = [\"src\"]\nconst _hoisted_13 = {\n  key: 3,\n  class: \"cadastral-map__message\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createBlock($setup[\"Panel\"], { title: \"Kadastraal perceel\" }, {\n    default: _withCtx(() => [\n      ($setup.loading)\n        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_1, \"Kadastrale data ophalen...\"))\n        : ($setup.error)\n          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n              _createElementVNode(\"p\", _hoisted_3, _toDisplayString($setup.error), 1 /* TEXT */),\n              _createVNode($setup[\"Button\"], { onClick: $setup.load }, {\n                default: _withCtx(() => _cache[0] || (_cache[0] = [\n                  _createTextVNode(\"Opnieuw proberen\", -1 /* CACHED */)\n                ])),\n                _: 1 /* STABLE */,\n                __: [0]\n              })\n            ]))\n          : ($setup.data?.parcel && $setup.projection)\n            ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n                _createElementVNode(\"div\", _hoisted_5, [\n                  _createVNode($setup[\"Badge\"], null, {\n                    default: _withCtx(() => [\n                      _createTextVNode(_toDisplayString($setup.data.parcel.kadastraleGemeente) + \" \" + _toDisplayString($setup.data.parcel.sectie) + \" \" + _toDisplayString($setup.data.parcel.perceelnummer), 1 /* TEXT */)\n                    ]),\n                    _: 1 /* STABLE */\n                  }),\n                  _createVNode($setup[\"Badge\"], null, {\n                    default: _withCtx(() => [\n                      _createTextVNode(_toDisplayString($setup.data.parcel.oppervlakte.toLocaleString('nl-NL')) + \" m²\", 1 /* TEXT */)\n                    ]),\n                    _: 1 /* STABLE */\n                  })\n                ]),\n                (_openBlock(), _createElementBlock(\"svg\", _hoisted_6, [\n                  _createElementVNode(\"path\", {\n                    d: $setup.projection.path,\n                    class: \"cadastral-map__boundary\",\n                    \"fill-rule\": \"evenodd\",\n                    \"stroke-width\": \"2\"\n                  }, null, 8 /* PROPS */, _hoisted_7),\n                  _createElementVNode(\"circle\", {\n                    cx: $setup.projection.pin[0],\n                    cy: $setup.projection.pin[1],\n                    r: \"5\",\n                    class: \"cadastral-map__pin\"\n                  }, null, 8 /* PROPS */, _hoisted_8),\n                  _createElementVNode(\"circle\", {\n                    cx: $setup.projection.pin[0],\n                    cy: $setup.projection.pin[1],\n                    r: \"8\",\n                    fill: \"none\",\n                    class: \"cadastral-map__halo\",\n                    \"stroke-width\": \"1.5\"\n                  }, null, 8 /* PROPS */, _hoisted_9)\n                ])),\n                ($props.satelliteImageUrl)\n                  ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n                      _cache[1] || (_cache[1] = _createElementVNode(\"p\", { class: \"cadastral-map__label\" }, \"Satellietfoto met kadastrale grens\", -1 /* CACHED */)),\n                      _createElementVNode(\"a\", {\n                        href: $props.satelliteImageUrl,\n                        target: \"_blank\",\n                        rel: \"noopener noreferrer\"\n                      }, [\n                        _createElementVNode(\"img\", {\n                          src: $props.satelliteImageUrl,\n                          alt: \"Satellietfoto met kadastrale grens\",\n                          class: \"cadastral-map__image\",\n                          loading: \"lazy\"\n                        }, null, 8 /* PROPS */, _hoisted_12)\n                      ], 8 /* PROPS */, _hoisted_11)\n                    ]))\n                  : _createCommentVNode(\"v-if\", true),\n                _cache[2] || (_cache[2] = _createElementVNode(\"p\", { class: \"cadastral-map__message\" }, \"Kadastrale grenzen zijn indicatief en komen niet altijd overeen met fysieke terreingrenzen. Bron: PDOK Kadaster (BRK).\", -1 /* CACHED */))\n              ]))\n            : (_openBlock(), _createElementBlock(\"p\", _hoisted_13, \"Geen kadastraal perceel gevonden op deze locatie.\"))\n    ]),\n    _: 1 /* STABLE */\n  }))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/CadastralMap.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/CadastralMap.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/CadastralMap.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/CadastralMap.vue\";script.__scopeId = \"data-v-b25b87b7\";export default script;","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport Popover from \"./ui/Popover.vue\";\nimport { SBI_CODES } from \"../lib/sbi-codes\";\nimport { mostSpecificSbiCodes, sbiParentDescription } from \"../lib/sbi\";\n\nconst props = defineProps<{ sbiCodes: string }>();\nconst codes = computed(() => mostSpecificSbiCodes(props.sbiCodes).map(code => ({ code, description: SBI_CODES[code], parents: sbiParentDescription(code) })));\n</script>\n\n<template>\n  <div class=\"sbi-codes\">\n    <template v-for=\"item in codes\" :key=\"item.code\">\n      <Popover v-if=\"item.description\" :width=\"320\">\n        <template #trigger><button class=\"sbi-codes__code sbi-codes__code--known\" type=\"button\" :aria-label=\"`Uitleg SBI-code ${item.code}`\">{{ item.code }}</button></template>\n        <div class=\"sbi-codes__description\"><strong>SBI {{ item.code }}</strong><p>{{ item.description }}</p><p v-if=\"item.parents\" class=\"sbi-codes__parents\">{{ item.parents }}</p></div>\n      </Popover>\n      <span v-else class=\"sbi-codes__code\">{{ item.code }}</span>\n    </template>\n    <span v-if=\"!codes.length\">{{ sbiCodes }}</span>\n  </div>\n</template>\n\n<style scoped>\n.sbi-codes { display: flex; flex-wrap: wrap; gap: 4px; }\n.sbi-codes__code { display: inline-flex; padding: 2px 6px; border: 1px solid transparent; border-radius: var(--radius); background: var(--bg-inset); color: var(--fg-2); font: inherit; font-size: var(--text-caption); }\n.sbi-codes__code--known { background: var(--info-bg); color: var(--info-fg); cursor: pointer; }\n.sbi-codes__description { font-size: var(--text-ui); }\n.sbi-codes__description p { margin: 4px 0 0; }\n.sbi-codes__parents { color: var(--fg-3); font-size: var(--text-caption); }\n@media (hover: hover) { .sbi-codes__code--known:hover { border-color: var(--info-border); } }\n</style>\n","/**\n * Standaard Bedrijfsindeling (SBI) 2008 - versie 2018 update 2022\n * Bron: CBS (Centraal Bureau voor de Statistiek)\n * https://www.cbs.nl/-/media/cbs/onze-diensten/methoden/classificaties/documents/2022/2022ep06-sbi-structuur.pdf\n *\n * Alle codes ZONDER punten (bijv. \"4730\" i.p.v. \"47.30\")\n * Niveaus: 2-cijferig (afdelingen), 3-cijferig (groepen), 4-cijferig (klassen), 5-cijferig (subklassen)\n */\nexport const SBI_CODES: Record<string, string> = {\n  // A - Landbouw, bosbouw en visserij\n  \"01\": \"Landbouw, jacht en dienstverlening voor de landbouw en jacht\",\n  \"011\": \"Teelt van eenjarige gewassen\",\n  \"0111\": \"Teelt van granen, peulvruchten en oliehoudende zaden\",\n  \"0113\": \"Teelt van groenten en wortel- en knolgewassen\",\n  \"01131\": \"Teelt van groenten in de volle grond\",\n  \"01132\": \"Teelt van groenten onder glas\",\n  \"01133\": \"Teelt van paddenstoelen\",\n  \"01134\": \"Teelt van aardappels en overige wortel- en knolgewassen\",\n  \"0116\": \"Teelt van vezelgewassen\",\n  \"0119\": \"Teelt van overige eenjarige gewassen\",\n  \"01191\": \"Teelt van snijbloemen en snijheesters in de volle grond\",\n  \"01192\": \"Teelt van snijbloemen en snijheesters onder glas\",\n  \"01193\": \"Teelt van voedergewassen\",\n  \"01199\": \"Teelt van overige eenjarige gewassen (rest)\",\n  \"012\": \"Teelt van meerjarige gewassen\",\n  \"0121\": \"Teelt van druiven\",\n  \"0124\": \"Teelt van pit- en steenvruchten\",\n  \"01241\": \"Teelt van appels en peren\",\n  \"01242\": \"Teelt van steenvruchten\",\n  \"0125\": \"Teelt van overige boomvruchten, kleinfruit en noten\",\n  \"01251\": \"Teelt van aardbeien in de volle grond\",\n  \"01252\": \"Teelt van aardbeien onder glas\",\n  \"01253\": \"Teelt van houtig klein fruit in de volle grond (incl. overige boomvruchten en noten)\",\n  \"01254\": \"Teelt van houtig klein fruit onder glas\",\n  \"0127\": \"Teelt van gewassen bestemd voor de vervaardiging van dranken\",\n  \"0128\": \"Teelt van specerijgewassen en van aromatische en medicinale gewassen\",\n  \"0129\": \"Teelt van overige meerjarige gewassen\",\n  \"013\": \"Teelt van sierplanten\",\n  \"0130\": \"Teelt van sierplanten\",\n  \"01301\": \"Teelt van bloembollen\",\n  \"01302\": \"Teelt van perkplanten in de volle grond\",\n  \"01303\": \"Teelt van perkplanten onder glas\",\n  \"01304\": \"Teelt van potplanten onder glas\",\n  \"01305\": \"Teelt van boomkwekerijgewassen in de volle grond\",\n  \"01309\": \"Teelt van overige sierplanten in de volle grond\",\n  \"014\": \"Fokken en houden van dieren\",\n  \"0141\": \"Fokken en houden van melkvee\",\n  \"01411\": \"Houden van melkvee\",\n  \"01412\": \"Opfokken van jongvee voor de melkveehouderij\",\n  \"0142\": \"Fokken en houden van runderen (geen melkvee)\",\n  \"01421\": \"Houden van vleeskalveren\",\n  \"01422\": \"Overige vleesveehouderij en zoogkoeienbedrijven\",\n  \"0143\": \"Fokken en houden van paarden en ezels\",\n  \"0145\": \"Fokken en houden van schapen en geiten\",\n  \"01451\": \"Fokken en houden van schapen\",\n  \"01452\": \"Fokken en houden van geiten\",\n  \"0146\": \"Fokken en houden van varkens\",\n  \"01461\": \"Fokvarkens- en vermeerderingsbedrijven\",\n  \"01462\": \"Vleesvarkensbedrijven\",\n  \"01463\": \"Gesloten en deels gesloten varkensbedrijven\",\n  \"0147\": \"Fokken en houden van pluimvee\",\n  \"01471\": \"Opfokken en/of houden van leghennen\",\n  \"01472\": \"Opfokken en/of houden van vleeskuikens\",\n  \"01473\": \"Opfokken en/of houden van ouderdieren van leghennen en vleeskuikens\",\n  \"01479\": \"Opfokken en/of houden van overig pluimvee\",\n  \"0149\": \"Fokken en houden van overige dieren\",\n  \"01491\": \"Fokken en houden van edelpelsdieren\",\n  \"01499\": \"Fokken en houden van overige dieren (rest)\",\n  \"015\": \"Akker- en/of tuinbouw in combinatie met het fokken en houden van dieren\",\n  \"0150\": \"Akker- en/of tuinbouw in combinatie met het fokken en houden van dieren\",\n  \"016\": \"Dienstverlening voor de landbouw; behandeling van gewassen na de oogst\",\n  \"0161\": \"Dienstverlening voor de akker- en/of tuinbouw\",\n  \"0162\": \"Dienstverlening voor het fokken en houden van dieren\",\n  \"0163\": \"Behandeling van gewassen na de oogst\",\n  \"0164\": \"Behandeling van zaden voor vermeerdering\",\n  \"017\": \"Jacht\",\n  \"0170\": \"Jacht\",\n  \"02\": \"Bosbouw, exploitatie van bossen en dienstverlening voor de bosbouw\",\n  \"021\": \"Bosbouw\",\n  \"0210\": \"Bosbouw\",\n  \"022\": \"Exploitatie van bossen\",\n  \"0220\": \"Exploitatie van bossen\",\n  \"024\": \"Dienstverlening voor de bosbouw\",\n  \"0240\": \"Dienstverlening voor de bosbouw\",\n  \"03\": \"Visserij en kweken van vis en schaaldieren\",\n  \"031\": \"Visserij\",\n  \"0311\": \"Zee- en kustvisserij\",\n  \"0312\": \"Binnenvisserij\",\n  \"032\": \"Kweken van vis en schaaldieren\",\n  \"0321\": \"Kweken van zeevis en -schaaldieren\",\n  \"0322\": \"Kweken van zoetwatervis en -schaaldieren\",\n  // B - Winning van delfstoffen\n  \"06\": \"Winning van aardolie en aardgas\",\n  \"061\": \"Winning van aardolie\",\n  \"0610\": \"Winning van aardolie\",\n  \"062\": \"Winning van aardgas\",\n  \"0620\": \"Winning van aardgas\",\n  \"08\": \"Winning van delfstoffen (geen olie en gas)\",\n  \"081\": \"Winning van zand, grind en klei\",\n  \"0812\": \"Winning van zand, grind en klei\",\n  \"089\": \"Winning van overige delfstoffen\",\n  \"0892\": \"Winning van turf\",\n  \"0893\": \"Winning van zout\",\n  \"0899\": \"Winning van overige delfstoffen (rest)\",\n  \"09\": \"Dienstverlening voor de winning van delfstoffen\",\n  \"091\": \"Dienstverlening voor de winning van aardolie- en aardgas\",\n  \"0910\": \"Dienstverlening voor de winning van aardolie- en aardgas\",\n  \"099\": \"Dienstverlening voor de winning van delfstoffen (geen olie en gas)\",\n  \"0990\": \"Dienstverlening voor de winning van delfstoffen (geen olie en gas)\",\n  // C - Industrie\n  \"10\": \"Vervaardiging van voedingsmiddelen\",\n  \"101\": \"Slachterijen en vleesverwerking\",\n  \"1011\": \"Slachterijen (geen pluimvee)\",\n  \"1012\": \"Pluimveeslachterijen\",\n  \"1013\": \"Vleesverwerking (niet tot maaltijden)\",\n  \"102\": \"Visverwerking\",\n  \"1020\": \"Visverwerking\",\n  \"103\": \"Verwerking van aardappels, groente en fruit\",\n  \"1031\": \"Vervaardiging van aardappelproducten\",\n  \"1032\": \"Vervaardiging van fruit- en groentesap\",\n  \"1039\": \"Verwerking van groente en fruit (niet tot sap en maaltijden)\",\n  \"104\": \"Vervaardiging van plantaardige en dierlijke oliën en vetten\",\n  \"1041\": \"Vervaardiging van plantaardige en dierlijke oliën en vetten (geen margarine en andere spijsvetten)\",\n  \"1042\": \"Vervaardiging van margarine en overige spijsvetten\",\n  \"105\": \"Vervaardiging van zuivelproducten\",\n  \"1051\": \"Vervaardiging van zuivelproducten (geen consumptie-ijs)\",\n  \"1052\": \"Vervaardiging van consumptie-ijs\",\n  \"106\": \"Vervaardiging van meel\",\n  \"1061\": \"Vervaardiging van meel (geen zetmeel)\",\n  \"1062\": \"Vervaardiging van zetmeel en zetmeelproducten\",\n  \"107\": \"Vervaardiging van brood, vers banketbakkerswerk en deegwaren\",\n  \"1071\": \"Vervaardiging van brood en vers banketbakkerswerk\",\n  \"1072\": \"Vervaardiging van beschuit en koekjes en van ander houdbaar banketbakkerswerk\",\n  \"1073\": \"Vervaardiging van deegwaren\",\n  \"108\": \"Vervaardiging van overige voedingsmiddelen\",\n  \"1081\": \"Vervaardiging van suiker\",\n  \"1082\": \"Verwerking van cacao en vervaardiging van chocolade en suikerwerk\",\n  \"10821\": \"Verwerking van cacao\",\n  \"10822\": \"Vervaardiging van chocolade en suikerwerk\",\n  \"1083\": \"Verwerking van koffie en thee\",\n  \"1084\": \"Vervaardiging van specerijen, sauzen en kruiderijen; zoutraffinage\",\n  \"1085\": \"Vervaardiging van kant-en-klaarmaaltijden en snacks\",\n  \"1086\": \"Vervaardiging van gehomogeniseerde voedingspreparaten en dieetvoeding\",\n  \"1089\": \"Vervaardiging van overige voedingsmiddelen (rest)\",\n  \"109\": \"Vervaardiging van diervoeders\",\n  \"1091\": \"Vervaardiging van veevoeders\",\n  \"1092\": \"Vervaardiging van voeders voor huisdieren\",\n  \"11\": \"Vervaardiging van dranken\",\n  \"110\": \"Vervaardiging van dranken\",\n  \"1101\": \"Vervaardiging van sterk alcoholische dranken door distilleren, rectificeren en mengen\",\n  \"1102\": \"Vervaardiging van wijn uit druiven\",\n  \"1103\": \"Vervaardiging van cider en van overige vruchtenwijnen\",\n  \"1104\": \"Vervaardiging van overige niet-gedistilleerde gegiste dranken\",\n  \"1105\": \"Vervaardiging van bier\",\n  \"1106\": \"Mouterijen\",\n  \"1107\": \"Vervaardiging van frisdranken; productie van mineraalwater en overig gebotteld water\",\n  \"12\": \"Vervaardiging van tabaksproducten\",\n  \"120\": \"Vervaardiging van tabaksproducten\",\n  \"1200\": \"Vervaardiging van tabaksproducten\",\n  \"13\": \"Vervaardiging van textiel\",\n  \"131\": \"Bewerken en spinnen van textielvezels\",\n  \"1310\": \"Bewerken en spinnen van textielvezels\",\n  \"132\": \"Weven van textiel\",\n  \"1320\": \"Weven van textiel\",\n  \"133\": \"Textielveredeling\",\n  \"1330\": \"Textielveredeling\",\n  \"139\": \"Vervaardiging van overige textielproducten\",\n  \"1391\": \"Vervaardiging van gebreide en gehaakte stoffen\",\n  \"1392\": \"Vervaardiging van geconfectioneerde artikelen van textiel (geen kleding)\",\n  \"1393\": \"Vervaardiging van vloerkleden en tapijt\",\n  \"1394\": \"Vervaardiging van koord, bindgaren, touw en netten\",\n  \"1395\": \"Vervaardiging van gebonden textielvlies en artikelen daarvan (geen kleding)\",\n  \"1396\": \"Vervaardiging van technisch en industrieel textiel\",\n  \"1399\": \"Vervaardiging van overige textielproducten (rest)\",\n  \"14\": \"Vervaardiging van kleding\",\n  \"141\": \"Vervaardiging van kleding (geen bontkleding)\",\n  \"1411\": \"Vervaardiging van kleding van leer\",\n  \"1412\": \"Vervaardiging van werkkleding\",\n  \"1413\": \"Vervaardiging van overige bovenkleding\",\n  \"1414\": \"Vervaardiging van onderkleding\",\n  \"1419\": \"Vervaardiging van overige baby- en sportkleding en kledingaccessoires\",\n  \"142\": \"Vervaardiging van artikelen van bont\",\n  \"1420\": \"Vervaardiging van artikelen van bont\",\n  \"143\": \"Vervaardiging van gebreide en gehaakte kleding\",\n  \"1431\": \"Vervaardiging van gebreide en gehaakte kousen en sokken\",\n  \"1439\": \"Vervaardiging van gebreide en gehaakte kleding (geen kousen en sokken)\",\n  \"15\": \"Vervaardiging van leer, lederwaren en schoenen\",\n  \"151\": \"Looien en bewerken van leer; vervaardiging van koffers, tassen, zadel- en tuigmakerswerk; bereiden en verven van bont\",\n  \"1511\": \"Looien en bereiden van leer; bereiden en verven van bont\",\n  \"1512\": \"Vervaardiging van koffers, tassen en dergelijke en van zadel- en tuigmakerswerk\",\n  \"152\": \"Vervaardiging van schoenen\",\n  \"1520\": \"Vervaardiging van schoenen\",\n  \"16\": \"Primaire houtbewerking en vervaardiging van artikelen van hout, kurk, riet en vlechtwerk (geen meubels)\",\n  \"161\": \"Primaire houtbewerking en verduurzamen van hout\",\n  \"1610\": \"Primaire houtbewerking en verduurzamen van hout\",\n  \"16101\": \"Zagen en schaven en overige primaire houtbewerking\",\n  \"16102\": \"Verduurzamen van hout\",\n  \"162\": \"Vervaardiging van artikelen van hout, kurk, riet en vlechtwerk (geen meubels)\",\n  \"1621\": \"Vervaardiging van fineer en plaatmateriaal op basis van hout\",\n  \"1622\": \"Vervaardiging van panelen voor parketvloeren\",\n  \"1623\": \"Vervaardiging van overig timmerwerk voor de bouw\",\n  \"16231\": \"Vervaardiging van deuren, ramen en kozijnen van hout\",\n  \"16239\": \"Vervaardiging van overige timmerwerk voor de bouw (geen deuren, ramen en kozijnen)\",\n  \"1624\": \"Vervaardiging van houten emballage\",\n  \"1629\": \"Vervaardiging van overige artikelen van hout en van artikelen van kurk, riet en vlechtwerk (geen meubels)\",\n  \"17\": \"Vervaardiging van papier, karton en papier- en kartonwaren\",\n  \"171\": \"Vervaardiging van papierpulp, papier en karton\",\n  \"1711\": \"Vervaardiging van papierpulp\",\n  \"1712\": \"Vervaardiging van papier en karton\",\n  \"17121\": \"Vervaardiging van grafisch papier en karton\",\n  \"17122\": \"Vervaardiging van papier en karton voor verpakking\",\n  \"17129\": \"Vervaardiging van papier en karton (geen grafisch en niet voor verpakking)\",\n  \"172\": \"Vervaardiging van papier- en kartonwaren\",\n  \"1721\": \"Vervaardiging van verpakkingsmiddelen van papier en karton; vervaardiging van golfpapier en -karton\",\n  \"17211\": \"Vervaardiging van verpakkingsmiddelen van papier en karton\",\n  \"17212\": \"Vervaardiging van golfpapier en -karton\",\n  \"1722\": \"Vervaardiging van huishoudelijke en sanitaire papierwaren\",\n  \"1723\": \"Vervaardiging van kantoorbenodigdheden van papier\",\n  \"1724\": \"Vervaardiging van behangselpapier\",\n  \"1729\": \"Vervaardiging van overige papier- en kartonwaren\",\n  \"18\": \"Drukkerijen, reproductie van opgenomen media\",\n  \"181\": \"Drukkerijen en dienstverlening voor drukkerijen\",\n  \"1811\": \"Drukkerijen van dagbladen\",\n  \"1812\": \"Overige drukkerijen\",\n  \"18121\": \"Drukkerijen van boeken e.d.\",\n  \"18122\": \"Drukkerijen van tijdschriften\",\n  \"18123\": \"Drukkerijen van reclame\",\n  \"18124\": \"Drukkerijen van verpakkingen\",\n  \"18125\": \"Drukkerijen van formulieren\",\n  \"18129\": \"Overige drukkerijen (rest)\",\n  \"1813\": \"Prepress- en premedia-activiteiten\",\n  \"1814\": \"Grafische afwerking en overige activiteiten verwant aan de drukkerij\",\n  \"182\": \"Reproductie van opgenomen media\",\n  \"1820\": \"Reproductie van opgenomen media\",\n  \"19\": \"Vervaardiging van cokesovenproducten en aardolieverwerking\",\n  \"191\": \"Vervaardiging van cokesovenproducten\",\n  \"1910\": \"Vervaardiging van cokesovenproducten\",\n  \"192\": \"Aardolieverwerking\",\n  \"1920\": \"Aardolieverwerking\",\n  \"19201\": \"Aardolieraffinage\",\n  \"19202\": \"Aardolieverwerking (geen -raffinage)\",\n  \"20\": \"Vervaardiging van chemische producten\",\n  \"201\": \"Vervaardiging van chemische basisproducten, kunstmeststoffen en stikstofverbindingen en van kunststof en synthetische rubber in primaire vorm\",\n  \"2011\": \"Vervaardiging van industriële gassen\",\n  \"2012\": \"Vervaardiging van kleur- en verfstoffen\",\n  \"2013\": \"Vervaardiging van overige anorganische basischemicaliën\",\n  \"2014\": \"Vervaardiging van overige organische basischemicaliën\",\n  \"20141\": \"Vervaardiging van petrochemische producten\",\n  \"20149\": \"Vervaardiging van organische basischemicaliën (geen petrochemische producten)\",\n  \"2015\": \"Vervaardiging van meststoffen en stikstofverbindingen\",\n  \"2016\": \"Vervaardiging van kunststof in primaire vorm\",\n  \"2017\": \"Vervaardiging van synthetische rubber in primaire vorm\",\n  \"202\": \"Vervaardiging van verdelgingsmiddelen en overige landbouwchemicaliën\",\n  \"2020\": \"Vervaardiging van verdelgingsmiddelen en overige landbouwchemicaliën\",\n  \"203\": \"Vervaardiging van verf, vernis e.d., drukinkt en mastiek\",\n  \"2030\": \"Vervaardiging van verf, vernis e.d., drukinkt en mastiek\",\n  \"204\": \"Vervaardiging van zeep, wasmiddelen, poets- en reinigingsmiddelen, parfums en cosmetica\",\n  \"2041\": \"Vervaardiging van zeep en wasmiddelen, poets- en reinigingsmiddelen\",\n  \"2042\": \"Vervaardiging van parfums en cosmetica\",\n  \"205\": \"Vervaardiging van overige chemische producten\",\n  \"2051\": \"Vervaardiging van kruit en springstoffen en van lucifers\",\n  \"2052\": \"Vervaardiging van lijm en bereide kleefmiddelen\",\n  \"2053\": \"Vervaardiging van etherische oliën\",\n  \"2059\": \"Vervaardiging van overige chemische producten (rest)\",\n  \"206\": \"Vervaardiging van synthetische en kunstmatige vezels\",\n  \"2060\": \"Vervaardiging van synthetische en kunstmatige vezels\",\n  \"21\": \"Vervaardiging van farmaceutische grondstoffen en producten\",\n  \"211\": \"Vervaardiging van farmaceutische grondstoffen\",\n  \"2110\": \"Vervaardiging van farmaceutische grondstoffen\",\n  \"212\": \"Vervaardiging van farmaceutische producten (geen grondstoffen)\",\n  \"2120\": \"Vervaardiging van farmaceutische producten (geen grondstoffen)\",\n  \"22\": \"Vervaardiging van producten van rubber en kunststof\",\n  \"221\": \"Vervaardiging van producten van rubber\",\n  \"2211\": \"Vervaardiging van rubberbanden en loopvlakvernieuwing\",\n  \"2219\": \"Vervaardiging van producten van rubber (geen banden)\",\n  \"222\": \"Vervaardiging van producten van kunststof\",\n  \"2221\": \"Vervaardiging van platen, folie, buizen en profielen van kunststof\",\n  \"2222\": \"Vervaardiging van verpakkingsmiddelen van kunststof\",\n  \"2223\": \"Vervaardiging van kunststofproducten voor de bouw\",\n  \"2229\": \"Vervaardiging van overige producten van kunststof\",\n  \"23\": \"Vervaardiging van overige niet-metaalhoudende minerale producten\",\n  \"231\": \"Vervaardiging van glas en glaswerk\",\n  \"2311\": \"Vervaardiging van vlakglas\",\n  \"2312\": \"Vormen en bewerken van vlakglas\",\n  \"2313\": \"Vervaardiging van holglas\",\n  \"2314\": \"Vervaardiging van glasvezels\",\n  \"2319\": \"Vervaardiging en bewerking van overig glas, inclusief technisch glaswerk\",\n  \"232\": \"Vervaardiging van vuurvaste keramische producten\",\n  \"2320\": \"Vervaardiging van vuurvaste keramische producten\",\n  \"233\": \"Vervaardiging van producten van klei voor de bouw\",\n  \"2331\": \"Vervaardiging van keramische tegels en plavuizen\",\n  \"2332\": \"Vervaardiging van producten van klei voor de bouw (geen tegels en plavuizen)\",\n  \"234\": \"Vervaardiging van overige keramische producten\",\n  \"2341\": \"Vervaardiging van huishoudelijk en sieraardewerk\",\n  \"2342\": \"Vervaardiging van sanitair aardewerk\",\n  \"2343\": \"Vervaardiging van elektrische isolatoren en isolerende fittingen van keramische stoffen\",\n  \"2344\": \"Vervaardiging van overig technisch aardewerk\",\n  \"2349\": \"Vervaardiging van overige keramische producten (rest)\",\n  \"235\": \"Vervaardiging van cement, kalk en gips\",\n  \"2351\": \"Vervaardiging van cement\",\n  \"2352\": \"Vervaardiging van kalk en gips\",\n  \"236\": \"Vervaardiging van producten van beton, gips en cement\",\n  \"2361\": \"Vervaardiging van producten van beton voor de bouw en van kalkzandsteen\",\n  \"23611\": \"Vervaardiging van producten van beton voor de bouw\",\n  \"23612\": \"Vervaardiging van kalkzandsteen\",\n  \"2362\": \"Vervaardiging van producten van gips voor de bouw\",\n  \"2363\": \"Vervaardiging van stortklare beton\",\n  \"2364\": \"Vervaardiging van mortel in droge vorm\",\n  \"2365\": \"Vervaardiging van producten van vezelcement\",\n  \"2369\": \"Vervaardiging van overige producten van beton, gips en cement\",\n  \"237\": \"Natuursteenbewerking\",\n  \"2370\": \"Natuursteenbewerking\",\n  \"239\": \"Vervaardiging van overige niet-metaalhoudende minerale producten\",\n  \"2391\": \"Vervaardiging van schuur-, slijp- en polijstmiddelen\",\n  \"2399\": \"Vervaardiging van overige niet-metaalhoudende minerale producten (geen schuur-, slijp- en polijstmiddelen)\",\n  \"24\": \"Vervaardiging van metalen in primaire vorm\",\n  \"241\": \"Vervaardiging van ijzer en staal en van ferrolegeringen\",\n  \"2410\": \"Vervaardiging van ijzer en staal en van ferrolegeringen\",\n  \"242\": \"Vervaardiging van stalen buizen, pijpen, holle profielen en fittings daarvoor\",\n  \"2420\": \"Vervaardiging van stalen buizen, pijpen, holle profielen en fittings daarvoor\",\n  \"243\": \"Overige eerste verwerking van staal\",\n  \"2431\": \"Koudtrekken van staven\",\n  \"2432\": \"Koudwalsen van bandstaal\",\n  \"2433\": \"Koudvervormen en koudfelsen\",\n  \"2434\": \"Koudtrekken van draad\",\n  \"244\": \"Vervaardiging van edelmetalen en overige non-ferrometalen\",\n  \"2441\": \"Vervaardiging van edelmetalen\",\n  \"2442\": \"Vervaardiging van aluminium\",\n  \"2443\": \"Vervaardiging van lood, zink en tin\",\n  \"2444\": \"Vervaardiging van koper\",\n  \"2445\": \"Vervaardiging van overige non-ferrometalen\",\n  \"2446\": \"Smelten en raffineren van uranium\",\n  \"245\": \"Gieten van metalen\",\n  \"2451\": \"Gieten van ijzer\",\n  \"2452\": \"Gieten van staal\",\n  \"2453\": \"Gieten van lichte metalen\",\n  \"2454\": \"Gieten van overige non-ferrometalen\",\n  \"25\": \"Vervaardiging van producten van metaal (geen machines en apparaten)\",\n  \"251\": \"Vervaardiging van metalen producten voor de bouw\",\n  \"2511\": \"Vervaardiging van metalen constructiewerken en delen daarvan\",\n  \"2512\": \"Vervaardiging van metalen deuren, vensters en kozijnen\",\n  \"252\": \"Vervaardiging van reservoirs van metaal en van ketels en radiatoren voor centrale verwarming\",\n  \"2521\": \"Vervaardiging van ketels en radiatoren voor centrale verwarming\",\n  \"2529\": \"Vervaardiging van metalen tanks en reservoirs\",\n  \"253\": \"Vervaardiging van stoomketels (geen ketels voor centrale verwarming)\",\n  \"2530\": \"Vervaardiging van stoomketels (geen ketels voor centrale verwarming)\",\n  \"254\": \"Vervaardiging van wapens en munitie\",\n  \"2540\": \"Vervaardiging van wapens en munitie\",\n  \"255\": \"Smeden, persen, stampen en profielwalsen van metaal; poedermetallurgie\",\n  \"2550\": \"Smeden, persen, stampen en profielwalsen van metaal; poedermetallurgie\",\n  \"256\": \"Oppervlaktebehandeling en bekleding van metaal; algemene metaalbewerking\",\n  \"2561\": \"Oppervlaktebehandeling en bekleding van metaal\",\n  \"2562\": \"Algemene metaalbewerking\",\n  \"257\": \"Vervaardiging van scharen, messen en bestek, hang- en sluitwerk en gereedschap\",\n  \"2571\": \"Vervaardiging van scharen, messen en bestek\",\n  \"2572\": \"Vervaardiging van hang- en sluitwerk\",\n  \"2573\": \"Vervaardiging van gereedschap\",\n  \"259\": \"Vervaardiging van overige producten van metaal\",\n  \"2591\": \"Vervaardiging van stalen vaten e.d.\",\n  \"2592\": \"Vervaardiging van verpakkingsmiddelen van licht metaal\",\n  \"2593\": \"Vervaardiging van artikelen van draad en van kettingen en veren\",\n  \"2594\": \"Vervaardiging van bouten, schroeven en moeren\",\n  \"2599\": \"Vervaardiging van overige producten van metaal (rest)\",\n  \"26\": \"Vervaardiging van computers en van elektronische en optische apparatuur\",\n  \"261\": \"Vervaardiging van elektronische componenten en printplaten\",\n  \"2611\": \"Vervaardiging van elektronische componenten\",\n  \"2612\": \"Vervaardiging van elektronische printplaten\",\n  \"262\": \"Vervaardiging van computers en randapparatuur\",\n  \"2620\": \"Vervaardiging van computers en randapparatuur\",\n  \"263\": \"Vervaardiging van communicatieapparatuur\",\n  \"2630\": \"Vervaardiging van communicatieapparatuur\",\n  \"264\": \"Vervaardiging van consumentenelektronica\",\n  \"2640\": \"Vervaardiging van consumentenelektronica\",\n  \"265\": \"Vervaardiging van meet-, regel-, navigatie- en controleapparatuur en van uurwerken\",\n  \"2651\": \"Vervaardiging van meet-, regel-, navigatie- en controleapparatuur\",\n  \"2652\": \"Vervaardiging van uurwerken\",\n  \"266\": \"Vervaardiging van bestralingsapparatuur en van elektromedische en elektrotherapeutische apparatuur\",\n  \"2660\": \"Vervaardiging van bestralingsapparatuur en van elektromedische en elektrotherapeutische apparatuur\",\n  \"267\": \"Vervaardiging van optische instrumenten en apparatuur\",\n  \"2670\": \"Vervaardiging van optische instrumenten en apparatuur\",\n  \"268\": \"Vervaardiging van informatiedragers\",\n  \"2680\": \"Vervaardiging van informatiedragers\",\n  \"27\": \"Vervaardiging van elektrische apparatuur\",\n  \"271\": \"Vervaardiging van elektromotoren, elektrische generatoren en transformatoren en van schakel- en verdeelinrichtingen\",\n  \"2711\": \"Vervaardiging van elektromotoren, elektrische generatoren en transformatoren\",\n  \"2712\": \"Vervaardiging van schakel- en verdeelinrichtingen\",\n  \"272\": \"Vervaardiging van batterijen en accumulatoren\",\n  \"2720\": \"Vervaardiging van batterijen en accumulatoren\",\n  \"273\": \"Vervaardiging van elektrische en elektronische kabels en van schakelaars, stekkers, stopcontacten e.d.\",\n  \"2731\": \"Vervaardiging van kabels van optische vezels\",\n  \"2732\": \"Vervaardiging van overige elektrische en elektronische kabel\",\n  \"2733\": \"Vervaardiging van schakelaars, stekkers, stopcontacten e.d.\",\n  \"274\": \"Vervaardiging van elektrische lampen en verlichtingsapparaten\",\n  \"2740\": \"Vervaardiging van elektrische lampen en verlichtingsapparaten\",\n  \"275\": \"Vervaardiging van huishoudapparaten\",\n  \"2751\": \"Vervaardiging van elektrische huishoudapparaten\",\n  \"2752\": \"Vervaardiging van niet-elektrische huishoudapparaten\",\n  \"279\": \"Vervaardiging van overige elektrische apparatuur\",\n  \"2790\": \"Vervaardiging van overige elektrische apparatuur\",\n  \"28\": \"Vervaardiging van overige machines en apparaten\",\n  \"281\": \"Vervaardiging van motoren, turbines, pompen, compressoren, appendages en drijfwerkelementen\",\n  \"2811\": \"Vervaardiging van motoren en turbines (niet voor vliegtuigen, motorvoertuigen en bromfietsen)\",\n  \"2812\": \"Vervaardiging van hydraulische apparatuur\",\n  \"2813\": \"Vervaardiging van niet-hydraulische pompen en compressoren\",\n  \"2814\": \"Vervaardiging van appendages\",\n  \"2815\": \"Vervaardiging van tandwielen, lagers en overige drijfwerkelementen\",\n  \"282\": \"Vervaardiging van overige machines en apparaten voor algemeen gebruik\",\n  \"2821\": \"Vervaardiging van industriële ovens en branders\",\n  \"2822\": \"Vervaardiging van hijs-, hef- en transportwerktuigen\",\n  \"2823\": \"Vervaardiging van kantoormachines en -apparatuur (geen computers en randapparatuur)\",\n  \"2824\": \"Vervaardiging van pneumatisch en elektrisch handgereedschap\",\n  \"2825\": \"Vervaardiging van machines en apparaten voor industriële koeltechniek en klimaatregeling\",\n  \"2829\": \"Vervaardiging van overige machines en apparaten voor algemeen gebruik (rest)\",\n  \"283\": \"Vervaardiging van machines en werktuigen voor de land- en bosbouw\",\n  \"2830\": \"Vervaardiging van machines en werktuigen voor de land- en bosbouw\",\n  \"284\": \"Vervaardiging van gereedschapswerktuigen\",\n  \"2841\": \"Vervaardiging van gereedschapswerktuigen voor metaalbewerking\",\n  \"2849\": \"Vervaardiging van gereedschapswerktuigen niet voor metaalbewerking\",\n  \"289\": \"Vervaardiging van overige machines, apparaten en werktuigen voor specifieke doeleinden\",\n  \"2891\": \"Vervaardiging van machines voor de metallurgie\",\n  \"2892\": \"Vervaardiging van machines voor de bouw en winning van delfstoffen\",\n  \"2893\": \"Vervaardiging van machines voor de productie van voedings- en genotmiddelen\",\n  \"2894\": \"Vervaardiging van machines voor de productie van textiel, kleding en leer\",\n  \"2895\": \"Vervaardiging van machines voor de productie van papier en karton\",\n  \"2896\": \"Vervaardiging van machines voor de kunststof- en rubberindustrie\",\n  \"2899\": \"Vervaardiging van overige machines, apparaten en werktuigen voor specifieke doeleinden (rest)\",\n  \"29\": \"Vervaardiging van auto's, aanhangwagens en opleggers\",\n  \"291\": \"Vervaardiging van auto's\",\n  \"2910\": \"Vervaardiging van auto's\",\n  \"292\": \"Carrosseriebouw; vervaardiging van aanhangwagens en opleggers\",\n  \"2920\": \"Carrosseriebouw; vervaardiging van aanhangwagens en opleggers\",\n  \"29201\": \"Carrosseriebouw\",\n  \"29202\": \"Vervaardiging van aanhangwagens en opleggers\",\n  \"293\": \"Vervaardiging van onderdelen en toebehoren voor auto's\",\n  \"2931\": \"Vervaardiging van elektrische en elektronische onderdelen en toebehoren voor auto's\",\n  \"2932\": \"Vervaardiging van niet-elektrische en -elektronische onderdelen en toebehoren voor auto's\",\n  \"30\": \"Vervaardiging van overige transportmiddelen\",\n  \"301\": \"Scheepsbouw\",\n  \"3011\": \"Bouw van schepen en drijvend materieel (geen sport- en recreatievaartuigen)\",\n  \"3012\": \"Bouw van sport- en recreatievaartuigen\",\n  \"302\": \"Vervaardiging van rollend spoor- en tramwegmaterieel\",\n  \"3020\": \"Vervaardiging van rollend spoor- en tramwegmaterieel\",\n  \"303\": \"Vervaardiging van vliegtuigen en onderdelen daarvoor\",\n  \"3030\": \"Vervaardiging van vliegtuigen en onderdelen daarvoor\",\n  \"304\": \"Vervaardiging van militaire gevechtsvoertuigen\",\n  \"3040\": \"Vervaardiging van militaire gevechtsvoertuigen\",\n  \"309\": \"Vervaardiging van transportmiddelen (rest)\",\n  \"3091\": \"Vervaardiging van motor- en bromfietsen\",\n  \"3092\": \"Vervaardiging van fietsen en invalidenwagens\",\n  \"3099\": \"Vervaardiging van overige transportmiddelen (rest)\",\n  \"31\": \"Vervaardiging van meubels\",\n  \"310\": \"Vervaardiging van meubels\",\n  \"3101\": \"Interieurbouw en vervaardiging van bedrijfsmeubels\",\n  \"31011\": \"Interieurbouw\",\n  \"31012\": \"Vervaardiging van bedrijfsmeubels\",\n  \"3102\": \"Vervaardiging van keukenmeubels\",\n  \"3103\": \"Vervaardiging van matrassen\",\n  \"3109\": \"Vervaardiging van overige meubels\",\n  \"32\": \"Vervaardiging van overige goederen\",\n  \"321\": \"Slaan van munten; bewerken van edelstenen en vervaardiging van sieraden e.d.\",\n  \"3211\": \"Slaan van munten en medailles\",\n  \"3212\": \"Bewerken van edelstenen en vervaardiging van sieraden e.d. (geen imitatie)\",\n  \"3213\": \"Vervaardiging van imitatiesieraden\",\n  \"322\": \"Vervaardiging van muziekinstrumenten\",\n  \"3220\": \"Vervaardiging van muziekinstrumenten\",\n  \"323\": \"Vervaardiging van sportartikelen\",\n  \"3230\": \"Vervaardiging van sportartikelen\",\n  \"324\": \"Vervaardiging van spellen en speelgoed\",\n  \"3240\": \"Vervaardiging van spellen en speelgoed\",\n  \"325\": \"Vervaardiging van medische instrumenten en hulpmiddelen\",\n  \"3250\": \"Vervaardiging van medische instrumenten en hulpmiddelen\",\n  \"32501\": \"Tandtechnische bedrijven\",\n  \"32502\": \"Vervaardiging van medische instrumenten en hulpmiddelen (geen tandtechniek)\",\n  \"329\": \"Vervaardiging van overige goederen\",\n  \"3291\": \"Vervaardiging van borstelwaren\",\n  \"3299\": \"Sociale werkvoorziening en vervaardiging van overige goederen (rest)\",\n  \"32991\": \"Sociale werkvoorziening\",\n  \"32999\": \"Vervaardiging van overige goederen (rest)\",\n  \"33\": \"Reparatie en installatie van machines en apparaten\",\n  \"331\": \"Reparatie van producten van metaal, machines en apparatuur\",\n  \"3311\": \"Reparatie van producten van metaal\",\n  \"3312\": \"Reparatie en onderhoud van machines\",\n  \"33121\": \"Reparatie en onderhoud van machines voor algemeen gebruik en machineonderdelen (geen gereedschap)\",\n  \"33122\": \"Reparatie en onderhoud van pneumatisch en elektrisch gereedschap en gereedschapswerktuigen\",\n  \"33123\": \"Reparatie en onderhoud van machines voor een specifieke bedrijfstak\",\n  \"3313\": \"Reparatie en onderhoud van elektronische en optische apparatuur\",\n  \"3314\": \"Reparatie van elektrische apparatuur\",\n  \"3315\": \"Reparatie en onderhoud van schepen\",\n  \"3316\": \"Reparatie en onderhoud van vliegtuigen\",\n  \"3317\": \"Reparatie en onderhoud van overige transportmiddelen\",\n  \"3319\": \"Reparatie en onderhoud van overige toebehoren\",\n  \"332\": \"Installatie van industriële machines en apparatuur\",\n  \"3321\": \"Installatie van ketels en tanks\",\n  \"3322\": \"Installatie van industriële machines\",\n  \"33221\": \"Installatie van machines voor algemeen gebruik (geen gereedschap)\",\n  \"33222\": \"Installatie van pneumatisch en elektrisch gereedschap en gereedschapswerktuigen\",\n  \"33223\": \"Installatie van machines voor een specifieke bedrijfstak\",\n  \"3323\": \"Installatie van elektronische en optische apparatuur\",\n  \"3324\": \"Installatie van elektrische apparatuur\",\n  \"3329\": \"Installatie van overige toebehoren\",\n  // D - Productie en distributie van en handel in elektriciteit, aardgas, stoom en gekoelde lucht\n  \"35\": \"Productie en distributie van en handel in elektriciteit, aardgas, stoom en gekoelde lucht\",\n  \"351\": \"Productie van elektriciteit, transmissie en distributie van elektriciteit en aardgas\",\n  \"3511\": \"Productie van elektriciteit\",\n  \"35111\": \"Productie van elektriciteit door thermische en nucleaire installaties\",\n  \"35112\": \"Productie van elektriciteit door windenergie\",\n  \"35113\": \"Productie van elektriciteit door zonnecellen en waterkracht\",\n  \"3512\": \"Beheer en exploitatie van transportnetten voor elektriciteit, aardgas en warm water\",\n  \"3513\": \"Distributie van elektriciteit en gasvormige brandstoffen via leidingen\",\n  \"3514\": \"Handel in elektriciteit en in gas via leidingen\",\n  \"352\": \"Productie van biogas\",\n  \"3520\": \"Productie van biogas\",\n  \"353\": \"Productie en distributie van stoom, warm water en gekoelde lucht\",\n  \"3530\": \"Productie en distributie van stoom, warm water en gekoelde lucht\",\n  // E - Winning en distributie van water; afval- en afvalwaterbeheer en sanering\n  \"36\": \"Winning en distributie van water\",\n  \"360\": \"Winning en distributie van water\",\n  \"3600\": \"Winning en distributie van water\",\n  \"37\": \"Afvalwaterinzameling en -behandeling\",\n  \"370\": \"Afvalwaterinzameling en -behandeling\",\n  \"3700\": \"Afvalwaterinzameling en -behandeling\",\n  \"38\": \"Afvalinzameling en -behandeling; voorbereiding tot recycling\",\n  \"381\": \"Inzameling van afval\",\n  \"3811\": \"Inzameling van onschadelijk afval\",\n  \"3812\": \"Inzameling van schadelijk afval\",\n  \"382\": \"Behandeling van afval\",\n  \"3821\": \"Behandeling van onschadelijk afval\",\n  \"3822\": \"Behandeling van schadelijk afval\",\n  \"383\": \"Voorbereiding tot recycling\",\n  \"3831\": \"Sloop van schepen, witgoed, computers e.d.\",\n  \"3832\": \"Gesorteerd materiaal voorbereiden tot recycling\",\n  \"39\": \"Sanering en overig afvalbeheer\",\n  \"390\": \"Sanering en overig afvalbeheer\",\n  \"3900\": \"Sanering en overig afvalbeheer\",\n  // F - Bouwnijverheid\n  \"41\": \"Algemene burgerlijke en utiliteitsbouw en projectontwikkeling\",\n  \"411\": \"Projectontwikkeling\",\n  \"4110\": \"Projectontwikkeling\",\n  \"412\": \"Algemene burgerlijke en utiliteitsbouw\",\n  \"4120\": \"Algemene burgerlijke en utiliteitsbouw\",\n  \"42\": \"Grond-, water- en wegenbouw (geen grondverzet)\",\n  \"421\": \"Bouw van wegen, spoorwegen en kunstwerken\",\n  \"4211\": \"Wegenbouw en stratenmaken\",\n  \"42111\": \"Wegenbouw\",\n  \"42112\": \"Stratenmaken\",\n  \"4212\": \"Bouw van boven- en ondergrondse spoorwegen\",\n  \"4213\": \"Bouw van kunstwerken\",\n  \"422\": \"Leggen van kabels en buizen\",\n  \"4221\": \"Leggen van rioleringen, buizen en pijpleidingen; aanleg van bronbemaling\",\n  \"4222\": \"Leggen van elektriciteits- en telecommunicatiekabels\",\n  \"429\": \"Bouw van overige civieltechnische werken\",\n  \"4291\": \"Natte waterbouw\",\n  \"4299\": \"Bouw van overige civieltechnische werken (rest)\",\n  \"43\": \"Gespecialiseerde werkzaamheden in de bouw\",\n  \"431\": \"Slopen van gebouwen, grondverzet en proefboren\",\n  \"4311\": \"Slopen van bouwwerken\",\n  \"4312\": \"Grondverzet\",\n  \"4313\": \"Proefboren\",\n  \"432\": \"Bouwinstallatie\",\n  \"4321\": \"Elektrotechnische bouwinstallatie\",\n  \"4322\": \"Loodgieters- en fitterswerk; installatie van sanitair en van verwarmings- en luchtbehandelingsapparatuur\",\n  \"43221\": \"Loodgieters- en fitterswerk; installatie van sanitair\",\n  \"43222\": \"Installatie van verwarmings- en luchtbehandelingsapparatuur\",\n  \"4329\": \"Overige bouwinstallatie\",\n  \"433\": \"Afwerking van gebouwen\",\n  \"4331\": \"Stukadoren\",\n  \"4332\": \"Bouwtimmeren\",\n  \"4333\": \"Afwerken van vloeren en wanden\",\n  \"4334\": \"Schilderen en glaszetten\",\n  \"4339\": \"Overige afwerken van gebouwen\",\n  \"439\": \"Dakbouw en overige gespecialiseerde werkzaamheden in de bouw\",\n  \"4391\": \"Dakdekken en bouwen van dakconstructies\",\n  \"4399\": \"Overige gespecialiseerde werkzaamheden in de bouw\",\n  \"43991\": \"Heien en andere funderingswerkzaamheden\",\n  \"43992\": \"Vlechten van betonstaal\",\n  \"43993\": \"Metselen en voegen\",\n  \"43999\": \"Overige gespecialiseerde werkzaamheden in de bouw (rest)\",\n// G - Groot- en detailhandel; reparatie van auto's\n  \"45\": \"Handel in en reparatie van auto's, motorfietsen en aanhangers\",\n  \"451\": \"Handel in auto's en aanhangers, eventueel gecombineerd met reparatie\",\n  \"4511\": \"Handel in en reparatie van personenauto's en lichte bedrijfsauto's\",\n  \"45111\": \"Import van nieuwe personenauto's en lichte bedrijfsauto's\",\n  \"45112\": \"Handel in en reparatie van personenauto's en lichte bedrijfswagens (geen import van nieuwe)\",\n  \"4519\": \"Handel in en reparatie van zwaardere bedrijfsauto's, aanhangers en caravans\",\n  \"45191\": \"Import van nieuwe bedrijfsauto's\",\n  \"45192\": \"Handel in en reparatie van zwaardere bedrijfsauto's (geen import van nieuwe)\",\n  \"45193\": \"Handel in en reparatie van aanhangwagens en opleggers (geen caravans)\",\n  \"45194\": \"Handel in en reparatie van caravans\",\n  \"452\": \"Gespecialiseerde reparatie van auto's\",\n  \"4520\": \"Gespecialiseerde reparatie van auto's\",\n  \"45201\": \"Auto-onderdelenservicebedrijven\",\n  \"45202\": \"Bandenservicebedrijven\",\n  \"45203\": \"Reparatie van specifieke auto-onderdelen\",\n  \"45204\": \"Carrosserieherstel\",\n  \"45205\": \"Overige gespecialiseerde reparatie en slepen van auto's\",\n  \"453\": \"Handel in auto-onderdelen en -accessoires\",\n  \"4531\": \"Groothandel en handelsbemiddeling in auto-onderdelen en -accessoires\",\n  \"45311\": \"Groothandel en handelsbemiddeling in auto-onderdelen en accessoires (geen banden)\",\n  \"45312\": \"Groothandel en handelsbemiddeling in banden\",\n  \"4532\": \"Detailhandel in auto-onderdelen en accessoires\",\n  \"454\": \"Handel in en reparatie van motorfietsen en onderdelen daarvan\",\n  \"4540\": \"Handel in en reparatie van motorfietsen en onderdelen daarvan\",\n  \"45401\": \"Groothandel en handelsbemiddeling in motorfietsen en onderdelen daarvan\",\n  \"45402\": \"Detailhandel in en reparatie van motorfietsen en onderdelen daarvan\",\n  \"46\": \"Groothandel en handelsbemiddeling (niet in auto's en motorfietsen)\",\n  \"461\": \"Handelsbemiddeling\",\n  \"4611\": \"Handelsbemiddeling in landbouwproducten, levende dieren en grondstoffen voor textiel en voedingsmiddelen\",\n  \"4612\": \"Handelsbemiddeling in brandstoffen, ertsen, metalen en chemische producten\",\n  \"4613\": \"Handelsbemiddeling in hout, vlakglas, sanitair en bouwmaterialen\",\n  \"4614\": \"Handelsbemiddeling in machines, technische benodigdheden, schepen en vliegtuigen\",\n  \"4615\": \"Handelsbemiddeling in meubels, huishoudelijke artikelen en ijzerwaren\",\n  \"4616\": \"Handelsbemiddeling in textiel, kleding, schoeisel en lederwaren\",\n  \"4617\": \"Handelsbemiddeling in voedings- en genotmiddelen\",\n  \"4618\": \"Handelsbemiddeling gespecialiseerd in overige goederen\",\n  \"4619\": \"Niet-gespecialiseerde handelsbemiddeling\",\n  \"462\": \"Groothandel in landbouwproducten en levende dieren\",\n  \"4621\": \"Groothandel in granen, ruwe tabak, oliën, zaden en veevoer\",\n  \"46211\": \"Groothandel in granen\",\n  \"46212\": \"Groothandel in zaden, pootgoed en peulvruchten\",\n  \"46213\": \"Groothandel in hooi, stro en ruwvoeder\",\n  \"46214\": \"Groothandel in meng- en krachtvoeder\",\n  \"46215\": \"Groothandel in veevoeder (geen ruw-, meng- en krachtvoeder)\",\n  \"46216\": \"Groothandel in ruwe plantaardige en dierlijke oliën en vetten en oliehoudende grondstoffen\",\n  \"46217\": \"Groothandel in ruwe tabak\",\n  \"46218\": \"Groothandel in akkerbouwproducten en veevoeder algemeen assortiment\",\n  \"46219\": \"Groothandel in overige akkerbouwproducten\",\n  \"4622\": \"Groothandel in bloemen en planten\",\n  \"4623\": \"Groothandel in levende dieren\",\n  \"46231\": \"Groothandel in levend vee\",\n  \"46232\": \"Groothandel in huisdieren, siervissen, siervogels en wilde dieren\",\n  \"4624\": \"Groothandel in huiden, vellen, leer en halffabrikaten van leer\",\n  \"46241\": \"Groothandel in huiden en vellen\",\n  \"46242\": \"Groothandel in leer en halffabrikaten van leer\",\n  \"463\": \"Groothandel in voedings- en genotmiddelen\",\n  \"4631\": \"Groothandel in groenten en fruit en in consumptieaardappelen\",\n  \"46311\": \"Groothandel in groenten en fruit\",\n  \"46312\": \"Groothandel in consumptieaardappelen\",\n  \"4632\": \"Groothandel in vlees en vleeswaren en in wild en gevogelte (niet levend)\",\n  \"4633\": \"Groothandel in zuivelproducten spijsoliën en -vetten en eieren\",\n  \"46331\": \"Groothandel in zuivelproducten en spijsoliën en -vetten\",\n  \"46332\": \"Groothandel in eieren\",\n  \"4634\": \"Groothandel in dranken (geen zuivel)\",\n  \"4635\": \"Groothandel in tabaksproducten en rokersbenodigdheden\",\n  \"4636\": \"Groothandel in suiker, chocolade en suikerwerk\",\n  \"4637\": \"Groothandel in koffie, thee, cacao en specerijen (geen ruwe)\",\n  \"4638\": \"Groothandel in overige voedingsmiddelen en in overige grondstoffen en halffabrikaten voor de voedingsmiddelenindustrie\",\n  \"46381\": \"Groothandel in snacks\",\n  \"46382\": \"Groothandel in vis-, schaal- en weekdieren\",\n  \"46383\": \"Gespecialiseerde groothandel in overige voedings- en genotmiddelen (rest)\",\n  \"46384\": \"Groothandel in bakkerijgrondstoffen\",\n  \"46389\": \"Gespecialiseerde groothandel in overige grondstoffen en halffabrikaten voor de voedings- en genotmiddelenindustrie (rest)\",\n  \"4639\": \"Groothandel in voedings- en genotmiddelen algemeen assortiment\",\n  \"464\": \"Groothandel in consumentenartikelen (non-food)\",\n  \"4641\": \"Groothandel in kledingstoffen, fournituren en huishoudtextiel\",\n  \"46411\": \"Groothandel in kledingstoffen en fournituren\",\n  \"46412\": \"Groothandel in huishoudtextiel en beddengoed\",\n  \"4642\": \"Groothandel in kleding, schoenen en modeartikelen\",\n  \"46421\": \"Groothandel in bovenkleding\",\n  \"46422\": \"Groothandel in werkkleding\",\n  \"46423\": \"Groothandel in onderkleding\",\n  \"46424\": \"Groothandel in schoenen\",\n  \"46425\": \"Groothandel in modeartikelen\",\n  \"46429\": \"Groothandel in textielwaren algemeen assortiment\",\n  \"4643\": \"Groothandel in elektrische huishoudelijke apparatuur, audio- en videoapparatuur, fotografische en optische artikelen\",\n  \"46431\": \"Groothandel in witgoed\",\n  \"46432\": \"Groothandel in elektrische huishoudelijke apparatuur (geen witgoed, audio en video)\",\n  \"46433\": \"Groothandel in audio- en videoapparatuur\",\n  \"46434\": \"Groothandel in fotografische artikelen\",\n  \"46435\": \"Groothandel in beeld- en geluidsdragers\",\n  \"46436\": \"Groothandel in optische artikelen\",\n  \"4644\": \"Groothandel in glas, porselein en aardewerk en in reinigingsmiddelen\",\n  \"46441\": \"Groothandel in glas, porselein en aardewerk\",\n  \"46442\": \"Groothandel in was-, poets- en reinigingsmiddelen\",\n  \"4645\": \"Groothandel in parfums en cosmetica\",\n  \"4646\": \"Groothandel in farmaceutische producten, medische instrumenten en orthopedische artikelen\",\n  \"46461\": \"Groothandel in farmaceutische producten\",\n  \"46462\": \"Groothandel in medische en tandheelkundige instrumenten, verpleeg- en orthopedische artikelen en laboratoriumbenodigdheden\",\n  \"4647\": \"Groothandel in huismeubilair, woningtextiel, vloerbedekking en verlichting\",\n  \"46471\": \"Groothandel in huismeubilair\",\n  \"46472\": \"Groothandel in woningtextiel en vloerbedekking\",\n  \"46473\": \"Groothandel in verlichtingsartikelen\",\n  \"4648\": \"Groothandel in juweliersartikelen en uurwerken\",\n  \"4649\": \"Groothandel in overige consumentenartikelen (non-food)\",\n  \"46491\": \"Groothandel in fietsen en bromfietsen\",\n  \"46492\": \"Groothandel in watersportartikelen\",\n  \"46493\": \"Groothandel in kampeerartikelen (geen caravans)\",\n  \"46494\": \"Groothandel in speelgoed\",\n  \"46495\": \"Groothandel in muziekinstrumenten\",\n  \"46496\": \"Groothandel in sportartikelen (geen watersport)\",\n  \"46497\": \"Groothandel in papier- en kartonwaren (geen verpakkingsmateriaal)\",\n  \"46498\": \"Groothandel in boeken, tijdschriften en overig drukwerk\",\n  \"46499\": \"Groothandel in overige consumentenartikelen (non-food) (rest)\",\n  \"465\": \"Groothandel in ICT-apparatuur\",\n  \"4651\": \"Groothandel in computers, randapparatuur en software\",\n  \"4652\": \"Groothandel in elektronische en telecommunicatieapparatuur en bijbehorende onderdelen\",\n  \"466\": \"Groothandel in machines, apparaten en toebehoren voor industrie en handel\",\n  \"4661\": \"Groothandel in landbouwmachines, werktuigen en tractoren\",\n  \"4662\": \"Groothandel in gereedschapswerktuigen\",\n  \"4663\": \"Groothandel in machines voor de bouw\",\n  \"4664\": \"Groothandel in machines voor de textielindustrie en in naai- en breimachines\",\n  \"4665\": \"Groothandel in bedrijfsmeubels\",\n  \"4666\": \"Groothandel in kantoormachines (geen computers)\",\n  \"4668\": \"Groothandel in machines voor de grafische en voedings- en genotmiddelenindustrie\",\n  \"46681\": \"Groothandel in machines voor de grafische industrie\",\n  \"46682\": \"Groothandel in machines voor de voedings- en genotmiddelenindustrie\",\n  \"4669\": \"Groothandel in overige machines, apparaten en toebehoren voor industrie en handel\",\n  \"46691\": \"Groothandel in intern transportmaterieel\",\n  \"46692\": \"Groothandel in machines en apparaten voor warmte-, koel- en vriestechniek\",\n  \"46693\": \"Groothandel in verbrandingsmotoren, pompen en compressoren\",\n  \"46694\": \"Groothandel in appendages, technische toebehoren e.d.\",\n  \"46695\": \"Groothandel in meet- en regelapparaten\",\n  \"46696\": \"Groothandel in emballage\",\n  \"46697\": \"Groothandel in scheepsbenodigdheden en visserij-artikelen\",\n  \"46699\": \"Groothandel in overige machines, apparaten en toebehoren voor industrie en handel (rest)\",\n  \"467\": \"Overige gespecialiseerde groothandel\",\n  \"4671\": \"Groothandel in brandstoffen en overige minerale olieproducten\",\n  \"46711\": \"Groothandel in vaste brandstoffen\",\n  \"46712\": \"Groothandel in vloeibare en gasvormige brandstoffen\",\n  \"46713\": \"Groothandel in minerale olieproducten (geen brandstoffen)\",\n  \"4672\": \"Groothandel in metalen en metaalertsen\",\n  \"46721\": \"Groothandel in metaalertsen\",\n  \"46722\": \"Groothandel in ferrometalen en -halffabrikaten\",\n  \"46723\": \"Groothandel in non-ferrometalen en -halffabrikaten\",\n  \"4673\": \"Groothandel in hout, sanitair en overige bouwmaterialen\",\n  \"46731\": \"Groothandel in hout en plaatmateriaal\",\n  \"46732\": \"Groothandel in verf en verfwaren\",\n  \"46733\": \"Groothandel in behang\",\n  \"46734\": \"Groothandel in vlakglas\",\n  \"46735\": \"Groothandel in zand en grind\",\n  \"46736\": \"Groothandel in tegels en plavuizen\",\n  \"46737\": \"Groothandel in sanitaire artikelen en sanitair installatiemateriaal\",\n  \"46738\": \"Groothandel gespecialiseerd in overige bouwmaterialen\",\n  \"46739\": \"Groothandel in bouwmaterialen algemeen assortiment\",\n  \"4674\": \"Groothandel in ijzer- en metaalwaren en verwarmingsapparaten\",\n  \"46741\": \"Groothandel in ijzer- en metaalwaren\",\n  \"46742\": \"Groothandel in verwarmingsapparaten\",\n  \"4675\": \"Groothandel in chemische producten\",\n  \"46751\": \"Groothandel in chemische grondstoffen en chemicaliën voor industriële toepassing\",\n  \"46752\": \"Groothandel in bestrijdingsmiddelen en kunstmeststoffen\",\n  \"4676\": \"Groothandel in overige intermediaire producten\",\n  \"46761\": \"Groothandel in textielgrondstoffen en -halffabrikaten\",\n  \"46762\": \"Groothandel in papier en karton\",\n  \"46769\": \"Groothandel in overige intermediaire producten (rest)\",\n  \"4677\": \"Groothandel in afval en schroot\",\n  \"46771\": \"Groothandel in autosloopmateriaal\",\n  \"46772\": \"Groothandel in ijzer- en staalschroot en oude non-ferrometalen\",\n  \"46779\": \"Groothandel in overige oude materialen en afvalstoffen\",\n  \"469\": \"Niet-gespecialiseerde groothandel\",\n  \"4690\": \"Niet-gespecialiseerde groothandel\",\n  \"46901\": \"Niet-gespecialiseerde groothandel in consumentenartikelen\",\n  \"46902\": \"Niet-gespecialiseerde groothandel in niet-consumentenartikelen\",\n  \"47\": \"Detailhandel (niet in auto's)\",\n  \"471\": \"Supermarkten, warenhuizen en dergelijke winkels met een algemeen assortiment\",\n  \"4711\": \"Supermarkten en dergelijke winkels met een algemeen assortiment voedings- en genotmiddelen\",\n  \"4719\": \"Warenhuizen en dergelijke winkels met een algemeen assortiment non-food\",\n  \"47191\": \"Warenhuizen\",\n  \"47192\": \"Winkels met een algemeen assortiment non-food (geen warenhuizen)\",\n  \"472\": \"Gespecialiseerde winkels in voedings- en genotmiddelen\",\n  \"4721\": \"Winkels in aardappelen, groenten en fruit\",\n  \"4722\": \"Winkels in vlees en vleeswaren, wild en gevogelte\",\n  \"47221\": \"Winkels in vlees en vleeswaren\",\n  \"47222\": \"Winkels in wild en gevogelte\",\n  \"4723\": \"Winkels in vis\",\n  \"4724\": \"Winkels in brood, banket, chocolade en suikerwerk\",\n  \"47241\": \"Winkels in brood en banket\",\n  \"47242\": \"Winkels in chocolade en suikerwerk\",\n  \"4725\": \"Winkels in dranken\",\n  \"4726\": \"Winkels in tabaksproducten\",\n  \"4729\": \"Gespecialiseerde winkels in overige voedings- en genotmiddelen\",\n  \"47291\": \"Winkels in kaas\",\n  \"47292\": \"Winkels in natuurvoeding en reformartikelen\",\n  \"47293\": \"Winkels in buitenlandse voedingsmiddelen\",\n  \"47299\": \"Gespecialiseerde winkels in overige voedings- en genotmiddelen (rest)\",\n  \"473\": \"Benzinestations\",\n  \"4730\": \"Benzinestations\",\n  \"474\": \"Winkels in consumentenelektronica\",\n  \"4741\": \"Winkels in computers, randapparatuur en software\",\n  \"4742\": \"Winkels in telecommunicatieapparatuur\",\n  \"4743\": \"Winkels in audio- en videoapparatuur of in een algemeen assortiment van wit- en bruingoed\",\n  \"47431\": \"Winkels in audio- en videoapparatuur\",\n  \"47432\": \"Winkels in een algemeen assortiment van wit- en bruingoed\",\n  \"475\": \"Winkels in overige huishoudelijke artikelen\",\n  \"4751\": \"Winkels in kledingstoffen, huishoudtextiel en fournituren\",\n  \"47511\": \"Winkels in kledingstoffen\",\n  \"47512\": \"Winkels in huishoudtextiel\",\n  \"47513\": \"Winkels in breiwol, handwerken en fournituren\",\n  \"4752\": \"Winkels in doe-het-zelfartikelen\",\n  \"47521\": \"Winkels in ijzerwaren en gereedschappen\",\n  \"47522\": \"Winkels in verf, verfwaren en behang\",\n  \"47523\": \"Winkels in houten bouw- en tuinmaterialen\",\n  \"47524\": \"Winkels in tegels\",\n  \"47525\": \"Winkels in keukens\",\n  \"47526\": \"Winkels in parket-, laminaat- en kurkvloeren\",\n  \"47527\": \"Winkels gespecialiseerd in overige doe-het-zelfartikelen\",\n  \"47528\": \"Bouwmarkten en andere winkels in bouwmaterialen algemeen assortiment\",\n  \"4753\": \"Winkels in vloerbedekking en gordijnen\",\n  \"4754\": \"Winkels in elektrische huishoudelijke apparatuur en onderdelen daarvoor\",\n  \"47541\": \"Winkels in witgoed\",\n  \"47542\": \"Winkels in naai- en breimachines\",\n  \"47543\": \"Winkels in overige elektrische huishoudelijke apparatuur\",\n  \"47544\": \"Winkels in onderdelen voor elektrische huishoudelijke apparatuur\",\n  \"4759\": \"Winkels in meubels, verlichting en overige huishoudelijke artikelen (rest)\",\n  \"47591\": \"Winkels in meubels\",\n  \"47592\": \"Winkels in verlichtingsartikelen\",\n  \"47593\": \"Winkels in artikelen voor woninginrichting algemeen assortiment\",\n  \"47594\": \"Winkels in muziekinstrumenten\",\n  \"47595\": \"Winkels in glas-, porselein- en aardewerk\",\n  \"47596\": \"Winkels gespecialiseerd in overige huishoudelijke artikelen (rest)\",\n  \"47597\": \"Winkels in huishoudelijke artikelen algemeen assortiment\",\n  \"476\": \"Winkels in lectuur, sport- en kampeer- en recreatieartikelen\",\n  \"4761\": \"Winkels in boeken\",\n  \"4762\": \"Winkels in kranten, tijdschriften en kantoorbehoeften\",\n  \"4763\": \"Winkels in audio- en video-opnamen\",\n  \"4764\": \"Winkels in fietsen en bromfietsen, sport- en kampeerartikelen en boten\",\n  \"47641\": \"Winkels in fietsen en bromfietsen\",\n  \"47642\": \"Winkels in watersportartikelen\",\n  \"47643\": \"Winkels in sportartikelen (geen watersport)\",\n  \"47644\": \"Winkels in kampeerartikelen (geen caravans)\",\n  \"4765\": \"Winkels in speelgoed\",\n  \"477\": \"Winkels in overige artikelen\",\n  \"4771\": \"Winkels in kleding en modeartikelen; textielsupermarkten\",\n  \"47711\": \"Winkels in herenkleding\",\n  \"47712\": \"Winkels in dameskleding\",\n  \"47713\": \"Winkels in bovenkleding en modeartikelen (algemeen assortiment)\",\n  \"47714\": \"Winkels in baby- en kinderkleding\",\n  \"47715\": \"Winkels in babyartikelen algemeen assortiment\",\n  \"47716\": \"Winkels in onderkleding, lingerie e.d.\",\n  \"47717\": \"Winkels in modeartikelen\",\n  \"47718\": \"Textielsupermarkten\",\n  \"4772\": \"Winkels in schoenen en lederwaren\",\n  \"47721\": \"Winkels in schoenen\",\n  \"47722\": \"Winkels in lederwaren en reisartikelen\",\n  \"4773\": \"Apotheken\",\n  \"4774\": \"Winkels in drogisterij-, medische en orthopedische artikelen\",\n  \"47741\": \"Winkels in drogisterij-artikelen\",\n  \"47742\": \"Winkels in medische en orthopedische artikelen\",\n  \"4775\": \"Winkels in parfums en cosmetica\",\n  \"4776\": \"Winkels in bloemen, planten, zaden, tuinbenodigdheden, huisdieren en dierbenodigdheden\",\n  \"47761\": \"Winkels in bloemen en planten, zaden en tuinbenodigdheden\",\n  \"47762\": \"Tuincentra\",\n  \"47763\": \"Winkels in dieren, dierbenodigdheden en hengelsportartikelen\",\n  \"4777\": \"Winkels in juweliersartikelen en uurwerken\",\n  \"4778\": \"Winkels in overige artikelen (rest)\",\n  \"47781\": \"Winkels in fotografische artikelen\",\n  \"47782\": \"Winkels in optische artikelen\",\n  \"47783\": \"Winkels in schilderijen, lijsten, prenten, kunstvoorwerpen en religieuze artikelen\",\n  \"47789\": \"Winkels gespecialiseerd in overige artikelen (rest)\",\n  \"4779\": \"Winkels in antiek en tweedehands goederen\",\n  \"47791\": \"Winkels in antiek\",\n  \"47792\": \"Winkels in tweedehands kleding\",\n  \"47793\": \"Winkels in tweedehands goederen (geen kleding)\",\n  \"478\": \"Markthandel\",\n  \"4781\": \"Markthandel in voedings- en genotmiddelen\",\n  \"47811\": \"Markthandel in aardappelen, groenten en fruit\",\n  \"47819\": \"Markthandel in overige voedings- en genotmiddelen\",\n  \"4782\": \"Markthandel in textiel, kleding en schoenen\",\n  \"4789\": \"Markthandel in non-food artikelen (geen textiel, kleding en schoenen)\",\n  \"47891\": \"Markthandel in bloemen, planten, zaden en tuinbenodigdheden\",\n  \"47892\": \"Markthandel in tweedehands goederen\",\n  \"47899\": \"Markthandel in overige goederen\",\n  \"479\": \"Detailhandel niet via winkel of markt\",\n  \"4791\": \"Detailhandel via postorder en internet\",\n  \"47911\": \"Detailhandel via postorder en internet in voedingsmiddelen en drogisterijwaren\",\n  \"47912\": \"Detailhandel via postorder en internet in consumentenelektronica\",\n  \"47913\": \"Detailhandel via postorder en internet in boeken, tijdschriften, cd's, dvd's\",\n  \"47914\": \"Detailhandel via postorder en internet in kleding en modeartikelen\",\n  \"47915\": \"Detailhandel via postorder en internet in huis- en tuinartikelen\",\n  \"47916\": \"Detailhandel via postorder en internet in vrijetijdsartikelen\",\n  \"47918\": \"Detailhandel via postorder en internet in overige non-food\",\n  \"47919\": \"Detailhandel via postorder en internet in een algemeen assortiment non-food\",\n  \"4799\": \"Colportage, straathandel en detailhandel via overige distributievormen\",\n  \"47991\": \"Colportage\",\n  \"47992\": \"Straathandel\",\n  \"47999\": \"Detailhandel via overige distributievormen\",\n  // H - Vervoer en opslag\n  \"49\": \"Vervoer over land\",\n  \"491\": \"Personenvervoer per spoor (geen tram of metro)\",\n  \"4910\": \"Personenvervoer per spoor (geen tram of metro)\",\n  \"492\": \"Goederenvervoer per spoor\",\n  \"4920\": \"Goederenvervoer per spoor\",\n  \"493\": \"Personenvervoer over de weg\",\n  \"4931\": \"Openbaar vervoer binnen steden\",\n  \"4932\": \"Vervoer per taxi\",\n  \"4939\": \"Overig personenvervoer over de weg\",\n  \"49391\": \"Ongeregeld personenvervoer over de weg\",\n  \"49392\": \"Openbaar interlokaal personenvervoer over de weg\",\n  \"49393\": \"Geregeld besloten personenvervoer over de weg\",\n  \"494\": \"Goederenvervoer over de weg\",\n  \"4941\": \"Goederenvervoer over de weg (geen verhuizingen)\",\n  \"4942\": \"Verhuisvervoer\",\n  \"495\": \"Transport via pijpleidingen\",\n  \"4950\": \"Transport via pijpleidingen\",\n  \"50\": \"Vervoer over water\",\n  \"501\": \"Zee- en kustvaart (passagiersvaart en veerdienst)\",\n  \"5010\": \"Zee- en kustvaart (passagiersvaart en veerdienst)\",\n  \"502\": \"Zee- en kustvaart (vracht-, tank- en sleepvaart)\",\n  \"5020\": \"Zee- en kustvaart (vracht-, tank- en sleepvaart)\",\n  \"50201\": \"Zee- en kustvaart (vracht- en tankvaart; geen sleepvaart)\",\n  \"50202\": \"Zee- en kustsleepvaart\",\n  \"503\": \"Binnenvaart (passagiersvaart en veerdiensten)\",\n  \"5030\": \"Binnenvaart (passagiersvaart en veerdiensten)\",\n  \"504\": \"Binnenvaart (vracht-, tank- en sleepvaart)\",\n  \"5040\": \"Binnenvaart (vracht-, tank- en sleepvaart)\",\n  \"50401\": \"Binnenvaart (vrachtvaart)\",\n  \"50402\": \"Binnenvaart (tankvaart)\",\n  \"50403\": \"Binnenvaart (sleep- en duwvaart)\",\n  \"51\": \"Luchtvaart\",\n  \"511\": \"Personenvervoer door de lucht\",\n  \"5110\": \"Personenvervoer door de lucht\",\n  \"512\": \"Goederenvervoer door de lucht\",\n  \"5121\": \"Goederenvervoer door de lucht\",\n  \"52\": \"Opslag en dienstverlening voor vervoer\",\n  \"521\": \"Opslag\",\n  \"5210\": \"Opslag\",\n  \"52101\": \"Opslag in tanks\",\n  \"52102\": \"Opslag in koelhuizen e.d.\",\n  \"52109\": \"Opslag in distributiecentra en overige opslag (niet in tanks, koelhuizen e.d.)\",\n  \"522\": \"Dienstverlening voor vervoer\",\n  \"5221\": \"Dienstverlening voor vervoer over land\",\n  \"5222\": \"Dienstverlening voor vervoer over water\",\n  \"5223\": \"Dienstverlening voor de luchtvaart\",\n  \"5224\": \"Laad-, los- en overslagactiviteiten\",\n  \"52241\": \"Laad-, los- en overslagactiviteiten voor zeevaart\",\n  \"52242\": \"Laad-, los- en overslagactiviteiten niet voor zeevaart\",\n  \"5229\": \"Expediteurs, cargadoors en bevrachters; weging en meting\",\n  \"52291\": \"Expediteurs, cargadoors, bevrachters en andere tussenpersonen in het goederenvervoer\",\n  \"52292\": \"Weging en meting\",\n  \"53\": \"Post en koeriers\",\n  \"531\": \"Nationale post met universele dienstverplichting\",\n  \"5310\": \"Nationale post met universele dienstverplichting\",\n  \"532\": \"Post zonder universele dienstverplichting en koeriers\",\n  \"5320\": \"Post zonder universele dienstverplichting en koeriers\",\n  \"53201\": \"Post zonder universele dienstverplichting\",\n  \"53202\": \"Koeriers\",\n  // I - Logies-, maaltijd- en drankverstrekking\n  \"55\": \"Logiesverstrekking\",\n  \"551\": \"Hotels e.d.\",\n  \"5510\": \"Hotels e.d.\",\n  \"55101\": \"Hotel-restaurants\",\n  \"55102\": \"Hotels (geen hotel-restaurants), pensions en conferentieoorden\",\n  \"552\": \"Verhuur van vakantiehuisjes en appartementen; jeugdherbergen en vakantiekampen\",\n  \"5520\": \"Verhuur van vakantiehuisjes en appartementen; jeugdherbergen en vakantiekampen\",\n  \"55201\": \"Verhuur van vakantiehuisjes en appartementen\",\n  \"55202\": \"Jeugdherbergen en vakantiekampen\",\n  \"553\": \"Kampeerterreinen\",\n  \"5530\": \"Kampeerterreinen\",\n  \"559\": \"Overige logiesverstrekking\",\n  \"5590\": \"Overige logiesverstrekking\",\n  \"56\": \"Eet- en drinkgelegenheden\",\n  \"561\": \"Restaurants, cafetaria's e.d.\",\n  \"5610\": \"Restaurants, cafetaria's e.d. en ijssalons\",\n  \"56101\": \"Restaurants\",\n  \"56102\": \"Fastfoodrestaurants, cafetaria's, ijssalons, eetkramen e.d.\",\n  \"562\": \"Kantines en catering\",\n  \"5621\": \"Eventcatering\",\n  \"5629\": \"Kantines en contractcatering\",\n  \"563\": \"Cafés\",\n  \"5630\": \"Cafés\",\n  // J - Informatie en communicatie\n  \"58\": \"Uitgeverijen\",\n  \"581\": \"Uitgeverijen van boeken, tijdschriften e.d.\",\n  \"5811\": \"Uitgeverijen van boeken\",\n  \"5812\": \"Databanken\",\n  \"5813\": \"Uitgeverijen van kranten\",\n  \"5814\": \"Uitgeverijen van tijdschriften\",\n  \"5819\": \"Overige uitgeverijen (niet van software)\",\n  \"582\": \"Uitgeverijen van software\",\n  \"5821\": \"Uitgeverijen van computerspellen\",\n  \"5829\": \"Overige uitgeverijen van software\",\n  \"59\": \"Productie en distributie van films en televisieprogramma's; maken en uitgeven van geluidsopnamen\",\n  \"591\": \"Productie en distributie van films en televisieprogramma's\",\n  \"5911\": \"Productie van films, video- en televisieprogramma's\",\n  \"59111\": \"Productie van films (geen televisiefilms)\",\n  \"59112\": \"Productie van televisieprogramma's\",\n  \"5912\": \"Facilitaire activiteiten voor film- en televisieproductie\",\n  \"5913\": \"Distributie van films en televisieproducties\",\n  \"5914\": \"Bioscopen\",\n  \"592\": \"Maken en uitgeven van geluidsopnamen\",\n  \"5920\": \"Maken en uitgeven van geluidsopnamen\",\n  \"60\": \"Verzorgen en uitzenden van radio- en televisieprogramma's\",\n  \"601\": \"Radio-omroepen\",\n  \"6010\": \"Radio-omroepen\",\n  \"602\": \"Televisieomroepen\",\n  \"6020\": \"Televisieomroepen\",\n  \"61\": \"Telecommunicatie\",\n  \"611\": \"Draadgebonden telecommunicatie\",\n  \"6110\": \"Draadgebonden telecommunicatie\",\n  \"612\": \"Draadloze telecommunicatie\",\n  \"6120\": \"Draadloze telecommunicatie\",\n  \"613\": \"Telecommunicatie via satelliet\",\n  \"6130\": \"Telecommunicatie via satelliet\",\n  \"619\": \"Overige telecommunicatie\",\n  \"6190\": \"Overige telecommunicatie\",\n  \"62\": \"Dienstverlenende activiteiten op het gebied van informatietechnologie\",\n  \"620\": \"Dienstverlenende activiteiten op het gebied van informatietechnologie\",\n  \"6201\": \"Ontwikkelen, produceren en uitgeven van software\",\n  \"6202\": \"Advisering en ondersteuning op het gebied van informatietechnologie\",\n  \"6203\": \"Beheer van computerfaciliteiten\",\n  \"6209\": \"Overige dienstverlenende activiteiten op het gebied van informatietechnologie\",\n  \"63\": \"Dienstverlenende activiteiten op het gebied van informatie\",\n  \"631\": \"Gegevensverwerking, webhosting en aanverwante activiteiten; webportals\",\n  \"6311\": \"Gegevensverwerking, webhosting en aanverwante activiteiten\",\n  \"6312\": \"Webportals\",\n  \"639\": \"Overige dienstverlenende activiteiten op het gebied van informatie\",\n  \"6391\": \"Persagentschappen\",\n  \"6399\": \"Overige dienstverlenende activiteiten op het gebied van informatie (rest)\",\n  // K - Financiële instellingen\n  \"64\": \"Financiële instellingen (geen verzekeringen en pensioenfondsen)\",\n  \"641\": \"Geldscheppende financiële instellingen\",\n  \"6411\": \"Centrale banken\",\n  \"6419\": \"Overige geldscheppende financiële instellingen\",\n  \"64191\": \"Coöperatief georganiseerde banken\",\n  \"64192\": \"Effectenkredietinstellingen\",\n  \"64193\": \"Spaarbanken\",\n  \"64194\": \"Algemene banken\",\n  \"642\": \"Financiële holdings\",\n  \"6420\": \"Financiële holdings\",\n  \"643\": \"Beleggingsinstellingen\",\n  \"6430\": \"Beleggingsinstellingen\",\n  \"64301\": \"Beleggingsinstellingen in financiële activa\",\n  \"64302\": \"Beleggingsinstellingen in vaste activa\",\n  \"64303\": \"Beleggingsinstellingen met beperkte toetreding\",\n  \"649\": \"Kredietverstrekking en overige financiële intermediatie\",\n  \"6491\": \"Financiële lease\",\n  \"6492\": \"Overige kredietverstrekking\",\n  \"64921\": \"Hypotheekbanken en bouwfondsen\",\n  \"64922\": \"Volkskredietbanken en commerciële financieringsmaatschappijen\",\n  \"64923\": \"Participatiemaatschappijen\",\n  \"64924\": \"Wisselmakelaars en overige kredietverstrekking\",\n  \"6499\": \"Overige financiële intermediatie\",\n  \"65\": \"Verzekeringen en pensioenfondsen (geen verplichte sociale verzekeringen)\",\n  \"651\": \"Verzekeringen (geen herverzekering)\",\n  \"6511\": \"Levensverzekeringen (geen herverzekering), naturaverzekeringen en spaarkassen\",\n  \"65111\": \"Levensverzekeringen (geen herverzekering)\",\n  \"65112\": \"Naturaverzekeringen\",\n  \"65113\": \"Spaarkassen\",\n  \"6512\": \"Schadeverzekeringen (geen herverzekering)\",\n  \"65121\": \"Schadeverzekeringen (geen zorgverzekering)\",\n  \"65122\": \"Zorgverzekeringen\",\n  \"652\": \"Herverzekering\",\n  \"6520\": \"Herverzekering\",\n  \"653\": \"Pensioenfondsen\",\n  \"6530\": \"Pensioenfondsen\",\n  \"65301\": \"Bedrijfstakpensioenfondsen\",\n  \"65302\": \"Ondernemingspensioenfondsen en -spaarfondsen\",\n  \"65303\": \"Beroepspensioenfondsen\",\n  \"65309\": \"Overige pensioenfondsen\",\n  \"66\": \"Overige financiële dienstverlening\",\n  \"661\": \"Financiële bemiddeling, advisering e.d. (niet voor verzekeringen en pensioenfondsen)\",\n  \"6611\": \"Beheer van financiële markten\",\n  \"6612\": \"Commissionairs en makelaars in effecten, beleggingsadviseurs e.d.\",\n  \"6619\": \"Administratiekantoren voor aandelen en obligaties, marketmakers, hypotheek- en kredietbemiddeling, geldwisselkantoren, bank- en spaaragentschappen e.d.\",\n  \"66191\": \"Administratiekantoren voor aandelen en obligaties\",\n  \"66192\": \"Marketmakers\",\n  \"66193\": \"Hypotheek- en kredietbemiddeling, geldwisselkantoren, bank- en spaaragentschappen e.d.\",\n  \"662\": \"Dienstverlening op het gebied van verzekeringen en pensioenfondsen\",\n  \"6621\": \"Risicoanalisten en schadetaxateurs\",\n  \"6622\": \"Assurantietussenpersonen\",\n  \"6629\": \"Overige dienstverlening op het gebied van verzekeringen en pensioenfondsen (geen taxateurs en assurantietussenpersonen)\",\n  \"66291\": \"Verzekeringsbeurzen\",\n  \"66292\": \"Actuariële en pensioenadviesbureaus; beheer en administratie van pensioenvermogens\",\n  \"66293\": \"Waarborgfondsen\",\n  \"66299\": \"Overige dienstverlening in verband met verzekeringen en pensioenfondsen (rest)\",\n  \"663\": \"Vermogensbeheer\",\n  \"6630\": \"Vermogensbeheer\",\n  // L - Verhuur van en handel in onroerend goed\n  \"68\": \"Verhuur van en handel in onroerend goed\",\n  \"681\": \"Handel in eigen onroerend goed\",\n  \"6810\": \"Handel in eigen onroerend goed\",\n  \"682\": \"Verhuur van onroerend goed\",\n  \"6820\": \"Verhuur van onroerend goed\",\n  \"68201\": \"Woningbouwverenigingen en -stichtingen\",\n  \"68202\": \"Gemeentelijke woningbedrijven\",\n  \"68203\": \"Verhuur van overige woonruimte\",\n  \"68204\": \"Verhuur van onroerend goed (niet van woonruimte)\",\n  \"683\": \"Bemiddeling in en beheer van onroerend goed\",\n  \"6831\": \"Bemiddeling bij handel, huur of verhuur van onroerend goed\",\n  \"6832\": \"Beheer van onroerend goed\",\n  // M - Advisering, onderzoek en overige specialistische zakelijke dienstverlening\n  \"69\": \"Rechtskundige dienstverlening, accountancy, belastingadvisering en administratie\",\n  \"691\": \"Rechtskundige dienstverlening\",\n  \"6910\": \"Rechtskundige dienstverlening\",\n  \"69101\": \"Advocatenkantoren\",\n  \"69102\": \"Rechtskundige adviesbureaus\",\n  \"69103\": \"Notariskantoren\",\n  \"69104\": \"Deurwaarderskantoren\",\n  \"69105\": \"Octrooibureaus\",\n  \"692\": \"Accountancy, belastingadvisering en administratie\",\n  \"6920\": \"Accountancy, belastingadvisering en administratie\",\n  \"69201\": \"Registeraccountants\",\n  \"69202\": \"Accountants-administratieconsulenten\",\n  \"69203\": \"Boekhoudkantoren\",\n  \"69204\": \"Belastingconsulenten\",\n  \"69209\": \"Overige administratiekantoren\",\n  \"70\": \"Holdings (geen financiële), concerndiensten binnen eigen concern en managementadvisering\",\n  \"701\": \"Holdings (geen financiële) en concerndiensten binnen eigen concern\",\n  \"7010\": \"Holdings (geen financiële) en concerndiensten binnen eigen concern\",\n  \"70101\": \"Concerndiensten binnen eigen concern\",\n  \"70102\": \"Holdings (geen financiële)\",\n  \"702\": \"Advisering op het gebied van management en bedrijfsvoering\",\n  \"7021\": \"Adviesbureaus op het gebied van public relations en communicatie\",\n  \"7022\": \"Advisering op het gebied van management en bedrijfsvoering (geen public relations)\",\n  \"70221\": \"Organisatieadviesbureaus\",\n  \"70222\": \"Advisering op het gebied van management en bedrijfsvoering (geen public relations en organisatieadviesbureaus)\",\n  \"71\": \"Architecten, ingenieurs en technisch ontwerp en advies; keuring en controle\",\n  \"711\": \"Architecten, ingenieurs en technisch ontwerp en advies\",\n  \"7111\": \"Architecten\",\n  \"71111\": \"Architecten (geen interieurarchitecten)\",\n  \"71112\": \"Interieurarchitecten\",\n  \"7112\": \"Ingenieurs en overig technisch ontwerp en advies\",\n  \"712\": \"Keuring en controle\",\n  \"7120\": \"Keuring en controle\",\n  \"71201\": \"Keuring en controle van agrarische producten en voedingsmiddelen\",\n  \"71202\": \"Keuring en controle van machines, apparaten en materialen\",\n  \"71203\": \"Overige keuring en controle\",\n  \"72\": \"Speur- en ontwikkelingswerk\",\n  \"721\": \"Natuurwetenschappelijk speur- en ontwikkelingswerk\",\n  \"7211\": \"Biotechnologisch speur- en ontwikkelingswerk\",\n  \"72111\": \"Biotechnologisch speur- en ontwikkelingswerk op het gebied van agrarische producten en processen\",\n  \"72112\": \"Biotechnologisch speur- en ontwikkelingswerk op het gebied van medische producten en farmaceutische processen en van voeding\",\n  \"72113\": \"Biotechnologisch speur- en ontwikkelingswerk voor overige toepassingen\",\n  \"7219\": \"Natuurwetenschappelijk speur- en ontwikkelingswerk (niet biotechnologisch)\",\n  \"72191\": \"Speur- en ontwikkelingswerk op het gebied van landbouw en visserij (niet biotechnologisch)\",\n  \"72192\": \"Technisch speur- en ontwikkelingswerk\",\n  \"72193\": \"Speur- en ontwikkelingswerk op het gebied van gezondheid en voeding (niet biotechnologisch)\",\n  \"72199\": \"Overig natuurwetenschappelijk speur- en ontwikkelingswerk (niet biotechnologisch)\",\n  \"722\": \"Speur- en ontwikkelingswerk op het gebied van de maatschappij- en geesteswetenschappen\",\n  \"7220\": \"Speur- en ontwikkelingswerk op het gebied van de maatschappij- en geesteswetenschappen\",\n  \"73\": \"Reclame en marktonderzoek\",\n  \"731\": \"Reclamebureaus en handel in advertentieruimte en -tijd\",\n  \"7311\": \"Reclamebureaus\",\n  \"7312\": \"Handel in advertentieruimte en -tijd\",\n  \"732\": \"Markt- en opinieonderzoekbureaus\",\n  \"7320\": \"Markt- en opinieonderzoekbureaus\",\n  \"74\": \"Industrieel ontwerp en vormgeving, fotografie, vertaling en overige consultancy\",\n  \"741\": \"Industrieel ontwerp en vormgeving\",\n  \"7410\": \"Industrieel ontwerp en vormgeving\",\n  \"74101\": \"Communicatie- en grafisch ontwerp\",\n  \"74102\": \"Industrieel en product ontwerp\",\n  \"74103\": \"Interieur- en ruimtelijk ontwerp\",\n  \"742\": \"Fotografie en ontwikkelen van foto's en films\",\n  \"7420\": \"Fotografie en ontwikkelen van foto's en films\",\n  \"74201\": \"Fotografie\",\n  \"74202\": \"Ontwikkelwinkels\",\n  \"74203\": \"Ontwikkelcentrales\",\n  \"743\": \"Vertalers en tolken\",\n  \"7430\": \"Vertalers en tolken\",\n  \"749\": \"Overige specialistische zakelijke dienstverlening\",\n  \"7490\": \"Overige specialistische zakelijke dienstverlening\",\n  \"75\": \"Veterinaire dienstverlening\",\n  \"750\": \"Veterinaire dienstverlening\",\n  \"7500\": \"Veterinaire dienstverlening\",\n  // N - Verhuur van roerende goederen en overige zakelijke dienstverlening\n  \"77\": \"Verhuur en lease van auto's, consumentenartikelen, machines en overige roerende goederen\",\n  \"771\": \"Verhuur en lease van auto's\",\n  \"7711\": \"Verhuur en lease van personenauto's en lichte bedrijfsauto's\",\n  \"77111\": \"Verhuur van personenauto's en lichte bedrijfsauto's (geen operational lease)\",\n  \"77112\": \"Operational lease van personenauto's en lichte bedrijfsauto's\",\n  \"7712\": \"Verhuur en lease van vrachtwagens, autobussen en campers\",\n  \"772\": \"Verhuur van consumentenartikelen\",\n  \"7721\": \"Verhuur van sport- en recreatieartikelen\",\n  \"7722\": \"Videotheken\",\n  \"7729\": \"Verhuur van overige consumentenartikelen\",\n  \"77291\": \"Verhuur van leesportefeuilles\",\n  \"77292\": \"Verhuur van kleding en huishoudelijke artikelen\",\n  \"77299\": \"Verhuur van overige consumentenartikelen (rest)\",\n  \"773\": \"Verhuur en lease van machines en werktuigen en van overige goederen\",\n  \"7731\": \"Verhuur en lease van landbouwmachines en -werktuigen\",\n  \"7732\": \"Verhuur en lease van machines en installaties voor de bouw\",\n  \"7733\": \"Verhuur en lease van computers en kantoorapparatuur\",\n  \"7734\": \"Verhuur en lease van schepen\",\n  \"7735\": \"Verhuur en lease van vliegtuigen\",\n  \"7739\": \"Verhuur en lease van overige machines en werktuigen en van overige goederen\",\n  \"77391\": \"Verhuur van automaten\",\n  \"77399\": \"Verhuur en lease van overige machines en werktuigen en van overige goederen (geen automaten)\",\n  \"774\": \"Lease van niet-financiële immateriële activa\",\n  \"7740\": \"Lease van niet-financiële immateriële activa\",\n  \"78\": \"Arbeidsbemiddeling, uitzendbureaus en personeelsbeheer\",\n  \"781\": \"Arbeidsbemiddeling\",\n  \"7810\": \"Arbeidsbemiddeling\",\n  \"782\": \"Uitzendbureaus, uitleenbureaus en banenpools\",\n  \"7820\": \"Uitzendbureaus, uitleenbureaus en banenpools\",\n  \"78201\": \"Uitzendbureaus\",\n  \"78202\": \"Uitleenbureaus\",\n  \"78203\": \"Banenpools (werkgelegenheidsprojecten)\",\n  \"783\": \"Payrolling (personeelsbeheer)\",\n  \"7830\": \"Payrolling (personeelsbeheer)\",\n  \"79\": \"Reisbemiddeling, reisorganisatie, toeristische informatie en reserveringsbureaus\",\n  \"791\": \"Reisbureaus en reisorganisatoren\",\n  \"7911\": \"Reisbemiddeling\",\n  \"7912\": \"Reisorganisatoren\",\n  \"799\": \"Informatieverstrekking op het gebied van toerisme en reserveringsbureaus\",\n  \"7990\": \"Informatieverstrekking op het gebied van toerisme en reserveringsbureaus\",\n  \"80\": \"Beveiliging en opsporing\",\n  \"801\": \"Particuliere beveiliging\",\n  \"8010\": \"Particuliere beveiliging\",\n  \"802\": \"Beveiliging via beveiligingssystemen\",\n  \"8020\": \"Beveiliging via beveiligingssystemen\",\n  \"803\": \"Opsporing\",\n  \"8030\": \"Opsporing\",\n  \"81\": \"Facility management, reiniging en landschapsverzorging\",\n  \"811\": \"Facility management\",\n  \"8110\": \"Facility management\",\n  \"812\": \"Reiniging\",\n  \"8121\": \"Interieurreiniging van gebouwen\",\n  \"8122\": \"Gespecialiseerde reiniging van gebouwen en industriële reiniging\",\n  \"81221\": \"Glazenwassen\",\n  \"81222\": \"Schoorsteenvegen\",\n  \"81229\": \"Overige gespecialiseerde reiniging van gebouwen en industriële reiniging\",\n  \"8129\": \"Overige reiniging\",\n  \"813\": \"Landschapsverzorging\",\n  \"8130\": \"Landschapsverzorging\",\n  \"82\": \"Overige zakelijke dienstverlening\",\n  \"821\": \"Brede administratieve en secretariële dienstverlening\",\n  \"8211\": \"Brede administratieve dienstverlening\",\n  \"8219\": \"Secretariële dienstverlening\",\n  \"822\": \"Call centers\",\n  \"8220\": \"Call centers\",\n  \"823\": \"Organiseren van congressen en beurzen\",\n  \"8230\": \"Organiseren van congressen en beurzen\",\n  \"829\": \"Overige zakelijke dienstverlening (rest)\",\n  \"8291\": \"Kredietinformatie- en incassobureaus\",\n  \"8292\": \"Pakken, sorteren e.d. voor derden\",\n  \"8299\": \"Overige zakelijke dienstverlening (rest)\",\n  \"82991\": \"Veilingen van landbouw-, tuinbouw- en visserijproducten\",\n  \"82992\": \"Veilingen van huisraad, kunst, antiek, machines e.d. roerende goederen\",\n  \"82999\": \"Overige zakelijke dienstverlening (rest)\",\n  // O - Openbaar bestuur, overheidsdiensten en verplichte sociale verzekeringen\n  \"84\": \"Openbaar bestuur, overheidsdiensten en verplichte sociale verzekeringen\",\n  \"841\": \"Openbaar bestuur\",\n  \"8411\": \"Algemeen overheidsbestuur\",\n  \"8412\": \"Openbaar bestuur op het gebied van gezondheidszorg, onderwijs, cultuur en welzijn (geen sociale verzekeringen)\",\n  \"8413\": \"Openbaar bestuur op het gebied van het bedrijfsleven\",\n  \"842\": \"Overheidsdiensten\",\n  \"8421\": \"Buitenlandse zaken\",\n  \"8422\": \"Defensie\",\n  \"8423\": \"Justitie\",\n  \"84231\": \"Rechtspraak\",\n  \"84232\": \"Ministerie van Justitie en gevangeniswezen\",\n  \"8424\": \"Politie\",\n  \"8425\": \"Brandweer\",\n  \"843\": \"Verplichte sociale verzekeringen\",\n  \"8430\": \"Verplichte sociale verzekeringen\",\n  // P - Onderwijs\n  \"85\": \"Onderwijs\",\n  \"852\": \"Primair en speciaal onderwijs\",\n  \"8520\": \"Primair en speciaal onderwijs\",\n  \"85201\": \"Basisonderwijs voor leerplichtigen\",\n  \"85202\": \"Speciaal basisonderwijs\",\n  \"85203\": \"Speciaal onderwijs in expertisecentra\",\n  \"853\": \"Voortgezet onderwijs\",\n  \"8531\": \"Algemeen vormend voortgezet onderwijs\",\n  \"85311\": \"Havo en vwo\",\n  \"85312\": \"Voorbereidend middelbaar beroepsonderwijs\",\n  \"85313\": \"Praktijkonderwijs\",\n  \"85314\": \"Brede scholengemeenschappen voor voortgezet onderwijs\",\n  \"8532\": \"Middelbaar beroepsonderwijs en educatie\",\n  \"85321\": \"Middelbaar beroepsonderwijs\",\n  \"85322\": \"Volwassenen onderwijs\",\n  \"85323\": \"Middelbaar beroepsonderwijs en educatie (gecombineerd)\",\n  \"854\": \"Tertiair onderwijs\",\n  \"8541\": \"Niet-universitair hoger onderwijs\",\n  \"8542\": \"Universitair hoger onderwijs\",\n  \"855\": \"Overig onderwijs\",\n  \"8551\": \"Sport- en recreatieonderwijs\",\n  \"85511\": \"Zeil- en surfscholen\",\n  \"85519\": \"Overig sport- en recreatieonderwijs\",\n  \"8552\": \"Cultureel onderwijs\",\n  \"85521\": \"Dansscholen\",\n  \"85522\": \"Kunstzinnige vorming van amateurs (geen dansscholen)\",\n  \"8553\": \"Auto- en motorrijscholen\",\n  \"8559\": \"Overig onderwijs (rest)\",\n  \"85591\": \"Afstandsonderwijs\",\n  \"85592\": \"Bedrijfsopleiding en -training\",\n  \"85599\": \"Studiebegeleiding, vorming en onderwijs (rest)\",\n  \"856\": \"Dienstverlening voor het onderwijs\",\n  \"8560\": \"Dienstverlening voor het onderwijs\",\n  // Q - Gezondheids- en welzijnszorg\n  \"86\": \"Gezondheidszorg\",\n  \"861\": \"Ziekenhuizen\",\n  \"8610\": \"Ziekenhuizen\",\n  \"86101\": \"Universitair medische centra\",\n  \"86102\": \"Algemene ziekenhuizen\",\n  \"86103\": \"Categorale ziekenhuizen\",\n  \"86104\": \"Geestelijke gezondheids- en verslavingszorg met overnachting\",\n  \"862\": \"Medische en tandheelkundige praktijken\",\n  \"8621\": \"Praktijken van huisartsen\",\n  \"8622\": \"Praktijken van medisch specialisten en medische dagbehandelcentra (geen tandheelkunde)\",\n  \"86221\": \"Praktijken van medisch specialisten en medische dagbehandelcentra (geen tandheelkunde of psychiatrie)\",\n  \"86222\": \"Praktijken van psychiaters en dagbehandelcentra voor geestelijke gezondheids- en verslavingszorg\",\n  \"8623\": \"Tandartspraktijken\",\n  \"86231\": \"Praktijken van tandartsen\",\n  \"86232\": \"Praktijken van tandheelkundig specialisten\",\n  \"869\": \"Paramedische praktijken en overige gezondheidszorg zonder overnachting\",\n  \"8691\": \"Praktijken van verloskundigen en paramedici\",\n  \"86911\": \"Praktijken van verloskundigen\",\n  \"86912\": \"Praktijken van fysiotherapeuten\",\n  \"86913\": \"Praktijken van psychotherapeuten en psychologen\",\n  \"86919\": \"Overige paramedische praktijken (geen fysiotherapie of psychologie) en alternatieve genezers\",\n  \"8692\": \"Overige aanbieders van gezondheidszorg zonder overnachting en gezondheidszorgondersteunende diensten\",\n  \"86921\": \"Gezondheidscentra\",\n  \"86922\": \"Arbobegeleiding en re-integratie\",\n  \"86923\": \"Preventieve gezondheidszorg (geen arbobegeleiding)\",\n  \"86924\": \"Medische laboratoria, trombosediensten en overig behandelingsondersteunend onderzoek\",\n  \"86925\": \"Ambulancediensten en centrale posten\",\n  \"86929\": \"Samenwerkingsorganen op het gebied van gezondheidszorg en overige gezondheidszorgondersteunende diensten\",\n  \"87\": \"Verpleging, verzorging en begeleiding met overnachting\",\n  \"871\": \"Verpleeghuizen\",\n  \"8710\": \"Verpleeghuizen\",\n  \"872\": \"Huizen en dagverblijven voor verstandelijk gehandicapten\",\n  \"8720\": \"Huizen en dagverblijven voor verstandelijk gehandicapten\",\n  \"873\": \"Huizen en dagverblijven voor niet-verstandelijk gehandicapten en verzorgingshuizen\",\n  \"8730\": \"Huizen en dagverblijven voor niet-verstandelijk gehandicapten en verzorgingshuizen\",\n  \"87301\": \"Huizen en dagverblijven voor niet-verstandelijk gehandicapten\",\n  \"87302\": \"Verzorgingshuizen\",\n  \"879\": \"Jeugdzorg en maatschappelijke opvang met overnachting\",\n  \"8790\": \"Jeugdzorg en maatschappelijke opvang met overnachting\",\n  \"87901\": \"Jeugdzorg met overnachting en dagverblijven voor jeugdzorg\",\n  \"87902\": \"Maatschappelijk opvang met overnachting\",\n  \"88\": \"Maatschappelijke dienstverlening zonder overnachting\",\n  \"881\": \"Maatschappelijke dienstverlening zonder overnachting gericht op ouderen en gehandicapten\",\n  \"8810\": \"Maatschappelijke dienstverlening zonder overnachting gericht op ouderen en gehandicapten\",\n  \"88101\": \"Thuiszorg\",\n  \"88102\": \"Welzijnswerk voor ouderen\",\n  \"88103\": \"Ondersteuning en begeleiding van gehandicapten\",\n  \"889\": \"Maatschappelijke dienstverlening zonder overnachting niet specifiek gericht op ouderen en gehandicapten\",\n  \"8891\": \"Kinderopvang\",\n  \"8899\": \"Ambulante jeugdzorg, maatschappelijk werk en advies en lokaal welzijnswerk\",\n  \"88991\": \"Ambulante jeugdzorg\",\n  \"88992\": \"Maatschappelijk werk\",\n  \"88993\": \"Lokaal welzijnswerk\",\n  \"88999\": \"Overig maatschappelijk advies, gemeenschapshuizen en samenwerkingsorganen op het gebied van welzijn\",\n  // R - Cultuur, sport en recreatie\n  \"90\": \"Kunst\",\n  \"900\": \"Kunst\",\n  \"9001\": \"Podiumkunst en -vermaak\",\n  \"90011\": \"Beoefening van podiumkunst\",\n  \"90012\": \"Producenten van podiumkunst\",\n  \"90013\": \"Circus en variété\",\n  \"9002\": \"Dienstverlening voor uitvoerende kunsten\",\n  \"9003\": \"Schrijven en overige scheppende kunsten\",\n  \"9004\": \"Theaters, schouwburgen en evenementenhallen\",\n  \"90041\": \"Theaters en schouwburgen\",\n  \"90042\": \"Evenementenhallen\",\n  \"91\": \"Culturele uitleencentra, openbare archieven, musea, dieren- en plantentuinen, natuurbehoud\",\n  \"910\": \"Culturele uitleencentra, openbare archieven, musea, dieren- en plantentuinen, natuurbehoud\",\n  \"9101\": \"Culturele uitleencentra en openbare archieven\",\n  \"91011\": \"Openbare bibliotheken\",\n  \"91012\": \"Kunstuitleencentra\",\n  \"91019\": \"Overige culturele uitleencentra en openbare archieven\",\n  \"9102\": \"Musea, kunstgalerieën en -expositieruimten\",\n  \"91021\": \"Musea\",\n  \"91022\": \"Kunstgalerieën en -expositieruimten\",\n  \"9103\": \"Monumentenzorg\",\n  \"9104\": \"Dieren- en plantentuinen; natuurbehoud\",\n  \"91041\": \"Dieren- en plantentuinen, kinderboerderijen\",\n  \"91042\": \"Natuurbehoud\",\n  \"92\": \"Loterijen en kansspelen\",\n  \"920\": \"Loterijen en kansspelen\",\n  \"9200\": \"Loterijen en kansspelen\",\n  \"92001\": \"Loterijen en kansspelen (geen amusementsautomaten)\",\n  \"92009\": \"Exploitatie van amusements- en speelautomaten\",\n  \"93\": \"Sport en recreatie\",\n  \"931\": \"Sport\",\n  \"9311\": \"Sportaccommodaties\",\n  \"93111\": \"Zwembaden\",\n  \"93112\": \"Sporthallen, sportzalen en gymzalen\",\n  \"93113\": \"Sportvelden\",\n  \"93119\": \"Overige sportaccommodaties\",\n  \"9312\": \"Buitensport\",\n  \"93121\": \"Veldvoetbal\",\n  \"93122\": \"Veldsport in teamverband (geen voetbal)\",\n  \"93123\": \"Atletiek\",\n  \"93124\": \"Tennis\",\n  \"93125\": \"Paardensport en maneges\",\n  \"93126\": \"Wielersport\",\n  \"93127\": \"Auto- en motorsport\",\n  \"93128\": \"Wintersport\",\n  \"93129\": \"Overige buitensport\",\n  \"9313\": \"Fitnesscentra\",\n  \"9314\": \"Binnensport\",\n  \"93141\": \"Individuele zaalsport\",\n  \"93142\": \"Zaalsport in teamverband\",\n  \"93143\": \"Kracht- en vechtsport\",\n  \"93144\": \"Bowlen, kegelen, biljarten e.d.\",\n  \"93145\": \"Denksport\",\n  \"93146\": \"Sportscholen\",\n  \"93149\": \"Overige binnensport en omnisport\",\n  \"9315\": \"Watersport\",\n  \"93151\": \"Zwem- en onderwatersport\",\n  \"93152\": \"Roei-, kano-, zeil- en surfsport e.d.\",\n  \"9319\": \"Overige sportactiviteiten\",\n  \"93191\": \"Beroepssportlieden\",\n  \"93192\": \"Hengelsport\",\n  \"93193\": \"Verzorgen van vistochten\",\n  \"93194\": \"Supportersverenigingen (sport)\",\n  \"93195\": \"Organiseren van sportevenementen\",\n  \"93196\": \"Overkoepelende organen en samenwerkings- en adviesorganen op het gebied van sport\",\n  \"93199\": \"Overige sportactiviteiten (rest)\",\n  \"932\": \"Overige recreatie\",\n  \"9321\": \"Pret- en themaparken; kermisattracties\",\n  \"93211\": \"Pret- en themaparken\",\n  \"93212\": \"Kermisattracties\",\n  \"9329\": \"Overige ontspanning en recreatie (rest)\",\n  \"93291\": \"Jachthavens\",\n  \"93299\": \"Overige recreatie (rest) (geen jachthavens)\",\n  // S - Overige dienstverlening\n  \"94\": \"Levensbeschouwelijke en politieke organisaties, belangen- en ideële organisaties, hobbyclubs\",\n  \"941\": \"Bedrijfs-, werkgevers- en beroepsorganisaties\",\n  \"9411\": \"Bedrijfs- en werkgeversorganisaties\",\n  \"9412\": \"Beroepsorganisaties\",\n  \"942\": \"Werknemersorganisaties\",\n  \"9420\": \"Werknemersorganisaties\",\n  \"949\": \"Levensbeschouwelijke en politieke organisaties, overige belangen- en ideële organisaties, hobbyclubs\",\n  \"9491\": \"Levensbeschouwelijke organisaties\",\n  \"94911\": \"Religieuze organisaties\",\n  \"94919\": \"Overige levensbeschouwelijke organisaties\",\n  \"9492\": \"Politieke organisaties\",\n  \"9499\": \"Overige belangen- en ideële organisaties; hobbyclubs\",\n  \"94991\": \"Gezelligheidsverenigingen\",\n  \"94992\": \"Hobbyclubs\",\n  \"94993\": \"Steunfondsen (geen steunfondsen op het gebied van welzijnszorg)\",\n  \"94994\": \"Vriendenkringen op het gebied van cultuur, fanclubs en overige kunstbevordering\",\n  \"94995\": \"Overkoepelende organen en samenwerkings- en adviesorganen (niet op het gebied van gezondheids- en welzijnszorg, sport en recreatie)\",\n  \"94996\": \"Overige ideële organisaties (rest)\",\n  \"94997\": \"Overige belangenbehartiging (rest)\",\n  \"95\": \"Reparatie van computers en consumentenartikelen\",\n  \"951\": \"Reparatie van computers en communicatieapparatuur\",\n  \"9511\": \"Reparatie van computers en randapparatuur\",\n  \"9512\": \"Reparatie van communicatieapparatuur\",\n  \"952\": \"Reparatie van consumentenartikelen (geen computers, communicatieapparatuur, auto's en motorfietsen)\",\n  \"9521\": \"Reparatie van consumentenelektronica (geen computers)\",\n  \"9522\": \"Reparatie van elektrische huishoudelijke apparaten\",\n  \"9523\": \"Reparatie van schoenen en lederwaren\",\n  \"9524\": \"Reparatie en stoffering van meubels\",\n  \"9525\": \"Reparatie van uurwerken en juweliersartikelen\",\n  \"9529\": \"Reparatie van overige consumentenartikelen\",\n  \"96\": \"Wellness en overige dienstverlening; uitvaartbranche\",\n  \"960\": \"Wellness en overige dienstverlening; uitvaartbranche\",\n  \"9601\": \"Reinigen van kleding en textiel\",\n  \"96011\": \"Wasserijen en linnenverhuur\",\n  \"96012\": \"Chemische wasserijen en ververijen\",\n  \"96013\": \"Wassalons en -verzendinrichtingen\",\n  \"9602\": \"Haar- en schoonheidsverzorging\",\n  \"96021\": \"Haarverzorging\",\n  \"96022\": \"Schoonheidsverzorging, pedicures en manicures\",\n  \"9603\": \"Uitvaartverzorging, crematoria, mortuaria en begraafplaatsen\",\n  \"96031\": \"Uitvaartverzorging\",\n  \"96032\": \"Crematoria, mortuaria en begraafplaatsen\",\n  \"9604\": \"Sauna's, solaria, baden e.d.\",\n  \"9609\": \"Overige dienstverlening (rest)\",\n  // T - Huishoudens als werkgever\n  \"97\": \"Huishoudens als werkgever van huishoudelijk personeel\",\n  \"970\": \"Huishoudens als werkgever van huishoudelijk personeel\",\n  \"9700\": \"Huishoudens als werkgever van huishoudelijk personeel\",\n  \"98\": \"Niet-gedifferentieerde productie van goederen en diensten door particuliere huishoudens voor eigen gebruik\",\n  \"981\": \"Niet-gedifferentieerde productie van goederen door particuliere huishoudens voor eigen gebruik\",\n  \"9810\": \"Niet-gedifferentieerde productie van goederen door particuliere huishoudens voor eigen gebruik\",\n  \"982\": \"Niet-gedifferentieerde productie van diensten door particuliere huishoudens voor eigen gebruik\",\n  \"9820\": \"Niet-gedifferentieerde productie van diensten door particuliere huishoudens voor eigen gebruik\",\n  // U - Extraterritoriale organisaties en lichamen\n  \"99\": \"Extraterritoriale organisaties en lichamen\",\n  \"990\": \"Extraterritoriale organisaties en lichamen\",\n  \"9900\": \"Extraterritoriale organisaties en lichamen\",\n};\n","import { SBI_CODES } from \"./sbi-codes\";\n\nexport function mostSpecificSbiCodes(value: string): string[] {\n  const codes = [...new Set(value.split(\",\").map(code => code.trim()).filter(Boolean))];\n  return codes.filter(code => !codes.some(other => other !== code && other.startsWith(code)));\n}\n\nexport function sbiParentDescription(code: string): string | null {\n  const parents: string[] = [];\n  for (let length = 2; length < code.length; length++) {\n    const parent = code.substring(0, length);\n    if (SBI_CODES[parent] && SBI_CODES[parent] !== SBI_CODES[code]) parents.push(`${parent} ${SBI_CODES[parent]}`);\n  }\n  return parents.join(\" > \") || null;\n}\n","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, withCtx as _withCtx, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"sbi-codes\" }\nconst _hoisted_2 = [\"aria-label\"]\nconst _hoisted_3 = { class: \"sbi-codes__description\" }\nconst _hoisted_4 = {\n  key: 0,\n  class: \"sbi-codes__parents\"\n}\nconst _hoisted_5 = {\n  key: 1,\n  class: \"sbi-codes__code\"\n}\nconst _hoisted_6 = { key: 0 }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.codes, (item) => {\n      return (_openBlock(), _createElementBlock(_Fragment, {\n        key: item.code\n      }, [\n        (item.description)\n          ? (_openBlock(), _createBlock($setup[\"Popover\"], {\n              key: 0,\n              width: 320\n            }, {\n              trigger: _withCtx(() => [\n                _createElementVNode(\"button\", {\n                  class: \"sbi-codes__code sbi-codes__code--known\",\n                  type: \"button\",\n                  \"aria-label\": `Uitleg SBI-code ${item.code}`\n                }, _toDisplayString(item.code), 9 /* TEXT, PROPS */, _hoisted_2)\n              ]),\n              default: _withCtx(() => [\n                _createElementVNode(\"div\", _hoisted_3, [\n                  _createElementVNode(\"strong\", null, \"SBI \" + _toDisplayString(item.code), 1 /* TEXT */),\n                  _createElementVNode(\"p\", null, _toDisplayString(item.description), 1 /* TEXT */),\n                  (item.parents)\n                    ? (_openBlock(), _createElementBlock(\"p\", _hoisted_4, _toDisplayString(item.parents), 1 /* TEXT */))\n                    : _createCommentVNode(\"v-if\", true)\n                ])\n              ]),\n              _: 2 /* DYNAMIC */\n            }, 1024 /* DYNAMIC_SLOTS */))\n          : (_openBlock(), _createElementBlock(\"span\", _hoisted_5, _toDisplayString(item.code), 1 /* TEXT */))\n      ], 64 /* STABLE_FRAGMENT */))\n    }), 128 /* KEYED_FRAGMENT */)),\n    (!$setup.codes.length)\n      ? (_openBlock(), _createElementBlock(\"span\", _hoisted_6, _toDisplayString($props.sbiCodes), 1 /* TEXT */))\n      : _createCommentVNode(\"v-if\", true)\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/SbiCodesDisplay.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/SbiCodesDisplay.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/SbiCodesDisplay.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/SbiCodesDisplay.vue\";script.__scopeId = \"data-v-54c02d9f\";export default script;","import { computed, onActivated, onDeactivated, onScopeDispose, ref, watch } from \"vue\";\nimport { api } from \"./api\";\nimport { LocationRequestScope, latestLocationAnalysis, locationCoordinates, parseGroundTruth } from \"./location-detail\";\nimport type { LocationImage } from \"./location-images\";\n\nexport type AdminLocation = NonNullable<Awaited<ReturnType<typeof api.findLocationById>>[\"location\"]>;\nexport type LocationAnalysis = Awaited<ReturnType<typeof api.findAnalysesByLocationId>>[\"analyses\"][number];\nexport type LocationFeedback = Awaited<ReturnType<typeof api.findFeedbackByLocationId>>[\"feedback\"][number];\nexport type LocationScrape = Awaited<ReturnType<typeof api.getLocationScrape>>[\"results\"][number];\n\nfunction errorMessage(error: unknown): string {\n  return error instanceof Error ? error.message : \"Ophalen mislukt. Probeer het opnieuw.\";\n}\n\nexport function useLocationDetail(getId: () => number) {\n  const location = ref<AdminLocation | null>(null);\n  const analyses = ref<LocationAnalysis[]>([]);\n  const feedback = ref<LocationFeedback[]>([]);\n  const feedbackLoading = ref(true);\n  const feedbackError = ref(\"\");\n  const images = ref<LocationImage[]>([]);\n  const scrapes = ref<LocationScrape[]>([]);\n  const loading = ref(true);\n  const analysesLoading = ref(true);\n  const imagesLoading = ref(true);\n  const scrapeLoading = ref(true);\n  const downloading = ref(false);\n  const scraping = ref(false);\n  const deleting = ref(false);\n  const saving = ref(false);\n  const error = ref(\"\");\n  const analysesError = ref(\"\");\n  const imageErrors = ref<string[]>([]);\n  const scrapeError = ref(\"\");\n  const groundTruthError = ref(\"\");\n  const groundTruthSaved = ref(false);\n  const selectedAnalyses = ref(new Set<number>());\n  const parkingSpots = ref(\"\");\n  const adjacent = ref(\"unknown\");\n  const notes = ref(\"\");\n  const latestAnalysis = computed(() => latestLocationAnalysis(analyses.value));\n  const coordinates = computed(() => locationCoordinates(location.value));\n  const sortedAnalyses = computed(() => [...analyses.value].sort((a, b) => Date.parse(b.createdAt) - Date.parse(a.createdAt) || b.id - a.id));\n  let scope = new LocationRequestScope();\n  let poll: ReturnType<typeof setTimeout> | undefined;\n\n  function stopPolling() {\n    if (poll !== undefined) clearTimeout(poll);\n    poll = undefined;\n  }\n\n  function syncGroundTruth(value: AdminLocation) {\n    parkingSpots.value = value.groundTruthParkingSpots?.toString() ?? \"\";\n    adjacent.value = value.groundTruthHasAdjacentSpots === null ? \"unknown\" : value.groundTruthHasAdjacentSpots ? \"yes\" : \"no\";\n    notes.value = value.groundTruthNotes ?? \"\";\n  }\n\n  async function loadLocation() {\n    const current = scope.begin(\"location\");\n    const id = getId();\n    loading.value = true;\n    error.value = \"\";\n    try {\n      const result = await api.findLocationById({ id });\n      if (!current()) return;\n      location.value = result.location;\n      if (result.location) syncGroundTruth(result.location);\n    } catch (caught) {\n      if (current()) error.value = errorMessage(caught);\n    } finally {\n      if (current()) loading.value = false;\n    }\n  }\n\n  async function refreshAnalyses() {\n    stopPolling();\n    const current = scope.begin(\"analyses\");\n    const locationId = getId();\n    analysesError.value = \"\";\n    try {\n      const result = await api.findAnalysesByLocationId({ locationId });\n      if (!current()) return;\n      analyses.value = result.analyses;\n      selectedAnalyses.value = new Set([...selectedAnalyses.value].filter(id => result.analyses.some(analysis => analysis.id === id)));\n    } catch (caught) {\n      if (current()) analysesError.value = errorMessage(caught);\n    } finally {\n      if (current()) {\n        analysesLoading.value = false;\n        if (analyses.value.some(analysis => analysis.status === \"running\" || analysis.status === \"pending\"))\n          poll = setTimeout(() => { void refreshAnalyses(); }, 3000);\n      }\n    }\n  }\n\n  async function loadFeedback() {\n    const current = scope.begin(\"feedback\");\n    const locationId = getId();\n    feedbackLoading.value = true;\n    feedbackError.value = \"\";\n    try {\n      const result = await api.findFeedbackByLocationId({ locationId });\n      if (current()) feedback.value = result.feedback;\n    } catch (caught) {\n      if (current()) feedbackError.value = errorMessage(caught);\n    } finally {\n      if (current()) feedbackLoading.value = false;\n    }\n  }\n\n  async function loadImages(force = false) {\n    if (force && downloading.value) return;\n    const current = scope.begin(\"images\");\n    const locationId = getId();\n    imageErrors.value = [];\n    if (force) downloading.value = true;\n    else imagesLoading.value = true;\n    try {\n      const result = force\n        ? await api.fetchLocationImages({ locationId, force: true })\n        : await api.getLocationImages({ locationId });\n      if (!current()) return;\n      images.value = result.images;\n      imageErrors.value = result.errors ?? [];\n    } catch (caught) {\n      if (current()) imageErrors.value = [errorMessage(caught)];\n    } finally {\n      if (current()) { imagesLoading.value = false; downloading.value = false; }\n    }\n  }\n\n  async function loadScrapes(force = false) {\n    if (force && scraping.value) return;\n    const current = scope.begin(\"scrape\");\n    const locationId = getId();\n    scrapeError.value = \"\";\n    if (force) scraping.value = true;\n    else scrapeLoading.value = true;\n    try {\n      const result = force\n        ? await api.scrapeLocationWebsite({ locationId, force: true })\n        : await api.getLocationScrape({ locationId });\n      if (current()) scrapes.value = result.results;\n    } catch (caught) {\n      if (current()) scrapeError.value = errorMessage(caught);\n    } finally {\n      if (current()) { scrapeLoading.value = false; scraping.value = false; }\n    }\n  }\n\n  function toggleAnalysis(options: { id: number; selected: boolean }) {\n    const next = new Set(selectedAnalyses.value);\n    if (options.selected) next.add(options.id);\n    else next.delete(options.id);\n    selectedAnalyses.value = next;\n  }\n\n  function selectAll(value: boolean) {\n    selectedAnalyses.value = new Set(value ? analyses.value.map(analysis => analysis.id) : []);\n  }\n\n  async function deleteAnalyses(): Promise<boolean> {\n    if (deleting.value || !selectedAnalyses.value.size) return false;\n    const current = scope.begin(\"delete\");\n    const ids = [...selectedAnalyses.value];\n    scope.begin(\"analyses\");\n    stopPolling();\n    deleting.value = true;\n    analysesError.value = \"\";\n    try {\n      const result = await api.softDeleteAnalyses({ ids });\n      if (!current()) return false;\n      if (!result.success) throw new Error(\"Verwijderen mislukt. Probeer het opnieuw.\");\n      analyses.value = analyses.value.filter(analysis => !ids.includes(analysis.id));\n      selectedAnalyses.value = new Set();\n      await refreshAnalyses();\n      return current();\n    } catch (caught) {\n      if (current()) analysesError.value = errorMessage(caught);\n      return false;\n    } finally {\n      if (current()) {\n        deleting.value = false;\n        if (poll === undefined && analyses.value.some(analysis => analysis.status === \"running\" || analysis.status === \"pending\"))\n          poll = setTimeout(() => { void refreshAnalyses(); }, 3000);\n      }\n    }\n  }\n\n  async function saveGroundTruth() {\n    if (saving.value) return;\n    groundTruthError.value = \"\";\n    groundTruthSaved.value = false;\n    let values;\n    try {\n      values = parseGroundTruth({ parkingSpots: parkingSpots.value, adjacent: adjacent.value, notes: notes.value });\n    } catch (caught) {\n      groundTruthError.value = errorMessage(caught);\n      return;\n    }\n    const current = scope.begin(\"ground-truth\");\n    const id = getId();\n    saving.value = true;\n    try {\n      const result = await api.updateLocationGroundTruth({ id, ...values });\n      if (!current()) return;\n      if (!result.success) throw new Error(\"Opslaan mislukt. Probeer het opnieuw.\");\n      const canonical = await api.findLocationById({ id });\n      if (!current()) return;\n      if (!canonical.location) throw new Error(\"De opgeslagen locatie kan niet opnieuw worden geladen.\");\n      location.value = canonical.location;\n      syncGroundTruth(canonical.location);\n      groundTruthSaved.value = true;\n    } catch (caught) {\n      if (current()) groundTruthError.value = errorMessage(caught);\n    } finally {\n      if (current()) saving.value = false;\n    }\n  }\n\n  watch(getId, () => {\n    scope.dispose();\n    stopPolling();\n    scope = new LocationRequestScope();\n    location.value = null;\n    analyses.value = [];\n    feedback.value = [];\n    feedbackLoading.value = true;\n    feedbackError.value = \"\";\n    images.value = [];\n    scrapes.value = [];\n    selectedAnalyses.value = new Set();\n    parkingSpots.value = \"\";\n    adjacent.value = \"unknown\";\n    notes.value = \"\";\n    groundTruthError.value = \"\";\n    groundTruthSaved.value = false;\n    saving.value = false;\n    deleting.value = false;\n    downloading.value = false;\n    scraping.value = false;\n    analysesLoading.value = true;\n    void loadLocation();\n    void refreshAnalyses();\n    void loadFeedback();\n    void loadImages();\n    void loadScrapes();\n  }, { immediate: true });\n\n  // De pagina blijft in leven zolang zijn tab openstaat, dus opruimen bij\n  // unmount is niet genoeg: zonder deze twee pollt elke achtergrondtab door.\n  // Bij het eerste tonen is `analyses` nog leeg, dus dan doet dit niets en\n  // blijft de eerste fetch van de watcher hierboven de enige.\n  onDeactivated(stopPolling);\n  onActivated(() => {\n    if (poll === undefined && analyses.value.some(analysis => analysis.status === \"running\" || analysis.status === \"pending\"))\n      void refreshAnalyses();\n  });\n\n  onScopeDispose(() => { scope.dispose(); stopPolling(); });\n\n  return {\n    feedback, feedbackLoading, feedbackError, loadFeedback,\n    location, analyses, sortedAnalyses, latestAnalysis, coordinates, images, scrapes,\n    loading, analysesLoading, imagesLoading, scrapeLoading, downloading, scraping, deleting, saving,\n    error, analysesError, imageErrors, scrapeError, groundTruthError, groundTruthSaved,\n    selectedAnalyses, parkingSpots, adjacent, notes,\n    loadLocation, refreshAnalyses, loadImages, loadScrapes, toggleAnalysis, selectAll, deleteAnalyses, saveGroundTruth,\n  };\n}\n","// URL builders for opening a location in Google Maps or Apple Maps.\n// Both use universal links that open the native app on mobile and the\n// web version on desktop.\n\nexport interface MapsLinkParams {\n  lat: number;\n  lng: number;\n  label?: string | null;\n}\n\nexport function googleMapsUrl(params: MapsLinkParams): string {\n  const query = `${params.lat},${params.lng}`;\n  return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(query)}`;\n}\n\nexport function appleMapsUrl(params: MapsLinkParams): string {\n  const ll = `${params.lat},${params.lng}`;\n  const search = new URLSearchParams({ ll });\n  if (params.label) search.set(\"q\", params.label);\n  return `https://maps.apple.com/?${search.toString()}`;\n}\n\n// Keyless interactive Google Maps embed for use as an <iframe src>. The\n// `output=embed` endpoint needs no API key and stays pan/zoom-interactive —\n// it's the live map hero on the assessment screen (not our cached screenshots).\n// Defaults to satellite imagery (t=k) zoomed in to z=17 so you can judge the\n// site at a glance before driving out (TEC-90/TEC-93).\nexport function googleMapsEmbedUrl(params: MapsLinkParams): string {\n  return `https://maps.google.com/maps?q=${params.lat},${params.lng}&z=17&t=k&output=embed`;\n}\n\n// Jumps straight to a Google Street View panorama at the coordinates via the\n// official maps URL scheme. Opens the native app on mobile, web on desktop.\nexport function streetViewUrl(params: MapsLinkParams): string {\n  return `https://www.google.com/maps/@?api=1&map_action=pano&viewpoint=${params.lat},${params.lng}`;\n}\n\n// Keyless INTERACTIVE Street View embed for an <iframe src>. The classic\n// `output=svembed` endpoint needs no API key and renders a draggable panorama\n// (pan/look-around in place), unlike streetViewUrl which jumps out to the Google\n// app. cbp = camera params (zoom, heading, pitch, …); a 0 heading is a fine\n// default. Degrades to Google's \"no imagery\" tile when the coords have no pano.\nexport function streetViewEmbedUrl(params: MapsLinkParams): string {\n  return `https://maps.google.com/maps?q=&layer=c&cbll=${params.lat},${params.lng}&cbp=11,0,0,0,0&output=svembed`;\n}\n","/**\n * Helpers for syncing an active tab to the URL as a `?tab=` query param.\n *\n * A page's active tab must live in the URL, never in local component state\n * only, so a refresh reopens the same tab, browser back/forward steps between\n * tabs, and any tab is deep-linkable. The default tab omits the param so the\n * canonical URL stays clean. In the hash-routed admin the \"URL\" is the hash\n * path plus its query (`route.path` + `route.query`); the helpers are agnostic.\n */\n\n/** Resolve the active tab from a raw `?tab=` value, validated against the allowed list. */\nexport function resolveActiveTab(\n  rawTab: string | null,\n  allowedTabs: readonly string[],\n  defaultTab: string,\n): string {\n  return rawTab && allowedTabs.includes(rawTab) ? rawTab : defaultTab;\n}\n\n/**\n * Build the href for switching to `value`. The default tab drops the `tab`\n * param (clean canonical URL); other existing query params are preserved.\n */\nexport function buildTabHref(\n  pathname: string,\n  searchParams: URLSearchParams,\n  value: string,\n  defaultTab: string,\n): string {\n  const params = new URLSearchParams(searchParams.toString());\n  if (value === defaultTab) params.delete(\"tab\");\n  else params.set(\"tab\", value);\n  const qs = params.toString();\n  return `${pathname}${qs ? `?${qs}` : \"\"}`;\n}\n","import { createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, Fragment as _Fragment, renderList as _renderList, createSlots as _createSlots, vShow as _vShow, withDirectives as _withDirectives, withModifiers as _withModifiers, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"location-detail\" }\nconst _hoisted_2 = { class: \"location-detail__header\" }\nconst _hoisted_3 = { class: \"location-detail__crumbline\" }\nconst _hoisted_4 = {\n  \"aria-label\": \"Locatiepad\",\n  class: \"location-detail__crumbs\"\n}\nconst _hoisted_5 = [\"title\"]\nconst _hoisted_6 = {\n  key: 0,\n  class: \"location-detail__badges\"\n}\nconst _hoisted_7 = { class: \"location-detail__titlebar\" }\nconst _hoisted_8 = [\"title\"]\nconst _hoisted_9 = {\n  key: 0,\n  class: \"location-detail__badges\"\n}\nconst _hoisted_10 = {\n  key: 1,\n  class: \"location-detail__actions\"\n}\nconst _hoisted_11 = [\"href\"]\nconst _hoisted_12 = { class: \"location-detail__action-menu\" }\nconst _hoisted_13 = [\"href\"]\nconst _hoisted_14 = {\n  key: 0,\n  class: \"location-detail__muted\",\n  role: \"status\"\n}\nconst _hoisted_15 = {\n  key: 1,\n  class: \"location-detail__stack\"\n}\nconst _hoisted_16 = {\n  class: \"location-detail__error\",\n  role: \"alert\"\n}\nconst _hoisted_17 = {\n  key: 2,\n  class: \"location-detail__muted\"\n}\nconst _hoisted_18 = { class: \"location-detail__overview\" }\nconst _hoisted_19 = {\n  key: 0,\n  class: \"location-detail__padded location-detail__muted\",\n  role: \"status\"\n}\nconst _hoisted_20 = {\n  key: 2,\n  class: \"location-detail__padded location-detail__muted\"\n}\nconst _hoisted_21 = {\n  key: 3,\n  class: \"location-detail__padded location-detail__error\",\n  role: \"alert\"\n}\nconst _hoisted_22 = {\n  key: 4,\n  class: \"location-detail__padded location-detail__muted\",\n  role: \"status\"\n}\nconst _hoisted_23 = { class: \"location-detail__stack location-detail__side\" }\nconst _hoisted_24 = {\n  key: 0,\n  class: \"location-detail__muted location-detail__padded\",\n  role: \"status\"\n}\nconst _hoisted_25 = {\n  key: 2,\n  class: \"location-detail__muted location-detail__padded\"\n}\nconst _hoisted_26 = {\n  key: 3,\n  class: \"location-detail__stack location-detail__padded\"\n}\nconst _hoisted_27 = {\n  class: \"location-detail__error\",\n  role: \"alert\"\n}\nconst _hoisted_28 = { class: \"location-detail__fields\" }\nconst _hoisted_29 = [\"href\"]\nconst _hoisted_30 = {\n  key: 0,\n  class: \"location-detail__profile\"\n}\nconst _hoisted_31 = [\"href\"]\nconst _hoisted_32 = {\n  key: 0,\n  class: \"location-detail__muted\",\n  role: \"status\"\n}\nconst _hoisted_33 = {\n  key: 1,\n  class: \"location-detail__muted\"\n}\nconst _hoisted_34 = {\n  key: 0,\n  class: \"location-detail__muted\"\n}\nconst _hoisted_35 = {\n  key: 2,\n  class: \"location-detail__error\",\n  role: \"alert\"\n}\nconst _hoisted_36 = {\n  key: 3,\n  class: \"location-detail__muted\",\n  role: \"status\"\n}\nconst _hoisted_37 = { class: \"location-detail__socials\" }\nconst _hoisted_38 = [\"href\"]\nconst _hoisted_39 = [\"src\", \"title\"]\nconst _hoisted_40 = { class: \"location-detail__map-links\" }\nconst _hoisted_41 = [\"href\"]\nconst _hoisted_42 = [\"href\"]\nconst _hoisted_43 = {\n  key: 0,\n  class: \"location-detail__padded\",\n  role: \"status\"\n}\nconst _hoisted_44 = {\n  key: 1,\n  class: \"location-detail__padded\",\n  role: \"status\"\n}\nconst _hoisted_45 = {\n  key: 2,\n  class: \"location-detail__padded location-detail__error\",\n  role: \"alert\"\n}\nconst _hoisted_46 = {\n  key: 3,\n  class: \"location-detail__padded location-detail__muted\",\n  role: \"status\"\n}\nconst _hoisted_47 = {\n  key: 4,\n  class: \"location-detail__padded location-detail__muted\"\n}\nconst _hoisted_48 = {\n  key: 5,\n  class: \"location-detail__table-wrap\"\n}\nconst _hoisted_49 = { class: \"location-detail__table\" }\nconst _hoisted_50 = [\"onClick\"]\nconst _hoisted_51 = { class: \"tnum\" }\nconst _hoisted_52 = {\n  key: 1,\n  class: \"location-detail__muted\"\n}\nconst _hoisted_53 = {\n  key: 1,\n  class: \"location-detail__stack\"\n}\nconst _hoisted_54 = {\n  key: 0,\n  class: \"location-detail__error\",\n  role: \"alert\"\n}\nconst _hoisted_55 = {\n  key: 1,\n  class: \"location-detail__success\",\n  role: \"status\"\n}\nconst _hoisted_56 = {\n  key: 2,\n  class: \"location-detail__muted\"\n}\nconst _hoisted_57 = {\n  key: 0,\n  class: \"location-detail__error\",\n  role: \"alert\"\n}\nconst _hoisted_58 = [\"href\"]\nconst _hoisted_59 = { class: \"location-detail__scrape-content\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"header\", _hoisted_2, [\n      _createElementVNode(\"div\", _hoisted_3, [\n        _createElementVNode(\"nav\", _hoisted_4, [\n          _createVNode($setup[\"RouterLink\"], { to: \"/\" }, {\n            default: _withCtx(() => _cache[22] || (_cache[22] = [\n              _createTextVNode(\"Locaties\", -1 /* CACHED */)\n            ])),\n            _: 1 /* STABLE */,\n            __: [22]\n          }),\n          _cache[23] || (_cache[23] = _createElementVNode(\"span\", { \"aria-hidden\": \"true\" }, \"/\", -1 /* CACHED */)),\n          _createElementVNode(\"span\", { title: $setup.title }, _toDisplayString($setup.title), 9 /* TEXT, PROPS */, _hoisted_5)\n        ]),\n        ($setup.location && $setup.breakpoint !== 'desktop')\n          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n              ($setup.location.locationType)\n                ? (_openBlock(), _createBlock($setup[\"Badge\"], { key: 0 }, {\n                    default: _withCtx(() => [\n                      _createTextVNode(_toDisplayString($setup.formatLocationType($setup.location.locationType)), 1 /* TEXT */)\n                    ]),\n                    _: 1 /* STABLE */\n                  }))\n                : _createCommentVNode(\"v-if\", true),\n              ($setup.latestAnalysis?.requiresHumanReview)\n                ? (_openBlock(), _createBlock($setup[\"Badge\"], {\n                    key: 1,\n                    tone: \"diverge\"\n                  }, {\n                    default: _withCtx(() => _cache[24] || (_cache[24] = [\n                      _createTextVNode(\"Mens-review\", -1 /* CACHED */)\n                    ])),\n                    _: 1 /* STABLE */,\n                    __: [24]\n                  }))\n                : _createCommentVNode(\"v-if\", true)\n            ]))\n          : _createCommentVNode(\"v-if\", true)\n      ]),\n      _createElementVNode(\"div\", _hoisted_7, [\n        _createElementVNode(\"h1\", { title: $setup.title }, _toDisplayString($setup.title), 9 /* TEXT, PROPS */, _hoisted_8),\n        ($setup.location && $setup.breakpoint === 'desktop')\n          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_9, [\n              ($setup.location.locationType)\n                ? (_openBlock(), _createBlock($setup[\"Badge\"], { key: 0 }, {\n                    default: _withCtx(() => [\n                      _createTextVNode(_toDisplayString($setup.formatLocationType($setup.location.locationType)), 1 /* TEXT */)\n                    ]),\n                    _: 1 /* STABLE */\n                  }))\n                : _createCommentVNode(\"v-if\", true),\n              ($setup.latestAnalysis?.requiresHumanReview)\n                ? (_openBlock(), _createBlock($setup[\"Badge\"], {\n                    key: 1,\n                    tone: \"diverge\"\n                  }, {\n                    default: _withCtx(() => _cache[25] || (_cache[25] = [\n                      _createTextVNode(\"Mens-review\", -1 /* CACHED */)\n                    ])),\n                    _: 1 /* STABLE */,\n                    __: [25]\n                  }))\n                : _createCommentVNode(\"v-if\", true)\n            ]))\n          : _createCommentVNode(\"v-if\", true),\n        ($setup.location)\n          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n              ($setup.breakpoint === 'desktop')\n                ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                    _createElementVNode(\"a\", {\n                      href: $setup.scoutUrl,\n                      class: \"location-detail__scout\",\n                      target: \"_blank\",\n                      rel: \"noopener noreferrer\"\n                    }, [\n                      _cache[26] || (_cache[26] = _createTextVNode(\"SNL Scout \", -1 /* CACHED */)),\n                      _createVNode($setup[\"Icon\"], { name: \"launch\" })\n                    ], 8 /* PROPS */, _hoisted_11),\n                    ($setup.latestAnalysis)\n                      ? (_openBlock(), _createBlock($setup[\"RouterLink\"], {\n                          key: 0,\n                          to: $setup.analysisDetailRoute({ locationId: $props.id, analysisId: $setup.latestAnalysis.id }),\n                          class: \"location-detail__scout\"\n                        }, {\n                          default: _withCtx(() => [\n                            _cache[27] || (_cache[27] = _createTextVNode(\"Laatste rapport \", -1 /* CACHED */)),\n                            _createVNode($setup[\"Icon\"], { name: \"arrow--right\" })\n                          ]),\n                          _: 1 /* STABLE */,\n                          __: [27]\n                        }, 8 /* PROPS */, [\"to\"]))\n                      : _createCommentVNode(\"v-if\", true)\n                  ], 64 /* STABLE_FRAGMENT */))\n                : _createCommentVNode(\"v-if\", true),\n              _createVNode($setup[\"Button\"], {\n                variant: \"primary\",\n                onClick: _cache[0] || (_cache[0] = $event => ($setup.runOpen = true))\n              }, {\n                default: _withCtx(() => [\n                  _createTextVNode(_toDisplayString($setup.breakpoint === 'phone' ? 'Analyse' : 'Nieuwe analyse'), 1 /* TEXT */),\n                  _createVNode($setup[\"Icon\"], { name: \"flash\" })\n                ]),\n                _: 1 /* STABLE */\n              }),\n              ($setup.breakpoint !== 'desktop')\n                ? (_openBlock(), _createBlock($setup[\"Popover\"], {\n                    key: 1,\n                    open: $setup.actionsOpen,\n                    \"onUpdate:open\": _cache[4] || (_cache[4] = $event => (($setup.actionsOpen) = $event)),\n                    align: \"end\"\n                  }, {\n                    trigger: _withCtx(() => [\n                      _createVNode($setup[\"Button\"], {\n                        variant: \"ghost\",\n                        class: \"location-detail__more\",\n                        \"aria-label\": \"Meer locatieacties\"\n                      }, {\n                        default: _withCtx(() => _cache[28] || (_cache[28] = [\n                          _createElementVNode(\"span\", { \"aria-hidden\": \"true\" }, \"⋮\", -1 /* CACHED */)\n                        ])),\n                        _: 1 /* STABLE */,\n                        __: [28]\n                      })\n                    ]),\n                    default: _withCtx(() => [\n                      _createElementVNode(\"div\", _hoisted_12, [\n                        ($setup.latestAnalysis)\n                          ? (_openBlock(), _createBlock($setup[\"RouterLink\"], {\n                              key: 0,\n                              to: $setup.analysisDetailRoute({ locationId: $props.id, analysisId: $setup.latestAnalysis.id }),\n                              onClick: _cache[1] || (_cache[1] = $event => ($setup.actionsOpen = false))\n                            }, {\n                              default: _withCtx(() => [\n                                _cache[29] || (_cache[29] = _createTextVNode(\"Laatste rapport \", -1 /* CACHED */)),\n                                _createVNode($setup[\"Icon\"], { name: \"arrow--right\" })\n                              ]),\n                              _: 1 /* STABLE */,\n                              __: [29]\n                            }, 8 /* PROPS */, [\"to\"]))\n                          : _createCommentVNode(\"v-if\", true),\n                        _createVNode($setup[\"RouterLink\"], {\n                          to: $setup.tabPath('veldfeedback'),\n                          onClick: _cache[2] || (_cache[2] = $event => ($setup.actionsOpen = false))\n                        }, {\n                          default: _withCtx(() => _cache[30] || (_cache[30] = [\n                            _createTextVNode(\"Veldfeedback\", -1 /* CACHED */)\n                          ])),\n                          _: 1 /* STABLE */,\n                          __: [30]\n                        }, 8 /* PROPS */, [\"to\"]),\n                        _createElementVNode(\"a\", {\n                          href: $setup.scoutUrl,\n                          target: \"_blank\",\n                          rel: \"noopener noreferrer\",\n                          onClick: _cache[3] || (_cache[3] = $event => ($setup.actionsOpen = false))\n                        }, [\n                          _cache[31] || (_cache[31] = _createTextVNode(\"SNL Scout \", -1 /* CACHED */)),\n                          _createVNode($setup[\"Icon\"], { name: \"launch\" })\n                        ], 8 /* PROPS */, _hoisted_13)\n                      ])\n                    ]),\n                    _: 1 /* STABLE */\n                  }, 8 /* PROPS */, [\"open\"]))\n                : _createCommentVNode(\"v-if\", true)\n            ]))\n          : _createCommentVNode(\"v-if\", true)\n      ]),\n      ($setup.location)\n        ? (_openBlock(), _createBlock($setup[\"PageTabs\"], {\n            key: 0,\n            tabs: $setup.tabs,\n            active: $setup.activeTab\n          }, null, 8 /* PROPS */, [\"tabs\", \"active\"]))\n        : _createCommentVNode(\"v-if\", true)\n    ]),\n    ($setup.location)\n      ? (_openBlock(), _createBlock($setup[\"MetaBar\"], {\n          key: 0,\n          items: $setup.meta\n        }, null, 8 /* PROPS */, [\"items\"]))\n      : _createCommentVNode(\"v-if\", true),\n    _createVNode($setup[\"PageBody\"], { class: \"location-detail__body\" }, {\n      default: _withCtx(() => [\n        ($setup.loading)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_14, \"Locatiegegevens laden...\"))\n          : ($setup.error)\n            ? (_openBlock(), _createElementBlock(\"div\", _hoisted_15, [\n                _createElementVNode(\"p\", _hoisted_16, _toDisplayString($setup.error), 1 /* TEXT */),\n                _createVNode($setup[\"Button\"], { onClick: $setup.loadLocation }, {\n                  default: _withCtx(() => _cache[32] || (_cache[32] = [\n                    _createTextVNode(\"Opnieuw proberen\", -1 /* CACHED */)\n                  ])),\n                  _: 1 /* STABLE */,\n                  __: [32]\n                }, 8 /* PROPS */, [\"onClick\"])\n              ]))\n            : (!$setup.location)\n              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_17, \"Locatie niet gevonden.\"))\n              : (_openBlock(), _createElementBlock(_Fragment, { key: 3 }, [\n                  _withDirectives(_createElementVNode(\"div\", _hoisted_18, [\n                    _createVNode($setup[\"Panel\"], {\n                      title: \"Beeldmateriaal\",\n                      class: \"location-detail__image-panel\",\n                      flush: \"\"\n                    }, _createSlots({\n                      default: _withCtx(() => [\n                        ($setup.imagesLoading)\n                          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_19, \"Afbeeldingen laden...\"))\n                          : ($setup.coordinates)\n                            ? (_openBlock(), _createBlock($setup[\"LocationImageTabs\"], {\n                                key: $props.id,\n                                images: $setup.images,\n                                coordinates: $setup.coordinates,\n                                preferred: \"satellite-cadastral\"\n                              }, null, 8 /* PROPS */, [\"images\", \"coordinates\"]))\n                            : (_openBlock(), _createElementBlock(\"p\", _hoisted_20, \"Deze locatie heeft geen coördinaten, dus er is geen beeld op te halen.\")),\n                        ($setup.imageErrors.length)\n                          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_21, [\n                              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.imageErrors, (message, index) => {\n                                return (_openBlock(), _createElementBlock(\"p\", { key: index }, _toDisplayString(message), 1 /* TEXT */))\n                              }), 128 /* KEYED_FRAGMENT */))\n                            ]))\n                          : _createCommentVNode(\"v-if\", true),\n                        ($setup.downloading)\n                          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_22, \"Bezig met ophalen van satelliet- en Street View-beelden...\"))\n                          : _createCommentVNode(\"v-if\", true)\n                      ]),\n                      _: 2 /* DYNAMIC */\n                    }, [\n                      ($setup.coordinates)\n                        ? {\n                            name: \"actions\",\n                            fn: _withCtx(() => [\n                              _createVNode($setup[\"Button\"], {\n                                busy: $setup.downloading,\n                                onClick: _cache[5] || (_cache[5] = $event => ($setup.loadImages(true)))\n                              }, {\n                                default: _withCtx(() => [\n                                  _createTextVNode(_toDisplayString($setup.downloading ? 'Ophalen...' : 'Opnieuw ophalen'), 1 /* TEXT */)\n                                ]),\n                                _: 1 /* STABLE */\n                              }, 8 /* PROPS */, [\"busy\"])\n                            ]),\n                            key: \"0\"\n                          }\n                        : undefined\n                    ]), 1024 /* DYNAMIC_SLOTS */),\n                    _createElementVNode(\"div\", _hoisted_23, [\n                      _createVNode($setup[\"Panel\"], {\n                        title: \"Laatste analyse\",\n                        flush: \"\"\n                      }, {\n                        actions: _withCtx(() => [\n                          ($setup.latestAnalysis)\n                            ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                                key: 0,\n                                variant: \"ghost\",\n                                onClick: _cache[6] || (_cache[6] = $event => ($setup.router.push($setup.analysisDetailRoute({ locationId: $props.id, analysisId: $setup.latestAnalysis.id }))))\n                              }, {\n                                default: _withCtx(() => _cache[33] || (_cache[33] = [\n                                  _createTextVNode(\"Rapport\", -1 /* CACHED */)\n                                ])),\n                                _: 1 /* STABLE */,\n                                __: [33]\n                              }))\n                            : _createCommentVNode(\"v-if\", true)\n                        ]),\n                        default: _withCtx(() => [\n                          ($setup.analysesLoading)\n                            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_24, \"Analyses laden...\"))\n                            : ($setup.latestAnalysis)\n                              ? (_openBlock(), _createBlock($setup[\"LocationAnalysisSummary\"], {\n                                  key: $setup.latestAnalysis.id,\n                                  analysis: $setup.latestAnalysis\n                                }, null, 8 /* PROPS */, [\"analysis\"]))\n                              : (!$setup.analysesError)\n                                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_25, \"Nog geen analyse. Start er een met 'Nieuwe analyse'.\"))\n                                : _createCommentVNode(\"v-if\", true),\n                          ($setup.analysesError)\n                            ? (_openBlock(), _createElementBlock(\"div\", _hoisted_26, [\n                                _createElementVNode(\"p\", _hoisted_27, _toDisplayString($setup.analysesError), 1 /* TEXT */),\n                                _createVNode($setup[\"Button\"], { onClick: $setup.refreshAnalyses }, {\n                                  default: _withCtx(() => _cache[34] || (_cache[34] = [\n                                    _createTextVNode(\"Opnieuw proberen\", -1 /* CACHED */)\n                                  ])),\n                                  _: 1 /* STABLE */,\n                                  __: [34]\n                                }, 8 /* PROPS */, [\"onClick\"])\n                              ]))\n                            : _createCommentVNode(\"v-if\", true)\n                        ]),\n                        _: 1 /* STABLE */\n                      }),\n                      _createVNode($setup[\"Panel\"], {\n                        title: \"Gegevens\",\n                        flush: \"\"\n                      }, {\n                        default: _withCtx(() => [\n                          _createElementVNode(\"dl\", _hoisted_28, [\n                            (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.fields, (field) => {\n                              return (_openBlock(), _createElementBlock(\"div\", {\n                                key: field.label,\n                                class: \"location-detail__field\"\n                              }, [\n                                _createElementVNode(\"dt\", null, _toDisplayString(field.label), 1 /* TEXT */),\n                                _createElementVNode(\"dd\", null, [\n                                  (field.sbi)\n                                    ? (_openBlock(), _createBlock($setup[\"SbiCodesDisplay\"], {\n                                        key: 0,\n                                        \"sbi-codes\": String(field.value)\n                                      }, null, 8 /* PROPS */, [\"sbi-codes\"]))\n                                    : (field.href)\n                                      ? (_openBlock(), _createElementBlock(\"a\", {\n                                          key: 1,\n                                          href: field.href,\n                                          target: \"_blank\",\n                                          rel: \"noopener noreferrer\"\n                                        }, _toDisplayString(field.value), 9 /* TEXT, PROPS */, _hoisted_29))\n                                      : (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [\n                                          _createTextVNode(_toDisplayString(field.value), 1 /* TEXT */)\n                                        ], 64 /* STABLE_FRAGMENT */))\n                                ])\n                              ]))\n                            }), 128 /* KEYED_FRAGMENT */))\n                          ]),\n                          ($setup.safeWebsiteUrl($setup.location.businessProfileUrl))\n                            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_30, [\n                                _createElementVNode(\"a\", {\n                                  href: $setup.safeWebsiteUrl($setup.location.businessProfileUrl)!,\n                                  target: \"_blank\",\n                                  rel: \"noopener noreferrer\"\n                                }, \"Bekijk bedrijfsprofiel op Bedrijfsdata.nl\", 8 /* PROPS */, _hoisted_31)\n                              ]))\n                            : _createCommentVNode(\"v-if\", true)\n                        ]),\n                        _: 1 /* STABLE */\n                      }),\n                      ($setup.location.website)\n                        ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n                            key: 0,\n                            title: \"Websitedata\"\n                          }, {\n                            actions: _withCtx(() => [\n                              _createVNode($setup[\"Button\"], {\n                                busy: $setup.scraping,\n                                onClick: _cache[7] || (_cache[7] = $event => ($setup.loadScrapes(true)))\n                              }, {\n                                default: _withCtx(() => [\n                                  _createTextVNode(_toDisplayString($setup.scraping ? 'Ophalen...' : 'Haal opnieuw op'), 1 /* TEXT */)\n                                ]),\n                                _: 1 /* STABLE */\n                              }, 8 /* PROPS */, [\"busy\"])\n                            ]),\n                            default: _withCtx(() => [\n                              ($setup.scrapeLoading)\n                                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_32, \"Websitedata laden...\"))\n                                : (!$setup.scrapes.length && !$setup.scrapeError)\n                                  ? (_openBlock(), _createElementBlock(\"p\", _hoisted_33, \"Nog geen data opgehaald. Klik 'Haal opnieuw op' om te starten.\"))\n                                  : _createCommentVNode(\"v-if\", true),\n                              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.scrapes, (result) => {\n                                return (_openBlock(), _createElementBlock(\"div\", {\n                                  key: result.source,\n                                  class: \"location-detail__scrape\"\n                                }, [\n                                  _createVNode($setup[\"Badge\"], {\n                                    tone: result.fetched ? 'score' : 'neutral'\n                                  }, {\n                                    default: _withCtx(() => [\n                                      _createTextVNode(_toDisplayString(result.fetched ? 'Opgehaald' : 'Niet beschikbaar'), 1 /* TEXT */)\n                                    ]),\n                                    _: 2 /* DYNAMIC */\n                                  }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"tone\"]),\n                                  _createElementVNode(\"span\", null, _toDisplayString(result.label), 1 /* TEXT */),\n                                  (result.fetched && result.fetchedAt)\n                                    ? (_openBlock(), _createElementBlock(\"span\", _hoisted_34, _toDisplayString($setup.formatAnalysisDate(result.fetchedAt)), 1 /* TEXT */))\n                                    : _createCommentVNode(\"v-if\", true),\n                                  (result.fetched)\n                                    ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                                        key: 1,\n                                        variant: \"ghost\",\n                                        onClick: $event => ($setup.scrapeModal = result)\n                                      }, {\n                                        default: _withCtx(() => _cache[35] || (_cache[35] = [\n                                          _createTextVNode(\"Bekijk inhoud\", -1 /* CACHED */)\n                                        ])),\n                                        _: 2 /* DYNAMIC */,\n                                        __: [35]\n                                      }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"onClick\"]))\n                                    : _createCommentVNode(\"v-if\", true)\n                                ]))\n                              }), 128 /* KEYED_FRAGMENT */)),\n                              ($setup.scrapeError)\n                                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_35, _toDisplayString($setup.scrapeError), 1 /* TEXT */))\n                                : _createCommentVNode(\"v-if\", true),\n                              ($setup.scraping)\n                                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_36, \"Bezig met ophalen van websitedata...\"))\n                                : _createCommentVNode(\"v-if\", true)\n                            ]),\n                            _: 1 /* STABLE */\n                          }))\n                        : _createCommentVNode(\"v-if\", true),\n                      ($setup.socials.length)\n                        ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n                            key: 1,\n                            title: \"Social media\"\n                          }, {\n                            default: _withCtx(() => [\n                              _createElementVNode(\"div\", _hoisted_37, [\n                                (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.socials, (social) => {\n                                  return (_openBlock(), _createElementBlock(\"a\", {\n                                    key: social.label,\n                                    href: social.href!,\n                                    target: \"_blank\",\n                                    rel: \"noopener noreferrer\"\n                                  }, _toDisplayString(social.label), 9 /* TEXT, PROPS */, _hoisted_38))\n                                }), 128 /* KEYED_FRAGMENT */))\n                              ])\n                            ]),\n                            _: 1 /* STABLE */\n                          }))\n                        : _createCommentVNode(\"v-if\", true)\n                    ]),\n                    ($setup.coordinates)\n                      ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n                          key: 0,\n                          title: \"Kaart\",\n                          class: \"location-detail__map-panel\",\n                          flush: \"\"\n                        }, {\n                          actions: _withCtx(() => [\n                            _createVNode($setup[\"Button\"], {\n                              variant: $setup.mapMode === 'map' ? 'primary' : 'ghost',\n                              \"aria-pressed\": $setup.mapMode === 'map',\n                              onClick: _cache[8] || (_cache[8] = $event => ($setup.mapMode = 'map'))\n                            }, {\n                              default: _withCtx(() => _cache[36] || (_cache[36] = [\n                                _createTextVNode(\"Kaart\", -1 /* CACHED */)\n                              ])),\n                              _: 1 /* STABLE */,\n                              __: [36]\n                            }, 8 /* PROPS */, [\"variant\", \"aria-pressed\"]),\n                            _createVNode($setup[\"Button\"], {\n                              variant: $setup.mapMode === 'streetview' ? 'primary' : 'ghost',\n                              \"aria-pressed\": $setup.mapMode === 'streetview',\n                              onClick: _cache[9] || (_cache[9] = $event => ($setup.mapMode = 'streetview'))\n                            }, {\n                              default: _withCtx(() => _cache[37] || (_cache[37] = [\n                                _createTextVNode(\"Street View\", -1 /* CACHED */)\n                              ])),\n                              _: 1 /* STABLE */,\n                              __: [37]\n                            }, 8 /* PROPS */, [\"variant\", \"aria-pressed\"])\n                          ]),\n                          default: _withCtx(() => [\n                            (_openBlock(), _createElementBlock(\"iframe\", {\n                              key: `${$props.id}-${$setup.mapMode}`,\n                              src: $setup.mapSource,\n                              title: $setup.mapMode === 'map' ? `Kaart van ${$setup.location.companyName}` : `Street View van ${$setup.location.companyName}`,\n                              class: \"location-detail__map\",\n                              loading: \"lazy\",\n                              referrerpolicy: \"no-referrer-when-downgrade\",\n                              allowfullscreen: \"\"\n                            }, null, 8 /* PROPS */, _hoisted_39)),\n                            _createElementVNode(\"div\", _hoisted_40, [\n                              _createElementVNode(\"a\", {\n                                href: $setup.googleMapsUrl($setup.coordinates),\n                                target: \"_blank\",\n                                rel: \"noopener noreferrer\"\n                              }, \"Open in Google Maps\", 8 /* PROPS */, _hoisted_41),\n                              _createElementVNode(\"a\", {\n                                href: $setup.streetViewUrl($setup.coordinates),\n                                target: \"_blank\",\n                                rel: \"noopener noreferrer\"\n                              }, \"Open Street View\", 8 /* PROPS */, _hoisted_42)\n                            ])\n                          ]),\n                          _: 1 /* STABLE */\n                        }))\n                      : _createCommentVNode(\"v-if\", true),\n                    ($setup.coordinates)\n                      ? (_openBlock(), _createBlock($setup[\"CadastralMap\"], {\n                          key: $props.id,\n                          class: \"location-detail__cadastral-panel\",\n                          \"location-id\": $props.id,\n                          latitude: $setup.coordinates.lat,\n                          longitude: $setup.coordinates.lng,\n                          \"satellite-image-url\": $setup.cadastralImage,\n                          onLoaded: _cache[10] || (_cache[10] = $event => ($setup.cadastral = $event))\n                        }, null, 8 /* PROPS */, [\"location-id\", \"latitude\", \"longitude\", \"satellite-image-url\"]))\n                      : _createCommentVNode(\"v-if\", true)\n                  ], 512 /* NEED_PATCH */), [\n                    [_vShow, $setup.activeTab === 'overzicht']\n                  ]),\n                  ($setup.activeTab === 'analyses')\n                    ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n                        key: 0,\n                        title: \"Analysehistorie\",\n                        flush: \"\"\n                      }, {\n                        actions: _withCtx(() => [\n                          _createVNode($setup[\"Button\"], {\n                            disabled: $setup.deleting,\n                            onClick: $setup.refreshAnalyses\n                          }, {\n                            default: _withCtx(() => _cache[38] || (_cache[38] = [\n                              _createTextVNode(\"Vernieuwen\", -1 /* CACHED */)\n                            ])),\n                            _: 1 /* STABLE */,\n                            __: [38]\n                          }, 8 /* PROPS */, [\"disabled\", \"onClick\"]),\n                          ($setup.selectedAnalyses.size)\n                            ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                                key: 0,\n                                variant: \"danger\",\n                                busy: $setup.deleting,\n                                onClick: _cache[11] || (_cache[11] = $event => ($setup.deleteOpen = true))\n                              }, {\n                                default: _withCtx(() => [\n                                  _createTextVNode(\"Verwijder (\" + _toDisplayString($setup.selectedAnalyses.size) + \")\", 1 /* TEXT */)\n                                ]),\n                                _: 1 /* STABLE */\n                              }, 8 /* PROPS */, [\"busy\"]))\n                            : _createCommentVNode(\"v-if\", true)\n                        ]),\n                        default: _withCtx(() => [\n                          ($setup.startedId)\n                            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_43, \"Analyse #\" + _toDisplayString($setup.startedId) + \" gestart. De status wordt automatisch bijgewerkt.\", 1 /* TEXT */))\n                            : _createCommentVNode(\"v-if\", true),\n                          ($setup.deletedMessage)\n                            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_44, _toDisplayString($setup.deletedMessage), 1 /* TEXT */))\n                            : _createCommentVNode(\"v-if\", true),\n                          ($setup.analysesError)\n                            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_45, _toDisplayString($setup.analysesError), 1 /* TEXT */))\n                            : _createCommentVNode(\"v-if\", true),\n                          ($setup.analysesLoading)\n                            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_46, \"Analyses laden...\"))\n                            : (!$setup.analyses.length && !$setup.analysesError)\n                              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_47, \"Nog geen analyses voor deze locatie.\"))\n                              : ($setup.analyses.length)\n                                ? (_openBlock(), _createElementBlock(\"div\", _hoisted_48, [\n                                    _createElementVNode(\"table\", _hoisted_49, [\n                                      _createElementVNode(\"thead\", null, [\n                                        _createElementVNode(\"tr\", null, [\n                                          _createElementVNode(\"th\", null, [\n                                            _createVNode($setup[\"Checkbox\"], {\n                                              \"model-value\": $setup.allSelected,\n                                              indeterminate: $setup.selectedAnalyses.size > 0 && !$setup.allSelected,\n                                              disabled: $setup.deleting,\n                                              \"aria-label\": \"Alle analyses selecteren\",\n                                              \"onUpdate:modelValue\": $setup.selectAll\n                                            }, null, 8 /* PROPS */, [\"model-value\", \"indeterminate\", \"disabled\", \"onUpdate:modelValue\"])\n                                          ]),\n                                          _cache[39] || (_cache[39] = _createElementVNode(\"th\", null, \"Analyse\", -1 /* CACHED */)),\n                                          _cache[40] || (_cache[40] = _createElementVNode(\"th\", null, \"Datum\", -1 /* CACHED */)),\n                                          _cache[41] || (_cache[41] = _createElementVNode(\"th\", null, \"Gebruiker\", -1 /* CACHED */)),\n                                          _cache[42] || (_cache[42] = _createElementVNode(\"th\", null, \"Aanpak\", -1 /* CACHED */)),\n                                          _cache[43] || (_cache[43] = _createElementVNode(\"th\", null, \"Score\", -1 /* CACHED */)),\n                                          _cache[44] || (_cache[44] = _createElementVNode(\"th\", null, \"Review\", -1 /* CACHED */)),\n                                          _cache[45] || (_cache[45] = _createElementVNode(\"th\", null, \"Status\", -1 /* CACHED */))\n                                        ])\n                                      ]),\n                                      _createElementVNode(\"tbody\", null, [\n                                        (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.sortedAnalyses, (analysis) => {\n                                          return (_openBlock(), _createElementBlock(\"tr\", {\n                                            key: analysis.id,\n                                            class: _normalizeClass([\"location-detail__analysis-row\", { 'location-detail__row--selected': $setup.selectedAnalyses.has(analysis.id) }]),\n                                            onClick: $event => ($setup.router.push($setup.analysisDetailRoute({ locationId: $props.id, analysisId: analysis.id })))\n                                          }, [\n                                            _createElementVNode(\"td\", {\n                                              onClick: _cache[12] || (_cache[12] = _withModifiers(() => {}, [\"stop\"]))\n                                            }, [\n                                              _createVNode($setup[\"Checkbox\"], {\n                                                \"model-value\": $setup.selectedAnalyses.has(analysis.id),\n                                                disabled: $setup.deleting,\n                                                \"aria-label\": `Selecteer analyse #${analysis.id}`,\n                                                \"onUpdate:modelValue\": $event => ($setup.toggleAnalysis({ id: analysis.id, selected: $event }))\n                                              }, null, 8 /* PROPS */, [\"model-value\", \"disabled\", \"aria-label\", \"onUpdate:modelValue\"])\n                                            ]),\n                                            _createElementVNode(\"td\", _hoisted_51, [\n                                              _createVNode($setup[\"RouterLink\"], {\n                                                to: $setup.analysisDetailRoute({ locationId: $props.id, analysisId: analysis.id }),\n                                                class: \"location-detail__analysis-link\",\n                                                onClick: _cache[13] || (_cache[13] = _withModifiers(() => {}, [\"stop\"]))\n                                              }, {\n                                                default: _withCtx(() => [\n                                                  _createTextVNode(\"#\" + _toDisplayString(analysis.id), 1 /* TEXT */)\n                                                ]),\n                                                _: 2 /* DYNAMIC */\n                                              }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"])\n                                            ]),\n                                            _createElementVNode(\"td\", null, [\n                                              _createTextVNode(_toDisplayString($setup.formatAnalysisDate(analysis.createdAt)) + \" \", 1 /* TEXT */),\n                                              (analysis.isDryRun)\n                                                ? (_openBlock(), _createBlock($setup[\"Badge\"], { key: 0 }, {\n                                                    default: _withCtx(() => _cache[46] || (_cache[46] = [\n                                                      _createTextVNode(\"Dry run\", -1 /* CACHED */)\n                                                    ])),\n                                                    _: 1 /* STABLE */,\n                                                    __: [46]\n                                                  }))\n                                                : _createCommentVNode(\"v-if\", true)\n                                            ]),\n                                            _createElementVNode(\"td\", null, _toDisplayString(analysis.userName || '–'), 1 /* TEXT */),\n                                            _createElementVNode(\"td\", null, _toDisplayString(analysis.analysisMode), 1 /* TEXT */),\n                                            _createElementVNode(\"td\", null, [\n                                              _createVNode($setup[\"ScoreBar\"], {\n                                                score: analysis.status === 'completed' ? analysis.consensusOverallScore : null\n                                              }, null, 8 /* PROPS */, [\"score\"])\n                                            ]),\n                                            _createElementVNode(\"td\", null, [\n                                              (analysis.requiresHumanReview)\n                                                ? (_openBlock(), _createBlock($setup[\"Badge\"], {\n                                                    key: 0,\n                                                    tone: \"diverge\"\n                                                  }, {\n                                                    default: _withCtx(() => _cache[47] || (_cache[47] = [\n                                                      _createTextVNode(\"Mens-review\", -1 /* CACHED */)\n                                                    ])),\n                                                    _: 1 /* STABLE */,\n                                                    __: [47]\n                                                  }))\n                                                : (_openBlock(), _createElementBlock(\"span\", _hoisted_52, \"–\"))\n                                            ]),\n                                            _createElementVNode(\"td\", null, [\n                                              _createVNode($setup[\"Badge\"], {\n                                                tone: $setup.analysisStatusLabel(analysis.status).tone\n                                              }, {\n                                                default: _withCtx(() => [\n                                                  _createTextVNode(_toDisplayString($setup.analysisStatusLabel(analysis.status).label), 1 /* TEXT */)\n                                                ]),\n                                                _: 2 /* DYNAMIC */\n                                              }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"tone\"])\n                                            ])\n                                          ], 10 /* CLASS, PROPS */, _hoisted_50))\n                                        }), 128 /* KEYED_FRAGMENT */))\n                                      ])\n                                    ])\n                                  ]))\n                                : _createCommentVNode(\"v-if\", true)\n                        ]),\n                        _: 1 /* STABLE */\n                      }))\n                    : _createCommentVNode(\"v-if\", true),\n                  ($setup.activeTab === 'veldfeedback')\n                    ? (_openBlock(), _createElementBlock(\"div\", _hoisted_53, [\n                        _createVNode($setup[\"LocationFeedbackList\"], {\n                          feedback: $setup.feedback,\n                          loading: $setup.feedbackLoading,\n                          error: $setup.feedbackError,\n                          onRetry: $setup.loadFeedback\n                        }, null, 8 /* PROPS */, [\"feedback\", \"loading\", \"error\", \"onRetry\"]),\n                        _createVNode($setup[\"Panel\"], { title: \"Werkelijke situatie (ground truth)\" }, {\n                          default: _withCtx(() => [\n                            _createElementVNode(\"form\", {\n                              class: \"location-detail__ground-truth\",\n                              onSubmit: _cache[17] || (_cache[17] = _withModifiers((...args) => ($setup.saveGroundTruth && $setup.saveGroundTruth(...args)), [\"prevent\"]))\n                            }, [\n                              _cache[48] || (_cache[48] = _createElementVNode(\"p\", { class: \"location-detail__muted\" }, \"Leg vast wat er op de locatie is vastgesteld.\", -1 /* CACHED */)),\n                              _createVNode($setup[\"Input\"], {\n                                modelValue: $setup.parkingSpots,\n                                \"onUpdate:modelValue\": _cache[14] || (_cache[14] = $event => (($setup.parkingSpots) = $event)),\n                                type: \"number\",\n                                label: \"Werkelijk aantal parkeerplaatsen\",\n                                disabled: $setup.saving\n                              }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\"]),\n                              _createVNode($setup[\"Select\"], {\n                                modelValue: $setup.adjacent,\n                                \"onUpdate:modelValue\": _cache[15] || (_cache[15] = $event => (($setup.adjacent) = $event)),\n                                options: $setup.adjacentOptions,\n                                label: \"Zijn er aangrenzende parkeerplaatsen?\",\n                                disabled: $setup.saving\n                              }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\"]),\n                              _createVNode($setup[\"Textarea\"], {\n                                modelValue: $setup.notes,\n                                \"onUpdate:modelValue\": _cache[16] || (_cache[16] = $event => (($setup.notes) = $event)),\n                                label: \"Notities\",\n                                rows: 4,\n                                disabled: $setup.saving\n                              }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\"]),\n                              ($setup.groundTruthError)\n                                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_54, _toDisplayString($setup.groundTruthError), 1 /* TEXT */))\n                                : _createCommentVNode(\"v-if\", true),\n                              ($setup.groundTruthSaved)\n                                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_55, \"Werkelijke situatie opgeslagen.\"))\n                                : _createCommentVNode(\"v-if\", true),\n                              ($setup.location.groundTruthUpdatedAt)\n                                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_56, \"Laatst bijgewerkt: \" + _toDisplayString($setup.formatAnalysisDate($setup.location.groundTruthUpdatedAt)), 1 /* TEXT */))\n                                : _createCommentVNode(\"v-if\", true),\n                              _createElementVNode(\"div\", null, [\n                                _createVNode($setup[\"Button\"], {\n                                  type: \"submit\",\n                                  variant: \"primary\",\n                                  busy: $setup.saving\n                                }, {\n                                  default: _withCtx(() => [\n                                    _createTextVNode(_toDisplayString($setup.saving ? 'Opslaan...' : 'Opslaan'), 1 /* TEXT */)\n                                  ]),\n                                  _: 1 /* STABLE */\n                                }, 8 /* PROPS */, [\"busy\"])\n                              ])\n                            ], 32 /* NEED_HYDRATION */)\n                          ]),\n                          _: 1 /* STABLE */\n                        }),\n                        (_openBlock(), _createBlock($setup[\"RetrievableFeedbackPreview\"], {\n                          key: $props.id,\n                          \"location-id\": $props.id\n                        }, null, 8 /* PROPS */, [\"location-id\"]))\n                      ]))\n                    : _createCommentVNode(\"v-if\", true)\n                ], 64 /* STABLE_FRAGMENT */))\n      ]),\n      _: 1 /* STABLE */\n    }),\n    ($setup.location)\n      ? (_openBlock(), _createBlock($setup[\"RunAnalysisDialog\"], {\n          key: $props.id,\n          open: $setup.runOpen,\n          \"onUpdate:open\": _cache[18] || (_cache[18] = $event => (($setup.runOpen) = $event)),\n          \"location-id\": $props.id,\n          onStarted: $setup.onAnalysisStarted\n        }, null, 8 /* PROPS */, [\"open\", \"location-id\"]))\n      : _createCommentVNode(\"v-if\", true),\n    _createVNode($setup[\"Dialog\"], {\n      open: $setup.deleteOpen,\n      \"onUpdate:open\": _cache[20] || (_cache[20] = $event => (($setup.deleteOpen) = $event)),\n      title: \"Analyses verwijderen?\",\n      description: `De ${$setup.selectedAnalyses.size === 1 ? 'geselecteerde analyse verdwijnt' : `${$setup.selectedAnalyses.size} geselecteerde analyses verdwijnen`} uit de analysehistorie.`\n    }, {\n      footer: _withCtx(() => [\n        _createVNode($setup[\"Button\"], {\n          disabled: $setup.deleting,\n          onClick: _cache[19] || (_cache[19] = $event => ($setup.deleteOpen = false))\n        }, {\n          default: _withCtx(() => _cache[49] || (_cache[49] = [\n            _createTextVNode(\"Annuleren\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [49]\n        }, 8 /* PROPS */, [\"disabled\"]),\n        _createVNode($setup[\"Button\"], {\n          variant: \"danger\",\n          busy: $setup.deleting,\n          onClick: $setup.confirmDelete\n        }, {\n          default: _withCtx(() => [\n            _createTextVNode(_toDisplayString($setup.deleting ? 'Verwijderen...' : 'Verwijderen'), 1 /* TEXT */)\n          ]),\n          _: 1 /* STABLE */\n        }, 8 /* PROPS */, [\"busy\"])\n      ]),\n      default: _withCtx(() => [\n        _cache[50] || (_cache[50] = _createElementVNode(\"p\", null, \"Deze analyses worden in de prullenbak geplaatst.\", -1 /* CACHED */)),\n        ($setup.analysesError)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_57, _toDisplayString($setup.analysesError), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true)\n      ]),\n      _: 1 /* STABLE */,\n      __: [50]\n    }, 8 /* PROPS */, [\"open\", \"description\"]),\n    _createVNode($setup[\"Dialog\"], {\n      open: $setup.scrapeModalOpen,\n      \"onUpdate:open\": _cache[21] || (_cache[21] = $event => (($setup.scrapeModalOpen) = $event)),\n      title: $setup.scrapeModal?.label ?? 'Websitedata',\n      \"max-width\": 760\n    }, {\n      default: _withCtx(() => [\n        ($setup.scrapeModal)\n          ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n              ($setup.safeWebsiteUrl($setup.scrapeModal.url))\n                ? (_openBlock(), _createElementBlock(\"a\", {\n                    key: 0,\n                    href: $setup.safeWebsiteUrl($setup.scrapeModal.url)!,\n                    target: \"_blank\",\n                    rel: \"noopener noreferrer\",\n                    class: \"location-detail__scrape-link\"\n                  }, _toDisplayString($setup.scrapeModal.url), 9 /* TEXT, PROPS */, _hoisted_58))\n                : _createCommentVNode(\"v-if\", true),\n              _createElementVNode(\"pre\", _hoisted_59, _toDisplayString($setup.scrapeModal.content), 1 /* TEXT */)\n            ], 64 /* STABLE_FRAGMENT */))\n          : _createCommentVNode(\"v-if\", true)\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"open\", \"title\"])\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LocationDetailView.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LocationDetailView.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LocationDetailView.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/LocationDetailView.vue\";script.__scopeId = \"data-v-a6b35371\";export default script;","<script setup lang=\"ts\">\nimport { computed, shallowRef, watch } from \"vue\";\nimport { RouterLink, useRoute, useRouter } from \"vue-router\";\nimport PageBody from \"../components/shell/PageBody.vue\";\nimport PageTabs from \"../components/ui/PageTabs.vue\";\nimport Panel from \"../components/ui/Panel.vue\";\nimport Button from \"../components/ui/Button.vue\";\nimport Badge from \"../components/ui/Badge.vue\";\nimport ScoreBar from \"../components/ui/ScoreBar.vue\";\nimport Dialog from \"../components/ui/Dialog.vue\";\nimport AnalysisComparison from \"../components/analyses/AnalysisComparison.vue\";\nimport AnalysisFinalScore from \"../components/analyses/AnalysisFinalScore.vue\";\nimport AnalysisModelResults from \"../components/analyses/AnalysisModelResults.vue\";\nimport RetrievedFeedbackPanel from \"../components/analyses/RetrievedFeedbackPanel.vue\";\nimport DebugPanel from \"../components/analyses/DebugPanel.vue\";\nimport GroundTruthEditor from \"../components/analyses/GroundTruthEditor.vue\";\nimport LocationImageGallery from \"../components/locations/LocationImageGallery.vue\";\nimport { useAnalysisDetail } from \"../lib/use-analysis-detail\";\nimport { analysisUsage, primaryModelResult } from \"../lib/analysis-detail\";\nimport { ASPECT_LABELS } from \"../lib/analysis-scoring\";\nimport { resolveActiveTab } from \"../lib/tab-url\";\nimport { analysisStatusLabel, formatAnalysisDate } from \"../lib/analyses-format\";\nimport { useBreakpoint } from \"../lib/use-breakpoint\";\n\nconst props = defineProps<{ id: number; analysisId: number }>();\nconst route = useRoute();\nconst router = useRouter();\nconst breakpoint = useBreakpoint();\nconst compact = computed(() => breakpoint.value !== \"desktop\");\nconst {\n  analysis, location, images, loading, imageLoading, error, locationError, imageError,\n  actionError, starting, cancelling, polling, coordinates,\n  refreshAnalysis, refreshLocation, loadImages, rerun, cancel,\n} = useAnalysisDetail(() => ({ id: props.id, analysisId: props.analysisId }));\nconst confirmCancel = shallowRef(false);\nconst photosOpen = shallowRef(true);\nconst activeTab = computed(() => resolveActiveTab(typeof route.query.tab === \"string\" ? route.query.tab : null, [\"scoring\", \"observaties\", \"services\", \"debug\"], \"scoring\") as \"scoring\" | \"observaties\" | \"services\" | \"debug\");\nconst tabs = computed(() => [\n  { value: \"scoring\", label: \"Scoring\" },\n  { value: \"observaties\", label: \"Observaties\" },\n  { value: \"services\", label: \"Services\" },\n  { value: \"debug\", label: \"Debug\" },\n].map(tab => ({ ...tab, to: { name: \"analysis-detail\", params: { id: props.id, analysisId: props.analysisId }, query: { ...route.query, tab: tab.value === \"scoring\" ? undefined : tab.value } } })));\nconst completed = computed(() => analysis.value?.modelResults.filter(model => model.status === \"completed\") ?? []);\nconst primary = computed(() => primaryModelResult(analysis.value?.modelResults ?? []));\nconst usage = computed(() => analysisUsage(analysis.value?.modelResults ?? []));\nconst finishedCount = computed(() => analysis.value?.modelResults.filter(model => [\"completed\", \"failed\", \"cancelled\"].includes(model.status)).length ?? 0);\nconst status = computed(() => analysis.value?.status === \"cancelled\" ? { label: \"Geannuleerd\", tone: \"neutral\" as const } : analysisStatusLabel(analysis.value?.status ?? \"pending\"));\nconst stageLabel = computed(() => ({\n  fetching_images: \"Satellietbeelden ophalen...\",\n  scraping_website: \"Website-informatie ophalen...\",\n  fetching_cadastral: \"Kadastrale gegevens ophalen...\",\n  retrieving_feedback: \"Eerdere veldrapporten ophalen...\",\n  running_models: \"Modellen aan het analyseren...\",\n}[analysis.value?.stage ?? \"\"] ?? \"Analyse wordt uitgevoerd...\"));\n\nwatch(() => props.analysisId, () => { confirmCancel.value = false; photosOpen.value = true; });\n\nasync function rerunAnalysis() {\n  const locationId = props.id;\n  const analysisId = await rerun();\n  if (analysisId !== null) await router.push({ name: \"analysis-detail\", params: { id: locationId, analysisId } });\n}\n\nasync function stopAnalysis() {\n  if (await cancel()) confirmCancel.value = false;\n}\n</script>\n\n<template>\n  <header class=\"analysis-header\">\n    <nav class=\"analysis-header__crumbs\" aria-label=\"Kruimelpad analyse\">\n      <RouterLink :to=\"{ name: 'locations' }\">Locaties</RouterLink><span aria-hidden=\"true\">/</span>\n      <RouterLink :to=\"{ name: 'location-detail', params: { id } }\">{{ location?.companyName || \"Locatie\" }}</RouterLink><span aria-hidden=\"true\">/</span>\n      <span aria-current=\"page\">Analyse #{{ analysisId }}</span>\n    </nav>\n    <div class=\"analysis-header__row\">\n      <h1 class=\"page-title\">Analyse #{{ analysisId }}</h1>\n      <div class=\"analysis-header__actions\">\n        <Button v-if=\"analysis && !polling\" :busy=\"starting\" @click=\"rerunAnalysis\">{{ starting ? \"Starten...\" : \"Opnieuw draaien\" }}</Button>\n        <Button v-if=\"analysis?.status === 'running'\" variant=\"danger\" :busy=\"cancelling\" @click=\"confirmCancel = true\">Analyse stoppen</Button>\n      </div>\n    </div>\n      <div v-if=\"analysis\" class=\"analysis-detail__metadata\">\n        <Badge :tone=\"status.tone\">{{ status.label }}</Badge>\n        <span v-if=\"analysis.userName\">{{ analysis.userName }}</span>\n        <Badge v-if=\"analysis.isDryRun\">Dry Run</Badge>\n        <span>{{ finishedCount }}/{{ analysis.modelResults.length }} klaar</span>\n        <Badge v-if=\"analysis.analysisMode === 'observe-then-score'\" tone=\"info\">observe-then-score</Badge>\n        <span v-if=\"analysis.temperature !== null\">temp {{ analysis.temperature }}</span>\n        <span v-if=\"analysis.seed !== null\">seed {{ analysis.seed }}</span>\n        <time :datetime=\"analysis.createdAt\">{{ formatAnalysisDate(analysis.createdAt) }}</time>\n        <span v-if=\"usage.models || usage.cached\">{{ usage.models }} {{ usage.models === 1 ? \"model\" : \"modellen\" }}<template v-if=\"usage.cached\"> + {{ usage.cached }} uit cache</template> · {{ usage.tokens.toLocaleString(\"nl-NL\") }} tokens<template v-if=\"usage.costCents > 0\"> · ${{ (usage.costCents / 100).toFixed(2) }}</template></span>\n      </div>\n  </header>\n  <PageBody class=\"analysis-body\">\n    <p v-if=\"loading\" class=\"analysis-detail__muted\" role=\"status\">Analyse laden...</p>\n    <div v-if=\"error\" class=\"analysis-detail__error\" role=\"alert\"><p>{{ error }}</p><Button @click=\"refreshAnalysis\">Opnieuw proberen</Button></div>\n    <div v-if=\"!loading && !error && !analysis\" class=\"analysis-detail__empty\"><h2>Analyse niet gevonden</h2><RouterLink :to=\"{ name: 'location-detail', params: { id } }\">Terug naar locatie</RouterLink></div>\n    <div v-if=\"actionError\" class=\"analysis-detail__error\" role=\"alert\">{{ actionError }}</div>\n    <template v-if=\"analysis\">\n      <Panel v-if=\"polling\" title=\"Analyse wordt uitgevoerd\" class=\"analysis-detail__progress\">\n        <div role=\"status\"><p>{{ stageLabel }}</p><p>{{ finishedCount }}/{{ analysis.modelResults.length }} modellen klaar</p></div>\n        <ul class=\"analysis-detail__steps\"><li v-for=\"model in analysis.modelResults\" :key=\"model.id\">{{ model.modelDisplayName }} <Badge :tone=\"analysisStatusLabel(model.status).tone\">{{ model.status === \"cancelled\" ? \"Geannuleerd\" : analysisStatusLabel(model.status).label }}</Badge></li></ul>\n      </Panel>\n      <div class=\"analysis-detail\">\n        <div class=\"analysis-detail__report\">\n          <AnalysisFinalScore v-if=\"compact\" :score=\"analysis.consensusOverallScore\" :models=\"analysis.modelResults.map(model => model.modelDisplayName)\" />\n          <PageTabs :tabs=\"tabs\" :active=\"activeTab\" />\n          <template v-if=\"activeTab !== 'debug'\">\n            <AnalysisComparison v-if=\"activeTab === 'scoring' && completed.length\" :results=\"analysis.modelResults\" />\n            <AnalysisModelResults :results=\"analysis.modelResults\" :analysis-mode=\"analysis.analysisMode\" :section=\"activeTab\" />\n            <Panel v-if=\"!analysis.modelResults.length\" title=\"Geen modelresultaten\"><p class=\"analysis-detail__muted\">Deze analyse bevat nog geen modelresultaten.</p></Panel>\n          </template>\n          <DebugPanel v-else :analysis=\"analysis\" :model-results=\"analysis.modelResults\" />\n          <GroundTruthEditor v-if=\"activeTab === 'scoring' && location\" :location-id=\"id\" :value=\"location\" @saved=\"refreshLocation\" />\n        </div>\n        <aside class=\"analysis-detail__aside\" aria-label=\"Samenvatting analyse\">\n          <AnalysisFinalScore v-if=\"!compact\" :score=\"analysis.consensusOverallScore\" :models=\"analysis.modelResults.map(model => model.modelDisplayName)\" />\n          <Panel v-if=\"completed.length\" title=\"Quick-scan\"><dl class=\"analysis-detail__quickscan\"><div v-for=\"aspect in ASPECT_LABELS\" :key=\"aspect.key\"><dt>{{ aspect.label }}</dt><dd><ScoreBar :score=\"completed[0][aspect.key]\" /></dd></div></dl></Panel>\n          <RetrievedFeedbackPanel :entries=\"primary?.retrievedFeedback ?? []\" :confidence=\"primary?.confidence ?? null\" />\n          <Panel title=\"Locatiefoto's\">\n            <template #actions><Button variant=\"ghost\" :aria-expanded=\"photosOpen\" @click=\"photosOpen = !photosOpen\">{{ photosOpen ? \"Inklappen\" : \"Uitklappen\" }}</Button></template>\n            <template v-if=\"photosOpen\">\n              <p v-if=\"imageLoading\" class=\"analysis-detail__muted\" role=\"status\">Foto's laden...</p>\n              <div v-else-if=\"imageError\" role=\"alert\"><p>{{ imageError }}</p><Button @click=\"loadImages\">Opnieuw proberen</Button></div>\n              <LocationImageGallery v-else :images=\"images\" :coordinates=\"coordinates\" empty-message=\"Nog geen foto's beschikbaar voor deze locatie.\" />\n            </template>\n          </Panel>\n          <div v-if=\"locationError\" class=\"analysis-detail__error\" role=\"alert\"><p>{{ locationError }}</p><Button @click=\"refreshLocation\">Locatie opnieuw laden</Button></div>\n          <RouterLink :to=\"{ name: 'location-detail', params: { id } }\" class=\"analysis-detail__back\">Terug naar {{ location?.companyName || \"locatie\" }}</RouterLink>\n        </aside>\n      </div>\n    </template>\n  </PageBody>\n  <Dialog v-model:open=\"confirmCancel\" title=\"Analyse stoppen?\" description=\"De nog niet afgeronde modelresultaten worden geannuleerd.\">\n    <p>Weet je zeker dat je analyse #{{ analysisId }} wilt stoppen?</p>\n    <p v-if=\"actionError\" class=\"analysis-detail__error\" role=\"alert\">{{ actionError }}</p>\n    <template #footer><Button :disabled=\"cancelling\" @click=\"confirmCancel = false\">Terug</Button><Button variant=\"danger\" :busy=\"cancelling\" @click=\"stopAnalysis\">{{ cancelling ? \"Stoppen...\" : \"Analyse stoppen\" }}</Button></template>\n  </Dialog>\n</template>\n\n<style scoped>\n@font-face { font-family: \"Nudica Report\"; font-style: normal; font-weight: 300; font-display: swap; src: url(\"../assets/nudica-light.woff2\") format(\"woff2\"); }\n@font-face { font-family: \"Nudica Report\"; font-style: normal; font-weight: 400; font-display: swap; src: url(\"../assets/nudica-regular.woff2\") format(\"woff2\"); }\n@font-face { font-family: \"Nudica Report\"; font-style: normal; font-weight: 600 700; font-display: swap; src: url(\"../assets/nudica-bold.woff2\") format(\"woff2\"); }\n.analysis-header, .analysis-body { --font-sans: \"Nudica Report\", \"Helvetica Neue\", Arial, sans-serif; font-family: var(--font-sans); }\n.analysis-header { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px 16px; border-bottom: 1px solid var(--border-1); background: var(--bg-surface); }\n.analysis-header__crumbs { display: flex; align-items: center; gap: 8px; overflow-x: auto; white-space: nowrap; font-size: var(--text-caption); }\n.analysis-header__crumbs a { display: inline-flex; align-items: center; flex: none; color: var(--fg-3); text-decoration: underline; cursor: pointer; }\n.analysis-header__crumbs > span { flex: none; }\n.analysis-header__crumbs > span[aria-hidden] { color: var(--fg-4); }\n.analysis-header__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }\n.analysis-header__row h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.analysis-header__actions { display: flex; flex: none; gap: 8px; }\n.analysis-body { width: 100%; padding: 12px; }\n.analysis-header :deep(.badge), .analysis-body :deep(.badge) { height: 20px; padding: 0 8px; border-radius: 999px; }\n.analysis-body :deep(.panel__bar) { padding: 8px 12px; background: var(--bg-inset); }\n.analysis-body :deep(.panel__title) { font-weight: 600; }\n.analysis-detail { display: grid; align-items: start; gap: 16px; min-width: 0; }\n.analysis-detail__report, .analysis-detail__aside { display: grid; gap: 16px; min-width: 0; }\n.analysis-detail__metadata { display: flex; align-items: center; gap: 8px; overflow-x: auto; white-space: nowrap; color: var(--fg-3); font-size: var(--text-caption); }\n.analysis-detail__progress { margin-bottom: 16px; }\n.analysis-detail__steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }\n.analysis-detail__steps li { display: flex; justify-content: space-between; align-items: center; gap: 16px; }\n.analysis-detail__muted { color: var(--fg-3); font-size: var(--text-caption); }\n.analysis-detail__quickscan { margin: 0; display: grid; font-size: var(--text-ui); }\n.analysis-detail__quickscan > div { display: grid; grid-template-columns: minmax(0, 1fr) 90px; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-1); }\n.analysis-detail__quickscan > div:last-child { border-bottom: 0; }\n.analysis-detail__quickscan dd { margin: 0; }\n.analysis-detail__error { padding: 12px; margin-bottom: 16px; background: var(--danger-bg); color: var(--danger-fg); border: 1px solid var(--danger-border); overflow-wrap: anywhere; }\n.analysis-detail__error p { margin: 0 0 8px; }\n.analysis-detail__empty { padding: 24px 0; }\n.analysis-detail__back, .analysis-detail__empty a { color: var(--info-fg); text-decoration: underline; cursor: pointer; }\n.analysis-detail__back:focus-visible, .analysis-detail__empty a:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }\n@media (min-width: 1080px) {\n  .analysis-header { padding: 12px 20px; }\n  .analysis-body { padding: 16px; }\n  .analysis-detail__metadata { flex-wrap: wrap; }\n  .analysis-detail { grid-template-columns: minmax(0, 1fr) 340px; }\n  .analysis-detail__aside { position: sticky; top: 16px; }\n}\n</style>\n","import { createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, createBlock as _createBlock, withCtx as _withCtx } from \"vue\"\n\nconst _hoisted_1 = { class: \"comparison\" }\nconst _hoisted_2 = { class: \"comparison__table\" }\nconst _hoisted_3 = {\n  key: 0,\n  class: \"comparison__cache\"\n}\nconst _hoisted_4 = { scope: \"row\" }\nconst _hoisted_5 = { key: 1 }\nconst _hoisted_6 = { class: \"comparison__overall\" }\nconst _hoisted_7 = { key: 1 }\nconst _hoisted_8 = { key: 1 }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createBlock($setup[\"Panel\"], {\n    title: \"Quick-Scan Vergelijking\",\n    flush: \"\"\n  }, {\n    default: _withCtx(() => [\n      _createElementVNode(\"div\", _hoisted_1, [\n        _createElementVNode(\"table\", _hoisted_2, [\n          _createElementVNode(\"thead\", null, [\n            _createElementVNode(\"tr\", null, [\n              _cache[0] || (_cache[0] = _createElementVNode(\"th\", { scope: \"col\" }, \"Aspect\", -1 /* CACHED */)),\n              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.results, (result) => {\n                return (_openBlock(), _createElementBlock(\"th\", {\n                  key: result.id,\n                  scope: \"col\"\n                }, [\n                  _createTextVNode(_toDisplayString(result.modelDisplayName), 1 /* TEXT */),\n                  (result.tokenUsage === 'cached')\n                    ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, \"Uit cache\"))\n                    : _createCommentVNode(\"v-if\", true)\n                ]))\n              }), 128 /* KEYED_FRAGMENT */))\n            ])\n          ]),\n          _createElementVNode(\"tbody\", null, [\n            (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.ASPECT_LABELS, (aspect) => {\n              return (_openBlock(), _createElementBlock(\"tr\", {\n                key: aspect.key\n              }, [\n                _createElementVNode(\"th\", _hoisted_4, _toDisplayString(aspect.label), 1 /* TEXT */),\n                (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.results, (result) => {\n                  return (_openBlock(), _createElementBlock(\"td\", {\n                    key: result.id\n                  }, [\n                    (result.status === 'completed')\n                      ? (_openBlock(), _createBlock($setup[\"ScoreBar\"], {\n                          key: 0,\n                          score: result[aspect.key]\n                        }, null, 8 /* PROPS */, [\"score\"]))\n                      : (_openBlock(), _createElementBlock(\"span\", _hoisted_5, _toDisplayString(result.status === \"failed\" ? \"Fout\" : result.status === \"cancelled\" ? \"Gestopt\" : \"Wachten...\"), 1 /* TEXT */))\n                  ]))\n                }), 128 /* KEYED_FRAGMENT */))\n              ]))\n            }), 128 /* KEYED_FRAGMENT */)),\n            _createElementVNode(\"tr\", _hoisted_6, [\n              _cache[1] || (_cache[1] = _createElementVNode(\"th\", { scope: \"row\" }, \"Overall Score\", -1 /* CACHED */)),\n              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.results, (result) => {\n                return (_openBlock(), _createElementBlock(\"td\", {\n                  key: result.id\n                }, _toDisplayString(result.status === \"completed\" ? result.overallScore ?? \"-\" : \"-\"), 1 /* TEXT */))\n              }), 128 /* KEYED_FRAGMENT */))\n            ]),\n            _createElementVNode(\"tr\", null, [\n              _cache[2] || (_cache[2] = _createElementVNode(\"th\", { scope: \"row\" }, \"Aanbeveling\", -1 /* CACHED */)),\n              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.results, (result) => {\n                return (_openBlock(), _createElementBlock(\"td\", {\n                  key: result.id\n                }, [\n                  (result.status === 'completed' && result.overallScore !== null)\n                    ? (_openBlock(), _createBlock($setup[\"Badge\"], {\n                        key: 0,\n                        tone: $setup.suitabilityToken($setup.scoreToSuitability(result.overallScore))\n                      }, {\n                        default: _withCtx(() => [\n                          _createTextVNode(_toDisplayString($setup.suitabilityLabel($setup.scoreToSuitability(result.overallScore))), 1 /* TEXT */)\n                        ]),\n                        _: 2 /* DYNAMIC */\n                      }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"tone\"]))\n                    : (_openBlock(), _createElementBlock(\"span\", _hoisted_7, \"-\"))\n                ]))\n              }), 128 /* KEYED_FRAGMENT */))\n            ]),\n            _createElementVNode(\"tr\", null, [\n              _cache[4] || (_cache[4] = _createElementVNode(\"th\", { scope: \"row\" }, \"Review\", -1 /* CACHED */)),\n              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.results, (result) => {\n                return (_openBlock(), _createElementBlock(\"td\", {\n                  key: result.id\n                }, [\n                  (result.status === 'completed' && result.requiresHumanReview)\n                    ? (_openBlock(), _createBlock($setup[\"Badge\"], {\n                        key: 0,\n                        tone: \"diverge\"\n                      }, {\n                        default: _withCtx(() => _cache[3] || (_cache[3] = [\n                          _createTextVNode(\"Mens-review\", -1 /* CACHED */)\n                        ])),\n                        _: 1 /* STABLE */,\n                        __: [3]\n                      }))\n                    : (_openBlock(), _createElementBlock(\"span\", _hoisted_8, \"-\"))\n                ]))\n              }), 128 /* KEYED_FRAGMENT */))\n            ])\n          ])\n        ])\n      ])\n    ]),\n    _: 1 /* STABLE */\n  }))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/AnalysisComparison.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/AnalysisComparison.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/AnalysisComparison.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/AnalysisComparison.vue\";script.__scopeId = \"data-v-960f497f\";export default script;","import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n  class: \"analysis-summary\",\n  \"aria-label\": \"Eindscore\"\n}\nconst _hoisted_2 = { class: \"analysis-summary__score\" }\nconst _hoisted_3 = { class: \"analysis-summary__source\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"section\", _hoisted_1, [\n    _cache[1] || (_cache[1] = _createElementVNode(\"h2\", { class: \"analysis-summary__title\" }, \"Eindscore\", -1 /* CACHED */)),\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createElementVNode(\"strong\", null, _toDisplayString($props.score ?? \"-\"), 1 /* TEXT */),\n      _cache[0] || (_cache[0] = _createElementVNode(\"span\", { class: \"analysis-summary__denominator\" }, \"/ 100\", -1 /* CACHED */)),\n      ($props.score !== null)\n        ? (_openBlock(), _createBlock($setup[\"Badge\"], {\n            key: 0,\n            tone: $setup.suitabilityToken($setup.scoreToSuitability($props.score))\n          }, {\n            default: _withCtx(() => [\n              _createTextVNode(_toDisplayString($setup.suitabilityLabel($setup.scoreToSuitability($props.score))), 1 /* TEXT */)\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"tone\"]))\n        : _createCommentVNode(\"v-if\", true)\n    ]),\n    ($props.score !== null)\n      ? (_openBlock(), _createBlock($setup[\"ScoreBar\"], {\n          key: 0,\n          class: \"analysis-summary__bar\",\n          score: $props.score\n        }, null, 8 /* PROPS */, [\"score\"]))\n      : _createCommentVNode(\"v-if\", true),\n    _createElementVNode(\"p\", _hoisted_3, _toDisplayString($props.models.join(\", \") || \"Geen model\"), 1 /* TEXT */)\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/AnalysisFinalScore.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/AnalysisFinalScore.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/AnalysisFinalScore.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/AnalysisFinalScore.vue\";script.__scopeId = \"data-v-ae895c53\";export default script;","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport Panel from \"../ui/Panel.vue\";\nimport Badge from \"../ui/Badge.vue\";\nimport ScoreBar from \"../ui/ScoreBar.vue\";\nimport ScoreBreakdown from \"./ScoreBreakdown.vue\";\nimport ObservationSections from \"./ObservationSections.vue\";\nimport CalibrationPanel from \"./CalibrationPanel.vue\";\nimport { ASPECT_LABELS, type ScoreBreakdownUI } from \"../../lib/analysis-scoring\";\nimport { isDriftExplainedByCalibration } from \"../../lib/formula-drift\";\nimport { parseAnalysisObject, type AnalysisResult } from \"../../lib/analysis-detail\";\nimport { analysisStatusLabel } from \"../../lib/analyses-format\";\n\nconst props = defineProps<{ results: AnalysisResult[]; analysisMode: string; section: \"scoring\" | \"observaties\" | \"services\" }>();\n\nfunction readBreakdown(raw: string | null): ScoreBreakdownUI | null {\n  const value = parseAnalysisObject(raw);\n  if (!value || typeof value.overall !== \"number\" || !value.aspect_scores || !Array.isArray(value.flags)) return null;\n  return value as unknown as ScoreBreakdownUI;\n}\n\nconst models = computed(() => props.results.map(result => {\n  const live = readBreakdown(result.liveScoringBreakdown);\n  return {\n    result,\n    status: result.status === \"cancelled\" ? { label: \"Geannuleerd\", tone: \"neutral\" as const } : analysisStatusLabel(result.status),\n    stored: readBreakdown(result.scoringBreakdown),\n    live,\n    observations: parseAnalysisObject(result.observations),\n    calibrationExplainsDrift: live ? isDriftExplainedByCalibration({ overall: live.overall, aspectScores: live.aspect_scores }, result.calibration) : false,\n    explanations: ASPECT_LABELS.map(aspect => ({\n      label: aspect.label,\n      score: result[aspect.key],\n      text: result[aspect.key.replace(\"score\", \"explanation\") as \"explanationNatureSize\"],\n    })),\n    details: [\n      { title: \"Parkeren en Plaatsing\", value: parseAnalysisObject(result.analysisParkingPlacement) },\n      { title: \"Logistiek en Bereikbaarheid\", value: parseAnalysisObject(result.analysisLogisticsAccess) },\n      { title: \"Omgevingsfactoren\", value: parseAnalysisObject(result.analysisEnvironmentalFactors) },\n    ].filter(detail => detail.value !== null),\n  };\n}));\n\nfunction detailText(value: unknown): string {\n  if (value === null || value === undefined) return \"-\";\n  if (typeof value === \"boolean\") return value ? \"Ja\" : \"Nee\";\n  if (typeof value === \"object\") return JSON.stringify(value, null, 2);\n  return String(value);\n}\n</script>\n\n<template>\n  <div class=\"models\" :class=\"{ 'models--multiple': models.length > 1 }\">\n    <Panel v-for=\"model in models\" :key=\"model.result.id\" :title=\"model.result.modelDisplayName\" class=\"models__card\" flush>\n      <template #actions>\n        <Badge v-if=\"model.result.tokenUsage === 'cached'\">Cache</Badge>\n        <Badge :tone=\"model.status.tone\">{{ model.status.label }}</Badge>\n        <span v-if=\"model.result.durationMs !== null\" class=\"models__duration\">{{ (model.result.durationMs / 1000).toFixed(1) }}s</span>\n      </template>\n      <p v-if=\"model.result.status === 'pending'\" class=\"models__muted\">Wachten...</p>\n      <p v-else-if=\"model.result.status === 'running'\" class=\"models__muted\" role=\"status\">Model aan het analyseren...</p>\n      <div v-else-if=\"model.result.status === 'failed'\" class=\"models__error\"><strong>Analyse mislukt</strong><p>{{ model.result.errorMessage || \"Het model leverde geen resultaat.\" }}</p></div>\n      <p v-else-if=\"model.result.status === 'cancelled'\" class=\"models__muted\">Dit model is gestopt.</p>\n      <div v-else-if=\"model.result.status === 'completed'\" class=\"models__body models__content\">\n        <template v-if=\"analysisMode === 'observe-then-score'\">\n          <template v-if=\"section === 'scoring'\">\n            <ScoreBreakdown v-if=\"model.stored\" :breakdown=\"model.stored\" :live-breakdown=\"model.live\" :drift-explained-by-calibration=\"model.calibrationExplainsDrift\" />\n            <p v-else class=\"models__notice\">Geen scoring-breakdown beschikbaar. Bekijk de ruwe response onder Debug.</p>\n            <CalibrationPanel v-if=\"model.result.calibration\" :calibration=\"model.result.calibration\" />\n            <section class=\"models__explanations\">\n              <h3 class=\"models__section-title\">Toelichting per aspect</h3>\n              <template v-for=\"(explanation, index) in model.explanations\" :key=\"explanation.label\">\n                <details v-if=\"explanation.text\" :open=\"index === 0\" class=\"models__aspect\">\n                  <summary>{{ explanation.label }} <span>{{ explanation.score ?? \"-\" }}</span></summary>\n                  <p>{{ explanation.text }}</p>\n                </details>\n              </template>\n            </section>\n            <section v-if=\"model.result.summary\" class=\"models__explanation\"><h3 class=\"models__heading\">Samenvatting</h3><p>{{ model.result.summary }}</p></section>\n          </template>\n          <template v-else>\n            <ObservationSections v-if=\"model.observations\" :observations=\"model.observations\" :breakdown=\"model.live\" :section=\"section\" />\n            <p v-else class=\"models__notice\">{{ section === \"services\" ? \"Geen services-checklist in dit resultaat.\" : \"Kon observaties niet lezen, zie de ruwe response onder Debug.\" }}</p>\n          </template>\n        </template>\n        <template v-else>\n          <h3 class=\"models__heading\">Quick-Scan</h3>\n          <div v-for=\"explanation in model.explanations\" :key=\"explanation.label\" class=\"models__explanation\"><h4 class=\"models__heading\">{{ explanation.label }}</h4><ScoreBar :score=\"explanation.score\" /><p v-if=\"explanation.text\">{{ explanation.text }}</p></div>\n          <section v-for=\"detail in model.details\" :key=\"detail.title\"><h3 class=\"models__heading\">{{ detail.title }}</h3><dl class=\"models__details\"><template v-for=\"(value, key) in detail.value\" :key=\"key\"><dt>{{ key }}</dt><dd>{{ detailText(value) }}</dd></template></dl></section>\n          <section v-if=\"model.result.conclusion\" class=\"models__explanation\"><h3 class=\"models__heading\">Conclusie</h3><p>{{ model.result.conclusion }}</p></section>\n        </template>\n      </div>\n    </Panel>\n  </div>\n</template>\n\n<style scoped>\n.models, .models__body { display: grid; gap: 16px; min-width: 0; }\n.models__duration, .models__muted { color: var(--fg-3); font-size: var(--text-caption); }\n.models__error { padding: 12px; color: var(--danger-fg); background: var(--danger-bg); border: 1px solid var(--danger-border); overflow-wrap: anywhere; }\n.models__error p { margin: 6px 0 0; white-space: pre-wrap; }\n.models__notice { padding: 12px; color: var(--diverge-fg); background: var(--diverge-bg); border: 1px solid var(--diverge-border); }\n.models__heading { margin: 0 0 6px; font-size: var(--text-ui); font-weight: 600; }\n.models__explanation { padding: 12px 16px; border: 1px solid var(--border-1); background: var(--bg-surface); font-size: var(--text-ui); }\n.models__explanation p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }\n.models__details { font-size: var(--text-ui); }\n.models__details dt { margin-top: 8px; color: var(--fg-3); }\n.models__details dd { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }\n.models__content { padding: 12px; }\n.models__explanations { border: 1px solid var(--border-1); border-radius: var(--radius); }\n.models__section-title { margin: 0; padding: 8px 12px; background: var(--bg-inset); font-size: var(--text-ui); font-weight: 600; }\n.models__aspect { border-top: 1px solid var(--border-1); font-size: var(--text-ui); }\n.models__aspect summary { padding: 12px 16px; cursor: pointer; }\n.models__aspect summary span { margin-left: 8px; color: var(--fg-3); font-variant-numeric: tabular-nums; }\n.models__aspect p { margin: 0; padding: 0 16px 16px; white-space: pre-wrap; overflow-wrap: anywhere; }\n.models__aspect summary:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }\n.models__card > :deep(.panel__body) > .models__muted { margin: 16px; }\n@media (min-width: 1080px) { .models--multiple { display: flex; overflow-x: auto; padding-bottom: 4px; } .models--multiple .models__card { flex: 1 0 380px; } }\n</style>\n","<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport { buildScoreBreakdownView, type ScoreBreakdownUI } from \"../../lib/analysis-scoring\";\nimport { scoreToSuitability, suitabilityLabel, suitabilityToken } from \"../../lib/rating\";\nimport Badge from \"../ui/Badge.vue\";\nimport ScoreBar from \"../ui/ScoreBar.vue\";\n\nconst props = withDefaults(defineProps<{\n  breakdown: ScoreBreakdownUI;\n  liveBreakdown?: ScoreBreakdownUI | null;\n  driftExplainedByCalibration?: boolean;\n}>(), { liveBreakdown: null, driftExplainedByCalibration: false });\nconst expanded = ref(new Set<string>());\nconst view = computed(() => buildScoreBreakdownView(props));\nconst aspects = computed(() => view.value.aspects.map(aspect => ({\n  ...aspect,\n  tone: suitabilityToken(scoreToSuitability(aspect.score)),\n  suitability: suitabilityLabel(scoreToSuitability(aspect.score)),\n})));\nconst overallTone = computed(() => suitabilityToken(scoreToSuitability(props.breakdown.overall)));\nconst overallLabel = computed(() => suitabilityLabel(scoreToSuitability(props.breakdown.overall)));\n\nfunction decimal(value: number) {\n  return value.toFixed(1).replace(\".\", \",\");\n}\n\nfunction toggleAspect(key: string) {\n  const next = new Set(expanded.value);\n  if (next.has(key)) next.delete(key);\n  else next.add(key);\n  expanded.value = next;\n}\n</script>\n\n<template>\n  <div class=\"score-breakdown\">\n    <div class=\"score-breakdown__heading\">\n      <h3>Scoring breakdown</h3>\n      <Badge v-if=\"typeof breakdown.weights_version === 'number'\">Gewichten v{{ breakdown.weights_version }}</Badge>\n    </div>\n    <div v-if=\"breakdown.requires_human_review\" class=\"score-breakdown__notice score-breakdown__notice--review\">\n      <strong>Menselijke review nodig.</strong>\n      <ul v-if=\"view.reviewReasons.length\" class=\"score-breakdown__reasons\">\n        <li v-for=\"reason in view.reviewReasons\" :key=\"reason\">{{ reason }}</li>\n      </ul>\n      <p v-else>Geen specifieke reden vastgelegd bij deze analyse.</p>\n    </div>\n    <div v-if=\"view.isHardExclusion\" class=\"score-breakdown__notice score-breakdown__notice--excluded\">\n      <strong>Harde uitsluiting:</strong> {{ breakdown.reden }}\n      <p>De afzonderlijke aspecten zijn niet beoordeeld, de scoring stopt bij deze check.</p>\n    </div>\n    <template v-else>\n      <div class=\"score-breakdown__table-scroll\" tabindex=\"0\" role=\"region\" aria-label=\"Scores per aspect\">\n        <table class=\"score-breakdown__table\">\n          <thead>\n            <tr>\n              <th scope=\"col\">Aspect</th>\n              <th scope=\"col\">Score</th>\n              <th scope=\"col\" class=\"score-breakdown__numeric\">Weging</th>\n              <th scope=\"col\" class=\"score-breakdown__numeric\">Gewogen</th>\n              <th scope=\"col\">Oordeel</th>\n            </tr>\n          </thead>\n          <tbody>\n            <template v-for=\"aspect in aspects\" :key=\"aspect.key\">\n              <tr>\n                <th scope=\"row\">\n                  <button v-if=\"aspect.trace\" class=\"score-breakdown__toggle\" type=\"button\" :aria-expanded=\"expanded.has(aspect.key)\" @click=\"toggleAspect(aspect.key)\">\n                    <span class=\"score-breakdown__caret\" aria-hidden=\"true\">{{ expanded.has(aspect.key) ? '▾' : '▸' }}</span>\n                    {{ aspect.label }}\n                  </button>\n                  <span v-else class=\"score-breakdown__label\">{{ aspect.label }}</span>\n                  <p v-if=\"aspect.key === 'zichtbaarheid'\" class=\"score-breakdown__calculation score-breakdown__visibility\">= 5a {{ breakdown.aspect_scores?.zichtbaarheid_5a ?? 0 }} × 40% + 5b {{ breakdown.aspect_scores?.zichtbaarheid_5b ?? 0 }} × 60%</p>\n                </th>\n                <td><ScoreBar class=\"score-breakdown__score\" :score=\"aspect.score\" /></td>\n                <td class=\"score-breakdown__numeric\">{{ aspect.weightPct }}%</td>\n                <td class=\"score-breakdown__numeric\">{{ decimal(aspect.contribution) }}</td>\n                <td><Badge :tone=\"aspect.tone\">{{ aspect.suitability }}</Badge></td>\n              </tr>\n              <tr v-if=\"expanded.has(aspect.key) && aspect.trace\" class=\"score-breakdown__trace-row\">\n                <td colspan=\"5\">\n                  <ul class=\"score-breakdown__trace\">\n                    <li v-for=\"(step, index) in aspect.trace.steps\" :key=\"index\" class=\"score-breakdown__step\">\n                      <span>{{ step.label }}</span><strong>{{ step.effect }}</strong>\n                    </li>\n                    <li class=\"score-breakdown__step score-breakdown__trace-result\"><span>aspectscore</span><strong>{{ aspect.trace.result }}</strong></li>\n                  </ul>\n                </td>\n              </tr>\n            </template>\n          </tbody>\n        </table>\n      </div>\n      <div class=\"score-breakdown__subtotal\">\n        <div class=\"score-breakdown__row\"><span>Gewogen subtotaal</span><span>{{ decimal(view.weightedSum) }} → {{ Math.round(view.weightedSum) }}</span></div>\n        <div v-if=\"breakdown.fits_40ft_bonus_toegepast\" class=\"score-breakdown__row\"><span>Bonus (40ft-container past)</span><span>+5</span></div>\n      </div>\n    </template>\n    <div class=\"score-breakdown__total score-breakdown__row\">\n      <strong>Eindscore</strong>\n      <span class=\"score-breakdown__result\"><Badge :tone=\"overallTone\">{{ overallLabel }}</Badge><span class=\"score-breakdown__overall\">{{ breakdown.overall }}</span></span>\n    </div>\n    <template v-if=\"liveBreakdown\">\n      <div v-if=\"view.liveDiffers\" class=\"score-breakdown__notice score-breakdown__notice--drift\">\n        <p><strong>Huidige formule wijkt af.</strong> Opgeslagen eindscore <strong>{{ breakdown.overall }}</strong>, met de huidige formule <strong>{{ liveBreakdown.overall }}</strong>{{ liveBreakdown.reden ? ` (harde uitsluiting: ${liveBreakdown.reden})` : '' }}.</p>\n        <ul v-if=\"view.changedAspects.length\" class=\"score-breakdown__changed\">\n          <li v-for=\"aspect in view.changedAspects\" :key=\"aspect.key\">{{ aspect.label }}: {{ aspect.score }} → {{ liveBreakdown.aspect_scores?.[aspect.key] ?? 0 }}</li>\n        </ul>\n        <p>Herberekend uit de opgeslagen observaties, geen nieuwe AI-call. \"Opnieuw draaien\" is alleen nodig als je ook de observaties wilt verversen.</p>\n      </div>\n      <p v-else class=\"score-breakdown__match\">✓ Komt overeen met de huidige scoringformule.</p>\n    </template>\n    <div v-if=\"breakdown.flags?.length\" class=\"score-breakdown__flags\">\n      <Badge v-for=\"flag in breakdown.flags\" :key=\"flag\" class=\"score-breakdown__flag\">{{ flag.replace(/_/g, ' ') }}</Badge>\n    </div>\n  </div>\n</template>\n\n<style scoped>\n.score-breakdown { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }\n.score-breakdown__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--bg-inset); border-bottom: 1px solid var(--border-1); }\n.score-breakdown__heading h3 { margin: 0; font-size: 14px; font-weight: 600; }\n.score-breakdown :deep(.badge) { min-height: 20px; padding: 1px 8px; border-radius: 9999px; font-size: 12px; line-height: 16px; }\n.score-breakdown__notice { margin: 12px; padding: 12px; border: 1px solid; border-radius: var(--radius); line-height: 1.5; }\n.score-breakdown__notice p { margin: 4px 0 0; }\n.score-breakdown__notice p:first-child { margin-top: 0; }\n.score-breakdown__notice--review { color: var(--diverge-fg); border-color: var(--diverge-border); background: var(--diverge-bg); }\n.score-breakdown__notice--excluded { color: var(--danger-fg); border-color: var(--danger-border); background: var(--danger-bg); }\n.score-breakdown__notice--drift { color: var(--info-fg); border-color: var(--info-border); background: var(--info-bg); }\n.score-breakdown__reasons { margin: 4px 0 0; padding-left: 16px; }\n.score-breakdown__table-scroll { width: 100%; overflow-x: auto; }\n.score-breakdown__table { width: 100%; min-width: 600px; border-collapse: collapse; text-align: left; }\n.score-breakdown__table th, .score-breakdown__table td { height: 32px; padding: 4px 16px; border-bottom: 1px solid var(--border-1); vertical-align: middle; }\n.score-breakdown__table thead th { background: var(--bg-inset); color: var(--fg-1); font-size: 12px; font-weight: 600; letter-spacing: 0.32px; text-transform: uppercase; white-space: nowrap; }\n.score-breakdown__table tbody th { font-weight: 400; }\n.score-breakdown__table tbody td { color: var(--fg-2); }\n.score-breakdown__table .score-breakdown__numeric { text-align: right; font-variant-numeric: tabular-nums; }\n.score-breakdown__score { width: 122px; }\n.score-breakdown__score :deep(.score__track) { order: 0; flex: 0 0 90px; height: 6px; border-radius: 3px; }\n.score-breakdown__score :deep(.score__value) { order: 1; font-size: 14px; }\n.score-breakdown__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }\n.score-breakdown__toggle { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: var(--fg-1); font: inherit; cursor: pointer; text-align: left; }\n.score-breakdown__caret { width: 12px; flex: none; color: var(--fg-3); }\n.score-breakdown__label { color: var(--fg-1); }\n.score-breakdown__calculation { color: var(--fg-3); font-size: 12px; font-variant-numeric: tabular-nums; }\n.score-breakdown__visibility { margin: 4px 0 0; }\n.score-breakdown__table .score-breakdown__trace-row td { padding: 12px 16px; background: var(--bg-inset); }\n.score-breakdown__trace { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--fg-3); font-variant-numeric: tabular-nums; }\n.score-breakdown__step { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }\n.score-breakdown__step strong { flex: none; color: var(--fg-2); }\n.score-breakdown__trace-result { padding-top: 2px; border-top: 1px solid var(--border-1); color: var(--fg-1); font-weight: 500; }\n.score-breakdown__subtotal { display: flex; flex-direction: column; padding: 4px 12px; color: var(--fg-2); font-variant-numeric: tabular-nums; }\n.score-breakdown__subtotal .score-breakdown__row { padding: 7px 0; }\n.score-breakdown__total { padding: 10px 12px; background: var(--bg-inset); border-top: 1px solid var(--border-1); }\n.score-breakdown__result { display: inline-flex; align-items: center; gap: 12px; }\n.score-breakdown__overall { color: var(--fg-1); font-size: 32px; font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums; }\n.score-breakdown__changed { padding: 0; margin: 4px 0; list-style: none; font-variant-numeric: tabular-nums; }\n.score-breakdown__match { margin: 0; padding: 10px 16px; color: var(--score-fg); font-size: 12px; }\n.score-breakdown__flags { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 12px; }\n.score-breakdown__flag { white-space: normal; }\n@media (hover: hover) { .score-breakdown__toggle:hover { color: var(--fg-3); } }\n</style>\n","import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock, createVNode as _createVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"score-breakdown\" }\nconst _hoisted_2 = { class: \"score-breakdown__heading\" }\nconst _hoisted_3 = {\n  key: 0,\n  class: \"score-breakdown__notice score-breakdown__notice--review\"\n}\nconst _hoisted_4 = {\n  key: 0,\n  class: \"score-breakdown__reasons\"\n}\nconst _hoisted_5 = { key: 1 }\nconst _hoisted_6 = {\n  key: 1,\n  class: \"score-breakdown__notice score-breakdown__notice--excluded\"\n}\nconst _hoisted_7 = {\n  class: \"score-breakdown__table-scroll\",\n  tabindex: \"0\",\n  role: \"region\",\n  \"aria-label\": \"Scores per aspect\"\n}\nconst _hoisted_8 = { class: \"score-breakdown__table\" }\nconst _hoisted_9 = { scope: \"row\" }\nconst _hoisted_10 = [\"aria-expanded\", \"onClick\"]\nconst _hoisted_11 = {\n  class: \"score-breakdown__caret\",\n  \"aria-hidden\": \"true\"\n}\nconst _hoisted_12 = {\n  key: 1,\n  class: \"score-breakdown__label\"\n}\nconst _hoisted_13 = {\n  key: 2,\n  class: \"score-breakdown__calculation score-breakdown__visibility\"\n}\nconst _hoisted_14 = { class: \"score-breakdown__numeric\" }\nconst _hoisted_15 = { class: \"score-breakdown__numeric\" }\nconst _hoisted_16 = {\n  key: 0,\n  class: \"score-breakdown__trace-row\"\n}\nconst _hoisted_17 = { colspan: \"5\" }\nconst _hoisted_18 = { class: \"score-breakdown__trace\" }\nconst _hoisted_19 = { class: \"score-breakdown__step score-breakdown__trace-result\" }\nconst _hoisted_20 = { class: \"score-breakdown__subtotal\" }\nconst _hoisted_21 = { class: \"score-breakdown__row\" }\nconst _hoisted_22 = {\n  key: 0,\n  class: \"score-breakdown__row\"\n}\nconst _hoisted_23 = { class: \"score-breakdown__total score-breakdown__row\" }\nconst _hoisted_24 = { class: \"score-breakdown__result\" }\nconst _hoisted_25 = { class: \"score-breakdown__overall\" }\nconst _hoisted_26 = {\n  key: 0,\n  class: \"score-breakdown__notice score-breakdown__notice--drift\"\n}\nconst _hoisted_27 = {\n  key: 0,\n  class: \"score-breakdown__changed\"\n}\nconst _hoisted_28 = {\n  key: 1,\n  class: \"score-breakdown__match\"\n}\nconst _hoisted_29 = {\n  key: 4,\n  class: \"score-breakdown__flags\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"div\", _hoisted_2, [\n      _cache[0] || (_cache[0] = _createElementVNode(\"h3\", null, \"Scoring breakdown\", -1 /* CACHED */)),\n      (typeof $props.breakdown.weights_version === 'number')\n        ? (_openBlock(), _createBlock($setup[\"Badge\"], { key: 0 }, {\n            default: _withCtx(() => [\n              _createTextVNode(\"Gewichten v\" + _toDisplayString($props.breakdown.weights_version), 1 /* TEXT */)\n            ]),\n            _: 1 /* STABLE */\n          }))\n        : _createCommentVNode(\"v-if\", true)\n    ]),\n    ($props.breakdown.requires_human_review)\n      ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [\n          _cache[1] || (_cache[1] = _createElementVNode(\"strong\", null, \"Menselijke review nodig.\", -1 /* CACHED */)),\n          ($setup.view.reviewReasons.length)\n            ? (_openBlock(), _createElementBlock(\"ul\", _hoisted_4, [\n                (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.view.reviewReasons, (reason) => {\n                  return (_openBlock(), _createElementBlock(\"li\", { key: reason }, _toDisplayString(reason), 1 /* TEXT */))\n                }), 128 /* KEYED_FRAGMENT */))\n              ]))\n            : (_openBlock(), _createElementBlock(\"p\", _hoisted_5, \"Geen specifieke reden vastgelegd bij deze analyse.\"))\n        ]))\n      : _createCommentVNode(\"v-if\", true),\n    ($setup.view.isHardExclusion)\n      ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n          _cache[2] || (_cache[2] = _createElementVNode(\"strong\", null, \"Harde uitsluiting:\", -1 /* CACHED */)),\n          _createTextVNode(\" \" + _toDisplayString($props.breakdown.reden) + \" \", 1 /* TEXT */),\n          _cache[3] || (_cache[3] = _createElementVNode(\"p\", null, \"De afzonderlijke aspecten zijn niet beoordeeld, de scoring stopt bij deze check.\", -1 /* CACHED */))\n        ]))\n      : (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [\n          _createElementVNode(\"div\", _hoisted_7, [\n            _createElementVNode(\"table\", _hoisted_8, [\n              _cache[5] || (_cache[5] = _createElementVNode(\"thead\", null, [\n                _createElementVNode(\"tr\", null, [\n                  _createElementVNode(\"th\", { scope: \"col\" }, \"Aspect\"),\n                  _createElementVNode(\"th\", { scope: \"col\" }, \"Score\"),\n                  _createElementVNode(\"th\", {\n                    scope: \"col\",\n                    class: \"score-breakdown__numeric\"\n                  }, \"Weging\"),\n                  _createElementVNode(\"th\", {\n                    scope: \"col\",\n                    class: \"score-breakdown__numeric\"\n                  }, \"Gewogen\"),\n                  _createElementVNode(\"th\", { scope: \"col\" }, \"Oordeel\")\n                ])\n              ], -1 /* CACHED */)),\n              _createElementVNode(\"tbody\", null, [\n                (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.aspects, (aspect) => {\n                  return (_openBlock(), _createElementBlock(_Fragment, {\n                    key: aspect.key\n                  }, [\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"th\", _hoisted_9, [\n                        (aspect.trace)\n                          ? (_openBlock(), _createElementBlock(\"button\", {\n                              key: 0,\n                              class: \"score-breakdown__toggle\",\n                              type: \"button\",\n                              \"aria-expanded\": $setup.expanded.has(aspect.key),\n                              onClick: $event => ($setup.toggleAspect(aspect.key))\n                            }, [\n                              _createElementVNode(\"span\", _hoisted_11, _toDisplayString($setup.expanded.has(aspect.key) ? '▾' : '▸'), 1 /* TEXT */),\n                              _createTextVNode(\" \" + _toDisplayString(aspect.label), 1 /* TEXT */)\n                            ], 8 /* PROPS */, _hoisted_10))\n                          : (_openBlock(), _createElementBlock(\"span\", _hoisted_12, _toDisplayString(aspect.label), 1 /* TEXT */)),\n                        (aspect.key === 'zichtbaarheid')\n                          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_13, \"= 5a \" + _toDisplayString($props.breakdown.aspect_scores?.zichtbaarheid_5a ?? 0) + \" × 40% + 5b \" + _toDisplayString($props.breakdown.aspect_scores?.zichtbaarheid_5b ?? 0) + \" × 60%\", 1 /* TEXT */))\n                          : _createCommentVNode(\"v-if\", true)\n                      ]),\n                      _createElementVNode(\"td\", null, [\n                        _createVNode($setup[\"ScoreBar\"], {\n                          class: \"score-breakdown__score\",\n                          score: aspect.score\n                        }, null, 8 /* PROPS */, [\"score\"])\n                      ]),\n                      _createElementVNode(\"td\", _hoisted_14, _toDisplayString(aspect.weightPct) + \"%\", 1 /* TEXT */),\n                      _createElementVNode(\"td\", _hoisted_15, _toDisplayString($setup.decimal(aspect.contribution)), 1 /* TEXT */),\n                      _createElementVNode(\"td\", null, [\n                        _createVNode($setup[\"Badge\"], {\n                          tone: aspect.tone\n                        }, {\n                          default: _withCtx(() => [\n                            _createTextVNode(_toDisplayString(aspect.suitability), 1 /* TEXT */)\n                          ]),\n                          _: 2 /* DYNAMIC */\n                        }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"tone\"])\n                      ])\n                    ]),\n                    ($setup.expanded.has(aspect.key) && aspect.trace)\n                      ? (_openBlock(), _createElementBlock(\"tr\", _hoisted_16, [\n                          _createElementVNode(\"td\", _hoisted_17, [\n                            _createElementVNode(\"ul\", _hoisted_18, [\n                              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(aspect.trace.steps, (step, index) => {\n                                return (_openBlock(), _createElementBlock(\"li\", {\n                                  key: index,\n                                  class: \"score-breakdown__step\"\n                                }, [\n                                  _createElementVNode(\"span\", null, _toDisplayString(step.label), 1 /* TEXT */),\n                                  _createElementVNode(\"strong\", null, _toDisplayString(step.effect), 1 /* TEXT */)\n                                ]))\n                              }), 128 /* KEYED_FRAGMENT */)),\n                              _createElementVNode(\"li\", _hoisted_19, [\n                                _cache[4] || (_cache[4] = _createElementVNode(\"span\", null, \"aspectscore\", -1 /* CACHED */)),\n                                _createElementVNode(\"strong\", null, _toDisplayString(aspect.trace.result), 1 /* TEXT */)\n                              ])\n                            ])\n                          ])\n                        ]))\n                      : _createCommentVNode(\"v-if\", true)\n                  ], 64 /* STABLE_FRAGMENT */))\n                }), 128 /* KEYED_FRAGMENT */))\n              ])\n            ])\n          ]),\n          _createElementVNode(\"div\", _hoisted_20, [\n            _createElementVNode(\"div\", _hoisted_21, [\n              _cache[6] || (_cache[6] = _createElementVNode(\"span\", null, \"Gewogen subtotaal\", -1 /* CACHED */)),\n              _createElementVNode(\"span\", null, _toDisplayString($setup.decimal($setup.view.weightedSum)) + \" → \" + _toDisplayString(Math.round($setup.view.weightedSum)), 1 /* TEXT */)\n            ]),\n            ($props.breakdown.fits_40ft_bonus_toegepast)\n              ? (_openBlock(), _createElementBlock(\"div\", _hoisted_22, _cache[7] || (_cache[7] = [\n                  _createElementVNode(\"span\", null, \"Bonus (40ft-container past)\", -1 /* CACHED */),\n                  _createElementVNode(\"span\", null, \"+5\", -1 /* CACHED */)\n                ])))\n              : _createCommentVNode(\"v-if\", true)\n          ])\n        ], 64 /* STABLE_FRAGMENT */)),\n    _createElementVNode(\"div\", _hoisted_23, [\n      _cache[8] || (_cache[8] = _createElementVNode(\"strong\", null, \"Eindscore\", -1 /* CACHED */)),\n      _createElementVNode(\"span\", _hoisted_24, [\n        _createVNode($setup[\"Badge\"], { tone: $setup.overallTone }, {\n          default: _withCtx(() => [\n            _createTextVNode(_toDisplayString($setup.overallLabel), 1 /* TEXT */)\n          ]),\n          _: 1 /* STABLE */\n        }, 8 /* PROPS */, [\"tone\"]),\n        _createElementVNode(\"span\", _hoisted_25, _toDisplayString($props.breakdown.overall), 1 /* TEXT */)\n      ])\n    ]),\n    ($props.liveBreakdown)\n      ? (_openBlock(), _createElementBlock(_Fragment, { key: 3 }, [\n          ($setup.view.liveDiffers)\n            ? (_openBlock(), _createElementBlock(\"div\", _hoisted_26, [\n                _createElementVNode(\"p\", null, [\n                  _cache[9] || (_cache[9] = _createElementVNode(\"strong\", null, \"Huidige formule wijkt af.\", -1 /* CACHED */)),\n                  _cache[10] || (_cache[10] = _createTextVNode(\" Opgeslagen eindscore \", -1 /* CACHED */)),\n                  _createElementVNode(\"strong\", null, _toDisplayString($props.breakdown.overall), 1 /* TEXT */),\n                  _cache[11] || (_cache[11] = _createTextVNode(\", met de huidige formule \", -1 /* CACHED */)),\n                  _createElementVNode(\"strong\", null, _toDisplayString($props.liveBreakdown.overall), 1 /* TEXT */),\n                  _createTextVNode(_toDisplayString($props.liveBreakdown.reden ? ` (harde uitsluiting: ${$props.liveBreakdown.reden})` : '') + \".\", 1 /* TEXT */)\n                ]),\n                ($setup.view.changedAspects.length)\n                  ? (_openBlock(), _createElementBlock(\"ul\", _hoisted_27, [\n                      (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.view.changedAspects, (aspect) => {\n                        return (_openBlock(), _createElementBlock(\"li\", {\n                          key: aspect.key\n                        }, _toDisplayString(aspect.label) + \": \" + _toDisplayString(aspect.score) + \" → \" + _toDisplayString($props.liveBreakdown.aspect_scores?.[aspect.key] ?? 0), 1 /* TEXT */))\n                      }), 128 /* KEYED_FRAGMENT */))\n                    ]))\n                  : _createCommentVNode(\"v-if\", true),\n                _cache[12] || (_cache[12] = _createElementVNode(\"p\", null, \"Herberekend uit de opgeslagen observaties, geen nieuwe AI-call. \\\"Opnieuw draaien\\\" is alleen nodig als je ook de observaties wilt verversen.\", -1 /* CACHED */))\n              ]))\n            : (_openBlock(), _createElementBlock(\"p\", _hoisted_28, \"✓ Komt overeen met de huidige scoringformule.\"))\n        ], 64 /* STABLE_FRAGMENT */))\n      : _createCommentVNode(\"v-if\", true),\n    ($props.breakdown.flags?.length)\n      ? (_openBlock(), _createElementBlock(\"div\", _hoisted_29, [\n          (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.breakdown.flags, (flag) => {\n            return (_openBlock(), _createBlock($setup[\"Badge\"], {\n              key: flag,\n              class: \"score-breakdown__flag\"\n            }, {\n              default: _withCtx(() => [\n                _createTextVNode(_toDisplayString(flag.replace(/_/g, ' ')), 1 /* TEXT */)\n              ]),\n              _: 2 /* DYNAMIC */\n            }, 1024 /* DYNAMIC_SLOTS */))\n          }), 128 /* KEYED_FRAGMENT */))\n        ]))\n      : _createCommentVNode(\"v-if\", true)\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/ScoreBreakdown.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/ScoreBreakdown.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/ScoreBreakdown.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/ScoreBreakdown.vue\";script.__scopeId = \"data-v-4ab403ed\";export default script;","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { buildObservationSections, type ScoreBreakdownUI } from \"../../lib/analysis-scoring\";\nimport Badge from \"../ui/Badge.vue\";\nimport Tooltip from \"../ui/Tooltip.vue\";\n\nconst props = defineProps<{\n  observations: Record<string, unknown>;\n  breakdown?: ScoreBreakdownUI | null;\n  sections?: string[];\n  section?: \"observaties\" | \"services\";\n}>();\nconst selectedSections = computed(() => props.sections ?? (props.section ? Object.keys(props.observations).filter(key => props.section === \"services\" ? key === \"services\" : key !== \"services\") : undefined));\nconst rows = computed(() => buildObservationSections({ observations: props.observations, breakdown: props.breakdown, sections: selectedSections.value }));\nconst servicesOnly = computed(() => props.section === \"services\" || (selectedSections.value?.length === 1 && selectedSections.value[0] === \"services\"));\n</script>\n\n<template>\n  <div class=\"observation-sections\">\n    <p v-if=\"!rows.length\" class=\"observation-sections__empty\">{{ servicesOnly ? 'Geen services-checklist in dit resultaat.' : 'Geen observaties in dit resultaat.' }}</p>\n    <section v-for=\"row in rows\" :key=\"row.key\" class=\"observation-sections__section\">\n      <header class=\"observation-sections__header\">\n        <h4 class=\"observation-sections__heading\">\n          <Tooltip v-if=\"row.tooltip\" :text=\"row.tooltip\"><span class=\"observation-sections__explained\" tabindex=\"0\">{{ row.label }}</span></Tooltip>\n          <span v-else>{{ row.label }}</span>\n        </h4>\n        <Badge v-if=\"row.sourceLabel\" class=\"observation-sections__source\">{{ row.sourceLabel }}</Badge>\n      </header>\n      <p v-if=\"row.primitive\" class=\"observation-sections__value\">\n        <span>{{ row.value }}</span>\n        <span v-for=\"(hint, index) in row.hints\" :key=\"index\" class=\"observation-sections__hint\" :class=\"[`observation-sections__hint--${hint.tone}`, { 'observation-sections__hint--inactive': hint.active === false }]\">{{ hint.text }}</span>\n      </p>\n      <p v-else-if=\"row.empty\" class=\"observation-sections__empty\">(geen velden ingevuld)</p>\n      <dl v-else class=\"observation-sections__fields\">\n        <div v-for=\"field in row.fields\" :key=\"field.key\" class=\"observation-sections__field\" :class=\"{ 'observation-sections__field--checklist': field.checklist }\">\n          <dt class=\"observation-sections__field-label\" :class=\"{ 'observation-sections__full': field.checklist }\">\n            <Tooltip v-if=\"field.tooltip\" :text=\"field.tooltip\"><span class=\"observation-sections__explained\" tabindex=\"0\">{{ field.label }}</span></Tooltip>\n            <span v-else>{{ field.label }}</span>\n          </dt>\n          <dd v-if=\"field.checklist\" class=\"observation-sections__full\">\n            <div class=\"observation-sections__checklist-scroll\" role=\"region\" :aria-label=\"field.label\" tabindex=\"0\">\n              <table class=\"observation-sections__checklist\">\n                <thead>\n                  <tr><th scope=\"col\">Voorziening</th><th scope=\"col\">Vastgesteld</th><th scope=\"col\">Toelichting</th></tr>\n                </thead>\n                <tbody>\n                  <tr v-for=\"item in field.checklist\" :key=\"item.key\">\n                    <th scope=\"row\" class=\"observation-sections__service-name\">\n                      <Tooltip v-if=\"item.tooltip\" :text=\"item.tooltip\"><span class=\"observation-sections__explained\" tabindex=\"0\">{{ item.label }}</span></Tooltip>\n                      <span v-else>{{ item.label }}</span>\n                    </th>\n                    <td>\n                      <span class=\"observation-sections__status\" :class=\"`observation-sections__status--${item.status}`\">\n                        <span aria-hidden=\"true\">{{ item.icon }}</span>\n                        <span>{{ item.status === 'present' ? 'Aanwezig' : item.status === 'absent' ? 'Niet aanwezig' : 'Niet vaststelbaar' }}</span>\n                      </span>\n                    </td>\n                    <td>\n                      <div class=\"observation-sections__evidence\">\n                        <span class=\"observation-sections__evidence-text\">{{ item.evidence }}</span>\n                        <span v-for=\"(hint, index) in item.hints\" :key=\"index\" class=\"observation-sections__hint\" :class=\"[`observation-sections__hint--${hint.tone}`, { 'observation-sections__hint--inactive': hint.active === false }]\">{{ hint.text }}</span>\n                        <Badge v-if=\"item.sourceLabel\" class=\"observation-sections__source\">{{ item.sourceLabel }}</Badge>\n                      </div>\n                    </td>\n                  </tr>\n                </tbody>\n              </table>\n            </div>\n          </dd>\n          <dd v-else class=\"observation-sections__value\">\n            <span>{{ field.value }}</span>\n            <span v-for=\"(hint, index) in field.hints\" :key=\"index\" class=\"observation-sections__hint\" :class=\"[`observation-sections__hint--${hint.tone}`, { 'observation-sections__hint--inactive': hint.active === false }]\">{{ hint.text }}</span>\n            <Badge v-if=\"field.sourceLabel\" class=\"observation-sections__source\">{{ field.sourceLabel }}</Badge>\n          </dd>\n        </div>\n      </dl>\n    </section>\n  </div>\n</template>\n\n<style scoped>\n.observation-sections { display: flex; flex-direction: column; gap: 16px; font-size: var(--text-ui); }\n.observation-sections__section { min-width: 0; border: 1px solid var(--border-1); border-radius: var(--radius); background: var(--bg-surface); }\n.observation-sections__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border-1); background: var(--bg-inset); }\n.observation-sections__heading { margin: 0; color: var(--fg-1); font: inherit; font-weight: 600; }\n.observation-sections__explained { cursor: help; text-decoration: underline dotted; text-decoration-color: var(--border-3); text-underline-offset: 2px; }\n.observation-sections__source { flex: none; padding: 0 8px; font-size: var(--text-caption); }\n.observation-sections__value { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0; overflow-wrap: anywhere; }\n.observation-sections__section > .observation-sections__value, .observation-sections__empty { margin: 0; padding: 8px 16px; }\n.observation-sections__empty { color: var(--fg-3); }\n.observation-sections__fields { margin: 0; }\n.observation-sections__field { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px 16px; padding: 8px 16px; border-bottom: 1px solid var(--border-1); }\n.observation-sections__field:last-child { border-bottom: 0; }\n.observation-sections__field--checklist { grid-template-columns: minmax(0, 1fr); }\n.observation-sections__fields dd { min-width: 0; margin: 0; }\n.observation-sections__field-label { color: var(--fg-3); overflow-wrap: anywhere; }\n.observation-sections__full { grid-column: 1 / -1; }\n.observation-sections__checklist-scroll { width: 100%; overflow-x: auto; }\n.observation-sections__checklist { width: 100%; min-width: 600px; border-collapse: collapse; text-align: left; }\n.observation-sections__checklist th, .observation-sections__checklist td { height: 32px; padding: 4px 16px; border-bottom: 1px solid var(--border-1); vertical-align: top; font-size: 14px; }\n.observation-sections__checklist thead th { background: var(--bg-inset); color: var(--fg-1); font-size: 12px; font-weight: 600; letter-spacing: 0.32px; text-transform: uppercase; vertical-align: middle; }\n.observation-sections__checklist tbody tr:last-child th, .observation-sections__checklist tbody tr:last-child td { border-bottom: 0; }\n.observation-sections__status { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; color: var(--fg-3); white-space: nowrap; }\n.observation-sections__status--present { color: var(--score-fg); }\n.observation-sections__status--unknown { color: var(--diverge-fg); }\n.observation-sections__service-name { min-width: 160px; color: var(--fg-1); font-weight: 400; }\n.observation-sections__evidence { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 8px; min-width: 0; }\n.observation-sections__evidence-text { flex: 1; min-width: 100px; color: var(--fg-3); overflow-wrap: anywhere; }\n.observation-sections__hint { display: inline-block; padding: 2px 4px; border: 1px solid var(--border-1); border-radius: var(--radius); font-size: var(--text-caption); line-height: 1.3; color: var(--fg-3); background: var(--bg-inset); }\n.observation-sections__hint--points-pos { color: var(--score-fg); background: var(--score-bg); border-color: var(--score-border); }\n.observation-sections__hint--points-neg, .observation-sections__hint--gate { color: var(--danger-fg); background: var(--danger-bg); border-color: var(--danger-border); }\n.observation-sections__hint--flag { color: var(--diverge-fg); background: var(--diverge-bg); border-color: var(--diverge-border); }\n.observation-sections__hint--inactive { background: transparent; opacity: 0.25; }\n@media (min-width: 720px) {\n  .observation-sections__field { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }\n  .observation-sections__field--checklist { grid-template-columns: minmax(0, 1fr); }\n}\n</style>\n","<template>\n  <TooltipProvider :delay-duration=\"0\">\n    <TooltipRoot>\n      <TooltipTrigger as-child>\n        <slot />\n      </TooltipTrigger>\n      <TooltipPortal>\n        <TooltipContent class=\"snl-tooltip\" :side=\"side\" :side-offset=\"4\">\n          {{ text }}\n        </TooltipContent>\n      </TooltipPortal>\n    </TooltipRoot>\n  </TooltipProvider>\n</template>\n\n<script setup lang=\"ts\">\nimport { TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTrigger } from \"reka-ui\";\n\n// Ink tooltip in caption size, no arrow. The trigger is whatever the caller\n// puts in the default slot (rendered as-child, so a Button or a span keeps its\n// own element). Delay 0, like the Next admin: a tooltip on a data-dense screen\n// should answer immediately.\nwithDefaults(defineProps<{ text: string; side?: \"top\" | \"right\" | \"bottom\" | \"left\" }>(), { side: \"top\" });\n</script>\n\n<!-- NOT scoped: see Popover.vue, PopperContent puts our class on an inner\n     node while the scope id lands on its wrapper root. -->\n<style>\n.snl-tooltip {\n  z-index: 50;\n  max-width: 280px;\n  padding: 4px 8px;\n  border-radius: 2px;\n  background: var(--ink);\n  color: var(--ink-fg);\n  font-size: var(--text-caption);\n  line-height: 16px;\n}\n</style>\n","import { renderSlot as _renderSlot, withCtx as _withCtx, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createBlock($setup[\"TooltipProvider\"], { \"delay-duration\": 0 }, {\n    default: _withCtx(() => [\n      _createVNode($setup[\"TooltipRoot\"], null, {\n        default: _withCtx(() => [\n          _createVNode($setup[\"TooltipTrigger\"], { \"as-child\": \"\" }, {\n            default: _withCtx(() => [\n              _renderSlot(_ctx.$slots, \"default\")\n            ]),\n            _: 3 /* FORWARDED */\n          }),\n          _createVNode($setup[\"TooltipPortal\"], null, {\n            default: _withCtx(() => [\n              _createVNode($setup[\"TooltipContent\"], {\n                class: \"snl-tooltip\",\n                side: $props.side,\n                \"side-offset\": 4\n              }, {\n                default: _withCtx(() => [\n                  _createTextVNode(_toDisplayString($props.text), 1 /* TEXT */)\n                ]),\n                _: 1 /* STABLE */\n              }, 8 /* PROPS */, [\"side\"])\n            ]),\n            _: 1 /* STABLE */\n          })\n        ]),\n        _: 3 /* FORWARDED */\n      })\n    ]),\n    _: 3 /* FORWARDED */\n  }))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Tooltip.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Tooltip.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Tooltip.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/Tooltip.vue\";export default script;","import { toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, createElementVNode as _createElementVNode, withCtx as _withCtx, createBlock as _createBlock, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"observation-sections\" }\nconst _hoisted_2 = {\n  key: 0,\n  class: \"observation-sections__empty\"\n}\nconst _hoisted_3 = { class: \"observation-sections__header\" }\nconst _hoisted_4 = { class: \"observation-sections__heading\" }\nconst _hoisted_5 = {\n  class: \"observation-sections__explained\",\n  tabindex: \"0\"\n}\nconst _hoisted_6 = { key: 1 }\nconst _hoisted_7 = {\n  key: 0,\n  class: \"observation-sections__value\"\n}\nconst _hoisted_8 = {\n  key: 1,\n  class: \"observation-sections__empty\"\n}\nconst _hoisted_9 = {\n  key: 2,\n  class: \"observation-sections__fields\"\n}\nconst _hoisted_10 = {\n  class: \"observation-sections__explained\",\n  tabindex: \"0\"\n}\nconst _hoisted_11 = { key: 1 }\nconst _hoisted_12 = {\n  key: 0,\n  class: \"observation-sections__full\"\n}\nconst _hoisted_13 = [\"aria-label\"]\nconst _hoisted_14 = { class: \"observation-sections__checklist\" }\nconst _hoisted_15 = {\n  scope: \"row\",\n  class: \"observation-sections__service-name\"\n}\nconst _hoisted_16 = {\n  class: \"observation-sections__explained\",\n  tabindex: \"0\"\n}\nconst _hoisted_17 = { key: 1 }\nconst _hoisted_18 = { \"aria-hidden\": \"true\" }\nconst _hoisted_19 = { class: \"observation-sections__evidence\" }\nconst _hoisted_20 = { class: \"observation-sections__evidence-text\" }\nconst _hoisted_21 = {\n  key: 1,\n  class: \"observation-sections__value\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    (!$setup.rows.length)\n      ? (_openBlock(), _createElementBlock(\"p\", _hoisted_2, _toDisplayString($setup.servicesOnly ? 'Geen services-checklist in dit resultaat.' : 'Geen observaties in dit resultaat.'), 1 /* TEXT */))\n      : _createCommentVNode(\"v-if\", true),\n    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.rows, (row) => {\n      return (_openBlock(), _createElementBlock(\"section\", {\n        key: row.key,\n        class: \"observation-sections__section\"\n      }, [\n        _createElementVNode(\"header\", _hoisted_3, [\n          _createElementVNode(\"h4\", _hoisted_4, [\n            (row.tooltip)\n              ? (_openBlock(), _createBlock($setup[\"Tooltip\"], {\n                  key: 0,\n                  text: row.tooltip\n                }, {\n                  default: _withCtx(() => [\n                    _createElementVNode(\"span\", _hoisted_5, _toDisplayString(row.label), 1 /* TEXT */)\n                  ]),\n                  _: 2 /* DYNAMIC */\n                }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"text\"]))\n              : (_openBlock(), _createElementBlock(\"span\", _hoisted_6, _toDisplayString(row.label), 1 /* TEXT */))\n          ]),\n          (row.sourceLabel)\n            ? (_openBlock(), _createBlock($setup[\"Badge\"], {\n                key: 0,\n                class: \"observation-sections__source\"\n              }, {\n                default: _withCtx(() => [\n                  _createTextVNode(_toDisplayString(row.sourceLabel), 1 /* TEXT */)\n                ]),\n                _: 2 /* DYNAMIC */\n              }, 1024 /* DYNAMIC_SLOTS */))\n            : _createCommentVNode(\"v-if\", true)\n        ]),\n        (row.primitive)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_7, [\n              _createElementVNode(\"span\", null, _toDisplayString(row.value), 1 /* TEXT */),\n              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(row.hints, (hint, index) => {\n                return (_openBlock(), _createElementBlock(\"span\", {\n                  key: index,\n                  class: _normalizeClass([\"observation-sections__hint\", [`observation-sections__hint--${hint.tone}`, { 'observation-sections__hint--inactive': hint.active === false }]])\n                }, _toDisplayString(hint.text), 3 /* TEXT, CLASS */))\n              }), 128 /* KEYED_FRAGMENT */))\n            ]))\n          : (row.empty)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_8, \"(geen velden ingevuld)\"))\n            : (_openBlock(), _createElementBlock(\"dl\", _hoisted_9, [\n                (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(row.fields, (field) => {\n                  return (_openBlock(), _createElementBlock(\"div\", {\n                    key: field.key,\n                    class: _normalizeClass([\"observation-sections__field\", { 'observation-sections__field--checklist': field.checklist }])\n                  }, [\n                    _createElementVNode(\"dt\", {\n                      class: _normalizeClass([\"observation-sections__field-label\", { 'observation-sections__full': field.checklist }])\n                    }, [\n                      (field.tooltip)\n                        ? (_openBlock(), _createBlock($setup[\"Tooltip\"], {\n                            key: 0,\n                            text: field.tooltip\n                          }, {\n                            default: _withCtx(() => [\n                              _createElementVNode(\"span\", _hoisted_10, _toDisplayString(field.label), 1 /* TEXT */)\n                            ]),\n                            _: 2 /* DYNAMIC */\n                          }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"text\"]))\n                        : (_openBlock(), _createElementBlock(\"span\", _hoisted_11, _toDisplayString(field.label), 1 /* TEXT */))\n                    ], 2 /* CLASS */),\n                    (field.checklist)\n                      ? (_openBlock(), _createElementBlock(\"dd\", _hoisted_12, [\n                          _createElementVNode(\"div\", {\n                            class: \"observation-sections__checklist-scroll\",\n                            role: \"region\",\n                            \"aria-label\": field.label,\n                            tabindex: \"0\"\n                          }, [\n                            _createElementVNode(\"table\", _hoisted_14, [\n                              _cache[0] || (_cache[0] = _createElementVNode(\"thead\", null, [\n                                _createElementVNode(\"tr\", null, [\n                                  _createElementVNode(\"th\", { scope: \"col\" }, \"Voorziening\"),\n                                  _createElementVNode(\"th\", { scope: \"col\" }, \"Vastgesteld\"),\n                                  _createElementVNode(\"th\", { scope: \"col\" }, \"Toelichting\")\n                                ])\n                              ], -1 /* CACHED */)),\n                              _createElementVNode(\"tbody\", null, [\n                                (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(field.checklist, (item) => {\n                                  return (_openBlock(), _createElementBlock(\"tr\", {\n                                    key: item.key\n                                  }, [\n                                    _createElementVNode(\"th\", _hoisted_15, [\n                                      (item.tooltip)\n                                        ? (_openBlock(), _createBlock($setup[\"Tooltip\"], {\n                                            key: 0,\n                                            text: item.tooltip\n                                          }, {\n                                            default: _withCtx(() => [\n                                              _createElementVNode(\"span\", _hoisted_16, _toDisplayString(item.label), 1 /* TEXT */)\n                                            ]),\n                                            _: 2 /* DYNAMIC */\n                                          }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"text\"]))\n                                        : (_openBlock(), _createElementBlock(\"span\", _hoisted_17, _toDisplayString(item.label), 1 /* TEXT */))\n                                    ]),\n                                    _createElementVNode(\"td\", null, [\n                                      _createElementVNode(\"span\", {\n                                        class: _normalizeClass([\"observation-sections__status\", `observation-sections__status--${item.status}`])\n                                      }, [\n                                        _createElementVNode(\"span\", _hoisted_18, _toDisplayString(item.icon), 1 /* TEXT */),\n                                        _createElementVNode(\"span\", null, _toDisplayString(item.status === 'present' ? 'Aanwezig' : item.status === 'absent' ? 'Niet aanwezig' : 'Niet vaststelbaar'), 1 /* TEXT */)\n                                      ], 2 /* CLASS */)\n                                    ]),\n                                    _createElementVNode(\"td\", null, [\n                                      _createElementVNode(\"div\", _hoisted_19, [\n                                        _createElementVNode(\"span\", _hoisted_20, _toDisplayString(item.evidence), 1 /* TEXT */),\n                                        (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(item.hints, (hint, index) => {\n                                          return (_openBlock(), _createElementBlock(\"span\", {\n                                            key: index,\n                                            class: _normalizeClass([\"observation-sections__hint\", [`observation-sections__hint--${hint.tone}`, { 'observation-sections__hint--inactive': hint.active === false }]])\n                                          }, _toDisplayString(hint.text), 3 /* TEXT, CLASS */))\n                                        }), 128 /* KEYED_FRAGMENT */)),\n                                        (item.sourceLabel)\n                                          ? (_openBlock(), _createBlock($setup[\"Badge\"], {\n                                              key: 0,\n                                              class: \"observation-sections__source\"\n                                            }, {\n                                              default: _withCtx(() => [\n                                                _createTextVNode(_toDisplayString(item.sourceLabel), 1 /* TEXT */)\n                                              ]),\n                                              _: 2 /* DYNAMIC */\n                                            }, 1024 /* DYNAMIC_SLOTS */))\n                                          : _createCommentVNode(\"v-if\", true)\n                                      ])\n                                    ])\n                                  ]))\n                                }), 128 /* KEYED_FRAGMENT */))\n                              ])\n                            ])\n                          ], 8 /* PROPS */, _hoisted_13)\n                        ]))\n                      : (_openBlock(), _createElementBlock(\"dd\", _hoisted_21, [\n                          _createElementVNode(\"span\", null, _toDisplayString(field.value), 1 /* TEXT */),\n                          (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(field.hints, (hint, index) => {\n                            return (_openBlock(), _createElementBlock(\"span\", {\n                              key: index,\n                              class: _normalizeClass([\"observation-sections__hint\", [`observation-sections__hint--${hint.tone}`, { 'observation-sections__hint--inactive': hint.active === false }]])\n                            }, _toDisplayString(hint.text), 3 /* TEXT, CLASS */))\n                          }), 128 /* KEYED_FRAGMENT */)),\n                          (field.sourceLabel)\n                            ? (_openBlock(), _createBlock($setup[\"Badge\"], {\n                                key: 0,\n                                class: \"observation-sections__source\"\n                              }, {\n                                default: _withCtx(() => [\n                                  _createTextVNode(_toDisplayString(field.sourceLabel), 1 /* TEXT */)\n                                ]),\n                                _: 2 /* DYNAMIC */\n                              }, 1024 /* DYNAMIC_SLOTS */))\n                            : _createCommentVNode(\"v-if\", true)\n                        ]))\n                  ], 2 /* CLASS */))\n                }), 128 /* KEYED_FRAGMENT */))\n              ]))\n      ]))\n    }), 128 /* KEYED_FRAGMENT */))\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/ObservationSections.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/ObservationSections.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/ObservationSections.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/ObservationSections.vue\";script.__scopeId = \"data-v-042e43ee\";export default script;","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { CALIBRATION_ASPECT_LABELS, calibrationRows, type CalibrationPayload } from \"../../lib/analysis-panels\";\nimport Badge from \"../ui/Badge.vue\";\n\nconst props = defineProps<{ calibration: CalibrationPayload }>();\nconst rows = computed(() => calibrationRows(props.calibration));\nconst moved = computed(() => props.calibration.calibratedOverall !== props.calibration.rawOverall);\nconst appliedAt = computed(() => {\n  const value = props.calibration.appliedAt;\n  return Number.isNaN(Date.parse(value)) ? value : new Date(value).toLocaleString(\"nl-NL\");\n});\n</script>\n\n<template>\n  <section class=\"calibration-panel\">\n    <header class=\"calibration-panel__header\">\n      <h4 class=\"calibration-panel__title\">Feedback-kalibratie</h4>\n      <Badge :tone=\"calibration.live ? 'info' : 'neutral'\">{{ calibration.live ? \"Toegepast\" : \"Simulatie\" }}</Badge>\n    </header>\n    <p class=\"calibration-panel__text\">{{ calibration.live\n      ? \"De getoonde score is op basis van veldfeedback bijgesteld.\"\n      : \"Simulatie: de getoonde score blijft de ruwe deterministische score. Onderstaande bijstelling is alleen ter evaluatie.\" }}</p>\n    <p class=\"calibration-panel__overall\">\n      <span class=\"calibration-panel__muted\">Overall:</span>\n      <span :class=\"{ 'calibration-panel__old': moved }\">{{ calibration.rawOverall }}</span>\n      <template v-if=\"moved\"><span aria-hidden=\"true\">→</span><strong>{{ calibration.calibratedOverall }}</strong></template>\n    </p>\n    <table v-if=\"rows.length\" class=\"calibration-panel__table\">\n      <thead><tr><th scope=\"col\">Aspect</th><th scope=\"col\">Ruw</th><th scope=\"col\">Bijgesteld</th></tr></thead>\n      <tbody><tr v-for=\"row in rows\" :key=\"row.key\">\n        <td>{{ row.label }}</td>\n        <td :class=\"{ 'calibration-panel__old': row.raw !== row.calibrated }\">{{ row.raw ?? \"–\" }}</td>\n        <td :class=\"{ 'calibration-panel__changed': row.raw !== row.calibrated }\">{{ row.calibrated ?? \"–\" }}</td>\n      </tr></tbody>\n    </table>\n    <ul v-if=\"calibration.adjustments.length\" class=\"calibration-panel__adjustments\">\n      <li v-for=\"(adjustment, index) in calibration.adjustments\" :key=\"index\">\n        <strong>{{ CALIBRATION_ASPECT_LABELS[adjustment.aspect] ?? adjustment.aspect }}</strong>\n        <span :class=\"adjustment.delta < 0 ? 'calibration-panel__down' : 'calibration-panel__up'\"> {{ adjustment.delta > 0 ? `+${adjustment.delta}` : adjustment.delta }}</span>\n        <span v-if=\"adjustment.citedFeedbackIds.length\" class=\"calibration-panel__muted\"> (feedback {{ adjustment.citedFeedbackIds.map(id => `#${id}`).join(\", \") }})</span>\n        <p v-if=\"adjustment.rationale\" class=\"calibration-panel__text calibration-panel__muted\">{{ adjustment.rationale }}</p>\n      </li>\n    </ul>\n    <p v-if=\"calibration.overallRationale\" class=\"calibration-panel__rationale\">{{ calibration.overallRationale }}</p>\n    <p class=\"calibration-panel__meta\">Model: {{ calibration.model }}{{ calibration.reviewRecommended ? \" · review aangeraden\" : \"\" }}{{ appliedAt ? ` · ${appliedAt}` : \"\" }}</p>\n    <details v-if=\"calibration.promptText || calibration.rawModelOutput\" class=\"calibration-panel__debug\">\n      <summary>Prompt &amp; ruwe AI-output (debug)</summary>\n      <template v-if=\"calibration.promptText\"><h5>Prompt</h5><pre>{{ calibration.promptText }}</pre></template>\n      <template v-if=\"calibration.rawModelOutput\"><h5>Ruwe AI-output</h5><pre>{{ calibration.rawModelOutput }}</pre></template>\n    </details>\n  </section>\n</template>\n\n<style scoped>\n.calibration-panel { padding: 12px; border: 1px solid var(--info-border); border-radius: var(--radius); background: var(--info-bg); color: var(--info-fg); font-size: var(--text-caption); overflow-wrap: anywhere; }\n.calibration-panel__header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }\n.calibration-panel__title { margin: 0; font-size: var(--text-ui); font-weight: 500; }\n.calibration-panel__text { margin: 4px 0 0; white-space: pre-wrap; }\n.calibration-panel__overall { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 0; font-size: var(--text-ui); font-variant-numeric: tabular-nums; }\n.calibration-panel__muted, .calibration-panel__meta { color: var(--fg-3); }\n.calibration-panel__old { color: var(--fg-3); text-decoration: line-through; }\n.calibration-panel__changed { font-weight: 600; }\n.calibration-panel__table { width: 100%; margin-top: 8px; border-collapse: collapse; font-variant-numeric: tabular-nums; }\n.calibration-panel__table th { color: var(--fg-3); font-weight: 400; }\n.calibration-panel__table td { border-top: 1px solid var(--info-border); }\n.calibration-panel__table th, .calibration-panel__table td { padding: 3px 0 3px 8px; text-align: right; }\n.calibration-panel__table th:first-child, .calibration-panel__table td:first-child { padding-left: 0; text-align: left; }\n.calibration-panel__adjustments { display: flex; flex-direction: column; gap: 6px; list-style: none; margin: 8px 0 0; padding: 0; }\n.calibration-panel__down { color: var(--danger-fg); }\n.calibration-panel__up { color: var(--score-fg); }\n.calibration-panel__rationale { margin: 8px 0 0; font-style: italic; white-space: pre-wrap; }\n.calibration-panel__meta { margin: 8px 0 0; }\n.calibration-panel__debug { margin-top: 8px; }\n.calibration-panel__debug summary { cursor: pointer; }\n.calibration-panel__debug h5 { margin: 8px 0 4px; font: inherit; font-weight: 500; }\n.calibration-panel__debug pre { margin: 0; max-height: 288px; padding: 8px; overflow: auto; background: var(--bg-inset); font-size: var(--text-caption); white-space: pre-wrap; overflow-wrap: anywhere; }\n</style>\n","import type { CalibrationPayload } from \"../../../../js/wrd-types\";\nimport { parseGroundTruth } from \"./location-detail\";\n\nexport type { CalibrationPayload } from \"../../../../js/wrd-types\";\n\nexport interface LocationGroundTruth {\n  groundTruthParkingSpots: number | null;\n  groundTruthHasAdjacentSpots: boolean | null;\n  groundTruthNotes: string | null;\n  groundTruthUpdatedAt: string | null;\n}\n\nexport interface DebugAnalysis {\n  id: number;\n  status: string;\n  logs?: string | null;\n  promptTemplate?: string | null;\n  analysisMode?: string | null;\n  temperature?: number | null;\n  seed?: number | null;\n  createdAt?: string | null;\n}\n\nexport interface DebugModelResult {\n  id: number;\n  modelDisplayName: string;\n  status: string;\n  modelId?: string;\n  sentPrompt?: string | null;\n  rawResponse?: string | null;\n  reasoning?: string | null;\n  summary?: string | null;\n  observations?: string | null;\n  scoringBreakdown?: string | null;\n  liveScoringBreakdown?: string | null;\n  tokenUsage?: string | null;\n  durationMs?: number | null;\n  inputTokens?: number | null;\n  outputTokens?: number | null;\n  costCents?: number | null;\n  errorMessage?: string | null;\n  calibration?: CalibrationPayload | null;\n}\n\nexport const CALIBRATION_ASPECT_LABELS: Record<string, string> = {\n  aard_grootte: \"Aard & grootte\",\n  extra_services: \"Extra services\",\n  parkeerruimte: \"Parkeerruimte\",\n  toegankelijkheid: \"Toegankelijkheid\",\n  zichtbaarheid: \"Zichtbaarheid\",\n};\n\nexport function calibrationRows(calibration: CalibrationPayload): Array<{ key: string; label: string; raw: number | null; calibrated: number | null }> {\n  return Object.entries(CALIBRATION_ASPECT_LABELS)\n    .filter(([key]) => key in calibration.rawAspectScores || key in calibration.calibratedAspectScores)\n    .map(([key, label]) => ({\n      key,\n      label,\n      raw: calibration.rawAspectScores[key] ?? null,\n      calibrated: calibration.calibratedAspectScores[key] ?? calibration.rawAspectScores[key] ?? null,\n    }));\n}\n\nexport function formatDebugJson(value: string): string {\n  try {\n    return JSON.stringify(JSON.parse(value), null, 2);\n  } catch {\n    return value;\n  }\n}\n\nexport function analysisLogEntries(value: string | null | undefined): {\n  entries: Array<{ t: string; message: string; elapsedSeconds: string | null }>;\n  raw: string | null;\n} {\n  if (!value) return { entries: [], raw: null };\n  try {\n    const parsed: unknown = JSON.parse(value);\n    if (!Array.isArray(parsed) || !parsed.every((entry): entry is { t: string; message: string } =>\n      typeof entry === \"object\" && entry !== null && typeof entry.t === \"string\" && typeof entry.message === \"string\"))\n      return { entries: [], raw: value };\n    const start = parsed.length ? Date.parse(parsed[0].t) : 0;\n    return {\n      entries: parsed.map(entry => {\n        const elapsed = (Date.parse(entry.t) - start) / 1000;\n        return { ...entry, elapsedSeconds: Number.isFinite(elapsed) ? elapsed.toFixed(1) : null };\n      }),\n      raw: null,\n    };\n  } catch {\n    return { entries: [], raw: value };\n  }\n}\n\nexport interface GroundTruthApi {\n  updateLocationGroundTruth(params: { id: number } & ReturnType<typeof parseGroundTruth>): Promise<{ success: boolean }>;\n  findLocationById(params: { id: number }): Promise<{ location: LocationGroundTruth | null }>;\n}\n\nexport function isGroundTruthEcho(options: {\n  locationId: number;\n  loadedLocationId: number | null;\n  input: Parameters<typeof parseGroundTruth>[0];\n  updatedAt: string | null;\n  value: LocationGroundTruth;\n}): boolean {\n  const { value, input } = options;\n  return options.locationId === options.loadedLocationId\n    && options.updatedAt === value.groundTruthUpdatedAt\n    && input.parkingSpots === (value.groundTruthParkingSpots?.toString() ?? \"\")\n    && input.adjacent === (value.groundTruthHasAdjacentSpots === null ? \"unknown\" : value.groundTruthHasAdjacentSpots ? \"yes\" : \"no\")\n    && input.notes === (value.groundTruthNotes ?? \"\");\n}\n\nexport class GroundTruthRepository {\n  #api: GroundTruthApi;\n\n  constructor(api: GroundTruthApi) {\n    this.#api = api;\n  }\n\n  public async save(options: {\n    locationId: number;\n    input: Parameters<typeof parseGroundTruth>[0];\n    isCurrent: () => boolean;\n  }): Promise<LocationGroundTruth | null> {\n    const values = parseGroundTruth(options.input);\n    if (!options.isCurrent()) return null;\n    const result = await this.#api.updateLocationGroundTruth({ id: options.locationId, ...values });\n    if (!options.isCurrent()) return null;\n    if (!result.success) throw new Error(\"Opslaan is mislukt. Probeer het opnieuw.\");\n    const { location } = await this.#api.findLocationById({ id: options.locationId });\n    if (!options.isCurrent()) return null;\n    if (!location) throw new Error(\"De opgeslagen situatie kon niet worden teruggelezen. Vernieuw de pagina.\");\n    return {\n      groundTruthParkingSpots: location.groundTruthParkingSpots,\n      groundTruthHasAdjacentSpots: location.groundTruthHasAdjacentSpots,\n      groundTruthNotes: location.groundTruthNotes,\n      groundTruthUpdatedAt: location.groundTruthUpdatedAt,\n    };\n  }\n}\n","import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList } from \"vue\"\n\nconst _hoisted_1 = { class: \"calibration-panel\" }\nconst _hoisted_2 = { class: \"calibration-panel__header\" }\nconst _hoisted_3 = { class: \"calibration-panel__text\" }\nconst _hoisted_4 = { class: \"calibration-panel__overall\" }\nconst _hoisted_5 = {\n  key: 0,\n  class: \"calibration-panel__table\"\n}\nconst _hoisted_6 = {\n  key: 1,\n  class: \"calibration-panel__adjustments\"\n}\nconst _hoisted_7 = {\n  key: 0,\n  class: \"calibration-panel__muted\"\n}\nconst _hoisted_8 = {\n  key: 1,\n  class: \"calibration-panel__text calibration-panel__muted\"\n}\nconst _hoisted_9 = {\n  key: 2,\n  class: \"calibration-panel__rationale\"\n}\nconst _hoisted_10 = { class: \"calibration-panel__meta\" }\nconst _hoisted_11 = {\n  key: 3,\n  class: \"calibration-panel__debug\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"section\", _hoisted_1, [\n    _createElementVNode(\"header\", _hoisted_2, [\n      _cache[0] || (_cache[0] = _createElementVNode(\"h4\", { class: \"calibration-panel__title\" }, \"Feedback-kalibratie\", -1 /* CACHED */)),\n      _createVNode($setup[\"Badge\"], {\n        tone: $props.calibration.live ? 'info' : 'neutral'\n      }, {\n        default: _withCtx(() => [\n          _createTextVNode(_toDisplayString($props.calibration.live ? \"Toegepast\" : \"Simulatie\"), 1 /* TEXT */)\n        ]),\n        _: 1 /* STABLE */\n      }, 8 /* PROPS */, [\"tone\"])\n    ]),\n    _createElementVNode(\"p\", _hoisted_3, _toDisplayString($props.calibration.live\n      ? \"De getoonde score is op basis van veldfeedback bijgesteld.\"\n      : \"Simulatie: de getoonde score blijft de ruwe deterministische score. Onderstaande bijstelling is alleen ter evaluatie.\"), 1 /* TEXT */),\n    _createElementVNode(\"p\", _hoisted_4, [\n      _cache[2] || (_cache[2] = _createElementVNode(\"span\", { class: \"calibration-panel__muted\" }, \"Overall:\", -1 /* CACHED */)),\n      _createElementVNode(\"span\", {\n        class: _normalizeClass({ 'calibration-panel__old': $setup.moved })\n      }, _toDisplayString($props.calibration.rawOverall), 3 /* TEXT, CLASS */),\n      ($setup.moved)\n        ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n            _cache[1] || (_cache[1] = _createElementVNode(\"span\", { \"aria-hidden\": \"true\" }, \"→\", -1 /* CACHED */)),\n            _createElementVNode(\"strong\", null, _toDisplayString($props.calibration.calibratedOverall), 1 /* TEXT */)\n          ], 64 /* STABLE_FRAGMENT */))\n        : _createCommentVNode(\"v-if\", true)\n    ]),\n    ($setup.rows.length)\n      ? (_openBlock(), _createElementBlock(\"table\", _hoisted_5, [\n          _cache[3] || (_cache[3] = _createElementVNode(\"thead\", null, [\n            _createElementVNode(\"tr\", null, [\n              _createElementVNode(\"th\", { scope: \"col\" }, \"Aspect\"),\n              _createElementVNode(\"th\", { scope: \"col\" }, \"Ruw\"),\n              _createElementVNode(\"th\", { scope: \"col\" }, \"Bijgesteld\")\n            ])\n          ], -1 /* CACHED */)),\n          _createElementVNode(\"tbody\", null, [\n            (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.rows, (row) => {\n              return (_openBlock(), _createElementBlock(\"tr\", {\n                key: row.key\n              }, [\n                _createElementVNode(\"td\", null, _toDisplayString(row.label), 1 /* TEXT */),\n                _createElementVNode(\"td\", {\n                  class: _normalizeClass({ 'calibration-panel__old': row.raw !== row.calibrated })\n                }, _toDisplayString(row.raw ?? \"–\"), 3 /* TEXT, CLASS */),\n                _createElementVNode(\"td\", {\n                  class: _normalizeClass({ 'calibration-panel__changed': row.raw !== row.calibrated })\n                }, _toDisplayString(row.calibrated ?? \"–\"), 3 /* TEXT, CLASS */)\n              ]))\n            }), 128 /* KEYED_FRAGMENT */))\n          ])\n        ]))\n      : _createCommentVNode(\"v-if\", true),\n    ($props.calibration.adjustments.length)\n      ? (_openBlock(), _createElementBlock(\"ul\", _hoisted_6, [\n          (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.calibration.adjustments, (adjustment, index) => {\n            return (_openBlock(), _createElementBlock(\"li\", { key: index }, [\n              _createElementVNode(\"strong\", null, _toDisplayString($setup.CALIBRATION_ASPECT_LABELS[adjustment.aspect] ?? adjustment.aspect), 1 /* TEXT */),\n              _createElementVNode(\"span\", {\n                class: _normalizeClass(adjustment.delta < 0 ? 'calibration-panel__down' : 'calibration-panel__up')\n              }, _toDisplayString(adjustment.delta > 0 ? `+${adjustment.delta}` : adjustment.delta), 3 /* TEXT, CLASS */),\n              (adjustment.citedFeedbackIds.length)\n                ? (_openBlock(), _createElementBlock(\"span\", _hoisted_7, \" (feedback \" + _toDisplayString(adjustment.citedFeedbackIds.map(id => `#${id}`).join(\", \")) + \")\", 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true),\n              (adjustment.rationale)\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_8, _toDisplayString(adjustment.rationale), 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true)\n            ]))\n          }), 128 /* KEYED_FRAGMENT */))\n        ]))\n      : _createCommentVNode(\"v-if\", true),\n    ($props.calibration.overallRationale)\n      ? (_openBlock(), _createElementBlock(\"p\", _hoisted_9, _toDisplayString($props.calibration.overallRationale), 1 /* TEXT */))\n      : _createCommentVNode(\"v-if\", true),\n    _createElementVNode(\"p\", _hoisted_10, \"Model: \" + _toDisplayString($props.calibration.model) + _toDisplayString($props.calibration.reviewRecommended ? \" · review aangeraden\" : \"\") + _toDisplayString($setup.appliedAt ? ` · ${$setup.appliedAt}` : \"\"), 1 /* TEXT */),\n    ($props.calibration.promptText || $props.calibration.rawModelOutput)\n      ? (_openBlock(), _createElementBlock(\"details\", _hoisted_11, [\n          _cache[6] || (_cache[6] = _createElementVNode(\"summary\", null, \"Prompt & ruwe AI-output (debug)\", -1 /* CACHED */)),\n          ($props.calibration.promptText)\n            ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                _cache[4] || (_cache[4] = _createElementVNode(\"h5\", null, \"Prompt\", -1 /* CACHED */)),\n                _createElementVNode(\"pre\", null, _toDisplayString($props.calibration.promptText), 1 /* TEXT */)\n              ], 64 /* STABLE_FRAGMENT */))\n            : _createCommentVNode(\"v-if\", true),\n          ($props.calibration.rawModelOutput)\n            ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n                _cache[5] || (_cache[5] = _createElementVNode(\"h5\", null, \"Ruwe AI-output\", -1 /* CACHED */)),\n                _createElementVNode(\"pre\", null, _toDisplayString($props.calibration.rawModelOutput), 1 /* TEXT */)\n              ], 64 /* STABLE_FRAGMENT */))\n            : _createCommentVNode(\"v-if\", true)\n        ]))\n      : _createCommentVNode(\"v-if\", true)\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/CalibrationPanel.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/CalibrationPanel.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/CalibrationPanel.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/CalibrationPanel.vue\";script.__scopeId = \"data-v-53ef368a\";export default script;","/**\n * Decide whether the \"Huidige formule wijkt af\" drift banner should be\n * suppressed because the difference is fully explained by a live feedback\n * calibration (not by a scoring-formula change).\n *\n * The banner re-runs the deterministic scorer on the stored observations and\n * compares it to the stored score, to surface a scoring-FORMULA change. But a\n * LIVE feedback calibration also moves the stored score away from the raw\n * deterministic value, so for a calibrated analysis the recompute (raw) always\n * differs from the stored (calibrated) score — a false \"formula changed\"\n * positive. When the recompute exactly reproduces the calibration's RAW\n * pre-calibration values (overall + every recorded aspect), the whole\n * difference is the calibration, not a formula change: suppress.\n */\n\nexport interface DriftRecompute {\n  overall: number;\n  aspectScores: Record<string, number>;\n}\n\nexport interface DriftCalibration {\n  live: boolean;\n  rawOverall: number;\n  rawAspectScores: Record<string, number>;\n}\n\nexport function isDriftExplainedByCalibration(\n  recompute: DriftRecompute,\n  calibration: DriftCalibration | null | undefined,\n): boolean {\n  if (!calibration || !calibration.live) return false;\n  if (recompute.overall !== calibration.rawOverall) return false;\n  // Every raw aspect the calibration recorded must equal the recompute; a\n  // mismatch means the current formula scores an aspect differently than it did\n  // when the calibration ran — a genuine formula drift we must still surface.\n  return Object.entries(calibration.rawAspectScores).every(\n    ([key, value]) => recompute.aspectScores[key] === value,\n  );\n}\n","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createTextVNode as _createTextVNode, withCtx as _withCtx, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = {\n  key: 1,\n  class: \"models__duration\"\n}\nconst _hoisted_2 = {\n  key: 0,\n  class: \"models__muted\"\n}\nconst _hoisted_3 = {\n  key: 1,\n  class: \"models__muted\",\n  role: \"status\"\n}\nconst _hoisted_4 = {\n  key: 2,\n  class: \"models__error\"\n}\nconst _hoisted_5 = {\n  key: 3,\n  class: \"models__muted\"\n}\nconst _hoisted_6 = {\n  key: 4,\n  class: \"models__body models__content\"\n}\nconst _hoisted_7 = {\n  key: 1,\n  class: \"models__notice\"\n}\nconst _hoisted_8 = { class: \"models__explanations\" }\nconst _hoisted_9 = [\"open\"]\nconst _hoisted_10 = {\n  key: 3,\n  class: \"models__explanation\"\n}\nconst _hoisted_11 = {\n  key: 1,\n  class: \"models__notice\"\n}\nconst _hoisted_12 = { class: \"models__heading\" }\nconst _hoisted_13 = { key: 0 }\nconst _hoisted_14 = { class: \"models__heading\" }\nconst _hoisted_15 = { class: \"models__details\" }\nconst _hoisted_16 = {\n  key: 0,\n  class: \"models__explanation\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", {\n    class: _normalizeClass([\"models\", { 'models--multiple': $setup.models.length > 1 }])\n  }, [\n    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.models, (model) => {\n      return (_openBlock(), _createBlock($setup[\"Panel\"], {\n        key: model.result.id,\n        title: model.result.modelDisplayName,\n        class: \"models__card\",\n        flush: \"\"\n      }, {\n        actions: _withCtx(() => [\n          (model.result.tokenUsage === 'cached')\n            ? (_openBlock(), _createBlock($setup[\"Badge\"], { key: 0 }, {\n                default: _withCtx(() => _cache[0] || (_cache[0] = [\n                  _createTextVNode(\"Cache\", -1 /* CACHED */)\n                ])),\n                _: 1 /* STABLE */,\n                __: [0]\n              }))\n            : _createCommentVNode(\"v-if\", true),\n          _createVNode($setup[\"Badge\"], {\n            tone: model.status.tone\n          }, {\n            default: _withCtx(() => [\n              _createTextVNode(_toDisplayString(model.status.label), 1 /* TEXT */)\n            ]),\n            _: 2 /* DYNAMIC */\n          }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"tone\"]),\n          (model.result.durationMs !== null)\n            ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, _toDisplayString((model.result.durationMs / 1000).toFixed(1)) + \"s\", 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true)\n        ]),\n        default: _withCtx(() => [\n          (model.result.status === 'pending')\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_2, \"Wachten...\"))\n            : (model.result.status === 'running')\n              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_3, \"Model aan het analyseren...\"))\n              : (model.result.status === 'failed')\n                ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n                    _cache[1] || (_cache[1] = _createElementVNode(\"strong\", null, \"Analyse mislukt\", -1 /* CACHED */)),\n                    _createElementVNode(\"p\", null, _toDisplayString(model.result.errorMessage || \"Het model leverde geen resultaat.\"), 1 /* TEXT */)\n                  ]))\n                : (model.result.status === 'cancelled')\n                  ? (_openBlock(), _createElementBlock(\"p\", _hoisted_5, \"Dit model is gestopt.\"))\n                  : (model.result.status === 'completed')\n                    ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n                        ($props.analysisMode === 'observe-then-score')\n                          ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                              ($props.section === 'scoring')\n                                ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                                    (model.stored)\n                                      ? (_openBlock(), _createBlock($setup[\"ScoreBreakdown\"], {\n                                          key: 0,\n                                          breakdown: model.stored,\n                                          \"live-breakdown\": model.live,\n                                          \"drift-explained-by-calibration\": model.calibrationExplainsDrift\n                                        }, null, 8 /* PROPS */, [\"breakdown\", \"live-breakdown\", \"drift-explained-by-calibration\"]))\n                                      : (_openBlock(), _createElementBlock(\"p\", _hoisted_7, \"Geen scoring-breakdown beschikbaar. Bekijk de ruwe response onder Debug.\")),\n                                    (model.result.calibration)\n                                      ? (_openBlock(), _createBlock($setup[\"CalibrationPanel\"], {\n                                          key: 2,\n                                          calibration: model.result.calibration\n                                        }, null, 8 /* PROPS */, [\"calibration\"]))\n                                      : _createCommentVNode(\"v-if\", true),\n                                    _createElementVNode(\"section\", _hoisted_8, [\n                                      _cache[2] || (_cache[2] = _createElementVNode(\"h3\", { class: \"models__section-title\" }, \"Toelichting per aspect\", -1 /* CACHED */)),\n                                      (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(model.explanations, (explanation, index) => {\n                                        return (_openBlock(), _createElementBlock(_Fragment, {\n                                          key: explanation.label\n                                        }, [\n                                          (explanation.text)\n                                            ? (_openBlock(), _createElementBlock(\"details\", {\n                                                key: 0,\n                                                open: index === 0,\n                                                class: \"models__aspect\"\n                                              }, [\n                                                _createElementVNode(\"summary\", null, [\n                                                  _createTextVNode(_toDisplayString(explanation.label) + \" \", 1 /* TEXT */),\n                                                  _createElementVNode(\"span\", null, _toDisplayString(explanation.score ?? \"-\"), 1 /* TEXT */)\n                                                ]),\n                                                _createElementVNode(\"p\", null, _toDisplayString(explanation.text), 1 /* TEXT */)\n                                              ], 8 /* PROPS */, _hoisted_9))\n                                            : _createCommentVNode(\"v-if\", true)\n                                        ], 64 /* STABLE_FRAGMENT */))\n                                      }), 128 /* KEYED_FRAGMENT */))\n                                    ]),\n                                    (model.result.summary)\n                                      ? (_openBlock(), _createElementBlock(\"section\", _hoisted_10, [\n                                          _cache[3] || (_cache[3] = _createElementVNode(\"h3\", { class: \"models__heading\" }, \"Samenvatting\", -1 /* CACHED */)),\n                                          _createElementVNode(\"p\", null, _toDisplayString(model.result.summary), 1 /* TEXT */)\n                                        ]))\n                                      : _createCommentVNode(\"v-if\", true)\n                                  ], 64 /* STABLE_FRAGMENT */))\n                                : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n                                    (model.observations)\n                                      ? (_openBlock(), _createBlock($setup[\"ObservationSections\"], {\n                                          key: 0,\n                                          observations: model.observations,\n                                          breakdown: model.live,\n                                          section: $props.section\n                                        }, null, 8 /* PROPS */, [\"observations\", \"breakdown\", \"section\"]))\n                                      : (_openBlock(), _createElementBlock(\"p\", _hoisted_11, _toDisplayString($props.section === \"services\" ? \"Geen services-checklist in dit resultaat.\" : \"Kon observaties niet lezen, zie de ruwe response onder Debug.\"), 1 /* TEXT */))\n                                  ], 64 /* STABLE_FRAGMENT */))\n                            ], 64 /* STABLE_FRAGMENT */))\n                          : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n                              _cache[5] || (_cache[5] = _createElementVNode(\"h3\", { class: \"models__heading\" }, \"Quick-Scan\", -1 /* CACHED */)),\n                              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(model.explanations, (explanation) => {\n                                return (_openBlock(), _createElementBlock(\"div\", {\n                                  key: explanation.label,\n                                  class: \"models__explanation\"\n                                }, [\n                                  _createElementVNode(\"h4\", _hoisted_12, _toDisplayString(explanation.label), 1 /* TEXT */),\n                                  _createVNode($setup[\"ScoreBar\"], {\n                                    score: explanation.score\n                                  }, null, 8 /* PROPS */, [\"score\"]),\n                                  (explanation.text)\n                                    ? (_openBlock(), _createElementBlock(\"p\", _hoisted_13, _toDisplayString(explanation.text), 1 /* TEXT */))\n                                    : _createCommentVNode(\"v-if\", true)\n                                ]))\n                              }), 128 /* KEYED_FRAGMENT */)),\n                              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(model.details, (detail) => {\n                                return (_openBlock(), _createElementBlock(\"section\", {\n                                  key: detail.title\n                                }, [\n                                  _createElementVNode(\"h3\", _hoisted_14, _toDisplayString(detail.title), 1 /* TEXT */),\n                                  _createElementVNode(\"dl\", _hoisted_15, [\n                                    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(detail.value, (value, key) => {\n                                      return (_openBlock(), _createElementBlock(_Fragment, { key: key }, [\n                                        _createElementVNode(\"dt\", null, _toDisplayString(key), 1 /* TEXT */),\n                                        _createElementVNode(\"dd\", null, _toDisplayString($setup.detailText(value)), 1 /* TEXT */)\n                                      ], 64 /* STABLE_FRAGMENT */))\n                                    }), 128 /* KEYED_FRAGMENT */))\n                                  ])\n                                ]))\n                              }), 128 /* KEYED_FRAGMENT */)),\n                              (model.result.conclusion)\n                                ? (_openBlock(), _createElementBlock(\"section\", _hoisted_16, [\n                                    _cache[4] || (_cache[4] = _createElementVNode(\"h3\", { class: \"models__heading\" }, \"Conclusie\", -1 /* CACHED */)),\n                                    _createElementVNode(\"p\", null, _toDisplayString(model.result.conclusion), 1 /* TEXT */)\n                                  ]))\n                                : _createCommentVNode(\"v-if\", true)\n                            ], 64 /* STABLE_FRAGMENT */))\n                      ]))\n                    : _createCommentVNode(\"v-if\", true)\n        ]),\n        _: 2 /* DYNAMIC */\n      }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"title\"]))\n    }), 128 /* KEYED_FRAGMENT */))\n  ], 2 /* CLASS */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/AnalysisModelResults.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/AnalysisModelResults.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/AnalysisModelResults.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/AnalysisModelResults.vue\";script.__scopeId = \"data-v-8cb1eed1\";export default script;","<script setup lang=\"ts\">\nimport { computed, shallowRef } from \"vue\";\nimport { RouterLink } from \"vue-router\";\nimport { FEEDBACK_DIMENSION_LABELS, formatDistanceBadge, maskPii, summarizeDirection, type ResolvedRetrievedFeedback } from \"../../lib/retrieved-feedback\";\nimport Button from \"../ui/Button.vue\";\nimport Dialog from \"../ui/Dialog.vue\";\nimport Badge from \"../ui/Badge.vue\";\nimport Icon from \"../icons/Icon.vue\";\n\nconst props = withDefaults(defineProps<{ entries: ResolvedRetrievedFeedback[]; confidence?: number | null }>(), { confidence: null });\nconst selectedId = shallowRef<number | null>(null);\nconst detailOpen = shallowRef(false);\nconst selected = computed(() => props.entries.find(item => item.feedbackId === selectedId.value) ?? null);\nconst summary = computed(() => summarizeDirection(props.entries));\nconst rows = computed(() => props.entries.map(item => ({\n  ...item,\n  badge: Number.isFinite(item.distance) ? formatDistanceBadge(item.distance) : null,\n  tone: item.correctedScore - item.originalScore > 5 ? \"up\" : item.correctedScore - item.originalScore < -5 ? \"down\" : \"neutral\",\n})));\nconst detailDescription = computed(() => {\n  if (!selected.value) return \"Veldrapport\";\n  const item = selected.value;\n  const date = item.detail.createdAt;\n  const dateLabel = date ? Number.isNaN(Date.parse(date)) ? date : new Date(date).toLocaleDateString(\"nl-NL\", { day: \"numeric\", month: \"long\", year: \"numeric\", hour: \"2-digit\", minute: \"2-digit\" }) : \"\";\n  const relevance = Number.isFinite(item.distance) ? ` · relevantie ${(1 - item.distance).toFixed(2)}` : \"\";\n  return `Veldrapport${dateLabel ? ` · ${dateLabel}` : \"\"}${relevance}`;\n});\n\nfunction openFeedback(item: ResolvedRetrievedFeedback) {\n  selectedId.value = item.feedbackId;\n  detailOpen.value = true;\n}\n\nfunction ratingLabel(rating: string | null) {\n  return rating === \"agree\" ? \"Eens\" : rating === \"disagree\" ? \"Oneens\" : \"Niet beoordeeld\";\n}\n</script>\n\n<template>\n  <p v-if=\"!entries.length\" class=\"retrieved-feedback__hint\">Geen vergelijkbare eerdere veldrapporten gevonden.</p>\n  <details v-else class=\"retrieved-feedback\">\n    <summary>AI keek naar <strong>{{ entries.length }}</strong> {{ entries.length === 1 ? \"veldrapport\" : \"veldrapporten\" }}</summary>\n    <div class=\"retrieved-feedback__head\">\n      <p class=\"retrieved-feedback__hint\">{{ summary }}</p>\n      <Badge v-if=\"confidence !== null && confidence < 70\" tone=\"diverge\"><Icon name=\"warning--filled\" :size=\"12\" /> Lage confidence ({{ confidence }})</Badge>\n    </div>\n    <ul class=\"retrieved-feedback__list\">\n      <li v-for=\"row in rows\" :key=\"row.feedbackId\">\n        <button class=\"retrieved-feedback__row\" type=\"button\" @click=\"openFeedback(row)\">\n          <span class=\"retrieved-feedback__content\">\n            <span><strong>{{ row.locationName }}</strong><span v-if=\"row.sbiLabel\" class=\"retrieved-feedback__sbi\">SBI {{ row.sbiLabel }}</span></span>\n            <span class=\"retrieved-feedback__score\" :class=\"`retrieved-feedback__score--${row.tone}`\">{{ row.originalScore }} → {{ row.correctedScore }} <span class=\"retrieved-feedback__hint\">geschatte correctie</span></span>\n            <span v-if=\"row.notesSnippet\" class=\"retrieved-feedback__hint\">{{ maskPii(row.notesSnippet) }}</span>\n          </span>\n          <span v-if=\"row.badge\" class=\"retrieved-feedback__badge\" :class=\"`retrieved-feedback__badge--${row.badge.tone}`\">{{ row.badge.label }}</span>\n        </button>\n      </li>\n    </ul>\n  </details>\n  <Dialog v-if=\"selected\" v-model:open=\"detailOpen\" :title=\"selected.locationName\" :description=\"detailDescription\" :max-width=\"560\">\n    <div class=\"retrieved-feedback__detail\">\n      <p v-if=\"selected.sbiLabel\" class=\"retrieved-feedback__hint\">SBI {{ selected.sbiLabel }}</p>\n      <p v-if=\"selected.detail.overallRating\">Eindoordeel: <strong :class=\"`retrieved-feedback__rating--${selected.detail.overallRating}`\">{{ ratingLabel(selected.detail.overallRating) }}</strong></p>\n      <p>Score: <strong>{{ selected.originalScore }} → {{ selected.correctedScore }}</strong> <span class=\"retrieved-feedback__hint\">(geschatte correctie)</span></p>\n      <h4>Per aspect</h4>\n      <ul class=\"retrieved-feedback__dimensions\">\n        <li v-for=\"dimension in selected.detail.dimensions\" :key=\"dimension.key\">\n          <div class=\"retrieved-feedback__head\"><span>{{ FEEDBACK_DIMENSION_LABELS[dimension.key] }}</span><strong :class=\"`retrieved-feedback__rating--${dimension.rating}`\">{{ ratingLabel(dimension.rating) }}</strong></div>\n          <p v-if=\"dimension.reason\" class=\"retrieved-feedback__notes retrieved-feedback__hint\">{{ maskPii(dimension.reason) }}</p>\n        </li>\n      </ul>\n      <template v-if=\"selected.detail.aiMissesNotes\"><h4>Wat de AI mist</h4><p class=\"retrieved-feedback__notes\">{{ maskPii(selected.detail.aiMissesNotes) }}</p></template>\n      <template v-if=\"selected.detail.generalNotes\"><h4>Algemene opmerkingen</h4><p class=\"retrieved-feedback__notes\">{{ maskPii(selected.detail.generalNotes) }}</p></template>\n    </div>\n    <template #footer>\n      <RouterLink class=\"retrieved-feedback__link\" :to=\"{ name: 'location-detail', params: { id: selected.locationId } }\" @click=\"detailOpen = false\">Open locatie</RouterLink>\n      <Button @click=\"detailOpen = false\">Sluiten</Button>\n    </template>\n  </Dialog>\n</template>\n\n<style scoped>\n.retrieved-feedback { padding: 12px 16px; border: 1px solid var(--border-1); border-radius: var(--radius); background: var(--bg-inset); }\n.retrieved-feedback summary { font-size: var(--text-ui); cursor: pointer; }\n.retrieved-feedback > .retrieved-feedback__head { margin-top: 12px; }\n.retrieved-feedback__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }\n.retrieved-feedback__hint { margin: 0; color: var(--fg-3); font-size: var(--text-caption); }\n.retrieved-feedback__list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }\n.retrieved-feedback__row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; width: 100%; padding: 8px 12px; border: 1px solid var(--border-1); border-radius: var(--radius); background: var(--bg-surface); color: var(--fg-1); font: inherit; text-align: left; cursor: pointer; }\n.retrieved-feedback__content { display: flex; flex-direction: column; flex: 1; gap: 4px; min-width: 0; overflow-wrap: anywhere; }\n.retrieved-feedback__sbi { margin-left: 8px; color: var(--fg-3); font-size: var(--text-caption); }\n.retrieved-feedback__score { color: var(--fg-3); font-size: var(--text-caption); }\n.retrieved-feedback__score--up, .retrieved-feedback__rating--agree { color: var(--score-fg); }\n.retrieved-feedback__score--down, .retrieved-feedback__rating--disagree { color: var(--danger-fg); }\n.retrieved-feedback__badge { padding: 2px 8px; border-radius: var(--radius); font-size: var(--text-caption); color: var(--fg-3); background: var(--bg-inset); }\n.retrieved-feedback__badge--green { color: var(--score-fg); background: var(--score-bg); }\n.retrieved-feedback__badge--blue { color: var(--info-fg); background: var(--info-bg); }\n.retrieved-feedback__detail { display: flex; flex-direction: column; gap: 12px; }\n.retrieved-feedback__detail p, .retrieved-feedback__detail h4 { margin: 0; }\n.retrieved-feedback__dimensions { margin: 0; padding: 0; border: 1px solid var(--border-1); list-style: none; }\n.retrieved-feedback__dimensions li { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; }\n.retrieved-feedback__dimensions li + li { border-top: 1px solid var(--border-1); }\n.retrieved-feedback__notes { white-space: pre-wrap; overflow-wrap: anywhere; }\n.retrieved-feedback__link { align-self: center; margin-right: auto; color: var(--primary); cursor: pointer; }\n@media (hover: hover) { .retrieved-feedback__row:hover { background: var(--bg-inset); } .retrieved-feedback__link:hover { text-decoration: underline; } }\n</style>\n","import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, createVNode as _createVNode, withCtx as _withCtx, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = {\n  key: 0,\n  class: \"retrieved-feedback__hint\"\n}\nconst _hoisted_2 = {\n  key: 1,\n  class: \"retrieved-feedback\"\n}\nconst _hoisted_3 = { class: \"retrieved-feedback__head\" }\nconst _hoisted_4 = { class: \"retrieved-feedback__hint\" }\nconst _hoisted_5 = { class: \"retrieved-feedback__list\" }\nconst _hoisted_6 = [\"onClick\"]\nconst _hoisted_7 = { class: \"retrieved-feedback__content\" }\nconst _hoisted_8 = {\n  key: 0,\n  class: \"retrieved-feedback__sbi\"\n}\nconst _hoisted_9 = {\n  key: 0,\n  class: \"retrieved-feedback__hint\"\n}\nconst _hoisted_10 = { class: \"retrieved-feedback__detail\" }\nconst _hoisted_11 = {\n  key: 0,\n  class: \"retrieved-feedback__hint\"\n}\nconst _hoisted_12 = { key: 1 }\nconst _hoisted_13 = { class: \"retrieved-feedback__dimensions\" }\nconst _hoisted_14 = { class: \"retrieved-feedback__head\" }\nconst _hoisted_15 = {\n  key: 0,\n  class: \"retrieved-feedback__notes retrieved-feedback__hint\"\n}\nconst _hoisted_16 = { class: \"retrieved-feedback__notes\" }\nconst _hoisted_17 = { class: \"retrieved-feedback__notes\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(_Fragment, null, [\n    (!$props.entries.length)\n      ? (_openBlock(), _createElementBlock(\"p\", _hoisted_1, \"Geen vergelijkbare eerdere veldrapporten gevonden.\"))\n      : (_openBlock(), _createElementBlock(\"details\", _hoisted_2, [\n          _createElementVNode(\"summary\", null, [\n            _cache[3] || (_cache[3] = _createTextVNode(\"AI keek naar \", -1 /* CACHED */)),\n            _createElementVNode(\"strong\", null, _toDisplayString($props.entries.length), 1 /* TEXT */),\n            _createTextVNode(\" \" + _toDisplayString($props.entries.length === 1 ? \"veldrapport\" : \"veldrapporten\"), 1 /* TEXT */)\n          ]),\n          _createElementVNode(\"div\", _hoisted_3, [\n            _createElementVNode(\"p\", _hoisted_4, _toDisplayString($setup.summary), 1 /* TEXT */),\n            ($props.confidence !== null && $props.confidence < 70)\n              ? (_openBlock(), _createBlock($setup[\"Badge\"], {\n                  key: 0,\n                  tone: \"diverge\"\n                }, {\n                  default: _withCtx(() => [\n                    _createVNode($setup[\"Icon\"], {\n                      name: \"warning--filled\",\n                      size: 12\n                    }),\n                    _createTextVNode(\" Lage confidence (\" + _toDisplayString($props.confidence) + \")\", 1 /* TEXT */)\n                  ]),\n                  _: 1 /* STABLE */\n                }))\n              : _createCommentVNode(\"v-if\", true)\n          ]),\n          _createElementVNode(\"ul\", _hoisted_5, [\n            (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.rows, (row) => {\n              return (_openBlock(), _createElementBlock(\"li\", {\n                key: row.feedbackId\n              }, [\n                _createElementVNode(\"button\", {\n                  class: \"retrieved-feedback__row\",\n                  type: \"button\",\n                  onClick: $event => ($setup.openFeedback(row))\n                }, [\n                  _createElementVNode(\"span\", _hoisted_7, [\n                    _createElementVNode(\"span\", null, [\n                      _createElementVNode(\"strong\", null, _toDisplayString(row.locationName), 1 /* TEXT */),\n                      (row.sbiLabel)\n                        ? (_openBlock(), _createElementBlock(\"span\", _hoisted_8, \"SBI \" + _toDisplayString(row.sbiLabel), 1 /* TEXT */))\n                        : _createCommentVNode(\"v-if\", true)\n                    ]),\n                    _createElementVNode(\"span\", {\n                      class: _normalizeClass([\"retrieved-feedback__score\", `retrieved-feedback__score--${row.tone}`])\n                    }, [\n                      _createTextVNode(_toDisplayString(row.originalScore) + \" → \" + _toDisplayString(row.correctedScore) + \" \", 1 /* TEXT */),\n                      _cache[4] || (_cache[4] = _createElementVNode(\"span\", { class: \"retrieved-feedback__hint\" }, \"geschatte correctie\", -1 /* CACHED */))\n                    ], 2 /* CLASS */),\n                    (row.notesSnippet)\n                      ? (_openBlock(), _createElementBlock(\"span\", _hoisted_9, _toDisplayString($setup.maskPii(row.notesSnippet)), 1 /* TEXT */))\n                      : _createCommentVNode(\"v-if\", true)\n                  ]),\n                  (row.badge)\n                    ? (_openBlock(), _createElementBlock(\"span\", {\n                        key: 0,\n                        class: _normalizeClass([\"retrieved-feedback__badge\", `retrieved-feedback__badge--${row.badge.tone}`])\n                      }, _toDisplayString(row.badge.label), 3 /* TEXT, CLASS */))\n                    : _createCommentVNode(\"v-if\", true)\n                ], 8 /* PROPS */, _hoisted_6)\n              ]))\n            }), 128 /* KEYED_FRAGMENT */))\n          ])\n        ])),\n    ($setup.selected)\n      ? (_openBlock(), _createBlock($setup[\"Dialog\"], {\n          key: 2,\n          open: $setup.detailOpen,\n          \"onUpdate:open\": _cache[2] || (_cache[2] = $event => (($setup.detailOpen) = $event)),\n          title: $setup.selected.locationName,\n          description: $setup.detailDescription,\n          \"max-width\": 560\n        }, {\n          footer: _withCtx(() => [\n            _createVNode($setup[\"RouterLink\"], {\n              class: \"retrieved-feedback__link\",\n              to: { name: 'location-detail', params: { id: $setup.selected.locationId } },\n              onClick: _cache[0] || (_cache[0] = $event => ($setup.detailOpen = false))\n            }, {\n              default: _withCtx(() => _cache[12] || (_cache[12] = [\n                _createTextVNode(\"Open locatie\", -1 /* CACHED */)\n              ])),\n              _: 1 /* STABLE */,\n              __: [12]\n            }, 8 /* PROPS */, [\"to\"]),\n            _createVNode($setup[\"Button\"], {\n              onClick: _cache[1] || (_cache[1] = $event => ($setup.detailOpen = false))\n            }, {\n              default: _withCtx(() => _cache[13] || (_cache[13] = [\n                _createTextVNode(\"Sluiten\", -1 /* CACHED */)\n              ])),\n              _: 1 /* STABLE */,\n              __: [13]\n            })\n          ]),\n          default: _withCtx(() => [\n            _createElementVNode(\"div\", _hoisted_10, [\n              ($setup.selected.sbiLabel)\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_11, \"SBI \" + _toDisplayString($setup.selected.sbiLabel), 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true),\n              ($setup.selected.detail.overallRating)\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_12, [\n                    _cache[5] || (_cache[5] = _createTextVNode(\"Eindoordeel: \", -1 /* CACHED */)),\n                    _createElementVNode(\"strong\", {\n                      class: _normalizeClass(`retrieved-feedback__rating--${$setup.selected.detail.overallRating}`)\n                    }, _toDisplayString($setup.ratingLabel($setup.selected.detail.overallRating)), 3 /* TEXT, CLASS */)\n                  ]))\n                : _createCommentVNode(\"v-if\", true),\n              _createElementVNode(\"p\", null, [\n                _cache[6] || (_cache[6] = _createTextVNode(\"Score: \", -1 /* CACHED */)),\n                _createElementVNode(\"strong\", null, _toDisplayString($setup.selected.originalScore) + \" → \" + _toDisplayString($setup.selected.correctedScore), 1 /* TEXT */),\n                _cache[7] || (_cache[7] = _createTextVNode()),\n                _cache[8] || (_cache[8] = _createElementVNode(\"span\", { class: \"retrieved-feedback__hint\" }, \"(geschatte correctie)\", -1 /* CACHED */))\n              ]),\n              _cache[11] || (_cache[11] = _createElementVNode(\"h4\", null, \"Per aspect\", -1 /* CACHED */)),\n              _createElementVNode(\"ul\", _hoisted_13, [\n                (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.selected.detail.dimensions, (dimension) => {\n                  return (_openBlock(), _createElementBlock(\"li\", {\n                    key: dimension.key\n                  }, [\n                    _createElementVNode(\"div\", _hoisted_14, [\n                      _createElementVNode(\"span\", null, _toDisplayString($setup.FEEDBACK_DIMENSION_LABELS[dimension.key]), 1 /* TEXT */),\n                      _createElementVNode(\"strong\", {\n                        class: _normalizeClass(`retrieved-feedback__rating--${dimension.rating}`)\n                      }, _toDisplayString($setup.ratingLabel(dimension.rating)), 3 /* TEXT, CLASS */)\n                    ]),\n                    (dimension.reason)\n                      ? (_openBlock(), _createElementBlock(\"p\", _hoisted_15, _toDisplayString($setup.maskPii(dimension.reason)), 1 /* TEXT */))\n                      : _createCommentVNode(\"v-if\", true)\n                  ]))\n                }), 128 /* KEYED_FRAGMENT */))\n              ]),\n              ($setup.selected.detail.aiMissesNotes)\n                ? (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [\n                    _cache[9] || (_cache[9] = _createElementVNode(\"h4\", null, \"Wat de AI mist\", -1 /* CACHED */)),\n                    _createElementVNode(\"p\", _hoisted_16, _toDisplayString($setup.maskPii($setup.selected.detail.aiMissesNotes)), 1 /* TEXT */)\n                  ], 64 /* STABLE_FRAGMENT */))\n                : _createCommentVNode(\"v-if\", true),\n              ($setup.selected.detail.generalNotes)\n                ? (_openBlock(), _createElementBlock(_Fragment, { key: 3 }, [\n                    _cache[10] || (_cache[10] = _createElementVNode(\"h4\", null, \"Algemene opmerkingen\", -1 /* CACHED */)),\n                    _createElementVNode(\"p\", _hoisted_17, _toDisplayString($setup.maskPii($setup.selected.detail.generalNotes)), 1 /* TEXT */)\n                  ], 64 /* STABLE_FRAGMENT */))\n                : _createCommentVNode(\"v-if\", true)\n            ])\n          ]),\n          _: 1 /* STABLE */\n        }, 8 /* PROPS */, [\"open\", \"title\", \"description\"]))\n      : _createCommentVNode(\"v-if\", true)\n  ], 64 /* STABLE_FRAGMENT */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/RetrievedFeedbackPanel.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/RetrievedFeedbackPanel.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/RetrievedFeedbackPanel.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/RetrievedFeedbackPanel.vue\";script.__scopeId = \"data-v-42b1fcbc\";export default script;","<script setup lang=\"ts\">\nimport { computed, useTemplateRef, watch } from \"vue\";\nimport { analysisLogEntries, formatDebugJson, type DebugAnalysis, type DebugModelResult } from \"../../lib/analysis-panels\";\nimport { analysisStatusLabel, formatAnalysisDate, formatCostCents } from \"../../lib/analyses-format\";\nimport Panel from \"../ui/Panel.vue\";\nimport Badge from \"../ui/Badge.vue\";\n\nconst props = defineProps<{ analysis: DebugAnalysis; modelResults: DebugModelResult[] }>();\nconst logs = computed(() => analysisLogEntries(props.analysis.logs));\nconst logStream = useTemplateRef<HTMLElement>(\"logStream\");\nconst sections = [\n  { key: \"sentPrompt\", label: \"Verzonden prompt\", json: false },\n  { key: \"reasoning\", label: \"Reasoning / Thinking\", json: false },\n  { key: \"rawResponse\", label: \"Ruwe response (JSON)\", json: true },\n  { key: \"summary\", label: \"Samenvatting\", json: false },\n  { key: \"observations\", label: \"Observaties (JSON)\", json: true },\n  { key: \"scoringBreakdown\", label: \"Opgeslagen scoreberekening (JSON)\", json: true },\n  { key: \"liveScoringBreakdown\", label: \"Huidige scoreberekening (JSON)\", json: true },\n  { key: \"tokenUsage\", label: \"Tokengebruik (JSON)\", json: true },\n] as const;\n\nwatch(() => [props.analysis.id, logs.value.entries.length], () => {\n  if (logStream.value) logStream.value.scrollTop = logStream.value.scrollHeight;\n}, { flush: \"post\" });\n</script>\n\n<template>\n  <Panel :key=\"analysis.id\" title=\"Debug / Logging\">\n    <div class=\"debug-panel\">\n      <dl class=\"debug-panel__metadata\">\n        <div><dt>Analyse</dt><dd>#{{ analysis.id }}</dd></div>\n        <div><dt>Status</dt><dd><Badge :tone=\"analysisStatusLabel(analysis.status).tone\">{{ analysisStatusLabel(analysis.status).label }}</Badge></dd></div>\n        <div v-if=\"analysis.analysisMode\"><dt>Analysemethode</dt><dd>{{ analysis.analysisMode }}</dd></div>\n        <div v-if=\"analysis.temperature != null\"><dt>Temperatuur</dt><dd>{{ analysis.temperature }}</dd></div>\n        <div v-if=\"analysis.seed != null\"><dt>Seed</dt><dd>{{ analysis.seed }}</dd></div>\n        <div v-if=\"analysis.createdAt\"><dt>Gestart</dt><dd>{{ Number.isNaN(Date.parse(analysis.createdAt)) ? analysis.createdAt : formatAnalysisDate(analysis.createdAt) }}</dd></div>\n      </dl>\n      <details v-if=\"analysis.promptTemplate\" class=\"debug-panel__section\">\n        <summary>Prompttemplate <Badge>Aangepast</Badge></summary>\n        <pre class=\"debug-panel__payload\">{{ analysis.promptTemplate }}</pre>\n      </details>\n      <p v-if=\"!modelResults.length\" class=\"debug-panel__muted\">Nog geen modelresponses beschikbaar.</p>\n      <details v-for=\"result in modelResults\" :key=\"result.id\" open class=\"debug-panel__model\">\n        <summary class=\"debug-panel__model-title\">\n          {{ result.modelDisplayName }}\n          <Badge :tone=\"analysisStatusLabel(result.status).tone\">{{ analysisStatusLabel(result.status).label }}</Badge>\n          <span v-if=\"result.durationMs != null\" class=\"debug-panel__muted\">{{ (result.durationMs / 1000).toFixed(1) }}s</span>\n          <span v-if=\"result.inputTokens != null && result.inputTokens > 0\" class=\"debug-panel__muted\">{{ result.inputTokens.toLocaleString(\"nl-NL\") }} in / {{ (result.outputTokens ?? 0).toLocaleString(\"nl-NL\") }} out</span>\n          <span v-if=\"result.costCents != null && result.costCents > 0\" class=\"debug-panel__muted\">{{ formatCostCents(result.costCents) }}</span>\n        </summary>\n        <div class=\"debug-panel__model-body\">\n          <p v-if=\"result.modelId\" class=\"debug-panel__muted\">{{ result.modelId }}</p>\n          <div v-if=\"result.errorMessage\" class=\"debug-panel__error\"><strong>Fout</strong><pre>{{ result.errorMessage }}</pre></div>\n          <template v-for=\"section in sections\" :key=\"section.key\">\n            <details v-if=\"result[section.key]\" class=\"debug-panel__section\">\n              <summary>{{ section.label }}</summary>\n              <pre class=\"debug-panel__payload\" :class=\"{ 'debug-panel__payload--reasoning': section.key === 'reasoning' }\">{{ section.json ? formatDebugJson(result[section.key] ?? \"\") : result[section.key] }}</pre>\n            </details>\n          </template>\n          <p v-if=\"!result.reasoning && result.status === 'completed'\" class=\"debug-panel__muted\">Geen reasoning/thinking beschikbaar voor dit model</p>\n          <p v-if=\"!result.rawResponse && result.status !== 'failed'\" class=\"debug-panel__muted\">Geen response data beschikbaar</p>\n          <details v-if=\"result.calibration\" class=\"debug-panel__section\">\n            <summary>Kalibratie (JSON)</summary>\n            <pre class=\"debug-panel__payload\">{{ JSON.stringify(result.calibration, null, 2) }}</pre>\n          </details>\n          <details v-if=\"result.calibration?.promptText\" class=\"debug-panel__section\">\n            <summary>Kalibratieprompt</summary>\n            <pre class=\"debug-panel__payload\">{{ result.calibration.promptText }}</pre>\n          </details>\n          <details v-if=\"result.calibration?.rawModelOutput\" class=\"debug-panel__section\">\n            <summary>Ruwe kalibratie-output</summary>\n            <pre class=\"debug-panel__payload\">{{ result.calibration.rawModelOutput }}</pre>\n          </details>\n        </div>\n      </details>\n      <section v-if=\"logs.entries.length\" class=\"debug-panel__logs\">\n        <h3 class=\"debug-panel__log-title\">Activiteitenlog</h3>\n        <div ref=\"logStream\" class=\"debug-panel__log-stream\">\n          <div v-for=\"(entry, index) in logs.entries\" :key=\"index\" class=\"debug-panel__log-entry\">\n            <time :datetime=\"entry.t\" :title=\"entry.t\">{{ entry.elapsedSeconds === null ? \"–\" : `${entry.elapsedSeconds}s` }}</time>\n            <span>{{ entry.message }}</span>\n          </div>\n        </div>\n      </section>\n      <details v-else-if=\"logs.raw\" class=\"debug-panel__section\">\n        <summary>Activiteitenlog (ruwe tekst)</summary>\n        <pre class=\"debug-panel__payload\">{{ logs.raw }}</pre>\n      </details>\n    </div>\n  </Panel>\n</template>\n\n<style scoped>\n.debug-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }\n.debug-panel__metadata { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0; font-size: var(--text-caption); }\n.debug-panel__metadata dt { color: var(--fg-3); }\n.debug-panel__metadata dd { margin: 4px 0 0; overflow-wrap: anywhere; }\n.debug-panel__section summary { cursor: pointer; font-size: var(--text-caption); font-weight: 500; }\n.debug-panel__payload { max-height: 400px; padding: 12px; margin: 8px 0 0; overflow: auto; border-radius: var(--radius); background: var(--bg-inset); color: var(--fg-2); font-size: var(--text-caption); white-space: pre-wrap; overflow-wrap: anywhere; }\n.debug-panel__payload--reasoning { background: var(--diverge-bg); color: var(--diverge-fg); }\n.debug-panel__model { border: 1px solid var(--border-1); border-radius: var(--radius); }\n.debug-panel__model-title { padding: 12px; cursor: pointer; font-size: var(--text-ui); overflow-wrap: anywhere; }\n.debug-panel__model-title > * { margin-left: 8px; }\n.debug-panel__model-body { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--border-1); padding: 12px; }\n.debug-panel__muted { margin: 0; color: var(--fg-3); font-size: var(--text-caption); }\n.debug-panel__error { padding: 8px; border: 1px solid var(--danger-border); background: var(--danger-bg); color: var(--danger-fg); font-size: var(--text-caption); }\n.debug-panel__error pre { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: inherit; }\n.debug-panel__log-title { margin: 0 0 6px; font-size: var(--text-caption); font-weight: 500; color: var(--fg-3); }\n.debug-panel__log-stream { height: 160px; padding: 12px; overflow-y: auto; background: var(--bg-inset); color: var(--fg-3); font-size: var(--text-caption); }\n.debug-panel__log-entry { display: flex; gap: 8px; line-height: 1.6; }\n.debug-panel__log-entry time { flex: none; font-variant-numeric: tabular-nums; }\n.debug-panel__log-entry span { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }\n</style>\n","import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"debug-panel\" }\nconst _hoisted_2 = { class: \"debug-panel__metadata\" }\nconst _hoisted_3 = { key: 0 }\nconst _hoisted_4 = { key: 1 }\nconst _hoisted_5 = { key: 2 }\nconst _hoisted_6 = { key: 3 }\nconst _hoisted_7 = {\n  key: 0,\n  class: \"debug-panel__section\"\n}\nconst _hoisted_8 = { class: \"debug-panel__payload\" }\nconst _hoisted_9 = {\n  key: 1,\n  class: \"debug-panel__muted\"\n}\nconst _hoisted_10 = { class: \"debug-panel__model-title\" }\nconst _hoisted_11 = {\n  key: 0,\n  class: \"debug-panel__muted\"\n}\nconst _hoisted_12 = {\n  key: 1,\n  class: \"debug-panel__muted\"\n}\nconst _hoisted_13 = {\n  key: 2,\n  class: \"debug-panel__muted\"\n}\nconst _hoisted_14 = { class: \"debug-panel__model-body\" }\nconst _hoisted_15 = {\n  key: 0,\n  class: \"debug-panel__muted\"\n}\nconst _hoisted_16 = {\n  key: 1,\n  class: \"debug-panel__error\"\n}\nconst _hoisted_17 = {\n  key: 0,\n  class: \"debug-panel__section\"\n}\nconst _hoisted_18 = {\n  key: 2,\n  class: \"debug-panel__muted\"\n}\nconst _hoisted_19 = {\n  key: 3,\n  class: \"debug-panel__muted\"\n}\nconst _hoisted_20 = {\n  key: 4,\n  class: \"debug-panel__section\"\n}\nconst _hoisted_21 = { class: \"debug-panel__payload\" }\nconst _hoisted_22 = {\n  key: 5,\n  class: \"debug-panel__section\"\n}\nconst _hoisted_23 = { class: \"debug-panel__payload\" }\nconst _hoisted_24 = {\n  key: 6,\n  class: \"debug-panel__section\"\n}\nconst _hoisted_25 = { class: \"debug-panel__payload\" }\nconst _hoisted_26 = {\n  key: 2,\n  class: \"debug-panel__logs\"\n}\nconst _hoisted_27 = {\n  ref: \"logStream\",\n  class: \"debug-panel__log-stream\"\n}\nconst _hoisted_28 = [\"datetime\", \"title\"]\nconst _hoisted_29 = {\n  key: 3,\n  class: \"debug-panel__section\"\n}\nconst _hoisted_30 = { class: \"debug-panel__payload\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createBlock($setup[\"Panel\"], {\n    key: $props.analysis.id,\n    title: \"Debug / Logging\"\n  }, {\n    default: _withCtx(() => [\n      _createElementVNode(\"div\", _hoisted_1, [\n        _createElementVNode(\"dl\", _hoisted_2, [\n          _createElementVNode(\"div\", null, [\n            _cache[0] || (_cache[0] = _createElementVNode(\"dt\", null, \"Analyse\", -1 /* CACHED */)),\n            _createElementVNode(\"dd\", null, \"#\" + _toDisplayString($props.analysis.id), 1 /* TEXT */)\n          ]),\n          _createElementVNode(\"div\", null, [\n            _cache[1] || (_cache[1] = _createElementVNode(\"dt\", null, \"Status\", -1 /* CACHED */)),\n            _createElementVNode(\"dd\", null, [\n              _createVNode($setup[\"Badge\"], {\n                tone: $setup.analysisStatusLabel($props.analysis.status).tone\n              }, {\n                default: _withCtx(() => [\n                  _createTextVNode(_toDisplayString($setup.analysisStatusLabel($props.analysis.status).label), 1 /* TEXT */)\n                ]),\n                _: 1 /* STABLE */\n              }, 8 /* PROPS */, [\"tone\"])\n            ])\n          ]),\n          ($props.analysis.analysisMode)\n            ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [\n                _cache[2] || (_cache[2] = _createElementVNode(\"dt\", null, \"Analysemethode\", -1 /* CACHED */)),\n                _createElementVNode(\"dd\", null, _toDisplayString($props.analysis.analysisMode), 1 /* TEXT */)\n              ]))\n            : _createCommentVNode(\"v-if\", true),\n          ($props.analysis.temperature != null)\n            ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n                _cache[3] || (_cache[3] = _createElementVNode(\"dt\", null, \"Temperatuur\", -1 /* CACHED */)),\n                _createElementVNode(\"dd\", null, _toDisplayString($props.analysis.temperature), 1 /* TEXT */)\n              ]))\n            : _createCommentVNode(\"v-if\", true),\n          ($props.analysis.seed != null)\n            ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n                _cache[4] || (_cache[4] = _createElementVNode(\"dt\", null, \"Seed\", -1 /* CACHED */)),\n                _createElementVNode(\"dd\", null, _toDisplayString($props.analysis.seed), 1 /* TEXT */)\n              ]))\n            : _createCommentVNode(\"v-if\", true),\n          ($props.analysis.createdAt)\n            ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n                _cache[5] || (_cache[5] = _createElementVNode(\"dt\", null, \"Gestart\", -1 /* CACHED */)),\n                _createElementVNode(\"dd\", null, _toDisplayString(Number.isNaN(Date.parse($props.analysis.createdAt)) ? $props.analysis.createdAt : $setup.formatAnalysisDate($props.analysis.createdAt)), 1 /* TEXT */)\n              ]))\n            : _createCommentVNode(\"v-if\", true)\n        ]),\n        ($props.analysis.promptTemplate)\n          ? (_openBlock(), _createElementBlock(\"details\", _hoisted_7, [\n              _createElementVNode(\"summary\", null, [\n                _cache[7] || (_cache[7] = _createTextVNode(\"Prompttemplate \", -1 /* CACHED */)),\n                _createVNode($setup[\"Badge\"], null, {\n                  default: _withCtx(() => _cache[6] || (_cache[6] = [\n                    _createTextVNode(\"Aangepast\", -1 /* CACHED */)\n                  ])),\n                  _: 1 /* STABLE */,\n                  __: [6]\n                })\n              ]),\n              _createElementVNode(\"pre\", _hoisted_8, _toDisplayString($props.analysis.promptTemplate), 1 /* TEXT */)\n            ]))\n          : _createCommentVNode(\"v-if\", true),\n        (!$props.modelResults.length)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_9, \"Nog geen modelresponses beschikbaar.\"))\n          : _createCommentVNode(\"v-if\", true),\n        (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($props.modelResults, (result) => {\n          return (_openBlock(), _createElementBlock(\"details\", {\n            key: result.id,\n            open: \"\",\n            class: \"debug-panel__model\"\n          }, [\n            _createElementVNode(\"summary\", _hoisted_10, [\n              _createTextVNode(_toDisplayString(result.modelDisplayName) + \" \", 1 /* TEXT */),\n              _createVNode($setup[\"Badge\"], {\n                tone: $setup.analysisStatusLabel(result.status).tone\n              }, {\n                default: _withCtx(() => [\n                  _createTextVNode(_toDisplayString($setup.analysisStatusLabel(result.status).label), 1 /* TEXT */)\n                ]),\n                _: 2 /* DYNAMIC */\n              }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"tone\"]),\n              (result.durationMs != null)\n                ? (_openBlock(), _createElementBlock(\"span\", _hoisted_11, _toDisplayString((result.durationMs / 1000).toFixed(1)) + \"s\", 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true),\n              (result.inputTokens != null && result.inputTokens > 0)\n                ? (_openBlock(), _createElementBlock(\"span\", _hoisted_12, _toDisplayString(result.inputTokens.toLocaleString(\"nl-NL\")) + \" in / \" + _toDisplayString((result.outputTokens ?? 0).toLocaleString(\"nl-NL\")) + \" out\", 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true),\n              (result.costCents != null && result.costCents > 0)\n                ? (_openBlock(), _createElementBlock(\"span\", _hoisted_13, _toDisplayString($setup.formatCostCents(result.costCents)), 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true)\n            ]),\n            _createElementVNode(\"div\", _hoisted_14, [\n              (result.modelId)\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_15, _toDisplayString(result.modelId), 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true),\n              (result.errorMessage)\n                ? (_openBlock(), _createElementBlock(\"div\", _hoisted_16, [\n                    _cache[8] || (_cache[8] = _createElementVNode(\"strong\", null, \"Fout\", -1 /* CACHED */)),\n                    _createElementVNode(\"pre\", null, _toDisplayString(result.errorMessage), 1 /* TEXT */)\n                  ]))\n                : _createCommentVNode(\"v-if\", true),\n              (_openBlock(), _createElementBlock(_Fragment, null, _renderList($setup.sections, (section) => {\n                return (_openBlock(), _createElementBlock(_Fragment, {\n                  key: section.key\n                }, [\n                  (result[section.key])\n                    ? (_openBlock(), _createElementBlock(\"details\", _hoisted_17, [\n                        _createElementVNode(\"summary\", null, _toDisplayString(section.label), 1 /* TEXT */),\n                        _createElementVNode(\"pre\", {\n                          class: _normalizeClass([\"debug-panel__payload\", { 'debug-panel__payload--reasoning': section.key === 'reasoning' }])\n                        }, _toDisplayString(section.json ? $setup.formatDebugJson(result[section.key] ?? \"\") : result[section.key]), 3 /* TEXT, CLASS */)\n                      ]))\n                    : _createCommentVNode(\"v-if\", true)\n                ], 64 /* STABLE_FRAGMENT */))\n              }), 64 /* STABLE_FRAGMENT */)),\n              (!result.reasoning && result.status === 'completed')\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_18, \"Geen reasoning/thinking beschikbaar voor dit model\"))\n                : _createCommentVNode(\"v-if\", true),\n              (!result.rawResponse && result.status !== 'failed')\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_19, \"Geen response data beschikbaar\"))\n                : _createCommentVNode(\"v-if\", true),\n              (result.calibration)\n                ? (_openBlock(), _createElementBlock(\"details\", _hoisted_20, [\n                    _cache[9] || (_cache[9] = _createElementVNode(\"summary\", null, \"Kalibratie (JSON)\", -1 /* CACHED */)),\n                    _createElementVNode(\"pre\", _hoisted_21, _toDisplayString(JSON.stringify(result.calibration, null, 2)), 1 /* TEXT */)\n                  ]))\n                : _createCommentVNode(\"v-if\", true),\n              (result.calibration?.promptText)\n                ? (_openBlock(), _createElementBlock(\"details\", _hoisted_22, [\n                    _cache[10] || (_cache[10] = _createElementVNode(\"summary\", null, \"Kalibratieprompt\", -1 /* CACHED */)),\n                    _createElementVNode(\"pre\", _hoisted_23, _toDisplayString(result.calibration.promptText), 1 /* TEXT */)\n                  ]))\n                : _createCommentVNode(\"v-if\", true),\n              (result.calibration?.rawModelOutput)\n                ? (_openBlock(), _createElementBlock(\"details\", _hoisted_24, [\n                    _cache[11] || (_cache[11] = _createElementVNode(\"summary\", null, \"Ruwe kalibratie-output\", -1 /* CACHED */)),\n                    _createElementVNode(\"pre\", _hoisted_25, _toDisplayString(result.calibration.rawModelOutput), 1 /* TEXT */)\n                  ]))\n                : _createCommentVNode(\"v-if\", true)\n            ])\n          ]))\n        }), 128 /* KEYED_FRAGMENT */)),\n        ($setup.logs.entries.length)\n          ? (_openBlock(), _createElementBlock(\"section\", _hoisted_26, [\n              _cache[12] || (_cache[12] = _createElementVNode(\"h3\", { class: \"debug-panel__log-title\" }, \"Activiteitenlog\", -1 /* CACHED */)),\n              _createElementVNode(\"div\", _hoisted_27, [\n                (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.logs.entries, (entry, index) => {\n                  return (_openBlock(), _createElementBlock(\"div\", {\n                    key: index,\n                    class: \"debug-panel__log-entry\"\n                  }, [\n                    _createElementVNode(\"time\", {\n                      datetime: entry.t,\n                      title: entry.t\n                    }, _toDisplayString(entry.elapsedSeconds === null ? \"–\" : `${entry.elapsedSeconds}s`), 9 /* TEXT, PROPS */, _hoisted_28),\n                    _createElementVNode(\"span\", null, _toDisplayString(entry.message), 1 /* TEXT */)\n                  ]))\n                }), 128 /* KEYED_FRAGMENT */))\n              ], 512 /* NEED_PATCH */)\n            ]))\n          : ($setup.logs.raw)\n            ? (_openBlock(), _createElementBlock(\"details\", _hoisted_29, [\n                _cache[13] || (_cache[13] = _createElementVNode(\"summary\", null, \"Activiteitenlog (ruwe tekst)\", -1 /* CACHED */)),\n                _createElementVNode(\"pre\", _hoisted_30, _toDisplayString($setup.logs.raw), 1 /* TEXT */)\n              ]))\n            : _createCommentVNode(\"v-if\", true)\n      ])\n    ]),\n    _: 1 /* STABLE */\n  }))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/DebugPanel.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/DebugPanel.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/DebugPanel.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/DebugPanel.vue\";script.__scopeId = \"data-v-2f623d80\";export default script;","<script setup lang=\"ts\">\nimport { onUnmounted, reactive, shallowRef, useTemplateRef, watch } from \"vue\";\nimport { api } from \"../../lib/api\";\nimport { GroundTruthRepository, isGroundTruthEcho, type LocationGroundTruth } from \"../../lib/analysis-panels\";\nimport { LocationRequestScope, parseGroundTruth } from \"../../lib/location-detail\";\nimport { formatAnalysisDate } from \"../../lib/analyses-format\";\nimport Panel from \"../ui/Panel.vue\";\nimport Input from \"../ui/Input.vue\";\nimport Select from \"../ui/Select.vue\";\nimport Textarea from \"../ui/Textarea.vue\";\nimport Button from \"../ui/Button.vue\";\n\nconst props = defineProps<{ locationId: number; value: LocationGroundTruth }>();\nconst emit = defineEmits<{ saved: [value: LocationGroundTruth] }>();\nconst scope = new LocationRequestScope();\nconst repository = new GroundTruthRepository(api);\nconst fields = reactive({ parkingSpots: \"\", adjacent: \"unknown\", notes: \"\" });\nconst pending = shallowRef(false);\nconst fieldError = shallowRef(\"\");\nconst error = shallowRef(\"\");\nconst saved = shallowRef(false);\nconst updatedAt = shallowRef<string | null>(null);\nlet loadedLocationId: number | null = null;\nconst form = useTemplateRef<HTMLFormElement>(\"form\");\nconst adjacentOptions = [{ value: \"unknown\", label: \"Onbekend\" }, { value: \"yes\", label: \"Ja\" }, { value: \"no\", label: \"Nee\" }];\n\nfunction load(value: LocationGroundTruth) {\n  fields.parkingSpots = value.groundTruthParkingSpots?.toString() ?? \"\";\n  fields.adjacent = value.groundTruthHasAdjacentSpots === null ? \"unknown\" : value.groundTruthHasAdjacentSpots ? \"yes\" : \"no\";\n  fields.notes = value.groundTruthNotes ?? \"\";\n  updatedAt.value = value.groundTruthUpdatedAt;\n}\n\nwatch(() => [props.locationId, props.value.groundTruthParkingSpots, props.value.groundTruthHasAdjacentSpots, props.value.groundTruthNotes, props.value.groundTruthUpdatedAt], () => {\n  const confirmed = saved.value && isGroundTruthEcho({ locationId: props.locationId, loadedLocationId, input: fields, updatedAt: updatedAt.value, value: props.value });\n  loadedLocationId = props.locationId;\n  scope.begin(\"save\");\n  pending.value = false;\n  load(props.value);\n  fieldError.value = \"\";\n  error.value = \"\";\n  saved.value = confirmed;\n}, { immediate: true, flush: \"sync\" });\nwatch(fields, () => { fieldError.value = \"\"; error.value = \"\"; saved.value = false; }, { flush: \"sync\" });\nonUnmounted(() => scope.dispose());\n\nasync function save() {\n  if (pending.value) return;\n  fieldError.value = \"\";\n  error.value = \"\";\n  saved.value = false;\n  try {\n    parseGroundTruth(fields);\n  } catch (cause) {\n    fieldError.value = cause instanceof Error ? cause.message : \"Controleer het aantal parkeerplaatsen.\";\n    form.value?.querySelector(\"input\")?.focus();\n    return;\n  }\n  const isCurrent = scope.begin(\"save\");\n  pending.value = true;\n  try {\n    const result = await repository.save({ locationId: props.locationId, input: { ...fields }, isCurrent });\n    if (!isCurrent() || !result) return;\n    load(result);\n    saved.value = true;\n    emit(\"saved\", result);\n  } catch (cause) {\n    if (isCurrent()) error.value = cause instanceof Error ? cause.message : \"Opslaan is mislukt. Probeer het opnieuw.\";\n  } finally {\n    if (isCurrent()) pending.value = false;\n  }\n}\n</script>\n\n<template>\n  <Panel title=\"Werkelijke situatie (ground truth)\">\n    <form ref=\"form\" class=\"ground-truth-editor\" novalidate @submit.prevent=\"save\">\n      <p class=\"ground-truth-editor__muted\">Vul het werkelijke aantal parkeerplaatsen in dat je op de locatie hebt geteld, via Street View of een fysiek bezoek.</p>\n      <div :class=\"{ 'ground-truth-editor__invalid': fieldError }\">\n        <Input v-model=\"fields.parkingSpots\" label=\"Werkelijk aantal parkeerplaatsen\" placeholder=\"Aantal\" :disabled=\"pending\" />\n        <p v-if=\"fieldError\" class=\"ground-truth-editor__error\" role=\"alert\">{{ fieldError }}</p>\n      </div>\n      <Select v-model=\"fields.adjacent\" :options=\"adjacentOptions\" label=\"Minimaal 2 parkeerplaatsen naast elkaar?\" :disabled=\"pending\" />\n      <Textarea v-model=\"fields.notes\" label=\"Notities\" placeholder=\"Optionele toelichting...\" :rows=\"3\" :disabled=\"pending\" />\n      <p v-if=\"error\" class=\"ground-truth-editor__error\" role=\"alert\">{{ error }}</p>\n      <p v-if=\"saved\" class=\"ground-truth-editor__success\" role=\"status\">Werkelijke situatie opgeslagen.</p>\n      <p v-if=\"updatedAt\" class=\"ground-truth-editor__muted\">Laatst bijgewerkt: {{ Number.isNaN(Date.parse(updatedAt)) ? updatedAt : formatAnalysisDate(updatedAt) }}</p>\n      <div><Button type=\"submit\" variant=\"primary\" :busy=\"pending\">{{ pending ? \"Opslaan...\" : \"Opslaan\" }}</Button></div>\n    </form>\n  </Panel>\n</template>\n\n<style scoped>\n.ground-truth-editor { display: flex; flex-direction: column; gap: 12px; }\n.ground-truth-editor p { margin: 0; font-size: var(--text-caption); }\n.ground-truth-editor__muted { color: var(--fg-3); }\n.ground-truth-editor__error { color: var(--danger-fg); }\n.ground-truth-editor__success { color: var(--score-fg); }\n.ground-truth-editor__invalid :deep(input) { border-bottom-color: var(--danger); }\n.ground-truth-editor__invalid .ground-truth-editor__error { margin-top: 4px; }\n</style>\n","import { createElementVNode as _createElementVNode, createVNode as _createVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, createTextVNode as _createTextVNode, withCtx as _withCtx, withModifiers as _withModifiers, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = {\n  key: 0,\n  class: \"ground-truth-editor__error\",\n  role: \"alert\"\n}\nconst _hoisted_2 = {\n  key: 0,\n  class: \"ground-truth-editor__error\",\n  role: \"alert\"\n}\nconst _hoisted_3 = {\n  key: 1,\n  class: \"ground-truth-editor__success\",\n  role: \"status\"\n}\nconst _hoisted_4 = {\n  key: 2,\n  class: \"ground-truth-editor__muted\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createBlock($setup[\"Panel\"], { title: \"Werkelijke situatie (ground truth)\" }, {\n    default: _withCtx(() => [\n      _createElementVNode(\"form\", {\n        ref: \"form\",\n        class: \"ground-truth-editor\",\n        novalidate: \"\",\n        onSubmit: _withModifiers($setup.save, [\"prevent\"])\n      }, [\n        _cache[3] || (_cache[3] = _createElementVNode(\"p\", { class: \"ground-truth-editor__muted\" }, \"Vul het werkelijke aantal parkeerplaatsen in dat je op de locatie hebt geteld, via Street View of een fysiek bezoek.\", -1 /* CACHED */)),\n        _createElementVNode(\"div\", {\n          class: _normalizeClass({ 'ground-truth-editor__invalid': $setup.fieldError })\n        }, [\n          _createVNode($setup[\"Input\"], {\n            modelValue: $setup.fields.parkingSpots,\n            \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => (($setup.fields.parkingSpots) = $event)),\n            label: \"Werkelijk aantal parkeerplaatsen\",\n            placeholder: \"Aantal\",\n            disabled: $setup.pending\n          }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\"]),\n          ($setup.fieldError)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_1, _toDisplayString($setup.fieldError), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true)\n        ], 2 /* CLASS */),\n        _createVNode($setup[\"Select\"], {\n          modelValue: $setup.fields.adjacent,\n          \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => (($setup.fields.adjacent) = $event)),\n          options: $setup.adjacentOptions,\n          label: \"Minimaal 2 parkeerplaatsen naast elkaar?\",\n          disabled: $setup.pending\n        }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\"]),\n        _createVNode($setup[\"Textarea\"], {\n          modelValue: $setup.fields.notes,\n          \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => (($setup.fields.notes) = $event)),\n          label: \"Notities\",\n          placeholder: \"Optionele toelichting...\",\n          rows: 3,\n          disabled: $setup.pending\n        }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\"]),\n        ($setup.error)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_2, _toDisplayString($setup.error), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true),\n        ($setup.saved)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_3, \"Werkelijke situatie opgeslagen.\"))\n          : _createCommentVNode(\"v-if\", true),\n        ($setup.updatedAt)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_4, \"Laatst bijgewerkt: \" + _toDisplayString(Number.isNaN(Date.parse($setup.updatedAt)) ? $setup.updatedAt : $setup.formatAnalysisDate($setup.updatedAt)), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true),\n        _createElementVNode(\"div\", null, [\n          _createVNode($setup[\"Button\"], {\n            type: \"submit\",\n            variant: \"primary\",\n            busy: $setup.pending\n          }, {\n            default: _withCtx(() => [\n              _createTextVNode(_toDisplayString($setup.pending ? \"Opslaan...\" : \"Opslaan\"), 1 /* TEXT */)\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"busy\"])\n        ])\n      ], 544 /* NEED_HYDRATION, NEED_PATCH */)\n    ]),\n    _: 1 /* STABLE */\n  }))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/GroundTruthEditor.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/GroundTruthEditor.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/GroundTruthEditor.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/analyses/GroundTruthEditor.vue\";script.__scopeId = \"data-v-4b319c42\";export default script;","<script setup lang=\"ts\">\nimport { computed, ref, watch, onScopeDispose } from \"vue\";\nimport Dialog from \"../ui/Dialog.vue\";\nimport Button from \"../ui/Button.vue\";\nimport { availableLocationImages, type LocationImage, type LocationCoordinates } from \"../../lib/location-images\";\n\nconst props = defineProps<{ images: readonly LocationImage[]; coordinates?: LocationCoordinates | null; emptyMessage?: string }>();\nconst cachedImages = computed(() => availableLocationImages(props.images));\nconst selected = ref<number | null>(null);\nconst current = computed(() => selected.value === null ? null : cachedImages.value[selected.value] ?? null);\nconst open = computed({ get: () => current.value !== null, set: (value: boolean) => { if (!value) selected.value = null; } });\nwatch(() => props.images, () => { selected.value = null; });\nwatch(open, value => {\n  if (value) window.addEventListener(\"keydown\", onKeydown);\n  else window.removeEventListener(\"keydown\", onKeydown);\n});\nonScopeDispose(() => window.removeEventListener(\"keydown\", onKeydown));\n\nfunction move(delta: number) {\n  if (selected.value !== null) selected.value = Math.max(0, Math.min(cachedImages.value.length - 1, selected.value + delta));\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n  if (event.key === \"ArrowLeft\" || event.key === \"ArrowRight\") {\n    event.preventDefault();\n    move(event.key === \"ArrowLeft\" ? -1 : 1);\n  }\n}\n</script>\n\n<template>\n  <div class=\"location-gallery\">\n    <div v-if=\"cachedImages.length\" class=\"location-gallery__strip\">\n      <button v-for=\"(image, index) in cachedImages\" :key=\"image.type\" type=\"button\" class=\"location-gallery__thumbnail\" :aria-label=\"`${image.label} vergroten`\" @click=\"selected = index\">\n        <span>{{ image.label }}</span>\n        <img :src=\"image.url\" :alt=\"image.label\" loading=\"lazy\" width=\"192\" height=\"192\">\n      </button>\n    </div>\n    <p v-else-if=\"emptyMessage\" class=\"location-gallery__empty\">{{ emptyMessage }}</p>\n    <p v-if=\"coordinates\" class=\"location-gallery__coordinates\">\n      Coördinaten: {{ coordinates.lat }}, {{ coordinates.lng }} ·\n      <a :href=\"`https://www.google.com/maps/@${coordinates.lat},${coordinates.lng},18z`\" target=\"_blank\" rel=\"noopener noreferrer\">Open in Google Maps</a>\n    </p>\n    <Dialog v-model:open=\"open\" :title=\"current?.label ?? 'Afbeelding'\" :max-width=\"1100\">\n      <img v-if=\"current\" :src=\"current.url\" :alt=\"current.label\" class=\"location-gallery__full\">\n      <template #footer>\n        <Button :disabled=\"selected === 0\" @click=\"move(-1)\">Vorige</Button>\n        <span class=\"location-gallery__counter\">{{ (selected ?? 0) + 1 }} / {{ cachedImages.length }}</span>\n        <Button :disabled=\"selected === cachedImages.length - 1\" @click=\"move(1)\">Volgende</Button>\n      </template>\n    </Dialog>\n  </div>\n</template>\n\n<style scoped>\n.location-gallery { min-width: 0; }\n.location-gallery__strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }\n.location-gallery__thumbnail { display: flex; flex: none; flex-direction: column; gap: 4px; padding: 0; border: 0; background: transparent; color: var(--fg-1); font: inherit; font-size: var(--text-caption); text-align: left; cursor: pointer; }\n.location-gallery__thumbnail img { display: block; border: 1px solid var(--border-1); object-fit: cover; }\n.location-gallery__coordinates, .location-gallery__empty { margin: 8px 0 0; color: var(--fg-3); font-size: var(--text-caption); }\n.location-gallery__coordinates a { color: var(--info-fg); text-decoration: underline; cursor: pointer; }\n.location-gallery__full { display: block; width: 100%; max-height: 70vh; object-fit: contain; }\n.location-gallery__counter { display: flex; align-items: center; font-size: var(--text-caption); color: var(--fg-3); }\n.location-gallery__thumbnail:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }\n@media (hover: hover) { .location-gallery__thumbnail:hover img { border-color: var(--fg-2); } }\n</style>\n","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"location-gallery\" }\nconst _hoisted_2 = {\n  key: 0,\n  class: \"location-gallery__strip\"\n}\nconst _hoisted_3 = [\"aria-label\", \"onClick\"]\nconst _hoisted_4 = [\"src\", \"alt\"]\nconst _hoisted_5 = {\n  key: 1,\n  class: \"location-gallery__empty\"\n}\nconst _hoisted_6 = {\n  key: 2,\n  class: \"location-gallery__coordinates\"\n}\nconst _hoisted_7 = [\"href\"]\nconst _hoisted_8 = [\"src\", \"alt\"]\nconst _hoisted_9 = { class: \"location-gallery__counter\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    ($setup.cachedImages.length)\n      ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n          (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.cachedImages, (image, index) => {\n            return (_openBlock(), _createElementBlock(\"button\", {\n              key: image.type,\n              type: \"button\",\n              class: \"location-gallery__thumbnail\",\n              \"aria-label\": `${image.label} vergroten`,\n              onClick: $event => ($setup.selected = index)\n            }, [\n              _createElementVNode(\"span\", null, _toDisplayString(image.label), 1 /* TEXT */),\n              _createElementVNode(\"img\", {\n                src: image.url,\n                alt: image.label,\n                loading: \"lazy\",\n                width: \"192\",\n                height: \"192\"\n              }, null, 8 /* PROPS */, _hoisted_4)\n            ], 8 /* PROPS */, _hoisted_3))\n          }), 128 /* KEYED_FRAGMENT */))\n        ]))\n      : ($props.emptyMessage)\n        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_5, _toDisplayString($props.emptyMessage), 1 /* TEXT */))\n        : _createCommentVNode(\"v-if\", true),\n    ($props.coordinates)\n      ? (_openBlock(), _createElementBlock(\"p\", _hoisted_6, [\n          _createTextVNode(\" Coördinaten: \" + _toDisplayString($props.coordinates.lat) + \", \" + _toDisplayString($props.coordinates.lng) + \" · \", 1 /* TEXT */),\n          _createElementVNode(\"a\", {\n            href: `https://www.google.com/maps/@${$props.coordinates.lat},${$props.coordinates.lng},18z`,\n            target: \"_blank\",\n            rel: \"noopener noreferrer\"\n          }, \"Open in Google Maps\", 8 /* PROPS */, _hoisted_7)\n        ]))\n      : _createCommentVNode(\"v-if\", true),\n    _createVNode($setup[\"Dialog\"], {\n      open: $setup.open,\n      \"onUpdate:open\": _cache[2] || (_cache[2] = $event => (($setup.open) = $event)),\n      title: $setup.current?.label ?? 'Afbeelding',\n      \"max-width\": 1100\n    }, {\n      footer: _withCtx(() => [\n        _createVNode($setup[\"Button\"], {\n          disabled: $setup.selected === 0,\n          onClick: _cache[0] || (_cache[0] = $event => ($setup.move(-1)))\n        }, {\n          default: _withCtx(() => _cache[3] || (_cache[3] = [\n            _createTextVNode(\"Vorige\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [3]\n        }, 8 /* PROPS */, [\"disabled\"]),\n        _createElementVNode(\"span\", _hoisted_9, _toDisplayString(($setup.selected ?? 0) + 1) + \" / \" + _toDisplayString($setup.cachedImages.length), 1 /* TEXT */),\n        _createVNode($setup[\"Button\"], {\n          disabled: $setup.selected === $setup.cachedImages.length - 1,\n          onClick: _cache[1] || (_cache[1] = $event => ($setup.move(1)))\n        }, {\n          default: _withCtx(() => _cache[4] || (_cache[4] = [\n            _createTextVNode(\"Volgende\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [4]\n        }, 8 /* PROPS */, [\"disabled\"])\n      ]),\n      default: _withCtx(() => [\n        ($setup.current)\n          ? (_openBlock(), _createElementBlock(\"img\", {\n              key: 0,\n              src: $setup.current.url,\n              alt: $setup.current.label,\n              class: \"location-gallery__full\"\n            }, null, 8 /* PROPS */, _hoisted_8))\n          : _createCommentVNode(\"v-if\", true)\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"open\", \"title\"])\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationImageGallery.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationImageGallery.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationImageGallery.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/locations/LocationImageGallery.vue\";script.__scopeId = \"data-v-8738c8b4\";export default script;","import { computed, onActivated, onDeactivated, onScopeDispose, shallowRef, watch } from \"vue\";\nimport { api } from \"./api\";\nimport { analysisNeedsPolling, applyScoringPreview, buildAnalysisRerun, wantsScoringPreview, type AnalysisDetail, type ScoringPreview } from \"./analysis-detail\";\nimport { LocationRequestScope, locationCoordinates } from \"./location-detail\";\nimport { setAnalysisCrumb } from \"./shell-chrome\";\nimport { workerActionError } from \"./run-analysis\";\nimport type { AdminLocation } from \"./use-location-detail\";\nimport type { LocationImage } from \"./location-images\";\n\nexport function useAnalysisDetail(getRoute: () => { id: number; analysisId: number }) {\n  const analysis = shallowRef<AnalysisDetail | null>(null);\n  const location = shallowRef<AdminLocation | null>(null);\n  const images = shallowRef<LocationImage[]>([]);\n  const loading = shallowRef(true);\n  const imageLoading = shallowRef(true);\n  const error = shallowRef(\"\");\n  const locationError = shallowRef(\"\");\n  const imageError = shallowRef(\"\");\n  const actionError = shallowRef(\"\");\n  const starting = shallowRef(false);\n  const cancelling = shallowRef(false);\n  const polling = computed(() => analysis.value !== null && analysisNeedsPolling(analysis.value));\n  const coordinates = computed(() => locationCoordinates(location.value));\n  let scope = new LocationRequestScope();\n  let timer: ReturnType<typeof setTimeout> | undefined;\n\n  function stopTimer() {\n    if (timer !== undefined) clearTimeout(timer);\n    timer = undefined;\n  }\n\n  function updateCrumb() {\n    if (!analysis.value || !location.value) return;\n    setAnalysisCrumb({ locationId: location.value.id, analysisId: analysis.value.id, companyName: location.value.companyName });\n  }\n\n  async function refreshAnalysis() {\n    stopTimer();\n    const current = scope.begin(\"analysis\");\n    const route = getRoute();\n    error.value = \"\";\n    try {\n      const result = await api.getAnalysisDetail({ id: route.analysisId });\n      if (!current()) return;\n      if (result.analysis && result.analysis.locationId !== route.id)\n        throw new Error(\"Deze analyse hoort bij een andere locatie.\");\n      // The current-formula comparison is a separate, authorized preview; the stored result is shown as stored.\n      let preview: ScoringPreview | null = null;\n      if (result.analysis && wantsScoringPreview(result.analysis)) {\n        preview = await api.previewAnalysisScoring({ id: result.analysis.id }).then(answer => answer.preview, () => null);\n        if (!current()) return;\n      }\n      analysis.value = result.analysis ? applyScoringPreview(result.analysis, preview) : null;\n      updateCrumb();\n    } catch (caught) {\n      if (current()) error.value = caught instanceof Error ? caught.message : \"De analyse kon niet worden opgehaald.\";\n    } finally {\n      if (current()) {\n        loading.value = false;\n        if (polling.value) timer = setTimeout(() => { void refreshAnalysis(); }, 2000);\n      }\n    }\n  }\n\n  async function refreshLocation() {\n    const current = scope.begin(\"location\");\n    const { id } = getRoute();\n    locationError.value = \"\";\n    try {\n      const result = await api.findLocationById({ id });\n      if (!current()) return;\n      location.value = result.location;\n      updateCrumb();\n    } catch (caught) {\n      if (current()) locationError.value = caught instanceof Error ? caught.message : \"De locatie kon niet worden opgehaald.\";\n    }\n  }\n\n  async function loadImages() {\n    const current = scope.begin(\"images\");\n    imageLoading.value = true;\n    imageError.value = \"\";\n    try {\n      const result = await api.getLocationImages({ locationId: getRoute().id });\n      if (current()) images.value = result.images;\n    } catch {\n      if (current()) imageError.value = \"De foto's konden niet worden opgehaald.\";\n    } finally {\n      if (current()) imageLoading.value = false;\n    }\n  }\n\n  async function rerun(): Promise<number | null> {\n    if (!analysis.value || starting.value) return null;\n    const current = scope.begin(\"start\");\n    actionError.value = \"\";\n    starting.value = true;\n    try {\n      const result = await api.startAnalysis(buildAnalysisRerun(analysis.value));\n      return current() ? result.analysisId : null;\n    } catch (caught) {\n      if (current()) actionError.value = workerActionError(caught);\n      return null;\n    } finally {\n      if (current()) starting.value = false;\n    }\n  }\n\n  async function cancel(): Promise<boolean> {\n    if (!analysis.value || cancelling.value) return false;\n    const current = scope.begin(\"cancel\");\n    const id = analysis.value.id;\n    scope.begin(\"analysis\");\n    stopTimer();\n    cancelling.value = true;\n    actionError.value = \"\";\n    try {\n      await api.cancelAnalysis({ id });\n      if (!current()) return false;\n      await refreshAnalysis();\n      return current();\n    } catch (caught) {\n      if (current()) {\n        actionError.value = caught instanceof Error ? caught.message : \"Stoppen is niet gelukt. Probeer het opnieuw.\";\n        await refreshAnalysis();\n      }\n      return false;\n    } finally {\n      if (current()) cancelling.value = false;\n    }\n  }\n\n  watch(() => [getRoute().id, getRoute().analysisId], () => {\n    scope.dispose();\n    stopTimer();\n    scope = new LocationRequestScope();\n    analysis.value = null;\n    location.value = null;\n    images.value = [];\n    error.value = \"\";\n    actionError.value = \"\";\n    loading.value = true;\n    starting.value = false;\n    cancelling.value = false;\n    void refreshAnalysis();\n    void refreshLocation();\n    void loadImages();\n  }, { immediate: true });\n\n  // Zie use-location-detail: een tab die niet in beeld staat hoort niet te\n  // pollen. Het kruimel-label is gestempeld met de ids van EEN analyse, dus bij\n  // terugkeren moet deze pagina hem opnieuw claimen van de tab ernaast.\n  onDeactivated(stopTimer);\n  onActivated(() => {\n    updateCrumb();\n    if (timer === undefined && polling.value) void refreshAnalysis();\n  });\n\n  onScopeDispose(() => { scope.dispose(); stopTimer(); });\n\n  return {\n    analysis, location, images, loading, imageLoading, error, locationError, imageError,\n    actionError, starting, cancelling, polling, coordinates,\n    refreshAnalysis, refreshLocation, loadImages, rerun, cancel,\n  };\n}\n","import { createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, Fragment as _Fragment, renderList as _renderList } from \"vue\"\n\nconst _hoisted_1 = { class: \"analysis-header\" }\nconst _hoisted_2 = {\n  class: \"analysis-header__crumbs\",\n  \"aria-label\": \"Kruimelpad analyse\"\n}\nconst _hoisted_3 = { \"aria-current\": \"page\" }\nconst _hoisted_4 = { class: \"analysis-header__row\" }\nconst _hoisted_5 = { class: \"page-title\" }\nconst _hoisted_6 = { class: \"analysis-header__actions\" }\nconst _hoisted_7 = {\n  key: 0,\n  class: \"analysis-detail__metadata\"\n}\nconst _hoisted_8 = { key: 0 }\nconst _hoisted_9 = { key: 3 }\nconst _hoisted_10 = { key: 4 }\nconst _hoisted_11 = [\"datetime\"]\nconst _hoisted_12 = { key: 5 }\nconst _hoisted_13 = {\n  key: 0,\n  class: \"analysis-detail__muted\",\n  role: \"status\"\n}\nconst _hoisted_14 = {\n  key: 1,\n  class: \"analysis-detail__error\",\n  role: \"alert\"\n}\nconst _hoisted_15 = {\n  key: 2,\n  class: \"analysis-detail__empty\"\n}\nconst _hoisted_16 = {\n  key: 3,\n  class: \"analysis-detail__error\",\n  role: \"alert\"\n}\nconst _hoisted_17 = { role: \"status\" }\nconst _hoisted_18 = { class: \"analysis-detail__steps\" }\nconst _hoisted_19 = { class: \"analysis-detail\" }\nconst _hoisted_20 = { class: \"analysis-detail__report\" }\nconst _hoisted_21 = {\n  class: \"analysis-detail__aside\",\n  \"aria-label\": \"Samenvatting analyse\"\n}\nconst _hoisted_22 = { class: \"analysis-detail__quickscan\" }\nconst _hoisted_23 = {\n  key: 0,\n  class: \"analysis-detail__muted\",\n  role: \"status\"\n}\nconst _hoisted_24 = {\n  key: 1,\n  role: \"alert\"\n}\nconst _hoisted_25 = {\n  key: 2,\n  class: \"analysis-detail__error\",\n  role: \"alert\"\n}\nconst _hoisted_26 = {\n  key: 0,\n  class: \"analysis-detail__error\",\n  role: \"alert\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(_Fragment, null, [\n    _createElementVNode(\"header\", _hoisted_1, [\n      _createElementVNode(\"nav\", _hoisted_2, [\n        _createVNode($setup[\"RouterLink\"], { to: { name: 'locations' } }, {\n          default: _withCtx(() => _cache[4] || (_cache[4] = [\n            _createTextVNode(\"Locaties\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [4]\n        }),\n        _cache[5] || (_cache[5] = _createElementVNode(\"span\", { \"aria-hidden\": \"true\" }, \"/\", -1 /* CACHED */)),\n        _createVNode($setup[\"RouterLink\"], {\n          to: { name: 'location-detail', params: { id: $props.id } }\n        }, {\n          default: _withCtx(() => [\n            _createTextVNode(_toDisplayString($setup.location?.companyName || \"Locatie\"), 1 /* TEXT */)\n          ]),\n          _: 1 /* STABLE */\n        }, 8 /* PROPS */, [\"to\"]),\n        _cache[6] || (_cache[6] = _createElementVNode(\"span\", { \"aria-hidden\": \"true\" }, \"/\", -1 /* CACHED */)),\n        _createElementVNode(\"span\", _hoisted_3, \"Analyse #\" + _toDisplayString($props.analysisId), 1 /* TEXT */)\n      ]),\n      _createElementVNode(\"div\", _hoisted_4, [\n        _createElementVNode(\"h1\", _hoisted_5, \"Analyse #\" + _toDisplayString($props.analysisId), 1 /* TEXT */),\n        _createElementVNode(\"div\", _hoisted_6, [\n          ($setup.analysis && !$setup.polling)\n            ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                key: 0,\n                busy: $setup.starting,\n                onClick: $setup.rerunAnalysis\n              }, {\n                default: _withCtx(() => [\n                  _createTextVNode(_toDisplayString($setup.starting ? \"Starten...\" : \"Opnieuw draaien\"), 1 /* TEXT */)\n                ]),\n                _: 1 /* STABLE */\n              }, 8 /* PROPS */, [\"busy\"]))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.analysis?.status === 'running')\n            ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                key: 1,\n                variant: \"danger\",\n                busy: $setup.cancelling,\n                onClick: _cache[0] || (_cache[0] = $event => ($setup.confirmCancel = true))\n              }, {\n                default: _withCtx(() => _cache[7] || (_cache[7] = [\n                  _createTextVNode(\"Analyse stoppen\", -1 /* CACHED */)\n                ])),\n                _: 1 /* STABLE */,\n                __: [7]\n              }, 8 /* PROPS */, [\"busy\"]))\n            : _createCommentVNode(\"v-if\", true)\n        ])\n      ]),\n      ($setup.analysis)\n        ? (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n            _createVNode($setup[\"Badge\"], {\n              tone: $setup.status.tone\n            }, {\n              default: _withCtx(() => [\n                _createTextVNode(_toDisplayString($setup.status.label), 1 /* TEXT */)\n              ]),\n              _: 1 /* STABLE */\n            }, 8 /* PROPS */, [\"tone\"]),\n            ($setup.analysis.userName)\n              ? (_openBlock(), _createElementBlock(\"span\", _hoisted_8, _toDisplayString($setup.analysis.userName), 1 /* TEXT */))\n              : _createCommentVNode(\"v-if\", true),\n            ($setup.analysis.isDryRun)\n              ? (_openBlock(), _createBlock($setup[\"Badge\"], { key: 1 }, {\n                  default: _withCtx(() => _cache[8] || (_cache[8] = [\n                    _createTextVNode(\"Dry Run\", -1 /* CACHED */)\n                  ])),\n                  _: 1 /* STABLE */,\n                  __: [8]\n                }))\n              : _createCommentVNode(\"v-if\", true),\n            _createElementVNode(\"span\", null, _toDisplayString($setup.finishedCount) + \"/\" + _toDisplayString($setup.analysis.modelResults.length) + \" klaar\", 1 /* TEXT */),\n            ($setup.analysis.analysisMode === 'observe-then-score')\n              ? (_openBlock(), _createBlock($setup[\"Badge\"], {\n                  key: 2,\n                  tone: \"info\"\n                }, {\n                  default: _withCtx(() => _cache[9] || (_cache[9] = [\n                    _createTextVNode(\"observe-then-score\", -1 /* CACHED */)\n                  ])),\n                  _: 1 /* STABLE */,\n                  __: [9]\n                }))\n              : _createCommentVNode(\"v-if\", true),\n            ($setup.analysis.temperature !== null)\n              ? (_openBlock(), _createElementBlock(\"span\", _hoisted_9, \"temp \" + _toDisplayString($setup.analysis.temperature), 1 /* TEXT */))\n              : _createCommentVNode(\"v-if\", true),\n            ($setup.analysis.seed !== null)\n              ? (_openBlock(), _createElementBlock(\"span\", _hoisted_10, \"seed \" + _toDisplayString($setup.analysis.seed), 1 /* TEXT */))\n              : _createCommentVNode(\"v-if\", true),\n            _createElementVNode(\"time\", {\n              datetime: $setup.analysis.createdAt\n            }, _toDisplayString($setup.formatAnalysisDate($setup.analysis.createdAt)), 9 /* TEXT, PROPS */, _hoisted_11),\n            ($setup.usage.models || $setup.usage.cached)\n              ? (_openBlock(), _createElementBlock(\"span\", _hoisted_12, [\n                  _createTextVNode(_toDisplayString($setup.usage.models) + \" \" + _toDisplayString($setup.usage.models === 1 ? \"model\" : \"modellen\"), 1 /* TEXT */),\n                  ($setup.usage.cached)\n                    ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                        _createTextVNode(\" + \" + _toDisplayString($setup.usage.cached) + \" uit cache\", 1 /* TEXT */)\n                      ], 64 /* STABLE_FRAGMENT */))\n                    : _createCommentVNode(\"v-if\", true),\n                  _createTextVNode(\" · \" + _toDisplayString($setup.usage.tokens.toLocaleString(\"nl-NL\")) + \" tokens\", 1 /* TEXT */),\n                  ($setup.usage.costCents > 0)\n                    ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n                        _createTextVNode(\" · $\" + _toDisplayString(($setup.usage.costCents / 100).toFixed(2)), 1 /* TEXT */)\n                      ], 64 /* STABLE_FRAGMENT */))\n                    : _createCommentVNode(\"v-if\", true)\n                ]))\n              : _createCommentVNode(\"v-if\", true)\n          ]))\n        : _createCommentVNode(\"v-if\", true)\n    ]),\n    _createVNode($setup[\"PageBody\"], { class: \"analysis-body\" }, {\n      default: _withCtx(() => [\n        ($setup.loading)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_13, \"Analyse laden...\"))\n          : _createCommentVNode(\"v-if\", true),\n        ($setup.error)\n          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_14, [\n              _createElementVNode(\"p\", null, _toDisplayString($setup.error), 1 /* TEXT */),\n              _createVNode($setup[\"Button\"], { onClick: $setup.refreshAnalysis }, {\n                default: _withCtx(() => _cache[10] || (_cache[10] = [\n                  _createTextVNode(\"Opnieuw proberen\", -1 /* CACHED */)\n                ])),\n                _: 1 /* STABLE */,\n                __: [10]\n              }, 8 /* PROPS */, [\"onClick\"])\n            ]))\n          : _createCommentVNode(\"v-if\", true),\n        (!$setup.loading && !$setup.error && !$setup.analysis)\n          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_15, [\n              _cache[12] || (_cache[12] = _createElementVNode(\"h2\", null, \"Analyse niet gevonden\", -1 /* CACHED */)),\n              _createVNode($setup[\"RouterLink\"], {\n                to: { name: 'location-detail', params: { id: $props.id } }\n              }, {\n                default: _withCtx(() => _cache[11] || (_cache[11] = [\n                  _createTextVNode(\"Terug naar locatie\", -1 /* CACHED */)\n                ])),\n                _: 1 /* STABLE */,\n                __: [11]\n              }, 8 /* PROPS */, [\"to\"])\n            ]))\n          : _createCommentVNode(\"v-if\", true),\n        ($setup.actionError)\n          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_16, _toDisplayString($setup.actionError), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true),\n        ($setup.analysis)\n          ? (_openBlock(), _createElementBlock(_Fragment, { key: 4 }, [\n              ($setup.polling)\n                ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n                    key: 0,\n                    title: \"Analyse wordt uitgevoerd\",\n                    class: \"analysis-detail__progress\"\n                  }, {\n                    default: _withCtx(() => [\n                      _createElementVNode(\"div\", _hoisted_17, [\n                        _createElementVNode(\"p\", null, _toDisplayString($setup.stageLabel), 1 /* TEXT */),\n                        _createElementVNode(\"p\", null, _toDisplayString($setup.finishedCount) + \"/\" + _toDisplayString($setup.analysis.modelResults.length) + \" modellen klaar\", 1 /* TEXT */)\n                      ]),\n                      _createElementVNode(\"ul\", _hoisted_18, [\n                        (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.analysis.modelResults, (model) => {\n                          return (_openBlock(), _createElementBlock(\"li\", {\n                            key: model.id\n                          }, [\n                            _createTextVNode(_toDisplayString(model.modelDisplayName) + \" \", 1 /* TEXT */),\n                            _createVNode($setup[\"Badge\"], {\n                              tone: $setup.analysisStatusLabel(model.status).tone\n                            }, {\n                              default: _withCtx(() => [\n                                _createTextVNode(_toDisplayString(model.status === \"cancelled\" ? \"Geannuleerd\" : $setup.analysisStatusLabel(model.status).label), 1 /* TEXT */)\n                              ]),\n                              _: 2 /* DYNAMIC */\n                            }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"tone\"])\n                          ]))\n                        }), 128 /* KEYED_FRAGMENT */))\n                      ])\n                    ]),\n                    _: 1 /* STABLE */\n                  }))\n                : _createCommentVNode(\"v-if\", true),\n              _createElementVNode(\"div\", _hoisted_19, [\n                _createElementVNode(\"div\", _hoisted_20, [\n                  ($setup.compact)\n                    ? (_openBlock(), _createBlock($setup[\"AnalysisFinalScore\"], {\n                        key: 0,\n                        score: $setup.analysis.consensusOverallScore,\n                        models: $setup.analysis.modelResults.map(model => model.modelDisplayName)\n                      }, null, 8 /* PROPS */, [\"score\", \"models\"]))\n                    : _createCommentVNode(\"v-if\", true),\n                  _createVNode($setup[\"PageTabs\"], {\n                    tabs: $setup.tabs,\n                    active: $setup.activeTab\n                  }, null, 8 /* PROPS */, [\"tabs\", \"active\"]),\n                  ($setup.activeTab !== 'debug')\n                    ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n                        ($setup.activeTab === 'scoring' && $setup.completed.length)\n                          ? (_openBlock(), _createBlock($setup[\"AnalysisComparison\"], {\n                              key: 0,\n                              results: $setup.analysis.modelResults\n                            }, null, 8 /* PROPS */, [\"results\"]))\n                          : _createCommentVNode(\"v-if\", true),\n                        _createVNode($setup[\"AnalysisModelResults\"], {\n                          results: $setup.analysis.modelResults,\n                          \"analysis-mode\": $setup.analysis.analysisMode,\n                          section: $setup.activeTab\n                        }, null, 8 /* PROPS */, [\"results\", \"analysis-mode\", \"section\"]),\n                        (!$setup.analysis.modelResults.length)\n                          ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n                              key: 1,\n                              title: \"Geen modelresultaten\"\n                            }, {\n                              default: _withCtx(() => _cache[13] || (_cache[13] = [\n                                _createElementVNode(\"p\", { class: \"analysis-detail__muted\" }, \"Deze analyse bevat nog geen modelresultaten.\", -1 /* CACHED */)\n                              ])),\n                              _: 1 /* STABLE */,\n                              __: [13]\n                            }))\n                          : _createCommentVNode(\"v-if\", true)\n                      ], 64 /* STABLE_FRAGMENT */))\n                    : (_openBlock(), _createBlock($setup[\"DebugPanel\"], {\n                        key: 2,\n                        analysis: $setup.analysis,\n                        \"model-results\": $setup.analysis.modelResults\n                      }, null, 8 /* PROPS */, [\"analysis\", \"model-results\"])),\n                  ($setup.activeTab === 'scoring' && $setup.location)\n                    ? (_openBlock(), _createBlock($setup[\"GroundTruthEditor\"], {\n                        key: 3,\n                        \"location-id\": $props.id,\n                        value: $setup.location,\n                        onSaved: $setup.refreshLocation\n                      }, null, 8 /* PROPS */, [\"location-id\", \"value\", \"onSaved\"]))\n                    : _createCommentVNode(\"v-if\", true)\n                ]),\n                _createElementVNode(\"aside\", _hoisted_21, [\n                  (!$setup.compact)\n                    ? (_openBlock(), _createBlock($setup[\"AnalysisFinalScore\"], {\n                        key: 0,\n                        score: $setup.analysis.consensusOverallScore,\n                        models: $setup.analysis.modelResults.map(model => model.modelDisplayName)\n                      }, null, 8 /* PROPS */, [\"score\", \"models\"]))\n                    : _createCommentVNode(\"v-if\", true),\n                  ($setup.completed.length)\n                    ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n                        key: 1,\n                        title: \"Quick-scan\"\n                      }, {\n                        default: _withCtx(() => [\n                          _createElementVNode(\"dl\", _hoisted_22, [\n                            (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.ASPECT_LABELS, (aspect) => {\n                              return (_openBlock(), _createElementBlock(\"div\", {\n                                key: aspect.key\n                              }, [\n                                _createElementVNode(\"dt\", null, _toDisplayString(aspect.label), 1 /* TEXT */),\n                                _createElementVNode(\"dd\", null, [\n                                  _createVNode($setup[\"ScoreBar\"], {\n                                    score: $setup.completed[0][aspect.key]\n                                  }, null, 8 /* PROPS */, [\"score\"])\n                                ])\n                              ]))\n                            }), 128 /* KEYED_FRAGMENT */))\n                          ])\n                        ]),\n                        _: 1 /* STABLE */\n                      }))\n                    : _createCommentVNode(\"v-if\", true),\n                  _createVNode($setup[\"RetrievedFeedbackPanel\"], {\n                    entries: $setup.primary?.retrievedFeedback ?? [],\n                    confidence: $setup.primary?.confidence ?? null\n                  }, null, 8 /* PROPS */, [\"entries\", \"confidence\"]),\n                  _createVNode($setup[\"Panel\"], { title: \"Locatiefoto's\" }, {\n                    actions: _withCtx(() => [\n                      _createVNode($setup[\"Button\"], {\n                        variant: \"ghost\",\n                        \"aria-expanded\": $setup.photosOpen,\n                        onClick: _cache[1] || (_cache[1] = $event => ($setup.photosOpen = !$setup.photosOpen))\n                      }, {\n                        default: _withCtx(() => [\n                          _createTextVNode(_toDisplayString($setup.photosOpen ? \"Inklappen\" : \"Uitklappen\"), 1 /* TEXT */)\n                        ]),\n                        _: 1 /* STABLE */\n                      }, 8 /* PROPS */, [\"aria-expanded\"])\n                    ]),\n                    default: _withCtx(() => [\n                      ($setup.photosOpen)\n                        ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                            ($setup.imageLoading)\n                              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_23, \"Foto's laden...\"))\n                              : ($setup.imageError)\n                                ? (_openBlock(), _createElementBlock(\"div\", _hoisted_24, [\n                                    _createElementVNode(\"p\", null, _toDisplayString($setup.imageError), 1 /* TEXT */),\n                                    _createVNode($setup[\"Button\"], { onClick: $setup.loadImages }, {\n                                      default: _withCtx(() => _cache[14] || (_cache[14] = [\n                                        _createTextVNode(\"Opnieuw proberen\", -1 /* CACHED */)\n                                      ])),\n                                      _: 1 /* STABLE */,\n                                      __: [14]\n                                    }, 8 /* PROPS */, [\"onClick\"])\n                                  ]))\n                                : (_openBlock(), _createBlock($setup[\"LocationImageGallery\"], {\n                                    key: 2,\n                                    images: $setup.images,\n                                    coordinates: $setup.coordinates,\n                                    \"empty-message\": \"Nog geen foto's beschikbaar voor deze locatie.\"\n                                  }, null, 8 /* PROPS */, [\"images\", \"coordinates\"]))\n                          ], 64 /* STABLE_FRAGMENT */))\n                        : _createCommentVNode(\"v-if\", true)\n                    ]),\n                    _: 1 /* STABLE */\n                  }),\n                  ($setup.locationError)\n                    ? (_openBlock(), _createElementBlock(\"div\", _hoisted_25, [\n                        _createElementVNode(\"p\", null, _toDisplayString($setup.locationError), 1 /* TEXT */),\n                        _createVNode($setup[\"Button\"], { onClick: $setup.refreshLocation }, {\n                          default: _withCtx(() => _cache[15] || (_cache[15] = [\n                            _createTextVNode(\"Locatie opnieuw laden\", -1 /* CACHED */)\n                          ])),\n                          _: 1 /* STABLE */,\n                          __: [15]\n                        }, 8 /* PROPS */, [\"onClick\"])\n                      ]))\n                    : _createCommentVNode(\"v-if\", true),\n                  _createVNode($setup[\"RouterLink\"], {\n                    to: { name: 'location-detail', params: { id: $props.id } },\n                    class: \"analysis-detail__back\"\n                  }, {\n                    default: _withCtx(() => [\n                      _createTextVNode(\"Terug naar \" + _toDisplayString($setup.location?.companyName || \"locatie\"), 1 /* TEXT */)\n                    ]),\n                    _: 1 /* STABLE */\n                  }, 8 /* PROPS */, [\"to\"])\n                ])\n              ])\n            ], 64 /* STABLE_FRAGMENT */))\n          : _createCommentVNode(\"v-if\", true)\n      ]),\n      _: 1 /* STABLE */\n    }),\n    _createVNode($setup[\"Dialog\"], {\n      open: $setup.confirmCancel,\n      \"onUpdate:open\": _cache[3] || (_cache[3] = $event => (($setup.confirmCancel) = $event)),\n      title: \"Analyse stoppen?\",\n      description: \"De nog niet afgeronde modelresultaten worden geannuleerd.\"\n    }, {\n      footer: _withCtx(() => [\n        _createVNode($setup[\"Button\"], {\n          disabled: $setup.cancelling,\n          onClick: _cache[2] || (_cache[2] = $event => ($setup.confirmCancel = false))\n        }, {\n          default: _withCtx(() => _cache[16] || (_cache[16] = [\n            _createTextVNode(\"Terug\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [16]\n        }, 8 /* PROPS */, [\"disabled\"]),\n        _createVNode($setup[\"Button\"], {\n          variant: \"danger\",\n          busy: $setup.cancelling,\n          onClick: $setup.stopAnalysis\n        }, {\n          default: _withCtx(() => [\n            _createTextVNode(_toDisplayString($setup.cancelling ? \"Stoppen...\" : \"Analyse stoppen\"), 1 /* TEXT */)\n          ]),\n          _: 1 /* STABLE */\n        }, 8 /* PROPS */, [\"busy\"])\n      ]),\n      default: _withCtx(() => [\n        _createElementVNode(\"p\", null, \"Weet je zeker dat je analyse #\" + _toDisplayString($props.analysisId) + \" wilt stoppen?\", 1 /* TEXT */),\n        ($setup.actionError)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_26, _toDisplayString($setup.actionError), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true)\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"open\"])\n  ], 64 /* STABLE_FRAGMENT */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/AnalysisDetailView.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/AnalysisDetailView.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/AnalysisDetailView.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/AnalysisDetailView.vue\";script.__scopeId = \"data-v-8bc2cb5f\";export default script;","<template>\n  <div class=\"explorer-heading\">\n    <header class=\"explorer-head\">\n      <div class=\"explorer-head__titles\">\n        <span class=\"explorer-head__eyebrow\">Verkenner</span>\n        <h1 class=\"explorer-head__title\">Beoordeelde locaties in Nederland</h1>\n      </div>\n      <AddLocationDialog :compact=\"phone\" />\n    </header>\n    <div class=\"explorer-heading__filters\">\n      <!-- On a phone the bar does not fit: the search field stays, the rest goes\n           behind one Filters button with the count of active filters on it. -->\n      <div v-if=\"phone\" class=\"toolbar toolbar--phone\">\n        <Input\n          :model-value=\"filters.query\"\n          class=\"toolbar__search\"\n          icon=\"search\"\n          placeholder=\"Zoek locatie\"\n          @update:model-value=\"(value) => patch({ query: value })\"\n        />\n        <Button class=\"toolbar__filters\" @click=\"filterSheetOpen = true\">\n          {{ active ? `Filters · ${active}` : \"Filters\" }}\n          <Icon name=\"filter\" />\n        </Button>\n      </div>\n\n      <!-- Tablet and desktop: everything on one line. Under 1080px that line can\n           be narrower than the buttons, so it scrolls sideways in its own box;\n           the page itself never scrolls sideways. -->\n      <div v-else class=\"toolbar\">\n        <Input\n          :model-value=\"filters.query\"\n          class=\"toolbar__search toolbar__search--compact\"\n          icon=\"search\"\n          placeholder=\"Zoek op naam, adres of plaats\"\n          @update:model-value=\"(value) => patch({ query: value })\"\n        />\n\n        <FilterDropdown label=\"Regio\" :value=\"filters.province || 'alle'\" :active=\"Boolean(filters.province)\" :width=\"230\">\n          <FilterChoice label=\"Alle regio's\" :checked=\"filters.province === ''\" @toggle=\"patch({ province: '' })\" />\n          <FilterChoice\n            v-for=\"province in provinces\"\n            :key=\"province\"\n            :label=\"province\"\n            :checked=\"filters.province === province\"\n            @toggle=\"patch({ province })\"\n          />\n        </FilterDropdown>\n\n        <FilterDropdown\n          label=\"Soort\"\n          :value=\"filters.locationType ? formatLocationType(filters.locationType) : 'alle'\"\n          :active=\"Boolean(filters.locationType)\"\n          :width=\"220\"\n        >\n          <FilterChoice label=\"Alle soorten\" :checked=\"filters.locationType === ''\" @toggle=\"patch({ locationType: '' })\" />\n          <FilterChoice\n            v-for=\"option in LOCATION_TYPE_OPTIONS\"\n            :key=\"option.value\"\n            :label=\"option.label\"\n            :checked=\"filters.locationType === option.value\"\n            @toggle=\"patch({ locationType: option.value })\"\n          />\n        </FilterDropdown>\n\n        <FilterDropdown\n          label=\"Geschiktheid\"\n          :value=\"suitabilityLabelFor(filters.suitabilities)\"\n          :active=\"filters.suitabilities.length < ALL_SUITABILITIES.length\"\n          :width=\"260\"\n        >\n          <FilterChoice\n            v-for=\"level in ALL_SUITABILITIES\"\n            :key=\"level\"\n            :label=\"suitabilityLabel(level)\"\n            :swatch=\"swatchFor(level)\"\n            :count=\"suitabilityCounts[level]\"\n            :checked=\"filters.suitabilities.includes(level)\"\n            @toggle=\"patch({ suitabilities: toggleInList(filters.suitabilities, level, ALL_SUITABILITIES) })\"\n          />\n          <button class=\"toolbar__toggleall\" type=\"button\" @click=\"toggleAllSuitabilities\">\n            {{ filters.suitabilities.length === ALL_SUITABILITIES.length ? \"Alles uitzetten\" : \"Alles aanzetten\" }}\n          </button>\n        </FilterDropdown>\n\n        <FilterDropdown\n          label=\"Fase\"\n          :value=\"phaseLabelFor(filters.phases)\"\n          :active=\"filters.phases.length < EXPLORER_PHASES.length\"\n          :width=\"250\"\n        >\n          <FilterChoice\n            v-for=\"phase in EXPLORER_PHASES\"\n            :key=\"phase\"\n            :label=\"phase\"\n            :count=\"phaseCounts[phase]\"\n            :checked=\"filters.phases.includes(phase)\"\n            @toggle=\"patch({ phases: toggleInList(filters.phases, phase, EXPLORER_PHASES) })\"\n          />\n        </FilterDropdown>\n\n        <FilterDropdown label=\"Feedback\" :value=\"FEEDBACK_LABELS[filters.feedback]\" :active=\"filters.feedback !== 'all'\" :width=\"220\">\n          <FilterChoice\n            v-for=\"[key, label] in FEEDBACK_OPTIONS\"\n            :key=\"key\"\n            :label=\"label\"\n            :checked=\"filters.feedback === key\"\n            @toggle=\"patch({ feedback: key })\"\n          />\n        </FilterDropdown>\n\n        <button v-if=\"active > 0\" class=\"toolbar__clear\" type=\"button\" @click=\"patch(DEFAULT_EXPLORER_FILTERS)\">\n          Wissen ({{ active }})\n        </button>\n      </div>\n    </div>\n  </div>\n\n  <PageBody fill class=\"explorer-body\">\n    <p v-if=\"error\" class=\"error\" role=\"alert\">{{ error }}</p>\n\n    <!-- The map container. Everything that floats on a phone (list, detail,\n         pill, filter sheet) is `absolute` INSIDE this box, never fixed, so it\n         cannot cover the status bar. -->\n    <div class=\"explorer\" :class=\"{ 'explorer--phone': phone, 'explorer--compact': compact }\">\n      <!-- List: a column on the left on desktop, a sheet rising from the bottom\n           on a phone. Only locations; the filters live in the bar or the sheet. -->\n      <aside v-if=\"!phone || listOpen\" class=\"list\">\n        <div class=\"list__head\">\n          <span class=\"list__count tnum\">{{ countLabel(rows.length, all === null ? null : all.length) }}</span>\n          <button v-if=\"phone\" class=\"list__close\" type=\"button\" aria-label=\"Lijst sluiten\" @click=\"listOpen = false\">\n            <Icon name=\"close\" :size=\"20\" />\n          </button>\n        </div>\n        <div class=\"list__scroll\">\n          <ExplorerResultRow\n            v-for=\"row in rows.slice(0, limit)\"\n            :key=\"row.id\"\n            :row=\"row\"\n            :selected=\"row.id === selectedId\"\n            :large=\"phone\"\n            @select=\"onSelect\"\n          />\n          <button v-if=\"rows.length > limit\" class=\"list__more\" type=\"button\" @click=\"limit += LIST_PAGE\">\n            Meer laden, nog {{ (rows.length - limit).toLocaleString(\"nl-NL\") }}\n          </button>\n          <p v-if=\"all !== null && rows.length === 0\" class=\"list__empty\">Geen locaties binnen deze filters.</p>\n        </div>\n      </aside>\n\n      <!-- z-index 0 traps Leaflet's own z-indexes (panes 400-700, controls\n           1000) in this wrapper. Without it they leak into the root stacking\n           context and paint over every popover and dialog. Load-bearing. -->\n      <div class=\"mapwrap\" :class=\"{ 'snl-map--pill': phone }\">\n        <ExplorerMap :locations=\"rows\" :selected-id=\"selectedId\" @select=\"onSelect\" @open=\"onOpen\" />\n        <ExplorerLegend />\n      </div>\n\n      <!-- The black pill bottom-left is the only way into the list on a phone.\n           It disappears as soon as the list or a detail is open. -->\n      <button v-if=\"phone && !listOpen && !selected\" class=\"pill\" type=\"button\" @click=\"listOpen = true\">\n        <Icon name=\"list\" />\n        {{ rows.length.toLocaleString(\"nl-NL\") }} locaties\n      </button>\n\n      <aside v-if=\"selected\" class=\"detail\">\n        <div class=\"detail__head\">\n          <div class=\"detail__titles\">\n            <div class=\"detail__name\">{{ selected.companyName }}</div>\n            <div class=\"detail__addr\">{{ selected.address }}{{ selected.city ? `, ${selected.city}` : \"\" }}</div>\n          </div>\n          <button class=\"detail__close\" type=\"button\" aria-label=\"Sluiten\" @click=\"selectedId = null\">\n            <Icon name=\"close\" :size=\"phone ? 20 : 16\" />\n          </button>\n        </div>\n        <div class=\"detail__body\">\n          <div class=\"detail__scorerow\">\n            <span class=\"detail__score tnum\">{{ selected.score ?? \"-\" }}</span>\n            <span class=\"detail__scorelabel\">AI-score</span>\n          </div>\n          <span class=\"detail__level\">\n            <span class=\"detail__dot\" :class=\"`detail__dot--${scoreToSuitability(selected.score)}`\" aria-hidden=\"true\" />\n            {{ suitabilityLabel(scoreToSuitability(selected.score)) }}\n          </span>\n          <dl class=\"detail__facts\">\n            <div class=\"detail__fact\">\n              <dt class=\"detail__dt\">Soort</dt>\n              <dd class=\"detail__dd tnum\">{{ formatLocationType(selected.locationType) }}</dd>\n            </div>\n            <div class=\"detail__fact\">\n              <dt class=\"detail__dt\">Regio</dt>\n              <dd class=\"detail__dd tnum\">{{ selected.province ?? \"onbekend\" }}</dd>\n            </div>\n            <div class=\"detail__fact\">\n              <dt class=\"detail__dt\">Fase</dt>\n              <dd class=\"detail__dd tnum\">{{ phaseOf(selected) }}</dd>\n            </div>\n            <div class=\"detail__fact\">\n              <dt class=\"detail__dt\">Coördinaten</dt>\n              <dd class=\"detail__dd tnum\">{{ formatCoordinates(selected.latitude, selected.longitude) }}</dd>\n            </div>\n            <div class=\"detail__fact\">\n              <dt class=\"detail__dt\">Veldfeedback</dt>\n              <dd class=\"detail__dd tnum\">{{ selected.hasFeedback ? \"aanwezig\" : \"geen\" }}</dd>\n            </div>\n          </dl>\n          <RouterLink :to=\"{ name: 'location-detail', params: { id: selected.id } }\" class=\"detail__open\">\n            Locatie openen\n            <Icon name=\"arrow--right\" />\n          </RouterLink>\n        </div>\n      </aside>\n\n      <FilterSheet\n        v-if=\"phone\"\n        :open=\"filterSheetOpen\"\n        :filters=\"filters\"\n        :active-count=\"active\"\n        :result-count=\"rows.length\"\n        :provinces=\"provinces\"\n        :suitability-counts=\"suitabilityCounts\"\n        :phase-counts=\"phaseCounts\"\n        @close=\"filterSheetOpen = false\"\n        @reset=\"patch(DEFAULT_EXPLORER_FILTERS)\"\n        @patch=\"patch\"\n      />\n    </div>\n  </PageBody>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, ref } from \"vue\";\nimport { RouterLink, useRouter } from \"vue-router\";\nimport AddLocationDialog from \"../components/locations/AddLocationDialog.vue\";\nimport PageBody from \"../components/shell/PageBody.vue\";\nimport Button from \"../components/ui/Button.vue\";\nimport Input from \"../components/ui/Input.vue\";\nimport Icon from \"../components/icons/Icon.vue\";\nimport ExplorerLegend from \"../components/explorer/ExplorerLegend.vue\";\nimport ExplorerMap from \"../components/explorer/ExplorerMap.vue\";\nimport ExplorerResultRow from \"../components/explorer/ExplorerResultRow.vue\";\nimport FilterChoice from \"../components/explorer/FilterChoice.vue\";\nimport FilterDropdown from \"../components/explorer/FilterDropdown.vue\";\nimport FilterSheet from \"../components/explorer/FilterSheet.vue\";\nimport { api } from \"../lib/api\";\nimport { isCompactBreakpoint, isPhoneBreakpoint } from \"../lib/breakpoint\";\nimport { useBreakpoint } from \"../lib/use-breakpoint\";\nimport {\n  ALL_SUITABILITIES,\n  activeFilterCount,\n  countByPhase,\n  countBySuitability,\n  DEFAULT_EXPLORER_FILTERS,\n  EXPLORER_PHASES,\n  FEEDBACK_OPTIONS,\n  filterExplorerLocations,\n  phaseOf,\n  toggleInList,\n  type ExplorerFilters,\n  type ExplorerLocation,\n} from \"../lib/explorer-filter\";\nimport {\n  countLabel,\n  FEEDBACK_LABELS,\n  formatCoordinates,\n  phaseLabelFor,\n  provincesFrom,\n  suitabilityLabelFor,\n} from \"../lib/explorer-labels\";\nimport { formatLocationType, LOCATION_TYPE_OPTIONS } from \"../lib/location-type\";\nimport { scoreToSuitability, suitabilityLabel, suitabilityToken, type SuitabilityLevel } from \"../lib/rating\";\n\n// How many results the list shows before \"Meer laden\" is needed. The map shows\n// them all; only the list is capped, because thousands of DOM rows make\n// scrolling slow.\nconst LIST_PAGE = 40;\n\nconst router = useRouter();\n\nconst all = ref<ExplorerLocation[] | null>(null);\nconst error = ref<string | null>(null);\nconst filters = ref<ExplorerFilters>(DEFAULT_EXPLORER_FILTERS);\nconst selectedId = ref<number | null>(null);\nconst limit = ref(LIST_PAGE);\n\n// Under 720px the map is the main view and list, detail and filters rise as\n// sheets from the bottom. That is behaviour, not layout, so the breakpoint\n// lives here in JavaScript and not only in CSS.\nconst breakpoint = useBreakpoint();\nconst phone = computed(() => isPhoneBreakpoint(breakpoint.value));\nconst compact = computed(() => isCompactBreakpoint(breakpoint.value));\nconst listOpen = ref(false);\nconst filterSheetOpen = ref(false);\n\nconst rows = computed(() => (all.value ? filterExplorerLocations(all.value, filters.value) : []));\nconst provinces = computed(() => provincesFrom(all.value ?? []));\n// The counts cover the whole set, not the result: otherwise a counter only\n// shows itself and zero.\nconst suitabilityCounts = computed(() => countBySuitability(all.value ?? []));\nconst phaseCounts = computed(() => countByPhase(all.value ?? []));\nconst active = computed(() => activeFilterCount(filters.value));\nconst selected = computed(() => rows.value.find((row) => row.id === selectedId.value) ?? null);\n\nfunction patch(next: Partial<ExplorerFilters>) {\n  filters.value = { ...filters.value, ...next };\n  limit.value = LIST_PAGE;\n}\n\nfunction toggleAllSuitabilities() {\n  patch({\n    suitabilities: filters.value.suitabilities.length === ALL_SUITABILITIES.length ? [] : ALL_SUITABILITIES,\n  });\n}\n\n// Choosing a location closes the list: on a phone list and detail share the\n// same spot, so two sheets at once would hide the detail. In the handler, not\n// in a watcher.\nfunction onSelect(id: number) {\n  selectedId.value = id;\n  listOpen.value = false;\n}\n\nfunction onOpen(id: number) {\n  void router.push({ name: \"location-detail\", params: { id } });\n}\n\n// The swatch uses the same category colors as the map markers.\nfunction swatchFor(level: SuitabilityLevel) {\n  return level === \"geschikt\" ? \"score-fg\" : suitabilityToken(level);\n}\n\nasync function load() {\n  error.value = null;\n  try {\n    const result = await api.findMapLocations();\n    all.value = result.locations;\n  } catch (err) {\n    console.error(\"Failed to load explorer locations:\", err);\n    error.value = err instanceof Error && err.message\n      ? err.message\n      : \"Kon de kaart niet laden. Probeer het opnieuw.\";\n    all.value = [];\n  }\n}\n\nonMounted(load);\n</script>\n\n<style scoped>\n@font-face {\n  font-family: \"Nudica Explorer\";\n  font-style: normal;\n  font-weight: 300;\n  font-display: swap;\n  src: url(\"../assets/nudica-light.woff2\") format(\"woff2\");\n}\n\n@font-face {\n  font-family: \"Nudica Explorer\";\n  font-style: normal;\n  font-weight: 400;\n  font-display: swap;\n  src: url(\"../assets/nudica-regular.woff2\") format(\"woff2\");\n}\n\n@font-face {\n  font-family: \"Nudica Explorer\";\n  font-style: normal;\n  font-weight: 600 700;\n  font-display: swap;\n  src: url(\"../assets/nudica-bold.woff2\") format(\"woff2\");\n}\n\n.explorer-heading,\n.explorer-body {\n  --font-sans: \"Nudica Explorer\", \"Helvetica Neue\", Arial, sans-serif;\n  font-family: var(--font-sans);\n}\n\n.explorer-heading {\n  flex: none;\n  min-width: 0;\n  background: var(--bg-surface);\n}\n\n.explorer-head {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  padding: 10px 16px;\n  border-bottom: 1px solid var(--border-1);\n}\n\n.explorer-head__titles {\n  display: flex;\n  flex: 1;\n  flex-direction: column;\n  gap: 2px;\n  min-width: 0;\n}\n\n.explorer-head__eyebrow {\n  font-size: var(--text-caption);\n  line-height: 16px;\n  letter-spacing: 0.16em;\n  text-transform: uppercase;\n  color: var(--fg-3);\n}\n\n.explorer-head__title {\n  margin: 0;\n  overflow: hidden;\n  font: 400 20px/28px var(--font-sans);\n  white-space: nowrap;\n  text-overflow: ellipsis;\n}\n\n.explorer-head :deep(.add-location__action) {\n  flex: none;\n  gap: 24px;\n  padding: 0 16px;\n  background: var(--brand);\n  color: var(--brand-fg);\n  font: 400 14px/18px var(--font-sans);\n  white-space: nowrap;\n}\n\n@media (min-width: 720px) {\n  .explorer-head :deep(.add-location__action) {\n    padding: 0 12px;\n  }\n}\n\n@media (hover: hover) {\n  .explorer-head :deep(.add-location__action:hover) {\n    background: var(--brand-hover);\n  }\n}\n\n.toolbar {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  padding: 8px 16px;\n  border-bottom: 1px solid var(--border-1);\n  overflow-x: auto;\n  scrollbar-width: thin;\n}\n\n.toolbar--phone {\n  padding: 8px 12px;\n  overflow-x: visible;\n}\n\n.toolbar__search {\n  flex: 1 1 auto;\n  min-width: 0;\n}\n\n.toolbar__search--compact {\n  flex: 1 1 240px;\n  min-width: 150px;\n  max-width: 280px;\n}\n\n.toolbar__search :deep(.field__input) {\n  padding: 0 40px;\n  background: var(--bg-surface);\n  font: 400 14px/20px var(--font-sans);\n}\n\n/* The Carbon field is 40px; in the desktop bar it lines up with the 32px\n   filter buttons. The phone keeps the full 40px as finger size. */\n.toolbar__search--compact :deep(.field__input) {\n  height: 32px;\n}\n\n.toolbar__filters {\n  flex: none;\n  gap: 24px;\n  padding: 0 16px;\n  min-height: 44px;\n  border-color: var(--fg-1);\n  font: 400 14px/18px var(--font-sans);\n}\n\n.toolbar__toggleall,\n.toolbar__clear {\n  border: 0;\n  padding: 0;\n  background: transparent;\n  color: var(--fg-3);\n  text-decoration: underline;\n  cursor: pointer;\n}\n\n.toolbar__toggleall {\n  align-self: flex-start;\n  font-family: \"Nudica Explorer\", \"Helvetica Neue\", Arial, sans-serif;\n  font-size: var(--text-caption);\n  line-height: 16px;\n}\n\n.toolbar__clear {\n  flex: none;\n  padding: 0 4px;\n  font-size: var(--text-ui);\n  white-space: nowrap;\n}\n\n@media (hover: hover) {\n  .toolbar__toggleall:hover,\n  .toolbar__clear:hover {\n    color: var(--fg-1);\n  }\n}\n\n.error {\n  flex: none;\n  margin: 0 0 12px;\n  padding: 8px 12px;\n  background: var(--danger-bg);\n  border: 1px solid var(--danger-border);\n  border-radius: var(--radius);\n  color: var(--danger-fg);\n  font-size: var(--text-ui);\n}\n\n/* The map runs edge to edge: PageBody pads its content, and this undoes that\n   padding for the one screen where the content IS the map. */\n.explorer {\n  position: relative;\n  display: flex;\n  flex: 1;\n  min-height: 0;\n  margin: calc(-1 * var(--shell-content-pad));\n}\n\n/* With an error line above it the map starts below that line, not under it. */\n.error + .explorer {\n  margin-top: 0;\n}\n\n.list {\n  display: flex;\n  flex: none;\n  flex-direction: column;\n  width: 308px;\n  min-height: 0;\n  border-right: 1px solid var(--border-1);\n  background: var(--bg-surface);\n}\n\n.explorer--compact .list {\n  width: 264px;\n}\n\n.explorer--phone .list {\n  position: absolute;\n  inset: auto 0 0 0;\n  z-index: 1200;\n  width: auto;\n  height: 58%;\n  border-right: 0;\n  border-top: 2px solid var(--brand);\n  box-shadow: 0 -4px 16px rgba(1, 5, 4, 0.24);\n}\n\n.list__head {\n  display: flex;\n  flex: none;\n  align-items: center;\n  gap: 8px;\n  height: 28px;\n  padding: 0 12px;\n  border-bottom: 1px solid var(--border-1);\n  background: var(--bg-inset);\n}\n\n.explorer--phone .list__head {\n  height: 44px;\n  padding-right: 4px;\n}\n\n.list__count {\n  flex: 1;\n  font-size: var(--text-caption);\n  line-height: 16px;\n  color: var(--fg-3);\n}\n\n.list__close {\n  display: flex;\n  flex: none;\n  align-items: center;\n  justify-content: center;\n  width: 44px;\n  height: 44px;\n  border: 0;\n  background: transparent;\n  color: var(--fg-3);\n  cursor: pointer;\n}\n\n.list__scroll {\n  flex: 1;\n  min-height: 0;\n  overflow: auto;\n}\n\n.list__more {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 100%;\n  height: 40px;\n  border: 0;\n  border-bottom: 1px solid var(--border-1);\n  background: transparent;\n  font-size: var(--text-ui);\n  color: var(--fg-3);\n  cursor: pointer;\n  transition: background-color 110ms cubic-bezier(0.2, 0, 0.38, 0.9);\n}\n\n.explorer--phone .list__more {\n  height: 44px;\n}\n\n@media (hover: hover) {\n  .list__more:hover {\n    background: var(--accent);\n  }\n}\n\n.list__empty {\n  margin: 0;\n  padding: 24px;\n  font-size: var(--text-ui);\n  color: var(--fg-3);\n}\n\n.mapwrap {\n  position: relative;\n  z-index: 0;\n  flex: 1;\n  min-width: 0;\n}\n\n.pill {\n  position: absolute;\n  bottom: 12px;\n  left: 12px;\n  z-index: 1100;\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  height: 44px;\n  padding: 0 16px;\n  border: 0;\n  border-radius: 22px;\n  background: var(--ink);\n  color: var(--ink-fg);\n  font-size: var(--text-ui);\n  box-shadow: 0 2px 12px rgba(1, 5, 4, 0.32);\n  cursor: pointer;\n}\n\n.detail {\n  display: flex;\n  flex: none;\n  flex-direction: column;\n  width: 280px;\n  border-left: 1px solid var(--border-1);\n  background: var(--bg-surface);\n}\n\n.explorer--compact .detail {\n  width: 248px;\n}\n\n.explorer--phone .detail {\n  position: absolute;\n  inset: auto 0 0 0;\n  z-index: 1250;\n  width: auto;\n  max-height: 56%;\n  overflow: auto;\n  border-left: 0;\n  border-top: 2px solid var(--brand);\n  box-shadow: 0 -4px 16px rgba(1, 5, 4, 0.24);\n}\n\n.detail__head {\n  display: flex;\n  align-items: flex-start;\n  gap: 8px;\n  padding: 10px 12px;\n  border-bottom: 1px solid var(--border-1);\n}\n\n.detail__titles {\n  display: flex;\n  flex: 1;\n  flex-direction: column;\n  gap: 2px;\n  min-width: 0;\n}\n\n.detail__name {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  font: 600 16px/22px var(--font-sans);\n}\n\n.detail__addr {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  font-size: var(--text-caption);\n  line-height: 16px;\n  color: var(--fg-3);\n}\n\n.detail__close {\n  display: flex;\n  flex: none;\n  align-items: center;\n  justify-content: center;\n  width: 28px;\n  height: 28px;\n  border: 0;\n  background: transparent;\n  color: var(--fg-3);\n  cursor: pointer;\n}\n\n.explorer--phone .detail__close {\n  width: 44px;\n  height: 44px;\n  margin-right: -6px;\n}\n\n@media (hover: hover) {\n  .detail__close:hover,\n  .list__close:hover {\n    color: var(--fg-1);\n  }\n}\n\n.detail__body {\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n  padding: 12px;\n}\n\n.detail__scorerow {\n  display: flex;\n  align-items: baseline;\n  gap: 8px;\n}\n\n.detail__score {\n  font-size: 40px;\n  font-weight: 300;\n  line-height: 1;\n}\n\n.detail__scorelabel {\n  font-size: var(--text-ui);\n  color: var(--fg-3);\n}\n\n.detail__level {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  font-size: var(--text-ui);\n  line-height: 18px;\n}\n\n.detail__dot {\n  width: 10px;\n  height: 10px;\n  border-radius: 50%;\n}\n\n.detail__dot--zeer_geschikt {\n  background: var(--explorer-excellent);\n}\n\n.detail__dot--geschikt {\n  background: var(--explorer-suitable);\n}\n\n.detail__dot--beperkt {\n  background: var(--explorer-limited);\n}\n\n.detail__dot--ongeschikt {\n  background: var(--explorer-unsuitable);\n}\n\n.detail__dot--geen_analyse {\n  background: var(--explorer-unanalysed);\n}\n\n.detail__facts {\n  display: flex;\n  flex-direction: column;\n  gap: 6px;\n  margin: 0;\n  padding-top: 10px;\n  border-top: 1px solid var(--border-1);\n}\n\n.detail__fact {\n  display: flex;\n  justify-content: space-between;\n  gap: 8px;\n}\n\n.detail__dt {\n  font-size: var(--text-caption);\n  line-height: 16px;\n  color: var(--fg-3);\n}\n\n.detail__dd {\n  margin: 0;\n  font-size: var(--text-caption);\n  line-height: 16px;\n}\n\n/* A link dressed as the primary button: navigation is a link, so no <Button>. */\n.detail__open {\n  display: inline-flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 24px;\n  width: 100%;\n  height: 32px;\n  padding: 0 12px;\n  border-radius: var(--radius);\n  background: var(--primary);\n  color: var(--primary-foreground);\n  font-size: var(--text-ui);\n  line-height: 18px;\n  cursor: pointer;\n  transition: background-color 110ms cubic-bezier(0.2, 0, 0.38, 0.9);\n}\n\n.explorer--phone .detail__open {\n  min-height: 44px;\n}\n\n@media (hover: hover) {\n  .detail__open:hover {\n    background: var(--fg-2);\n  }\n}\n</style>\n","import { scoreToSuitability, SUITABILITY_LEVELS, type SuitabilityLevel } from \"./rating\";\n\n/**\n * De rekenkern van de Verkenner: welke locaties horen bij de huidige filters, en\n * hoeveel vallen er in elke bak.\n *\n * Bewust Vue-vrij en zonder fetch, zodat dit te testen is zonder kaart, zonder\n * DOM en zonder RPC. De Verkenner-view levert alleen data en state aan.\n *\n * De geschiktheidsschaal komt uit `lib/rating.ts` en wordt hier NIET herhaald.\n * De admin gebruikt 75/55/35; de veld-app (SNL Scout) heeft een eigen schaal op\n * 85/65/40 en die twee zijn niet gespiegeld. Wie dat gelijktrekt, doet dat in\n * rating.ts en niet hier.\n */\n\n/**\n * De faseladder wordt afgeleid uit bestaande velden, precies zoals de kit doet.\n * Er is dus geen fase-kolom in de database en die hoort er ook niet te komen\n * zolang de fase volledig uit score en feedback volgt.\n */\nexport const EXPLORER_PHASES = [\n  \"Niet geanalyseerd\",\n  \"Geanalyseerd\",\n  \"Beoordeeld\",\n  \"Afgevallen\",\n] as const;\n\nexport type ExplorerPhase = (typeof EXPLORER_PHASES)[number];\n\n/** Het minimum dat de Verkenner van een locatie moet weten. */\nexport interface ExplorerLocation {\n  id: number;\n  companyName: string;\n  address: string;\n  city: string | null;\n  province: string | null;\n  locationType: string | null;\n  latitude: number;\n  longitude: number;\n  score: number | null;\n  hasFeedback: boolean;\n}\n\nexport type FeedbackFilter = \"all\" | \"with\" | \"without\";\n\n/**\n * De drie feedbackkeuzes met hun labels. Eén lijst, want zowel de dropdown op het\n * bureaublad als het filterblad op een telefoon rendert hem: twee kopieën lopen\n * uit elkaar zodra er een keuze bijkomt.\n */\nexport const FEEDBACK_OPTIONS: ReadonlyArray<readonly [FeedbackFilter, string]> = [\n  [\"all\", \"Alle locaties\"],\n  [\"with\", \"Met veldfeedback\"],\n  [\"without\", \"Zonder veldfeedback\"],\n];\n\nexport interface ExplorerFilters {\n  query: string;\n  province: string;\n  locationType: string;\n  /** Lege selectie betekent hier letterlijk niets tonen, niet alles tonen. */\n  suitabilities: readonly SuitabilityLevel[];\n  phases: readonly ExplorerPhase[];\n  feedback: FeedbackFilter;\n}\n\nexport const ALL_SUITABILITIES: readonly SuitabilityLevel[] = SUITABILITY_LEVELS;\n\nexport const DEFAULT_EXPLORER_FILTERS: ExplorerFilters = {\n  query: \"\",\n  province: \"\",\n  locationType: \"\",\n  suitabilities: [\"zeer_geschikt\", \"geschikt\"],\n  phases: EXPLORER_PHASES,\n  feedback: \"all\",\n};\n\n/**\n * De fase van een locatie. Volgorde is belangrijk: veldfeedback wint van een\n * lage score, want een beoordeelde locatie is beoordeeld, ook als het oordeel\n * negatief was.\n */\nexport function phaseOf(location: ExplorerLocation): ExplorerPhase {\n  if (location.score === null) return \"Niet geanalyseerd\";\n  if (location.hasFeedback) return \"Beoordeeld\";\n  if (location.score < 55) return \"Afgevallen\";\n  return \"Geanalyseerd\";\n}\n\nexport function matchesExplorerFilters(\n  location: ExplorerLocation,\n  filters: ExplorerFilters,\n): boolean {\n  const query = filters.query.trim().toLowerCase();\n  if (query) {\n    const haystack = `${location.companyName} ${location.address} ${location.city ?? \"\"}`.toLowerCase();\n    if (!haystack.includes(query)) return false;\n  }\n  if (filters.province && location.province !== filters.province) return false;\n  if (filters.locationType && location.locationType !== filters.locationType) return false;\n  if (!filters.suitabilities.includes(scoreToSuitability(location.score))) return false;\n  if (!filters.phases.includes(phaseOf(location))) return false;\n  if (filters.feedback === \"with\" && !location.hasFeedback) return false;\n  if (filters.feedback === \"without\" && location.hasFeedback) return false;\n  return true;\n}\n\nexport function filterExplorerLocations(\n  locations: readonly ExplorerLocation[],\n  filters: ExplorerFilters,\n): ExplorerLocation[] {\n  return locations.filter((location) => matchesExplorerFilters(location, filters));\n}\n\n/**\n * De tellingen achter de keuzes in de dropdowns. Bewust over de VOLLEDIGE set en\n * niet over het huidige resultaat: een teller die meebeweegt met zijn eigen\n * filter kan alleen zichzelf en nul tonen, en dat helpt niemand bij kiezen.\n */\nexport function countBySuitability(\n  locations: readonly ExplorerLocation[],\n): Record<SuitabilityLevel, number> {\n  const counts: Record<SuitabilityLevel, number> = {\n    zeer_geschikt: 0,\n    geschikt: 0,\n    beperkt: 0,\n    ongeschikt: 0,\n    geen_analyse: 0,\n  };\n  for (const location of locations) counts[scoreToSuitability(location.score)] += 1;\n  return counts;\n}\n\nexport function countByPhase(\n  locations: readonly ExplorerLocation[],\n): Record<ExplorerPhase, number> {\n  const counts = {\n    \"Niet geanalyseerd\": 0,\n    Geanalyseerd: 0,\n    Beoordeeld: 0,\n    Afgevallen: 0,\n  } satisfies Record<ExplorerPhase, number>;\n  for (const location of locations) counts[phaseOf(location)] += 1;\n  return counts;\n}\n\n/** Hoeveel filters staan er niet op hun standaardstand? Voedt \"Wissen (N)\". */\nexport function activeFilterCount(filters: ExplorerFilters): number {\n  return (\n    (filters.province ? 1 : 0) +\n    (filters.locationType ? 1 : 0) +\n    (filters.suitabilities.length !== DEFAULT_EXPLORER_FILTERS.suitabilities.length\n      || DEFAULT_EXPLORER_FILTERS.suitabilities.some((level) => !filters.suitabilities.includes(level)) ? 1 : 0) +\n    (filters.phases.length < EXPLORER_PHASES.length ? 1 : 0) +\n    (filters.feedback === \"all\" ? 0 : 1)\n  );\n}\n\n/** Toggle een waarde in een selectielijst, met stabiele volgorde. */\nexport function toggleInList<T>(list: readonly T[], value: T, order: readonly T[]): T[] {\n  const next = list.includes(value)\n    ? list.filter((item) => item !== value)\n    : [...list, value];\n  return order.filter((item) => next.includes(item));\n}\n","import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"legend\" }\nconst _hoisted_2 = {\n  class: \"legend__list\",\n  \"aria-label\": \"Geschiktheid\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"ul\", _hoisted_2, [\n      (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.ALL_SUITABILITIES, (level) => {\n        return (_openBlock(), _createElementBlock(\"li\", {\n          key: level,\n          class: \"legend__item\"\n        }, [\n          _createElementVNode(\"span\", {\n            class: _normalizeClass([\"legend__dot\", `legend__dot--${level}`]),\n            \"aria-hidden\": \"true\"\n          }, null, 2 /* CLASS */),\n          _createTextVNode(\" \" + _toDisplayString($setup.suitabilityLabel(level)), 1 /* TEXT */)\n        ]))\n      }), 128 /* KEYED_FRAGMENT */))\n    ])\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerLegend.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerLegend.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerLegend.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerLegend.vue\";script.__scopeId = \"data-v-c0efd60a\";export default script;","<template>\n  <div ref=\"el\" class=\"xmap\"></div>\n</template>\n\n<script setup lang=\"ts\">\nimport * as L from \"leaflet\";\nimport { onBeforeUnmount, onMounted, ref, watch } from \"vue\";\nimport type { ExplorerLocation } from \"../../lib/explorer-filter\";\nimport { pinClasses } from \"../../lib/explorer-labels\";\n\n// OpenStreetMap standard tiles, muted to grey in CSS (`.leaflet-tile` in\n// frontend.scss, with an inverted variant for dark mode) so the pins stay the\n// only color on the map. CARTO now watermarks its public tiles, PDOK BRT only\n// draws the Netherlands; neither is an option (see CLAUDE.md).\nconst TILE_URL = \"https://tile.openstreetmap.org/{z}/{x}/{y}.png\";\nconst ATTRIBUTION =\n  '&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a>-bijdragers';\n\n// All of the Netherlands in view while nothing is selected.\nconst NL_CENTER: L.LatLngTuple = [52.15, 5.4];\nconst NL_ZOOM = 7;\n\nconst props = defineProps<{\n  locations: readonly ExplorerLocation[];\n  selectedId: number | null;\n}>();\n\nconst emit = defineEmits<{ select: [id: number]; open: [id: number] }>();\n\nconst el = ref<HTMLDivElement | null>(null);\n\n// Leaflet manages its own DOM, so the map and its markers live outside Vue's\n// reactivity in plain variables and are synchronised from watchers.\nlet map: L.Map | null = null;\nlet layer: L.LayerGroup | null = null;\nconst markers = new Map<number, L.Marker>();\nlet didFit = false;\nlet resizeObserver: ResizeObserver | null = null;\nlet waitObserver: ResizeObserver | null = null;\n\nfunction pinIcon(location: ExplorerLocation, selected: boolean): L.DivIcon {\n  return L.divIcon({\n    className: \"snl-pin-wrap\",\n    html: `<span class=\"${pinClasses(location, selected)}\" style=\"position:relative\"></span>`,\n    iconSize: [28, 28],\n    iconAnchor: [14, 14],\n  });\n}\n\nfunction renderMarkers() {\n  if (!map || !layer) return;\n  layer.clearLayers();\n  markers.clear();\n\n  for (const location of props.locations) {\n    const marker = L.marker([location.latitude, location.longitude], {\n      icon: pinIcon(location, location.id === props.selectedId),\n      title: location.companyName,\n      keyboard: false,\n    });\n    marker.on(\"click\", () => emit(\"select\", location.id));\n    marker.on(\"dblclick\", () => emit(\"open\", location.id));\n    marker.addTo(layer);\n    markers.set(location.id, marker);\n  }\n\n  // Fit once, on the first non-empty set. Never again: a map that jumps under\n  // your hands on every filter change is a nuisance.\n  if (!didFit && props.locations.length > 0) {\n    didFit = true;\n    map.fitBounds(\n      L.latLngBounds(props.locations.map((l) => [l.latitude, l.longitude] as L.LatLngTuple)),\n      { padding: [24, 24] },\n    );\n  }\n}\n\n// Selection only swaps the icons of the affected pins and pans to the choice;\n// no marker is rebuilt.\nfunction syncSelection() {\n  if (!map) return;\n  for (const [id, marker] of markers) {\n    const location = props.locations.find((l) => l.id === id);\n    if (!location) continue;\n    marker.setIcon(pinIcon(location, id === props.selectedId));\n    if (id === props.selectedId) {\n      marker.setZIndexOffset(900);\n      map.panTo([location.latitude, location.longitude], { animate: true, duration: 0.4 });\n    } else {\n      marker.setZIndexOffset(0);\n    }\n  }\n}\n\n// Create the map. Only ever called once the container has a real height, so\n// Leaflet never caches a 0-size viewport (grey tiles forever).\nfunction initMap() {\n  if (map || !el.value) return;\n  map = L.map(el.value, {\n    center: NL_CENTER,\n    zoom: NL_ZOOM,\n    // The kit puts the zoom buttons bottom-left: top-right they would sit under\n    // the page header and next to the legend.\n    zoomControl: false,\n    attributionControl: true,\n    preferCanvas: false,\n  });\n  L.control.zoom({ position: \"bottomleft\" }).addTo(map);\n  L.tileLayer(TILE_URL, { attribution: ATTRIBUTION, maxZoom: 19 }).addTo(map);\n  layer = L.layerGroup().addTo(map);\n\n  renderMarkers();\n\n  // Keep the map sized on later resizes (window resize, sheet open/close).\n  resizeObserver = new ResizeObserver(() => map?.invalidateSize());\n  resizeObserver.observe(el.value);\n}\n\nonMounted(() => {\n  if (!el.value) return;\n  if (el.value.offsetHeight > 0) {\n    initMap();\n    return;\n  }\n  // One-shot: wait for the first non-zero height, then build the map once.\n  waitObserver = new ResizeObserver(() => {\n    if (el.value && !map && el.value.offsetHeight > 0) {\n      waitObserver?.disconnect();\n      waitObserver = null;\n      initMap();\n    }\n  });\n  waitObserver.observe(el.value);\n});\n\nwatch(() => props.locations, renderMarkers);\nwatch(() => props.selectedId, syncSelection);\n\nonBeforeUnmount(() => {\n  waitObserver?.disconnect();\n  waitObserver = null;\n  resizeObserver?.disconnect();\n  resizeObserver = null;\n  layer?.remove();\n  layer = null;\n  markers.clear();\n  map?.remove();\n  map = null;\n});\n</script>\n\n<style scoped>\n/* Only position here. Never `isolation`, `transform` or `filter` on this\n   element: that gives black tiles on mobile. The grey filter sits on\n   `.leaflet-tile` (global). */\n.xmap {\n  position: absolute;\n  inset: 0;\n}\n</style>\n","import {\n  ALL_SUITABILITIES,\n  EXPLORER_PHASES,\n  type ExplorerLocation,\n  type ExplorerPhase,\n  type FeedbackFilter,\n} from \"./explorer-filter\";\nimport { scoreToSuitability, suitabilityLabel, type SuitabilityLevel } from \"./rating\";\n\n/**\n * Display strings of the Verkenner, kept out of the `.vue` bodies so they can be\n * tested. Wording follows the Next admin (app/verkenner/page.tsx) one to one.\n */\n\n/** Button value of the Geschiktheid filter: \"alle\", a single label, or a count. */\nexport function suitabilityLabelFor(levels: readonly SuitabilityLevel[]): string {\n  if (levels.length === ALL_SUITABILITIES.length) return \"alle\";\n  if (levels.length === 1) return suitabilityLabel(levels[0]);\n  return `${levels.length} niveaus`;\n}\n\n/** Button value of the Fase filter: \"alle\", the single phase, or \"N van 4\". */\nexport function phaseLabelFor(phases: readonly ExplorerPhase[]): string {\n  if (phases.length === EXPLORER_PHASES.length) return \"alle\";\n  if (phases.length === 1) return phases[0];\n  return `${phases.length} van ${EXPLORER_PHASES.length}`;\n}\n\nexport const FEEDBACK_LABELS: Record<FeedbackFilter, string> = {\n  all: \"alle\",\n  with: \"aanwezig\",\n  without: \"ontbreekt\",\n};\n\n/** Header line of the result list. `total` is null while the data loads. */\nexport function countLabel(shown: number, total: number | null): string {\n  if (total === null) return \"laden...\";\n  return `${shown.toLocaleString(\"nl-NL\")} van ${total.toLocaleString(\"nl-NL\")} locaties`;\n}\n\n/**\n * The region choices come from the data itself, so the filter never lists a\n * province without a single location in it.\n */\nexport function provincesFrom(locations: readonly ExplorerLocation[]): string[] {\n  const unique = new Set<string>();\n  for (const location of locations) {\n    if (location.province) unique.add(location.province);\n  }\n  return [...unique].toSorted((a, b) => a.localeCompare(b, \"nl-NL\"));\n}\n\n/** Class list of a map pin; the drawing lives in the global `.snl-pin*` rules. */\nexport function pinClasses(location: ExplorerLocation, selected: boolean): string {\n  const classes = [\"snl-pin\", `snl-pin--${scoreToSuitability(location.score)}`];\n  if (selected) classes.push(\"snl-pin--selected\");\n  if (location.hasFeedback) classes.push(\"snl-pin--feedback\");\n  return classes.join(\" \");\n}\n\nexport function formatCoordinates(latitude: number, longitude: number): string {\n  return `${latitude.toFixed(5)}, ${longitude.toFixed(5)}`;\n}\n","import { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n  ref: \"el\",\n  class: \"xmap\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, null, 512 /* NEED_PATCH */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerMap.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerMap.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerMap.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerMap.vue\";script.__scopeId = \"data-v-df800eab\";export default script;","<template>\n  <button\n    class=\"row\"\n    :class=\"{ 'row--large': large, 'row--selected': selected }\"\n    type=\"button\"\n    :aria-pressed=\"selected\"\n    @click=\"emit('select', row.id)\"\n  >\n    <span class=\"row__bar\" :class=\"`row__bar--${barToken}`\" :title=\"suitabilityLabel(level)\" aria-hidden=\"true\" />\n    <span class=\"row__text\">\n      <span class=\"row__namerow\">\n        <span class=\"row__name\">{{ row.companyName }}</span>\n        <Icon v-if=\"row.hasFeedback\" name=\"idea\" :size=\"12\" class=\"row__bulb\" aria-label=\"Veldfeedback aanwezig\" />\n      </span>\n      <span class=\"row__sub\">\n        {{ formatLocationType(row.locationType) }} &middot; {{ row.address }}{{ row.city ? `, ${row.city}` : \"\" }}\n      </span>\n    </span>\n    <span class=\"row__score tnum\" :class=\"{ 'row__score--none': row.score === null }\">{{ row.score ?? \"-\" }}</span>\n  </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport Icon from \"../icons/Icon.vue\";\nimport type { ExplorerLocation } from \"../../lib/explorer-filter\";\nimport { formatLocationType } from \"../../lib/location-type\";\nimport { scoreToSuitability, suitabilityLabel } from \"../../lib/rating\";\n\n// A row in the result list, with the geometry from the kit: a standing 3px bar\n// in the suitability color against the left edge, then name and address, and\n// the score in tabular figures on the right.\nconst props = withDefaults(defineProps<{\n  row: ExplorerLocation;\n  selected: boolean;\n  large?: boolean;\n}>(), { large: false });\n\nconst emit = defineEmits<{ select: [id: number] }>();\n\nconst level = computed(() => scoreToSuitability(props.row.score));\n// The bar follows the same category colors as the map markers.\nconst barToken = computed(() => level.value);\n</script>\n\n<style scoped>\n.row {\n  display: grid;\n  grid-template-columns: 3px 1fr auto;\n  align-items: center;\n  gap: 10px;\n  width: 100%;\n  padding: 8px 12px 8px 0;\n  border: 0;\n  border-bottom: 1px solid var(--border-1);\n  background: transparent;\n  text-align: left;\n  font-family: inherit;\n  color: var(--fg-1);\n  cursor: pointer;\n  transition: background-color 110ms cubic-bezier(0.2, 0, 0.38, 0.9);\n}\n\n.row--large {\n  min-height: 44px;\n}\n\n.row--selected {\n  background: var(--bg-sunken);\n}\n\n@media (hover: hover) {\n  .row:not(.row--selected):hover {\n    background: var(--accent);\n  }\n}\n\n.row__bar {\n  align-self: stretch;\n  min-height: 24px;\n}\n\n.row__bar--zeer_geschikt {\n  background: var(--explorer-excellent);\n}\n\n.row__bar--geschikt {\n  background: var(--explorer-suitable);\n}\n\n.row__bar--beperkt {\n  background: var(--explorer-limited);\n}\n\n.row__bar--ongeschikt {\n  background: var(--explorer-unsuitable);\n}\n\n.row__bar--geen_analyse {\n  background: var(--explorer-unanalysed);\n}\n\n.row__text {\n  display: flex;\n  flex-direction: column;\n  gap: 2px;\n  min-width: 0;\n}\n\n.row__namerow {\n  display: flex;\n  align-items: center;\n  gap: 6px;\n  min-width: 0;\n}\n\n.row__name {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  font: 600 14px/18px var(--font-sans);\n}\n\n.row__bulb {\n  flex: none;\n  color: var(--fg-3);\n}\n\n.row__sub {\n  display: block;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  font: 400 12px/16px var(--font-sans);\n  color: var(--fg-3);\n}\n\n.row__score {\n  font: 400 14px/20px var(--font-sans);\n}\n\n.row__score--none {\n  color: var(--fg-3);\n}\n</style>\n","import { normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = [\"aria-pressed\"]\nconst _hoisted_2 = [\"title\"]\nconst _hoisted_3 = { class: \"row__text\" }\nconst _hoisted_4 = { class: \"row__namerow\" }\nconst _hoisted_5 = { class: \"row__name\" }\nconst _hoisted_6 = { class: \"row__sub\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"button\", {\n    class: _normalizeClass([\"row\", { 'row--large': $props.large, 'row--selected': $props.selected }]),\n    type: \"button\",\n    \"aria-pressed\": $props.selected,\n    onClick: _cache[0] || (_cache[0] = $event => ($setup.emit('select', $props.row.id)))\n  }, [\n    _createElementVNode(\"span\", {\n      class: _normalizeClass([\"row__bar\", `row__bar--${$setup.barToken}`]),\n      title: $setup.suitabilityLabel($setup.level),\n      \"aria-hidden\": \"true\"\n    }, null, 10 /* CLASS, PROPS */, _hoisted_2),\n    _createElementVNode(\"span\", _hoisted_3, [\n      _createElementVNode(\"span\", _hoisted_4, [\n        _createElementVNode(\"span\", _hoisted_5, _toDisplayString($props.row.companyName), 1 /* TEXT */),\n        ($props.row.hasFeedback)\n          ? (_openBlock(), _createBlock($setup[\"Icon\"], {\n              key: 0,\n              name: \"idea\",\n              size: 12,\n              class: \"row__bulb\",\n              \"aria-label\": \"Veldfeedback aanwezig\"\n            }))\n          : _createCommentVNode(\"v-if\", true)\n      ]),\n      _createElementVNode(\"span\", _hoisted_6, _toDisplayString($setup.formatLocationType($props.row.locationType)) + \" · \" + _toDisplayString($props.row.address) + _toDisplayString($props.row.city ? `, ${$props.row.city}` : \"\"), 1 /* TEXT */)\n    ]),\n    _createElementVNode(\"span\", {\n      class: _normalizeClass([\"row__score tnum\", { 'row__score--none': $props.row.score === null }])\n    }, _toDisplayString($props.row.score ?? \"-\"), 3 /* TEXT, CLASS */)\n  ], 10 /* CLASS, PROPS */, _hoisted_1))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerResultRow.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerResultRow.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerResultRow.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/ExplorerResultRow.vue\";script.__scopeId = \"data-v-a3e5d87c\";export default script;","<template>\n  <button\n    class=\"choice\"\n    :class=\"{ 'choice--large': large }\"\n    type=\"button\"\n    role=\"option\"\n    :aria-selected=\"checked\"\n    @click=\"emit('toggle')\"\n  >\n    <span class=\"choice__box\" :class=\"{ 'choice__box--on': checked }\" aria-hidden=\"true\">\n      <svg v-if=\"checked\" class=\"choice__mark\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\">\n        <path d=\"M3 8.5 6.5 12 13 4.5\" />\n      </svg>\n    </span>\n    <span v-if=\"swatch\" class=\"choice__swatch\" :class=\"`choice__swatch--${swatch}`\" aria-hidden=\"true\" />\n    <span class=\"choice__label\">{{ label }}</span>\n    <span v-if=\"typeof count === 'number'\" class=\"choice__count tnum\">{{ count.toLocaleString(\"nl-NL\") }}</span>\n  </button>\n</template>\n\n<script setup lang=\"ts\">\nimport type { StatusToken } from \"../../lib/rating\";\n\n// One choice row in a filter panel: check mark, optional color swatch, label,\n// and the count on the right.\n//\n// Deliberately no <label for> around a real checkbox: a click on the label\n// would be forwarded to the input and toggle the row twice. The whole row is\n// the button and the check mark is purely visual.\n//\n// The legacy swatch names map to the same Scout palette as the map markers.\nwithDefaults(defineProps<{\n  label: string;\n  checked: boolean;\n  count?: number;\n  swatch?: StatusToken | \"score-fg\";\n  /** Finger size for the phone filter sheet: 44px rows with a 22px check. */\n  large?: boolean;\n}>(), { large: false });\n\nconst emit = defineEmits<{ toggle: [] }>();\n</script>\n\n<style scoped>\n.choice {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  margin: 0 -6px;\n  padding: 4px 6px;\n  border: 0;\n  background: transparent;\n  text-align: left;\n  font: 400 14px/18px var(--font-sans);\n  color: var(--fg-1);\n  cursor: pointer;\n  transition: background-color 110ms cubic-bezier(0.2, 0, 0.38, 0.9);\n}\n\n.choice--large {\n  min-height: 44px;\n  gap: 12px;\n  line-height: 20px;\n}\n\n@media (hover: hover) {\n  .choice:hover {\n    background: var(--accent);\n  }\n}\n\n.choice__box {\n  display: flex;\n  flex: none;\n  align-items: center;\n  justify-content: center;\n  width: 16px;\n  height: 16px;\n  border: 1px solid var(--input);\n  border-radius: 2px;\n}\n\n.choice--large .choice__box {\n  width: 22px;\n  height: 22px;\n}\n\n.choice__box--on {\n  border-color: var(--primary);\n  background: var(--primary);\n  color: var(--primary-foreground);\n}\n\n.choice__mark {\n  width: 12px;\n  height: 12px;\n}\n\n.choice--large .choice__mark {\n  width: 16px;\n  height: 16px;\n}\n\n.choice__swatch {\n  flex: none;\n  width: 8px;\n  height: 8px;\n  border-radius: 50%;\n}\n\n.choice--large .choice__swatch {\n  width: 10px;\n  height: 10px;\n}\n\n.choice__swatch--score {\n  background: var(--explorer-excellent);\n}\n\n.choice__swatch--score-fg {\n  background: var(--explorer-suitable);\n}\n\n.choice__swatch--diverge {\n  background: var(--explorer-limited);\n}\n\n.choice__swatch--danger {\n  background: var(--explorer-unsuitable);\n}\n\n.choice__swatch--neutral {\n  background: var(--explorer-unanalysed);\n}\n\n.choice__label {\n  flex: 1;\n}\n\n.choice__count {\n  font: 400 12px/16px var(--font-sans);\n  color: var(--fg-3);\n}\n</style>\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, toDisplayString as _toDisplayString } from \"vue\"\n\nconst _hoisted_1 = [\"aria-selected\"]\nconst _hoisted_2 = {\n  key: 0,\n  class: \"choice__mark\",\n  viewBox: \"0 0 16 16\",\n  fill: \"none\",\n  stroke: \"currentColor\",\n  \"stroke-width\": \"2.5\"\n}\nconst _hoisted_3 = { class: \"choice__label\" }\nconst _hoisted_4 = {\n  key: 1,\n  class: \"choice__count tnum\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"button\", {\n    class: _normalizeClass([\"choice\", { 'choice--large': $props.large }]),\n    type: \"button\",\n    role: \"option\",\n    \"aria-selected\": $props.checked,\n    onClick: _cache[0] || (_cache[0] = $event => ($setup.emit('toggle')))\n  }, [\n    _createElementVNode(\"span\", {\n      class: _normalizeClass([\"choice__box\", { 'choice__box--on': $props.checked }]),\n      \"aria-hidden\": \"true\"\n    }, [\n      ($props.checked)\n        ? (_openBlock(), _createElementBlock(\"svg\", _hoisted_2, _cache[1] || (_cache[1] = [\n            _createElementVNode(\"path\", { d: \"M3 8.5 6.5 12 13 4.5\" }, null, -1 /* CACHED */)\n          ])))\n        : _createCommentVNode(\"v-if\", true)\n    ], 2 /* CLASS */),\n    ($props.swatch)\n      ? (_openBlock(), _createElementBlock(\"span\", {\n          key: 0,\n          class: _normalizeClass([\"choice__swatch\", `choice__swatch--${$props.swatch}`]),\n          \"aria-hidden\": \"true\"\n        }, null, 2 /* CLASS */))\n      : _createCommentVNode(\"v-if\", true),\n    _createElementVNode(\"span\", _hoisted_3, _toDisplayString($props.label), 1 /* TEXT */),\n    (typeof $props.count === 'number')\n      ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, _toDisplayString($props.count.toLocaleString(\"nl-NL\")), 1 /* TEXT */))\n      : _createCommentVNode(\"v-if\", true)\n  ], 10 /* CLASS, PROPS */, _hoisted_1))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterChoice.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterChoice.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterChoice.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterChoice.vue\";script.__scopeId = \"data-v-2a9ef790\";export default script;","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createVNode as _createVNode, normalizeClass as _normalizeClass, renderSlot as _renderSlot, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"fdrop__label\" }\nconst _hoisted_2 = { class: \"fdrop__value\" }\nconst _hoisted_3 = { class: \"fdrop__panel\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createBlock($setup[\"Popover\"], {\n    align: \"start\",\n    width: $props.width\n  }, {\n    trigger: _withCtx(() => [\n      _createElementVNode(\"button\", {\n        class: _normalizeClass([\"fdrop\", { 'fdrop--active': $props.active }]),\n        type: \"button\"\n      }, [\n        _createElementVNode(\"span\", _hoisted_1, _toDisplayString($props.label), 1 /* TEXT */),\n        _createElementVNode(\"span\", _hoisted_2, _toDisplayString($props.value), 1 /* TEXT */),\n        _createVNode($setup[\"Icon\"], {\n          name: \"chevron--down\",\n          size: 14,\n          class: \"fdrop__caret\"\n        })\n      ], 2 /* CLASS */)\n    ]),\n    default: _withCtx(() => [\n      _createElementVNode(\"div\", _hoisted_3, [\n        _renderSlot(_ctx.$slots, \"default\", {}, undefined, true)\n      ])\n    ]),\n    _: 3 /* FORWARDED */\n  }, 8 /* PROPS */, [\"width\"]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterDropdown.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterDropdown.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterDropdown.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterDropdown.vue\";script.__scopeId = \"data-v-fa7fda53\";export default script;","<template>\n  <div v-if=\"open\" class=\"sheet\" role=\"presentation\" @click=\"emit('close')\">\n    <div class=\"sheet__panel\" role=\"dialog\" aria-modal=\"true\" aria-label=\"Filters\" @click.stop>\n      <div class=\"sheet__head\">\n        <h2 class=\"page-title sheet__title\">Filters</h2>\n        <button v-if=\"activeCount > 0\" class=\"sheet__reset\" type=\"button\" @click=\"emit('reset')\">\n          Wissen ({{ activeCount }})\n        </button>\n        <button class=\"sheet__close\" type=\"button\" aria-label=\"Sluiten\" @click=\"emit('close')\">\n          <Icon name=\"close\" :size=\"20\" />\n        </button>\n      </div>\n\n      <div class=\"sheet__body\">\n        <div class=\"sheet__search\">\n          <Input\n            :model-value=\"filters.query\"\n            icon=\"search\"\n            placeholder=\"Zoek op naam, adres of plaats\"\n            @update:model-value=\"(value) => emit('patch', { query: value })\"\n          />\n        </div>\n\n        <div class=\"sheet__group\">\n          <span class=\"eyebrow\">Geschiktheid</span>\n          <FilterChoice\n            v-for=\"level in ALL_SUITABILITIES\"\n            :key=\"level\"\n            large\n            :label=\"suitabilityLabel(level)\"\n            :swatch=\"swatchFor(level)\"\n            :count=\"suitabilityCounts[level]\"\n            :checked=\"filters.suitabilities.includes(level)\"\n            @toggle=\"emit('patch', { suitabilities: toggleInList(filters.suitabilities, level, ALL_SUITABILITIES) })\"\n          />\n        </div>\n\n        <div class=\"sheet__group\">\n          <span class=\"eyebrow\">Fase</span>\n          <FilterChoice\n            v-for=\"phase in EXPLORER_PHASES\"\n            :key=\"phase\"\n            large\n            :label=\"phase\"\n            :count=\"phaseCounts[phase]\"\n            :checked=\"filters.phases.includes(phase)\"\n            @toggle=\"emit('patch', { phases: toggleInList(filters.phases, phase, EXPLORER_PHASES) })\"\n          />\n        </div>\n\n        <div class=\"sheet__group\">\n          <span class=\"eyebrow\">Regio en soort</span>\n          <Select\n            :model-value=\"filters.province\"\n            label=\"Regio\"\n            :options=\"provinceOptions\"\n            @update:model-value=\"(value) => emit('patch', { province: value })\"\n          />\n          <Select\n            :model-value=\"filters.locationType\"\n            label=\"Soort\"\n            :options=\"typeOptions\"\n            @update:model-value=\"(value) => emit('patch', { locationType: value })\"\n          />\n        </div>\n\n        <div class=\"sheet__group\">\n          <span class=\"eyebrow\">Veldfeedback</span>\n          <FilterChoice\n            v-for=\"[key, label] in FEEDBACK_OPTIONS\"\n            :key=\"key\"\n            large\n            :label=\"label\"\n            :checked=\"filters.feedback === key\"\n            @toggle=\"emit('patch', { feedback: key })\"\n          />\n        </div>\n      </div>\n\n      <div class=\"sheet__foot\">\n        <Button variant=\"primary\" class=\"sheet__apply\" @click=\"emit('close')\">\n          Toon {{ resultCount.toLocaleString(\"nl-NL\") }} locaties\n        </Button>\n      </div>\n    </div>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport Button from \"../ui/Button.vue\";\nimport Input from \"../ui/Input.vue\";\nimport Select from \"../ui/Select.vue\";\nimport Icon from \"../icons/Icon.vue\";\nimport FilterChoice from \"./FilterChoice.vue\";\nimport {\n  ALL_SUITABILITIES,\n  EXPLORER_PHASES,\n  FEEDBACK_OPTIONS,\n  toggleInList,\n  type ExplorerFilters,\n  type ExplorerPhase,\n} from \"../../lib/explorer-filter\";\nimport { LOCATION_TYPE_OPTIONS } from \"../../lib/location-type\";\nimport { suitabilityLabel, suitabilityToken, type SuitabilityLevel } from \"../../lib/rating\";\n\n// The filters on a phone: one sheet rising from the bottom with the same groups\n// as the desktop bar, but stacked instead of in dropdowns. A dropdown inside a\n// dropdown does not work on a touch screen, and the bar would clip at 390px.\n//\n// The sheet is `absolute` INSIDE the map container (not fixed, which would cover\n// the status bar) on z-index 1300: above the list (1200) and detail (1250)\n// sheets, and above Leaflet's own panes, which stop at 1000.\nconst props = defineProps<{\n  open: boolean;\n  filters: ExplorerFilters;\n  activeCount: number;\n  resultCount: number;\n  provinces: readonly string[];\n  suitabilityCounts: Record<SuitabilityLevel, number>;\n  phaseCounts: Record<ExplorerPhase, number>;\n}>();\n\nconst emit = defineEmits<{\n  close: [];\n  reset: [];\n  patch: [next: Partial<ExplorerFilters>];\n}>();\n\nconst provinceOptions = computed(() => [\n  { value: \"\", label: \"Alle regio's\" },\n  ...props.provinces.map((province) => ({ value: province, label: province })),\n]);\n\nconst typeOptions = computed(() => [\n  { value: \"\", label: \"Alle soorten\" },\n  ...LOCATION_TYPE_OPTIONS.map((option) => ({ value: option.value, label: option.label })),\n]);\n\n// The swatch follows the pin colors, which separate the two green levels.\nfunction swatchFor(level: SuitabilityLevel) {\n  return level === \"geschikt\" ? \"score-fg\" : suitabilityToken(level);\n}\n</script>\n\n<style scoped>\n.sheet {\n  position: absolute;\n  inset: 0;\n  z-index: 1300;\n  display: flex;\n  align-items: flex-end;\n  background: rgba(1, 5, 4, 0.5);\n}\n\n.sheet__panel {\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  max-height: 88%;\n  border-top: 2px solid var(--brand);\n  background: var(--bg-surface);\n}\n\n.sheet__head {\n  display: flex;\n  flex: none;\n  align-items: center;\n  gap: 12px;\n  padding: 10px 16px;\n  border-bottom: 1px solid var(--border-1);\n}\n\n.sheet__title {\n  flex: 1;\n  font: 400 20px/28px var(--font-sans);\n  letter-spacing: normal;\n}\n\n.sheet__reset {\n  border: 0;\n  padding: 0;\n  background: transparent;\n  font-size: var(--text-ui);\n  color: var(--fg-3);\n  text-decoration: underline;\n  cursor: pointer;\n}\n\n.sheet__close {\n  display: flex;\n  flex: none;\n  align-items: center;\n  justify-content: center;\n  width: 44px;\n  height: 44px;\n  margin-right: -10px;\n  border: 0;\n  background: transparent;\n  color: var(--fg-3);\n  cursor: pointer;\n}\n\n.sheet__body {\n  display: flex;\n  flex: 1;\n  flex-direction: column;\n  gap: 14px;\n  min-height: 0;\n  padding: 0 16px 16px;\n  overflow: auto;\n}\n\n.sheet__search {\n  padding-top: 14px;\n}\n\n.sheet__search :deep(.field__input) {\n  padding: 0 40px;\n  background: var(--bg-surface);\n  font: 400 14px/20px var(--font-sans);\n}\n\n.sheet__group {\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n  padding-top: 14px;\n  border-top: 1px solid var(--border-1);\n}\n\n.sheet__foot {\n  flex: none;\n  padding: 12px;\n  border-top: 1px solid var(--border-1);\n}\n\n.sheet__apply {\n  justify-content: space-between;\n  width: 100%;\n  min-height: 44px;\n  padding: 0 16px;\n  background: var(--brand);\n  color: var(--brand-fg);\n  font: 400 14px/18px var(--font-sans);\n}\n\n@media (hover: hover) {\n  .sheet__apply:hover {\n    background: var(--brand-hover);\n  }\n}\n</style>\n","import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, createBlock as _createBlock, createTextVNode as _createTextVNode, withCtx as _withCtx, withModifiers as _withModifiers } from \"vue\"\n\nconst _hoisted_1 = { class: \"sheet__head\" }\nconst _hoisted_2 = { class: \"sheet__body\" }\nconst _hoisted_3 = { class: \"sheet__search\" }\nconst _hoisted_4 = { class: \"sheet__group\" }\nconst _hoisted_5 = { class: \"sheet__group\" }\nconst _hoisted_6 = { class: \"sheet__group\" }\nconst _hoisted_7 = { class: \"sheet__group\" }\nconst _hoisted_8 = { class: \"sheet__foot\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return ($props.open)\n    ? (_openBlock(), _createElementBlock(\"div\", {\n        key: 0,\n        class: \"sheet\",\n        role: \"presentation\",\n        onClick: _cache[7] || (_cache[7] = $event => ($setup.emit('close')))\n      }, [\n        _createElementVNode(\"div\", {\n          class: \"sheet__panel\",\n          role: \"dialog\",\n          \"aria-modal\": \"true\",\n          \"aria-label\": \"Filters\",\n          onClick: _cache[6] || (_cache[6] = _withModifiers(() => {}, [\"stop\"]))\n        }, [\n          _createElementVNode(\"div\", _hoisted_1, [\n            _cache[8] || (_cache[8] = _createElementVNode(\"h2\", { class: \"page-title sheet__title\" }, \"Filters\", -1 /* CACHED */)),\n            ($props.activeCount > 0)\n              ? (_openBlock(), _createElementBlock(\"button\", {\n                  key: 0,\n                  class: \"sheet__reset\",\n                  type: \"button\",\n                  onClick: _cache[0] || (_cache[0] = $event => ($setup.emit('reset')))\n                }, \" Wissen (\" + _toDisplayString($props.activeCount) + \") \", 1 /* TEXT */))\n              : _createCommentVNode(\"v-if\", true),\n            _createElementVNode(\"button\", {\n              class: \"sheet__close\",\n              type: \"button\",\n              \"aria-label\": \"Sluiten\",\n              onClick: _cache[1] || (_cache[1] = $event => ($setup.emit('close')))\n            }, [\n              _createVNode($setup[\"Icon\"], {\n                name: \"close\",\n                size: 20\n              })\n            ])\n          ]),\n          _createElementVNode(\"div\", _hoisted_2, [\n            _createElementVNode(\"div\", _hoisted_3, [\n              _createVNode($setup[\"Input\"], {\n                \"model-value\": $props.filters.query,\n                icon: \"search\",\n                placeholder: \"Zoek op naam, adres of plaats\",\n                \"onUpdate:modelValue\": _cache[2] || (_cache[2] = (value) => $setup.emit('patch', { query: value }))\n              }, null, 8 /* PROPS */, [\"model-value\"])\n            ]),\n            _createElementVNode(\"div\", _hoisted_4, [\n              _cache[9] || (_cache[9] = _createElementVNode(\"span\", { class: \"eyebrow\" }, \"Geschiktheid\", -1 /* CACHED */)),\n              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.ALL_SUITABILITIES, (level) => {\n                return (_openBlock(), _createBlock($setup[\"FilterChoice\"], {\n                  key: level,\n                  large: \"\",\n                  label: $setup.suitabilityLabel(level),\n                  swatch: $setup.swatchFor(level),\n                  count: $props.suitabilityCounts[level],\n                  checked: $props.filters.suitabilities.includes(level),\n                  onToggle: $event => ($setup.emit('patch', { suitabilities: $setup.toggleInList($props.filters.suitabilities, level, $setup.ALL_SUITABILITIES) }))\n                }, null, 8 /* PROPS */, [\"label\", \"swatch\", \"count\", \"checked\", \"onToggle\"]))\n              }), 128 /* KEYED_FRAGMENT */))\n            ]),\n            _createElementVNode(\"div\", _hoisted_5, [\n              _cache[10] || (_cache[10] = _createElementVNode(\"span\", { class: \"eyebrow\" }, \"Fase\", -1 /* CACHED */)),\n              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.EXPLORER_PHASES, (phase) => {\n                return (_openBlock(), _createBlock($setup[\"FilterChoice\"], {\n                  key: phase,\n                  large: \"\",\n                  label: phase,\n                  count: $props.phaseCounts[phase],\n                  checked: $props.filters.phases.includes(phase),\n                  onToggle: $event => ($setup.emit('patch', { phases: $setup.toggleInList($props.filters.phases, phase, $setup.EXPLORER_PHASES) }))\n                }, null, 8 /* PROPS */, [\"label\", \"count\", \"checked\", \"onToggle\"]))\n              }), 128 /* KEYED_FRAGMENT */))\n            ]),\n            _createElementVNode(\"div\", _hoisted_6, [\n              _cache[11] || (_cache[11] = _createElementVNode(\"span\", { class: \"eyebrow\" }, \"Regio en soort\", -1 /* CACHED */)),\n              _createVNode($setup[\"Select\"], {\n                \"model-value\": $props.filters.province,\n                label: \"Regio\",\n                options: $setup.provinceOptions,\n                \"onUpdate:modelValue\": _cache[3] || (_cache[3] = (value) => $setup.emit('patch', { province: value }))\n              }, null, 8 /* PROPS */, [\"model-value\", \"options\"]),\n              _createVNode($setup[\"Select\"], {\n                \"model-value\": $props.filters.locationType,\n                label: \"Soort\",\n                options: $setup.typeOptions,\n                \"onUpdate:modelValue\": _cache[4] || (_cache[4] = (value) => $setup.emit('patch', { locationType: value }))\n              }, null, 8 /* PROPS */, [\"model-value\", \"options\"])\n            ]),\n            _createElementVNode(\"div\", _hoisted_7, [\n              _cache[12] || (_cache[12] = _createElementVNode(\"span\", { class: \"eyebrow\" }, \"Veldfeedback\", -1 /* CACHED */)),\n              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.FEEDBACK_OPTIONS, ([key, label]) => {\n                return (_openBlock(), _createBlock($setup[\"FilterChoice\"], {\n                  key: key,\n                  large: \"\",\n                  label: label,\n                  checked: $props.filters.feedback === key,\n                  onToggle: $event => ($setup.emit('patch', { feedback: key }))\n                }, null, 8 /* PROPS */, [\"label\", \"checked\", \"onToggle\"]))\n              }), 128 /* KEYED_FRAGMENT */))\n            ])\n          ]),\n          _createElementVNode(\"div\", _hoisted_8, [\n            _createVNode($setup[\"Button\"], {\n              variant: \"primary\",\n              class: \"sheet__apply\",\n              onClick: _cache[5] || (_cache[5] = $event => ($setup.emit('close')))\n            }, {\n              default: _withCtx(() => [\n                _createTextVNode(\" Toon \" + _toDisplayString($props.resultCount.toLocaleString(\"nl-NL\")) + \" locaties \", 1 /* TEXT */)\n              ]),\n              _: 1 /* STABLE */\n            })\n          ])\n        ])\n      ]))\n    : _createCommentVNode(\"v-if\", true)\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterSheet.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterSheet.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterSheet.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/explorer/FilterSheet.vue\";script.__scopeId = \"data-v-964688a4\";export default script;","import { createElementVNode as _createElementVNode, createVNode as _createVNode, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock, renderList as _renderList, Fragment as _Fragment, createBlock as _createBlock, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"explorer-heading\" }\nconst _hoisted_2 = { class: \"explorer-head\" }\nconst _hoisted_3 = { class: \"explorer-heading__filters\" }\nconst _hoisted_4 = {\n  key: 0,\n  class: \"toolbar toolbar--phone\"\n}\nconst _hoisted_5 = { class: \"toolbar\" }\nconst _hoisted_6 = {\n  key: 0,\n  class: \"error\",\n  role: \"alert\"\n}\nconst _hoisted_7 = {\n  key: 0,\n  class: \"list\"\n}\nconst _hoisted_8 = { class: \"list__head\" }\nconst _hoisted_9 = { class: \"list__count tnum\" }\nconst _hoisted_10 = { class: \"list__scroll\" }\nconst _hoisted_11 = {\n  key: 1,\n  class: \"list__empty\"\n}\nconst _hoisted_12 = {\n  key: 2,\n  class: \"detail\"\n}\nconst _hoisted_13 = { class: \"detail__head\" }\nconst _hoisted_14 = { class: \"detail__titles\" }\nconst _hoisted_15 = { class: \"detail__name\" }\nconst _hoisted_16 = { class: \"detail__addr\" }\nconst _hoisted_17 = { class: \"detail__body\" }\nconst _hoisted_18 = { class: \"detail__scorerow\" }\nconst _hoisted_19 = { class: \"detail__score tnum\" }\nconst _hoisted_20 = { class: \"detail__level\" }\nconst _hoisted_21 = { class: \"detail__facts\" }\nconst _hoisted_22 = { class: \"detail__fact\" }\nconst _hoisted_23 = { class: \"detail__dd tnum\" }\nconst _hoisted_24 = { class: \"detail__fact\" }\nconst _hoisted_25 = { class: \"detail__dd tnum\" }\nconst _hoisted_26 = { class: \"detail__fact\" }\nconst _hoisted_27 = { class: \"detail__dd tnum\" }\nconst _hoisted_28 = { class: \"detail__fact\" }\nconst _hoisted_29 = { class: \"detail__dd tnum\" }\nconst _hoisted_30 = { class: \"detail__fact\" }\nconst _hoisted_31 = { class: \"detail__dd tnum\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(_Fragment, null, [\n    _createElementVNode(\"div\", _hoisted_1, [\n      _createElementVNode(\"header\", _hoisted_2, [\n        _cache[12] || (_cache[12] = _createElementVNode(\"div\", { class: \"explorer-head__titles\" }, [\n          _createElementVNode(\"span\", { class: \"explorer-head__eyebrow\" }, \"Verkenner\"),\n          _createElementVNode(\"h1\", { class: \"explorer-head__title\" }, \"Beoordeelde locaties in Nederland\")\n        ], -1 /* CACHED */)),\n        _createVNode($setup[\"AddLocationDialog\"], { compact: $setup.phone }, null, 8 /* PROPS */, [\"compact\"])\n      ]),\n      _createElementVNode(\"div\", _hoisted_3, [\n        _createCommentVNode(\" On a phone the bar does not fit: the search field stays, the rest goes\\n           behind one Filters button with the count of active filters on it. \"),\n        ($setup.phone)\n          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n              _createVNode($setup[\"Input\"], {\n                \"model-value\": $setup.filters.query,\n                class: \"toolbar__search\",\n                icon: \"search\",\n                placeholder: \"Zoek locatie\",\n                \"onUpdate:modelValue\": _cache[0] || (_cache[0] = (value) => $setup.patch({ query: value }))\n              }, null, 8 /* PROPS */, [\"model-value\"]),\n              _createVNode($setup[\"Button\"], {\n                class: \"toolbar__filters\",\n                onClick: _cache[1] || (_cache[1] = $event => ($setup.filterSheetOpen = true))\n              }, {\n                default: _withCtx(() => [\n                  _createTextVNode(_toDisplayString($setup.active ? `Filters · ${$setup.active}` : \"Filters\") + \" \", 1 /* TEXT */),\n                  _createVNode($setup[\"Icon\"], { name: \"filter\" })\n                ]),\n                _: 1 /* STABLE */\n              })\n            ]))\n          : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n              _createCommentVNode(\" Tablet and desktop: everything on one line. Under 1080px that line can\\n           be narrower than the buttons, so it scrolls sideways in its own box;\\n           the page itself never scrolls sideways. \"),\n              _createElementVNode(\"div\", _hoisted_5, [\n                _createVNode($setup[\"Input\"], {\n                  \"model-value\": $setup.filters.query,\n                  class: \"toolbar__search toolbar__search--compact\",\n                  icon: \"search\",\n                  placeholder: \"Zoek op naam, adres of plaats\",\n                  \"onUpdate:modelValue\": _cache[2] || (_cache[2] = (value) => $setup.patch({ query: value }))\n                }, null, 8 /* PROPS */, [\"model-value\"]),\n                _createVNode($setup[\"FilterDropdown\"], {\n                  label: \"Regio\",\n                  value: $setup.filters.province || 'alle',\n                  active: Boolean($setup.filters.province),\n                  width: 230\n                }, {\n                  default: _withCtx(() => [\n                    _createVNode($setup[\"FilterChoice\"], {\n                      label: \"Alle regio's\",\n                      checked: $setup.filters.province === '',\n                      onToggle: _cache[3] || (_cache[3] = $event => ($setup.patch({ province: '' })))\n                    }, null, 8 /* PROPS */, [\"checked\"]),\n                    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.provinces, (province) => {\n                      return (_openBlock(), _createBlock($setup[\"FilterChoice\"], {\n                        key: province,\n                        label: province,\n                        checked: $setup.filters.province === province,\n                        onToggle: $event => ($setup.patch({ province }))\n                      }, null, 8 /* PROPS */, [\"label\", \"checked\", \"onToggle\"]))\n                    }), 128 /* KEYED_FRAGMENT */))\n                  ]),\n                  _: 1 /* STABLE */\n                }, 8 /* PROPS */, [\"value\", \"active\"]),\n                _createVNode($setup[\"FilterDropdown\"], {\n                  label: \"Soort\",\n                  value: $setup.filters.locationType ? $setup.formatLocationType($setup.filters.locationType) : 'alle',\n                  active: Boolean($setup.filters.locationType),\n                  width: 220\n                }, {\n                  default: _withCtx(() => [\n                    _createVNode($setup[\"FilterChoice\"], {\n                      label: \"Alle soorten\",\n                      checked: $setup.filters.locationType === '',\n                      onToggle: _cache[4] || (_cache[4] = $event => ($setup.patch({ locationType: '' })))\n                    }, null, 8 /* PROPS */, [\"checked\"]),\n                    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.LOCATION_TYPE_OPTIONS, (option) => {\n                      return (_openBlock(), _createBlock($setup[\"FilterChoice\"], {\n                        key: option.value,\n                        label: option.label,\n                        checked: $setup.filters.locationType === option.value,\n                        onToggle: $event => ($setup.patch({ locationType: option.value }))\n                      }, null, 8 /* PROPS */, [\"label\", \"checked\", \"onToggle\"]))\n                    }), 128 /* KEYED_FRAGMENT */))\n                  ]),\n                  _: 1 /* STABLE */\n                }, 8 /* PROPS */, [\"value\", \"active\"]),\n                _createVNode($setup[\"FilterDropdown\"], {\n                  label: \"Geschiktheid\",\n                  value: $setup.suitabilityLabelFor($setup.filters.suitabilities),\n                  active: $setup.filters.suitabilities.length < $setup.ALL_SUITABILITIES.length,\n                  width: 260\n                }, {\n                  default: _withCtx(() => [\n                    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.ALL_SUITABILITIES, (level) => {\n                      return (_openBlock(), _createBlock($setup[\"FilterChoice\"], {\n                        key: level,\n                        label: $setup.suitabilityLabel(level),\n                        swatch: $setup.swatchFor(level),\n                        count: $setup.suitabilityCounts[level],\n                        checked: $setup.filters.suitabilities.includes(level),\n                        onToggle: $event => ($setup.patch({ suitabilities: $setup.toggleInList($setup.filters.suitabilities, level, $setup.ALL_SUITABILITIES) }))\n                      }, null, 8 /* PROPS */, [\"label\", \"swatch\", \"count\", \"checked\", \"onToggle\"]))\n                    }), 128 /* KEYED_FRAGMENT */)),\n                    _createElementVNode(\"button\", {\n                      class: \"toolbar__toggleall\",\n                      type: \"button\",\n                      onClick: $setup.toggleAllSuitabilities\n                    }, _toDisplayString($setup.filters.suitabilities.length === $setup.ALL_SUITABILITIES.length ? \"Alles uitzetten\" : \"Alles aanzetten\"), 1 /* TEXT */)\n                  ]),\n                  _: 1 /* STABLE */\n                }, 8 /* PROPS */, [\"value\", \"active\"]),\n                _createVNode($setup[\"FilterDropdown\"], {\n                  label: \"Fase\",\n                  value: $setup.phaseLabelFor($setup.filters.phases),\n                  active: $setup.filters.phases.length < $setup.EXPLORER_PHASES.length,\n                  width: 250\n                }, {\n                  default: _withCtx(() => [\n                    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.EXPLORER_PHASES, (phase) => {\n                      return (_openBlock(), _createBlock($setup[\"FilterChoice\"], {\n                        key: phase,\n                        label: phase,\n                        count: $setup.phaseCounts[phase],\n                        checked: $setup.filters.phases.includes(phase),\n                        onToggle: $event => ($setup.patch({ phases: $setup.toggleInList($setup.filters.phases, phase, $setup.EXPLORER_PHASES) }))\n                      }, null, 8 /* PROPS */, [\"label\", \"count\", \"checked\", \"onToggle\"]))\n                    }), 128 /* KEYED_FRAGMENT */))\n                  ]),\n                  _: 1 /* STABLE */\n                }, 8 /* PROPS */, [\"value\", \"active\"]),\n                _createVNode($setup[\"FilterDropdown\"], {\n                  label: \"Feedback\",\n                  value: $setup.FEEDBACK_LABELS[$setup.filters.feedback],\n                  active: $setup.filters.feedback !== 'all',\n                  width: 220\n                }, {\n                  default: _withCtx(() => [\n                    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.FEEDBACK_OPTIONS, ([key, label]) => {\n                      return (_openBlock(), _createBlock($setup[\"FilterChoice\"], {\n                        key: key,\n                        label: label,\n                        checked: $setup.filters.feedback === key,\n                        onToggle: $event => ($setup.patch({ feedback: key }))\n                      }, null, 8 /* PROPS */, [\"label\", \"checked\", \"onToggle\"]))\n                    }), 128 /* KEYED_FRAGMENT */))\n                  ]),\n                  _: 1 /* STABLE */\n                }, 8 /* PROPS */, [\"value\", \"active\"]),\n                ($setup.active > 0)\n                  ? (_openBlock(), _createElementBlock(\"button\", {\n                      key: 0,\n                      class: \"toolbar__clear\",\n                      type: \"button\",\n                      onClick: _cache[5] || (_cache[5] = $event => ($setup.patch($setup.DEFAULT_EXPLORER_FILTERS)))\n                    }, \" Wissen (\" + _toDisplayString($setup.active) + \") \", 1 /* TEXT */))\n                  : _createCommentVNode(\"v-if\", true)\n              ])\n            ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */))\n      ])\n    ]),\n    _createVNode($setup[\"PageBody\"], {\n      fill: \"\",\n      class: \"explorer-body\"\n    }, {\n      default: _withCtx(() => [\n        ($setup.error)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_6, _toDisplayString($setup.error), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true),\n        _createCommentVNode(\" The map container. Everything that floats on a phone (list, detail,\\n         pill, filter sheet) is `absolute` INSIDE this box, never fixed, so it\\n         cannot cover the status bar. \"),\n        _createElementVNode(\"div\", {\n          class: _normalizeClass([\"explorer\", { 'explorer--phone': $setup.phone, 'explorer--compact': $setup.compact }])\n        }, [\n          _createCommentVNode(\" List: a column on the left on desktop, a sheet rising from the bottom\\n           on a phone. Only locations; the filters live in the bar or the sheet. \"),\n          (!$setup.phone || $setup.listOpen)\n            ? (_openBlock(), _createElementBlock(\"aside\", _hoisted_7, [\n                _createElementVNode(\"div\", _hoisted_8, [\n                  _createElementVNode(\"span\", _hoisted_9, _toDisplayString($setup.countLabel($setup.rows.length, $setup.all === null ? null : $setup.all.length)), 1 /* TEXT */),\n                  ($setup.phone)\n                    ? (_openBlock(), _createElementBlock(\"button\", {\n                        key: 0,\n                        class: \"list__close\",\n                        type: \"button\",\n                        \"aria-label\": \"Lijst sluiten\",\n                        onClick: _cache[6] || (_cache[6] = $event => ($setup.listOpen = false))\n                      }, [\n                        _createVNode($setup[\"Icon\"], {\n                          name: \"close\",\n                          size: 20\n                        })\n                      ]))\n                    : _createCommentVNode(\"v-if\", true)\n                ]),\n                _createElementVNode(\"div\", _hoisted_10, [\n                  (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.rows.slice(0, $setup.limit), (row) => {\n                    return (_openBlock(), _createBlock($setup[\"ExplorerResultRow\"], {\n                      key: row.id,\n                      row: row,\n                      selected: row.id === $setup.selectedId,\n                      large: $setup.phone,\n                      onSelect: $setup.onSelect\n                    }, null, 8 /* PROPS */, [\"row\", \"selected\", \"large\"]))\n                  }), 128 /* KEYED_FRAGMENT */)),\n                  ($setup.rows.length > $setup.limit)\n                    ? (_openBlock(), _createElementBlock(\"button\", {\n                        key: 0,\n                        class: \"list__more\",\n                        type: \"button\",\n                        onClick: _cache[7] || (_cache[7] = $event => ($setup.limit += $setup.LIST_PAGE))\n                      }, \" Meer laden, nog \" + _toDisplayString(($setup.rows.length - $setup.limit).toLocaleString(\"nl-NL\")), 1 /* TEXT */))\n                    : _createCommentVNode(\"v-if\", true),\n                  ($setup.all !== null && $setup.rows.length === 0)\n                    ? (_openBlock(), _createElementBlock(\"p\", _hoisted_11, \"Geen locaties binnen deze filters.\"))\n                    : _createCommentVNode(\"v-if\", true)\n                ])\n              ]))\n            : _createCommentVNode(\"v-if\", true),\n          _createCommentVNode(\" z-index 0 traps Leaflet's own z-indexes (panes 400-700, controls\\n           1000) in this wrapper. Without it they leak into the root stacking\\n           context and paint over every popover and dialog. Load-bearing. \"),\n          _createElementVNode(\"div\", {\n            class: _normalizeClass([\"mapwrap\", { 'snl-map--pill': $setup.phone }])\n          }, [\n            _createVNode($setup[\"ExplorerMap\"], {\n              locations: $setup.rows,\n              \"selected-id\": $setup.selectedId,\n              onSelect: $setup.onSelect,\n              onOpen: $setup.onOpen\n            }, null, 8 /* PROPS */, [\"locations\", \"selected-id\"]),\n            _createVNode($setup[\"ExplorerLegend\"])\n          ], 2 /* CLASS */),\n          _createCommentVNode(\" The black pill bottom-left is the only way into the list on a phone.\\n           It disappears as soon as the list or a detail is open. \"),\n          ($setup.phone && !$setup.listOpen && !$setup.selected)\n            ? (_openBlock(), _createElementBlock(\"button\", {\n                key: 1,\n                class: \"pill\",\n                type: \"button\",\n                onClick: _cache[8] || (_cache[8] = $event => ($setup.listOpen = true))\n              }, [\n                _createVNode($setup[\"Icon\"], { name: \"list\" }),\n                _createTextVNode(\" \" + _toDisplayString($setup.rows.length.toLocaleString(\"nl-NL\")) + \" locaties \", 1 /* TEXT */)\n              ]))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.selected)\n            ? (_openBlock(), _createElementBlock(\"aside\", _hoisted_12, [\n                _createElementVNode(\"div\", _hoisted_13, [\n                  _createElementVNode(\"div\", _hoisted_14, [\n                    _createElementVNode(\"div\", _hoisted_15, _toDisplayString($setup.selected.companyName), 1 /* TEXT */),\n                    _createElementVNode(\"div\", _hoisted_16, _toDisplayString($setup.selected.address) + _toDisplayString($setup.selected.city ? `, ${$setup.selected.city}` : \"\"), 1 /* TEXT */)\n                  ]),\n                  _createElementVNode(\"button\", {\n                    class: \"detail__close\",\n                    type: \"button\",\n                    \"aria-label\": \"Sluiten\",\n                    onClick: _cache[9] || (_cache[9] = $event => ($setup.selectedId = null))\n                  }, [\n                    _createVNode($setup[\"Icon\"], {\n                      name: \"close\",\n                      size: $setup.phone ? 20 : 16\n                    }, null, 8 /* PROPS */, [\"size\"])\n                  ])\n                ]),\n                _createElementVNode(\"div\", _hoisted_17, [\n                  _createElementVNode(\"div\", _hoisted_18, [\n                    _createElementVNode(\"span\", _hoisted_19, _toDisplayString($setup.selected.score ?? \"-\"), 1 /* TEXT */),\n                    _cache[13] || (_cache[13] = _createElementVNode(\"span\", { class: \"detail__scorelabel\" }, \"AI-score\", -1 /* CACHED */))\n                  ]),\n                  _createElementVNode(\"span\", _hoisted_20, [\n                    _createElementVNode(\"span\", {\n                      class: _normalizeClass([\"detail__dot\", `detail__dot--${$setup.scoreToSuitability($setup.selected.score)}`]),\n                      \"aria-hidden\": \"true\"\n                    }, null, 2 /* CLASS */),\n                    _createTextVNode(\" \" + _toDisplayString($setup.suitabilityLabel($setup.scoreToSuitability($setup.selected.score))), 1 /* TEXT */)\n                  ]),\n                  _createElementVNode(\"dl\", _hoisted_21, [\n                    _createElementVNode(\"div\", _hoisted_22, [\n                      _cache[14] || (_cache[14] = _createElementVNode(\"dt\", { class: \"detail__dt\" }, \"Soort\", -1 /* CACHED */)),\n                      _createElementVNode(\"dd\", _hoisted_23, _toDisplayString($setup.formatLocationType($setup.selected.locationType)), 1 /* TEXT */)\n                    ]),\n                    _createElementVNode(\"div\", _hoisted_24, [\n                      _cache[15] || (_cache[15] = _createElementVNode(\"dt\", { class: \"detail__dt\" }, \"Regio\", -1 /* CACHED */)),\n                      _createElementVNode(\"dd\", _hoisted_25, _toDisplayString($setup.selected.province ?? \"onbekend\"), 1 /* TEXT */)\n                    ]),\n                    _createElementVNode(\"div\", _hoisted_26, [\n                      _cache[16] || (_cache[16] = _createElementVNode(\"dt\", { class: \"detail__dt\" }, \"Fase\", -1 /* CACHED */)),\n                      _createElementVNode(\"dd\", _hoisted_27, _toDisplayString($setup.phaseOf($setup.selected)), 1 /* TEXT */)\n                    ]),\n                    _createElementVNode(\"div\", _hoisted_28, [\n                      _cache[17] || (_cache[17] = _createElementVNode(\"dt\", { class: \"detail__dt\" }, \"Coördinaten\", -1 /* CACHED */)),\n                      _createElementVNode(\"dd\", _hoisted_29, _toDisplayString($setup.formatCoordinates($setup.selected.latitude, $setup.selected.longitude)), 1 /* TEXT */)\n                    ]),\n                    _createElementVNode(\"div\", _hoisted_30, [\n                      _cache[18] || (_cache[18] = _createElementVNode(\"dt\", { class: \"detail__dt\" }, \"Veldfeedback\", -1 /* CACHED */)),\n                      _createElementVNode(\"dd\", _hoisted_31, _toDisplayString($setup.selected.hasFeedback ? \"aanwezig\" : \"geen\"), 1 /* TEXT */)\n                    ])\n                  ]),\n                  _createVNode($setup[\"RouterLink\"], {\n                    to: { name: 'location-detail', params: { id: $setup.selected.id } },\n                    class: \"detail__open\"\n                  }, {\n                    default: _withCtx(() => [\n                      _cache[19] || (_cache[19] = _createTextVNode(\" Locatie openen \", -1 /* CACHED */)),\n                      _createVNode($setup[\"Icon\"], { name: \"arrow--right\" })\n                    ]),\n                    _: 1 /* STABLE */,\n                    __: [19]\n                  }, 8 /* PROPS */, [\"to\"])\n                ])\n              ]))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.phone)\n            ? (_openBlock(), _createBlock($setup[\"FilterSheet\"], {\n                key: 3,\n                open: $setup.filterSheetOpen,\n                filters: $setup.filters,\n                \"active-count\": $setup.active,\n                \"result-count\": $setup.rows.length,\n                provinces: $setup.provinces,\n                \"suitability-counts\": $setup.suitabilityCounts,\n                \"phase-counts\": $setup.phaseCounts,\n                onClose: _cache[10] || (_cache[10] = $event => ($setup.filterSheetOpen = false)),\n                onReset: _cache[11] || (_cache[11] = $event => ($setup.patch($setup.DEFAULT_EXPLORER_FILTERS))),\n                onPatch: $setup.patch\n              }, null, 8 /* PROPS */, [\"open\", \"filters\", \"active-count\", \"result-count\", \"provinces\", \"suitability-counts\", \"phase-counts\"]))\n            : _createCommentVNode(\"v-if\", true)\n        ], 2 /* CLASS */)\n      ]),\n      _: 1 /* STABLE */\n    })\n  ], 64 /* STABLE_FRAGMENT */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/ExplorerView.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/ExplorerView.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/ExplorerView.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/ExplorerView.vue\";script.__scopeId = \"data-v-1d3dfe0d\";export default script;","<template>\n  <!-- The count sits next to the title, not as a line under it, so the header\n       reads \"Analyses  83 gevonden\", like the locations list. -->\n  <PageHeader title=\"Analyses\" :count=\"countLabel\" class=\"analyses-head\">\n    <template #toolbar>\n      <!-- Filter bar. Search applies on Enter or the button, not per keystroke:\n           that is how the Next admin behaves and the id-or-name search is cheap\n           enough to run on demand. -->\n      <div class=\"filters\">\n        <form class=\"filters__search\" @submit.prevent=\"applySearch\">\n          <Input v-model=\"searchInput\" class=\"filters__input\" label=\"Zoeken\" icon=\"search\"\n                 placeholder=\"Zoek op ID, bedrijfsnaam of gebruiker...\" />\n          <Button type=\"submit\" class=\"filters__go\">Zoeken</Button>\n        </form>\n        <Select :model-value=\"province\" class=\"filters__province\" label=\"Provincie\" :options=\"provinceOptions\"\n                @update:model-value=\"setProvince\" />\n      </div>\n    </template>\n  </PageHeader>\n\n  <PageBody fill class=\"analyses-body\">\n    <!-- Selection toolbar, only while something is ticked: without an action\n         the checkbox column would be a dead control. -->\n    <div v-if=\"selected.size > 0\" class=\"selbar\">\n      <span class=\"tnum\">\n        {{ fmt(selected.size) }} geselecteerd\n        <span v-if=\"locationCount !== selected.size\" class=\"selbar__sub\">\n          ({{ fmt(locationCount) }} {{ locationCount === 1 ? \"locatie\" : \"locaties\" }})\n        </span>\n      </span>\n      <Button @click=\"copySelectedLocationIds\">\n        <Icon :name=\"copied ? 'checkmark' : 'copy'\" />\n        {{ copied ? \"Gekopieerd\" : \"Kopieer locatie ID's\" }}\n      </Button>\n      <Button variant=\"ghost\" @click=\"clearSelection\">\n        <Icon name=\"close\" />\n        Deselecteren\n      </Button>\n    </div>\n\n    <p v-if=\"error\" class=\"error\" role=\"alert\">{{ error }}</p>\n\n    <div class=\"listbox\">\n      <div class=\"listbox__scroll\">\n        <table class=\"tbl\">\n          <thead>\n            <tr>\n              <th class=\"tbl__check\">\n                <input\n                  class=\"snl-checkbox\"\n                  type=\"checkbox\"\n                  :checked=\"allOnPageSelected\"\n                  :indeterminate=\"someOnPageSelected && !allOnPageSelected\"\n                  :disabled=\"analyses.length === 0\"\n                  aria-label=\"Selecteer alle zichtbare analyses\"\n                  @change=\"toggleAllOnPage\"\n                >\n              </th>\n              <th class=\"tbl__id\">\n                <button class=\"tbl__sort\" type=\"button\" @click=\"applySort('id')\">\n                  ID\n                  <SortCaret :active=\"sort.field === 'id'\" :direction=\"sort.direction\" />\n                </button>\n              </th>\n              <th class=\"tbl__name\">\n                <button class=\"tbl__sort\" type=\"button\" @click=\"applySort('companyName')\">\n                  Locatie\n                  <SortCaret :active=\"sort.field === 'companyName'\" :direction=\"sort.direction\" />\n                </button>\n              </th>\n              <th>\n                <button class=\"tbl__sort\" type=\"button\" @click=\"applySort('status')\">\n                  Status\n                  <SortCaret :active=\"sort.field === 'status'\" :direction=\"sort.direction\" />\n                </button>\n              </th>\n              <th class=\"tbl__score\">\n                <button class=\"tbl__sort\" type=\"button\" @click=\"applySort('avgScore')\">\n                  Score\n                  <SortCaret :active=\"sort.field === 'avgScore'\" :direction=\"sort.direction\" />\n                </button>\n              </th>\n              <th class=\"tbl__center\">\n                <button class=\"tbl__sort\" type=\"button\"\n                        title=\"Vinkje wanneer minstens één model van deze analyse menselijke review nodig heeft\"\n                        @click=\"applySort('requiresHumanReview')\">\n                  Review\n                  <SortCaret :active=\"sort.field === 'requiresHumanReview'\" :direction=\"sort.direction\" />\n                </button>\n              </th>\n              <th class=\"tbl__center\"\n                  title=\"Vinkje = veldfeedback verschoof de score; cirkel = feedback meegenomen maar score ongewijzigd; streepje = geen feedback gebruikt\">\n                Feedback\n              </th>\n              <th>\n                <button class=\"tbl__sort\" type=\"button\" @click=\"applySort('userName')\">\n                  Gebruiker\n                  <SortCaret :active=\"sort.field === 'userName'\" :direction=\"sort.direction\" />\n                </button>\n              </th>\n              <th class=\"tbl__right\">\n                <button class=\"tbl__sort tbl__sort--right\" type=\"button\" @click=\"applySort('totalCostCents')\">\n                  Kosten\n                  <SortCaret :active=\"sort.field === 'totalCostCents'\" :direction=\"sort.direction\" />\n                </button>\n              </th>\n              <th>\n                <button class=\"tbl__sort\" type=\"button\" @click=\"applySort('createdAt')\">\n                  Datum\n                  <SortCaret :active=\"sort.field === 'createdAt'\" :direction=\"sort.direction\" />\n                </button>\n              </th>\n              <th class=\"tbl__action\"></th>\n            </tr>\n          </thead>\n          <tbody>\n            <tr v-if=\"loading\">\n              <td class=\"tbl__msg\" colspan=\"11\">Laden...</td>\n            </tr>\n            <tr v-else-if=\"analyses.length === 0\">\n              <td colspan=\"11\" class=\"tbl__empty\">\n                <EmptyState\n                  icon=\"search\"\n                  title=\"Geen analyses gevonden\"\n                  description=\"Pas je filters aan of start een analyse vanaf een locatie.\"\n                />\n              </td>\n            </tr>\n            <tr v-for=\"a in analyses\" v-else :key=\"a.id\" class=\"tbl__row\"\n                :class=\"{ 'tbl__row--sel': selected.has(a.id) }\" @click=\"openAnalysis(a)\">\n              <td class=\"tbl__check\" @click.stop>\n                <input\n                  class=\"snl-checkbox\"\n                  type=\"checkbox\"\n                  :checked=\"selected.has(a.id)\"\n                  :aria-label=\"`Selecteer analyse #${a.id}`\"\n                  @change=\"toggleRow(a)\"\n                >\n              </td>\n              <td class=\"tbl__id tnum\"><RouterLink :to=\"analysisDetailRoute({ locationId: a.locationId, analysisId: a.id })\" @click.stop>#{{ a.id }}</RouterLink></td>\n              <td class=\"tbl__name tbl__trunc\" :title=\"a.companyName\">{{ a.companyName }}</td>\n              <td>\n                <span class=\"tbl__badges\">\n                  <Badge :tone=\"statusOf(a).tone\">{{ statusOf(a).label }}</Badge>\n                  <Badge v-if=\"a.isDryRun\">Dry run</Badge>\n                </span>\n              </td>\n              <td class=\"tbl__score\">\n                <span v-if=\"a.status === 'failed' && a.errorMessage\" class=\"tbl__error\" :title=\"a.errorMessage\">\n                  {{ a.errorMessage }}\n                </span>\n                <ScoreBar v-else :score=\"a.avgScore\" />\n              </td>\n              <td class=\"tbl__center\">\n                <span v-if=\"a.requiresHumanReview\" class=\"tbl__review\"\n                      title=\"Minstens één model vlagde menselijke review\">&#10003;</span>\n                <span v-else class=\"tbl__dash\">-</span>\n              </td>\n              <td class=\"tbl__center\">\n                <!-- Title on a span, not on the Icon: an svg `title` attribute is\n                     not a tooltip. -->\n                <span v-if=\"a.feedbackImpact === 'shift'\" class=\"tbl__impact tbl__impact--shift\"\n                      :title=\"feedbackImpactTitle('shift')\"><Icon name=\"checkmark\" /></span>\n                <span v-else-if=\"a.feedbackImpact === 'considered'\" class=\"tbl__impact tbl__impact--considered\"\n                      :title=\"feedbackImpactTitle('considered')\"><Icon name=\"circle--outline\" :size=\"14\" /></span>\n                <span v-else class=\"tbl__dash\" :title=\"feedbackImpactTitle('none')\">-</span>\n              </td>\n              <td class=\"tbl__muted\">{{ a.userName || \"-\" }}</td>\n              <td class=\"tbl__right tbl__muted tnum\">{{ formatCostCents(a.totalCostCents) }}</td>\n              <td class=\"tbl__muted tnum\">{{ formatAnalysisDate(a.createdAt) }}</td>\n              <td class=\"tbl__action\" @click.stop>\n                <Button @click=\"openAnalysis(a)\">Bekijk</Button>\n              </td>\n            </tr>\n          </tbody>\n        </table>\n      </div>\n\n      <PaginationBar :page=\"page\" :page-size=\"PAGE_SIZE\" :total=\"total\" @update:page=\"setPage\" />\n    </div>\n  </PageBody>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from \"vue\";\nimport { RouterLink, useRoute, useRouter } from \"vue-router\";\nimport PageHeader from \"../components/shell/PageHeader.vue\";\nimport PageBody from \"../components/shell/PageBody.vue\";\nimport Badge from \"../components/ui/Badge.vue\";\nimport Button from \"../components/ui/Button.vue\";\nimport EmptyState from \"../components/ui/EmptyState.vue\";\nimport Input from \"../components/ui/Input.vue\";\nimport PaginationBar from \"../components/ui/PaginationBar.vue\";\nimport ScoreBar from \"../components/ui/ScoreBar.vue\";\nimport Select from \"../components/ui/Select.vue\";\nimport SortCaret from \"../components/ui/SortCaret.vue\";\nimport Icon from \"../components/icons/Icon.vue\";\nimport { api } from \"../lib/api\";\nimport { analysisDetailRoute } from \"../lib/nav\";\nimport { formatLocationIdsForClipboard } from \"../lib/copy-location-ids\";\nimport {\n  analysisStatusLabel,\n  feedbackImpactTitle,\n  formatAnalysisDate,\n  formatCostCents,\n  selectedLocationCount,\n} from \"../lib/analyses-format\";\nimport {\n  loadSortState,\n  nextSortState,\n  saveSortState,\n  type SortField,\n  type SortState,\n} from \"../lib/analyses-sort\";\n\ntype AnalysisRow = Awaited<ReturnType<typeof api.findAllAnalyses>>[\"analyses\"][number];\n\nconst PAGE_SIZE = 50;\n\nconst route = useRoute();\nconst router = useRouter();\n\nconst analyses = ref<AnalysisRow[]>([]);\nconst total = ref(0);\nconst hasData = ref(false);\nconst provinces = ref<string[]>([]);\nconst loading = ref(true);\nconst error = ref<string | null>(null);\nconst sort = ref<SortState>(loadSortState());\n\n// Filter state lives in the route query (?query=&province=&page=), like the\n// Next admin, so refresh and Back keep working. The search box is a draft\n// until Enter/Zoeken commits it into the URL.\nfunction queryString(key: string): string {\n  const value = route.query[key];\n  return typeof value === \"string\" ? value : \"\";\n}\n\nconst query = computed(() => queryString(\"query\"));\nconst province = computed(() => queryString(\"province\"));\nconst page = computed(() => {\n  const parsed = parseInt(queryString(\"page\") || \"1\", 10);\n  return Number.isFinite(parsed) && parsed >= 1 ? parsed : 1;\n});\n\nconst searchInput = ref(query.value);\n\n// Keyed by analysis id (the row key) but holding the location id: the copy\n// action only needs location ids and the selection must survive paging.\nconst selected = ref<ReadonlyMap<number, number>>(new Map());\nconst copied = ref(false);\n\nconst countLabel = computed(() => (hasData.value ? `${total.value.toLocaleString(\"nl-NL\")} gevonden` : undefined));\n\nconst provinceOptions = computed(() => [\n  { value: \"\", label: \"Alle provincies\" },\n  ...provinces.value.map((p) => ({ value: p, label: p })),\n]);\n\nconst allOnPageSelected = computed(() =>\n  analyses.value.length > 0 && analyses.value.every((a) => selected.value.has(a.id)));\n\nconst someOnPageSelected = computed(() => analyses.value.some((a) => selected.value.has(a.id)));\n\nconst locationCount = computed(() => selectedLocationCount(selected.value));\n\nfunction fmt(n: number): string {\n  return n.toLocaleString(\"nl-NL\");\n}\n\nfunction statusOf(a: AnalysisRow) {\n  return analysisStatusLabel(a.status);\n}\n\nasync function load() {\n  loading.value = true;\n  error.value = null;\n  try {\n    const result = await api.findAllAnalyses({\n      query: query.value || undefined,\n      province: province.value || undefined,\n      page: page.value,\n      pageSize: PAGE_SIZE,\n      sortField: sort.value.field,\n      sortDirection: sort.value.direction,\n    });\n    analyses.value = result.analyses;\n    total.value = result.total;\n    hasData.value = true;\n  } catch (err) {\n    error.value = err instanceof Error ? err.message : \"Analyses laden is mislukt.\";\n    analyses.value = [];\n    total.value = 0;\n  } finally {\n    loading.value = false;\n  }\n}\n\nasync function loadProvinces() {\n  try {\n    // 0-arg: the stripped signature takes no params, so no `{}`.\n    provinces.value = (await api.getProvinces()).provinces;\n  } catch {\n    provinces.value = [];\n  }\n}\n\nfunction updateQuery(updates: Record<string, string>) {\n  const next: Record<string, string> = {};\n  for (const [key, value] of Object.entries(route.query)) {\n    if (typeof value === \"string\" && value) next[key] = value;\n  }\n  for (const [key, value] of Object.entries(updates)) {\n    if (value) next[key] = value;\n    else delete next[key];\n  }\n  // A new filter resets to page 1: page 7 of a fresh filter is almost always empty.\n  if (\"query\" in updates || \"province\" in updates) delete next.page;\n  void router.replace({ name: \"analyses\", query: next });\n}\n\nfunction applySearch() {\n  updateQuery({ query: searchInput.value.trim() });\n}\n\nfunction setProvince(value: string) {\n  updateQuery({ province: value });\n}\n\nfunction setPage(next: number) {\n  updateQuery({ page: next > 1 ? String(next) : \"\" });\n}\n\nfunction applySort(field: SortField) {\n  sort.value = nextSortState(sort.value, field);\n  saveSortState(sort.value);\n}\n\nfunction openAnalysis(a: AnalysisRow) {\n  void router.push(analysisDetailRoute({ locationId: a.locationId, analysisId: a.id }));\n}\n\nfunction toggleRow(a: AnalysisRow) {\n  const next = new Map(selected.value);\n  if (next.has(a.id)) next.delete(a.id);\n  else next.set(a.id, a.locationId);\n  selected.value = next;\n  copied.value = false;\n}\n\nfunction toggleAllOnPage() {\n  const next = new Map(selected.value);\n  if (allOnPageSelected.value) for (const a of analyses.value) next.delete(a.id);\n  else for (const a of analyses.value) next.set(a.id, a.locationId);\n  selected.value = next;\n  copied.value = false;\n}\n\nfunction clearSelection() {\n  selected.value = new Map();\n  copied.value = false;\n}\n\nlet copiedTimer: number | null = null;\nasync function copySelectedLocationIds() {\n  const text = formatLocationIdsForClipboard([...selected.value.values()]);\n  if (!text) return;\n  try {\n    await navigator.clipboard.writeText(text);\n    copied.value = true;\n    if (copiedTimer !== null) window.clearTimeout(copiedTimer);\n    copiedTimer = window.setTimeout(() => { copied.value = false; }, 1800);\n  } catch {\n    error.value = \"Kopiëren naar het klembord is niet gelukt.\";\n  }\n}\n\n// Reload on any URL-driven change and on a sort change. Back/forward changes\n// the query outside our own handlers, so watching the computeds covers both.\nwatch([query, province, page, sort], load, { deep: true });\nwatch(query, (value) => { searchInput.value = value; });\n\nonMounted(async () => {\n  await Promise.all([load(), loadProvinces()]);\n});\n\nonBeforeUnmount(() => {\n  if (copiedTimer !== null) window.clearTimeout(copiedTimer);\n});\n</script>\n\n<style scoped>\n@font-face {\n  font-family: \"Nudica Analyses\";\n  font-style: normal;\n  font-weight: 400;\n  font-display: swap;\n  src: url(\"../assets/nudica-regular.woff2\") format(\"woff2\");\n}\n\n@font-face {\n  font-family: \"Nudica Analyses\";\n  font-style: normal;\n  font-weight: 600 700;\n  font-display: swap;\n  src: url(\"../assets/nudica-bold.woff2\") format(\"woff2\");\n}\n\n.analyses-head,\n.analyses-body {\n  --font-sans: \"Nudica Analyses\", \"Helvetica Neue\", Arial, sans-serif;\n  font-family: var(--font-sans);\n  background: var(--bg-surface);\n}\n\n.analyses-head :deep(.pagehead__inner) {\n  padding: 12px 12px 10px;\n}\n\n.analyses-head :deep(.pagehead__toolbar) {\n  padding: 0 12px 12px;\n}\n\n.analyses-head :deep(.pagehead__count) {\n  font-size: var(--text-ui);\n}\n\n.analyses-body {\n  padding: 0;\n}\n\n.filters {\n  display: flex;\n  align-items: flex-end;\n  gap: 12px;\n  flex-wrap: wrap;\n  flex: none;\n}\n\n.filters__search {\n  display: flex;\n  align-items: flex-end;\n  gap: 8px;\n  flex: 1 1 320px;\n  min-width: 240px;\n}\n\n.filters__input {\n  flex: 1;\n  min-width: 0;\n}\n\n.filters__province {\n  flex: 1 1 180px;\n}\n\n/* Match field heights on touch screens without changing shared controls. */\n.filters__go {\n  height: 44px;\n  flex-shrink: 0;\n}\n\n.filters :deep(.field__input),\n.filters :deep(.field__select) {\n  height: 44px;\n}\n\n.selbar {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  flex: none;\n  flex-wrap: wrap;\n  padding: 8px 16px;\n  border-block: 1px solid var(--border-1);\n  background: var(--bg-inset);\n  font-size: var(--text-ui);\n}\n\n.selbar > .tnum {\n  flex: 1 0 100%;\n}\n\n.selbar :deep(.btn) {\n  flex-shrink: 0;\n}\n\n.selbar__sub {\n  color: var(--fg-3);\n}\n\n.error {\n  flex: none;\n  margin: 0;\n  padding: 8px 12px;\n  background: var(--danger-bg);\n  border: 1px solid var(--danger-border);\n  border-radius: var(--radius);\n  color: var(--danger-fg);\n  font-size: var(--text-caption);\n}\n\n.listbox {\n  display: flex;\n  flex-direction: column;\n  flex: 1;\n  min-height: 0;\n  min-width: 0;\n  background: var(--bg-surface);\n}\n\n.listbox__scroll {\n  flex: 1;\n  min-height: 0;\n  overflow: auto;\n}\n\n.tbl {\n  width: 100%;\n  border-collapse: collapse;\n  font-size: var(--text-ui);\n}\n\n/* 32px rows: not chosen per table but the standard in the kit. */\n.tbl th,\n.tbl td {\n  height: 32px;\n  padding: 0 16px;\n  text-align: left;\n  border-bottom: 1px solid var(--border-1);\n  white-space: nowrap;\n}\n\n.tbl thead th {\n  position: sticky;\n  top: 0;\n  z-index: 1;\n  background: var(--bg-inset);\n  font-size: var(--text-caption);\n  font-weight: 600;\n  line-height: 16px;\n  letter-spacing: 0.32px;\n  text-transform: uppercase;\n  color: var(--fg-1);\n}\n\n/* A <button> resets text-transform and font:inherit does not restore it, so a\n   sortable header needs its own uppercase to match the fixed headers. */\n.tbl__sort {\n  display: inline-flex;\n  align-items: center;\n  gap: 4px;\n  border: 0;\n  padding: 0;\n  background: transparent;\n  font: inherit;\n  font-size: var(--text-caption);\n  letter-spacing: 0.32px;\n  text-transform: uppercase;\n  color: inherit;\n  cursor: pointer;\n}\n\n.tbl__sort--right {\n  flex-direction: row-reverse;\n}\n\n.tbl__check {\n  width: 40px;\n  padding-left: 16px;\n}\n\n.tbl__id {\n  width: 80px;\n}\n\n.tbl__name {\n  width: 22%;\n}\n\n.tbl__trunc {\n  max-width: 220px;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n\n.tbl__badges {\n  display: inline-flex;\n  gap: 6px;\n}\n\n.tbl__badges :deep(.badge) {\n  height: 20px;\n  padding: 0 8px;\n  border-radius: 999px;\n}\n\n.tbl__score {\n  width: 20%;\n  min-width: 150px;\n}\n\n.tbl__score :deep(.score) {\n  flex-direction: row-reverse;\n  justify-content: flex-end;\n}\n\n.tbl__score :deep(.score__track) {\n  flex: 0 0 80px;\n  height: 6px;\n}\n\n.tbl__score :deep(.score__value) {\n  text-align: left;\n}\n\n/* Two-line clamp for a provider error in the score column; the full text is\n   in the title. */\n.tbl__error {\n  display: -webkit-box;\n  -webkit-box-orient: vertical;\n  -webkit-line-clamp: 2;\n  overflow: hidden;\n  white-space: normal;\n  line-height: 1.3;\n  font-size: var(--text-caption);\n  color: var(--danger-fg);\n}\n\n.tbl__review {\n  color: var(--diverge-fg);\n  font-weight: 500;\n}\n\n.tbl__impact {\n  display: inline-flex;\n  vertical-align: middle;\n}\n\n.tbl__impact--shift {\n  color: var(--score-fg);\n}\n\n.tbl__impact--considered {\n  color: var(--fg-3);\n}\n\n.tbl__muted {\n  color: var(--fg-3);\n}\n\n.tbl .tbl__center {\n  text-align: center;\n}\n\n.tbl .tbl__right {\n  text-align: right;\n}\n\n.tbl .tbl__action {\n  width: 96px;\n  text-align: right;\n}\n\n.tbl__action :deep(.btn) {\n  height: 30px;\n}\n\n.tbl__row {\n  cursor: pointer;\n}\n\n@media (hover: hover) {\n  .tbl tbody tr:hover {\n    background: var(--bg-inset);\n  }\n}\n\n.tbl__row--sel {\n  background: var(--bg-inset);\n}\n\n.tbl__dash {\n  color: var(--fg-5);\n}\n\n.tbl__msg {\n  height: 96px;\n  text-align: center;\n  color: var(--fg-3);\n}\n\n.tbl__empty {\n  height: auto;\n  padding: 0;\n}\n\n@media (min-width: 720px) {\n  .analyses-head :deep(.pagehead__inner) {\n    padding: 14px 20px 12px;\n  }\n\n  .analyses-head :deep(.pagehead__toolbar) {\n    padding: 0 20px 12px;\n  }\n\n  .filters__search {\n    flex: 2 1 320px;\n  }\n\n  .filters__province {\n    flex: 1 1 180px;\n    max-width: 280px;\n  }\n\n  .selbar > .tnum {\n    flex: 0 1 auto;\n  }\n}\n\n@media (min-width: 1080px) {\n  .filters__go,\n  .filters :deep(.field__input),\n  .filters :deep(.field__select) {\n    height: 40px;\n  }\n}\n</style>\n","<template>\n  <header class=\"pagehead\" :class=\"{ 'pagehead--tabs': hasTabs }\">\n    <div class=\"pagehead__inner\">\n      <div class=\"pagehead__text\">\n        <span v-if=\"eyebrow\" class=\"eyebrow\">{{ eyebrow }}</span>\n        <span class=\"pagehead__titlerow\">\n          <h1 class=\"page-title\">{{ title }}</h1>\n          <span v-if=\"count\" class=\"pagehead__count tnum\">{{ count }}</span>\n        </span>\n        <p v-if=\"description\" class=\"pagehead__lead\">{{ description }}</p>\n      </div>\n      <div v-if=\"$slots.actions\" class=\"pagehead__actions\">\n        <slot name=\"actions\" />\n      </div>\n    </div>\n    <!-- A toolbar row under the title (filters on the Verkenner). Same width\n         and padding as the title row so its controls align with the content. -->\n    <div v-if=\"$slots.toolbar\" class=\"pagehead__toolbar\">\n      <slot name=\"toolbar\" />\n    </div>\n    <div v-if=\"hasTabs\" class=\"pagehead__tabs\">\n      <slot name=\"tabs\" />\n    </div>\n  </header>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, useSlots } from \"vue\";\n\n// PageHeader is een VOLVLAKKE band met eigen padding en een hairline eronder;\n// PageBody is de contentlaag daaronder. AppShell padt `main` daarom niet.\n//\n// Kale kop, zonder punt erachter: de punt en het eyebrow zijn de\n// marketing-tics van het design system, terwijl elk productscherm in de\n// screener-kit een kale kop draagt. Het eyebrow bestaat in deze app alleen op\n// de Verkenner.\n//\n// Staan er tabs in de slot, dan zet de band zijn eigen onderrand uit: de\n// baseline van de tabs IS die lijn.\n// `count` sits next to the title (\"Analyses  83 gevonden\"), like the kit's\n// list screens; it is a preformatted string so the page owns the wording.\ndefineProps<{ title: string; eyebrow?: string; description?: string; count?: string }>();\n\nconst slots = useSlots();\nconst hasTabs = computed(() => Boolean(slots.tabs));\n</script>\n\n<style scoped>\n/* De kopband van de kit: volvlakke oppervlaktekleur, hairline eronder en\n   12px verticale padding. Zie PaginaKop in de screener-kit. */\n.pagehead {\n  border-bottom: 1px solid var(--border-1);\n  background: var(--bg-surface);\n}\n\n.pagehead--tabs {\n  border-bottom: 0;\n}\n\n.pagehead__inner {\n  display: flex;\n  align-items: flex-start;\n  justify-content: space-between;\n  gap: 16px;\n  flex-wrap: wrap;\n  padding: 12px 16px;\n}\n\n.pagehead__text {\n  min-width: 0;\n}\n\n.pagehead__titlerow {\n  display: flex;\n  align-items: baseline;\n  gap: 12px;\n}\n\n.pagehead__count {\n  font-size: var(--text-caption);\n  color: var(--fg-3);\n}\n\n.pagehead__toolbar {\n  padding: 0 16px 12px;\n}\n\n/* body-01 (14/20), niet de caption-maat: de kit zet de leadregel op dezelfde\n   maat als de content en alleen een tint lichter. */\n.pagehead__lead {\n  margin: 8px 0 0;\n  max-width: 80ch;\n  font-size: var(--text-ui);\n  line-height: 20px;\n  color: var(--fg-3);\n}\n\n.pagehead__actions {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n}\n\n.pagehead__tabs {\n  padding: 0 16px;\n}\n\n@media (min-width: 720px) {\n  .pagehead__inner {\n    padding: 12px var(--shell-content-pad);\n  }\n\n  .pagehead__toolbar {\n    padding: 0 var(--shell-content-pad) 12px;\n  }\n\n  .pagehead__tabs {\n    padding: 0 var(--shell-content-pad);\n  }\n}\n</style>\n","import { toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"pagehead__inner\" }\nconst _hoisted_2 = { class: \"pagehead__text\" }\nconst _hoisted_3 = {\n  key: 0,\n  class: \"eyebrow\"\n}\nconst _hoisted_4 = { class: \"pagehead__titlerow\" }\nconst _hoisted_5 = { class: \"page-title\" }\nconst _hoisted_6 = {\n  key: 0,\n  class: \"pagehead__count tnum\"\n}\nconst _hoisted_7 = {\n  key: 1,\n  class: \"pagehead__lead\"\n}\nconst _hoisted_8 = {\n  key: 0,\n  class: \"pagehead__actions\"\n}\nconst _hoisted_9 = {\n  key: 0,\n  class: \"pagehead__toolbar\"\n}\nconst _hoisted_10 = {\n  key: 1,\n  class: \"pagehead__tabs\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"header\", {\n    class: _normalizeClass([\"pagehead\", { 'pagehead--tabs': $setup.hasTabs }])\n  }, [\n    _createElementVNode(\"div\", _hoisted_1, [\n      _createElementVNode(\"div\", _hoisted_2, [\n        ($props.eyebrow)\n          ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, _toDisplayString($props.eyebrow), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true),\n        _createElementVNode(\"span\", _hoisted_4, [\n          _createElementVNode(\"h1\", _hoisted_5, _toDisplayString($props.title), 1 /* TEXT */),\n          ($props.count)\n            ? (_openBlock(), _createElementBlock(\"span\", _hoisted_6, _toDisplayString($props.count), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true)\n        ]),\n        ($props.description)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_7, _toDisplayString($props.description), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true)\n      ]),\n      (_ctx.$slots.actions)\n        ? (_openBlock(), _createElementBlock(\"div\", _hoisted_8, [\n            _renderSlot(_ctx.$slots, \"actions\", {}, undefined, true)\n          ]))\n        : _createCommentVNode(\"v-if\", true)\n    ]),\n    _createCommentVNode(\" A toolbar row under the title (filters on the Verkenner). Same width\\n         and padding as the title row so its controls align with the content. \"),\n    (_ctx.$slots.toolbar)\n      ? (_openBlock(), _createElementBlock(\"div\", _hoisted_9, [\n          _renderSlot(_ctx.$slots, \"toolbar\", {}, undefined, true)\n        ]))\n      : _createCommentVNode(\"v-if\", true),\n    ($setup.hasTabs)\n      ? (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n          _renderSlot(_ctx.$slots, \"tabs\", {}, undefined, true)\n        ]))\n      : _createCommentVNode(\"v-if\", true)\n  ], 2 /* CLASS */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/PageHeader.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/PageHeader.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/PageHeader.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/shell/PageHeader.vue\";script.__scopeId = \"data-v-67f7f8b9\";export default script;","/**\n * Sort state of the analyses list, with the same localStorage key as the Next\n * admin so an existing user keeps their preference after the cutover.\n *\n * Pure functions so they can be tested without a DOM. The load/save side does\n * touch localStorage but fails silently: a private window or denied site data\n * must not block the list. Mirrors lib/locations-sort.ts.\n */\nexport const SORT_STORAGE_KEY = \"statiegeld-analyses-sort\";\n\nexport const SORT_FIELDS = [\n  \"id\",\n  \"companyName\",\n  \"status\",\n  \"avgScore\",\n  \"requiresHumanReview\",\n  \"userName\",\n  \"totalCostCents\",\n  \"createdAt\",\n] as const;\nexport type SortField = (typeof SORT_FIELDS)[number];\nexport type SortDirection = \"asc\" | \"desc\";\n\nexport interface SortState {\n  field: SortField;\n  direction: SortDirection;\n}\n\nexport const DEFAULT_SORT: SortState = { field: \"createdAt\", direction: \"desc\" };\n\n/** Validates a value read from storage. An unknown field from an older version\n    must not produce a broken query, so it falls back to the default field. */\nexport function parseSortState(raw: string | null): SortState {\n  if (!raw) return DEFAULT_SORT;\n  try {\n    const parsed = JSON.parse(raw) as Partial<SortState>;\n    const field = (SORT_FIELDS as readonly string[]).includes(String(parsed.field))\n      ? parsed.field as SortField\n      : DEFAULT_SORT.field;\n    const direction = parsed.direction === \"desc\" ? \"desc\" : \"asc\";\n    return { field, direction };\n  } catch {\n    return DEFAULT_SORT;\n  }\n}\n\n/** Clicking the active column flips the direction; another column starts\n    ascending. */\nexport function nextSortState(current: SortState, field: SortField): SortState {\n  if (current.field !== field) return { field, direction: \"asc\" };\n  return { field, direction: current.direction === \"asc\" ? \"desc\" : \"asc\" };\n}\n\nexport function loadSortState(): SortState {\n  try {\n    return parseSortState(localStorage.getItem(SORT_STORAGE_KEY));\n  } catch {\n    return DEFAULT_SORT;\n  }\n}\n\nexport function saveSortState(sort: SortState): void {\n  try {\n    localStorage.setItem(SORT_STORAGE_KEY, JSON.stringify(sort));\n  } catch {\n    /* quota/denied, silent */\n  }\n}\n","import { createCommentVNode as _createCommentVNode, createVNode as _createVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, withModifiers as _withModifiers, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, renderList as _renderList, Fragment as _Fragment, createBlock as _createBlock, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"filters\" }\nconst _hoisted_2 = {\n  key: 0,\n  class: \"selbar\"\n}\nconst _hoisted_3 = { class: \"tnum\" }\nconst _hoisted_4 = {\n  key: 0,\n  class: \"selbar__sub\"\n}\nconst _hoisted_5 = {\n  key: 1,\n  class: \"error\",\n  role: \"alert\"\n}\nconst _hoisted_6 = { class: \"listbox\" }\nconst _hoisted_7 = { class: \"listbox__scroll\" }\nconst _hoisted_8 = { class: \"tbl\" }\nconst _hoisted_9 = { class: \"tbl__check\" }\nconst _hoisted_10 = [\"checked\", \"indeterminate\", \"disabled\"]\nconst _hoisted_11 = { class: \"tbl__id\" }\nconst _hoisted_12 = { class: \"tbl__name\" }\nconst _hoisted_13 = { class: \"tbl__score\" }\nconst _hoisted_14 = { class: \"tbl__center\" }\nconst _hoisted_15 = { class: \"tbl__right\" }\nconst _hoisted_16 = { key: 0 }\nconst _hoisted_17 = { key: 1 }\nconst _hoisted_18 = {\n  colspan: \"11\",\n  class: \"tbl__empty\"\n}\nconst _hoisted_19 = [\"onClick\"]\nconst _hoisted_20 = [\"checked\", \"aria-label\", \"onChange\"]\nconst _hoisted_21 = { class: \"tbl__id tnum\" }\nconst _hoisted_22 = [\"title\"]\nconst _hoisted_23 = { class: \"tbl__badges\" }\nconst _hoisted_24 = { class: \"tbl__score\" }\nconst _hoisted_25 = [\"title\"]\nconst _hoisted_26 = { class: \"tbl__center\" }\nconst _hoisted_27 = {\n  key: 0,\n  class: \"tbl__review\",\n  title: \"Minstens één model vlagde menselijke review\"\n}\nconst _hoisted_28 = {\n  key: 1,\n  class: \"tbl__dash\"\n}\nconst _hoisted_29 = { class: \"tbl__center\" }\nconst _hoisted_30 = [\"title\"]\nconst _hoisted_31 = [\"title\"]\nconst _hoisted_32 = [\"title\"]\nconst _hoisted_33 = { class: \"tbl__muted\" }\nconst _hoisted_34 = { class: \"tbl__right tbl__muted tnum\" }\nconst _hoisted_35 = { class: \"tbl__muted tnum\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(_Fragment, null, [\n    _createCommentVNode(\" The count sits next to the title, not as a line under it, so the header\\n       reads \\\"Analyses  83 gevonden\\\", like the locations list. \"),\n    _createVNode($setup[\"PageHeader\"], {\n      title: \"Analyses\",\n      count: $setup.countLabel,\n      class: \"analyses-head\"\n    }, {\n      toolbar: _withCtx(() => [\n        _createCommentVNode(\" Filter bar. Search applies on Enter or the button, not per keystroke:\\n           that is how the Next admin behaves and the id-or-name search is cheap\\n           enough to run on demand. \"),\n        _createElementVNode(\"div\", _hoisted_1, [\n          _createElementVNode(\"form\", {\n            class: \"filters__search\",\n            onSubmit: _withModifiers($setup.applySearch, [\"prevent\"])\n          }, [\n            _createVNode($setup[\"Input\"], {\n              modelValue: $setup.searchInput,\n              \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => (($setup.searchInput) = $event)),\n              class: \"filters__input\",\n              label: \"Zoeken\",\n              icon: \"search\",\n              placeholder: \"Zoek op ID, bedrijfsnaam of gebruiker...\"\n            }, null, 8 /* PROPS */, [\"modelValue\"]),\n            _createVNode($setup[\"Button\"], {\n              type: \"submit\",\n              class: \"filters__go\"\n            }, {\n              default: _withCtx(() => _cache[12] || (_cache[12] = [\n                _createTextVNode(\"Zoeken\", -1 /* CACHED */)\n              ])),\n              _: 1 /* STABLE */,\n              __: [12]\n            })\n          ], 32 /* NEED_HYDRATION */),\n          _createVNode($setup[\"Select\"], {\n            \"model-value\": $setup.province,\n            class: \"filters__province\",\n            label: \"Provincie\",\n            options: $setup.provinceOptions,\n            \"onUpdate:modelValue\": $setup.setProvince\n          }, null, 8 /* PROPS */, [\"model-value\", \"options\"])\n        ])\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"count\"]),\n    _createVNode($setup[\"PageBody\"], {\n      fill: \"\",\n      class: \"analyses-body\"\n    }, {\n      default: _withCtx(() => [\n        _createCommentVNode(\" Selection toolbar, only while something is ticked: without an action\\n         the checkbox column would be a dead control. \"),\n        ($setup.selected.size > 0)\n          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n              _createElementVNode(\"span\", _hoisted_3, [\n                _createTextVNode(_toDisplayString($setup.fmt($setup.selected.size)) + \" geselecteerd \", 1 /* TEXT */),\n                ($setup.locationCount !== $setup.selected.size)\n                  ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, \" (\" + _toDisplayString($setup.fmt($setup.locationCount)) + \" \" + _toDisplayString($setup.locationCount === 1 ? \"locatie\" : \"locaties\") + \") \", 1 /* TEXT */))\n                  : _createCommentVNode(\"v-if\", true)\n              ]),\n              _createVNode($setup[\"Button\"], { onClick: $setup.copySelectedLocationIds }, {\n                default: _withCtx(() => [\n                  _createVNode($setup[\"Icon\"], {\n                    name: $setup.copied ? 'checkmark' : 'copy'\n                  }, null, 8 /* PROPS */, [\"name\"]),\n                  _createTextVNode(\" \" + _toDisplayString($setup.copied ? \"Gekopieerd\" : \"Kopieer locatie ID's\"), 1 /* TEXT */)\n                ]),\n                _: 1 /* STABLE */\n              }),\n              _createVNode($setup[\"Button\"], {\n                variant: \"ghost\",\n                onClick: $setup.clearSelection\n              }, {\n                default: _withCtx(() => [\n                  _createVNode($setup[\"Icon\"], { name: \"close\" }),\n                  _cache[13] || (_cache[13] = _createTextVNode(\" Deselecteren \", -1 /* CACHED */))\n                ]),\n                _: 1 /* STABLE */,\n                __: [13]\n              })\n            ]))\n          : _createCommentVNode(\"v-if\", true),\n        ($setup.error)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_5, _toDisplayString($setup.error), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true),\n        _createElementVNode(\"div\", _hoisted_6, [\n          _createElementVNode(\"div\", _hoisted_7, [\n            _createElementVNode(\"table\", _hoisted_8, [\n              _createElementVNode(\"thead\", null, [\n                _createElementVNode(\"tr\", null, [\n                  _createElementVNode(\"th\", _hoisted_9, [\n                    _createElementVNode(\"input\", {\n                      class: \"snl-checkbox\",\n                      type: \"checkbox\",\n                      checked: $setup.allOnPageSelected,\n                      indeterminate: $setup.someOnPageSelected && !$setup.allOnPageSelected,\n                      disabled: $setup.analyses.length === 0,\n                      \"aria-label\": \"Selecteer alle zichtbare analyses\",\n                      onChange: $setup.toggleAllOnPage\n                    }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_10)\n                  ]),\n                  _createElementVNode(\"th\", _hoisted_11, [\n                    _createElementVNode(\"button\", {\n                      class: \"tbl__sort\",\n                      type: \"button\",\n                      onClick: _cache[1] || (_cache[1] = $event => ($setup.applySort('id')))\n                    }, [\n                      _cache[14] || (_cache[14] = _createTextVNode(\" ID \", -1 /* CACHED */)),\n                      _createVNode($setup[\"SortCaret\"], {\n                        active: $setup.sort.field === 'id',\n                        direction: $setup.sort.direction\n                      }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                    ])\n                  ]),\n                  _createElementVNode(\"th\", _hoisted_12, [\n                    _createElementVNode(\"button\", {\n                      class: \"tbl__sort\",\n                      type: \"button\",\n                      onClick: _cache[2] || (_cache[2] = $event => ($setup.applySort('companyName')))\n                    }, [\n                      _cache[15] || (_cache[15] = _createTextVNode(\" Locatie \", -1 /* CACHED */)),\n                      _createVNode($setup[\"SortCaret\"], {\n                        active: $setup.sort.field === 'companyName',\n                        direction: $setup.sort.direction\n                      }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                    ])\n                  ]),\n                  _createElementVNode(\"th\", null, [\n                    _createElementVNode(\"button\", {\n                      class: \"tbl__sort\",\n                      type: \"button\",\n                      onClick: _cache[3] || (_cache[3] = $event => ($setup.applySort('status')))\n                    }, [\n                      _cache[16] || (_cache[16] = _createTextVNode(\" Status \", -1 /* CACHED */)),\n                      _createVNode($setup[\"SortCaret\"], {\n                        active: $setup.sort.field === 'status',\n                        direction: $setup.sort.direction\n                      }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                    ])\n                  ]),\n                  _createElementVNode(\"th\", _hoisted_13, [\n                    _createElementVNode(\"button\", {\n                      class: \"tbl__sort\",\n                      type: \"button\",\n                      onClick: _cache[4] || (_cache[4] = $event => ($setup.applySort('avgScore')))\n                    }, [\n                      _cache[17] || (_cache[17] = _createTextVNode(\" Score \", -1 /* CACHED */)),\n                      _createVNode($setup[\"SortCaret\"], {\n                        active: $setup.sort.field === 'avgScore',\n                        direction: $setup.sort.direction\n                      }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                    ])\n                  ]),\n                  _createElementVNode(\"th\", _hoisted_14, [\n                    _createElementVNode(\"button\", {\n                      class: \"tbl__sort\",\n                      type: \"button\",\n                      title: \"Vinkje wanneer minstens één model van deze analyse menselijke review nodig heeft\",\n                      onClick: _cache[5] || (_cache[5] = $event => ($setup.applySort('requiresHumanReview')))\n                    }, [\n                      _cache[18] || (_cache[18] = _createTextVNode(\" Review \", -1 /* CACHED */)),\n                      _createVNode($setup[\"SortCaret\"], {\n                        active: $setup.sort.field === 'requiresHumanReview',\n                        direction: $setup.sort.direction\n                      }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                    ])\n                  ]),\n                  _cache[22] || (_cache[22] = _createElementVNode(\"th\", {\n                    class: \"tbl__center\",\n                    title: \"Vinkje = veldfeedback verschoof de score; cirkel = feedback meegenomen maar score ongewijzigd; streepje = geen feedback gebruikt\"\n                  }, \" Feedback \", -1 /* CACHED */)),\n                  _createElementVNode(\"th\", null, [\n                    _createElementVNode(\"button\", {\n                      class: \"tbl__sort\",\n                      type: \"button\",\n                      onClick: _cache[6] || (_cache[6] = $event => ($setup.applySort('userName')))\n                    }, [\n                      _cache[19] || (_cache[19] = _createTextVNode(\" Gebruiker \", -1 /* CACHED */)),\n                      _createVNode($setup[\"SortCaret\"], {\n                        active: $setup.sort.field === 'userName',\n                        direction: $setup.sort.direction\n                      }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                    ])\n                  ]),\n                  _createElementVNode(\"th\", _hoisted_15, [\n                    _createElementVNode(\"button\", {\n                      class: \"tbl__sort tbl__sort--right\",\n                      type: \"button\",\n                      onClick: _cache[7] || (_cache[7] = $event => ($setup.applySort('totalCostCents')))\n                    }, [\n                      _cache[20] || (_cache[20] = _createTextVNode(\" Kosten \", -1 /* CACHED */)),\n                      _createVNode($setup[\"SortCaret\"], {\n                        active: $setup.sort.field === 'totalCostCents',\n                        direction: $setup.sort.direction\n                      }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                    ])\n                  ]),\n                  _createElementVNode(\"th\", null, [\n                    _createElementVNode(\"button\", {\n                      class: \"tbl__sort\",\n                      type: \"button\",\n                      onClick: _cache[8] || (_cache[8] = $event => ($setup.applySort('createdAt')))\n                    }, [\n                      _cache[21] || (_cache[21] = _createTextVNode(\" Datum \", -1 /* CACHED */)),\n                      _createVNode($setup[\"SortCaret\"], {\n                        active: $setup.sort.field === 'createdAt',\n                        direction: $setup.sort.direction\n                      }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                    ])\n                  ]),\n                  _cache[23] || (_cache[23] = _createElementVNode(\"th\", { class: \"tbl__action\" }, null, -1 /* CACHED */))\n                ])\n              ]),\n              _createElementVNode(\"tbody\", null, [\n                ($setup.loading)\n                  ? (_openBlock(), _createElementBlock(\"tr\", _hoisted_16, _cache[24] || (_cache[24] = [\n                      _createElementVNode(\"td\", {\n                        class: \"tbl__msg\",\n                        colspan: \"11\"\n                      }, \"Laden...\", -1 /* CACHED */)\n                    ])))\n                  : ($setup.analyses.length === 0)\n                    ? (_openBlock(), _createElementBlock(\"tr\", _hoisted_17, [\n                        _createElementVNode(\"td\", _hoisted_18, [\n                          _createVNode($setup[\"EmptyState\"], {\n                            icon: \"search\",\n                            title: \"Geen analyses gevonden\",\n                            description: \"Pas je filters aan of start een analyse vanaf een locatie.\"\n                          })\n                        ])\n                      ]))\n                    : (_openBlock(true), _createElementBlock(_Fragment, { key: 2 }, _renderList($setup.analyses, (a) => {\n                        return (_openBlock(), _createElementBlock(\"tr\", {\n                          key: a.id,\n                          class: _normalizeClass([\"tbl__row\", { 'tbl__row--sel': $setup.selected.has(a.id) }]),\n                          onClick: $event => ($setup.openAnalysis(a))\n                        }, [\n                          _createElementVNode(\"td\", {\n                            class: \"tbl__check\",\n                            onClick: _cache[9] || (_cache[9] = _withModifiers(() => {}, [\"stop\"]))\n                          }, [\n                            _createElementVNode(\"input\", {\n                              class: \"snl-checkbox\",\n                              type: \"checkbox\",\n                              checked: $setup.selected.has(a.id),\n                              \"aria-label\": `Selecteer analyse #${a.id}`,\n                              onChange: $event => ($setup.toggleRow(a))\n                            }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_20)\n                          ]),\n                          _createElementVNode(\"td\", _hoisted_21, [\n                            _createVNode($setup[\"RouterLink\"], {\n                              to: $setup.analysisDetailRoute({ locationId: a.locationId, analysisId: a.id }),\n                              onClick: _cache[10] || (_cache[10] = _withModifiers(() => {}, [\"stop\"]))\n                            }, {\n                              default: _withCtx(() => [\n                                _createTextVNode(\"#\" + _toDisplayString(a.id), 1 /* TEXT */)\n                              ]),\n                              _: 2 /* DYNAMIC */\n                            }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"])\n                          ]),\n                          _createElementVNode(\"td\", {\n                            class: \"tbl__name tbl__trunc\",\n                            title: a.companyName\n                          }, _toDisplayString(a.companyName), 9 /* TEXT, PROPS */, _hoisted_22),\n                          _createElementVNode(\"td\", null, [\n                            _createElementVNode(\"span\", _hoisted_23, [\n                              _createVNode($setup[\"Badge\"], {\n                                tone: $setup.statusOf(a).tone\n                              }, {\n                                default: _withCtx(() => [\n                                  _createTextVNode(_toDisplayString($setup.statusOf(a).label), 1 /* TEXT */)\n                                ]),\n                                _: 2 /* DYNAMIC */\n                              }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"tone\"]),\n                              (a.isDryRun)\n                                ? (_openBlock(), _createBlock($setup[\"Badge\"], { key: 0 }, {\n                                    default: _withCtx(() => _cache[25] || (_cache[25] = [\n                                      _createTextVNode(\"Dry run\", -1 /* CACHED */)\n                                    ])),\n                                    _: 1 /* STABLE */,\n                                    __: [25]\n                                  }))\n                                : _createCommentVNode(\"v-if\", true)\n                            ])\n                          ]),\n                          _createElementVNode(\"td\", _hoisted_24, [\n                            (a.status === 'failed' && a.errorMessage)\n                              ? (_openBlock(), _createElementBlock(\"span\", {\n                                  key: 0,\n                                  class: \"tbl__error\",\n                                  title: a.errorMessage\n                                }, _toDisplayString(a.errorMessage), 9 /* TEXT, PROPS */, _hoisted_25))\n                              : (_openBlock(), _createBlock($setup[\"ScoreBar\"], {\n                                  key: 1,\n                                  score: a.avgScore\n                                }, null, 8 /* PROPS */, [\"score\"]))\n                          ]),\n                          _createElementVNode(\"td\", _hoisted_26, [\n                            (a.requiresHumanReview)\n                              ? (_openBlock(), _createElementBlock(\"span\", _hoisted_27, \"✓\"))\n                              : (_openBlock(), _createElementBlock(\"span\", _hoisted_28, \"-\"))\n                          ]),\n                          _createElementVNode(\"td\", _hoisted_29, [\n                            _createCommentVNode(\" Title on a span, not on the Icon: an svg `title` attribute is\\n                     not a tooltip. \"),\n                            (a.feedbackImpact === 'shift')\n                              ? (_openBlock(), _createElementBlock(\"span\", {\n                                  key: 0,\n                                  class: \"tbl__impact tbl__impact--shift\",\n                                  title: $setup.feedbackImpactTitle('shift')\n                                }, [\n                                  _createVNode($setup[\"Icon\"], { name: \"checkmark\" })\n                                ], 8 /* PROPS */, _hoisted_30))\n                              : (a.feedbackImpact === 'considered')\n                                ? (_openBlock(), _createElementBlock(\"span\", {\n                                    key: 1,\n                                    class: \"tbl__impact tbl__impact--considered\",\n                                    title: $setup.feedbackImpactTitle('considered')\n                                  }, [\n                                    _createVNode($setup[\"Icon\"], {\n                                      name: \"circle--outline\",\n                                      size: 14\n                                    })\n                                  ], 8 /* PROPS */, _hoisted_31))\n                                : (_openBlock(), _createElementBlock(\"span\", {\n                                    key: 2,\n                                    class: \"tbl__dash\",\n                                    title: $setup.feedbackImpactTitle('none')\n                                  }, \"-\", 8 /* PROPS */, _hoisted_32))\n                          ]),\n                          _createElementVNode(\"td\", _hoisted_33, _toDisplayString(a.userName || \"-\"), 1 /* TEXT */),\n                          _createElementVNode(\"td\", _hoisted_34, _toDisplayString($setup.formatCostCents(a.totalCostCents)), 1 /* TEXT */),\n                          _createElementVNode(\"td\", _hoisted_35, _toDisplayString($setup.formatAnalysisDate(a.createdAt)), 1 /* TEXT */),\n                          _createElementVNode(\"td\", {\n                            class: \"tbl__action\",\n                            onClick: _cache[11] || (_cache[11] = _withModifiers(() => {}, [\"stop\"]))\n                          }, [\n                            _createVNode($setup[\"Button\"], {\n                              onClick: $event => ($setup.openAnalysis(a))\n                            }, {\n                              default: _withCtx(() => _cache[26] || (_cache[26] = [\n                                _createTextVNode(\"Bekijk\", -1 /* CACHED */)\n                              ])),\n                              _: 2 /* DYNAMIC */,\n                              __: [26]\n                            }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"onClick\"])\n                          ])\n                        ], 10 /* CLASS, PROPS */, _hoisted_19))\n                      }), 128 /* KEYED_FRAGMENT */))\n              ])\n            ])\n          ]),\n          _createVNode($setup[\"PaginationBar\"], {\n            page: $setup.page,\n            \"page-size\": $setup.PAGE_SIZE,\n            total: $setup.total,\n            \"onUpdate:page\": $setup.setPage\n          }, null, 8 /* PROPS */, [\"page\", \"total\"])\n        ])\n      ]),\n      _: 1 /* STABLE */\n    })\n  ], 64 /* STABLE_FRAGMENT */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/AnalysesView.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/AnalysesView.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/AnalysesView.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/AnalysesView.vue\";script.__scopeId = \"data-v-671da165\";export default script;","<template>\n  <section class=\"feedback\">\n    <header class=\"feedback__head\">\n      <div class=\"feedback__titlebar\">\n        <h1 class=\"page-title\">Feedback</h1>\n        <div class=\"feedback__actions\">\n          <!-- The Next admin also had a \"Check prompt-verbetering\" button\n               (prompt-review-button.tsx), and the kit screen shows one too. It\n               calls a Gemini worker endpoint that only exists once the headless\n               worker lands in phase 5; deliberately not built here. -->\n          <Button :busy=\"exporting\" @click=\"exportXlsx\">\n            <Icon name=\"download\" />\n            Exporteren (XLSX)\n          </Button>\n        </div>\n      </div>\n      <p class=\"feedback__lead\">\n        Veldfeedback van veldagenten op de AI-beoordelingen. Klik op een rij voor de volledige\n        beoordeling naast de locatie-informatie.\n      </p>\n    </header>\n\n    <div class=\"feedback__body\">\n      <p v-if=\"error\" class=\"error\" role=\"alert\">{{ error }}</p>\n\n      <div v-if=\"loading\" class=\"msg\">Laden...</div>\n\n      <EmptyState\n        v-else-if=\"feedback.length === 0\"\n        icon=\"flag\"\n        title=\"Er is nog geen veldfeedback binnengekomen.\"\n      />\n\n      <template v-else>\n        <div class=\"filters\">\n          <Input v-model=\"filter\" class=\"filters__search\" icon=\"search\"\n                 placeholder=\"Zoek op locatie, plaats of inzender\" />\n          <Select v-model=\"submitter\" class=\"filters__submitter\" label=\"Inzender\"\n                  :options=\"submitterSelectOptions\" />\n        </div>\n\n        <span class=\"count tnum\">\n          {{ rows.length }} van {{ feedback.length }} beoordeling{{ feedback.length === 1 ? \"\" : \"en\" }}\n        </span>\n\n        <div class=\"listbox\">\n          <div class=\"listbox__scroll\">\n            <table class=\"tbl\">\n              <thead>\n                <tr>\n                  <th class=\"tbl__name\" :aria-sort=\"ariaSort('companyName')\">\n                    <button class=\"tbl__sort\" type=\"button\" @click=\"applySort('companyName')\">\n                      Locatie\n                      <SortCaret :active=\"sort.field === 'companyName'\" :direction=\"sort.direction\" />\n                    </button>\n                  </th>\n                  <th :aria-sort=\"ariaSort('submittedBy')\">\n                    <button class=\"tbl__sort\" type=\"button\" @click=\"applySort('submittedBy')\">\n                      Inzender\n                      <SortCaret :active=\"sort.field === 'submittedBy'\" :direction=\"sort.direction\" />\n                    </button>\n                  </th>\n                  <th :aria-sort=\"ariaSort('disagreements')\">\n                    <button class=\"tbl__sort\" type=\"button\" @click=\"applySort('disagreements')\">\n                      Beoordeling\n                      <SortCaret :active=\"sort.field === 'disagreements'\" :direction=\"sort.direction\" />\n                    </button>\n                  </th>\n                  <th class=\"tbl__right\" :aria-sort=\"ariaSort('latestScore')\">\n                    <button class=\"tbl__sort\" type=\"button\" @click=\"applySort('latestScore')\">\n                      Score\n                      <SortCaret :active=\"sort.field === 'latestScore'\" :direction=\"sort.direction\" />\n                    </button>\n                  </th>\n                  <th class=\"tbl__right\" :aria-sort=\"ariaSort('createdAt')\">\n                    <button class=\"tbl__sort\" type=\"button\" @click=\"applySort('createdAt')\">\n                      Datum\n                      <SortCaret :active=\"sort.field === 'createdAt'\" :direction=\"sort.direction\" />\n                    </button>\n                  </th>\n                  <th class=\"tbl__chevron\" />\n                </tr>\n              </thead>\n              <tbody>\n                <tr v-if=\"rows.length === 0\">\n                  <td class=\"tbl__msg\" colspan=\"6\">Geen beoordelingen voor dit filter.</td>\n                </tr>\n                <!-- Every cell is the same RouterLink so the whole row is the\n                     target, without a click handler on the <tr> that would fight\n                     text selection and middle-click. -->\n                <tr v-for=\"fb in rows\" v-else :key=\"fb.id\" class=\"tbl__row\">\n                  <td class=\"tbl__name\">\n                    <RouterLink :to=\"detailRoute(fb.id)\" class=\"tbl__cell\">\n                      <span class=\"tbl__company\">{{ fb.companyName }}</span>\n                      <span v-if=\"fb.city\" class=\"tbl__city\">{{ fb.city }}</span>\n                    </RouterLink>\n                  </td>\n                  <td>\n                    <RouterLink :to=\"detailRoute(fb.id)\" class=\"tbl__cell\">\n                      <span v-if=\"fb.submittedBy\">{{ fb.submittedBy }}</span>\n                      <span v-else class=\"tbl__muted\">Onbekend</span>\n                    </RouterLink>\n                  </td>\n                  <td>\n                    <RouterLink :to=\"detailRoute(fb.id)\" class=\"tbl__cell tbl__glyphs\">\n                      <span\n                        v-for=\"a in ASPECTS\"\n                        :key=\"a.key\"\n                        class=\"glyph\"\n                        :class=\"`glyph--${aspectGlyph(fb.criteria[a.key]).tone}`\"\n                        :title=\"`${a.label}: ${aspectGlyph(fb.criteria[a.key]).verdict}`\"\n                      >\n                        <Icon :name=\"aspectGlyph(fb.criteria[a.key]).icon\" :size=\"14\" />\n                        <span class=\"sr-only\">{{ a.label }}: {{ aspectGlyph(fb.criteria[a.key]).verdict }}</span>\n                      </span>\n                    </RouterLink>\n                  </td>\n                  <td class=\"tbl__right\">\n                    <RouterLink :to=\"detailRoute(fb.id)\" class=\"tbl__cell tbl__cell--right tnum\"\n                                :class=\"`score--${scoreToken(fb.latestScore)}`\">\n                      {{ fb.latestScore === null ? \"-\" : fb.latestScore }}\n                    </RouterLink>\n                  </td>\n                  <td class=\"tbl__right\">\n                    <RouterLink :to=\"detailRoute(fb.id)\" class=\"tbl__cell tbl__cell--right tbl__muted\">\n                      {{ formatFeedbackDate(fb.createdAt) }}\n                    </RouterLink>\n                  </td>\n                  <td class=\"tbl__chevron\">\n                    <RouterLink :to=\"detailRoute(fb.id)\" class=\"tbl__cell tbl__cell--right\" aria-hidden=\"true\" tabindex=\"-1\">\n                      <Icon name=\"chevron--right\" :size=\"16\" />\n                    </RouterLink>\n                  </td>\n                </tr>\n              </tbody>\n            </table>\n          </div>\n        </div>\n\n        <p class=\"legend\">\n          <span class=\"legend__item glyph glyph--score\"><Icon name=\"checkmark\" :size=\"14\" />eens</span>\n          <span class=\"legend__item glyph glyph--danger\"><Icon name=\"close\" :size=\"14\" />oneens</span>\n          <span class=\"legend__item glyph glyph--neutral\"><Icon name=\"subtract\" :size=\"14\" />geen oordeel</span>\n          <span class=\"legend__order\">Volgorde: {{ aspectOrder }}</span>\n        </p>\n      </template>\n    </div>\n  </section>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, ref, watch } from \"vue\";\nimport { RouterLink } from \"vue-router\";\nimport Button from \"../components/ui/Button.vue\";\nimport EmptyState from \"../components/ui/EmptyState.vue\";\nimport Input from \"../components/ui/Input.vue\";\nimport Select from \"../components/ui/Select.vue\";\nimport SortCaret from \"../components/ui/SortCaret.vue\";\nimport Icon from \"../components/icons/Icon.vue\";\nimport { api } from \"../lib/api\";\nimport { scoreToSuitability, suitabilityToken } from \"../lib/rating\";\nimport {\n  ASPECTS,\n  XLSX_MIME_TYPE,\n  aspectGlyph,\n  downloadBase64File,\n  filterBySubmitter,\n  filterFeedback,\n  formatFeedbackDate,\n  loadSortState,\n  nextSortState,\n  saveSortState,\n  sortFeedback,\n  submitterOptions,\n  type FeedbackListRow,\n  type SortField,\n  type SortState,\n} from \"../lib/feedback-table\";\n\nconst feedback = ref<FeedbackListRow[]>([]);\nconst loading = ref(true);\nconst error = ref<string | null>(null);\nconst exporting = ref(false);\n\nconst filter = ref(\"\");\nconst submitter = ref(\"\");\nconst sort = ref<SortState>(loadSortState());\n\nconst submitters = computed(() => submitterOptions(feedback.value));\nconst submitterSelectOptions = computed(() => [\n  { value: \"\", label: \"Alle inzenders\" },\n  ...submitters.value.map((name) => ({ value: name, label: name })),\n]);\n\n// A reload can drop the chosen submitter from the data; without this the list\n// would silently show nothing and the dropdown would display a value that is\n// no longer an option.\nwatch(submitters, (names) => {\n  if (submitter.value && !names.includes(submitter.value)) submitter.value = \"\";\n});\n\nconst rows = computed(() => sortFeedback(\n  filterBySubmitter(filterFeedback(feedback.value, filter.value), submitter.value),\n  sort.value));\nconst aspectOrder = ASPECTS.map((a) => a.label).join(\" · \");\n\nfunction detailRoute(id: number) {\n  return { name: \"feedback-detail\", params: { id } };\n}\n\n// The kit prints the score as a bare right-aligned number on this screen (a\n// bar only on Locaties, where score is the ranking key). The colour still comes\n// from the one shared suitability scale, not from the kit's ad-hoc thresholds.\nfunction scoreToken(score: number | null) {\n  return suitabilityToken(scoreToSuitability(score));\n}\n\nfunction ariaSort(field: SortField) {\n  if (sort.value.field !== field) return undefined;\n  return sort.value.direction === \"asc\" ? \"ascending\" : \"descending\";\n}\n\nfunction applySort(field: SortField) {\n  sort.value = nextSortState(sort.value, field);\n  saveSortState(sort.value);\n}\n\nasync function load() {\n  loading.value = true;\n  error.value = null;\n  try {\n    // 0-arg: the stripped signature takes no params, so no `{}`.\n    feedback.value = (await api.findAllFeedback()).feedback;\n  } catch (err) {\n    error.value = err instanceof Error ? err.message : \"Kon de feedback niet laden.\";\n    feedback.value = [];\n  } finally {\n    loading.value = false;\n  }\n}\n\nasync function exportXlsx() {\n  exporting.value = true;\n  error.value = null;\n  try {\n    const { filename, base64 } = await api.exportFeedbackXlsx();\n    downloadBase64File({ filename, base64, mimeType: XLSX_MIME_TYPE });\n  } catch (err) {\n    error.value = err instanceof Error ? err.message : \"Exporteren is mislukt.\";\n  } finally {\n    exporting.value = false;\n  }\n}\n\nonMounted(load);\n</script>\n\n<style scoped>\n.feedback {\n  --font-sans: \"Nudica\", \"Helvetica Neue\", Arial, sans-serif;\n  display: flex;\n  flex: 1;\n  flex-direction: column;\n  min-height: 0;\n  min-width: 0;\n  font-family: var(--font-sans);\n}\n\n/* Kopband: volvlakke witte strook met hairline, 12px/16px op telefoon en\n   12px/20px vanaf tablet (gemeten in het kitscherm). */\n.feedback__head {\n  display: flex;\n  flex: none;\n  flex-direction: column;\n  gap: 8px;\n  padding: 12px 16px;\n  background: var(--bg-surface);\n  border-bottom: 1px solid var(--border-1);\n}\n\n.feedback__titlebar {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  flex-wrap: wrap;\n}\n\n.feedback__actions {\n  margin-left: auto;\n}\n\n.feedback__actions :deep(.btn) {\n  font-family: inherit;\n}\n\n.feedback__lead {\n  max-width: 80ch;\n  margin: 0;\n  color: var(--fg-3);\n  font-size: var(--text-ui);\n  line-height: 20px;\n}\n\n/* Het lijf staat op de paginagrond; de tabel zit in een eigen hairline-vlak. */\n.feedback__body {\n  display: flex;\n  flex-direction: column;\n  flex: 1;\n  gap: 16px;\n  min-height: 0;\n  min-width: 0;\n  padding: 16px;\n}\n\n.error {\n  flex: none;\n  margin: 0;\n  padding: 8px 12px;\n  background: var(--danger-bg);\n  border: 1px solid var(--danger-border);\n  border-radius: var(--radius);\n  color: var(--danger-fg);\n  font-size: var(--text-caption);\n}\n\n.msg {\n  padding: 48px 16px;\n  text-align: center;\n  color: var(--fg-3);\n  font-size: var(--text-ui);\n}\n\n.filters {\n  display: flex;\n  align-items: flex-end;\n  gap: 12px;\n  flex: none;\n  flex-wrap: wrap;\n}\n\n.filters__search {\n  flex: 1 1 220px;\n  min-width: 0;\n}\n\n.filters__submitter {\n  flex: 0 0 100%;\n}\n\n.count {\n  flex: none;\n  color: var(--fg-4);\n  font-size: var(--text-caption);\n  line-height: 16px;\n}\n\n.listbox {\n  display: flex;\n  flex-direction: column;\n  flex: 1;\n  min-height: 0;\n  min-width: 0;\n  background: var(--bg-surface);\n  border: 1px solid var(--border-1);\n  border-radius: var(--radius);\n}\n\n.listbox__scroll {\n  flex: 1;\n  min-height: 0;\n  overflow: auto;\n}\n\n.tbl {\n  width: 100%;\n  border-collapse: collapse;\n  font-size: var(--text-ui);\n}\n\n/* 32px-rijen en 16px zijpadding: de standaard van de kit, niet per tabel gekozen. */\n.tbl th,\n.tbl td {\n  height: 32px;\n  padding: 0 16px;\n  text-align: left;\n  border-bottom: 1px solid var(--border-1);\n  white-space: nowrap;\n}\n\n/* De cellen dragen een block-level link; de padding verhuist naar die link\n   zodat de hele 32px-cel aanklikbaar is. */\n.tbl tbody td {\n  padding: 0;\n}\n\n.tbl thead th {\n  position: sticky;\n  top: 0;\n  z-index: 1;\n  background: var(--bg-inset);\n  font-size: var(--text-caption);\n  font-weight: 600;\n  line-height: 16px;\n  letter-spacing: 0.32px;\n  text-transform: uppercase;\n  color: var(--fg-1);\n}\n\n/* Een <button> reset text-transform en font:inherit herstelt dat niet, dus een\n   sorteerbare kop heeft zijn eigen uppercase nodig. */\n.tbl__sort {\n  display: inline-flex;\n  align-items: center;\n  gap: 4px;\n  border: 0;\n  padding: 0;\n  background: transparent;\n  font: inherit;\n  font-size: var(--text-caption);\n  letter-spacing: 0.32px;\n  text-transform: uppercase;\n  color: inherit;\n  cursor: pointer;\n}\n\n.tbl__name {\n  width: 32%;\n}\n\n.tbl .tbl__right {\n  text-align: right;\n}\n\n.tbl__chevron {\n  width: 48px;\n}\n\n.tbl__cell {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  min-height: 32px;\n  padding: 0 16px;\n  color: var(--fg-1);\n  text-decoration: none;\n  cursor: pointer;\n}\n\n.tbl__cell--right {\n  justify-content: flex-end;\n}\n\n.tbl__name .tbl__cell {\n  flex-direction: column;\n  align-items: flex-start;\n  justify-content: center;\n  gap: 0;\n}\n\n/* heading-01 boven helper-01, zoals de kit: 18px plus 16px maakt een rij van\n   35px zodra er een plaats onder de naam staat. */\n.tbl__company {\n  font-weight: 600;\n  line-height: 18px;\n}\n\n.tbl__city {\n  color: var(--fg-4);\n  font-size: var(--text-caption);\n  line-height: 16px;\n}\n\n.tbl__muted {\n  color: var(--fg-3);\n}\n\n.tbl__glyphs {\n  gap: 6px;\n}\n\n.tbl__chevron .tbl__cell {\n  color: var(--fg-4);\n}\n\n.tbl__msg {\n  height: 96px;\n  text-align: center;\n  color: var(--fg-3);\n}\n\n@media (hover: hover) {\n  .tbl__row:hover {\n    background: var(--bg-inset);\n  }\n}\n\n/* Score als kaal getal, gekleurd op de gedeelde geschiktheidsschaal. */\n.score--score {\n  color: var(--score-fg);\n}\n\n.score--diverge {\n  color: var(--diverge-fg);\n}\n\n.score--danger {\n  color: var(--danger-fg);\n}\n\n.score--neutral {\n  color: var(--fg-5);\n}\n\n.glyph {\n  display: inline-flex;\n  align-items: center;\n  gap: 4px;\n}\n\n.glyph--score {\n  color: var(--score-fg);\n}\n\n.glyph--danger {\n  color: var(--danger-fg);\n}\n\n.glyph--neutral {\n  color: var(--fg-4);\n}\n\n.legend {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  gap: 12px;\n  flex: none;\n  margin: 0;\n  font-size: var(--text-caption);\n  color: var(--fg-3);\n}\n\n.legend__order {\n  color: var(--fg-4);\n}\n\n.sr-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  padding: 0;\n  overflow: hidden;\n  clip: rect(0 0 0 0);\n  white-space: nowrap;\n  border: 0;\n}\n\n@media (min-width: 720px) {\n  .feedback__head {\n    padding: 12px 20px;\n  }\n\n  .feedback__body {\n    padding: 20px;\n  }\n\n  .filters__submitter {\n    flex: 0 0 200px;\n  }\n}\n</style>\n","import { createElementVNode as _createElementVNode, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"feedback\" }\nconst _hoisted_2 = { class: \"feedback__head\" }\nconst _hoisted_3 = { class: \"feedback__titlebar\" }\nconst _hoisted_4 = { class: \"feedback__actions\" }\nconst _hoisted_5 = { class: \"feedback__body\" }\nconst _hoisted_6 = {\n  key: 0,\n  class: \"error\",\n  role: \"alert\"\n}\nconst _hoisted_7 = {\n  key: 1,\n  class: \"msg\"\n}\nconst _hoisted_8 = { class: \"filters\" }\nconst _hoisted_9 = { class: \"count tnum\" }\nconst _hoisted_10 = { class: \"listbox\" }\nconst _hoisted_11 = { class: \"listbox__scroll\" }\nconst _hoisted_12 = { class: \"tbl\" }\nconst _hoisted_13 = [\"aria-sort\"]\nconst _hoisted_14 = [\"aria-sort\"]\nconst _hoisted_15 = [\"aria-sort\"]\nconst _hoisted_16 = [\"aria-sort\"]\nconst _hoisted_17 = [\"aria-sort\"]\nconst _hoisted_18 = { key: 0 }\nconst _hoisted_19 = { class: \"tbl__name\" }\nconst _hoisted_20 = { class: \"tbl__company\" }\nconst _hoisted_21 = {\n  key: 0,\n  class: \"tbl__city\"\n}\nconst _hoisted_22 = { key: 0 }\nconst _hoisted_23 = {\n  key: 1,\n  class: \"tbl__muted\"\n}\nconst _hoisted_24 = [\"title\"]\nconst _hoisted_25 = { class: \"sr-only\" }\nconst _hoisted_26 = { class: \"tbl__right\" }\nconst _hoisted_27 = { class: \"tbl__right\" }\nconst _hoisted_28 = { class: \"tbl__chevron\" }\nconst _hoisted_29 = { class: \"legend\" }\nconst _hoisted_30 = { class: \"legend__item glyph glyph--score\" }\nconst _hoisted_31 = { class: \"legend__item glyph glyph--danger\" }\nconst _hoisted_32 = { class: \"legend__item glyph glyph--neutral\" }\nconst _hoisted_33 = { class: \"legend__order\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"section\", _hoisted_1, [\n    _createElementVNode(\"header\", _hoisted_2, [\n      _createElementVNode(\"div\", _hoisted_3, [\n        _cache[8] || (_cache[8] = _createElementVNode(\"h1\", { class: \"page-title\" }, \"Feedback\", -1 /* CACHED */)),\n        _createElementVNode(\"div\", _hoisted_4, [\n          _createCommentVNode(\" The Next admin also had a \\\"Check prompt-verbetering\\\" button\\n               (prompt-review-button.tsx), and the kit screen shows one too. It\\n               calls a Gemini worker endpoint that only exists once the headless\\n               worker lands in phase 5; deliberately not built here. \"),\n          _createVNode($setup[\"Button\"], {\n            busy: $setup.exporting,\n            onClick: $setup.exportXlsx\n          }, {\n            default: _withCtx(() => [\n              _createVNode($setup[\"Icon\"], { name: \"download\" }),\n              _cache[7] || (_cache[7] = _createTextVNode(\" Exporteren (XLSX) \", -1 /* CACHED */))\n            ]),\n            _: 1 /* STABLE */,\n            __: [7]\n          }, 8 /* PROPS */, [\"busy\"])\n        ])\n      ]),\n      _cache[9] || (_cache[9] = _createElementVNode(\"p\", { class: \"feedback__lead\" }, \" Veldfeedback van veldagenten op de AI-beoordelingen. Klik op een rij voor de volledige beoordeling naast de locatie-informatie. \", -1 /* CACHED */))\n    ]),\n    _createElementVNode(\"div\", _hoisted_5, [\n      ($setup.error)\n        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_6, _toDisplayString($setup.error), 1 /* TEXT */))\n        : _createCommentVNode(\"v-if\", true),\n      ($setup.loading)\n        ? (_openBlock(), _createElementBlock(\"div\", _hoisted_7, \"Laden...\"))\n        : ($setup.feedback.length === 0)\n          ? (_openBlock(), _createBlock($setup[\"EmptyState\"], {\n              key: 2,\n              icon: \"flag\",\n              title: \"Er is nog geen veldfeedback binnengekomen.\"\n            }))\n          : (_openBlock(), _createElementBlock(_Fragment, { key: 3 }, [\n              _createElementVNode(\"div\", _hoisted_8, [\n                _createVNode($setup[\"Input\"], {\n                  modelValue: $setup.filter,\n                  \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => (($setup.filter) = $event)),\n                  class: \"filters__search\",\n                  icon: \"search\",\n                  placeholder: \"Zoek op locatie, plaats of inzender\"\n                }, null, 8 /* PROPS */, [\"modelValue\"]),\n                _createVNode($setup[\"Select\"], {\n                  modelValue: $setup.submitter,\n                  \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => (($setup.submitter) = $event)),\n                  class: \"filters__submitter\",\n                  label: \"Inzender\",\n                  options: $setup.submitterSelectOptions\n                }, null, 8 /* PROPS */, [\"modelValue\", \"options\"])\n              ]),\n              _createElementVNode(\"span\", _hoisted_9, _toDisplayString($setup.rows.length) + \" van \" + _toDisplayString($setup.feedback.length) + \" beoordeling\" + _toDisplayString($setup.feedback.length === 1 ? \"\" : \"en\"), 1 /* TEXT */),\n              _createElementVNode(\"div\", _hoisted_10, [\n                _createElementVNode(\"div\", _hoisted_11, [\n                  _createElementVNode(\"table\", _hoisted_12, [\n                    _createElementVNode(\"thead\", null, [\n                      _createElementVNode(\"tr\", null, [\n                        _createElementVNode(\"th\", {\n                          class: \"tbl__name\",\n                          \"aria-sort\": $setup.ariaSort('companyName')\n                        }, [\n                          _createElementVNode(\"button\", {\n                            class: \"tbl__sort\",\n                            type: \"button\",\n                            onClick: _cache[2] || (_cache[2] = $event => ($setup.applySort('companyName')))\n                          }, [\n                            _cache[10] || (_cache[10] = _createTextVNode(\" Locatie \", -1 /* CACHED */)),\n                            _createVNode($setup[\"SortCaret\"], {\n                              active: $setup.sort.field === 'companyName',\n                              direction: $setup.sort.direction\n                            }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                          ])\n                        ], 8 /* PROPS */, _hoisted_13),\n                        _createElementVNode(\"th\", {\n                          \"aria-sort\": $setup.ariaSort('submittedBy')\n                        }, [\n                          _createElementVNode(\"button\", {\n                            class: \"tbl__sort\",\n                            type: \"button\",\n                            onClick: _cache[3] || (_cache[3] = $event => ($setup.applySort('submittedBy')))\n                          }, [\n                            _cache[11] || (_cache[11] = _createTextVNode(\" Inzender \", -1 /* CACHED */)),\n                            _createVNode($setup[\"SortCaret\"], {\n                              active: $setup.sort.field === 'submittedBy',\n                              direction: $setup.sort.direction\n                            }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                          ])\n                        ], 8 /* PROPS */, _hoisted_14),\n                        _createElementVNode(\"th\", {\n                          \"aria-sort\": $setup.ariaSort('disagreements')\n                        }, [\n                          _createElementVNode(\"button\", {\n                            class: \"tbl__sort\",\n                            type: \"button\",\n                            onClick: _cache[4] || (_cache[4] = $event => ($setup.applySort('disagreements')))\n                          }, [\n                            _cache[12] || (_cache[12] = _createTextVNode(\" Beoordeling \", -1 /* CACHED */)),\n                            _createVNode($setup[\"SortCaret\"], {\n                              active: $setup.sort.field === 'disagreements',\n                              direction: $setup.sort.direction\n                            }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                          ])\n                        ], 8 /* PROPS */, _hoisted_15),\n                        _createElementVNode(\"th\", {\n                          class: \"tbl__right\",\n                          \"aria-sort\": $setup.ariaSort('latestScore')\n                        }, [\n                          _createElementVNode(\"button\", {\n                            class: \"tbl__sort\",\n                            type: \"button\",\n                            onClick: _cache[5] || (_cache[5] = $event => ($setup.applySort('latestScore')))\n                          }, [\n                            _cache[13] || (_cache[13] = _createTextVNode(\" Score \", -1 /* CACHED */)),\n                            _createVNode($setup[\"SortCaret\"], {\n                              active: $setup.sort.field === 'latestScore',\n                              direction: $setup.sort.direction\n                            }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                          ])\n                        ], 8 /* PROPS */, _hoisted_16),\n                        _createElementVNode(\"th\", {\n                          class: \"tbl__right\",\n                          \"aria-sort\": $setup.ariaSort('createdAt')\n                        }, [\n                          _createElementVNode(\"button\", {\n                            class: \"tbl__sort\",\n                            type: \"button\",\n                            onClick: _cache[6] || (_cache[6] = $event => ($setup.applySort('createdAt')))\n                          }, [\n                            _cache[14] || (_cache[14] = _createTextVNode(\" Datum \", -1 /* CACHED */)),\n                            _createVNode($setup[\"SortCaret\"], {\n                              active: $setup.sort.field === 'createdAt',\n                              direction: $setup.sort.direction\n                            }, null, 8 /* PROPS */, [\"active\", \"direction\"])\n                          ])\n                        ], 8 /* PROPS */, _hoisted_17),\n                        _cache[15] || (_cache[15] = _createElementVNode(\"th\", { class: \"tbl__chevron\" }, null, -1 /* CACHED */))\n                      ])\n                    ]),\n                    _createElementVNode(\"tbody\", null, [\n                      ($setup.rows.length === 0)\n                        ? (_openBlock(), _createElementBlock(\"tr\", _hoisted_18, _cache[16] || (_cache[16] = [\n                            _createElementVNode(\"td\", {\n                              class: \"tbl__msg\",\n                              colspan: \"6\"\n                            }, \"Geen beoordelingen voor dit filter.\", -1 /* CACHED */)\n                          ])))\n                        : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n                            _createCommentVNode(\" Every cell is the same RouterLink so the whole row is the\\n                     target, without a click handler on the <tr> that would fight\\n                     text selection and middle-click. \"),\n                            (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.rows, (fb) => {\n                              return (_openBlock(), _createElementBlock(\"tr\", {\n                                key: fb.id,\n                                class: \"tbl__row\"\n                              }, [\n                                _createElementVNode(\"td\", _hoisted_19, [\n                                  _createVNode($setup[\"RouterLink\"], {\n                                    to: $setup.detailRoute(fb.id),\n                                    class: \"tbl__cell\"\n                                  }, {\n                                    default: _withCtx(() => [\n                                      _createElementVNode(\"span\", _hoisted_20, _toDisplayString(fb.companyName), 1 /* TEXT */),\n                                      (fb.city)\n                                        ? (_openBlock(), _createElementBlock(\"span\", _hoisted_21, _toDisplayString(fb.city), 1 /* TEXT */))\n                                        : _createCommentVNode(\"v-if\", true)\n                                    ]),\n                                    _: 2 /* DYNAMIC */\n                                  }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"])\n                                ]),\n                                _createElementVNode(\"td\", null, [\n                                  _createVNode($setup[\"RouterLink\"], {\n                                    to: $setup.detailRoute(fb.id),\n                                    class: \"tbl__cell\"\n                                  }, {\n                                    default: _withCtx(() => [\n                                      (fb.submittedBy)\n                                        ? (_openBlock(), _createElementBlock(\"span\", _hoisted_22, _toDisplayString(fb.submittedBy), 1 /* TEXT */))\n                                        : (_openBlock(), _createElementBlock(\"span\", _hoisted_23, \"Onbekend\"))\n                                    ]),\n                                    _: 2 /* DYNAMIC */\n                                  }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"])\n                                ]),\n                                _createElementVNode(\"td\", null, [\n                                  _createVNode($setup[\"RouterLink\"], {\n                                    to: $setup.detailRoute(fb.id),\n                                    class: \"tbl__cell tbl__glyphs\"\n                                  }, {\n                                    default: _withCtx(() => [\n                                      (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.ASPECTS, (a) => {\n                                        return (_openBlock(), _createElementBlock(\"span\", {\n                                          key: a.key,\n                                          class: _normalizeClass([\"glyph\", `glyph--${$setup.aspectGlyph(fb.criteria[a.key]).tone}`]),\n                                          title: `${a.label}: ${$setup.aspectGlyph(fb.criteria[a.key]).verdict}`\n                                        }, [\n                                          _createVNode($setup[\"Icon\"], {\n                                            name: $setup.aspectGlyph(fb.criteria[a.key]).icon,\n                                            size: 14\n                                          }, null, 8 /* PROPS */, [\"name\"]),\n                                          _createElementVNode(\"span\", _hoisted_25, _toDisplayString(a.label) + \": \" + _toDisplayString($setup.aspectGlyph(fb.criteria[a.key]).verdict), 1 /* TEXT */)\n                                        ], 10 /* CLASS, PROPS */, _hoisted_24))\n                                      }), 128 /* KEYED_FRAGMENT */))\n                                    ]),\n                                    _: 2 /* DYNAMIC */\n                                  }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"])\n                                ]),\n                                _createElementVNode(\"td\", _hoisted_26, [\n                                  _createVNode($setup[\"RouterLink\"], {\n                                    to: $setup.detailRoute(fb.id),\n                                    class: _normalizeClass([\"tbl__cell tbl__cell--right tnum\", `score--${$setup.scoreToken(fb.latestScore)}`])\n                                  }, {\n                                    default: _withCtx(() => [\n                                      _createTextVNode(_toDisplayString(fb.latestScore === null ? \"-\" : fb.latestScore), 1 /* TEXT */)\n                                    ]),\n                                    _: 2 /* DYNAMIC */\n                                  }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\", \"class\"])\n                                ]),\n                                _createElementVNode(\"td\", _hoisted_27, [\n                                  _createVNode($setup[\"RouterLink\"], {\n                                    to: $setup.detailRoute(fb.id),\n                                    class: \"tbl__cell tbl__cell--right tbl__muted\"\n                                  }, {\n                                    default: _withCtx(() => [\n                                      _createTextVNode(_toDisplayString($setup.formatFeedbackDate(fb.createdAt)), 1 /* TEXT */)\n                                    ]),\n                                    _: 2 /* DYNAMIC */\n                                  }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"])\n                                ]),\n                                _createElementVNode(\"td\", _hoisted_28, [\n                                  _createVNode($setup[\"RouterLink\"], {\n                                    to: $setup.detailRoute(fb.id),\n                                    class: \"tbl__cell tbl__cell--right\",\n                                    \"aria-hidden\": \"true\",\n                                    tabindex: \"-1\"\n                                  }, {\n                                    default: _withCtx(() => [\n                                      _createVNode($setup[\"Icon\"], {\n                                        name: \"chevron--right\",\n                                        size: 16\n                                      })\n                                    ]),\n                                    _: 2 /* DYNAMIC */\n                                  }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"])\n                                ])\n                              ]))\n                            }), 128 /* KEYED_FRAGMENT */))\n                          ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */))\n                    ])\n                  ])\n                ])\n              ]),\n              _createElementVNode(\"p\", _hoisted_29, [\n                _createElementVNode(\"span\", _hoisted_30, [\n                  _createVNode($setup[\"Icon\"], {\n                    name: \"checkmark\",\n                    size: 14\n                  }),\n                  _cache[17] || (_cache[17] = _createTextVNode(\"eens\", -1 /* CACHED */))\n                ]),\n                _createElementVNode(\"span\", _hoisted_31, [\n                  _createVNode($setup[\"Icon\"], {\n                    name: \"close\",\n                    size: 14\n                  }),\n                  _cache[18] || (_cache[18] = _createTextVNode(\"oneens\", -1 /* CACHED */))\n                ]),\n                _createElementVNode(\"span\", _hoisted_32, [\n                  _createVNode($setup[\"Icon\"], {\n                    name: \"subtract\",\n                    size: 14\n                  }),\n                  _cache[19] || (_cache[19] = _createTextVNode(\"geen oordeel\", -1 /* CACHED */))\n                ]),\n                _createElementVNode(\"span\", _hoisted_33, \"Volgorde: \" + _toDisplayString($setup.aspectOrder), 1 /* TEXT */)\n              ])\n            ], 64 /* STABLE_FRAGMENT */))\n    ])\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/FeedbackView.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/FeedbackView.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/FeedbackView.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/FeedbackView.vue\";script.__scopeId = \"data-v-7ae0a81d\";export default script;","<template>\n  <section class=\"assessment\">\n    <header class=\"assessment__head\">\n      <div class=\"assessment__titlebar\">\n        <div class=\"assessment__ident\">\n          <h1 class=\"page-title\">{{ title }}</h1>\n          <span v-if=\"subtitle\" class=\"assessment__sub\">{{ subtitle }}</span>\n        </div>\n        <RouterLink :to=\"{ name: 'feedback' }\" class=\"assessment__back\">\n          Terug naar feedback\n          <Icon name=\"arrow--right\" :size=\"16\" />\n        </RouterLink>\n      </div>\n    </header>\n\n    <div class=\"assessment__body\">\n      <p v-if=\"error\" class=\"error\" role=\"alert\">{{ error }}</p>\n\n      <div v-else-if=\"loading\" class=\"msg\">Laden...</div>\n\n      <EmptyState\n        v-else-if=\"!feedback\"\n        icon=\"search\"\n        title=\"Deze beoordeling bestaat niet (meer).\"\n      />\n\n      <div v-else class=\"cols\">\n        <!-- Links: de beoordeling zelf -->\n        <div class=\"stack\">\n          <!-- Score, eindoordeel en de twee snelkoppelingen in één strook, zoals\n               het kitscherm: de eindscore is het eerste dat je wil zien. -->\n          <Panel class=\"verdict\">\n            <div class=\"verdict__row\">\n              <span class=\"verdict__score tnum\" :class=\"`verdict__score--${scoreToken(feedback.latestScore)}`\">\n                {{ feedback.latestScore === null ? \"-\" : feedback.latestScore }}\n              </span>\n              <div class=\"verdict__ident\">\n                <span class=\"eyebrow\">Eindoordeel</span>\n                <span class=\"verdict__label\" :class=\"`verdict__label--${overall.tone}`\">\n                  <Icon :name=\"overall.icon\" :size=\"18\" />\n                  {{ overall.label }}\n                </span>\n              </div>\n              <div class=\"verdict__links\">\n                <RouterLink :to=\"{ name: 'location-detail', params: { id: feedback.locationId } }\" class=\"linkbtn\">\n                  <Icon name=\"location\" :size=\"16\" />\n                  Open locatie\n                </RouterLink>\n                <RouterLink :to=\"analysisDetailRoute({ locationId: feedback.locationId, analysisId: feedback.analysisId })\" class=\"linkbtn\">\n                  <Icon name=\"analytics\" :size=\"16\" />\n                  Open analyse\n                </RouterLink>\n              </div>\n            </div>\n            <p v-if=\"feedback.reasonOverallRating\" class=\"verdict__reason\">\n              {{ maskPii(feedback.reasonOverallRating) }}\n            </p>\n          </Panel>\n\n          <Panel title=\"Beoordeling per dimensie\" flush>\n            <ul class=\"dims\">\n              <li v-for=\"d in feedback.dimensions\" :key=\"d.key\" class=\"dim\">\n                <div class=\"dim__head\">\n                  <span class=\"dim__label\">{{ DIMENSION_LABELS[d.key] }}</span>\n                  <RatingBadge :rating=\"d.rating\" />\n                </div>\n                <div v-if=\"d.aiExplanation\" class=\"dim__block\">\n                  <span class=\"eyebrow\">AI-beoordeling</span>\n                  <p class=\"dim__text dim__text--ai\">{{ d.aiExplanation }}</p>\n                </div>\n                <div v-if=\"d.reason\" class=\"dim__block dim__block--agent\">\n                  <span class=\"eyebrow eyebrow--agent\">Reactie veldwerker</span>\n                  <p class=\"dim__text\">{{ maskPii(d.reason) }}</p>\n                </div>\n              </li>\n            </ul>\n          </Panel>\n\n          <Panel v-if=\"feedback.aiMissesNotes || feedback.generalNotes\" title=\"Opmerkingen\">\n            <div class=\"notes\">\n              <div v-if=\"feedback.aiMissesNotes\" class=\"dim__block dim__block--agent\">\n                <span class=\"eyebrow eyebrow--agent\">Wat de AI mist</span>\n                <p class=\"dim__text\">{{ maskPii(feedback.aiMissesNotes) }}</p>\n              </div>\n              <div v-if=\"feedback.generalNotes\" class=\"dim__block dim__block--agent\">\n                <span class=\"eyebrow eyebrow--agent\">Algemene opmerkingen</span>\n                <p class=\"dim__text\">{{ maskPii(feedback.generalNotes) }}</p>\n              </div>\n            </div>\n          </Panel>\n        </div>\n\n        <!-- Rechts: de locatie -->\n        <aside class=\"stack\">\n          <Panel title=\"Locatie-informatie\">\n            <template v-if=\"location\">\n              <!-- Eigen label/waarde-raster met een 96px labelkolom, zoals in de\n                   kit: een StructuredList-labelkolom is te breed voor deze\n                   smalle kolom. -->\n              <dl class=\"loc\">\n                <div v-for=\"fact in facts\" :key=\"fact.label\" class=\"loc__row\">\n                  <dt class=\"loc__key\">{{ fact.label }}</dt>\n                  <dd class=\"loc__val\" :class=\"{ 'loc__val--dash': fact.dash }\">{{ fact.value }}</dd>\n                </div>\n              </dl>\n              <div v-if=\"location.requiresHumanReview\" class=\"loc__flag\">\n                <Badge tone=\"diverge\">Menselijke review nodig</Badge>\n              </div>\n              <div class=\"loc__links\">\n                <a v-if=\"location.website\" :href=\"location.website\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"loc__link\">\n                  <span class=\"loc__link-text\">{{ location.website.replace(/^https?:\\/\\//, \"\") }}</span>\n                  <Icon name=\"launch\" :size=\"14\" class=\"loc__link-icon\" />\n                </a>\n                <a v-if=\"coordinates\" :href=\"googleMapsUrl(coordinates)\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"loc__link\">\n                  <span class=\"loc__link-text\">Open in Google Maps</span>\n                  <Icon name=\"launch\" :size=\"14\" class=\"loc__link-icon\" />\n                </a>\n              </div>\n            </template>\n            <p v-else class=\"loc__none\">Locatie-informatie niet beschikbaar.</p>\n          </Panel>\n\n          <Panel title=\"Foto's\">\n            <p v-if=\"imagesLoading\" class=\"loc__none\">Foto's laden...</p>\n            <p v-else-if=\"imagesError\" class=\"error\" role=\"alert\">{{ imagesError }}</p>\n            <LocationImageGallery v-else :images=\"images\" :coordinates=\"coordinates\" />\n          </Panel>\n        </aside>\n      </div>\n    </div>\n  </section>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, h, onActivated, onMounted, ref, watch } from \"vue\";\nimport { RouterLink } from \"vue-router\";\nimport Badge from \"../components/ui/Badge.vue\";\nimport EmptyState from \"../components/ui/EmptyState.vue\";\nimport Panel from \"../components/ui/Panel.vue\";\nimport Icon from \"../components/icons/Icon.vue\";\nimport LocationImageGallery from \"../components/locations/LocationImageGallery.vue\";\nimport type { LocationImage } from \"../lib/location-images\";\nimport { api } from \"../lib/api\";\nimport { googleMapsUrl } from \"../lib/maps\";\nimport { analysisDetailRoute } from \"../lib/nav\";\nimport { scoreToSuitability, suitabilityToken } from \"../lib/rating\";\nimport { DIMENSION_LABELS, maskPii } from \"../lib/feedback-export\";\nimport { formatFeedbackDateTime } from \"../lib/feedback-table\";\nimport { formatLocationType } from \"../lib/location-type\";\nimport { setCrumbLabel } from \"../lib/shell-chrome\";\n\ntype FeedbackDetail = NonNullable<Awaited<ReturnType<typeof api.findFeedbackById>>[\"feedback\"]>;\ntype LocationRow = NonNullable<Awaited<ReturnType<typeof api.findLocationById>>[\"location\"]>;\n\nconst props = defineProps<{ id: number }>();\n\nconst feedback = ref<FeedbackDetail | null>(null);\nconst location = ref<LocationRow | null>(null);\nconst loading = ref(true);\nconst error = ref<string | null>(null);\nconst images = ref<LocationImage[]>([]);\nconst imagesLoading = ref(false);\nconst imagesError = ref<string | null>(null);\nconst coordinates = computed(() => location.value?.latitude != null && location.value.longitude != null\n  ? { lat: location.value.latitude, lng: location.value.longitude }\n  : null);\n\nwatch(() => feedback.value?.locationId, async (locationId, _previous, onCleanup) => {\n  let active = true;\n  onCleanup(() => { active = false; });\n  images.value = [];\n  imagesError.value = null;\n  imagesLoading.value = Boolean(locationId);\n  if (!locationId) return;\n  try {\n    const result = await api.getLocationImages({ locationId });\n    if (active) images.value = result.images;\n  } catch (err) {\n    if (active) imagesError.value = err instanceof Error ? err.message : \"Kon de foto's niet laden.\";\n  } finally {\n    if (active) imagesLoading.value = false;\n  }\n});\n\nconst title = computed(() => feedback.value?.companyName ?? `Beoordeling #${props.id}`);\nconst subtitle = computed(() => feedback.value\n  ? `Beoordeling door ${feedback.value.submittedBy ?? \"onbekend\"} · ${formatFeedbackDateTime(feedback.value.createdAt)}`\n  : undefined);\n\nconst OVERALL = {\n  agree: { label: \"Eens\", tone: \"score\", icon: \"checkmark--outline\" },\n  disagree: { label: \"Oneens\", tone: \"danger\", icon: \"close--outline\" },\n  none: { label: \"Geen eindoordeel\", tone: \"neutral\", icon: \"subtract--alt\" },\n} as const;\n\nconst overall = computed(() => {\n  const rating = feedback.value?.overallRating;\n  if (rating === \"agree\") return OVERALL.agree;\n  if (rating === \"disagree\") return OVERALL.disagree;\n  return OVERALL.none;\n});\n\nfunction scoreToken(score: number | null) {\n  return suitabilityToken(scoreToSuitability(score));\n}\n\n// Alle feitregels op één rij-model, zodat het 96px-raster van de kit één keer\n// beschreven staat. `dash` markeert een leeg gegeven zodat het streepje\n// gedempt tekent in plaats van als echte waarde te lezen.\nconst facts = computed(() => {\n  const loc = location.value;\n  if (!loc) return [];\n  const rows: Array<{ label: string; value: string; dash?: boolean }> = [\n    { label: \"Adres\", value: [loc.address, [loc.postalCode, loc.city].filter(Boolean).join(\" \")].filter(Boolean).join(\", \") || \"-\" },\n    { label: \"Type\", value: formatLocationType(loc.locationType) },\n  ];\n  if (loc.province) rows.push({ label: \"Provincie\", value: loc.province });\n  if (loc.kvk) rows.push({ label: \"KVK\", value: String(loc.kvk) });\n  const score = loc.latestScore;\n  rows.push(score === null || score === undefined\n    ? { label: \"Laatste score\", value: \"-\", dash: true }\n    : { label: \"Laatste score\", value: String(score) });\n  if (loc.phone) rows.push({ label: \"Telefoon\", value: loc.phone });\n  if (coordinates.value) rows.push({ label: \"Coördinaten\", value: `${coordinates.value.lat}, ${coordinates.value.lng}` });\n  return rows;\n});\n\n// Eens/Oneens as a soft pill; anything else is a dash. Inline render function\n// rather than a fourth component file for a three-line mapping.\nconst RatingBadge = (p: { rating: string | null }) => {\n  if (p.rating === \"agree\") return h(Badge, { tone: \"score\" }, () => \"Eens\");\n  if (p.rating === \"disagree\") return h(Badge, { tone: \"danger\" }, () => \"Oneens\");\n  return h(\"span\", { class: \"rating-dash\" }, \"-\");\n};\n\nasync function load() {\n  loading.value = true;\n  error.value = null;\n  feedback.value = null;\n  location.value = null;\n  try {\n    const result = await api.findFeedbackById({ feedbackId: props.id });\n    feedback.value = result.feedback;\n    if (result.feedback) setCrumbLabel(\"feedback-detail\", result.feedback.companyName);\n  } catch (err) {\n    error.value = err instanceof Error ? err.message : \"Kon de beoordeling niet laden.\";\n    loading.value = false;\n    return;\n  }\n  // Location info is best-effort: a missing location must not hide the review.\n  if (feedback.value) {\n    try {\n      location.value = (await api.findLocationById({ id: feedback.value.locationId })).location;\n    } catch {\n      location.value = null;\n    }\n  }\n  loading.value = false;\n}\n\nonMounted(load);\n// Het kruimel-label geldt per ROUTE, niet per pad, dus de tab ernaast kan hem\n// hebben overschreven. Bij terugkeren claimt deze pagina hem opnieuw uit wat hij\n// al geladen heeft, zonder te wachten op een nieuwe fetch.\nonActivated(() => {\n  const name = feedback.value?.companyName;\n  if (name) setCrumbLabel(\"feedback-detail\", name);\n});\n// Vangnet: elke beoordeling heeft zijn eigen tab en dus zijn eigen instance,\n// maar een hergebruikte instance moet wel opnieuw laden.\nwatch(() => props.id, load);\n</script>\n\n<style scoped>\n.assessment {\n  --font-sans: \"Nudica\", \"Helvetica Neue\", Arial, sans-serif;\n  display: flex;\n  flex-direction: column;\n  min-width: 0;\n  font-family: var(--font-sans);\n}\n\n.assessment__head {\n  display: flex;\n  flex: none;\n  flex-direction: column;\n  gap: 8px;\n  padding: 12px 16px;\n  background: var(--bg-surface);\n  border-bottom: 1px solid var(--border-1);\n}\n\n.assessment__titlebar {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  flex-wrap: wrap;\n  min-width: 0;\n}\n\n.assessment__ident {\n  display: flex;\n  flex: 1;\n  flex-direction: column;\n  gap: 2px;\n  min-width: 0;\n}\n\n.assessment__sub {\n  color: var(--fg-4);\n  font-size: var(--text-caption);\n  line-height: 16px;\n}\n\n.assessment__back {\n  display: inline-flex;\n  align-items: center;\n  flex: none;\n  gap: 6px;\n  height: 32px;\n  padding: 0 12px;\n  color: var(--fg-2);\n  font-size: var(--text-ui);\n  cursor: pointer;\n}\n\n.assessment__body {\n  padding: 16px;\n  min-width: 0;\n}\n\n@media (hover: hover) {\n  .assessment__back:hover {\n    background: var(--bg-inset);\n  }\n  .linkbtn:hover {\n    background: var(--bg-inset);\n  }\n  .loc__link:hover .loc__link-text {\n    text-decoration-thickness: 2px;\n  }\n}\n\n.error {\n  margin: 0;\n  padding: 8px 12px;\n  background: var(--danger-bg);\n  border: 1px solid var(--danger-border);\n  border-radius: var(--radius);\n  color: var(--danger-fg);\n  font-size: var(--text-caption);\n}\n\n.msg {\n  padding: 48px 16px;\n  text-align: center;\n  color: var(--fg-3);\n  font-size: var(--text-ui);\n}\n\n.cols {\n  display: grid;\n  grid-template-columns: minmax(0, 1fr);\n  gap: 16px;\n  align-items: start;\n}\n\n.stack {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  min-width: 0;\n}\n\n/* ---- eindoordeelstrook ---- */\n\n.verdict__row {\n  display: flex;\n  align-items: center;\n  gap: 16px;\n  flex-wrap: wrap;\n}\n\n.verdict__score {\n  font-size: 40px;\n  font-weight: 600;\n  line-height: 1;\n}\n\n.verdict__score--score {\n  color: var(--score-fg);\n}\n\n.verdict__score--diverge {\n  color: var(--diverge-fg);\n}\n\n.verdict__score--danger {\n  color: var(--danger-fg);\n}\n\n.verdict__score--neutral {\n  color: var(--fg-5);\n}\n\n.verdict__ident {\n  display: flex;\n  flex-direction: column;\n  gap: 2px;\n}\n\n.verdict__label {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  font-size: 16px;\n  font-weight: 600;\n  line-height: 22px;\n}\n\n.verdict__label--score {\n  color: var(--score-fg);\n}\n\n.verdict__label--danger {\n  color: var(--danger-fg);\n}\n\n.verdict__label--neutral {\n  color: var(--fg-3);\n}\n\n.verdict__links {\n  display: flex;\n  gap: 8px;\n  flex-wrap: wrap;\n}\n\n.linkbtn {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  height: 32px;\n  padding: 0 12px;\n  color: var(--fg-2);\n  font-size: var(--text-ui);\n  cursor: pointer;\n}\n\n.verdict__reason {\n  margin: 12px 0 0;\n  color: var(--fg-2);\n  font-size: var(--text-ui);\n  white-space: pre-wrap;\n}\n\n.rating-dash {\n  color: var(--fg-5);\n  font-size: var(--text-caption);\n}\n\n/* ---- dimensies ---- */\n\n.dims {\n  margin: 0;\n  padding: 0;\n  list-style: none;\n}\n\n.dim {\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n  padding: 12px 16px;\n  border-bottom: 1px solid var(--border-1);\n}\n\n.dim:last-child {\n  border-bottom: 0;\n}\n\n.dim__head {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 8px;\n}\n\n.dim__label {\n  font-size: var(--text-ui);\n  font-weight: 600;\n  line-height: 18px;\n  color: var(--fg-1);\n}\n\n/* Geen kader en geen vlak: de kit zet een 2px verticale streep langs de tekst,\n   in de rand-hairline voor de AI en in het foutrood voor de veldwerker. */\n.dim__block {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n  padding-left: 12px;\n  border-left: 2px solid var(--border-1);\n}\n\n.dim__block--agent {\n  border-left-color: var(--danger);\n}\n\n.eyebrow--agent {\n  color: var(--danger-fg);\n}\n\n.dim__text {\n  max-width: 72ch;\n  margin: 0;\n  font-size: var(--text-ui);\n  line-height: 20px;\n  color: var(--fg-1);\n  white-space: pre-wrap;\n}\n\n.dim__text--ai {\n  color: var(--fg-3);\n}\n\n.notes {\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n}\n\n/* ---- locatie-informatie ---- */\n\n.loc {\n  display: flex;\n  flex-direction: column;\n  margin: 0;\n}\n\n.loc__row {\n  display: grid;\n  grid-template-columns: 96px minmax(0, 1fr);\n  gap: 12px;\n  align-items: baseline;\n  padding: 7px 0;\n  border-top: 1px solid var(--border-1);\n}\n\n.loc__row:first-child {\n  border-top: 0;\n  padding-top: 0;\n}\n\n.loc__key {\n  color: var(--fg-4);\n  font-size: var(--text-caption);\n  line-height: 16px;\n}\n\n.loc__val {\n  margin: 0;\n  overflow-wrap: anywhere;\n  color: var(--fg-1);\n  font-size: var(--text-ui);\n}\n\n.loc__val--dash {\n  color: var(--fg-5);\n}\n\n.loc__flag {\n  margin-top: 10px;\n}\n\n.loc__links {\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  gap: 6px;\n  margin-top: 10px;\n}\n\n.loc__link {\n  display: flex;\n  align-items: center;\n  gap: 4px;\n  max-width: 100%;\n  min-width: 0;\n  color: var(--info-fg);\n  font-size: var(--text-ui);\n  cursor: pointer;\n}\n\n/* De ellipsis hoort op de tekst, niet op de link: met overflow op de link\n   verdwijnt het externe-link-icoon achter de rand van het smalle paneel. */\n.loc__link-text {\n  min-width: 0;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  text-decoration: underline;\n}\n\n.loc__link-icon {\n  flex: none;\n}\n\n.loc__none {\n  margin: 0;\n  color: var(--fg-3);\n  font-size: var(--text-ui);\n}\n\n.assessment :deep(.badge) {\n  border-radius: var(--radius-lg);\n  font-family: inherit;\n}\n\n@media (min-width: 720px) {\n  .assessment__head {\n    padding: 12px 20px;\n  }\n\n  .assessment__body {\n    padding: 20px;\n  }\n\n  .verdict__links {\n    margin-left: auto;\n  }\n\n  /* Twee kolommen vanaf tablet, niet pas vanaf desktop: dat is de grens die\n     het kitscherm zelf aanhoudt (mobiel < 720). */\n  .cols {\n    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);\n  }\n}\n</style>\n","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createBlock as _createBlock, normalizeClass as _normalizeClass, renderList as _renderList, Fragment as _Fragment } from \"vue\"\n\nconst _hoisted_1 = { class: \"assessment\" }\nconst _hoisted_2 = { class: \"assessment__head\" }\nconst _hoisted_3 = { class: \"assessment__titlebar\" }\nconst _hoisted_4 = { class: \"assessment__ident\" }\nconst _hoisted_5 = { class: \"page-title\" }\nconst _hoisted_6 = {\n  key: 0,\n  class: \"assessment__sub\"\n}\nconst _hoisted_7 = { class: \"assessment__body\" }\nconst _hoisted_8 = {\n  key: 0,\n  class: \"error\",\n  role: \"alert\"\n}\nconst _hoisted_9 = {\n  key: 1,\n  class: \"msg\"\n}\nconst _hoisted_10 = {\n  key: 3,\n  class: \"cols\"\n}\nconst _hoisted_11 = { class: \"stack\" }\nconst _hoisted_12 = { class: \"verdict__row\" }\nconst _hoisted_13 = { class: \"verdict__ident\" }\nconst _hoisted_14 = { class: \"verdict__links\" }\nconst _hoisted_15 = {\n  key: 0,\n  class: \"verdict__reason\"\n}\nconst _hoisted_16 = { class: \"dims\" }\nconst _hoisted_17 = { class: \"dim__head\" }\nconst _hoisted_18 = { class: \"dim__label\" }\nconst _hoisted_19 = {\n  key: 0,\n  class: \"dim__block\"\n}\nconst _hoisted_20 = { class: \"dim__text dim__text--ai\" }\nconst _hoisted_21 = {\n  key: 1,\n  class: \"dim__block dim__block--agent\"\n}\nconst _hoisted_22 = { class: \"dim__text\" }\nconst _hoisted_23 = { class: \"notes\" }\nconst _hoisted_24 = {\n  key: 0,\n  class: \"dim__block dim__block--agent\"\n}\nconst _hoisted_25 = { class: \"dim__text\" }\nconst _hoisted_26 = {\n  key: 1,\n  class: \"dim__block dim__block--agent\"\n}\nconst _hoisted_27 = { class: \"dim__text\" }\nconst _hoisted_28 = { class: \"stack\" }\nconst _hoisted_29 = { class: \"loc\" }\nconst _hoisted_30 = { class: \"loc__key\" }\nconst _hoisted_31 = {\n  key: 0,\n  class: \"loc__flag\"\n}\nconst _hoisted_32 = { class: \"loc__links\" }\nconst _hoisted_33 = [\"href\"]\nconst _hoisted_34 = { class: \"loc__link-text\" }\nconst _hoisted_35 = [\"href\"]\nconst _hoisted_36 = {\n  key: 1,\n  class: \"loc__none\"\n}\nconst _hoisted_37 = {\n  key: 0,\n  class: \"loc__none\"\n}\nconst _hoisted_38 = {\n  key: 1,\n  class: \"error\",\n  role: \"alert\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"section\", _hoisted_1, [\n    _createElementVNode(\"header\", _hoisted_2, [\n      _createElementVNode(\"div\", _hoisted_3, [\n        _createElementVNode(\"div\", _hoisted_4, [\n          _createElementVNode(\"h1\", _hoisted_5, _toDisplayString($setup.title), 1 /* TEXT */),\n          ($setup.subtitle)\n            ? (_openBlock(), _createElementBlock(\"span\", _hoisted_6, _toDisplayString($setup.subtitle), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true)\n        ]),\n        _createVNode($setup[\"RouterLink\"], {\n          to: { name: 'feedback' },\n          class: \"assessment__back\"\n        }, {\n          default: _withCtx(() => [\n            _cache[0] || (_cache[0] = _createTextVNode(\" Terug naar feedback \", -1 /* CACHED */)),\n            _createVNode($setup[\"Icon\"], {\n              name: \"arrow--right\",\n              size: 16\n            })\n          ]),\n          _: 1 /* STABLE */,\n          __: [0]\n        })\n      ])\n    ]),\n    _createElementVNode(\"div\", _hoisted_7, [\n      ($setup.error)\n        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_8, _toDisplayString($setup.error), 1 /* TEXT */))\n        : ($setup.loading)\n          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_9, \"Laden...\"))\n          : (!$setup.feedback)\n            ? (_openBlock(), _createBlock($setup[\"EmptyState\"], {\n                key: 2,\n                icon: \"search\",\n                title: \"Deze beoordeling bestaat niet (meer).\"\n              }))\n            : (_openBlock(), _createElementBlock(\"div\", _hoisted_10, [\n                _createCommentVNode(\" Links: de beoordeling zelf \"),\n                _createElementVNode(\"div\", _hoisted_11, [\n                  _createCommentVNode(\" Score, eindoordeel en de twee snelkoppelingen in één strook, zoals\\n               het kitscherm: de eindscore is het eerste dat je wil zien. \"),\n                  _createVNode($setup[\"Panel\"], { class: \"verdict\" }, {\n                    default: _withCtx(() => [\n                      _createElementVNode(\"div\", _hoisted_12, [\n                        _createElementVNode(\"span\", {\n                          class: _normalizeClass([\"verdict__score tnum\", `verdict__score--${$setup.scoreToken($setup.feedback.latestScore)}`])\n                        }, _toDisplayString($setup.feedback.latestScore === null ? \"-\" : $setup.feedback.latestScore), 3 /* TEXT, CLASS */),\n                        _createElementVNode(\"div\", _hoisted_13, [\n                          _cache[1] || (_cache[1] = _createElementVNode(\"span\", { class: \"eyebrow\" }, \"Eindoordeel\", -1 /* CACHED */)),\n                          _createElementVNode(\"span\", {\n                            class: _normalizeClass([\"verdict__label\", `verdict__label--${$setup.overall.tone}`])\n                          }, [\n                            _createVNode($setup[\"Icon\"], {\n                              name: $setup.overall.icon,\n                              size: 18\n                            }, null, 8 /* PROPS */, [\"name\"]),\n                            _createTextVNode(\" \" + _toDisplayString($setup.overall.label), 1 /* TEXT */)\n                          ], 2 /* CLASS */)\n                        ]),\n                        _createElementVNode(\"div\", _hoisted_14, [\n                          _createVNode($setup[\"RouterLink\"], {\n                            to: { name: 'location-detail', params: { id: $setup.feedback.locationId } },\n                            class: \"linkbtn\"\n                          }, {\n                            default: _withCtx(() => [\n                              _createVNode($setup[\"Icon\"], {\n                                name: \"location\",\n                                size: 16\n                              }),\n                              _cache[2] || (_cache[2] = _createTextVNode(\" Open locatie \", -1 /* CACHED */))\n                            ]),\n                            _: 1 /* STABLE */,\n                            __: [2]\n                          }, 8 /* PROPS */, [\"to\"]),\n                          _createVNode($setup[\"RouterLink\"], {\n                            to: $setup.analysisDetailRoute({ locationId: $setup.feedback.locationId, analysisId: $setup.feedback.analysisId }),\n                            class: \"linkbtn\"\n                          }, {\n                            default: _withCtx(() => [\n                              _createVNode($setup[\"Icon\"], {\n                                name: \"analytics\",\n                                size: 16\n                              }),\n                              _cache[3] || (_cache[3] = _createTextVNode(\" Open analyse \", -1 /* CACHED */))\n                            ]),\n                            _: 1 /* STABLE */,\n                            __: [3]\n                          }, 8 /* PROPS */, [\"to\"])\n                        ])\n                      ]),\n                      ($setup.feedback.reasonOverallRating)\n                        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_15, _toDisplayString($setup.maskPii($setup.feedback.reasonOverallRating)), 1 /* TEXT */))\n                        : _createCommentVNode(\"v-if\", true)\n                    ]),\n                    _: 1 /* STABLE */\n                  }),\n                  _createVNode($setup[\"Panel\"], {\n                    title: \"Beoordeling per dimensie\",\n                    flush: \"\"\n                  }, {\n                    default: _withCtx(() => [\n                      _createElementVNode(\"ul\", _hoisted_16, [\n                        (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.feedback.dimensions, (d) => {\n                          return (_openBlock(), _createElementBlock(\"li\", {\n                            key: d.key,\n                            class: \"dim\"\n                          }, [\n                            _createElementVNode(\"div\", _hoisted_17, [\n                              _createElementVNode(\"span\", _hoisted_18, _toDisplayString($setup.DIMENSION_LABELS[d.key]), 1 /* TEXT */),\n                              _createVNode($setup[\"RatingBadge\"], {\n                                rating: d.rating\n                              }, null, 8 /* PROPS */, [\"rating\"])\n                            ]),\n                            (d.aiExplanation)\n                              ? (_openBlock(), _createElementBlock(\"div\", _hoisted_19, [\n                                  _cache[4] || (_cache[4] = _createElementVNode(\"span\", { class: \"eyebrow\" }, \"AI-beoordeling\", -1 /* CACHED */)),\n                                  _createElementVNode(\"p\", _hoisted_20, _toDisplayString(d.aiExplanation), 1 /* TEXT */)\n                                ]))\n                              : _createCommentVNode(\"v-if\", true),\n                            (d.reason)\n                              ? (_openBlock(), _createElementBlock(\"div\", _hoisted_21, [\n                                  _cache[5] || (_cache[5] = _createElementVNode(\"span\", { class: \"eyebrow eyebrow--agent\" }, \"Reactie veldwerker\", -1 /* CACHED */)),\n                                  _createElementVNode(\"p\", _hoisted_22, _toDisplayString($setup.maskPii(d.reason)), 1 /* TEXT */)\n                                ]))\n                              : _createCommentVNode(\"v-if\", true)\n                          ]))\n                        }), 128 /* KEYED_FRAGMENT */))\n                      ])\n                    ]),\n                    _: 1 /* STABLE */\n                  }),\n                  ($setup.feedback.aiMissesNotes || $setup.feedback.generalNotes)\n                    ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n                        key: 0,\n                        title: \"Opmerkingen\"\n                      }, {\n                        default: _withCtx(() => [\n                          _createElementVNode(\"div\", _hoisted_23, [\n                            ($setup.feedback.aiMissesNotes)\n                              ? (_openBlock(), _createElementBlock(\"div\", _hoisted_24, [\n                                  _cache[6] || (_cache[6] = _createElementVNode(\"span\", { class: \"eyebrow eyebrow--agent\" }, \"Wat de AI mist\", -1 /* CACHED */)),\n                                  _createElementVNode(\"p\", _hoisted_25, _toDisplayString($setup.maskPii($setup.feedback.aiMissesNotes)), 1 /* TEXT */)\n                                ]))\n                              : _createCommentVNode(\"v-if\", true),\n                            ($setup.feedback.generalNotes)\n                              ? (_openBlock(), _createElementBlock(\"div\", _hoisted_26, [\n                                  _cache[7] || (_cache[7] = _createElementVNode(\"span\", { class: \"eyebrow eyebrow--agent\" }, \"Algemene opmerkingen\", -1 /* CACHED */)),\n                                  _createElementVNode(\"p\", _hoisted_27, _toDisplayString($setup.maskPii($setup.feedback.generalNotes)), 1 /* TEXT */)\n                                ]))\n                              : _createCommentVNode(\"v-if\", true)\n                          ])\n                        ]),\n                        _: 1 /* STABLE */\n                      }))\n                    : _createCommentVNode(\"v-if\", true)\n                ]),\n                _createCommentVNode(\" Rechts: de locatie \"),\n                _createElementVNode(\"aside\", _hoisted_28, [\n                  _createVNode($setup[\"Panel\"], { title: \"Locatie-informatie\" }, {\n                    default: _withCtx(() => [\n                      ($setup.location)\n                        ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                            _createCommentVNode(\" Eigen label/waarde-raster met een 96px labelkolom, zoals in de\\n                   kit: een StructuredList-labelkolom is te breed voor deze\\n                   smalle kolom. \"),\n                            _createElementVNode(\"dl\", _hoisted_29, [\n                              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.facts, (fact) => {\n                                return (_openBlock(), _createElementBlock(\"div\", {\n                                  key: fact.label,\n                                  class: \"loc__row\"\n                                }, [\n                                  _createElementVNode(\"dt\", _hoisted_30, _toDisplayString(fact.label), 1 /* TEXT */),\n                                  _createElementVNode(\"dd\", {\n                                    class: _normalizeClass([\"loc__val\", { 'loc__val--dash': fact.dash }])\n                                  }, _toDisplayString(fact.value), 3 /* TEXT, CLASS */)\n                                ]))\n                              }), 128 /* KEYED_FRAGMENT */))\n                            ]),\n                            ($setup.location.requiresHumanReview)\n                              ? (_openBlock(), _createElementBlock(\"div\", _hoisted_31, [\n                                  _createVNode($setup[\"Badge\"], { tone: \"diverge\" }, {\n                                    default: _withCtx(() => _cache[8] || (_cache[8] = [\n                                      _createTextVNode(\"Menselijke review nodig\", -1 /* CACHED */)\n                                    ])),\n                                    _: 1 /* STABLE */,\n                                    __: [8]\n                                  })\n                                ]))\n                              : _createCommentVNode(\"v-if\", true),\n                            _createElementVNode(\"div\", _hoisted_32, [\n                              ($setup.location.website)\n                                ? (_openBlock(), _createElementBlock(\"a\", {\n                                    key: 0,\n                                    href: $setup.location.website,\n                                    target: \"_blank\",\n                                    rel: \"noopener noreferrer\",\n                                    class: \"loc__link\"\n                                  }, [\n                                    _createElementVNode(\"span\", _hoisted_34, _toDisplayString($setup.location.website.replace(/^https?:\\/\\//, \"\")), 1 /* TEXT */),\n                                    _createVNode($setup[\"Icon\"], {\n                                      name: \"launch\",\n                                      size: 14,\n                                      class: \"loc__link-icon\"\n                                    })\n                                  ], 8 /* PROPS */, _hoisted_33))\n                                : _createCommentVNode(\"v-if\", true),\n                              ($setup.coordinates)\n                                ? (_openBlock(), _createElementBlock(\"a\", {\n                                    key: 1,\n                                    href: $setup.googleMapsUrl($setup.coordinates),\n                                    target: \"_blank\",\n                                    rel: \"noopener noreferrer\",\n                                    class: \"loc__link\"\n                                  }, [\n                                    _cache[9] || (_cache[9] = _createElementVNode(\"span\", { class: \"loc__link-text\" }, \"Open in Google Maps\", -1 /* CACHED */)),\n                                    _createVNode($setup[\"Icon\"], {\n                                      name: \"launch\",\n                                      size: 14,\n                                      class: \"loc__link-icon\"\n                                    })\n                                  ], 8 /* PROPS */, _hoisted_35))\n                                : _createCommentVNode(\"v-if\", true)\n                            ])\n                          ], 64 /* STABLE_FRAGMENT */))\n                        : (_openBlock(), _createElementBlock(\"p\", _hoisted_36, \"Locatie-informatie niet beschikbaar.\"))\n                    ]),\n                    _: 1 /* STABLE */\n                  }),\n                  _createVNode($setup[\"Panel\"], { title: \"Foto's\" }, {\n                    default: _withCtx(() => [\n                      ($setup.imagesLoading)\n                        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_37, \"Foto's laden...\"))\n                        : ($setup.imagesError)\n                          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_38, _toDisplayString($setup.imagesError), 1 /* TEXT */))\n                          : (_openBlock(), _createBlock($setup[\"LocationImageGallery\"], {\n                              key: 2,\n                              images: $setup.images,\n                              coordinates: $setup.coordinates\n                            }, null, 8 /* PROPS */, [\"images\", \"coordinates\"]))\n                    ]),\n                    _: 1 /* STABLE */\n                  })\n                ])\n              ]))\n    ])\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/FeedbackDetailView.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/FeedbackDetailView.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/FeedbackDetailView.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/FeedbackDetailView.vue\";script.__scopeId = \"data-v-e6dad09e\";export default script;","<template>\n  <PageHeader\n    class=\"nudica\"\n    title=\"Gebruik en kosten\"\n    description=\"Overzicht van AI-modelgebruik, tokenverbruik en kosten. Dry runs zijn uitgesloten.\"\n  />\n\n  <PageBody class=\"nudica\">\n    <div class=\"usage\">\n      <!-- Skeletons in the shape of the real layout, so the page does not jump\n           when the numbers arrive. -->\n      <div v-if=\"loading\" class=\"usage__skeleton\" aria-busy=\"true\" aria-label=\"Laden\">\n        <div class=\"usage__tiles\">\n          <div class=\"skel skel--tile\" />\n          <div class=\"skel skel--tile\" />\n          <div class=\"skel skel--tile\" />\n        </div>\n        <div class=\"skel skel--table\" />\n        <div class=\"skel skel--chart\" />\n      </div>\n\n      <Panel v-else-if=\"!stats\">\n        <p class=\"usage__error\" role=\"alert\">Kon statistieken niet laden.</p>\n      </Panel>\n\n      <template v-else>\n        <!-- The three key figures in the kit's tile form: eyebrow, large\n             number in tabular figures, and the exact value underneath. -->\n        <div class=\"usage__tiles\">\n          <StatTile\n            label=\"Totaal kosten\"\n            :value=\"formatDollars(stats.totalCostCents)\"\n            :hint=\"analysesLabel(stats.totalAnalyses)\"\n          />\n          <StatTile\n            label=\"Input tokens\"\n            :value=\"formatTokens(stats.totalInputTokens)\"\n            :hint=\"`${stats.totalInputTokens.toLocaleString('nl-NL')} exact`\"\n          />\n          <StatTile\n            label=\"Output tokens\"\n            :value=\"formatTokens(stats.totalOutputTokens)\"\n            :hint=\"`${stats.totalOutputTokens.toLocaleString('nl-NL')} exact`\"\n          />\n        </div>\n\n        <Panel title=\"Per model\" flush>\n          <div class=\"usage__scroll\">\n            <table class=\"tbl\">\n              <thead>\n                <tr>\n                  <th>Model</th>\n                  <th class=\"tbl__right\">Runs</th>\n                  <th class=\"tbl__right\">Input</th>\n                  <th class=\"tbl__right\">Output</th>\n                  <th class=\"tbl__right\">Kosten</th>\n                  <th class=\"tbl__right\">Gem. duur</th>\n                  <th class=\"tbl__right\">Faalrate</th>\n                </tr>\n              </thead>\n              <tbody>\n                <tr v-for=\"m in stats.models\" :key=\"m.modelId\">\n                  <td class=\"tbl__name\">{{ m.modelDisplayName }}</td>\n                  <td class=\"tbl__right tnum\">{{ m.runs }}</td>\n                  <td class=\"tbl__right tbl__muted tnum\">{{ formatTokens(m.inputTokens) }}</td>\n                  <td class=\"tbl__right tbl__muted tnum\">{{ formatTokens(m.outputTokens) }}</td>\n                  <td class=\"tbl__right tnum\">\n                    {{ m.totalCostCents > 0 ? formatDollars(m.totalCostCents) : \"-\" }}\n                  </td>\n                  <td class=\"tbl__right tbl__muted tnum\">\n                    {{ m.averageDurationMs > 0 ? `${(m.averageDurationMs / 1000).toFixed(1)}s` : \"-\" }}\n                  </td>\n                  <td class=\"tbl__right tnum\">\n                    <span\n                      v-if=\"formatFailRate(m.failed, m.runs) !== null\"\n                      :class=\"m.failed > 0 ? 'tbl__fail' : 'tbl__muted'\"\n                    >\n                      {{ formatFailRate(m.failed, m.runs) }}\n                    </span>\n                    <span v-else>-</span>\n                  </td>\n                </tr>\n                <tr v-if=\"stats.models.length === 0\">\n                  <td colspan=\"7\" class=\"tbl__msg\">Geen data beschikbaar.</td>\n                </tr>\n              </tbody>\n            </table>\n          </div>\n        </Panel>\n\n        <!-- The API only returns days on which something ran. Fill to a full\n             month so each bar sits at its place in time and a zero day is\n             visibly different from a day without data. -->\n        <Panel v-if=\"series.length > 0\" title=\"Kosten per dag (laatste 30 dagen)\">\n          <div class=\"chart\">\n            <div v-for=\"(d, index) in series\" :key=\"d.date\" class=\"chart__day\">\n              <Tooltip :text=\"barLabel(d)\">\n                <div class=\"chart__col\">\n                  <div\n                    class=\"chart__bar\"\n                    :class=\"d.costCents > 0 ? 'chart__bar--cost' : 'chart__bar--zero'\"\n                    :style=\"{ height: dailyBarHeight(d.costCents, maxCost) }\"\n                  />\n                </div>\n              </Tooltip>\n              <!-- Every fifth day a label; otherwise it becomes a wall. -->\n              <span class=\"chart__label\">{{ index % 5 === 0 ? formatShortDate(d.date) : \"\" }}</span>\n            </div>\n          </div>\n          <div class=\"chart__foot\">\n            <span class=\"tnum\">{{ totalRuns }} runs totaal</span>\n            <span class=\"tnum\">{{ formatDollars(totalCost) }} totaal</span>\n          </div>\n        </Panel>\n      </template>\n    </div>\n  </PageBody>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, ref } from \"vue\";\nimport PageHeader from \"../components/shell/PageHeader.vue\";\nimport PageBody from \"../components/shell/PageBody.vue\";\nimport Panel from \"../components/ui/Panel.vue\";\nimport StatTile from \"../components/ui/StatTile.vue\";\nimport Tooltip from \"../components/ui/Tooltip.vue\";\nimport { api } from \"../lib/api\";\nimport { fillDailySeries, type FilledDailyPoint } from \"../lib/daily-series\";\nimport {\n  analysesLabel,\n  dailyBarHeight,\n  formatDollars,\n  formatFailRate,\n  formatShortDate,\n  formatTokens,\n} from \"../lib/usage-format\";\n\ntype UsageStats = Awaited<ReturnType<typeof api.getUsageStats>>;\n\nconst stats = ref<UsageStats | null>(null);\nconst loading = ref(true);\n\nconst series = computed<FilledDailyPoint[]>(() => {\n  if (!stats.value || stats.value.daily.length === 0) return [];\n  return fillDailySeries(stats.value.daily, 30, new Date().toISOString().slice(0, 10));\n});\n\nconst maxCost = computed(() => Math.max(...series.value.map((d) => d.costCents), 1));\nconst totalRuns = computed(() => series.value.reduce((sum, d) => sum + d.runs, 0));\nconst totalCost = computed(() => series.value.reduce((sum, d) => sum + d.costCents, 0));\n\nfunction barLabel(d: FilledDailyPoint): string {\n  return `${formatShortDate(d.date)}: ${formatDollars(d.costCents)} · ${d.runs} runs`;\n}\n\nonMounted(async () => {\n  try {\n    // 0-arg: the stripped signature takes no params, so no `{}`.\n    stats.value = await api.getUsageStats();\n  } catch (err) {\n    console.error(\"Failed to fetch usage stats:\", err);\n    stats.value = null;\n  } finally {\n    loading.value = false;\n  }\n});\n</script>\n\n<style scoped>\n/* Geen breedtelimiet: de kit laat de tegels en de tabel de volle contentkolom\n   vullen (die de shell al op 1584px kapt). */\n.usage {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n}\n\n.usage__tiles {\n  display: grid;\n  gap: 16px;\n}\n\n@media (min-width: 720px) {\n  .usage__tiles {\n    grid-template-columns: repeat(3, minmax(0, 1fr));\n  }\n}\n\n.usage__skeleton {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n}\n\n.skel--tile {\n  height: 116px;\n}\n\n.skel {\n  background: var(--bg-inset);\n  border-radius: var(--radius);\n}\n\n.skel--table {\n  height: 256px;\n}\n\n.skel--chart {\n  height: 192px;\n}\n\n.usage__error {\n  margin: 0;\n  padding: 32px 0;\n  text-align: center;\n  color: var(--fg-3);\n}\n\n.usage__scroll {\n  overflow-x: auto;\n}\n\n.tbl {\n  width: 100%;\n  border-collapse: collapse;\n  font-size: var(--text-ui);\n}\n\n/* 32px rows: the kit's standard, not a per-table choice. */\n.tbl th,\n.tbl td {\n  height: 32px;\n  padding: 0 16px;\n  text-align: left;\n  border-bottom: 1px solid var(--border-1);\n  white-space: nowrap;\n}\n\n.tbl tbody tr:last-child td {\n  border-bottom: 0;\n}\n\n.tbl thead th {\n  background: var(--bg-inset);\n  font-size: var(--text-caption);\n  font-weight: 600;\n  line-height: 16px;\n  letter-spacing: 0.32px;\n  text-transform: uppercase;\n  color: var(--fg-1);\n}\n\n.tbl__right {\n  text-align: right;\n}\n\n.tbl__name {\n  font-weight: 600;\n}\n\n.tbl__muted {\n  color: var(--fg-3);\n}\n\n.tbl__fail {\n  color: var(--danger-fg);\n}\n\n.tbl__msg {\n  height: 64px;\n  text-align: center;\n  color: var(--fg-3);\n}\n\n@media (hover: hover) {\n  .tbl tbody tr:hover {\n    background: var(--bg-inset);\n  }\n}\n\n.chart {\n  display: flex;\n  align-items: flex-end;\n  gap: 1px;\n  height: 160px;\n}\n\n.chart__day {\n  display: flex;\n  flex: 1;\n  flex-direction: column;\n  align-items: center;\n  min-width: 0;\n  height: 100%;\n}\n\n.chart__col {\n  display: flex;\n  flex: 1;\n  align-items: flex-end;\n  width: 100%;\n  min-height: 0;\n}\n\n.chart__bar {\n  width: 100%;\n}\n\n.chart__bar--cost {\n  min-height: 4px;\n  background: var(--brand);\n  cursor: pointer;\n}\n\n/* A day without cost gets a 2px baseline in the border color: you see that\n   the day existed and was zero, instead of nothing at all. */\n.chart__bar--zero {\n  background: var(--border-strong);\n}\n\n.chart__label {\n  margin-top: 4px;\n  height: 14px;\n  font-size: 10px;\n  line-height: 14px;\n  white-space: nowrap;\n  color: var(--fg-3);\n}\n\n.chart__foot {\n  display: flex;\n  justify-content: space-between;\n  margin-top: 8px;\n  font-size: var(--text-caption);\n  color: var(--fg-3);\n}\n</style>\n","import { defineComponent as _defineComponent } from 'vue'\n\nexport default /*@__PURE__*/_defineComponent({\n  __name: 'StatTile',\n  props: {\n    label: { type: String, required: true },\n    value: { type: String, required: true },\n    hint: { type: String, required: false }\n  },\n  setup(__props: any, { expose: __expose }) {\n  __expose();\n\n\n\nconst __returned__ = {  }\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n})\n\n//@ sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL29wdC93aGRhdGEvaW5zdGFsbGVkbW9kdWxlcy9zdGF0aWVnZWxkbmwuMjAyNjExMTNUMTMzMjQ0LjIxM1ovd2ViZGVzaWducy9hZG1pbi9mcm9udGVuZC9jb21wb25lbnRzL3VpL1N0YXRUaWxlLnZ1ZSJdLCJzb3VyY2VzQ29udGVudCI6WyI8dGVtcGxhdGU+XG4gIDxkaXYgY2xhc3M9XCJ0aWxlXCI+XG4gICAgPHNwYW4gY2xhc3M9XCJ0aWxlX19sYWJlbCBleWVicm93XCI+e3sgbGFiZWwgfX08L3NwYW4+XG4gICAgPHNwYW4gY2xhc3M9XCJ0aWxlX192YWx1ZSB0bnVtXCI+e3sgdmFsdWUgfX08L3NwYW4+XG4gICAgPHNwYW4gdi1pZj1cImhpbnRcIiBjbGFzcz1cInRpbGVfX2hpbnRcIj57eyBoaW50IH19PC9zcGFuPlxuICA8L2Rpdj5cbjwvdGVtcGxhdGU+XG5cbjxzY3JpcHQgc2V0dXAgbGFuZz1cInRzXCI+XG5kZWZpbmVQcm9wczx7IGxhYmVsOiBzdHJpbmc7IHZhbHVlOiBzdHJpbmc7IGhpbnQ/OiBzdHJpbmcgfT4oKTtcbjwvc2NyaXB0PlxuXG48c3R5bGUgc2NvcGVkPlxuLyogS2VudGFsbGVudGVnZWwgdmFuIGRlIGtpdDogMjRweCBwYWRkaW5nIChkZSBUaWxlLXN0YW5kYWFyZCBkYWFyLCBydWltZXIgZGFuXG4gICBkZSAxNnB4IHZhbiBQYW5lbCksIGV5ZWJyb3ctbGFiZWwgZW4gaGV0IGdldGFsIGdyb290IGluIHRhYnVsYWlyZSBjaWpmZXJzLiAqL1xuLnRpbGUge1xuICBkaXNwbGF5OiBmbGV4O1xuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuICBnYXA6IDRweDtcbiAgbWluLXdpZHRoOiAwO1xuICBwYWRkaW5nOiAyNHB4O1xuICBiYWNrZ3JvdW5kOiB2YXIoLS1iZy1zdXJmYWNlKTtcbiAgYm9yZGVyOiAxcHggc29saWQgdmFyKC0tYm9yZGVyLTEpO1xuICBib3JkZXItcmFkaXVzOiB2YXIoLS1yYWRpdXMpO1xufVxuXG4udGlsZV9fdmFsdWUge1xuICBmb250LXNpemU6IDMwcHg7XG4gIGZvbnQtd2VpZ2h0OiA2MDA7XG4gIGxpbmUtaGVpZ2h0OiAxLjE7XG4gIGNvbG9yOiB2YXIoLS1mZy0xKTtcbn1cblxuLnRpbGVfX2hpbnQge1xuICBmb250LXNpemU6IHZhcigtLXRleHQtY2FwdGlvbik7XG4gIGNvbG9yOiB2YXIoLS1mZy00KTtcbn1cbjwvc3R5bGU+XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"tile\" }\nconst _hoisted_2 = { class: \"tile__label eyebrow\" }\nconst _hoisted_3 = { class: \"tile__value tnum\" }\nconst _hoisted_4 = {\n  key: 0,\n  class: \"tile__hint\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"span\", _hoisted_2, _toDisplayString($props.label), 1 /* TEXT */),\n    _createElementVNode(\"span\", _hoisted_3, _toDisplayString($props.value), 1 /* TEXT */),\n    ($props.hint)\n      ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, _toDisplayString($props.hint), 1 /* TEXT */))\n      : _createCommentVNode(\"v-if\", true)\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/StatTile.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/StatTile.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/StatTile.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/ui/StatTile.vue\";script.__scopeId = \"data-v-084c7fbe\";export default script;","export interface DailyPoint {\n  /** ISO-datum, `YYYY-MM-DD`. */\n  date: string;\n  costCents: number;\n  runs: number;\n}\n\nexport interface FilledDailyPoint extends DailyPoint {\n  /** Of er die dag daadwerkelijk iets gedraaid heeft. */\n  hasData: boolean;\n}\n\n/**\n * Maakt van een dunne reeks datapunten een volledige dagreeks.\n *\n * Waarom dit nodig is: de API geeft alleen dagen terug waarop iets gebeurde. Een\n * grafiek met het bijschrift \"laatste 30 dagen\" die drie balken toont, liegt dan\n * twee keer. Ten eerste staan de balken op de verkeerde plek in de tijd, want de\n * lege dagen ertussen ontbreken. Ten tweede is een dag die nul kostte niet te\n * onderscheiden van een dag zonder gegevens. Door de reeks aan te vullen komt\n * elke dag op zijn eigen plek te staan, en kan de grafiek een nuldag als een\n * zichtbare grondlijn tekenen.\n */\nexport function fillDailySeries(\n  points: readonly DailyPoint[],\n  days: number,\n  endDate: string,\n): FilledDailyPoint[] {\n  const byDate = new Map(points.map((point) => [point.date, point]));\n  const end = new Date(`${endDate}T00:00:00Z`);\n\n  const series: FilledDailyPoint[] = [];\n  for (let offset = days - 1; offset >= 0; offset--) {\n    const day = new Date(end);\n    day.setUTCDate(day.getUTCDate() - offset);\n    const date = day.toISOString().slice(0, 10);\n    const point = byDate.get(date);\n    series.push({\n      date,\n      costCents: point?.costCents ?? 0,\n      runs: point?.runs ?? 0,\n      hasData: point !== undefined,\n    });\n  }\n\n  return series;\n}\n","/**\n * Formatting for the Gebruik screen (usage and costs). Pure and Vue-free so\n * the number-to-text decisions are testable; the view only lays them out.\n */\n\n/** Compact token count: 1.2M, 345K, or the number itself under a thousand. */\nexport function formatTokens(n: number): string {\n  if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(1)}M`;\n  if (n >= 1_000) return `${(n / 1_000).toFixed(0)}K`;\n  return String(n);\n}\n\n/** Cents as a dollar amount with two decimals: 45 becomes \"$0.45\". */\nexport function formatDollars(cents: number): string {\n  return `$${(cents / 100).toFixed(2)}`;\n}\n\n/** Failure percentage, or null when there were no runs to fail. */\nexport function formatFailRate(failed: number, runs: number): string | null {\n  if (runs <= 0) return null;\n  return `${Math.round((failed / runs) * 100)}%`;\n}\n\n/**\n * \"6 aug\" for an ISO date. The parts are read literally: parsing the string\n * through `new Date()` would give UTC midnight and shift the day west of\n * Greenwich once it is formatted in local time.\n */\nexport function formatShortDate(iso: string): string {\n  const [year, month, day] = iso.split(\"-\").map(Number);\n  return new Date(year, month - 1, day).toLocaleDateString(\"nl-NL\", { day: \"numeric\", month: \"short\" });\n}\n\n/**\n * Bar height in the daily cost chart. A day without cost is a 2px baseline so\n * it reads as \"existed and was zero\" rather than as missing data.\n */\nexport function dailyBarHeight(costCents: number, maxCost: number): string {\n  if (costCents <= 0) return \"2px\";\n  return `${Math.min(100, (costCents / Math.max(maxCost, 1)) * 100)}%`;\n}\n\n/** \"1 analyse\" / \"83 analyses\". */\nexport function analysesLabel(n: number): string {\n  return `${n} analyse${n === 1 ? \"\" : \"s\"}`;\n}\n","import { createVNode as _createVNode, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, withCtx as _withCtx, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from \"vue\"\n\nconst _hoisted_1 = { class: \"usage\" }\nconst _hoisted_2 = {\n  key: 0,\n  class: \"usage__skeleton\",\n  \"aria-busy\": \"true\",\n  \"aria-label\": \"Laden\"\n}\nconst _hoisted_3 = { class: \"usage__tiles\" }\nconst _hoisted_4 = { class: \"usage__scroll\" }\nconst _hoisted_5 = { class: \"tbl\" }\nconst _hoisted_6 = { class: \"tbl__name\" }\nconst _hoisted_7 = { class: \"tbl__right tnum\" }\nconst _hoisted_8 = { class: \"tbl__right tbl__muted tnum\" }\nconst _hoisted_9 = { class: \"tbl__right tbl__muted tnum\" }\nconst _hoisted_10 = { class: \"tbl__right tnum\" }\nconst _hoisted_11 = { class: \"tbl__right tbl__muted tnum\" }\nconst _hoisted_12 = { class: \"tbl__right tnum\" }\nconst _hoisted_13 = { key: 1 }\nconst _hoisted_14 = { key: 0 }\nconst _hoisted_15 = { class: \"chart\" }\nconst _hoisted_16 = { class: \"chart__col\" }\nconst _hoisted_17 = { class: \"chart__label\" }\nconst _hoisted_18 = { class: \"chart__foot\" }\nconst _hoisted_19 = { class: \"tnum\" }\nconst _hoisted_20 = { class: \"tnum\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(_Fragment, null, [\n    _createVNode($setup[\"PageHeader\"], {\n      class: \"nudica\",\n      title: \"Gebruik en kosten\",\n      description: \"Overzicht van AI-modelgebruik, tokenverbruik en kosten. Dry runs zijn uitgesloten.\"\n    }),\n    _createVNode($setup[\"PageBody\"], { class: \"nudica\" }, {\n      default: _withCtx(() => [\n        _createElementVNode(\"div\", _hoisted_1, [\n          _createCommentVNode(\" Skeletons in the shape of the real layout, so the page does not jump\\n           when the numbers arrive. \"),\n          ($setup.loading)\n            ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, _cache[0] || (_cache[0] = [\n                _createElementVNode(\"div\", { class: \"usage__tiles\" }, [\n                  _createElementVNode(\"div\", { class: \"skel skel--tile\" }),\n                  _createElementVNode(\"div\", { class: \"skel skel--tile\" }),\n                  _createElementVNode(\"div\", { class: \"skel skel--tile\" })\n                ], -1 /* CACHED */),\n                _createElementVNode(\"div\", { class: \"skel skel--table\" }, null, -1 /* CACHED */),\n                _createElementVNode(\"div\", { class: \"skel skel--chart\" }, null, -1 /* CACHED */)\n              ])))\n            : (!$setup.stats)\n              ? (_openBlock(), _createBlock($setup[\"Panel\"], { key: 1 }, {\n                  default: _withCtx(() => _cache[1] || (_cache[1] = [\n                    _createElementVNode(\"p\", {\n                      class: \"usage__error\",\n                      role: \"alert\"\n                    }, \"Kon statistieken niet laden.\", -1 /* CACHED */)\n                  ])),\n                  _: 1 /* STABLE */,\n                  __: [1]\n                }))\n              : (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [\n                  _createCommentVNode(\" The three key figures in the kit's tile form: eyebrow, large\\n             number in tabular figures, and the exact value underneath. \"),\n                  _createElementVNode(\"div\", _hoisted_3, [\n                    _createVNode($setup[\"StatTile\"], {\n                      label: \"Totaal kosten\",\n                      value: $setup.formatDollars($setup.stats.totalCostCents),\n                      hint: $setup.analysesLabel($setup.stats.totalAnalyses)\n                    }, null, 8 /* PROPS */, [\"value\", \"hint\"]),\n                    _createVNode($setup[\"StatTile\"], {\n                      label: \"Input tokens\",\n                      value: $setup.formatTokens($setup.stats.totalInputTokens),\n                      hint: `${$setup.stats.totalInputTokens.toLocaleString('nl-NL')} exact`\n                    }, null, 8 /* PROPS */, [\"value\", \"hint\"]),\n                    _createVNode($setup[\"StatTile\"], {\n                      label: \"Output tokens\",\n                      value: $setup.formatTokens($setup.stats.totalOutputTokens),\n                      hint: `${$setup.stats.totalOutputTokens.toLocaleString('nl-NL')} exact`\n                    }, null, 8 /* PROPS */, [\"value\", \"hint\"])\n                  ]),\n                  _createVNode($setup[\"Panel\"], {\n                    title: \"Per model\",\n                    flush: \"\"\n                  }, {\n                    default: _withCtx(() => [\n                      _createElementVNode(\"div\", _hoisted_4, [\n                        _createElementVNode(\"table\", _hoisted_5, [\n                          _cache[3] || (_cache[3] = _createElementVNode(\"thead\", null, [\n                            _createElementVNode(\"tr\", null, [\n                              _createElementVNode(\"th\", null, \"Model\"),\n                              _createElementVNode(\"th\", { class: \"tbl__right\" }, \"Runs\"),\n                              _createElementVNode(\"th\", { class: \"tbl__right\" }, \"Input\"),\n                              _createElementVNode(\"th\", { class: \"tbl__right\" }, \"Output\"),\n                              _createElementVNode(\"th\", { class: \"tbl__right\" }, \"Kosten\"),\n                              _createElementVNode(\"th\", { class: \"tbl__right\" }, \"Gem. duur\"),\n                              _createElementVNode(\"th\", { class: \"tbl__right\" }, \"Faalrate\")\n                            ])\n                          ], -1 /* CACHED */)),\n                          _createElementVNode(\"tbody\", null, [\n                            (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.stats.models, (m) => {\n                              return (_openBlock(), _createElementBlock(\"tr\", {\n                                key: m.modelId\n                              }, [\n                                _createElementVNode(\"td\", _hoisted_6, _toDisplayString(m.modelDisplayName), 1 /* TEXT */),\n                                _createElementVNode(\"td\", _hoisted_7, _toDisplayString(m.runs), 1 /* TEXT */),\n                                _createElementVNode(\"td\", _hoisted_8, _toDisplayString($setup.formatTokens(m.inputTokens)), 1 /* TEXT */),\n                                _createElementVNode(\"td\", _hoisted_9, _toDisplayString($setup.formatTokens(m.outputTokens)), 1 /* TEXT */),\n                                _createElementVNode(\"td\", _hoisted_10, _toDisplayString(m.totalCostCents > 0 ? $setup.formatDollars(m.totalCostCents) : \"-\"), 1 /* TEXT */),\n                                _createElementVNode(\"td\", _hoisted_11, _toDisplayString(m.averageDurationMs > 0 ? `${(m.averageDurationMs / 1000).toFixed(1)}s` : \"-\"), 1 /* TEXT */),\n                                _createElementVNode(\"td\", _hoisted_12, [\n                                  ($setup.formatFailRate(m.failed, m.runs) !== null)\n                                    ? (_openBlock(), _createElementBlock(\"span\", {\n                                        key: 0,\n                                        class: _normalizeClass(m.failed > 0 ? 'tbl__fail' : 'tbl__muted')\n                                      }, _toDisplayString($setup.formatFailRate(m.failed, m.runs)), 3 /* TEXT, CLASS */))\n                                    : (_openBlock(), _createElementBlock(\"span\", _hoisted_13, \"-\"))\n                                ])\n                              ]))\n                            }), 128 /* KEYED_FRAGMENT */)),\n                            ($setup.stats.models.length === 0)\n                              ? (_openBlock(), _createElementBlock(\"tr\", _hoisted_14, _cache[2] || (_cache[2] = [\n                                  _createElementVNode(\"td\", {\n                                    colspan: \"7\",\n                                    class: \"tbl__msg\"\n                                  }, \"Geen data beschikbaar.\", -1 /* CACHED */)\n                                ])))\n                              : _createCommentVNode(\"v-if\", true)\n                          ])\n                        ])\n                      ])\n                    ]),\n                    _: 1 /* STABLE */\n                  }),\n                  _createCommentVNode(\" The API only returns days on which something ran. Fill to a full\\n             month so each bar sits at its place in time and a zero day is\\n             visibly different from a day without data. \"),\n                  ($setup.series.length > 0)\n                    ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n                        key: 0,\n                        title: \"Kosten per dag (laatste 30 dagen)\"\n                      }, {\n                        default: _withCtx(() => [\n                          _createElementVNode(\"div\", _hoisted_15, [\n                            (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.series, (d, index) => {\n                              return (_openBlock(), _createElementBlock(\"div\", {\n                                key: d.date,\n                                class: \"chart__day\"\n                              }, [\n                                _createVNode($setup[\"Tooltip\"], {\n                                  text: $setup.barLabel(d)\n                                }, {\n                                  default: _withCtx(() => [\n                                    _createElementVNode(\"div\", _hoisted_16, [\n                                      _createElementVNode(\"div\", {\n                                        class: _normalizeClass([\"chart__bar\", d.costCents > 0 ? 'chart__bar--cost' : 'chart__bar--zero']),\n                                        style: _normalizeStyle({ height: $setup.dailyBarHeight(d.costCents, $setup.maxCost) })\n                                      }, null, 6 /* CLASS, STYLE */)\n                                    ])\n                                  ]),\n                                  _: 2 /* DYNAMIC */\n                                }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"text\"]),\n                                _createCommentVNode(\" Every fifth day a label; otherwise it becomes a wall. \"),\n                                _createElementVNode(\"span\", _hoisted_17, _toDisplayString(index % 5 === 0 ? $setup.formatShortDate(d.date) : \"\"), 1 /* TEXT */)\n                              ]))\n                            }), 128 /* KEYED_FRAGMENT */))\n                          ]),\n                          _createElementVNode(\"div\", _hoisted_18, [\n                            _createElementVNode(\"span\", _hoisted_19, _toDisplayString($setup.totalRuns) + \" runs totaal\", 1 /* TEXT */),\n                            _createElementVNode(\"span\", _hoisted_20, _toDisplayString($setup.formatDollars($setup.totalCost)) + \" totaal\", 1 /* TEXT */)\n                          ])\n                        ]),\n                        _: 1 /* STABLE */\n                      }))\n                    : _createCommentVNode(\"v-if\", true)\n                ], 64 /* STABLE_FRAGMENT */))\n        ])\n      ]),\n      _: 1 /* STABLE */\n    })\n  ], 64 /* STABLE_FRAGMENT */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/UsageView.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/UsageView.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/UsageView.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/UsageView.vue\";script.__scopeId = \"data-v-f9940521\";export default script;","<template>\n  <PageHeader class=\"nudica\" title=\"Scoring\" />\n\n  <PageBody class=\"nudica\">\n    <div class=\"scoring\">\n      <!-- The lead carries emphasis, which PageHeader's plain-string\n           description cannot; so it is the first paragraph of the body. -->\n      <p class=\"lead\">\n        Hoe de puntentelling per categorie precies werkt. De eindscore (0–100) is een\n        <strong>gewogen gemiddelde</strong> van vijf aspecten. Bij de\n        <em>observe-then-score</em>-aanpak levert het AI-model alleen losse feitelijke\n        observaties; de score wordt daarna <strong>deterministisch</strong> door code uitgerekend,\n        dezelfde observaties leveren altijd exact dezelfde score op.\n      </p>\n\n      <!-- Weights and recommendation -->\n      <div class=\"grid2\">\n        <Panel title=\"Gewichten per aspect\">\n          <p class=\"desc\">Elk aspect scoort 0–100 en telt met een vast gewicht mee in de eindscore.</p>\n          <div class=\"weights\">\n            <div v-for=\"w in WEIGHTS\" :key=\"w.aspect\" class=\"weight\">\n              <span class=\"weight__name\">{{ w.aspect }}</span>\n              <div class=\"weight__track\">\n                <div class=\"weight__fill\" :style=\"{ width: `${(w.pct / 25) * 100}%` }\" />\n              </div>\n              <span class=\"weight__pct tnum\">{{ w.pct }}%</span>\n            </div>\n          </div>\n          <p class=\"note\">\n            Totaal 100%. Daarbovenop een <strong>+5 bonus</strong> als er ook een 40ft-container past.\n          </p>\n        </Panel>\n\n        <Panel title=\"Aanbeveling per score\" flush>\n          <p class=\"desc desc--inset\">Welk eindoordeel hoort bij welke eindscore.</p>\n          <table class=\"tbl\">\n            <thead>\n              <tr>\n                <th>Eindscore</th>\n                <th>Aanbeveling</th>\n              </tr>\n            </thead>\n            <tbody>\n              <tr>\n                <td class=\"tnum\">75 – 100</td>\n                <td><Badge tone=\"score\">Zeer geschikt</Badge></td>\n              </tr>\n              <tr>\n                <td class=\"tnum\">55 – 74</td>\n                <td><Badge tone=\"score\">Geschikt</Badge></td>\n              </tr>\n              <tr>\n                <td class=\"tnum\">35 – 54</td>\n                <td><Badge tone=\"diverge\">Beperkt geschikt</Badge></td>\n              </tr>\n              <tr>\n                <td class=\"tnum\">0 – 34</td>\n                <td><Badge tone=\"danger\">Ongeschikt</Badge></td>\n              </tr>\n            </tbody>\n          </table>\n        </Panel>\n      </div>\n\n      <!-- Hard exclusions -->\n      <section class=\"card card--danger\">\n        <header class=\"card__head\">\n          <span class=\"card__icon card__icon--danger\"><Icon name=\"misuse--outline\" :size=\"20\" /></span>\n          <div class=\"card__text\">\n            <h2 class=\"card__title\">Harde uitsluitingen</h2>\n            <p class=\"card__desc\">\n              Eén van deze situaties zet de hele eindscore direct op <strong>0</strong>: de\n              aspecten worden dan niet meer berekend.\n            </p>\n          </div>\n        </header>\n        <table class=\"tbl\">\n          <thead>\n            <tr>\n              <th>Situatie</th>\n              <th class=\"tbl__w40\">Gevolg</th>\n            </tr>\n          </thead>\n          <tbody>\n            <tr>\n              <td>Snelweglocatie</td>\n              <td><span class=\"pts pts--exclude code\">score 0</span></td>\n            </tr>\n            <tr>\n              <td>Geen publieke shopfunctie</td>\n              <td><span class=\"pts pts--exclude code\">score 0</span></td>\n            </tr>\n            <tr>\n              <td>Shopfunctie niet verifieerbaar</td>\n              <td><span class=\"pts pts--exclude code\">score 0</span> + review</td>\n            </tr>\n            <tr>\n              <td>Geen enkele container past op het terrein</td>\n              <td><span class=\"pts pts--exclude code\">score 0</span></td>\n            </tr>\n          </tbody>\n        </table>\n      </section>\n\n      <!-- Per-aspect detail -->\n      <h2 class=\"section-title\">Puntentelling per aspect</h2>\n\n      <div class=\"grid2\">\n        <!-- Aard & Grootte -->\n        <section class=\"card\">\n          <header class=\"card__head\">\n            <span class=\"card__icon\"><Icon name=\"store\" :size=\"20\" /></span>\n            <div class=\"card__text\">\n              <h3 class=\"card__title\">Aard &amp; Grootte</h3>\n              <p class=\"card__desc\">Past de container fysiek op het terrein?</p>\n            </div>\n            <span class=\"chip code\">20%</span>\n          </header>\n          <div class=\"card__body\">\n            <table class=\"tbl\">\n              <thead>\n                <tr>\n                  <th>Situatie</th>\n                  <th class=\"tbl__right tbl__w32\">Score</th>\n                </tr>\n              </thead>\n              <tbody>\n                <tr>\n                  <td>20ft-container past op het terrein</td>\n                  <td class=\"tbl__right\"><span class=\"pts pts--base code\">80</span></td>\n                </tr>\n                <tr>\n                  <td>20ft past niet, wel een 10ft-container (fallback)</td>\n                  <td class=\"tbl__right\">\n                    <span class=\"pts pts--base code\">15</span> <span class=\"pts pts--review code\">review</span>\n                  </td>\n                </tr>\n                <tr>\n                  <td>Geen enkele container past</td>\n                  <td class=\"tbl__right\"><span class=\"pts pts--exclude code\">0</span></td>\n                </tr>\n              </tbody>\n            </table>\n          </div>\n        </section>\n\n        <!-- Extra Services -->\n        <section class=\"card\">\n          <header class=\"card__head\">\n            <span class=\"card__icon\"><Icon name=\"settings--services\" :size=\"20\" /></span>\n            <div class=\"card__text\">\n              <h3 class=\"card__title\">Extra Services</h3>\n              <p class=\"card__desc\">Aanwezigheid van publieke voorzieningen.</p>\n            </div>\n            <span class=\"chip code\">20%</span>\n          </header>\n          <div class=\"card__body\">\n            <table class=\"tbl\">\n              <thead>\n                <tr>\n                  <th>Onderdeel</th>\n                  <th class=\"tbl__right tbl__w28\">Punten</th>\n                </tr>\n              </thead>\n              <tbody>\n                <tr>\n                  <td>Basis: publieke shopfunctie aanwezig</td>\n                  <td class=\"tbl__right\"><span class=\"pts pts--base code\">30</span></td>\n                </tr>\n                <tr>\n                  <td>Per aanwezige voorziening (zie lijst)</td>\n                  <td class=\"tbl__right\"><span class=\"pts pts--pos code\">+15</span></td>\n                </tr>\n                <tr>\n                  <td class=\"tbl__wrap\">\n                    Per “actieve beheerder”-signaal\n                    <span class=\"tbl__sub\">\n                      verharding goed onderhouden · ≥ 2 voorzieningen · actuele website\n                    </span>\n                  </td>\n                  <td class=\"tbl__right\"><span class=\"pts pts--pos code\">+5</span></td>\n                </tr>\n                <tr>\n                  <td>3 of meer voorzieningen onzeker</td>\n                  <td class=\"tbl__right\"><span class=\"pts pts--review code\">review</span></td>\n                </tr>\n              </tbody>\n            </table>\n            <div class=\"services\">\n              <p class=\"services__title\">Voorzieningen die elk +15 opleveren (max. score 100):</p>\n              <div class=\"services__list\">\n                <span v-for=\"s in SERVICES\" :key=\"s\" class=\"services__item\">{{ s }}</span>\n              </div>\n            </div>\n          </div>\n        </section>\n\n        <!-- Parkeerruimte -->\n        <section class=\"card\">\n          <header class=\"card__head\">\n            <span class=\"card__icon\"><Icon name=\"car\" :size=\"20\" /></span>\n            <div class=\"card__text\">\n              <h3 class=\"card__title\">Parkeerruimte</h3>\n              <p class=\"card__desc\">Percentage parkeerplaatsen dat ná de container overblijft.</p>\n            </div>\n            <span class=\"chip code\">25%</span>\n          </header>\n          <div class=\"card__body\">\n            <table class=\"tbl\">\n              <thead>\n                <tr>\n                  <th>Resterend percentage</th>\n                  <th class=\"tbl__right tbl__w36\">Score</th>\n                </tr>\n              </thead>\n              <tbody>\n                <tr>\n                  <td>≥ 75% overgebleven</td>\n                  <td class=\"tbl__right\"><span class=\"pts pts--base code\">90</span></td>\n                </tr>\n                <tr>\n                  <td>50% – 75% overgebleven</td>\n                  <td class=\"tbl__right\"><span class=\"pts pts--base code\">50 → 90</span></td>\n                </tr>\n                <tr>\n                  <td>&lt; 50% overgebleven</td>\n                  <td class=\"tbl__right\"><span class=\"pts pts--base code\">10 – 25</span></td>\n                </tr>\n                <tr>\n                  <td>&lt; 50%, maar reststrook aanwezig</td>\n                  <td class=\"tbl__right\">\n                    <span class=\"pts pts--pos code\">+15</span> <span class=\"pts pts--review code\">review</span>\n                  </td>\n                </tr>\n                <tr>\n                  <td class=\"tbl__wrap\">Lage score, maar bruikbare openbare parkeerplekken vlakbij</td>\n                  <td class=\"tbl__right\">\n                    <span class=\"pts pts--base code\">→ 55</span> <span class=\"pts pts--review code\">review</span>\n                  </td>\n                </tr>\n                <tr>\n                  <td>Onbekend (percentage én telling ontbreken)</td>\n                  <td class=\"tbl__right\">\n                    <span class=\"pts pts--base code\">25</span> <span class=\"pts pts--review code\">review</span>\n                  </td>\n                </tr>\n              </tbody>\n            </table>\n            <p class=\"note\">\n              Tussen 50% en 75% loopt de score lineair op van 50 naar 90. Ontbreekt het\n              percentage maar zijn de vakken wél geteld, dan wordt de resterende fractie\n              afgeleid uit de telling (in plaats van het forfait van 25).\n            </p>\n          </div>\n        </section>\n\n        <!-- Toegankelijkheid -->\n        <section class=\"card\">\n          <header class=\"card__head\">\n            <span class=\"card__icon\"><Icon name=\"delivery-truck\" :size=\"20\" /></span>\n            <div class=\"card__text\">\n              <h3 class=\"card__title\">Toegankelijkheid</h3>\n              <p class=\"card__desc\">Kan de container geplaatst en bevoorraad worden?</p>\n            </div>\n            <span class=\"chip code\">20%</span>\n          </header>\n          <div class=\"card__body\">\n            <table class=\"tbl\">\n              <thead>\n                <tr>\n                  <th>Factor</th>\n                  <th class=\"tbl__right tbl__w32\">Effect</th>\n                </tr>\n              </thead>\n              <tbody>\n                <tr>\n                  <td>Basis</td>\n                  <td class=\"tbl__right\"><span class=\"pts pts--base code\">50</span></td>\n                </tr>\n                <tr>\n                  <td>Voldoende vrije hoogte op de aanbevolen plek</td>\n                  <td class=\"tbl__right\"><span class=\"pts pts--pos code\">+20</span></td>\n                </tr>\n                <tr>\n                  <td>Vrachtwagen kan de plek bereiken</td>\n                  <td class=\"tbl__right\"><span class=\"pts pts--pos code\">+20</span></td>\n                </tr>\n                <tr>\n                  <td>Klantroute wordt geblokkeerd</td>\n                  <td class=\"tbl__right\"><span class=\"pts pts--neg code\">−30</span></td>\n                </tr>\n                <tr>\n                  <td>Meer dan 2 conflictgebieden</td>\n                  <td class=\"tbl__right\"><span class=\"pts pts--neg code\">−10</span></td>\n                </tr>\n              </tbody>\n            </table>\n            <p class=\"note\">\n              Onzekere vrije hoogte of vrachtwagenbereik levert geen punten op en vraagt om review.\n            </p>\n          </div>\n        </section>\n\n        <!-- Zichtbaarheid -->\n        <section class=\"card\">\n          <header class=\"card__head\">\n            <span class=\"card__icon\"><Icon name=\"view\" :size=\"20\" /></span>\n            <div class=\"card__text\">\n              <h3 class=\"card__title\">Zichtbaarheid</h3>\n              <p class=\"card__desc\">Zichtbaarheid van de locatie (5a) én van de containerplek (5b).</p>\n            </div>\n            <span class=\"chip code\">15%</span>\n          </header>\n          <div class=\"card__body card__body--stack\">\n            <div>\n              <p class=\"subhead\">5a: Locatie zichtbaar (basis 50)</p>\n              <table class=\"tbl\">\n                <tbody>\n                  <tr>\n                    <td>Locatie zichtbaar vanaf de openbare weg</td>\n                    <td class=\"tbl__right tbl__w24\"><span class=\"pts pts--pos code\">+20</span></td>\n                  </tr>\n                  <tr>\n                    <td>Hoeklocatie</td>\n                    <td class=\"tbl__right\"><span class=\"pts pts--pos code\">+15</span></td>\n                  </tr>\n                  <tr>\n                    <td class=\"tbl__wrap\">Doorgaande weg vóór het pand (N-weg of gemeentelijk)</td>\n                    <td class=\"tbl__right\"><span class=\"pts pts--pos code\">+15</span></td>\n                  </tr>\n                  <tr>\n                    <td class=\"tbl__wrap\">Grote publieksbestemming (tuincentrum, bouwmarkt)</td>\n                    <td class=\"tbl__right\"><span class=\"pts pts--pos code\">+15</span></td>\n                  </tr>\n                </tbody>\n              </table>\n            </div>\n            <div>\n              <p class=\"subhead\">5b: Containerplek zichtbaar</p>\n              <table class=\"tbl\">\n                <tbody>\n                  <tr>\n                    <td>Aanbevolen plek zichtbaar vanaf de weg</td>\n                    <td class=\"tbl__right tbl__w24\"><span class=\"pts pts--base code\">85</span></td>\n                  </tr>\n                  <tr>\n                    <td>Niet zichtbaar</td>\n                    <td class=\"tbl__right\"><span class=\"pts pts--base code\">25</span></td>\n                  </tr>\n                  <tr>\n                    <td>Onzeker</td>\n                    <td class=\"tbl__right\">\n                      <span class=\"pts pts--base code\">40</span> <span class=\"pts pts--review code\">review</span>\n                    </td>\n                  </tr>\n                </tbody>\n              </table>\n            </div>\n            <p class=\"note note--boxed\">\n              Aspectscore = <strong>5a × 40% + 5b × 60%</strong>.\n            </p>\n          </div>\n        </section>\n\n        <!-- Bonus -->\n        <section class=\"card\">\n          <header class=\"card__head\">\n            <span class=\"card__icon\"><Icon name=\"add--alt\" :size=\"20\" /></span>\n            <div class=\"card__text\">\n              <h3 class=\"card__title\">Bonus</h3>\n              <p class=\"card__desc\">Extraatje bovenop de eindscore.</p>\n            </div>\n            <span class=\"chip code\">+5</span>\n          </header>\n          <div class=\"card__body\">\n            <table class=\"tbl\">\n              <thead>\n                <tr>\n                  <th>Situatie</th>\n                  <th class=\"tbl__right tbl__w32\">Effect</th>\n                </tr>\n              </thead>\n              <tbody>\n                <tr>\n                  <td>Er past óók een grotere 40ft-container</td>\n                  <td class=\"tbl__right\"><span class=\"pts pts--pos code\">+5</span></td>\n                </tr>\n              </tbody>\n            </table>\n            <p class=\"note\">Wordt bij de eindscore opgeteld (maximaal 100).</p>\n          </div>\n        </section>\n      </div>\n\n      <!-- Review flags -->\n      <section class=\"card\">\n        <header class=\"card__head\">\n          <span class=\"card__icon card__icon--diverge\"><Icon name=\"flag\" :size=\"20\" /></span>\n          <div class=\"card__text\">\n            <h2 class=\"card__title\">Review-vlaggen</h2>\n            <p class=\"card__desc\">\n              Bij onzekerheden vraagt het systeem om <strong>menselijke review</strong>. De score\n              blijft geldig, maar verdient een extra controle ter plaatse.\n            </p>\n          </div>\n        </header>\n        <table class=\"tbl\">\n          <thead>\n            <tr>\n              <th class=\"tbl__w72\">Vlag</th>\n              <th>Betekenis</th>\n            </tr>\n          </thead>\n          <tbody>\n            <tr v-for=\"[flag, meaning] in REVIEW_FLAGS\" :key=\"flag\">\n              <td class=\"tbl__flag tbl__wrap\">{{ flag }}</td>\n              <td class=\"tbl__muted tbl__wrap\">{{ meaning }}</td>\n            </tr>\n          </tbody>\n        </table>\n      </section>\n\n      <p class=\"note note--foot\">\n        Deze puntentelling geldt voor de <em>observe-then-score</em>-aanpak. De score wordt\n        deterministisch uit de observaties berekend: op de analyse-detailpagina kun je per\n        aspect de opbouw stap-voor-stap openklappen.\n      </p>\n    </div>\n  </PageBody>\n</template>\n\n<script setup lang=\"ts\">\nimport PageHeader from \"../components/shell/PageHeader.vue\";\nimport PageBody from \"../components/shell/PageBody.vue\";\nimport Panel from \"../components/ui/Panel.vue\";\nimport Badge from \"../components/ui/Badge.vue\";\nimport Icon from \"../components/icons/Icon.vue\";\n\n// Static explanation of the deterministic scoring (observe-then-score v2).\n// The points here are taken 1-on-1 from `scoring.ts#scoreLocatie` in the\n// Next admin: a formula change (weights, thresholds, bonus) must move this\n// page along with it. This is the published formula; do not \"improve\" it.\n\nconst WEIGHTS = [\n  { aspect: \"Aard & Grootte\", pct: 20 },\n  { aspect: \"Extra Services\", pct: 20 },\n  { aspect: \"Parkeerruimte\", pct: 25 },\n  { aspect: \"Toegankelijkheid\", pct: 20 },\n  { aspect: \"Zichtbaarheid\", pct: 15 },\n];\n\nconst SERVICES = [\n  \"Wasstraat\",\n  \"Wasplaats (zelfbediening)\",\n  \"EV-laadpaal\",\n  \"Luchtpomp\",\n  \"Stofzuiger\",\n  \"Pakketautomaat\",\n  \"Bakkerij / to-go\",\n  \"Foodservice / to-go\",\n  \"Geldautomaat\",\n  \"Publiek toilet\",\n  \"Kledingcontainer\",\n  \"Aanhangerverhuur\",\n];\n\nconst REVIEW_FLAGS: Array<[string, string]> = [\n  [\"Snelwegcheck niet verifieerbaar\", \"Kon niet vastgesteld worden of de locatie aan een snelweg ligt.\"],\n  [\"Shopfunctie niet verifieerbaar\", \"Onduidelijk of er een publieke shop is: leidt óók tot een harde uitsluiting (score 0).\"],\n  [\"50%-parkeerregel niet gehaald of onzeker\", \"Na plaatsing blijft mogelijk te weinig parkeerruimte over.\"],\n  [\"Alleen 10ft-container passend\", \"De grotere 20ft-container past niet, alleen de kleinere fallback.\"],\n  [\"Te veel services onzeker\", \"Drie of meer voorzieningen konden niet worden vastgesteld.\"],\n  [\"Parkeertelling onzeker\", \"Het aantal resterende parkeerplaatsen kon niet worden bepaald én ook de telling ontbrak (forfait 25).\"],\n  [\"Reststrook als alternatief\", \"Bij krappe parkeerruimte is een reststrook meegerekend (+15).\"],\n  [\"Aangrenzende parkeerplaats meegerekend\", \"De score steunt op een aangrenzend parkeerterrein dat mogelijk buiten het perceel valt: controleer eigendom ter plaatse.\"],\n  [\"Openbaar parkeren meegerekend\", \"Een lage parkeerscore is verzacht doordat er bruikbare openbare/straatparkeerplekken vlakbij liggen: controleer ter plaatse.\"],\n  [\"Meerdere bedrijven op dit adres\", \"Er zitten meerdere ondernemingen op het adres: controleer of het juiste (genoemde) bedrijf is beoordeeld.\"],\n  [\"Vrije hoogte onzeker\", \"Kon niet vastgesteld worden of er voldoende vrije hoogte is.\"],\n  [\"Vrachtwagenbereik onzeker\", \"Kon niet vastgesteld worden of een vrachtwagen de plek bereikt.\"],\n  [\"Zichtbaarheid onzeker\", \"Kon niet vastgesteld worden of de containerplek vanaf de weg zichtbaar is.\"],\n  [\"Terreingrens niet eenduidig\", \"De grens van het terrein is niet duidelijk vast te stellen.\"],\n];\n</script>\n\n<style scoped>\n.scoring {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n}\n\n.lead {\n  margin: 0;\n  max-width: 72ch;\n  font-size: var(--text-ui);\n  line-height: 20px;\n  color: var(--fg-3);\n}\n\n.lead strong,\n.note strong,\n.card__desc strong {\n  font-weight: 600;\n  color: var(--fg-1);\n}\n\n.grid2 {\n  display: grid;\n  grid-template-columns: minmax(0, 1fr);\n  gap: 16px;\n  align-items: start;\n}\n\n/* Twee kolommen vanaf tablet: dat is de grens die het kitscherm aanhoudt. */\n@media (min-width: 720px) {\n  .grid2 {\n    grid-template-columns: repeat(2, minmax(0, 1fr));\n  }\n}\n\n.desc {\n  margin: 0 0 12px;\n  font-size: var(--text-caption);\n  color: var(--fg-3);\n}\n\n.desc--inset {\n  padding: 12px 16px 0;\n}\n\n.section-title {\n  margin: 8px 0 0;\n  font-size: 18px;\n  line-height: 24px;\n  font-weight: 600;\n  color: var(--fg-1);\n}\n\n/* Gewichtsbalkjes: vast 90x6px spoor in de hairline-kleur met een merkgroene\n   vulling, vierkant. Zo staat het in het kitscherm. */\n.weights {\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n}\n\n.weight {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n}\n\n.weight__name {\n  flex: 1;\n  min-width: 0;\n  font-size: var(--text-ui);\n}\n\n.weight__track {\n  flex: none;\n  width: 90px;\n  height: 6px;\n  overflow: hidden;\n  background: var(--border-1);\n}\n\n.weight__fill {\n  height: 100%;\n  background: var(--brand);\n}\n\n.weight__pct {\n  flex: none;\n  width: 40px;\n  text-align: right;\n  font-size: var(--text-caption);\n  font-weight: 600;\n}\n\n.note {\n  margin: 12px 0 0;\n  font-size: var(--text-caption);\n  line-height: 16px;\n  color: var(--fg-3);\n}\n\n.note--boxed {\n  margin: 0;\n  padding: 8px 12px;\n  border-radius: var(--radius);\n  background: var(--bg-inset);\n}\n\n.note--foot {\n  margin: 0;\n  padding-bottom: 8px;\n}\n\n/* Aspect card: the hairline panel of the kit with an icon, a description and\n   a weight chip in its header. Panel.vue has no room for those, hence the\n   local markup in the same visual language. */\n.card {\n  display: flex;\n  flex-direction: column;\n  min-width: 0;\n  background: var(--bg-surface);\n  border: 1px solid var(--border-1);\n  border-radius: var(--radius);\n}\n\n.card--danger {\n  border-color: var(--danger-border);\n}\n\n.card__head {\n  display: flex;\n  align-items: flex-start;\n  gap: 10px;\n  padding: 16px;\n  border-bottom: 1px solid var(--border-1);\n}\n\n.card__icon {\n  display: flex;\n  flex: none;\n  align-items: center;\n  justify-content: center;\n  width: 36px;\n  height: 36px;\n  border-radius: var(--radius-lg);\n  background: var(--muted);\n  color: var(--fg-3);\n}\n\n.card__icon--danger {\n  background: var(--danger-bg);\n  color: var(--danger-fg);\n}\n\n.card__icon--diverge {\n  background: var(--diverge-bg);\n  color: var(--diverge-fg);\n}\n\n.card__text {\n  flex: 1;\n  min-width: 0;\n}\n\n.card__title {\n  margin: 0;\n  font-size: 16px;\n  line-height: 22px;\n  font-weight: 600;\n  color: var(--fg-1);\n}\n\n.card__desc {\n  margin: 2px 0 0;\n  font-size: var(--text-caption);\n  line-height: 16px;\n  color: var(--fg-3);\n}\n\n.card__body {\n  padding: 16px;\n}\n\n.card__body--stack {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n}\n\n/* The weight chip: the source used --primary at 10% alpha, which does not\n   exist as a token; the inset ground with full-ink text is its equivalent. */\n.chip {\n  flex: none;\n  padding: 4px 8px;\n  border-radius: var(--radius);\n  background: var(--bg-inset);\n  font-weight: 600;\n  color: var(--fg-1);\n}\n\n.subhead {\n  margin: 0 0 6px;\n  font-size: var(--text-ui);\n  font-weight: 500;\n  color: var(--fg-1);\n}\n\n/* Point pills: green = bonus, red = penalty, amber = review, grey = fixed. */\n.pts {\n  display: inline-flex;\n  align-items: center;\n  padding: 2px 8px;\n  border: 1px solid transparent;\n  border-radius: var(--radius);\n  font-weight: 600;\n  white-space: nowrap;\n}\n\n.pts--pos {\n  background: var(--score-bg);\n  color: var(--score-fg);\n}\n\n.pts--neg {\n  background: var(--danger-bg);\n  color: var(--danger-fg);\n}\n\n.pts--review {\n  background: var(--diverge-bg);\n  color: var(--diverge-fg);\n}\n\n.pts--base {\n  background: var(--muted);\n  color: var(--fg-1);\n}\n\n.pts--exclude {\n  background: var(--danger-bg);\n  border-color: var(--danger);\n  color: var(--danger-fg);\n}\n\n.services {\n  margin-top: 12px;\n  padding: 12px;\n  border: 1px solid var(--border-1);\n  border-radius: var(--radius);\n  background: var(--bg-inset);\n}\n\n.services__title {\n  margin: 0 0 6px;\n  font-size: var(--text-caption);\n  font-weight: 500;\n  color: var(--fg-3);\n}\n\n.services__list {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 6px;\n}\n\n.services__item {\n  padding: 2px 8px;\n  border-radius: var(--radius);\n  background: var(--bg-surface);\n  font-size: var(--text-caption);\n}\n\n.tbl {\n  width: 100%;\n  border-collapse: collapse;\n  font-size: var(--text-ui);\n}\n\n/* 32px rows: the kit's standard, not a per-table choice. Cells may wrap here,\n   this is prose in a table, so the height is a minimum. */\n.tbl th,\n.tbl td {\n  min-height: 32px;\n  padding: 8px 12px;\n  text-align: left;\n  vertical-align: top;\n  border-bottom: 1px solid var(--border-1);\n}\n\n.tbl tbody tr:last-child td {\n  border-bottom: 0;\n}\n\n/* De puntentabellen van de kit dragen een eyebrow-kop op een ingezette grond,\n   niet de 0.32px-kop van de grote lijsttabellen. */\n.tbl thead th {\n  padding: 6px 12px;\n  background: var(--bg-inset);\n  font-size: var(--text-caption);\n  font-weight: 400;\n  line-height: 16px;\n  letter-spacing: 0.16em;\n  text-transform: uppercase;\n  white-space: nowrap;\n  color: var(--fg-4);\n}\n\n.tbl__right {\n  text-align: right;\n  white-space: nowrap;\n}\n\n.tbl__wrap {\n  white-space: normal;\n}\n\n.tbl__sub {\n  display: block;\n  font-size: var(--text-caption);\n  color: var(--fg-3);\n}\n\n.tbl__muted {\n  color: var(--fg-3);\n}\n\n.tbl__flag {\n  font-weight: 500;\n}\n\n.tbl__w24 {\n  width: 96px;\n}\n\n.tbl__w28 {\n  width: 112px;\n}\n\n.tbl__w32 {\n  width: 128px;\n}\n\n.tbl__w36 {\n  width: 144px;\n}\n\n.tbl__w40 {\n  width: 160px;\n}\n\n.tbl__w72 {\n  width: 288px;\n}\n</style>\n","import { createVNode as _createVNode, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeStyle as _normalizeStyle, withCtx as _withCtx } from \"vue\"\n\nconst _hoisted_1 = { class: \"scoring\" }\nconst _hoisted_2 = { class: \"grid2\" }\nconst _hoisted_3 = { class: \"weights\" }\nconst _hoisted_4 = { class: \"weight__name\" }\nconst _hoisted_5 = { class: \"weight__track\" }\nconst _hoisted_6 = { class: \"weight__pct tnum\" }\nconst _hoisted_7 = { class: \"tbl\" }\nconst _hoisted_8 = { class: \"card card--danger\" }\nconst _hoisted_9 = { class: \"card__head\" }\nconst _hoisted_10 = { class: \"card__icon card__icon--danger\" }\nconst _hoisted_11 = { class: \"grid2\" }\nconst _hoisted_12 = { class: \"card\" }\nconst _hoisted_13 = { class: \"card__head\" }\nconst _hoisted_14 = { class: \"card__icon\" }\nconst _hoisted_15 = { class: \"card\" }\nconst _hoisted_16 = { class: \"card__head\" }\nconst _hoisted_17 = { class: \"card__icon\" }\nconst _hoisted_18 = { class: \"card__body\" }\nconst _hoisted_19 = { class: \"services\" }\nconst _hoisted_20 = { class: \"services__list\" }\nconst _hoisted_21 = { class: \"card\" }\nconst _hoisted_22 = { class: \"card__head\" }\nconst _hoisted_23 = { class: \"card__icon\" }\nconst _hoisted_24 = { class: \"card\" }\nconst _hoisted_25 = { class: \"card__head\" }\nconst _hoisted_26 = { class: \"card__icon\" }\nconst _hoisted_27 = { class: \"card\" }\nconst _hoisted_28 = { class: \"card__head\" }\nconst _hoisted_29 = { class: \"card__icon\" }\nconst _hoisted_30 = { class: \"card\" }\nconst _hoisted_31 = { class: \"card__head\" }\nconst _hoisted_32 = { class: \"card__icon\" }\nconst _hoisted_33 = { class: \"card\" }\nconst _hoisted_34 = { class: \"card__head\" }\nconst _hoisted_35 = { class: \"card__icon card__icon--diverge\" }\nconst _hoisted_36 = { class: \"tbl\" }\nconst _hoisted_37 = { class: \"tbl__flag tbl__wrap\" }\nconst _hoisted_38 = { class: \"tbl__muted tbl__wrap\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(_Fragment, null, [\n    _createVNode($setup[\"PageHeader\"], {\n      class: \"nudica\",\n      title: \"Scoring\"\n    }),\n    _createVNode($setup[\"PageBody\"], { class: \"nudica\" }, {\n      default: _withCtx(() => [\n        _createElementVNode(\"div\", _hoisted_1, [\n          _createCommentVNode(\" The lead carries emphasis, which PageHeader's plain-string\\n           description cannot; so it is the first paragraph of the body. \"),\n          _cache[35] || (_cache[35] = _createElementVNode(\"p\", { class: \"lead\" }, [\n            _createTextVNode(\" Hoe de puntentelling per categorie precies werkt. De eindscore (0–100) is een \"),\n            _createElementVNode(\"strong\", null, \"gewogen gemiddelde\"),\n            _createTextVNode(\" van vijf aspecten. Bij de \"),\n            _createElementVNode(\"em\", null, \"observe-then-score\"),\n            _createTextVNode(\"-aanpak levert het AI-model alleen losse feitelijke observaties; de score wordt daarna \"),\n            _createElementVNode(\"strong\", null, \"deterministisch\"),\n            _createTextVNode(\" door code uitgerekend, dezelfde observaties leveren altijd exact dezelfde score op. \")\n          ], -1 /* CACHED */)),\n          _createCommentVNode(\" Weights and recommendation \"),\n          _createElementVNode(\"div\", _hoisted_2, [\n            _createVNode($setup[\"Panel\"], { title: \"Gewichten per aspect\" }, {\n              default: _withCtx(() => [\n                _cache[0] || (_cache[0] = _createElementVNode(\"p\", { class: \"desc\" }, \"Elk aspect scoort 0–100 en telt met een vast gewicht mee in de eindscore.\", -1 /* CACHED */)),\n                _createElementVNode(\"div\", _hoisted_3, [\n                  (_openBlock(), _createElementBlock(_Fragment, null, _renderList($setup.WEIGHTS, (w) => {\n                    return _createElementVNode(\"div\", {\n                      key: w.aspect,\n                      class: \"weight\"\n                    }, [\n                      _createElementVNode(\"span\", _hoisted_4, _toDisplayString(w.aspect), 1 /* TEXT */),\n                      _createElementVNode(\"div\", _hoisted_5, [\n                        _createElementVNode(\"div\", {\n                          class: \"weight__fill\",\n                          style: _normalizeStyle({ width: `${(w.pct / 25) * 100}%` })\n                        }, null, 4 /* STYLE */)\n                      ]),\n                      _createElementVNode(\"span\", _hoisted_6, _toDisplayString(w.pct) + \"%\", 1 /* TEXT */)\n                    ])\n                  }), 64 /* STABLE_FRAGMENT */))\n                ]),\n                _cache[1] || (_cache[1] = _createElementVNode(\"p\", { class: \"note\" }, [\n                  _createTextVNode(\" Totaal 100%. Daarbovenop een \"),\n                  _createElementVNode(\"strong\", null, \"+5 bonus\"),\n                  _createTextVNode(\" als er ook een 40ft-container past. \")\n                ], -1 /* CACHED */))\n              ]),\n              _: 1 /* STABLE */,\n              __: [0,1]\n            }),\n            _createVNode($setup[\"Panel\"], {\n              title: \"Aanbeveling per score\",\n              flush: \"\"\n            }, {\n              default: _withCtx(() => [\n                _cache[11] || (_cache[11] = _createElementVNode(\"p\", { class: \"desc desc--inset\" }, \"Welk eindoordeel hoort bij welke eindscore.\", -1 /* CACHED */)),\n                _createElementVNode(\"table\", _hoisted_7, [\n                  _cache[10] || (_cache[10] = _createElementVNode(\"thead\", null, [\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"th\", null, \"Eindscore\"),\n                      _createElementVNode(\"th\", null, \"Aanbeveling\")\n                    ])\n                  ], -1 /* CACHED */)),\n                  _createElementVNode(\"tbody\", null, [\n                    _createElementVNode(\"tr\", null, [\n                      _cache[3] || (_cache[3] = _createElementVNode(\"td\", { class: \"tnum\" }, \"75 – 100\", -1 /* CACHED */)),\n                      _createElementVNode(\"td\", null, [\n                        _createVNode($setup[\"Badge\"], { tone: \"score\" }, {\n                          default: _withCtx(() => _cache[2] || (_cache[2] = [\n                            _createTextVNode(\"Zeer geschikt\", -1 /* CACHED */)\n                          ])),\n                          _: 1 /* STABLE */,\n                          __: [2]\n                        })\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _cache[5] || (_cache[5] = _createElementVNode(\"td\", { class: \"tnum\" }, \"55 – 74\", -1 /* CACHED */)),\n                      _createElementVNode(\"td\", null, [\n                        _createVNode($setup[\"Badge\"], { tone: \"score\" }, {\n                          default: _withCtx(() => _cache[4] || (_cache[4] = [\n                            _createTextVNode(\"Geschikt\", -1 /* CACHED */)\n                          ])),\n                          _: 1 /* STABLE */,\n                          __: [4]\n                        })\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _cache[7] || (_cache[7] = _createElementVNode(\"td\", { class: \"tnum\" }, \"35 – 54\", -1 /* CACHED */)),\n                      _createElementVNode(\"td\", null, [\n                        _createVNode($setup[\"Badge\"], { tone: \"diverge\" }, {\n                          default: _withCtx(() => _cache[6] || (_cache[6] = [\n                            _createTextVNode(\"Beperkt geschikt\", -1 /* CACHED */)\n                          ])),\n                          _: 1 /* STABLE */,\n                          __: [6]\n                        })\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _cache[9] || (_cache[9] = _createElementVNode(\"td\", { class: \"tnum\" }, \"0 – 34\", -1 /* CACHED */)),\n                      _createElementVNode(\"td\", null, [\n                        _createVNode($setup[\"Badge\"], { tone: \"danger\" }, {\n                          default: _withCtx(() => _cache[8] || (_cache[8] = [\n                            _createTextVNode(\"Ongeschikt\", -1 /* CACHED */)\n                          ])),\n                          _: 1 /* STABLE */,\n                          __: [8]\n                        })\n                      ])\n                    ])\n                  ])\n                ])\n              ]),\n              _: 1 /* STABLE */,\n              __: [11]\n            })\n          ]),\n          _createCommentVNode(\" Hard exclusions \"),\n          _createElementVNode(\"section\", _hoisted_8, [\n            _createElementVNode(\"header\", _hoisted_9, [\n              _createElementVNode(\"span\", _hoisted_10, [\n                _createVNode($setup[\"Icon\"], {\n                  name: \"misuse--outline\",\n                  size: 20\n                })\n              ]),\n              _cache[12] || (_cache[12] = _createElementVNode(\"div\", { class: \"card__text\" }, [\n                _createElementVNode(\"h2\", { class: \"card__title\" }, \"Harde uitsluitingen\"),\n                _createElementVNode(\"p\", { class: \"card__desc\" }, [\n                  _createTextVNode(\" Eén van deze situaties zet de hele eindscore direct op \"),\n                  _createElementVNode(\"strong\", null, \"0\"),\n                  _createTextVNode(\": de aspecten worden dan niet meer berekend. \")\n                ])\n              ], -1 /* CACHED */))\n            ]),\n            _cache[13] || (_cache[13] = _createElementVNode(\"table\", { class: \"tbl\" }, [\n              _createElementVNode(\"thead\", null, [\n                _createElementVNode(\"tr\", null, [\n                  _createElementVNode(\"th\", null, \"Situatie\"),\n                  _createElementVNode(\"th\", { class: \"tbl__w40\" }, \"Gevolg\")\n                ])\n              ]),\n              _createElementVNode(\"tbody\", null, [\n                _createElementVNode(\"tr\", null, [\n                  _createElementVNode(\"td\", null, \"Snelweglocatie\"),\n                  _createElementVNode(\"td\", null, [\n                    _createElementVNode(\"span\", { class: \"pts pts--exclude code\" }, \"score 0\")\n                  ])\n                ]),\n                _createElementVNode(\"tr\", null, [\n                  _createElementVNode(\"td\", null, \"Geen publieke shopfunctie\"),\n                  _createElementVNode(\"td\", null, [\n                    _createElementVNode(\"span\", { class: \"pts pts--exclude code\" }, \"score 0\")\n                  ])\n                ]),\n                _createElementVNode(\"tr\", null, [\n                  _createElementVNode(\"td\", null, \"Shopfunctie niet verifieerbaar\"),\n                  _createElementVNode(\"td\", null, [\n                    _createElementVNode(\"span\", { class: \"pts pts--exclude code\" }, \"score 0\"),\n                    _createTextVNode(\" + review\")\n                  ])\n                ]),\n                _createElementVNode(\"tr\", null, [\n                  _createElementVNode(\"td\", null, \"Geen enkele container past op het terrein\"),\n                  _createElementVNode(\"td\", null, [\n                    _createElementVNode(\"span\", { class: \"pts pts--exclude code\" }, \"score 0\")\n                  ])\n                ])\n              ])\n            ], -1 /* CACHED */))\n          ]),\n          _createCommentVNode(\" Per-aspect detail \"),\n          _cache[36] || (_cache[36] = _createElementVNode(\"h2\", { class: \"section-title\" }, \"Puntentelling per aspect\", -1 /* CACHED */)),\n          _createElementVNode(\"div\", _hoisted_11, [\n            _createCommentVNode(\" Aard & Grootte \"),\n            _createElementVNode(\"section\", _hoisted_12, [\n              _createElementVNode(\"header\", _hoisted_13, [\n                _createElementVNode(\"span\", _hoisted_14, [\n                  _createVNode($setup[\"Icon\"], {\n                    name: \"store\",\n                    size: 20\n                  })\n                ]),\n                _cache[14] || (_cache[14] = _createElementVNode(\"div\", { class: \"card__text\" }, [\n                  _createElementVNode(\"h3\", { class: \"card__title\" }, \"Aard & Grootte\"),\n                  _createElementVNode(\"p\", { class: \"card__desc\" }, \"Past de container fysiek op het terrein?\")\n                ], -1 /* CACHED */)),\n                _cache[15] || (_cache[15] = _createElementVNode(\"span\", { class: \"chip code\" }, \"20%\", -1 /* CACHED */))\n              ]),\n              _cache[16] || (_cache[16] = _createElementVNode(\"div\", { class: \"card__body\" }, [\n                _createElementVNode(\"table\", { class: \"tbl\" }, [\n                  _createElementVNode(\"thead\", null, [\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"th\", null, \"Situatie\"),\n                      _createElementVNode(\"th\", { class: \"tbl__right tbl__w32\" }, \"Score\")\n                    ])\n                  ]),\n                  _createElementVNode(\"tbody\", null, [\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"20ft-container past op het terrein\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--base code\" }, \"80\")\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"20ft past niet, wel een 10ft-container (fallback)\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--base code\" }, \"15\"),\n                        _createTextVNode(),\n                        _createElementVNode(\"span\", { class: \"pts pts--review code\" }, \"review\")\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"Geen enkele container past\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--exclude code\" }, \"0\")\n                      ])\n                    ])\n                  ])\n                ])\n              ], -1 /* CACHED */))\n            ]),\n            _createCommentVNode(\" Extra Services \"),\n            _createElementVNode(\"section\", _hoisted_15, [\n              _createElementVNode(\"header\", _hoisted_16, [\n                _createElementVNode(\"span\", _hoisted_17, [\n                  _createVNode($setup[\"Icon\"], {\n                    name: \"settings--services\",\n                    size: 20\n                  })\n                ]),\n                _cache[17] || (_cache[17] = _createElementVNode(\"div\", { class: \"card__text\" }, [\n                  _createElementVNode(\"h3\", { class: \"card__title\" }, \"Extra Services\"),\n                  _createElementVNode(\"p\", { class: \"card__desc\" }, \"Aanwezigheid van publieke voorzieningen.\")\n                ], -1 /* CACHED */)),\n                _cache[18] || (_cache[18] = _createElementVNode(\"span\", { class: \"chip code\" }, \"20%\", -1 /* CACHED */))\n              ]),\n              _createElementVNode(\"div\", _hoisted_18, [\n                _cache[20] || (_cache[20] = _createElementVNode(\"table\", { class: \"tbl\" }, [\n                  _createElementVNode(\"thead\", null, [\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"th\", null, \"Onderdeel\"),\n                      _createElementVNode(\"th\", { class: \"tbl__right tbl__w28\" }, \"Punten\")\n                    ])\n                  ]),\n                  _createElementVNode(\"tbody\", null, [\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"Basis: publieke shopfunctie aanwezig\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--base code\" }, \"30\")\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"Per aanwezige voorziening (zie lijst)\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--pos code\" }, \"+15\")\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", { class: \"tbl__wrap\" }, [\n                        _createTextVNode(\" Per “actieve beheerder”-signaal \"),\n                        _createElementVNode(\"span\", { class: \"tbl__sub\" }, \" verharding goed onderhouden · ≥ 2 voorzieningen · actuele website \")\n                      ]),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--pos code\" }, \"+5\")\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"3 of meer voorzieningen onzeker\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--review code\" }, \"review\")\n                      ])\n                    ])\n                  ])\n                ], -1 /* CACHED */)),\n                _createElementVNode(\"div\", _hoisted_19, [\n                  _cache[19] || (_cache[19] = _createElementVNode(\"p\", { class: \"services__title\" }, \"Voorzieningen die elk +15 opleveren (max. score 100):\", -1 /* CACHED */)),\n                  _createElementVNode(\"div\", _hoisted_20, [\n                    (_openBlock(), _createElementBlock(_Fragment, null, _renderList($setup.SERVICES, (s) => {\n                      return _createElementVNode(\"span\", {\n                        key: s,\n                        class: \"services__item\"\n                      }, _toDisplayString(s), 1 /* TEXT */)\n                    }), 64 /* STABLE_FRAGMENT */))\n                  ])\n                ])\n              ])\n            ]),\n            _createCommentVNode(\" Parkeerruimte \"),\n            _createElementVNode(\"section\", _hoisted_21, [\n              _createElementVNode(\"header\", _hoisted_22, [\n                _createElementVNode(\"span\", _hoisted_23, [\n                  _createVNode($setup[\"Icon\"], {\n                    name: \"car\",\n                    size: 20\n                  })\n                ]),\n                _cache[21] || (_cache[21] = _createElementVNode(\"div\", { class: \"card__text\" }, [\n                  _createElementVNode(\"h3\", { class: \"card__title\" }, \"Parkeerruimte\"),\n                  _createElementVNode(\"p\", { class: \"card__desc\" }, \"Percentage parkeerplaatsen dat ná de container overblijft.\")\n                ], -1 /* CACHED */)),\n                _cache[22] || (_cache[22] = _createElementVNode(\"span\", { class: \"chip code\" }, \"25%\", -1 /* CACHED */))\n              ]),\n              _cache[23] || (_cache[23] = _createElementVNode(\"div\", { class: \"card__body\" }, [\n                _createElementVNode(\"table\", { class: \"tbl\" }, [\n                  _createElementVNode(\"thead\", null, [\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"th\", null, \"Resterend percentage\"),\n                      _createElementVNode(\"th\", { class: \"tbl__right tbl__w36\" }, \"Score\")\n                    ])\n                  ]),\n                  _createElementVNode(\"tbody\", null, [\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"≥ 75% overgebleven\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--base code\" }, \"90\")\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"50% – 75% overgebleven\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--base code\" }, \"50 → 90\")\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"< 50% overgebleven\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--base code\" }, \"10 – 25\")\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"< 50%, maar reststrook aanwezig\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--pos code\" }, \"+15\"),\n                        _createTextVNode(),\n                        _createElementVNode(\"span\", { class: \"pts pts--review code\" }, \"review\")\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", { class: \"tbl__wrap\" }, \"Lage score, maar bruikbare openbare parkeerplekken vlakbij\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--base code\" }, \"→ 55\"),\n                        _createTextVNode(),\n                        _createElementVNode(\"span\", { class: \"pts pts--review code\" }, \"review\")\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"Onbekend (percentage én telling ontbreken)\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--base code\" }, \"25\"),\n                        _createTextVNode(),\n                        _createElementVNode(\"span\", { class: \"pts pts--review code\" }, \"review\")\n                      ])\n                    ])\n                  ])\n                ]),\n                _createElementVNode(\"p\", { class: \"note\" }, \" Tussen 50% en 75% loopt de score lineair op van 50 naar 90. Ontbreekt het percentage maar zijn de vakken wél geteld, dan wordt de resterende fractie afgeleid uit de telling (in plaats van het forfait van 25). \")\n              ], -1 /* CACHED */))\n            ]),\n            _createCommentVNode(\" Toegankelijkheid \"),\n            _createElementVNode(\"section\", _hoisted_24, [\n              _createElementVNode(\"header\", _hoisted_25, [\n                _createElementVNode(\"span\", _hoisted_26, [\n                  _createVNode($setup[\"Icon\"], {\n                    name: \"delivery-truck\",\n                    size: 20\n                  })\n                ]),\n                _cache[24] || (_cache[24] = _createElementVNode(\"div\", { class: \"card__text\" }, [\n                  _createElementVNode(\"h3\", { class: \"card__title\" }, \"Toegankelijkheid\"),\n                  _createElementVNode(\"p\", { class: \"card__desc\" }, \"Kan de container geplaatst en bevoorraad worden?\")\n                ], -1 /* CACHED */)),\n                _cache[25] || (_cache[25] = _createElementVNode(\"span\", { class: \"chip code\" }, \"20%\", -1 /* CACHED */))\n              ]),\n              _cache[26] || (_cache[26] = _createElementVNode(\"div\", { class: \"card__body\" }, [\n                _createElementVNode(\"table\", { class: \"tbl\" }, [\n                  _createElementVNode(\"thead\", null, [\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"th\", null, \"Factor\"),\n                      _createElementVNode(\"th\", { class: \"tbl__right tbl__w32\" }, \"Effect\")\n                    ])\n                  ]),\n                  _createElementVNode(\"tbody\", null, [\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"Basis\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--base code\" }, \"50\")\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"Voldoende vrije hoogte op de aanbevolen plek\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--pos code\" }, \"+20\")\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"Vrachtwagen kan de plek bereiken\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--pos code\" }, \"+20\")\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"Klantroute wordt geblokkeerd\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--neg code\" }, \"−30\")\n                      ])\n                    ]),\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"Meer dan 2 conflictgebieden\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--neg code\" }, \"−10\")\n                      ])\n                    ])\n                  ])\n                ]),\n                _createElementVNode(\"p\", { class: \"note\" }, \" Onzekere vrije hoogte of vrachtwagenbereik levert geen punten op en vraagt om review. \")\n              ], -1 /* CACHED */))\n            ]),\n            _createCommentVNode(\" Zichtbaarheid \"),\n            _createElementVNode(\"section\", _hoisted_27, [\n              _createElementVNode(\"header\", _hoisted_28, [\n                _createElementVNode(\"span\", _hoisted_29, [\n                  _createVNode($setup[\"Icon\"], {\n                    name: \"view\",\n                    size: 20\n                  })\n                ]),\n                _cache[27] || (_cache[27] = _createElementVNode(\"div\", { class: \"card__text\" }, [\n                  _createElementVNode(\"h3\", { class: \"card__title\" }, \"Zichtbaarheid\"),\n                  _createElementVNode(\"p\", { class: \"card__desc\" }, \"Zichtbaarheid van de locatie (5a) én van de containerplek (5b).\")\n                ], -1 /* CACHED */)),\n                _cache[28] || (_cache[28] = _createElementVNode(\"span\", { class: \"chip code\" }, \"15%\", -1 /* CACHED */))\n              ]),\n              _cache[29] || (_cache[29] = _createElementVNode(\"div\", { class: \"card__body card__body--stack\" }, [\n                _createElementVNode(\"div\", null, [\n                  _createElementVNode(\"p\", { class: \"subhead\" }, \"5a: Locatie zichtbaar (basis 50)\"),\n                  _createElementVNode(\"table\", { class: \"tbl\" }, [\n                    _createElementVNode(\"tbody\", null, [\n                      _createElementVNode(\"tr\", null, [\n                        _createElementVNode(\"td\", null, \"Locatie zichtbaar vanaf de openbare weg\"),\n                        _createElementVNode(\"td\", { class: \"tbl__right tbl__w24\" }, [\n                          _createElementVNode(\"span\", { class: \"pts pts--pos code\" }, \"+20\")\n                        ])\n                      ]),\n                      _createElementVNode(\"tr\", null, [\n                        _createElementVNode(\"td\", null, \"Hoeklocatie\"),\n                        _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                          _createElementVNode(\"span\", { class: \"pts pts--pos code\" }, \"+15\")\n                        ])\n                      ]),\n                      _createElementVNode(\"tr\", null, [\n                        _createElementVNode(\"td\", { class: \"tbl__wrap\" }, \"Doorgaande weg vóór het pand (N-weg of gemeentelijk)\"),\n                        _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                          _createElementVNode(\"span\", { class: \"pts pts--pos code\" }, \"+15\")\n                        ])\n                      ]),\n                      _createElementVNode(\"tr\", null, [\n                        _createElementVNode(\"td\", { class: \"tbl__wrap\" }, \"Grote publieksbestemming (tuincentrum, bouwmarkt)\"),\n                        _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                          _createElementVNode(\"span\", { class: \"pts pts--pos code\" }, \"+15\")\n                        ])\n                      ])\n                    ])\n                  ])\n                ]),\n                _createElementVNode(\"div\", null, [\n                  _createElementVNode(\"p\", { class: \"subhead\" }, \"5b: Containerplek zichtbaar\"),\n                  _createElementVNode(\"table\", { class: \"tbl\" }, [\n                    _createElementVNode(\"tbody\", null, [\n                      _createElementVNode(\"tr\", null, [\n                        _createElementVNode(\"td\", null, \"Aanbevolen plek zichtbaar vanaf de weg\"),\n                        _createElementVNode(\"td\", { class: \"tbl__right tbl__w24\" }, [\n                          _createElementVNode(\"span\", { class: \"pts pts--base code\" }, \"85\")\n                        ])\n                      ]),\n                      _createElementVNode(\"tr\", null, [\n                        _createElementVNode(\"td\", null, \"Niet zichtbaar\"),\n                        _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                          _createElementVNode(\"span\", { class: \"pts pts--base code\" }, \"25\")\n                        ])\n                      ]),\n                      _createElementVNode(\"tr\", null, [\n                        _createElementVNode(\"td\", null, \"Onzeker\"),\n                        _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                          _createElementVNode(\"span\", { class: \"pts pts--base code\" }, \"40\"),\n                          _createTextVNode(),\n                          _createElementVNode(\"span\", { class: \"pts pts--review code\" }, \"review\")\n                        ])\n                      ])\n                    ])\n                  ])\n                ]),\n                _createElementVNode(\"p\", { class: \"note note--boxed\" }, [\n                  _createTextVNode(\" Aspectscore = \"),\n                  _createElementVNode(\"strong\", null, \"5a × 40% + 5b × 60%\"),\n                  _createTextVNode(\". \")\n                ])\n              ], -1 /* CACHED */))\n            ]),\n            _createCommentVNode(\" Bonus \"),\n            _createElementVNode(\"section\", _hoisted_30, [\n              _createElementVNode(\"header\", _hoisted_31, [\n                _createElementVNode(\"span\", _hoisted_32, [\n                  _createVNode($setup[\"Icon\"], {\n                    name: \"add--alt\",\n                    size: 20\n                  })\n                ]),\n                _cache[30] || (_cache[30] = _createElementVNode(\"div\", { class: \"card__text\" }, [\n                  _createElementVNode(\"h3\", { class: \"card__title\" }, \"Bonus\"),\n                  _createElementVNode(\"p\", { class: \"card__desc\" }, \"Extraatje bovenop de eindscore.\")\n                ], -1 /* CACHED */)),\n                _cache[31] || (_cache[31] = _createElementVNode(\"span\", { class: \"chip code\" }, \"+5\", -1 /* CACHED */))\n              ]),\n              _cache[32] || (_cache[32] = _createElementVNode(\"div\", { class: \"card__body\" }, [\n                _createElementVNode(\"table\", { class: \"tbl\" }, [\n                  _createElementVNode(\"thead\", null, [\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"th\", null, \"Situatie\"),\n                      _createElementVNode(\"th\", { class: \"tbl__right tbl__w32\" }, \"Effect\")\n                    ])\n                  ]),\n                  _createElementVNode(\"tbody\", null, [\n                    _createElementVNode(\"tr\", null, [\n                      _createElementVNode(\"td\", null, \"Er past óók een grotere 40ft-container\"),\n                      _createElementVNode(\"td\", { class: \"tbl__right\" }, [\n                        _createElementVNode(\"span\", { class: \"pts pts--pos code\" }, \"+5\")\n                      ])\n                    ])\n                  ])\n                ]),\n                _createElementVNode(\"p\", { class: \"note\" }, \"Wordt bij de eindscore opgeteld (maximaal 100).\")\n              ], -1 /* CACHED */))\n            ])\n          ]),\n          _createCommentVNode(\" Review flags \"),\n          _createElementVNode(\"section\", _hoisted_33, [\n            _createElementVNode(\"header\", _hoisted_34, [\n              _createElementVNode(\"span\", _hoisted_35, [\n                _createVNode($setup[\"Icon\"], {\n                  name: \"flag\",\n                  size: 20\n                })\n              ]),\n              _cache[33] || (_cache[33] = _createElementVNode(\"div\", { class: \"card__text\" }, [\n                _createElementVNode(\"h2\", { class: \"card__title\" }, \"Review-vlaggen\"),\n                _createElementVNode(\"p\", { class: \"card__desc\" }, [\n                  _createTextVNode(\" Bij onzekerheden vraagt het systeem om \"),\n                  _createElementVNode(\"strong\", null, \"menselijke review\"),\n                  _createTextVNode(\". De score blijft geldig, maar verdient een extra controle ter plaatse. \")\n                ])\n              ], -1 /* CACHED */))\n            ]),\n            _createElementVNode(\"table\", _hoisted_36, [\n              _cache[34] || (_cache[34] = _createElementVNode(\"thead\", null, [\n                _createElementVNode(\"tr\", null, [\n                  _createElementVNode(\"th\", { class: \"tbl__w72\" }, \"Vlag\"),\n                  _createElementVNode(\"th\", null, \"Betekenis\")\n                ])\n              ], -1 /* CACHED */)),\n              _createElementVNode(\"tbody\", null, [\n                (_openBlock(), _createElementBlock(_Fragment, null, _renderList($setup.REVIEW_FLAGS, ([flag, meaning]) => {\n                  return _createElementVNode(\"tr\", { key: flag }, [\n                    _createElementVNode(\"td\", _hoisted_37, _toDisplayString(flag), 1 /* TEXT */),\n                    _createElementVNode(\"td\", _hoisted_38, _toDisplayString(meaning), 1 /* TEXT */)\n                  ])\n                }), 64 /* STABLE_FRAGMENT */))\n              ])\n            ])\n          ]),\n          _cache[37] || (_cache[37] = _createElementVNode(\"p\", { class: \"note note--foot\" }, [\n            _createTextVNode(\" Deze puntentelling geldt voor de \"),\n            _createElementVNode(\"em\", null, \"observe-then-score\"),\n            _createTextVNode(\"-aanpak. De score wordt deterministisch uit de observaties berekend: op de analyse-detailpagina kun je per aspect de opbouw stap-voor-stap openklappen. \")\n          ], -1 /* CACHED */))\n        ])\n      ]),\n      _: 1 /* STABLE */\n    })\n  ], 64 /* STABLE_FRAGMENT */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/ScoringView.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/ScoringView.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/ScoringView.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/ScoringView.vue\";script.__scopeId = \"data-v-9779bf04\";export default script;","<template>\n  <PageHeader class=\"nudica\" title=\"Hoe werkt de Statiegeld Screener?\" :description=\"HELP_LEAD\" />\n\n  <PageBody class=\"nudica\">\n    <div class=\"help\">\n      <!-- The table of contents stays put while scrolling: on a page of\n           seventeen chapters that is the difference between reading and\n           searching. Hidden under 1080px, where the column would cost more\n           than it gives. -->\n      <nav class=\"toc\" aria-label=\"Op deze pagina\">\n        <span class=\"eyebrow toc__eyebrow\">Op deze pagina</span>\n        <a\n          v-for=\"chapter in HELP_CHAPTERS\"\n          :key=\"chapter.id\"\n          class=\"toc__item\"\n          :href=\"chapterHref(chapter.id)\"\n          @click.prevent=\"goToChapter(chapter.id)\"\n        >\n          <!-- The number sits a tier lighter than the title in the kit. Not\n               via alpha on --fg-3 (2.6:1) but on --fg-4, which stays above\n               4.5:1 at 14px in both themes. -->\n          <span class=\"toc__nr tnum\">{{ chapter.nr }}</span>\n          <span class=\"toc__title\">{{ chapter.title }}</span>\n        </a>\n      </nav>\n\n      <div class=\"help__main\">\n        <div class=\"notice\" role=\"status\">\n          <Icon name=\"information--filled\" class=\"notice__icon\" />\n          <div class=\"notice__text\">\n            <span class=\"notice__title\">{{ HELP_LOGIN_NOTICE.title }}</span>\n            <span>{{ HELP_LOGIN_NOTICE.text }}</span>\n          </div>\n        </div>\n\n        <section v-for=\"chapter in HELP_CHAPTERS\" :id=\"chapter.id\" :key=\"chapter.id\" class=\"chapter\">\n          <div class=\"chapter__head\">\n            <span class=\"chapter__nr tnum\">{{ chapter.nr }}</span>\n            <h2 class=\"chapter__title\">{{ chapter.title }}</h2>\n          </div>\n\n          <div class=\"blocks\">\n            <template v-for=\"(block, index) in chapter.blocks\" :key=\"index\">\n              <p v-if=\"block.kind === 'p'\" class=\"blocks__p\">{{ block.text }}</p>\n\n              <dl v-else-if=\"block.kind === 'list'\" class=\"blocks__list\">\n                <div v-for=\"item in block.items\" :key=\"item.term\" class=\"blocks__item\">\n                  <dt class=\"blocks__term\">{{ item.term }}</dt>\n                  <dd class=\"blocks__text\">{{ item.text }}</dd>\n                </div>\n              </dl>\n\n              <!-- A link to a page that exists in this webdesign is a real\n                   route; a page still to come renders as text with \"(volgt)\"\n                   so the reader is not sent to a dead end. -->\n              <RouterLink\n                v-else-if=\"helpHrefToRoute(block.href) !== null\"\n                :to=\"{ name: helpHrefToRoute(block.href) ?? 'locations' }\"\n                class=\"blocks__link\"\n              >\n                {{ block.label }}\n              </RouterLink>\n              <span v-else class=\"blocks__pending\">{{ block.label }} (volgt)</span>\n            </template>\n          </div>\n        </section>\n      </div>\n    </div>\n  </PageBody>\n</template>\n\n<script setup lang=\"ts\">\nimport { nextTick, onMounted } from \"vue\";\nimport { RouterLink, useRoute, useRouter } from \"vue-router\";\nimport PageHeader from \"../components/shell/PageHeader.vue\";\nimport PageBody from \"../components/shell/PageBody.vue\";\nimport Icon from \"../components/icons/Icon.vue\";\nimport { HELP_CHAPTERS, HELP_LEAD, HELP_LOGIN_NOTICE } from \"../lib/help-content\";\nimport { helpHrefToRoute } from \"../lib/help-route\";\n\n// The help page out of the screener kit: a sticky table of contents on the\n// left, one hairline card per chapter on the right. The text itself lives in\n// lib/help-content.ts, Vue-free, so the test can pin it.\n//\n// Hash routing means a plain `href=\"#score\"` would CHANGE THE ROUTE instead of\n// jumping to the anchor. Chapters are therefore addressed through the route\n// query (`#/help?hoofdstuk=score`): the ToC links resolve to that URL so they\n// stay copyable, the click scrolls in place, and a deep link scrolls on mount.\nconst route = useRoute();\nconst router = useRouter();\n\nconst QUERY_KEY = \"hoofdstuk\";\n\nfunction chapterHref(id: string): string {\n  return router.resolve({ name: \"help\", query: { [QUERY_KEY]: id } }).href;\n}\n\nfunction scrollToChapter(id: string) {\n  document.getElementById(id)?.scrollIntoView({ block: \"start\" });\n}\n\nfunction goToChapter(id: string) {\n  scrollToChapter(id);\n  if (route.query[QUERY_KEY] !== id) void router.replace({ name: \"help\", query: { [QUERY_KEY]: id } });\n}\n\nonMounted(async () => {\n  const wanted = route.query[QUERY_KEY];\n  if (typeof wanted !== \"string\") return;\n  await nextTick();\n  scrollToChapter(wanted);\n});\n</script>\n\n<style scoped>\n.help {\n  display: grid;\n  grid-template-columns: minmax(0, 1fr);\n  align-items: start;\n  gap: 20px;\n}\n\n.toc {\n  display: none;\n}\n\n@media (min-width: 1080px) {\n  .help {\n    grid-template-columns: 220px minmax(0, 1fr);\n  }\n\n  .toc {\n    position: sticky;\n    top: 16px;\n    display: flex;\n    flex-direction: column;\n    gap: 2px;\n  }\n}\n\n.toc__eyebrow {\n  padding-bottom: 6px;\n}\n\n.toc__item {\n  display: flex;\n  gap: 8px;\n  padding: 5px 8px;\n  border-left: 2px solid var(--border-1);\n  font-size: var(--text-ui);\n  color: var(--fg-3);\n  cursor: pointer;\n  transition: color 110ms, background-color 110ms, border-color 110ms;\n}\n\n@media (hover: hover) {\n  .toc__item:hover {\n    border-color: var(--border-strong);\n    background: var(--accent);\n    color: var(--fg-1);\n  }\n}\n\n.toc__nr {\n  flex: none;\n  color: var(--fg-4);\n}\n\n.toc__title {\n  min-width: 0;\n}\n\n.help__main {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  min-width: 0;\n}\n\n.notice {\n  display: flex;\n  align-items: flex-start;\n  gap: 16px;\n  padding: 12px 16px;\n  border-left: 3px solid var(--info);\n  background: var(--info-bg);\n}\n\n.notice__icon {\n  margin-top: 2px;\n  color: var(--info-fg);\n}\n\n.notice__text {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: baseline;\n  gap: 8px;\n  font-size: var(--text-ui);\n  color: var(--fg-1);\n}\n\n.notice__title {\n  font-weight: 600;\n}\n\n/* Hairline card per chapter. scroll-margin keeps a jumped-to heading off the\n   very top edge of the scroll container. */\n.chapter {\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n  min-width: 0;\n  padding: 24px;\n  scroll-margin-top: 16px;\n  background: var(--bg-surface);\n  border: 1px solid var(--border-1);\n  border-radius: var(--radius);\n}\n\n.chapter__head {\n  display: flex;\n  align-items: baseline;\n  gap: 10px;\n}\n\n.chapter__nr {\n  font-size: var(--text-ui);\n  color: var(--score-fg);\n}\n\n.chapter__title {\n  margin: 0;\n  font-size: 16px;\n  line-height: 22px;\n  font-weight: 600;\n  color: var(--fg-1);\n}\n\n.blocks {\n  display: flex;\n  flex-direction: column;\n  gap: 10px;\n}\n\n/* Reading text sits on the kit's body-02 size (16px) and at most 72 characters. */\n.blocks__p {\n  margin: 0;\n  max-width: 72ch;\n  font-size: 16px;\n  line-height: 24px;\n  color: var(--fg-3);\n}\n\n.blocks__list {\n  display: flex;\n  flex-direction: column;\n  gap: 6px;\n  margin: 0;\n  max-width: 72ch;\n}\n\n.blocks__item {\n  display: flex;\n  gap: 10px;\n  padding-left: 12px;\n  border-left: 2px solid var(--border-1);\n}\n\n.blocks__term {\n  flex: none;\n  font-size: var(--text-ui);\n  font-weight: 600;\n  color: var(--fg-1);\n}\n\n.blocks__text {\n  margin: 0;\n  font-size: var(--text-ui);\n  color: var(--fg-3);\n}\n\n.blocks__link {\n  width: fit-content;\n  font-size: var(--text-ui);\n  color: var(--info-fg);\n  text-decoration: underline;\n  text-underline-offset: 2px;\n  cursor: pointer;\n  transition: color 110ms;\n}\n\n@media (hover: hover) {\n  .blocks__link:hover {\n    color: var(--info);\n  }\n}\n\n.blocks__pending {\n  width: fit-content;\n  font-size: var(--text-ui);\n  color: var(--fg-4);\n}\n</style>\n","/**\n * De inhoud van de Helppagina als pure data, zonder Vue.\n *\n * De tekst komt uit de Next-admin (`frontend/lib/help-content.ts`) en beschrijft\n * de huidige interface. De structuur volgt de\n * screener-UI-kit: genummerde hoofdstukken die tegelijk de inhoudsopgave en de\n * ankerdoelen van de pagina vormen.\n *\n * Het `id` van een hoofdstuk is het anker in de URL (`/help#score`), dus wijzig\n * het niet zonder reden: een gedeelde link valt dan terug op de bovenkant van de\n * pagina. `tests/admin-lib.test.ts` pint de invarianten (unieke ids, geen lege\n * blokken, geen kastlijntjes).\n *\n * WERKAFSPRAAK: wijzigt de interface (nieuwe pagina, andere flow, verplaatste\n * knop), werk dan het bijbehorende hoofdstuk hier bij. Dit is de enige plek waar\n * de helptekst staat.\n */\n\n/** Een alinea. Wordt op maximaal 72 tekens breed gerenderd. */\nexport interface HelpParagraph {\n  kind: \"p\";\n  text: string;\n}\n\n/** Een definitielijst: vette term met een beschrijving erachter. */\nexport interface HelpList {\n  kind: \"list\";\n  items: Array<{ term: string; text: string }>;\n}\n\n/** Een verwijzing naar een andere pagina binnen de admin. */\nexport interface HelpLink {\n  kind: \"link\";\n  href: string;\n  label: string;\n}\n\nexport type HelpBlock = HelpParagraph | HelpList | HelpLink;\n\nexport interface HelpChapter {\n  /** Ankerdoel in de URL en sleutel in de inhoudsopgave. */\n  id: string;\n  /** Consecutive chapter number, starting at 1, shared by the heading and table of contents. */\n  nr: string;\n  title: string;\n  blocks: readonly HelpBlock[];\n}\n\n/** De inleiding onder de paginatitel. */\nexport const HELP_LEAD =\n  \"Deze tool screent locaties (tankstations, wasstraten, bouwmarkten, tuincentra) op geschiktheid voor plaatsing van een 20ft bulkstatiegeldcontainer (6,00 x 2,45 m). De screening gebeurt met AI-modellen die satelliet- en straatbeelden analyseren.\";\n\n/** De inlogmelding boven de hoofdstukken. */\nexport const HELP_LOGIN_NOTICE = {\n  title: \"Inloggen.\",\n  text: \"Log in met je WebHare-account (e-mailadres en wachtwoord). Toegang is beperkt tot accounts met het beheerdersrecht voor deze admin. Je naam wordt overgenomen van je account en getoond bij analyses die je start. Uitloggen doe je via “Uitloggen” in de zwarte balk.\",\n} as const;\n\nexport const HELP_CHAPTERS: readonly HelpChapter[] = [\n  {\n    id: \"interface\",\n    nr: \"1\",\n    title: \"De interface\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"De schermindeling kent vier vaste lagen, elk met een eigen taak. Bovenaan de zwarte balk: het logo, het belletje, het licht/donker-icoon en “Uitloggen”. Links de rail met alle onderdelen, gegroepeerd in Screener en Batch, met tellers erachter; onderin kun je hem inklappen tot een icoonrail en die keuze wordt onthouden. Daarboven de tabstrip: wat je openstaan hebt. Onderaan een smalle statusbalk met de aantallen, de laatste batch-poll en het omgevingslabel, waarbij groen “productie” live data betekent, oranje “test” de testomgeving is en blauw “lokaal” een ontwikkelmachine.\",\n      },\n      {\n        kind: \"p\",\n        text: \"Het belletje toont mislukte en vastgelopen analyses. Klik op een melding om naar het juiste tabblad in Instellingen te gaan. De meldingen en tellers worden elke minuut bijgewerkt.\",\n      },\n      {\n        kind: \"p\",\n        text: \"Elke tab in de strip is een echte pagina met een eigen adres. Je kunt hem dus delen, bookmarken of met het muiswiel in een browsertabblad openen, en de terugknop van de browser doet gewoon wat je verwacht. Openen van een locatie of analyse maakt een eigen tabblad; navigeren in de rail hernoemt het eerste.\",\n      },\n      {\n        kind: \"p\",\n        text: \"Het thema start licht. Donker blijft een klik weg via het icoon in de zwarte balk; die keuze wordt per browser bewaard.\",\n      },\n      {\n        kind: \"p\",\n        text: \"Op de Locaties-pagina staan vier tellers boven de tabel: totaal, hoeveel er geanalyseerd zijn, hoeveel er controle nodig hebben en de gemiddelde score. Die tellers rekenen over je huidige filter, dus als je zoekt of een provincie, type of weergave kiest, bewegen ze mee.\",\n      },\n    ],\n  },\n  {\n    id: \"verkenner\",\n    nr: \"2\",\n    title: \"Verkenner: de kaart\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"De Verkenner is het eerste item in de rail en toont alle locaties op een kaart van Nederland. Links staat de resultatenlijst, rechts verschijnt een detailpaneel zodra je een pin of een rij kiest, en rechtsonder staat de legenda met de vijf geschiktheidsniveaus.\",\n      },\n      {\n        kind: \"p\",\n        text: \"De filterbalk boven de kaart werkt op de hele set: zoeken, Regio, Soort, Geschiktheid, Fase en Feedback. Achter Geschiktheid en Fase staat per keuze hoeveel locaties eronder vallen, geteld over alle locaties en niet over je huidige resultaat. Rechts van de balk staat “Wissen” met het aantal actieve filters.\",\n      },\n      {\n        kind: \"list\",\n        items: [\n          {\n            term: \"Fase\",\n            text: \"wordt afgeleid en is geen apart veld: geen score betekent Niet geanalyseerd, veldfeedback betekent Beoordeeld, een score onder 55 betekent Afgevallen, de rest is Geanalyseerd.\",\n          },\n          {\n            term: \"Pinnen\",\n            text: \"de kleur is het geschiktheidsniveau, een blauw puntje rechtsboven betekent dat er veldfeedback ligt. Uitgezoomd krimpen de pinnen tot stippen, want duizenden pinnen op volle grootte lopen tot een grijze vlek dicht. Dubbelklik op een pin opent de locatie.\",\n          },\n        ],\n      },\n    ],\n  },\n  {\n    id: \"kiezen\",\n    nr: \"3\",\n    title: \"Locatie kiezen\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"Op de Locaties-pagina vind je alle beschikbare locaties. Filter met de zoekbalk (naam, adres of plaats), met provincie, met vestigingstype, en met de schakelaar rechts: “Alle locaties”, “Te reviewen” (de nieuwste analyse vraagt om menselijke controle) of “Gescoord” (er is een voltooide analyse). De filters werken op de hele set, niet alleen op de zichtbare pagina. Klik op een locatie om het detail te openen.\",\n      },\n      {\n        kind: \"p\",\n        text: \"De scorebalk in de laatste kolom gebruikt overal dezelfde geschiktheidsschaal: 75 tot 100 zeer geschikt, 55 tot 74 geschikt, 35 tot 54 beperkt geschikt, 0 tot 34 ongeschikt. Let op het verschil tussen een score van 0 (een echte uitslag, meestal een harde uitsluiting) en “niet gescoord” (nog geen analyse).\",\n      },\n    ],\n  },\n  {\n    id: \"toevoegen\",\n    nr: \"4\",\n    title: \"Locatie handmatig toevoegen\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"Staat een pand niet in de lijst, dan voeg je het toe met de groene knop “Locatie toevoegen” rechtsboven op de Locaties-pagina of in de Verkenner. Je vult een adres in; plaats, postcode, provincie en coordinaten worden erbij gezocht via PDOK. Bedrijfsnaam en vestigingstype zijn optioneel.\",\n      },\n      {\n        kind: \"p\",\n        text: \"Ligt er al een locatie binnen 150 meter, dan wordt er niets aangemaakt: je krijgt eerst die buren te zien met hun afstand. Is het echt een ander pand, kies dan “Toch toevoegen”. Zo ontstaan er geen dubbele locaties zonder dat iemand het merkt.\",\n      },\n    ],\n  },\n  {\n    id: \"starten\",\n    nr: \"5\",\n    title: \"Analyse starten\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"Op de detailpagina kun je een analyse starten. Kies welke AI-modellen je wilt inzetten en klik op Analyse starten. Alle geselecteerde modellen draaien parallel en analyseren dezelfde locatie. Beschikbare modellen:\",\n      },\n      {\n        kind: \"list\",\n        items: [\n          { term: \"OpenAI\", text: \"ChatGPT 5.2, ChatGPT 5.2 Thinking\" },\n          { term: \"Anthropic\", text: \"Claude Opus 4.6, Claude Sonnet 4.5, Claude Haiku 4.5\" },\n          { term: \"Google\", text: \"Gemini 3.6 Flash (standaard), Gemini 3 Pro, Gemini 3 Flash\" },\n        ],\n      },\n    ],\n  },\n  {\n    id: \"prompt\",\n    nr: \"6\",\n    title: \"De prompt staat vast\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"De prompt waarmee de AI een locatie beschrijft staat vast in de applicatie en is niet per analyse aan te passen. Zo zijn analyses onderling vergelijkbaar. Een eigen prompt die je eerder in je browser had bewaard wordt niet meer gebruikt.\",\n      },\n    ],\n  },\n  {\n    id: \"dryrun\",\n    nr: \"7\",\n    title: \"Dry run modus\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"Met de dry run-toggle kun je de hele interface testen zonder echte API-aanroepen (en dus zonder kosten). De modellen retourneren dan realistische nep-data met een gesimuleerde vertraging. Dry run-analyses zijn herkenbaar aan een badge.\",\n      },\n    ],\n  },\n  {\n    id: \"aanpak\",\n    nr: \"8\",\n    title: \"Aanpak: observe-then-score\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"Iedere nieuwe analyse (in de Configuratie-card, de bulk-runner en de CLI) werkt met observe-then-score: het model levert alleen losse feitelijke observaties (parkeerplaatsen, kadaster-grens, type weg, en verder). De score wordt daarna deterministisch uitgerekend door code met vaste gewichten. Zelfde observaties geven altijd dezelfde score, veld voor veld herleidbaar.\",\n      },\n      {\n        kind: \"p\",\n        text: \"Eerdere analyses die nog in één stap (klassiek) zijn gedraaid blijven leesbaar en veranderen niet. Opnieuw draaien maakt altijd een nieuwe observe-then-score analyse. Op de analyse-detailpagina toont een badge welke aanpak gebruikt is; klassieke analyses krijgen geen badge.\",\n      },\n    ],\n  },\n  {\n    id: \"cache\",\n    nr: \"9\",\n    title: \"Cache\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"Met de Cache-toggle worden identieke model-aanvragen (zelfde model, prompt en afbeeldingen) automatisch hergebruikt uit eerdere analyses. Gecachte resultaten zijn herkenbaar aan een badge en kosten geen tokens. Zet cache uit als je een verse analyse wilt forceren.\",\n      },\n    ],\n  },\n  {\n    id: \"vergelijken\",\n    nr: \"10\",\n    title: \"Resultaten vergelijken\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"Na het starten wordt je doorgestuurd naar de vergelijkingspagina. Hier zie je real-time de voortgang per model. Zodra een model klaar is, verschijnt het resultaat in de Quick-Scan-tabel en de detailkaarten.\",\n      },\n    ],\n  },\n  {\n    id: \"score\",\n    nr: \"11\",\n    title: \"Quick-Scan-scorekaart en hoe de score wordt berekend\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"De eindscore (0 tot 100) is een gewogen gemiddelde van vijf aspecten. Elk aspect telt met een vast gewicht mee:\",\n      },\n      {\n        kind: \"list\",\n        items: [\n          {\n            term: \"Aard en Grootte (20%)\",\n            text: \"past er een 20ft-container op het terrein? Zo ja: 80, anders 15 (of een harde uitsluiting als niets past).\",\n          },\n          {\n            term: \"Extra Services (20%)\",\n            text: \"basis 30 voor de aanwezige publieke shop, +15 per extra voorziening (wasstraat, EV-laadpaal, pakketautomaat).\",\n          },\n          {\n            term: \"Parkeerruimte (25%)\",\n            text: \"het percentage parkeerplaatsen dat na de container overblijft (afgeleid uit de telling als het percentage zelf ontbreekt; pas als ook de telling ontbreekt volgt forfait 25). Bruikbare openbare of straatparkeerplekken vlakbij verzachten een lage score.\",\n          },\n          {\n            term: \"Toegankelijkheid (20%)\",\n            text: \"basis 50, +20 voor vrije hoogte en +20 voor vrachtwagenbereik, strafpunten bij geblokkeerde klantroute of conflictgebieden.\",\n          },\n          {\n            term: \"Zichtbaarheid (15%)\",\n            text: \"zichtbaarheid van de locatie (5a) en van de containerplek (5b), gecombineerd als 5a x 40% + 5b x 60%. Een grote publieksbestemming (tuincentrum, bouwmarkt) krijgt een zichtbaarheidsbonus, ook zonder doorgaande weg.\",\n          },\n        ],\n      },\n      {\n        kind: \"p\",\n        text: \"Daarbovenop een bonus van +5 als er ook een 40ft-container past.\",\n      },\n      {\n        kind: \"p\",\n        text: \"Harde uitsluitingen zetten de hele score op 0: een snelweglocatie, geen publieke shopfunctie, of geen enkele container die past. Bij onzekerheden (bijvoorbeeld een niet-verifieerbare snelwegcheck, parkeerregel of niet-eenduidige terreingrens) wordt om menselijke review gevraagd.\",\n      },\n      {\n        kind: \"p\",\n        text: \"De score wordt deterministisch uit de observaties berekend: zelfde input geeft zelfde score. Klap op de analyse-detailpagina een aspect open om de opbouw stap voor stap te zien; bij de Observaties tonen gekleurde labels welk veld welke punten oplevert.\",\n      },\n      { kind: \"link\", href: \"/scoring\", label: \"Bekijk de volledige puntentelling op de Scoring-pagina\" },\n    ],\n  },\n  {\n    id: \"detailkaarten\",\n    nr: \"12\",\n    title: \"Detailkaarten\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"Onder de vergelijkingstabel staan horizontaal scrollbare kaarten per model met de volledige analyse: parkeer- en plaatsingsmogelijkheden, logistiek en toegang, en omgevingsfactoren, plus een eindconclusie met score (0 tot 100) en aanbeveling.\",\n      },\n    ],\n  },\n  {\n    id: \"analyses\",\n    nr: \"13\",\n    title: \"Analyses-overzicht\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"Op de Analyses-pagina vind je een overzicht van alle uitgevoerde analyses. Je kunt zoeken op analyse-ID (bijvoorbeeld “42”), bedrijfsnaam of gebruikersnaam. Klik op een rij om naar de detailpagina van die analyse te gaan. De tabel toont de status, of het een dry run was, en de gemiddelde score van alle modellen die de analyse hebben uitgevoerd. Bij een mislukte analyse toont de Score-kolom in plaats daarvan de foutmelding, zodat je direct ziet waarom de analyse is gefaald.\",\n      },\n    ],\n  },\n  {\n    id: \"bulk\",\n    nr: \"14\",\n    title: \"Bulk-analyse\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"Kies op Bulk-analyse een provincie of plak locatie-ID's. Controleer eerst de selectie, de fotostatus en de kosteninschatting. Met een limiet en offset verwerk je een deel van de selectie. Al verwerkte locaties kun je overslaan.\",\n      },\n      {\n        kind: \"p\",\n        text: \"De fotofase haalt ontbrekende beelden op. In de analysefase kies je direct verwerken of een Gemini-batch. Direct verwerken gebruikt een wachtrij met een instelbaar aantal gelijktijdige analyses. De voortgang en scores verschijnen automatisch; een proefanalyse gebruikt mock-AI. Bij pauzeren of stoppen worden geen nieuwe locaties gestart, maar reeds gestarte analyses blijven gevolgd.\",\n      },\n      {\n        kind: \"p\",\n        text: \"Een batch wordt eerst geaccepteerd en daarna op de achtergrond voorbereid en verwerkt. Geaccepteerd betekent nog niet voltooid. Onder Batches zie je de opgeslagen voortgang en de live status bij Google. De Commandobouwer maakt een kopieerbaar terminalcommando voor dezelfde bulkacties.\",\n      },\n      { kind: \"link\", href: \"/bulk\", label: \"Naar Bulk-analyse\" },\n    ],\n  },\n  {\n    id: \"kosten\",\n    nr: \"15\",\n    title: \"Gebruik en kosten\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"De Gebruik-pagina toont een overzicht van het API-verbruik: totaal aantal analyses, token-gebruik en kosten per model. Daarnaast zie je een dagelijks overzicht van het verbruik over tijd.\",\n      },\n    ],\n  },\n  {\n    id: \"scout\",\n    nr: \"16\",\n    title: \"SNL Scout\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"De SNL Scout-app is een aparte mobiele applicatie waarmee veldwerkers locaties ter plekke kunnen beoordelen. Per dimensie (aard en grootte, extra diensten, parkeerruimte, toegankelijkheid, zichtbaarheid) kun je aangeven of je het eens bent met de AI-score of een eigen beoordeling geven op een 5-puntsschaal. Ook kun je het werkelijke aantal parkeerplaatsen invoeren en opmerkingen toevoegen over wat de AI mist. Deze feedback wordt gebruikt om de AI-modellen te kalibreren.\",\n      },\n    ],\n  },\n  {\n    id: \"feedback\",\n    nr: \"17\",\n    title: \"Feedback bekijken en prompt-verbetering\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"Op de Feedback-pagina zie je alle veldfeedback die via SNL Scout is ingestuurd, met per beoordeling de inzender, datum, score en gekleurde bolletjes (groen is eens, rood is oneens) per dimensie. Klik op een rij voor de volledige beoordeling met alle redenen en opmerkingen, naast de locatie-informatie (adres, type, score, foto's) en links naar de locatie en de bijbehorende analyse.\",\n      },\n      {\n        kind: \"p\",\n        text: \"Met de knop Check prompt-verbetering laat je Gemini de binnengekomen feedback analyseren tegen de huidige analyse-prompt. Je krijgt een advies-rapport met terugkerende patronen en concrete verbeterpunten. Dit is advies: de prompt wordt niet automatisch gewijzigd, je past hem zelf aan op de locatiepagina.\",\n      },\n    ],\n  },\n  {\n    id: \"beheer\",\n    nr: \"18\",\n    title: \"Instellingen: batches, mislukte analyses en prullenbak\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"Op de Instellingen-pagina zie je onder Batches alle als Gemini-batch ingestuurde bulk-analyses met hun live status (wachtrij, bezig met voortgang, of klaar bij Google met poll nodig). Met Poll alles vraag je het ophalen van afgeronde resultaten aan. De verwerking loopt op de achtergrond door en de lijst ververst automatisch. Resultaatbestanden verlopen bij Google na 48 uur.\",\n      },\n      {\n        kind: \"p\",\n        text: \"Onder Mislukte analyses kun je alle gefaalde analyses (bijvoorbeeld door een overschreden API-limiet) selecteren en verwijderen. Verwijderde analyses gaan naar de Prullenbak, waar je ze desgewenst weer kunt herstellen.\",\n      },\n      {\n        kind: \"p\",\n        text: \"Algemeen toont het account waarmee je bent ingelogd. Onder Vastgelopen staan analyses die langer dan zes uur bezig zijn zonder batch; je kunt ze na bevestiging naar de Prullenbak verplaatsen. Import is bedoeld om locaties uit OpenStreetMap op te halen.\",\n      },\n    ],\n  },\n  {\n    id: \"import\",\n    nr: \"19\",\n    title: \"Instellingen: locaties importeren (Overpass)\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"Onder Instellingen, tabblad Import, haal je nieuwe locaties uit OpenStreetMap via een Overpass-query. Plak een query (body-only wordt automatisch gewrapt, of een complete query startend met [out:...]) en klik op Importeer. De provincie wordt per locatie automatisch bepaald via PDOK reverse-geocode op de coordinaten; opnieuw importeren werkt bestaande locaties bij (upsert op bedrijfsdata-id) en raakt admin-velden niet aan.\",\n      },\n      {\n        kind: \"p\",\n        text: \"Zet Dry-run aan om te zien wat er zou gebeuren zonder iets te schrijven. Importeer bij voorkeur per provincie: een gigantische gecombineerde run kan de tijdslimiet overschrijden.\",\n      },\n    ],\n  },\n  {\n    id: \"apikeys\",\n    nr: \"20\",\n    title: \"API keys\",\n    blocks: [\n      {\n        kind: \"p\",\n        text: \"Voor echte analyses heb je API keys nodig van OpenAI, Anthropic en/of Google AI. Optioneel een Google Maps-key voor satelliet- en straatbeelden. Configureer deze in het bestand .env.local.\",\n      },\n      { kind: \"link\", href: \"/settings\", label: \"Naar de Instellingen-pagina\" },\n    ],\n  },\n] as const;\n","/**\n * Maps the `href` of a help-content link block (a Next-admin path) to the\n * vue-router route name that page has in this webdesign. Null means the page\n * is not built yet and the link should render as plain text.\n */\nconst HELP_ROUTES: Readonly<Record<string, string>> = {\n  \"/\": \"locations\",\n  \"/verkenner\": \"explorer\",\n  \"/analyses\": \"analyses\",\n  \"/feedback\": \"feedback\",\n  \"/scoring\": \"scoring\",\n  \"/gebruik\": \"usage\",\n  \"/help\": \"help\",\n  \"/bulk\": \"bulk\",\n  \"/settings\": \"settings\",\n};\n\nexport function helpHrefToRoute(href: string): string | null {\n  return HELP_ROUTES[href] ?? null;\n}\n","import { createVNode as _createVNode, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, withModifiers as _withModifiers, createTextVNode as _createTextVNode, withCtx as _withCtx } from \"vue\"\n\nconst _hoisted_1 = { class: \"help\" }\nconst _hoisted_2 = {\n  class: \"toc\",\n  \"aria-label\": \"Op deze pagina\"\n}\nconst _hoisted_3 = [\"href\", \"onClick\"]\nconst _hoisted_4 = { class: \"toc__nr tnum\" }\nconst _hoisted_5 = { class: \"toc__title\" }\nconst _hoisted_6 = { class: \"help__main\" }\nconst _hoisted_7 = {\n  class: \"notice\",\n  role: \"status\"\n}\nconst _hoisted_8 = { class: \"notice__text\" }\nconst _hoisted_9 = { class: \"notice__title\" }\nconst _hoisted_10 = [\"id\"]\nconst _hoisted_11 = { class: \"chapter__head\" }\nconst _hoisted_12 = { class: \"chapter__nr tnum\" }\nconst _hoisted_13 = { class: \"chapter__title\" }\nconst _hoisted_14 = { class: \"blocks\" }\nconst _hoisted_15 = {\n  key: 0,\n  class: \"blocks__p\"\n}\nconst _hoisted_16 = {\n  key: 1,\n  class: \"blocks__list\"\n}\nconst _hoisted_17 = { class: \"blocks__term\" }\nconst _hoisted_18 = { class: \"blocks__text\" }\nconst _hoisted_19 = {\n  key: 3,\n  class: \"blocks__pending\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(_Fragment, null, [\n    _createVNode($setup[\"PageHeader\"], {\n      class: \"nudica\",\n      title: \"Hoe werkt de Statiegeld Screener?\",\n      description: $setup.HELP_LEAD\n    }, null, 8 /* PROPS */, [\"description\"]),\n    _createVNode($setup[\"PageBody\"], { class: \"nudica\" }, {\n      default: _withCtx(() => [\n        _createElementVNode(\"div\", _hoisted_1, [\n          _createCommentVNode(\" The table of contents stays put while scrolling: on a page of\\n           seventeen chapters that is the difference between reading and\\n           searching. Hidden under 1080px, where the column would cost more\\n           than it gives. \"),\n          _createElementVNode(\"nav\", _hoisted_2, [\n            _cache[0] || (_cache[0] = _createElementVNode(\"span\", { class: \"eyebrow toc__eyebrow\" }, \"Op deze pagina\", -1 /* CACHED */)),\n            (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.HELP_CHAPTERS, (chapter) => {\n              return (_openBlock(), _createElementBlock(\"a\", {\n                key: chapter.id,\n                class: \"toc__item\",\n                href: $setup.chapterHref(chapter.id),\n                onClick: _withModifiers($event => ($setup.goToChapter(chapter.id)), [\"prevent\"])\n              }, [\n                _createCommentVNode(\" The number sits a tier lighter than the title in the kit. Not\\n               via alpha on --fg-3 (2.6:1) but on --fg-4, which stays above\\n               4.5:1 at 14px in both themes. \"),\n                _createElementVNode(\"span\", _hoisted_4, _toDisplayString(chapter.nr), 1 /* TEXT */),\n                _createElementVNode(\"span\", _hoisted_5, _toDisplayString(chapter.title), 1 /* TEXT */)\n              ], 8 /* PROPS */, _hoisted_3))\n            }), 128 /* KEYED_FRAGMENT */))\n          ]),\n          _createElementVNode(\"div\", _hoisted_6, [\n            _createElementVNode(\"div\", _hoisted_7, [\n              _createVNode($setup[\"Icon\"], {\n                name: \"information--filled\",\n                class: \"notice__icon\"\n              }),\n              _createElementVNode(\"div\", _hoisted_8, [\n                _createElementVNode(\"span\", _hoisted_9, _toDisplayString($setup.HELP_LOGIN_NOTICE.title), 1 /* TEXT */),\n                _createElementVNode(\"span\", null, _toDisplayString($setup.HELP_LOGIN_NOTICE.text), 1 /* TEXT */)\n              ])\n            ]),\n            (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.HELP_CHAPTERS, (chapter) => {\n              return (_openBlock(), _createElementBlock(\"section\", {\n                id: chapter.id,\n                key: chapter.id,\n                class: \"chapter\"\n              }, [\n                _createElementVNode(\"div\", _hoisted_11, [\n                  _createElementVNode(\"span\", _hoisted_12, _toDisplayString(chapter.nr), 1 /* TEXT */),\n                  _createElementVNode(\"h2\", _hoisted_13, _toDisplayString(chapter.title), 1 /* TEXT */)\n                ]),\n                _createElementVNode(\"div\", _hoisted_14, [\n                  (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(chapter.blocks, (block, index) => {\n                    return (_openBlock(), _createElementBlock(_Fragment, { key: index }, [\n                      (block.kind === 'p')\n                        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_15, _toDisplayString(block.text), 1 /* TEXT */))\n                        : (block.kind === 'list')\n                          ? (_openBlock(), _createElementBlock(\"dl\", _hoisted_16, [\n                              (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(block.items, (item) => {\n                                return (_openBlock(), _createElementBlock(\"div\", {\n                                  key: item.term,\n                                  class: \"blocks__item\"\n                                }, [\n                                  _createElementVNode(\"dt\", _hoisted_17, _toDisplayString(item.term), 1 /* TEXT */),\n                                  _createElementVNode(\"dd\", _hoisted_18, _toDisplayString(item.text), 1 /* TEXT */)\n                                ]))\n                              }), 128 /* KEYED_FRAGMENT */))\n                            ]))\n                          : ($setup.helpHrefToRoute(block.href) !== null)\n                            ? (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [\n                                _createCommentVNode(\" A link to a page that exists in this webdesign is a real\\n                   route; a page still to come renders as text with \\\"(volgt)\\\"\\n                   so the reader is not sent to a dead end. \"),\n                                _createVNode($setup[\"RouterLink\"], {\n                                  to: { name: $setup.helpHrefToRoute(block.href) ?? 'locations' },\n                                  class: \"blocks__link\"\n                                }, {\n                                  default: _withCtx(() => [\n                                    _createTextVNode(_toDisplayString(block.label), 1 /* TEXT */)\n                                  ]),\n                                  _: 2 /* DYNAMIC */\n                                }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"])\n                              ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */))\n                            : (_openBlock(), _createElementBlock(\"span\", _hoisted_19, _toDisplayString(block.label) + \" (volgt)\", 1 /* TEXT */))\n                    ], 64 /* STABLE_FRAGMENT */))\n                  }), 128 /* KEYED_FRAGMENT */))\n                ])\n              ], 8 /* PROPS */, _hoisted_10))\n            }), 128 /* KEYED_FRAGMENT */))\n          ])\n        ])\n      ]),\n      _: 1 /* STABLE */\n    })\n  ], 64 /* STABLE_FRAGMENT */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/HelpView.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/HelpView.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/HelpView.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/HelpView.vue\";script.__scopeId = \"data-v-bc195ca3\";export default script;","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { RouterLink, useRoute } from \"vue-router\";\nimport PageHeader from \"../components/shell/PageHeader.vue\";\nimport PageBody from \"../components/shell/PageBody.vue\";\nimport PageTabs from \"../components/ui/PageTabs.vue\";\nimport BulkRunner from \"../components/bulk/BulkRunner.vue\";\nimport BatchMonitor from \"../components/bulk/BatchMonitor.vue\";\nimport CommandBuilder from \"../components/bulk/CommandBuilder.vue\";\nimport { useBulkRunStatus } from \"../lib/use-bulk-runner\";\n\nconst route = useRoute();\nconst run = useBulkRunStatus();\nconst active = computed(() => route.query.tab === \"cli\" ? \"cli\" : route.query.tab === \"batches\" ? \"batches\" : \"runner\");\nconst tabs = computed(() => [\n  { value: \"runner\", label: \"Runner\" }, { value: \"batches\", label: \"Batches\" }, { value: \"cli\", label: \"CLI-commando\" },\n].map(tab => ({ ...tab, to: { path: \"/bulk\", query: { ...route.query, tab: tab.value === \"runner\" ? undefined : tab.value } } })));\n</script>\n\n<template>\n  <PageHeader class=\"nudica\" title=\"Bulk-analyse\" description=\"Foto's downloaden en AI-analyses draaien voor meerdere locaties tegelijk.\">\n    <template #tabs><PageTabs :tabs=\"tabs\" :active=\"active\" /></template>\n  </PageHeader>\n  <PageBody class=\"nudica\">\n    <p v-if=\"active !== 'runner' && run.active\" class=\"bulk-view__activity\" role=\"status\">\n      Bulk-run {{ run.paused ? \"gepauzeerd\" : \"actief\" }}: {{ run.counts.done }}/{{ run.counts.total }} verwerkt.\n      <RouterLink :to=\"{ path: '/bulk', query: { ...route.query, tab: undefined } }\">Bekijk de voortgang</RouterLink>\n    </p>\n    <BulkRunner v-show=\"active === 'runner'\" />\n    <BatchMonitor v-if=\"active === 'batches'\" />\n    <CommandBuilder v-if=\"active === 'cli'\" />\n  </PageBody>\n</template>\n\n<style scoped>\n.bulk-view__activity { margin: 0 0 16px; padding: 12px; background: var(--bg-inset); border: 1px solid var(--border-1); }\n.bulk-view__activity a { text-decoration: underline; cursor: pointer; }\n</style>\n","<script setup lang=\"ts\">\nimport { nextTick, ref, useTemplateRef } from \"vue\";\nimport BulkConfiguration from \"./BulkConfiguration.vue\";\nimport BulkProgress from \"./BulkProgress.vue\";\nimport BulkSelectionSummary from \"./BulkSelectionSummary.vue\";\nimport Panel from \"../ui/Panel.vue\";\nimport Dialog from \"../ui/Dialog.vue\";\nimport Input from \"../ui/Input.vue\";\nimport Button from \"../ui/Button.vue\";\nimport EmptyState from \"../ui/EmptyState.vue\";\nimport { useBulkRunner } from \"../../lib/use-bulk-runner\";\n\nconst {\n  form, regions, regionsLoading, regionsError, fieldErrors, loadRegions, locked,\n  busy, error, resolved, estimate, imageStatuses, statusInfo, missingIds, navigationPaused, run,\n  resolveTargets, checkStatus, fillMissing, checkPhotos, estimateCosts, prepareStart, start,\n  pause, resume, cancel, acknowledgeUncertain, retryUnfinished,\n} = useBulkRunner();\nconst root = useTemplateRef<HTMLElement>(\"root\");\nconst confirmation = ref(false);\nconst cancelConfirmation = ref(false);\nconst uncertainConfirmation = ref(false);\nconst missingOpen = ref(false);\nconst missingCount = ref(\"50\");\nconst missingError = ref(\"\");\nconst confirmationCount = ref(0);\n\nasync function focusError() {\n  await nextTick();\n  root.value?.querySelector<HTMLElement>(\".bulk-config__invalid input, .bulk-config__invalid textarea, .bulk-config__invalid select\")?.focus();\n}\nasync function prepare() {\n  const targets = await prepareStart();\n  if (!targets) { await focusError(); return; }\n  if (!targets.ids.length) return;\n  confirmationCount.value = targets.ids.length;\n  confirmation.value = true;\n}\nasync function confirmStart() {\n  confirmation.value = false;\n  await start();\n}\nasync function showMissing() {\n  await checkStatus(\"missing\");\n  await focusError();\n  if (missingIds.value !== null) { missingError.value = \"\"; missingOpen.value = true; }\n}\nfunction selectMissing() {\n  missingError.value = fillMissing(missingCount.value);\n  if (!missingError.value) missingOpen.value = false;\n}\nasync function inspect(action: () => Promise<unknown>) { await action(); await focusError(); }\n</script>\n\n<template>\n  <div ref=\"root\" class=\"bulk-runner\">\n    <BulkProgress\n      :run=\"run\" :navigation-paused=\"navigationPaused\"\n      @pause=\"pause\" @resume=\"resume\" @cancel=\"cancelConfirmation = true\"\n      @acknowledge=\"uncertainConfirmation = true\" @retry=\"retryUnfinished\"\n    />\n    <!-- Twee kolommen zoals het kitscherm: het formulier links (1.4fr), de\n         uitkomst van een controle rechts (1fr). De voortgang staat bij ons\n         wél boven de kolommen en niet ernaast: het kitscherm heeft daar een\n         balkje, wij een logconsole met filter die de volle breedte nodig\n         heeft. -->\n    <div class=\"bulk-runner__cols\">\n      <div class=\"bulk-runner__form\">\n        <BulkConfiguration\n          :model-value=\"form\" :locked=\"locked || confirmation\" :busy=\"busy\"\n          :regions=\"regions\" :regions-loading=\"regionsLoading\" :regions-error=\"regionsError\" :errors=\"fieldErrors\"\n          @update:model-value=\"Object.assign(form, $event)\"\n          @reload-regions=\"loadRegions\" @status=\"inspect(() => checkStatus())\" @next=\"inspect(() => checkStatus('next'))\"\n          @missing=\"showMissing\" @photos=\"inspect(checkPhotos)\" @estimate=\"inspect(estimateCosts)\"\n          @resolve=\"inspect(resolveTargets)\" @start=\"prepare\"\n        />\n      </div>\n      <div class=\"bulk-runner__side\">\n        <p v-if=\"error\" class=\"bulk-runner__error\" role=\"alert\">{{ error }}</p>\n        <p v-if=\"statusInfo\" class=\"bulk-runner__status\" role=\"status\">{{ statusInfo }}</p>\n        <Panel v-if=\"resolved\" title=\"Selectie\">\n          <EmptyState\n            v-if=\"!resolved.ids.length\" title=\"Geen locaties te verwerken\"\n            description=\"Pas de selectie of offset aan. Mogelijk zijn alle locaties al verwerkt.\"\n          />\n          <div v-else class=\"bulk-runner__selection\">\n            <p>{{ resolved.ids.length.toLocaleString('nl-NL') }} locaties klaar, van {{ resolved.totalAvailable.toLocaleString('nl-NL') }} in {{ resolved.regionTitle || \"de ID-selectie\" }}.</p>\n            <details><summary>Geselecteerde ID's bekijken</summary><p class=\"bulk-runner__ids\">{{ resolved.ids.join(\", \") }}</p></details>\n          </div>\n        </Panel>\n        <BulkSelectionSummary :estimate=\"estimate\" :photos=\"imageStatuses\" />\n      </div>\n    </div>\n    <p class=\"bulk-runner__hint\">Binnen Bulk kun je van tab wisselen. Verlaat je Bulk, dan pauzeren nieuwe starts. Lopende analyses blijven gevolgd. Houd de browser open om de voortgang te bewaren.</p>\n\n    <Dialog v-model:open=\"confirmation\" :title=\"form.phase === 'images' ? 'Foto’s ophalen?' : form.useBatch ? 'Batch indienen?' : 'Analyses starten?'\" :description=\"`${confirmationCount} locaties worden verwerkt.`\">\n      <p v-if=\"form.phase === 'images'\">{{ form.skipCompleted ? \"Alleen ontbrekende foto's worden opgehaald.\" : \"Bestaande foto's worden opnieuw opgehaald.\" }} Dit kan API-kosten geven.</p>\n      <p v-else-if=\"form.useBatch\">De batch wordt direct ingediend. Ontbrekende foto's kunnen extra kosten geven. Volg daarna de voortgang via Batches.</p>\n      <p v-else>{{ form.isDryRun ? \"De AI-resultaten worden gesimuleerd.\" : \"Dit start betaalde AI-analyses.\" }} Er draaien maximaal {{ form.concurrency }} locaties tegelijk.</p>\n      <template #footer><Button @click=\"confirmation = false\">Annuleren</Button><Button variant=\"primary\" @click=\"confirmStart\">{{ form.useBatch && form.phase === 'analyze' ? \"Batch indienen\" : \"Start\" }}</Button></template>\n    </Dialog>\n    <Dialog v-model:open=\"cancelConfirmation\" title=\"Nieuwe starts stoppen?\" description=\"Verwerkte locaties blijven bewaard. Lopende analyses worden niet afgebroken en blijven gevolgd.\">\n      <template #footer><Button @click=\"cancelConfirmation = false\">Terug</Button><Button variant=\"danger\" @click=\"cancel(); cancelConfirmation = false\">Run annuleren</Button></template>\n    </Dialog>\n    <Dialog v-model:open=\"uncertainConfirmation\" title=\"Onbevestigde starts gecontroleerd?\" description=\"Een verzoek kan toch zijn verwerkt als het antwoord niet aankwam. Controleer eerst de locaties en Batches om dubbele analyses te voorkomen.\">\n      <template #footer><Button @click=\"uncertainConfirmation = false\">Terug</Button><Button @click=\"acknowledgeUncertain(); uncertainConfirmation = false\">Gecontroleerd</Button></template>\n    </Dialog>\n    <Dialog v-model:open=\"missingOpen\" :title=\"form.phase === 'images' ? 'Missende foto’s verwerken' : 'Missende analyses verwerken'\" :description=\"`${missingIds?.length ?? 0} locaties nog te verwerken.`\">\n      <Input v-model=\"missingCount\" label=\"Aantal locaties\" type=\"number\" />\n      <p v-if=\"missingError\" class=\"bulk-runner__error\" role=\"alert\">{{ missingError }}</p>\n      <template #footer><Button @click=\"missingOpen = false\">Annuleren</Button><Button variant=\"primary\" @click=\"selectMissing\">Overnemen als ID-selectie</Button></template>\n    </Dialog>\n  </div>\n</template>\n\n<style scoped>\n.bulk-runner { display: flex; flex-direction: column; gap: 16px; }\n.bulk-runner__cols { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 16px; }\n.bulk-runner__form, .bulk-runner__side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }\n@media (min-width: 720px) {\n  .bulk-runner__cols { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }\n}\n.bulk-runner__error { color: var(--danger-fg); margin: 0; }\n.bulk-runner__hint { margin: 0; color: var(--fg-3); font-size: var(--text-caption); }\n.bulk-runner__status { margin: 0; }\n.bulk-runner__selection p { margin: 0 0 12px; }\n.bulk-runner__selection summary { cursor: pointer; }\n.bulk-runner__ids { padding-top: 12px; overflow-wrap: anywhere; max-height: 160px; overflow-y: auto; font-family: var(--font-mono); }\n</style>\n","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport Panel from \"../ui/Panel.vue\";\nimport Button from \"../ui/Button.vue\";\nimport Input from \"../ui/Input.vue\";\nimport Textarea from \"../ui/Textarea.vue\";\nimport Select from \"../ui/Select.vue\";\nimport Checkbox from \"../ui/Checkbox.vue\";\nimport ContentSwitcher from \"../ui/ContentSwitcher.vue\";\nimport { ALL_REGIONS_VALUE, ALL_REGIONS_LABEL } from \"../../lib/bulk-regions\";\nimport type { BulkForm } from \"../../lib/use-bulk-runner\";\n\nconst form = defineModel<BulkForm>({ required: true });\nconst props = defineProps<{\n  locked: boolean;\n  busy: string;\n  regions: string[];\n  regionsLoading: boolean;\n  regionsError: string;\n  errors: Partial<Record<keyof BulkForm, string>>;\n}>();\nconst emit = defineEmits<{\n  status: [];\n  next: [];\n  missing: [];\n  photos: [];\n  estimate: [];\n  start: [];\n  reloadRegions: [];\n  resolve: [];\n}>();\nconst regionOptions = computed(() => [\n  { value: \"\", label: props.regionsLoading ? \"Regio's laden...\" : \"Kies een regio\" },\n  { value: ALL_REGIONS_VALUE, label: ALL_REGIONS_LABEL },\n  ...props.regions.map(value => ({ value, label: value })),\n]);\n</script>\n\n<template>\n  <Panel title=\"Configuratie\">\n    <form class=\"bulk-config\" @submit.prevent=\"emit('start')\">\n      <fieldset :disabled=\"locked\" class=\"bulk-config__fields\">\n        <ContentSwitcher\n          :model-value=\"form.phase\"\n          aria-label=\"Fase\"\n          :options=\"[{ value: 'images', label: 'Foto\\'s' }, { value: 'analyze', label: 'AI-analyse' }]\"\n          @update:model-value=\"form.phase = $event === 'analyze' ? 'analyze' : 'images'\"\n        />\n        <p class=\"bulk-config__hint\">\n          <template v-if=\"form.phase === 'images'\">\n            Haal satelliet-, kadaster- en Street View-foto's op.\n            {{ form.skipCompleted ? \"Bestaande foto's blijven staan.\" : \"Alle foto's worden opnieuw opgehaald; dit kan API-kosten geven.\" }}\n          </template>\n          <template v-else-if=\"form.useBatch\">\n            Dien locaties samen in als batch. Resultaten kunnen tot 24 uur duren.\n            Ontbrekende foto's worden eerst opgehaald. Haal resultaten op via Batches.\n          </template>\n          <template v-else>\n            Analyseer met Gemini 3.6 Flash. Elke sessie volgt de analyse tot deze klaar is.\n            Een dry-run gebruikt een gesimuleerd AI-resultaat.\n          </template>\n        </p>\n\n        <div class=\"bulk-config__group\">\n          <ContentSwitcher\n            :model-value=\"form.selectionMode\"\n            aria-label=\"Selectiemethode\"\n            :options=\"[{ value: 'region', label: 'Op regio' }, { value: 'ids', label: 'Op locatie-ID\\'s' }]\"\n            @update:model-value=\"form.selectionMode = $event === 'ids' ? 'ids' : 'region'\"\n          />\n          <div class=\"bulk-config__grid\">\n            <div :class=\"{ 'bulk-config__invalid': errors.region }\" data-field=\"region\">\n              <Select v-model=\"form.region\" label=\"Regio\" :options=\"regionOptions\" :disabled=\"form.selectionMode !== 'region' || locked\" />\n              <p v-if=\"errors.region\" class=\"bulk-config__error\" role=\"alert\">{{ errors.region }}</p>\n              <p v-if=\"regionsError\" class=\"bulk-config__error\" role=\"alert\">{{ regionsError }}</p>\n              <Button v-if=\"regionsError\" @click=\"emit('reloadRegions')\">Opnieuw laden</Button>\n            </div>\n            <div :class=\"{ 'bulk-config__invalid': errors.idsText }\" data-field=\"idsText\">\n              <Textarea v-model=\"form.idsText\" label=\"Locatie-ID's\" placeholder=\"123, 456, 789\" :rows=\"4\" :disabled=\"form.selectionMode !== 'ids' || locked\" />\n              <p v-if=\"errors.idsText\" class=\"bulk-config__error\" role=\"alert\">{{ errors.idsText }}</p>\n            </div>\n          </div>\n          <div class=\"bulk-config__actions\">\n            <Button :busy=\"busy === 'status'\" @click=\"emit('status')\">Huidige status</Button>\n            <Button :busy=\"busy === 'missing'\" @click=\"emit('missing')\">{{ form.phase === 'images' ? \"Verwerk missende foto's\" : \"Verwerk missende analyses\" }}</Button>\n          </div>\n        </div>\n\n        <div class=\"bulk-config__grid bulk-config__grid--three\">\n          <div :class=\"{ 'bulk-config__invalid': errors.limit }\" data-field=\"limit\">\n            <Input v-model=\"form.limit\" label=\"Aantal (optioneel)\" type=\"number\" placeholder=\"Bijvoorbeeld 50\" />\n            <p v-if=\"errors.limit\" class=\"bulk-config__error\" role=\"alert\">{{ errors.limit }}</p>\n            <p class=\"bulk-config__hint\">Leeg = alle locaties. Met overslaan aan telt alleen het resterende werk.</p>\n          </div>\n          <div :class=\"{ 'bulk-config__invalid': errors.offset }\" data-field=\"offset\">\n            <Input v-model=\"form.offset\" label=\"Offset (optioneel)\" type=\"number\" placeholder=\"0\" />\n            <p v-if=\"errors.offset\" class=\"bulk-config__error\" role=\"alert\">{{ errors.offset }}</p>\n            <div class=\"bulk-config__actions\">\n              <Button :busy=\"busy === 'next'\" @click=\"emit('next')\">Bereken eerstvolgende</Button>\n              <Button v-if=\"form.offset && form.offset !== '0'\" @click=\"form.offset = ''\">Terug naar 0</Button>\n            </div>\n            <p class=\"bulk-config__hint\">Slaat de eerste N locaties over. Schuift op na een bevestigde start.</p>\n          </div>\n          <div :class=\"{ 'bulk-config__invalid': errors.concurrency }\" data-field=\"concurrency\">\n            <Input v-model=\"form.concurrency\" label=\"Parallelle sessies\" type=\"number\" :disabled=\"form.phase === 'analyze' && form.useBatch\" />\n            <p v-if=\"errors.concurrency\" class=\"bulk-config__error\" role=\"alert\">{{ errors.concurrency }}</p>\n            <p class=\"bulk-config__hint\">Aanbevolen: {{ form.phase === 'images' ? 3 : 2 }}. Meer sessies kan tot rate-limits leiden.</p>\n          </div>\n        </div>\n\n        <div class=\"bulk-config__group\">\n          <label class=\"bulk-config__check\"><Checkbox v-model=\"form.skipCompleted\" /> Voltooide overslaan</label>\n          <template v-if=\"form.phase === 'analyze'\">\n            <label class=\"bulk-config__check\"><Checkbox v-model=\"form.useBatch\" /> Batch API (circa 50% lagere AI-kosten)</label>\n            <label class=\"bulk-config__check\"><Checkbox v-model=\"form.isDryRun\" :disabled=\"form.useBatch\" /> Dry-run (mock)</label>\n            <div class=\"bulk-config__grid\">\n              <div :class=\"{ 'bulk-config__invalid': errors.temperature }\" data-field=\"temperature\">\n                <Input v-model=\"form.temperature\" label=\"Temperature\" />\n                <p v-if=\"errors.temperature\" class=\"bulk-config__error\" role=\"alert\">{{ errors.temperature }}</p>\n              </div>\n              <div :class=\"{ 'bulk-config__invalid': errors.seed }\" data-field=\"seed\">\n                <Input v-model=\"form.seed\" label=\"Seed (optioneel)\" placeholder=\"Willekeurig\" />\n                <p v-if=\"errors.seed\" class=\"bulk-config__error\" role=\"alert\">{{ errors.seed }}</p>\n              </div>\n            </div>\n          </template>\n        </div>\n        <div class=\"bulk-config__actions\">\n          <Button :busy=\"busy === 'resolve'\" @click=\"emit('resolve')\">Selectie bekijken</Button>\n          <Button v-if=\"form.phase === 'analyze'\" :busy=\"busy === 'estimate'\" @click=\"emit('estimate')\">Schat kosten</Button>\n          <Button v-else :busy=\"busy === 'photos'\" @click=\"emit('photos')\">Check foto-status</Button>\n          <Button variant=\"primary\" type=\"submit\" :busy=\"busy === 'resolve'\">{{ form.phase === 'analyze' && form.useBatch ? \"Batch indienen\" : \"Start\" }}</Button>\n        </div>\n      </fieldset>\n    </form>\n  </Panel>\n</template>\n\n<style scoped>\n/* Containerquery, geen mediaquery: sinds de runner in een kolom van ~580px\n   staat zegt de vensterbreedte niets meer over de ruimte die dit formulier\n   heeft. Op de viewport meten gaf drie velden naast elkaar in een kolom die\n   er maar één aankan. */\n.bulk-config__fields { container: bulkconfig / inline-size; display: flex; flex-direction: column; align-items: stretch; gap: 20px; min-width: 0; margin: 0; padding: 0; border: 0; }\n.bulk-config__fields > .switcher { align-self: flex-start; }\n.bulk-config__fields:disabled { opacity: 0.65; }\n.bulk-config__group { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--border-1); padding: 16px; }\n.bulk-config__group > .switcher { align-self: flex-start; max-width: 100%; }\n.bulk-config__grid { display: grid; gap: 16px; }\n.bulk-config__grid > div { min-width: 0; }\n.bulk-config__hint { margin: 6px 0 0; color: var(--fg-3); font-size: var(--text-caption); }\n.bulk-config__error { color: var(--danger-fg); font-size: var(--text-caption); margin: 4px 0; }\n.bulk-config__invalid :deep(input), .bulk-config__invalid :deep(textarea), .bulk-config__invalid :deep(select) { border-bottom-color: var(--danger); }\n.bulk-config__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }\n.bulk-config__check { display: flex; align-items: center; gap: 8px; cursor: pointer; }\n@container bulkconfig (min-width: 520px) {\n  .bulk-config__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n}\n\n@container bulkconfig (min-width: 760px) {\n  .bulk-config__grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n}\n</style>\n","import { createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, withCtx as _withCtx, createBlock as _createBlock, normalizeClass as _normalizeClass, withModifiers as _withModifiers } from \"vue\"\n\nconst _hoisted_1 = [\"disabled\"]\nconst _hoisted_2 = { class: \"bulk-config__hint\" }\nconst _hoisted_3 = { class: \"bulk-config__group\" }\nconst _hoisted_4 = { class: \"bulk-config__grid\" }\nconst _hoisted_5 = {\n  key: 0,\n  class: \"bulk-config__error\",\n  role: \"alert\"\n}\nconst _hoisted_6 = {\n  key: 1,\n  class: \"bulk-config__error\",\n  role: \"alert\"\n}\nconst _hoisted_7 = {\n  key: 0,\n  class: \"bulk-config__error\",\n  role: \"alert\"\n}\nconst _hoisted_8 = { class: \"bulk-config__actions\" }\nconst _hoisted_9 = { class: \"bulk-config__grid bulk-config__grid--three\" }\nconst _hoisted_10 = {\n  key: 0,\n  class: \"bulk-config__error\",\n  role: \"alert\"\n}\nconst _hoisted_11 = {\n  key: 0,\n  class: \"bulk-config__error\",\n  role: \"alert\"\n}\nconst _hoisted_12 = { class: \"bulk-config__actions\" }\nconst _hoisted_13 = {\n  key: 0,\n  class: \"bulk-config__error\",\n  role: \"alert\"\n}\nconst _hoisted_14 = { class: \"bulk-config__hint\" }\nconst _hoisted_15 = { class: \"bulk-config__group\" }\nconst _hoisted_16 = { class: \"bulk-config__check\" }\nconst _hoisted_17 = { class: \"bulk-config__check\" }\nconst _hoisted_18 = { class: \"bulk-config__check\" }\nconst _hoisted_19 = { class: \"bulk-config__grid\" }\nconst _hoisted_20 = {\n  key: 0,\n  class: \"bulk-config__error\",\n  role: \"alert\"\n}\nconst _hoisted_21 = {\n  key: 0,\n  class: \"bulk-config__error\",\n  role: \"alert\"\n}\nconst _hoisted_22 = { class: \"bulk-config__actions\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createBlock($setup[\"Panel\"], { title: \"Configuratie\" }, {\n    default: _withCtx(() => [\n      _createElementVNode(\"form\", {\n        class: \"bulk-config\",\n        onSubmit: _cache[20] || (_cache[20] = _withModifiers($event => ($setup.emit('start')), [\"prevent\"]))\n      }, [\n        _createElementVNode(\"fieldset\", {\n          disabled: $props.locked,\n          class: \"bulk-config__fields\"\n        }, [\n          _createVNode($setup[\"ContentSwitcher\"], {\n            \"model-value\": $setup.form.phase,\n            \"aria-label\": \"Fase\",\n            options: [{ value: 'images', label: 'Foto\\'s' }, { value: 'analyze', label: 'AI-analyse' }],\n            \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => ($setup.form.phase = $event === 'analyze' ? 'analyze' : 'images'))\n          }, null, 8 /* PROPS */, [\"model-value\"]),\n          _createElementVNode(\"p\", _hoisted_2, [\n            ($setup.form.phase === 'images')\n              ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                  _createTextVNode(\" Haal satelliet-, kadaster- en Street View-foto's op. \" + _toDisplayString($setup.form.skipCompleted ? \"Bestaande foto's blijven staan.\" : \"Alle foto's worden opnieuw opgehaald; dit kan API-kosten geven.\"), 1 /* TEXT */)\n                ], 64 /* STABLE_FRAGMENT */))\n              : ($setup.form.useBatch)\n                ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n                    _createTextVNode(\" Dien locaties samen in als batch. Resultaten kunnen tot 24 uur duren. Ontbrekende foto's worden eerst opgehaald. Haal resultaten op via Batches. \")\n                  ], 64 /* STABLE_FRAGMENT */))\n                : (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [\n                    _createTextVNode(\" Analyseer met Gemini 3.6 Flash. Elke sessie volgt de analyse tot deze klaar is. Een dry-run gebruikt een gesimuleerd AI-resultaat. \")\n                  ], 64 /* STABLE_FRAGMENT */))\n          ]),\n          _createElementVNode(\"div\", _hoisted_3, [\n            _createVNode($setup[\"ContentSwitcher\"], {\n              \"model-value\": $setup.form.selectionMode,\n              \"aria-label\": \"Selectiemethode\",\n              options: [{ value: 'region', label: 'Op regio' }, { value: 'ids', label: 'Op locatie-ID\\'s' }],\n              \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => ($setup.form.selectionMode = $event === 'ids' ? 'ids' : 'region'))\n            }, null, 8 /* PROPS */, [\"model-value\"]),\n            _createElementVNode(\"div\", _hoisted_4, [\n              _createElementVNode(\"div\", {\n                class: _normalizeClass({ 'bulk-config__invalid': $props.errors.region }),\n                \"data-field\": \"region\"\n              }, [\n                _createVNode($setup[\"Select\"], {\n                  modelValue: $setup.form.region,\n                  \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => (($setup.form.region) = $event)),\n                  label: \"Regio\",\n                  options: $setup.regionOptions,\n                  disabled: $setup.form.selectionMode !== 'region' || $props.locked\n                }, null, 8 /* PROPS */, [\"modelValue\", \"options\", \"disabled\"]),\n                ($props.errors.region)\n                  ? (_openBlock(), _createElementBlock(\"p\", _hoisted_5, _toDisplayString($props.errors.region), 1 /* TEXT */))\n                  : _createCommentVNode(\"v-if\", true),\n                ($props.regionsError)\n                  ? (_openBlock(), _createElementBlock(\"p\", _hoisted_6, _toDisplayString($props.regionsError), 1 /* TEXT */))\n                  : _createCommentVNode(\"v-if\", true),\n                ($props.regionsError)\n                  ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                      key: 2,\n                      onClick: _cache[3] || (_cache[3] = $event => ($setup.emit('reloadRegions')))\n                    }, {\n                      default: _withCtx(() => _cache[21] || (_cache[21] = [\n                        _createTextVNode(\"Opnieuw laden\", -1 /* CACHED */)\n                      ])),\n                      _: 1 /* STABLE */,\n                      __: [21]\n                    }))\n                  : _createCommentVNode(\"v-if\", true)\n              ], 2 /* CLASS */),\n              _createElementVNode(\"div\", {\n                class: _normalizeClass({ 'bulk-config__invalid': $props.errors.idsText }),\n                \"data-field\": \"idsText\"\n              }, [\n                _createVNode($setup[\"Textarea\"], {\n                  modelValue: $setup.form.idsText,\n                  \"onUpdate:modelValue\": _cache[4] || (_cache[4] = $event => (($setup.form.idsText) = $event)),\n                  label: \"Locatie-ID's\",\n                  placeholder: \"123, 456, 789\",\n                  rows: 4,\n                  disabled: $setup.form.selectionMode !== 'ids' || $props.locked\n                }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\"]),\n                ($props.errors.idsText)\n                  ? (_openBlock(), _createElementBlock(\"p\", _hoisted_7, _toDisplayString($props.errors.idsText), 1 /* TEXT */))\n                  : _createCommentVNode(\"v-if\", true)\n              ], 2 /* CLASS */)\n            ]),\n            _createElementVNode(\"div\", _hoisted_8, [\n              _createVNode($setup[\"Button\"], {\n                busy: $props.busy === 'status',\n                onClick: _cache[5] || (_cache[5] = $event => ($setup.emit('status')))\n              }, {\n                default: _withCtx(() => _cache[22] || (_cache[22] = [\n                  _createTextVNode(\"Huidige status\", -1 /* CACHED */)\n                ])),\n                _: 1 /* STABLE */,\n                __: [22]\n              }, 8 /* PROPS */, [\"busy\"]),\n              _createVNode($setup[\"Button\"], {\n                busy: $props.busy === 'missing',\n                onClick: _cache[6] || (_cache[6] = $event => ($setup.emit('missing')))\n              }, {\n                default: _withCtx(() => [\n                  _createTextVNode(_toDisplayString($setup.form.phase === 'images' ? \"Verwerk missende foto's\" : \"Verwerk missende analyses\"), 1 /* TEXT */)\n                ]),\n                _: 1 /* STABLE */\n              }, 8 /* PROPS */, [\"busy\"])\n            ])\n          ]),\n          _createElementVNode(\"div\", _hoisted_9, [\n            _createElementVNode(\"div\", {\n              class: _normalizeClass({ 'bulk-config__invalid': $props.errors.limit }),\n              \"data-field\": \"limit\"\n            }, [\n              _createVNode($setup[\"Input\"], {\n                modelValue: $setup.form.limit,\n                \"onUpdate:modelValue\": _cache[7] || (_cache[7] = $event => (($setup.form.limit) = $event)),\n                label: \"Aantal (optioneel)\",\n                type: \"number\",\n                placeholder: \"Bijvoorbeeld 50\"\n              }, null, 8 /* PROPS */, [\"modelValue\"]),\n              ($props.errors.limit)\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_10, _toDisplayString($props.errors.limit), 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true),\n              _cache[23] || (_cache[23] = _createElementVNode(\"p\", { class: \"bulk-config__hint\" }, \"Leeg = alle locaties. Met overslaan aan telt alleen het resterende werk.\", -1 /* CACHED */))\n            ], 2 /* CLASS */),\n            _createElementVNode(\"div\", {\n              class: _normalizeClass({ 'bulk-config__invalid': $props.errors.offset }),\n              \"data-field\": \"offset\"\n            }, [\n              _createVNode($setup[\"Input\"], {\n                modelValue: $setup.form.offset,\n                \"onUpdate:modelValue\": _cache[8] || (_cache[8] = $event => (($setup.form.offset) = $event)),\n                label: \"Offset (optioneel)\",\n                type: \"number\",\n                placeholder: \"0\"\n              }, null, 8 /* PROPS */, [\"modelValue\"]),\n              ($props.errors.offset)\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_11, _toDisplayString($props.errors.offset), 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true),\n              _createElementVNode(\"div\", _hoisted_12, [\n                _createVNode($setup[\"Button\"], {\n                  busy: $props.busy === 'next',\n                  onClick: _cache[9] || (_cache[9] = $event => ($setup.emit('next')))\n                }, {\n                  default: _withCtx(() => _cache[24] || (_cache[24] = [\n                    _createTextVNode(\"Bereken eerstvolgende\", -1 /* CACHED */)\n                  ])),\n                  _: 1 /* STABLE */,\n                  __: [24]\n                }, 8 /* PROPS */, [\"busy\"]),\n                ($setup.form.offset && $setup.form.offset !== '0')\n                  ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                      key: 0,\n                      onClick: _cache[10] || (_cache[10] = $event => ($setup.form.offset = ''))\n                    }, {\n                      default: _withCtx(() => _cache[25] || (_cache[25] = [\n                        _createTextVNode(\"Terug naar 0\", -1 /* CACHED */)\n                      ])),\n                      _: 1 /* STABLE */,\n                      __: [25]\n                    }))\n                  : _createCommentVNode(\"v-if\", true)\n              ]),\n              _cache[26] || (_cache[26] = _createElementVNode(\"p\", { class: \"bulk-config__hint\" }, \"Slaat de eerste N locaties over. Schuift op na een bevestigde start.\", -1 /* CACHED */))\n            ], 2 /* CLASS */),\n            _createElementVNode(\"div\", {\n              class: _normalizeClass({ 'bulk-config__invalid': $props.errors.concurrency }),\n              \"data-field\": \"concurrency\"\n            }, [\n              _createVNode($setup[\"Input\"], {\n                modelValue: $setup.form.concurrency,\n                \"onUpdate:modelValue\": _cache[11] || (_cache[11] = $event => (($setup.form.concurrency) = $event)),\n                label: \"Parallelle sessies\",\n                type: \"number\",\n                disabled: $setup.form.phase === 'analyze' && $setup.form.useBatch\n              }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\"]),\n              ($props.errors.concurrency)\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_13, _toDisplayString($props.errors.concurrency), 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true),\n              _createElementVNode(\"p\", _hoisted_14, \"Aanbevolen: \" + _toDisplayString($setup.form.phase === 'images' ? 3 : 2) + \". Meer sessies kan tot rate-limits leiden.\", 1 /* TEXT */)\n            ], 2 /* CLASS */)\n          ]),\n          _createElementVNode(\"div\", _hoisted_15, [\n            _createElementVNode(\"label\", _hoisted_16, [\n              _createVNode($setup[\"Checkbox\"], {\n                modelValue: $setup.form.skipCompleted,\n                \"onUpdate:modelValue\": _cache[12] || (_cache[12] = $event => (($setup.form.skipCompleted) = $event))\n              }, null, 8 /* PROPS */, [\"modelValue\"]),\n              _cache[27] || (_cache[27] = _createTextVNode(\" Voltooide overslaan\", -1 /* CACHED */))\n            ]),\n            ($setup.form.phase === 'analyze')\n              ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                  _createElementVNode(\"label\", _hoisted_17, [\n                    _createVNode($setup[\"Checkbox\"], {\n                      modelValue: $setup.form.useBatch,\n                      \"onUpdate:modelValue\": _cache[13] || (_cache[13] = $event => (($setup.form.useBatch) = $event))\n                    }, null, 8 /* PROPS */, [\"modelValue\"]),\n                    _cache[28] || (_cache[28] = _createTextVNode(\" Batch API (circa 50% lagere AI-kosten)\", -1 /* CACHED */))\n                  ]),\n                  _createElementVNode(\"label\", _hoisted_18, [\n                    _createVNode($setup[\"Checkbox\"], {\n                      modelValue: $setup.form.isDryRun,\n                      \"onUpdate:modelValue\": _cache[14] || (_cache[14] = $event => (($setup.form.isDryRun) = $event)),\n                      disabled: $setup.form.useBatch\n                    }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\"]),\n                    _cache[29] || (_cache[29] = _createTextVNode(\" Dry-run (mock)\", -1 /* CACHED */))\n                  ]),\n                  _createElementVNode(\"div\", _hoisted_19, [\n                    _createElementVNode(\"div\", {\n                      class: _normalizeClass({ 'bulk-config__invalid': $props.errors.temperature }),\n                      \"data-field\": \"temperature\"\n                    }, [\n                      _createVNode($setup[\"Input\"], {\n                        modelValue: $setup.form.temperature,\n                        \"onUpdate:modelValue\": _cache[15] || (_cache[15] = $event => (($setup.form.temperature) = $event)),\n                        label: \"Temperature\"\n                      }, null, 8 /* PROPS */, [\"modelValue\"]),\n                      ($props.errors.temperature)\n                        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_20, _toDisplayString($props.errors.temperature), 1 /* TEXT */))\n                        : _createCommentVNode(\"v-if\", true)\n                    ], 2 /* CLASS */),\n                    _createElementVNode(\"div\", {\n                      class: _normalizeClass({ 'bulk-config__invalid': $props.errors.seed }),\n                      \"data-field\": \"seed\"\n                    }, [\n                      _createVNode($setup[\"Input\"], {\n                        modelValue: $setup.form.seed,\n                        \"onUpdate:modelValue\": _cache[16] || (_cache[16] = $event => (($setup.form.seed) = $event)),\n                        label: \"Seed (optioneel)\",\n                        placeholder: \"Willekeurig\"\n                      }, null, 8 /* PROPS */, [\"modelValue\"]),\n                      ($props.errors.seed)\n                        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_21, _toDisplayString($props.errors.seed), 1 /* TEXT */))\n                        : _createCommentVNode(\"v-if\", true)\n                    ], 2 /* CLASS */)\n                  ])\n                ], 64 /* STABLE_FRAGMENT */))\n              : _createCommentVNode(\"v-if\", true)\n          ]),\n          _createElementVNode(\"div\", _hoisted_22, [\n            _createVNode($setup[\"Button\"], {\n              busy: $props.busy === 'resolve',\n              onClick: _cache[17] || (_cache[17] = $event => ($setup.emit('resolve')))\n            }, {\n              default: _withCtx(() => _cache[30] || (_cache[30] = [\n                _createTextVNode(\"Selectie bekijken\", -1 /* CACHED */)\n              ])),\n              _: 1 /* STABLE */,\n              __: [30]\n            }, 8 /* PROPS */, [\"busy\"]),\n            ($setup.form.phase === 'analyze')\n              ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                  key: 0,\n                  busy: $props.busy === 'estimate',\n                  onClick: _cache[18] || (_cache[18] = $event => ($setup.emit('estimate')))\n                }, {\n                  default: _withCtx(() => _cache[31] || (_cache[31] = [\n                    _createTextVNode(\"Schat kosten\", -1 /* CACHED */)\n                  ])),\n                  _: 1 /* STABLE */,\n                  __: [31]\n                }, 8 /* PROPS */, [\"busy\"]))\n              : (_openBlock(), _createBlock($setup[\"Button\"], {\n                  key: 1,\n                  busy: $props.busy === 'photos',\n                  onClick: _cache[19] || (_cache[19] = $event => ($setup.emit('photos')))\n                }, {\n                  default: _withCtx(() => _cache[32] || (_cache[32] = [\n                    _createTextVNode(\"Check foto-status\", -1 /* CACHED */)\n                  ])),\n                  _: 1 /* STABLE */,\n                  __: [32]\n                }, 8 /* PROPS */, [\"busy\"])),\n            _createVNode($setup[\"Button\"], {\n              variant: \"primary\",\n              type: \"submit\",\n              busy: $props.busy === 'resolve'\n            }, {\n              default: _withCtx(() => [\n                _createTextVNode(_toDisplayString($setup.form.phase === 'analyze' && $setup.form.useBatch ? \"Batch indienen\" : \"Start\"), 1 /* TEXT */)\n              ]),\n              _: 1 /* STABLE */\n            }, 8 /* PROPS */, [\"busy\"])\n          ])\n        ], 8 /* PROPS */, _hoisted_1)\n      ], 32 /* NEED_HYDRATION */)\n    ]),\n    _: 1 /* STABLE */\n  }))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkConfiguration.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkConfiguration.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkConfiguration.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkConfiguration.vue\";script.__scopeId = \"data-v-6909d78b\";export default script;","<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted, ref } from \"vue\";\nimport { RouterLink } from \"vue-router\";\nimport Panel from \"../ui/Panel.vue\";\nimport Button from \"../ui/Button.vue\";\nimport type { useBulkRunner } from \"../../lib/use-bulk-runner\";\nimport type { QueueEntry } from \"../../lib/analysis-queue\";\n\nconst props = defineProps<{\n  run: ReturnType<typeof useBulkRunner>[\"run\"][\"value\"];\n  navigationPaused: boolean;\n}>();\nconst emit = defineEmits<{ pause: []; resume: []; cancel: []; acknowledge: []; retry: [] }>();\nconst now = ref(Date.now());\nconst filter = ref(\"\");\nconst logLimit = ref(100);\nlet timer: ReturnType<typeof setInterval> | undefined;\nonMounted(() => { timer = setInterval(() => { now.value = Date.now(); }, 1000); });\nonUnmounted(() => { if (timer) clearInterval(timer); });\nconst percent = computed(() => props.run.counts.total ? Math.round(props.run.counts.done / props.run.counts.total * 100) : 0);\nconst activeEntries = computed(() => props.run.entries.filter(entry => [\"starting\", \"running\", \"uncertain\"].includes(entry.status)));\nconst history = computed(() => props.run.entries.filter(entry => [\"completed\", \"failed\", \"skipped\", \"cancelled\"].includes(entry.status)));\nconst filteredHistory = computed(() => history.value.filter(entry => !filter.value || `${entry.locationId} ${entry.analysisId} ${entry.message}`.toLowerCase().includes(filter.value.toLowerCase())));\nconst visibleHistory = computed(() => filteredHistory.value.slice(-logLimit.value).reverse());\nconst labels: Record<string, string> = {\n  fetching_images: \"Foto's ophalen\", scraping_website: \"Website lezen\", fetching_cadastral: \"Kadaster ophalen\",\n  retrieving_feedback: \"Veldrapporten ophalen\", running_models: \"Analyseren\", observing: \"Observaties verzamelen\",\n  batch_preparing: \"Batch voorbereiden\", batch_pending: \"Wacht op batchresultaat\", batch_retry_queued: \"Wacht op nieuwe poging\",\n};\nfunction stage(entry: QueueEntry) { return (entry.stage && labels[entry.stage]) || entry.message; }\nfunction duration(entry: QueueEntry) {\n  if (!entry.startedAt) return \"Niet gestart\";\n  const seconds = Math.max(0, Math.floor(((entry.finishedAt ?? now.value) - entry.startedAt) / 1000));\n  return seconds < 60 ? `${seconds}s` : `${Math.floor(seconds / 60)}m ${seconds % 60}s`;\n}\nfunction destination(entry: QueueEntry) {\n  return entry.locationId === null ? \"/analyses\" : entry.analysisId === null ? `/locations/${entry.locationId}` : `/locations/${entry.locationId}/analyses/${entry.analysisId}`;\n}\n</script>\n\n<template>\n  <Panel v-if=\"run.counts.total || run.submitting || run.error\" title=\"Voortgang\">\n    <div class=\"bulk-progress\">\n      <p v-if=\"run.submitting\" role=\"status\">Batch indienen...</p>\n      <p v-if=\"run.error\" class=\"bulk-progress__error\" role=\"alert\">{{ run.error }}</p>\n      <p v-if=\"navigationPaused\" class=\"bulk-progress__notice\" role=\"status\">\n        Nieuwe starts zijn gepauzeerd omdat je de runner hebt verlaten. Lopende analyses blijven gevolgd. Kies Hervatten om verder te gaan.\n      </p>\n      <p v-if=\"run.cancelled\" class=\"bulk-progress__notice\" role=\"status\">\n        Er worden geen nieuwe locaties gestart. Lopende analyses blijven gevolgd tot ze klaar zijn.\n      </p>\n      <p v-if=\"run.batch && run.active\" class=\"bulk-progress__notice\">\n        Gereserveerde analyses worden iedere drie seconden in WRD gecontroleerd. Via Batches kun je nieuwe providerresultaten ophalen.\n      </p>\n      <div class=\"bulk-progress__counts\" aria-live=\"polite\">\n        <span><strong>{{ run.counts.done }}/{{ run.counts.total }}</strong> verwerkt</span>\n        <span>{{ run.counts.completed }} geslaagd</span>\n        <span>{{ run.counts.failed }} mislukt</span>\n        <span>{{ run.counts.skipped }} overgeslagen</span>\n        <span>{{ run.counts.inflight }} bezig</span>\n        <span v-if=\"run.counts.waiting\">{{ run.counts.waiting }} wachtend</span>\n        <span v-if=\"run.counts.cancelled\">{{ run.counts.cancelled }} niet gestart</span>\n        <span v-if=\"run.counts.uncertain\">{{ run.counts.uncertain }} onbevestigd</span>\n      </div>\n      <progress :value=\"run.counts.done\" :max=\"run.counts.total || 1\" :aria-label=\"`${percent}% verwerkt`\" class=\"bulk-progress__bar\" />\n      <p v-if=\"!run.active && run.counts.total\" role=\"status\">\n        {{ run.counts.failed ? \"Run afgerond met fouten.\" : run.counts.cancelled ? \"Run gestopt.\" : \"Run voltooid.\" }}\n      </p>\n      <div class=\"bulk-progress__actions\">\n        <Button v-if=\"run.active && !run.batch && !run.cancelled\" @click=\"run.paused ? emit('resume') : emit('pause')\">{{ run.paused ? \"Hervatten\" : \"Pauzeren\" }}</Button>\n        <Button v-if=\"run.active && !run.batch && !run.cancelled\" variant=\"danger\" @click=\"emit('cancel')\">Annuleren</Button>\n        <Button v-if=\"run.counts.uncertain\" @click=\"emit('acknowledge')\">Onbevestigde starts gecontroleerd</Button>\n        <Button v-if=\"!run.active && (run.counts.failed || run.counts.cancelled)\" @click=\"emit('retry')\">Niet verwerkte locaties overnemen</Button>\n      </div>\n\n      <div v-if=\"activeEntries.length\" class=\"bulk-progress__lanes\">\n        <article v-for=\"entry in activeEntries\" :key=\"entry.key\" class=\"bulk-progress__lane\">\n          <span class=\"bulk-progress__muted\">{{ run.batch ? \"Batchanalyse\" : `Sessie ${(entry.slot ?? 0) + 1}` }}</span>\n          <RouterLink :to=\"destination(entry)\" class=\"bulk-progress__link\">{{ entry.locationId === null ? `Analyse #${entry.analysisId}` : `Locatie #${entry.locationId}` }}</RouterLink>\n          <span>{{ stage(entry) }}</span>\n          <span v-if=\"entry.analysisId !== null\" class=\"bulk-progress__muted\">Analyse #{{ entry.analysisId }}</span>\n          <span class=\"bulk-progress__muted tnum\">{{ duration(entry) }}</span>\n          <p v-if=\"entry.error\" class=\"bulk-progress__error\" role=\"alert\">{{ entry.error }}</p>\n        </article>\n      </div>\n\n      <details v-if=\"history.length\" class=\"bulk-progress__history\">\n        <summary>Logboek ({{ history.length }})</summary>\n        <label class=\"bulk-progress__search\">Zoek in logboek <input v-model=\"filter\" type=\"search\" class=\"bulk-progress__input\"></label>\n        <div class=\"bulk-progress__scroll\">\n          <table class=\"bulk-progress__table\">\n            <thead><tr><th>Locatie / analyse</th><th>Sessie</th><th>Resultaat</th><th>Duur</th></tr></thead>\n            <tbody>\n              <tr v-for=\"entry in visibleHistory\" :key=\"entry.key\">\n                <td><RouterLink :to=\"destination(entry)\" class=\"bulk-progress__link\">#{{ entry.locationId ?? entry.analysisId }}</RouterLink></td>\n                <td>{{ entry.slot === null ? \"Batch\" : entry.slot + 1 }}</td>\n                <td :class=\"{ 'bulk-progress__error': entry.status === 'failed' }\">{{ entry.message }}</td>\n                <td class=\"tnum\">{{ duration(entry) }}</td>\n              </tr>\n              <tr v-if=\"!visibleHistory.length\"><td colspan=\"4\">Geen resultaten voor deze zoekopdracht.</td></tr>\n            </tbody>\n          </table>\n        </div>\n        <Button v-if=\"filteredHistory.length > logLimit\" @click=\"logLimit += 100\">Meer tonen</Button>\n      </details>\n    </div>\n  </Panel>\n</template>\n\n<style scoped>\n.bulk-progress { display: flex; flex-direction: column; gap: 16px; }\n.bulk-progress p { margin: 0; }\n.bulk-progress__counts, .bulk-progress__actions { display: flex; flex-wrap: wrap; gap: 12px; }\n.bulk-progress__counts { font-size: var(--text-caption); color: var(--fg-2); }\n.bulk-progress__bar { width: 100%; height: 10px; accent-color: var(--brand); }\n.bulk-progress__lanes { display: grid; gap: 12px; }\n.bulk-progress__lane { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--border-1); min-width: 0; overflow-wrap: anywhere; }\n.bulk-progress__muted { color: var(--fg-3); font-size: var(--text-caption); }\n.bulk-progress__error { color: var(--danger-fg); }\n.bulk-progress__notice { padding: 12px; border: 1px solid var(--border-2); background: var(--bg-inset); }\n.bulk-progress__link { color: var(--fg-1); text-decoration: underline; cursor: pointer; }\n.bulk-progress__history summary { cursor: pointer; }\n.bulk-progress__search { display: flex; flex-direction: column; gap: 4px; margin: 12px 0; }\n.bulk-progress__input { padding: 8px 12px; color: var(--fg-1); background: var(--bg-inset); border: 0; border-bottom: 1px solid var(--field-line); }\n.bulk-progress__scroll { overflow-x: auto; }\n.bulk-progress__table { width: 100%; border-collapse: collapse; font-size: var(--text-caption); }\n.bulk-progress__table th, .bulk-progress__table td { padding: 8px; text-align: left; border-bottom: 1px solid var(--border-1); }\n@media (min-width: 760px) { .bulk-progress__lanes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }\n</style>\n","import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment, createVNode as _createVNode, vModelText as _vModelText, withDirectives as _withDirectives, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"bulk-progress\" }\nconst _hoisted_2 = {\n  key: 0,\n  role: \"status\"\n}\nconst _hoisted_3 = {\n  key: 1,\n  class: \"bulk-progress__error\",\n  role: \"alert\"\n}\nconst _hoisted_4 = {\n  key: 2,\n  class: \"bulk-progress__notice\",\n  role: \"status\"\n}\nconst _hoisted_5 = {\n  key: 3,\n  class: \"bulk-progress__notice\",\n  role: \"status\"\n}\nconst _hoisted_6 = {\n  key: 4,\n  class: \"bulk-progress__notice\"\n}\nconst _hoisted_7 = {\n  class: \"bulk-progress__counts\",\n  \"aria-live\": \"polite\"\n}\nconst _hoisted_8 = { key: 0 }\nconst _hoisted_9 = { key: 1 }\nconst _hoisted_10 = { key: 2 }\nconst _hoisted_11 = [\"value\", \"max\", \"aria-label\"]\nconst _hoisted_12 = {\n  key: 5,\n  role: \"status\"\n}\nconst _hoisted_13 = { class: \"bulk-progress__actions\" }\nconst _hoisted_14 = {\n  key: 6,\n  class: \"bulk-progress__lanes\"\n}\nconst _hoisted_15 = { class: \"bulk-progress__muted\" }\nconst _hoisted_16 = {\n  key: 0,\n  class: \"bulk-progress__muted\"\n}\nconst _hoisted_17 = { class: \"bulk-progress__muted tnum\" }\nconst _hoisted_18 = {\n  key: 1,\n  class: \"bulk-progress__error\",\n  role: \"alert\"\n}\nconst _hoisted_19 = {\n  key: 7,\n  class: \"bulk-progress__history\"\n}\nconst _hoisted_20 = { class: \"bulk-progress__search\" }\nconst _hoisted_21 = { class: \"bulk-progress__scroll\" }\nconst _hoisted_22 = { class: \"bulk-progress__table\" }\nconst _hoisted_23 = { class: \"tnum\" }\nconst _hoisted_24 = { key: 0 }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return ($props.run.counts.total || $props.run.submitting || $props.run.error)\n    ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n        key: 0,\n        title: \"Voortgang\"\n      }, {\n        default: _withCtx(() => [\n          _createElementVNode(\"div\", _hoisted_1, [\n            ($props.run.submitting)\n              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_2, \"Batch indienen...\"))\n              : _createCommentVNode(\"v-if\", true),\n            ($props.run.error)\n              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_3, _toDisplayString($props.run.error), 1 /* TEXT */))\n              : _createCommentVNode(\"v-if\", true),\n            ($props.navigationPaused)\n              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_4, \" Nieuwe starts zijn gepauzeerd omdat je de runner hebt verlaten. Lopende analyses blijven gevolgd. Kies Hervatten om verder te gaan. \"))\n              : _createCommentVNode(\"v-if\", true),\n            ($props.run.cancelled)\n              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_5, \" Er worden geen nieuwe locaties gestart. Lopende analyses blijven gevolgd tot ze klaar zijn. \"))\n              : _createCommentVNode(\"v-if\", true),\n            ($props.run.batch && $props.run.active)\n              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_6, \" Gereserveerde analyses worden iedere drie seconden in WRD gecontroleerd. Via Batches kun je nieuwe providerresultaten ophalen. \"))\n              : _createCommentVNode(\"v-if\", true),\n            _createElementVNode(\"div\", _hoisted_7, [\n              _createElementVNode(\"span\", null, [\n                _createElementVNode(\"strong\", null, _toDisplayString($props.run.counts.done) + \"/\" + _toDisplayString($props.run.counts.total), 1 /* TEXT */),\n                _cache[6] || (_cache[6] = _createTextVNode(\" verwerkt\", -1 /* CACHED */))\n              ]),\n              _createElementVNode(\"span\", null, _toDisplayString($props.run.counts.completed) + \" geslaagd\", 1 /* TEXT */),\n              _createElementVNode(\"span\", null, _toDisplayString($props.run.counts.failed) + \" mislukt\", 1 /* TEXT */),\n              _createElementVNode(\"span\", null, _toDisplayString($props.run.counts.skipped) + \" overgeslagen\", 1 /* TEXT */),\n              _createElementVNode(\"span\", null, _toDisplayString($props.run.counts.inflight) + \" bezig\", 1 /* TEXT */),\n              ($props.run.counts.waiting)\n                ? (_openBlock(), _createElementBlock(\"span\", _hoisted_8, _toDisplayString($props.run.counts.waiting) + \" wachtend\", 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true),\n              ($props.run.counts.cancelled)\n                ? (_openBlock(), _createElementBlock(\"span\", _hoisted_9, _toDisplayString($props.run.counts.cancelled) + \" niet gestart\", 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true),\n              ($props.run.counts.uncertain)\n                ? (_openBlock(), _createElementBlock(\"span\", _hoisted_10, _toDisplayString($props.run.counts.uncertain) + \" onbevestigd\", 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true)\n            ]),\n            _createElementVNode(\"progress\", {\n              value: $props.run.counts.done,\n              max: $props.run.counts.total || 1,\n              \"aria-label\": `${$setup.percent}% verwerkt`,\n              class: \"bulk-progress__bar\"\n            }, null, 8 /* PROPS */, _hoisted_11),\n            (!$props.run.active && $props.run.counts.total)\n              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_12, _toDisplayString($props.run.counts.failed ? \"Run afgerond met fouten.\" : $props.run.counts.cancelled ? \"Run gestopt.\" : \"Run voltooid.\"), 1 /* TEXT */))\n              : _createCommentVNode(\"v-if\", true),\n            _createElementVNode(\"div\", _hoisted_13, [\n              ($props.run.active && !$props.run.batch && !$props.run.cancelled)\n                ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                    key: 0,\n                    onClick: _cache[0] || (_cache[0] = $event => ($props.run.paused ? $setup.emit('resume') : $setup.emit('pause')))\n                  }, {\n                    default: _withCtx(() => [\n                      _createTextVNode(_toDisplayString($props.run.paused ? \"Hervatten\" : \"Pauzeren\"), 1 /* TEXT */)\n                    ]),\n                    _: 1 /* STABLE */\n                  }))\n                : _createCommentVNode(\"v-if\", true),\n              ($props.run.active && !$props.run.batch && !$props.run.cancelled)\n                ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                    key: 1,\n                    variant: \"danger\",\n                    onClick: _cache[1] || (_cache[1] = $event => ($setup.emit('cancel')))\n                  }, {\n                    default: _withCtx(() => _cache[7] || (_cache[7] = [\n                      _createTextVNode(\"Annuleren\", -1 /* CACHED */)\n                    ])),\n                    _: 1 /* STABLE */,\n                    __: [7]\n                  }))\n                : _createCommentVNode(\"v-if\", true),\n              ($props.run.counts.uncertain)\n                ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                    key: 2,\n                    onClick: _cache[2] || (_cache[2] = $event => ($setup.emit('acknowledge')))\n                  }, {\n                    default: _withCtx(() => _cache[8] || (_cache[8] = [\n                      _createTextVNode(\"Onbevestigde starts gecontroleerd\", -1 /* CACHED */)\n                    ])),\n                    _: 1 /* STABLE */,\n                    __: [8]\n                  }))\n                : _createCommentVNode(\"v-if\", true),\n              (!$props.run.active && ($props.run.counts.failed || $props.run.counts.cancelled))\n                ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                    key: 3,\n                    onClick: _cache[3] || (_cache[3] = $event => ($setup.emit('retry')))\n                  }, {\n                    default: _withCtx(() => _cache[9] || (_cache[9] = [\n                      _createTextVNode(\"Niet verwerkte locaties overnemen\", -1 /* CACHED */)\n                    ])),\n                    _: 1 /* STABLE */,\n                    __: [9]\n                  }))\n                : _createCommentVNode(\"v-if\", true)\n            ]),\n            ($setup.activeEntries.length)\n              ? (_openBlock(), _createElementBlock(\"div\", _hoisted_14, [\n                  (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.activeEntries, (entry) => {\n                    return (_openBlock(), _createElementBlock(\"article\", {\n                      key: entry.key,\n                      class: \"bulk-progress__lane\"\n                    }, [\n                      _createElementVNode(\"span\", _hoisted_15, _toDisplayString($props.run.batch ? \"Batchanalyse\" : `Sessie ${(entry.slot ?? 0) + 1}`), 1 /* TEXT */),\n                      _createVNode($setup[\"RouterLink\"], {\n                        to: $setup.destination(entry),\n                        class: \"bulk-progress__link\"\n                      }, {\n                        default: _withCtx(() => [\n                          _createTextVNode(_toDisplayString(entry.locationId === null ? `Analyse #${entry.analysisId}` : `Locatie #${entry.locationId}`), 1 /* TEXT */)\n                        ]),\n                        _: 2 /* DYNAMIC */\n                      }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"]),\n                      _createElementVNode(\"span\", null, _toDisplayString($setup.stage(entry)), 1 /* TEXT */),\n                      (entry.analysisId !== null)\n                        ? (_openBlock(), _createElementBlock(\"span\", _hoisted_16, \"Analyse #\" + _toDisplayString(entry.analysisId), 1 /* TEXT */))\n                        : _createCommentVNode(\"v-if\", true),\n                      _createElementVNode(\"span\", _hoisted_17, _toDisplayString($setup.duration(entry)), 1 /* TEXT */),\n                      (entry.error)\n                        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_18, _toDisplayString(entry.error), 1 /* TEXT */))\n                        : _createCommentVNode(\"v-if\", true)\n                    ]))\n                  }), 128 /* KEYED_FRAGMENT */))\n                ]))\n              : _createCommentVNode(\"v-if\", true),\n            ($setup.history.length)\n              ? (_openBlock(), _createElementBlock(\"details\", _hoisted_19, [\n                  _createElementVNode(\"summary\", null, \"Logboek (\" + _toDisplayString($setup.history.length) + \")\", 1 /* TEXT */),\n                  _createElementVNode(\"label\", _hoisted_20, [\n                    _cache[10] || (_cache[10] = _createTextVNode(\"Zoek in logboek \", -1 /* CACHED */)),\n                    _withDirectives(_createElementVNode(\"input\", {\n                      \"onUpdate:modelValue\": _cache[4] || (_cache[4] = $event => (($setup.filter) = $event)),\n                      type: \"search\",\n                      class: \"bulk-progress__input\"\n                    }, null, 512 /* NEED_PATCH */), [\n                      [_vModelText, $setup.filter]\n                    ])\n                  ]),\n                  _createElementVNode(\"div\", _hoisted_21, [\n                    _createElementVNode(\"table\", _hoisted_22, [\n                      _cache[12] || (_cache[12] = _createElementVNode(\"thead\", null, [\n                        _createElementVNode(\"tr\", null, [\n                          _createElementVNode(\"th\", null, \"Locatie / analyse\"),\n                          _createElementVNode(\"th\", null, \"Sessie\"),\n                          _createElementVNode(\"th\", null, \"Resultaat\"),\n                          _createElementVNode(\"th\", null, \"Duur\")\n                        ])\n                      ], -1 /* CACHED */)),\n                      _createElementVNode(\"tbody\", null, [\n                        (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.visibleHistory, (entry) => {\n                          return (_openBlock(), _createElementBlock(\"tr\", {\n                            key: entry.key\n                          }, [\n                            _createElementVNode(\"td\", null, [\n                              _createVNode($setup[\"RouterLink\"], {\n                                to: $setup.destination(entry),\n                                class: \"bulk-progress__link\"\n                              }, {\n                                default: _withCtx(() => [\n                                  _createTextVNode(\"#\" + _toDisplayString(entry.locationId ?? entry.analysisId), 1 /* TEXT */)\n                                ]),\n                                _: 2 /* DYNAMIC */\n                              }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"])\n                            ]),\n                            _createElementVNode(\"td\", null, _toDisplayString(entry.slot === null ? \"Batch\" : entry.slot + 1), 1 /* TEXT */),\n                            _createElementVNode(\"td\", {\n                              class: _normalizeClass({ 'bulk-progress__error': entry.status === 'failed' })\n                            }, _toDisplayString(entry.message), 3 /* TEXT, CLASS */),\n                            _createElementVNode(\"td\", _hoisted_23, _toDisplayString($setup.duration(entry)), 1 /* TEXT */)\n                          ]))\n                        }), 128 /* KEYED_FRAGMENT */)),\n                        (!$setup.visibleHistory.length)\n                          ? (_openBlock(), _createElementBlock(\"tr\", _hoisted_24, _cache[11] || (_cache[11] = [\n                              _createElementVNode(\"td\", { colspan: \"4\" }, \"Geen resultaten voor deze zoekopdracht.\", -1 /* CACHED */)\n                            ])))\n                          : _createCommentVNode(\"v-if\", true)\n                      ])\n                    ])\n                  ]),\n                  ($setup.filteredHistory.length > $setup.logLimit)\n                    ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                        key: 0,\n                        onClick: _cache[5] || (_cache[5] = $event => ($setup.logLimit += 100))\n                      }, {\n                        default: _withCtx(() => _cache[13] || (_cache[13] = [\n                          _createTextVNode(\"Meer tonen\", -1 /* CACHED */)\n                        ])),\n                        _: 1 /* STABLE */,\n                        __: [13]\n                      }))\n                    : _createCommentVNode(\"v-if\", true)\n                ]))\n              : _createCommentVNode(\"v-if\", true)\n          ])\n        ]),\n        _: 1 /* STABLE */\n      }))\n    : _createCommentVNode(\"v-if\", true)\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkProgress.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkProgress.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkProgress.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkProgress.vue\";script.__scopeId = \"data-v-76ec94c7\";export default script;","<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport { RouterLink } from \"vue-router\";\nimport Panel from \"../ui/Panel.vue\";\nimport Input from \"../ui/Input.vue\";\nimport Button from \"../ui/Button.vue\";\nimport EmptyState from \"../ui/EmptyState.vue\";\nimport type { BulkEstimate, BulkPhotoStatus } from \"../../lib/use-bulk-runner\";\n\nconst props = defineProps<{ estimate: BulkEstimate | null; photos: BulkPhotoStatus[] | null }>();\nconst query = ref(\"\");\nconst limit = ref(100);\nconst filtered = computed(() => props.photos?.filter(photo => `${photo.companyName} ${photo.city} ${photo.locationId}`.toLowerCase().includes(query.value.toLowerCase())) ?? []);\nconst visible = computed(() => filtered.value.slice(0, limit.value));\nconst photoLabels = {\n  complete: \"Compleet\", \"complete-skipped\": \"Compleet, geen kadasterperceel\", partial: \"Gedeeltelijk\",\n  missing: \"Ontbreekt\", \"no-coords\": \"Geen coördinaten\", unknown: \"Nog niet gecontroleerd\",\n};\nconst summary = computed(() => Object.entries(photoLabels).map(([key, label]) => ({ label, count: props.photos?.filter(photo => photo.overall === key).length ?? 0 })).filter(group => group.count));\nconst dollars = (cents: number) => new Intl.NumberFormat(\"nl-NL\", { style: \"currency\", currency: \"USD\" }).format(cents / 100);\n</script>\n\n<template>\n  <Panel v-if=\"estimate\" title=\"Kostenschatting\">\n    <div class=\"bulk-summary\">\n      <p>{{ estimate.targetCount }} locaties. Referentie: Gemini 3 Pro, {{ estimate.sampleSize }} eerdere analyses.</p>\n      <p class=\"bulk-summary__muted\">Gemiddeld {{ estimate.avgInputTokens.toLocaleString('nl-NL') }} inputtokens en {{ estimate.avgOutputTokens.toLocaleString('nl-NL') }} outputtokens per analyse.</p>\n      <p>Tokens: {{ dollars(estimate.inputCents) }} input + {{ dollars(estimate.outputCents) }} output.</p>\n      <p>Foto's: {{ dollars(estimate.imageCostCents) }} ({{ estimate.mapbox }} Mapbox, {{ estimate.streetview }} Street View).</p>\n      <p v-if=\"estimate.locationsWithoutCoords\">{{ estimate.locationsWithoutCoords }} locaties zonder coördinaten.</p>\n      <p><strong>Geschat totaal: {{ dollars(estimate.totalCents) }}</strong></p>\n      <p class=\"bulk-summary__muted\">Indicatie op basis van de bestaande referentietarieven (circa 30% marge). Het gekozen model en werkelijk beeldgebruik kunnen afwijken.</p>\n    </div>\n  </Panel>\n  <Panel v-if=\"photos\" title=\"Foto-status\">\n    <EmptyState v-if=\"!photos.length\" title=\"Geen locaties in deze selectie\" description=\"Verlaag de offset of pas de selectie aan.\" />\n    <div v-else class=\"bulk-summary\">\n      <div class=\"bulk-summary__counts\"><span v-for=\"group in summary\" :key=\"group.label\">{{ group.count }} {{ group.label.toLowerCase() }}</span></div>\n      <Input v-model=\"query\" label=\"Zoek locatie\" placeholder=\"Naam, plaats of ID\" />\n      <div class=\"bulk-summary__scroll\">\n        <table class=\"bulk-summary__table\">\n          <thead><tr><th>Locatie</th><th>Plaats</th><th>Satelliet</th><th>Kadaster</th><th>Street View</th><th>Status</th></tr></thead>\n          <tbody>\n            <tr v-for=\"photo in visible\" :key=\"photo.locationId\">\n              <td><RouterLink :to=\"`/locations/${photo.locationId}`\" class=\"bulk-summary__link\">{{ photo.companyName }} (#{{ photo.locationId }})</RouterLink></td>\n              <td>{{ photo.city || \"-\" }}</td><td>{{ photo.satellite ? \"Ja\" : \"Nee\" }}</td>\n              <td>{{ photo.cadastral ? \"Ja\" : photo.cadastralSkipped ? \"Geen perceel\" : \"Nee\" }}</td>\n              <td>{{ photo.streetViewCount }}/4</td><td>{{ photoLabels[photo.overall] }}</td>\n            </tr>\n            <tr v-if=\"!visible.length\"><td colspan=\"6\">Geen resultaten voor deze zoekopdracht.</td></tr>\n          </tbody>\n        </table>\n      </div>\n      <Button v-if=\"filtered.length > limit\" @click=\"limit += 100\">Meer locaties tonen</Button>\n    </div>\n  </Panel>\n</template>\n\n<style scoped>\n.bulk-summary { display: flex; flex-direction: column; gap: 12px; }\n.bulk-summary p { margin: 0; }\n.bulk-summary__muted { color: var(--fg-3); font-size: var(--text-caption); }\n.bulk-summary__counts { display: flex; flex-wrap: wrap; gap: 12px; }\n.bulk-summary__scroll { overflow-x: auto; }\n.bulk-summary__table { width: 100%; border-collapse: collapse; font-size: var(--text-caption); }\n.bulk-summary__table th, .bulk-summary__table td { padding: 8px; text-align: left; border-bottom: 1px solid var(--border-1); }\n.bulk-summary__link { text-decoration: underline; cursor: pointer; }\n</style>\n","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, withCtx as _withCtx, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment, createVNode as _createVNode, createTextVNode as _createTextVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"bulk-summary\" }\nconst _hoisted_2 = { class: \"bulk-summary__muted\" }\nconst _hoisted_3 = { key: 0 }\nconst _hoisted_4 = {\n  key: 1,\n  class: \"bulk-summary\"\n}\nconst _hoisted_5 = { class: \"bulk-summary__counts\" }\nconst _hoisted_6 = { class: \"bulk-summary__scroll\" }\nconst _hoisted_7 = { class: \"bulk-summary__table\" }\nconst _hoisted_8 = { key: 0 }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(_Fragment, null, [\n    ($props.estimate)\n      ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n          key: 0,\n          title: \"Kostenschatting\"\n        }, {\n          default: _withCtx(() => [\n            _createElementVNode(\"div\", _hoisted_1, [\n              _createElementVNode(\"p\", null, _toDisplayString($props.estimate.targetCount) + \" locaties. Referentie: Gemini 3 Pro, \" + _toDisplayString($props.estimate.sampleSize) + \" eerdere analyses.\", 1 /* TEXT */),\n              _createElementVNode(\"p\", _hoisted_2, \"Gemiddeld \" + _toDisplayString($props.estimate.avgInputTokens.toLocaleString('nl-NL')) + \" inputtokens en \" + _toDisplayString($props.estimate.avgOutputTokens.toLocaleString('nl-NL')) + \" outputtokens per analyse.\", 1 /* TEXT */),\n              _createElementVNode(\"p\", null, \"Tokens: \" + _toDisplayString($setup.dollars($props.estimate.inputCents)) + \" input + \" + _toDisplayString($setup.dollars($props.estimate.outputCents)) + \" output.\", 1 /* TEXT */),\n              _createElementVNode(\"p\", null, \"Foto's: \" + _toDisplayString($setup.dollars($props.estimate.imageCostCents)) + \" (\" + _toDisplayString($props.estimate.mapbox) + \" Mapbox, \" + _toDisplayString($props.estimate.streetview) + \" Street View).\", 1 /* TEXT */),\n              ($props.estimate.locationsWithoutCoords)\n                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_3, _toDisplayString($props.estimate.locationsWithoutCoords) + \" locaties zonder coördinaten.\", 1 /* TEXT */))\n                : _createCommentVNode(\"v-if\", true),\n              _createElementVNode(\"p\", null, [\n                _createElementVNode(\"strong\", null, \"Geschat totaal: \" + _toDisplayString($setup.dollars($props.estimate.totalCents)), 1 /* TEXT */)\n              ]),\n              _cache[2] || (_cache[2] = _createElementVNode(\"p\", { class: \"bulk-summary__muted\" }, \"Indicatie op basis van de bestaande referentietarieven (circa 30% marge). Het gekozen model en werkelijk beeldgebruik kunnen afwijken.\", -1 /* CACHED */))\n            ])\n          ]),\n          _: 1 /* STABLE */\n        }))\n      : _createCommentVNode(\"v-if\", true),\n    ($props.photos)\n      ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n          key: 1,\n          title: \"Foto-status\"\n        }, {\n          default: _withCtx(() => [\n            (!$props.photos.length)\n              ? (_openBlock(), _createBlock($setup[\"EmptyState\"], {\n                  key: 0,\n                  title: \"Geen locaties in deze selectie\",\n                  description: \"Verlaag de offset of pas de selectie aan.\"\n                }))\n              : (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n                  _createElementVNode(\"div\", _hoisted_5, [\n                    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.summary, (group) => {\n                      return (_openBlock(), _createElementBlock(\"span\", {\n                        key: group.label\n                      }, _toDisplayString(group.count) + \" \" + _toDisplayString(group.label.toLowerCase()), 1 /* TEXT */))\n                    }), 128 /* KEYED_FRAGMENT */))\n                  ]),\n                  _createVNode($setup[\"Input\"], {\n                    modelValue: $setup.query,\n                    \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => (($setup.query) = $event)),\n                    label: \"Zoek locatie\",\n                    placeholder: \"Naam, plaats of ID\"\n                  }, null, 8 /* PROPS */, [\"modelValue\"]),\n                  _createElementVNode(\"div\", _hoisted_6, [\n                    _createElementVNode(\"table\", _hoisted_7, [\n                      _cache[4] || (_cache[4] = _createElementVNode(\"thead\", null, [\n                        _createElementVNode(\"tr\", null, [\n                          _createElementVNode(\"th\", null, \"Locatie\"),\n                          _createElementVNode(\"th\", null, \"Plaats\"),\n                          _createElementVNode(\"th\", null, \"Satelliet\"),\n                          _createElementVNode(\"th\", null, \"Kadaster\"),\n                          _createElementVNode(\"th\", null, \"Street View\"),\n                          _createElementVNode(\"th\", null, \"Status\")\n                        ])\n                      ], -1 /* CACHED */)),\n                      _createElementVNode(\"tbody\", null, [\n                        (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.visible, (photo) => {\n                          return (_openBlock(), _createElementBlock(\"tr\", {\n                            key: photo.locationId\n                          }, [\n                            _createElementVNode(\"td\", null, [\n                              _createVNode($setup[\"RouterLink\"], {\n                                to: `/locations/${photo.locationId}`,\n                                class: \"bulk-summary__link\"\n                              }, {\n                                default: _withCtx(() => [\n                                  _createTextVNode(_toDisplayString(photo.companyName) + \" (#\" + _toDisplayString(photo.locationId) + \")\", 1 /* TEXT */)\n                                ]),\n                                _: 2 /* DYNAMIC */\n                              }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"])\n                            ]),\n                            _createElementVNode(\"td\", null, _toDisplayString(photo.city || \"-\"), 1 /* TEXT */),\n                            _createElementVNode(\"td\", null, _toDisplayString(photo.satellite ? \"Ja\" : \"Nee\"), 1 /* TEXT */),\n                            _createElementVNode(\"td\", null, _toDisplayString(photo.cadastral ? \"Ja\" : photo.cadastralSkipped ? \"Geen perceel\" : \"Nee\"), 1 /* TEXT */),\n                            _createElementVNode(\"td\", null, _toDisplayString(photo.streetViewCount) + \"/4\", 1 /* TEXT */),\n                            _createElementVNode(\"td\", null, _toDisplayString($setup.photoLabels[photo.overall]), 1 /* TEXT */)\n                          ]))\n                        }), 128 /* KEYED_FRAGMENT */)),\n                        (!$setup.visible.length)\n                          ? (_openBlock(), _createElementBlock(\"tr\", _hoisted_8, _cache[3] || (_cache[3] = [\n                              _createElementVNode(\"td\", { colspan: \"6\" }, \"Geen resultaten voor deze zoekopdracht.\", -1 /* CACHED */)\n                            ])))\n                          : _createCommentVNode(\"v-if\", true)\n                      ])\n                    ])\n                  ]),\n                  ($setup.filtered.length > $setup.limit)\n                    ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                        key: 0,\n                        onClick: _cache[1] || (_cache[1] = $event => ($setup.limit += 100))\n                      }, {\n                        default: _withCtx(() => _cache[5] || (_cache[5] = [\n                          _createTextVNode(\"Meer locaties tonen\", -1 /* CACHED */)\n                        ])),\n                        _: 1 /* STABLE */,\n                        __: [5]\n                      }))\n                    : _createCommentVNode(\"v-if\", true)\n                ]))\n          ]),\n          _: 1 /* STABLE */\n        }))\n      : _createCommentVNode(\"v-if\", true)\n  ], 64 /* STABLE_FRAGMENT */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkSelectionSummary.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkSelectionSummary.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkSelectionSummary.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkSelectionSummary.vue\";script.__scopeId = \"data-v-68bb5230\";export default script;","import { createVNode as _createVNode, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, withCtx as _withCtx, createTextVNode as _createTextVNode } from \"vue\"\n\nconst _hoisted_1 = {\n  ref: \"root\",\n  class: \"bulk-runner\"\n}\nconst _hoisted_2 = { class: \"bulk-runner__cols\" }\nconst _hoisted_3 = { class: \"bulk-runner__form\" }\nconst _hoisted_4 = { class: \"bulk-runner__side\" }\nconst _hoisted_5 = {\n  key: 0,\n  class: \"bulk-runner__error\",\n  role: \"alert\"\n}\nconst _hoisted_6 = {\n  key: 1,\n  class: \"bulk-runner__status\",\n  role: \"status\"\n}\nconst _hoisted_7 = {\n  key: 1,\n  class: \"bulk-runner__selection\"\n}\nconst _hoisted_8 = { class: \"bulk-runner__ids\" }\nconst _hoisted_9 = { key: 0 }\nconst _hoisted_10 = { key: 1 }\nconst _hoisted_11 = { key: 2 }\nconst _hoisted_12 = {\n  key: 0,\n  class: \"bulk-runner__error\",\n  role: \"alert\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createVNode($setup[\"BulkProgress\"], {\n      run: $setup.run,\n      \"navigation-paused\": $setup.navigationPaused,\n      onPause: $setup.pause,\n      onResume: $setup.resume,\n      onCancel: _cache[0] || (_cache[0] = $event => ($setup.cancelConfirmation = true)),\n      onAcknowledge: _cache[1] || (_cache[1] = $event => ($setup.uncertainConfirmation = true)),\n      onRetry: $setup.retryUnfinished\n    }, null, 8 /* PROPS */, [\"run\", \"navigation-paused\", \"onPause\", \"onResume\", \"onRetry\"]),\n    _createCommentVNode(\" Twee kolommen zoals het kitscherm: het formulier links (1.4fr), de\\n         uitkomst van een controle rechts (1fr). De voortgang staat bij ons\\n         wél boven de kolommen en niet ernaast: het kitscherm heeft daar een\\n         balkje, wij een logconsole met filter die de volle breedte nodig\\n         heeft. \"),\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createElementVNode(\"div\", _hoisted_3, [\n        _createVNode($setup[\"BulkConfiguration\"], {\n          \"model-value\": $setup.form,\n          locked: $setup.locked || $setup.confirmation,\n          busy: $setup.busy,\n          regions: $setup.regions,\n          \"regions-loading\": $setup.regionsLoading,\n          \"regions-error\": $setup.regionsError,\n          errors: $setup.fieldErrors,\n          \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => (Object.assign($setup.form, $event))),\n          onReloadRegions: $setup.loadRegions,\n          onStatus: _cache[3] || (_cache[3] = $event => ($setup.inspect(() => $setup.checkStatus()))),\n          onNext: _cache[4] || (_cache[4] = $event => ($setup.inspect(() => $setup.checkStatus('next')))),\n          onMissing: $setup.showMissing,\n          onPhotos: _cache[5] || (_cache[5] = $event => ($setup.inspect($setup.checkPhotos))),\n          onEstimate: _cache[6] || (_cache[6] = $event => ($setup.inspect($setup.estimateCosts))),\n          onResolve: _cache[7] || (_cache[7] = $event => ($setup.inspect($setup.resolveTargets))),\n          onStart: $setup.prepare\n        }, null, 8 /* PROPS */, [\"model-value\", \"locked\", \"busy\", \"regions\", \"regions-loading\", \"regions-error\", \"errors\", \"onReloadRegions\"])\n      ]),\n      _createElementVNode(\"div\", _hoisted_4, [\n        ($setup.error)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_5, _toDisplayString($setup.error), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true),\n        ($setup.statusInfo)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_6, _toDisplayString($setup.statusInfo), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true),\n        ($setup.resolved)\n          ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n              key: 2,\n              title: \"Selectie\"\n            }, {\n              default: _withCtx(() => [\n                (!$setup.resolved.ids.length)\n                  ? (_openBlock(), _createBlock($setup[\"EmptyState\"], {\n                      key: 0,\n                      title: \"Geen locaties te verwerken\",\n                      description: \"Pas de selectie of offset aan. Mogelijk zijn alle locaties al verwerkt.\"\n                    }))\n                  : (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n                      _createElementVNode(\"p\", null, _toDisplayString($setup.resolved.ids.length.toLocaleString('nl-NL')) + \" locaties klaar, van \" + _toDisplayString($setup.resolved.totalAvailable.toLocaleString('nl-NL')) + \" in \" + _toDisplayString($setup.resolved.regionTitle || \"de ID-selectie\") + \".\", 1 /* TEXT */),\n                      _createElementVNode(\"details\", null, [\n                        _cache[19] || (_cache[19] = _createElementVNode(\"summary\", null, \"Geselecteerde ID's bekijken\", -1 /* CACHED */)),\n                        _createElementVNode(\"p\", _hoisted_8, _toDisplayString($setup.resolved.ids.join(\", \")), 1 /* TEXT */)\n                      ])\n                    ]))\n              ]),\n              _: 1 /* STABLE */\n            }))\n          : _createCommentVNode(\"v-if\", true),\n        _createVNode($setup[\"BulkSelectionSummary\"], {\n          estimate: $setup.estimate,\n          photos: $setup.imageStatuses\n        }, null, 8 /* PROPS */, [\"estimate\", \"photos\"])\n      ])\n    ]),\n    _cache[27] || (_cache[27] = _createElementVNode(\"p\", { class: \"bulk-runner__hint\" }, \"Binnen Bulk kun je van tab wisselen. Verlaat je Bulk, dan pauzeren nieuwe starts. Lopende analyses blijven gevolgd. Houd de browser open om de voortgang te bewaren.\", -1 /* CACHED */)),\n    _createVNode($setup[\"Dialog\"], {\n      open: $setup.confirmation,\n      \"onUpdate:open\": _cache[9] || (_cache[9] = $event => (($setup.confirmation) = $event)),\n      title: $setup.form.phase === 'images' ? 'Foto’s ophalen?' : $setup.form.useBatch ? 'Batch indienen?' : 'Analyses starten?',\n      description: `${$setup.confirmationCount} locaties worden verwerkt.`\n    }, {\n      footer: _withCtx(() => [\n        _createVNode($setup[\"Button\"], {\n          onClick: _cache[8] || (_cache[8] = $event => ($setup.confirmation = false))\n        }, {\n          default: _withCtx(() => _cache[20] || (_cache[20] = [\n            _createTextVNode(\"Annuleren\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [20]\n        }),\n        _createVNode($setup[\"Button\"], {\n          variant: \"primary\",\n          onClick: $setup.confirmStart\n        }, {\n          default: _withCtx(() => [\n            _createTextVNode(_toDisplayString($setup.form.useBatch && $setup.form.phase === 'analyze' ? \"Batch indienen\" : \"Start\"), 1 /* TEXT */)\n          ]),\n          _: 1 /* STABLE */\n        })\n      ]),\n      default: _withCtx(() => [\n        ($setup.form.phase === 'images')\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_9, _toDisplayString($setup.form.skipCompleted ? \"Alleen ontbrekende foto's worden opgehaald.\" : \"Bestaande foto's worden opnieuw opgehaald.\") + \" Dit kan API-kosten geven.\", 1 /* TEXT */))\n          : ($setup.form.useBatch)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_10, \"De batch wordt direct ingediend. Ontbrekende foto's kunnen extra kosten geven. Volg daarna de voortgang via Batches.\"))\n            : (_openBlock(), _createElementBlock(\"p\", _hoisted_11, _toDisplayString($setup.form.isDryRun ? \"De AI-resultaten worden gesimuleerd.\" : \"Dit start betaalde AI-analyses.\") + \" Er draaien maximaal \" + _toDisplayString($setup.form.concurrency) + \" locaties tegelijk.\", 1 /* TEXT */))\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"open\", \"title\", \"description\"]),\n    _createVNode($setup[\"Dialog\"], {\n      open: $setup.cancelConfirmation,\n      \"onUpdate:open\": _cache[12] || (_cache[12] = $event => (($setup.cancelConfirmation) = $event)),\n      title: \"Nieuwe starts stoppen?\",\n      description: \"Verwerkte locaties blijven bewaard. Lopende analyses worden niet afgebroken en blijven gevolgd.\"\n    }, {\n      footer: _withCtx(() => [\n        _createVNode($setup[\"Button\"], {\n          onClick: _cache[10] || (_cache[10] = $event => ($setup.cancelConfirmation = false))\n        }, {\n          default: _withCtx(() => _cache[21] || (_cache[21] = [\n            _createTextVNode(\"Terug\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [21]\n        }),\n        _createVNode($setup[\"Button\"], {\n          variant: \"danger\",\n          onClick: _cache[11] || (_cache[11] = $event => {$setup.cancel(); $setup.cancelConfirmation = false})\n        }, {\n          default: _withCtx(() => _cache[22] || (_cache[22] = [\n            _createTextVNode(\"Run annuleren\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [22]\n        })\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"open\"]),\n    _createVNode($setup[\"Dialog\"], {\n      open: $setup.uncertainConfirmation,\n      \"onUpdate:open\": _cache[15] || (_cache[15] = $event => (($setup.uncertainConfirmation) = $event)),\n      title: \"Onbevestigde starts gecontroleerd?\",\n      description: \"Een verzoek kan toch zijn verwerkt als het antwoord niet aankwam. Controleer eerst de locaties en Batches om dubbele analyses te voorkomen.\"\n    }, {\n      footer: _withCtx(() => [\n        _createVNode($setup[\"Button\"], {\n          onClick: _cache[13] || (_cache[13] = $event => ($setup.uncertainConfirmation = false))\n        }, {\n          default: _withCtx(() => _cache[23] || (_cache[23] = [\n            _createTextVNode(\"Terug\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [23]\n        }),\n        _createVNode($setup[\"Button\"], {\n          onClick: _cache[14] || (_cache[14] = $event => {$setup.acknowledgeUncertain(); $setup.uncertainConfirmation = false})\n        }, {\n          default: _withCtx(() => _cache[24] || (_cache[24] = [\n            _createTextVNode(\"Gecontroleerd\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [24]\n        })\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"open\"]),\n    _createVNode($setup[\"Dialog\"], {\n      open: $setup.missingOpen,\n      \"onUpdate:open\": _cache[18] || (_cache[18] = $event => (($setup.missingOpen) = $event)),\n      title: $setup.form.phase === 'images' ? 'Missende foto’s verwerken' : 'Missende analyses verwerken',\n      description: `${$setup.missingIds?.length ?? 0} locaties nog te verwerken.`\n    }, {\n      footer: _withCtx(() => [\n        _createVNode($setup[\"Button\"], {\n          onClick: _cache[17] || (_cache[17] = $event => ($setup.missingOpen = false))\n        }, {\n          default: _withCtx(() => _cache[25] || (_cache[25] = [\n            _createTextVNode(\"Annuleren\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [25]\n        }),\n        _createVNode($setup[\"Button\"], {\n          variant: \"primary\",\n          onClick: $setup.selectMissing\n        }, {\n          default: _withCtx(() => _cache[26] || (_cache[26] = [\n            _createTextVNode(\"Overnemen als ID-selectie\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [26]\n        })\n      ]),\n      default: _withCtx(() => [\n        _createVNode($setup[\"Input\"], {\n          modelValue: $setup.missingCount,\n          \"onUpdate:modelValue\": _cache[16] || (_cache[16] = $event => (($setup.missingCount) = $event)),\n          label: \"Aantal locaties\",\n          type: \"number\"\n        }, null, 8 /* PROPS */, [\"modelValue\"]),\n        ($setup.missingError)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_12, _toDisplayString($setup.missingError), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true)\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"open\", \"title\", \"description\"])\n  ], 512 /* NEED_PATCH */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkRunner.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkRunner.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkRunner.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BulkRunner.vue\";script.__scopeId = \"data-v-046a1551\";export default script;","<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport { useBatchMonitor } from \"../../lib/batch-monitor\";\nimport { settingsDate } from \"../../lib/settings-actions\";\nimport { batchProgressPercent, type BatchDisplay } from \"../../lib/batch-monitor-model\";\nimport Panel from \"../ui/Panel.vue\";\nimport Button from \"../ui/Button.vue\";\nimport Badge from \"../ui/Badge.vue\";\nimport Input from \"../ui/Input.vue\";\nimport EmptyState from \"../ui/EmptyState.vue\";\nimport Dialog from \"../ui/Dialog.vue\";\nimport BatchDetails from \"./BatchDetails.vue\";\n\nconst { rows, lastPoll, retryCount, loading, loaded, error, warning, actionError, message, action, progressOpen, pendingCount, refresh, run } = useBatchMonitor();\nconst detailsId = ref<string | null>(null);\nconst search = ref(\"\");\nconst copiedId = ref(\"\");\nconst copyError = ref(\"\");\nconst visible = computed(() => rows.value.filter(row => row.batchJobId.toLowerCase().includes(search.value.trim().toLowerCase())));\nconst pollNeeded = computed(() => rows.value.some(row => row.display.pollNeeded));\nfunction tone(display: BatchDisplay) {\n  if ([\"mislukt\", \"mislukt-google\"].includes(display.kind)) return \"danger\";\n  if (display.kind === \"afgerond\") return \"score\";\n  if ([\"gemengd\", \"poll-nodig\"].includes(display.kind)) return \"diverge\";\n  if (display.kind === \"bezig\") return \"info\";\n  return \"neutral\";\n}\nasync function copyId(id: string) {\n  copyError.value = \"\";\n  try { await navigator.clipboard.writeText(id); copiedId.value = id; }\n  catch { copyError.value = \"Kopiëren is niet gelukt. Selecteer het batch-ID en kopieer het handmatig.\"; }\n}\ndefineExpose({ refresh });\n</script>\n\n<template>\n  <Panel title=\"Batches\">\n    <div class=\"batches\">\n      <p class=\"batches__description\">Bulk-analyses die als Gemini-batch zijn ingestuurd. ‘Klaar bij Google, poll nodig’ betekent dat resultaten klaarstaan, maar nog niet zijn opgeslagen. Resultaatbestanden zijn 48 uur beschikbaar. Een automatische taak haalt ze ongeveer elke 12 minuten op.</p>\n      <p v-if=\"lastPoll\" class=\"batches__description\">Laatst gepolld: {{ settingsDate(lastPoll.at) }} ({{ lastPoll.source === 'cron' ? 'automatisch' : 'handmatig' }}), {{ lastPoll.totalWritten }} opgeslagen, {{ lastPoll.totalFailed }} mislukt, {{ lastPoll.totalRetryQueued }} voor herindiening.</p>\n      <div class=\"batches__actions\">\n        <Button :busy=\"loading\" :disabled=\"action !== null\" @click=\"refresh\">Vernieuwen</Button>\n        <Button :variant=\"pollNeeded ? 'primary' : 'secondary'\" :busy=\"action === 'poll'\" :disabled=\"action !== null || !loaded || pendingCount === 0\" @click=\"run('poll')\">Poll alles</Button>\n        <Button v-if=\"message || actionError\" variant=\"ghost\" @click=\"progressOpen = true\">Voortgang bekijken</Button>\n      </div>\n      <p v-if=\"error\" class=\"batches__error\" role=\"alert\">{{ error }}</p>\n      <p v-if=\"warning\" class=\"batches__warning\" role=\"status\">{{ warning }}</p>\n      <p v-if=\"actionError\" class=\"batches__error\" role=\"alert\">{{ actionError }}</p>\n      <p v-if=\"message\" role=\"status\">{{ message }}</p>\n      <p v-if=\"loading && !loaded\" role=\"status\">Batches laden...</p>\n      <p v-if=\"copyError\" class=\"batches__error\" role=\"alert\">{{ copyError }}</p>\n      <Input v-if=\"rows.length > 10 || search\" v-model=\"search\" label=\"Zoeken op batch-ID\" placeholder=\"Batch-ID\" />\n      <article v-for=\"row in visible\" :key=\"row.batchJobId\" class=\"batches__row\">\n        <div class=\"batches__row-header\">\n          <span class=\"batches__id\">{{ row.batchJobId }}</span>\n          <Badge :tone=\"tone(row.display)\">{{ row.display.label }}</Badge>\n        </div>\n        <div class=\"batches__meta\">\n          <span>{{ settingsDate(row.submittedAt) }}</span>\n          <span>{{ row.analysisCount }} analyses</span>\n          <span v-if=\"row.completedCount\" class=\"batches__success\">{{ row.completedCount }} klaar</span>\n          <span v-if=\"row.failedCount\" class=\"batches__error\">{{ row.failedCount }} mislukt</span>\n          <span v-if=\"row.pendingCount\">{{ row.pendingCount }} open</span>\n        </div>\n        <div v-if=\"row.display.progress\" class=\"batches__progress\" role=\"progressbar\" :aria-label=\"`Voortgang batch ${row.batchJobId}`\" :aria-valuenow=\"batchProgressPercent(row.display.progress)\" :aria-valuemin=\"0\" :aria-valuemax=\"100\">\n          <span :style=\"{ width: `${batchProgressPercent(row.display.progress)}%` }\" />\n        </div>\n        <div class=\"batches__actions\">\n          <Button @click=\"detailsId = row.batchJobId\">Details</Button>\n          <Button variant=\"ghost\" @click=\"copyId(row.batchJobId)\">{{ copiedId === row.batchJobId ? 'Gekopieerd' : 'Kopieer ID' }}</Button>\n        </div>\n      </article>\n      <EmptyState v-if=\"loaded && !error && !visible.length\" :title=\"search ? 'Geen batches gevonden.' : 'Er zijn nog geen batches ingestuurd.'\" />\n      <div v-if=\"retryCount > 0\" class=\"batches__retry\">\n        <p>{{ retryCount }} analyses wachten op herindiening na een tijdelijke fout (maximaal 2 pogingen per analyse).</p>\n        <Button :busy=\"action === 'retry'\" :disabled=\"action !== null\" @click=\"run('retry')\">Opnieuw insturen</Button>\n      </div>\n    </div>\n  </Panel>\n  <BatchDetails v-if=\"detailsId\" :key=\"detailsId\" :batch-job-id=\"detailsId\" @close=\"detailsId = null\" />\n  <Dialog v-model:open=\"progressOpen\" title=\"Batchverwerking\" description=\"De verwerking gaat op de achtergrond door. De lijst ververst automatisch.\" :max-width=\"680\">\n    <div class=\"batches\">\n      <p v-if=\"action\" role=\"status\">{{ action === 'poll' ? 'Poll aanvragen...' : 'Herindiening aanvragen...' }}</p>\n      <p v-if=\"actionError\" class=\"batches__error\" role=\"alert\">{{ actionError }}</p>\n      <p v-if=\"message\" role=\"status\">{{ message }}</p>\n      <p v-if=\"error\" class=\"batches__error\" role=\"alert\">{{ error }}</p>\n      <p v-if=\"warning\" class=\"batches__warning\">{{ warning }}</p>\n      <p>{{ pendingCount }} analyses open, {{ retryCount }} wachten op herindiening.</p>\n      <ul class=\"batches__summary\">\n        <li v-for=\"row in rows\" :key=\"row.batchJobId\"><span class=\"batches__id\">{{ row.batchJobId }}</span>: {{ row.completedCount }} klaar, {{ row.failedCount }} mislukt, {{ row.pendingCount }} open.</li>\n      </ul>\n      <p v-if=\"lastPoll\" class=\"batches__description\">Laatste poll: {{ settingsDate(lastPoll.at) }}. {{ lastPoll.totalWritten }} opgeslagen, {{ lastPoll.totalFailed }} mislukt, {{ lastPoll.totalRetryQueued }} voor herindiening.</p>\n    </div>\n    <template #footer><Button :busy=\"loading\" @click=\"refresh\">Vernieuwen</Button><Button @click=\"progressOpen = false\">Sluiten</Button></template>\n  </Dialog>\n</template>\n\n<style scoped>\n.batches { display: flex; flex-direction: column; gap: 12px; }\n.batches p { margin: 0; }\n.batches__description { color: var(--fg-3); }\n.batches__actions, .batches__meta, .batches__row-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }\n.batches__row-header { justify-content: space-between; }\n.batches__row { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--border-1); border-radius: var(--radius); }\n.batches__id { min-width: 0; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: var(--text-caption); }\n.batches__meta { font-size: var(--text-caption); color: var(--fg-3); }\n.batches__success { color: var(--score-fg); }\n.batches__error { color: var(--danger-fg); }\n.batches__warning { color: var(--diverge-fg); }\n.batches__progress { overflow: hidden; height: 6px; border-radius: var(--radius); background: var(--bg-inset); }\n.batches__progress span { display: block; height: 100%; background: var(--info); }\n.batches__retry { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--border-1); }\n.batches__summary { margin: 0; padding-left: 20px; }\n.batches__summary li + li { margin-top: 8px; }\n</style>\n","import { computed, onMounted, onUnmounted, ref } from \"vue\";\nimport { api } from \"./api\";\nimport { acceptBatchAction, batchOverview } from \"./batch-monitor-model\";\n\nexport function useBatchMonitor() {\n  const rows = ref<ReturnType<typeof batchOverview>>([]);\n  const lastPoll = ref<Awaited<ReturnType<typeof api.getLiveBatchStatus>>[\"lastPoll\"]>(null);\n  const retryCount = ref(0);\n  const loading = ref(false);\n  const loaded = ref(false);\n  const error = ref(\"\");\n  const warning = ref(\"\");\n  const actionError = ref(\"\");\n  const message = ref(\"\");\n  const action = ref<\"poll\" | \"retry\" | null>(null);\n  const progressOpen = ref(false);\n  const pendingCount = computed(() => rows.value.reduce((sum, row) => sum + row.pendingCount, 0));\n  let timer: ReturnType<typeof setTimeout> | undefined;\n  let disposed = false;\n  let watchUntil = 0;\n\n  async function refresh() {\n    if (disposed || loading.value) return;\n    clearTimeout(timer);\n    loading.value = true;\n    error.value = \"\";\n    warning.value = \"\";\n    const [batches, retries] = await Promise.allSettled([api.findAllBatchAnalyses(), api.findRetryableAnalyses()]);\n    if (disposed) return;\n    if (retries.status === \"fulfilled\") retryCount.value = retries.value.analyses.length;\n    else warning.value = \"Het aantal analyses voor herindiening kon niet worden geladen.\";\n    if (batches.status === \"fulfilled\") {\n      rows.value = batchOverview({ groups: batches.value.groups, live: [] });\n      loaded.value = true;\n      try {\n        const live = await api.getLiveBatchStatus({ batchIds: batches.value.groups.map(group => group.batchJobId) });\n        if (disposed) return;\n        rows.value = batchOverview({ groups: batches.value.groups, live: live.groups });\n        lastPoll.value = live.lastPoll;\n      } catch {\n        if (!disposed) warning.value = [warning.value, \"De live Google-status kon niet worden opgehaald. De opgeslagen aantallen worden getoond.\"].filter(Boolean).join(\" \");\n      }\n    } else {\n      error.value = \"Batches konden niet worden geladen. Probeer het opnieuw.\";\n    }\n    if (disposed) return;\n    loading.value = false;\n    timer = setTimeout(() => { void refresh(); }, Date.now() < watchUntil ? 15000 : 60000);\n  }\n\n  async function run(actionName: \"poll\" | \"retry\") {\n    if (action.value) return;\n    action.value = actionName;\n    message.value = \"\";\n    actionError.value = \"\";\n    progressOpen.value = true;\n    try {\n      const result = actionName === \"poll\" ? await api.requestBatchPoll() : await api.retryFailedBatches();\n      if (disposed) return;\n      message.value = acceptBatchAction(result, actionName);\n      watchUntil = Date.now() + 15 * 60 * 1000;\n      await refresh();\n    } catch (err) {\n      if (!disposed) actionError.value = err instanceof Error ? err.message : \"De batchactie is mislukt. Probeer het opnieuw.\";\n    } finally { if (!disposed) action.value = null; }\n  }\n\n  onMounted(refresh);\n  onUnmounted(() => { disposed = true; clearTimeout(timer); });\n  return { rows, lastPoll, retryCount, loading, loaded, error, warning, actionError, message, action, progressOpen, pendingCount, refresh, run };\n}\n","export interface BatchGeminiStatus {\n  state: string;\n  stats?: { total: number; successful: number; failed: number; pending: number };\n}\n\nexport interface BatchDisplay {\n  kind: \"wachtrij\" | \"bezig\" | \"poll-nodig\" | \"mislukt-google\" | \"afgerond\" | \"gemengd\" | \"mislukt\" | \"onbekend\";\n  label: string;\n  pollNeeded: boolean;\n  progress?: { done: number; total: number };\n}\n\nexport interface BatchGroup {\n  batchJobId: string;\n  analyses: Array<{ batchSubmittedAt: string | null }>;\n  pendingCount: number;\n  completedCount: number;\n  failedCount: number;\n}\n\nexport function batchDisplay(input: { pendingCount: number; completedCount: number; failedCount: number; gemini: BatchGeminiStatus | null }): BatchDisplay {\n  const { pendingCount, completedCount, failedCount, gemini } = input;\n  if (pendingCount === 0) {\n    if (failedCount > 0 && completedCount === 0) return { kind: \"mislukt\", label: \"Mislukt\", pollNeeded: false };\n    if (failedCount > 0) return { kind: \"gemengd\", label: `Afgerond, ${failedCount} mislukt`, pollNeeded: false };\n    return { kind: \"afgerond\", label: \"Afgerond\", pollNeeded: false };\n  }\n  if (gemini) {\n    const state = gemini.state.replace(/^(BATCH|JOB)_STATE_/, \"\");\n    if ([\"FAILED\", \"CANCELLED\", \"EXPIRED\"].includes(state)) return { kind: \"mislukt-google\", label: \"Mislukt bij Google\", pollNeeded: true };\n    if (state === \"SUCCEEDED\") return { kind: \"poll-nodig\", label: \"Klaar bij Google, poll nodig\", pollNeeded: true };\n    if ([\"PENDING\", \"RUNNING\"].includes(state)) {\n      const stats = gemini.stats;\n      if (stats && stats.total > 0 && stats.pending < stats.total) {\n        const done = stats.total - stats.pending;\n        return { kind: \"bezig\", label: `Bezig: ${done}/${stats.total} verwerkt`, progress: { done, total: stats.total }, pollNeeded: false };\n      }\n      return state === \"PENDING\"\n        ? { kind: \"wachtrij\", label: \"In wachtrij bij Google\", pollNeeded: false }\n        : { kind: \"bezig\", label: \"Bezig bij Google\", pollNeeded: false };\n    }\n  }\n  return { kind: \"onbekend\", label: \"Status onbekend\", pollNeeded: true };\n}\n\nexport function batchProgressPercent(progress: { done: number; total: number }): number {\n  return progress.total > 0 ? Math.max(0, Math.min(100, Math.round(progress.done / progress.total * 100))) : 0;\n}\n\nexport function batchOverview(options: { groups: BatchGroup[]; live: Array<{ batchJobId: string; gemini: BatchGeminiStatus | null }> }) {\n  const live = new Map(options.live.map(row => [row.batchJobId, row.gemini]));\n  return options.groups.map(group => ({\n    batchJobId: group.batchJobId,\n    analysisCount: group.analyses.length,\n    submittedAt: group.analyses[0]?.batchSubmittedAt ?? null,\n    pendingCount: group.pendingCount,\n    completedCount: group.completedCount,\n    failedCount: group.failedCount,\n    display: batchDisplay({ ...group, gemini: live.get(group.batchJobId) ?? null }),\n  })).sort((a, b) => (b.submittedAt ?? \"\").localeCompare(a.submittedAt ?? \"\"));\n}\n\nexport function acceptBatchAction(result: { accepted?: boolean; count?: number }, action: \"poll\" | \"retry\"): string {\n  if (action === \"poll\" && result.accepted === true) return \"Poll gestart. De lijst wordt automatisch bijgewerkt.\";\n  if (action === \"retry\" && Number.isInteger(result.count) && result.count! >= 0) {\n    return result.count === 0 ? \"Geen analyses om opnieuw in te sturen.\"\n      : `Herindiening gestart voor ${result.count} analyses. De lijst wordt automatisch bijgewerkt.`;\n  }\n  throw new Error(\"De actie is niet geaccepteerd. Probeer het opnieuw.\");\n}\n","/**\n * Actions for the Instellingen sections. Which sections exist and how a URL\n * maps to one lives in lib/settings-sections.ts; this file is only about\n * what you DO within a section.\n */\nexport type SettingsListTab = \"failed\" | \"stuck\" | \"trash\";\n\nexport function toggleSettingsSelection(options: { selected: readonly number[]; visibleIds: readonly number[] }): number[] {\n  return options.visibleIds.every(id => options.selected.includes(id)) ? [] : [...options.visibleIds];\n}\n\nexport interface SettingsActionApi {\n  softDeleteAnalyses: (params: { ids: number[] }) => Promise<{ success: boolean }>;\n  restoreAnalyses: (params: { ids: number[] }) => Promise<{ success: boolean }>;\n}\n\nexport async function runSettingsAction(options: { api: SettingsActionApi; tab: SettingsListTab; ids: readonly number[] }): Promise<number[]> {\n  const ids = [...new Set(options.ids)];\n  if (!ids.length) return [];\n  const result = options.tab === \"trash\"\n    ? await options.api.restoreAnalyses({ ids })\n    : await options.api.softDeleteAnalyses({ ids });\n  if (result.success !== true) throw new Error(\"De actie is niet uitgevoerd. Probeer het opnieuw.\");\n  return ids;\n}\n\nexport const IMPORT_QUERY_STORAGE_KEY = \"statiegeldnl-import-query\";\nexport const DEFAULT_IMPORT_QUERY = \"area[\\\"name\\\"=\\\"Utrecht\\\"][\\\"admin_level\\\"=\\\"4\\\"]->.prov;\\nnwr[amenity=fuel](area.prov);\";\n\nexport function settingsDate(value: string | null): string {\n  return value ? new Date(value).toLocaleString(\"nl-NL\", { day: \"numeric\", month: \"short\", year: \"numeric\", hour: \"2-digit\", minute: \"2-digit\" }) : \"Onbekend\";\n}\n","<script setup lang=\"ts\">\nimport { onMounted, onUnmounted, ref } from \"vue\";\nimport { RouterLink } from \"vue-router\";\nimport { api } from \"../../lib/api\";\nimport { settingsDate } from \"../../lib/settings-actions\";\nimport Dialog from \"../ui/Dialog.vue\";\nimport Button from \"../ui/Button.vue\";\nimport Badge from \"../ui/Badge.vue\";\nimport ContentSwitcher from \"../ui/ContentSwitcher.vue\";\n\nconst props = defineProps<{ batchJobId: string }>();\nconst emit = defineEmits<{ close: [] }>();\nconst data = ref<Awaited<ReturnType<typeof api.getBatchDetails>> | null>(null);\nconst loading = ref(false);\nconst error = ref(\"\");\nconst view = ref(\"overview\");\nconst copied = ref(false);\nconst copyError = ref(\"\");\nlet disposed = false;\nasync function load() {\n  loading.value = true;\n  error.value = \"\";\n  try {\n    const result = await api.getBatchDetails({ batchJobId: props.batchJobId });\n    if (!disposed) data.value = result;\n  } catch (err) {\n    if (!disposed) error.value = err instanceof Error ? err.message : \"Batchdetails laden mislukt.\";\n  } finally { if (!disposed) loading.value = false; }\n}\nasync function copyPrompt() {\n  if (!data.value) return;\n  copyError.value = \"\";\n  const prompt = [\n    `Onderstaand staat het Gemini Batch API-antwoord voor batch ${props.batchJobId} uit het statiegeldnl-project. Analyseer wat er is misgegaan: fouten per item, verlopen deadlines, parsefouten en lege antwoorden. Benoem de oorzaak en stel concrete verbeteringen voor in de batchverwerking.`,\n    \"\", \"Raw JSON:\", \"```json\", data.value.raw, \"```\",\n  ].join(\"\\n\");\n  try { await navigator.clipboard.writeText(prompt); copied.value = true; }\n  catch { copyError.value = \"Kopiëren is niet gelukt. Kopieer de JSON handmatig.\"; }\n}\nonMounted(load);\nonUnmounted(() => { disposed = true; });\n</script>\n\n<template>\n  <Dialog :open=\"true\" title=\"Batchdetails\" :description=\"batchJobId\" :max-width=\"1000\" @update:open=\"emit('close')\">\n    <div class=\"batch-details\">\n      <p v-if=\"loading\" role=\"status\">Batchdetails laden...</p>\n      <template v-else-if=\"error\">\n        <p class=\"batch-details__error\" role=\"alert\">{{ error }}</p>\n        <Button @click=\"load\">Opnieuw proberen</Button>\n      </template>\n      <template v-else-if=\"data\">\n        <ContentSwitcher v-model=\"view\" :options=\"[{ value: 'overview', label: 'Overzicht' }, { value: 'raw', label: 'Raw JSON' }]\" aria-label=\"Weergave batchdetails\" />\n        <pre v-if=\"view === 'raw'\" class=\"batch-details__raw\">{{ data.raw }}</pre>\n        <template v-else>\n          <dl class=\"batch-details__header\">\n            <dt>Batch</dt><dd>{{ data.header.name || batchJobId }}</dd>\n            <dt>Naam</dt><dd>{{ data.header.displayName || 'Geen naam' }}</dd>\n            <dt>Model</dt><dd>{{ data.header.model || 'Onbekend' }}</dd>\n            <dt>Status</dt><dd>{{ data.header.state || 'Onbekend' }} ({{ data.header.done ? 'voltooid' : 'niet voltooid' }})</dd>\n            <dt>Aangemaakt</dt><dd>{{ settingsDate(data.header.createTime) }}</dd>\n            <dt>Afgerond</dt><dd>{{ data.header.endTime ? settingsDate(data.header.endTime) : 'Nog niet afgerond' }}</dd>\n            <template v-if=\"data.header.batchStats\"><dt>Statistieken</dt><dd>{{ JSON.stringify(data.header.batchStats) }}</dd></template>\n            <dt>Resultaten</dt><dd>{{ data.header.itemCount }}</dd>\n          </dl>\n          <p v-if=\"!data.entries.length\" class=\"batch-details__muted\">Geen inline resultaten beschikbaar.</p>\n          <article v-for=\"entry in data.entries\" :key=\"`${entry.index}-${entry.key}`\" class=\"batch-details__entry\">\n            <div class=\"batch-details__meta\">\n              <Badge :tone=\"entry.status === 'error' ? 'danger' : entry.status === 'empty' ? 'diverge' : 'score'\">{{ entry.status === 'error' ? 'Mislukt' : entry.status === 'empty' ? 'Leeg' : 'Geslaagd' }}</Badge>\n              <span>{{ entry.index }}/{{ entry.total }}, sleutel {{ entry.key || 'onbekend' }}</span>\n              <RouterLink v-if=\"entry.locationId !== null\" class=\"batch-details__link\" :to=\"{ name: 'location-detail', params: { id: entry.locationId } }\" target=\"_blank\" rel=\"noopener noreferrer\">Locatie #{{ entry.locationId }}</RouterLink>\n              <RouterLink v-if=\"entry.locationId !== null && entry.analysisId !== null\" class=\"batch-details__link\" :to=\"{ name: 'analysis-detail', params: { id: entry.locationId, analysisId: entry.analysisId } }\" target=\"_blank\" rel=\"noopener noreferrer\">Analyse #{{ entry.analysisId }}</RouterLink>\n              <span v-if=\"entry.locationId === null && entry.analysisId !== null\" class=\"batch-details__muted\">Analyse #{{ entry.analysisId }} niet meer beschikbaar</span>\n            </div>\n            <p v-if=\"entry.status === 'error'\" class=\"batch-details__error\">Foutcode {{ entry.errorCode ?? '?' }}: {{ entry.errorMessage || 'Geen foutmelding' }}</p>\n            <p v-else-if=\"entry.status === 'empty'\" class=\"batch-details__muted\">Leeg tekstantwoord</p>\n            <template v-else>\n              <p v-if=\"entry.tokensIn !== null || entry.tokensOut !== null\" class=\"batch-details__muted\">Tokens: {{ entry.tokensIn ?? '?' }} in / {{ entry.tokensOut ?? '?' }} uit</p>\n              <p v-if=\"entry.textPreview\" class=\"batch-details__preview\">{{ entry.textPreview }}<span v-if=\"entry.textOverflow > 0\" class=\"batch-details__muted\"> (+{{ entry.textOverflow }} tekens)</span></p>\n            </template>\n          </article>\n        </template>\n      </template>\n      <p v-if=\"copyError\" class=\"batch-details__error\" role=\"alert\">{{ copyError }}</p>\n    </div>\n    <template #footer>\n      <Button v-if=\"data\" @click=\"copyPrompt\">{{ copied ? 'Gekopieerd' : 'Los op met AI' }}</Button>\n      <Button @click=\"emit('close')\">Sluiten</Button>\n    </template>\n  </Dialog>\n</template>\n\n<style scoped>\n.batch-details { display: flex; flex-direction: column; gap: 12px; min-width: 0; }\n.batch-details__raw { margin: 0; padding: 12px; max-height: 60vh; overflow: auto; background: var(--bg-inset); font-size: var(--text-caption); }\n.batch-details__header { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; margin: 0; padding: 12px; background: var(--bg-inset); font-size: var(--text-caption); }\n.batch-details__header dt { color: var(--fg-3); }\n.batch-details__header dd { margin: 0; overflow-wrap: anywhere; }\n.batch-details__entry { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--border-1); border-radius: var(--radius); font-size: var(--text-caption); }\n.batch-details__entry p { margin: 0; overflow-wrap: anywhere; }\n.batch-details__meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }\n.batch-details__link { color: var(--info-fg); text-decoration: underline; cursor: pointer; }\n.batch-details__error { color: var(--danger-fg); }\n.batch-details__muted { color: var(--fg-3); }\n.batch-details__preview { white-space: pre-wrap; }\n</style>\n","import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, Fragment as _Fragment, renderList as _renderList, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"batch-details\" }\nconst _hoisted_2 = {\n  key: 0,\n  role: \"status\"\n}\nconst _hoisted_3 = {\n  class: \"batch-details__error\",\n  role: \"alert\"\n}\nconst _hoisted_4 = {\n  key: 0,\n  class: \"batch-details__raw\"\n}\nconst _hoisted_5 = { class: \"batch-details__header\" }\nconst _hoisted_6 = {\n  key: 0,\n  class: \"batch-details__muted\"\n}\nconst _hoisted_7 = { class: \"batch-details__meta\" }\nconst _hoisted_8 = {\n  key: 2,\n  class: \"batch-details__muted\"\n}\nconst _hoisted_9 = {\n  key: 0,\n  class: \"batch-details__error\"\n}\nconst _hoisted_10 = {\n  key: 1,\n  class: \"batch-details__muted\"\n}\nconst _hoisted_11 = {\n  key: 0,\n  class: \"batch-details__muted\"\n}\nconst _hoisted_12 = {\n  key: 1,\n  class: \"batch-details__preview\"\n}\nconst _hoisted_13 = {\n  key: 0,\n  class: \"batch-details__muted\"\n}\nconst _hoisted_14 = {\n  key: 3,\n  class: \"batch-details__error\",\n  role: \"alert\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createBlock($setup[\"Dialog\"], {\n    open: true,\n    title: \"Batchdetails\",\n    description: $props.batchJobId,\n    \"max-width\": 1000,\n    \"onUpdate:open\": _cache[2] || (_cache[2] = $event => ($setup.emit('close')))\n  }, {\n    footer: _withCtx(() => [\n      ($setup.data)\n        ? (_openBlock(), _createBlock($setup[\"Button\"], {\n            key: 0,\n            onClick: $setup.copyPrompt\n          }, {\n            default: _withCtx(() => [\n              _createTextVNode(_toDisplayString($setup.copied ? 'Gekopieerd' : 'Los op met AI'), 1 /* TEXT */)\n            ]),\n            _: 1 /* STABLE */\n          }))\n        : _createCommentVNode(\"v-if\", true),\n      _createVNode($setup[\"Button\"], {\n        onClick: _cache[1] || (_cache[1] = $event => ($setup.emit('close')))\n      }, {\n        default: _withCtx(() => _cache[12] || (_cache[12] = [\n          _createTextVNode(\"Sluiten\", -1 /* CACHED */)\n        ])),\n        _: 1 /* STABLE */,\n        __: [12]\n      })\n    ]),\n    default: _withCtx(() => [\n      _createElementVNode(\"div\", _hoisted_1, [\n        ($setup.loading)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_2, \"Batchdetails laden...\"))\n          : ($setup.error)\n            ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n                _createElementVNode(\"p\", _hoisted_3, _toDisplayString($setup.error), 1 /* TEXT */),\n                _createVNode($setup[\"Button\"], { onClick: $setup.load }, {\n                  default: _withCtx(() => _cache[3] || (_cache[3] = [\n                    _createTextVNode(\"Opnieuw proberen\", -1 /* CACHED */)\n                  ])),\n                  _: 1 /* STABLE */,\n                  __: [3]\n                })\n              ], 64 /* STABLE_FRAGMENT */))\n            : ($setup.data)\n              ? (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [\n                  _createVNode($setup[\"ContentSwitcher\"], {\n                    modelValue: $setup.view,\n                    \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => (($setup.view) = $event)),\n                    options: [{ value: 'overview', label: 'Overzicht' }, { value: 'raw', label: 'Raw JSON' }],\n                    \"aria-label\": \"Weergave batchdetails\"\n                  }, null, 8 /* PROPS */, [\"modelValue\"]),\n                  ($setup.view === 'raw')\n                    ? (_openBlock(), _createElementBlock(\"pre\", _hoisted_4, _toDisplayString($setup.data.raw), 1 /* TEXT */))\n                    : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n                        _createElementVNode(\"dl\", _hoisted_5, [\n                          _cache[5] || (_cache[5] = _createElementVNode(\"dt\", null, \"Batch\", -1 /* CACHED */)),\n                          _createElementVNode(\"dd\", null, _toDisplayString($setup.data.header.name || $props.batchJobId), 1 /* TEXT */),\n                          _cache[6] || (_cache[6] = _createElementVNode(\"dt\", null, \"Naam\", -1 /* CACHED */)),\n                          _createElementVNode(\"dd\", null, _toDisplayString($setup.data.header.displayName || 'Geen naam'), 1 /* TEXT */),\n                          _cache[7] || (_cache[7] = _createElementVNode(\"dt\", null, \"Model\", -1 /* CACHED */)),\n                          _createElementVNode(\"dd\", null, _toDisplayString($setup.data.header.model || 'Onbekend'), 1 /* TEXT */),\n                          _cache[8] || (_cache[8] = _createElementVNode(\"dt\", null, \"Status\", -1 /* CACHED */)),\n                          _createElementVNode(\"dd\", null, _toDisplayString($setup.data.header.state || 'Onbekend') + \" (\" + _toDisplayString($setup.data.header.done ? 'voltooid' : 'niet voltooid') + \")\", 1 /* TEXT */),\n                          _cache[9] || (_cache[9] = _createElementVNode(\"dt\", null, \"Aangemaakt\", -1 /* CACHED */)),\n                          _createElementVNode(\"dd\", null, _toDisplayString($setup.settingsDate($setup.data.header.createTime)), 1 /* TEXT */),\n                          _cache[10] || (_cache[10] = _createElementVNode(\"dt\", null, \"Afgerond\", -1 /* CACHED */)),\n                          _createElementVNode(\"dd\", null, _toDisplayString($setup.data.header.endTime ? $setup.settingsDate($setup.data.header.endTime) : 'Nog niet afgerond'), 1 /* TEXT */),\n                          ($setup.data.header.batchStats)\n                            ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                                _cache[4] || (_cache[4] = _createElementVNode(\"dt\", null, \"Statistieken\", -1 /* CACHED */)),\n                                _createElementVNode(\"dd\", null, _toDisplayString(JSON.stringify($setup.data.header.batchStats)), 1 /* TEXT */)\n                              ], 64 /* STABLE_FRAGMENT */))\n                            : _createCommentVNode(\"v-if\", true),\n                          _cache[11] || (_cache[11] = _createElementVNode(\"dt\", null, \"Resultaten\", -1 /* CACHED */)),\n                          _createElementVNode(\"dd\", null, _toDisplayString($setup.data.header.itemCount), 1 /* TEXT */)\n                        ]),\n                        (!$setup.data.entries.length)\n                          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_6, \"Geen inline resultaten beschikbaar.\"))\n                          : _createCommentVNode(\"v-if\", true),\n                        (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.data.entries, (entry) => {\n                          return (_openBlock(), _createElementBlock(\"article\", {\n                            key: `${entry.index}-${entry.key}`,\n                            class: \"batch-details__entry\"\n                          }, [\n                            _createElementVNode(\"div\", _hoisted_7, [\n                              _createVNode($setup[\"Badge\"], {\n                                tone: entry.status === 'error' ? 'danger' : entry.status === 'empty' ? 'diverge' : 'score'\n                              }, {\n                                default: _withCtx(() => [\n                                  _createTextVNode(_toDisplayString(entry.status === 'error' ? 'Mislukt' : entry.status === 'empty' ? 'Leeg' : 'Geslaagd'), 1 /* TEXT */)\n                                ]),\n                                _: 2 /* DYNAMIC */\n                              }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"tone\"]),\n                              _createElementVNode(\"span\", null, _toDisplayString(entry.index) + \"/\" + _toDisplayString(entry.total) + \", sleutel \" + _toDisplayString(entry.key || 'onbekend'), 1 /* TEXT */),\n                              (entry.locationId !== null)\n                                ? (_openBlock(), _createBlock($setup[\"RouterLink\"], {\n                                    key: 0,\n                                    class: \"batch-details__link\",\n                                    to: { name: 'location-detail', params: { id: entry.locationId } },\n                                    target: \"_blank\",\n                                    rel: \"noopener noreferrer\"\n                                  }, {\n                                    default: _withCtx(() => [\n                                      _createTextVNode(\"Locatie #\" + _toDisplayString(entry.locationId), 1 /* TEXT */)\n                                    ]),\n                                    _: 2 /* DYNAMIC */\n                                  }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"]))\n                                : _createCommentVNode(\"v-if\", true),\n                              (entry.locationId !== null && entry.analysisId !== null)\n                                ? (_openBlock(), _createBlock($setup[\"RouterLink\"], {\n                                    key: 1,\n                                    class: \"batch-details__link\",\n                                    to: { name: 'analysis-detail', params: { id: entry.locationId, analysisId: entry.analysisId } },\n                                    target: \"_blank\",\n                                    rel: \"noopener noreferrer\"\n                                  }, {\n                                    default: _withCtx(() => [\n                                      _createTextVNode(\"Analyse #\" + _toDisplayString(entry.analysisId), 1 /* TEXT */)\n                                    ]),\n                                    _: 2 /* DYNAMIC */\n                                  }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"]))\n                                : _createCommentVNode(\"v-if\", true),\n                              (entry.locationId === null && entry.analysisId !== null)\n                                ? (_openBlock(), _createElementBlock(\"span\", _hoisted_8, \"Analyse #\" + _toDisplayString(entry.analysisId) + \" niet meer beschikbaar\", 1 /* TEXT */))\n                                : _createCommentVNode(\"v-if\", true)\n                            ]),\n                            (entry.status === 'error')\n                              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_9, \"Foutcode \" + _toDisplayString(entry.errorCode ?? '?') + \": \" + _toDisplayString(entry.errorMessage || 'Geen foutmelding'), 1 /* TEXT */))\n                              : (entry.status === 'empty')\n                                ? (_openBlock(), _createElementBlock(\"p\", _hoisted_10, \"Leeg tekstantwoord\"))\n                                : (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [\n                                    (entry.tokensIn !== null || entry.tokensOut !== null)\n                                      ? (_openBlock(), _createElementBlock(\"p\", _hoisted_11, \"Tokens: \" + _toDisplayString(entry.tokensIn ?? '?') + \" in / \" + _toDisplayString(entry.tokensOut ?? '?') + \" uit\", 1 /* TEXT */))\n                                      : _createCommentVNode(\"v-if\", true),\n                                    (entry.textPreview)\n                                      ? (_openBlock(), _createElementBlock(\"p\", _hoisted_12, [\n                                          _createTextVNode(_toDisplayString(entry.textPreview), 1 /* TEXT */),\n                                          (entry.textOverflow > 0)\n                                            ? (_openBlock(), _createElementBlock(\"span\", _hoisted_13, \" (+\" + _toDisplayString(entry.textOverflow) + \" tekens)\", 1 /* TEXT */))\n                                            : _createCommentVNode(\"v-if\", true)\n                                        ]))\n                                      : _createCommentVNode(\"v-if\", true)\n                                  ], 64 /* STABLE_FRAGMENT */))\n                          ]))\n                        }), 128 /* KEYED_FRAGMENT */))\n                      ], 64 /* STABLE_FRAGMENT */))\n                ], 64 /* STABLE_FRAGMENT */))\n              : _createCommentVNode(\"v-if\", true),\n        ($setup.copyError)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_14, _toDisplayString($setup.copyError), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true)\n      ])\n    ]),\n    _: 1 /* STABLE */\n  }, 8 /* PROPS */, [\"description\"]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BatchDetails.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BatchDetails.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BatchDetails.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BatchDetails.vue\";script.__scopeId = \"data-v-4ba6af30\";export default script;","import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment, normalizeStyle as _normalizeStyle } from \"vue\"\n\nconst _hoisted_1 = { class: \"batches\" }\nconst _hoisted_2 = {\n  key: 0,\n  class: \"batches__description\"\n}\nconst _hoisted_3 = { class: \"batches__actions\" }\nconst _hoisted_4 = {\n  key: 1,\n  class: \"batches__error\",\n  role: \"alert\"\n}\nconst _hoisted_5 = {\n  key: 2,\n  class: \"batches__warning\",\n  role: \"status\"\n}\nconst _hoisted_6 = {\n  key: 3,\n  class: \"batches__error\",\n  role: \"alert\"\n}\nconst _hoisted_7 = {\n  key: 4,\n  role: \"status\"\n}\nconst _hoisted_8 = {\n  key: 5,\n  role: \"status\"\n}\nconst _hoisted_9 = {\n  key: 6,\n  class: \"batches__error\",\n  role: \"alert\"\n}\nconst _hoisted_10 = { class: \"batches__row-header\" }\nconst _hoisted_11 = { class: \"batches__id\" }\nconst _hoisted_12 = { class: \"batches__meta\" }\nconst _hoisted_13 = {\n  key: 0,\n  class: \"batches__success\"\n}\nconst _hoisted_14 = {\n  key: 1,\n  class: \"batches__error\"\n}\nconst _hoisted_15 = { key: 2 }\nconst _hoisted_16 = [\"aria-label\", \"aria-valuenow\"]\nconst _hoisted_17 = { class: \"batches__actions\" }\nconst _hoisted_18 = {\n  key: 9,\n  class: \"batches__retry\"\n}\nconst _hoisted_19 = { class: \"batches\" }\nconst _hoisted_20 = {\n  key: 0,\n  role: \"status\"\n}\nconst _hoisted_21 = {\n  key: 1,\n  class: \"batches__error\",\n  role: \"alert\"\n}\nconst _hoisted_22 = {\n  key: 2,\n  role: \"status\"\n}\nconst _hoisted_23 = {\n  key: 3,\n  class: \"batches__error\",\n  role: \"alert\"\n}\nconst _hoisted_24 = {\n  key: 4,\n  class: \"batches__warning\"\n}\nconst _hoisted_25 = { class: \"batches__summary\" }\nconst _hoisted_26 = { class: \"batches__id\" }\nconst _hoisted_27 = {\n  key: 5,\n  class: \"batches__description\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(_Fragment, null, [\n    _createVNode($setup[\"Panel\"], { title: \"Batches\" }, {\n      default: _withCtx(() => [\n        _createElementVNode(\"div\", _hoisted_1, [\n          _cache[12] || (_cache[12] = _createElementVNode(\"p\", { class: \"batches__description\" }, \"Bulk-analyses die als Gemini-batch zijn ingestuurd. ‘Klaar bij Google, poll nodig’ betekent dat resultaten klaarstaan, maar nog niet zijn opgeslagen. Resultaatbestanden zijn 48 uur beschikbaar. Een automatische taak haalt ze ongeveer elke 12 minuten op.\", -1 /* CACHED */)),\n          ($setup.lastPoll)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_2, \"Laatst gepolld: \" + _toDisplayString($setup.settingsDate($setup.lastPoll.at)) + \" (\" + _toDisplayString($setup.lastPoll.source === 'cron' ? 'automatisch' : 'handmatig') + \"), \" + _toDisplayString($setup.lastPoll.totalWritten) + \" opgeslagen, \" + _toDisplayString($setup.lastPoll.totalFailed) + \" mislukt, \" + _toDisplayString($setup.lastPoll.totalRetryQueued) + \" voor herindiening.\", 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true),\n          _createElementVNode(\"div\", _hoisted_3, [\n            _createVNode($setup[\"Button\"], {\n              busy: $setup.loading,\n              disabled: $setup.action !== null,\n              onClick: $setup.refresh\n            }, {\n              default: _withCtx(() => _cache[7] || (_cache[7] = [\n                _createTextVNode(\"Vernieuwen\", -1 /* CACHED */)\n              ])),\n              _: 1 /* STABLE */,\n              __: [7]\n            }, 8 /* PROPS */, [\"busy\", \"disabled\", \"onClick\"]),\n            _createVNode($setup[\"Button\"], {\n              variant: $setup.pollNeeded ? 'primary' : 'secondary',\n              busy: $setup.action === 'poll',\n              disabled: $setup.action !== null || !$setup.loaded || $setup.pendingCount === 0,\n              onClick: _cache[0] || (_cache[0] = $event => ($setup.run('poll')))\n            }, {\n              default: _withCtx(() => _cache[8] || (_cache[8] = [\n                _createTextVNode(\"Poll alles\", -1 /* CACHED */)\n              ])),\n              _: 1 /* STABLE */,\n              __: [8]\n            }, 8 /* PROPS */, [\"variant\", \"busy\", \"disabled\"]),\n            ($setup.message || $setup.actionError)\n              ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                  key: 0,\n                  variant: \"ghost\",\n                  onClick: _cache[1] || (_cache[1] = $event => ($setup.progressOpen = true))\n                }, {\n                  default: _withCtx(() => _cache[9] || (_cache[9] = [\n                    _createTextVNode(\"Voortgang bekijken\", -1 /* CACHED */)\n                  ])),\n                  _: 1 /* STABLE */,\n                  __: [9]\n                }))\n              : _createCommentVNode(\"v-if\", true)\n          ]),\n          ($setup.error)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_4, _toDisplayString($setup.error), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.warning)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_5, _toDisplayString($setup.warning), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.actionError)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_6, _toDisplayString($setup.actionError), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.message)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_7, _toDisplayString($setup.message), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.loading && !$setup.loaded)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_8, \"Batches laden...\"))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.copyError)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_9, _toDisplayString($setup.copyError), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.rows.length > 10 || $setup.search)\n            ? (_openBlock(), _createBlock($setup[\"Input\"], {\n                key: 7,\n                modelValue: $setup.search,\n                \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => (($setup.search) = $event)),\n                label: \"Zoeken op batch-ID\",\n                placeholder: \"Batch-ID\"\n              }, null, 8 /* PROPS */, [\"modelValue\"]))\n            : _createCommentVNode(\"v-if\", true),\n          (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.visible, (row) => {\n            return (_openBlock(), _createElementBlock(\"article\", {\n              key: row.batchJobId,\n              class: \"batches__row\"\n            }, [\n              _createElementVNode(\"div\", _hoisted_10, [\n                _createElementVNode(\"span\", _hoisted_11, _toDisplayString(row.batchJobId), 1 /* TEXT */),\n                _createVNode($setup[\"Badge\"], {\n                  tone: $setup.tone(row.display)\n                }, {\n                  default: _withCtx(() => [\n                    _createTextVNode(_toDisplayString(row.display.label), 1 /* TEXT */)\n                  ]),\n                  _: 2 /* DYNAMIC */\n                }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"tone\"])\n              ]),\n              _createElementVNode(\"div\", _hoisted_12, [\n                _createElementVNode(\"span\", null, _toDisplayString($setup.settingsDate(row.submittedAt)), 1 /* TEXT */),\n                _createElementVNode(\"span\", null, _toDisplayString(row.analysisCount) + \" analyses\", 1 /* TEXT */),\n                (row.completedCount)\n                  ? (_openBlock(), _createElementBlock(\"span\", _hoisted_13, _toDisplayString(row.completedCount) + \" klaar\", 1 /* TEXT */))\n                  : _createCommentVNode(\"v-if\", true),\n                (row.failedCount)\n                  ? (_openBlock(), _createElementBlock(\"span\", _hoisted_14, _toDisplayString(row.failedCount) + \" mislukt\", 1 /* TEXT */))\n                  : _createCommentVNode(\"v-if\", true),\n                (row.pendingCount)\n                  ? (_openBlock(), _createElementBlock(\"span\", _hoisted_15, _toDisplayString(row.pendingCount) + \" open\", 1 /* TEXT */))\n                  : _createCommentVNode(\"v-if\", true)\n              ]),\n              (row.display.progress)\n                ? (_openBlock(), _createElementBlock(\"div\", {\n                    key: 0,\n                    class: \"batches__progress\",\n                    role: \"progressbar\",\n                    \"aria-label\": `Voortgang batch ${row.batchJobId}`,\n                    \"aria-valuenow\": $setup.batchProgressPercent(row.display.progress),\n                    \"aria-valuemin\": 0,\n                    \"aria-valuemax\": 100\n                  }, [\n                    _createElementVNode(\"span\", {\n                      style: _normalizeStyle({ width: `${$setup.batchProgressPercent(row.display.progress)}%` })\n                    }, null, 4 /* STYLE */)\n                  ], 8 /* PROPS */, _hoisted_16))\n                : _createCommentVNode(\"v-if\", true),\n              _createElementVNode(\"div\", _hoisted_17, [\n                _createVNode($setup[\"Button\"], {\n                  onClick: $event => ($setup.detailsId = row.batchJobId)\n                }, {\n                  default: _withCtx(() => _cache[10] || (_cache[10] = [\n                    _createTextVNode(\"Details\", -1 /* CACHED */)\n                  ])),\n                  _: 2 /* DYNAMIC */,\n                  __: [10]\n                }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"onClick\"]),\n                _createVNode($setup[\"Button\"], {\n                  variant: \"ghost\",\n                  onClick: $event => ($setup.copyId(row.batchJobId))\n                }, {\n                  default: _withCtx(() => [\n                    _createTextVNode(_toDisplayString($setup.copiedId === row.batchJobId ? 'Gekopieerd' : 'Kopieer ID'), 1 /* TEXT */)\n                  ]),\n                  _: 2 /* DYNAMIC */\n                }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"onClick\"])\n              ])\n            ]))\n          }), 128 /* KEYED_FRAGMENT */)),\n          ($setup.loaded && !$setup.error && !$setup.visible.length)\n            ? (_openBlock(), _createBlock($setup[\"EmptyState\"], {\n                key: 8,\n                title: $setup.search ? 'Geen batches gevonden.' : 'Er zijn nog geen batches ingestuurd.'\n              }, null, 8 /* PROPS */, [\"title\"]))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.retryCount > 0)\n            ? (_openBlock(), _createElementBlock(\"div\", _hoisted_18, [\n                _createElementVNode(\"p\", null, _toDisplayString($setup.retryCount) + \" analyses wachten op herindiening na een tijdelijke fout (maximaal 2 pogingen per analyse).\", 1 /* TEXT */),\n                _createVNode($setup[\"Button\"], {\n                  busy: $setup.action === 'retry',\n                  disabled: $setup.action !== null,\n                  onClick: _cache[3] || (_cache[3] = $event => ($setup.run('retry')))\n                }, {\n                  default: _withCtx(() => _cache[11] || (_cache[11] = [\n                    _createTextVNode(\"Opnieuw insturen\", -1 /* CACHED */)\n                  ])),\n                  _: 1 /* STABLE */,\n                  __: [11]\n                }, 8 /* PROPS */, [\"busy\", \"disabled\"])\n              ]))\n            : _createCommentVNode(\"v-if\", true)\n        ])\n      ]),\n      _: 1 /* STABLE */\n    }),\n    ($setup.detailsId)\n      ? (_openBlock(), _createBlock($setup[\"BatchDetails\"], {\n          key: $setup.detailsId,\n          \"batch-job-id\": $setup.detailsId,\n          onClose: _cache[4] || (_cache[4] = $event => ($setup.detailsId = null))\n        }, null, 8 /* PROPS */, [\"batch-job-id\"]))\n      : _createCommentVNode(\"v-if\", true),\n    _createVNode($setup[\"Dialog\"], {\n      open: $setup.progressOpen,\n      \"onUpdate:open\": _cache[6] || (_cache[6] = $event => (($setup.progressOpen) = $event)),\n      title: \"Batchverwerking\",\n      description: \"De verwerking gaat op de achtergrond door. De lijst ververst automatisch.\",\n      \"max-width\": 680\n    }, {\n      footer: _withCtx(() => [\n        _createVNode($setup[\"Button\"], {\n          busy: $setup.loading,\n          onClick: $setup.refresh\n        }, {\n          default: _withCtx(() => _cache[13] || (_cache[13] = [\n            _createTextVNode(\"Vernieuwen\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [13]\n        }, 8 /* PROPS */, [\"busy\", \"onClick\"]),\n        _createVNode($setup[\"Button\"], {\n          onClick: _cache[5] || (_cache[5] = $event => ($setup.progressOpen = false))\n        }, {\n          default: _withCtx(() => _cache[14] || (_cache[14] = [\n            _createTextVNode(\"Sluiten\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [14]\n        })\n      ]),\n      default: _withCtx(() => [\n        _createElementVNode(\"div\", _hoisted_19, [\n          ($setup.action)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_20, _toDisplayString($setup.action === 'poll' ? 'Poll aanvragen...' : 'Herindiening aanvragen...'), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.actionError)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_21, _toDisplayString($setup.actionError), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.message)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_22, _toDisplayString($setup.message), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.error)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_23, _toDisplayString($setup.error), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.warning)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_24, _toDisplayString($setup.warning), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true),\n          _createElementVNode(\"p\", null, _toDisplayString($setup.pendingCount) + \" analyses open, \" + _toDisplayString($setup.retryCount) + \" wachten op herindiening.\", 1 /* TEXT */),\n          _createElementVNode(\"ul\", _hoisted_25, [\n            (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.rows, (row) => {\n              return (_openBlock(), _createElementBlock(\"li\", {\n                key: row.batchJobId\n              }, [\n                _createElementVNode(\"span\", _hoisted_26, _toDisplayString(row.batchJobId), 1 /* TEXT */),\n                _createTextVNode(\": \" + _toDisplayString(row.completedCount) + \" klaar, \" + _toDisplayString(row.failedCount) + \" mislukt, \" + _toDisplayString(row.pendingCount) + \" open.\", 1 /* TEXT */)\n              ]))\n            }), 128 /* KEYED_FRAGMENT */))\n          ]),\n          ($setup.lastPoll)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_27, \"Laatste poll: \" + _toDisplayString($setup.settingsDate($setup.lastPoll.at)) + \". \" + _toDisplayString($setup.lastPoll.totalWritten) + \" opgeslagen, \" + _toDisplayString($setup.lastPoll.totalFailed) + \" mislukt, \" + _toDisplayString($setup.lastPoll.totalRetryQueued) + \" voor herindiening.\", 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true)\n        ])\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"open\"])\n  ], 64 /* STABLE_FRAGMENT */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BatchMonitor.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BatchMonitor.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BatchMonitor.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/BatchMonitor.vue\";script.__scopeId = \"data-v-0aa7f4e3\";export default script;","<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, reactive, shallowRef, watch } from \"vue\";\nimport Button from \"../ui/Button.vue\";\nimport Checkbox from \"../ui/Checkbox.vue\";\nimport Input from \"../ui/Input.vue\";\nimport Panel from \"../ui/Panel.vue\";\nimport Select from \"../ui/Select.vue\";\nimport { api } from \"../../lib/api\";\nimport {\n  buildBulkCommand,\n  BULK_COMMAND_PREFIX,\n  DEFAULT_BULK_COMMAND_OPTIONS,\n  type BulkCommandOptions,\n} from \"../../lib/bulk-command\";\n\nconst STORAGE_KEY = \"statiegeldnl:bulk-command:v1\";\nconst environments = [\n  { value: \"prod\", label: \"Productie (cms.webwerf.nl)\" },\n  { value: \"dev\", label: \"Ontwikkeling (lokaal)\" },\n];\nconst phases = [\n  { value: \"status\", label: \"Status tellen\", hint: \"Alleen tellen hoeveel er nog te doen zijn. Draait niets, kost niets.\" },\n  { value: \"analyze\", label: \"Analyses draaien\", hint: \"AI-analyses draaien (via de Batch API, ongeveer 50% goedkoper).\" },\n  { value: \"images\", label: \"Foto's ophalen\", hint: \"Satelliet-, kadaster- en streetviewfoto's ophalen.\" },\n  { value: \"poll\", label: \"Batches controleren\", hint: \"Lopende Gemini-batches controleren en resultaten wegschrijven.\" },\n];\nconst targets = [\n  { value: \"all\", label: \"Heel NL\" },\n  { value: \"region\", label: \"Regio / provincie\" },\n  { value: \"type\", label: \"Type (OSM-tag)\" },\n  { value: \"ids\", label: \"Losse locatie-ID's\" },\n];\nconst types = [\n  { value: \"car_wash\", label: \"Wasstraat (car_wash)\" },\n  { value: \"fuel\", label: \"Tankstation (fuel)\" },\n  { value: \"doityourself\", label: \"Doe-het-zelf (doityourself)\" },\n  { value: \"hardware\", label: \"IJzerwaren (hardware)\" },\n  { value: \"garden_centre\", label: \"Tuincentrum (garden_centre)\" },\n  { value: \"__custom__\", label: \"Anders (zelf invoeren)\" },\n];\nconst windows = [\n  { value: \"all\", label: \"Alles in één keer\" },\n  { value: \"parts\", label: \"In N gelijke delen (--parts)\" },\n  { value: \"limit\", label: \"Venster (--limit / --offset)\" },\n];\nconst paths = [\n  { value: \"file-batch\", label: \"Batch API (aanbevolen, ongeveer 50% goedkoper)\" },\n  { value: \"sync\", label: \"Direct (volle prijs, terminal open laten)\" },\n  { value: \"use-batch\", label: \"Inline batch (verouderd, maximaal ongeveer 10)\" },\n];\n\nfunction loadPersistedOptions(): BulkCommandOptions {\n  try {\n    const raw = localStorage.getItem(STORAGE_KEY);\n    if (raw) return { ...DEFAULT_BULK_COMMAND_OPTIONS, ...JSON.parse(raw) as Partial<BulkCommandOptions> };\n  } catch {\n    // Storage can be unavailable in private browsing.\n  }\n  return { ...DEFAULT_BULK_COMMAND_OPTIONS };\n}\n\nconst opts = reactive(loadPersistedOptions());\nconst provinces = shallowRef<string[]>([]);\nconst regionsLoading = shallowRef(false);\nconst regionsError = shallowRef(false);\nconst copied = shallowRef(false);\nconst copyError = shallowRef(\"\");\nlet copyTimeout: ReturnType<typeof setTimeout> | undefined;\nlet disposed = false;\n\nconst result = computed(() => buildBulkCommand(opts));\nconst phaseHint = computed(() => phases.find((phase) => phase.value === opts.phase)?.hint);\nconst windowMode = computed(() => opts.parts.trim() ? \"parts\" : opts.limit.trim() || opts.offset.trim() ? \"limit\" : \"all\");\nconst selectedType = computed(() => types.some((type) => type.value === opts.type) ? opts.type : \"__custom__\");\nconst regionOptions = computed(() => [\n  { value: \"\", label: \"Kies een provincie of voer zelf een regio in\" },\n  ...provinces.value.filter((province) => province.toLowerCase().includes(opts.region.toLowerCase()))\n    .map((province) => ({ value: province, label: province })),\n]);\nconst selectedRegion = computed(() => provinces.value.includes(opts.region) ? opts.region : \"\");\n\nwatch(opts, () => {\n  copied.value = false;\n  copyError.value = \"\";\n  try {\n    localStorage.setItem(STORAGE_KEY, JSON.stringify(opts));\n  } catch {\n    // Keep the form usable when storage is unavailable.\n  }\n});\n\nfunction setWindow(value: string) {\n  if (value === \"all\") Object.assign(opts, { parts: \"\", limit: \"\", offset: \"\" });\n  else if (value === \"parts\") Object.assign(opts, { parts: opts.parts || \"1/2\", limit: \"\", offset: \"\" });\n  else Object.assign(opts, { parts: \"\", limit: opts.limit || \"1000\" });\n}\n\nasync function loadRegions() {\n  regionsLoading.value = true;\n  regionsError.value = false;\n  try {\n    const response = await api.getProvinces();\n    if (!disposed) provinces.value = response.provinces;\n  } catch {\n    if (!disposed) regionsError.value = true;\n  } finally {\n    if (!disposed) regionsLoading.value = false;\n  }\n}\n\nasync function copy() {\n  copyError.value = \"\";\n  const command = result.value.command;\n  try {\n    await navigator.clipboard.writeText(command);\n    if (disposed || command !== result.value.command) return;\n    copied.value = true;\n    clearTimeout(copyTimeout);\n    copyTimeout = setTimeout(() => { copied.value = false; }, 1800);\n  } catch {\n    if (!disposed) copyError.value = \"Kopiëren lukt niet. Selecteer het commando en kopieer het handmatig.\";\n  }\n}\n\nonMounted(loadRegions);\nonBeforeUnmount(() => {\n  disposed = true;\n  clearTimeout(copyTimeout);\n});\n</script>\n\n<template>\n  <div class=\"command-builder\">\n    <div class=\"command-builder__column\">\n      <Panel title=\"Omgeving en fase\">\n        <div class=\"command-builder__fields\">\n          <Select v-model=\"opts.env\" label=\"Omgeving\" :options=\"environments\" />\n          <Select v-model=\"opts.phase\" label=\"Fase\" :options=\"phases\" />\n          <p class=\"command-builder__hint\">{{ phaseHint }}</p>\n        </div>\n      </Panel>\n\n      <Panel v-if=\"opts.phase !== 'poll'\" title=\"Doelgroep\">\n        <div class=\"command-builder__fields\">\n          <Select v-model=\"opts.target\" label=\"Doelgroep\" :options=\"targets\" />\n          <template v-if=\"opts.target === 'region'\">\n            <Input v-model=\"opts.region\" label=\"Regio (provincietitel of -ID)\" placeholder=\"Bijvoorbeeld Drenthe\" />\n            <Select\n              :model-value=\"selectedRegion\"\n              label=\"Bekende provincies\"\n              :options=\"regionOptions\"\n              :disabled=\"regionsLoading\"\n              @update:model-value=\"opts.region = $event\"\n            />\n            <p v-if=\"regionsLoading\" class=\"command-builder__hint\" role=\"status\">Provincies laden...</p>\n            <div v-else-if=\"regionsError\" class=\"command-builder__fields\">\n              <p class=\"command-builder__hint\" role=\"status\">Provincies laden lukt niet. Je kunt de regio zelf invoeren.</p>\n              <Button @click=\"loadRegions\">Opnieuw proberen</Button>\n            </div>\n          </template>\n          <template v-if=\"opts.target === 'type'\">\n            <Select\n              :model-value=\"selectedType\"\n              label=\"Type\"\n              :options=\"types\"\n              @update:model-value=\"opts.type = $event === '__custom__' ? '' : $event\"\n            />\n            <Input v-if=\"selectedType === '__custom__'\" v-model=\"opts.type\" label=\"Eigen type (OSM-tag)\" placeholder=\"Bijvoorbeeld car_wash\" />\n          </template>\n          <Input v-if=\"opts.target === 'ids'\" v-model=\"opts.ids\" label=\"Locatie-ID's (komma-gescheiden)\" placeholder=\"Bijvoorbeeld 12,34,56\" />\n        </div>\n      </Panel>\n\n      <Panel v-if=\"opts.phase === 'analyze'\" title=\"Hoeveel tegelijk\">\n        <div class=\"command-builder__fields\">\n          <Select :model-value=\"windowMode\" label=\"Verdeling\" :options=\"windows\" @update:model-value=\"setWindow\" />\n          <template v-if=\"windowMode === 'parts'\">\n            <Input v-model=\"opts.parts\" label=\"Delen (N/M)\" placeholder=\"Bijvoorbeeld 1/2 (draai daarna 2/2)\" />\n            <p class=\"command-builder__hint\">Splitst een te grote regio in M delen; draai per deel (1/2, dan 2/2).</p>\n          </template>\n          <div v-if=\"windowMode === 'limit'\" class=\"command-builder__pair\">\n            <Input v-model=\"opts.limit\" label=\"Limiet\" placeholder=\"1000\" />\n            <Input v-model=\"opts.offset\" label=\"Overslaan (offset)\" placeholder=\"0\" />\n          </div>\n        </div>\n      </Panel>\n\n      <Panel v-if=\"opts.phase === 'images'\" title=\"Venster (optioneel)\">\n        <div class=\"command-builder__fields\">\n          <div class=\"command-builder__pair\">\n            <Input v-model=\"opts.limit\" label=\"Limiet\" placeholder=\"Leeg = alles\" />\n            <Input v-model=\"opts.offset\" label=\"Overslaan (offset)\" placeholder=\"0\" />\n          </div>\n          <label class=\"command-builder__toggle\">\n            <Checkbox v-model=\"opts.force\" />\n            <span>Foto's opnieuw ophalen (--force)</span>\n          </label>\n        </div>\n      </Panel>\n\n      <Panel v-if=\"opts.phase === 'analyze'\" title=\"Analyse-opties\">\n        <div class=\"command-builder__fields\">\n          <Select v-model=\"opts.path\" label=\"Verwerking\" :options=\"paths\" />\n          <div class=\"command-builder__pair\">\n            <Input v-model=\"opts.temperature\" label=\"Temperatuur\" placeholder=\"0\" />\n            <Input v-model=\"opts.seed\" label=\"Seed\" placeholder=\"42\" />\n          </div>\n          <Input v-if=\"opts.path === 'sync'\" v-model=\"opts.concurrency\" label=\"Gelijktijdige analyses (alleen direct)\" placeholder=\"3\" />\n          <label class=\"command-builder__toggle\">\n            <Checkbox v-model=\"opts.force\" />\n            <span>Opnieuw draaien (--force)<small class=\"command-builder__hint\">Ook locaties met een voltooide analyse.</small></span>\n          </label>\n          <label class=\"command-builder__toggle\">\n            <Checkbox v-model=\"opts.dryRun\" />\n            <span>Proefrun (--dry-run)<small class=\"command-builder__hint\">Mock-AI, geen kosten. Draait altijd direct.</small></span>\n          </label>\n          <label class=\"command-builder__toggle\">\n            <Checkbox v-model=\"opts.estimate\" />\n            <span>Alleen kosteninschatting (--estimate)</span>\n          </label>\n        </div>\n      </Panel>\n\n      <Panel v-if=\"opts.phase === 'poll'\" title=\"Batches controleren\">\n        <div class=\"command-builder__fields\">\n          <label class=\"command-builder__toggle\">\n            <Checkbox v-model=\"opts.once\" />\n            <span>Eén ronde (--once)<small class=\"command-builder__hint\">Anders blijft hij controleren tot alles klaar is.</small></span>\n          </label>\n          <Input v-model=\"opts.interval\" label=\"Interval (seconden)\" placeholder=\"60\" />\n        </div>\n      </Panel>\n\n      <Panel title=\"Algemeen\">\n        <div class=\"command-builder__fields\">\n          <label v-if=\"opts.phase === 'analyze' || opts.phase === 'images'\" class=\"command-builder__toggle\">\n            <Checkbox v-model=\"opts.yes\" />\n            <span>Bevestiging overslaan (--yes)<small class=\"command-builder__hint\">Nodig bij Heel NL als je niet gevraagd wilt worden.</small></span>\n          </label>\n          <label class=\"command-builder__toggle\">\n            <Checkbox v-model=\"opts.verbose\" />\n            <span>Uitgebreide uitvoer (-v)<small class=\"command-builder__hint\">Voortgang per locatie loggen.</small></span>\n          </label>\n        </div>\n      </Panel>\n    </div>\n\n    <div class=\"command-builder__column command-builder__result\">\n      <Panel title=\"Het commando\">\n        <template #actions>\n          <Button aria-label=\"Kopieer commando\" @click=\"copy\">{{ copied ? \"Gekopieerd\" : \"Kopiëren\" }}</Button>\n        </template>\n        <div class=\"command-builder__fields\">\n          <pre class=\"command-builder__code\" tabindex=\"0\" aria-label=\"Gegenereerd commando\"><code>{{ result.command }}</code></pre>\n          <p v-if=\"copied\" class=\"command-builder__hint\" role=\"status\">Commando gekopieerd.</p>\n          <p v-if=\"copyError\" class=\"command-builder__copy-error\" role=\"alert\">{{ copyError }}</p>\n          <div v-if=\"result.errors.length\" class=\"command-builder__message command-builder__message--error\" aria-live=\"polite\">\n            <strong>Dit commando is nog niet geldig</strong>\n            <ul class=\"command-builder__messages\">\n              <li v-for=\"error in result.errors\" :key=\"error\">{{ error }}</li>\n            </ul>\n          </div>\n          <div v-if=\"result.warnings.length\" class=\"command-builder__message command-builder__message--warning\" aria-live=\"polite\">\n            <strong>Let op</strong>\n            <ul class=\"command-builder__messages\">\n              <li v-for=\"warning in result.warnings\" :key=\"warning\">{{ warning }}</li>\n            </ul>\n          </div>\n        </div>\n      </Panel>\n      <Panel title=\"Liever een menu?\">\n        <div class=\"command-builder__fields\">\n          <p class=\"command-builder__hint\">Draai het script zonder parameters voor het interactieve menu, dat vooraf telt en per stap vraagt:</p>\n          <pre class=\"command-builder__code\"><code>{{ BULK_COMMAND_PREFIX }}pnpm bulk:analyze:prod</code></pre>\n          <p class=\"command-builder__hint\">Voer je het lokaal uit (ontwikkeldatabase), gebruik dan <code>pnpm bulk:analyze</code> zonder <code>:prod</code>.</p>\n        </div>\n      </Panel>\n    </div>\n  </div>\n</template>\n\n<style scoped>\n.command-builder {\n  display: grid;\n  gap: 20px;\n  min-width: 0;\n}\n.command-builder__column,\n.command-builder__fields {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  min-width: 0;\n}\n.command-builder__pair {\n  display: grid;\n  grid-template-columns: repeat(2, minmax(0, 1fr));\n  gap: 12px;\n}\n.command-builder__toggle {\n  display: flex;\n  align-items: flex-start;\n  gap: 8px;\n  cursor: pointer;\n}\n.command-builder__hint {\n  display: block;\n  margin: 0;\n  color: var(--fg-3);\n  font-size: var(--text-caption);\n  line-height: 1.5;\n}\n.command-builder__code {\n  margin: 0;\n  padding: 12px;\n  border-radius: var(--radius);\n  background: var(--bg-inset);\n  color: var(--fg-1);\n  font-family: var(--font-code);\n  font-size: var(--text-caption);\n  line-height: 1.7;\n  white-space: pre-wrap;\n  overflow-wrap: anywhere;\n}\n.command-builder__message {\n  padding: 12px;\n  border: 1px solid;\n  border-radius: var(--radius);\n  font-size: var(--text-ui);\n}\n.command-builder__message--error {\n  color: var(--danger-fg);\n  background: var(--danger-bg);\n  border-color: var(--danger-border);\n}\n.command-builder__message--warning {\n  color: var(--diverge-fg);\n  background: var(--diverge-bg);\n  border-color: var(--diverge-border);\n}\n.command-builder__messages {\n  margin: 8px 0 0;\n  padding-left: 20px;\n}\n.command-builder__copy-error {\n  margin: 0;\n  color: var(--danger-fg);\n}\n@media (min-width: 1080px) {\n  .command-builder {\n    grid-template-columns: repeat(2, minmax(0, 1fr));\n    align-items: start;\n  }\n  .command-builder__result {\n    position: sticky;\n    top: 16px;\n  }\n}\n</style>\n","/**\n * Splitting a bulk run into parts. A huge region (e.g. Noord-Brabant, ~1.4GB of\n * JSONL) can overrun the Files API upload during submit-prep when sent as one\n * chunk. `--parts N/M` lets the operator submit the region in M contiguous\n * slices across separate invocations (1/2 then 2/2, or 1/4 … 4/4).\n *\n * The slice is deterministic over the *raw* resolved id list, so the same\n * `N/M` always refers to the same locations regardless of how many have since\n * completed — the completed/in-flight skip-filter then applies within the part.\n */\n\nexport interface PartsSpec {\n  /** 1-indexed part to take. */\n  part: number;\n  /** Total number of parts the list is split into. */\n  total: number;\n}\n\n/**\n * Parse an \"N/M\" parts spec (e.g. \"1/2\", \"3/4\"). Returns null if malformed or\n * out of range — a valid spec requires 1 ≤ N ≤ M and M ≥ 1.\n */\nexport function parsePartsSpec(raw: string): PartsSpec | null {\n  const m = /^(\\d+)\\/(\\d+)$/.exec(raw.trim());\n  if (!m) return null;\n  const part = parseInt(m[1], 10);\n  const total = parseInt(m[2], 10);\n  if (total < 1 || part < 1 || part > total) return null;\n  return { part, total };\n}\n\n/**\n * How many parts to split a run into so each part holds at most `batchSize`\n * locations. Used by the interactive wizard to propose a sensible `--parts M`\n * default once it knows how many locations the run will actually process — a\n * single Files API upload of many thousands of locations can overrun the\n * submit-prep deadline, so we cap the per-part size. Returns at least 1.\n */\nexport function partsForBatchSize(toProcess: number, batchSize: number): number {\n  if (toProcess <= 0) return 1;\n  return Math.ceil(toProcess / batchSize);\n}\n\n/**\n * Contiguous, as-even-as-possible slice: split `items` into `total` parts and\n * return part `part` (1-indexed). The remainder is handed to the earlier parts,\n * so concatenating parts 1…total reproduces the original list exactly.\n */\nexport function slicePart<T>(items: T[], { part, total }: PartsSpec): T[] {\n  const base = Math.floor(items.length / total);\n  const remainder = items.length % total;\n  const start = (part - 1) * base + Math.min(part - 1, remainder);\n  const len = base + (part <= remainder ? 1 : 0);\n  return items.slice(start, start + len);\n}\n","import { parsePartsSpec } from \"./bulk-parts\";\n\n/**\n * Pure builder behind the \"CLI-commando\" tab on /bulk. Turns a set of toggles\n * into the exact `pnpm bulk:analyze[:prod]` invocation, and mirrors the CLI's\n * own argument validation (scripts/bulk-analyze.ts#parseArgs) so the page can\n * tell you up-front whether the call is valid.\n *\n * Emission is minimal: flags that equal the CLI default (file-batch path,\n * temperature 0, seed 42, ...) are omitted, so the\n * generated line matches the examples in the CLI help.\n */\nexport type BulkPhase = \"status\" | \"analyze\" | \"images\" | \"poll\";\nexport type BulkTarget = \"region\" | \"ids\" | \"type\" | \"all\";\nexport type BulkPath = \"file-batch\" | \"sync\" | \"use-batch\";\n\nexport interface BulkCommandOptions {\n  env: \"prod\" | \"dev\";\n  phase: BulkPhase;\n  // Target (status / analyze / images): exactly one.\n  target: BulkTarget;\n  region: string;\n  ids: string;\n  type: string;\n  // Window (analyze / images; --parts is analyze-only).\n  parts: string;\n  limit: string;\n  offset: string;\n  // Analyze options.\n  path: BulkPath;\n  temperature: string;\n  seed: string;\n  force: boolean;\n  dryRun: boolean;\n  estimate: boolean;\n  // Poll options.\n  once: boolean;\n  interval: string;\n  // General.\n  yes: boolean;\n  concurrency: string;\n  verbose: boolean;\n}\n\nexport interface BulkCommandResult {\n  command: string;\n  errors: string[];\n  warnings: string[];\n}\n\nexport const BULK_COMMAND_PREFIX = \"cd ~/mods/statiegeldnl/frontend/ && \";\n\nexport const DEFAULT_BULK_COMMAND_OPTIONS: BulkCommandOptions = {\n  env: \"prod\",\n  phase: \"status\",\n  target: \"all\",\n  region: \"\",\n  ids: \"\",\n  type: \"\",\n  parts: \"\",\n  limit: \"\",\n  offset: \"\",\n  path: \"file-batch\",\n  temperature: \"0\",\n  seed: \"42\",\n  force: false,\n  dryRun: false,\n  estimate: false,\n  once: false,\n  interval: \"60\",\n  yes: false,\n  concurrency: \"3\",\n  verbose: false,\n};\n\n/** Phases that operate on a target group. */\nconst TARGETED_PHASES: ReadonlySet<BulkPhase> = new Set<BulkPhase>([\"status\", \"analyze\", \"images\"]);\n\nfunction quoteValue(value: string): string {\n  return /\\s/.test(value) ? `\"${value}\"` : value;\n}\n\nfunction isIntString(value: string): boolean {\n  return /^-?\\d+$/.test(value.trim());\n}\n\nfunction isNumberString(value: string): boolean {\n  return value.trim() !== \"\" && !Number.isNaN(Number(value.trim()));\n}\n\nfunction parseIdsCsv(raw: string): number[] {\n  return raw\n    .split(\",\")\n    .map((s) => parseInt(s.trim(), 10))\n    .filter((n) => !Number.isNaN(n));\n}\n\nexport function buildBulkCommand(opts: BulkCommandOptions): BulkCommandResult {\n  const errors: string[] = [];\n  const warnings: string[] = [];\n  const flags: string[] = [];\n\n  const targeted = TARGETED_PHASES.has(opts.phase);\n\n  // --- Target (status / analyze / images) ---\n  if (targeted) {\n    switch (opts.target) {\n      case \"region\":\n        if (opts.region.trim() === \"\") errors.push(\"Vul een regio in (of kies een andere doelgroep).\");\n        else flags.push(`--region=${quoteValue(opts.region.trim())}`);\n        break;\n      case \"ids\": {\n        const ids = parseIdsCsv(opts.ids);\n        if (ids.length === 0) errors.push(\"Vul geldige locatie-IDs in (komma-gescheiden getallen).\");\n        else flags.push(`--ids=${ids.join(\",\")}`);\n        break;\n      }\n      case \"type\":\n        if (opts.type.trim() === \"\") errors.push(\"Vul een type in (bijv. car_wash, fuel).\");\n        else flags.push(`--type=${quoteValue(opts.type.trim())}`);\n        break;\n      case \"all\":\n        flags.push(\"--all\");\n        break;\n    }\n  }\n\n  // --- Window (analyze / images) ---\n  const usesWindow = opts.phase === \"analyze\" || opts.phase === \"images\";\n  const hasParts = opts.parts.trim() !== \"\";\n  const hasLimit = opts.limit.trim() !== \"\";\n  const hasOffset = opts.offset.trim() !== \"\";\n\n  if (hasParts && opts.phase !== \"analyze\") {\n    errors.push(\"--parts geldt alleen voor de analyze-fase.\");\n  }\n  if (hasParts && hasOffset) {\n    errors.push(\"--parts en --offset sluiten elkaar uit (kies één venster-mechanisme).\");\n  }\n  if (hasParts && opts.phase === \"analyze\") {\n    if (!parsePartsSpec(opts.parts.trim())) {\n      errors.push(`Ongeldige --parts: \"${opts.parts.trim()}\" (verwacht N/M, bijv. 1/2 of 2/4).`);\n    } else {\n      flags.push(`--parts=${opts.parts.trim()}`);\n    }\n  }\n  if (usesWindow && hasOffset && !hasParts) {\n    if (!isIntString(opts.offset)) errors.push(\"--offset moet een getal zijn.\");\n    else flags.push(`--offset=${opts.offset.trim()}`);\n  }\n  if (usesWindow && hasLimit) {\n    if (!isIntString(opts.limit)) errors.push(\"--limit moet een getal zijn.\");\n    else flags.push(`--limit=${opts.limit.trim()}`);\n  }\n\n  // --all is only expensive when it actually runs; status just counts.\n  if ((opts.phase === \"analyze\" || opts.phase === \"images\") && opts.target === \"all\" && !hasParts && !hasLimit) {\n    errors.push(\"--all vereist --parts of --limit (heel NL is te groot voor één keer).\");\n  }\n\n  // --- Analyze-only options ---\n  if (opts.phase === \"analyze\") {\n    if (opts.path === \"sync\") flags.push(\"--sync\");\n    else if (opts.path === \"use-batch\") flags.push(\"--use-batch\");\n    // \"file-batch\" is the default and emits nothing.\n\n    if (opts.temperature.trim() !== \"\" && opts.temperature.trim() !== \"0\") {\n      if (!isNumberString(opts.temperature)) errors.push(\"--temperature moet een getal zijn.\");\n      else flags.push(`--temperature=${opts.temperature.trim()}`);\n    }\n    if (opts.seed.trim() !== \"\" && opts.seed.trim() !== \"42\") {\n      if (!isIntString(opts.seed)) errors.push(\"--seed moet een getal zijn.\");\n      else flags.push(`--seed=${opts.seed.trim()}`);\n    }\n\n    if (opts.force) flags.push(\"--force\");\n    if (opts.dryRun) flags.push(\"--dry-run\");\n    if (opts.estimate) flags.push(\"--estimate\");\n\n    const concChanged = opts.concurrency.trim() !== \"\" && opts.concurrency.trim() !== \"3\";\n    if (concChanged && opts.path === \"sync\") {\n      if (!isIntString(opts.concurrency)) errors.push(\"--concurrency moet een getal zijn.\");\n      else flags.push(`--concurrency=${opts.concurrency.trim()}`);\n    } else if (concChanged) {\n      warnings.push(\"--concurrency geldt alleen voor het --sync-pad; wordt genegeerd.\");\n    }\n\n    // Warnings.\n    if (opts.target === \"all\" && !opts.yes) {\n      warnings.push(\"Zonder --yes vraagt de CLI eerst om bevestiging (y/N).\");\n    }\n    if (opts.dryRun && opts.path !== \"sync\") {\n      warnings.push(\"--dry-run draait altijd sync (mock-AI), ongeacht het gekozen pad.\");\n    }\n    if (opts.estimate) {\n      warnings.push(\"--estimate toont alleen een kosteninschatting; er wordt niets gedraaid.\");\n    }\n  }\n\n  // --- images-only options ---\n  if (opts.phase === \"images\") {\n    if (opts.force) flags.push(\"--force\");\n    if (opts.target === \"all\" && !opts.yes) {\n      warnings.push(\"Zonder --yes vraagt de CLI eerst om bevestiging (y/N).\");\n    }\n  }\n\n  // --- Poll-only options ---\n  if (opts.phase === \"poll\") {\n    if (opts.once) flags.push(\"--once\");\n    if (opts.interval.trim() !== \"\" && opts.interval.trim() !== \"60\") {\n      if (!isIntString(opts.interval)) errors.push(\"--interval moet een getal zijn.\");\n      else flags.push(`--interval=${opts.interval.trim()}`);\n    }\n  }\n\n  // --- General (all phases where meaningful) ---\n  if ((opts.phase === \"analyze\" || opts.phase === \"images\") && opts.yes) flags.push(\"--yes\");\n  if (opts.verbose) flags.push(\"-v\");\n\n  const script = opts.env === \"prod\" ? \"pnpm bulk:analyze:prod\" : \"pnpm bulk:analyze\";\n  const command = `${BULK_COMMAND_PREFIX}${[script, opts.phase, ...flags].join(\" \")}`;\n\n  return { command, errors, warnings };\n}\n","import { createVNode as _createVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, Fragment as _Fragment, createBlock as _createBlock, renderList as _renderList } from \"vue\"\n\nconst _hoisted_1 = { class: \"command-builder\" }\nconst _hoisted_2 = { class: \"command-builder__column\" }\nconst _hoisted_3 = { class: \"command-builder__fields\" }\nconst _hoisted_4 = { class: \"command-builder__hint\" }\nconst _hoisted_5 = { class: \"command-builder__fields\" }\nconst _hoisted_6 = {\n  key: 0,\n  class: \"command-builder__hint\",\n  role: \"status\"\n}\nconst _hoisted_7 = {\n  key: 1,\n  class: \"command-builder__fields\"\n}\nconst _hoisted_8 = { class: \"command-builder__fields\" }\nconst _hoisted_9 = {\n  key: 1,\n  class: \"command-builder__pair\"\n}\nconst _hoisted_10 = { class: \"command-builder__fields\" }\nconst _hoisted_11 = { class: \"command-builder__pair\" }\nconst _hoisted_12 = { class: \"command-builder__toggle\" }\nconst _hoisted_13 = { class: \"command-builder__fields\" }\nconst _hoisted_14 = { class: \"command-builder__pair\" }\nconst _hoisted_15 = { class: \"command-builder__toggle\" }\nconst _hoisted_16 = { class: \"command-builder__toggle\" }\nconst _hoisted_17 = { class: \"command-builder__toggle\" }\nconst _hoisted_18 = { class: \"command-builder__fields\" }\nconst _hoisted_19 = { class: \"command-builder__toggle\" }\nconst _hoisted_20 = { class: \"command-builder__fields\" }\nconst _hoisted_21 = {\n  key: 0,\n  class: \"command-builder__toggle\"\n}\nconst _hoisted_22 = { class: \"command-builder__toggle\" }\nconst _hoisted_23 = { class: \"command-builder__column command-builder__result\" }\nconst _hoisted_24 = { class: \"command-builder__fields\" }\nconst _hoisted_25 = {\n  class: \"command-builder__code\",\n  tabindex: \"0\",\n  \"aria-label\": \"Gegenereerd commando\"\n}\nconst _hoisted_26 = {\n  key: 0,\n  class: \"command-builder__hint\",\n  role: \"status\"\n}\nconst _hoisted_27 = {\n  key: 1,\n  class: \"command-builder__copy-error\",\n  role: \"alert\"\n}\nconst _hoisted_28 = {\n  key: 2,\n  class: \"command-builder__message command-builder__message--error\",\n  \"aria-live\": \"polite\"\n}\nconst _hoisted_29 = { class: \"command-builder__messages\" }\nconst _hoisted_30 = {\n  key: 3,\n  class: \"command-builder__message command-builder__message--warning\",\n  \"aria-live\": \"polite\"\n}\nconst _hoisted_31 = { class: \"command-builder__messages\" }\nconst _hoisted_32 = { class: \"command-builder__fields\" }\nconst _hoisted_33 = { class: \"command-builder__code\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n    _createElementVNode(\"div\", _hoisted_2, [\n      _createVNode($setup[\"Panel\"], { title: \"Omgeving en fase\" }, {\n        default: _withCtx(() => [\n          _createElementVNode(\"div\", _hoisted_3, [\n            _createVNode($setup[\"Select\"], {\n              modelValue: $setup.opts.env,\n              \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => (($setup.opts.env) = $event)),\n              label: \"Omgeving\",\n              options: $setup.environments\n            }, null, 8 /* PROPS */, [\"modelValue\"]),\n            _createVNode($setup[\"Select\"], {\n              modelValue: $setup.opts.phase,\n              \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => (($setup.opts.phase) = $event)),\n              label: \"Fase\",\n              options: $setup.phases\n            }, null, 8 /* PROPS */, [\"modelValue\"]),\n            _createElementVNode(\"p\", _hoisted_4, _toDisplayString($setup.phaseHint), 1 /* TEXT */)\n          ])\n        ]),\n        _: 1 /* STABLE */\n      }),\n      ($setup.opts.phase !== 'poll')\n        ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n            key: 0,\n            title: \"Doelgroep\"\n          }, {\n            default: _withCtx(() => [\n              _createElementVNode(\"div\", _hoisted_5, [\n                _createVNode($setup[\"Select\"], {\n                  modelValue: $setup.opts.target,\n                  \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => (($setup.opts.target) = $event)),\n                  label: \"Doelgroep\",\n                  options: $setup.targets\n                }, null, 8 /* PROPS */, [\"modelValue\"]),\n                ($setup.opts.target === 'region')\n                  ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                      _createVNode($setup[\"Input\"], {\n                        modelValue: $setup.opts.region,\n                        \"onUpdate:modelValue\": _cache[3] || (_cache[3] = $event => (($setup.opts.region) = $event)),\n                        label: \"Regio (provincietitel of -ID)\",\n                        placeholder: \"Bijvoorbeeld Drenthe\"\n                      }, null, 8 /* PROPS */, [\"modelValue\"]),\n                      _createVNode($setup[\"Select\"], {\n                        \"model-value\": $setup.selectedRegion,\n                        label: \"Bekende provincies\",\n                        options: $setup.regionOptions,\n                        disabled: $setup.regionsLoading,\n                        \"onUpdate:modelValue\": _cache[4] || (_cache[4] = $event => ($setup.opts.region = $event))\n                      }, null, 8 /* PROPS */, [\"model-value\", \"options\", \"disabled\"]),\n                      ($setup.regionsLoading)\n                        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_6, \"Provincies laden...\"))\n                        : ($setup.regionsError)\n                          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n                              _cache[26] || (_cache[26] = _createElementVNode(\"p\", {\n                                class: \"command-builder__hint\",\n                                role: \"status\"\n                              }, \"Provincies laden lukt niet. Je kunt de regio zelf invoeren.\", -1 /* CACHED */)),\n                              _createVNode($setup[\"Button\"], { onClick: $setup.loadRegions }, {\n                                default: _withCtx(() => _cache[25] || (_cache[25] = [\n                                  _createTextVNode(\"Opnieuw proberen\", -1 /* CACHED */)\n                                ])),\n                                _: 1 /* STABLE */,\n                                __: [25]\n                              })\n                            ]))\n                          : _createCommentVNode(\"v-if\", true)\n                    ], 64 /* STABLE_FRAGMENT */))\n                  : _createCommentVNode(\"v-if\", true),\n                ($setup.opts.target === 'type')\n                  ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n                      _createVNode($setup[\"Select\"], {\n                        \"model-value\": $setup.selectedType,\n                        label: \"Type\",\n                        options: $setup.types,\n                        \"onUpdate:modelValue\": _cache[5] || (_cache[5] = $event => ($setup.opts.type = $event === '__custom__' ? '' : $event))\n                      }, null, 8 /* PROPS */, [\"model-value\"]),\n                      ($setup.selectedType === '__custom__')\n                        ? (_openBlock(), _createBlock($setup[\"Input\"], {\n                            key: 0,\n                            modelValue: $setup.opts.type,\n                            \"onUpdate:modelValue\": _cache[6] || (_cache[6] = $event => (($setup.opts.type) = $event)),\n                            label: \"Eigen type (OSM-tag)\",\n                            placeholder: \"Bijvoorbeeld car_wash\"\n                          }, null, 8 /* PROPS */, [\"modelValue\"]))\n                        : _createCommentVNode(\"v-if\", true)\n                    ], 64 /* STABLE_FRAGMENT */))\n                  : _createCommentVNode(\"v-if\", true),\n                ($setup.opts.target === 'ids')\n                  ? (_openBlock(), _createBlock($setup[\"Input\"], {\n                      key: 2,\n                      modelValue: $setup.opts.ids,\n                      \"onUpdate:modelValue\": _cache[7] || (_cache[7] = $event => (($setup.opts.ids) = $event)),\n                      label: \"Locatie-ID's (komma-gescheiden)\",\n                      placeholder: \"Bijvoorbeeld 12,34,56\"\n                    }, null, 8 /* PROPS */, [\"modelValue\"]))\n                  : _createCommentVNode(\"v-if\", true)\n              ])\n            ]),\n            _: 1 /* STABLE */\n          }))\n        : _createCommentVNode(\"v-if\", true),\n      ($setup.opts.phase === 'analyze')\n        ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n            key: 1,\n            title: \"Hoeveel tegelijk\"\n          }, {\n            default: _withCtx(() => [\n              _createElementVNode(\"div\", _hoisted_8, [\n                _createVNode($setup[\"Select\"], {\n                  \"model-value\": $setup.windowMode,\n                  label: \"Verdeling\",\n                  options: $setup.windows,\n                  \"onUpdate:modelValue\": $setup.setWindow\n                }, null, 8 /* PROPS */, [\"model-value\"]),\n                ($setup.windowMode === 'parts')\n                  ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n                      _createVNode($setup[\"Input\"], {\n                        modelValue: $setup.opts.parts,\n                        \"onUpdate:modelValue\": _cache[8] || (_cache[8] = $event => (($setup.opts.parts) = $event)),\n                        label: \"Delen (N/M)\",\n                        placeholder: \"Bijvoorbeeld 1/2 (draai daarna 2/2)\"\n                      }, null, 8 /* PROPS */, [\"modelValue\"]),\n                      _cache[27] || (_cache[27] = _createElementVNode(\"p\", { class: \"command-builder__hint\" }, \"Splitst een te grote regio in M delen; draai per deel (1/2, dan 2/2).\", -1 /* CACHED */))\n                    ], 64 /* STABLE_FRAGMENT */))\n                  : _createCommentVNode(\"v-if\", true),\n                ($setup.windowMode === 'limit')\n                  ? (_openBlock(), _createElementBlock(\"div\", _hoisted_9, [\n                      _createVNode($setup[\"Input\"], {\n                        modelValue: $setup.opts.limit,\n                        \"onUpdate:modelValue\": _cache[9] || (_cache[9] = $event => (($setup.opts.limit) = $event)),\n                        label: \"Limiet\",\n                        placeholder: \"1000\"\n                      }, null, 8 /* PROPS */, [\"modelValue\"]),\n                      _createVNode($setup[\"Input\"], {\n                        modelValue: $setup.opts.offset,\n                        \"onUpdate:modelValue\": _cache[10] || (_cache[10] = $event => (($setup.opts.offset) = $event)),\n                        label: \"Overslaan (offset)\",\n                        placeholder: \"0\"\n                      }, null, 8 /* PROPS */, [\"modelValue\"])\n                    ]))\n                  : _createCommentVNode(\"v-if\", true)\n              ])\n            ]),\n            _: 1 /* STABLE */\n          }))\n        : _createCommentVNode(\"v-if\", true),\n      ($setup.opts.phase === 'images')\n        ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n            key: 2,\n            title: \"Venster (optioneel)\"\n          }, {\n            default: _withCtx(() => [\n              _createElementVNode(\"div\", _hoisted_10, [\n                _createElementVNode(\"div\", _hoisted_11, [\n                  _createVNode($setup[\"Input\"], {\n                    modelValue: $setup.opts.limit,\n                    \"onUpdate:modelValue\": _cache[11] || (_cache[11] = $event => (($setup.opts.limit) = $event)),\n                    label: \"Limiet\",\n                    placeholder: \"Leeg = alles\"\n                  }, null, 8 /* PROPS */, [\"modelValue\"]),\n                  _createVNode($setup[\"Input\"], {\n                    modelValue: $setup.opts.offset,\n                    \"onUpdate:modelValue\": _cache[12] || (_cache[12] = $event => (($setup.opts.offset) = $event)),\n                    label: \"Overslaan (offset)\",\n                    placeholder: \"0\"\n                  }, null, 8 /* PROPS */, [\"modelValue\"])\n                ]),\n                _createElementVNode(\"label\", _hoisted_12, [\n                  _createVNode($setup[\"Checkbox\"], {\n                    modelValue: $setup.opts.force,\n                    \"onUpdate:modelValue\": _cache[13] || (_cache[13] = $event => (($setup.opts.force) = $event))\n                  }, null, 8 /* PROPS */, [\"modelValue\"]),\n                  _cache[28] || (_cache[28] = _createElementVNode(\"span\", null, \"Foto's opnieuw ophalen (--force)\", -1 /* CACHED */))\n                ])\n              ])\n            ]),\n            _: 1 /* STABLE */\n          }))\n        : _createCommentVNode(\"v-if\", true),\n      ($setup.opts.phase === 'analyze')\n        ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n            key: 3,\n            title: \"Analyse-opties\"\n          }, {\n            default: _withCtx(() => [\n              _createElementVNode(\"div\", _hoisted_13, [\n                _createVNode($setup[\"Select\"], {\n                  modelValue: $setup.opts.path,\n                  \"onUpdate:modelValue\": _cache[14] || (_cache[14] = $event => (($setup.opts.path) = $event)),\n                  label: \"Verwerking\",\n                  options: $setup.paths\n                }, null, 8 /* PROPS */, [\"modelValue\"]),\n                _createElementVNode(\"div\", _hoisted_14, [\n                  _createVNode($setup[\"Input\"], {\n                    modelValue: $setup.opts.temperature,\n                    \"onUpdate:modelValue\": _cache[15] || (_cache[15] = $event => (($setup.opts.temperature) = $event)),\n                    label: \"Temperatuur\",\n                    placeholder: \"0\"\n                  }, null, 8 /* PROPS */, [\"modelValue\"]),\n                  _createVNode($setup[\"Input\"], {\n                    modelValue: $setup.opts.seed,\n                    \"onUpdate:modelValue\": _cache[16] || (_cache[16] = $event => (($setup.opts.seed) = $event)),\n                    label: \"Seed\",\n                    placeholder: \"42\"\n                  }, null, 8 /* PROPS */, [\"modelValue\"])\n                ]),\n                ($setup.opts.path === 'sync')\n                  ? (_openBlock(), _createBlock($setup[\"Input\"], {\n                      key: 0,\n                      modelValue: $setup.opts.concurrency,\n                      \"onUpdate:modelValue\": _cache[17] || (_cache[17] = $event => (($setup.opts.concurrency) = $event)),\n                      label: \"Gelijktijdige analyses (alleen direct)\",\n                      placeholder: \"3\"\n                    }, null, 8 /* PROPS */, [\"modelValue\"]))\n                  : _createCommentVNode(\"v-if\", true),\n                _createElementVNode(\"label\", _hoisted_15, [\n                  _createVNode($setup[\"Checkbox\"], {\n                    modelValue: $setup.opts.force,\n                    \"onUpdate:modelValue\": _cache[18] || (_cache[18] = $event => (($setup.opts.force) = $event))\n                  }, null, 8 /* PROPS */, [\"modelValue\"]),\n                  _cache[29] || (_cache[29] = _createElementVNode(\"span\", null, [\n                    _createTextVNode(\"Opnieuw draaien (--force)\"),\n                    _createElementVNode(\"small\", { class: \"command-builder__hint\" }, \"Ook locaties met een voltooide analyse.\")\n                  ], -1 /* CACHED */))\n                ]),\n                _createElementVNode(\"label\", _hoisted_16, [\n                  _createVNode($setup[\"Checkbox\"], {\n                    modelValue: $setup.opts.dryRun,\n                    \"onUpdate:modelValue\": _cache[19] || (_cache[19] = $event => (($setup.opts.dryRun) = $event))\n                  }, null, 8 /* PROPS */, [\"modelValue\"]),\n                  _cache[30] || (_cache[30] = _createElementVNode(\"span\", null, [\n                    _createTextVNode(\"Proefrun (--dry-run)\"),\n                    _createElementVNode(\"small\", { class: \"command-builder__hint\" }, \"Mock-AI, geen kosten. Draait altijd direct.\")\n                  ], -1 /* CACHED */))\n                ]),\n                _createElementVNode(\"label\", _hoisted_17, [\n                  _createVNode($setup[\"Checkbox\"], {\n                    modelValue: $setup.opts.estimate,\n                    \"onUpdate:modelValue\": _cache[20] || (_cache[20] = $event => (($setup.opts.estimate) = $event))\n                  }, null, 8 /* PROPS */, [\"modelValue\"]),\n                  _cache[31] || (_cache[31] = _createElementVNode(\"span\", null, \"Alleen kosteninschatting (--estimate)\", -1 /* CACHED */))\n                ])\n              ])\n            ]),\n            _: 1 /* STABLE */\n          }))\n        : _createCommentVNode(\"v-if\", true),\n      ($setup.opts.phase === 'poll')\n        ? (_openBlock(), _createBlock($setup[\"Panel\"], {\n            key: 4,\n            title: \"Batches controleren\"\n          }, {\n            default: _withCtx(() => [\n              _createElementVNode(\"div\", _hoisted_18, [\n                _createElementVNode(\"label\", _hoisted_19, [\n                  _createVNode($setup[\"Checkbox\"], {\n                    modelValue: $setup.opts.once,\n                    \"onUpdate:modelValue\": _cache[21] || (_cache[21] = $event => (($setup.opts.once) = $event))\n                  }, null, 8 /* PROPS */, [\"modelValue\"]),\n                  _cache[32] || (_cache[32] = _createElementVNode(\"span\", null, [\n                    _createTextVNode(\"Eén ronde (--once)\"),\n                    _createElementVNode(\"small\", { class: \"command-builder__hint\" }, \"Anders blijft hij controleren tot alles klaar is.\")\n                  ], -1 /* CACHED */))\n                ]),\n                _createVNode($setup[\"Input\"], {\n                  modelValue: $setup.opts.interval,\n                  \"onUpdate:modelValue\": _cache[22] || (_cache[22] = $event => (($setup.opts.interval) = $event)),\n                  label: \"Interval (seconden)\",\n                  placeholder: \"60\"\n                }, null, 8 /* PROPS */, [\"modelValue\"])\n              ])\n            ]),\n            _: 1 /* STABLE */\n          }))\n        : _createCommentVNode(\"v-if\", true),\n      _createVNode($setup[\"Panel\"], { title: \"Algemeen\" }, {\n        default: _withCtx(() => [\n          _createElementVNode(\"div\", _hoisted_20, [\n            ($setup.opts.phase === 'analyze' || $setup.opts.phase === 'images')\n              ? (_openBlock(), _createElementBlock(\"label\", _hoisted_21, [\n                  _createVNode($setup[\"Checkbox\"], {\n                    modelValue: $setup.opts.yes,\n                    \"onUpdate:modelValue\": _cache[23] || (_cache[23] = $event => (($setup.opts.yes) = $event))\n                  }, null, 8 /* PROPS */, [\"modelValue\"]),\n                  _cache[33] || (_cache[33] = _createElementVNode(\"span\", null, [\n                    _createTextVNode(\"Bevestiging overslaan (--yes)\"),\n                    _createElementVNode(\"small\", { class: \"command-builder__hint\" }, \"Nodig bij Heel NL als je niet gevraagd wilt worden.\")\n                  ], -1 /* CACHED */))\n                ]))\n              : _createCommentVNode(\"v-if\", true),\n            _createElementVNode(\"label\", _hoisted_22, [\n              _createVNode($setup[\"Checkbox\"], {\n                modelValue: $setup.opts.verbose,\n                \"onUpdate:modelValue\": _cache[24] || (_cache[24] = $event => (($setup.opts.verbose) = $event))\n              }, null, 8 /* PROPS */, [\"modelValue\"]),\n              _cache[34] || (_cache[34] = _createElementVNode(\"span\", null, [\n                _createTextVNode(\"Uitgebreide uitvoer (-v)\"),\n                _createElementVNode(\"small\", { class: \"command-builder__hint\" }, \"Voortgang per locatie loggen.\")\n              ], -1 /* CACHED */))\n            ])\n          ])\n        ]),\n        _: 1 /* STABLE */\n      })\n    ]),\n    _createElementVNode(\"div\", _hoisted_23, [\n      _createVNode($setup[\"Panel\"], { title: \"Het commando\" }, {\n        actions: _withCtx(() => [\n          _createVNode($setup[\"Button\"], {\n            \"aria-label\": \"Kopieer commando\",\n            onClick: $setup.copy\n          }, {\n            default: _withCtx(() => [\n              _createTextVNode(_toDisplayString($setup.copied ? \"Gekopieerd\" : \"Kopiëren\"), 1 /* TEXT */)\n            ]),\n            _: 1 /* STABLE */\n          })\n        ]),\n        default: _withCtx(() => [\n          _createElementVNode(\"div\", _hoisted_24, [\n            _createElementVNode(\"pre\", _hoisted_25, [\n              _createElementVNode(\"code\", null, _toDisplayString($setup.result.command), 1 /* TEXT */)\n            ]),\n            ($setup.copied)\n              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_26, \"Commando gekopieerd.\"))\n              : _createCommentVNode(\"v-if\", true),\n            ($setup.copyError)\n              ? (_openBlock(), _createElementBlock(\"p\", _hoisted_27, _toDisplayString($setup.copyError), 1 /* TEXT */))\n              : _createCommentVNode(\"v-if\", true),\n            ($setup.result.errors.length)\n              ? (_openBlock(), _createElementBlock(\"div\", _hoisted_28, [\n                  _cache[35] || (_cache[35] = _createElementVNode(\"strong\", null, \"Dit commando is nog niet geldig\", -1 /* CACHED */)),\n                  _createElementVNode(\"ul\", _hoisted_29, [\n                    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.result.errors, (error) => {\n                      return (_openBlock(), _createElementBlock(\"li\", { key: error }, _toDisplayString(error), 1 /* TEXT */))\n                    }), 128 /* KEYED_FRAGMENT */))\n                  ])\n                ]))\n              : _createCommentVNode(\"v-if\", true),\n            ($setup.result.warnings.length)\n              ? (_openBlock(), _createElementBlock(\"div\", _hoisted_30, [\n                  _cache[36] || (_cache[36] = _createElementVNode(\"strong\", null, \"Let op\", -1 /* CACHED */)),\n                  _createElementVNode(\"ul\", _hoisted_31, [\n                    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.result.warnings, (warning) => {\n                      return (_openBlock(), _createElementBlock(\"li\", { key: warning }, _toDisplayString(warning), 1 /* TEXT */))\n                    }), 128 /* KEYED_FRAGMENT */))\n                  ])\n                ]))\n              : _createCommentVNode(\"v-if\", true)\n          ])\n        ]),\n        _: 1 /* STABLE */\n      }),\n      _createVNode($setup[\"Panel\"], { title: \"Liever een menu?\" }, {\n        default: _withCtx(() => [\n          _createElementVNode(\"div\", _hoisted_32, [\n            _cache[37] || (_cache[37] = _createElementVNode(\"p\", { class: \"command-builder__hint\" }, \"Draai het script zonder parameters voor het interactieve menu, dat vooraf telt en per stap vraagt:\", -1 /* CACHED */)),\n            _createElementVNode(\"pre\", _hoisted_33, [\n              _createElementVNode(\"code\", null, _toDisplayString($setup.BULK_COMMAND_PREFIX) + \"pnpm bulk:analyze:prod\", 1 /* TEXT */)\n            ]),\n            _cache[38] || (_cache[38] = _createElementVNode(\"p\", { class: \"command-builder__hint\" }, [\n              _createTextVNode(\"Voer je het lokaal uit (ontwikkeldatabase), gebruik dan \"),\n              _createElementVNode(\"code\", null, \"pnpm bulk:analyze\"),\n              _createTextVNode(\" zonder \"),\n              _createElementVNode(\"code\", null, \":prod\"),\n              _createTextVNode(\".\")\n            ], -1 /* CACHED */))\n          ])\n        ]),\n        _: 1 /* STABLE */\n      })\n    ])\n  ]))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/CommandBuilder.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/CommandBuilder.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/CommandBuilder.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/bulk/CommandBuilder.vue\";script.__scopeId = \"data-v-a6fd6efc\";export default script;","import { createVNode as _createVNode, withCtx as _withCtx, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, vShow as _vShow, withDirectives as _withDirectives, createBlock as _createBlock, Fragment as _Fragment } from \"vue\"\n\nconst _hoisted_1 = {\n  key: 0,\n  class: \"bulk-view__activity\",\n  role: \"status\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(_Fragment, null, [\n    _createVNode($setup[\"PageHeader\"], {\n      class: \"nudica\",\n      title: \"Bulk-analyse\",\n      description: \"Foto's downloaden en AI-analyses draaien voor meerdere locaties tegelijk.\"\n    }, {\n      tabs: _withCtx(() => [\n        _createVNode($setup[\"PageTabs\"], {\n          tabs: $setup.tabs,\n          active: $setup.active\n        }, null, 8 /* PROPS */, [\"tabs\", \"active\"])\n      ]),\n      _: 1 /* STABLE */\n    }),\n    _createVNode($setup[\"PageBody\"], { class: \"nudica\" }, {\n      default: _withCtx(() => [\n        ($setup.active !== 'runner' && $setup.run.active)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_1, [\n              _createTextVNode(\" Bulk-run \" + _toDisplayString($setup.run.paused ? \"gepauzeerd\" : \"actief\") + \": \" + _toDisplayString($setup.run.counts.done) + \"/\" + _toDisplayString($setup.run.counts.total) + \" verwerkt. \", 1 /* TEXT */),\n              _createVNode($setup[\"RouterLink\"], {\n                to: { path: '/bulk', query: { ...$setup.route.query, tab: undefined } }\n              }, {\n                default: _withCtx(() => _cache[0] || (_cache[0] = [\n                  _createTextVNode(\"Bekijk de voortgang\", -1 /* CACHED */)\n                ])),\n                _: 1 /* STABLE */,\n                __: [0]\n              }, 8 /* PROPS */, [\"to\"])\n            ]))\n          : _createCommentVNode(\"v-if\", true),\n        _withDirectives(_createVNode($setup[\"BulkRunner\"], null, null, 512 /* NEED_PATCH */), [\n          [_vShow, $setup.active === 'runner']\n        ]),\n        ($setup.active === 'batches')\n          ? (_openBlock(), _createBlock($setup[\"BatchMonitor\"], { key: 1 }))\n          : _createCommentVNode(\"v-if\", true),\n        ($setup.active === 'cli')\n          ? (_openBlock(), _createBlock($setup[\"CommandBuilder\"], { key: 2 }))\n          : _createCommentVNode(\"v-if\", true)\n      ]),\n      _: 1 /* STABLE */\n    })\n  ], 64 /* STABLE_FRAGMENT */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/BulkView.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/BulkView.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/BulkView.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/BulkView.vue\";script.__scopeId = \"data-v-174dd2d3\";export default script;","<script setup lang=\"ts\">\n/**\n * Instellingen shell: resolves which section the URL asks for and renders\n * it. Navigation between sections lives in Sidebar.vue; any decision that\n * doesn't need the DOM lives in lib/settings-sections.ts instead, since an\n * SFC body is neither typechecked nor unit tested.\n */\nimport { computed, onMounted, watch } from \"vue\";\nimport { useRoute, useRouter } from \"vue-router\";\nimport PageHeader from \"../components/shell/PageHeader.vue\";\nimport PageBody from \"../components/shell/PageBody.vue\";\nimport SettingsAccount from \"../components/settings/SettingsAccount.vue\";\nimport SettingsImport from \"../components/settings/SettingsImport.vue\";\nimport SettingsAnalyses from \"../components/settings/SettingsAnalyses.vue\";\nimport BatchMonitor from \"../components/bulk/BatchMonitor.vue\";\nimport { resolveSettingsSection, settingsSection, settingsSectionRoute } from \"../lib/settings-sections\";\nimport type { SettingsListTab } from \"../lib/settings-actions\";\n\nconst route = useRoute();\nconst router = useRouter();\n\nconst active = computed(() => resolveSettingsSection({ requested: route.params.section, legacyTab: route.query.tab }));\nconst current = computed(() => settingsSection(active.value));\n\n/**\n * Canonicalize the URL: an old `?tab=stuck` becomes `#/settings/stuck`, and\n * an unknown section falls back to the default.\n *\n * `replace`, not `push` (same rule the rail's section links follow), and not\n * from an `immediate` watcher: a replace issued during setup is swallowed by\n * the in-flight navigation.\n */\nfunction canonicalize() {\n  const wanted = settingsSectionRoute(active.value);\n  if (route.params.section !== wanted.params.section || route.query.tab !== undefined)\n    void router.replace({ ...wanted, query: {} });\n}\n\nonMounted(canonicalize);\nwatch(() => [route.params.section, route.query.tab], canonicalize);\n</script>\n\n<template>\n  <PageHeader class=\"nudica\" :title=\"current.title\" />\n  <PageBody class=\"nudica\">\n    <div class=\"settings\">\n      <SettingsAccount v-if=\"active === 'general'\" />\n      <SettingsImport v-else-if=\"active === 'import'\" />\n      <BatchMonitor v-else-if=\"active === 'batches'\" />\n      <SettingsAnalyses v-else :key=\"active\" :tab=\"(active as SettingsListTab)\" />\n    </div>\n  </PageBody>\n</template>\n\n<style scoped>\n/* 900px en links uitgelijnd, zoals het kitscherm: een instellingenformulier\n   leest slecht over de volle breedte. */\n.settings { display: flex; flex-direction: column; gap: 16px; max-width: 900px; min-width: 0; }\n</style>\n","<script setup lang=\"ts\">\nimport { onMounted, ref } from \"vue\";\nimport { api } from \"../../lib/api\";\nimport Panel from \"../ui/Panel.vue\";\nimport Button from \"../ui/Button.vue\";\n\nconst session = ref<Awaited<ReturnType<typeof api.getAccountInfo>> | null>(null);\nconst loading = ref(false);\nconst error = ref(\"\");\nasync function load() {\n  loading.value = true;\n  error.value = \"\";\n  try { session.value = await api.getAccountInfo(); }\n  catch { error.value = \"Je accountgegevens konden niet worden geladen.\"; }\n  finally { loading.value = false; }\n}\nonMounted(load);\n</script>\n\n<template>\n  <Panel title=\"Account\">\n    <p v-if=\"loading\" role=\"status\">Account laden...</p>\n    <template v-else-if=\"error\">\n      <p class=\"account__error\" role=\"alert\">{{ error }}</p>\n      <Button @click=\"load\">Opnieuw proberen</Button>\n    </template>\n    <template v-else-if=\"session\">\n      <dl class=\"account__details\">\n        <dt>Naam</dt><dd>{{ session.displayName || 'Niet ingevuld' }}</dd>\n        <dt>E-mailadres</dt><dd>{{ session.email || 'Niet ingevuld' }}</dd>\n      </dl>\n      <p class=\"account__description\">Je naam wordt overgenomen van je WebHare-account en getoond bij analyses die je start. Uitloggen kan via de link ‘Uitloggen’ in de zwarte balk.</p>\n    </template>\n  </Panel>\n</template>\n\n<style scoped>\n.account__details { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 24px; margin: 0 0 16px; }\n.account__details dt { color: var(--fg-3); }\n.account__details dd { margin: 0; overflow-wrap: anywhere; }\n.account__description { margin: 0; color: var(--fg-3); }\n.account__error { color: var(--danger-fg); }\n</style>\n","import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, Fragment as _Fragment, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = {\n  key: 0,\n  role: \"status\"\n}\nconst _hoisted_2 = {\n  class: \"account__error\",\n  role: \"alert\"\n}\nconst _hoisted_3 = { class: \"account__details\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createBlock($setup[\"Panel\"], { title: \"Account\" }, {\n    default: _withCtx(() => [\n      ($setup.loading)\n        ? (_openBlock(), _createElementBlock(\"p\", _hoisted_1, \"Account laden...\"))\n        : ($setup.error)\n          ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n              _createElementVNode(\"p\", _hoisted_2, _toDisplayString($setup.error), 1 /* TEXT */),\n              _createVNode($setup[\"Button\"], { onClick: $setup.load }, {\n                default: _withCtx(() => _cache[0] || (_cache[0] = [\n                  _createTextVNode(\"Opnieuw proberen\", -1 /* CACHED */)\n                ])),\n                _: 1 /* STABLE */,\n                __: [0]\n              })\n            ], 64 /* STABLE_FRAGMENT */))\n          : ($setup.session)\n            ? (_openBlock(), _createElementBlock(_Fragment, { key: 2 }, [\n                _createElementVNode(\"dl\", _hoisted_3, [\n                  _cache[1] || (_cache[1] = _createElementVNode(\"dt\", null, \"Naam\", -1 /* CACHED */)),\n                  _createElementVNode(\"dd\", null, _toDisplayString($setup.session.displayName || 'Niet ingevuld'), 1 /* TEXT */),\n                  _cache[2] || (_cache[2] = _createElementVNode(\"dt\", null, \"E-mailadres\", -1 /* CACHED */)),\n                  _createElementVNode(\"dd\", null, _toDisplayString($setup.session.email || 'Niet ingevuld'), 1 /* TEXT */)\n                ]),\n                _cache[3] || (_cache[3] = _createElementVNode(\"p\", { class: \"account__description\" }, \"Je naam wordt overgenomen van je WebHare-account en getoond bij analyses die je start. Uitloggen kan via de link ‘Uitloggen’ in de zwarte balk.\", -1 /* CACHED */))\n              ], 64 /* STABLE_FRAGMENT */))\n            : _createCommentVNode(\"v-if\", true)\n    ]),\n    _: 1 /* STABLE */\n  }))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsAccount.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsAccount.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsAccount.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsAccount.vue\";script.__scopeId = \"data-v-ef80e4a4\";export default script;","<script setup lang=\"ts\">\nimport { onMounted, ref, watch } from \"vue\";\nimport { api } from \"../../lib/api\";\nimport { DEFAULT_IMPORT_QUERY, IMPORT_QUERY_STORAGE_KEY } from \"../../lib/settings-actions\";\nimport Panel from \"../ui/Panel.vue\";\nimport Button from \"../ui/Button.vue\";\nimport Checkbox from \"../ui/Checkbox.vue\";\nimport Badge from \"../ui/Badge.vue\";\nimport Textarea from \"../ui/Textarea.vue\";\n\nconst query = ref(DEFAULT_IMPORT_QUERY);\nconst dryRun = ref(false);\nconst verbose = ref(false);\nconst running = ref(false);\nconst error = ref(\"\");\nconst queryError = ref(\"\");\nconst form = ref<HTMLFormElement | null>(null);\nconst result = ref<Awaited<ReturnType<typeof api.runOverpassImport>> | null>(null);\nonMounted(() => {\n  try { query.value = localStorage.getItem(IMPORT_QUERY_STORAGE_KEY) ?? DEFAULT_IMPORT_QUERY; }\n  catch { /* Storage may be unavailable in a private browser session. */ }\n});\nwatch(query, value => {\n  try { localStorage.setItem(IMPORT_QUERY_STORAGE_KEY, value); }\n  catch { /* Import remains usable without persistence. */ }\n});\nasync function runImport() {\n  if (running.value) return;\n  queryError.value = query.value.trim() ? \"\" : \"Vul een Overpass-query in.\";\n  if (queryError.value) { form.value?.querySelector(\"textarea\")?.focus(); return; }\n  running.value = true;\n  error.value = \"\";\n  result.value = null;\n  try { result.value = await api.runOverpassImport({ query: query.value, dryRun: dryRun.value, verbose: verbose.value }); }\n  catch (err) { error.value = err instanceof Error ? err.message : \"Import mislukt. Probeer het opnieuw.\"; }\n  finally { running.value = false; }\n}\n</script>\n\n<template>\n  <Panel title=\"Import OSM-locaties via Overpass\">\n    <form ref=\"form\" class=\"import\" @submit.prevent=\"runImport\">\n      <p class=\"import__description\">Vul een Overpass-query in. De provincie wordt automatisch bepaald op basis van de coördinaten. Bestaande locaties worden bijgewerkt. Je kunt alleen de zoekopdracht invullen of een complete query die begint met [out:...].</p>\n      <div :class=\"{ 'import__invalid': queryError }\">\n        <Textarea v-model=\"query\" label=\"Overpass-query\" :rows=\"8\" :disabled=\"running\" />\n        <p v-if=\"queryError\" class=\"import__error\" role=\"alert\">{{ queryError }}</p>\n      </div>\n      <div class=\"import__actions\">\n        <label class=\"import__option\"><Checkbox v-model=\"dryRun\" :disabled=\"running\" /> Proefimport (niets opslaan)</label>\n        <label class=\"import__option\"><Checkbox v-model=\"verbose\" :disabled=\"running\" /> Uitgebreid logboek</label>\n        <Button type=\"submit\" variant=\"primary\" :busy=\"running\">{{ running ? 'Importeren...' : 'Importeer' }}</Button>\n      </div>\n      <p v-if=\"running\" class=\"import__description\" role=\"status\">Locaties ophalen en verwerken. Dit kan even duren bij grote queries; laat de pagina open staan.</p>\n      <p v-if=\"error\" class=\"import__error\" role=\"alert\">{{ error }}</p>\n      <div v-if=\"result\" class=\"import__result\" role=\"status\">\n        <div class=\"import__actions\">\n          <Badge>{{ result.created }} nieuw</Badge>\n          <Badge>{{ result.updated }} bijgewerkt</Badge>\n          <Badge>{{ result.skippedNoCoords }} zonder coördinaten</Badge>\n          <Badge v-if=\"result.noProvince\" tone=\"diverge\">{{ result.noProvince }} zonder provincie</Badge>\n        </div>\n        <ul v-if=\"result.regions.length\">\n          <li v-for=\"region in result.regions\" :key=\"region.key\">{{ region.title }} #{{ region.regionId }}: {{ region.count }} locaties</li>\n        </ul>\n        <pre class=\"import__log\">{{ result.log }}</pre>\n      </div>\n    </form>\n  </Panel>\n</template>\n\n<style scoped>\n.import, .import__result { display: flex; flex-direction: column; gap: 16px; }\n.import__description { margin: 0; color: var(--fg-3); }\n.import__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }\n.import__option { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }\n.import__error { margin: 4px 0 0; color: var(--danger-fg); }\n.import__invalid :deep(textarea) { border-bottom-color: var(--danger); }\n.import__log { max-height: 320px; overflow: auto; padding: 12px; margin: 0; background: var(--bg-inset); border: 1px solid var(--border-1); white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--text-caption); }\n</style>\n","import { createElementVNode as _createElementVNode, createVNode as _createVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, createTextVNode as _createTextVNode, withCtx as _withCtx, createBlock as _createBlock, renderList as _renderList, Fragment as _Fragment, withModifiers as _withModifiers } from \"vue\"\n\nconst _hoisted_1 = {\n  key: 0,\n  class: \"import__error\",\n  role: \"alert\"\n}\nconst _hoisted_2 = { class: \"import__actions\" }\nconst _hoisted_3 = { class: \"import__option\" }\nconst _hoisted_4 = { class: \"import__option\" }\nconst _hoisted_5 = {\n  key: 0,\n  class: \"import__description\",\n  role: \"status\"\n}\nconst _hoisted_6 = {\n  key: 1,\n  class: \"import__error\",\n  role: \"alert\"\n}\nconst _hoisted_7 = {\n  key: 2,\n  class: \"import__result\",\n  role: \"status\"\n}\nconst _hoisted_8 = { class: \"import__actions\" }\nconst _hoisted_9 = { key: 0 }\nconst _hoisted_10 = { class: \"import__log\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createBlock($setup[\"Panel\"], { title: \"Import OSM-locaties via Overpass\" }, {\n    default: _withCtx(() => [\n      _createElementVNode(\"form\", {\n        ref: \"form\",\n        class: \"import\",\n        onSubmit: _withModifiers($setup.runImport, [\"prevent\"])\n      }, [\n        _cache[5] || (_cache[5] = _createElementVNode(\"p\", { class: \"import__description\" }, \"Vul een Overpass-query in. De provincie wordt automatisch bepaald op basis van de coördinaten. Bestaande locaties worden bijgewerkt. Je kunt alleen de zoekopdracht invullen of een complete query die begint met [out:...].\", -1 /* CACHED */)),\n        _createElementVNode(\"div\", {\n          class: _normalizeClass({ 'import__invalid': $setup.queryError })\n        }, [\n          _createVNode($setup[\"Textarea\"], {\n            modelValue: $setup.query,\n            \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => (($setup.query) = $event)),\n            label: \"Overpass-query\",\n            rows: 8,\n            disabled: $setup.running\n          }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\"]),\n          ($setup.queryError)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_1, _toDisplayString($setup.queryError), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true)\n        ], 2 /* CLASS */),\n        _createElementVNode(\"div\", _hoisted_2, [\n          _createElementVNode(\"label\", _hoisted_3, [\n            _createVNode($setup[\"Checkbox\"], {\n              modelValue: $setup.dryRun,\n              \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => (($setup.dryRun) = $event)),\n              disabled: $setup.running\n            }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\"]),\n            _cache[3] || (_cache[3] = _createTextVNode(\" Proefimport (niets opslaan)\", -1 /* CACHED */))\n          ]),\n          _createElementVNode(\"label\", _hoisted_4, [\n            _createVNode($setup[\"Checkbox\"], {\n              modelValue: $setup.verbose,\n              \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => (($setup.verbose) = $event)),\n              disabled: $setup.running\n            }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\"]),\n            _cache[4] || (_cache[4] = _createTextVNode(\" Uitgebreid logboek\", -1 /* CACHED */))\n          ]),\n          _createVNode($setup[\"Button\"], {\n            type: \"submit\",\n            variant: \"primary\",\n            busy: $setup.running\n          }, {\n            default: _withCtx(() => [\n              _createTextVNode(_toDisplayString($setup.running ? 'Importeren...' : 'Importeer'), 1 /* TEXT */)\n            ]),\n            _: 1 /* STABLE */\n          }, 8 /* PROPS */, [\"busy\"])\n        ]),\n        ($setup.running)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_5, \"Locaties ophalen en verwerken. Dit kan even duren bij grote queries; laat de pagina open staan.\"))\n          : _createCommentVNode(\"v-if\", true),\n        ($setup.error)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_6, _toDisplayString($setup.error), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true),\n        ($setup.result)\n          ? (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n              _createElementVNode(\"div\", _hoisted_8, [\n                _createVNode($setup[\"Badge\"], null, {\n                  default: _withCtx(() => [\n                    _createTextVNode(_toDisplayString($setup.result.created) + \" nieuw\", 1 /* TEXT */)\n                  ]),\n                  _: 1 /* STABLE */\n                }),\n                _createVNode($setup[\"Badge\"], null, {\n                  default: _withCtx(() => [\n                    _createTextVNode(_toDisplayString($setup.result.updated) + \" bijgewerkt\", 1 /* TEXT */)\n                  ]),\n                  _: 1 /* STABLE */\n                }),\n                _createVNode($setup[\"Badge\"], null, {\n                  default: _withCtx(() => [\n                    _createTextVNode(_toDisplayString($setup.result.skippedNoCoords) + \" zonder coördinaten\", 1 /* TEXT */)\n                  ]),\n                  _: 1 /* STABLE */\n                }),\n                ($setup.result.noProvince)\n                  ? (_openBlock(), _createBlock($setup[\"Badge\"], {\n                      key: 0,\n                      tone: \"diverge\"\n                    }, {\n                      default: _withCtx(() => [\n                        _createTextVNode(_toDisplayString($setup.result.noProvince) + \" zonder provincie\", 1 /* TEXT */)\n                      ]),\n                      _: 1 /* STABLE */\n                    }))\n                  : _createCommentVNode(\"v-if\", true)\n              ]),\n              ($setup.result.regions.length)\n                ? (_openBlock(), _createElementBlock(\"ul\", _hoisted_9, [\n                    (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.result.regions, (region) => {\n                      return (_openBlock(), _createElementBlock(\"li\", {\n                        key: region.key\n                      }, _toDisplayString(region.title) + \" #\" + _toDisplayString(region.regionId) + \": \" + _toDisplayString(region.count) + \" locaties\", 1 /* TEXT */))\n                    }), 128 /* KEYED_FRAGMENT */))\n                  ]))\n                : _createCommentVNode(\"v-if\", true),\n              _createElementVNode(\"pre\", _hoisted_10, _toDisplayString($setup.result.log), 1 /* TEXT */)\n            ]))\n          : _createCommentVNode(\"v-if\", true)\n      ], 544 /* NEED_HYDRATION, NEED_PATCH */)\n    ]),\n    _: 1 /* STABLE */\n  }))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsImport.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsImport.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsImport.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsImport.vue\";script.__scopeId = \"data-v-c40eabe3\";export default script;","<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { RouterLink } from \"vue-router\";\nimport { useSettingsAnalyses } from \"../../lib/settings-analyses\";\nimport { settingsDate, type SettingsListTab } from \"../../lib/settings-actions\";\nimport Panel from \"../ui/Panel.vue\";\nimport Button from \"../ui/Button.vue\";\nimport Input from \"../ui/Input.vue\";\nimport Badge from \"../ui/Badge.vue\";\nimport Checkbox from \"../ui/Checkbox.vue\";\nimport EmptyState from \"../ui/EmptyState.vue\";\nimport Dialog from \"../ui/Dialog.vue\";\n\nconst props = defineProps<{ tab: SettingsListTab }>();\nconst { analyses, visible, search, selected, loading, busy, error, message, confirmOpen, load, toggle, toggleAll, apply } = useSettingsAnalyses(props.tab);\nconst copy = computed(() => ({\n  failed: { title: \"Mislukte analyses\", empty: \"Geen mislukte analyses.\", action: \"Verwijder\", description: \"Analyses die met een fout zijn geëindigd. Verwijderde analyses gaan naar de prullenbak en kunnen daar hersteld worden.\" },\n  stuck: { title: \"Vastgelopen analyses\", empty: \"Geen vastgelopen analyses.\", action: \"Opruimen\", description: \"Analyses die op ‘Bezig’ bleven staan zonder naar een Gemini-batch te zijn ingestuurd, bijvoorbeeld door een afgebroken bulk-run. Alleen runs ouder dan 6 uur worden getoond. Opruimen zet ze in de prullenbak, waar je ze kunt herstellen.\" },\n  trash: { title: \"Verwijderde analyses\", empty: \"De prullenbak is leeg.\", action: \"Herstel\", description: \"Selecteer analyses om ze te herstellen.\" },\n})[props.tab]);\n</script>\n\n<template>\n  <Panel :title=\"copy.title\">\n    <div class=\"settings-list\">\n      <p class=\"settings-list__description\">{{ copy.description }}</p>\n      <div class=\"settings-list__toolbar\">\n        <Button :busy=\"loading\" :disabled=\"busy || confirmOpen\" @click=\"load\">Vernieuwen</Button>\n        <Button v-if=\"selected.length\" :variant=\"tab === 'trash' ? 'primary' : 'danger'\" :busy=\"busy\" @click=\"tab === 'trash' ? apply() : confirmOpen = true\">{{ copy.action }} ({{ selected.length }})</Button>\n      </div>\n      <p v-if=\"error\" class=\"settings-list__error\" role=\"alert\">{{ error }}</p>\n      <p v-if=\"message\" class=\"settings-list__success\" role=\"status\">{{ message }}</p>\n      <p v-if=\"loading\" role=\"status\">Analyses laden...</p>\n      <template v-else-if=\"analyses.length\">\n        <Input v-if=\"analyses.length > 10 || search\" v-model=\"search\" label=\"Zoeken in analyses\" placeholder=\"Bedrijf, inzender, fout of analyse-ID\" :disabled=\"busy || confirmOpen\" />\n        <label class=\"settings-list__select-all\">\n          <Checkbox :model-value=\"visible.length > 0 && selected.length === visible.length\" :indeterminate=\"selected.length > 0 && selected.length < visible.length\" :disabled=\"busy || confirmOpen || !visible.length\" @update:model-value=\"toggleAll\" />\n          Alles selecteren ({{ visible.length }})\n        </label>\n        <div v-for=\"analysis in visible\" :key=\"analysis.id\" class=\"settings-list__row\">\n          <Checkbox :model-value=\"selected.includes(analysis.id)\" :aria-label=\"`Selecteer analyse #${analysis.id} van ${analysis.companyName}`\" :disabled=\"busy || confirmOpen\" @update:model-value=\"toggle(analysis.id)\" />\n          <div class=\"settings-list__details\">\n            <div class=\"settings-list__meta\">\n              <RouterLink class=\"settings-list__link\" :to=\"{ name: 'analysis-detail', params: { id: analysis.locationId, analysisId: analysis.id } }\">{{ analysis.companyName || `Locatie #${analysis.locationId}` }}</RouterLink>\n              <span class=\"settings-list__description\">{{ settingsDate(analysis.createdAt) }}</span>\n              <Badge v-if=\"analysis.userName\">{{ analysis.userName }}</Badge>\n              <Badge v-if=\"analysis.isDryRun\">Proefanalyse</Badge>\n            </div>\n            <p v-if=\"analysis.errorMessage\" class=\"settings-list__error settings-list__failure\">{{ analysis.errorMessage }}</p>\n            <p v-if=\"tab === 'trash'\" class=\"settings-list__deleted\">Verwijderd {{ settingsDate(analysis.deletedAt ?? null) }}</p>\n          </div>\n        </div>\n        <EmptyState v-if=\"!visible.length\" title=\"Geen analyses gevonden.\" description=\"Pas je zoekopdracht aan.\" />\n      </template>\n      <EmptyState v-else-if=\"!error\" :title=\"copy.empty\" />\n    </div>\n  </Panel>\n  <Dialog :open=\"confirmOpen\" title=\"Analyses naar de prullenbak verplaatsen?\" :description=\"`Je verplaatst ${selected.length} analyses naar de prullenbak. Je kunt ze daar herstellen.`\" @update:open=\"value => { if (!busy) confirmOpen = value; }\">\n    <p v-if=\"error\" class=\"settings-list__error\" role=\"alert\">{{ error }}</p>\n    <template #footer>\n      <Button :disabled=\"busy\" @click=\"confirmOpen = false\">Annuleren</Button>\n      <Button variant=\"danger\" :busy=\"busy\" @click=\"apply\">{{ busy ? 'Verplaatsen...' : 'Naar prullenbak' }}</Button>\n    </template>\n  </Dialog>\n</template>\n\n<style scoped>\n.settings-list { display: flex; flex-direction: column; gap: 12px; }\n.settings-list__description { margin: 0; color: var(--fg-3); }\n.settings-list__toolbar, .settings-list__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }\n.settings-list__select-all { display: flex; gap: 10px; align-items: center; cursor: pointer; }\n.settings-list__row { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--border-1); border-radius: var(--radius); padding: 12px; }\n.settings-list__details { min-width: 0; flex: 1; }\n.settings-list__link { font-weight: 500; cursor: pointer; overflow-wrap: anywhere; }\n.settings-list__error { color: var(--danger-fg); margin: 0; }\n.settings-list__failure { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--text-caption); }\n.settings-list__success { color: var(--score-fg); margin: 0; }\n.settings-list__deleted { color: var(--fg-3); font-size: var(--text-caption); margin: 6px 0 0; }\n@media (hover: hover) { .settings-list__link:hover { text-decoration: underline; } }\n</style>\n","import { computed, onMounted, onUnmounted, ref, watch } from \"vue\";\nimport { api } from \"./api\";\nimport { runSettingsAction, toggleSettingsSelection, type SettingsListTab } from \"./settings-actions\";\n\ninterface SettingsAnalysis {\n  id: number;\n  locationId: number;\n  status: string;\n  companyName: string;\n  createdAt: string;\n  isDryRun: boolean;\n  userName: string | null;\n  deletedAt?: string | null;\n  errorMessage?: string | null;\n}\n\nexport function useSettingsAnalyses(tab: SettingsListTab) {\n  const analyses = ref<SettingsAnalysis[]>([]);\n  const selected = ref<number[]>([]);\n  const search = ref(\"\");\n  const loading = ref(false);\n  const busy = ref(false);\n  const error = ref(\"\");\n  const message = ref(\"\");\n  const confirmOpen = ref(false);\n  let disposed = false;\n  const visible = computed(() => {\n    const needle = search.value.trim().toLocaleLowerCase(\"nl-NL\");\n    return analyses.value.filter(row => [row.companyName, row.userName, row.errorMessage, String(row.id)]\n      .some(value => value?.toLocaleLowerCase(\"nl-NL\").includes(needle)));\n  });\n  watch(visible, rows => { selected.value = selected.value.filter(id => rows.some(row => row.id === id)); });\n\n  async function load() {\n    if (loading.value || busy.value) return;\n    loading.value = true;\n    error.value = \"\";\n    try {\n      const result = tab === \"trash\" ? await api.findDeletedAnalyses()\n        : tab === \"stuck\" ? await api.findStuckAnalyses({ minAgeHours: 6 })\n        : await api.findFailedAnalyses();\n      if (!disposed) analyses.value = result.analyses;\n    } catch (err) {\n      if (!disposed) error.value = err instanceof Error ? err.message : \"Analyses laden mislukt.\";\n    } finally { if (!disposed) loading.value = false; }\n  }\n\n  function toggleAll() {\n    selected.value = toggleSettingsSelection({ selected: selected.value, visibleIds: visible.value.map(row => row.id) });\n  }\n\n  function toggle(id: number) {\n    selected.value = selected.value.includes(id) ? selected.value.filter(value => value !== id) : [...selected.value, id];\n  }\n\n  async function apply() {\n    if (busy.value || !selected.value.length) return;\n    busy.value = true;\n    error.value = \"\";\n    message.value = \"\";\n    try {\n      const affected = await runSettingsAction({ api, tab, ids: selected.value });\n      if (disposed) return;\n      analyses.value = analyses.value.filter(row => !affected.includes(row.id));\n      selected.value = [];\n      confirmOpen.value = false;\n      message.value = tab === \"trash\" ? `${affected.length} analyses hersteld.` : `${affected.length} analyses naar de prullenbak verplaatst.`;\n    } catch (err) {\n      if (!disposed) error.value = err instanceof Error ? err.message : \"De actie is niet uitgevoerd. Probeer het opnieuw.\";\n    } finally { if (!disposed) busy.value = false; }\n  }\n\n  onMounted(load);\n  onUnmounted(() => { disposed = true; });\n  return { analyses, visible, search, selected, loading, busy, error, message, confirmOpen, load, toggle, toggleAll, apply };\n}\n","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementBlock as _createElementBlock, renderList as _renderList, Fragment as _Fragment } from \"vue\"\n\nconst _hoisted_1 = { class: \"settings-list\" }\nconst _hoisted_2 = { class: \"settings-list__description\" }\nconst _hoisted_3 = { class: \"settings-list__toolbar\" }\nconst _hoisted_4 = {\n  key: 0,\n  class: \"settings-list__error\",\n  role: \"alert\"\n}\nconst _hoisted_5 = {\n  key: 1,\n  class: \"settings-list__success\",\n  role: \"status\"\n}\nconst _hoisted_6 = {\n  key: 2,\n  role: \"status\"\n}\nconst _hoisted_7 = { class: \"settings-list__select-all\" }\nconst _hoisted_8 = { class: \"settings-list__details\" }\nconst _hoisted_9 = { class: \"settings-list__meta\" }\nconst _hoisted_10 = { class: \"settings-list__description\" }\nconst _hoisted_11 = {\n  key: 0,\n  class: \"settings-list__error settings-list__failure\"\n}\nconst _hoisted_12 = {\n  key: 1,\n  class: \"settings-list__deleted\"\n}\nconst _hoisted_13 = {\n  key: 0,\n  class: \"settings-list__error\",\n  role: \"alert\"\n}\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(_Fragment, null, [\n    _createVNode($setup[\"Panel\"], {\n      title: $setup.copy.title\n    }, {\n      default: _withCtx(() => [\n        _createElementVNode(\"div\", _hoisted_1, [\n          _createElementVNode(\"p\", _hoisted_2, _toDisplayString($setup.copy.description), 1 /* TEXT */),\n          _createElementVNode(\"div\", _hoisted_3, [\n            _createVNode($setup[\"Button\"], {\n              busy: $setup.loading,\n              disabled: $setup.busy || $setup.confirmOpen,\n              onClick: $setup.load\n            }, {\n              default: _withCtx(() => _cache[4] || (_cache[4] = [\n                _createTextVNode(\"Vernieuwen\", -1 /* CACHED */)\n              ])),\n              _: 1 /* STABLE */,\n              __: [4]\n            }, 8 /* PROPS */, [\"busy\", \"disabled\", \"onClick\"]),\n            ($setup.selected.length)\n              ? (_openBlock(), _createBlock($setup[\"Button\"], {\n                  key: 0,\n                  variant: $props.tab === 'trash' ? 'primary' : 'danger',\n                  busy: $setup.busy,\n                  onClick: _cache[0] || (_cache[0] = $event => ($props.tab === 'trash' ? $setup.apply() : $setup.confirmOpen = true))\n                }, {\n                  default: _withCtx(() => [\n                    _createTextVNode(_toDisplayString($setup.copy.action) + \" (\" + _toDisplayString($setup.selected.length) + \")\", 1 /* TEXT */)\n                  ]),\n                  _: 1 /* STABLE */\n                }, 8 /* PROPS */, [\"variant\", \"busy\"]))\n              : _createCommentVNode(\"v-if\", true)\n          ]),\n          ($setup.error)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_4, _toDisplayString($setup.error), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.message)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_5, _toDisplayString($setup.message), 1 /* TEXT */))\n            : _createCommentVNode(\"v-if\", true),\n          ($setup.loading)\n            ? (_openBlock(), _createElementBlock(\"p\", _hoisted_6, \"Analyses laden...\"))\n            : ($setup.analyses.length)\n              ? (_openBlock(), _createElementBlock(_Fragment, { key: 3 }, [\n                  ($setup.analyses.length > 10 || $setup.search)\n                    ? (_openBlock(), _createBlock($setup[\"Input\"], {\n                        key: 0,\n                        modelValue: $setup.search,\n                        \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => (($setup.search) = $event)),\n                        label: \"Zoeken in analyses\",\n                        placeholder: \"Bedrijf, inzender, fout of analyse-ID\",\n                        disabled: $setup.busy || $setup.confirmOpen\n                      }, null, 8 /* PROPS */, [\"modelValue\", \"disabled\"]))\n                    : _createCommentVNode(\"v-if\", true),\n                  _createElementVNode(\"label\", _hoisted_7, [\n                    _createVNode($setup[\"Checkbox\"], {\n                      \"model-value\": $setup.visible.length > 0 && $setup.selected.length === $setup.visible.length,\n                      indeterminate: $setup.selected.length > 0 && $setup.selected.length < $setup.visible.length,\n                      disabled: $setup.busy || $setup.confirmOpen || !$setup.visible.length,\n                      \"onUpdate:modelValue\": $setup.toggleAll\n                    }, null, 8 /* PROPS */, [\"model-value\", \"indeterminate\", \"disabled\", \"onUpdate:modelValue\"]),\n                    _createTextVNode(\" Alles selecteren (\" + _toDisplayString($setup.visible.length) + \") \", 1 /* TEXT */)\n                  ]),\n                  (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.visible, (analysis) => {\n                    return (_openBlock(), _createElementBlock(\"div\", {\n                      key: analysis.id,\n                      class: \"settings-list__row\"\n                    }, [\n                      _createVNode($setup[\"Checkbox\"], {\n                        \"model-value\": $setup.selected.includes(analysis.id),\n                        \"aria-label\": `Selecteer analyse #${analysis.id} van ${analysis.companyName}`,\n                        disabled: $setup.busy || $setup.confirmOpen,\n                        \"onUpdate:modelValue\": $event => ($setup.toggle(analysis.id))\n                      }, null, 8 /* PROPS */, [\"model-value\", \"aria-label\", \"disabled\", \"onUpdate:modelValue\"]),\n                      _createElementVNode(\"div\", _hoisted_8, [\n                        _createElementVNode(\"div\", _hoisted_9, [\n                          _createVNode($setup[\"RouterLink\"], {\n                            class: \"settings-list__link\",\n                            to: { name: 'analysis-detail', params: { id: analysis.locationId, analysisId: analysis.id } }\n                          }, {\n                            default: _withCtx(() => [\n                              _createTextVNode(_toDisplayString(analysis.companyName || `Locatie #${analysis.locationId}`), 1 /* TEXT */)\n                            ]),\n                            _: 2 /* DYNAMIC */\n                          }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"to\"]),\n                          _createElementVNode(\"span\", _hoisted_10, _toDisplayString($setup.settingsDate(analysis.createdAt)), 1 /* TEXT */),\n                          (analysis.userName)\n                            ? (_openBlock(), _createBlock($setup[\"Badge\"], { key: 0 }, {\n                                default: _withCtx(() => [\n                                  _createTextVNode(_toDisplayString(analysis.userName), 1 /* TEXT */)\n                                ]),\n                                _: 2 /* DYNAMIC */\n                              }, 1024 /* DYNAMIC_SLOTS */))\n                            : _createCommentVNode(\"v-if\", true),\n                          (analysis.isDryRun)\n                            ? (_openBlock(), _createBlock($setup[\"Badge\"], { key: 1 }, {\n                                default: _withCtx(() => _cache[5] || (_cache[5] = [\n                                  _createTextVNode(\"Proefanalyse\", -1 /* CACHED */)\n                                ])),\n                                _: 1 /* STABLE */,\n                                __: [5]\n                              }))\n                            : _createCommentVNode(\"v-if\", true)\n                        ]),\n                        (analysis.errorMessage)\n                          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_11, _toDisplayString(analysis.errorMessage), 1 /* TEXT */))\n                          : _createCommentVNode(\"v-if\", true),\n                        ($props.tab === 'trash')\n                          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_12, \"Verwijderd \" + _toDisplayString($setup.settingsDate(analysis.deletedAt ?? null)), 1 /* TEXT */))\n                          : _createCommentVNode(\"v-if\", true)\n                      ])\n                    ]))\n                  }), 128 /* KEYED_FRAGMENT */)),\n                  (!$setup.visible.length)\n                    ? (_openBlock(), _createBlock($setup[\"EmptyState\"], {\n                        key: 1,\n                        title: \"Geen analyses gevonden.\",\n                        description: \"Pas je zoekopdracht aan.\"\n                      }))\n                    : _createCommentVNode(\"v-if\", true)\n                ], 64 /* STABLE_FRAGMENT */))\n              : (!$setup.error)\n                ? (_openBlock(), _createBlock($setup[\"EmptyState\"], {\n                    key: 4,\n                    title: $setup.copy.empty\n                  }, null, 8 /* PROPS */, [\"title\"]))\n                : _createCommentVNode(\"v-if\", true)\n        ])\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"title\"]),\n    _createVNode($setup[\"Dialog\"], {\n      open: $setup.confirmOpen,\n      title: \"Analyses naar de prullenbak verplaatsen?\",\n      description: `Je verplaatst ${$setup.selected.length} analyses naar de prullenbak. Je kunt ze daar herstellen.`,\n      \"onUpdate:open\": _cache[3] || (_cache[3] = value => { if (!$setup.busy) $setup.confirmOpen = value; })\n    }, {\n      footer: _withCtx(() => [\n        _createVNode($setup[\"Button\"], {\n          disabled: $setup.busy,\n          onClick: _cache[2] || (_cache[2] = $event => ($setup.confirmOpen = false))\n        }, {\n          default: _withCtx(() => _cache[6] || (_cache[6] = [\n            _createTextVNode(\"Annuleren\", -1 /* CACHED */)\n          ])),\n          _: 1 /* STABLE */,\n          __: [6]\n        }, 8 /* PROPS */, [\"disabled\"]),\n        _createVNode($setup[\"Button\"], {\n          variant: \"danger\",\n          busy: $setup.busy,\n          onClick: $setup.apply\n        }, {\n          default: _withCtx(() => [\n            _createTextVNode(_toDisplayString($setup.busy ? 'Verplaatsen...' : 'Naar prullenbak'), 1 /* TEXT */)\n          ]),\n          _: 1 /* STABLE */\n        }, 8 /* PROPS */, [\"busy\", \"onClick\"])\n      ]),\n      default: _withCtx(() => [\n        ($setup.error)\n          ? (_openBlock(), _createElementBlock(\"p\", _hoisted_13, _toDisplayString($setup.error), 1 /* TEXT */))\n          : _createCommentVNode(\"v-if\", true)\n      ]),\n      _: 1 /* STABLE */\n    }, 8 /* PROPS */, [\"open\", \"description\"])\n  ], 64 /* STABLE_FRAGMENT */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsAnalyses.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsAnalyses.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsAnalyses.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/components/settings/SettingsAnalyses.vue\";script.__scopeId = \"data-v-ad3eb428\";export default script;","import { createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, withCtx as _withCtx, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"settings\" }\n\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  return (_openBlock(), _createElementBlock(_Fragment, null, [\n    _createVNode($setup[\"PageHeader\"], {\n      class: \"nudica\",\n      title: $setup.current.title\n    }, null, 8 /* PROPS */, [\"title\"]),\n    _createVNode($setup[\"PageBody\"], { class: \"nudica\" }, {\n      default: _withCtx(() => [\n        _createElementVNode(\"div\", _hoisted_1, [\n          ($setup.active === 'general')\n            ? (_openBlock(), _createBlock($setup[\"SettingsAccount\"], { key: 0 }))\n            : ($setup.active === 'import')\n              ? (_openBlock(), _createBlock($setup[\"SettingsImport\"], { key: 1 }))\n              : ($setup.active === 'batches')\n                ? (_openBlock(), _createBlock($setup[\"BatchMonitor\"], { key: 2 }))\n                : (_openBlock(), _createBlock($setup[\"SettingsAnalyses\"], {\n                    key: $setup.active,\n                    tab: ($setup.active as SettingsListTab)\n                  }, null, 8 /* PROPS */, [\"tab\"]))\n        ])\n      ]),\n      _: 1 /* STABLE */\n    })\n  ], 64 /* STABLE_FRAGMENT */))\n}","import script from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/SettingsView.vue?type=script\";import \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/SettingsView.vue?type=style&index=0\";import { render } from \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/SettingsView.vue?type=template\"; script.render = render;script.__file = \"../opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/views/SettingsView.vue\";script.__scopeId = \"data-v-843e684d\";export default script;","import \"@webhare/frontend/src/init\";import \"/opt/wh/whtree/modules/publisher/js/internal/polyfills/all\";\nimport \"/opt/whdata/installedmodules/statiegeldnl.20261113T133244.213Z/webdesigns/admin/frontend/frontend\";const aps = globalThis.whAssetPacks ||= {}; aps[\"statiegeldnl:admin\"]=\"2026-11-13T13:32:53.054Z\";"],"mappings":"giDAAA,IAAAA,GAAAC,EAAAC,IAAA,cAOA,OAAO,eAAeA,GAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EAI5D,SAASC,GAAQC,EAAK,CACpB,IAAMC,EAAsB,OAAO,OAAO,IAAI,EAC9C,QAAWC,KAAOF,EAAI,MAAM,GAAG,EAAGC,EAAIC,CAAG,EAAI,EAC7C,OAAQC,GAAQA,KAAOF,CACzB,CAEA,IAAMG,IAAY,CAAC,EACbC,IAAY,CAAC,EACbC,IAAO,IAAM,CACnB,EACMC,IAAK,IAAM,GACXC,IAAQN,GAAQA,EAAI,WAAW,CAAC,IAAM,KAAOA,EAAI,WAAW,CAAC,IAAM,MACxEA,EAAI,WAAW,CAAC,EAAI,KAAOA,EAAI,WAAW,CAAC,EAAI,IAC1CO,IAAmBP,GAAQA,EAAI,WAAW,WAAW,EACrDQ,IAAS,OAAO,OAChBC,IAAS,CAACC,EAAKC,IAAO,CAC1B,IAAMC,EAAIF,EAAI,QAAQC,CAAE,EACpBC,EAAI,IACNF,EAAI,OAAOE,EAAG,CAAC,CAEnB,EACMC,IAAiB,OAAO,UAAU,eAClCC,I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IAASjxB,IAAM,EAAIixB,EAAO,YAAc,YAAc,GAAGjxB,CAAC,QAAQA,EAAI,EAAI,IAAM,EAAE,GAC5F,IAAK,CAACA,EAAGixB,IAASjxB,IAAM,EAAIixB,EAAO,YAAc,WAAa,GAAGjxB,CAAC,OAAOA,EAAI,EAAI,IAAM,EAAE,GACzF,KAAM,CAACA,EAAGixB,IAASjxB,IAAM,EAAIixB,EAAO,YAAc,YAAc,GAAGjxB,CAAC,QAAQA,EAAI,EAAI,IAAM,EAAE,GAC5F,KAAOA,GAAM,GAAGA,CAAC,QAAQA,EAAI,EAAI,IAAM,EAAE,GACzC,OAASA,GAAM,GAAGA,CAAC,UAAUA,EAAI,EAAI,IAAM,EAAE,GAC7C,OAASA,GAAM,GAAGA,CAAC,UAAUA,EAAI,EAAI,IAAM,EAAE,GAC7C,QAAS,EACV,EAiEMkyB,IAAQ,CACb,CACC,KAAM,OACN,GAAI,OACL,EACA,CACC,KAAM,QACN,GAAI,MACL,EACA,CACC,KAAM,OACN,GAAI,MACL,EACA,CACC,KAAM,MACN,GAAI,KACL,EACA,CACC,KAAM,OACN,GAAI,IACL,EACA,CACC,KAAM,SACN,GAAI,GACL,EACA,CACC,KAAM,SACN,GAAI,GACL,CACD,EAwJMvgD,IAAoC,OAAO,OAAO,CAAC,EAAG,CAAE,OAAQ2D,EAAS,EAAG,CACjF,WAAY,CACX,IACA,EACA,IACA,CACD,EACA,YAAa,CACZ,IACA,EACA,IACA,CACD,EACA,cAAe,CACd,IACA,EACA,IACA,CACD,EACA,WAAY,CACX,IACA,EACA,GACA,CACD,EACA,YAAa,CACZ,GACA,EACA,IACA,CACD,EACA,cAAe,CACd,IACA,EACA,IACA,CACD,EACA,YAAa,CACZ,IACA,EACA,IACA,CACD,EACA,aAAc,CACb,IACA,EACA,IACA,CACD,EACA,eAAgB,CACf,IACA,EACA,IACA,CACD,EACA,YAAa,CACZ,GACA,EACA,IACA,CACD,EACA,aAAc,CACb,IACA,EACA,GACA,CACD,EAC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AAI,IACJ,MAAO,kBACP,OAAQ,CACN,CACE,KAAM,IACN,KAAM,uNACR,EACA,CACE,KAAM,OACN,MAAO,CACL,CAAE,KAAM,SAAU,KAAM,mCAAoC,EAC5D,CAAE,KAAM,YAAa,KAAM,sDAAuD,EAClF,CAAE,KAAM,SAAU,KAAM,4DAA6D,CACvF,CACF,CACF,CACF,EACA,CACE,GAAI,SACJ,GAAI,IACJ,MAAO,uBACP,OAAQ,CACN,CACE,KAAM,IACN,KAAM,+OACR,CACF,CACF,EACA,CACE,GAAI,SACJ,GAAI,IACJ,MAAO,gBACP,OAAQ,CACN,CACE,KAAM,IACN,KAAM,6OACR,CACF,CACF,EACA,CACE,GAAI,SACJ,GAAI,IACJ,MAAO,6BACP,OAAQ,CACN,CACE,KAAM,IACN,KAAM,mXACR,EACA,CACE,KAAM,IACN,KAAM,0RACR,CACF,CACF,EACA,CACE,GAAI,QACJ,GAAI,IACJ,MAAO,QACP,OAAQ,CACN,CACE,KAAM,IACN,KAAM,0QACR,CACF,CACF,EACA,CACE,GAAI,cACJ,GAAI,KACJ,MAAO,yBACP,OAAQ,CACN,CACE,KAAM,IACN,KAAM,gNACR,CACF,CACF,EACA,CACE,GAAI,QACJ,GAAI,KACJ,MAAO,uDACP,OAAQ,CACN,CACE,KAAM,IACN,KAAM,iHACR,EACA,CACE,KAAM,OACN,MAAO,CACL,CACE,KAAM,wBACN,KAAM,4GACR,EACA,CACE,KAAM,uBACN,KAAM,+GACR,EACA,CACE,KAAM,sBACN,KAAM,6PACR,EACA,CACE,KAAM,yBACN,KAAM,6HACR,EACA,CACE,KAAM,sBACN,KAAM,wNACR,CACF,CACF,EACA,CACE,KAAM,IACN,KAAM,kEACR,EACA,CACE,KAAM,IACN,KAAM,yRACR,EACA,CACE,KAAM,IACN,KAAM,8PACR,EACA,CAAE,KAAM,OAAQ,KAAM,WAAY,MAAO,wDAAyD,CACpG,CACF,EACA,CACE,GAAI,gBACJ,GAAI,KACJ,MAAO,gBACP,OAAQ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W,UAAWC,GAAY,EAC5D,CAAE,KAAM,QAAS,KAAM,OAAQ,UAAWC,GAAS,EACnD,CAAE,KAAM,QAAS,KAAM,OAAQ,UAAWC,GAAS,EAInD,CAAE,KAAM,sBAAuB,KAAM,WAAY,UAAWC,GAAa,EAEzE,CAAE,KAAM,mBAAoB,SAAU,CAAE,KAAM,WAAY,CAAE,CAC9D,EAEaC,MAAS,iBAAa,CACjC,WAAS,yBAAqB,EAC9B,OAAAd,GACF,CAAC,EAIDc,GAAO,UAAU,CAACC,EAAIC,IAAS,CACzBD,EAAG,OAAS,YAAcC,EAAK,MAAQA,EAAK,OAAS,YAAcA,EAAK,OAAS,SACnFC,IAAuBD,EAAK,QAAQ,CACxC,CAAC,EzElDDE,GAAU,EAEVC,GAAW,SAAY,CACrB,IAAMC,KAAM,eAAUC,GAAG,EACzBD,EAAI,IAAIE,EAAM,EAGd,MAAMA,GAAO,QAAQ,EACrBF,EAAI,MAAM,MAAM,EAUhBG,GAAa,CACX,QAAS,SAAY,CACnB,MAAMD,GAAO,QAAQ,CAAE,KAAM,WAAY,CAAC,CAC5C,CACF,CAAC,CACH,CAAC,E8SzC0G,IAAME,IAAM,WAAW,eAAiB,CAAC,EAAGA,IAAI,oBAAoB,EAAE","names":["require_shared_cjs_prod","__commonJSMin","exports","makeMap","str","map","key","val","EMPTY_OBJ","EMPTY_ARR","NOOP","NO","isOn","isModelListener","extend","remove","arr","el","i","hasOwnProperty","hasOwn","isArray","isMap","toTypeString","isSet","isDate","isRegExp","isFunction","isString","isSymbol","isObject","isPromise","objectToString","value","toRawType","isPlainObject","isIntegerKey","isReservedProp","isBuiltInDirective","cacheStringFunction","fn","cache","camelizeRE","camelize","_","c","hyphenateRE","hyphenate","capitalize","toHandlerKey","hasChanged","oldValue","invokeArrayFns","fns","arg","def","obj","writable","looseToNumber","n","toNumber","_globalThis","getGlobalThis","identRE","genPropsAccessExp","name","genCacheKey","source","options","PatchFlags","PatchFlagNames","ShapeFlags","SlotFlags","slotFlagsText","GLOBALS_ALLOWED","isGloballyAllowed","isGloballyWhitelisted","range","generateCodeFrame","start","end","lines","newlineSequences","idx","count","res","j","line","lineLength","newLineSeqLength","pad","length","normalizeStyle","item","normalized","parseStringStyle","listDelimiterRE","propertyDelimiterRE","styleCommentRE","cssText","ret","tmp","stringifyStyle","styles","normalizedKey","normalizeClass","normalizeProps","props","klass","style","HTML_TAGS","SVG_TAGS","MATH_TAGS","VOID_TAGS","isHTMLTag","isSVGTag","isMathMLTag","isVoidTag","specialBooleanAttrs","isSpecialBooleanAttr","isBooleanAttr","includeBooleanAttr","unsafeAttrCharRE","attrValidationCache","isSSRSafeAttrName","isUnsafe","propsToAttrMap","isKnownHtmlAttr","isKnownSvgAttr","isKnownMathMLAttr","isRenderableAttrValue","type","escapeRE","escapeHtml","string","match","html","escaped","index","lastIndex","commentStripRE","escapeHtmlComment","src","cssVarNameEscapeSymbolsRE","getEscapedCssVarName","doubleEscape","s","looseCompareArrays","a","b","equal","looseEqual","aValidType","bValidType","aKeysCount","bKeysCount","aHasKey","bHasKey","looseIndexOf","isRef","toDisplayString","replacer","_key","entries","val2","stringifySymbol","v","_a","normalizeCssVarValue","require_shared","__commonJSMin","exports","module","exports","c","exports","c","decodeMap","exports","_a","codePoint","output","replaceCodePoint","decodeCodePoint","decode_data_html_js_1","__importDefault","exports","decode_data_xml_js_1","decode_codepoint_js_1","__importStar","decode_codepoint_js_2","CharCodes","TO_LOWER_BIT","BinTrieFlags","isNumber","code","isHexadecimalCharacter","isAsciiAlphaNumeric","isEntityInAttributeInvalidEnd","EntityDecoderState","DecodingMode","EntityDecoder","decodeTree","emitCodePoint","errors","decodeMode","str","offset","start","end","base","digitCount","startIdx","char","lastCp","expectedLength","_a","current","valueLength","determineBranch","_b","result","consumed","getDecoder","ret","decoder","lastIndex","len","nodeIdx","branchCount","jumpOffset","value","lo","hi","mid","midVal","htmlDecoder","xmlDecoder","decodeHTML","mode","decodeHTMLAttribute","decodeHTMLStrict","decodeXML","Position","constructor","line","col","index","column","SourceLocation","start","end","filename","identifierName","createPositionWithColumnOffset","position","columnOffset","code","ModuleErrors","ImportMetaOutsideModule","message","ImportOutsideModule","NodeDescriptions","ArrayPattern","AssignmentExpression","AssignmentPattern","ArrowFunctionExpression","ConditionalExpression","CatchClause","ForOfStatement","ForInStatement","ForStatement","FormalParameters","Identifier","ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier","ObjectPattern","ParenthesizedExpression","RestElement","UpdateExpression","true","false","VariableDeclarator","YieldExpression","toNodeDescription","node","type","prefix","StandardErrors","AccessorIsGenerator","kind","ArgumentsInClass","AsyncFunctionInSingleStatementContext","AwaitBindingIdentifier","AwaitBindingIdentifierInStaticBlock","AwaitExpressionFormalParameter","AwaitUsingNotInAsyncContext","AwaitNotInAsyncContext","BadGetterArity","BadSetterArity","BadSetterRestParameter","ConstructorClassField","ConstructorClassPrivateField","ConstructorIsAccessor","ConstructorIsAsync","ConstructorIsGenerator","DeclarationMissingInitializer","DecoratorArgumentsOutsideParentheses","DecoratorBeforeExport","DecoratorsBeforeAfterExport","DecoratorConstructor","DecoratorExportClass","DecoratorSemicolon","DecoratorStaticBlock","DeferImportRequiresNamespace","DeletePrivateField","DestructureNamedImport","DuplicateConstructor","DuplicateDefaultExport","DuplicateExport","exportName","DuplicateProto","DuplicateRegExpFlags","ElementAfterRest","EscapedCharNotAnIdentifier","ExportBindingIsString","localName","ExportDefaultFromAsIdentifier","ForInOfLoopInitializer","ForInUsing","ForOfAsync","ForOfLet","GeneratorInSingleStatementContext","IllegalBreakContinue","IllegalLanguageModeDirective","IllegalReturn","ImportAttributesUseAssert","ImportBindingIsString","importName","ImportCallArity","ImportCallNotNewExpression","ImportCallSpreadArgument","ImportJSONBindingNotDefault","ImportReflectionHasAssertion","ImportReflectionNotBinding","IncompatibleRegExpUVFlags","InvalidBigIntLiteral","InvalidCodePoint","InvalidCoverDiscardElement","InvalidCoverInitializedName","InvalidDecimal","InvalidDigit","radix","InvalidEscapeSequence","InvalidEscapeSequenceTemplate","InvalidEscapedReservedWord","reservedWord","InvalidIdentifier","InvalidLhs","ancestor","InvalidLhsBinding","InvalidLhsOptionalChaining","InvalidNumber","InvalidOrMissingExponent","InvalidOrUnexpectedToken","unexpected","InvalidParenthesizedAssignment","InvalidPrivateFieldResolution","InvalidPropertyBindingPattern","InvalidRecordProperty","InvalidRestAssignmentPattern","LabelRedeclaration","labelName","LetInLexicalBinding","LineTerminatorBeforeArrow","MalformedRegExpFlags","MissingClassName","MissingEqInAssignment","MissingSemicolon","MissingPlugin","missingPlugin","map","name","JSON","stringify","join","MissingOneOfPlugins","MissingUnicodeEscape","MixingCoalesceWithLogical","ModuleAttributeDifferentFromType","ModuleAttributeInvalidValue","ModuleAttributesWithDuplicateKeys","key","ModuleExportNameHasLoneSurrogate","surrogateCharCode","toString","ModuleExportUndefined","MultipleDefaultsInSwitch","NewlineAfterThrow","NoCatchOrFinally","NumberIdentifier","NumericSeparatorInEscapeSequence","ObsoleteAwaitStar","OptionalChainingNoNew","OptionalChainingNoTemplate","OverrideOnConstructor","ParamDupe","PatternHasAccessor","PatternHasMethod","PrivateInExpectedIn","PrivateNameRedeclaration","RecordExpressionBarIncorrectEndSyntaxType","RecordExpressionBarIncorrectStartSyntaxType","RecordExpressionHashIncorrectStartSyntaxType","RecordNoProto","RestTrailingComma","SloppyFunction","SloppyFunctionAnnexB","SourcePhaseImportRequiresDefault","StaticPrototype","SuperNotAllowed","SuperPrivateField","TrailingDecorator","TupleExpressionBarIncorrectEndSyntaxType","TupleExpressionBarIncorrectStartSyntaxType","TupleExpressionHashIncorrectStartSyntaxType","UnexpectedArgumentPlaceholder","UnexpectedAwaitAfterPipelineBody","UnexpectedDigitAfterHash","UnexpectedImportExport","UnexpectedKeyword","keyword","UnexpectedLeadingDecorator","UnexpectedLexicalDeclaration","UnexpectedNewTarget","UnexpectedNumericSeparator","UnexpectedPrivateField","UnexpectedReservedWord","UnexpectedSuper","UnexpectedToken","expected","UnexpectedTokenUnaryExponentiation","UnexpectedUsingDeclaration","UnexpectedVoidPattern","UnsupportedBind","UnsupportedDecoratorExport","UnsupportedDefaultExport","UnsupportedImport","UnsupportedMetaProperty","target","onlyValidPropertyName","UnsupportedParameterDecorator","UnsupportedPropertyDecorator","UnsupportedSuper","UnterminatedComment","UnterminatedRegExp","UnterminatedString","UnterminatedTemplate","UsingDeclarationExport","UsingDeclarationHasBindingPattern","VarRedeclaration","VoidPatternCatchClauseParam","VoidPatternInitializer","YieldBindingIdentifier","YieldInParameter","YieldNotInGeneratorFunction","ZeroDigitNumericSeparator","StrictModeErrors","StrictDelete","StrictEvalArguments","referenceName","StrictEvalArgumentsBinding","bindingName","StrictFunction","StrictNumericEscape","StrictOctalLiteral","StrictWith","ParseExpressionErrors","ParseExpressionEmptyInput","ParseExpressionExpectsEOF","String","fromCodePoint","UnparenthesizedPipeBodyDescriptions","Set","Object","assign","PipeBodyIsTighter","PipeTopicRequiresHackPipes","PipeTopicUnbound","PipeTopicUnconfiguredToken","token","PipeTopicUnused","PipeUnparenthesizedBody","PipelineBodyNoArrow","PipelineBodySequenceExpression","PipelineHeadSequenceExpression","PipelineTopicUnused","PrimaryTopicNotAllowed","PrimaryTopicRequiresSmartPipeline","defineHidden","obj","value","defineProperty","enumerable","configurable","toParseErrorConstructor","toMessage","reasonCode","syntaxPlugin","hasMissingPlugin","oldReasonCodes","AccessorCannotDeclareThisParameter","AccessorCannotHaveTypeParameters","ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference","SetAccessorCannotHaveOptionalParameter","SetAccessorCannotHaveRestParameter","SetAccessorCannotHaveReturnType","loc","details","error","SyntaxError","pos","overrides","_overrides$loc","get","set","writable","ParseErrorEnum","argument","Array","isArray","parseErrorTemplates","ParseErrorConstructors","keys","template","_ref","rest","_objectWithoutPropertiesLoose","_excluded","Errors","PipelineOperatorErrors","createDefaultOptions","sourceType","sourceFilename","undefined","startIndex","startColumn","startLine","allowAwaitOutsideFunction","allowReturnOutsideFunction","allowNewTargetOutsideFunction","allowImportExportEverywhere","allowSuperOutsideMethod","allowUndeclaredExports","allowYieldOutsideFunction","plugins","strictMode","ranges","tokens","createImportExpressions","createParenthesizedExpressions","errorRecovery","attachComment","annexB","getOptions","opts","options","Error","toUnenumerable","object","toESTreeLocation","estree","superClass","parse","file","optionFlags","parseRegExpLiteral","pattern","flags","regex","RegExp","estreeParseLiteral","parseBigIntLiteral","bigInt","BigInt","bigint","parseDecimalLiteral","decimal","parseLiteral","parseStringLiteral","parseNumericLiteral","parseNullLiteral","parseBooleanLiteral","estreeParseChainExpression","endLoc","chain","startNodeAtNode","expression","finishNodeAt","directiveToStmt","directive","castNodeTo","raw","extra","expressionValue","stmt","rawValue","fillOptionalPropertiesForTSESLint","cloneEstreeStringLiteral","range","cloned","create","prototype","initFunction","isAsync","checkDeclaration","isObjectProperty","getObjectOrClassMethodParams","method","params","isValidDirective","_stmt$expression$extr","parenthesized","parseBlockBody","allowDirectives","topLevel","afterBlockParse","directiveStatements","directives","d","body","concat","parsePrivateName","getPluginOption","convertPrivateNameToPrivateIdentifier","getPrivateNameSV","id","isPrivateName","parseFunctionBody","allowExpression","isMethod","parseMethod","isGenerator","isConstructor","allowDirectSuper","inClassScope","funcNode","startNode","typeParameters","resetStartLocationFromNode","valueNode","computed","shorthand","finishNode","nameIsConstructor","parseClassProperty","args","propertyNode","parseClassPrivateProperty","parseClassAccessorProperty","accessorPropertyNode","abstract","hasPlugin","parseObjectProperty","prop","startLoc","isPattern","refExpressionErrors","finishObjectProperty","isValidLVal","isUnparenthesizedInAssign","binding","isAssignable","isBinding","toAssignable","isLHS","classScope","usePrivateName","toAssignableObjectExpressionProp","isLast","raise","finishCallExpression","unfinished","optional","callee","source","arguments","_ref2","attributes","toReferencedArguments","parseExport","decorators","exportStartLoc","state","lastTokStartLoc","exported","specifiers","length","_declaration$decorato","declaration","resetStartLocation","stopParseSubscript","base","optionalChainMember","parseMember","isOptionalMemberExpression","hasPropertyAsPrivateName","isObjectMethod","result","cloneIdentifier","cloneStringLiteral","resetEndLocation","lastTokEndLoc","TokContext","preserveSpace","types","brace","j_oTag","j_cTag","j_expr","beforeExpr","startsExpr","isLoop","isAssign","postfix","ExportedTokenType","label","conf","rightAssociative","binop","updateContext","keywords","Map","createKeyword","createToken","createBinop","tokenTypeCounter","tokenTypes","tokenLabels","tokenBinops","tokenBeforeExprs","tokenStartsExprs","tokenPrefixes","_options$binop","_options$beforeExpr","_options$startsExpr","_options$prefix","push","createKeywordLike","_options$binop2","_options$beforeExpr2","_options$startsExpr2","_options$prefix2","tt","bracketL","bracketHashL","bracketBarL","bracketR","bracketBarR","braceL","braceBarL","braceHashL","braceR","braceBarR","parenL","parenR","comma","semi","colon","doubleColon","dot","question","questionDot","arrow","ellipsis","backQuote","dollarBraceL","templateTail","templateNonTail","at","hash","interpreterDirective","eq","slashAssign","xorAssign","moduloAssign","incDec","bang","tilde","doubleCaret","doubleAt","pipeline","nullishCoalescing","logicalOR","logicalAND","bitwiseOR","bitwiseXOR","bitwiseAND","equality","lt","gt","relational","bitShift","bitShiftL","bitShiftR","plusMin","modulo","star","slash","exponent","_in","_instanceof","_break","_case","_catch","_continue","_debugger","_default","_else","_finally","_function","_if","_return","_switch","_throw","_try","_var","_const","_with","_new","_this","_super","_class","_extends","_export","_import","_null","_true","_false","_typeof","_void","_delete","_do","_for","_while","_as","_assert","_async","_await","_defer","_from","_get","_let","_meta","_of","_sent","_set","_source","_static","_using","_yield","_asserts","_checks","_exports","_global","_implements","_intrinsic","_infer","_is","_mixins","_proto","_require","_satisfies","_keyof","_readonly","_unique","_abstract","_declare","_enum","_module","_namespace","_interface","_type","_opaque","placeholder","string","num","regexp","privateName","eof","jsxName","jsxText","jsxTagStart","jsxTagEnd","tokenIsIdentifier","tokenKeywordOrIdentifierIsKeyword","tokenIsKeywordOrIdentifier","tokenIsLiteralPropertyName","tokenComesBeforeExpression","tokenCanStartExpression","tokenIsAssignment","tokenIsFlowInterfaceOrTypeOrOpaque","tokenIsLoop","tokenIsKeyword","tokenIsOperator","tokenIsPostfix","tokenIsPrefix","tokenIsTSTypeOperator","tokenIsTSDeclarationStart","tokenLabelName","tokenOperatorPrecedence","tokenIsRightAssociative","tokenIsTemplate","getExportedToken","context","pop","tc","nonASCIIidentifierStartChars","nonASCIIidentifierChars","nonASCIIidentifierStart","nonASCIIidentifier","astralIdentifierStartCodes","astralIdentifierCodes","isInAstralSet","i","isIdentifierStart","test","fromCharCode","isIdentifierChar","reservedWords","strict","strictBind","reservedWordsStrictSet","reservedWordsStrictBindSet","isReservedWord","word","inModule","isStrictReservedWord","has","isStrictBindOnlyReservedWord","isStrictBindReservedWord","isKeyword","isIteratorStart","current","next","next2","reservedWordLikeSet","canBeReservedWord","Scope","names","firstLexicalName","ScopeHandler","parser","scopeStack","undefinedExports","inTopLevel","currentScope","inFunction","currentVarScopeFlags","allowSuper","currentThisScopeFlags","allowNewTarget","inClass","inClassAndNotInNonArrowFunction","inStaticBlock","ScopeFlag","inNonArrowFunction","inBareCaseStatement","treatFunctionsAsVar","treatFunctionsAsVarInScope","createScope","enter","exit","scope","declareName","bindingType","checkRedeclarationInScope","maybeExportDefined","delete","isRedeclaredInScope","checkLocalExport","FlowScope","declareFunctions","FlowScopeHandler","add","reservedTypes","FlowErrors","AmbiguousConditionalArrow","AmbiguousDeclareModuleKind","AssignReservedType","reservedType","DeclareClassElement","DeclareClassFieldInitializer","DuplicateDeclareModuleExports","EnumBooleanMemberNotInitialized","memberName","enumName","EnumDuplicateMemberName","EnumInconsistentMemberValues","EnumInvalidExplicitType","invalidEnumType","EnumInvalidExplicitTypeUnknownSupplied","EnumInvalidMemberInitializerPrimaryType","explicitType","EnumInvalidMemberInitializerSymbolType","EnumInvalidMemberInitializerUnknownType","EnumInvalidMemberName","suggestion","EnumNumberMemberNotInitialized","EnumStringMemberInconsistentlyInitialized","GetterMayNotHaveThisParam","ImportReflectionHasImportType","ImportTypeShorthandOnlyInPureImport","InexactInsideExact","InexactInsideNonObject","InexactVariance","InvalidNonTypeImportInDeclareModule","MissingTypeParamDefault","NestedDeclareModule","NestedFlowComment","PatternIsOptional","SetterMayNotHaveThisParam","SpreadVariance","ThisParamAnnotationRequired","ThisParamBannedInConstructor","ThisParamMayNotBeOptional","ThisParamMustBeFirst","ThisParamNoDefault","TypeBeforeInitializer","TypeCastInPattern","UnexpectedExplicitInexactInObject","UnexpectedReservedType","UnexpectedReservedUnderscore","UnexpectedSpaceBetweenModuloChecks","UnexpectedSpreadType","UnexpectedSubtractionOperand","UnexpectedTokenAfterTypeParameter","UnexpectedTypeParameterBeforeAsyncArrowFunction","UnsupportedDeclareExportKind","unsupportedExportKind","UnsupportedStatementInDeclareModule","UnterminatedFlowComment","isEsModuleType","bodyElement","hasTypeImportKind","importKind","exportSuggestions","const","let","interface","partition","list","list1","list2","FLOW_PRAGMA_REGEX","flow","flowPragma","getScopeHandler","shouldParseTypes","finishToken","val","addComment","comment","matches","exec","flowParseTypeInitialiser","tok","oldInType","inType","expect","flowParseType","flowParsePredicate","moduloLoc","expectContextual","eat","parseExpression","flowParseTypeAndPredicateInitialiser","predicate","match","flowParseDeclareClass","flowParseInterfaceish","flowParseDeclareFunction","parseIdentifier","typeNode","typeContainer","flowParseTypeParameterDeclaration","tmp","flowParseFunctionTypeParams","this","returnType","typeAnnotation","semicolon","flowParseDeclare","insideModule","flowParseDeclareVariable","eatContextual","flowParseDeclareModuleExports","flowParseDeclareModule","isContextual","flowParseDeclareTypeAlias","flowParseDeclareOpaqueType","flowParseDeclareInterface","flowParseDeclareExportDeclaration","flowParseTypeAnnotatableIdentifier","parseExprAtom","bodyNode","parseImport","hasModuleExport","forEach","default","isLet","exportKind","flowParseTypeAnnotation","finished","flowParseTypeAlias","flowParseOpaqueType","isClass","flowParseRestrictedIdentifier","extends","flowParseInterfaceExtends","implements","mixins","flowParseObjectType","allowStatic","allowExact","allowSpread","allowProto","allowInexact","flowParseQualifiedTypeIdentifier","flowParseTypeParameterInstantiation","flowParseInterface","checkNotUnderscore","checkReservedType","liberal","right","declare","supertype","impltype","flowParseTypeParameter","requireDefault","nodeStartLoc","variance","flowParseVariance","ident","bound","defaultRequired","typeParameter","flowInTopLevelContext","cb","curContext","oldContext","flowParseTypeParameterInstantiationInExpression","reScan_lt","oldNoAnonFunctionType","noAnonFunctionType","reScan_lt_gt","flowParseTypeParameterInstantiationCallOrNew","flowParseTypeOrImplicitInstantiation","flowParseInterfaceType","flowParseObjectPropertyKey","flowParseObjectTypeIndexer","isStatic","static","lookahead","flowParseObjectTypeInternalSlot","flowParseObjectTypeMethodish","startNodeAt","flowParseFunctionTypeParam","flowParseObjectTypeCallProperty","nodeStart","callProperties","properties","indexers","internalSlots","endDelim","exact","inexact","protoStartLoc","inexactStartLoc","propOrInexact","flowParseObjectTypeProperty","flowObjectTypeSemicolon","out","proto","flowCheckGetterSetterParams","property","paramCount","node2","qualification","flowParseGenericType","flowParseTypeofType","flowParsePrimaryType","flowParseTupleType","first","lh","isThis","reinterpretTypeAsFunctionTypeParam","flowIdentToTypeAnnotation","isGroupedType","parseLiteralAtNode","createIdentifier","flowParsePostfixType","seenOptionalIndexedAccess","canInsertSemicolon","elementType","objectType","indexType","flowParsePrefixType","flowParseAnonFunctionWithoutParens","param","flowParseIntersectionType","flowParseUnionType","allowPrimitiveOverride","typeCastToParameter","allowExpressionBody","forwardNoArrowParamsConversionAt","parseFunctionBodyAndFinish","parseStatementLike","flowParseEnumDeclaration","parseExpressionStatement","expr","shouldParseExportDeclaration","containsEsc","isExportDefaultSpecifier","parseExportDefaultExpression","parseConditional","maybeInArrowParameters","nextCh","lookaheadCharCode","setOptionalParametersError","clone","originalNoArrowAt","noArrowAt","consequent","failed","tryParseConditionalConsequent","valid","invalid","getArrowLikeExpressions","alternate","parseMaybeAssign","noArrowParamsConversionAt","parseMaybeAssignAllowIn","disallowInvalid","stack","arrows","finishArrowValidation","every","_node$extra","toAssignableList","trailingCommaLoc","checkParams","includes","offsetToSourcePos","parseParenItem","newNode","typeCastNode","assertModuleNodeAllowed","parseExportDeclaration","declarationNode","parseExportSpecifiers","parseExportFrom","eatExportStar","maybeParseExportNamespaceSpecifier","hasNamespace","parseClassId","isStatement","optionalId","parseClassMember","classBody","member","parseClassMemberFromModifier","isIterator","readIterator","readWord1","fullWord","curPosition","getTokenFromCode","input","charCodeAt","finishOp","left","exprList","toReferencedList","isParenthesizedExpr","_expr$extra","parseArrayLike","close","canBePattern","isTuple","elements","isParenthesized","isClassMethod","isClassProperty","isNonstaticConstructor","pushClassMethod","allowsDirectSuper","isThisParam","pushClassPrivateMethod","parseClassSuper","superTypeParameters","implemented","checkGetterSetterParams","parsePropertyNamePrefixOperator","parseObjPropValue","isAccessor","parseFunctionParamType","parseMaybeDefault","checkImportReflection","module","parseImportSpecifierLocal","specifier","local","finishImportSpecifier","isPotentialImportPhase","isExport","ch","applyImportPhase","phase","parseImportSpecifier","importedIsString","isInTypeOnlyImport","isMaybeTypeOnly","firstIdent","imported","specifierTypeKind","isLookaheadContextual","as_ident","specifierIsTypeImport","checkReservedWord","parseBindingAtom","parseFunctionParams","parseVarId","decl","parseAsyncArrowFromCallExpression","call","shouldParseAsyncArrow","afterLeftParse","_jsx","jsx","tryParse","currentContext","_jsx2","_jsx3","abort","_arrowExpression$extr","arrowExpression","maybeUnwrapTypeCastExpression","aborted","async","failState","thrown","parseArrow","shouldParseArrow","setArrowFunctionParameters","allowDuplicates","isArrowFunction","strictModeChanged","parseParenAndDistinguishExpression","canBeArrow","sourceToOffsetPos","parseSubscripts","noCalls","parseCallExpressionArguments","parseAsyncArrowWithTypeParameters","parseSubscript","subscriptState","isLookaheadToken_lt","stop","typeArguments","parseNewCallee","targs","parseArrowExpression","readToken_mult_modulo","hasFlowComment","nextToken","readToken_pipe_amp","parseTopLevel","program","fileNode","skipBlockComment","skipFlowComment","hasFlowCommentCompletion","commentSkip","shiftToFirstNonWhiteSpace","ch2","ch3","slice","indexOf","flowEnumErrorBooleanMemberNotInitialized","flowEnumErrorInvalidMemberInitializer","enumContext","flowEnumErrorNumberMemberNotInitialized","flowEnumErrorStringMemberInconsistentlyInitialized","flowEnumMemberInit","endOfInit","literal","flowEnumMemberRaw","init","flowEnumCheckExplicitTypeMismatch","expectedType","flowEnumMembers","seenNames","members","booleanMembers","numberMembers","stringMembers","defaultedMembers","hasUnknownMembers","memberNode","toUpperCase","flowEnumStringMembers","initializedMembers","flowEnumParseExplicitType","flowEnumBody","nameLoc","empty","boolsLen","numsLen","strsLen","defaultedLen","jsxParseOpeningElementAfterName","nextTokenStart","afterNext","readToken_lt","readToken_gt","entities","__proto__","quot","amp","apos","nbsp","iexcl","cent","pound","curren","yen","brvbar","sect","uml","copy","ordf","laquo","not","shy","reg","macr","deg","plusmn","sup2","sup3","acute","micro","para","middot","cedil","sup1","ordm","raquo","frac14","frac12","frac34","iquest","Agrave","Aacute","Acirc","Atilde","Auml","Aring","AElig","Ccedil","Egrave","Eacute","Ecirc","Euml","Igrave","Iacute","Icirc","Iuml","ETH","Ntilde","Ograve","Oacute","Ocirc","Otilde","Ouml","times","Oslash","Ugrave","Uacute","Ucirc","Uuml","Yacute","THORN","szlig","agrave","aacute","acirc","atilde","auml","aring","aelig","ccedil","egrave","eacute","ecirc","euml","igrave","iacute","icirc","iuml","eth","ntilde","ograve","oacute","ocirc","otilde","ouml","divide","oslash","ugrave","uacute","ucirc","uuml","yacute","thorn","yuml","OElig","oelig","Scaron","scaron","Yuml","fnof","circ","Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega","alpha","beta","gamma","delta","epsilon","zeta","eta","theta","iota","kappa","lambda","mu","nu","xi","omicron","pi","rho","sigmaf","sigma","tau","upsilon","phi","chi","psi","omega","thetasym","upsih","piv","ensp","emsp","thinsp","zwnj","zwj","lrm","rlm","ndash","mdash","lsquo","rsquo","sbquo","ldquo","rdquo","bdquo","dagger","Dagger","bull","hellip","permil","prime","Prime","lsaquo","rsaquo","oline","frasl","euro","image","weierp","real","trade","alefsym","larr","uarr","rarr","darr","harr","crarr","lArr","uArr","rArr","dArr","hArr","forall","part","exist","nabla","isin","notin","ni","prod","sum","minus","lowast","radic","infin","ang","and","or","cap","cup","int","there4","sim","cong","asymp","ne","equiv","le","ge","sub","sup","nsub","sube","supe","oplus","otimes","perp","sdot","lceil","rceil","lfloor","rfloor","lang","rang","loz","spades","clubs","hearts","diams","lineBreak","lineBreakG","isNewLine","hasNewLine","skipWhiteSpace","skipWhiteSpaceInLine","isWhitespace","JsxErrors","AttributeIsEmpty","MissingClosingTagElement","openingTagName","MissingClosingTagFragment","UnexpectedSequenceExpression","HTMLEntity","UnsupportedJsxValue","UnterminatedJsxContent","UnwrappedAdjacentJSXElements","isFragment","getQualifiedJSXName","namespace","jsxReadToken","chunkStart","canStartJSXElement","jsxReadEntity","jsxReadNewLine","normalizeCRLF","curLine","lineStart","jsxReadString","quote","startPos","codePointAtPos","codePoint","readInt","count","desc","entity","XHTMLEntities","jsxReadWord","jsxParseIdentifier","jsxParseNamespacedName","jsxParseElementName","jsxParseAttributeValue","setContext","jsxParseExpressionContainer","jsxParseEmptyExpression","jsxParseSpreadChild","previousContext","jsxParseAttribute","jsxParseOpeningElementAt","selfClosing","jsxParseClosingElementAt","jsxParseElementAt","children","openingElement","closingElement","contents","openingFragment","closingFragment","jsxParseElement","newContext","replaceToken","skipSpace","prevType","splice","TypeScriptScope","tsNames","TypeScriptScopeHandler","importsStack","hasImport","allowShadow","len","isConst","wasConst","ProductionParameterHandler","stacks","currentFlags","hasAwait","hasYield","hasReturn","hasIn","functionFlags","BaseParser","sawUnambiguousESM","ambiguousScriptDifferentAst","sourcePos","offsetPos","pluginConfig","pluginName","pluginOptions","actualOptions","plugin","_this$plugins$get","setTrailingComments","comments","trailingComments","unshift","setLeadingComments","leadingComments","setInnerComments","innerComments","adjustInnerComments","commentWS","lastElement","CommentsParser","commentsLen","processComment","commentStack","commentStackLength","lastCommentWS","leadingNode","commentEnd","containingNode","finalizeComment","trailingNode","_node$options","commentStart","finalizeRemainingComments","resetPreviousNodeTrailingComments","takeSurroundingComments","State","errors","potentialArrowAt","topicContext","maxNumOfResolvableTopics","maxTopicIndex","labels","ct","firstInvalidTemplateEscapePos","strictErrors","tokensLength","v","isAmbientContext","inAbstractClass","inDisallowConditionalTypesContext","soloAwait","inFSharpPipelineDirectBody","hasTopLevelAwait","forbiddenNumericSeparatorSiblings","decBinOct","hex","isAllowedNumericSeparatorSibling","bin","oct","dec","readStringContents","initialPos","initialLineStart","initialCurLine","firstInvalidLoc","unterminated","isStringEnd","res","readEscapedChar","str","containsInvalid","inTemplate","throwOnInvalid","readHexChar","readCodePoint","strictNumericEscape","octalStr","octal","parseInt","forceLen","n","invalidEscapeSequence","allowNumSeparator","bailOnError","forbiddenSiblings","isAllowedSibling","total","e","Infinity","prev","Number","isNaN","unexpectedNumericSeparator","numericSeparatorInEscapeSequence","_isDigit","invalidDigit","invalidCodePoint","buildPosition","VALID_REGEX_FLAGS","Token","Tokenizer","isLookahead","errorHandlers_readInt","errorBuilder","errorHandlers_readCodePoint","errorHandlers_readStringContents_string","recordStrictModeErrors","errorHandlers_readStringContents_template","pushToken","checkKeywordEscapes","createLookaheadState","old","curr","nextTokenStartSince","lastIndex","lookaheadCharCodeSince","nextTokenInLineStart","nextTokenInLineStartSince","lookaheadInLineCharCode","cp","trail","setStrict","toParseError","clear","skipLineComment","startSkip","spaceStart","loop","commentWhitespace","readToken_numberSign","readToken_interpreter","nextPos","expectPlugin","readToken_dot","readNumber","readToken_slash","width","readToken_caret","proposal","topicToken","codePointAt","readToken_atSign","readToken_plus_min","size","readToken_eq_excl","readToken_question","readTemplateToken","readRadixNumber","readString","readWord","readRegexp","escaped","content","mods","char","isBigInt","replace","startsWithDot","isFloat","hasExponent","isOctal","hasLeadingZero","integer","underscorePos","isDecimal","parseFloat","readTemplateContinuation","opening","firstCode","escStart","identifierCheck","esc","keywordTypes","raiseOverwrite","expectOnePlugin","pluginNames","some","ClassScope","privateNames","loneAccessors","undefinedPrivateNames","ClassScopeHandler","oldClassScope","from","declarePrivateName","redefined","accessor","oldStatic","newStatic","oldKind","newKind","ExpressionScope","canBeArrowParameterDeclaration","isCertainlyParameterDeclaration","ArrowHeadParsingScope","declarationErrors","recordDeclarationError","ParsingErrorClass","clearDeclarationError","iterateErrors","iterator","ExpressionScopeHandler","recordParameterInitializerError","origin","recordArrowParameterBindingError","recordAsyncArrowParametersError","validateAsPattern","newParameterDeclarationScope","newArrowHeadScope","newAsyncArrowScope","newExpressionScope","UtilParser","addExtra","isUnparsedContextual","nameStart","startsWith","hasPrecedingLineBreak","hasFollowingLineBreak","isLineTerminator","allowAsi","fn","oldState","abortSignal","checkExpressionErrors","andThrow","shorthandAssignLoc","doubleProtoLoc","privateKeyLoc","optionalParametersLoc","voidPatternLoc","hasErrors","isLiteralPropertyName","initializeScopes","oldLabels","oldExportedIdentifiers","exportedIdentifiers","oldInModule","oldScope","oldProdParam","prodParam","oldExpressionScope","expressionScope","enterInitialScopes","paramFlags","isCommonJS","scopeFlags","checkDestructuringPrivate","ExpressionErrors","Node","NodePrototype","__clone","NodeUtils","locationNode","unwrapParenthesizedExpression","LValParser","_node$extra3","last","_node$extra2","operator","arg","checkToRestConversion","elt","toAssignableListItem","element","toReferencedListDeep","parseSpread","parseRestBinding","parseBindingList","ParseBindingListFlags","parseObjectLike","parseVoidPattern","closeCharCode","allowEmpty","elts","checkCommaAfterRest","parseDecorator","parseBindingElement","parseBindingRestProperty","parseBindingProperty","parsePropertyName","checkLVal","checkClashes","hasParenthesizedAncestor","_expression$extra","checkIdentifier","validity","ParseErrorClass","isParenthesizedExpression","nextAncestor","child","declareNameFromIdentifier","identifier","allowPattern","nonNull","x","assert","TSErrors","AbstractMethodHasImplementation","methodName","AbstractPropertyHasInitializer","propertyName","AccessorCannotBeOptional","ClassMethodHasDeclare","ClassMethodHasReadonly","ConstructorHasTypeParameters","DeclareAccessor","DeclareClassFieldHasInitializer","DeclareFunctionHasImplementation","DuplicateAccessibilityModifier","modifier","DuplicateModifier","EmptyHeritageClauseType","EmptyTypeArguments","EmptyTypeParameters","ExpectedAmbientAfterExportDeclare","ImportAliasHasImportType","IncompatibleModifiers","modifiers","IndexSignatureHasAbstract","IndexSignatureHasAccessibility","IndexSignatureHasDeclare","IndexSignatureHasOverride","IndexSignatureHasStatic","InitializerNotAllowedInAmbientContext","InvalidHeritageClauseType","InvalidModifierOnAwaitUsingDeclaration","InvalidModifierOnTypeMember","InvalidModifierOnTypeParameter","InvalidModifierOnTypeParameterPositions","InvalidModifierOnUsingDeclaration","InvalidModifiersOrder","orderedModifiers","InvalidPropertyAccessAfterInstantiationExpression","InvalidTupleMemberLabel","MissingInterfaceName","NonAbstractClassHasAbstractMethod","NonClassMethodPropertyHasAbstractModifier","OptionalTypeBeforeRequired","OverrideNotInSubClass","PrivateElementHasAbstract","PrivateElementHasAccessibility","ReadonlyForMethodSignature","ReservedArrowTypeParam","ReservedTypeAssertion","SingleTypeParameterWithoutTrailingComma","typeParameterName","StaticBlockCannotHaveModifier","TupleOptionalAfterType","TypeAnnotationAfterAssign","TypeImportCannotSpecifyDefaultAndNamed","TypeModifierIsUsedInTypeExports","TypeModifierIsUsedInTypeImports","UnexpectedParameterModifier","UnexpectedReadonly","UnexpectedTypeAnnotation","UnexpectedTypeCastInParameter","UnsupportedImportTypeArgument","UnsupportedParameterPropertyKind","UnsupportedSignatureParameterKind","UsingDeclarationInAmbientContext","keywordTypeFromName","tsIsAccessModifier","tsIsVarianceAnnotations","typescript","tsParseInOutModifiers","tsParseModifiers","bind","allowedModifiers","disallowedModifiers","errorTemplate","tsParseConstModifier","tsParseInOutConstModifiers","tsIsIdentifier","tsTokenCanFollowModifier","tsNextTokenOnSameLineAndCanFollowModifier","tsNextTokenCanFollowModifier","tsParseModifier","stopOnStartOfClassStaticBlock","hasSeenStaticModifier","tsIsStartOfStaticBlocks","tsTryParse","modified","enforceOrder","before","after","incompatible","mod1","mod2","accessibility","hasOwnProperty","tsIsListTerminator","tsParseList","parseElement","tsParseDelimitedList","refTrailingCommaPos","tsParseDelimitedListWorker","expectSuccess","trailingCommaPos","tsParseBracketedList","bracket","skipFirstToken","tsParseImportType","tsParseImportTypeOptions","qualifier","tsParseEntityName","tsParseEntityNameFlags","tsParseTypeArguments","withProperty","tsParseImportTypeWithPropertyValue","parsePropertyDefinition","tsParseTypeReference","typeName","tsParseThisTypePredicate","lhs","parameterName","tsParseTypeAnnotation","asserts","tsParseThisTypeNode","tsParseTypeQuery","exprName","tsParseTypeParameter","parseModifiers","tsParseTypeParameterName","constraint","tsEatThenParseType","tsTryParseTypeParameters","tsParseTypeParameters","tsFillSignature","returnToken","signature","returnTokenRequired","paramsKey","returnTypeKey","tsParseBindingListForSignature","tsParseTypeOrTypePredicateAnnotation","tsParseTypeMemberSemicolon","tsParseSignatureMember","tsIsUnambiguouslyIndexSignature","tsTryParseIndexSignature","tsLookAhead","parameters","tsTryParseTypeAnnotation","tsParsePropertyOrMethodSignature","readonly","firstParameter","tsParseTypeMember","idx","tsParseTypeLiteral","tsParseObjectTypeMembers","tsIsStartOfMappedType","tsParseMappedType","tsExpectThenParseType","nameType","tsParseType","tsTryParseType","tsParseTupleType","elementTypes","tsParseTupleElementType","seenOptionalElement","elementNode","restStartLoc","labeled","chAfterWord","wordName","typeOrLabel","tsParseNonArrayType","labeledNode","optionalTypeNode","restNode","tsParseParenthesizedType","tsParseFunctionOrConstructorType","tsInAllowConditionalTypesContext","tsParseLiteralTypeNode","tsParseTemplateLiteralType","parseTemplate","parseTemplateSubstitution","tsParseThisTypeOrThisTypePredicate","thisKeyword","parseMaybeUnary","nodeType","tsParseArrayTypeOrHigher","tsParseTypeOperator","tsParseTypeOperatorOrHigher","tsCheckTypeAnnotationForReadOnly","tsParseInferType","tsParseConstraintForInferType","tsInDisallowConditionalTypesContext","tsParseUnionOrIntersectionType","parseConstituentType","hasLeadingOperator","tsParseIntersectionTypeOrHigher","tsParseUnionTypeOrHigher","tsIsStartOfFunctionType","tsIsUnambiguouslyStartOfFunctionType","tsSkipParameterStart","previousErrorCount","tsInType","t","tsParseTypePredicateAsserts","thisTypePredicate","typePredicateVariable","tsParseTypePredicatePrefix","tsTryParseTypeOrTypePredicateAnnotation","eatColon","tsParseNonConditionalType","checkType","extendsType","trueType","falseType","isAbstractConstructorSignature","tsParseTypeAssertion","tsParseHeritageClause","originalStartLoc","delimitedList","tsParseInterfaceDeclaration","tsParseTypeAliasDeclaration","tsInTopLevelContext","oldInDisallowConditionalTypesContext","tsNextThenParseType","tsParseEnumMember","initializer","tsParseEnumDeclaration","tsParseEnumBody","tsParseModuleBlock","parseBlockOrModuleBlockBody","tsParseModuleOrNamespaceDeclaration","nested","inner","tsParseAmbientExternalModuleDeclaration","global","tsParseImportEqualsDeclaration","maybeDefaultIdentifier","moduleReference","tsParseModuleReference","tsIsExternalModuleReference","tsParseExternalModuleReference","f","tsTryParseAndCatch","tsTryParseDeclare","startType","tsInAmbientContext","parseFunctionStatement","parseClass","parseVarStatement","isUsing","isAwaitUsing","tsParseDeclaration","tsTryParseExportDeclaration","tsParseExpressionStatement","mod","tsCheckLineTerminator","tsParseAbstractDeclaration","tsTryParseGenericAsyncArrowFunction","oldMaybeInArrowParameters","tsParseTypeArgumentsInExpression","tsIsDeclarationStart","override","pp","parameter","isSimpleParameter","tsDisallowOptionalPattern","bodilessType","registerFunctionStatementId","tsCheckForInvalidTypeCasts","items","isInParens","nonNullExpression","isOptionalCall","missingParenErrorLoc","atPossibleAsyncArrow","asyncArrowFn","parseTaggedTemplateExpression","tokenType","_callee$extra","parseExprOp","leftStartLoc","minPrec","isSatisfies","checkKeywords","checkDuplicateExports","importNode","parseMaybeImportPhase","parseImportSpecifiersAndAfter","nodeImportEquals","isAbstractClass","cls","allowMissingInitializer","declarations","isValidAmbientConstInitializer","parseStatementContent","parseAccessModifier","tsHasSomeModifiers","callParseClassMemberWithIsStatic","parseClassStaticBlock","parseClassMemberWithIsStatic","hadSuperClass","parsePostMemberNameModifiers","methodOrProp","isDeclare","parseClassPropertyAnnotation","definite","declareClassPrivateMethodInScope","_typeCast","_typeCast2","typeCast","_typeParameters","reportReservedArrowTypeParam","trailingComma","sawUnary","toAssignableParenthesizedExpression","parseMaybeDecoratorArguments","canHaveLeadingDecorator","getGetterSetterExpectedParamCount","baseCount","firstParam","parseCatchClauseParam","oldIsAmbientContext","oldStrict","oldInAbstractClass","maybeTakeDecorators","shouldParseAsAmbientContext","getExpression","parseExportSpecifier","isString","isInTypeExport","parseTypeOnlyImportExportSpecifier","isImport","isInTypeOnlyImportExport","leftOfAsKey","rightOfAsKey","leftOfAs","rightOfAs","hasTypeSpecifier","canParseAsKeyword","firstAs","secondAs","parseModuleExportName","kindKey","_node$directive","_node$decorators","_node$optional","_node$typeAnnotation","_node$accessibility","_node$decorators2","_node$override","_node$readonly","_node$static","_node$declare","_node$returnType","_node$typeParameters","_node$optional2","_node$optional3","_node$accessibility2","_node$readonly2","_node$static2","_node$declare2","_node$definite","_node$readonly3","_node$typeAnnotation2","_node$accessibility3","_node$decorators3","_node$override2","_node$optional4","_node$id","_node$abstract","_node$declare3","_node$decorators4","_node$implements","_node$superTypeArgume","_node$typeParameters2","_node$declare4","_node$definite2","_node$const","_node$declare5","_node$computed","_node$qualifier","_node$declare6","_node$extends","_node$declare7","_node$global","_node$const2","_node$in","_node$out","superTypeArguments","in","isPossiblyLiteralEnum","expressions","isUncomputedMemberExpressionChain","isNumber","isNegativeNumber","PlaceholderErrors","ClassNameIsRequired","UnexpectedSpace","placeholders","parsePlaceholder","expectedNode","assertNoSpace","finishPlaceholder","chStartsBindingIdentifier","verifyBreakContinue","isBreak","parseStatementOrSloppyAnnexBFunctionDeclaration","stmtPlaceholder","parseBlock","createNewLexicalScope","parseFunctionId","requireId","parseClassBody","maybeParseExportDefaultSpecifier","_specifiers","checkExport","filter","maybeParseStarImportSpecifier","parseNamedImportSpecifiers","parseImportSource","v8intrinsic","parseV8Intrinsic","v8IntrinsicStartLoc","parseIdentifierName","PIPELINE_PROPOSALS","TOPIC_TOKENS","validatePlugins","pluginsMap","decoratorsBeforeExport","allowCallParenthesized","_pluginsMap$get2","proposalList","p","tokenList","_pluginsMap$get","syntaxType","version","deprecatedAssertSyntax","RECORD_AND_TUPLE_SYNTAX_TYPES","missingPlugins","mixinPlugins","mixinPluginNames","ExpressionParser","checkProto","isRecord","sawProto","shouldExitDescending","disallowIn","disallowInAnd","parseExpressionBase","allowInAnd","parseMaybeAssignDisallowIn","isYield","parseYield","ownExpressionErrors","parseMaybeConditional","isAmbiguousPrefixOrIdentifier","parseExprOps","parseMaybeUnaryOrPrivate","op","prec","checkPipelineAtInfixOperator","logical","coalesce","parseExprOpRightExpr","finishedNode","nextOp","withTopicBindingContext","parseHackPipeBody","withSoloAwaitPermittingContext","parseFSharpPipelineBody","parseSmartPipelineBodyInStyle","parseExprOpBaseRightExpr","_body$extra","topicReferenceWasUsedInCurrentContext","checkExponentialAfterUnary","isAwait","recordAwaitIfAllowed","parseAwait","update","isDelete","parseUpdate","updateExpressionNode","parseExprSubscripts","maybeAsyncArrow","parseBind","parseCoverCallAndAsyncArrowHead","parseNoCallExpr","tag","quasi","allowPlaceholder","nodeForExtra","oldInFSharpPipelineDirectBody","addTrailingCommaExtraToNode","parseExprListItem","_call$extra","parseSuper","parseImportMetaPropertyOrPhaseCall","parseImportCall","parseDo","parseFunctionOrFunctionSent","parseDecorators","parseNewOrNewTarget","parseTopicReferenceThenEqualsSign","parseTopicReference","pipeProposal","lookaheadCh","parseModuleExpression","parseAsyncFunctionExpression","parseAsyncArrowUnaryFunction","topicTokenType","topicTokenValue","finishTopicReference","testTopicReferenceConfiguration","topicReferenceIsAllowedInCurrentContext","registerTopicReference","meta","parseMetaProperty","parseFunction","isSource","createIdentifierAt","innerStartLoc","spreadStartLoc","optionalCommaStartLoc","spreadNodeStartLoc","parseMaybeAssignAllowInOrVoidPattern","innerEndLoc","arrowNode","wrapParenthesis","parenExpression","metaProp","parseNew","parseExprList","parseTemplateElement","isTagged","elemStart","elem","isTail","endOffset","elemEnd","cooked","tail","curElt","quasis","substitutions","maybeAsyncOrAccessorProp","keyName","_params","parseObjectMethod","finishedProp","generator","isExpression","hasStrictModeDirective","nonSimple","isSimpleParamList","formalParameters","isAwaitAllowed","delegating","delegate","childExpr","isSimpleReference","checkSmartPipeTopicBodyEarlyErrors","callback","outerContextTopicState","withSmartMixTopicForbiddingContext","outerContextSoloAwaitState","ParamKind","ret","revertScopes","parseProgram","nextCode","loopLabel","switchLabel","loneSurrogate","keywordRelationalOperator","babel7CompatTokens","hashEndPos","hashEndLoc","backquoteEnd","backquoteEndLoc","startToken","templateValue","templateElementEnd","templateElementEndLoc","endToken","StatementParser","interpreter","parseInterpreterDirective","finishedProgram","stmtToDirective","directiveLiteral","hasFollowingBindingAtom","isForUsing","nextCharAfterOf","endCh","chStartsBindingPattern","hasInLineFollowingBindingIdentifierOrBrace","allowsUsing","parseModuleItem","ParseStatementFlag","parseStatementListItem","allowLabeledFunction","parseStatement","allowDeclaration","allowFunctionDeclaration","parseBreakContinueStatement","parseDebuggerStatement","parseDoWhileStatement","parseForStatement","parseIfStatement","parseReturnStatement","parseSwitchStatement","parseThrowStatement","parseTryStatement","parseWhileStatement","parseWithStatement","parseEmptyStatement","nextTokenCharCode","isAsyncFunction","maybeName","parseLabeledStatement","decoratorsEnabledBeforeExport","maybeDecorators","classNode","exportNode","_classNode$decorators","allowExport","paramsStartLoc","lab","parseHeaderExpression","awaitAt","parseFor","startsWithLet","startsWithAwaitUsing","starsWithUsingDeclaration","isLetOrUsing","initNode","parseVar","isForIn","parseForIn","startsWithAsync","isForOf","isHangingDeclaration","ParseFunctionFlag","discriminant","cases","cur","sawDefault","isCase","block","handler","clause","finalizer","statementStart","parsedNonDirective","await","isFor","hangingDeclaration","isDeclaration","hadConstructor","publicMethod","privateMethod","publicProp","privateProp","accessorProp","publicMember","parseClassElementName","maybeContextualKw","isPrivate","maybeQuestionTokenStartLoc","pushClassPrivateProperty","pushClassProperty","pushClassAccessorProperty","_member$decorators","parseInitializer","hasDefault","parseAfterDefault","hasStar","parseAfterNamespace","isFromRequired","hasSpecifiers","maybeParseExportNamedSpecifiers","hasDeclaration","maybeParseExportDeclaration","_node2$declaration","_ref$specifiers","isTypeExport","assertions","nextChar","hasFrom","nextAfterFrom","maybeParseImportAttributes","checkJSONModuleImport","checkNames","isDefault","isFrom","_node$specifiers","_declaration$extra","nodes","surrogate","isJSONModuleImport","singleBindingType","_node$assertions","nonDefaultNamedSpecifier","find","phaseIdentifier","phaseIdentifierName","isPrecedingIdImportPhase","parseImportSourceAndAttributes","parseNext","maybeParseDefaultImportSpecifier","_node$specifiers2","parseImportAttributes","attrs","attrNames","parseModuleAttributes","useWith","importSpecifier","Parser","_options","getParser","ast","moduleError","generateExportedTokenTypes","internalTokenTypes","tokTypes","getParserClass","parserClassCache","pluginList","require_estree_walker","__commonJSMin","exports","module","global","factory","WalkerBase","node","parent","prop","index","SyncWalker","enter","leave","_should_skip","_should_remove","_replacement","skipped","removed","key","value","i","AsyncWalker","walk","ast","asyncWalk","require_base64","__commonJSMin","exports","intToCharMap","number","charCode","bigA","bigZ","littleA","littleZ","zero","nine","plus","slash","littleOffset","numberOffset","require_base64_vlq","__commonJSMin","exports","base64","VLQ_BASE_SHIFT","VLQ_BASE","VLQ_BASE_MASK","VLQ_CONTINUATION_BIT","toVLQSigned","aValue","fromVLQSigned","isNegative","shifted","encoded","digit","vlq","aStr","aIndex","aOutParam","strLen","result","shift","continuation","require_util","__commonJSMin","exports","getArg","aArgs","aName","aDefaultValue","urlRegexp","dataUrlRegexp","urlParse","aUrl","match","urlGenerate","aParsedUrl","url","MAX_CACHED_INPUTS","lruMemoize","f","cache","input","i","temp","result","normalize","aPath","path","isAbsolute","parts","start","part","up","join","aRoot","aPathUrl","aRootUrl","joined","relative","level","index","supportsNullProto","obj","identity","s","toSetString","aStr","isProtoString","fromSetString","length","compareByOriginalPositions","mappingA","mappingB","onlyCompareOriginal","cmp","strcmp","compareByOriginalPositionsNoSource","compareByGeneratedPositionsDeflated","onlyCompareGenerated","compareByGeneratedPositionsDeflatedNoLine","aStr1","aStr2","compareByGeneratedPositionsInflated","parseSourceMapInput","str","computeSourceURL","sourceRoot","sourceURL","sourceMapURL","parsed","require_array_set","__commonJSMin","exports","util","has","hasNativeMap","ArraySet","aArray","aAllowDuplicates","set","i","len","aStr","sStr","isDuplicate","idx","aIdx","require_mapping_list","__commonJSMin","exports","util","generatedPositionAfter","mappingA","mappingB","lineA","lineB","columnA","columnB","MappingList","aCallback","aThisArg","aMapping","require_source_map_generator","__commonJSMin","exports","base64VLQ","util","ArraySet","MappingList","SourceMapGenerator","aArgs","aSourceMapConsumer","generatorOps","sourceRoot","generator","mapping","newMapping","sourceFile","sourceRelative","content","generated","original","source","name","aSourceFile","aSourceContent","aSourceMapPath","newSources","newNames","aGenerated","aOriginal","aSource","aName","message","previousGeneratedColumn","previousGeneratedLine","previousOriginalColumn","previousOriginalLine","previousName","previousSource","result","next","nameIdx","sourceIdx","mappings","i","len","aSources","aSourceRoot","key","map","require_binary_search","__commonJSMin","exports","recursiveSearch","aLow","aHigh","aNeedle","aHaystack","aCompare","aBias","mid","cmp","index","require_quick_sort","__commonJSMin","exports","SortTemplate","comparator","swap","ary","x","y","temp","randomIntInRange","low","high","doQuickSort","p","r","pivotIndex","i","pivot","j","q","cloneSort","template","sortCache","start","require_source_map_consumer","__commonJSMin","exports","util","binarySearch","ArraySet","base64VLQ","quickSort","SourceMapConsumer","aSourceMap","aSourceMapURL","sourceMap","IndexedSourceMapConsumer","BasicSourceMapConsumer","aStr","index","c","aSourceRoot","aCallback","aContext","aOrder","context","order","mappings","sourceRoot","boundCallback","names","sources","sourceMapURL","i","n","mapping","source","aArgs","line","needle","originalLine","originalColumn","version","sourcesContent","file","s","aSource","relativeSource","smc","generatedMappings","destGeneratedMappings","destOriginalMappings","length","srcMapping","destMapping","Mapping","compareGenerated","sortGenerated","array","start","l","b","j","a","generatedLine","previousGeneratedColumn","previousOriginalLine","previousOriginalColumn","previousSource","previousName","cachedSegments","temp","originalMappings","str","segment","end","value","subarrayStart","currentSource","aNeedle","aMappings","aLineName","aColumnName","aComparator","aBias","nextMapping","name","sc","nullOnMissing","url","fileUriAbsPath","sections","lastOffset","offset","offsetLine","offsetColumn","sectionIndex","section","cmp","content","generatedPosition","ret","sectionMappings","adjustedMapping","require_source_node","__commonJSMin","exports","SourceMapGenerator","util","REGEX_NEWLINE","NEWLINE_CODE","isSourceNode","SourceNode","aLine","aColumn","aSource","aChunks","aName","aGeneratedCode","aSourceMapConsumer","aRelativePath","node","remainingLines","remainingLinesIndex","shiftNextLine","lineContents","getNextLine","newLine","lastGeneratedLine","lastGeneratedColumn","lastMapping","mapping","addMappingWithCode","nextLine","code","sourceFile","content","source","aChunk","chunk","i","aFn","len","aSep","newChildren","aPattern","aReplacement","lastChild","aSourceFile","aSourceContent","sources","str","aArgs","generated","map","sourceMappingActive","lastOriginalSource","lastOriginalLine","lastOriginalColumn","lastOriginalName","original","idx","length","sourceContent","require_source_map","__commonJSMin","exports","require_compiler_core_cjs_prod","__commonJSMin","exports","shared","decode_js","parser","estreeWalker","sourceMapJs","FRAGMENT","TELEPORT","SUSPENSE","KEEP_ALIVE","BASE_TRANSITION","OPEN_BLOCK","CREATE_BLOCK","CREATE_ELEMENT_BLOCK","CREATE_VNODE","CREATE_ELEMENT_VNODE","CREATE_COMMENT","CREATE_TEXT","CREATE_STATIC","RESOLVE_COMPONENT","RESOLVE_DYNAMIC_COMPONENT","RESOLVE_DIRECTIVE","RESOLVE_FILTER","WITH_DIRECTIVES","RENDER_LIST","RENDER_SLOT","CREATE_SLOTS","TO_DISPLAY_STRING","MERGE_PROPS","NORMALIZE_CLASS","NORMALIZE_STYLE","NORMALIZE_PROPS","GUARD_REACTIVE_PROPS","TO_HANDLERS","CAMELIZE","CAPITALIZE","TO_HANDLER_KEY","SET_BLOCK_TRACKING","PUSH_SCOPE_ID","POP_SCOPE_ID","WITH_CTX","UNREF","IS_REF","WITH_MEMO","IS_MEMO_SAME","helperNameMap","registerRuntimeHelpers","helpers","s","Namespaces","NodeTypes","ElementTypes","ConstantTypes","locStub","createRoot","children","source","createVNodeCall","context","tag","props","patchFlag","dynamicProps","directives","isBlock","disableTracking","isComponent","loc","getVNodeBlockHelper","getVNodeHelper","createArrayExpression","elements","createObjectExpression","properties","createObjectProperty","key","value","createSimpleExpression","content","isStatic","constType","createInterpolation","createCompoundExpression","createCallExpression","callee","args","createFunctionExpression","params","returns","newline","isSlot","createConditionalExpression","test","consequent","alternate","createCacheExpression","index","needPauseTracking","inVOnce","createBlockStatement","body","createTemplateLiteral","createIfStatement","createAssignmentExpression","left","right","createSequenceExpression","expressions","createReturnStatement","ssr","convertToBlock","node","helper","removeHelper","inSSR","defaultDelimitersOpen","defaultDelimitersClose","isTagStartChar","c","isWhitespace","isEndOfTagSection","toCharCodes","str","ret","i","Sequences","Tokenizer","stack","cbs","cp","consumed","line","column","newlineIndex","start","isEnd","endOfText","actualIndex","cc","sequence","offset","quote","length","input","endIndex","CompilerDeprecationTypes","deprecationData","getCompatValue","compatConfig","isCompatEnabled","mode","checkCompatEnabled","warnDeprecation","message","link","msg","err","defaultOnError","error","defaultOnWarn","createCompilerError","code","messages","additionalMessage","errorMessages","ErrorCodes","walkIdentifiers","root","onIdentifier","includeAll","parentStack","knownIds","rootExp","parent","TS_NODE_TYPES","isLocal","isRefed","isReferencedIdentifier","isFunctionType","id","markKnownIds","walkFunctionParams","markScopeIdentifier","walkBlockDeclarations","extractIdentifiers","isForStatement","walkForStatement","isReferenced","isInDestructureAssignment","p","isInNewExpression","onIdent","block","stmt","decl","isVar","variable","param","nodes","object","prop","element","name","child","isStaticProperty","isStaticPropertyKey","grandparent","unwrapTSNode","isStaticExp","isCoreComponent","nonIdentifierRE","isSimpleIdentifier","validFirstIdentCharRE","validIdentCharRE","whitespaceRE","getExpSource","exp","isMemberExpressionBrowser","path","state","stateStack","currentOpenBracketCount","currentOpenParensCount","currentStringType","char","isMemberExpressionNode","isMemberExpression","fnExpRE","isFnExpressionBrowser","isFnExpressionNode","isFnExpression","advancePositionWithClone","pos","numberOfCharacters","advancePositionWithMutation","linesCount","lastNewLinePos","assert","condition","findDir","allowEmpty","findProp","dynamicOnly","isStaticArgOf","arg","hasDynamicKeyVBind","isText$1","isVPre","isVSlot","isTemplateNode","isSlotOutlet","propsHelperSet","getUnnormalizedProps","callPath","injectProp","propsWithInjection","parentCall","first","hasProp","result","propKeyName","toValidAssetId","type","searchValue","replaceValue","hasScopeRef","ids","b","getMemoedVNodeCall","forAliasRE","defaultParserOptions","currentOptions","currentRoot","currentInput","currentOpenTag","currentProp","currentAttrValue","currentAttrStartIndex","currentAttrEndIndex","inPre","inVPre","currentVPreBoundary","tokenizer","emitError","end","onText","getSlice","innerStart","innerEnd","addNode","createExp","getLoc","endOpenTag","found","j","el","onCloseTag","backTrack","raw","dirToAttr","setLocEnd","mod","condense","expParseMode","parseForExpression","syncIndex","forIteratorRE","stripParensRE","inMatch","LHS","RHS","createAliasExpression","asParam","valueContent","trimmedOffset","iteratorMatch","keyContent","keyOffset","indexContent","ns","lastNode","isImplied","lookAhead","isFragmentTemplate","condenseWhitespace","inlineTemplateProp","specialTemplateDir","isUpperCase","windowsNewlineRE","shouldCondense","removedWhitespace","isAllWhitespace","prev","next","hasNewlineChar","prevCharIsWhitespace","cloneLoc","dir","attr","parseMode","plugins","options","e","reset","baseParse","delimiters","cacheStatic","walk","getSingleElementRoot","x","doNotHoistNode","inFor","toCache","constantType","getConstantType","codegenNode","flag","getGeneratedPropsConstantType","getNodeProps","i2","cachedAsArray","slotCacheKeys","getCacheExpression","slot","getSlotNode","slotName","node2","constantCache","cached","returnType2","generatedPropsType","childType","expType","returnType","allowHoistedHelperSet","getConstantTypeOfHelperCall","keyType","valueType","createTransformContext","filename","prefixIdentifiers","hoistStatic","hmr","cacheHandlers","nodeTransforms","directiveTransforms","transformHoist","isBuiltInComponent","isCustomElement","expressionPlugins","scopeId","slotted","ssrCssVars","bindingMetadata","inline","isTS","onError","onWarn","nameMatch","count","currentCount","list","removalIndex","addId","removeId","identifier","isVNode","cacheExp","identifiers","transform","traverseNode","createRootCodegen","singleElementRootChild","traverseChildren","nodeRemoved","exitFns","onExit","createStructuralDirectiveTransform","fn","matches","PURE_ANNOTATION","aliasHelper","createCodegenContext","ast","sourceMap","optimizeImports","runtimeGlobalName","runtimeModuleName","ssrRuntimeModuleName","addMapping","withoutNewLine","n","_names","_mappings","generate","push","indent","deindent","hasHelpers","useWithBlock","genScopeId","isSetupInlined","preambleContext","genModulePreamble","genFunctionPreamble","functionName","signature","genAssets","genNode","VueBinding","staticHelpers","genHoists","genImports","assets","resolver","maybeSelfReference","hoists","importsOptions","imports","isText","genNodeListAsArray","multilines","genNodeList","comma","genText","genExpression","genInterpolation","genCompoundExpression","genComment","genVNodeCall","genCallExpression","genObjectExpression","genArrayExpression","genFunctionExpression","genConditionalExpression","genCacheExpression","genTemplateLiteral","genIfStatement","genAssignmentExpression","genSequenceExpression","genReturnStatement","pure","genExpressionAsPropertyKey","text","patchFlagString","callHelper","genNullableArgs","needNewline","needsParens","isNested","needArraySpread","l","isLiteralWhitelisted","transformExpression","processExpression","memo","asParams","asRawStatements","localVars","rewriteIdentifier","isAssignmentLVal","isUpdateArg","isDestructureAssignment","isNewExpression","wrapWithUnref","raw2","wrapped","isConst","rVal","operator","rExp","rawExp","rExpString","stringifyExpression","isPrefix","prefix","postfix","isScopeVarReference","isAllowedGlobal","isLiteral","_","needPrefix","canPrefix","a","last","leadingText","transformIf","processIf","ifNode","branch","isRoot","siblings","sibling","createCodegenNodeForBranch","parentCondition","getParentCondition","processCodegen","createIfBranch","userKey","isSameKey","isTemplateIf","keyIndex","createChildrenCodegenNode","keyProperty","firstChild","vnodeCall","branchExp","transformBind","_node","modifiers","transformBindShorthand","injectPrefix","propName","transformFor","processFor","forNode","renderExp","isTemplate","keyProp","isDirKey","keyExp","isStableFragment","fragmentFlag","childBlock","needFragmentWrapper","slotOutlet","loop","createForLoopParams","parseResult","finalizeForParseResult","addIdentifiers","removeIdentifiers","scopes","memoArgs","createParamsList","defaultFallback","trackSlotScopes","vSlot","slotProps","trackVForSlotScopes","vFor","buildClientSlotFn","_vForExp","buildSlots","buildSlotFn","slotsProperties","dynamicSlots","hasDynamicSlots","onComponentSlot","hasTemplateSlots","hasNamedDefaultSlot","implicitDefaultChildren","seenSlotNames","conditionalBranchIndex","slotElement","slotDir","slotChildren","slotLoc","dirLoc","staticSlotName","slotFunction","vIf","vElse","buildDynamicSlot","isNonWhitespaceContent","conditional","buildDefaultSlotProperty","children2","slotFlag","hasForwardedSlots","slots","directiveImportMap","transformElement","vnodeTag","resolveComponentType","isDynamicComponent","vnodeProps","vnodeChildren","vnodeDynamicProps","dynamicPropNames","vnodeDirectives","shouldUseBlock","propsBuildResult","buildProps","buildDirectiveArgs","hasDynamicTextChild","stringifyDynamicPropNames","isExplicitDynamic","isComponentTag","isProp","builtIn","fromSetup","resolveSetupReference","dotIndex","bindings","camelName","PascalName","checkType","fromConst","fromMaybeRef","fromProps","elementLoc","mergeArgs","runtimeDirectives","hasChildren","hasRef","hasClassBinding","hasStyleBinding","hasHydrationEventBinding","hasDynamicKeys","hasVnodeHook","pushMergeArg","dedupeProperties","pushRefVForMarker","analyzePatchFlag","isEventHandler","nameLoc","binding","isVBind","isVOn","directiveTransform","props2","needRuntime","propsExpression","classKeyIndex","styleKeyIndex","hasDynamicKey","classProp","styleProp","knownProps","deduped","existing","mergeAsArray","incoming","dirArgs","runtime","trueExpression","modifier","propsNamesString","transformSlotOutlet","processSlotOutlet","slotArgs","expectedLen","nonNameProps","transformOn","augmentor","eventName","rawName","eventString","shouldCache","isMemberExp","isInlineStatement","hasMultipleStatements","transformText","currentContainer","hasText","callArgs","seen$1","transformOnce","cur","transformModel","createTransformProps","expString","bindingType","maybeRef","assignmentExp","eventArg","altAssignment","m","modifiersKey","validDivisionCharRE","transformFilter","rewriteFilter","parseFilter","inSingle","inDouble","inTemplateString","inRegex","curly","square","paren","lastFilterIndex","expression","filters","pushFilter","wrapFilter","filter","seen","transformMemo","getBaseTransformPreset","baseCompile","isModuleMode","resolvedOptions","BindingTypes","noopDirectiveTransform","require_compiler_core","__commonJSMin","exports","module","require_compiler_dom_cjs_prod","__commonJSMin","exports","compilerCore","shared","V_MODEL_RADIO","V_MODEL_CHECKBOX","V_MODEL_TEXT","V_MODEL_SELECT","V_MODEL_DYNAMIC","V_ON_WITH_MODIFIERS","V_ON_WITH_KEYS","V_SHOW","TRANSITION","TRANSITION_GROUP","parserOptions","tag","parent","rootNamespace","ns","transformStyle","node","p","i","parseInlineCSS","cssText","loc","normalized","createDOMCompilerError","code","DOMErrorMessages","DOMErrorCodes","transformVHtml","dir","context","exp","transformVText","transformModel","baseResult","isCustomElement","directiveToUse","isInvalidType","type","isEventOptionModifier","isNonKeyModifier","maybeKeyModifier","isKeyboardEvent","resolveModifiers","key","modifiers","keyModifiers","nonKeyModifiers","eventOptionModifiers","modifier","transformClick","event","transformOn","handlerExp","modifierPostfix","transformShow","expReplaceRE","stringifyStatic","children","isParentCached","nc","ec","currentChunk","stringifyCurrentChunk","currentIndex","staticCall","stringifyNode","deleteCount","cacheIndex","i2","c","child","getCachedNode","result","analyzeNode","dataAriaRE","isStringifiableAttr","name","isNonStringifiable","bailed","bail","walk","node2","isOptionTag","stringifyElement","evaluateConstant","res","innerHTML","evaluated","arg","ignoreSideEffectTags","DOMNodeTransforms","DOMDirectiveTransforms","compile","src","options","parse","template","k","require_compiler_dom","__commonJSMin","exports","module","require_reactivity_cjs_prod","__commonJSMin","exports","shared","activeEffectScope","EffectScope","detached","i","l","fn","currentEffectScope","fromParent","last","effectScope","getCurrentScope","onScopeDispose","failSilently","activeSub","EffectFlags","pausedQueueEffects","ReactiveEffect","batch","cleanupEffect","prepareDeps","prevEffect","prevShouldTrack","shouldTrack","cleanupDeps","link","removeSub","isDirty","batchDepth","batchedSub","batchedComputed","sub","isComputed","startBatch","endBatch","next","error","err","head","tail","prev","removeDep","refreshComputed","computed","globalVersion","dep","prevSub","value","soft","nextSub","prevDep","nextDep","effect","options","e","runner","stop","trackStack","pauseTracking","enableTracking","resetTracking","onEffectCleanup","cleanup","Link","Dep","debugInfo","addSub","currentTail","targetMap","ITERATE_KEY","MAP_KEY_ITERATE_KEY","ARRAY_ITERATE_KEY","track","target","type","key","depsMap","trigger","newValue","oldValue","oldTarget","run","targetIsArray","isArrayIndex","newLength","key2","getDepFromReactive","object","depMap","reactiveReadArray","array","raw","toRaw","isShallow","toReactive","shallowReadArray","arr","arrayInstrumentations","iterator","args","x","thisArg","apply","v","searchProxy","separator","noTracking","reduce","comparer","self","method","wrapValue","iter","result","arrayProto","wrappedRetFn","needsWrap","methodFn","result2","wrappedFn","item","index","acc","res","isProxy","isNonTrackableKeys","builtInSymbols","hasOwnProperty","obj","BaseReactiveHandler","_isReadonly","_isShallow","receiver","isReadonly2","isShallow2","shallowReadonlyMap","readonlyMap","shallowReactiveMap","reactiveMap","isRef","readonly","reactive","MutableReactiveHandler","isOldValueReadonly","isReadonly","hadKey","ReadonlyReactiveHandler","mutableHandlers","readonlyHandlers","shallowReactiveHandlers","shallowReadonlyHandlers","toShallow","getProto","createIterableMethod","rawTarget","targetIsMap","isPair","isKeyOnly","innerIterator","wrap","toReadonly","done","createReadonlyMethod","createInstrumentations","shallow","instrumentations","rawKey","has","callback","observed","get","hadItems","createInstrumentationGetter","mutableCollectionHandlers","shallowCollectionHandlers","readonlyCollectionHandlers","shallowReadonlyCollectionHandlers","targetTypeMap","rawType","getTargetType","createReactiveObject","shallowReactive","shallowReadonly","baseHandlers","collectionHandlers","proxyMap","targetType","existingProxy","proxy","isReactive","markRaw","ref","createRef","shallowRef","rawValue","RefImpl","useDirectValue","triggerRef","ref2","unref","toValue","source","shallowUnwrapHandlers","proxyRefs","objectWithRefs","CustomRefImpl","factory","set","newVal","customRef","toRefs","ret","propertyToRef","ObjectRefImpl","_object","_key","_defaultValue","val","GetterRefImpl","_getter","toRef","defaultValue","ComputedRefImpl","setter","isSSR","getterOrOptions","debugOptions","getter","TrackOpTypes","TriggerOpTypes","ReactiveFlags","WatchErrorCodes","INITIAL_WATCHER_VALUE","cleanupMap","activeWatcher","getCurrentWatcher","onWatcherCleanup","cleanupFn","owner","cleanups","watch","cb","immediate","deep","once","scheduler","augmentJob","call","reactiveGetter","source2","traverse","boundCleanup","forceTrigger","isMultiSource","s","currentEffect","baseGetter","depth","scope","watchHandle","_cb","job","immediateFirstRun","currentWatcher","cleanup2","seen","require_reactivity","__commonJSMin","exports","module","require_runtime_core_cjs_prod","__commonJSMin","exports","reactivity","shared","pushWarningContext","vnode","popWarningContext","assertNumber","val","type","ErrorCodes","ErrorTypeStrings$1","callWithErrorHandling","fn","instance","args","err","handleError","callWithAsyncErrorHandling","res","values","i","throwInDev","contextVNode","errorHandler","throwUnhandledErrorInProduction","cur","exposedInstance","errorInfo","errorCapturedHooks","logError","throwInProd","queue","flushIndex","pendingPostFlushCbs","activePostFlushCbs","postFlushIndex","resolvedPromise","currentFlushPromise","nextTick","p","findInsertionIndex","id","start","end","middle","middleJob","middleJobId","getId","queueJob","job","jobId","lastJob","queueFlush","flushJobs","queuePostFlushCb","cb","flushPreFlushCbs","seen","flushPostFlushCbs","deduped","a","b","currentRenderingInstance","currentScopeId","setCurrentRenderingInstance","prev","pushScopeId","popScopeId","withScopeId","_id","withCtx","ctx","isNonScopedSlot","renderFnWithContext","setBlockTracking","prevInstance","withDirectives","directives","getComponentPublicInstance","bindings","dir","value","arg","modifiers","invokeDirectiveHook","prevVNode","name","oldBindings","binding","hook","TeleportEndKey","isTeleport","isTeleportDisabled","props","isTeleportDeferred","isTargetSVG","target","isTargetMathML","resolveTarget","select","targetSelector","TeleportImpl","n1","n2","container","anchor","parentComponent","parentSuspense","namespace","slotScopeIds","optimized","internals","mountChildren","patchChildren","patchBlockChildren","insert","querySelector","createText","createComment","disabled","shapeFlag","children","dynamicChildren","placeholder","mainAnchor","mount","container2","anchor2","mountToTarget","targetAnchor","prepareAnchor","updateCssVars","queuePostRenderEffect","wasDisabled","currentContainer","currentAnchor","traverseStaticChildren","moveTeleport","nextTarget","unmount","hostRemove","doRemove","targetStart","shouldRemove","child","hydrateTeleport","parentAnchor","move","moveType","el","isReorder","node","nextSibling","parentNode","hydrateChildren","targetNode","Teleport","isDisabled","leaveCbKey","enterCbKey","useTransitionState","state","onMounted","onBeforeUnmount","TransitionHookValidator","BaseTransitionPropsValidators","recursiveGetSubtree","subTree","BaseTransitionImpl","slots","getCurrentInstance","getTransitionRawChildren","findNonCommentChild","rawProps","mode","emptyPlaceholder","innerChild","getInnerChild$1","enterHooks","resolveTransitionHooks","hooks","Comment","setTransitionHooks","oldInnerChild","isSameVNodeType","leavingHooks","earlyRemove","delayedLeave","leavingVNodesCache","getLeavingNodesForType","c","BaseTransition","leavingVNodes","postClone","appear","persisted","onBeforeEnter","onEnter","onAfterEnter","onEnterCancelled","onBeforeLeave","onLeave","onAfterLeave","onLeaveCancelled","onBeforeAppear","onAppear","onAfterAppear","onAppearCancelled","key","callHook","callAsyncHook","done","hook2","leavingVNode","afterHook","cancelHook","called","cancelled","remove","key2","vnode2","hooks2","isKeepAlive","cloneVNode","keepComment","parentKey","ret","keyedFragmentCount","Fragment","defineComponent","options","extraOptions","useId","markAsyncBoundary","useTemplateRef","r","refs","setRef","rawRef","oldRawRef","isUnmount","isAsyncWrapper","refValue","owner","ref","oldRef","setupState","rawSetupState","canSetSetupRef","_isString","_isRef","doSet","existing","hasLoggedMismatchError","logMismatchError","isSVGContainer","isMathMLContainer","getContainerType","isComment","createHydrationFunctions","rendererInternals","mountComponent","patch","patchProp","hydrate","hydrateNode","isFragmentStart","onMismatch","handleMismatch","patchFlag","domType","nextNode","Text","isTemplateNode","replaceNode","Static","needToAdoptContent","hydrateFragment","hydrateElement","locateClosingAnchor","createVNode","createTextVNode","dirs","transition","forcePatch","needCallTransitionHooks","needTransition","content","cls","next","isMismatchAllowed","clientText","isCustomElement","vnodeHooks","invokeVNodeHook","queueEffectWithSuspense","parentVNode","l","normalizeVNode","isText","fragmentSlotScopeIds","isFragment","next2","updateHOCHostEl","open","close","match","newNode","oldNode","parentNode2","parent","allowMismatchAttr","MismatchTypeString","allowedType","allowedAttr","list","requestIdleCallback","cancelIdleCallback","hydrateOnIdle","timeout","elementIsVisibleInViewport","top","left","bottom","right","innerHeight","innerWidth","hydrateOnVisible","opts","forEach","ob","entries","e","hydrateOnMediaQuery","query","mql","hydrateOnInteraction","interactions","hasHydrated","doHydrate","teardown","forEachElement","depth","defineAsyncComponent","source","loader","loadingComponent","errorComponent","delay","hydrateStrategy","suspensible","userOnError","pendingRequest","resolvedComp","retries","retry","load","thisRequest","resolve","reject","comp","patched","performHydrate","currentInstance","createInnerComp","onError","isInSSRComponentSetup","loaded","error","delayed","ref2","ce","KeepAliveImpl","sharedContext","cache","keys","current","_unmount","createElement","storageContainer","instance2","vnodeHook","invalidateMount","resetShapeFlag","pruneCache","filter","getComponentName","pruneCacheEntry","cached","watch","include","exclude","matches","pendingCacheKey","cacheSubtree","isSuspense","getInnerChild","onUpdated","suspense","da","rawVNode","isVNode","max","cachedVNode","KeepAlive","pattern","onActivated","registerKeepAliveHook","onDeactivated","wrappedHook","injectHook","injectToKeepAliveRoot","keepAliveRoot","injected","onUnmounted","prepend","reset","setCurrentInstance","createHook","lifecycle","onBeforeMount","onBeforeUpdate","onServerPrefetch","onRenderTriggered","onRenderTracked","onErrorCaptured","COMPONENTS","DIRECTIVES","resolveComponent","maybeSelfReference","resolveAsset","NULL_DYNAMIC_COMPONENT","resolveDynamicComponent","component","resolveDirective","warnMissing","Component","selfName","registry","renderList","renderItem","index","sourceIsArray","sourceIsReactiveArray","needsWrap","isReadonlySource","item","createSlots","dynamicSlots","slot","j","renderSlot","fallback","noSlotted","openBlock","createBlock","validSlotContent","ensureValidVNode","slotKey","rendered","vnodes","toHandlers","obj","preserveCaseIfNecessary","getPublicInstance","isStatefulComponent","publicPropertiesMap","resolveMergedOptions","instanceWatch","hasSetupBinding","PublicInstanceProxyHandlers","data","accessCache","appContext","normalizedProps","n","shouldCacheAccess","publicGetter","cssModule","globalProperties","propsOptions","descriptor","RuntimeCompiledPublicInstanceProxyHandlers","_","defineProps","defineEmits","defineExpose","exposed","defineOptions","defineSlots","defineModel","withDefaults","defaults","useSlots","getContext","useAttrs","calledFunctionName","createSetupContext","normalizePropsOrEmits","normalized","mergeDefaults","raw","opt","mergeModels","createPropsRestProxy","excludedKeys","withAsyncContext","getAwaitable","awaitable","unsetCurrentInstance","applyOptions","publicThis","dataOptions","computedOptions","methods","watchOptions","provideOptions","injectOptions","created","beforeMount","mounted","beforeUpdate","updated","activated","deactivated","beforeDestroy","beforeUnmount","destroyed","unmounted","render","renderTracked","renderTriggered","errorCaptured","serverPrefetch","expose","inheritAttrs","components","filters","resolveInjections","methodHandler","get","set","computed","v","createWatcher","provides","provide","registerLifecycleHook","register","_hook","checkDuplicateProperties","normalizeInject","inject","h","getter","createPathGetter","handler","base","mixins","extendsOptions","globalMixins","optionMergeStrategies","resolved","m","mergeOptions","to","from","strats","asMixin","strat","internalOptionMergeStrats","mergeDataFn","mergeEmitsOrPropsOptions","mergeObjectOptions","mergeAsArray","mergeWatchOptions","mergeInject","merged","createAppContext","uid$1","createAppAPI","rootComponent","rootProps","context","installedPlugins","pluginCleanupFns","isMounted","app","version","plugin","mixin","directive","rootContainer","isHydrate","cleanupFn","lastApp","currentApp","parentProvides","defaultValue","treatDefaultAsFactory","hasInjectionContext","internalObjectProto","createInternalObject","isInternalObject","initProps","isStateful","isSSR","attrs","setFullProps","updateProps","rawPrevProps","rawCurrentProps","hasAttrsChanged","propsToUpdate","isEmitListener","camelizedKey","resolvePropValue","kebabKey","needCastKeys","rawCastValues","camelKey","castValues","isAbsent","hasDefault","propsDefaults","mixinPropsCache","normalizePropsOptions","hasExtends","extendProps","raw2","normalizedKey","validatePropName","prop","propType","shouldCast","shouldCastTrue","typeName","isInternalKey","normalizeSlotValue","normalizeSlot","rawSlot","normalizeObjectSlots","rawSlots","normalizeVNodeSlots","assignSlots","initSlots","cacheIndexes","updateSlots","needDeletionCheck","deletionComparisonTarget","createRenderer","baseCreateRenderer","createHydrationRenderer","createHydrationFns","hostInsert","hostPatchProp","hostCreateElement","hostCreateText","hostCreateComment","hostSetText","hostSetElementText","hostParentNode","hostNextSibling","hostSetScopeId","hostInsertStaticContent","getNextHostNode","processText","processCommentNode","mountStaticNode","processFragment","processElement","processComponent","moveStaticNode","removeStaticNode","mountElement","patchElement","resolveChildrenNamespace","setScopeId","scopeId","cloneIfMounted","oldProps","newProps","toggleRecurse","patchProps","oldChildren","newChildren","fallbackContainer","oldVNode","newVNode","fragmentStartAnchor","fragmentEndAnchor","updateComponent","initialVNode","createComponentInstance","setupComponent","setupRenderEffect","shouldUpdateComponent","updateComponentPreRender","componentUpdateFn","bu","u","nonHydratedAsyncRoot","locateNonHydratedAsyncRoot","originNext","nextTree","renderComponentRoot","prevTree","bm","root","isAsyncWrapperVNode","hydrateSubTree","scopedInitialVNode","effect","update","nextVNode","prevProps","c1","prevShapeFlag","c2","patchKeyedChildren","patchUnkeyedChildren","unmountChildren","oldLength","newLength","commonLength","nextChild","l2","e1","e2","nextPos","s1","s2","keyToNewIndexMap","toBePatched","moved","maxNewIndexSoFar","newIndexToOldIndexMap","prevChild","newIndex","increasingNewIndexSequence","getSequence","nextIndex","anchorVNode","leave","delayLeave","afterLeave","remove2","performLeave","cacheIndex","shouldInvokeDirs","shouldInvokeVnodeHook","unmountComponent","removeFragment","performRemove","bum","scope","um","slotCacheKeys","teleportEnd","isFlushing","currentNamespace","allowed","shallow","ch1","ch2","arr","result","len","arrI","subComponent","ssrContextKey","useSSRContext","watchEffect","doWatch","watchPostEffect","watchSyncEffect","immediate","deep","flush","once","baseWatchOptions","runsImmediately","ssrCleanup","watchStopHandle","isPre","isFirstRun","watchHandle","path","segments","useModel","camelizedName","hyphenatedName","getModelModifiers","track","trigger","localValue","prevSetValue","prevEmittedValue","propValue","emittedValue","i2","modelName","emit","event","rawArgs","isModelListener","handlerName","onceHandler","normalizeEmitsOptions","extendEmits","normalizedFromExtend","proxy","withProxy","renderCache","fallthroughAttrs","proxyToUse","thisProxy","render2","getFunctionalFallthrough","blockStack","filterModelListeners","filterSingleRoot","recurse","singleRoot","prevChildren","nextProps","nextChildren","emits","hasPropsChanged","dynamicProps","emitsOptions","nextKeys","suspenseId","SuspenseImpl","mountSuspense","patchSuspense","hydrateSuspense","normalizeSuspenseChildren","Suspense","triggerEvent","eventListener","hiddenContainer","createSuspenseBoundary","setActiveBranch","newBranch","newFallback","activeBranch","pendingBranch","isInFallback","isHydrating","pendingId","parentSuspenseId","isSuspensible","isVNodeSuspensible","initialAnchor","resume","sync","effects","parentComponent2","delayEnter","hasUnresolvedAncestor","fallbackVNode","namespace2","mountFallback","optimized2","isInPendingSuspense","hydratedEl","asyncSetupResult","handleSetupResult","parentSuspense2","isSlotChildren","normalizeSuspenseSlot","s","block","trackBlock","isBlockTreeEnabled","currentBlock","closeBlock","branch","disableTracking","inVOnce","setupBlock","createElementBlock","createBaseVNode","transformVNodeArgs","transformer","normalizeKey","normalizeRef","ref_key","ref_for","isBlockNode","needFullChildrenNormalization","normalizeChildren","_createVNode","cloned","isClassComponent","guardReactiveProps","klass","style","extraProps","mergeRef","cloneTransition","mergedProps","mergeProps","text","flag","createStaticVNode","numberOfNodes","createCommentVNode","asBlock","slotFlag","toMerge","incoming","emptyAppContext","uid","internalSetCurrentInstance","setInSSRSetupState","g","registerGlobalSetter","setter","setters","setupResult","setupStatefulComponent","setup","setupContext","isAsyncSetup","resolvedResult","finishComponentSetup","compile","installWithProxy","registerRuntimeCompiler","_compile","isRuntimeOnly","skipOptions","template","compilerOptions","delimiters","componentCompilerOptions","finalCompilerOptions","attrsProxyHandlers","includeInferred","getterOrOptions","debugOptions","propsOrChildren","initCustomFormatter","withMemo","memo","isMemoSame","warn$1","ErrorTypeStrings","devtools","setDevtoolsHook","_ssrUtils","ssrUtils","resolveFilter","compatUtils","DeprecationTypes","require_runtime_core","__commonJSMin","exports","module","require_runtime_dom_cjs_prod","__commonJSMin","exports","runtimeCore","shared","policy","tt","val","unsafeToTrustedHTML","svgNS","mathmlNS","doc","templateContainer","nodeOps","child","parent","anchor","tag","namespace","is","props","el","text","node","selector","id","content","start","end","before","template","wrapper","TRANSITION","ANIMATION","vtcKey","DOMTransitionPropsValidators","TransitionPropsValidators","decorate$1","t","Transition","slots","resolveTransitionProps","callHook","hook","args","h2","hasExplicitCallback","rawProps","baseProps","key","name","type","duration","enterFromClass","enterActiveClass","enterToClass","appearFromClass","appearActiveClass","appearToClass","leaveFromClass","leaveActiveClass","leaveToClass","durations","normalizeDuration","enterDuration","leaveDuration","onBeforeEnter","onEnter","onEnterCancelled","onLeave","onLeaveCancelled","onBeforeAppear","onAppear","onAppearCancelled","finishEnter","isAppear","done","isCancelled","removeTransitionClass","finishLeave","makeEnterHook","resolve","nextFrame","addTransitionClass","whenTransitionEnds","forceReflow","NumberOf","n","cls","c","_vtc","cb","endId","expectedType","explicitTimeout","resolveIfNotStale","timeout","propCount","getTransitionInfo","endEvent","ended","onEnd","e","styles","getStyleProperties","transitionDelays","transitionDurations","transitionTimeout","getTimeout","animationDelays","animationDurations","animationTimeout","hasTransform","delays","d","i","toMs","s","patchClass","value","isSVG","transitionClasses","vShowOriginalDisplay","vShowHidden","vShow","transition","setDisplay","oldValue","initVShowForSSR","CSS_VAR_TEXT","useCssVars","getter","displayRE","patchStyle","prev","next","style","isCssString","hasControlledDisplay","prevStyle","setStyle","cssVarText","importantRE","v","prefixed","autoPrefix","prefixes","prefixCache","rawName","cached","xlinkNS","patchAttr","instance","isBoolean","patchDOMProp","parentComponent","attrName","newValue","needRemove","addEventListener","event","handler","options","removeEventListener","veiKey","patchEvent","prevValue","nextValue","invokers","existingInvoker","parseName","invoker","createInvoker","optionsModifierRE","m","cachedNow","p","getNow","initialValue","patchStopImmediatePropagation","originalStop","fn","e2","isNativeOn","patchProp","shouldSetAsProp","REMOVAL","defineCustomElement","extraOptions","_createApp","Comp","VueCustomElement","VueElement","initialProps","defineSSRCustomElement","createSSRApp","BaseClass","_VueElement","_def","_props","createApp","mutations","def","isAsync","numberProps","opt","asyncDef","exposed","declaredPropKeys","has","camelKey","shouldReflect","shouldUpdate","ob","vnode","render","dispatch","owner","nonce","slotName","outlets","scopeId","o","walker","comp","useHost","caller","useShadowRoot","useCssModule","modules","mod","positionMap","newPositionMap","moveCbKey","enterCbKey","decorate","TransitionGroupImpl","state","prevChildren","children","moveClass","hasCSSTransform","callPendingCbs","recordPosition","movedChildren","applyTranslation","cssTransitionProps","TransitionGroup","oldPos","newPos","dx","dy","root","clone","container","getModelAssigner","onCompositionStart","onCompositionEnd","target","assignKey","vModelText","lazy","trim","number","castToNumber","domValue","elValue","vModelCheckbox","_","modelValue","elementValue","getValue","checked","assign","index","found","filtered","cloned","getCheckboxValue","setChecked","binding","vModelRadio","vModelSelect","isSetModel","selectedVal","setSelected","_binding","isMultiple","isArrayValue","l","option","optionValue","optionType","vModelDynamic","callModelHook","prevVNode","resolveDynamicModel","tagName","initVModelForSSR","modelToUse","systemModifiers","modifierGuards","modifiers","withModifiers","cache","cacheKey","guard","keyNames","withKeys","eventKey","k","rendererOptions","renderer","enabledHydration","ensureRenderer","ensureHydrationRenderer","hydrate","app","mount","containerOrSelector","normalizeContainer","component","proxy","resolveRootNamespace","ssrDirectiveInitialized","initDirectivesForSSR","require_runtime_dom","__commonJSMin","exports","module","require_vue_cjs_prod","__commonJSMin","exports","compilerDom","runtimeDom","shared","_interopNamespaceDefault","e","n","k","runtimeDom__namespace","compileCache","compileToFunction","template","options","key","cached","el","opts","tag","code","render","require_vue","__commonJSMin","exports","module","require_vue_router_prod","__commonJSMin","exports","vue","isBrowser","isRouteComponent","component","isESModule","obj","assign","applyToParams","fn","params","newParams","key","value","isArray","noop","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","text","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","TRAILING_SLASH_RE","removeTrailingSlash","path","parseURL","parseQuery","location","currentLocation","query","searchString","hash","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery","stripBase","pathname","base","isSameRouteLocation","a","b","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","i","to","from","fromSegments","toSegments","lastToSegment","position","toPosition","segment","START_LOCATION_NORMALIZED","NavigationType","NavigationDirection","START","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","el","offset","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","state","fromState","listener","pauseListeners","listen","callback","teardown","index","beforeUnloadListener","history","destroy","buildState","back","current","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","hashIndex","url","err","data","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","createMemoryHistory","queue","setLocation","direction","info","shouldTrigger","createWebHashHistory","isRouteLocation","route","isRouteName","name","NavigationFailureSymbol","NavigationFailureType","ErrorTypeMessages","stringifyRoute","createRouterError","type","isNavigationFailure","error","propertiesToLog","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","segments","extraOptions","options","score","pattern","keys","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re","subPattern","parse","match","stringify","avoidDuplicatedSlash","param","compareScoreArray","diff","comparePathParserScore","aScore","bScore","comp","isLastScoreNegative","last","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","message","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","record","parent","parser","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","mergeOptions","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","isAliasRecord","removeRoute","isMatchable","insertMatcher","children","matcherRef","getRoutes","findInsertionIndex","resolve","paramsFromLocation","k","m","matched","parentMatcher","mergeMetaFields","clearRoutes","normalized","normalizeRecordProps","propsObject","props","meta","defaults","partialOptions","lower","upper","mid","insertionAncestor","getInsertionAncestor","ancestor","searchParams","searchParam","eqPos","currentValue","v","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","handlers","add","handler","reset","registerGuard","guard","removeFromList","onBeforeRouteLeave","leaveGuard","activeRecord","onBeforeRouteUpdate","updateGuard","guardToPromiseFn","runWithContext","enterCallbackArray","reject","next","valid","guardReturn","guardCall","extractComponentsGuards","guardType","guards","rawComponent","componentPromise","resolved","resolvedComponent","loadRouteLocation","promises","useLink","router","currentRoute","activeRecordIndex","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","e","guardEvent","p","preferSingleVNode","vnodes","RouterLinkImpl","slots","link","elClass","getLinkClass","RouterLink","target","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","attrs","injectedRoute","routeToDisplay","injectedDepth","depth","initialDepth","matchedRoute","matchedRouteRef","viewRef","instance","oldInstance","oldName","currentName","ViewComponent","normalizeSlot","routePropsOption","routeProps","onVnodeUnmounted","vnode","slot","slotContent","RouterView","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","href","matcherLocation","targetParams","fullPath","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","force","shouldRedirect","toLocation","failure","handleScroll","markAsReady","triggerError","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","app","installedApps","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","readyHandlers","errorListeners","ready","list","isReady","scrollBehavior","started","reactiveRoute","unmountApp","promise","len","recordFrom","recordTo","useRouter","useRoute","_name","require_vue_router","__commonJSMin","exports","module","require_rolldown_runtime","__commonJSMin","exports","__create","__defProp","__getOwnPropDesc","__getOwnPropNames","__getProtoOf","__hasOwnProp","__copyProps","to","from","except","desc","keys","i","n","key","k","__toESM","mod","isNodeMode","target","serialize","o","c","isEqual","object1","object2","init_ohash_D_AXeF1","__esmMin","#t","r","e","n","a","s","digest","_","k","z","R","S","r","l","init_js","__esmMin","s","t","i","a","c","h","g","f","y","n","d","j","B","x","m","p","u","b","w","M","_l","dist_exports","__export","digest","hash","isEqual","serialize","input","init_dist","__esmMin","init_ohash_D_AXeF1","init_js","areEqual","arrayA: any[]","arrayB: any[]","arrayA","arrayB","index","chunk","arr: T[]","size: number","result","i","arr","size","findValuesBetween","array: T[]","start: T","end: T","startIndex","array","ohash","start","endIndex","end","minIndex","maxIndex","a","b","isBrowser","clamp","value: number","min: number","max: number","max","min","value","roundToStepPrecision","step: number","roundedValue","stepString","step","pointIndex","precision","pow","snapValueToStep","min: number | undefined","max: number | undefined","remainder","snappedValue","createContext","providerComponentName: string | string[]","contextName?: string","symbolDescription","providerComponentName","contextName","injectionKey: InjectionKey<ContextValue | null>","fallback?: T","context","vue","injectionKey","fallback","contextValue: ContextValue","contextValue","getActiveElement","activeElement","handleAndDispatchCustomEvent","name: string","handler: ((event: E) => void) | undefined","detail: { originalEvent: OriginalEvent } & (E extends CustomEvent<infer D>\n    ? D\n    : never)","target","detail","event","name","handler","isValidVNodeElement","input: any","input","isNullish","value: any","value","isValueEqualOrExist","base: T | T[] | undefined","current: T | T[] | undefined","require_shared_nullish","base","val","ohash","current","pick","object: T","keys: K[]","keys","key","object","omit","obj: T","obj","dist_exports","__export","assert","autoResetRef","bypassFilter","camelize","clamp","computedEager","computedWithControl","containsProp","controlledComputed","controlledRef","createDisposableDirective","createEventHook","createFilterWrapper","createGlobalState","createInjectionState","createReactiveFn","createRef","createSharedComposable","createSingletonPromise","debounceFilter","debouncedRef","debouncedWatch","eagerComputed","extendRef","formatDate","get","getLifeCycleTarget","hasOwn","hyphenate","identity","ignorableWatch","increaseWithUnit","injectLocal","invoke","isClient","isDef","isDefined","isIOS","isObject","isWorker","makeDestructurable","noop","normalizeDate","notNullish","now","objectEntries","objectOmit","objectPick","pausableFilter","pausableWatch","promiseTimeout","provideLocal","pxValue","rand","reactify","reactifyObject","reactiveComputed","reactiveOmit","reactivePick","refAutoReset","refDebounced","refDefault","refManualReset","refThrottled","refWithControl","set","syncRef","syncRefs","throttleFilter","throttledRef","throttledWatch","timestamp","toArray","toReactive","toRef","toRefs","tryOnBeforeMount","tryOnBeforeUnmount","tryOnMounted","tryOnScopeDispose","tryOnUnmounted","until","useArrayDifference","useArrayEvery","useArrayFilter","useArrayFind","useArrayFindIndex","useArrayFindLast","useArrayIncludes","useArrayJoin","useArrayMap","useArrayReduce","useArraySome","useArrayUnique","useCounter","useDateFormat","useDebounce","useDebounceFn","useInterval","useIntervalFn","useLastChanged","useThrottle","useThrottleFn","useTimeout","useTimeoutFn","useToNumber","useToString","useToggle","watchArray","watchAtMost","watchDebounced","watchDeep","watchIgnorable","watchImmediate","watchOnce","watchPausable","watchThrottled","watchTriggerable","watchWithFilter","whenever","fn","options","_options$flush","result","source","v","track","trigger","dirty","update","_track","_trigger","origin","isFunc","normalisedOrigin","mounted","unmounted","scopeWeakMap","el","binding","vNode","prevNode","_scopeWeakMap$get","scope","_scopeWeakMap$get2","failSilently","fns","off","offFn","args","stateFactory","initialized","state","key","value","_getCurrentInstance","instance","owner","localProvidedStateMap","localProvidedState","composable","defaultValue","deep","getIsIOS","_window","_window2","_window3","toRef$1","r","filter","wrapper","resolve","reject","ms","timer","maxTimer","lastRejector","_clearTimeout","lastInvoker","duration","maxDuration","lastExec","isLeading","lastValue","trailing","leading","rejectOnCancel","clear","_invoke","elapsed","extendFilter","initialState","isActive","pause","resume","eventFilter","throwOnTimeout","reason","arg","_promise","_prev","obj","props","k","target","delta","_target$match","unit","px","keys","omitUndefined","cacheStringFunction","cache","str","subscribers","dispose","ref","extend","enumerable","unwrap","arr","clone","index","unrefFn","i","optionsOrKeys","includeOwnProperties","objectRef","_","p","receiver","flatKeys","predicate","toRefs$1","e","afterMs","resetAfter","newValue","debounced","updater","_source$value","reset","refValue","delay","throttled","initial","tracking","triggering","_options$onBeforeChan","_options$onChanged","old","cb","watchOptions","left","right","flush","immediate","direction","transform","watchers","transformLTR","transformRTL","w","targets","targetsArray","_toValue","copy","newObject","sync","createUntil","isNot","toMatch","condition","timeout","stop","promises","toBe","v1","v2","toBeTruthy","toBeNull","toBeUndefined","toBeNaN","toContains","array","changed","changedTimes","n","count","defaultComparator","othVal","_args$","_args$2","list","values","compareFn","symmetric","diff1","x","y","diff2","element","findLast","isArrayIncludesOptions","_comparator","comparator","formIndex","_comparator$fromIndex","separator","reducer","reduceCallback","sum","resolved","uniq","uniqueElementsBy","acc","resolvedList","initialValue","_initialValue","max","min","inc","dec","val","defaultMeridiem","hours","minutes","isLowercase","hasPeriod","m","curr","formatOrdinal","num","suffixes","date","formatStr","_options$customMeridi","years","month","days","seconds","milliseconds","day","meridiem","stripTimeZone","dateString","_dateString$split$","matches","REGEX_FORMAT","match","$1","_ref","_matches$match","d","REGEX_PARSE","interval","immediateCallback","clean","intervalValue","exposeControls","callback","counter","controls","_options$initialValue","isPending","start","ready","method","radix","nanToZero","truthyValue","falsyValue","valueIsRef","_value","toggle","truthy","oldList","newList","onCleanup","oldListRemains","added","found","removed","current","debounce","maxWait","filteredCb","ignoreUpdates","ignorePrevAsyncUpdates","ignore","disposables","ignoreCounter","syncCounter","syncCounterPrev","throttle","cleanupFn","onEffect","_cb","oldValue","res","getWatchSources","getOldValue","sources","item","ov","onInvalidate","import_vue","toString","hyphenateRE","camelizeRE","init_dist","__esmMin","infos","c","dist_exports","__export","DefaultMagicKeysAliasMap","StorageSerializers","TransitionPresets","assert","asyncComputed","autoResetRef","breakpointsAntDesign","breakpointsBootstrapV5","breakpointsElement","breakpointsMasterCss","breakpointsPrimeFlex","breakpointsQuasar","breakpointsSematic","breakpointsTailwind","breakpointsVuetify","breakpointsVuetifyV2","breakpointsVuetifyV3","bypassFilter","camelize","clamp","cloneFnJSON","computedAsync","computedEager","computedInject","computedWithControl","containsProp","controlledComputed","controlledRef","createDisposableDirective","createEventHook","createFetch","createFilterWrapper","createGlobalState","createInjectionState","createReactiveFn","createRef","createReusableTemplate","createSharedComposable","createSingletonPromise","createTemplatePromise","createUnrefFn","customStorageEventName","debounceFilter","debouncedRef","debouncedWatch","defaultDocument","defaultLocation","defaultNavigator","defaultWindow","eagerComputed","executeTransition","extendRef","formatDate","formatTimeAgo","formatTimeAgoIntl","formatTimeAgoIntlParts","get","getLifeCycleTarget","getSSRHandler","hasOwn","hyphenate","identity","ignorableWatch","increaseWithUnit","injectLocal","invoke","isClient","isDef","isDefined","isIOS","isObject","isWorker","makeDestructurable","mapGamepadToXbox360Controller","noop","normalizeDate","notNullish","now","objectEntries","objectOmit","objectPick","onClickOutside","onElementRemoval","onKeyDown","onKeyPressed","onKeyStroke","onKeyUp","onLongPress","onStartTyping","pausableFilter","pausableWatch","promiseTimeout","provideLocal","provideSSRWidth","pxValue","rand","reactify","reactifyObject","reactiveComputed","reactiveOmit","reactivePick","refAutoReset","refDebounced","refDefault","refManualReset","refThrottled","refWithControl","set","setSSRHandler","syncRef","syncRefs","templateRef","throttleFilter","throttledRef","throttledWatch","timestamp","toArray","toReactive","toRef","toRefs","transition","tryOnBeforeMount","tryOnBeforeUnmount","tryOnMounted","tryOnScopeDispose","tryOnUnmounted","unrefElement","until","useActiveElement","useAnimate","useArrayDifference","useArrayEvery","useArrayFilter","useArrayFind","useArrayFindIndex","useArrayFindLast","useArrayIncludes","useArrayJoin","useArrayMap","useArrayReduce","useArraySome","useArrayUnique","useAsyncQueue","useAsyncState","useBase64","useBattery","useBluetooth","useBreakpoints","useBroadcastChannel","useBrowserLocation","useCached","useClipboard","useClipboardItems","useCloned","useColorMode","useConfirmDialog","useCountdown","useCounter","useCssSupports","useCssVar","useCurrentElement","useCycleList","useDark","useDateFormat","useDebounce","useDebounceFn","useDebouncedRefHistory","useDeviceMotion","useDeviceOrientation","useDevicePixelRatio","useDevicesList","useDisplayMedia","useDocumentVisibility","useDraggable","useDropZone","useElementBounding","useElementByPoint","useElementHover","useElementSize","useElementVisibility","useEventBus","useEventListener","useEventSource","useEyeDropper","useFavicon","useFetch","useFileDialog","useFileSystemAccess","useFocus","useFocusWithin","useFps","useFullscreen","useGamepad","useGeolocation","useIdle","useImage","useInfiniteScroll","useIntersectionObserver","useInterval","useIntervalFn","useKeyModifier","useLastChanged","useLocalStorage","useMagicKeys","useManualRefHistory","useMediaControls","useMediaQuery","useMemoize","useMemory","useMounted","useMouse","useMouseInElement","useMousePressed","useMutationObserver","useNavigatorLanguage","useNetwork","useNow","useObjectUrl","useOffsetPagination","useOnline","usePageLeave","useParallax","useParentElement","usePerformanceObserver","usePermission","usePointer","usePointerLock","usePointerSwipe","usePreferredColorScheme","usePreferredContrast","usePreferredDark","usePreferredLanguages","usePreferredReducedMotion","usePreferredReducedTransparency","usePrevious","useRafFn","useRefHistory","useResizeObserver","useSSRWidth","useScreenOrientation","useScreenSafeArea","useScriptTag","useScroll","useScrollLock","useSessionStorage","useShare","useSorted","useSpeechRecognition","useSpeechSynthesis","useStepper","useStorage","useStorageAsync","useStyleTag","useSupported","useSwipe","useTemplateRefsList","useTextDirection","useTextSelection","useTextareaAutosize","useThrottle","useThrottleFn","useThrottledRefHistory","useTimeAgo","useTimeAgoIntl","useTimeout","useTimeoutFn","useTimeoutPoll","useTimestamp","useTitle","useToNumber","useToString","useToggle","useTransition","useUrlSearchParams","useUserMedia","useVModel","useVModels","useVibrate","useVirtualList","useWakeLock","useWebNotification","useWebSocket","useWebWorker","useWebWorkerFn","useWindowFocus","useWindowScroll","useWindowSize","watchArray","watchAtMost","watchDebounced","watchDeep","watchIgnorable","watchImmediate","watchOnce","watchPausable","watchThrottled","watchTriggerable","watchWithFilter","whenever","evaluationCallback","initialState","optionsOrRef","_globalThis$reportErr","options","lazy","flush","evaluating","shallow","onError","started","current","counter","onInvalidate","counterAtBeginning","hasFinished","result","cancelCallback","e","key","defaultSource","treatDefaultAsFactory","source","oldValue","inheritAttrs","name","render","define","_","slots","reuse","props","attrs","_render$value","vnode","keysToCamelKebabCase","obj","newObj","index","instances","create","args","_resolve","_reject","v","start","component","renderList","_slots$default","fn","i","elRef","_$el","plain","register","el","event","listener","firstParamTargets","test","_firstParamTargets$va","_firstParamTargets$va2","raw_targets","raw_events","raw_listeners","raw_options","onCleanup","optionsClone","cleanups","target","handler","window","ignore","capture","detectIframe","controls","_iOSWorkaround","listenerOptions","shouldListen","shouldIgnore","hasMultipleRoots","vm","checkMultipleRoots","children","child","isProcessingClick","cleanup","activeEl","stop","isMounted","instance","callback","mutationOptions","observer","isSupported","stopWatch","items","newTargets","takeRecords","document","stopFn","cleanupAndUpdate","mutationsList","mutation","node","stopHandle","createKeyPredicate","keyFilter","eventName","passive","dedupe","predicate","_options$modifiers10","_options$modifiers11","elementRef","timeout","posStart","startTimestamp","hasLongPressed","clear","getDelay","ev","delay","DEFAULT_DELAY","onRelease","_options$modifiers","_options$modifiers2","_options$modifiers3","_startTimestamp","_posStart","_hasLongPressed","dx","dy","distance","onDown","_options$modifiers4","_options$modifiers5","_options$modifiers6","onMove","_options$modifiers7","_options$modifiers8","_options$modifiers9","_options$distanceThre","DEFAULT_THRESHOLD","isFocusedElementEditable","activeElement","body","isTypedCharValid","keyCode","metaKey","ctrlKey","altKey","initialValue","_trigger","element","track","trigger","_instance$proxy$$refs","_instance$proxy","_options$document","deep","triggerOnRemoval","getDeepActiveElement","_element$shadowRoot","immediate","fpsLimit","once","isActive","intervalLimit","limit","previousFrameTimestamp","rafId","loop","delta","resume","pause","keyframes","config","animateOptions","commitStyles","persist","_playbackRate","onReady","animate","store","pending","playState","replaceState","startTime","value","currentTime","syncResume","timeline","playbackRate","play","syncPause","update","_animate$value","reverse","_animate$value2","finish","_animate$value3","cancel","_animate$value4","targetEl","init","_animate$value5","resumeRef","pauseRef","tasks","interrupt","onFinished","signal","promiseState","activeIndex","updateResult","state","res","prev","curr","prevRes","_result$activeIndex$v","done","currentRes","whenAborted","resolve","reject","error","promise","onSuccess","resetOnExecute","throwError","isReady","isLoading","executionsCount","execute","executionId","_promise","data","shell","waitUntilIsLoaded","onFulfilled","onRejected","getDefaultSerialization","defaults","base64","_target","blobToBase64","img","imgLoaded","canvas","ctx","serialized","blob","fr","navigator","events","charging","chargingTime","dischargingTime","level","battery","updateBatteryInfo","_battery","acceptAllDevices","filters","optionalServices","device","connectToBluetoothGATTServer","requestDevice","err","server","isConnected","reset","_device$value$gatt","_device$value$gatt2","ssrWidth","ssrWidthSymbol","width","app","query","ssrSupport","mediaQuery","matches","queryString","not","minWidth","maxWidth","breakpoints","getValue","k","strategy","mounted","match","size","greaterOrEqual","smallerOrEqual","shortcutMethods","shortcuts","points","a","b","bps","isClosed","channel","post","close","refs","WRITABLE_PROPERTIES","ref","buildState","_window$location","length","origin","refValue","comparator","newSourceValue","cachedValue","deepRefs","watchOptions","permissionDesc","permissionStatus","desc","_permissionStatus$val","_permissionStatus$val2","read","copiedDuring","legacy","isClipboardApiSupported","permissionRead","permissionWrite","text","copied","copyPending","lastLegacyId","updateText","useLegacy","isAllowed","legacyRead","copy","resolvedValue","clipboardItem","createClipboardItem","legacyCopy","currentId","resolvedText","ta","_document$getSelectio","_document","_document$getSelectio2","status","content","updateContent","cloned","isModified","_lastSync","manual","clone","sync","getHandlers","globalKey","_global","fallback","handlers","guessSerializerType","rawInit","storage","_options$serializer","listenToStorageChanges","writeDefaults","mergeDefaults","eventFilter","initOnMounted","keyComputed","type","serializer","pauseWatch","resumeWatch","newValue","write","firstMounted","onStorageEvent","onStorageCustomEvent","updateFromCustomEvent","dispatchWriteEvent","payload","rawValue","serializedData","selector","attribute","storageKey","storageRef","emitAuto","disableTransition","modes","preferredDark","system","updateHTMLAttrs","classesToAdd","classesToRemove","attributeToChange","style","CSS_DISABLE_TRANS","c","defaultOnChanged","mode","_modes$mode","onChanged","auto","revealed","confirmHook","cancelHook","revealHook","reveal","confirm","getDefaultScheduler$8","interval","cb","initialCountdown","remaining","scheduler","onTick","onComplete","countdown","_toValue","prop","ssrValue","observe","variable","_window$document","updateCssVar","_window$getComputedSt","old","val","raw_prop","rootComponent","currentElement","list","getInitialValue","listRef","_options$fallbackInde","targetList","shift","next","n","_options$initialValue","valueDark","valueLight","defaultHandler","_options$onChanged","modeVal","fnBypass","fnSetSource","defaultDump","defaultParse","dump","parse","setSource","_createHistoryRecord","last","undoStack","redoStack","_setSource","record","commit","undo","redo","shouldCommit","composedFilter","resumeTracking","isTracking","lastRawValue","ignoreUpdates","ignorePrevAsyncUpdates","manualHistory","manualCommit","commitNow","batch","canceled","dispose","filter","requestPermissions","requirePermissions","permissionGranted","acceleration","rotationRate","accelerationIncludingGravity","_event$acceleration","_event$acceleration2","_event$acceleration3","_event$accelerationIn","_event$accelerationIn2","_event$accelerationIn3","_event$rotationRate","_event$rotationRate2","_event$rotationRate3","ensurePermissions","requestPermission","isAbsolute","alpha","beta","gamma","pixelRatio","constraints","onUpdated","devices","videoInputs","audioInputs","audioOutputs","stream","t","deviceName","granted","allDevices","hasCamera","hasMicrophone","_options$enabled","enabled","video","audio","_navigator$mediaDevic","constraint","_start","_stream$value","_stop","_stream$value2","visibility","clampContainerScroll","container","_toValue2","_toValue3","_scrollConfig$directi","pointerTypes","preventDefault","stopPropagation","exact","onEnd","onStart","axis","draggingElement","containerElement","draggingHandle","buttons","restrictInView","autoScroll","position","pressedDelta","filterEvent","handleEvent","scrollConfig","scrollSettings","defaultScrollConfig","getScrollAxisValues","handleAutoScroll","targetRect","clientWidth","clientHeight","scrollLeft","scrollTop","scrollWidth","scrollHeight","marginX","marginY","speedX","speedY","deltaX","deltaY","autoScrollInterval","startAutoScroll","x","y","relativePosition","stopAutoScroll","isPointerNearEdge","pointer","margin","checkAutoScroll","_container$getBoundin","containerRect","pos","move","relativeX","relativeY","end","_options$capture","isOverDropZone","files","isValid","_options$multiple","_options$preventDefau","_options","multiple","preventDefaultForUnhandled","getFiles","_event$dataTransfer$f","_event$dataTransfer","checkDataTypes","types","dataTypes","allowedType","checkValidity","dataTypesValid","item","multipleFilesValid","isSafari","handleDragEvent","eventType","_event$dataTransfer2","_ref","dataTransferItemList","currentFiles","_options$onEnter","_options$onOver","_options$onLeave","_options$onDrop","observerOptions","_targets","els","_el","windowResize","windowScroll","updateTiming","height","bottom","left","right","top","recalculate","rect","ele","getDefaultScheduler$7","_document$elementsFro","_document$elementFrom","delayEnter","delayLeave","isHovered","timer","toggle","entering","initialSize","box","isSVG","_unrefElement","stop1","entry","boxSize","$elem","formatBoxSize","acc","inlineSize","blockSize","stop2","root","rootMargin","threshold","targets","scrollTarget","isVisible","observerController","intersectionObserverEntries","isIntersecting","latestTime","scope","on","_scope$cleanups","listeners","_off","off","_listener","emit","_events$get","resolveNestedOptions$1","url","eventSource","urlRef","lastEventId","explicitlyClosed","retried","withCredentials","autoConnect","autoReconnect","_init","es","retries","onFailed","_serializer$read","event_name","_serializer$read2","_e$lastEventId","open","sRGBHex","openOptions","newIcon","baseUrl","rel","favicon","applyIcon","icon","elements","link","o","isFetchOptions","isAbsoluteURL","reAbsolute","headersToObject","headers","combineCallbacks","combination","callbacks","_combination","_fetchOptions","useFactoryFetch","computedUrl","targetUrl","joinPaths","fetchOptions","_defaultWindow$fetch","_globalThis","supportsAbort","fetch","initialData","responseEvent","errorEvent","finallyEvent","isFinished","isFetching","aborted","statusCode","response","canAbort","controller","abort","reason","loading","executeCounter","throwOnFailed","_context$options","currentExecuteCounter","defaultFetchOptions","_payloadMapping$confi","proto","payloadMapping","isCanceled","context","responseData","fetchResponse","fetchError","errorData","refetch","setMethod","setType","method","payloadType","waitUntilFinished","prepareInitialFiles","dt","file","onChange","changeTrigger","onCancel","cancelTrigger","inputRef","input","applyOptions","localOptions","mergedOptions","DEFAULT_OPTIONS","_window","dataType","fileHandle","fileName","_file$value$name","_file$value","fileMIME","_file$value$type","_file$value2","fileSize","_file$value$size","_file$value3","fileLastModified","_file$value$lastModif","_file$value4","handle","updateData","save","saveAs","writableStream","updateFile","_fileHandle$value","_file$value5","_file$value6","focusVisible","preventScroll","innerFocused","targetElement","_matches","focused","_targetElement$value","_targetElement$value2","_focused","EVENT_FOCUS_IN","EVENT_FOCUS_OUT","_targetElement$value$","_targetElement$value$2","PSEUDO_CLASS_FOCUS_WITHIN","_options$every","fps","every","ticks","diff","autoExit","targetRef","isFullscreen","requestMethod","m","exitMethod","fullscreenEnabled","fullscreenElementMethod","isCurrentElementFullScreen","isElementFullScreen","exit","enter","handlerCallback","isElementFullScreenValue","eventHandlers","gamepad","gamepads","onConnectedHook","onDisconnectedHook","stateFromGamepad","hapticActuators","vibrationActuator","axes","button","updateGamepadState","_gamepads","onGamepadConnected","onGamepadDisconnected","enableHighAccuracy","maximumAge","locatedAt","coords","updatePosition","watcher","oneMinute","listenForVisibilityChange","defaultEvents$1","idle","lastActive","isPending","onEvent","loadImage","src","srcset","sizes","clazz","crossorigin","referrerPolicy","decoding","fetchPriority","ismap","usemap","asyncStateOptions","resolveElement","throttle","onStop","onScroll","offset","_observe","eventListenerOptions","behavior","internalX","internalY","scrollTo","_x","_y","_element","scrollContainer","isScrolling","arrivedState","directions","onScrollEnd","onScrollEndDebounced","setArrivedState","_document2","display","flexDirection","direction","directionMultipler","ARRIVED_STATE_THRESHOLD_PIXELS","onScrollHandler","_documentElement","onLoadMore","_options$distance","canLoadMore","observedElement","isElementVisible","canLoad","checkAndLoad","isNarrower","modifier","defaultEvents","initial","listenerEvent","evt","useReactive","aliasMap","onEventFired","metaDeps","depsMap","usedKeys","setRefs","updateDeps","keys","depsSet","clearDeps","depsMapKey","deps","depsArray","depsIndex","updateRefs","_e$key","_e$code","values","proxy","rec","r","usingElRef","timeRangeToArray","timeRanges","ranges","tracksToArray","tracks","label","kind","language","activeCues","cues","inBandMetadataTrackDispatchType","id","defaultOptions","duration","seeking","volume","waiting","ended","playing","rate","stalled","buffered","selectedTrack","isPictureInPicture","muted","supportsPictureInPicture","sourceErrorEvent","playbackErrorEvent","disableTrack","enableTrack","disableTracks","togglePictureInPicture","sources","media","textTracks","isDefault","srcLang","ignoreCurrentTimeUpdates","time","ignorePlayingUpdates","isPlaying","resolver","cache","generateKey","_loadData","loadData","deleteData","clearData","memoized","getDefaultScheduler$6","immediateCallback","memory","touch","resetOnTouchEnds","scroll","_prevMouseEvent","_prevScrollX","_prevScrollY","sourceType","extractor","UseMouseBuiltinExtractors","mouseHandler","touchHandler","scrollHandler","mouseHandlerWrapper","touchHandlerWrapper","scrollHandlerWrapper","handleOutside","elementX","elementY","elementPositionX","elementPositionY","elementHeight","elementWidth","isOutside","elX","elY","stopFnList","stopResizeObserver","stopMutationObserver","drag","pressed","onPressed","srcType","_options$onPressed","onReleased","_options$onReleased","isOnline","saveData","offlineAt","onlineAt","downlink","downlinkMax","rtt","effectiveType","connection","updateNetworkInformation","getDefaultScheduler$5","exposeControls","object","release","newObject","useClamp","min","max","_value","total","pageSize","page","onPageChange","onPageSizeChange","onPageCountChange","currentPageSize","pageCount","currentPage","isFirstPage","isLastPage","returnValue","isLeft","screenOrientation","orientation","angle","deviceOrientationTiltAdjust","deviceOrientationRollAdjust","mouseTiltAdjust","mouseRollAdjust","parentElement","performanceOptions","isInside","defaultState","triggerElement","_pointerLockElement","_pointerLockElement2","action","lock","unlock","onSwipe","onSwipeEnd","onSwipeStart","disableTextSelect","updatePosStart","posEnd","updatePosEnd","distanceX","distanceY","abs","isThresholdExceeded","isSwiping","isPointerDown","eventIsAllowed","_options$pointerTypes","_options$pointerTypes2","isReleasingButton","isPrimaryButton","stops","eventTarget","_targetRef$value","_targetRef$value2","_targetRef$value3","_targetRef$value4","s","isLight","isDark","isMore","isLess","isCustom","isReduced","previous","topCssVar","topVarName","rightCssVar","rightVarName","bottomCssVar","bottomVarName","leftCssVar","leftVarName","onLoaded","async","crossOrigin","noModule","defer","nonce","scriptTag","loadScript","waitForScriptLoad","resolveWithElement","shouldAppend","load","unload","checkOverflowScroll","parent","rawEvent","isLocked","stopTouchMoveListener","initialOverflow","elInitialOverflow","shareOptions","_navigator","overrideOptions","compareFn","defaultCompare","_options$compareFn","_args$","_args$2","_args$3","dirty","sortFn","defaultSortFn","interimResults","continuous","maxAlternatives","lang","isListening","isFinal","recognition","SpeechRecognition","currentResult","transcript","pitch","onBoundary","synth","spokenText","bindEventsForUtterance","utterance","newUtterance","speak","steps","initialStep","stepsRef","stepNames","at","isFirst","isLast","step","goTo","goToNext","goToPrevious","goBackTo","isAfter","isNext","isPrevious","isCurrent","isBefore","css","isLoaded","_id","cssRef","coordsStart","coordsEnd","diffX","diffY","getTouchEventCoords","updateCoordsStart","updateCoordsEnd","onTouchEnd","_document$querySelect","dir","_document$querySelect2","_document$querySelect3","getRangesFromSelection","selection","_selection$rangeCount","rangeCount","_window$getSelection","_selection$value$toSt","_selection$value","rects","range","onSelectionChange","tryRequestAnimationFrame","_options$input","_options$styleProp","textarea","styleProp","textareaScrollHeight","textareaOldWidth","triggerResize","_textarea$value","maxHeight","_styleTarget","styleHeight","_options$onResize","contentRect","trailing","DEFAULT_FORMATTER","date","getDefaultScheduler$4","updateInterval","timeAgo","from","messages","DEFAULT_MESSAGES","fullDateFormatter","units","DEFAULT_UNITS","showSecond","rounding","roundFn","absDiff","unit","format","past","str","applyFormat","isPast","formatter","_units$find","unitMax","idx","getDefaultScheduler$3","getTimeAgoIntlResult","parts","timeAgoIntl","resolvedLocale","_options$units","locale","relativeTimeFormatOptions","rtf","UNITS","ms","insertSpace","joinParts","part","getDefaultScheduler$2","ts","newTitle","_document$title","restoreOnUnmount","originalTitle","title","isReadonly","template","_document$head","restoredTitle","createEasingFunction","p0","p1","p2","p3","a1","a2","calcBezier","getSlope","getTforX","aGuessT","currentSlope","currentX","lerp","defaultInterpolation","aVal","bVal","normalizeEasing","easing","to","fromVal","toVal","startedAt","endAt","interpolation","trans","ease","tick","_options$abort","sourceVal","outputRef","_options$onStarted","_options$onFinished","_options$abort2","disabled","removeNullishValues","removeFalsyValues","enableWrite","writeMode","stringify","params","getRawParams","hash","constructQuery","stringified","updateState","unusedKeys","paramsForKey","mapEntry","shouldUpdate","shouldWriteHistory","_options$autoSwitch","autoSwitch","getDeviceOptions","restart","_vm$$emit","_vm$proxy","defaultValue","shouldEmit","_emit","cloneFn","triggerEmit","isUpdating","ret","getDefaultScheduler$1","pattern","patternRef","vibrate","intervalControls","containerStyle","wrapperProps","calculateRange","currentList","containerRef","useVerticalVirtualList","useHorizontalVirtualList","useVirtualListResources","createGetViewCapacity","itemSize","containerSize","sum","capacity","createGetOffset","scrollDirection","createCalculateRange","overscan","getOffset","getViewCapacity","viewCapacity","createGetDistance","useWatchForSizes","createComputedTotalSize","createScrollTo","getDistance","scrollToDictionaryForElementScrollKey","resources","itemWidth","getDistanceLeft","offsetLeft","totalWidth","itemHeight","getDistanceTop","offsetTop","totalHeight","requestedType","sentinel","documentVisibility","_sentinel$value$type","_sentinel$value","forceRequest","_sentinel$value2","request","_requestForPermissions","defaultWebNotificationOptions","notification","onClick","clickTrigger","onShow","showTrigger","errorTrigger","onClose","closeTrigger","show","overrides","resolveNestedOptions","getDefaultScheduler","onConnected","onDisconnected","onMessage","autoClose","protocols","wsRef","heartbeatPause","heartbeatResume","bufferedData","retryTimeout","pongTimeoutWait","_sendBuffer","buffer","resetRetry","resetHeartbeat","code","send","useBuffer","ws","delayTime","message","DEFAULT_PING_MESSAGE","responseMessage","pongTimeout","arg0","workerOptions","worker","terminate","depsParser","localDeps","depsString","dep","depsFunctionString","importString","jobRunner","userFunc","userFuncArgs","createWorkerBlobUrl","blobCode","dependencies","localDependencies","workerStatus","timeoutId","workerTerminate","generateWorker","blobUrl","newWorker","callWorker","fnArgs","rest","initialWidth","initialHeight","listenOrientation","includeScrollbar","visualViewportWidth","visualViewportHeight","scale","import_vue","init_dist","__esmMin","onFocusOutside","element: MaybeElementRef","handler: (event: FocusEvent) => void","handleFocusOut","ev: FocusEvent","el","__vueuse_core","element","ev","handler","vue","renderSlotFragments","children?: VNode[]","children","child","Fragment","trapFocus","element: HTMLElement","element","focusableEls","el","firstFocusableEl","lastFocusableEl","KEYCODE_TAB","e","require_shared_getActiveElement","ignoredElement","useArrowNavigation","e: KeyboardEvent","currentElement: HTMLElement","parentElement: HTMLElement | undefined","options: ArrowNavigationOptions","currentElement","options","arrowKeyOptions","attributeName","itemsArray","loop","dir","preventScroll","focus","right","left","up","down","home","end","e","goingVertical","goingHorizontal","allCollectionItems: HTMLElement[]","parentElement","allCollectionItems","item: HTMLElement | null","item","findNextFocusableElement","elements: HTMLElement[]","options: FindNextFocusableElementOptions","iterations","elements","index","newIndex: number","newIndex","adjustedNewIndex","candidate","injectConfigProviderContext","provideConfigProviderContext","require_shared_createContext","props","__props","dir","locale","scrollBody","nonce","vue","_ctx","require_defu","__commonJSMin","exports","isPlainObject","value","prototype","_defu","baseObject","defaults","namespace","merger","object","key","createDefu","arguments_","p","c","defu","defuFn","currentValue","defuArrayFn","require_defu","__commonJSMin","exports","module","defu","createDefu","defuFn","defuArrayFn","useBodyLockStackCount","__vueuse_core","map","vue","initialOverflow","locked","value","context","require_ConfigProvider_ConfigProvider","stopTouchMoveListener: Fn | null","resetBodyStyle","__vueuse_shared","stopTouchMoveListener","val","oldVal","isClient","verticalScrollbarWidth","defaultConfig","config","defu","isIOS","e: TouchEvent","preventDefault","e","useBodyScrollLock","initialState?: boolean | undefined","id","initialState","checkOverflowScroll","ele: Element","style","ele","parent","rawEvent: TouchEvent","rawEvent","_target","useComposing","onEnd?: (event: CompositionEvent) => void","isComposing","vue","handleCompositionStart","handleCompositionEnd","event: CompositionEvent","onEnd","event","$09f945753a699862$export$842a2cf37af977e1","amount","numerator","$05031860ba2f881f$var$EPOCH","$05031860ba2f881f$export$f297eb839006d339","era","year","month","day","$05031860ba2f881f$export$c36e0ecb2d4fa69d","y1","monthOffset","$05031860ba2f881f$export$553d7fa8e3805fc0","$05031860ba2f881f$export$4475b7e617eb123c","$05031860ba2f881f$var$daysInMonth","$05031860ba2f881f$export$80ee6245ec4f29ec","jd","jd0","depoch","quadricent","dqc","$09f945753a699862$exports","cent","dcent","quad","dquad","yindex","extendedYear","yearDay","leapAdj","$c51b7e0106f45dea$exports","date","$621d1537dc806c0f$export$7a5acbd77d414bd9","$84a63d30beb0af0f$export$ea39ec197993aef0","a","b","$e13115b3b86b9007$exports","$84a63d30beb0af0f$export$a18c89cbd24170ff","$84a63d30beb0af0f$export$a5a3b454ada2268e","$84a63d30beb0af0f$export$5841f9eb9773f25f","$84a63d30beb0af0f$export$f91e89d3d0406102","$84a63d30beb0af0f$export$91b62ebf2ba703ee","$84a63d30beb0af0f$export$dbc69fd56b53d5e","$84a63d30beb0af0f$export$5a8da0c44a3afdf2","$84a63d30beb0af0f$export$ea840f5a6dda8147","$84a63d30beb0af0f$export$629b0a497aa65267","date","timeZone","$84a63d30beb0af0f$export$d0bdf45af03a6ea3","$84a63d30beb0af0f$var$DAY_MAP","$84a63d30beb0af0f$export$2061056d06d7cdf7","locale","firstDayOfWeek","julian","weekStart","$84a63d30beb0af0f$var$getWeekStart","dayOfWeek","$84a63d30beb0af0f$export$461939dd4422153","$84a63d30beb0af0f$export$68781ddf31c0090f","$84a63d30beb0af0f$export$c19a80a9721b80f6","$84a63d30beb0af0f$var$timeToMs","$84a63d30beb0af0f$export$126c91c941de7e","ms","tomorrow","$84a63d30beb0af0f$var$localTimeZone","$84a63d30beb0af0f$var$localTimeZoneOverride","$84a63d30beb0af0f$export$aa8b41735afcabd2","$84a63d30beb0af0f$export$61a9d83ceb59a3dd","$84a63d30beb0af0f$export$55753838ffe79333","$84a63d30beb0af0f$export$6ab69b273755230b","$84a63d30beb0af0f$export$a2258d9c4118825c","$84a63d30beb0af0f$export$8b7aa55c66d5569e","$84a63d30beb0af0f$export$5412ac11713b72ad","$84a63d30beb0af0f$export$b2f4953d301981d5","$84a63d30beb0af0f$export$42c81a444fbfb5d4","$84a63d30beb0af0f$export$ef8b6d9133084f4e","$84a63d30beb0af0f$var$cachedRegions","$84a63d30beb0af0f$var$cachedWeekInfo","$84a63d30beb0af0f$var$getRegion","region","part","weekInfo","localeInst","day","$621d1537dc806c0f$exports","$84a63d30beb0af0f$export$ccc1b2479e7dd654","days","$84a63d30beb0af0f$export$5c333a116e949cdd","$84a63d30beb0af0f$export$a75f2bff57811055","$84a63d30beb0af0f$var$WEEKEND_DATA","$84a63d30beb0af0f$export$618d60ea299da42","start","end","$84a63d30beb0af0f$export$ee9d87258e1d19ed","$e13115b3b86b9007$export$bd4fb2bc8bb06fb","date","$e13115b3b86b9007$export$b4a036af3fc0b032","$05031860ba2f881f$exports","year","$e13115b3b86b9007$var$epochFromParts","month","day","hour","minute","second","millisecond","$e13115b3b86b9007$export$59c99f3515d3493f","ms","timeZone","$84a63d30beb0af0f$exports","$e13115b3b86b9007$var$getTimeZoneParts","$e13115b3b86b9007$var$formattersByTimeZone","formatter","parts","namedParts","part","$e13115b3b86b9007$var$DAYMILLIS","$e13115b3b86b9007$export$136f38efe7caf549","earlier","later","$e13115b3b86b9007$var$getValidWallTimes","absolute","$e13115b3b86b9007$var$isValidWallTime","$e13115b3b86b9007$export$5107c82f94518f5c","disambiguation","dateTime","$e13115b3b86b9007$export$b21e0b124e224484","offsetBefore","offsetAfter","valid","$e13115b3b86b9007$export$e67a095c620b86fe","$e13115b3b86b9007$export$1b96692a1ba042ac","offset","$c51b7e0106f45dea$exports","$e13115b3b86b9007$export$e57ff100d91bd4b9","$e13115b3b86b9007$export$d7f92bcd3596b086","$e13115b3b86b9007$export$93522d1a439f3617","time","$e13115b3b86b9007$export$d33f79e3ffc3dc83","calendar","calendarDate","copy","$19485913bea41f19$exports","$e13115b3b86b9007$export$84c95a83c799e074","$e13115b3b86b9007$export$538b00033cc11c75","$e13115b3b86b9007$export$83aac07b4c37b25","$e13115b3b86b9007$export$d9b67bc93c097491","$19485913bea41f19$var$ONE_HOUR","$19485913bea41f19$export$e16d8520af44a096","date","duration","mutableDate","days","$19485913bea41f19$var$addTimeFields","$19485913bea41f19$var$addYears","$19485913bea41f19$var$balanceYearMonth","$19485913bea41f19$var$constrainMonthDay","$19485913bea41f19$var$balanceDay","maxYear","isInverseEra","maxMonth","years","monthsInYear","$19485913bea41f19$export$c4e2ecac49351ef2","$19485913bea41f19$export$3e2544e88a25bff8","inverseDuration","key","$19485913bea41f19$export$4e2d2ead65e5f7e3","$19485913bea41f19$export$adaa4cf7ef1b65be","fields","$19485913bea41f19$export$e5d5e1c1822b6e56","value","mutableValue","$19485913bea41f19$export$7555de1e070510cb","$19485913bea41f19$var$balanceTime","time","$19485913bea41f19$var$nonNegativeMod","a","b","result","$19485913bea41f19$export$7ed87b6bc2506470","res","$19485913bea41f19$export$fe34d3a381cd7501","$19485913bea41f19$export$d52ced6badfb9a4c","field","amount","options","mutable","eras","eraIndex","$19485913bea41f19$var$cycleValue","$19485913bea41f19$export$dd02b3e0007dfe28","hours","min","max","isPM","round","div","$19485913bea41f19$export$96b1d28349274637","dateTime","ms","$e13115b3b86b9007$exports","$19485913bea41f19$export$6814caac34ca03c7","$19485913bea41f19$export$9a297d111fc86b79","plainDateTime","minDate","$05031860ba2f881f$exports","minAbsolute","maxDate","maxAbsolute","remainder","$19485913bea41f19$export$31b5430eb18be4f8","disambiguation","$1b358053f79e3a77$var$TIME_RE","$1b358053f79e3a77$var$DATE_RE","$1b358053f79e3a77$var$DATE_TIME_RE","$1b358053f79e3a77$var$ZONED_DATE_TIME_RE","$1b358053f79e3a77$var$ABSOLUTE_RE","$1b358053f79e3a77$var$DATE_TIME_DURATION_RE","$1b358053f79e3a77$var$requiredDurationTimeGroups","$1b358053f79e3a77$var$requiredDurationGroups","$1b358053f79e3a77$export$c9698ec7f05a07e1","value","m","$c51b7e0106f45dea$exports","$1b358053f79e3a77$var$parseNumber","$1b358053f79e3a77$export$6b862160d295c8e","date","$1b358053f79e3a77$export$588937bcd60ade55","year","era","$1b358053f79e3a77$export$fd7893f06e92a6a4","disambiguation","plainDateTime","$e13115b3b86b9007$exports","ms","hourOffset","$1b358053f79e3a77$var$offsetToString","$1b358053f79e3a77$export$4223de14708adc63","$1b358053f79e3a77$export$5adfdab05168c219","timeZone","$1b358053f79e3a77$export$8e384432362ed0f0","$84a63d30beb0af0f$exports","min","max","val","$1b358053f79e3a77$export$f59dee82248f5ad4","time","$1b358053f79e3a77$export$60dfd74aa96791bd","gregorianDate","$05031860ba2f881f$exports","offset","sign","offsetHours","offsetMinutes","offsetSeconds","stringOffset","$1b358053f79e3a77$export$bf79f1ebf4b18792","$1b358053f79e3a77$export$ecae829bb3747ea6","match","parseDurationGroup","group","isNegative","duration","$c51b7e0106f45dea$var$shiftArgs","args","calendar","$05031860ba2f881f$exports","era","eras","year","month","day","$c51b7e0106f45dea$export$99faa760c7908e4f","_$c51b7e0106f45dea$export$99faa760c7908e4f","#type","$19485913bea41f19$exports","duration","fields","field","amount","options","timeZone","$e13115b3b86b9007$exports","$1b358053f79e3a77$exports","b","$84a63d30beb0af0f$exports","$c51b7e0106f45dea$export$680ea196effce5f","_$c51b7e0106f45dea$export$680ea196effce5f","hour","minute","second","millisecond","$c51b7e0106f45dea$export$ca871e8dbb80966f","_$c51b7e0106f45dea$export$ca871e8dbb80966f","disambiguation","res","$c51b7e0106f45dea$export$d3b7288e7994edea","_$c51b7e0106f45dea$export$d3b7288e7994edea","offset","$a90e2192fa9a0f41$var$ERA_START_DATES","$a90e2192fa9a0f41$var$ERA_END_DATES","$a90e2192fa9a0f41$var$ERA_ADDENDS","$a90e2192fa9a0f41$var$ERA_NAMES","$a90e2192fa9a0f41$var$findEraFromGregorianDate","date","idx","year","month","day","$a90e2192fa9a0f41$var$toGregorian","eraAddend","$c51b7e0106f45dea$exports","$a90e2192fa9a0f41$export$b746ab2b60cdffbf","$05031860ba2f881f$exports","jd","era","gregorianDate","end","endYear","endMonth","endDay","maxYear","startMonth","startDay","cur","next","years","start","$a90e2192fa9a0f41$var$getMinimums","args","$0ce473f03e925476$var$BUDDHIST_ERA_START","$0ce473f03e925476$export$42d20a78301dee44","$05031860ba2f881f$exports","jd","gregorianDate","year","$c51b7e0106f45dea$exports","date","$0ce473f03e925476$var$toGregorian","args","era","$2dab1d4ea1fc722b$var$TAIWAN_ERA_START","$2dab1d4ea1fc722b$var$gregorianYear","date","$2dab1d4ea1fc722b$var$gregorianToTaiwan","year","y","$2dab1d4ea1fc722b$export$65e01080afcb0799","$05031860ba2f881f$exports","jd","extendedYear","era","$c51b7e0106f45dea$exports","$2dab1d4ea1fc722b$var$toGregorian","args","$4100faec94dc031c$var$PERSIAN_EPOCH","$4100faec94dc031c$var$MONTH_START","$4100faec94dc031c$export$37fccdbfd14c5939","jd","daysSinceEpoch","year","farvardin1","dayOfYear","month","day","$c51b7e0106f45dea$exports","date","$09f945753a699862$exports","$9dc8610ad30fbfe5$var$INDIAN_ERA_START","$9dc8610ad30fbfe5$var$INDIAN_YEAR_START","$9dc8610ad30fbfe5$export$39f31c639fa15726","$05031860ba2f881f$exports","jd","date","indianYear","yDay","leapMonth","indianMonth","indianDay","mDay","$c51b7e0106f45dea$exports","extendedYear","era","year","args","$fbcc6aba7cd7f47c$var$CIVIL_EPOC","$fbcc6aba7cd7f47c$var$ASTRONOMICAL_EPOC","$fbcc6aba7cd7f47c$var$UMALQURA_YEAR_START","$fbcc6aba7cd7f47c$var$UMALQURA_YEAR_END","$fbcc6aba7cd7f47c$var$UMALQURA_START_DAYS","$fbcc6aba7cd7f47c$var$islamicToJulianDay","epoch","year","month","day","$fbcc6aba7cd7f47c$var$julianDayToIslamic","calendar","jd","$c51b7e0106f45dea$exports","$fbcc6aba7cd7f47c$var$isLeapYear","$fbcc6aba7cd7f47c$export$2066795aadd37bfc","date","length","$fbcc6aba7cd7f47c$export$37f0887f2f9d22f7","args","$fbcc6aba7cd7f47c$var$UMALQURA_DATA","$fbcc6aba7cd7f47c$var$UMALQURA_MONTHLENGTH","$fbcc6aba7cd7f47c$var$UMALQURA_YEAR_START_TABLE","$fbcc6aba7cd7f47c$var$umalquraYearStart","$fbcc6aba7cd7f47c$var$umalquraMonthLength","idx","mask","$fbcc6aba7cd7f47c$var$umalquraMonthStart","i","$fbcc6aba7cd7f47c$var$umalquraYearLength","$fbcc6aba7cd7f47c$export$5baab4758c231076","c","yearStart","days","startDays","endDays","y","m","d","yearLength","monthLength","$1aa25867248bd474$var$HEBREW_EPOCH","$1aa25867248bd474$var$HOUR_PARTS","$1aa25867248bd474$var$DAY_PARTS","$1aa25867248bd474$var$MONTH_DAYS","$1aa25867248bd474$var$MONTH_FRACT","$1aa25867248bd474$var$MONTH_PARTS","$1aa25867248bd474$var$isLeapYear","year","$09f945753a699862$exports","$1aa25867248bd474$var$hebrewDelay1","months","parts","day","$1aa25867248bd474$var$hebrewDelay2","last","present","$1aa25867248bd474$var$startOfYear","$1aa25867248bd474$var$getDaysInYear","$1aa25867248bd474$var$getYearType","yearLength","$1aa25867248bd474$var$getDaysInMonth","month","yearType","$1aa25867248bd474$export$ca405048b8fb5af","jd","d","m","ys","dayOfYear","monthStart","$c51b7e0106f45dea$exports","date","previousDate","$b6b43214f5cff964$var$ETHIOPIC_EPOCH","$b6b43214f5cff964$var$COPTIC_EPOCH","$b6b43214f5cff964$var$AMETE_MIHRET_DELTA","$b6b43214f5cff964$var$ceToJulianDay","epoch","year","month","day","$b6b43214f5cff964$var$julianDayToCE","jd","$b6b43214f5cff964$var$getLeapDay","$b6b43214f5cff964$var$getDaysInMonth","$b6b43214f5cff964$export$26ba6eab5e20cd7d","era","$c51b7e0106f45dea$exports","date","$b6b43214f5cff964$export$d72e0c37005a4914","args","$b6b43214f5cff964$export$fe6243cbe1a4b7c1","$9d3159c6111892aa$export$dd0bbc9b26defe37","name","$0ce473f03e925476$exports","$b6b43214f5cff964$exports","$1aa25867248bd474$exports","$9dc8610ad30fbfe5$exports","$fbcc6aba7cd7f47c$exports","$a90e2192fa9a0f41$exports","$4100faec94dc031c$exports","$2dab1d4ea1fc722b$exports","$05031860ba2f881f$exports","$10afcf45c4831ff7$var$formatterCache","$10afcf45c4831ff7$export$ad991b66133851cf","locale","options","$10afcf45c4831ff7$var$getCachedDateFormatter","value","start","end","startParts","endParts","p","resolvedOptions","$10afcf45c4831ff7$var$hasBuggyResolvedHourCycle","$10afcf45c4831ff7$var$getResolvedHourCycle","$10afcf45c4831ff7$var$hour12Preferences","$10afcf45c4831ff7$var$hasBuggyHour12Behavior","pref","defaultHourCycle","cacheKey","b","numberFormatter","$10afcf45c4831ff7$var$_hasBuggyHour12Behavior","$10afcf45c4831ff7$var$_hasBuggyResolvedHourCycle","formatter","min","max","parseStringToDateValue","dateStr: string","referenceVal: DateValue","dateValue: DateValue","isZonedDateTime","referenceVal","dateValue","__internationalized_date","dateStr","isCalendarDateTime","toDate","tz: string","tz","CalendarDateTime","ZonedDateTime","hasTime","getDaysInMonth","date: Date | DateValue","date","year","month","isBefore","dateToCompare: DateValue","referenceDate: DateValue","dateToCompare","referenceDate","isAfter","isBeforeOrSame","isAfterOrSame","isBetweenInclusive","date: DateValue","start: DateValue","end: DateValue","start","end","isBetween","getLastFirstDayOfWeek","date: T","firstDayOfWeek: number","locale: string","day","locale","firstDayOfWeek","getNextLastDayOfWeek","lastDayOfWeek","isSameYearMonth","a: DateValue","b: DateValue","a","b","isSameYear","areAllDaysBetweenValid","isUnavailable: Matcher | undefined","isDisabled: Matcher | undefined","isHighlightable?: Matcher | undefined","isUnavailable","isDisabled","isHighlightable","dCurrent","dEnd","compareYearMonth","isMonthBetweenInclusive","isYearBetweenInclusive","getMonthsBetween","getYearsBetween","areAllMonthsBetweenValid","current","endMonth","areAllYearsBetweenValid","endYear","getDefaultDate","props: GetDefaultDateProps","defaultValue","defaultPlaceholder","granularity","props","calendarDateTimeGranularities","defaultFormatter","DateFormatter","calendar","CalendarDate","getDefaultTime","props: GetDefaultTimeProps","Time","chunk","arr: T[]","size: number","result","i","arr","size","getOptsByGranularity","granularity: Granularity","hourCycle: HourCycle","isTimeValue: boolean","opts: Intl.DateTimeFormatOptions","normalizeHourCycle","hourCycle","normalizeHour12","isTimeValue","opts","granularity","normalizeDateStep","props?: GetDefaultDateStepProps","defu","props","handleCalendarInitialFocus","calendar: HTMLElement","selectedDay","calendar","today","firstDay","getInputType","normalizeInputValue","date: DateValue | undefined","date","type","year","month","day","hour","minute","second","getDaysBetween","start: DateValue","end: DateValue","days: DateValue[]","dCurrent","start","dEnd","end","days","createMonth","props: CreateMonthProps","dateObj","weekStartsOn","fixedWeeks","locale","props","daysInMonth","require_date_comparators","datesArray","_","i","firstDayOfMonth","__internationalized_date","lastDayOfMonth","lastSunday","nextSaturday","lastMonthDays","nextMonthDays","totalDays","extraDays","startFrom","extraDaysArray","incr","allDays","weeks","require_date_utils","startOfDecade","dateObj: DateValue","endOfDecade","createDecade","props: SetDecadeProps","startIndex","endIndex","decadeArray","a: DateValue","b: DateValue","a","b","createYear","props: SetYearProps","numberOfMonths","pagedNavigation","createMonths","props: SetMonthProps","monthProps","months: Grid<DateValue>[]","months","nextMonth","createMonthGrid","props: CreateSelectProps","createYearGrid","props: CreateSelectProps & { yearsPerPage?: number, decadeAligned?: boolean }","yearsPerPage","decadeAligned","startYear: number","startYear","years","createYearRange","years: DateValue[]","current","createDateRange","dates: DateValue[]","dates","getWeekStartsOn","locale: string","monday","CalendarDate","getWeekNumber","date: DateValue","firstDayOfWeek?: DayOfWeek","jan1","date","usesISOWeek","firstDayOfWeek","firstWeekContainsDate","dayOfWeek","weekYear","week1Ref","week1Start","currentWeekStart","MS_PER_WEEK","require_date","__commonJSMin","useDateFormatter","initialLocale: string","opts: DateFormatterOptions","locale","vue","initialLocale","getLocale","setLocale","newLocale: string","newLocale","custom","date: Date","options: DateFormatterOptions","DateFormatter","opts","options","date","selectedDate","date: DateValue","includeTime","require_date_comparators","fullMonthAndYear","fullMonth","getMonths","defaultDate","__internationalized_date","item","fullYear","toParts","options?: DateFormatterOptions","dayOfWeek","length: DateFormatterOptions['weekday']","length","dayPeriod","value","p","defaultPartOptions: DateFormatterOptions","part","dateObj: DateValue","type: Intl.DateTimeFormatPartTypes","defaultPartOptions","dateObj","type","useDirection","dir?: Ref<Direction | undefined>","context","require_ConfigProvider_ConfigProvider","vue","dir","useEmitAsProps","emit: (name: Name, ...args: any[]) => void","vm","vue","events","result: Record<string, any>","ev","result","arg","emit","useFilter","options?: MaybeRef<Intl.CollatorOptions>","computedOptions","vue","options","collator","string: string","substring: string","substring","string","scan","sliceLen","slice","count","useFocusGuards","vue","cleanupFn","isClient","edgeGuards","createFocusGuard","node","element","useFormControl","el: MaybeElementRef","vue","el","__vueuse_core","useForwardExpose","instance","vue","currentRef","currentElement","resolveCurrentElement","__vueuse_core","localExpose: Record<string, any> | null","ret: Record<string, any>","key","ret","localExpose","forwardRef","ref: Element | T | null","ref","childExposed","merged","useForwardProps","props: MaybeRefOrGetter<T>","vm","vue","defaultProps","prev","curr","defaultValue","refProps","props","preservedProps","assignedProps","key","useForwardPropsEmits","props: MaybeRefOrGetter<T>","emit?: (name: Name, ...args: any[]) => void","parsedProps","require_shared_useForwardProps","props","emitsAsProps","emit","require_shared_useEmitAsProps","vue","useForwardRef","instance","vue","handleRefChange","ref: Element | ComponentPublicInstance | null","ref","useGraceArea","triggerElement: Ref<HTMLElement | undefined>","containerElement: Ref<HTMLElement | undefined>","isPointerInTransit","__vueuse_shared","pointerGraceArea","vue","pointerExit","handleRemoveGraceArea","handleCreateGraceArea","event: PointerEvent","hoverTarget: HTMLElement | undefined","hoverTarget","currentTarget","event","exitPoint","exitSide","getExitSideFromRect","paddedExitPoints","getPaddedExitPoints","hoverTargetPoints","getPointsFromRect","graceArea","getHull","cleanupFn","triggerElement","containerElement","handleTriggerLeave","handleContentLeave","handleTrackPointerGrace","target","pointerPosition","hasEnteredTarget","isPointerOutsideGraceArea","isPointInPolygon","isAnotherGraceAreaTrigger","point: Point","rect: DOMRect","top","rect","point","bottom","right","left","exitPoint: Point","exitSide: Side","padding","paddedExitPoints: Point[]","polygon: Polygon","x","y","inside","i","j","polygon","xi","yi","xj","yj","points: Readonly<Array<P>>","newPoints: Array<P>","points","newPoints","a: Point","b: Point","a","b","getHullPresorted","upperHull: Array<P>","p","upperHull","q","r","lowerHull: Array<P>","lowerHull","require_es5","__commonJSMin","exports","getDefaultParent","originalTarget","sampleTarget","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","node","correctTargets","parent","targets","target","correctedTarget","x","applyAttributeToOthers","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","el","deep","attr","alreadyHidden","counterValue","markerValue","e","hideOthers","activeParentNode","inertOthers","supportsInert","suppressOthers","useHideOthers","target: MaybeElementRef","undo: ReturnType<typeof hideOthers>","vue","__vueuse_core","target","el","isInsideClosedPopover","undo","aria_hidden","count","useId","deterministicId?: string | null | undefined","prefix","deterministicId","id: string","configProviderContext","require_ConfigProvider_ConfigProvider","id","vue","useKbd","useTestKbd","kbd","acc","key","value","useLocale","locale?: Ref<string | undefined>","context","require_ConfigProvider_ConfigProvider","vue","locale","useSelectionBehavior","modelValue: Ref<T | T[]>","props: UnwrapNestedRefs<{ multiple?: boolean, selectionBehavior?: 'toggle' | 'replace' }>","firstValue","vue","onSelectItem","val: T","condition: (existingValue: T) => boolean","props","modelValue","val","index","v","condition","_","i","handleMultipleReplace","intent: 'first' | 'last' | 'prev' | 'next'","currentElement: HTMLElement | Element | null","getItems: () => { ref: HTMLElement, value?: any }[]","options: any[]","lastValue","getItems","currentElement","value: T[] | null","intent","value","require_shared_arrays","options","useSize","element: MaybeElementRef","size","vue","width","height","el","__vueuse_core","element","resizeObserver","entries","entry","width: number","height: number","borderSizeEntry","borderSize","width$1","height$1","useStateMachine","initialState: MachineState<M>","machine: M & Machine<MachineState<M>>","state","vue","initialState","reducer","event: MachineEvent<M>","machine","event","useTypeahead","callback?: (search: string) => void","search","__vueuse_shared","key: string","items: { ref: HTMLElement, value?: any }[]","key","callback","currentItem","require_shared_getActiveElement","itemsWithTextValue","items","item","currentMatch","values","nextMatch","getNextMatch","newItem","wrapArray","array: T[]","startIndex: number","array","_","index","startIndex","values: string[]","search: string","currentMatch?: string","normalizedSearch","char","currentMatchIndex","wrappedValues","v","value","withDefault","WrappedComponent: T","options?: MountingOptions<any>","WrappedComponent","_","ctx","optionProps","options","forwardRef","require_shared_useForwardExpose","mergedProps","vue","require_shared","__commonJSMin","usePresence","present: Ref<boolean>","node: Ref<HTMLElement | undefined>","stylesRef","vue","prevAnimationNameRef","prevPresentRef","present","initialState","timeoutId: number | undefined","ownerWindow","node","defaultWindow","state","dispatch","require_shared_useStateMachine","dispatchCustomEvent","name: 'enter' | 'after-enter' | 'leave' | 'after-leave'","isClient","customEvent","name","currentPresent","prevPresent","hasPresentChanged","prevAnimationName","currentAnimationName","getAnimationName","handleAnimationEnd","event: AnimationEvent","isCurrentAnimation","event","directionName","currentFillMode","timeoutId","handleAnimationStart","watcher","newNode","oldNode","stateWatcher","node?: HTMLElement","Presence_default","vue","props","slots","expose","present","forceMount","node","isPresent","require_Presence_usePresence","children","require_shared_renderSlotFragments","instance","componentName","line","v","el","__vueuse_core","Slot","vue","_","attrs","slots","children","require_shared_renderSlotFragments","firstNonCommentChildrenIndex","child","Comment","firstNonCommentChildren","mergedProps","cloned","SELF_CLOSING_TAGS","Primitive","vue","props","attrs","slots","asTag","Slot","usePrimitiveElement","primitiveElement","vue","currentElement","__vueuse_core","injectCollapsibleRootContext","provideCollapsibleRootContext","require_shared_createContext","props","__props","emit","__emit","open","__vueuse_core","disabled","unmountOnHide","vue","__expose","require_shared_useForwardExpose","require_Primitive_Primitive","as","_ctx","props","__props","emits","__emit","rootContext","require_Collapsible_CollapsibleRoot","require_shared_useId","presentRef","vue","forwardRef","currentElement","require_shared_useForwardExpose","width","height","isOpen","isMountAnimationPrevented","currentStyle","node","rect","skipAnimation","__vueuse_core","ev","require_Presence_Presence","forceMount","present","require_Primitive_Primitive","$attrs","as","_ctx","props","__props","require_shared_useForwardExpose","rootContext","require_Collapsible_CollapsibleRoot","vue","require_Primitive_Primitive","as","_ctx","validateProps","type","defaultValue","modelValue","value","getDefaultType","getDefaultValue","useSingleOrMultipleValue","props: P","emits: (name: Name, ...args: any[]) => void","vue","props","__vueuse_core","emits","changeModelValue","value: AcceptableValue","ohash","modelValueArray","require_shared_isValueEqualOrExist","index","i","isSingle","injectAccordionRootContext","provideAccordionRootContext","require_shared_createContext","props","__props","emits","__emit","dir","disabled","unmountOnHide","vue","direction","require_shared_useDirection","modelValue","changeModelValue","isSingle","require_shared_useSingleOrMultipleValue","forwardRef","parentElement","require_shared_useForwardExpose","require_Primitive_Primitive","asChild","as","_ctx","AccordionItemState","AccordionItemState$1","injectAccordionItemContext","provideAccordionItemContext","require_shared_createContext","props","__props","rootContext","require_Accordion_AccordionRoot","open","vue","disabled","dataDisabled","dataState","__expose","currentRef","currentElement","require_shared_useForwardExpose","handleArrowKey","e","target","item","require_shared_useArrowNavigation","require_Collapsible_CollapsibleRoot","_ctx","props","__props","rootContext","require_Accordion_AccordionRoot","itemContext","require_Accordion_AccordionItem","require_shared_useForwardExpose","vue","require_Collapsible_CollapsibleContent","as","_cache","$event","_ctx","props","__props","rootContext","require_Accordion_AccordionRoot","itemContext","require_Accordion_AccordionItem","require_shared_useForwardExpose","vue","require_Primitive_Primitive","_ctx","props","__props","rootContext","require_Accordion_AccordionRoot","itemContext","require_Accordion_AccordionItem","require_shared_useId","changeItem","triggerDisabled","vue","require_Collapsible_CollapsibleTrigger","_ctx","injectDialogRootContext","provideDialogRootContext","require_shared_createContext","props","__props","emit","__emit","open","__vueuse_core","triggerElement","vue","contentElement","modal","value","_ctx","props","__props","require_shared_useForwardExpose","rootContext","require_Dialog_DialogRoot","vue","require_Primitive_Primitive","as","_cache","$event","_ctx","POINTER_DOWN_OUTSIDE","FOCUS_OUTSIDE","isLayerExist","layerElement: HTMLElement","targetElement: HTMLElement","targetElement","targetLayer","mainLayer","layerElement","nodeList","usePointerDownOutside","onPointerDownOutside?: (event: PointerDownOutsideEvent) => void","element?: Ref<HTMLElement | undefined>","enabled: MaybeRefOrGetter<boolean>","ownerDocument: Document","element","isPointerInsideDOMTree","vue","handleClickRef","cleanupFn","isClient","enabled","handlePointerDown","event: PointerEvent","target","event","handleAndDispatchPointerDownOutsideEvent","require_shared_handleAndDispatchCustomEvent","onPointerDownOutside","eventDetail","ownerDocument","timerId","useFocusOutside","onFocusOutside?: (event: FocusOutsideEvent) => void","isFocusInsideDOMTree","handleFocus","event: FocusEvent","onFocusOutside","context","vue","props","__props","emits","__emit","forwardRef","layerElement","require_shared_useForwardExpose","ownerDocument","layers","index","isBodyPointerEventsDisabled","isPointerEventsEnabled","localLayers","highestLayerWithOutsidePointerEventsDisabled","highestLayerWithOutsidePointerEventsDisabledIndex","pointerDownOutside","require_DismissableLayer_utils","event","isPointerDownOnBranch","branch","focusOutside","__vueuse_core","element","disableOutsidePointerEvents","_","onCleanup","require_shared_nullish","cleanupFn","require_Primitive_Primitive","asChild","as","_ctx","props","__props","forwardRef","currentElement","require_shared_useForwardExpose","vue","require_DismissableLayer_DismissableLayer","require_Primitive_Primitive","_ctx","useFocusStackState","__vueuse_core","vue","createFocusScopesStack","stack","focusScope: FocusScopeAPI","activeFocusScope","focusScope","arrayRemove","array: T[]","item: T","updatedArray","array","index","item","AUTOFOCUS_ON_MOUNT","AUTOFOCUS_ON_UNMOUNT","EVENT_OPTIONS","focusFirst","candidates: HTMLElement[]","select","previouslyFocusedElement","require_shared_getActiveElement","candidate","candidates","focus","getTabbableEdges","container: HTMLElement","getTabbableCandidates","container","first","findVisible","last","nodes: HTMLElement[]","walker","node: any","isHiddenInput","node","nodes","elements: HTMLElement[]","element","elements","isHidden","node: HTMLElement","upTo","isSelectableInput","element: any","element?: FocusableTarget | null","props","__props","emits","__emit","currentRef","currentElement","require_shared_useForwardExpose","lastFocusedElementRef","vue","focusScopesStack","require_FocusScope_stack","focusScope","cleanupFn","__vueuse_shared","container","handleFocusIn","event","target","require_FocusScope_utils","handleFocusOut","relatedTarget","handleMutations","mutations","lastFocusedElement","m","mutationObserver","previouslyFocusedElement","require_shared_getActiveElement","mountEvent","ev","unmountEvent","unmountEventHandler","handleKeyDown","isTabKey","focusedElement","first","last","require_Primitive_Primitive","asChild","as","_ctx","ITEM_SELECT","SELECTION_KEYS","FIRST_KEYS","LAST_KEYS","FIRST_LAST_KEYS","SUB_OPEN_KEYS: Record<Direction, string[]>","SUB_CLOSE_KEYS: Record<Direction, string[]>","getOpenState","open: boolean","open","isIndeterminate","checked?: CheckedState","checked","getCheckedState","checked: CheckedState","focusFirst","candidates: HTMLElement[]","PREVIOUSLY_FOCUSED_ELEMENT","require_shared_getActiveElement","candidate","candidates","isPointInPolygon","point: Point","polygon: Polygon","x","y","point","inside","i","j","polygon","xi","yi","xj","yj","isPointerInGraceArea","event: PointerEvent","area?: Polygon","area","cursorPos","event","isMouseEvent","DEFAULT_TITLE_NAME","DEFAULT_CONTENT_NAME","useWarning","titleName","contentName","componentLink","titleId","descriptionId","contentElement","TITLE_MESSAGE","DESCRIPTION_MESSAGE","vue","describedById","props","__props","emits","__emit","rootContext","require_Dialog_DialogRoot","forwardRef","contentElement","require_shared_useForwardExpose","require_shared_useId","vue","require_shared_getActiveElement","require_FocusScope_FocusScope","_cache","$event","require_DismissableLayer_DismissableLayer","as","asChild","disableOutsidePointerEvents","require_Menu_utils","$attrs","_ctx","props","__props","emits","__emit","rootContext","require_Dialog_DialogRoot","emitsAsProps","require_shared_useEmitAsProps","forwardRef","currentElement","require_shared_useForwardExpose","require_shared_useHideOthers","vue","require_Dialog_DialogContentImpl","_cache","event","originalEvent","ctrlLeftClick","_ctx","props","__props","emits","__emit","emitsAsProps","require_shared_useEmitAsProps","require_shared_useForwardExpose","rootContext","require_Dialog_DialogRoot","hasInteractedOutsideRef","vue","hasPointerDownOutsideRef","require_Dialog_DialogContentImpl","_cache","event","target","_ctx","props","__props","emits","__emit","rootContext","require_Dialog_DialogRoot","emitsAsProps","require_shared_useEmitAsProps","forwardRef","require_shared_useForwardExpose","vue","require_Presence_Presence","forceMount","require_Dialog_DialogContentModal","$attrs","_ctx","require_Dialog_DialogContentNonModal","props","__props","require_shared_useForwardExpose","rootContext","require_Dialog_DialogRoot","vue","require_Primitive_Primitive","_ctx","rootContext","require_Dialog_DialogRoot","require_shared_useBodyScrollLock","require_shared_useForwardExpose","vue","require_Primitive_Primitive","as","asChild","_cache","_ctx","rootContext","require_Dialog_DialogRoot","forwardRef","require_shared_useForwardExpose","vue","require_Presence_Presence","forceMount","require_Dialog_DialogOverlayImpl","$attrs","as","asChild","_ctx","isMounted","__vueuse_core","vue","forceMount","to","disabled","defer","_ctx","props","__props","vue","require_Teleport_Teleport","_ctx","props","__props","rootContext","require_Dialog_DialogRoot","require_shared_useForwardExpose","vue","require_Primitive_Primitive","_ctx","props","__props","rootContext","require_Dialog_DialogRoot","forwardRef","currentElement","require_shared_useForwardExpose","require_shared_useId","vue","require_Primitive_Primitive","as","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Dialog_DialogClose","_ctx","injectAlertDialogContentContext","provideAlertDialogContentContext","require_shared_createContext","props","__props","emits","__emit","emitsAsProps","require_shared_useEmitAsProps","require_shared_useForwardExpose","cancelElement","vue","el","require_Dialog_DialogContent","_cache","_ctx","props","__props","contentContext","require_AlertDialog_AlertDialogContent","forwardRef","currentElement","require_shared_useForwardExpose","vue","require_Dialog_DialogClose","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Dialog_DialogDescription","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Dialog_DialogOverlay","_ctx","props","__props","vue","require_Teleport_Teleport","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","require_shared_useForwardExpose","vue","require_Dialog_DialogRoot","slotProps","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Dialog_DialogTitle","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Dialog_DialogTrigger","_ctx","props","__props","forwardRef","require_shared_useForwardExpose","aspect","vue","require_Primitive_Primitive","asChild","as","$attrs","_ctx","ITEM_DATA_ATTR","useCollection","options: { key?: string, isProvider?: boolean }","key","isProvider","options","injectionKey","context: CollectionContext<ItemData>","itemMap","vue","context","getItems","includeDisabledItem","collectionNode","orderedNodes","orderedItems","a","b","i","CollectionSlot","_","slots","attrs","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","Slot","CollectionItem","props","cleanupFn","reactiveItems","itemMapSize","vue","require_Primitive_Primitive","as","asChild","feature","_ctx","props","__props","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","valueState","vue","cur","prev","input","inputProto","setValue","inputEvent","changeEvent","require_VisuallyHidden_VisuallyHidden","$attrs","props","__props","isFormArrayEmptyAndRequired","vue","parsedValue","obj","index","key","value","require_VisuallyHidden_VisuallyHiddenInputBubble","name","$attrs","parsed","queryCheckedElement","parentEl: HTMLElement | null","parentEl","valueComparator","value: T | T[] | undefined","currentValue: T","comparator?: string | ((a: T, b: T) => boolean)","value","val","compare","currentValue","comparator","value?: T","currentValue?: T","ohash","ENTRY_FOCUS","EVENT_OPTIONS","MAP_KEY_TO_FOCUS_INTENT: Record<string, FocusIntent>","getDirectionAwareKey","key: string","dir?: Direction","dir","key","getFocusIntent","event: KeyboardEvent","orientation?: Orientation","event","orientation","MAP_KEY_TO_FOCUS_INTENT","focusFirst","candidates: HTMLElement[]","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","require_shared_getActiveElement","candidate","candidates","wrapArray","array: T[]","startIndex: number","array","_","index","startIndex","injectListboxRootContext","provideListboxRootContext","require_shared_createContext","props","__props","emits","__emit","multiple","highlightOnHover","orientation","disabled","selectionBehavior","propDir","vue","getItems","require_Collection_Collection","handleTypeaheadSearch","require_shared_useTypeahead","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","kbd","require_shared_useKbd","dir","require_shared_useDirection","isFormControl","require_shared_useFormControl","firstValue","isUserAction","focusable","modelValue","__vueuse_core","onValueChange","val","modelArray","index","i","require_Listbox_utils","highlightedElement","previousElement","isVirtual","isComposing","virtualFocusHook","virtualKeydownHook","virtualHighlightHook","getCollectionItem","changeHighlight","el","scrollIntoView","focus","highlightedItem","highlightItem","value","item","onKeydownEnter","event","onKeydownTypeAhead","isMetaKey","collection","values","lastItem","onCompositionStart","onCompositionEnd","highlightFirstItem","onKeydownNavigation","onLeave","onEnter","entryFocusEvent","intent","require_RovingFocus_utils","currentIndex","handleMultipleReplace","targetEl","lastValue","require_shared_arrays","highlightSelected","scroll","__vueuse_shared","hasHighlightedOnMount","__expose","require_Primitive_Primitive","as","asChild","_cache","target","_ctx","name","require_VisuallyHidden_VisuallyHiddenInput","required","CollectionSlot","require_Collection_Collection","rootContext","require_Listbox_ListboxRoot","isClickFocus","__vueuse_shared","vue","require_Primitive_Primitive","as","asChild","_cache","$event","ev","event","_ctx","props","__props","emits","__emit","modelValue","__vueuse_core","rootContext","require_Listbox_ListboxRoot","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","disabled","vue","activedescendant","isComposing","handleCompositionStart","handleCompositionEnd","require_shared_useComposing","event","onCompositionStart","handleInput","handleKeydownNavigation","handleKeydownEnter","require_Primitive_Primitive","as","asChild","_ctx","injectListboxGroupContext","provideListboxGroupContext","require_shared_createContext","props","__props","id","require_shared_useId","vue","require_Primitive_Primitive","_ctx","props","__props","groupContext","require_Listbox_ListboxGroup","vue","require_Primitive_Primitive","_ctx","LISTBOX_SELECT","injectListboxItemContext","provideListboxItemContext","require_shared_createContext","props","__props","emits","__emit","id","require_shared_useId","CollectionItem","require_Collection_Collection","forwardRef","currentElement","require_shared_useForwardExpose","rootContext","require_Listbox_ListboxRoot","isHighlighted","vue","isSelected","require_Listbox_utils","disabled","handleSelect","ev","handleSelectCustomEvent","eventDetail","require_shared_handleAndDispatchCustomEvent","value","require_Primitive_Primitive","$attrs","as","asChild","_cache","_ctx","props","__props","require_shared_useForwardExpose","itemContext","require_Listbox_ListboxItem","vue","require_Primitive_Primitive","_ctx","createLazyMeasurementsView","count","flat","getItemKey","cache","target","prop","receiver","c","i","v","s","memo","getDeps","fn","opts","deps","result","isInitial","memoizedFunction","depTime","newDeps","dep","index","resultTime","notUndefined","value","msg","approxEqual","a","b","debounce","targetWindow","ms","timeoutId","args","_isIOSResult","isIOSWebKit","mtp","_resetIOSDetectionForTests","getRect","element","offsetWidth","offsetHeight","defaultKeyExtractor","index","defaultRangeExtractor","range","start","len","arr","i","observeElementRect","instance","cb","targetWindow","handler","rect","width","height","observer","entries","run","entry","box","addEventListenerOptions","observeWindowRect","supportsScrollend","observeOffset","readOffset","registerScrollendEvent","offset","fallback","debounce","createHandler","isScrolling","endHandler","observeElementOffset","el","horizontal","isRtl","observeWindowOffset","win","measureElement","key","cachedSize","scrollWithAdjustments","adjustments","behavior","_b","_a","windowScroll","elementScroll","Virtualizer","opts","_c","_ro","get","node","cacheKey","cachedNode","target","merged","v","prevOptions","anchor","followOnAppend","edgeKeysChanged","prevCount","nextCount","measurements","prevFirstKey","prevLastKey","item","anchorResolved","anchorDelta","anchorKey","anchorOffset","newMeasurements","count","getItemKey","idx","anchorItem","newOffset","sync","memo","d","scrollElement","cached","scrollEl","onTouchStart","onTouchEnd","_offset","cur","max","delta","furthestMeasurementsFound","furthestMeasurements","m","measurement","previousFurthestMeasurement","a","b","paddingStart","scrollMargin","enabled","lanes","laneAssignmentMode","_itemSizeCacheVersion","itemSizeCache","min","gap","need","flat","next","runningStart","prevIdx","measuredSize","size","view","createLazyMeasurementsView","laneLastIndex","cachedLane","lane","shouldCacheLane","prevIndex","prevInLane","furthestMeasurement","end","outerSize","scrollOffset","calculateRange","startIndex","endIndex","rangeExtractor","overscan","attributeName","indexStr","scrollIndex","bufferSize","minIndex","maxIndex","prevNode","itemStart","itemSize","wasAtEnd","prevTotalSize","shouldAdjustScroll","indexes","virtualItems","k","useFlat","findNearestBinarySearch","notUndefined","doc","threshold","toOffset","align","maxOffset","now","initialAlign","offsetInfo","lastIdx","endByLane","val","snapshot","targetOffset","STABLE_FRAMES","targetChanged","approxEqual","viewport","distance","keepSmooth","low","high","getCurrentValue","value","middle","currentValue","lastIndex","getStart","getEnd","endPerLane","pos","startPerLane","useVirtualizerBase","options","virtualizer","Virtualizer","unref","state","shallowRef","cleanup","watch","el","instance","sync","triggerRef","onScopeDispose","useVirtualizer","computed","observeElementRect","observeElementOffset","elementScroll","useWindowVirtualizer","observeWindowRect","observeWindowOffset","windowScroll","props","__props","slots","vue","rootContext","require_Listbox_ListboxRoot","parentEl","__vueuse_core","getItems","require_Collection_Collection","padding","el","styles","virtualizer","__tanstack_vue_virtual","index","virtualizedItems","item","defaultNode","targetNode","child","event","scroll","option","require_Listbox_utils","i","value","search","__vueuse_shared","optionsWithMetadata","parseTextContent","handleMultipleReplace","intent","lastValue","require_shared_arrays","isMetaKey","require_RovingFocus_utils","items","currentIndex","require_shared_getActiveElement","currentMatch","filteredOptions","next","require_shared_useTypeahead","nextMatch","is","injectPopperRootContext","providePopperRootContext","require_shared_createContext","anchor","vue","element","_ctx","props","__props","forwardRef","currentElement","require_shared_useForwardExpose","rootContext","require_Popper_PopperRoot","vue","require_Primitive_Primitive","as","asChild","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Primitive_Primitive","width","height","asChild","_ctx","rounded","_hoisted_2","_hoisted_1","isNotNull","value: T | null","value","transformOrigin","options: {\n  arrowWidth: number\n  arrowHeight: number\n}","options","data","placement","rects","middlewareData","isArrowHidden","arrowWidth","arrowHeight","placedSide","placedAlign","getSideAndAlignFromPlacement","noArrowAlign","arrowXCenter","arrowYCenter","x","y","placement: Placement","side","align","clamp","start","value","end","max","min","evaluate","param","getSide","placement","getAlignment","getOppositeAxis","axis","getAxisLength","getSideAxis","firstChar","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","length","mainAlignmentSide","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","getSideList","side","isStart","rlPlacement","lrPlacement","tbPlacement","btPlacement","getOppositeAxisPlacements","flipAlignment","direction","list","oppositeSideMap","expandPaddingObject","padding","getPaddingObject","rectToClientRect","rect","x","y","width","height","sides","alignments","placements","round","floor","createCoords","init_floating_ui_utils","__esmMin","acc","v","computeCoordsFromPlacement","_ref","placement","rtl","reference","floating","sideAxis","getSideAxis","alignmentAxis","getAlignmentAxis","alignLength","getAxisLength","side","getSide","isVertical","commonX","commonY","commonAlign","coords","getAlignment","detectOverflow","state","options","_await$platform$isEle","x","y","platform","rects","elements","strategy","boundary","rootBoundary","elementContext","altBoundary","padding","evaluate","paddingObject","getPaddingObject","element","clippingClientRect","rectToClientRect","rect","offsetParent","offsetScale","elementClientRect","getPlacementList","alignment","autoAlignment","allowedPlacements","getOppositeAlignmentPlacement","getSideOffsets","overflow","isAnySideFullyClipped","sides","getBoundingRect","minX","min","minY","maxX","max","maxY","getRectsByLine","sortedRects","b","groups","prevRect","i","convertValueToCoords","mainAxisMulti","originSides","crossAxisMulti","rawValue","mainAxis","crossAxis","MAX_RESET_COUNT","computePosition","arrow","autoPlacement","flip","hide","inline","offset","shift","limitShift","size","init_floating_ui_core","__esmMin","init_floating_ui_utils","config","middleware","platformWithDetectOverflow","statefulPlacement","resetCount","middlewareData","currentMiddleware","name","fn","nextX","nextY","data","reset","axis","length","arrowDimensions","isYAxis","minProp","maxProp","clientProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","largestPossiblePadding","minPadding","maxPadding","min$1","center","clamp","shouldAddOffset","alignmentOffset","_middlewareData$autoP","_middlewareData$autoP2","_placementsThatFitOnE","placements","detectOverflowOptions","placements$1","currentIndex","currentPlacement","alignmentSides","getAlignmentSides","currentOverflows","allOverflows","nextPlacement","placementsSortedByMostSpace","d","acc","v","a","resetPlacement","_middlewareData$arrow","_middlewareData$flip","initialPlacement","checkMainAxis","checkCrossAxis","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment","initialSideAxis","isBasePlacement","fallbackPlacements","getOppositePlacement","getExpandedPlacements","hasFallbackAxisSideDirection","getOppositeAxisPlacements","overflows","overflowsData","_middlewareData$flip2","_overflowsData$filter","nextIndex","_overflowsData$filter2","currentSideAxis","offsets","nativeClientRects","clientRects","fallback","getBoundingClientRect","firstRect","lastRect","isTop","top","bottom","left","right","width","height","isLeftSide","maxRight","minLeft","measureRects","resetRects","_middlewareData$offse","diffCoords","limiter","getOppositeAxis","mainAxisCoord","crossAxisCoord","minSide","maxSide","limitedCoords","rawOffset","computedOffset","len","limitMin","limitMax","_middlewareData$offse2","isOriginSide","_state$middlewareData","_state$middlewareData2","apply","heightSide","widthSide","maximumClippingHeight","maximumClippingWidth","overflowAvailableHeight","overflowAvailableWidth","noShift","availableHeight","availableWidth","xMin","xMax","yMin","yMax","nextDimensions","hasWindow","getNodeName","node","isNode","getWindow","_node$ownerDocument","getDocumentElement","_ref","value","isElement","isHTMLElement","isShadowRoot","isOverflowElement","element","overflow","overflowX","overflowY","display","getComputedStyle","isTableElement","isTopLayer","isContainingBlock","elementOrCss","css","isNotNone","isWebKit","willChangeRe","containRe","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","isWebKitValue","getNodeScroll","result","getNearestOverflowAncestor","parentNode","getOverflowAncestors","list","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","frameElement","getFrameElement","init_floating_ui_utils_dom","__esmMin","getCssDimensions","element","css","getComputedStyle","width","height","hasOffset","isHTMLElement","offsetWidth","offsetHeight","shouldFallback","round","unwrapElement","isElement","getScale","domElement","createCoords","rect","$","x","y","getVisualOffsets","win","getWindow","isWebKit","noOffsets","shouldAddVisualOffsets","isFixed","floatingOffsetParent","getBoundingClientRect","includeScale","isFixedStrategy","offsetParent","clientRect","scale","visualOffsets","offsetWin","currentWin","currentIFrame","getFrameElement","iframeScale","iframeRect","left","top","rectToClientRect","getWindowScrollBarX","leftScroll","getNodeScroll","getDocumentElement","getHTMLOffset","documentElement","scroll","htmlRect","convertOffsetParentRelativeRectToViewportRelativeRect","_ref","elements","strategy","topLayer","isTopLayer","offsets","isOffsetParentAnElement","getNodeName","isOverflowElement","offsetRect","htmlOffset","getClientRects","getDocumentRect","html","body","max","getViewportRect","visualViewport","visualViewportBased","windowScrollbarX","doc","bodyStyles","bodyMarginInline","clippingStableScrollbarWidth","SCROLLBAR_MAX","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","hasFixedPositionAncestor","stopNode","parentNode","getParentNode","isLastTraversableNode","getClippingElementAncestors","cache","cachedResult","result","getOverflowAncestors","el","currentContainingBlockComputedStyle","elementIsFixed","currentNode","computedStyle","currentNodeIsContaining","isContainingBlock","ancestor","getClippingRect","boundary","rootBoundary","clippingAncestors","firstRect","right","bottom","i","min","getDimensions","getRectRelativeToOffsetParent","setLeftRTLScrollbarOffset","isStaticPositioned","getTrueOffsetParent","polyfill","rawOffsetParent","getOffsetParent","svgOffsetParent","isTableElement","getContainingBlock","isRTL","rectsAreEqual","a","b","observeMove","onMove","io","timeoutId","root","cleanup","_io","refresh","skip","threshold","elementRectForRootMargin","insetTop","floor","insetRight","insetBottom","insetLeft","options","isFirstUpdate","handleObserve","entries","ratio","autoUpdate","reference","floating","update","ancestorScroll","ancestorResize","elementResize","layoutShift","animationFrame","referenceEl","ancestors","cleanupIo","reobserveFrame","resizeObserver","firstEntry","_resizeObserver","frameId","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","getElementRects","platform","detectOverflow","offset","autoPlacement","shift","flip","size","hide","arrow","inline","limitShift","computePosition","init_floating_ui_dom","__esmMin","init_floating_ui_core","init_floating_ui_utils","init_floating_ui_utils_dom","data","getOffsetParentFn","getDimensionsFn","floatingDimensions","mergedOptions","platformWithCache","require_lib","__commonJSMin","exports","Vue","key","target","val","floating_ui_vue_esm_exports","__export","arrow","autoPlacement","autoUpdate","computePosition","detectOverflow","flip","getOverflowAncestors","hide","inline","limitShift","offset","platform","shift","size","useFloating","isComponentPublicInstance","target","unwrapElement","element","isNode","getNodeName","toValue","source","options","args","getDPR","roundByDPR","value","dpr","reference","floating","whileElementsMountedOption","openOption","_toValue","middlewareOption","placementOption","_toValue2","strategyOption","_toValue3","transformOption","_toValue4","referenceElement","floatingElement","x","y","strategy","placement","middlewareData","isPositioned","floatingStyles","initialStyles","xVal","yVal","whileElementsMountedCleanup","update","open","position","cleanup","attach","reset","import_vue_demi","init_floating_ui_vue_esm","__esmMin","init_floating_ui_dom","init_floating_ui_utils_dom","PopperContentPropsDefaultValue","injectPopperContentContext","providePopperContentContext","require_shared_createContext","props","__props","emits","__emit","rootContext","require_Popper_PopperRoot","forwardRef","contentElement","require_shared_useForwardExpose","floatingRef","vue","arrow","arrowWidth","arrowHeight","require_shared_useSize","desiredPlacement","collisionPadding","boundary","detectOverflowOptions","require_Popper_utils","flipOptions","computedMiddleware","__vueuse_core","__floating_ui_vue","elements","rects","availableWidth","availableHeight","anchorWidth","anchorHeight","contentStyle","reference","floatingStyles","placement","isPositioned","middlewareData","update","args","placedSide","placedAlign","shouldHideArrow","cannotCenterArrow","contentZIndex","arrowX","arrowY","element","require_Primitive_Primitive","$attrs","as","_ctx","OPPOSITE_SIDE","forwardRef","require_shared_useForwardExpose","contentContext","require_Popper_PopperContent","baseSide","vue","el","require_component_Arrow","$attrs","as","asChild","rounded","width","height","_ctx","injectComboboxRootContext","provideComboboxRootContext","require_shared_createContext","props","__props","emits","__emit","primitiveElement","parentElement","require_Primitive_usePrimitiveElement","multiple","disabled","ignoreFilter","resetSearchTermOnSelect","openOnFocus","openOnClick","propDir","resetModelValueOnClear","highlightOnHover","vue","dir","require_shared_useDirection","modelValue","__vueuse_core","open","onOpenChange","val","filterSearch","isUserInputted","inputElement","resetSearchTerm","isVirtual","triggerElement","highlightedElement","allItems","allGroups","contains","require_shared_useFilter","filterState","oldValue","itemCount","filteredItems","filteredGroups","id","value","score","groupId","group","itemId","inst","__expose","require_Popper_PopperRoot","require_Listbox_ListboxRoot","$attrs","$event","as","asChild","name","required","_cache","_ctx","injectAutocompleteRootContext","provideAutocompleteRootContext","require_shared_createContext","props","__props","emits","__emit","primitiveElement","parentElement","require_Primitive_usePrimitiveElement","disabled","ignoreFilter","openOnFocus","openOnClick","propDir","highlightOnHover","vue","dir","require_shared_useDirection","modelValue","__vueuse_core","open","contextModelValue","val","onOpenChange","filterSearch","isUserInputted","inputElement","resetSearchTerm","isVirtual","triggerElement","highlightedElement","allItems","allGroups","contains","require_shared_useFilter","filterState","oldValue","itemCount","filteredItems","filteredGroups","id","value","score","groupId","group","itemId","inst","__expose","require_Combobox_ComboboxRoot","require_Popper_PopperRoot","require_Listbox_ListboxRoot","$attrs","$event","as","asChild","name","required","_cache","_ctx","props","__props","emits","__emit","rootContext","require_Combobox_ComboboxRoot","autocompleteContext","require_Autocomplete_AutocompleteRoot","listboxContext","require_Listbox_ListboxRoot","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","modelValue","__vueuse_core","vue","isComposing","handleCompositionStart","handleCompositionEnd","require_shared_useComposing","event","el","processInputValue","handleKeyDown","ev","value","handleInput","handleFocus","handleClick","newVal","text","_newValue","oldValue","require_Listbox_ListboxFilter","$event","as","asChild","autoFocus","disabled","_ctx","forwardRef","require_shared_useForwardExpose","vue","require_Popper_PopperAnchor","reference","require_Primitive_Primitive","asChild","as","$attrs","_ctx","injectComboboxContentContext","provideComboboxContentContext","require_shared_createContext","props","__props","emits","__emit","position","vue","rootContext","require_Combobox_ComboboxRoot","isEmpty","forwardRef","currentElement","require_shared_useForwardExpose","require_shared_useBodyScrollLock","require_shared_useFocusGuards","require_shared_useHideOthers","pickedProps","forwardedProps","require_shared_useForwardProps","popperStyle","isInputWithinContent","activeElement","require_shared_getActiveElement","isEventTargetWithinCombobox","target","control","require_Listbox_ListboxContent","require_FocusScope_FocusScope","_cache","require_DismissableLayer_DismissableLayer","disableOutsidePointerEvents","$event","ev","require_Popper_PopperContent","require_Primitive_Primitive","$attrs","_ctx","props","__props","rootContext","require_Combobox_ComboboxRoot","contentContext","require_Combobox_ComboboxContentImpl","require_shared_useForwardExpose","vue","require_Popper_PopperArrow","_ctx","props","__props","require_shared_useForwardExpose","rootContext","require_Combobox_ComboboxRoot","handleClick","vue","require_Primitive_Primitive","as","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","forwardRef","require_shared_useForwardExpose","rootContext","require_Combobox_ComboboxRoot","require_shared_useId","vue","require_Presence_Presence","forceMount","require_Combobox_ComboboxContentImpl","$attrs","_ctx","props","__props","rootContext","require_Combobox_ComboboxRoot","isRender","vue","require_Primitive_Primitive","_ctx","_cache","injectComboboxGroupContext","provideComboboxGroupContext","require_shared_createContext","props","__props","id","require_shared_useId","rootContext","require_Combobox_ComboboxRoot","isRender","vue","context","require_Listbox_ListboxGroup","_ctx","props","__props","emits","__emit","rootContext","require_Combobox_ComboboxRoot","listboxContext","require_Listbox_ListboxRoot","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","modelValue","__vueuse_core","vue","isComposing","handleCompositionStart","handleCompositionEnd","require_shared_useComposing","event","el","processInputValue","handleKeyDown","ev","value","handleInput","handleFocus","handleBlur","nextFocus","isInsideRoot","isInsideContent","active","handleClick","resetSearchTerm","rootModelValue","_newValue","oldValue","require_Listbox_ListboxFilter","$event","as","asChild","autoFocus","disabled","_ctx","props","__props","emits","__emit","id","require_shared_useId","rootContext","require_Combobox_ComboboxRoot","groupContext","require_Combobox_ComboboxGroup","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","isRender","vue","filteredCurrentItem","groupId","require_Listbox_ListboxItem","disabled","_cache","event","_ctx","value","props","__props","vue","require_Listbox_ListboxItemIndicator","_ctx","props","__props","require_shared_useForwardExpose","groupContext","require_Combobox_ComboboxGroup","require_shared_useId","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_Teleport_Teleport","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Primitive_Primitive","_ctx","props","__props","forwardRef","currentElement","require_shared_useForwardExpose","rootContext","require_Combobox_ComboboxRoot","disabled","vue","require_Primitive_Primitive","as","_cache","$event","_ctx","useNonce","nonce?: Ref<string | undefined>","context","require_ConfigProvider_ConfigProvider","vue","nonce","props","__props","forwardRef","require_shared_useForwardExpose","propNonce","vue","nonce","require_shared_useNonce","rootContext","require_Combobox_ComboboxRoot","require_Primitive_Primitive","$attrs","_ctx","_cache","props","__props","rootContext","require_Combobox_ComboboxRoot","vue","require_Listbox_ListboxVirtualizer","slotProps","_ctx","injectAvatarRootContext","provideAvatarRootContext","require_shared_createContext","require_shared_useForwardExpose","vue","require_Primitive_Primitive","asChild","as","_ctx","props","__props","rootContext","require_Avatar_AvatarRoot","require_shared_useForwardExpose","canRender","vue","onCleanup","__vueuse_shared","timerId","require_Primitive_Primitive","asChild","as","_ctx","resolveLoadingStatus","image: HTMLImageElement | null","src?: string","image","src","useImageLoadingStatus","src: Ref<string>","referrerPolicy","crossOrigin","isMounted","vue","imageRef","isClient","loadingStatus","updateStatus","status: ImageLoadingStatus","status","onCleanup","img","handleLoad","handleError","props","__props","emits","__emit","src","referrerPolicy","crossOrigin","vue","require_shared_useForwardExpose","rootContext","require_Avatar_AvatarRoot","imageLoadingStatus","require_Avatar_utils","newValue","require_Primitive_Primitive","asChild","as","_ctx","DATE_SEGMENT_PARTS","TIME_SEGMENT_PARTS","NON_EDITABLE_SEGMENT_PARTS","EDITABLE_SEGMENT_PARTS","EDITABLE_TIME_SEGMENT_PARTS","ALL_SEGMENT_PARTS","ALL_EXCEPT_LITERAL_PARTS","part","isDateSegmentPart","part: unknown","isSegmentPart","part: string","supportedLocales","placeholderFields","placeholders: PlaceholderMap","getPlaceholderObj","locale: SupportedLocale | (string & {})","isSupportedLocale","locale","placeholders","localeLanguage","getLocaleLanguage","getPlaceholder","field: Field","value: string","isPlaceholderField","field","isDefaultField","value","isTimeField","locale: string","field: unknown","calendarDateTimeGranularities","syncTimeSegmentValues","props: SyncTimeSegmentValuesProps","require_date_parts","part","props","require_date_comparators","syncSegmentValues","props: SyncDateSegmentValuesProps","formatter","dateValues","timeValues","initializeTimeSegmentValues","granularity: 'hour' | 'minute' | 'second'","key","granularity","initializeSegmentValues","granularity: Granularity","initialParts","createContentObj","props: CreateContentObjProps","segmentValues","locale","getPartContent","part: DateSegmentPart | TimeSegmentPart","value","require_date_utils","require_date_placeholders","obj","createContentArr","props: CreateContentArrProps","contentObj","hideTimeZone","hourCycle","isTimeValue","segment","createContent","props: CreateContentProps","contentArr","isSegmentNavigationKey","key: string","kbd","require_shared_useKbd","key","isNumberString","value: string","value","isAcceptableSegmentKey","getSegmentElements","parentElement: HTMLElement","parentElement","item","getTimeFieldSegmentElements","DIGIT_REG","commonSegmentAttrs","props: SegmentAttrProps","props","daySegmentAttrs","segmentValues","placeholder","isEmpty","dateFields: { day?: number, month?: number }","dateFields","date","valueNow","valueMin","valueMax","require_date_comparators","valueText","monthSegmentAttrs","formatter","yearSegmentAttrs","hourSegmentAttrs","hourCycle","minuteSegmentAttrs","secondSegmentAttrs","dayPeriodSegmentAttrs","literalSegmentAttrs","_props: SegmentAttrProps","timeZoneSegmentAttrs","eraSegmentAttrs","segmentBuilders","useDateField","props: UseDateFieldProps","kbd","require_shared_useKbd","minuteSecondIncrementation","e","part","dateRef","prevValue","step","sign","min","max","cycleArgs: [keyof TimeFields, number]","cycleArgs","deleteValue","prevValue: number | null","str","dateTimeValueIncrementation","cycleArgs: [keyof DateFields | keyof TimeFields, number]","cycleArgs: [keyof DateFields, number]","updateDayOrMonth","max: number","num: number","prev: number | null","moveToNext","maxStart","prev","num","digits","total","updateMinuteOrSecond","updateHour","updateYear","attributes","vue","handleDaySegmentKeydown","e: KeyboardEvent","require_date_segment","segmentMonthValue","daysInMonth","value","handleMonthSegmentKeydown","handleYearSegmentKeydown","uses12HourFormat","locale: string","DateFormatter","locale","handleHourSegmentKeydown","newHour","is12Hour","displayPrev","internalValue","period","handleMinuteSegmentKeydown","handleSecondSegmentKeydown","handleDayPeriodSegmentKeydown","handleSegmentClick","e: MouseEvent","handleSegmentKeydown","disabled","readonly","item","updateObject","handleSegmentFocusOut","require_shared_clamp","preCompositionNodes: { node: ChildNode, value: string | null }[] | null","handleSegmentBeforeInput","e: InputEvent","handleSegmentCompositionStart","e: CompositionEvent","el","preCompositionNodes","node","handleSegmentCompositionEnd","original","o","data","char","target","require_shared_getActiveElement","useCalendarState","props: UseCalendarStateProps","isDateSelected","dateObj: DateValue","props","d","__internationalized_date","dateObj","isInvalid","vue","hasSelectedDate","isSelectedDateDisabled","handleNextDisabled","lastPeriodInView: DateValue","nextPageFunc: (date: DateValue) => DateValue","firstPeriodOfNextPage","nextPageFunc","lastPeriodInView","diff","duration: DateFields","duration","require_date_comparators","handlePrevDisabled","firstPeriodInView: DateValue","prevPageFunc: (date: DateValue) => DateValue","lastPeriodOfPrevPage","prevPageFunc","firstPeriodInView","handleNextPage","date: DateValue","date","handlePrevPage","useCalendar","props: UseCalendarProps","formatter","require_shared_useDateFormatter","headingFormatOptions","options: DateFormatterOptions","options","grid","require_date_calendar","visibleView","month","isOutsideVisibleView","isNextButtonDisabled","nextPageFunc?: (date: DateValue) => DateValue","isPrevButtonDisabled","prevPageFunc?: (date: DateValue) => DateValue","isDateDisabled","isDateUnavailable","weekdays","nextPage","firstDate","newDate","newGrid","newGrid$1","prevPage","value","headingValue","startMonth","endMonth","startMonthName","endMonthName","startMonthYear","endMonthYear","fullCalendarLabel","isPlaceholderFocusable","firstFocusableDate","daysInMonth","startDay","day","injectCalendarRootContext","provideCalendarRootContext","require_shared_createContext","props","__props","emits","__emit","disabled","readonly","initialFocus","pagedNavigation","weekdayFormat","fixedWeeks","multiple","minValue","maxValue","numberOfMonths","preventDeselect","propsIsDateDisabled","propsIsDateUnavailable","calendarLabel","defaultValue","propsNextPage","propsPrevPage","propDir","propLocale","disableDaysOutsideCurrentView","vue","primitiveElement","parentElement","require_Primitive_usePrimitiveElement","locale","require_shared_useLocale","dir","require_shared_useDirection","weekStartsOn","require_date_calendar","modelValue","__vueuse_core","defaultDate","require_date_comparators","placeholder","onPlaceholderChange","value","fullCalendarLabel","headingValue","isDateDisabled","isDateUnavailable","isNextButtonDisabled","isPrevButtonDisabled","weekdays","isOutsideVisibleView","nextPage","prevPage","formatter","grid","isPlaceholderFocusable","firstFocusableDate","require_Calendar_useCalendar","isInvalid","isDateSelected","hasSelectedDate","isSelectedDateDisabled","_modelValue","lastValue","__internationalized_date","onDateChange","date","next","require_date_utils","require_Primitive_Primitive","as","asChild","_ctx","_hoisted_1","_hoisted_2","rootContext","require_Calendar_CalendarRoot","vue","require_Primitive_Primitive","as","asChild","date","_ctx","props","__props","kbd","require_shared_useKbd","rootContext","require_Calendar_CalendarRoot","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","dayValue","vue","labelText","require_date_comparators","isUnavailable","isDateToday","__internationalized_date","isOutsideView","isOutsideVisibleView","isDisabled","isFocusedDate","isSelectedDate","changeDate","date","handleClick","handleArrowKey","e","parentElement","indexIncrementation","sign","shiftFocus","day","add","candidateDayValue","candidateDay","require_Primitive_Primitive","_cache","_ctx","props","__props","rootContext","require_Calendar_CalendarRoot","disabled","vue","readonly","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","rootContext","require_Calendar_CalendarRoot","vue","require_Primitive_Primitive","_ctx","props","__props","disabled","vue","rootContext","require_Calendar_CalendarRoot","handleClick","require_Primitive_Primitive","_ctx","_cache","props","__props","disabled","vue","rootContext","require_Calendar_CalendarRoot","handleClick","require_Primitive_Primitive","_ctx","_cache","injectRovingFocusGroupContext","provideRovingFocusGroupContext","require_shared_createContext","props","__props","emits","__emit","loop","orientation","propDir","vue","dir","require_shared_useDirection","currentTabStopId","__vueuse_core","isTabbingBackOut","isClickFocus","focusableItemsCount","getItems","CollectionSlot","require_Collection_Collection","handleFocus","event","isKeyboardFocus","entryFocusEvent","require_RovingFocus_utils","items","i","activeItem","item","highlightedItem","currentItem","candidateItems","handleMouseUp","__expose","tabStopId","require_Primitive_Primitive","as","asChild","_cache","$event","_ctx","props","__props","context","require_RovingFocus_RovingFocusGroup","randomId","require_shared_useId","id","vue","isCurrentTabStop","getItems","CollectionItem","require_Collection_Collection","handleKeydown","event","focusIntent","require_RovingFocus_utils","candidateNodes","i","currentIndex","require_Primitive_Primitive","active","focusable","as","asChild","_cache","$event","_ctx","injectCheckboxGroupRootContext","provideCheckboxGroupRootContext","require_shared_createContext","props","__props","emits","__emit","disabled","rovingFocus","propDir","vue","dir","require_shared_useDirection","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","isFormControl","require_shared_useFormControl","modelValue","__vueuse_core","rovingFocusProps","require_RovingFocus_RovingFocusGroup","require_Primitive_Primitive","as","asChild","_ctx","name","require_VisuallyHidden_VisuallyHiddenInput","required","isIndeterminate","checked?: CheckedState","checked","getState","checked: CheckedState","injectCheckboxRootContext","provideCheckboxRootContext","require_shared_createContext","props","__props","emits","__emit","forwardRef","currentElement","require_shared_useForwardExpose","checkboxGroupContext","require_Checkbox_CheckboxGroupRoot","modelValue","__vueuse_core","disabled","vue","isChecked","ohash","checkboxState","require_shared_nullish","require_shared_isValueEqualOrExist","handleClick","modelValueArray","index","i","isFormControl","require_shared_useFormControl","ariaLabel","require_RovingFocus_RovingFocusItem","require_Primitive_Primitive","$attrs","id","asChild","as","require_Checkbox_utils","required","_ctx","name","require_VisuallyHidden_VisuallyHiddenInput","value","forwardRef","require_shared_useForwardExpose","rootContext","require_Checkbox_CheckboxRoot","vue","require_Presence_Presence","forceMount","require_Checkbox_utils","require_Primitive_Primitive","asChild","as","$attrs","_ctx","colorToString","color: Color","format: ColorFormat","format","colorToHex","color","colorToRgb","colorToHsl","colorToHsb","rgb","convertToRgb","toHex","n: number","alpha","r","g","b","hsl","convertToHsl","h","s","l","hsb","convertToHsb","hslToRgb","hsbToRgb","rgbToHsl","rgbToHsb","rgb: RGBColor","max","min","d","hsl: HSLColor","r: number","g: number","b: number","hue2rgb","p: number","q: number","t: number","t","p","q","v","hsb: HSBColor","i","f","getChannelRange","channel: ColorChannel","channel","getChannelName","getChannelValue","color: Color","color","require_color_convert","setChannelValue","value: number","range","clamped","value","newRgb: RGBColor","convertFromRgb","newRgb","newHsl: HSLColor","convertFromHsl","newHsl","newHsb: HSBColor","convertFromHsb","newHsb","setChannelValues","channels: Array<{ channel: ColorChannel, value: number }>","channels","channelNames","c","hasBrightness","hasLightness","hasRgb","workingColor: Color","workingColor","rgb: RGBColor","targetSpace: ColorSpace","targetSpace","rgb","rgbToHsl","rgbToHsb","hsl: HSLColor","hsl","hslToRgb","hsb: HSBColor","hsb","hsbToRgb","r","g","b","max","min","h","d","s","l","r: number","g: number","b: number","hue2rgb","p: number","q: number","t: number","t","p","q","v","i","f","getSliderGradient","color: Color","channel: ColorChannel","colorSpace: ColorSpace","color","hsl","require_color_convert","hsb","channel","getHueGradient","getSaturationGradient","colorSpace","getLightnessGradient","getBrightnessGradient","getRedGradient","getGreenGradient","getBlueGradient","getAlphaGradient","getAreaGradient","xChannel: ColorChannel","yChannel: ColorChannel","gradientX","getChannelGradientForArea","xChannel","gradientY","yChannel","getAreaBackgroundColor","hsl: { h: number, s: number, l: number, alpha: number }","start","end","mid","hsb: { h: number, s: number, b: number, alpha: number }","g","b","alpha","r","CHECKERBOARD_LAYERS","axis: 'x' | 'y'","direction","axis","fullColor","getAreaBackgroundStyle","hueGradient","hueColor","satGradient","rgb","allChannels","varyingChannels","constantChannel","c","constantValue","xColorStart: RGBColor","xColorEnd: RGBColor","xGradient","xColorStart","xColorEnd","yColorEnd: RGBColor","yGradient","yColorEnd","bgColor: RGBColor","bgColor","background","gradients: string[]","gradients","getSliderBackgroundStyle","gradient","HEX3_RE","HEX6_RE","HEX8_RE","RGB_RE","HSL_RE","HSB_RE","parseColor","value: string","trimmed","value","parseHex","parseRgb","parseHsl","parseHsb","hex: string","normalized","hex","c","bigint","rgb: string","match","rgb","hsl: string","hsl","hsb: string","hsb","normalizeColor","value: string | Color","isValidColor","HASH_PREFIX_RE","HEX6_RE","HEX3_RE","hexToRGB","hex: string","hex","c","bigint","r","g","b","hexToHSL","max","min","h: number","s: number","l: number","h","d","getColorName","s","l","baseName","descriptors","getColorContrast","injectColorAreaRootContext","provideColorAreaRootContext","require_shared_createContext","props","__props","emits","__emit","colorSpace","xChannel","yChannel","disabled","vue","forwardRef","currentElement","require_shared_useForwardExpose","isFormControl","require_shared_useFormControl","modelValue","__vueuse_core","color","require_color_parse","newColor","hexString","require_color_convert","xRange","require_color_channel","yRange","xValue","yValue","hueValue","isUpdating","newX","newY","hsl","hsb","areaStyles","bgColor","require_color_gradient","updateValues","x","y","clampedX","clampedY","channels","commitValues","thumbRef","require_Primitive_Primitive","as","asChild","_ctx","xName","require_VisuallyHidden_VisuallyHiddenInput","yName","linearScale","input: readonly [number, number]","output: readonly [number, number]","value: number","input","output","ratio","value","convertValueToPercentage","min: number","max: number","max","min","percentage","require_shared_clamp","props","__props","rootContext","require_ColorArea_ColorAreaRoot","primitiveElement","areaElement","require_Primitive_usePrimitiveElement","isDragging","vue","getValuesFromPointer","event","rect","xInput","xOutput","xValue","require_ColorArea_utils","yInput","yOutput","yValue","handlePointerDown","x","y","handlePointerMove","handlePointerUp","handleKeyDown","stepMultiplier","xStepSize","yStepSize","xDelta","yDelta","require_Primitive_Primitive","asChild","as","_ctx","props","__props","rootContext","require_ColorArea_ColorAreaRoot","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","vue","xPercent","require_ColorArea_utils","yPercent","ariaLabel","require_color_channel","ariaValueText","require_Primitive_Primitive","asChild","as","_ctx","injectColorFieldRootContext","provideColorFieldRootContext","require_shared_createContext","props","__props","emits","__emit","colorSpace","channel","disabled","readonly","disableWheelChange","placeholder","propLocale","stepProp","vue","forwardRef","currentElement","require_shared_useForwardExpose","isFormControl","require_shared_useFormControl","locale","require_shared_useLocale","modelValue","__vueuse_core","color","require_color_parse","newColor","hexString","require_color_convert","inputValue","isEditing","formatValue","c","value","require_color_channel","MIN_HEX_INT","MAX_HEX_INT","PAGE_STEP_MULTIPLIER","getStep","updateValue","commit","numValue","range","clamped","trimmed","addHexValue","delta","intDelta","hexInt","rgb","hex","increment","step","currentValue","decrement","incrementPage","decrementPage","incrementToMax","decrementToMin","handleWheel","event","require_Primitive_Primitive","as","asChild","_ctx","name","require_VisuallyHidden_VisuallyHiddenInput","required","ALLOWED_INPUT_RE","props","__props","rootContext","require_ColorField_ColorFieldRoot","isFocused","vue","isComposing","handleCompositionStart","handleCompositionEnd","require_shared_useComposing","inputType","inputMode","handleInput","event","target","handleBlur","handleFocus","handleWheel","handleKeydown","handleBeforeInput","data","nextValue","numValue","require_Primitive_Primitive","asChild","as","_ctx","getNextSortedValues","prevValues: number[]","nextValue: number","atIndex: number","nextValues","prevValues","atIndex","nextValue","b","convertValueToPercentage","value: number","min: number","max: number","percentage","max","min","value","require_shared_clamp","getLabel","index: number","totalValues: number","totalValues","index","getClosestValueIndex","values: number[]","values","distances","closestDistance","getThumbInBoundsOffset","width: number","left: number","direction: number","halfWidth","width","offset","linearScale","left","direction","getStepsBetweenValues","hasMinStepsBetweenValues","minStepsBetweenValues: number","minStepsBetweenValues","stepsBetweenValues","input: readonly [number, number]","output: readonly [number, number]","input","output","ratio","getDecimalCount","roundValue","decimalCount: number","rounder","decimalCount","PAGE_KEYS","ARROW_KEYS","BACK_KEYS: Record<SlideDirection, string[]>","injectSliderOrientationContext","provideSliderOrientationContext","require_shared_createContext","props","__props","emits","__emit","max","min","dir","inverted","vue","forwardRef","sliderElement","require_shared_useForwardExpose","rootContext","require_Slider_SliderRoot","offsetPosition","rectRef","isSlidingFromLeft","getValueFromPointerEvent","event","slideStart","rect","thumb","thumbWidth","input","output","value","require_Slider_utils","position","startEdge","endEdge","direction","require_Slider_SliderImpl","_cache","slideDirection","isBackKey","$event","_ctx","props","__props","emits","__emit","max","min","inverted","vue","rootContext","require_Slider_SliderRoot","forwardRef","sliderElement","require_shared_useForwardExpose","offsetPosition","rectRef","isSlidingFromBottom","getValueFromPointerEvent","event","slideStart","rect","thumb","thumbHeight","input","output","value","require_Slider_utils","position","startEdge","endEdge","direction","require_Slider_SliderImpl","_cache","slideDirection","isBackKey","$event","_ctx","injectSliderRootContext","provideSliderRootContext","require_shared_createContext","props","__props","emits","__emit","min","max","step","minStepsBetweenThumbs","orientation","disabled","thumbAlignment","propDir","vue","dir","require_shared_useDirection","forwardRef","currentElement","require_shared_useForwardExpose","isFormControl","require_shared_useFormControl","CollectionSlot","require_Collection_Collection","modelValue","__vueuse_core","currentModelValue","valueIndexToChangeRef","valuesBeforeSlideStartRef","handleSlideStart","value","closestIndex","require_Slider_utils","updateValues","handleSlideMove","handleSlideEnd","prevValue","atIndex","commit","decimalCount","snapToStep","nextValue","require_shared_clamp","nextValues","hasChanged","thumbElements","require_Slider_SliderHorizontal","require_Slider_SliderVertical","$attrs","asChild","as","inverted","_cache","$event","event","direction","multiplier","stepInDirection","_ctx","name","require_VisuallyHidden_VisuallyHiddenInput","required","props","__props","emits","__emit","rootContext","require_Slider_SliderRoot","vue","require_Primitive_Primitive","_cache","event","require_Slider_utils","target","_ctx","rootContext","require_Slider_SliderRoot","orientation","require_Slider_utils","require_shared_useForwardExpose","percentages","vue","value","offsetStart","offsetEnd","require_Primitive_Primitive","asChild","as","_ctx","props","__props","rootContext","require_Slider_SliderRoot","orientation","require_Slider_utils","forwardRef","thumbElement","require_shared_useForwardExpose","CollectionItem","require_Collection_Collection","value","vue","percent","label","size","require_shared_useSize","orientationSize","thumbInBoundsOffset","isMounted","__vueuse_core","i","i$1","require_Primitive_Primitive","$attrs","asChild","as","_cache","index","_ctx","props","__props","getItems","require_Collection_Collection","forwardRef","thumbElement","require_shared_useForwardExpose","index","vue","require_Slider_SliderThumbImpl","_ctx","rootContext","require_Slider_SliderRoot","require_shared_useForwardExpose","vue","require_Primitive_Primitive","asChild","as","_ctx","injectColorSliderRootContext","provideColorSliderRootContext","require_shared_createContext","props","__props","emits","__emit","orientation","disabled","inverted","propDir","channel","colorSpace","stepProp","vue","dir","require_shared_useDirection","forwardRef","currentElement","require_shared_useForwardExpose","isFormControl","require_shared_useFormControl","modelValue","__vueuse_core","toNativeSpace","color$1","ch","space","require_color_convert","internalColor","require_color_parse","isAchromatic","hsl","newVal","parsed","currentHex","newHex","nativeColor","currentChannelVal","require_color_channel","newChannelVal","range","channelRange","color","newColor","hexString","min","max","step","channelValue","sliderValue","newValue","clamped","handleValueCommit","values","require_Slider_SliderRoot","$attrs","$event","as","asChild","_ctx","name","require_VisuallyHidden_VisuallyHiddenInput","required","props","__props","rootContext","require_ColorSlider_ColorSliderRoot","ariaLabel","vue","require_color_channel","ariaValueText","value","require_Slider_SliderThumb","as","asChild","_ctx","props","__props","rootContext","require_ColorSlider_ColorSliderRoot","backgroundStyle","vue","require_color_gradient","require_Slider_SliderTrack","as","asChild","_ctx","props","__props","colorString","vue","require_color_convert","colorObj","require_color_parse","alpha","isNoColor","label","require_color_utils","colorContrast","require_Primitive_Primitive","asChild","as","_ctx","injectColorSwatchPickerItemContext","provideColorSwatchPickerItemContext","require_shared_createContext","props","__props","emits","__emit","value","vue","forwarded","require_shared_useForwardPropsEmits","colorLabel","require_color_utils","require_Listbox_ListboxItem","_ctx","props","__props","vue","require_Listbox_ListboxItemIndicator","_ctx","props","__props","colorSwatchPickerItemContext","require_ColorSwatchPicker_ColorSwatchPickerItem","vue","require_ColorSwatch_ColorSwatch","props","__props","emits","__emit","modelValue","__vueuse_core","forwarded","require_shared_useForwardPropsEmits","vue","require_Listbox_ListboxRoot","$event","require_Listbox_ListboxContent","asChild","as","_ctx","props","__props","vue","require_Popper_PopperAnchor","_ctx","props","__props","vue","require_Popper_PopperArrow","_ctx","useIsUsingKeyboardImpl","isUsingKeyboard","vue","__vueuse_core","useIsUsingKeyboard","injectMenuContext","provideMenuContext","require_shared_createContext","injectMenuRootContext","provideMenuRootContext","props","__props","emits","__emit","modal","propDir","vue","dir","require_shared_useDirection","open","__vueuse_core","content","isUsingKeyboardRef","require_shared_useIsUsingKeyboard","value","element","require_Popper_PopperRoot","_ctx","injectMenuContentContext","provideMenuContentContext","require_shared_createContext","props","__props","emits","__emit","menuContext","require_Menu_MenuRoot","rootContext","trapFocus","disableOutsidePointerEvents","loop","vue","require_shared_useFocusGuards","require_shared_useBodyScrollLock","searchRef","timerRef","pointerGraceTimerRef","pointerGraceIntentRef","pointerDirRef","lastPointerXRef","currentItemId","rovingFocusGroupRef","forwardRef","contentElement","require_shared_useForwardExpose","handleTypeaheadSearch","require_shared_useTypeahead","highlightedElement","onKeydownNavigation","event","el","require_shared_useArrowNavigation","require_shared_getActiveElement","onKeydownEnter","filterElement","activeSubmenuContext","isPointerMovingToSubmenu","require_Menu_utils","handleMountAutoFocus","handleKeyDown","target","isKeyDownInside","isKeyDownInTextField","isModifierKey","isCharacterKey","collectionItems","candidateNodes","item","handleBlur","handlePointerMove","pointerXHasChanged","newDir","handlePointerEnter","intent","require_FocusScope_FocusScope","_cache","$event","require_DismissableLayer_DismissableLayer","require_RovingFocus_RovingFocusGroup","require_Popper_PopperContent","as","asChild","side","sideOffset","align","alignOffset","avoidCollisions","collisionBoundary","collisionPadding","arrowPadding","prioritizePosition","positionStrategy","updatePositionStrategy","sticky","hideWhenDetached","reference","_ctx","props","__props","contentContext","require_Menu_MenuContentImpl","forwardRef","currentElement","require_shared_useForwardExpose","CollectionItem","require_Collection_Collection","isFocused","vue","isHighlighted","handlePointerMove","event","require_Menu_utils","item","require_shared_getActiveElement","handlePointerLeave","textValue","require_Primitive_Primitive","$attrs","as","asChild","disabled","_cache","_ctx","props","__props","emits","__emit","forwardRef","currentElement","require_shared_useForwardExpose","rootContext","require_Menu_MenuRoot","contentContext","require_Menu_MenuContentImpl","isPointerDownRef","vue","handleSelect","menuItem","itemSelectEvent","require_Menu_utils","require_Menu_MenuItemImpl","_cache","event","isTypingAhead","disabled","_ctx","injectMenuItemIndicatorContext","provideMenuItemIndicatorContext","require_shared_createContext","indicatorContext","vue","require_Presence_Presence","forceMount","require_Menu_utils","require_Primitive_Primitive","as","asChild","_ctx","props","__props","emits","__emit","delegatedProps","__vueuse_core","forwarded","require_shared_useForwardProps","modelValue","require_Menu_MenuItemIndicator","vue","require_Menu_MenuItem","require_Menu_utils","_cache","event","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","menuContext","require_Menu_MenuRoot","forwardRef","currentElement","require_shared_useForwardExpose","require_shared_useHideOthers","vue","require_Menu_MenuContentImpl","_cache","$event","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","menuContext","require_Menu_MenuRoot","vue","require_Menu_MenuContentImpl","_cache","$event","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","menuContext","require_Menu_MenuRoot","rootContext","vue","require_Presence_Presence","forceMount","require_Menu_MenuRootContentModal","$attrs","_ctx","require_Menu_MenuRootContentNonModal","injectMenuGroupContext","provideMenuGroupContext","require_shared_createContext","props","__props","id","require_shared_useId","vue","require_Primitive_Primitive","_ctx","props","__props","groupContext","require_Menu_MenuGroup","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_Teleport_Teleport","_ctx","injectMenuRadioGroupContext","provideMenuRadioGroupContext","require_shared_createContext","props","__props","emits","__emit","delegatedProps","__vueuse_core","forwarded","require_shared_useForwardProps","modelValue","payload","vue","require_Menu_MenuGroup","_ctx","props","__props","emits","__emit","delegatedProps","__vueuse_shared","forwarded","require_shared_useForwardProps","value","vue","radioGroupContext","require_Menu_MenuRadioGroup","modelValue","require_Menu_MenuItemIndicator","require_Menu_MenuItem","require_Menu_utils","_cache","event","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","injectMenuSubContext","provideMenuSubContext","require_shared_createContext","props","__props","emits","__emit","open","__vueuse_core","parentMenuContext","require_Menu_MenuRoot","trigger","vue","content","cleanupFn","value","element","require_Popper_PopperRoot","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","menuContext","require_Menu_MenuRoot","rootContext","menuSubContext","require_Menu_MenuSub","parentContentContext","require_Menu_MenuContentImpl","forwardRef","subContentElement","require_shared_useForwardExpose","require_shared_useId","vue","require_Presence_Presence","forceMount","_cache","event","isMovingToParentContent","isKeyDownInside","isCloseKey","require_Menu_utils","_ctx","props","__props","menuContext","require_Menu_MenuRoot","rootContext","subContext","require_Menu_MenuSub","contentContext","require_Menu_MenuContentImpl","vue","open","openTimerRef","require_shared_useId","clearOpenTimer","handlePointerMove","event","require_Menu_utils","handlePointerLeave","contentRect","side","rightSide","bleed","contentNearEdge","contentFarEdge","handleKeyDown","isTypingAhead","require_Menu_MenuAnchor","require_Menu_MenuItemImpl","vnode","_cache","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuArrow","_ctx","props","__props","emits","__emit","emitsAsProps","require_shared_useEmitAsProps","require_shared_useForwardExpose","vue","require_Menu_MenuCheckboxItem","_ctx","injectContextMenuRootContext","provideContextMenuRootContext","require_shared_createContext","props","__props","emits","__emit","propDir","modal","pressOpenDelay","vue","require_shared_useForwardExpose","dir","require_shared_useDirection","open","triggerElement","value","require_Menu_MenuRoot","$event","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","require_shared_useForwardExpose","rootContext","require_ContextMenu_ContextMenuRoot","hasInteractedOutside","vue","require_Menu_MenuContent","_cache","event","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuGroup","_ctx","props","__props","emits","__emit","emitsAsProps","require_shared_useEmitAsProps","require_shared_useForwardExpose","vue","require_Menu_MenuItem","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuItemIndicator","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuLabel","_ctx","props","__props","vue","require_Menu_MenuPortal","_ctx","props","__props","emits","__emit","emitsAsProps","require_shared_useEmitAsProps","require_shared_useForwardExpose","vue","require_Menu_MenuRadioGroup","_ctx","props","__props","emits","__emit","emitsAsProps","require_shared_useEmitAsProps","require_shared_useForwardExpose","vue","require_Menu_MenuRadioItem","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuSeparator","_ctx","props","__props","emit","__emit","require_shared_useForwardExpose","open","__vueuse_core","vue","require_Menu_MenuSub","$event","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","require_shared_useForwardExpose","vue","require_Menu_MenuSubContent","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuSubTrigger","_ctx","isTouchOrPen","event: PointerEvent","event","props","__props","disabled","vue","forwardRef","currentElement","require_shared_useForwardExpose","rootContext","require_ContextMenu_ContextMenuRoot","point","virtualEl","longPressTimer","clearLongPress","handleOpen","event","handleContextMenu","handlePointerDown","require_ContextMenu_utils","handlePointerEvent","require_Menu_MenuAnchor","require_Primitive_Primitive","as","asChild","$attrs","_ctx","injectDateFieldRootContext","provideDateFieldRootContext","require_shared_createContext","props","__props","emits","__emit","disabled","readonly","propsIsDateUnavailable","granularity","defaultValue","propDir","propLocale","vue","locale","require_shared_useLocale","dir","require_shared_useDirection","formatter","require_shared_useDateFormatter","require_date_utils","primitiveElement","parentElement","require_Primitive_usePrimitiveElement","segmentElements","require_date_segment","item","modelValue","__vueuse_core","defaultDate","require_date_comparators","placeholder","step","inferredGranularity","isInvalid","initialSegments","require_date_parser","segmentValues","allSegmentContent","segmentContents","editableSegmentContents","part","value","_modelValue","require_shared_nullish","currentFocusedElement","currentSegmentIndex","el","nextFocusableSegment","sign","prevFocusableSegment","inputType","inputValue","inputMaxValue","inputMinValue","kbd","require_shared_useKbd","handleKeydown","e","setFocusedElement","__expose","require_Primitive_Primitive","$attrs","_ctx","require_VisuallyHidden_VisuallyHidden","id","name","required","_cache","$event","props","__props","rootContext","require_DateField_DateFieldRoot","hasLeftFocus","vue","lastKeyZero","handleSegmentClick","handleSegmentKeydown","handleSegmentBeforeInput","handleSegmentCompositionStart","handleSegmentCompositionEnd","attributes","require_date_useDateField","disabled","readonly","isInvalid","require_Primitive_Primitive","as","asChild","part","e","_ctx","injectPopoverRootContext","providePopoverRootContext","require_shared_createContext","props","__props","emit","__emit","modal","vue","open","__vueuse_core","triggerElement","hasCustomAnchor","value","require_Popper_PopperRoot","_ctx","props","__props","require_shared_useForwardExpose","rootContext","require_Popover_PopoverRoot","vue","require_Popper_PopperAnchor","_ctx","props","__props","vue","require_Popover_PopoverAnchor","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Popper_PopperArrow","_ctx","props","__props","vue","require_Popover_PopoverArrow","_ctx","injectDatePickerRootContext","provideDatePickerRootContext","require_shared_createContext","props","__props","emits","__emit","propLocale","disabled","readonly","pagedNavigation","weekdayFormat","fixedWeeks","numberOfMonths","preventDeselect","propsIsDateDisabled","propsIsDateUnavailable","defaultOpen","modal","id","name","required","minValue","maxValue","granularity","hideTimeZone","hourCycle","defaultValue","propDir","step","closeOnSelect","vue","dir","require_shared_useDirection","locale","require_shared_useLocale","weekStartsOn","require_date_calendar","modelValue","__vueuse_core","defaultDate","require_date_comparators","placeholder","open","dateFieldRef","resetTime","date","value","require_Popover_PopoverRoot","$event","_ctx","rootContext","require_DatePicker_DatePickerRoot","vue","require_Calendar_CalendarRoot","_cache","date","__internationalized_date","weekDays","grid","weekStartsOn","locale","fixedWeeks","_ctx","props","__props","vue","require_Calendar_CalendarCell","_ctx","props","__props","vue","require_Calendar_CalendarCellTrigger","slotProps","_ctx","props","__props","require_shared_useForwardExpose","rootContext","require_Popover_PopoverRoot","vue","require_Primitive_Primitive","as","_cache","$event","_ctx","props","__props","vue","require_Popover_PopoverClose","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardProps","__vueuse_shared","forwardRef","require_shared_useForwardExpose","rootContext","require_Popover_PopoverRoot","require_shared_useFocusGuards","vue","require_FocusScope_FocusScope","trapFocus","_cache","$event","require_DismissableLayer_DismissableLayer","disableOutsidePointerEvents","require_Popper_PopperContent","_ctx","props","__props","emits","__emit","rootContext","require_Popover_PopoverRoot","isRightClickOutsideRef","vue","require_shared_useBodyScrollLock","forwarded","require_shared_useForwardPropsEmits","forwardRef","currentElement","require_shared_useForwardExpose","require_shared_useHideOthers","require_Popover_PopoverContentImpl","_cache","event","originalEvent","ctrlLeftClick","isRightClick","_ctx","props","__props","emits","__emit","rootContext","require_Popover_PopoverRoot","hasInteractedOutsideRef","vue","hasPointerDownOutsideRef","forwarded","require_shared_useForwardPropsEmits","require_Popover_PopoverContentImpl","_cache","event","target","_ctx","props","__props","emits","__emit","rootContext","require_Popover_PopoverRoot","forwarded","require_shared_useForwardPropsEmits","forwardRef","require_shared_useForwardExpose","require_shared_useId","vue","require_Presence_Presence","forceMount","require_Popover_PopoverContentModal","_ctx","require_Popover_PopoverContentNonModal","props","__props","vue","require_Teleport_Teleport","_ctx","props","__props","emits","__emit","propsToForward","vue","forwarded","require_shared_useForwardPropsEmits","require_Popover_PopoverPortal","portal","require_Popover_PopoverContent","$attrs","_cache","event","require_date_utils","_ctx","rootContext","require_DatePicker_DatePickerRoot","vue","require_DateField_DateFieldRoot","_cache","date","segments","modelValue","_ctx","props","__props","vue","require_Calendar_CalendarGrid","_ctx","props","__props","vue","require_Calendar_CalendarGridBody","_ctx","props","__props","vue","require_Calendar_CalendarGridHead","_ctx","props","__props","vue","require_Calendar_CalendarGridRow","_ctx","props","__props","vue","require_Calendar_CalendarHeadCell","_ctx","props","__props","vue","require_Calendar_CalendarHeader","_ctx","props","__props","vue","require_Calendar_CalendarHeading","headingValue","_ctx","props","__props","vue","require_DateField_DateFieldInput","_ctx","props","__props","vue","require_Calendar_CalendarNext","slotProps","_ctx","props","__props","vue","require_Calendar_CalendarPrev","slotProps","_ctx","props","__props","rootContext","require_Popover_PopoverRoot","forwardRef","triggerElement","require_shared_useForwardExpose","require_shared_useId","vue","require_Primitive_Primitive","require_Popper_PopperAnchor","as","_ctx","props","__props","rootContext","require_DatePicker_DatePickerRoot","vue","require_Popover_PopoverTrigger","_cache","e","_ctx","injectDateRangeFieldRootContext","provideDateRangeFieldRootContext","require_shared_createContext","props","__props","emits","__emit","disabled","readonly","propsIsDateUnavailable","propDir","propLocale","vue","locale","require_shared_useLocale","dir","require_shared_useDirection","formatter","require_shared_useDateFormatter","require_date_utils","primitiveElement","parentElement","require_Primitive_usePrimitiveElement","segmentElements","require_date_segment","item","modelValue","__vueuse_core","defaultDate","require_date_comparators","placeholder","step","inferredGranularity","isStartInvalid","isEndInvalid","isInvalid","initialSegments","require_date_parser","startSegmentValues","endSegmentValues","startSegmentContent","endSegmentContent","segmentContents","editableSegmentContents","part","startValue","endValue","_startValue","_endValue","_modelValue","value","currentFocusedElement","currentSegmentIndex","el","nextFocusableSegment","sign","prevFocusableSegment","kbd","require_shared_useKbd","handleKeydown","e","setFocusedElement","__expose","require_Primitive_Primitive","$attrs","_ctx","require_VisuallyHidden_VisuallyHidden","id","name","required","_cache","$event","props","__props","rootContext","require_DateRangeField_DateRangeFieldRoot","hasLeftFocus","vue","lastKeyZero","handleSegmentClick","handleSegmentKeydown","handleSegmentBeforeInput","handleSegmentCompositionStart","handleSegmentCompositionEnd","attributes","require_date_useDateField","disabled","readonly","isInvalid","require_Primitive_Primitive","as","asChild","part","type","e","_ctx","props","__props","vue","require_Popover_PopoverAnchor","_ctx","props","__props","vue","require_Popover_PopoverArrow","_ctx","injectDateRangePickerRootContext","provideDateRangePickerRootContext","require_shared_createContext","props","__props","emits","__emit","propLocale","disabled","readonly","pagedNavigation","weekdayFormat","fixedWeeks","numberOfMonths","preventDeselect","propsIsDateDisabled","propsIsDateUnavailable","propsIsDateHighlightable","defaultOpen","modal","id","name","required","minValue","maxValue","granularity","hideTimeZone","hourCycle","propsDir","allowNonContiguousRanges","fixedDate","maximumDays","step","closeOnSelect","vue","dir","require_shared_useDirection","locale","require_shared_useLocale","weekStartsOn","require_date_calendar","modelValue","__vueuse_core","defaultDate","require_date_comparators","placeholder","open","dateFieldRef","value","date","require_Popover_PopoverRoot","$event","_ctx","useRangeCalendarState","props: UseRangeCalendarProps","isStartInvalid","vue","props","isEndInvalid","isInvalid","require_date_comparators","isSelectionStart","date: DateValue","__internationalized_date","date","isSelectionEnd","isSelected","rangeIsDateDisabled","diff","require_date_calendar","daysLeft","startLimit","endLimit","maxDate","minDate","isDateHighlightable","highlightedRange","isStartBeforeFocused","start","end","maximumDays","anchor","focused","isHighlightedStart","isHighlightedEnd","hasSelectedDate","isStartDateDisabled","isEndDateDisabled","isSelectedDisabled","hasStart","hasEnd","selectedFocusableDate","injectRangeCalendarRootContext","provideRangeCalendarRootContext","require_shared_createContext","props","__props","emits","__emit","disabled","readonly","initialFocus","pagedNavigation","weekdayFormat","fixedWeeks","numberOfMonths","preventDeselect","propsIsDateUnavailable","propsIsDateHighlightable","propsIsDateDisabled","calendarLabel","maxValue","minValue","propDir","propLocale","propsNextPage","propsPrevPage","allowNonContiguousRanges","disableDaysOutsideCurrentView","fixedDate","maximumDays","vue","primitiveElement","parentElement","require_Primitive_usePrimitiveElement","dir","require_shared_useDirection","locale","require_shared_useLocale","weekStartsOn","require_date_calendar","lastPressedDateValue","focusedValue","isEditing","modelValue","__vueuse_core","normalizeRange","value","normalizedModelValue","validModelValue","defaultDate","require_date_comparators","startValue","endValue","placeholder","onPlaceholderChange","fullCalendarLabel","headingValue","isDateDisabled","isDateUnavailable","isNextButtonDisabled","isPrevButtonDisabled","grid","weekdays","isOutsideVisibleView","nextPage","prevPage","formatter","isPlaceholderFocusable","firstFocusableDate","require_Calendar_useCalendar","isInvalid","isSelected","isDateHighlightable","highlightedRange","isSelectionStart","isSelectionEnd","isHighlightedStart","isHighlightedEnd","rangeIsDateDisabled","hasSelectedDate","isSelectedDisabled","selectedFocusableDate","require_RangeCalendar_useRangeCalendar","_modelValue","next","__internationalized_date","_startValue","_endValue","nextValue","kbd","require_shared_useKbd","ev","require_date_utils","require_Primitive_Primitive","as","asChild","_hoisted_1","_hoisted_2","_ctx","rootContext","require_DateRangePicker_DateRangePickerRoot","vue","require_RangeCalendar_RangeCalendarRoot","_cache","date","__internationalized_date","weekDays","grid","weekStartsOn","locale","fixedWeeks","_ctx","rootContext","require_RangeCalendar_RangeCalendarRoot","vue","require_Primitive_Primitive","as","asChild","date","_ctx","props","__props","vue","require_RangeCalendar_RangeCalendarCell","_ctx","props","__props","rootContext","require_RangeCalendar_RangeCalendarRoot","kbd","require_shared_useKbd","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","labelText","vue","require_date_comparators","isUnavailable","isSelectedDate","isSelectionStart","isSelectionEnd","isHighlightStart","isHighlightEnd","isHighlighted","allowNonContiguousRanges","isDateToday","__internationalized_date","isOutsideView","isOutsideVisibleView","isDisabled","dayValue","isFocusedDate","changeDate","e","date","handleClick","handleFocus","handleArrowKey","parentElement","indexIncrementation","sign","shiftFocus","day","add","candidateDayValue","candidateDay","require_Primitive_Primitive","as","asChild","_ctx","props","__props","vue","require_RangeCalendar_RangeCalendarCellTrigger","slotProps","_ctx","props","__props","vue","require_Popover_PopoverClose","_ctx","props","__props","emits","__emit","propsToForward","vue","forwarded","require_shared_useForwardPropsEmits","require_Popover_PopoverPortal","portal","require_Popover_PopoverContent","$attrs","_cache","event","require_date_utils","_ctx","rootContext","require_DateRangePicker_DateRangePickerRoot","vue","require_DateRangeField_DateRangeFieldRoot","_cache","date","__internationalized_date","segments","modelValue","_ctx","props","__props","rootContext","require_RangeCalendar_RangeCalendarRoot","disabled","vue","readonly","require_Primitive_Primitive","_cache","$event","_ctx","props","__props","vue","require_RangeCalendar_RangeCalendarGrid","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_RangeCalendar_RangeCalendarGridBody","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_RangeCalendar_RangeCalendarGridHead","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_RangeCalendar_RangeCalendarGridRow","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_RangeCalendar_RangeCalendarHeadCell","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_RangeCalendar_RangeCalendarHeader","_ctx","props","__props","rootContext","require_RangeCalendar_RangeCalendarRoot","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_RangeCalendar_RangeCalendarHeading","headingValue","_ctx","props","__props","vue","require_DateRangeField_DateRangeFieldInput","_ctx","props","__props","disabled","vue","rootContext","require_RangeCalendar_RangeCalendarRoot","handleClick","require_Primitive_Primitive","_ctx","_cache","props","__props","vue","require_RangeCalendar_RangeCalendarNext","slotProps","_ctx","props","__props","disabled","vue","rootContext","require_RangeCalendar_RangeCalendarRoot","handleClick","require_Primitive_Primitive","_ctx","_cache","props","__props","vue","require_RangeCalendar_RangeCalendarPrev","slotProps","_ctx","props","__props","rootContext","require_DateRangePicker_DateRangePickerRoot","vue","require_Popover_PopoverTrigger","_cache","e","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuArrow","_ctx","props","__props","emits","__emit","emitsAsProps","require_shared_useEmitAsProps","require_shared_useForwardExpose","vue","require_Menu_MenuCheckboxItem","_ctx","injectDropdownMenuRootContext","provideDropdownMenuRootContext","require_shared_createContext","props","__props","emit","__emit","require_shared_useForwardExpose","open","__vueuse_core","triggerElement","vue","modal","propDir","dir","require_shared_useDirection","value","require_Menu_MenuRoot","$event","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","require_shared_useForwardExpose","rootContext","require_DropdownMenu_DropdownMenuRoot","hasInteractedOutsideRef","vue","handleCloseAutoFocus","event","require_shared_useId","require_Menu_MenuContent","_cache","originalEvent","ctrlLeftClick","isRightClick","_ctx","props","__props","emits","__emit","modelValue","__vueuse_core","rootContext","require_Menu_MenuRoot","contentContext","require_Menu_MenuContentImpl","subContext","require_Menu_MenuSub","vue","v","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","disabled","activedescendant","isComposing","handleCompositionStart","handleCompositionEnd","require_shared_useComposing","event","el","handleInput","target","handleKeyDown","require_Primitive_Primitive","as","asChild","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuGroup","_ctx","props","__props","emits","__emit","emitsAsProps","require_shared_useEmitAsProps","require_shared_useForwardExpose","vue","require_Menu_MenuItem","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuItemIndicator","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuLabel","_ctx","props","__props","vue","require_Menu_MenuPortal","_ctx","props","__props","emits","__emit","emitsAsProps","require_shared_useEmitAsProps","require_shared_useForwardExpose","vue","require_Menu_MenuRadioGroup","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","require_shared_useForwardExpose","vue","require_Menu_MenuRadioItem","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuSeparator","_ctx","props","__props","emit","__emit","open","__vueuse_core","require_shared_useForwardExpose","vue","require_Menu_MenuSub","$event","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","require_shared_useForwardExpose","vue","require_Menu_MenuSubContent","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuSubTrigger","_ctx","props","__props","rootContext","require_DropdownMenu_DropdownMenuRoot","forwardRef","triggerElement","require_shared_useForwardExpose","vue","require_shared_useId","require_Menu_MenuAnchor","require_Primitive_Primitive","as","disabled","_cache","event","_ctx","injectEditableRootContext","provideEditableRootContext","require_shared_createContext","props","__props","emits","__emit","id","name","defaultValue","startWithEditMode","propPlaceholder","maxLength","disabled","propDir","submitMode","activationMode","selectOnFocus","readonly","autoResize","required","vue","inputRef","dir","require_shared_useDirection","isEditing","modelValue","__vueuse_core","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","isFormControl","require_shared_useFormControl","placeholder","inputValue","cancel","edit","submit","handleDismiss","pointerDownOutside","require_DismissableLayer_utils","focusOutside","isEmpty","__expose","require_Primitive_Primitive","$attrs","as","asChild","_ctx","require_VisuallyHidden_VisuallyHiddenInput","props","__props","context","require_Editable_EditableRoot","vue","require_Primitive_Primitive","_ctx","props","__props","context","require_Editable_EditableRoot","vue","require_Primitive_Primitive","as","_ctx","_cache","props","__props","context","require_Editable_EditableRoot","vue","require_Primitive_Primitive","as","_ctx","_cache","props","__props","kbd","require_shared_useKbd","context","require_Editable_EditableRoot","disabled","vue","placeholder","primitiveElement","inputRef","require_Primitive_usePrimitiveElement","value","handleSubmitKeyDown","event","require_Primitive_Primitive","_cache","$event","_ctx","props","__props","context","require_Editable_EditableRoot","placeholder","vue","handleFocus","handleDoubleClick","require_Primitive_Primitive","_ctx","props","__props","context","require_Editable_EditableRoot","vue","require_Primitive_Primitive","as","_ctx","_cache","props","__props","require_shared_useForwardExpose","vue","require_Popper_PopperArrow","_ctx","injectHoverCardRootContext","provideHoverCardRootContext","require_shared_createContext","props","__props","emit","__emit","openDelay","closeDelay","vue","require_shared_useForwardExpose","open","__vueuse_core","openTimerRef","closeTimerRef","hasSelectionRef","isPointerDownOnContentRef","isPointerInTransitRef","triggerElement","handleOpen","handleClose","handleDismiss","value","require_Popper_PopperRoot","_ctx","excludeTouch","eventHandler: () => void","event: PointerEvent","event","eventHandler","getTabbableNodes","container: HTMLElement","nodes: HTMLElement[]","walker","container","node: any","node","nodes","props","__props","emits","__emit","forwarded","require_shared_useForwardProps","forwardRef","contentElement","require_shared_useForwardExpose","rootContext","require_HoverCard_HoverCardRoot","isPointerInTransit","onPointerExit","require_shared_useGraceArea","__vueuse_shared","containSelection","vue","originalBodyUserSelect","cleanupFn","body","handlePointerUp","require_HoverCard_utils","tabbable","__vueuse_core","event","require_DismissableLayer_DismissableLayer","_cache","$event","require_Popper_PopperContent","$attrs","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","forwardRef","require_shared_useForwardExpose","rootContext","require_HoverCard_HoverCardRoot","vue","require_Presence_Presence","forceMount","require_HoverCard_HoverCardContentImpl","_cache","$event","require_HoverCard_utils","_ctx","props","__props","vue","require_Teleport_Teleport","_ctx","forwardRef","currentElement","require_shared_useForwardExpose","rootContext","require_HoverCard_HoverCardRoot","handleLeave","vue","require_Popper_PopperAnchor","reference","require_Primitive_Primitive","asChild","as","_cache","$event","require_HoverCard_utils","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Primitive_Primitive","_cache","event","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuArrow","_ctx","props","__props","emits","__emit","emitsAsProps","require_shared_useEmitAsProps","require_shared_useForwardExpose","vue","require_Menu_MenuCheckboxItem","_ctx","injectMenubarRootContext","provideMenubarRootContext","require_shared_createContext","props","__props","emit","__emit","forwardRef","require_shared_useForwardExpose","CollectionSlot","require_Collection_Collection","modelValue","__vueuse_core","currentTabStopId","vue","propDir","loop","dir","require_shared_useDirection","value","require_RovingFocus_RovingFocusGroup","$event","require_Primitive_Primitive","_ctx","injectMenubarMenuContext","provideMenubarMenuContext","require_shared_createContext","props","__props","value","require_shared_useId","rootContext","require_Menubar_MenubarRoot","require_shared_useForwardExpose","triggerElement","vue","wasKeyboardTriggerOpenRef","open","require_Menu_MenuRoot","_cache","value$1","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","require_shared_useForwardExpose","rootContext","require_Menubar_MenubarRoot","menuContext","require_Menubar_MenubarMenu","require_shared_useId","getItems","require_Collection_Collection","hasInteractedOutsideRef","vue","handleArrowNavigation","event","targetIsSubTrigger","isPrevKey","candidateValues","i","currentIndex","require_shared_useTypeahead","nextValue","require_Menu_MenuContent","_cache","target","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuGroup","_ctx","props","__props","emits","__emit","emitsAsProps","require_shared_useEmitAsProps","require_shared_useForwardExpose","vue","require_Menu_MenuItem","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuItemIndicator","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuLabel","_ctx","props","__props","vue","require_Menu_MenuPortal","_ctx","props","__props","emits","__emit","emitsAsProps","require_shared_useEmitAsProps","require_shared_useForwardExpose","vue","require_Menu_MenuRadioGroup","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","require_shared_useForwardExpose","vue","require_Menu_MenuRadioItem","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuSeparator","_ctx","props","__props","emit","__emit","require_shared_useForwardExpose","open","__vueuse_core","vue","require_Menu_MenuSub","$event","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","require_shared_useForwardExpose","getItems","require_Collection_Collection","rootContext","require_Menubar_MenubarRoot","menuContext","require_Menubar_MenubarMenu","handleArrowNavigation","event","candidateValues","i","currentIndex","require_shared_useTypeahead","nextValue","vue","require_Menu_MenuSubContent","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Menu_MenuSubTrigger","_ctx","rootContext","require_Menubar_MenubarRoot","menuContext","require_Menubar_MenubarMenu","forwardRef","triggerElement","require_shared_useForwardExpose","CollectionItem","require_Collection_Collection","isFocused","vue","open","require_RovingFocus_RovingFocusItem","disabled","require_Menu_MenuAnchor","require_Primitive_Primitive","as","asChild","_cache","event","$event","_ctx","useMonthPickerState","props: UseMonthPickerStateProps","isMonthSelected","dateObj: DateValue","props","d","require_date_comparators","dateObj","isInvalid","vue","useMonthPicker","props: UseMonthPickerProps","formatter","require_shared_useDateFormatter","resolveMatcher","matcher?: Matcher | Ref<Matcher | undefined>","matcher","headingFormatOptions","options: DateFormatterOptions","options","grid","require_date_calendar","isMonthDisabled","__internationalized_date","isMonthUnavailable","date: DateValue","date","isNextButtonDisabled","nextPageFunc?: (date: DateValue) => DateValue","currentDate","nextPageFunc","nextDate","nextYear","isPrevButtonDisabled","prevPageFunc?: (date: DateValue) => DateValue","prevPageFunc","prevDate","prevYear","nextPage","newDate","newDate$1","prevPage","value","headingValue","fullCalendarLabel","injectMonthPickerRootContext","provideMonthPickerRootContext","require_shared_createContext","props","__props","emits","__emit","disabled","readonly","initialFocus","multiple","minValue","maxValue","preventDeselect","propsIsMonthDisabled","propsIsMonthUnavailable","calendarLabel","defaultValue","propsNextPage","propsPrevPage","propDir","propLocale","vue","primitiveElement","parentElement","require_Primitive_usePrimitiveElement","locale","require_shared_useLocale","dir","require_shared_useDirection","headingId","require_shared_useId","modelValue","__vueuse_core","defaultDate","require_date_comparators","placeholder","onPlaceholderChange","value","fullCalendarLabel","headingValue","isMonthDisabled","isMonthUnavailable","isNextButtonDisabled","isPrevButtonDisabled","nextPage","prevPage","formatter","grid","require_MonthPicker_useMonthPicker","isInvalid","isMonthSelected","_modelValue","lastValue","resolveMonthValue","reference","onMonthChange","modelValueArray","index","date","next","require_date_utils","require_Primitive_Primitive","as","asChild","_ctx","_hoisted_1","_hoisted_2","rootContext","require_MonthPicker_MonthPickerRoot","vue","require_Primitive_Primitive","as","asChild","date","_ctx","props","__props","kbd","require_shared_useKbd","rootContext","require_MonthPicker_MonthPickerRoot","primitiveElement","require_Primitive_usePrimitiveElement","shortMonthValue","vue","require_date_comparators","labelText","isUnavailable","isCurrentMonth","todayDate","__internationalized_date","isDisabled","isFocusedMonth","isSelectedMonth","changeMonth","date","handleClick","handleArrowKey","e","parentElement","sign","shiftFocus","shiftFocusYear","currentMonth","add","depth","candidateMonthValue","candidateMonth","years","require_Primitive_Primitive","month","_cache","_ctx","props","__props","rootContext","require_MonthPicker_MonthPickerRoot","disabled","vue","readonly","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","rootContext","require_MonthPicker_MonthPickerRoot","vue","require_Primitive_Primitive","_ctx","props","__props","rootContext","require_MonthPicker_MonthPickerRoot","disabled","vue","handleClick","require_Primitive_Primitive","_ctx","_cache","props","__props","rootContext","require_MonthPicker_MonthPickerRoot","disabled","vue","handleClick","require_Primitive_Primitive","_ctx","_cache","useRangeMonthPickerState","props: UseRangeMonthPickerProps","isStartInvalid","vue","props","isEndInvalid","isInvalid","require_date_comparators","isSelectionStart","date: DateValue","date","isSelectionEnd","isSelected","rangeIsMonthDisabled","maximumMonths","diff","monthsLeft","startLimit","endLimit","fixedValue","maxDate","minDate","highlightedRange","isStartBeforeFocused","start","end","anchor","focused","maxEnd","cappedEnd","minStart","injectMonthRangePickerRootContext","provideMonthRangePickerRootContext","require_shared_createContext","props","__props","emits","__emit","disabled","readonly","initialFocus","preventDeselect","propsIsMonthUnavailable","propsIsMonthDisabled","calendarLabel","maxValue","minValue","propDir","propLocale","propsNextPage","propsPrevPage","allowNonContiguousRanges","fixedDate","maximumMonths","vue","primitiveElement","parentElement","require_Primitive_usePrimitiveElement","dir","require_shared_useDirection","locale","require_shared_useLocale","headingId","require_shared_useId","lastPressedDateValue","focusedValue","isEditing","modelValue","__vueuse_core","normalizeRange","value","normalizedModelValue","validModelValue","defaultDate","require_date_comparators","startValue","endValue","placeholder","onPlaceholderChange","fullCalendarLabel","headingValue","isMonthDisabled","isMonthUnavailable","isNextButtonDisabled","isPrevButtonDisabled","grid","nextPage","prevPage","formatter","require_MonthPicker_useMonthPicker","isInvalid","isSelected","highlightedRange","isSelectionStart","isSelectionEnd","isHighlightedStart","isHighlightedEnd","rangeIsMonthDisabled","require_MonthRangePicker_useRangeMonthPicker","_modelValue","next","_startValue","_endValue","nextValue","kbd","require_shared_useKbd","ev","require_date_utils","require_Primitive_Primitive","as","asChild","_hoisted_1","_hoisted_2","_ctx","rootContext","require_MonthRangePicker_MonthRangePickerRoot","vue","require_Primitive_Primitive","as","asChild","date","_ctx","props","__props","kbd","require_shared_useKbd","rootContext","require_MonthRangePicker_MonthRangePickerRoot","primitiveElement","require_Primitive_usePrimitiveElement","shortMonthValue","vue","require_date_comparators","labelText","isUnavailable","isCurrentMonth","todayDate","__internationalized_date","isDisabled","isFocusedMonth","isSelectedMonth","isSelectionStart","isSelectionEnd","isHighlightStart","isHighlightEnd","isHighlighted","allowNonContiguousRanges","changeMonth","e","date","handleClick","handleFocus","handleArrowKey","parentElement","sign","shiftFocus","shiftFocusYear","currentMonth","add","depth","candidateMonthValue","candidateMonth","years","require_Primitive_Primitive","month","_cache","_ctx","props","__props","rootContext","require_MonthRangePicker_MonthRangePickerRoot","disabled","vue","readonly","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","rootContext","require_MonthRangePicker_MonthRangePickerRoot","vue","require_Primitive_Primitive","_ctx","props","__props","rootContext","require_MonthRangePicker_MonthRangePickerRoot","disabled","vue","handleClick","require_Primitive_Primitive","_ctx","_cache","props","__props","rootContext","require_MonthRangePicker_MonthRangePickerRoot","disabled","vue","handleClick","require_Primitive_Primitive","_ctx","_cache","getOpenState","open: boolean","open","makeTriggerId","baseId: string","value: string","baseId","value","makeContentId","LINK_SELECT","EVENT_ROOT_CONTENT_DISMISS","getTabbableCandidates","container: HTMLElement","nodes: HTMLElement[]","walker","container","node: any","isHiddenInput","node","nodes","focusFirst","candidates: HTMLElement[]","previouslyFocusedElement","require_shared_getActiveElement","candidates","candidate","removeFromTabOrder","prevTabIndex","whenMouse","handler: (event?: E) => void","event: E","event","handler","injectNavigationMenuContext","provideNavigationMenuContext","require_shared_createContext","props","__props","emits","__emit","modelValue","__vueuse_core","previousValue","vue","forwardRef","rootNavigationMenu","require_shared_useForwardExpose","indicatorTrack","viewport","activeTrigger","getItems","CollectionSlot","require_Collection_Collection","delayDuration","skipDelayDuration","propDir","disableClickTrigger","disableHoverTrigger","unmountOnHide","dir","require_shared_useDirection","isDelaySkipped","skipNextClose","computedDelay","debouncedFn","val","items","i","item","require_NavigationMenu_utils","onItemDismiss","require_shared_useId","require_Primitive_Primitive","as","asChild","orientation","_ctx","injectNavigationMenuItemContext","provideNavigationMenuItemContext","require_shared_createContext","props","__props","require_shared_useForwardExpose","getItems","require_Collection_Collection","context","require_NavigationMenu_NavigationMenuRoot","value","require_shared_useId","triggerRef","vue","focusProxyRef","contentId","require_NavigationMenu_utils","restoreContentTabOrderRef","wasEscapeCloseRef","handleContentEntry","side","el","candidates","handleContentExit","handleClose","handleKeydown","ev","currentFocus","require_shared_getActiveElement","itemsArray","i","newSelectedElement","require_shared_useArrowNavigation","require_Primitive_Primitive","asChild","as","_ctx","props","__props","emits","__emit","getItems","require_Collection_Collection","forwardRef","currentElement","require_shared_useForwardExpose","menuContext","require_NavigationMenu_NavigationMenuRoot","itemContext","require_NavigationMenu_NavigationMenuItem","triggerId","require_NavigationMenu_utils","contentId","prevMotionAttributeRef","vue","motionAttribute","values","i","index","prevIndex","isSelected","wasSelected","attribute","handleFocusOutside","ev","target$1","handlePointerDownOutside","target","isTrigger","isRootViewport","cleanupFn","content","handleClose","require_shared_getActiveElement","handleEscapeKeyDown","handleKeydown","isMetaKey","isTabKey","candidates","focusedElement","candidate","nextCandidates","require_shared_useArrowNavigation","handleDismiss","rootContentDismissEvent","require_DismissableLayer_DismissableLayer","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","__vueuse_shared","forwardRef","require_shared_useForwardExpose","menuContext","require_NavigationMenu_NavigationMenuRoot","itemContext","require_NavigationMenu_NavigationMenuItem","open","vue","isLastActiveValue","require_Presence_Presence","forceMount","present","require_NavigationMenu_NavigationMenuContentImpl","require_NavigationMenu_utils","$attrs","_cache","$event","_ctx","props","__props","forwardRef","require_shared_useForwardExpose","menuContext","require_NavigationMenu_NavigationMenuRoot","indicatorStyle","vue","isHorizontal","isVisible","activeTrigger","handlePositionChange","__vueuse_core","require_Presence_Presence","forceMount","require_Primitive_Primitive","as","$attrs","_ctx","props","__props","emits","__emit","CollectionItem","require_Collection_Collection","require_shared_useForwardExpose","handleClick","ev","linkSelectEvent","require_NavigationMenu_utils","rootContentDismissEvent","vue","require_Primitive_Primitive","as","active","_ctx","props","__props","menuContext","require_NavigationMenu_NavigationMenuRoot","forwardRef","currentElement","require_shared_useForwardExpose","vue","require_Primitive_Primitive","$attrs","as","_ctx","props","__props","emits","__emit","modelValue","__vueuse_core","previousValue","vue","menuContext","require_NavigationMenu_NavigationMenuRoot","forwardRef","currentElement","require_shared_useForwardExpose","indicatorTrack","viewport","activeTrigger","getItems","CollectionSlot","require_Collection_Collection","items","i","item","val","require_Primitive_Primitive","orientation","as","_ctx","props","__props","menuContext","require_NavigationMenu_NavigationMenuRoot","itemContext","require_NavigationMenu_NavigationMenuItem","CollectionItem","require_Collection_Collection","forwardRef","triggerElement","require_shared_useForwardExpose","triggerId","vue","contentId","hasPointerMoveOpenedRef","__vueuse_core","wasClickCloseRef","open","require_NavigationMenu_utils","handlePointerEnter","handlePointerMove","ev","handlePointerLeave","handleClick","event","handleKeydown","entryKey","setFocusProxyRef","node","handleVisuallyHiddenFocus","content","prevFocusedElement","wasTriggerFocused","wasFocusFromContent","require_Primitive_Primitive","disabled","as","$attrs","_ctx","require_VisuallyHidden_VisuallyHidden","props","__props","forwardRef","currentElement","require_shared_useForwardExpose","menuContext","require_NavigationMenu_NavigationMenuRoot","activeTrigger","rootNavigationMenu","modelValue","size","vue","position","open","content","el","updatePosition","bodyWidth","bodyHeight","rootRect","rect","offsetWidth","offsetHeight","startPositionLeft","startPositionTop","posLeft","posTop","screenOffset","rightOffset","bottomOffset","__vueuse_core","require_Presence_Presence","forceMount","_cache","present","require_Primitive_Primitive","$attrs","as","asChild","require_NavigationMenu_utils","$event","_ctx","$7fe67f77592add0a$var$formatterCache","$7fe67f77592add0a$var$supportsSignDisplay","$7fe67f77592add0a$var$supportsUnit","$7fe67f77592add0a$var$UNITS","$7fe67f77592add0a$export$cc77c4ff7e8673c5","locale","options","$7fe67f77592add0a$var$getCachedNumberFormatter","value","res","$7fe67f77592add0a$export$711b50b3c525e0f2","unit","unitDisplay","values","start","end","startParts","endParts","p","numberingSystem","cacheKey","a","b","numberFormatter","numberFormat","signDisplay","num","needsPositiveSign","negative","noSign","minus","$52ebab2a875d5a2c$var$CURRENCY_SIGN_REGEX","$52ebab2a875d5a2c$var$NUMBERING_SYSTEMS","$52ebab2a875d5a2c$export$cd11ab140839f11d","locale","options","value","$52ebab2a875d5a2c$var$getNumberParserImpl","minValue","maxValue","$52ebab2a875d5a2c$var$numberParserCache","defaultParser","$52ebab2a875d5a2c$var$getCachedNumberParser","numberingSystem","parser","cacheKey","b","$52ebab2a875d5a2c$var$NumberParserImpl","$52ebab2a875d5a2c$var$getSymbols","isGroupSymbolAllowed","fullySanitizedValue","isNegative","index","newValue","$7fe67f77592add0a$exports","obj","$52ebab2a875d5a2c$var$replaceAll","$52ebab2a875d5a2c$var$nonLiteralParts","$52ebab2a875d5a2c$var$pluralNumbers","formatter","intlOptions","originalOptions","symbolFormatter","allParts","posAllParts","pluralParts","n","noNumeralUnits","p","i","unit","minusSign","plusSign","decimal","group","allPartsLiterals","$52ebab2a875d5a2c$var$escapeRegex","pluralPartsLiterals","sortedLiterals","a","literals","numerals","indexes","d","numeral","str","find","replace","string","usePressedHold","options: { target?: MaybeComputedElementRef, disabled: Ref<boolean> }","disabled","options","timeout","vue","triggerHook","__vueuse_shared","resetTimeout","onIncrementPressStart","delay: number","delay","handlePressStart","handlePressEnd","isPressed","target","__vueuse_core","onPressStart","event: PointerEvent","event","onPressRelease","isClient","useNumberFormatter","locale: Ref<string>","options: Ref<Intl.NumberFormatOptions | undefined>","NumberFormatter","locale","useNumberParser","NumberParser","handleDecimalOperation","operator: '-' | '+'","value1: number","value2: number","result","operator","value1","value2","value1Decimal","value2Decimal","value1DecimalLength","value2DecimalLength","multiplier","injectNumberFieldRootContext","provideNumberFieldRootContext","require_shared_createContext","props","__props","emits","__emit","disabled","readonly","disableWheelChange","invertWheelChange","min","max","step","stepSnapping","formatOptions","id","propLocale","vue","modelValue","__vueuse_core","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","locale","require_shared_useLocale","isFormControl","require_shared_useFormControl","inputEl","isDecreaseDisabled","require_shared_nullish","clampInputValue","require_NumberField_utils","isIncreaseDisabled","handleChangingValue","type","multiplier","currentInputValue","numberParser","handleIncrease","handleDecrease","handleMinMaxValue","numberFormatter","inputMode","textValueFormatter","textValue","validate","val","setInputValue","clampedValue","require_shared_clamp","applyInputValue","parsedValue","el","require_Primitive_Primitive","$attrs","as","asChild","_ctx","name","require_VisuallyHidden_VisuallyHiddenInput","required","props","__props","rootContext","require_NumberField_NumberFieldRoot","isDisabled","vue","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","isPressed","onTrigger","require_NumberField_utils","require_Primitive_Primitive","as","_cache","_ctx","props","__props","rootContext","require_NumberField_NumberFieldRoot","isDisabled","vue","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","isPressed","onTrigger","require_NumberField_utils","require_Primitive_Primitive","as","_cache","_ctx","props","__props","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","rootContext","require_NumberField_NumberFieldRoot","kbd","require_shared_useKbd","isComposing","handleCompositionStart","handleCompositionEnd","require_shared_useComposing","handleKeydown","event","handleWheelEvent","require_shared_getActiveElement","vue","inputValue","handleChange","require_Primitive_Primitive","_cache","target","nextValue","$event","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Primitive_Primitive","_ctx","_cache","injectPaginationRootContext","providePaginationRootContext","require_shared_createContext","props","__props","emits","__emit","siblingCount","disabled","showEdges","vue","require_shared_useForwardExpose","page","__vueuse_core","pageCount","value","require_Primitive_Primitive","as","asChild","_ctx","props","__props","rootContext","require_Pagination_PaginationRoot","require_shared_useForwardExpose","disabled","vue","require_Primitive_Primitive","as","_cache","$event","_ctx","props","__props","rootContext","require_Pagination_PaginationRoot","require_shared_useForwardExpose","disabled","vue","require_Primitive_Primitive","as","_cache","$event","_ctx","range","start: number","end: number","length","end","start","_","idx","transform","items: (string | number)[]","items","value","ELLIPSIS","getRange","currentPage: number","pageCount: number","siblingCount: number","showEdges: boolean","lastPageIndex","pageCount","leftSiblingIndex","currentPage","siblingCount","rightSiblingIndex","showEdges","itemCount","showLeftEllipsis","showRightEllipsis","rightRange","middleRange","props","__props","require_shared_useForwardExpose","rootContext","require_Pagination_PaginationRoot","transformedRange","vue","require_Pagination_utils","require_Primitive_Primitive","_ctx","props","__props","require_shared_useForwardExpose","rootContext","require_Pagination_PaginationRoot","isSelected","vue","disabled","require_Primitive_Primitive","value","as","_cache","$event","_ctx","props","__props","require_shared_useForwardExpose","rootContext","require_Pagination_PaginationRoot","disabled","vue","require_Primitive_Primitive","as","_cache","$event","_ctx","props","__props","require_shared_useForwardExpose","rootContext","require_Pagination_PaginationRoot","disabled","vue","require_Primitive_Primitive","as","_cache","$event","_ctx","injectPinInputRootContext","providePinInputRootContext","require_shared_createContext","props","__props","emits","__emit","mask","otp","placeholder","type","disabled","propDir","vue","forwardRef","require_shared_useForwardExpose","dir","require_shared_useDirection","modelValue","__vueuse_core","currentModelValue","inputElements","onInputElementChange","el","isNumericMode","isCompleted","i","require_Primitive_Primitive","$attrs","_ctx","require_VisuallyHidden_VisuallyHiddenInput","id","name","required","_cache","$event","props","__props","context","require_PinInput_PinInputRoot","inputElements","vue","currentValue","disabled","isOtpMode","isPasswordMode","NUMBER_REG","NON_NUMBER_REG","primitiveElement","currentElement","require_Primitive_usePrimitiveElement","isComposing","handleCompositionStart","handleCompositionEnd","require_shared_useComposing","event","target","value","filtered","handleMultipleCharacter","updateModelValueAt","nextEl$1","nextEl","handleInput","updatePlaceholder","require_shared_getActiveElement","handleKeydown","require_shared_useArrowNavigation","handleBackspace","prevEl","handleDelete","handleFocus","firstEmptyInputIdx","_","idx","handleBlur","handlePaste","clipboardData","rawValues","values","tempModelValue","initialIndex","lastIndex","i","input","num","removeTrailingEmptyStrings","index","require_Primitive_Primitive","as","asChild","_cache","$event","_ctx","DEFAULT_MAX","injectProgressRootContext","provideProgressRootContext","require_shared_createContext","isNumber","v","validateValue","value","max","require_shared_nullish","validateMax","props","__props","emit","__emit","require_shared_useForwardExpose","modelValue","__vueuse_core","vue","correctedValue","newMax","correctedMax","progressState","require_Primitive_Primitive","asChild","as","getValueText","getValueLabel","_ctx","props","__props","rootContext","require_Progress_ProgressRoot","require_shared_useForwardExpose","vue","require_Primitive_Primitive","_ctx","RADIO_SELECT","handleSelect","event: MouseEvent","value: AcceptableValue | undefined","callback: (event: SelectEvent) => void","eventDetail","event","value","require_shared_handleAndDispatchCustomEvent","callback","props","__props","emits","__emit","checked","__vueuse_core","value","vue","forwardRef","triggerElement","require_shared_useForwardExpose","isFormControl","require_shared_useFormControl","ariaLabel","handleClick","event","require_RadioGroup_utils","ev","require_Primitive_Primitive","$attrs","id","as","asChild","disabled","required","name","_ctx","require_VisuallyHidden_VisuallyHiddenInput","injectRadioGroupRootContext","provideRadioGroupRootContext","require_shared_createContext","props","__props","emits","__emit","forwardRef","currentElement","require_shared_useForwardExpose","modelValue","__vueuse_core","disabled","loop","orientation","name","required","propDir","vue","dir","require_shared_useDirection","isFormControl","require_shared_useFormControl","value","require_RovingFocus_RovingFocusGroup","require_Primitive_Primitive","asChild","as","_ctx","require_VisuallyHidden_VisuallyHiddenInput","injectRadioGroupItemContext","provideRadiogroupItemContext","require_shared_createContext","props","__props","emits","__emit","forwardRef","currentElement","require_shared_useForwardExpose","rootContext","require_RadioGroup_RadioGroupRoot","disabled","vue","required","checked","ohash","isArrowKeyPressed","ARROW_KEYS","__vueuse_core","event","handleFocus","require_RovingFocus_RovingFocusItem","require_RadioGroup_Radio","$attrs","_cache","$event","value","_ctx","forwardRef","require_shared_useForwardExpose","itemContext","require_RadioGroup_RadioGroupItem","vue","require_Presence_Presence","forceMount","require_Primitive_Primitive","asChild","as","$attrs","_ctx","injectScrollAreaRootContext","provideScrollAreaRootContext","require_shared_createContext","props","__props","cornerWidth","vue","cornerHeight","viewport","content","scrollbarX","scrollbarY","scrollbarXEnabled","scrollbarYEnabled","type","propDir","scrollHideDelay","dir","require_shared_useDirection","scrollTop","scrollTopLeft","__expose","forwardRef","scrollArea","require_shared_useForwardExpose","el","scrollbar","rendered","width","height","require_Primitive_Primitive","as","_ctx","rootContext","require_ScrollArea_ScrollAreaRoot","width","vue","height","hasSize","setCornerHeight","offsetHeight","setCornerWidth","offsetWidth","__vueuse_core","require_Primitive_Primitive","$parent","_ctx","props","__props","forwardRef","require_shared_useForwardExpose","rootContext","require_ScrollArea_ScrollAreaRoot","hasBothScrollbarsVisible","vue","hasCorner","require_ScrollArea_ScrollAreaCornerImpl","_ctx","linearScale","input: readonly [number, number]","output: readonly [number, number]","value: number","input","output","ratio","value","getThumbSize","sizes: Sizes","getThumbRatio","sizes","scrollbarPadding","thumbSize","viewportSize: number","contentSize: number","viewportSize","contentSize","addUnlinkedScrollListener","node: HTMLElement","handler","prevPosition","node","rAF","loop","position","isHorizontalScroll","isVerticalScroll","getThumbOffsetFromScroll","scrollPos: number","dir: Direction","thumbSizePx","scrollbar","maxScrollPos","maxThumbPos","scrollClampRange","dir","scrollWithoutMomentum","require_shared_clamp","scrollPos","toInt","value?: string","getScrollPositionFromPointer","pointerPos: number","pointerOffset: number","thumbCenter","offset","pointerOffset","thumbOffsetFromEnd","minPointerPos","maxPointerPos","scrollRange","pointerPos","isScrollingWithinScrollbarBounds","maxScrollPos: number","rootContext","require_ScrollArea_ScrollAreaRoot","scrollbarVisibleContext","require_ScrollArea_ScrollAreaScrollbarVisible","forwardRef","scrollbarElement","require_shared_useForwardExpose","vue","sizes","require_ScrollArea_ScrollAreaScrollbarImpl","require_ScrollArea_utils","_cache","$event","_ctx","rootContext","require_ScrollArea_ScrollAreaRoot","scrollbarVisibleContext","require_ScrollArea_ScrollAreaScrollbarVisible","forwardRef","scrollbarElement","require_shared_useForwardExpose","vue","sizes","require_ScrollArea_ScrollAreaScrollbarImpl","require_ScrollArea_utils","_cache","$event","_ctx","rootContext","require_ScrollArea_ScrollAreaRoot","scrollbarContext","require_ScrollArea_ScrollAreaScrollbar","forwardRef","require_shared_useForwardExpose","visible","vue","handleResize","__vueuse_core","isOverflowX","isOverflowY","require_Presence_Presence","forceMount","require_ScrollArea_ScrollAreaScrollbarVisible","$attrs","_ctx","rootContext","require_ScrollArea_ScrollAreaRoot","scrollbarContext","require_ScrollArea_ScrollAreaScrollbar","forwardRef","require_shared_useForwardExpose","state","dispatch","require_shared_useStateMachine","visible","vue","handlePointerEnter","handlePointerLeave","debounceScrollEnd","__vueuse_core","onCleanup","timeId","viewport","scrollDirection","prevScrollPos","handleScroll","scrollPos","scrollArea","require_Presence_Presence","forceMount","require_ScrollArea_ScrollAreaScrollbarAuto","$attrs","_ctx","rootContext","require_ScrollArea_ScrollAreaRoot","forwardRef","require_shared_useForwardExpose","timeout","visible","vue","handlePointerEnter","handlePointerLeave","scrollArea","require_Presence_Presence","forceMount","require_ScrollArea_ScrollAreaScrollbarAuto","$attrs","_ctx","rootContext","require_ScrollArea_ScrollAreaRoot","scrollbarContext","require_ScrollArea_ScrollAreaScrollbar","forwardRef","require_shared_useForwardExpose","state","dispatch","require_shared_useStateMachine","visible","vue","onCleanup","timeId","debounceScrollEnd","__vueuse_core","viewport","scrollDirection","prevScrollPos","handleScroll","scrollPos","require_Presence_Presence","forceMount","require_ScrollArea_ScrollAreaScrollbarVisible","$attrs","_ctx","injectScrollAreaScrollbarContext","provideScrollAreaScrollbarContext","require_shared_createContext","props","__props","forwardRef","require_shared_useForwardExpose","rootContext","require_ScrollArea_ScrollAreaRoot","isHorizontal","vue","orientation","forceMount","asChild","as","require_ScrollArea_ScrollAreaScrollbarHover","$attrs","_ctx","require_ScrollArea_ScrollAreaScrollbarScroll","require_ScrollArea_ScrollAreaScrollbarGlimpse","require_ScrollArea_ScrollAreaScrollbarAuto","require_ScrollArea_ScrollAreaScrollbarVisible","injectScrollAreaScrollbarVisibleContext","provideScrollAreaScrollbarVisibleContext","require_shared_createContext","rootContext","require_ScrollArea_ScrollAreaRoot","scrollbarContext","require_ScrollArea_ScrollAreaScrollbar","forwardRef","require_shared_useForwardExpose","sizes","vue","hasThumb","thumbRatio","require_ScrollArea_utils","thumbRef","pointerOffset","handleWheelScroll","event","payload","isShowingScrollbarX","scrollPos","handleThumbDown","handleThumbUp","handleSizeChange","getScrollPosition","pointerPos","dir","onDragScroll","onThumbPositionChange","offset","onThumbChange","element","require_ScrollArea_ScrollAreaScrollbarX","$attrs","_ctx","require_ScrollArea_ScrollAreaScrollbarY","props","__props","emit","__emit","rootContext","require_ScrollArea_ScrollAreaRoot","scrollbarVisibleContext","require_ScrollArea_ScrollAreaScrollbarVisible","scrollbarContext","require_ScrollArea_ScrollAreaScrollbar","forwardRef","scrollbar","require_shared_useForwardExpose","prevWebkitUserSelectRef","vue","rectRef","handleDragScroll","event","x","y","handlePointerDown","handlePointerMove","handlePointerUp","element","handleWheel","isScrollbarWheel","maxScrollPos","handleSizeChange","require_ScrollArea_utils","__vueuse_core","require_Primitive_Primitive","_ctx","props","__props","rootContext","require_ScrollArea_ScrollAreaRoot","scrollbarContextVisible","require_ScrollArea_ScrollAreaScrollbarVisible","handlePointerDown","event","thumbRect","x","handlePointerUp","forwardRef","thumbElement","require_shared_useForwardExpose","removeUnlinkedScrollListenerRef","vue","viewport","handleScroll","listener","require_ScrollArea_utils","sizes","__vueuse_core","require_Primitive_Primitive","as","_ctx","props","__props","propNonce","vue","nonce","require_shared_useNonce","rootContext","require_ScrollArea_ScrollAreaRoot","viewportElement","contentElement","__expose","forwardRef","require_shared_useForwardExpose","$attrs","require_Primitive_Primitive","as","_ctx","_cache","OPEN_KEYS","SELECTION_KEYS","CONTENT_MARGIN","valueComparator","value: T | T[] | undefined","currentValue: T","comparator?: string | ((a: T, b: T) => boolean)","value","val","compare","currentValue","comparator","value?: T","currentValue?: T","ohash","shouldShowPlaceholder","value?: AcceptableValue | AcceptableValue[]","injectSelectRootContext","provideSelectRootContext","require_shared_createContext","props","__props","emits","__emit","required","disabled","multiple","propDir","vue","modelValue","__vueuse_core","open","triggerElement","valueElement","triggerPointerDownPosRef","isEmptyModelValue","require_shared_nullish","require_Collection_Collection","dir","require_shared_useDirection","isFormControl","require_shared_useFormControl","optionsSet","nativeSelectKey","option","handleValueChange","value","array","index","i","require_Select_utils","getOption","node","existingOption","require_Popper_PopperRoot","_ctx","name","require_Select_BubbleSelect","autocomplete","_hoisted_1","props","__props","selectElement","vue","rootContext","require_Select_SelectRoot","cur","prev","selectProto","setValue","event","handleInput","require_VisuallyHidden_VisuallyHidden","_ctx","props","__props","forwarded","require_shared_useForwardProps","vue","require_Popper_PopperContent","_ctx","SelectContentDefaultContextValue","injectSelectContentContext","provideSelectContentContext","require_shared_createContext","props","__props","emits","__emit","rootContext","require_Select_SelectRoot","require_shared_useFocusGuards","require_shared_useBodyScrollLock","CollectionSlot","getItems","require_Collection_Collection","content","vue","require_shared_useHideOthers","search","handleTypeaheadSearch","require_shared_useTypeahead","viewport","selectedItem","selectedItemText","isPositioned","firstValidItemFoundRef","firstSelectedItemInArrayFoundRef","focusSelectedItem","require_Menu_utils","onOpenChange","triggerPointerDownPosRef","cleanupFn","pointerMoveDelta","handlePointerMove","event","handlePointerUp","handleKeyDown","isModifierKey","candidateNodes","i","currentElement","currentIndex","pickedProps","forwardedProps","require_shared_useForwardProps","node","value","disabled","isFirstValidItem","isSelectedItem","require_Select_utils","require_FocusScope_FocusScope","_cache","require_DismissableLayer_DismissableLayer","disableOutsidePointerEvents","$event","position","require_Select_SelectPopperPosition","require_Select_SelectItemAlignedPosition","$attrs","vnode","el","__vueuse_core","_ctx","injectSelectItemAlignedPositionContext","provideSelectItemAlignedPositionContext","require_shared_createContext","props","__props","emits","__emit","getItems","require_Collection_Collection","rootContext","require_Select_SelectRoot","contentContext","require_Select_SelectContentImpl","shouldExpandOnScrollRef","vue","shouldRepositionRef","contentWrapperElement","forwardRef","contentElement","require_shared_useForwardExpose","viewport","selectedItem","selectedItemText","focusSelectedItem","position","triggerRect","contentRect","valueNodeRect","itemTextRect","itemTextOffset","left","leftDelta","minContentWidth","contentWidth","rightEdge","require_Select_utils","clampedLeft","require_shared_clamp","right","rightDelta","leftEdge","clampedRight","items","i","availableHeight","itemsHeight","contentStyles","contentBorderTopWidth","contentPaddingTop","contentBorderBottomWidth","contentPaddingBottom","fullContentHeight","minContentHeight","viewportStyles","viewportPaddingTop","viewportPaddingBottom","topEdgeToTriggerMiddle","triggerMiddleToBottomEdge","selectedItemHalfHeight","itemOffsetMiddle","contentTopToItemMiddle","itemMiddleToContentBottom","isLastItem","viewportOffsetBottom","clampedTriggerMiddleToBottomEdge","height","isFirstItem","contentZIndex","handleScrollButtonChange","node","__vueuse_core","require_Primitive_Primitive","$attrs","_ctx","props","__props","contentContext","require_Select_SelectContentImpl","vue","require_Popper_PopperArrow","_ctx","props","__props","require_Select_SelectRoot","require_Select_SelectContentImpl","vue","_ctx","props","__props","emits","__emit","forwarded","require_shared_useForwardPropsEmits","rootContext","require_Select_SelectRoot","fragment","vue","presenceRef","present","renderPresence","renderPresenceTimeout","clearRenderPresenceTimeout","_value","_oldValue","onCleanup","require_Presence_Presence","require_Select_SelectContentImpl","$attrs","_ctx","_hoisted_1","require_Select_SelectProvider","injectSelectGroupContext","provideSelectGroupContext","require_shared_createContext","props","__props","id","require_shared_useId","vue","require_Primitive_Primitive","_ctx","vue","require_Primitive_Primitive","as","asChild","_ctx","_cache","injectSelectItemContext","provideSelectItemContext","require_shared_createContext","props","__props","emits","__emit","disabled","vue","rootContext","require_Select_SelectRoot","contentContext","require_Select_SelectContentImpl","forwardRef","currentElement","require_shared_useForwardExpose","CollectionItem","require_Collection_Collection","isSelected","require_Select_utils","isFocused","textValue","textId","require_shared_useId","SELECT_SELECT","handleSelectCustomEvent","ev","eventDetail","require_shared_handleAndDispatchCustomEvent","handleSelect","handlePointerMove","event","handlePointerLeave","require_shared_getActiveElement","handleKeyDown","node","require_Primitive_Primitive","as","asChild","_cache","$event","_ctx","props","__props","itemContext","require_Select_SelectItem","vue","require_Primitive_Primitive","_ctx","props","__props","rootContext","require_Select_SelectRoot","contentContext","require_Select_SelectContentImpl","itemContext","require_Select_SelectItem","forwardRef","itemTextElement","require_shared_useForwardExpose","optionProps","vue","require_Primitive_Primitive","$attrs","_ctx","props","__props","groupContext","require_Select_SelectGroup","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_Teleport_Teleport","_ctx","emits","__emit","getItems","require_Collection_Collection","contentContext","require_Select_SelectContentImpl","autoScrollTimerRef","vue","clearAutoScrollTimer","i","item","require_shared_getActiveElement","handlePointerDown","handlePointerMove","require_Primitive_Primitive","$parent","_cache","_ctx","contentContext","require_Select_SelectContentImpl","alignedPositionContext","require_Select_SelectItemAlignedPosition","forwardRef","currentElement","require_shared_useForwardExpose","canScrollDown","vue","cleanupFn","handleScroll","maxScroll","viewport","require_Select_SelectScrollButtonImpl","_cache","selectedItem","_ctx","contentContext","require_Select_SelectContentImpl","alignedPositionContext","require_Select_SelectItemAlignedPosition","forwardRef","currentElement","require_shared_useForwardExpose","canScrollUp","vue","cleanupFn","handleScroll","viewport","require_Select_SelectScrollButtonImpl","_cache","selectedItem","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","rootContext","require_Select_SelectRoot","forwardRef","triggerElement","require_shared_useForwardExpose","isDisabled","vue","require_shared_useId","getItems","require_Collection_Collection","search","handleTypeaheadSearch","resetTypeahead","require_shared_useTypeahead","handleOpen","handlePointerOpen","event","require_Popper_PopperAnchor","reference","require_Primitive_Primitive","as","require_Select_utils","asChild","_cache","target","isTypingAhead","_ctx","props","__props","forwardRef","currentElement","require_shared_useForwardExpose","rootContext","require_Select_SelectRoot","vue","selectedLabel","list","options","getOption","value","option","require_Select_utils","slotText","require_Primitive_Primitive","as","asChild","_ctx","props","__props","propNonce","vue","nonce","require_shared_useNonce","contentContext","require_Select_SelectContentImpl","alignedPositionContext","require_Select_SelectItemAlignedPosition","forwardRef","currentElement","require_shared_useForwardExpose","prevScrollTopRef","handleScroll","event","viewport","shouldExpandOnScrollRef","contentWrapper","scrolledBy","availableHeight","require_Select_utils","cssMinHeight","cssHeight","prevHeight","nextHeight","clampedNextHeight","heightDiff","require_Primitive_Primitive","$attrs","_ctx","_cache","props","__props","ORIENTATIONS","isValidOrientation","orientation","computedOrientation","vue","ariaOrientation","semanticProps","require_Primitive_Primitive","as","asChild","_ctx","props","__props","vue","require_component_BaseSeparator","_ctx","assert","expectedCondition: any","message","expectedCondition","getPanelGroupElement","id: string","rootElement: ParentNode | HTMLElement","isBrowser","rootElement","id","element","getResizeHandleElement","scope: ParentNode | HTMLElement","scope","getResizeHandleElementIndex","groupId: string","getResizeHandleElementsForGroup","groupId","handle","getResizeHandlePanelIds","handleId: string","panelsArray: PanelData[]","handleId","handles","index","idBefore: string | null","panelsArray","idAfter: string | null","idBefore","idAfter","isKeyDown","event: ResizeEvent","event","isMouseEvent","isTouchEvent","getResizeEventCoordinates","touch","getResizeEventCursorPosition","direction: Direction","isHorizontal","direction","x","y","calculateDragOffsetPercentage","event: ResizeEvent","dragHandleId: string","direction: Direction","initialDragState: DragState","panelGroupElement: HTMLElement","isHorizontal","direction","handleElement","require_utils_dom","dragHandleId","panelGroupElement","require_utils_assert","groupId","initialCursorPosition","initialDragState","cursorPosition","require_utils_events","event","groupElement","groupRect","groupSizeInPixels","calculateDeltaPercentage","initialDragState: DragState | null","keyboardResizeBy: number | null","delta","keyboardResizeBy","movement","calculateAriaValues","layout","panelsArray","pivotIndices","currentMinSize","currentMaxSize","totalMinSize","totalMaxSize","firstIndex","panelData","index","constraints","maxSize","minSize","valueMax","valueMin","valueNow","calculateUnsafeDefaultLayout","panelDataArray","layout: number[]","panelConstraintsArray","numPanelsWithSizes","remainingSize","panelConstraints","defaultSize","numRemainingPanels","size","fuzzyCompareNumbers","actual: number","expected: number","fractionDigits: number","PRECISION","actual","fractionDigits","expected","delta","fuzzyNumbersEqual","fractionDigits?: number","callPanelCallbacks","panelsArray: PanelData[]","layout: number[]","panelIdToLastNotifiedSizeMap: Record<string, number>","groupSizeInPixels?: number | null","layout","size","index","panelData","panelsArray","require_utils_assert","callbacks","constraints","panelId","collapsedSize","collapsible","sizeUnit","displaySize","groupSizeInPixels","lastNotifiedSize","panelIdToLastNotifiedSizeMap","require_utils_compare","onCollapse","onExpand","onResize","debounce","callback: T","durationMs","timeoutId: NodeJS.Timeout | null","args","timeoutId","callback","resizePanel","panelConstraintsArray","panelIndex","size","panelConstraints","require_utils_assert","collapsedSize","collapsible","maxSize","minSize","require_utils_compare","halfwayPoint","PRECISION","compareLayouts","a: number[]","b: number[]","a","b","index","adjustLayoutByDelta","delta","prevLayout","panelConstraintsArray","pivotIndices","trigger","require_utils_compare","nextLayout","firstPivotIndex","secondPivotIndex","require_utils_assert","deltaApplied","panelConstraints","prevSize","collapsedSize","minSize","localDelta","collapsible","increment","maxAvailableDelta","require_utils_resizePanel","minAbsDelta","deltaRemaining","unsafeSize","safeSize","pivotIndex","totalSize","total","size","determinePivotIndices","groupId: string","dragHandleId: string","panelGroupElement: ParentNode","index","require_utils_dom","groupId","dragHandleId","panelGroupElement","intersects","rectOne: Rectangle","rectTwo: Rectangle","strict: boolean","strict","rectOne","rectTwo","compare","a: HTMLElement","b: HTMLElement","a","b","ancestors","getAncestors","common_ancestor","require_utils_assert","z_indexes","getZIndex","findStackingContext","children","furthest_ancestors","i","child","props","isFlexItem","node: HTMLElement","display","getParent","node","createsStackingContext","style","nodes: HTMLElement[]","nodes","node: HTMLElement | null","EXCEEDED_HORIZONTAL_MIN","EXCEEDED_HORIZONTAL_MAX","EXCEEDED_VERTICAL_MIN","EXCEEDED_VERTICAL_MAX","getInputType","isCoarsePointer","intersectingHandles: ResizeHandlerData[]","isPointerDown","ownerDocumentCounts: Map<Document, number>","panelConstraintFlags: Map<string, number>","registeredResizeHandlers","registerResizeHandle","resizeHandleId: string","element: HTMLElement","direction: Ref<Direction>","hitAreaMargins: PointerHitAreaMargins","nonce: Ref<string | undefined>","setResizeHandlerState: SetResizeHandlerState","ownerDocument","element","data: ResizeHandlerData","direction","hitAreaMargins","nonce","setResizeHandlerState","count","ownerDocumentCounts","data","updateListeners","panelConstraintFlags","resizeHandleId","require_utils_style","handlePointerDown","event: ResizeEvent","target","event","x","y","require_utils_events","recalculateIntersectingHandles","intersectingHandles","updateResizeHandlerStates","handlePointerMove","updateCursor","handlePointerUp","targetElement: HTMLElement | null","targetElement","dragHandleElement","dragHandleRect","bottom","left","right","top","margin","require_utils_stackingOrder","currentElement: HTMLElement | null","didIntersect","currentElement","require_utils_rects","reportConstraintsViolation","flag: number","flag","intersectsHorizontal","intersectsVertical","nonce: string | undefined","_nonce","constraintFlags","_","body","action: ResizeHandlerAction","isActive","action","currentCursorStyle: string | null","styleElement: HTMLStyleElement | null","getCursorStyle","state: CursorState","constraintFlags: number","constraintFlags","horizontalMin","EXCEEDED_HORIZONTAL_MIN","horizontalMax","EXCEEDED_HORIZONTAL_MAX","verticalMin","EXCEEDED_VERTICAL_MIN","verticalMax","EXCEEDED_VERTICAL_MAX","state","resetGlobalCursorStyle","styleElement","currentCursorStyle","setGlobalCursorStyle","nonce?: string","style","nonce","computePanelFlexBoxStyle","defaultSize","dragState","layout","panelData","panelIndex","precision","size","flexGrow","convertValueToPercent","sizeUnit","groupSizeInPixels","value","convertPanelConstraintsToPercent","panelDataArray","panelData","constraints","collapsedSize","defaultSize","maxSize","minSize","hasPixelSizedPanel","panelDataArray: PanelData[]","recalculateLayoutForPixelPanels","layout","prevGroupSize","nextGroupSize","pixelPanelIndices","indices","index","pixelIndexSet","nextLayout","size","prevPercentForPixelPanels","sum","nextPixelPercents","totalNextPixelPercent","prevPercentForPercentPanels","availableNextPercent","scaleFactor","panelIndex","arrayIndex","prevSize","total","factor","validatePanelGroupLayout","prevLayout","panelConstraints","nextLayout","nextLayoutTotalSize","accumulated","current","size","require_utils_compare","index","unsafeSize","require_utils_assert","safeSize","remainingSize","require_utils_resizePanel","prevSize","useWindowSplitterPanelGroupBehavior","eagerValuesRef","groupId","layout","panelDataArray","panelGroupElement","setLayout","getPanelDataWithPercentConstraints","vue","onCleanup","_panelGroupElement","panelDataArrayWithPercentConstraints","resizeHandleElements","require_utils_dom","index","valueMax","valueMin","valueNow","require_utils_calculate","resizeHandleElement","panelData","require_utils_assert","eagerValues","panelDataArray$1","groupElement","handles","cleanupFunctions","handle","handleId","idBefore","idAfter","onKeyDown","event: KeyboardEvent","event","size","collapsedSize","collapsible","minSize","nextLayout","require_utils_layout","require_utils_compare","panelData$1","require_utils_pivot","cleanupFunction","initializeDefaultStorage","storageObject: PanelGroupStorage","storageObject","name: string","name","value: string","value","error","getPanelGroupKey","autoSaveId: string","autoSaveId","getPanelKey","panels: PanelData[]","panels","panel","constraints","id","idIsFromProps","order","a","b","loadSerializedPanelGroupState","storage: PanelGroupStorage","panelGroupKey","serialized","storage","parsed","loadPanelGroupState","state","panelKey","savePanelGroupState","panelSizesBeforeCollapse: Map<string, number>","sizes: number[]","sizeUnits: { [panelIndex: number]: 'px' | '%' }","index","sizeUnits","panelSizesBeforeCollapse","sizes","LOCAL_STORAGE_DEBOUNCE_INTERVAL","defaultStorage","name","require_utils_storage","value","injectPanelGroupContext","providePanelGroupContext","require_shared_createContext","props","__props","emits","__emit","debounceMap","direction","vue","groupId","require_shared_useId","dir","require_shared_useDirection","forwardRef","panelGroupElementRef","require_shared_useForwardExpose","dragState","groupSizeInPixels","groupSizeAtLastLayoutInit","layout","panelIdToLastNotifiedSizeMapRef","panelSizeBeforeCollapseRef","prevDeltaRef","committedValuesRef","eagerValuesRef","getGroupSizeInPixels","element","rect","size","getPanelConstraintsInPercent","groupSizeOverride","groupSize","require_utils_units","getPanelDataWithPercentConstraints","percentConstraints","panelData","index","setLayout","val","convertLayoutToNativeUnits","internalLayout","panelDataArray","require_composables_useWindowSplitterPanelGroupBehavior","onCleanup","resizeObserver","entries","entry","height","width","nextSize","autoSaveId","debouncedSave","require_utils_debounce","clonedPanelDataArray","clonedPanelSizesBeforeCollapse","getPanelStyle","defaultSize","panelIndex","findPanelDataIndex","require_utils_style","registerPanel","panelA","panelB","orderA","orderB","storage","prevLayout","unsafeLayout","state","panelDataArrayWithPercentConstraints","require_utils_calculate","panelConstraints","nextLayout","require_utils_validation","require_shared_arrays","require_utils_callPanelCallbacks","prevSize","initSize","recalculatedLayout","require_utils_layout","registerResizeHandle","dragHandleId","event","panelGroupElement","direction$1","dragState$1","groupId$1","keyboardResizeBy","initialLayout","pivotIndices","require_utils_pivot","delta","isHorizontal","require_utils_events","layoutChanged","require_utils_registry","resizePanel","unsafePanelSize","panelConstraintsArray","panelUnit","sizeInPercent","panelSize","panelDataHelper","require_utils_assert","reevaluatePanelConstraints","prevConstraints","layout$1","nextConstraints","prevPanelSize","nextCollapsedSize","nextMaxSize","nextMinSize","isPanelCollapsed","startDragging","handleElement","require_utils_dom","initialCursorPosition","stopDragging","unregisterPanel","collapsePanel","collapsedSize","sizeUnit","sizeBeforeCollapse","expandPanel","minSize","require_utils_compare","restoredSize","baseSize","getPanelSize","collapsible","constraints","isPanelExpanded","prevPanelData","panelConstraintsFromGroup","require_Primitive_Primitive","as","asChild","_ctx","props","__props","emits","__emit","panelGroupContext","require_Splitter_SplitterGroup","collapsePanel","expandPanel","getPanelSize","getPanelStyle","isPanelCollapsed","resizePanel","groupId","reevaluatePanelConstraints","registerPanel","unregisterPanel","panelId","require_shared_useId","panelDataRef","vue","args","require_utils_constants","constraints","prevConstraints","style","isCollapsed","isExpanded","collapse","expand","resize","size","__expose","require_Primitive_Primitive","as","asChild","collapsible","_ctx","useWindowSplitterResizeHandlerBehavior","disabled","handleId","resizeHandler","panelGroupElement","vue","onCleanup","_panelGroupElement","handleElement","require_utils_dom","onKeyDown","event: KeyboardEvent","event","groupId","require_utils_assert","handles","index","nextIndex","props","__props","emits","__emit","forwardRef","currentElement","require_shared_useForwardExpose","disabled","vue","panelGroupContext","require_Splitter_SplitterGroup","direction","groupId","registerResizeHandleWithParentGroup","startDragging","stopDragging","panelGroupElement","resizeHandleId","require_shared_useId","state","isFocused","resizeHandler","propNonce","nonce","require_shared_useNonce","require_shared_browser","onCleanup","element","require_utils_assert","setResizeHandlerState","action","isActive","event","require_utils_registry","require_composables_useWindowSplitterBehavior","require_Primitive_Primitive","as","asChild","tabindex","_cache","$event","_ctx","injectStepperRootContext","provideStepperRootContext","require_shared_createContext","props","__props","emits","__emit","propDir","propOrientation","linear","vue","dir","require_shared_useDirection","totalStepperItems","modelValue","__vueuse_core","totalStepperItemsArray","isFirstStep","isLastStep","totalSteps","goToStep","step","nextStep","prevStep","hasNext","hasPrev","nextStepperItem","prevStepperItem","isNextDisabled","isPrevDisabled","value","__expose","require_shared_useForwardExpose","require_Primitive_Primitive","as","asChild","orientation","_ctx","_hoisted_1","injectStepperItemContext","provideStepperItemContext","require_shared_createContext","props","__props","disabled","step","completed","vue","forwardRef","require_shared_useForwardExpose","rootContext","require_Stepper_StepperRoot","titleId","require_shared_useId","descriptionId","itemState","isFocusable","require_Primitive_Primitive","as","asChild","_ctx","props","__props","require_shared_useForwardExpose","itemContext","require_Stepper_StepperItem","vue","require_Primitive_Primitive","_ctx","props","__props","itemContext","require_Stepper_StepperItem","require_shared_useForwardExpose","vue","require_Primitive_Primitive","_ctx","props","__props","rootContext","require_Stepper_StepperRoot","itemContext","require_Stepper_StepperItem","require_shared_useForwardExpose","vue","require_Separator_Separator","_ctx","props","__props","itemContext","require_Stepper_StepperItem","require_shared_useForwardExpose","vue","require_Primitive_Primitive","_ctx","rootContext","require_Stepper_StepperRoot","itemContext","require_Stepper_StepperItem","kbd","require_shared_useKbd","stepperItems","vue","handleMouseDown","event","handleKeyDown","require_shared_useArrowNavigation","require_shared_getActiveElement","forwardRef","currentElement","require_shared_useForwardExpose","require_Primitive_Primitive","as","asChild","_ctx","injectSwitchRootContext","provideSwitchRootContext","require_shared_createContext","props","__props","emit","__emit","disabled","vue","modelValue","__vueuse_core","checked","toggleCheck","forwardRef","currentElement","require_shared_useForwardExpose","isFormControl","require_shared_useFormControl","ariaLabel","require_Primitive_Primitive","$attrs","id","as","value","required","asChild","_ctx","name","require_VisuallyHidden_VisuallyHiddenInput","rootContext","require_Switch_SwitchRoot","require_shared_useForwardExpose","vue","require_Primitive_Primitive","asChild","as","_ctx","injectTabsRootContext","provideTabsRootContext","require_shared_createContext","props","__props","emits","__emit","orientation","unmountOnHide","propDir","vue","dir","require_shared_useDirection","require_shared_useForwardExpose","modelValue","__vueuse_core","tabsList","contentIds","value","require_shared_useId","newSet","require_Primitive_Primitive","asChild","as","_ctx","makeTriggerId","baseId: string","value: StringOrNumber","baseId","value","makeContentId","props","__props","forwardRef","require_shared_useForwardExpose","rootContext","require_Tabs_TabsRoot","triggerId","vue","require_Tabs_utils","contentId","isSelected","isMountAnimationPreventedRef","require_Presence_Presence","forceMount","present","require_Primitive_Primitive","asChild","as","_ctx","props","__props","context","require_Tabs_TabsRoot","__expose","updateIndicatorStyle","require_shared_useForwardExpose","isMounted","__vueuse_core","indicatorStyle","vue","tabs","activeTab","require_Primitive_Primitive","_ctx","props","__props","loop","vue","forwardRef","currentElement","require_shared_useForwardExpose","context","require_Tabs_TabsRoot","require_RovingFocus_RovingFocusGroup","require_Primitive_Primitive","asChild","as","_ctx","props","__props","forwardRef","require_shared_useForwardExpose","rootContext","require_Tabs_TabsRoot","triggerId","vue","require_Tabs_utils","contentId","isSelected","require_RovingFocus_RovingFocusItem","disabled","require_Primitive_Primitive","as","asChild","_cache","event","value","$event","isAutomaticActivation","_ctx","injectTagsInputRootContext","provideTagsInputRootContext","require_shared_createContext","props","__props","emits","__emit","addOnPaste","disabled","delimiter","max","id","propDir","addOnBlur","addOnTab","vue","dir","require_shared_useDirection","modelValue","__vueuse_core","forwardRef","currentElement","require_shared_useForwardExpose","focused","isFormControl","require_shared_useFormControl","getItems","CollectionSlot","require_Collection_Collection","selectedElement","isInvalidInput","currentModelValue","handleRemoveTag","index","collection","i","_","_payload","array","modelValueIsObject","defaultValueIsObject","payload","event","target","lastTag","isArrowRight","isArrowLeft","el","require_shared_useArrowNavigation","require_Primitive_Primitive","as","asChild","_ctx","name","require_VisuallyHidden_VisuallyHiddenInput","required","props","__props","require_shared_useForwardExpose","context","require_TagsInput_TagsInputRoot","handleCancel","vue","require_Primitive_Primitive","as","_ctx","props","__props","context","require_TagsInput_TagsInputRoot","forwardRef","currentElement","require_shared_useForwardExpose","handleBlur","event","target","relatedTarget","controlledId","handleTab","handleCustomKeydown","isComposing","handleCompositionStart","handleCompositionEnd","require_shared_useComposing","vue","handleInput","delimiter","handleInputKeydown","handlePaste","clipboardData","value","v","inputEl","require_Primitive_Primitive","as","asChild","maxLength","placeholder","_ctx","injectTagsInputItemContext","provideTagsInputItemContext","require_shared_createContext","props","__props","value","vue","context","require_TagsInput_TagsInputRoot","forwardRef","currentElement","require_shared_useForwardExpose","CollectionItem","require_Collection_Collection","isSelected","disabled","itemContext","require_Primitive_Primitive","as","asChild","_ctx","props","__props","require_shared_useForwardExpose","context","require_TagsInput_TagsInputRoot","itemContext","require_TagsInput_TagsInputItem","disabled","vue","handleDelete","index","i","ohash","require_Primitive_Primitive","as","_ctx","props","__props","itemContext","require_TagsInput_TagsInputItem","require_shared_useForwardExpose","require_shared_useId","vue","require_Primitive_Primitive","_ctx","injectTimeFieldRootContext","provideTimeFieldRootContext","require_shared_createContext","convertValue","value","date","__internationalized_date","props","__props","emits","__emit","disabled","readonly","granularity","defaultValue","minValue","maxValue","stepSnapping","propDir","propLocale","vue","locale","require_shared_useLocale","dir","require_shared_useDirection","formatter","require_shared_useDateFormatter","require_date_utils","primitiveElement","parentElement","require_Primitive_usePrimitiveElement","segmentElements","step","convertedMinValue","convertedMaxValue","require_date_segment","item","modelValue","__vueuse_core","convertedModelValue","require_shared_nullish","newValue","defaultDate","require_date_comparators","placeholder","convertedPlaceholder","inferredGranularity","isInvalid","initialSegments","require_date_parser","segmentValues","allSegmentContent","segmentContents","contents","segment","hour","displayHour","editableSegmentContents","part","_modelValue","currentFocusedElement","currentSegmentIndex","el","nextFocusableSegment","sign","prevFocusableSegment","kbd","require_shared_useKbd","handleKeydown","e","setFocusedElement","__expose","require_Primitive_Primitive","$attrs","_ctx","require_VisuallyHidden_VisuallyHidden","id","name","required","_cache","$event","props","__props","rootContext","require_TimeField_TimeFieldRoot","hasLeftFocus","vue","lastKeyZero","handleSegmentClick","handleSegmentKeydown","handleSegmentBeforeInput","handleSegmentCompositionStart","handleSegmentCompositionEnd","handleSegmentFocusOut","attributes","require_date_useDateField","disabled","readonly","isInvalid","require_Primitive_Primitive","as","asChild","part","e","_ctx","injectTimeRangeFieldRootContext","provideTimeRangeFieldRootContext","require_shared_createContext","convertValue","value","date","__internationalized_date","props","__props","emits","__emit","disabled","readonly","granularity","defaultValue","minValue","maxValue","propDir","propLocale","propsIsTimeUnavailable","vue","locale","require_shared_useLocale","dir","require_shared_useDirection","formatter","require_shared_useDateFormatter","require_date_utils","primitiveElement","parentElement","require_Primitive_usePrimitiveElement","segmentElements","step","convertedMinValue","convertedMaxValue","require_date_segment","item","modelValue","__vueuse_core","isStartInvalid","convertedStartValue$1","require_date_comparators","isEndInvalid","convertedEndValue$1","isInvalid","convertedModelValue$1","startValue","endValue","_startValue","_endValue","convertedStartValue","require_shared_nullish","newValue","convertedEndValue","convertedModelValue","defaultDate","placeholder","convertedPlaceholder","inferredGranularity","initialSegments","require_date_parser","startSegmentValues","endSegmentValues","startSegmentContent","endSegmentContent","segmentContents","editableSegmentContents","part","_modelValue","currentFocusedElement","currentSegmentIndex","el","nextFocusableSegment","sign","prevFocusableSegment","kbd","require_shared_useKbd","handleKeydown","e","setFocusedElement","__expose","require_Primitive_Primitive","$attrs","_ctx","require_VisuallyHidden_VisuallyHidden","id","name","required","_cache","$event","props","__props","rootContext","require_TimeRangeField_TimeRangeFieldRoot","hasLeftFocus","vue","lastKeyZero","handleSegmentClick","handleSegmentKeydown","handleSegmentBeforeInput","handleSegmentCompositionStart","handleSegmentCompositionEnd","attributes","require_date_useDateField","disabled","readonly","isInvalid","require_Primitive_Primitive","as","asChild","part","type","e","_ctx","vue","require_Primitive_Primitive","as","asChild","altText","_ctx","injectToastProviderContext","provideToastProviderContext","require_shared_createContext","props","__props","label","duration","disableSwipe","swipeDirection","swipeThreshold","vue","require_Collection_Collection","viewport","toastCount","isFocusedToastEscapeKeyDownRef","isClosePausedRef","error","el","_ctx","providerContext","require_Toast_ToastProvider","isAnnounced","__vueuse_shared","renderAnnounceText","vue","raf1","raf2","require_VisuallyHidden_VisuallyHidden","_ctx","TOAST_SWIPE_START","TOAST_SWIPE_MOVE","TOAST_SWIPE_CANCEL","TOAST_SWIPE_END","VIEWPORT_PAUSE","VIEWPORT_RESUME","handleAndDispatchCustomEvent","name: string","handler: ((event: E) => void) | undefined","detail: { originalEvent: OriginalEvent } & (E extends CustomEvent<infer D>\n    ? D\n    : never)","currentTarget","detail","event","name","handler","isDeltaInDirection","delta: { x: number, y: number }","direction: SwipeDirection","threshold","deltaX","delta","deltaY","isDeltaX","direction","isHTMLElement","node: any","node","getAnnounceTextContent","container: HTMLElement","textContent: string[]","container","textContent","isHidden","isExcluded","altText","injectToastRootContext","provideToastRootContext","require_shared_createContext","props","__props","emits","__emit","forwardRef","currentElement","require_shared_useForwardExpose","CollectionItem","require_Collection_Collection","providerContext","require_Toast_ToastProvider","pointerStartRef","vue","swipeDeltaRef","duration","closeTimerStartTimeRef","closeTimerRemainingTimeRef","closeTimerRef","remainingTime","remainingRaf","__vueuse_core","elapsedTime","startTimer","duration$1","__vueuse_shared","handleClose","event","isNonPointerEvent","require_shared_getActiveElement","announceTextContent","require_Toast_utils","error","cleanupFn","viewport","handleResume","handlePause","require_Toast_ToastAnnounce","type","text","i","require_Primitive_Primitive","$attrs","as","asChild","open","_cache","x","y","hasSwipeMoveStarted","isHorizontalSwipe","clamp","clampedX","clampedY","moveStartBuffer","delta","eventDetail","ev","target","toast","event$1","_ctx","props","__props","rootContext","require_Toast_ToastRootImpl","forwardRef","require_shared_useForwardExpose","vue","require_Toast_ToastAnnounceExclude","require_Primitive_Primitive","as","_ctx","__props","forwardRef","require_shared_useForwardExpose","altText","vue","require_Toast_ToastAnnounceExclude","require_Toast_ToastClose","as","asChild","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_Teleport_Teleport","_ctx","props","__props","emits","__emit","forwardRef","require_shared_useForwardExpose","open","__vueuse_core","vue","require_Presence_Presence","forceMount","require_Toast_ToastRootImpl","type","as","asChild","duration","$attrs","_cache","$event","event","x","y","target","remaining","_duration","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Primitive_Primitive","_ctx","emits","__emit","providerContext","require_Toast_ToastProvider","vue","require_VisuallyHidden_VisuallyHidden","_cache","event","prevFocusedElement","_ctx","props","__props","hotkey","label","vue","forwardRef","currentElement","require_shared_useForwardExpose","CollectionSlot","getItems","require_Collection_Collection","providerContext","require_Toast_ToastProvider","hasToasts","headFocusProxyRef","tailFocusProxyRef","KEY_RE","DIGIT_RE","hotkeyMessage","__vueuse_core","cleanupFn","viewport","handlePause","pauseEvent","require_Toast_utils","handleResume","resumeEvent","handleFocusOutResume","event","handlePointerLeaveResume","require_shared_getActiveElement","handleKeyDown","isMetaKey","focusedElement","isTabbingBackwards","sortedCandidates","getSortedTabbableCandidates","index","candidate","require_FocusScope_utils","tabbingDirection","tabbableCandidates","i","toastNode","toastTabbableCandidates","require_DismissableLayer_DismissableLayerBranch","require_Toast_FocusProxy","node","_cache","require_Primitive_Primitive","as","asChild","$attrs","_ctx","injectToggleGroupRootContext","provideToggleGroupRootContext","require_shared_createContext","props","__props","emits","__emit","loop","rovingFocus","disabled","propDir","vue","dir","require_shared_useDirection","forwardRef","currentElement","require_shared_useForwardExpose","modelValue","changeModelValue","isSingle","require_shared_useSingleOrMultipleValue","isFormControl","require_shared_useFormControl","require_RovingFocus_RovingFocusGroup","require_Primitive_Primitive","orientation","asChild","as","_ctx","name","require_VisuallyHidden_VisuallyHiddenInput","required","props","__props","emits","__emit","forwardRef","currentElement","require_shared_useForwardExpose","toggleGroupContext","require_ToggleGroup_ToggleGroupRoot","modelValue","__vueuse_core","togglePressed","dataState","vue","isFormControl","require_shared_useFormControl","require_Primitive_Primitive","as","disabled","_ctx","name","require_VisuallyHidden_VisuallyHiddenInput","required","props","__props","rootContext","require_ToggleGroup_ToggleGroupRoot","disabled","vue","pressed","require_shared_isValueEqualOrExist","forwardRef","require_shared_useForwardExpose","require_RovingFocus_RovingFocusItem","require_Primitive_Primitive","require_Toggle_Toggle","_cache","$event","value","slotProps","_ctx","props","__props","forwardRef","require_shared_useForwardExpose","vue","require_RovingFocus_RovingFocusItem","disabled","require_Primitive_Primitive","as","_ctx","props","__props","forwardRef","require_shared_useForwardExpose","vue","require_RovingFocus_RovingFocusItem","require_Primitive_Primitive","_cache","event","_ctx","injectToolbarRootContext","provideToolbarRootContext","require_shared_createContext","props","__props","orientation","propDir","vue","dir","require_shared_useDirection","forwardRef","require_shared_useForwardExpose","require_RovingFocus_RovingFocusGroup","loop","require_Primitive_Primitive","asChild","as","_ctx","props","__props","rootContext","require_Toolbar_ToolbarRoot","require_shared_useForwardExpose","vue","require_component_BaseSeparator","as","_ctx","props","__props","emits","__emit","rootContext","require_Toolbar_ToolbarRoot","emitsAsProps","require_shared_useEmitAsProps","require_shared_useForwardExpose","vue","require_ToggleGroup_ToggleGroupRoot","_ctx","props","__props","forwardRef","require_shared_useForwardExpose","vue","require_Toolbar_ToolbarButton","require_ToggleGroup_ToggleGroupItem","_ctx","props","__props","require_shared_useForwardExpose","vue","require_Popper_PopperArrow","_ctx","injectTooltipProviderContext","provideTooltipProviderContext","require_shared_createContext","props","__props","delayDuration","skipDelayDuration","disableHoverableContent","disableClosingTrigger","ignoreNonKeyboardFocus","disabled","content","vue","require_shared_useForwardExpose","isOpenDelayed","isPointerInTransitRef","startTimer","clearTimer","__vueuse_shared","_ctx","TOOLTIP_OPEN","injectTooltipRootContext","provideTooltipRootContext","require_shared_createContext","props","__props","emit","__emit","require_shared_useForwardExpose","providerContext","require_Tooltip_TooltipProvider","disableHoverableContent","vue","disableClosingTrigger","disableTooltip","delayDuration","ignoreNonKeyboardFocus","open","__vueuse_core","isOpen","require_Tooltip_utils","wasOpenDelayedRef","trigger","stateAttribute","startTimer","clearTimer","handleOpen","handleClose","handleDelayedOpen","el","require_Popper_PopperRoot","_ctx","props","__props","emits","__emit","rootContext","require_Tooltip_TooltipRoot","providerContext","require_Tooltip_TooltipProvider","forwardRef","currentElement","require_shared_useForwardExpose","ariaLabel","vue","popperContentProps","_","restProps","defu","__vueuse_core","event","require_Tooltip_utils","require_DismissableLayer_DismissableLayer","_cache","$event","require_Popper_PopperContent","$attrs","_ctx","require_VisuallyHidden_VisuallyHidden","props","__props","forwardedProps","require_shared_useForwardProps","forwardRef","currentElement","require_shared_useForwardExpose","trigger","onClose","require_Tooltip_TooltipRoot","providerContext","require_Tooltip_TooltipProvider","isPointerInTransit","onPointerExit","require_shared_useGraceArea","vue","require_Tooltip_TooltipContentImpl","_ctx","props","__props","emits","__emit","rootContext","require_Tooltip_TooltipRoot","forwarded","require_shared_useForwardPropsEmits","forwardRef","require_shared_useForwardExpose","vue","require_Presence_Presence","forceMount","require_Tooltip_TooltipContentImpl","require_Tooltip_TooltipContentHoverable","_ctx","props","__props","vue","require_Teleport_Teleport","_ctx","props","__props","rootContext","require_Tooltip_TooltipRoot","providerContext","require_Tooltip_TooltipProvider","require_shared_useId","forwardRef","triggerElement","require_shared_useForwardExpose","isPointerDown","vue","hasPointerMoveOpened","tooltipListeners","handleClick","handleFocus","handlePointerMove","handlePointerLeave","handlePointerDown","handleBlur","handlePointerUp","event","require_Popper_PopperAnchor","reference","require_Primitive_Primitive","as","_ctx","flatten","items: T[]","items","acc: any[]","item: T","acc","item","injectTreeRootContext","provideTreeRootContext","require_shared_createContext","props","__props","emits","__emit","items","multiple","disabled","propagateSelect","propDir","bubbleSelect","vue","handleTypeaheadSearch","require_shared_useTypeahead","dir","require_shared_useDirection","rovingFocusGroupRef","isVirtual","virtualKeydownHook","__vueuse_core","modelValue","expanded","onSelectItem","handleMultipleReplace","require_shared_useSelectionBehavior","selectedKeys","i","flattenItems","items$1","level","parentItem","acc","item","index","key","children","isExpanded","flattenedItem","expandedItems","expandedKeys","handleKeydown","event","collections","handleKeydownNavigation","intent","require_RovingFocus_utils","require_shared_getActiveElement","handleBubbleSelect","v","val","condition","baseValue","exist","require_Tree_utils","child","val$1","require_RovingFocus_RovingFocusGroup","require_Primitive_Primitive","as","asChild","_ctx","TREE_SELECT","TREE_TOGGLE","props","__props","emits","__emit","rootContext","require_Tree_TreeRoot","getItems","require_Collection_Collection","hasChildren","vue","isExpanded","key","isSelected","isIndeterminate","children","require_Tree_utils","child","v","handleKeydownRight","ev","collection","i","currentElement","require_shared_getActiveElement","currentIndex","nextElement","el","handleToggleCustomEvent","handleKeydownLeft","parentElement","handleSelect","handleToggle","handleSelectCustomEvent","eventDetail","require_shared_handleAndDispatchCustomEvent","__expose","require_RovingFocus_RovingFocusItem","value","require_Primitive_Primitive","$attrs","as","asChild","level","_cache","_ctx","props","__props","slots","vue","rootContext","require_Tree_TreeRoot","parentEl","__vueuse_core","getItems","require_Collection_Collection","search","optionsWithMetadata","parseTextContent","option","index","padding","el","styles","virtualizer","__tanstack_vue_virtual","virtualizedItems","item","scrollToIndexAndFocus","event","isMetaKey","intent","require_RovingFocus_utils","items","currentElement","require_shared_getActiveElement","currentIndex","currentLevel","parentItem","currentMatch","filteredOptions","i","next","require_shared_useTypeahead","nextMatch","is","props","__props","forwardRef","require_shared_useForwardExpose","propNonce","vue","nonce","require_shared_useNonce","require_Primitive_Primitive","$attrs","_ctx","_cache","useYearPickerState","props: UseYearPickerStateProps","isYearSelected","dateObj: DateValue","props","d","require_date_comparators","dateObj","isInvalid","vue","useYearPicker","props: UseYearPickerProps","formatter","require_shared_useDateFormatter","resolveMatcher","matcher?: Matcher | Ref<Matcher | undefined>","matcher","headingFormatOptions","options: DateFormatterOptions","options","grid","require_date_calendar","isYearDisabled","__internationalized_date","isYearUnavailable","date: DateValue","date","isNextButtonDisabled","nextPageFunc?: (date: DateValue) => DateValue","lastYearInView","nextPageFunc","nextDate","nextPageStart","isPrevButtonDisabled","prevPageFunc?: (date: DateValue) => DateValue","firstYearInView","prevPageFunc","prevDate","prevPageEnd","nextPage","firstYearInGrid","newDate","newDate$1","prevPage","value","lastYearInGrid","headingValue","firstYear","lastYear","fullCalendarLabel","injectYearPickerRootContext","provideYearPickerRootContext","require_shared_createContext","props","__props","emits","__emit","disabled","readonly","initialFocus","multiple","minValue","maxValue","preventDeselect","propsIsYearDisabled","propsIsYearUnavailable","calendarLabel","defaultValue","propsNextPage","propsPrevPage","propDir","propLocale","yearsPerPage","vue","primitiveElement","parentElement","require_Primitive_usePrimitiveElement","locale","require_shared_useLocale","dir","require_shared_useDirection","headingId","require_shared_useId","modelValue","__vueuse_core","defaultDate","require_date_comparators","placeholder","onPlaceholderChange","value","fullCalendarLabel","headingValue","isYearDisabled","isYearUnavailable","isNextButtonDisabled","isPrevButtonDisabled","nextPage","prevPage","formatter","grid","require_YearPicker_useYearPicker","isInvalid","isYearSelected","_modelValue","lastValue","resolveYearValue","reference","onYearChange","index","date","next","require_date_utils","require_Primitive_Primitive","as","asChild","_ctx","_hoisted_1","_hoisted_2","rootContext","require_YearPicker_YearPickerRoot","vue","require_Primitive_Primitive","as","asChild","date","_ctx","props","__props","kbd","require_shared_useKbd","rootContext","require_YearPicker_YearPickerRoot","primitiveElement","require_Primitive_usePrimitiveElement","yearValue","vue","require_date_comparators","labelText","isUnavailable","isCurrentYear","todayDate","__internationalized_date","isDisabled","isFocusedYear","isSelectedYear","changeYear","date","handleClick","handleArrowKey","e","parentElement","sign","shiftFocus","shiftFocusPage","currentYear","add","depth","candidateYearValue","candidateYear","direction","yearsPerPage","require_Primitive_Primitive","year","_cache","_ctx","props","__props","rootContext","require_YearPicker_YearPickerRoot","disabled","vue","readonly","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","rootContext","require_YearPicker_YearPickerRoot","vue","require_Primitive_Primitive","_ctx","props","__props","rootContext","require_YearPicker_YearPickerRoot","disabled","vue","handleClick","require_Primitive_Primitive","_ctx","_cache","props","__props","rootContext","require_YearPicker_YearPickerRoot","disabled","vue","handleClick","require_Primitive_Primitive","_ctx","_cache","useRangeYearPickerState","props: UseRangeYearPickerProps","isStartInvalid","vue","props","isEndInvalid","isInvalid","isSelectionStart","date: DateValue","require_date_comparators","date","isSelectionEnd","isSelected","rangeIsYearDisabled","maximumYears","diff","yearsLeft","startLimit","endLimit","fixedValue","maxDate","minDate","highlightedRange","isStartBeforeFocused","start","end","anchor","focused","maxEnd","cappedEnd","minStart","injectYearRangePickerRootContext","provideYearRangePickerRootContext","require_shared_createContext","props","__props","emits","__emit","disabled","readonly","initialFocus","preventDeselect","propsIsYearUnavailable","propsIsYearDisabled","calendarLabel","maxValue","minValue","propDir","propLocale","propsNextPage","propsPrevPage","allowNonContiguousRanges","fixedDate","maximumYears","yearsPerPage","vue","primitiveElement","parentElement","require_Primitive_usePrimitiveElement","dir","require_shared_useDirection","locale","require_shared_useLocale","headingId","require_shared_useId","lastPressedDateValue","focusedValue","isEditing","modelValue","__vueuse_core","normalizeRange","value","normalizedModelValue","validModelValue","defaultDate","require_date_comparators","startValue","endValue","placeholder","onPlaceholderChange","fullCalendarLabel","headingValue","isYearDisabled","isYearUnavailable","isNextButtonDisabled","isPrevButtonDisabled","grid","nextPage","prevPage","formatter","require_YearPicker_useYearPicker","isInvalid","isSelected","highlightedRange","isSelectionStart","isSelectionEnd","isHighlightedStart","isHighlightedEnd","rangeIsYearDisabled","require_YearRangePicker_useRangeYearPicker","_modelValue","next","_startValue","_endValue","nextValue","kbd","require_shared_useKbd","ev","require_date_utils","require_Primitive_Primitive","as","asChild","_hoisted_1","_hoisted_2","_ctx","rootContext","require_YearRangePicker_YearRangePickerRoot","vue","require_Primitive_Primitive","as","asChild","date","_ctx","props","__props","kbd","require_shared_useKbd","rootContext","require_YearRangePicker_YearRangePickerRoot","primitiveElement","require_Primitive_usePrimitiveElement","yearValue","vue","require_date_comparators","labelText","isUnavailable","isCurrentYear","todayDate","__internationalized_date","isDisabled","isFocusedYear","isSelectedYear","isSelectionStart","isSelectionEnd","isHighlightStart","isHighlightEnd","isHighlighted","allowNonContiguousRanges","changeYear","e","date","handleClick","handleFocus","handleArrowKey","parentElement","sign","shiftFocus","shiftFocusPage","currentYear","add","depth","candidateYearValue","candidateYear","direction","yearsPerPage","require_Primitive_Primitive","year","_cache","_ctx","props","__props","rootContext","require_YearRangePicker_YearRangePickerRoot","disabled","vue","readonly","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","vue","require_Primitive_Primitive","_ctx","props","__props","rootContext","require_YearRangePicker_YearRangePickerRoot","vue","require_Primitive_Primitive","_ctx","props","__props","rootContext","require_YearRangePicker_YearRangePickerRoot","disabled","vue","handleClick","require_Primitive_Primitive","_ctx","_cache","props","__props","rootContext","require_YearRangePicker_YearRangePickerRoot","disabled","vue","handleClick","require_Primitive_Primitive","_ctx","_cache","require_index2","__commonJSMin","require_dist","__commonJSMin","exports","require_shared_createContext","require_ConfigProvider_ConfigProvider","require_shared_useBodyScrollLock","require_shared_useDateFormatter","require_shared_useDirection","require_shared_useEmitAsProps","require_shared_useFilter","require_shared_useForwardExpose","require_shared_useForwardProps","require_shared_useForwardPropsEmits","require_shared_useId","require_shared_useLocale","require_shared_useStateMachine","require_shared_withDefault","require_Presence_Presence","require_Primitive_Slot","require_Primitive_Primitive","require_Collapsible_CollapsibleRoot","require_Collapsible_CollapsibleContent","require_Collapsible_CollapsibleTrigger","require_Accordion_AccordionRoot","require_Accordion_AccordionItem","require_Accordion_AccordionContent","require_Accordion_AccordionHeader","require_Accordion_AccordionTrigger","require_Dialog_DialogRoot","require_Dialog_DialogClose","require_FocusScope_FocusScope","require_Dialog_DialogContent","require_Dialog_DialogDescription","require_Dialog_DialogOverlay","require_Dialog_DialogPortal","require_Dialog_DialogTitle","require_Dialog_DialogTrigger","require_AlertDialog_AlertDialogAction","require_AlertDialog_AlertDialogContent","require_AlertDialog_AlertDialogCancel","require_AlertDialog_AlertDialogDescription","require_AlertDialog_AlertDialogOverlay","require_AlertDialog_AlertDialogPortal","require_AlertDialog_AlertDialogRoot","require_AlertDialog_AlertDialogTitle","require_AlertDialog_AlertDialogTrigger","require_AspectRatio_AspectRatio","require_VisuallyHidden_VisuallyHidden","require_Listbox_ListboxRoot","require_Listbox_ListboxContent","require_Listbox_ListboxFilter","require_Listbox_ListboxGroup","require_Listbox_ListboxGroupLabel","require_Listbox_ListboxItem","require_Listbox_ListboxItemIndicator","require_Listbox_ListboxVirtualizer","require_Combobox_ComboboxRoot","require_Autocomplete_AutocompleteRoot","require_Autocomplete_AutocompleteInput","require_Combobox_ComboboxAnchor","require_Combobox_ComboboxArrow","require_Combobox_ComboboxCancel","require_Combobox_ComboboxContent","require_Combobox_ComboboxEmpty","require_Combobox_ComboboxGroup","require_Combobox_ComboboxInput","require_Combobox_ComboboxItem","require_Combobox_ComboboxItemIndicator","require_Combobox_ComboboxLabel","require_Combobox_ComboboxPortal","require_Combobox_ComboboxSeparator","require_Combobox_ComboboxTrigger","require_Combobox_ComboboxViewport","require_Combobox_ComboboxVirtualizer","require_Avatar_AvatarRoot","require_Avatar_AvatarFallback","require_Avatar_AvatarImage","require_Calendar_CalendarRoot","require_Calendar_CalendarCell","require_Calendar_CalendarCellTrigger","require_Calendar_CalendarGrid","require_Calendar_CalendarGridBody","require_Calendar_CalendarGridHead","require_Calendar_CalendarGridRow","require_Calendar_CalendarHeadCell","require_Calendar_CalendarHeader","require_Calendar_CalendarHeading","require_Calendar_CalendarNext","require_Calendar_CalendarPrev","require_RovingFocus_RovingFocusGroup","require_RovingFocus_RovingFocusItem","require_Checkbox_CheckboxGroupRoot","require_Checkbox_CheckboxRoot","require_Checkbox_CheckboxIndicator","require_color_convert","require_color_channel","require_color_gradient","require_color_parse","require_ColorArea_ColorAreaRoot","require_ColorArea_ColorAreaArea","require_ColorArea_ColorAreaThumb","require_ColorField_ColorFieldRoot","require_ColorField_ColorFieldInput","require_Slider_SliderRoot","require_Slider_SliderRange","require_Slider_SliderThumb","require_Slider_SliderTrack","require_ColorSlider_ColorSliderRoot","require_ColorSlider_ColorSliderThumb","require_ColorSlider_ColorSliderTrack","require_ColorSwatch_ColorSwatch","require_ColorSwatchPicker_ColorSwatchPickerItem","require_ColorSwatchPicker_ColorSwatchPickerItemIndicator","require_ColorSwatchPicker_ColorSwatchPickerItemSwatch","require_ColorSwatchPicker_ColorSwatchPickerRoot","require_ContextMenu_ContextMenuArrow","require_ContextMenu_ContextMenuCheckboxItem","require_ContextMenu_ContextMenuRoot","require_ContextMenu_ContextMenuContent","require_ContextMenu_ContextMenuGroup","require_ContextMenu_ContextMenuItem","require_ContextMenu_ContextMenuItemIndicator","require_ContextMenu_ContextMenuLabel","require_ContextMenu_ContextMenuPortal","require_ContextMenu_ContextMenuRadioGroup","require_ContextMenu_ContextMenuRadioItem","require_ContextMenu_ContextMenuSeparator","require_ContextMenu_ContextMenuSub","require_ContextMenu_ContextMenuSubContent","require_ContextMenu_ContextMenuSubTrigger","require_ContextMenu_ContextMenuTrigger","require_DateField_DateFieldRoot","require_DateField_DateFieldInput","require_DatePicker_DatePickerAnchor","require_DatePicker_DatePickerArrow","require_DatePicker_DatePickerRoot","require_DatePicker_DatePickerCalendar","require_DatePicker_DatePickerCell","require_DatePicker_DatePickerCellTrigger","require_DatePicker_DatePickerClose","require_DatePicker_DatePickerContent","require_DatePicker_DatePickerField","require_DatePicker_DatePickerGrid","require_DatePicker_DatePickerGridBody","require_DatePicker_DatePickerGridHead","require_DatePicker_DatePickerGridRow","require_DatePicker_DatePickerHeadCell","require_DatePicker_DatePickerHeader","require_DatePicker_DatePickerHeading","require_DatePicker_DatePickerInput","require_DatePicker_DatePickerNext","require_DatePicker_DatePickerPrev","require_DatePicker_DatePickerTrigger","require_DateRangeField_DateRangeFieldRoot","require_DateRangeField_DateRangeFieldInput","require_DateRangePicker_DateRangePickerAnchor","require_DateRangePicker_DateRangePickerArrow","require_DateRangePicker_DateRangePickerRoot","require_DateRangePicker_DateRangePickerCalendar","require_DateRangePicker_DateRangePickerCell","require_DateRangePicker_DateRangePickerCellTrigger","require_DateRangePicker_DateRangePickerClose","require_DateRangePicker_DateRangePickerContent","require_DateRangePicker_DateRangePickerField","require_DateRangePicker_DateRangePickerGrid","require_DateRangePicker_DateRangePickerGridBody","require_DateRangePicker_DateRangePickerGridHead","require_DateRangePicker_DateRangePickerGridRow","require_DateRangePicker_DateRangePickerHeadCell","require_DateRangePicker_DateRangePickerHeader","require_DateRangePicker_DateRangePickerHeading","require_DateRangePicker_DateRangePickerInput","require_DateRangePicker_DateRangePickerNext","require_DateRangePicker_DateRangePickerPrev","require_DateRangePicker_DateRangePickerTrigger","require_DropdownMenu_DropdownMenuArrow","require_DropdownMenu_DropdownMenuCheckboxItem","require_DropdownMenu_DropdownMenuRoot","require_DropdownMenu_DropdownMenuContent","require_DropdownMenu_DropdownMenuFilter","require_DropdownMenu_DropdownMenuGroup","require_DropdownMenu_DropdownMenuItem","require_DropdownMenu_DropdownMenuItemIndicator","require_DropdownMenu_DropdownMenuLabel","require_DropdownMenu_DropdownMenuPortal","require_DropdownMenu_DropdownMenuRadioGroup","require_DropdownMenu_DropdownMenuRadioItem","require_DropdownMenu_DropdownMenuSeparator","require_DropdownMenu_DropdownMenuSub","require_DropdownMenu_DropdownMenuSubContent","require_DropdownMenu_DropdownMenuSubTrigger","require_DropdownMenu_DropdownMenuTrigger","require_Editable_EditableRoot","require_Editable_EditableArea","require_Editable_EditableCancelTrigger","require_Editable_EditableEditTrigger","require_Editable_EditableInput","require_Editable_EditablePreview","require_Editable_EditableSubmitTrigger","require_HoverCard_HoverCardArrow","require_HoverCard_HoverCardRoot","require_HoverCard_HoverCardContent","require_HoverCard_HoverCardPortal","require_HoverCard_HoverCardTrigger","require_Label_Label","require_Menubar_MenubarArrow","require_Menubar_MenubarCheckboxItem","require_Menubar_MenubarRoot","require_Menubar_MenubarMenu","require_Menubar_MenubarContent","require_Menubar_MenubarGroup","require_Menubar_MenubarItem","require_Menubar_MenubarItemIndicator","require_Menubar_MenubarLabel","require_Menubar_MenubarPortal","require_Menubar_MenubarRadioGroup","require_Menubar_MenubarRadioItem","require_Menubar_MenubarSeparator","require_Menubar_MenubarSub","require_Menubar_MenubarSubContent","require_Menubar_MenubarSubTrigger","require_Menubar_MenubarTrigger","require_MonthPicker_MonthPickerRoot","require_MonthPicker_MonthPickerCell","require_MonthPicker_MonthPickerCellTrigger","require_MonthPicker_MonthPickerGrid","require_MonthPicker_MonthPickerGridBody","require_MonthPicker_MonthPickerGridRow","require_MonthPicker_MonthPickerHeader","require_MonthPicker_MonthPickerHeading","require_MonthPicker_MonthPickerNext","require_MonthPicker_MonthPickerPrev","require_MonthRangePicker_MonthRangePickerRoot","require_MonthRangePicker_MonthRangePickerCell","require_MonthRangePicker_MonthRangePickerCellTrigger","require_MonthRangePicker_MonthRangePickerGrid","require_MonthRangePicker_MonthRangePickerGridBody","require_MonthRangePicker_MonthRangePickerGridRow","require_MonthRangePicker_MonthRangePickerHeader","require_MonthRangePicker_MonthRangePickerHeading","require_MonthRangePicker_MonthRangePickerNext","require_MonthRangePicker_MonthRangePickerPrev","require_NavigationMenu_NavigationMenuRoot","require_NavigationMenu_NavigationMenuItem","require_NavigationMenu_NavigationMenuContent","require_NavigationMenu_NavigationMenuIndicator","require_NavigationMenu_NavigationMenuLink","require_NavigationMenu_NavigationMenuList","require_NavigationMenu_NavigationMenuSub","require_NavigationMenu_NavigationMenuTrigger","require_NavigationMenu_NavigationMenuViewport","require_NumberField_NumberFieldRoot","require_NumberField_NumberFieldDecrement","require_NumberField_NumberFieldIncrement","require_NumberField_NumberFieldInput","require_Pagination_PaginationEllipsis","require_Pagination_PaginationRoot","require_Pagination_PaginationFirst","require_Pagination_PaginationLast","require_Pagination_PaginationList","require_Pagination_PaginationListItem","require_Pagination_PaginationNext","require_Pagination_PaginationPrev","require_PinInput_PinInputRoot","require_PinInput_PinInputInput","require_Popover_PopoverRoot","require_Popover_PopoverAnchor","require_Popover_PopoverArrow","require_Popover_PopoverClose","require_Popover_PopoverContent","require_Popover_PopoverPortal","require_Popover_PopoverTrigger","require_Progress_ProgressRoot","require_Progress_ProgressIndicator","require_RadioGroup_RadioGroupRoot","require_RadioGroup_RadioGroupItem","require_RadioGroup_RadioGroupIndicator","require_RangeCalendar_RangeCalendarRoot","require_RangeCalendar_RangeCalendarCell","require_RangeCalendar_RangeCalendarCellTrigger","require_RangeCalendar_RangeCalendarGrid","require_RangeCalendar_RangeCalendarGridBody","require_RangeCalendar_RangeCalendarGridHead","require_RangeCalendar_RangeCalendarGridRow","require_RangeCalendar_RangeCalendarHeadCell","require_RangeCalendar_RangeCalendarHeader","require_RangeCalendar_RangeCalendarHeading","require_RangeCalendar_RangeCalendarNext","require_RangeCalendar_RangeCalendarPrev","require_ScrollArea_ScrollAreaRoot","require_ScrollArea_ScrollAreaCorner","require_ScrollArea_ScrollAreaScrollbarGlimpse","require_ScrollArea_ScrollAreaScrollbar","require_ScrollArea_ScrollAreaThumb","require_ScrollArea_ScrollAreaViewport","require_Select_SelectRoot","require_Select_SelectArrow","require_Select_SelectContent","require_Select_SelectGroup","require_Select_SelectIcon","require_Select_SelectItem","require_Select_SelectItemIndicator","require_Select_SelectItemText","require_Select_SelectLabel","require_Select_SelectPortal","require_Select_SelectScrollDownButton","require_Select_SelectScrollUpButton","require_Select_SelectSeparator","require_Select_SelectTrigger","require_Select_SelectValue","require_Select_SelectViewport","require_Separator_Separator","require_Splitter_SplitterGroup","require_Splitter_SplitterPanel","require_Splitter_SplitterResizeHandle","require_Stepper_StepperRoot","require_Stepper_StepperItem","require_Stepper_StepperDescription","require_Stepper_StepperIndicator","require_Stepper_StepperSeparator","require_Stepper_StepperTitle","require_Stepper_StepperTrigger","require_Switch_SwitchRoot","require_Switch_SwitchThumb","require_Tabs_TabsRoot","require_Tabs_TabsContent","require_Tabs_TabsIndicator","require_Tabs_TabsList","require_Tabs_TabsTrigger","require_TagsInput_TagsInputRoot","require_TagsInput_TagsInputClear","require_TagsInput_TagsInputInput","require_TagsInput_TagsInputItem","require_TagsInput_TagsInputItemDelete","require_TagsInput_TagsInputItemText","require_TimeField_TimeFieldRoot","require_TimeField_TimeFieldInput","require_TimeRangeField_TimeRangeFieldRoot","require_TimeRangeField_TimeRangeFieldInput","require_Toast_ToastProvider","require_Toast_ToastClose","require_Toast_ToastAction","require_Toast_ToastDescription","require_Toast_ToastPortal","require_Toast_ToastRoot","require_Toast_ToastTitle","require_Toast_ToastViewport","require_ToggleGroup_ToggleGroupRoot","require_Toggle_Toggle","require_ToggleGroup_ToggleGroupItem","require_Toolbar_ToolbarButton","require_Toolbar_ToolbarLink","require_Toolbar_ToolbarRoot","require_Toolbar_ToolbarSeparator","require_Toolbar_ToolbarToggleGroup","require_Toolbar_ToolbarToggleItem","require_Tooltip_TooltipArrow","require_Tooltip_TooltipProvider","require_Tooltip_TooltipRoot","require_Tooltip_TooltipContent","require_Tooltip_TooltipPortal","require_Tooltip_TooltipTrigger","require_Tree_TreeRoot","require_Tree_TreeItem","require_Tree_TreeVirtualizer","require_Viewport_Viewport","require_YearPicker_YearPickerRoot","require_YearPicker_YearPickerCell","require_YearPicker_YearPickerCellTrigger","require_YearPicker_YearPickerGrid","require_YearPicker_YearPickerGridBody","require_YearPicker_YearPickerGridRow","require_YearPicker_YearPickerHeader","require_YearPicker_YearPickerHeading","require_YearPicker_YearPickerNext","require_YearPicker_YearPickerPrev","require_YearRangePicker_YearRangePickerRoot","require_YearRangePicker_YearRangePickerCell","require_YearRangePicker_YearRangePickerCellTrigger","require_YearRangePicker_YearRangePickerGrid","require_YearRangePicker_YearRangePickerGridBody","require_YearRangePicker_YearRangePickerGridRow","require_YearRangePicker_YearRangePickerHeader","require_YearRangePicker_YearRangePickerHeading","require_YearRangePicker_YearRangePickerNext","require_YearRangePicker_YearRangePickerPrev","extend","dest","i","j","len","src","create","F","proto","bind","fn","obj","slice","args","lastId","stamp","throttle","time","context","lock","wrapperFn","later","wrapNum","x","range","includeMax","max","min","d","falseFn","formatNum","num","precision","pow","trim","str","splitWords","setOptions","options","getParamString","existingUrl","uppercase","params","templateRe","template","data","key","value","isArray","indexOf","array","el","emptyImageUrl","getPrefixed","name","lastTime","timeoutDefer","timeToCall","requestFn","cancelFn","id","requestAnimFrame","immediate","cancelAnimFrame","Class","props","NewClass","Util.setOptions","parentProto","Util.create","Util.extend","checkDeprecatedMixinEvents","parentOptions","init","includes","Util.isArray","Events","types","type","Util.splitWords","removeAll","_once","newListener","listeners","Util.falseFn","index","listener","propagate","event","l","_fn","Util.stamp","e","Evented","Point","y","round","trunc","v","point","toPoint","Bounds","a","b","points","min2","max2","toBounds","bounds","xIntersects","yIntersects","xOverlaps","yOverlaps","bufferRatio","heightBuffer","widthBuffer","LatLngBounds","corner1","corner2","latlngs","sw","ne","sw2","ne2","LatLng","toLatLng","toLatLngBounds","latIntersects","lngIntersects","latOverlaps","lngOverlaps","maxMargin","lat","lng","alt","margin","Util.formatNum","other","Earth","sizeInMeters","latAccuracy","lngAccuracy","c","CRS","latlng","zoom","projectedPoint","scale","untransformedPoint","s","Util.wrapNum","center","newCenter","latShift","lngShift","newSw","newNe","latlng1","latlng2","rad","lat1","lat2","sinDLat","sinDLon","earthRadius","SphericalMercator","sin","Transformation","toTransformation","EPSG3857","EPSG900913","svgCreate","pointsToPath","rings","closed","len2","p","Browser","style","ie","ielt9","edge","webkit","userAgentContains","android","android23","webkitVer","androidStock","opera","chrome","gecko","safari","phantom","opera12","win","ie3d","webkit3d","gecko3d","any3d","mobile","mobileWebkit","mobileWebkit3d","msPointer","pointer","touchNative","touch","mobileOpera","mobileGecko","retina","passiveEvents","supportsPassiveOption","opts","canvas","svg","inlineSvg","div","vml","shape","mac","linux","POINTER_DOWN","POINTER_MOVE","POINTER_UP","POINTER_CANCEL","pEvent","handle","_onPointerStart","_handlePointer","_pointers","_pointerDocListener","addPointerListener","handler","_addPointerDocListener","removePointerListener","_globalPointerDown","_globalPointerMove","_globalPointerUp","DomEvent.preventDefault","makeDblclick","newEvent","prop","delay","addDoubleTapListener","last","detail","simDblclick","path","DomEvent.getPropagationPath","now","removeDoubleTapListener","handlers","TRANSFORM","testProp","TRANSITION","TRANSITION_END","get","getStyle","css","tagName","className","container","remove","parent","empty","toFront","toBack","hasClass","getClass","addClass","classes","setClass","removeClass","Util.trim","setOpacity","_setOpacityIE","filter","filterName","setTransform","offset","pos","setPosition","getPosition","disableTextSelection","enableTextSelection","_userSelect","DomEvent.on","DomEvent.off","userSelectProperty","disableImageDrag","enableImageDrag","_outlineElement","_outlineStyle","preventOutline","element","restoreOutline","getSizedParentNode","getScale","rect","on","addOne","eventsKey","off","batchRemove","removeOne","Util.indexOf","filterFn","mouseSubst","originalHandler","isExternalTarget","stopPropagation","disableScrollPropagation","disableClickPropagation","preventDefault","stop","getPropagationPath","ev","getMousePosition","wheelPxFactor","getWheelDelta","related","PosAnimation","newPos","duration","easeLinearity","DomUtil.getPosition","Util.requestAnimFrame","elapsed","progress","DomUtil.setPosition","Util.cancelAnimFrame","t","Map","Util.bind","DomUtil.TRANSITION","DomUtil.TRANSITION_END","moved","delta","viewHalf","containerPoint","centerOffset","paddingTL","paddingBR","paddingOffset","swPoint","nePoint","target","DomUtil.addClass","targetCenter","targetZoom","from","to","size","startZoom","w0","w1","u1","rho","rho2","r","s1","s2","t1","b1","sq","log","sinh","n","cosh","tanh","r0","w","u","easeOut","start","S","frame","oldZoom","pixelCenter","pixelPoint","pixelBounds","paddedBounds","paddedSize","oldSize","newSize","oldCenter","onResponse","onError","error","message","HandlerClass","DomUtil.remove","pane","DomUtil.create","inside","padding","nw","se","boundsSize","snap","scalex","scaley","topLeftPoint","toZoom","fromZoom","crs","layerPoint","DomEvent.getMousePosition","DomUtil.get","position","DomUtil.getStyle","panes","noMoveStart","loading","zoomChanged","supressEvent","onOff","targets","isHover","dragging","DomEvent.isExternalTarget","DomUtil.preventOutline","canvasTargets","synth","filtered","isMarker","callback","pixelOrigin","topLeft","latLngBounds","centerPoint","viewBounds","newBounds","pxBounds","maxBounds","projectedMaxBounds","minOffset","maxOffset","dx","dy","left","right","DomUtil.removeClass","proxy","DomUtil.TRANSFORM","transform","DomUtil.setTransform","z","startAnim","noUpdate","createMap","Control","map","corner","control","corners","createCorner","vSide","hSide","Layers","layerA","layerB","nameA","nameB","baseLayers","overlays","layer","acceptableHeight","collapsed","DomEvent.disableClickPropagation","DomEvent.disableScrollPropagation","section","link","overlay","DomUtil.empty","baseLayersPresent","overlaysPresent","baseLayersCount","checked","radioHtml","radioFragment","label","input","holder","inputs","addedLayers","removedLayers","that","layers","Zoom","zoomName","html","title","DomEvent.stop","Scale","maxMeters","meters","maxFeet","maxMiles","miles","feet","text","ratio","pow10","ukrainianFlag","Attribution","prefix","attribs","prefixAndAttribs","attribution","Handler","Mixin","START","Draggable","dragStartTarget","DomUtil.hasClass","DomUtil.disableImageDrag","DomUtil.disableTextSelection","first","sizedParent","DomUtil.getSizedParentNode","DomUtil.getScale","mouseevent","noInertia","DomUtil.enableImageDrag","DomUtil.enableTextSelection","fireDragend","clipPolygon","clippedPoints","edges","k","LineUtil._getBitCode","LineUtil._getEdgeIntersection","polygonCenter","p1","p2","f","area","LineUtil.isFlat","centroidLatLng","areaBounds","centroid","latlngCenter","coords","latSum","lngSum","simplify","tolerance","sqTolerance","_reducePoints","_simplifyDP","pointToSegmentDistance","_sqClosestPointOnSegment","closestPointOnSegment","ArrayConstructor","markers","_simplifyDPStep","newPoints","maxSqDist","sqDist","reducedPoints","prev","_sqDist","_lastCode","clipSegment","useLastCode","codeA","_getBitCode","codeB","codeOut","newCode","_getEdgeIntersection","code","dot","isFlat","_flat","polylineCenter","halfDist","segDist","dist","LonLat","Mercator","tmp","con","ts","phi","dphi","EPSG3395","EPSG4326","Simple","Layer","targetEl","events","method","minZoom","maxZoom","oldZoomSpan","LayerGroup","layerId","methodName","zIndex","layerGroup","FeatureGroup","featureGroup","Icon","oldIcon","img","sizeOption","anchor","icon","IconDefault","strip","re","idx","match","MarkerDrag","marker","speed","iconPos","origin","panBounds","movement","shadow","Marker","latLng","oldLatLng","classToAdd","addIcon","newShadow","addShadow","opt","draggable","opacity","DomUtil.setOpacity","iconOpts","Path","CircleMarker","radius","r2","circleMarker","Circle","legacyOptions","half","latR","top","bottom","lngR","circle","Polyline","minDistance","minPoint","closest","LineUtil._sqClosestPointOnSegment","jLen","LineUtil.polylineCenter","result","flat","projectedBounds","ring","parts","segment","LineUtil.clipSegment","LineUtil.simplify","part","LineUtil.pointToSegmentDistance","polyline","LineUtil._flat","Polygon","PolyUtil.polygonCenter","clipped","PolyUtil.clipPolygon","polygon","GeoJSON","geojson","features","feature","geometryToLayer","asFeature","geometry","pointToLayer","_coordsToLatLng","coordsToLatLng","_pointToLayer","coordsToLatLngs","geoLayer","featureLayer","pointToLayerFn","levelsDeep","latLngToCoords","latLngsToCoords","getFeature","newGeometry","PointToGeoJSON","multi","holes","isGeometryCollection","jsons","json","geoJSON","geoJson","ImageOverlay","url","styleOpts","DomUtil.toFront","DomUtil.toBack","wasElementSupplied","image","errorUrl","imageOverlay","VideoOverlay","vid","sourceElements","sources","source","videoOverlay","video","SVGOverlay","svgOverlay","DivOverlay","content","node","OverlayClass","old","Popup","DomEvent.stopPropagation","wrapper","closeButton","width","height","maxHeight","scrolledClass","marginBottom","containerHeight","containerWidth","layerPos","containerPos","popup","Tooltip","subX","subY","tooltipPoint","direction","tooltipWidth","tooltipHeight","tooltip","DivIcon","bgPos","divIcon","GridLayer","tileZoom","Util.throttle","compare","edgeZIndex","nextFrame","willPrune","tile","fade","level","x2","y2","z2","coords2","animating","noPrune","tileZoomChanged","translate","tileSize","mapZoom","halfSize","tileRange","tileCenter","queue","noPruneRange","fragment","tileBounds","nwPoint","sePoint","bp","tilePos","err","newCoords","gridLayer","TileLayer","noRedraw","done","invertedY","Util.template","zoomReverse","zoomOffset","tilePoint","Util.emptyImageUrl","tileLayer","TileLayerWMS","wmsParams","realRetina","projectionKey","bbox","tileLayerWMS","Renderer","currentCenterPoint","topLeftOffset","Canvas","m","order","next","dashArray","dashValue","ctx","clickedLayer","candidateHoveredLayer","vmlCreate","vmlMixin","stroke","fill","SVG","arc","renderer","Rectangle","rectangle","BoxZoom","DoubleClickZoom","Drag","pxCenter","pxWorldCenter","threshold","limit","worldWidth","halfWidth","newX1","newX2","newX","ease","speedVector","limitedSpeed","limitedSpeedVector","decelerationDuration","Keyboard","body","docEl","panDelta","keys","codes","zoomDelta","newLatLng","ScrollWheelZoom","DomEvent.getWheelDelta","debounce","d2","d3","d4","tapHoldDelay","TapHold","cancelClickPrevent","simulatedEvent","TouchZoom","moveFn","settingschangedcallbacks","globalDebugFlags","localDebugFlags","debugFlagsOverridesCB","DebugFlagsProxyHandler","debugFlagsOverridesCB","localDebugFlags","globalDebugFlags","target","p","record","keys","key","newValue","toModify","runSettingsCallbacks","value","debugFlags","formatForConsoleLogs","cb","settingschangedcallbacks","dtapStage","isLive","backendBase","dtapstage","dtapStage","islive","isLive","initEnv","setDtapStage","setBackendBase","dtapStage","isLive","backendBase","dtapstage","islive","getBrowserDebugFlags","varname","flags","urldebugvar","debugcookie","debugcookievalue","flag","sessionDebug","qR","node_or_selector","selector","matches","qSA","isElement","node","isHTMLElement","parseLanguageTag","languageTag","match","getLang","node","tag","getWHType","obj","isCrossRealm","value","isMoney","isTemporalInstant","isTemporalPlainDateTime","isTemporalPlainDate","isTemporalPlainTime","isTemporalZonedDateTime","isDate","isBlob","isFile","stdTypeOf","value","t","isMoney","isBlob","isFile","isDate","isTemporalInstant","isTemporalPlainTime","isTemporalPlainDate","isTemporalPlainDateTime","isTemporalZonedDateTime","stripUnneededDecimals","num","decimals","isneg","toText","amount","decimalpoint","mindecimals","isnegative","astext","splitValue","money","split","sign","joinPrice","parts","adjustDecimals","requiredecimals","toadd","multiplier","idx","__add","lhs","rhs","requiredecimals","adjustDecimals","add","amount1","amount2","joinPrice","splitValue","subtract","amount","tosubtract","__multiply","multiply","cmp","diff","getPercentageOfAmount","perc","result","normalize","__roundIntegerToMultiple","value","roundunit","mode","roundToMultiple","unit","split_value","splitValue","split_unit","requiredecimals","adjustDecimals","result","joinPrice","min","amount","amounts","val","cmp","max","getNonNegativePowerOf10","exp","retval","running_exp","divide","divisor","lhs","rhs","mul10exp","mulfactor","test","lhs","relation","rhs","compareresult","cmp","stripUnneededDecimals","num","decimals","isneg","splitValue","money","split","sign","toText","amount","decimalpoint","mindecimals","thousandpoint","isnegative","astext","beforepoint","afterpoint","Money","_Money","value","intvalue","param","isMoney","left","right","sum","item","add","subtract","roundto","mode","roundToMultiple","lhs","rhs","cmp","relation","test","multiply","percentage","getPercentageOfAmount","numerator","divisor","divide","amounts","min","max","format","nameToSnakeCase","name","c","recodeObject","inp","isDate","isMoney","isBlob","isTemporalInstant","isTemporalPlainDate","isTemporalPlainDateTime","isTemporalZonedDateTime","recursiveToSnakeCase","toSnakeCase","key","value","toSnakeCase","inp","recursiveToSnakeCase","escapeRegExp","text","options","mask","isHTMLUnrepresentableChar","curch","encodeEntities","str","html","s","char","stringify","arg","options","usereplacer","key","value","origvalue","type","stdTypeOf","lhs","rhs","result","encodeEntities","parseTyped","input","Money","omit","value","keys","elt","ret","key","val","unlock","LocalMutex","defer","LocalLock","mutex","config","siteroot","dtapStage","whconfigel","parsedConfig","omit","initEnv","flag","getBrowserDebugFlags","debugFlags","frontendConfig","getLang","getFrontendData","dataObject","allowMissing","retval","resolve","reject","_resolve","_reject","items","callbackfn","retval","idx","item","key","list","IteratorPrototype","ArrayIteratorPrototype","OriginalIteratorPrototype","callback","it","value","next_value","real_value","max_count","values","limit","remaining","index","mapper","mapped","reducer","initial_value","acc","count","string","final","first","iterables","others","it_array","e","finished","partition1","partition2","i","max","min","isObject","t","GetIteratorFlattenable","obj","method","iterator","Iterator","WrappedIterator","#iterator","args","returnMethod","Iterator_from","submitForm","action","values","method","form","item","input","navigateTo","navigation","debugFlags","CustomEvent","dispatchCustomEvent","node","event","params","prop","evt","CustomEvent","defaultaction","stop","event","addDocEventListener","node","type","listener","options","locallocks","modallocked","uiwatcher","installedanticancelhandler","currentbusymodaldialog","currentbusymodaluserdialog","busymodalcontent","mylockmgr","getLockmgr","getParentLockManager","LockManager","anyModalLocks","l","scheduleCheckUIFree","checkUIFree","toggleBusyModal","lockmgr","isDialogElement","el","checkCancelEvent","evt","show","dispatchCustomEvent","dialog","toembed","lock","pos","debugFlags","BusyLock","options","lockmgr","getLockmgr","locallocks","modallocked","toggleBusyModal","debugFlags","lockpos","scheduleCheckUIFree","flagUIBusy","options","BusyLock","getParentLockManager","debugFlags","locallocks","l","lockmgr","getLockmgr","locallockmgr","LockManager","lock","mylockmgr","isDomReady","onDomReady","callback","components","map","isNodeCompletelyInDom","node","processRegistration","item","reg","domready","list","applyRegistration","startnode","isDomReady","items","e","register","selector","handler","options","newreg","components","isDomReady","onDomReady","registerMissed","applyRegistration","startnode","item","getCookie","key","value","escapeRegExp","parseUserAgent","ua","UA","platform","name","version","device","browser","getBrowser","parseUserAgent","config","forwardPublisherNavigation","event","isHTMLElement","navaction","desturl","origin","configureForCMS","e","import_vue","UNKNOWN_FUNCTION","parse","stackString","lines","stack","line","parseResult","parseChrome","parseWinjs","parseGecko","parseNode","parseJSC","chromeRe","chromeEvalRe","parts","isNative","isEval","submatch","winjsRe","geckoRe","geckoEvalRe","javaScriptCoreRe","nodeRe","parseTrace","e","parse","i","formatTrace","trace","prependStackTrace","error","stacklines","tracelines","globalseqnr","getDebugAppend","urldebugvar","ControlledCall","client","method","stack","id","options","callurl","fetchoptions","fetchpromise","requestStack","response","retryafter","resolve","exception","jsonresponse","logitem","err","prependStackTrace","RPCClient","url","debugFlags","error","backendBase","params","parseTrace","ServiceProxy","target","prop","receiver","newoptions","createClient","args","servicename","rpcclient","isAbsolute","url","getBaseURL","backendBase","ControlledCall","client","method","stack","options","callurl","fetchoptions","fetchpromise","requestStack","response","exception","retryafter","resolve","jsonresponse","parseTyped","logitem","omit","err","prependStackTrace","RPCClient","debugFlags","error","params","stringify","pathName","parseTrace","ServiceProxy","target","prop","receiver","newoptions","rpc","args","service","servicematch","rpcclient","PublicCookieSuffix","authOptions","getCookieName","getFrontendData","getAuthLocalData","c","parseTyped","getCookie","PublicCookieSuffix","submitLoginForm","node","event","_stack","stop","username","password","site","returnto","persistentlogin","login","lock","__using","flagUIBusy","loginresult","refreshLoginStatus","navigateTo","failLogin","_","_error","_hasError","__callDispose","loggedIn","isLoggedIn","setupWRDAuth","options","register","addDocEventListener","evt","handleLogoutClick","doLogout","logout","onDomReady","message","response","form","evtdetail","dispatchCustomEvent","loginfield","qR","getLoginTweaks","tweaks","getLang","urlvars","login","username","password","options","cookieName","getCookieName","result","rpc","getBrowser","getAuthLocalData","doLogout","logout","navigateTo","startSSOLogin","tag","client","createClient","defer","toSnakeCase","instr","e","postRenderChecks","log","logtext","onDomReady","import_vue","import_vue_router","import_vue","import_vue_router","import_vue_router","import_vue","ICON_DATA","props","__props","nodes","ICON_DATA","import_vue","_hoisted_1","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_renderList","tag","attrs","i","_createBlock","_resolveDynamicComponent","_mergeProps","Icon_default","render","import_vue","STORAGE_KEY","DARK_CLASS","readStored","v","prefersDark","resolveInitialTheme","apply","theme","initTheme","useTheme","setTheme","next","toggleTheme","mq","onSystemChange","import_vue","import_vue_router","import_reka_ui","emit","__emit","onOpenChange","value","import_vue","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","_withCtx","_createVNode","_renderSlot","_normalizeStyle","Popover_default","render","relativeTime","date","now","seconds","minutes","hours","days","notificationRows","signals","rows","syncDescription","options","age","relativeTime","ShellSignalsPoller","#options","#active","#request","#pending","#cancel","request","#schedule","callback","delay","timer","SETTINGS_SECTIONS","SETTINGS_GROUP_LABELS","GROUP_ORDER","BY_ID","section","DEFAULT_SECTION","settingsSection","id","settingsNavGroups","key","resolveSettingsSection","options","sectionId","settingsSectionRoute","value","single","returnPath","rememberSettingsReturn","fullPath","settingsReturnPath","props","__props","open","rows","notificationRows","total","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","$event","_withCtx","_createElementVNode","_createVNode","_createElementBlock","_toDisplayString","_createCommentVNode","_Fragment","_renderList","row","_normalizeClass","_createTextVNode","NotificationBell_default","render","emit","__emit","theme","toggleTheme","useTheme","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","$event","_createVNode","_Fragment","_renderList","crumb","i","_createCommentVNode","_createBlock","_withCtx","_createTextVNode","_toDisplayString","args","_withModifiers","ShellHeader_default","render","import_vue","import_vue_router","NAV_SECTIONS","NAV_FOOTER_ITEMS","NAV_ITEMS","section","navLabelFor","routeName","item","sectionItemFor","path","sectionLabelFor","sectionHrefFor","analysisDetailRoute","options","analysisTabLabel","NAV_GLYPHS","TAB_GLYPHS","FALLBACK_GLYPH","props","__props","emit","__emit","countFor","path","iconFor","route","NAV_GLYPHS","FALLBACK_GLYPH","activeLabel","navLabelFor","isActive","itemRoute","label","inSettings","SETTINGS_NAV_GROUPS","settingsNavGroups","activeSection","resolveSettingsSection","backTarget","settingsReturnPath","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_normalizeClass","_createCommentVNode","_createVNode","_withCtx","_Fragment","_renderList","group","_toDisplayString","item","_createBlock","section","_createElementVNode","$event","Sidebar_default","render","HOSTS","PRODUCTION","resolveEnvironmentFromHost","hostname","environmentBadge","import_vue","props","__props","totals","env","environmentBadge","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","_normalizeClass","_createTextVNode","_toDisplayString","_createCommentVNode","StatusBar_default","render","import_vue","import_vue_router","MAX_DETAIL_TABS","TAB_CACHE_SIZE","RAIL_ICONS","normalize","pathname","railTabFor","path","href","sectionHrefFor","label","sectionLabelFor","detailTabFor","first","id","sub","subId","tabKeyFor","detail","sameStrip","a","b","tab","i","syncTabs","tabs","rail","details","next","result","closeTab","activeHref","index","remaining","nextHref","TABS_STORAGE_KEY","TAB_ICONS","isTabIcon","value","isStripTab","tab","parseStoredTabs","raw","parsed","loadTabs","saveTabs","tabs","import_vue","matchingAnalysisCrumb","options","breadcrumbTrail","routeName","overrideLast","sectionLabel","navLabelFor","locationId","analysisId","companyName","crumbOverride","locationCount","analysisCrumb","setAnalysisCrumb","context","analysisCrumbFor","options","matchingAnalysisCrumb","setCrumbLabel","route","label","crumbLabelFor","current","setLocationCount","count","shellChrome","route","router","normalize","path","currentPath","tabs","syncTabs","loadTabs","activeHref","tabKeyFor","next","saveTabs","shellChrome","_values","previousValues","label","context","analysisCrumbFor","analysisTabLabel","override","detailTabFor","index","tab","i","onClose","href","result","closeTab","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_renderList","tab","_normalizeClass","_createVNode","_withCtx","_createElementVNode","_toDisplayString","_createCommentVNode","$event","TabStrip_default","render","import_vue","api","rpc","useShellSignals","signals","unavailable","now","poller","ShellSignalsPoller","api","value","import_vue","AnalysisQueue","options","locationId","key","count","status","entry","completed","failed","skipped","occupied","item","slot","analysisIds","analysisId","selectBulkWindow","ids","cursor","id","BulkRunController","#api","#changed","#ticking","#options","#forceImages","api","counts","result","running","index","#poll","groups","reserved","group","analysis","wave","#dispatch","cached","image","failures","progress","BulkRunScheduler","#controller","#schedule","#cancelTimer","#generation","controller","callback","timer","#scheduleNext","generation","queue","ALL_REGIONS_VALUE","ALL_REGIONS_LABEL","classifyImageStatus","s","defaultAnalysisOptions","hostname","resolveEnvironmentFromHost","AnalysisOptionsRepository","#storage","#hostname","storage","#migrate","defaults","storedDryRun","selectedModels","parsed","id","options","parsedVersion","raw","selectAvailableModels","models","defaultModel","kept","model","validateAnalysisOptions","errors","buildAnalysisRequest","locationId","displayName","workerActionError","error","message","STORAGE_KEY","form","regions","regionsLoading","regionsError","busy","error","fieldErrors","resolved","estimate","imageStatuses","statusInfo","missingIds","navigationPaused","initialized","observers","revision","controller","BulkRunController","options","api","publish","run","snapshot","scheduler","BulkRunScheduler","entry","suspendBulkRunner","resumeBulkRunner","initialize","stored","data","key","value","enabled","event","loadRegions","validate","errors","parts","part","loadSelection","ALL_REGIONS_VALUE","loadLocations","ids","locations","index","subset","result","photoStatus","location","status","classifyImageStatus","loadProcessed","statuses","completed","id","withBusy","name","action","cause","workerActionError","resolveSelection","version","selection","processed","window","selectBulkWindow","resolveTargets","checkStatus","remaining","fillMissing","count","checkPhotos","targets","found","missing","estimateCosts","stats","avgInputTokens","avgOutputTokens","mapbox","streetview","locationsWithoutCoords","factor","inputCents","outputCents","imageCostCents","prepareStart","start","resume","retryUnfinished","useBulkRunStatus","useBulkRunner","COLLAPSE_KEY","route","signals","unavailable","now","useShellSignals","resumeBulkRunner","suspendBulkRunner","main","readCollapsed","collapsed","drawerOpen","toggleCollapsed","scrollByTab","path","previous","element","leaving","tabKeyFor","entering","offset","trail","name","ids","breadcrumbTrail","analysisCrumbFor","crumbLabelFor","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createVNode","$event","_createElementVNode","_createCommentVNode","_renderSlot","AppShell_default","render","import_vue","import_vue","canvas","dispose","fragmentSource","element","gl","vertex","fragment","program","buffer","release","position","resolution","time","reducedMotion","frame","previousTime","elapsed","visible","draw","tick","now","updateAnimation","resize","bounds","ratio","observer","visibility","entry","import_vue","_hoisted_1","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","LoginShader_default","render","import_vue","_hoisted_1","_hoisted_2","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createVNode","_createElementVNode","_createStaticVNode","LoginBrand_default","render","import_vue","props","__props","emit","__emit","cells","inputs","value","digits","_","index","focusCell","focus","empty","cell","pasteDigits","text","onInput","event","input","onKeydown","__expose","import_vue","_hoisted_1","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_withModifiers","$event","_Fragment","_renderList","cell","index","element","LoginCodeInput_default","render","import_reka_ui","emit","__emit","onOpenChange","value","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","_withCtx","_createVNode","_normalizeClass","_normalizeStyle","_createElementVNode","_createTextVNode","_toDisplayString","_createCommentVNode","_renderSlot","_createElementBlock","Dialog_default","render","import_vue","_hoisted_1","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_normalizeClass","_createBlock","_createCommentVNode","_renderSlot","Button_default","render","loginApi","rpc","email","code","step","errorMessage","pending","googleProvider","microsoftProvider","startingSSO","microsoftNoticeOpen","development","developmentCode","cooldown","emailInput","codeInput","resendAfter","timer","requestCode","result","loginApi","verifyCode","form","variable","input","changeEmail","loginWithMicrosoft","loginWithSSO","provider","label","startSSOLogin","stored","options","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createVNode","_createElementVNode","_toDisplayString","_Fragment","_createStaticVNode","$event","_createCommentVNode","_withModifiers","_withDirectives","_vModelText","_createTextVNode","_createBlock","_withCtx","LoginView_default","render","import_vue","LOGGED_IN_CLASS","useWrdAuthState","isLoggedIn","observer","read","isLoggedIn","useWrdAuthState","import_vue","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","_withCtx","_createVNode","Component","route","_KeepAlive","_resolveDynamicComponent","App_default","render","import_vue_router","import_vue","import_vue_router","import_vue","import_reka_ui","__emit","import_vue","_hoisted_1","_hoisted_2","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_renderList","option","_normalizeClass","$event","_toDisplayString","ContentSwitcher_default","render","emit","__emit","onChange","event","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_toDisplayString","_createCommentVNode","_createElementVNode","_Fragment","_renderList","opt","_createVNode","Select_default","render","props","__props","emit","__emit","open","radioName","stateOptions","activeCount","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_createVNode","$event","_createCommentVNode","_createBlock","_withCtx","_createTextVNode","_toDisplayString","_Fragment","_renderList","option","LocationFilters_default","render","import_vue_router","LOCATION_TYPE_LABELS","formatLocationType","type","LOCATION_TYPE_OPTIONS","value","label","SUITABILITY_LEVELS","scoreToSuitability","score","LABELS","suitabilityLabel","level","TOKENS","suitabilityToken","import_vue","props","__props","iconName","tone","import_vue","_hoisted_1","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_normalizeClass","_createVNode","StatusGlyph_default","render","__emit","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_renderList","location","_normalizeClass","_createElementVNode","$event","_createCommentVNode","_createVNode","_withCtx","_toDisplayString","_createBlock","LocationMobileList_default","render","requests","LocationPages","options","append","request","result","locations","ids","location","error","import_vue","import_vue_router","validateManualLocation","fields","buildManualLocationRequest","options","request","checked","emit","__emit","onInput","event","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_toDisplayString","_createCommentVNode","_createElementVNode","_createBlock","_normalizeClass","Input_default","render","router","open","pending","fields","addressError","error","duplicateWarning","form","formId","addressErrorId","typeOptions","LOCATION_TYPE_OPTIONS","setOpen","value","reset","submit","validateManualLocation","request","buildManualLocationRequest","locationId","result","api","err","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_createVNode","_normalizeClass","$event","_withCtx","_createTextVNode","_toDisplayString","_createElementVNode","_withModifiers","_createCommentVNode","_renderList","duplicate","AddLocationDialog_default","render","import_vue","breakpointOf","width","isPhoneBreakpoint","breakpoint","isCompactBreakpoint","useBreakpoint","breakpoint","breakpointOf","queries","update","query","import_vue","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_normalizeClass","_renderSlot","Badge_default","render","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createVNode","_createElementVNode","_toDisplayString","_createCommentVNode","_renderSlot","EmptyState_default","render","import_vue","props","__props","emit","__emit","fmt","n","pageCount","from","to","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_createVNode","$event","_withCtx","_createTextVNode","PaginationBar_default","render","import_vue","props","__props","display","width","token","suitabilityToken","scoreToSuitability","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_normalizeClass","_normalizeStyle","ScoreBar_default","render","import_vue","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","SortCaret_default","render","formatLocationIdsForClipboard","locationIds","unique","a","b","SORT_STORAGE_KEY","SORT_FIELDS","DEFAULT_SORT","parseSortState","raw","parsed","field","direction","nextSortState","current","loadSortState","saveSortState","sort","PAGE_SIZE","breakpoint","useBreakpoint","phone","router","scrollArea","pages","LocationPages","locations","total","loading","actionError","error","selecting","provinces","searchInput","query","province","locationType","reviewState","page","pageSize","sort","loadSortState","selected","copied","provinceOptions","p","typeOptions","LOCATION_TYPE_OPTIONS","o","allOnPageSelected","l","someOnPageSelected","fmt","n","photoInput","loc","streetViewCount","PHOTO_TITLES","photoGlyph","status","classifyImageStatus","photoTitle","requestKey","requestedPage","load","options","key","params","api","setLocationCount","loadMore","retry","openRow","event","id","loadProvinces","searchTimer","value","applySort","field","nextSortState","saveSortState","onPage","next","clearFilters","toggleRow","toggleAllOnPage","copiedTimer","copySelectedIds","text","formatLocationIdsForClipboard","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_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","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_createVNode","_createCommentVNode","$event","_createTextVNode","_withCtx","_createBlock","_Fragment","_renderList","loc","_normalizeClass","LocationsView_default","render","import_vue","import_vue_router","import_vue","formatAnalysisDate","iso","options","parts","get","type","p","formatCostCents","cents","STATUS_LABELS","analysisStatusLabel","status","IMPACT_TITLES","feedbackImpactTitle","impact","selectedLocationCount","selected","applyScoringPreview","analysis","preview","live","result","wantsScoringPreview","analysisNeedsPolling","model","buildAnalysisRerun","primaryModelResult","results","a","b","analysisUsage","paid","sum","parseAnalysisObject","value","parsed","HARD_EXCLUSION","REVIEW_FLAG","ASPECT_LABELS","ASPECT_LABEL_BY_KEY","OBSERVATION_RULE_HINTS","o","HARD_EXCLUSION","REVIEW_FLAG","effectTone","effect","buildScoreHints","breakdown","map","add","field","hint","list","aspectKey","aspect","label","step","outcome","rule","ASPECT_BREAKDOWN_LABELS","BRON_LABELS","SECTION_TOOLTIPS","FIELD_TOOLTIPS","formatObservationValue","v","x","SECTION_DEFAULT_BRON","SERVICE_CHECKLIST_LABELS","isChecklistEntry","REVIEW_FLAG_LABELS","buildScoreBreakdownView","liveBreakdown","driftExplainedByCalibration","isHardExclusion","aspects","score","changedAspects","reviewFlags","sum","flag","buildObservationSections","observations","sections","hints","key","sectionKey","sectionValue","source","primitive","entries","sources","value","fields","fieldSource","serviceKey","entry","summarizeLocationAnalysis","status","consensusOverallScore","modelResults","source","primaryModelResult","model","ASPECT_LABELS","aspect","props","__props","details","loading","error","request","summary","summarizeLocationAnalysis","status","analysisStatusLabel","loadDetails","current","id","result","api","caught","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_createVNode","_createTextVNode","_Fragment","_createCommentVNode","_createBlock","_withCtx","_renderList","aspect","LocationAnalysisSummary_default","render","import_vue","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_normalizeClass","_renderSlot","PageBody_default","render","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_toDisplayString","_createCommentVNode","_renderSlot","_createElementVNode","_normalizeClass","Panel_default","render","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_renderList","item","index","_normalizeClass","_createElementVNode","_toDisplayString","_renderSlot","_createTextVNode","MetaBar_default","render","import_vue_router","fmt","n","import_vue","_hoisted_1","_hoisted_2","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_renderList","tab","_createBlock","_normalizeClass","_withCtx","_createTextVNode","_toDisplayString","_createCommentVNode","_createElementVNode","PageTabs_default","render","emit","__emit","onChange","event","import_vue","_hoisted_1","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","Checkbox_default","render","emit","__emit","onInput","event","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_toDisplayString","_createCommentVNode","_createElementVNode","Textarea_default","render","import_vue","LOCATION_IMAGE_TABS","availableLocationImages","images","image","resolveImageTab","options","available","tab","props","__props","selected","active","resolveImageTab","current","image","shown","tabs","LOCATION_IMAGE_TABS","tab","id","onTabKeydown","event","index","next","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","_Fragment","_renderList","tab","_normalizeClass","$event","_createTextVNode","_toDisplayString","_createCommentVNode","LocationImageTabs_default","render","import_vue","import_vue_router","DIMENSION_ORDER","DIMENSION_LABELS","EXPORT_COLUMNS","k","PII_PATTERNS","maskPii","text","out","re","ratingLabel","rating","ASPECTS","disagreementCount","fb","n","a","aspectGlyph","rating","filterFeedback","rows","query","q","submitterOptions","names","b","filterBySubmitter","submitter","SORT_STORAGE_KEY","SORT_FIELDS","DEFAULT_SORT","DESC_FIRST","nextSortState","current","field","sortFeedback","sort","dir","parseSortState","raw","parsed","direction","loadSortState","saveSortState","TIME_ZONE","formatFeedbackDate","iso","formatFeedbackDateTime","date","day","time","XLSX_MIME_TYPE","downloadBase64File","options","binary","bytes","i","url","anchor","props","__props","dimensions","rows","item","dimension","DIMENSION_LABELS","ratingTone","rating","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","_withCtx","_createElementBlock","_createElementVNode","_toDisplayString","_createVNode","$event","_createTextVNode","_Fragment","_renderList","item","_createCommentVNode","dimension","LocationFeedbackList_default","render","import_vue","import_vue_router","summarizeDirection","items","item","deltas","delta","PII_PATTERNS","maskPii","text","result","pattern","formatDistanceBadge","distance","FEEDBACK_DIMENSION_LABELS","props","__props","state","items","retrievalEnabled","error","selected","detailOpen","requestVersion","summary","summarizeDirection","rows","item","formatDistanceBadge","detailDescription","date","dateLabel","relevance","load","version","result","api","cause","workerActionError","openFeedback","ratingLabel","rating","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_createElementVNode","_createBlock","_withCtx","_createTextVNode","_toDisplayString","_createCommentVNode","_renderList","row","$event","_normalizeClass","_createVNode","dimension","RetrievableFeedbackPreview_default","render","import_vue","props","__props","emit","__emit","hostname","options","defaultAnalysisOptions","models","ready","loading","running","loadError","startError","storageError","errors","form","advancedOpen","repository","loadVersion","mounted","selectedCount","model","groups","grouped","labels","provider","items","open","loadMeta","persist","version","meta","api","AnalysisOptionsRepository","selectAvailableModels","error","workerActionError","toggleModel","id","value","setOpen","start","validateAnalysisOptions","locationId","result","buildAnalysisRequest","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","_withCtx","_createElementBlock","_toDisplayString","_createCommentVNode","_createVNode","$event","_createTextVNode","_createElementVNode","_withModifiers","model","_Fragment","_renderList","group","RunAnalysisDialog_default","render","import_vue","LocationRequestScope","#active","#versions","resource","version","locationCoordinates","location","latestLocationAnalysis","analyses","a","b","parseGroundTruth","input","raw","parkingSpots","scoutLocationUrl","options","host","safeWebsiteUrl","value","normalized","url","projectCadastralBoundary","options","rings","points","point","longitudes","latitudes","minLng","maxLng","minLat","maxLat","metersPerDegLng","widthMeters","heightMeters","scale","width","height","project","ring","value","props","__props","emit","__emit","data","loading","error","scope","LocationRequestScope","projection","projectCadastralBoundary","load","current","result","api","caught","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","_withCtx","_createElementBlock","_createElementVNode","_toDisplayString","_createVNode","_createTextVNode","_createCommentVNode","CadastralMap_default","render","import_vue","SBI_CODES","mostSpecificSbiCodes","value","codes","code","other","sbiParentDescription","parents","length","parent","SBI_CODES","props","__props","codes","mostSpecificSbiCodes","code","SBI_CODES","sbiParentDescription","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_renderList","item","_createBlock","_withCtx","_createElementVNode","_toDisplayString","_createCommentVNode","SbiCodesDisplay_default","render","import_vue","errorMessage","error","useLocationDetail","getId","location","analyses","feedback","feedbackLoading","feedbackError","images","scrapes","loading","analysesLoading","imagesLoading","scrapeLoading","downloading","scraping","deleting","saving","analysesError","imageErrors","scrapeError","groundTruthError","groundTruthSaved","selectedAnalyses","parkingSpots","adjacent","notes","latestAnalysis","latestLocationAnalysis","coordinates","locationCoordinates","sortedAnalyses","a","b","scope","LocationRequestScope","poll","stopPolling","syncGroundTruth","value","loadLocation","current","id","result","api","caught","refreshAnalyses","locationId","analysis","loadFeedback","loadImages","force","loadScrapes","toggleAnalysis","options","next","selectAll","deleteAnalyses","ids","saveGroundTruth","values","parseGroundTruth","canonical","googleMapsUrl","params","query","googleMapsEmbedUrl","params","streetViewUrl","streetViewEmbedUrl","resolveActiveTab","rawTab","allowedTabs","defaultTab","buildTabHref","pathname","searchParams","value","params","qs","props","__props","route","router","feedback","feedbackLoading","feedbackError","loadFeedback","location","analyses","sortedAnalyses","latestAnalysis","coordinates","images","scrapes","loading","analysesLoading","imagesLoading","scrapeLoading","downloading","scraping","deleting","saving","error","analysesError","imageErrors","scrapeError","groundTruthError","groundTruthSaved","selectedAnalyses","parkingSpots","adjacent","notes","loadLocation","refreshAnalyses","loadImages","loadScrapes","toggleAnalysis","selectAll","deleteAnalyses","saveGroundTruth","useLocationDetail","breakpoint","useBreakpoint","actionsOpen","cadastral","parcelLabel","parcelArea","runOpen","deleteOpen","deletedMessage","startedId","scrapeModal","scrapeModalOpen","value","mapMode","title","activeTab","resolveActiveTab","latestScore","scoutUrl","scoutLocationUrl","cadastralImage","image","mapSource","googleMapsEmbedUrl","streetViewEmbedUrl","allSelected","adjacentOptions","tabPath","query","key","item","part","buildTabHref","tabs","meta","fields","safeWebsiteUrl","formatLocationType","field","socials","name","setCrumbLabel","onAnalysisStarted","analysisId","analysisDetailRoute","confirmDelete","count","locationId","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_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","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_40","_hoisted_41","_hoisted_42","_hoisted_43","_hoisted_44","_hoisted_45","_hoisted_46","_hoisted_47","_hoisted_48","_hoisted_49","_hoisted_50","_hoisted_51","_hoisted_52","_hoisted_53","_hoisted_54","_hoisted_55","_hoisted_56","_hoisted_57","_hoisted_58","_hoisted_59","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_withCtx","_createTextVNode","_toDisplayString","_createBlock","_createCommentVNode","_Fragment","$event","_withDirectives","_createSlots","_renderList","message","index","field","result","social","_vShow","analysis","_normalizeClass","_withModifiers","args","LocationDetailView_default","render","import_vue","import_vue_router","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","_withCtx","_createElementVNode","_createElementBlock","_Fragment","_renderList","result","_createTextVNode","_toDisplayString","_createCommentVNode","aspect","AnalysisComparison_default","render","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_createBlock","_withCtx","_createTextVNode","_createCommentVNode","AnalysisFinalScore_default","render","import_vue","import_vue","props","__props","expanded","view","buildScoreBreakdownView","aspects","aspect","suitabilityToken","scoreToSuitability","suitabilityLabel","overallTone","overallLabel","decimal","value","toggleAspect","key","next","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_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","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","_createBlock","_withCtx","_createTextVNode","_toDisplayString","_createCommentVNode","_Fragment","_renderList","reason","aspect","$event","_createVNode","step","index","flag","ScoreBreakdown_default","render","import_vue","import_reka_ui","import_vue","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","_withCtx","_createVNode","_renderSlot","_createTextVNode","_toDisplayString","Tooltip_default","render","props","__props","selectedSections","key","rows","buildObservationSections","servicesOnly","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createCommentVNode","_toDisplayString","_Fragment","_renderList","row","_createElementVNode","_createBlock","_withCtx","_createTextVNode","hint","index","_normalizeClass","field","item","ObservationSections_default","render","import_vue","CALIBRATION_ASPECT_LABELS","calibrationRows","calibration","key","label","formatDebugJson","value","analysisLogEntries","parsed","entry","start","elapsed","isGroundTruthEcho","options","input","GroundTruthRepository","#api","api","values","parseGroundTruth","result","location","props","__props","rows","calibrationRows","moved","appliedAt","value","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_withCtx","_createTextVNode","_toDisplayString","_normalizeClass","_Fragment","_createCommentVNode","_renderList","row","adjustment","index","id","CalibrationPanel_default","render","isDriftExplainedByCalibration","recompute","calibration","key","value","props","__props","readBreakdown","raw","value","parseAnalysisObject","models","result","live","analysisStatusLabel","isDriftExplainedByCalibration","ASPECT_LABELS","aspect","detail","detailText","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_normalizeClass","_Fragment","_renderList","model","_createBlock","_withCtx","_createTextVNode","_createCommentVNode","_createVNode","_toDisplayString","_createElementVNode","explanation","index","detail","value","key","AnalysisModelResults_default","render","import_vue","import_vue_router","props","__props","selectedId","detailOpen","selected","item","summary","summarizeDirection","rows","formatDistanceBadge","detailDescription","date","dateLabel","relevance","openFeedback","ratingLabel","rating","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_createElementVNode","_createTextVNode","_toDisplayString","_createBlock","_withCtx","_createVNode","_createCommentVNode","_renderList","row","$event","_normalizeClass","dimension","RetrievedFeedbackPanel_default","render","import_vue","props","__props","logs","analysisLogEntries","logStream","sections","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_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","_hoisted_30","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","_withCtx","_createElementVNode","_toDisplayString","_createVNode","_createTextVNode","_createElementBlock","_createCommentVNode","_Fragment","_renderList","result","section","_normalizeClass","entry","index","DebugPanel_default","render","import_vue","props","__props","emit","__emit","scope","LocationRequestScope","repository","GroundTruthRepository","api","fields","pending","fieldError","error","saved","updatedAt","loadedLocationId","form","adjacentOptions","load","value","confirmed","isGroundTruthEcho","save","parseGroundTruth","cause","isCurrent","result","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","_withCtx","_createElementVNode","_withModifiers","_normalizeClass","_createVNode","$event","_createElementBlock","_toDisplayString","_createCommentVNode","_createTextVNode","GroundTruthEditor_default","render","import_vue","props","__props","cachedImages","availableLocationImages","selected","current","open","value","onKeydown","move","delta","event","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_renderList","image","index","$event","_createElementVNode","_toDisplayString","_createCommentVNode","_createTextVNode","_createVNode","_withCtx","LocationImageGallery_default","render","import_vue","useAnalysisDetail","getRoute","analysis","location","images","loading","imageLoading","error","locationError","imageError","actionError","starting","cancelling","polling","analysisNeedsPolling","coordinates","locationCoordinates","scope","LocationRequestScope","timer","stopTimer","updateCrumb","setAnalysisCrumb","refreshAnalysis","current","route","result","api","preview","wantsScoringPreview","answer","applyScoringPreview","caught","refreshLocation","id","loadImages","rerun","buildAnalysisRerun","workerActionError","cancel","props","__props","route","router","breakpoint","useBreakpoint","compact","analysis","location","images","loading","imageLoading","error","locationError","imageError","actionError","starting","cancelling","polling","coordinates","refreshAnalysis","refreshLocation","loadImages","rerun","cancel","useAnalysisDetail","confirmCancel","photosOpen","activeTab","resolveActiveTab","tabs","tab","completed","model","primary","primaryModelResult","usage","analysisUsage","finishedCount","status","analysisStatusLabel","stageLabel","rerunAnalysis","locationId","analysisId","stopAnalysis","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_createElementVNode","_createVNode","_withCtx","_createTextVNode","_toDisplayString","_createBlock","_createCommentVNode","$event","_renderList","model","aspect","AnalysisDetailView_default","render","import_vue","import_vue_router","EXPLORER_PHASES","FEEDBACK_OPTIONS","ALL_SUITABILITIES","SUITABILITY_LEVELS","DEFAULT_EXPLORER_FILTERS","phaseOf","location","matchesExplorerFilters","filters","query","scoreToSuitability","filterExplorerLocations","locations","countBySuitability","counts","countByPhase","activeFilterCount","level","toggleInList","list","value","order","next","item","import_vue","_hoisted_1","_hoisted_2","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","_Fragment","_renderList","level","_normalizeClass","_createTextVNode","_toDisplayString","ExplorerLegend_default","render","L","import_vue","suitabilityLabelFor","levels","ALL_SUITABILITIES","suitabilityLabel","phaseLabelFor","phases","EXPLORER_PHASES","FEEDBACK_LABELS","countLabel","shown","total","provincesFrom","locations","unique","location","a","b","pinClasses","selected","classes","scoreToSuitability","formatCoordinates","latitude","longitude","TILE_URL","ATTRIBUTION","NL_ZOOM","NL_CENTER","props","__props","emit","__emit","el","map","layer","markers","didFit","resizeObserver","waitObserver","pinIcon","location","selected","pinClasses","renderMarkers","marker","l","syncSelection","id","initMap","import_vue","_hoisted_1","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","ExplorerMap_default","render","import_vue","props","__props","emit","__emit","level","scoreToSuitability","barToken","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_normalizeClass","$event","_createElementVNode","_toDisplayString","_createBlock","_createCommentVNode","ExplorerResultRow_default","render","__emit","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_normalizeClass","$event","_createElementVNode","_createCommentVNode","_toDisplayString","FilterChoice_default","render","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","_withCtx","_createElementVNode","_normalizeClass","_toDisplayString","_createVNode","_renderSlot","FilterDropdown_default","render","import_vue","props","__props","emit","__emit","provinceOptions","province","typeOptions","LOCATION_TYPE_OPTIONS","option","swatchFor","level","suitabilityToken","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","$event","_createElementVNode","_withModifiers","_toDisplayString","_createCommentVNode","_createVNode","value","_Fragment","_renderList","level","_createBlock","phase","key","label","_withCtx","_createTextVNode","FilterSheet_default","render","LIST_PAGE","router","all","error","filters","DEFAULT_EXPLORER_FILTERS","selectedId","limit","breakpoint","useBreakpoint","phone","isPhoneBreakpoint","compact","isCompactBreakpoint","listOpen","filterSheetOpen","rows","filterExplorerLocations","provinces","provincesFrom","suitabilityCounts","countBySuitability","phaseCounts","countByPhase","active","activeFilterCount","selected","row","patch","next","toggleAllSuitabilities","ALL_SUITABILITIES","onSelect","id","onOpen","swatchFor","level","suitabilityToken","load","result","api","err","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_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","_hoisted_30","_hoisted_31","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_createElementVNode","_createVNode","_createCommentVNode","value","$event","_withCtx","_createTextVNode","_toDisplayString","_renderList","province","_createBlock","option","level","phase","key","label","_normalizeClass","row","ExplorerView_default","render","import_vue","import_vue_router","import_vue","slots","hasTabs","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_toDisplayString","_createCommentVNode","_renderSlot","PageHeader_default","render","SORT_STORAGE_KEY","SORT_FIELDS","DEFAULT_SORT","parseSortState","raw","parsed","field","direction","nextSortState","current","loadSortState","saveSortState","sort","PAGE_SIZE","route","router","analyses","total","hasData","provinces","loading","error","sort","loadSortState","queryString","key","value","query","province","page","parsed","searchInput","selected","copied","countLabel","provinceOptions","p","allOnPageSelected","a","someOnPageSelected","locationCount","selectedLocationCount","fmt","n","statusOf","analysisStatusLabel","load","result","api","err","loadProvinces","updateQuery","updates","next","applySearch","setProvince","setPage","applySort","field","nextSortState","saveSortState","openAnalysis","analysisDetailRoute","toggleRow","toggleAllOnPage","clearSelection","copiedTimer","copySelectedLocationIds","text","formatLocationIdsForClipboard","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_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","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_createCommentVNode","_createVNode","_withCtx","_createElementVNode","_withModifiers","$event","_createTextVNode","_toDisplayString","_renderList","a","_normalizeClass","_createBlock","AnalysesView_default","render","import_vue","import_vue_router","feedback","loading","error","exporting","filter","submitter","sort","loadSortState","submitters","submitterOptions","submitterSelectOptions","name","names","rows","sortFeedback","filterBySubmitter","filterFeedback","aspectOrder","ASPECTS","a","detailRoute","id","scoreToken","score","suitabilityToken","scoreToSuitability","ariaSort","field","applySort","nextSortState","saveSortState","load","api","err","exportXlsx","filename","base64","downloadBase64File","XLSX_MIME_TYPE","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_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","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","_createCommentVNode","_createVNode","_withCtx","_createTextVNode","_toDisplayString","_createBlock","_Fragment","$event","_renderList","fb","a","_normalizeClass","FeedbackView_default","render","import_vue","import_vue_router","props","__props","feedback","location","loading","error","images","imagesLoading","imagesError","coordinates","locationId","_previous","onCleanup","active","result","api","err","title","subtitle","formatFeedbackDateTime","OVERALL","overall","rating","scoreToken","score","suitabilityToken","scoreToSuitability","facts","loc","rows","formatLocationType","RatingBadge","p","Badge_default","load","setCrumbLabel","name","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_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","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_createCommentVNode","_createVNode","_withCtx","_createTextVNode","_normalizeClass","_Fragment","_renderList","d","_createBlock","fact","FeedbackDetailView_default","render","import_vue","import_vue","StatTile_default","_defineComponent","__props","__expose","__returned__","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_createCommentVNode","StatTile_default","render","fillDailySeries","points","days","endDate","byDate","point","end","series","offset","day","date","formatTokens","n","formatDollars","cents","formatFailRate","failed","runs","formatShortDate","iso","year","month","day","dailyBarHeight","costCents","maxCost","analysesLabel","stats","loading","series","fillDailySeries","maxCost","totalRuns","sum","d","totalCost","barLabel","formatShortDate","formatDollars","api","err","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_createVNode","_withCtx","_createElementVNode","_createCommentVNode","_renderList","m","_toDisplayString","_normalizeClass","_createBlock","d","index","_normalizeStyle","UsageView_default","render","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_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","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_createVNode","_withCtx","_createElementVNode","_createCommentVNode","_createTextVNode","_renderList","w","_toDisplayString","_normalizeStyle","s","flag","meaning","ScoringView_default","render","import_vue","import_vue_router","HELP_LEAD","HELP_LOGIN_NOTICE","HELP_CHAPTERS","HELP_ROUTES","helpHrefToRoute","href","QUERY_KEY","route","router","chapterHref","id","scrollToChapter","goToChapter","wanted","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_createVNode","_withCtx","_createElementVNode","_createCommentVNode","_renderList","chapter","_withModifiers","$event","_toDisplayString","block","index","item","_createTextVNode","HelpView_default","render","import_vue","import_vue_router","import_vue","import_vue","form","_useModel","__props","props","emit","__emit","regionOptions","ALL_REGIONS_VALUE","ALL_REGIONS_LABEL","value","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","_withCtx","_createElementVNode","_withModifiers","$event","_createVNode","_createElementBlock","_Fragment","_createTextVNode","_toDisplayString","_normalizeClass","_createCommentVNode","BulkConfiguration_default","render","import_vue","import_vue_router","props","__props","emit","__emit","now","filter","logLimit","timer","percent","activeEntries","entry","history","filteredHistory","visibleHistory","labels","stage","duration","seconds","destination","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","_withCtx","_createElementVNode","_createElementBlock","_createCommentVNode","_toDisplayString","_createTextVNode","$event","_Fragment","_renderList","entry","_createVNode","_withDirectives","_vModelText","_normalizeClass","BulkProgress_default","render","import_vue","import_vue_router","props","__props","query","limit","filtered","photo","visible","photoLabels","summary","key","label","group","cents","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_createBlock","_withCtx","_createElementVNode","_toDisplayString","_createCommentVNode","_renderList","group","_createVNode","$event","photo","_createTextVNode","BulkSelectionSummary_default","render","form","regions","regionsLoading","regionsError","fieldErrors","loadRegions","locked","busy","error","resolved","estimate","imageStatuses","statusInfo","missingIds","navigationPaused","run","resolveTargets","checkStatus","fillMissing","checkPhotos","estimateCosts","prepareStart","start","pause","resume","cancel","acknowledgeUncertain","retryUnfinished","useBulkRunner","root","confirmation","cancelConfirmation","uncertainConfirmation","missingOpen","missingCount","missingError","confirmationCount","focusError","prepare","targets","confirmStart","showMissing","selectMissing","inspect","action","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createVNode","$event","_createCommentVNode","_createElementVNode","_toDisplayString","_createBlock","_withCtx","_createTextVNode","BulkRunner_default","render","import_vue","import_vue","batchDisplay","input","pendingCount","completedCount","failedCount","gemini","state","stats","done","batchProgressPercent","progress","batchOverview","options","live","row","group","a","b","acceptBatchAction","result","action","useBatchMonitor","rows","lastPoll","retryCount","loading","loaded","error","warning","actionError","message","action","progressOpen","pendingCount","sum","row","timer","disposed","watchUntil","refresh","batches","retries","api","batchOverview","live","group","run","actionName","result","acceptBatchAction","err","toggleSettingsSelection","options","id","runSettingsAction","ids","IMPORT_QUERY_STORAGE_KEY","DEFAULT_IMPORT_QUERY","settingsDate","value","import_vue","import_vue_router","props","__props","emit","__emit","data","loading","error","view","copied","copyError","disposed","load","result","api","err","copyPrompt","prompt","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","$event","_withCtx","_createTextVNode","_toDisplayString","_createCommentVNode","_createVNode","_createElementVNode","_createElementBlock","_Fragment","_renderList","entry","BatchDetails_default","render","rows","lastPoll","retryCount","loading","loaded","error","warning","actionError","message","action","progressOpen","pendingCount","refresh","run","useBatchMonitor","detailsId","search","copiedId","copyError","visible","row","pollNeeded","tone","display","copyId","id","__expose","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_createVNode","_withCtx","_createElementVNode","_toDisplayString","_createCommentVNode","_createTextVNode","$event","_createBlock","_renderList","row","_normalizeStyle","BatchMonitor_default","render","import_vue","parsePartsSpec","raw","m","part","total","BULK_COMMAND_PREFIX","DEFAULT_BULK_COMMAND_OPTIONS","TARGETED_PHASES","quoteValue","value","isIntString","isNumberString","parseIdsCsv","raw","s","n","buildBulkCommand","opts","errors","warnings","flags","ids","usesWindow","hasParts","hasLimit","hasOffset","parsePartsSpec","concChanged","script","STORAGE_KEY","environments","phases","targets","types","windows","paths","loadPersistedOptions","raw","DEFAULT_BULK_COMMAND_OPTIONS","opts","provinces","regionsLoading","regionsError","copied","copyError","copyTimeout","disposed","result","buildBulkCommand","phaseHint","phase","windowMode","selectedType","type","regionOptions","province","selectedRegion","setWindow","value","loadRegions","response","api","copy","command","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_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","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_withCtx","$event","_toDisplayString","_createBlock","_Fragment","_createTextVNode","_createCommentVNode","_renderList","error","warning","CommandBuilder_default","render","route","run","useBulkRunStatus","active","tabs","tab","import_vue","_hoisted_1","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_createVNode","_withCtx","_createTextVNode","_toDisplayString","_createCommentVNode","_withDirectives","_vShow","_createBlock","BulkView_default","render","import_vue","import_vue_router","import_vue","session","loading","error","load","api","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","_withCtx","_createElementBlock","_Fragment","_createElementVNode","_toDisplayString","_createVNode","_createTextVNode","_createCommentVNode","SettingsAccount_default","render","import_vue","query","DEFAULT_IMPORT_QUERY","dryRun","verbose","running","error","queryError","form","result","IMPORT_QUERY_STORAGE_KEY","value","runImport","api","err","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createBlock","_withCtx","_createElementVNode","_withModifiers","_normalizeClass","_createVNode","$event","_createElementBlock","_toDisplayString","_createCommentVNode","_createTextVNode","_Fragment","_renderList","region","SettingsImport_default","render","import_vue","import_vue_router","import_vue","useSettingsAnalyses","tab","analyses","selected","search","loading","busy","error","message","confirmOpen","disposed","visible","needle","row","value","rows","id","load","result","api","err","toggleAll","toggleSettingsSelection","toggle","apply","affected","runSettingsAction","props","__props","analyses","visible","search","selected","loading","busy","error","message","confirmOpen","load","toggle","toggleAll","apply","useSettingsAnalyses","copy","import_vue","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_createVNode","_withCtx","_createElementVNode","_toDisplayString","_createTextVNode","_createBlock","$event","_createCommentVNode","_renderList","analysis","value","SettingsAnalyses_default","render","route","router","active","resolveSettingsSection","current","settingsSection","canonicalize","wanted","settingsSectionRoute","import_vue","_hoisted_1","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","_Fragment","_createVNode","_withCtx","_createElementVNode","_createBlock","SettingsView_default","render","routes","LocationsView_default","LocationDetailView_default","route","AnalysisDetailView_default","ExplorerView_default","AnalysesView_default","FeedbackView_default","FeedbackDetailView_default","UsageView_default","ScoringView_default","HelpView_default","BulkView_default","SettingsView_default","router","to","from","rememberSettingsReturn","initTheme","onDomReady","app","App_default","router","setupWRDAuth","aps"]}